Ejemplo n.º 1
0
    function getjs_action() {
        $lang=include ROOT.'/lang/'.config::get('lang_type').'/system.php';
        $id=front::get('id');
        if(preg_match('/select/i',$id)){
        	exit('非法参数');
        }
        $ballot=new ballot();
        $option=new option();
        $where=array('id'=>$id);
        $arr=$ballot->getrow($where);
        $row=$option->getrows(array('bid'=>$id),null,'num desc');
        $this->view->arr=$arr;
        $this->view->row=$row;
        $this->view->lang=$lang;
        /*$html='document.write(\'<form name="form1" method="post" action="'.url("ballot").'">\');';
        $html .= 'document.write(\'<input type="hidden" name="bid" id="bid" value="'.$arr['id'].'" />\');';
		$html .= 'document.write(\'<h5>\');';
        $html .= 'document.write(\''.$arr['title']."</h5>');";
        foreach ($row as $option) {
            if ($arr['type'] == 'radio') {
                $html .= 'document.write(\'<input type="radio" name="ballot" id="ballot" value="'.$option['id'].'" />\');';
            }
            else {
                $html .= 'document.write(\'<input type="checkbox" name="ballot[]" id="ballot" value="'.$option['id'].'" />\');';
            }
            $html .= 'document.write(\' '.$option['name'].' ('.$option['num'].')<br>\');';
        }
        $html .= 'document.write(\'<input type="submit" name="submit" id="button" value=" '.$lang['vote'].'" /></form>\');';
        echo $html;*/
    }
Ejemplo n.º 2
0
    function respond() {
        
        ini_set("display_errors","On");
        $where = array('ologin_code'=>front::$get['ologin_code']);
        $ologins = ologin::getInstance()->getrows($where);
        $ologin = unserialize_config($ologins[0]['ologin_config']);

        //var_dump($ologin);
        
        $aliapy_config['partner'] = $ologin['alipaylogin_id'];
        $aliapy_config['key'] = $ologin['alipaylogin_key'];
        $aliapy_config['return_url'] = ologin::url(basename(__FILE__,'.php'));
        $aliapy_config['sign_type']    = 'MD5';
        $aliapy_config['input_charset']= 'utf-8';
        $aliapy_config['transport']    = 'http';
        $aliapy_config['cacert']    = getcwd().'/lib/plugins/alipayauth/cacert.pem';
        //var_dump($aliapy_config);
        unset($_GET['case']);unset($_GET['act']);unset($_GET['ologin_code']);unset($_GET['site']);
        require_once("alipayauth/alipay_notify.class.php");
        $alipayNotify = new AlipayNotify($aliapy_config);
        //var_dump($alipayNotify);
        $verify_result = $alipayNotify->verifyReturn();
        //var_dump($verify_result);
        if($verify_result) {//验证成功
            $user_id = front::$get['user_id'];
            $token = front::$get['token'];
            session::set('access_token',$token);
            session::set("openid",$user_id);
            return array('nickname'=>  front::get('real_name'));
        }
        else {
            echo "验证失败";exit;
        }
    }
Ejemplo n.º 3
0
 function show_action() {
     $this->view->page=front::get('page')?front::get('page'):1;
     $this->pagesize=config::get('list_pagesize');
     $limit=(($this->view->page-1)*$this->pagesize).','.$this->pagesize;
     $special=new special();
     $this->view->special=$special->getrow('spid='.front::get('spid'));
     $this->view->archive['title'] =  $this->view->special['title'];
     $this->view->pages=true;
     $archive=new archive();
     $archives=$archive->getrows('spid='.front::get('spid'),$limit);
     foreach($archives as $order=>$arc) {
         $archives[$order]['url']=archive::url($arc);
         $archives[$order]['catname']=category::name($arc['catid']);
         $archives[$order]['caturl']=category::url($arc['catid']);
         $archives[$order]['adddate']= sdate($arc['adddate']);
         $archives[$order]['stitle']= strip_tags($arc['title']);
     }
     $this->view->archives=$archives;
     $this->view->record_count=$archive->rec_count('spid='.front::get('spid'));
     front::$record_count=$this->view->record_count;
     $this->view->spid=front::get('spid');
     if (front::get('t') == 'wap') {
     	$this->out('wap/special_show.html');
     	return;
     }
 }
