From b4d0834debf650469bd4b8eb9d1b26837042fa63 Mon Sep 17 00:00:00 2001 From: dimka3210 Date: Wed, 9 Jan 2013 08:23:12 +0000 Subject: [PATCH] r489 Add draft script git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@489 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293 --- upload/includes/ucp/usercp_viewdraft.php | 44 +++++++++++++++++++ upload/includes/ucp/usercp_viewprofile.php | 2 - .../templates/default/usercp_viewprofile.tpl | 2 +- 3 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 upload/includes/ucp/usercp_viewdraft.php diff --git a/upload/includes/ucp/usercp_viewdraft.php b/upload/includes/ucp/usercp_viewdraft.php new file mode 100644 index 000000000..f92902f0f --- /dev/null +++ b/upload/includes/ucp/usercp_viewdraft.php @@ -0,0 +1,44 @@ +fetch_rowset($sql); + +$i = 0; +foreach ($rows as $row) { + $template->assign_block_vars("DRAFT", array( + "ROW_CLASS" => ($i % 2) ? 2 : 1, + "TITLE" => $row["topic_title"], + "T_ID" => $row["topic_id"], + "DT_CREATE" => date("d-m-Y (H:i:s)", $row["topic_time"]), + "POST_FIRST_ID" => $row["topic_first_post_id"] + )); + + $i++; +} + +$template->assign_vars(array( + "USERNAME" => $profiledata["username"] +)); + +print_page('usercp_viewdraft.tpl'); diff --git a/upload/includes/ucp/usercp_viewprofile.php b/upload/includes/ucp/usercp_viewprofile.php index 7ac98489b..33cded985 100644 --- a/upload/includes/ucp/usercp_viewprofile.php +++ b/upload/includes/ucp/usercp_viewprofile.php @@ -120,8 +120,6 @@ $template->assign_vars(array( 'USER_ACTIVE' => $profiledata['user_active'], 'COUNT_DRAFT' => $count_draft, - 'SEE_I' => ($profiledata['user_id'] == $userdata['user_id'] || IS_ADMIN) ? true : false, - 'OCCUPATION' => $profiledata['user_occ'], 'INTERESTS' => $profiledata['user_interests'], 'SKYPE' => $profiledata['user_skype'], diff --git a/upload/templates/default/usercp_viewprofile.tpl b/upload/templates/default/usercp_viewprofile.tpl index 04ed77225..ad432d753 100644 --- a/upload/templates/default/usercp_viewprofile.tpl +++ b/upload/templates/default/usercp_viewprofile.tpl @@ -403,7 +403,7 @@ ajax.callback.gen_passkey = function(data){ {L_ACCESS_SRV_LOAD}: {IGNORE_SRV_LOAD} - + {L_DRAFTS} {COUNT_DRAFT}