function all_action() { set_time_limit(200); if ($_POST['action'] == "makeall") { if ($_POST['type'] == "cache") { include_once LIB_PATH . "cache.class.php"; include_once "model/model/advertise_class.php"; $cacheclass = new cache("../plus/", $this->obj); include_once CONFIG_PATH . "db.data.php"; $value = $_POST['value'] + 1; $cache = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); if (@in_array($value, $cache)) { $makecache = $cacheclass->city_cache("city.cache.php"); } if (@in_array($value, $cache)) { $makecache = $cacheclass->industry_cache("industry.cache.php"); } if (@in_array($value, $cache)) { $makecache = $cacheclass->job_cache("job.cache.php"); } if (@in_array($value, $cache)) { $makecache = $cacheclass->user_cache("user.cache.php"); } if (@in_array($value, $cache)) { $makecache = $cacheclass->com_cache("com.cache.php"); } if (@in_array($value, $cache)) { $makecache = $cacheclass->menu_cache("menu.cache.php"); } if (@in_array($value, $cache)) { $makecache = $cacheclass->seo_cache("seo.cache.php"); } if (@in_array($value, $cache)) { $makecache = $cacheclass->domain_cache("domain_cache.php"); } if (@in_array($value, $cache)) { $makecache = $cacheclass->keyword_cache("keyword.cache.php"); } if (@in_array($value, $cache)) { $makecache = $cacheclass->link_cache("link.cache.php"); } if (@in_array($value, $cache)) { $makecache = $cacheclass->group_cache("group.cache.php"); } if (@in_array($value, $cache)) { $adver = new advertise($this->obj); $adver->model_ad_arr_action(); } if (@in_array($value, $cache)) { $makecache = $this->tpl->clear_all_cache(); } if ($value <= 10) { $v = $value + 1; $this->get_return("cache", $value, "正在生成" . $arr_data['cache'][$v]); } else { $this->get_return("index", "index", "正在生成首页"); } echo json_encode($data); die; } if ($_POST['type'] == "index") { if ($_POST['value'] == "index") { $url = $this->config["sy_weburl"] . "/index.php"; $fw = $this->obj->html($_POST["index"], $url); $this->get_return("index", "news", "正在生成新闻首页"); } else { $url = $this->config["sy_weburl"] . "/index.php?m=news"; $fw = $this->obj->html($_POST["news"], $url); $this->get_return("class", 0, "正在获取新闻类别数目"); } echo json_encode($data); die; } if ($_POST['type'] == "class") { $val = $this->mk_newsclass(); if (is_array($val)) { foreach ($val as $va) { if ($name == "") { $name = $this->stringfilter($va); } } $this->get_return("class", $val, "正在生成新闻类别--" . $name); } else { $this->get_return("archive", 0, "正在获取新闻详细页数目"); } } if ($_POST['type'] == "archive") { $pagesize = "20"; $page = $this->mk_archive($pagesize); if ($page) { if ($page != 1) { $npage = $page; $page = $page - 1; $spage = $page * $pagesize; $topage = $spage + $pagesize; } else { $npage = $page; $spage = $page; $topage = $pagesize; } $name = $spage . "-" . $topage; $this->get_return("archive", $npage, "正在生成" . $name . "新闻"); } else { $this->get_return("ok", 0, "全部生成完成"); } } } $this->yunset("type", "all"); $this->yuntpl(array('admin/admin_makenews')); }
function advertise_cache() { include_once APP_PATH . "admin/model/model/advertise_class.php"; $adver = new advertise($this->obj); $adver->model_ad_arr_action(); }
function makecache_action() { set_time_limit(200); extract($_POST); include LIB_PATH . "cache.class.php"; $cacheclass = new cache(PLUS_PATH, $this->obj); if (@in_array("1", $cache)) { $makecache = $cacheclass->city_cache("city.cache.php"); } if (@in_array("2", $cache)) { $makecache = $cacheclass->industry_cache("industry.cache.php"); } if (@in_array("3", $cache)) { $makecache = $cacheclass->job_cache("job.cache.php"); } if (@in_array("4", $cache)) { $makecache = $cacheclass->user_cache("user.cache.php"); } if (@in_array("5", $cache)) { $makecache = $cacheclass->com_cache("com.cache.php"); } if (@in_array("6", $cache)) { $makecache = $cacheclass->menu_cache("menu.cache.php"); } if (@in_array("7", $cache)) { $makecache = $this->del_dir("../data/templates_c", 1); $makecache = $this->del_dir("../data/cache", 1); } if (@in_array("8", $cache)) { $makecache = $cacheclass->seo_cache("seo.cache.php"); } if (@in_array("9", $cache)) { $makecache = $cacheclass->domain_cache("domain_cache.php"); } if (@in_array("10", $cache)) { $makecache = $cacheclass->keyword_cache("keyword.cache.php"); } if (@in_array("11", $cache)) { $makecache = $cacheclass->link_cache("link.cache.php"); } if (@in_array("12", $cache)) { $makecache = $cacheclass->group_cache("group.cache.php"); } if (@in_array('13', $cache)) { $makecache = $cacheclass->desc_cache("desc.cache.php"); } if (@in_array('14', $cache)) { include_once "model/model/advertise_class.php"; $adver = new advertise($this->obj); $adver->model_ad_arr_action(); } $makecache = $cacheclass->database_cache("dbstruct.cache.php"); if ($makecache) { $this->ACT_layer_msg("生成(ID:{$makecache})成功!", 9, "index.php?m=cache&c=cache", 2, 1); } else { $this->ACT_layer_msg("生成(ID:{$makecache})失败!", 8, "index.php?m=cache&c=cache"); } }
function del_action() { extract($_GET); extract($_POST); if (is_array($del)) { $delid = @implode(',', $del); $layer_type = 1; } else { $this->check_token(); $delid = $id; $layer_type = 0; } if (!$delid) { $this->layer_msg('请选择要删除的内容!', 8); } $del = $this->obj->DB_delete_all("ad", "`id` in (" . $delid . ")", " "); $this->public_action(); $adver = new advertise($this->obj); $adver->model_ad_arr_action(); $del ? $this->layer_msg('广告(ID:' . $delid . ')删除成功!', 9, $layer_type, $_SERVER['HTTP_REFERER']) : $this->layer_msg('删除失败!', 8, $layer_type, $_SERVER['HTTP_REFERER']); }
function ctime_action() { extract($_POST); $id = $this->obj->DB_update_all("ad", "`time_end`=DATE_ADD(time_end,INTERVAL " . $endtime . " DAY)", "`id` IN (" . $jobid . ")"); $this->public_action(); $adver = new advertise($this->obj); $adver->model_ad_arr_action(); $id ? $this->obj->ACT_layer_msg("广告批量延期(ID:" . $jobid . ")设置成功!", 9, $_SERVER['HTTP_REFERER'], 2, 1) : $this->obj->ACT_layer_msg("设置失败!", 8, $_SERVER['HTTP_REFERER']); }