Ejemplo n.º 4
0
 function delete_action() {
 	chkpw('defined_form_del');
     $table=new defind(front::get('table'));
     $delete=archive::getInstance()->query("DROP TABLE {$table->name}");
     if($delete)  front::flash("删除表单成功!");
     front::redirect(url::modify('act/listform/table/'.$table->name));
 }
Ejemplo n.º 5
0
 function click_action() {
     $friendlink=new friendlink();
     $friendlink->rec_update(array('hits'=>'[hits+1]'),front::get('id'));
     $where=" id=".front::get('id')." ";
     $friendlinks=$friendlink->getrows($where,$limit,'listorder asc,id asc');
     $url=$friendlinks[0][url];
     header("location: $url");
 }
Ejemplo n.º 6
0
 function manage_action() {
 	chkpw('func_data_adminlogs');
     $where = null;
     $ordre = '`id` DESC';
     $limit = ((front::get('page') -1) * $this->_pagesize).','.$this->_pagesize;
     $this->view->data = $this->_table->getrows($where,$limit,$ordre,$this->_table->getcols('manage'));
     $this->view->record_count = $this->_table->record_count;
 }
Ejemplo n.º 7
0
 function comment_js_action() {
     front::check_type(front::get('aid'));
     $comment=new comment();
     $this->view->comments=$comment->getrows('state=1 and aid='.front::get('aid'),20,'1');
     $this->view->aid=front::get('aid');
     echo  tool::text_javascript($this->fetch());
     exit;
 }
Ejemplo n.º 8
0
    function edit_action() {
        $path=ROOT.'/lang/'.config::get('lang_type').'/system.php';
        $tipspath=ROOT.'/lang/cn/system.php';
        if (front::post('submit')) {
            $content=file_get_contents($path);
            $to_delete_items=front::$post['to_delete_items'];
            unset(front::$post['to_delete_items']);
            foreach (front::$post as $key=>$val) {
                preg_match_all("/'".$key."'=>'(.*?)',/",$content,$out);
                if (is_array($to_delete_items) && in_array($key,$to_delete_items))
                    $content=str_replace($out[0][0],'',$content);
                else
                    $content=str_replace($out[1][0],$val,$content);
            }
            file_put_contents($path,$content);
            if ($_GET['site'] != 'default') {
                $ftp=new nobftp();
                $ftpconfig=config::get('website');
                $ftp->connect($ftpconfig['ftpip'],$ftpconfig['ftpuser'],$ftpconfig['ftppwd'],$ftpconfig['ftpport']);
                $ftperror=$ftp->returnerror();
                if ($ftperror) {
                    exit($ftperror);
                }
                else {
                    $ftp->nobchdir($ftpconfig['ftppath']);
                    $ftp->nobput($ftpconfig['ftppath'].'/lang/'.config::get('lang_type').'/system.php',$path);
                }
            }
            unset($content);
            event::log('修改语言包','成功');
            echo '<script type="text/javascript">alert("操作完成!");window.location.href="'.url('language/edit',true).'";</script>';
        }
        $content=include($path);
        $tips=include($tipspath);
        $this->view->tips=$tips;
        //分页
        $limit = 30;
        if(!front::get('page'))
            $page = 1;
        else
            $page = front::get('page');
        $total = ceil(count($content)/$limit);
        if($page < 1) $page = 1;
        if($page > $total) $page = $total;
        $start = ($page-1) * $limit;
        $end = $start+$limit-1;
        $tmp = range($start,$end);
        $list_content_arr = array();
        $i = 0;
        foreach($content as $k => $v){
        	if(in_array($i++,$tmp))
        	     $list_content_arr[$k] = $v;
        }
        $this->view->sys_lang=$list_content_arr;
        $this->view->link_str = listPage($total,$limit,$page);

    }
Ejemplo n.º 9
0
 function end() {
     if (front::get('t') == 'wap') {
         $this->render('wap/index.html');
         return;
     }
     if (front::$debug)
         $this->render('style/index.html');
     else
         $this->render();
 }
