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));
 }
 function batch_action(){
     if(front::post('batch') == 'delete'){
         $sql = "DELETE FROM `".config::get('database', 'prefix')."event`";
         $this->_table->query($sql);
         event::log('日志清除','成功');
         front::refresh(url::modify('act/manage',true));
     }
 }
 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')));
 }
 function link($string,$page) {
     if ($this->page_current == $page)
         return $string;
     $url=url::modify('page/'.$page,true);
     return "<a href='$url'>$string</a>";
 }
Beispiel #5
0
echo uri();
?>
" method="post">

<div style="float:right;width:190px;overflow:hidden;">
<input type="button" value="添加内容" onClick="javascript:location.href='<?php 
echo $base_url;
?>
/index.php?case=table&act=add&table=archive&admin_dir=<?php 
echo get('admin_dir');
?>
'"  class="btn_d" /><input type="button" value="审核内容" onclick="javascript:window.location.href='<?php 
echo url::create('table/list/table/archive/needcheck/1');
?>
'"  class="btn_d" /><input type="button" value="回收站" onclick="javascript:window.location.href='<?php 
echo url::modify("table/" . get('table') . "/deletestate/1/page/1");
?>
'"  class="btn_e" />
</div>

<div class="blank5"></div>
<div id="tagscontent" class="right_box">

    <table border="0" cellspacing="0" cellpadding="0" name="table1" id="table1" width="100%">
        <thead>
            <tr class="th">
                <th><input title="点击可全选本页的所有项目"  onclick="CheckAll(this.form)" type="checkbox" name="chkall" class="checkbox" /> </th>
                <th>排序</th>
                <th><!--aid-->编号</th>
                <th><!--catid-->栏目</th>
                <th><!--title-->标题</th>
 function delete_action() {
     $this->manage->delete_before(front::get('id'));
     $delete=$this->_table->rec_delete(front::get('id'));
     if ($delete) front::flash("删除{$this->tname}成功!");
     front::redirect(url::modify('act/list/table/'.$this->table.'/bid/'.session::get('bid')));
 }
 function delete_action() {
 	if($this->table == 'category'){
 		chkpw('category_del');
 	}
 	if($this->table == 'type'){
 		chkpw('type_del');
 	}
 	if($this->table == 'special'){
 		chkpw('special_del');
 	}
 	if($this->table == 'user'){
 		chkpw('user_del');
 	}
 	if($this->table == 'usergroup'){
 		chkpw('usergroup_del');
 	}
 	if($this->table == 'orders'){
 		chkpw('order_del');
 	}
 	if($this->table == 'comment'){
 		chkpw('func_book_pldel');
 	}
 	if($this->table == 'guestbook'){
 		chkpw('func_book_del');
 	}
 	if($this->table == 'announcement'){
 		chkpw('func_announc_del');
 	}
 	if($this->table == 'linkword'){
 		chkpw('seo_linkword_del');
 	}
 	if($this->table == 'friendlink'){
 		chkpw('seo_friendlink_del');
 	}
 	
     $this->manage->delete_before(front::get('id'));
     $delete=$this->_table->rec_delete(front::get('id'));
     if ($delete){
         front::flash("删除{$this->tname}成功!");
         event::log("删除{$this->tname}",'成功 id='.front::get('id'));
     }
     front::redirect(url::modify('act/list/table/'.$this->table.'/bid/'.session::get('bid')));
 }
 function delete_action() {
     front::check_type(front::get('id'));
     $row = $this->_table->getrow(array('id'=>front::get('id')));
     if($row['mid'] != $this->view->user['userid']){
     	exit('你没权限删除');
     }
     $delete=$this->_table->rec_delete(front::get('id'));
     if($delete)  front::flash(lang('删除记录成功!'));
     front::redirect(url::modify('act/list/manage/'.$this->table));
 }
 function batch_action(){
 	if(is_array(front::$post['select']) && !empty(front::$post['select'])){
 		foreach(front::$post['select'] as $v){
 			if(!preg_match('/^my_.+/',$v)) {
 				front::flash('字段名称不正确!');
 			}
 			$delete=$this->_table->query("ALTER TABLE `{$this->_table->name}` DROP `".$v."`");
 			if(!$delete) {
 				front::flash('字段删除失败!');
 			}else {
 				unset(setting::$var[$this->table][$v]);
 				setting::save();
 				front::flash('字段删除成功!');
 				front::redirect(url::modify('act/list',true));
 			}
 		}
 	}
 }