• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP file_unlink函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中file_unlink函数的典型用法代码示例。如果您正苦于以下问题:PHP file_unlink函数的具体用法?PHP file_unlink怎么用?PHP file_unlink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了file_unlink函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: sitemap_build

function sitemap_build($action, $settings, $board)
{
    global $config;
    // Possible values for $action:
    //	- all (rebuild everything, initialization)
    //	- news (news has been updated)
    //	- boards (board list changed)
    //	- post (a post has been made)
    //	- thread (a thread has been made)
    if ($action != 'all') {
        if ($action != 'post-thread' && $action != 'post-delete') {
            return;
        }
        if (isset($settings['regen_time']) && $settings['regen_time'] > 0) {
            if ($last_gen = @filemtime($settings['path'])) {
                if (time() - $last_gen < (int) $settings['regen_time']) {
                    return;
                }
                // Too soon
            }
        }
    }
    if ($config['smart_build']) {
        file_unlink($settings['path']);
    } else {
        $boards = explode(' ', $settings['boards']);
        $threads = array();
        foreach ($boards as $board) {
            $query = query(sprintf("SELECT `id` AS `thread_id`, (SELECT `time` FROM ``posts_%s`` WHERE `thread` = `thread_id` OR `id` = `thread_id` ORDER BY `time` DESC LIMIT 1) AS `lastmod` FROM ``posts_%s`` WHERE `thread` IS NULL", $board, $board)) or error(db_error());
            $threads[$board] = $query->fetchAll(PDO::FETCH_ASSOC);
        }
        file_write($settings['path'], Element('themes/sitemap/sitemap.xml', array('settings' => $settings, 'config' => $config, 'threads' => $threads, 'boards' => $boards)));
    }
}
开发者ID:odilitime,项目名称:infinity,代码行数:34,代码来源:theme.php


示例2: catalog_build

function catalog_build($action, $settings, $board)
{
    global $config;
    // Possible values for $action:
    //	- all (rebuild everything, initialization)
    //	- news (news has been updated)
    //	- boards (board list changed)
    //	- post (a reply has been made)
    //	- post-thread (a thread has been made)
    $boards = explode(' ', $settings['boards']);
    if ($action == 'all') {
        foreach ($boards as $board) {
            $b = new Catalog();
            if ($config['smart_build']) {
                file_unlink($config['dir']['home'] . $board . '/catalog.html');
            } else {
                $b->build($settings, $board);
            }
        }
    } elseif ($action == 'post-thread' || $settings['update_on_posts'] && $action == 'post' || $settings['update_on_posts'] && $action == 'post-delete' && in_array($board, $boards)) {
        $b = new Catalog();
        if ($config['smart_build']) {
            file_unlink($config['dir']['home'] . $board . '/catalog.html');
        } else {
            $b->build($settings, $board);
        }
    }
}
开发者ID:0151n,项目名称:vichan,代码行数:28,代码来源:theme.php


示例3: ukko_build

function ukko_build($action, $settings)
{
    global $config;
    $ukko = new ukko();
    $ukko->settings = $settings;
    if (!($action == 'all' || $action == 'post' || $action == 'post-thread' || $action == 'post-delete')) {
        return;
    }
    if ($config['smart_build']) {
        file_unlink($settings['uri'] . '/index.html');
    } else {
        file_write($settings['uri'] . '/index.html', $ukko->build());
    }
}
开发者ID:odilitime,项目名称:infinity,代码行数:14,代码来源:theme.php


示例4: semirand_build

/**
 * Generate the board's HTML and move it and its JavaScript in place, whence
 * it's served
 */
