コード例 #1
0
 public function del_file($file_id)
 {
     $res = keke_file_class::del_att_file($file_id);
     $res and kekezu::echojson('', '1') or kekezu::echojson('', '0');
     die;
 }
コード例 #2
0
 static function del_att_file($fid = 0)
 {
     keke_file_class::del_att_file($fid);
 }
コード例 #3
0
ファイル: admin_article_edit.php プロジェクト: pengfeiaaa/web
    $url = "index.php?do={$do}&view=list&type={$type}";
    $fields = kekezu::escape($fields);
    $res = $art_obj->save($fields, $pk);
    $log_ac = array('edit' => $_lang['edit_art'], 'add' => $_lang['add_art']);
    if ($pk['art_id']) {
        kekezu::admin_system_log($log_ac['edit'] . ":" . $fields['art_title']);
    } else {
        kekezu::admin_system_log($log_ac['add'] . ":" . $fields['art_title']);
    }
    kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success');
}
if (isset($ac) && $ac == 'del') {
    if ($filepath) {
        $pk and db_factory::execute(" update " . TABLEPRE . "witkey_article set art_pic ='' where art_id = " . intval($pk));
        $file_info = db_factory::get_one(" select * from " . TABLEPRE . "witkey_file where save_name = '.{$filepath}.'");
        keke_file_class::del_att_file($file_info['file_id'], $file_info['save_name']);
        kekezu::echojson('', '1');
    }
}
$cat_arr = array();
kekezu::get_tree($art_cat_arr, $cat_arr, 'option', $art_id, 'art_cat_id', 'art_cat_pid', 'cat_name');
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . "_" . $view);
function get_fid($path)
{
    if (!path) {
        return false;
    }
    $querystring = substr(strstr($path, '?'), 1);
    parse_str($querystring, $query);
    return $query['fid'];
}