Ejemplo n.º 10
0
 function dorestore_action() {
     $dir=ROOT.'/data/'.front::get('db_dir');
     if(is_dir($dir)) {
         $db_files=front::scan($dir);
         foreach($db_files as $db_file) {
             if(!preg_match('/^\./',$db_file)) tdatabase::getInstance()->restoreTables($dir.'/'.$db_file);
         }
         front::flash('数据库还原成功!');
     }
     front::redirect(url::create('database/restore'));
 }
Ejemplo n.º 11
0
 function visual_action() {
     if ($this->view->usergroupid != '888')
         exit('PAGE NOT FOUND!');
     $id=front::get('id');
     $tpl=str_replace('_d_','/',$id);
     $tpl=str_replace('#','',$tpl);
     $tpl=str_replace('_html','.html',$tpl);
     $content=file_get_contents(TEMPLATE.'/'.config::get('template_dir').'/'.$tpl);
     echo @front::$view->_eval(front::$view->compile($content));
     $this->render('../admin/system/tag_visual.php');
 }
Ejemplo n.º 12
0
 function __construct() {
     if (ADMIN_DIR!=config::get('admin_dir')) {
         config::modify(array('admin_dir'=>ADMIN_DIR));
         front::flash('后台目录更改成功!');
     }
     front::$rewrite=false;
     parent::__construct();
     $servip = gethostbyname($_SERVER['SERVER_NAME']);
     //if($this instanceof file_admin && in_array(front::get('act'), array('updialog','upfile','upfilesave','netfile','netfilesave','swfsave'))) return;
     if($servip==front::ip()&&front::get('ishtml')==1) return;
     $this->check_admin();
 }
Ejemplo n.º 13
0
 function note_action() {
 	chkpw('template_note');
     if (front::post('submit')) {
         unset(front::$post['submit']);
         help::$_var['template_note'] = front::$post;
         help::save();
     }
     $dir = ROOT .'/template/'.config::get('template_dir');
     $_dir = dir($dir);
     while ($file = $_dir->read()) {
         if (!preg_match('/^\./',$file) &&is_dir($dir .'/'.$file) &&!preg_match('/[#@]/',$file)  &&!preg_match('/^_/',$file)) {
             $this->view->tps[$file] = '<b>'.$file .'</b>';
             $__dir = dir($dir .'/'.$file);
             while ($_file = $__dir->read()) {
                 if (!preg_match('/^\./',$_file) &&!preg_match('/[#@]/',$_file)) {
                     if ($file=='skin'&&!preg_match('/\.(css|js)$/',$_file))
                         continue;
                     $_file = str_replace('.','_',$_file);
                     if (is_dir($dir .'/'.$file .'/'.$_file))
                         $this->view->tps[$file .'/'.$_file] = "&nbsp;&nbsp;└<b>".$_file .'</b>';
                     else
                         $this->view->tps[$file .'/'.$_file] = "&nbsp;&nbsp;└".$_file;
                 }
             }
         }
         elseif (!preg_match('/^\./',$file) &&is_file($dir .'/'.$file) &&!preg_match('/[#@]/',$file)) {
             $file = str_replace('.','_',$file);
             $tps[$file] = $file;
         }
     }
     //$this->view->tps = array_merge($tps,$this->view->tps);
     $tps_arr = array_merge($tps,$this->view->tps);
      //分页
     $limit = 20;
     if(!front::get('page'))
         $page = 1;
     else
         $page = front::get('page');
     $total = ceil(count($tps_arr)/$limit);
     if($page < 1) $page = 1;
     if($page > $total) $page = $total;
     $start = ($page-1) * $limit;
     $end = $start+$limit-1;
     $tmp = range($start,$end);
     $list_tps_arr = array();
     $i = 0;
     foreach($tps_arr as $k => $v){
     	if(in_array($i++,$tmp))
     	     $list_tps_arr[$k] = $v;
     }
     $this->view->tps = $list_tps_arr;
     $this->view->link_str = listPage($total,$limit,$page);
 }
Ejemplo n.º 14
0
 function deleteimg_action() {
     if (!front::get('dir') || !front::get('imgname'))
         return;
     $img = ROOT . '/upload/images/' . front::get('dir') . '/' . str_replace('___', '.', front::get('imgname'));
     if (!file_exists($img))
         front::flash('图片不存在');
     if (!unlink($img))
         front::flash('删除失败,请检查权限');
     else
         front::flash('图片已删除');
     front::redirect(url::modify('act/listimg/dir/' . front::get('dir')));
 }