function semirand_build($action, $settings)
{
    global $config;
    if ($action !== 'all' && $action !== 'post' && $action !== 'post-thread' && $action !== 'post-delete') {
        return;
    }
    if ($config['smart_build']) {
        file_unlink($settings['uri'] . '/index.html');
    } else {
        $semirand = new semirand($settings);
        // Copy the generated board HTML to its place
        file_write($settings['uri'] . '/index.html', $semirand->build());
        file_write($settings['uri'] . '/semirand.js', Element('themes/semirand/semirand.js', array()));
    }
}
开发者ID:anastiel,项目名称:lainchan,代码行数:19,代码来源:theme.php


示例5: build

 public function build($action, $settings)
 {
     global $config, $_theme;
     if ($action == 'all') {
         copy('templates/themes/recent_textonly/' . $settings['basecss'], $config['dir']['home'] . $settings['css']);
     }
     $this->excluded = explode(' ', $settings['exclude']);
     if ($action == 'all' || $action == 'post' || $action == 'post-thread' || $action == 'post-delete') {
         if ($config['smart_build']) {
             file_unlink($config['dir']['home'] . $settings['html']);
         } else {
             file_write($config['dir']['home'] . $settings['html'], $this->homepage($settings));
         }
     }
 }
开发者ID:remiscarlet,项目名称:kcad,代码行数:15,代码来源:theme.php


示例6: mod_spoiler_image

function mod_spoiler_image($board, $post, $file)
{
    global $config, $mod;
    if (!openBoard($board)) {
        error($config['error']['noboard']);
    }
    if (!hasPermission($config['mod']['spoilerimage'], $board)) {
        error($config['error']['noaccess']);
    }
    // Delete file thumbnail
    $query = prepare(sprintf("SELECT `files`, `thread` FROM ``posts_%s`` WHERE id = :id", $board));
    $query->bindValue(':id', $post, PDO::PARAM_INT);
    $query->execute() or error(db_error($query));
    $result = $query->fetch(PDO::FETCH_ASSOC);
    $files = json_decode($result['files']);
    file_unlink($board . '/' . $config['dir']['thumb'] . $files[$file]->thumb);
    $files[$file]->thumb = 'spoiler';
    $files[$file]->thumbheight = 128;
    $files[$file]->thumbwidth = 128;
    // Make thumbnail spoiler
    $query = prepare(sprintf("UPDATE ``posts_%s`` SET `files` = :files WHERE `id` = :id", $board));
    $query->bindValue(':files', json_encode($files));
    $query->bindValue(':id', $post, PDO::PARAM_INT);
    $query->execute() or error(db_error($query));
    // Record the action
    modLog("Spoilered file from post #{$post}");
    // Rebuild thread
    buildThread($result['thread'] ? $result['thread'] : $post);
    // Rebuild board
    buildIndex();
    // Rebuild themes
    rebuildThemes('post-delete', $board);
    // Redirect
    header('Location: ?/' . sprintf($config['board_path'], $board) . $config['file_index'], true, $config['redirect_http']);
}
开发者ID:vicentil,项目名称:vichan,代码行数:35,代码来源:pages.php


示例7: explode

<?php

$depth = '../';
require_once $depth . '../login/login_check.php';
$rurl = '../app/wap/flash.php?anyid=' . $anyid . '&lang=' . $lang . '&module=' . $module . '&cs=' . $cs;
if ($action == "del") {
    $allidlist = explode(',', $allid);
    foreach ($allidlist as $key => $val) {
        $flashrec = $db->get_one("SELECT * FROM {$met_flash} where id='{$val}'");
        file_unlink("../../" . $flashrec[img_path]);
        file_unlink("../../" . $flashrec[flash_path]);
        file_unlink("../../" . $flashrec[flash_back]);
        $query = "delete from {$met_flash} where id='{$val}'";
        $db->query($query);
    }
    metsave($rurl, '', $depth);
} else {
    $flashrec = $db->get_one("SELECT * FROM {$met_flash} where id='{$id}'");
    file_unlink("../../" . $flashrec[img_path]);
    file_unlink("../../" . $flashrec[flash_path]);
    file_unlink("../../" . $flashrec[flash_back]);
    $query = "delete from {$met_flash} where id='{$id}'";
    $db->query($query);
    metsave($rurl, '', $depth);
}
开发者ID:nanfs,项目名称:lt,代码行数:25,代码来源:flashdelete.php


