function editvote($eV) { global $db; $resp = new xajaxResponse(); $i = 0; foreach ($eV['id'] as $v) { $db->query("UPDATE `vote` SET custom1='" . m_addslashes($eV['zd1'][$i]) . "',custom2='" . m_addslashes($eV['zd2'][$i]) . "' WHERE id=" . $v . "") or error('Unable to update vote.', __FILE__, __LINE__, $db->error()); $i++; } $resp->alert("更新成功"); return $resp->getXML(); }
$onlineip = $_SERVER['REMOTE_ADDR']; } $onlineurl = 'http://' . $_SERVER['HTTP_HOST'] . addslashes($_SERVER["REQUEST_URI"]); if ($config['gzip'] && extension_loaded('zlib') && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false || strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== false)) { ob_start('ob_gzhandler'); } else { ob_start(); } if (URL_CRYPT) { include ROOT_PATH . 'include/urlcrypt.inc.php'; urlcrypt(); } //import_request_variables("cgP"); foreach (array('_COOKIE', '_POST', '_GET') as $_request) { foreach (${$_request} as $_key => $_value) { $_key[0] != '_' && (${$_key} = m_addslashes($_value)); } } //m_exit($_POST,true); check_cookie(); $online = update_online(); //${$cookiepre.auth} == $_COOKIE["{cookiepre}auth"] == $_COOKIE['Ecosme_auth'] $m_uid = $m_username = $m_password = ''; if (isset(${$cookiecfg['prefix'] . secret})) { list($m_uid, $m_username, $m_logintime) = explode("\t", authcrypt(${$cookiecfg['prefix'] . secret}, 'decode')); } if ($_SERVER['REQUEST_METHOD'] == 'POST' && times() - $m_logintime > 86400) { header('Location: ' . $_SERVER['HTTP_REFERER'] . ''); exit; } //echo $m_uid."||".$m_username."||".$m_logintime;
// FileName: ad_manager.php // Summary: 站内广告管理 // Author: millken(迷路林肯) // LastModifed:2007-08-29 // copyright (c)2007 millken@gmail.com //==================================================== session_start(); if (!$_SESSION['webmaster']) { header("location:login.php"); } require_once '../common.php'; require_once ROOT_PATH . '/include/FileUploader.class.php'; $exptimes = array('2592000' => '一个月', '5184000' => '两个月', '7776000' => '三个月', '10368000' => '四个月', '12960000' => '五个月', '15552000' => '六个月', '18144000' => '七个月', '20736000' => '八个月', '23328000' => '九个月', '25920000' => '十个月', '28512000' => '十一个月', '31104000' => '十二个月'); $adlocations = array('A' => '首页顶部A(680*70)', 'B' => '首页头部B(430*220)', 'C' => '首页头部C(210*220)', 'D' => '首页中间D(920*120)', 'E' => '首页中间E(655*120)', 'F' => '首页中间F(257*120)', 'G' => '首页中间G(655*50)', 'H' => '首页底部H(257*120)', 'T' => '首页头部T(文字广告)'); if ($action == 'save' && !empty($title) && !empty($url)) { $name = m_addslashes($title); $url = trim($url); $file = $_FILES['img']; //文件上传时注意enctype="multipart/form-data" //Array ( [name] => a002d.gif [type] => image/gif [tmp_name] => d:/webserver/Server/TEMP\php8E.tmp [error] => 0 [size] => 19675 ) if (!empty($file['name'])) { $uf = new FileUploader($_FILE['img']); $pic = $uf->move(ROOT_PATH . '/adsimg', 2); $img = $pic[0] ? get_basename($pic[0]) : 'NULL'; } elseif ($isimgad) { refer('您选择的是图片广告,但您未选择上传图片!'); } $db->query("INSERT INTO `advertising` VALUES (NULL,'{$adlocation}','{$title}','{$img}','{$isimgad}','{$url}',now(),'{$exptime}')") or error('Unable to add advertising', __FILE__, __LINE__, $db->error()); updateAdsCache(); refer('添加成功'); }
// FileName: video_manager.php // Summary: 站内视频管理 // Author: millken(迷路林肯) // LastModifed:2007-09-10 // copyright (c)2007 millken@gmail.com //==================================================== session_start(); if (!$_SESSION['webmaster']) { header("location:login.php"); } include '../common.php'; require_once ROOT_PATH . '/include/FileUploader.class.php'; require_once ROOT_PATH . 'include/Image.class.php'; if ($action == 'save' && !empty($title) && !empty($url)) { $title = m_addslashes($title); $intro = m_addslashes($content); $url = trim($url); $file = $_FILES['uploadpic']; //文件上传时注意enctype="multipart/form-data" //Array ( [name] => a002d.gif [type] => image/gif [tmp_name] => d:/webserver/Server/TEMP\php8E.tmp [error] => 0 [size] => 19675 ) if (!empty($file['name'])) { $uf = new FileUploader($_FILE['uploadpic']); $pic = $uf->move(ROOT_PATH . '/video-upimg', 2); $uppic = $pic[0] ? get_basename($pic[0]) : 'NULL'; $img = new image(ROOT_PATH . 'video-upimg/' . $uppic); $img->thumbnail(128, 72, ROOT_PATH . 'video-upimg/' . $uppic); } $db->query("INSERT INTO `video` VALUES (NULL,'{$title}','{$intro}','{$uppic}','{$url}',now())") or error('Unable to add advertising', __FILE__, __LINE__, $db->error()); refer('添加视频成功'); } if ($action == 'del' && isset($id)) {
// FileName: links.php // Summary: 友情链接管理 // Author: millken(迷路林肯) // LastModifed:2007-08-28 // copyright (c)2007 millken@gmail.com //==================================================== session_start(); if (!$_SESSION['webmaster']) { header("location:login.php"); } require_once '../common.php'; require_once ROOT_PATH . '/include/FileUploader.class.php'; require_once ROOT_PATH . '/include/Image.class.php'; if ($action == 'save' && !empty($name) && !empty($site)) { $name = m_addslashes($name); $intro = m_addslashes($intro); $file = $_FILES['img']; //文件上传时注意enctype="multipart/form-data" //Array ( [name] => a002d.gif [type] => image/gif [tmp_name] => d:/webserver/Server/TEMP\php8E.tmp [error] => 0 [size] => 19675 ) if (!empty($file['name'])) { $uf = new FileUploader($_FILE['img']); $pic = $uf->move(ROOT_PATH . 'logos', 2); $uppic = $pic[0] ? get_basename($pic[0]) : 'NULL'; $img = new image(ROOT_PATH . 'logos/' . $uppic); $img->thumbnail(88, 31, ROOT_PATH . 'logos/' . $uppic); //$img->watermark(ROOT_PATH . 'include/watermark.png','','',ROOT_PATH . 'images/'.$uppic); } elseif ($isimg) { refer('您未选择图片上传!'); } $db->query("INSERT INTO `links` VALUES (NULL,'{$name}','{$site}','{$intro}','{$isimg}','{$uppic}','1',now())") or error('Unable to add link', __FILE__, __LINE__); updateLinkCache();