Ejemplo n.º 15
0
 public static function getbot() {
     $ServerName = $_SERVER["SERVER_NAME"];
     $ServerPort = $_SERVER["SERVER_PORT"];
     $ScriptName = $_SERVER["SCRIPT_NAME"];
     $QueryString = $_SERVER["QUERY_STRING"];
     $serverip = $_SERVER["REMOTE_ADDR"];
     $GetLocationURL=self::geturl();
     $agent1 = $_SERVER["HTTP_USER_AGENT"];
     $agent=strtolower($agent1);
     $Bot="";
     if(strpos($agent,"googlebot")>-1) {
         $Bot = "Google";
     }
     if(strpos($agent,"mediapartners-google")>-1) {
         $Bot = "Google Adsense";
     }
     if(strpos($agent,"baiduspider")>-1) {
         $Bot = "Baidu";
     }
     if(strpos($agent,"sogou")>-1) {
         $Bot = "Sogou";
     }
     if(strpos($agent,"yahoo")>-1) {
         $Bot = "Yahoo!";
     }
     if(strpos($agent,"msn")>-1) {
         $Bot = "MSN";
     }
     if(strpos($agent,"soso")>-1) {
         $Bot = "Soso";
     }
     if(strpos($agent,"iaarchiver")>-1) {
         $Bot = "Alexa";
     }
     if(strpos($agent,"sohu")>-1) {
         $Bot = "Sohu";
     }
     if(strpos($agent,"sqworm")>-1) {
         $Bot = "AOL";
     }
     if(strpos($agent,"yodaobot")>-1) {
         $Bot = "Yodao";
     }
     if(strpos($agent,"iaskspider")>-1) {
         $Bot = "Iask";
     }
     if(strlen($Bot)>0 &&!front::get('admin_dir')) {
         $stats = self::getInstance();
         $insert = $stats->rec_insert(array('bot'=>$Bot,'url'=>$GetLocationURL,'ip'=>$serverip,'time'=>date('Y-m-d H:i:s')));
     }
 }
Ejemplo n.º 16
0
 function mail_before() {
     $user = new user();
     $user_arr = front::post('select');
     if(is_array($user_arr)) {
         foreach ($user_arr as $id) {
             $row = $user->getrow($id);
             $echo .= $row['e_mail'].',';
         }
         echo substr($echo,0,-1);
     }else {
         $row = $user->getrow(front::get('id'));
         echo $row['e_mail'];
     }
 }
Ejemplo n.º 17
0
 function mail_before() {
     $user = new user();
     $user_arr = front::post('select');
     if(is_array($user_arr)) {
         foreach ($user_arr as $id) {
             $row = $user->getrow($id);
             $echo .= $row['username'].' ['.$row['e_mail'].'],';
         }
         echo $echo;
     }else {
         $row = $user->getrow(front::get('id'));
         echo $row['username'].' ['.$row['e_mail'].']';
     }
 }
Ejemplo n.º 18
0
 function save_after($typeid) {
     if(front::$post['_ranks']) {
         $_ranks=serialize(front::post('_ranks'));
         $rank=new rank();
         if(is_array($rank->getrow(array('typeid'=>front::get('id')))))
             $rank->rec_update(array('ranks'=>$_ranks),'typeid='.$typeid);
         else
             $rank->rec_insert(array('typeid'=>front::get('id'),'ranks'=>$_ranks));
     }
     else {
         $rank=new rank();
         $rank->rec_delete('typeid='.$typeid);
     }
 }