示例8: explode

}
if ($action == "del") {
    $allidlist = explode(',', $allid);
    foreach ($allidlist as $key => $val) {
        if ($met_deleteimg) {
            foreach ($para_list as $key => $val1) {
                $imagelist = $db->get_one("select * from {$met_plist} where lang='{$lang}' and  paraid='{$val1['id']}' and listid='{$val}'");
                file_unlink($depth . "../" . $imagelist[info]);
            }
        }
        $query = "delete from {$met_plist} where listid='{$val}' and module='6'";
        $db->query($query);
        $query = "delete from {$met_cv} where id='{$val}'";
        $db->query($query);
    }
    metsave($backurl, '', $depth);
} else {
    if ($met_deleteimg) {
        foreach ($para_list as $key => $val) {
            $imagelist = $db->get_one("select * from {$met_plist} where lang='{$lang}' and  paraid='{$val['id']}' and listid='{$id}'");
            file_unlink($depth . "../" . $imagelist[info]);
        }
    }
    $query = "delete from {$met_plist} where listid='{$id}' and module='6'";
    $db->query($query);
    $query = "delete from {$met_cv} where id='{$id}'";
    $db->query($query);
    metsave($backurl, '', $depth);
}
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
开发者ID:Jesuslagliva12,项目名称:OpenAPI,代码行数:31,代码来源:cv_delete.php


示例9: undoImage

function undoImage(array $post)
{
    if (!$post['has_file']) {
        return;
    }
    if (isset($post['file_path'])) {
        file_unlink($post['file_path']);
    }
    if (isset($post['thumb_path'])) {
        file_unlink($post['thumb_path']);
    }
}
开发者ID:carriercomm,项目名称:Tinyboard,代码行数:12,代码来源:functions.php


示例10: file_unlink

         if ($size[0] > $config['max_width'] || $size[1] > $config['max_height']) {
             file_unlink($post['file']);
             error($config['error']['maxsize']);
         }
     } else {
         // GD failed
         // TODO?
     }
 } else {
     // find dimensions of an image using GD
     if (!($size = @getimagesize($post['file']))) {
         file_unlink($post['file']);
         error($config['error']['invalidimg']);
     }
     if ($size[0] > $config['max_width'] || $size[1] > $config['max_height']) {
         file_unlink($post['file']);
         error($config['error']['maxsize']);
     }
 }
 // create image object
 $image = new Image($post['file'], $post['extension']);
 if ($image->size->width > $config['max_width'] || $image->size->height > $config['max_height']) {
     $image->delete();
     error($config['error']['maxsize']);
 }
 $post['width'] = $image->size->width;
 $post['height'] = $image->size->height;
 if ($config['spoiler_images'] && isset($_POST['spoiler'])) {
     $post['thumb'] = 'spoiler';
     $size = @getimagesize($config['spoiler_image']);
     $post['thumbwidth'] = $size[0];
开发者ID:nabm,项目名称:Tinyboard,代码行数:31,代码来源:post.php


示例11: undoImage

function undoImage($post)
{
    if ($post['has_file']) {
        if (isset($post['thumb'])) {
            file_unlink($post['file']);
        }
        if (isset($post['thumb'])) {
            file_unlink($post['thumb']);
        }
    }
}
开发者ID:nabm,项目名称:Tinyboard,代码行数:11,代码来源:functions.php


示例12: is_numeric

        $msn = 'msn_' . $allidlist[$i];
        $msn = ${$msn};
        $taobao = 'taobao_' . $allidlist[$i];
        $taobao = ${$taobao};
        $alibaba = 'alibaba_' . $allidlist[$i];
        $alibaba = ${$alibaba};
        $skype = 'skype_' . $allidlist[$i];
        $skype = ${$skype};
        $tpif = is_numeric($allidlist[$i]) ? 1 : 0;
        $sqly = $tpif ? "id='{$allidlist[$i]}'" : '';
        if ($sqly != '') {
            $skin_m = $db->get_one("SELECT * FROM {$met_online} WHERE {$sqly}");
        }
        if ($tpif) {
            if (!$skin_m) {
                metsave('-1', $lang_dataerror, $depth);
            }
        }
        $uptp = $tpif ? "update" : "insert into";
        $upbp = $tpif ? "where id='{$allidlist[$i]}'" : ",lang='{$lang}'";
        $query = "{$uptp} {$met_online} set\n                      name           = '{$name}',\n     \t\t\t\t  no_order       = '{$no_order}',\n\t\t\t\t\t  qq             = '{$qq}',\n\t\t\t\t\t  msn            = '{$msn}',\n\t\t\t\t\t  taobao         = '{$taobao}',\n\t\t\t\t\t  alibaba        = '{$alibaba}',\n\t\t\t\t\t  skype          = '{$skype}'\n\t\t\t{$upbp}";
        $db->query($query);
    }
    file_unlink($depth . "../../cache/online_{$lang}.inc.php");
    metsave($rurl, '', $depth);
} else {
    $query = "delete from {$met_online} where id='{$id}'";
    $db->query($query);
    file_unlink($depth . "../../cache/online_{$lang}.inc.php");
    metsave($rurl, '', $depth);
}
开发者ID:nanfs,项目名称:lt,代码行数:31,代码来源:delete.php


