Posted by view_links Sun 25th Mar 2007 02:39 - Syntax is PHP - 107 viewsRun this post in the PHP shell
Download | New Post | Modify | Hide line numbers
PHP parser reported no syntax errors in this post!
  1. if ($_GET["mode"] == "viewlinks"){ // view users' links
  2.             global $offset, $page_size;
  3.            
  4.             $usersql = mysql_query('SELECT * FROM ' . table_users . ' where user_login="'.$_GET["user"].'"');
  5.             $userdata = array();
  6.                 while ($row = mysql_fetch_array ($usersql, MYSQL_ASSOC)) array_push ($userdata, $row);
  7.             $main_smarty->assign('userdata', $userdata);
  8.  
  9.             $usersql = mysql_query('SELECT * FROM ' . table_links . ' where link_author="'.$userdata[0][user_id].'" LIMIT $offset,$page_size');
  10.             $links = array();
  11.                 while ($row = mysql_fetch_array ($usersql, MYSQL_ASSOC)) array_push ($links, $row);
  12.             $main_smarty->assign('links', $links);
  13.                    
  14.             $offset=(get_current_page()-1)*$page_size;
  15.             $rows = $db->get_var('SELECT count(*) FROM ' . table_links . ' where link_author="'.$userdata[0][user_id].'"');
  16.  
  17.             // breadcrumbs and page title
  18.             $navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
  19.             $navwhere['link1'] = getmyurl('admin', '');
  20.             $navwhere['text2'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel_1');
  21.             $navwhere['link2'] = my_pligg_base . "/admin_users.php";
  22.             $navwhere['text3'] = $main_smarty->get_config_vars('PLIGG_Visual_View_User_Sub_Links');
  23.             $main_smarty->assign('navbar_where', $navwhere);
  24.             $main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
  25.      
  26.                         // pagename
  27.             define('pagename', 'admin_users');
  28.                       $main_smarty->assign('pagename', pagename);
  29.      
  30.              // show the template
  31.             $main_smarty->assign('tpl_center', $the_template . '/admin_templates/user_view_links_center');
  32.             $main_smarty->display($the_template . '/pligg.tpl');
  33.         }

PermaLink to this entry https://pastebin.co.uk/12195
Posted by view_links Sun 25th Mar 2007 02:39 - Syntax is PHP - 107 viewsRun this post in the PHP shell
Download | New Post | Modify | Hide line numbers

 

Comments: 0