Ejemplo n.º 19
0
 function list_action() {
     $this->view->page=front::get('page') ?front::get('page') : 1;
     $this->pagesize=config::get('list_pagesize');
     $limit=(($this->view->page -1) * $this->pagesize).','.$this->pagesize;
     $area=new area();
     $where='1';
     if (front::get('province_id')) $where.=' and id='.front::get('province_id');
     if (front::get('city_id')) $where.=' and id='.front::get('city_id');
     if (front::get('section_id')) $where.=' and id='.front::get('section_id');
     if (front::get('id')) $where.=' and id='.front::get('id');
     $this->view->area=$area->getrow($where);
     $archive=new archive();
     $where='1';
     if (front::get('province_id')) $where.=' and province_id='.front::get('province_id');
     if (front::get('city_id')) $where.=' and city_id='.front::get('city_id');
     if (front::get('section_id')) $where.=' and section_id='.front::get('section_id');
     if (front::get('id')) $where.=' and section_id='.front::get('id').' or city_id='.front::get('id').' or province_id='.front::get('id');
     $archives=$archive->getrows($where,$limit,'listorder,aid desc');
     foreach ($archives as $order=>$arc) {
         $archives[$order]['url']=archive::url($arc);
         $archives[$order]['catname']=category::name($arc['catid']);
         $archives[$order]['caturl']=category::url($arc['catid']);
         $archives[$order]['adddate']=sdate($arc['adddate']);
         $archives[$order]['stitle']=strip_tags($arc['title']);
     }
     $this->view->pages=true;
     if(front::get('id')!='') {
         $this->view->areaid=front::get('id');
     }elseif(front::get('province_id')!='') {
         $this->view->areaid=front::get('province_id');
     }elseif(front::get('city_id')!='') {
         $this->view->areaid=front::get('city_id');
     }elseif(front::get('section_id')!='') {
         $this->view->areaid=front::get('section_id');
     }
     $this->view->archive['title'] = area::name($this->view->areaid);
     $this->view->archives=$archives;
     $this->view->record_count=$archive->rec_count($where);
     front::$record_count=$this->view->record_count;
     
     if (front::get('t') == 'wap') {
     	$this->out('wap/area_list.html');
     	return;
     }
     
     $this->render();
 }
Ejemplo n.º 20
0
 function space_action() {
     //$space=new user();
     //$space=$space->getrow(array('userid'=>front::get('mid')));
     //$this->view->user=$space;
     //var_dump($this->view->user);
     if(!$this->view->user['userid']){
     	alertinfo('请先登录',url::create('user/login'));
     }
     $this->_table=new archive;
     if(!front::get('page')) front::$get['page']=1;
     $limit=((front::get('page')-1)*20).',20';
     $where="userid={$this->view->user['userid']}";
     $where .= ' and '.$this->_table->get_where('user_manage');
     $this->_view_table=$this->_table->getrows($where,$limit,'1 desc',$this->_table->getcols('manage'));
     $this->view->data=$this->_view_table;
     $this->view->record_count=$this->_table->record_count;
 }
Ejemplo n.º 21
0
 function show_action() {
     $tagname=urldecode(front::get('tag'));
     if(preg_match('/union/i',$tagname) || preg_match('/"/i',$tagname) ||preg_match('/\'/i',$tagname)){
     	exit('非法参数');
     }
     $tag=new tag();
     $tag=$tag->getrow('tagname="'.$tagname.'"');
     $tagid=$tag['tagid'];
     $archives=array();
     if($tagid) {
         $arctag=new arctag();
         if(front::get('page')) $page=front::get('page');
         else $page=1;
         $this->view->page=$page;
         $this->view->pagesize=config::get('list_pagesize');
         $limit=(($this->view->page-1)*$this->view->pagesize).','.$this->view->pagesize;
         $this->view->record_count=$arctag->rec_count('tagid='.$tagid);
         if($this->view->record_count>$this->view->pagesize)
             $this->view->pages=true;
         front::$record_count=$this->view->record_count;
         $arctags=$arctag->getrows('tagid='.$tagid,$limit);
         $arcids=array();
         foreach($arctags as $arctag) {
             $arcids[]=$arctag['aid'];
         }
         $archive=new archive();
         $archives=$archive->getrows('aid in ('.implode(',',$arcids).')',null,'aid desc');
         foreach($archives as $order=>$arc) {
             $archives[$order]['url']=archive::url($arc);
             $archives[$order]['catname']=category::name($arc['catid']);
             $archives[$order]['caturl']=category::url($arc['catid']);
             $archives[$order]['adddate']= sdate($arc['adddate']);
             $archives[$order]['stitle']= strip_tags($arc['title']);
         }
     }
     else echo lang('标签信息不存在');
     $this->view->tag=$tagname;
     $this->view->archive['title'] = $tagname;
     $this->view->archives=$archives;
     if (front::get('t') == 'wap') {
     	echo $this->fetch('wap/tag_show.html');
     	return;
     }
     $this->render();
 }