示例13: delete

 public function delete()
 {
     file_unlink($this->src);
 }
开发者ID:niksfish,项目名称:Tinyboard,代码行数:4,代码来源:image.php


示例14: openBoard

    openBoard($board['uri']);
    $query = query(sprintf("SELECT `file`, `thumb` FROM ``posts_%s`` WHERE `file` IS NOT NULL", $board['uri']));
    $valid_src = array();
    $valid_thumb = array();
    while ($post = $query->fetch(PDO::FETCH_ASSOC)) {
        $valid_src[] = $post['file'];
        $valid_thumb[] = $post['thumb'];
    }
    $files_src = array_map('basename', glob($board['dir'] . $config['dir']['img'] . '*'));
    $files_thumb = array_map('basename', glob($board['dir'] . $config['dir']['thumb'] . '*'));
    $stray_src = array_diff($files_src, $valid_src);
    $stray_thumb = array_diff($files_thumb, $valid_thumb);
    $stats = array('deleted' => 0, 'size' => 0);
    foreach ($stray_src as $src) {
        $stats['deleted']++;
        $stats['size'] = filesize($board['dir'] . $config['dir']['img'] . $src);
        if (!file_unlink($board['dir'] . $config['dir']['img'] . $src)) {
            $er = error_get_last();
            die("error: " . $er['message'] . "\n");
        }
    }
    foreach ($stray_thumb as $thumb) {
        $stats['deleted']++;
        $stats['size'] = filesize($board['dir'] . $config['dir']['thumb'] . $thumb);
        if (!file_unlink($board['dir'] . $config['dir']['thumb'] . $thumb)) {
            $er = error_get_last();
            die("error: " . $er['message'] . "\n");
        }
    }
    echo sprintf("deleted %s files (%s)\n", $stats['deleted'], format_bytes($stats['size']));
}
开发者ID:0151n,项目名称:vichan,代码行数:31,代码来源:delete-stray-images.php


