火车采集器软件交流官方论坛

 找回密码
 加入会员
搜索
火车采集器V9版免费下载火车浏览器 - 可视采集,万能群发,全自动脚本工具
查看: 4456|回复: 1

dezend出来的admincp.php的代码,谁能用来做SS6UC的发布脚本

[复制链接]
发表于 2008-7-24 11:21:41 | 显示全部楼层 |阅读模式

  1. <?php
  2. /*********************/
  3. /*                   */
  4. /*  DeZend For PHP5  */
  5. /*  BY WwW.DeZend.CC */
  6. /*   With Bendy [2]  */
  7. /*                   */
  8. /*********************/
  9. include_once( "./include/main.inc.php" );
  10. @define( "IN_SUPESITE_ADMINCP", TRUE );
  11. define( "IMG_DIR", S_URL."/admin/images" );
  12. define( "CPURL", S_URL."/admincp.php" );
  13. $action = empty( $_GET['action'] ) ? "" : $_GET['action'];
  14. getcookie( 1 );
  15. if ( empty( $_SGLOBAL['supe_uid'] ) || empty( $_SGLOBAL['member']['password'] ) )
  16. {
  17. setcookie( "_refer", rawurlencode( S_URL_ALL."/admincp.php?".$_SERVER['QUERY_STRING'] ) );
  18. messagebox( "error", "admincp_login", geturl( "action/login" ) );
  19. }
  20. if ( empty( $_SGLOBAL['group'] ) )
  21. {
  22. messagebox( "error", "admincp_no_popedom" );
  23. }
  24. $checkperm = $userflag = 0;
  25. if ( $_SGLOBAL['group']['groupid'] == "1" )
  26. {
  27. $checkperm = 1;
  28. $userflag = 9;
  29. }
  30. else
  31. {
  32. $mid = intval( postget( "mid" ) );
  33. if ( empty( $mid ) && !empty( $_COOKIE['supe_admin_jumpurl'] ) )
  34. {
  35.   $sarr = explode( "&", $_COOKIE['supe_admin_jumpurl'] );
  36.   if ( !empty( $sarr ) && is_array( $sarr ) )
  37.   {
  38.    foreach ( $sarr as $value )
  39.    {
  40.     $carr = explode( "=", $value );
  41.     if ( $carr[0] == "mid" )
  42.     {
  43.      $mid = intval( $carr[1] );
  44.      break;
  45.     }
  46.     else if ( $carr[0] == "action" )
  47.     {
  48.      $action = trim( $carr[1] );
  49.     }
  50.    }
  51.   }
  52. }
  53. if ( ( $action == "modelmanages" || $action == "modelcategories" || $action == "modelfolders" ) && !empty( $mid ) && 0 < $mid )
  54. {
  55.   $query = $_SGLOBAL['db']->query( "SELECT p.* FROM ".tname( "modelperm" )." p WHERE p.uid='".$_SGLOBAL['supe_uid']."' AND p.mid='".$mid."'" );
  56.   $item = $_SGLOBAL['db']->fetch_array( $query );
  57.   if ( empty( $item ) )
  58.   {
  59.    messagebox( "error", "admincp_no_popedom" );
  60.   }
  61.   $checkperm = 2;
  62.   $userflag = $item['flag'];
  63. }
  64. if ( !empty( $_SGLOBAL['group']['allownews'] ) || !empty( $_SGLOBAL['group']['allowcheckitem'] ) )
  65. {
  66.   $checkperm = 2;
  67. }
  68. }
  69. if ( empty( $checkperm ) )
  70. {
  71. messagebox( "error", "admincp_no_popedom" );
  72. }
  73. $supe_adminpass = md5( $_SGLOBAL['authkey'].$_SGLOBAL['member']['password'] );
  74. $cookie_adminpass = empty( $_COOKIE[$cookiepre."supe_adminpass"] ) ? "" : $_COOKIE[$cookiepre."supe_adminpass"];
  75. if ( $cookie_adminpass != $supe_adminpass )
  76. {
  77. if ( submitcheck( "dologin", 1 ) )
  78. {
  79.   if ( !empty( $_COOKIE['supe_admin_jumpurl'] ) )
  80.   {
  81.    $tourl = "admincp.php?".$_COOKIE['supe_admin_jumpurl'];
  82.   }
  83.   else
  84.   {
  85.    $tourl = "admincp.php";
  86.   }
  87.   $password = md5( $_POST['admin_password'] );
  88.   if ( !empty( $_SCONFIG['ucmode'] ) )
  89.   {
  90.    include_once( S_ROOT."./uc_client/client.php" );
  91.    $ucresult = uc_user_login( $_SGLOBAL['member']['username'], $_POST['admin_password'], $loginfield == "uid" );
  92.    list( $members['uid'], $members['username'], $members['username'], $members['username'] ) = members   if ( 0 < $members['uid'] )
  93.    {
  94.     $query = $_SGLOBAL['db']->query( "SELECT * FROM ".tname( "members" )." WHERE uid='".$members['uid']."'" );
  95.     $member = $_SGLOBAL['db']->fetch_array( $query );
  96.     $password = $member['password'];
  97.    }
  98.    else
  99.    {
  100.     messagebox( "error", "background_logging_in_failure", $tourl );
  101.    }
  102.   }
  103.   if ( $password == $_SGLOBAL['member']['password'] )
  104.   {
  105.    ssetcookie( "supe_adminpass", $supe_adminpass );
  106.    setcookie( "supe_admin_jumpurl", "" );
  107.    messagebox( "ok", "background_logging_in_success", $tourl );
  108.   }
  109.   else
  110.   {
  111.    messagebox( "error", "background_logging_in_failure", $tourl );
  112.   }
  113. }
  114. setcookie( "supe_admin_jumpurl", $_SERVER['QUERY_STRING'] );
  115. include_once( S_ROOT."./admin/tpl/admincp_login.php" );
  116. exit( );
  117. }
  118. if ( $checkperm == 2 )
  119. {
  120. $checkperm = 0;
  121. if ( $action == "spacenews" )
  122. {
  123.   if ( !empty( $_SGLOBAL['group']['allownews'] ) )
  124.   {
  125.    $checkperm = 2;
  126.   }
  127. }
  128. else if ( $action == "check" )
  129. {
  130.   if ( !empty( $_SGLOBAL['group']['allowcheckitem'] ) )
  131.   {
  132.    $checkperm = 2;
  133.   }
  134. }
  135. else if ( !empty( $userflag ) )
  136. {
  137.   $checkperm = 2;
  138. }
  139. }
  140. if ( empty( $checkperm ) )
  141. {
  142. messagebox( "error", "admincp_no_popedom" );
  143. }
  144. include_once( S_ROOT."./language/admincp.lang.php" );
  145. @$fp = @fopen( S_ROOT."./log/admincplog.php", "a" );
  146. @flock( $fp, 2 );
  147. @fwrite( $fp, "<?exit?>{$_SGLOBAL['timestamp']}\t{$_SGLOBAL['supe_username']}\t{$_SGLOBAL['onlineip']}\t".$_SERVER['QUERY_STRING']."\n" );
  148. @fclose( $fp );
  149. $_SGLOBAL['allblocktype'] = array( "category", "spacenews", "poll", "spaceblog", "spaceimage", "spacefile", "spacegoods", "spacelink", "spacevideo", "group", "model", "tag", "spacetag", "spacecomment", "userspace", "announcement", "friendlink", "bbsthread", "bbsannouncement", "bbsforum", "bbslink", "bbsmember", "bbsattachment", "bbspost" );
  150. include_once( S_ROOT."./include/common.inc.php" );
  151. include_once( S_ROOT."./function/html.func.php" );
  152. include_once( S_ROOT."./function/admin.func.php" );
  153. include_once( S_ROOT."./function/cache.func.php" );
  154. if ( !empty( $action ) )
  155. {
  156. $theurl = CPURL."?action=".$action;
  157. switch ( $action )
  158. {
  159. case "settings" :
  160. case "tags" :
  161. case "blocks" :
  162. case "categories" :
  163. case "friendgroups" :
  164. case "spacenews" :
  165. case "styles" :
  166. case "attachmenttypes" :
  167. case "robots" :
  168. case "robotmessages" :
  169. case "polls" :
  170. case "usergroups" :
  171. case "prefields" :
  172. case "crons" :
  173. case "html" :
  174. case "rightclick" :
  175. case "spaces" :
  176. case "templates" :
  177. case "ad" :
  178. case "effects" :
  179. case "check" :
  180. case "reports" :
  181. case "announcements" :
  182. case "tpl" :
  183. case "css" :
  184. case "usercss" :
  185. case "styletpl" :
  186. case "bbsforums" :
  187. case "channel" :
  188. case "userprofile" :
  189. case "sitemap" :
  190. case "groups" :
  191. case "items" :
  192. case "comments" :
  193. case "guestbooks" :
  194. case "attachments" :
  195. case "domain" :
  196. case "friendlinks" :
  197. case "database" :
  198. case "words" :
  199. case "sharefields" :
  200. case "customfields" :
  201. case "cache" :
  202. case "archiver" :
  203. case "models" :
  204. case "modelmanages" :
  205. case "modelcategories" :
  206. case "modelfolders" :
  207. case "modelperm" :
  208. case "topics" :
  209.   include_once( S_ROOT."./admin/tpl/admincp_header.php" );
  210.   include_once( "./admin/admin_".$action.".php" );
  211.   include_once( S_ROOT."./admin/tpl/admincp_footer.php" );
  212.   break;
  213. case "toolbar" :
  214.   $dbversion = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT VERSION()" ), 0 );
  215.   $items = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT COUNT(*) FROM ".tname( "spaceitems" ) ), 0 );
  216.   $spaces = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT COUNT(*) FROM ".tname( "userspaces" ) ), 0 );
  217.   include_once( S_ROOT."./admin/admin_admincp_toolbar.php" );
  218.   break;
  219. case "sidemenu" :
  220.   include_once( S_ROOT."./admin/admin_admincp_sidemenu.php" );
  221.   break;
  222. case "topictpl" :
  223.   include_once( "./admin/admin_".$action.".php" );
  224.   break;
  225. default :
  226.   $dbver = $_SCONFIG['dbver'];
  227.   if ( empty( $_GET['showinfo'] ) )
  228.   {
  229.    $reportnum = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT COUNT(*) FROM ".tname( "reports" )." WHERE status='0'" ), 0 );
  230.    if ( 0 < $reportnum )
  231.    {
  232.     $inforstr = "<tr><td>".$alang['site_statistics'].": <a href="".S_URL."/admincp.php?action=home&showinfo=1">[".$alang['view_statistics']."]</a></td><td><a href="".S_URL."/admincp.php?action=reports">".$alang['have_report']."</a>(".$reportnum.")</td></tr>";
  233.    }
  234.    else
  235.    {
  236.     $inforstr = "<tr><td>".$alang['site_statistics'].": <a href="".S_URL."/admincp.php?action=home&showinfo=1">[".$alang['view_statistics']."]</a></td><td><a href="".S_URL."/admincp.php?action=reports">".$alang['have_report']."</a></td></tr>";
  237.    }
  238.   }
  239.   else
  240.   {
  241.    $attachs = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT SUM(size) FROM ".tname( "attachments" ) ), 0 );
  242.    $attachs = is_numeric( $attachs ) ? formatsize( $attachs ) : "-";
  243.    $items = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT COUNT(*) FROM ".tname( "spaceitems" ) ), 0 );
  244.    $spaces = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT COUNT(*) FROM ".tname( "userspaces" ) ), 0 );
  245.    $groups = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT COUNT(*) FROM ".tname( "groups" ) ), 0 );
  246.    $month = $_SGLOBAL['timestamp'] - 3600 * 24 * 30;
  247.    $day = $_SGLOBAL['timestamp'] - 3600 * 24;
  248.    $spaces_month = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT COUNT(*) FROM ".tname( "userspaces" )." WHERE dateline>{$month}" ), 0 );
  249.    $spaces_day = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT COUNT(*) FROM ".tname( "userspaces" )." WHERE dateline>{$day}" ), 0 );
  250.    $items_month = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT COUNT(*) FROM ".tname( "spaceitems" )." WHERE dateline>{$month}" ), 0 );
  251.    $items_day = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT COUNT(*) FROM ".tname( "spaceitems" )." WHERE dateline>{$day}" ), 0 );
  252.    $data_length = 0;
  253.    $query = $_SGLOBAL['db']->query( "SHOW TABLE STATUS FROM `".$dbname."` LIKE '{$tablepre}%'" );
  254.    while ( $value = $_SGLOBAL['db']->fetch_array( $query ) )
  255.    {
  256.     $data_length = $data_length + $value['Data_length'] + $value['Index_length'];
  257.    }
  258.    $data_length = formatsize( $data_length );
  259.    $inforstr = "\t\t\t\t<tr>\r\n\t\t\t\t<td>{$alang['few_stations_open_space']}: {$spaces}</td>\r\n\t\t\t\t<td>{$alang['few_stations_open_group']}: {$groups}</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td>{$alang['information_released_within_a_few_points']}: {$items}</td>\r\n\t\t\t\t<td></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td colspan="2"><hr size="1" style="color:#FFFFFF"></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td>{$alang['several_additional_space_within_30_days']}: {$spaces_month}</td>\r\n\t\t\t\t<td>{$alang['within_24_hours_the_number_of_new_space']}: {$spaces_day}</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td>{$alang['add_info_within_30_days_of_a_few']}: {$items_month}</td>\r\n\t\t\t\t<td>{$alang['several_add_info_within_24_hours']}: {$items_day}</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td>{$alang['mysql_has_used_space']}: {$data_length}</td>\r\n\t\t\t\t<td>{$alang['upload_annex_size']}: {$attachs}</td>\r\n\t\t\t\t</tr>";
  260.   }
  261.   include_once( S_ROOT."./admin/tpl/admincp_header.php" );
  262.   include_once( S_ROOT."./admin/tpl/admincp_home.php" );
  263.   include_once( S_ROOT."./admin/tpl/admincp_footer.php" );
  264.   break;
  265. }
  266. }
  267. else
  268. {
  269. include_once( S_ROOT."./admin/tpl/admincp_index.php" );
  270. }
  271. ?>

复制代码
 楼主| 发表于 2008-7-24 19:24:47 | 显示全部楼层
看来只好靠自己了
您需要登录后才可以回帖 登录 | 加入会员

本版积分规则

QQ|手机版|Archiver|火车采集器官方站 ( 皖ICP备06000549 )

GMT+8, 2024-11-25 03:05

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表