Ejemplo n.º 22
0
 function list_action() {
     $this->view->page=front::get('page') ?front::get('page') : 1;
     $this->pagesize=config::get('list_pagesize');
     $limit=(($this->view->page -1) * $this->pagesize).','.$this->pagesize;
     $type=new type();
     $types=array();
     $types=$type->sons(front::get('typeid'));
     $types[]=front::get('typeid');
     $where='typeid in ('.implode(',',$types).') AND checked=1 AND state=1';
     $this->view->type=$type->getrow('typeid='.front::get('typeid'));
     $this->view->pages=@$this->view->type['ispages'];
     $this->view->typeid=front::get('typeid');
     $archive=new archive();
     $archives=$archive->getrows($where,$limit,'listorder desc,aid desc');
     foreach ($archives as $order=>$arc) {
         $archives[$order]['url']=archive::url($arc);
         $archives[$order]['typename']=type::name($arc['typeid']);
         $archives[$order]['typeurl']=type::url($arc['typeid']);
         $archives[$order]['adddate']=sdate($arc['adddate']);
         $archives[$order]['stitle']=strip_tags($arc['title']);
         $archives[$order]['sthumb'] = @strstr($arc['thumb'], "http://") ? $arc['thumb'] : config::get('base_url') . '/' . $arc['thumb'];
     }
     $this->view->archives=$archives;
     $this->view->record_count=$archive->rec_count($where);
     front::$record_count=$this->view->record_count;
     $this->type=type::getInstance();
 	if (front::get('t') == 'wap') {
         $this->out('wap/type_list.html');
         return;
     }
     $template=$this->type->type[front::get('typeid')]['template'];
     if ($template&&file_exists(TEMPLATE.'/'.$this->view->_style.'/'.$template)) $this->out($template);
     else {
         $tpl=type::gettemplate($this->view->typeid);
         if (type::getishtml($this->view->typeid)) {
             $path=ROOT.type::url($this->view->typeid,@front::$get['page']>1 ?front::$get['page'] : null);
             if (!preg_match('/\.[a-zA-Z]+$/',$path)) $path=rtrim(rtrim($path,'/'),'\\').'/index.html';
             $this->cache_path=$path;
         }
         $this->out($tpl);
     }
 }
Ejemplo n.º 23
0
    function save_before() {
        parent::save_before();
        
        front::$post['content'] = htmlspecialchars_decode(front::$post['content']);
        
        if(front::$post['htmlrule1'] != ''){
        	front::$post['htmlrule'] = front::$post['htmlrule1'];
        }
        
		front::$post['strong'] = intval(front::$post['strong']);
        $pics = array();
        foreach(front::$post as $k =>$v) {
            if(preg_match('/pics(\d+)/i',$k,$out)) {
                if($v != ''){
                    $pics[$out[1]] = $v;
                }
                unset(front::$post[$k]);
            }
        }
        front::$post['pics'] = serialize($pics);
        if(!front::post('attr1')) {
            front::$post['attr1']='';
        }
        if(!front::$post['introduce']){
            front::$post['introduce']=cut(strip_tags(front::$post['content']),front::$post['introduce_len']*2);
        }
        
        if(front::$post['savehttppic']){
        	front::$post['content'] = stripslashes(front::$post['content']);
            front::$post['content'] = preg_replace_callback('%(<img\s[^>|/>]*?src\s*=\s*["|\']?)([^"|\'|\s>]*)%is','savepic', front::$post['content']);
            front::$post['content'] = addslashes(front::$post['content']);
        }
        
        //var_dump(front::$post['content']);exit;
        
        if(front::$post['autothumb']){
        	front::$post['content'] = stripslashes(front::$post['content']);
            preg_match('%(<img\s[^>|/>]*?src\s*=\s*["|\']?)([^"|\'|\s>]*)%is', front::$post['content'],$out);
            $out[1] = '';
            //$out[2] = savepic1($out);
			if(!$out[2]) return;
            //front::$post['thumb'] = str_ireplace(config::get('site_url'),'',$out[2]);
            $len = 1;
            if(config::get('base_url') != '/'){
            	$len = strlen(config::get('base_url'))+1;
            }
            if(substr($out[2],0,4) == 'http'){
            	front::$post['thumb'] = str_ireplace(config::get('site_url'),'',$out[2]);
            }else{
            	front::$post['thumb'] = substr($out[2],$len);
            }
            $catid = front::get('catid');
            $thumb=new thumb();
            $thumb->set(front::$post['thumb'],'file');
            front::$post['thumb'] = str_ireplace('.jpg','_s.jpg',front::$post['thumb']);
            if ($catid)
                $thumb->create(front::$post['thumb'],category::getwidthofthumb($catid),category::getheightofthumb($catid));
            else
                $thumb->create(front::$post['thumb'],config::get('thumb_width'),config::get('thumb_height'));
			$sp = $len>1?'/':'';
			front::$post['thumb'] = config::get('base_url').$sp.front::$post['thumb'];
			if(substr(front::$post['thumb'], 0,1) != '/'){
				front::$post['thumb'] = '/'.front::$post['thumb'];
			}
            front::$post['content'] = addslashes(front::$post['content']);
        }
    }