示例15: explode

     if ($met_thumb_wate == 1) {
         if ($met_wate_class == 2) {
             $img->met_image_name = $depth . $met_wate_img;
         } else {
             $img->met_text_size = $met_text_size;
         }
         $img->save_file = $imgurls;
         $img->create($imgurls);
         $imgurls_a = explode("../", $imgurls);
         $imgurls = "../" . $imgurls_a[3];
     }
     if ($met_thumb_img != $depth . "../" . str_ireplace("/thumb", "", $val['imgurls'])) {
         $imgurls = '../' . str_ireplace("../", "", $imgurls);
         $query = "update {$table} set imgurls='{$imgurls}' where id='{$val['id']}'";
         if ($met_deleteimg == 1 && $db->query($query)) {
             @file_unlink("../../{$val['imgurls']}");
         }
     }
 }
 $met_img_x = '';
 $met_img_y = '';
 if ($mou == 3) {
     $met_img_x = $met_productdetail_x;
     $met_img_y = $met_productdetail_y;
 }
 if ($mou == 5) {
     $met_img_x = $met_imgdetail_x;
     $met_img_y = $met_imgdetail_y;
 }
 $met_bigthumb_img = $depth . "../" . $met_big_img;
 $imgurls = $f->createthumb($met_bigthumb_img, $met_img_x, $met_img_y, 'thumb_dis/');
开发者ID:Jesuslagliva12,项目名称:OpenAPI,代码行数:31,代码来源:thumb.php


示例16: PclZip

        }
    }
    if ($pseudo_download) {
        include $depth . "../include/pclzip.lib.php";
        $archive = new PclZip('metinfo_pseudo_rule.zip');
        $archive->create($httpdurl, PCLZIP_OPT_REMOVE_PATH, $little . '../../');
        @file_unlink($httpdurl);
        header("Content-type:application/zip;");
        $ua = $_SERVER["HTTP_USER_AGENT"];
        $title = "{$lang_rewriteruledownload2}({$_SERVER['SERVER_SOFTWARE']}).zip";
        if (preg_match("/MSIE/", $ua)) {
            header('Content-Disposition: attachment; filename="' . urlencode($title) . '"');
        } else {
            header('Content-Disposition: attachment; filename="' . $title . '"');
        }
        readfile("metinfo_pseudo_rule.zip");
        @file_unlink("metinfo_pseudo_rule.zip");
    }
} elseif ($depsdo == 'deleteall') {
    if (file_exists('../../httpd.ini')) {
        @unlink('../../httpd.ini');
    }
    if (file_exists('../../.htaccess')) {
        @unlink('../../.htaccess');
    }
    if (file_exists('../../web.config')) {
        @unlink('../../web.config');
    }
}
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
开发者ID:Jesuslagliva12,项目名称:OpenAPI,代码行数:31,代码来源:pseudo.php


