Posted by kkkk Sun 25th Mar 2007 04:13 - Syntax is PHP - 63 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
PHP parser reported no syntax errors in this post!
-
if ($_GET["mode"] == "viewlinks"){ // view users' links
-
$offset=(get_current_page()-1)*$page_size;
-
-
$main_smarty->assign('userdata', $userdata);
-
-
$usersql = mysql_query("SELECT * FROM " . table_links . " where link_author='".$userdata[0][user_id]."' ORDER BY link_date DESC LIMIT $offset,$page_size");
-
$main_smarty->assign('links', $links);
-
-
$rows = $db->get_var("SELECT count(*) FROM " . table_links . " where link_author='".$userdata[0][user_id]."'");
-
-
if ($_REQUEST['status'] == "discard") {
-
$db->query('UPDATE `' . table_links . '` SET `link_status` = "discard" WHERE `link_id` = "'.$_GET["id"].'"');
-
//header("Location: ".my_pligg_base."/admin_users.php?mode=viewlinks&user=".$userdata[user_login]."");
-
}
-
elseif ($_REQUEST['status'] == "published") {
-
$db->query('UPDATE `' . table_links . '` SET `link_status` = "published" WHERE `link_id` = "'.$_GET["id"].'"');
-
//header("Location: ".my_pligg_base."/admin_users.php?mode=viewlinks&user=".$userdata[user_login]."");
-
}
-
elseif ($_REQUEST['status'] == "queued") {
-
$db->query('UPDATE `' . table_links . '` SET `link_status` = "queued" WHERE `link_id` = "'.$_GET["id"].'"');
-
//header("Location: ".my_pligg_base."/admin_users.php?mode=viewlinks&user=".$userdata[user_login]."");
-
}
-
}
-
-
// breadcrumbs and page title
-
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
-
$navwhere['link1'] = getmyurl('admin', '');
-
$navwhere['text2'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel_1');
-
$navwhere['link2'] = my_pligg_base . "/admin_users.php";
-
$navwhere['text3'] = $main_smarty->get_config_vars('PLIGG_Visual_View_User_Sub_Links');
-
$main_smarty->assign('navbar_where', $navwhere);
-
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
-
-
// pagename
-
$main_smarty->assign('pagename', pagename);
-
-
// show the template
-
$main_smarty->assign('tpl_center', $the_template . '/admin_templates/user_view_links_center');
-
$main_smarty->display($the_template . '/pligg.tpl');
-
}
PermaLink to this entry https://pastebin.co.uk/12199
Posted by kkkk Sun 25th Mar 2007 04:13 - Syntax is PHP - 63 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
Comments: 0