Ejemplo n.º 24
0
{loop $data $d}
<tr class="s_out">

<td align="center" ><input onclick="c_chang(this)" type="checkbox" value="{$d.$primary_key}" name="select[]" class="checkbox" /> </td>

<td align="center">{cut($d['groupid'])}</td>
<td align="center">{cut($d['groupid'])}</td>
<td align="center">{cut($d['name'])}</td>

<td align="center" width="70">
<span class="hotspot" onmouseover="tooltip.show('点击编辑用户组!');" onmouseout="tooltip.hide();"><a href="<?php echo modify("act/edit/table/$table/id/$d[$primary_key]");?>" class="a_edit"></a></span>

<span class="hotspot" onmouseover="tooltip.show('确定要删除吗?');" onmouseout="tooltip.hide();"><a onclick="javascript: return confirm('确实要删除吗?');" href="<?php echo modify("/act/delete/table/$table/id/$d[$primary_key]");?>" class="a_del"></a></span>

</td>
</tr>
{/loop}

</tbody>
</table>

<div class="page"><?php if(get('table')!='type' && front::get('case')!='field') echo pagination::html($record_count); ?></div>
</div>

<div class="blank20"></div>

<input type="hidden" name="batch" value="">
<input  class="btn_a" type="button" value="删除" name="delete" onclick="if(getSelect(this.form) && confirm('确实要删除ID为('+getSelect(this.form)+')的记录吗?')){this.form.action='<?php echo modify('act/batch',true);?>'; this.form.batch.value='delete'; this.form.submit();}" />

</form>
Ejemplo n.º 25
0
    static function get() {
        if (front::get('mod')) {
            $mod=front::get('mod');
            session::set('mod',$mod);
        }
        if (front::get('act')) {
            $act=front::get('act');
            session::set('act',$act);
        }
        if (front::get('table')) {
            $table=front::get('table');
            session::set('table',$table);
        }
        if (front::get('set')) {
            $set=front::get('set');
            session::set('set',$set);
        }
        if (front::get('tagfrom')) {
            $tagfrom=front::get('tagfrom');
            session::set('tagfrom',$tagfrom);
        }
        if (front::get('item')) {
            $item=front::get('item');
            session::set('item',$item);
        }
        if (front::get('item')) {
            $item=front::get('item');
            session::set('item',$item);
        }
        $mod=session::get('mod');
        $menu = array();
        switch ($mod) {
            case 'system':
                $menu=self::fetch('网站设置,数据库管理,数据维护');
                break;
            case 'config':
            	$menu=self::fetch('网站设置,多站点设置');
                break;
            case 'content':
                $menu=self::fetch('栏目管理,内容管理,分类管理,专题管理');
                break;
            case 'cache':
                $menu=self::fetch('生成管理,手机版生成');
                break;
            case 'order':
                $menu=self::fetch('订单管理');
                break;
            case 'celive':
                $menu=self::fetch('客服系统管理,客服中心,账号管理,生成代码');
                break;
            case 'user':
                $menu=self::fetch('用户管理,用户组管理,推广联盟');
                break;
            case 'func':
                $menu=self::fetch('公告管理,留言评论,投票管理,数据管理,网站安全');
                break;
            case 'defined':
                $menu=self::fetch('自定义字段,自定义表单');
                break;
            case 'help':
                $menu=self::fetch('模板管理,添加标签,标签列表');
                break;
            case 'seo':
                $menu=self::fetch('数据统计,内容链接管理,友情链接管理,邮件管理');
                break;
            case 'map':
                $menu=self::fetch('网站设置,数据库管理,数据维护,内容管理,生成管理,栏目管理,分类管理,专题管理,幻灯片管理,用户管理,用户组管理,公告管理,自定义字段,自定义表单,订单管理,留言管理,专题管理,评论管理,投票管理,数据备份,批量替换,模板管理,添加标签,标签列表,内容链接管理,推广联盟,友情链接管理,统计管理,邮件管理,内容链接管理,推广联盟,友情链接管理,统计管理,邮件管理,系统管理,客服中心,账号管理,生成代码');
                break;
			case 'bbs':
                $menu=self::fetch('论坛专题,帖子管理');
                break;
            default:
                $menu=self::fetch('常用操作');
                break;
        }
        if(empty($menu)){
        	return;
        }
        $menu=array_merge($menu,self::$menu);
        if (front::get('mod')) {
            foreach ($menu as $menu_1) {
                foreach ($menu_1 as $menu_2) {
                    if ($menu_2)
                        break;
                }
                if ($menu_2)
                    break;
            }
            front::redirect($menu_2);
        }
        return $menu;
    }
Ejemplo n.º 26
0
?>
"  onsubmit="return checkform();">
<input type="hidden" name="onlymodify" value=""/>
<script type="text/javascript" src="<?php 
echo $base_url;
?>
/common/js/ajaxfileupload.js"></script>
<script type="text/javascript" src="<?php 
echo $base_url;
?>
/common/js/ThumbAjaxFileUpload.js"></script>
<script>
function attachment_delect(id) {
$.ajax({
url: '<?php 
echo url('tool/deleteattachment/site/' . front::get(site), false);
?>
&id='+id,
type: 'GET',
dataType: 'text',
timeout: 1000,
error: function(){
//	alert('Error loading XML document');
},
success: function(data){
document.form1.attachment_id.value=0;
get('attachment_path').innerHTML='';
get('file_info').innerHTML='';
}
});
}
Ejemplo n.º 27
0
";
var editiframename="";
var fileinputid="<?php 
echo front::get('fileinputid');
?>
";
var digheight="450";
var rootDIR="<?php 
echo config::get('base_url');
if (substr(config::get('base_url'), -1, 1) != '/') {
    echo '/';
}
?>
";
var picview="index.php?case=file&act=ps&maxselect=<?php 
echo front::get('maxselect');
?>
";
var fileview="index.php?case=file&act=netfile";
$(document).ready(function(){
var h = parseInt(digheight);
var w = $(window).width();
$('#mainwindowstr').css({height:h-45,width: w-12});
$('.upfilewindow').css({height:h-45});
})

function resetwindow(){
parent.closeifram();
}

function fnUpdate(){
Ejemplo n.º 28
0
 function countcomment($aid) {
     $com=new comment();
     return $com->rec_count('aid='.front::get('aid'));
 }
Ejemplo n.º 29
0
<?php
$item = front::get('item');
?>
<iframe id="I2" src="celive/admin/system.php?action=<?php echo $item;?>" width="100%" height="600" frameborder="0"></iframe>
Ejemplo n.º 30
0
?>
'; this.form.batch.value='listorder'; this.form.submit();"/>

    <?php 
if (!front::get('deletestate')) {
    ?>
    <input type="button" value=" 审核 " name="check" onclick="if(getSelect(this.form)  && confirm('确实要审核ID为('+getSelect(this.form)+')的记录吗?')){ this.form.action='<?php 
    echo modify('act/batch', true);
    ?>
';this.form.batch.value='check';this.form.submit();}" class="btn_d" />
        <?php 
}
?>

    <?php 
if (!front::get('deletestate')) {
    ?>
    <input type="button" value="删除到回收站" name="delete" onclick="if(getSelect(this.form) && confirm('确实要把ID为('+getSelect(this.form)+')的记录放到回收站吗?')){this.form.action='<?php 
    echo modify('act/batch', true);
    ?>
'; this.form.batch.value='deletestate'; this.form.submit();}" class="btn_e"/>


        <?php 
}
?>

    <input type="button" value="<?php 
if (get('table') == 'archive') {
    ?>
彻底<?php