示例17: explode

    if ($action_type == "del") {
        $allidlist = explode(',', $allid);
        foreach ($allidlist as $key => $val) {
            $query = "delete from {$met_label} where id='{$val}'";
            $db->query($query);
        }
        file_unlink("../../cache/str_{$lang}.inc.php");
        metsave('../seo/strcontent.php?lang=' . $lang . '&anyid=' . $anyid);
    } else {
        $skin_m = $db->get_one("SELECT * FROM {$met_label} WHERE id='{$id}'");
        if (!$skin_m) {
            okinfox('strcontent.php?lang=' . $lang, $lang_dataerror);
        }
        $query = "delete from {$met_label} where id='{$id}'";
        $db->query($query);
        file_unlink("../../cache/str_{$lang}.inc.php");
        metsave('../seo/strcontent.php?lang=' . $lang . '&anyid=' . $anyid);
    }
} else {
    $total_count = $db->counter($met_label, " where lang='{$lang}'", "*");
    require_once 'include/pager.class.php';
    $page = (int) $page;
    if ($page_input) {
        $page = $page_input;
    }
    $list_num = 16;
    $rowset = new Pager($total_count, $list_num, $page);
    $from_record = $rowset->_offset();
    $query = "SELECT * FROM {$met_label} where lang='{$lang}' order BY id LIMIT {$from_record}, {$list_num}";
    $result = $db->query($query);
    while ($list = $db->fetch_array($result)) {
开发者ID:Jesuslagliva12,项目名称:OpenAPI,代码行数:31,代码来源:strcontent.php


示例18: delimg

function delimg($del, $type, $module = 0, $para_list = NULL)
{
    global $lang, $db, $met_deleteimg, $depth;
    global $met_admin_table, $met_column, $met_cv, $met_download, $met_feedback, $met_flist, $met_img, $met_job, $met_link, $met_list, $met_message, $met_news, $met_parameter, $met_plist, $met_product;
    if ($met_deleteimg) {
        $table = $module == 8 ? $met_feedback : $met_plist;
        if ($para_list == NULL && $module != 2) {
            $query = "select * from {$met_parameter} where lang='{$lang}' and module='{$module}' and (class1='{$del['class1']}' or class1=0) and type='5'";
            $para_list = $db->get_all($query);
        }
        if ($type == 1) {
            $delnow[] = $del;
        } else {
            if ($type == 2) {
                $delnow = $del;
            } else {
                $table = moduledb($module);
                $query = "select * from {$table} where id='{$id}'";
                echo $query;
                $del = $db->get_one($query);
                $delnow[] = $del;
            }
        }
        foreach ($delnow as $key => $val) {
            if ($val['recycle'] != 2 || $module != 2) {
                foreach ($para_list as $key1 => $val1) {
                    if (($module == $val1['module'] || $val['recycle'] == $val1['module']) && ($val1['class1'] == 0 || $val1['class1'] == $val['class1'])) {
                        $imagelist = $db->get_one("select * from {$table} where lang='{$lang}' and  paraid='{$val1['id']}' and listid='{$val['id']}'");
                        file_unlink($depth . "../" . $imagelist['info']);
                        $imagelist['info'] = str_replace('watermark/', '', $imagelist['info']);
                        file_unlink($depth . "../" . $imagelist['info']);
                    }
                }
            }
            if ($module == 6 || $module == 8) {
                continue;
            }
            if ($val['displayimg'] != NULL) {
                $displayimg = explode('|', $val['displayimg']);
                foreach ($displayimg as $key2 => $val2) {
                    $display_val = explode('*', $val2);
                    file_unlink($depth . "../" . $display_val[1]);
                    $display_val[1] = str_replace('watermark/', '', $display_val[1]);
                    file_unlink($depth . "../" . $display_val[1]);
                    $imgurl_diss = explode('/', $display_val[1]);
                    file_unlink($depth . "../" . $imgurl_diss[0] . '/' . $imgurl_diss[1] . '/' . $imgurl_diss[2] . '/thumb_dis/' . $imgurl_diss[count($imgurl_diss) - 1]);
                }
            }
            if ($val['downloadurl'] == NULL) {
                file_unlink($depth . "../" . $val['imgurl']);
                file_unlink($depth . "../" . $val['imgurls']);
                $val['imgurlbig'] = str_replace('watermark/', '', $val['imgurl']);
                file_unlink($depth . "../" . $val['imgurlbig']);
                $imgurl_diss = explode('/', $val['imgurlbig']);
                file_unlink($depth . "../" . $imgurl_diss[0] . '/' . $imgurl_diss[1] . '/' . $imgurl_diss[2] . '/thumb_dis/' . $imgurl_diss[count($imgurl_diss) - 1]);
            } else {
                file_unlink($depth . "../" . $val['downloadurl']);
            }
            $content[0] = $val[content];
            $content[1] = $val[content1];
            $content[2] = $val[content2];
            $content[3] = $val[content3];
            $content[4] = $val[content4];
            foreach ($content as $contentkey => $contentval) {
                if ($contentval) {
                    $tmp1 = explode("<", $contentval);
                    foreach ($tmp1 as $key => $val) {
                        $tmp2 = explode(">", $val);
                        if (strcasecmp(substr(trim($tmp2[0]), 0, 3), 'img') == 0) {
                            preg_match('/http:\\/\\/([^\\"]*)/i', $tmp2[0], $out);
                            $imgs[] = $out[1];
                        }
                    }
                }
            }
            foreach ($imgs as $key => $val) {
                $vals = explode('/', $val);
                file_unlink($depth . "../../upload/images/" . $vals[count($vals) - 1]);
                file_unlink($depth . "../../upload/images/watermark/" . $vals[count($vals) - 1]);
            }
        }
    }
}
开发者ID:Jesuslagliva12,项目名称:OpenAPI,代码行数:83,代码来源:global.func.php


示例19: explode

    $allidlist = explode(',', $allid);
    foreach ($allidlist as $key => $val) {
        $para_list = $db->get_one("SELECT * FROM {$met_parameter} WHERE id='{$val}'");
        $type = $para_list['type'];
        $query = "delete from {$met_parameter} where id='{$val}'";
        $db->query($query);
        if ($type == 2 or $type == 4 or $type == 6) {
            $query = "delete from {$met_list} where bigid='{$val}'";
            $db->query($query);
        }
        /*delete images*/
        if ($type == 5) {
            $query = "select * from {$met_plist} where paraid='{$val}'";
            $result = $db->query($query);
            while ($list = $db->fetch_array($result)) {
                file_unlink("../../" . $list[info]);
            }
        }
        $query = "delete from {$met_plist} where paraid='{$val}'";
        $db->query($query);
        $type = '';
    }
    metsave('../column/parameter/parameter.php?anyid=' . $anyid . '&module=' . $module . '&lang=' . $lang . '&class1=' . $class1 . '&cs=' . $cs, '', $depth);
} elseif ($action == "addsave") {
    $newslit = "<tr class='mouse newlist'>\n";
    $newslit .= "<td class='list-text'><input name='id' type='checkbox' value='new{$lp}' checked='checked' /></td>\n";
    $newslit .= "<td class='list-text'><input name='no_order_new{$lp}' type='text' class='text no_order' /></td>\n";
    $newslit .= "<td class='list-text' style='padding-left:15px; text-align:left;'><input name='name_new{$lp}' type='text' class='text nonull' /></td></td>\n";
    if ($module == 6 || $module == 8 || $module == 10 || $module == 7) {
        $newslit .= "<td class='list-text' style='padding-left:15px; text-align:left;'><input name='description_new{$lp}' type='text' class='text' /></td></td>\n";
    }
开发者ID:nanfs,项目名称:lt,代码行数:31,代码来源:parameter.php


示例20: delete_page_base

function delete_page_base($page = '', $board = false)
{
    global $config, $mod;
    if (empty($board)) {
        $board = false;
    }
    if (!$board && $mod['boards'][0] !== '*') {
        error($config['error']['noaccess']);
    }
    if (!hasPermission($config['mod']['edit_pages'], $board)) {
        error($config['error']['noaccess']);
    }
    if ($board !== FALSE && !openBoard($board)) {
        error($config['error']['noboard']);
    }
    if (preg_match('/^[a-z0-9]{1,255}$/', $page) && !preg_match('/^(index|catalog|index\\+50)|(\\d+)$/', $page)) {
        if ($board) {
            $query = prepare('DELETE FROM ``pages`` WHERE `board` = :board AND `name` = :name');
            $query->bindValue(':board', $board ? $board : NULL);
        } else {
            $query = prepare('DELETE FROM ``pages`` WHERE `board` IS NULL AND `name` = :name');
        }
        $query->bindValue(':name', $page);
        $query->execute() or error(db_error($query));
        @file_unlink(($board ? $board . '/' : '') . $page . '.html');
    }
    header('Location: ?/edit_pages' . ($board ? '/' . $board : ''), true, $config['redirect_http']);
}
开发者ID:ringtech,项目名称:infinity,代码行数:28,代码来源:pages.php



注:本文中的file_unlink函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP file_unmanaged_copy函数代码示例发布时间:2022-05-15
下一篇:
PHP file_tools_use_folder_structure函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap