本文整理汇总了PHP中dir_writeable函数的典型用法代码示例。如果您正苦于以下问题:PHP dir_writeable函数的具体用法?PHP dir_writeable怎么用?PHP dir_writeable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dir_writeable函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirfile_check
function dirfile_check(&$dirfile_items)
{
foreach ($dirfile_items as $key => $item) {
$item_path = $item['path'];
if ($item['type'] == 'dir') {
if (!dir_writeable(ROOT_PATH . $item_path)) {
if (is_dir(ROOT_PATH . $item_path)) {
$dirfile_items[$key]['status'] = 0;
$dirfile_items[$key]['current'] = '+r';
echo $item_path . ' <font color="#FF0000 size="-1">可读不可写</font><br><br>';
} else {
$dirfile_items[$key]['status'] = -1;
$dirfile_items[$key]['current'] = 'nodir';
echo $item_path . ' <font color="#FF0000 size="-1">目录无可读可写权限</font><br><br>';
}
} else {
//echo '<br>3';
$dirfile_items[$key]['status'] = 1;
$dirfile_items[$key]['current'] = '+r+w';
echo $item_path . ' <font size="-1">权限通过</font><br><br>';
}
} else {
//echo '<br>4';
if (file_exists(ROOT_PATH . $item_path)) {
if (is_writable(ROOT_PATH . $item_path)) {
$dirfile_items[$key]['status'] = 1;
$dirfile_items[$key]['current'] = '+r+w';
echo $item_path . ' <font size="-1">权限通过</font><br><br>';
// echo '<br>5';
} else {
$dirfile_items[$key]['status'] = 0;
$dirfile_items[$key]['current'] = '+r';
echo $item_path . ' <font color="#FF0000 size="-1">文件无可写权限</font><br><br>';
//echo '<br>6';
}
} else {
//echo '<br>7';
if ($fp = @fopen(ROOT_PATH . $item_path, 'wb+')) {
$dirfile_items[$key]['status'] = 1;
$dirfile_items[$key]['current'] = '+r+w';
echo $item_path . ' <font size="-1">权限通过</font><br><br>';
} else {
$dirfile_items[$key]['status'] = -2;
$dirfile_items[$key]['current'] = 'nofile';
echo $item_path . ' <font color="#FF0000 size="-1">文件无可读可写权限</font><br><br>';
}
}
}
}
}
示例2: dir_check
function dir_check(&$dir_items)
{
foreach ($dir_items as $key => $item) {
$item_path = $item['path'];
if (!dir_writeable(INSTALL_ROOT . $item_path)) {
if (!is_dir(INSTALL_ROOT . $item_path)) {
$dir_items[$key]['status'] = 1;
} else {
$dir_items[$key]['status'] = -1;
}
} else {
$dir_items[$key]['status'] = 1;
}
}
return $dir_items;
}
示例3: create_browse
function create_browse($sid, $grade, $dir = './browse')
{
$pagerow = 25;
$fp = fopen('./browse_' . $grade . '.php', 'r');
$browsefile = fread($fp, filesize('./browse_' . $grade . '.php'));
fclose($fp);
$browsefile = preg_replace("/[\$]sid\\s*\\=\\s*[0-9]+;/is", "\$sid = {$sid};", $browsefile);
$browsefile = preg_replace("/[\$]pagerow\\s*\\=\\s*[0-9]+;/is", "\$pagerow = {$pagerow};", $browsefile);
if (dir_writeable($dir . '/' . $sid)) {
$fp = fopen($dir . '/' . $sid . '/index.php', 'w');
fwrite($fp, trim($browsefile));
fclose($fp);
} else {
echo $dir . ' write error';
exit;
}
}
示例4: dirfile_check
/**
* file check
*/
function dirfile_check(&$dirfile_items)
{
foreach ($dirfile_items as $key => $item) {
$item_path = '/' . $item['path'];
if ($item['type'] == 'dir') {
if (!dir_writeable(ROOT_PATH . $item_path)) {
if (is_dir(ROOT_PATH . $item_path)) {
$dirfile_items[$key]['status'] = 0;
$dirfile_items[$key]['current'] = '+r';
} else {
$dirfile_items[$key]['status'] = -1;
$dirfile_items[$key]['current'] = 'nodir';
}
} else {
$dirfile_items[$key]['status'] = 1;
$dirfile_items[$key]['current'] = '+r+w';
}
} else {
if (file_exists(ROOT_PATH . $item_path)) {
if (is_writable(ROOT_PATH . $item_path)) {
$dirfile_items[$key]['status'] = 1;
$dirfile_items[$key]['current'] = '+r+w';
} else {
$dirfile_items[$key]['status'] = 0;
$dirfile_items[$key]['current'] = '+r';
}
} else {
if ($fp = @fopen(ROOT_PATH . $item_path, 'wb+')) {
$dirfile_items[$key]['status'] = 1;
$dirfile_items[$key]['current'] = '+r+w';
@fclose($fp);
@unlink(ROOT_PATH . $item_path);
} else {
$dirfile_items[$key]['status'] = -1;
$dirfile_items[$key]['current'] = 'nofile';
}
}
}
}
}
示例5: intval
if (!function_exists(iconv)) {
$lasterror[] = $language['error_iconv_invailable'];
}
if (@ini_get(file_uploads)) {
$max_size = @ini_get(upload_max_filesize);
$curr_upload_status = $language['attach_enabled'] . $max_size;
} else {
$curr_upload_status = $language['attach_disabled'];
}
$curr_disk_space = intval(diskfreespace('.') / (1024 * 1024)) . 'M';
if (!function_exists('mysqli_connect')) {
$lasterror[] = $language['error_mysqli_invailable'];
}
$checkdirarray = array('stream' => './stream', 'cache' => './cache/bootstrap');
foreach ($checkdirarray as $key => $dir) {
if (!dir_writeable($dir)) {
$lasterror[] = $dir . ' ' . $language['error_dir_unwritable'];
}
}
if (!is_writeable($config_ini_file)) {
$lasterror[] = $config_ini_file . ' ' . $language['error_file_unwritable'];
}
if (!$lasterror) {
$curr_ipc_type = false;
if (function_exists('posix_mkfifo')) {
if (check_namepipe("./stream/")) {
$curr_ipc_type = "namepipe";
}
} else {
$lastwarning[] = $language['warning_not_support_posix'];
}
示例6: check_env
function check_env()
{
global $lang, $attachdir;
$errors = array('quit' => false);
$quit = false;
if (!function_exists('mysql_connect')) {
$errors[] = 'mysql_unsupport';
$quit = true;
}
if (PHP_VERSION < '4.3') {
$errors[] = 'php_version_430';
$quit = true;
}
if (!file_exists(ROOT_PATH . './config.inc.php')) {
$errors[] = 'config_nonexistence';
$quit = true;
} elseif (!is_writeable(ROOT_PATH . './config.inc.php')) {
$errors[] = 'config_unwriteable';
$quit = true;
}
$checkdirarray = array('attach' => $attachdir, 'forumdata' => './forumdata', 'cache' => './forumdata/cache', 'ftemplates' => './forumdata/templates', 'threadcache' => './forumdata/threadcaches', 'log' => './forumdata/logs', 'uccache' => './uc_client/data/cache');
foreach ($checkdirarray as $key => $dir) {
if (!dir_writeable(ROOT_PATH . $dir)) {
$langkey = $key . '_unwriteable';
$errors[] = $key . '_unwriteable';
if (!in_array($key, array('ftemplate'))) {
$quit = TRUE;
}
}
}
$errors['quit'] = $quit;
return $errors;
}
示例7: is_dir
$dir_perm = is_dir(KEKE_ROOT . $dir_path) ? 0 : -1;
// 如果is_dir==true则为不可写,否则就是不存在咯
$error_num += 1;
} else {
$dir_perm = 1;
}
} else {
if (file_exists(KEKE_ROOT . $dir_path)) {
if (is_writable(KEKE_ROOT . $dir_path)) {
$dir_perm = 1;
} else {
$dir_perm = 0;
$error_num += 1;
}
} else {
if (dir_writeable(dirname(KEKE_ROOT . $dir_path))) {
$dir_perm = 1;
} else {
$dir_perm = -1;
$error_num += 1;
}
}
}
$check_dir[$dir_path] = $dir_perm;
}
// 函数依赖
$check_func = array();
foreach ($func_items as $value) {
if (function_exists($value)) {
$func_result = 1;
} else {
示例8: elseif
}
if($is_dir =='0' && is_writable(PHPCMS_PATH.$file)) {
$is_writable = 1;
} elseif($is_dir =='1' && dir_writeable(PHPCMS_PATH.$file)){
$is_writable = 1;
} else {
$is_writable = 0;
$no_writablefile = 1;
}
$filesmod[$_k]['file'] = $file;
$filesmod[$_k]['is_dir'] = $is_dir;
$filesmod[$_k]['cname'] = $cname;
$filesmod[$_k]['is_writable'] = $is_writable;
}
if(dir_writeable(PHPCMS_PATH)) {
$is_writable = 1;
} else {
$is_writable = 0;
}
$filesmod[$_k+1]['file'] = '网站根目录';
$filesmod[$_k+1]['is_dir'] = '1';
$filesmod[$_k+1]['cname'] = '目录';
$filesmod[$_k+1]['is_writable'] = $is_writable;
include PHPCMS_PATH."install/step/step".$step.".tpl.php";
break;
case '5': //配置帐号 (MYSQL帐号、管理员帐号、)
$database = pc_base::load_config('database');
$testdata = $_POST['testdata'];
extract($database['default']);
示例9: dirfile_check
function dirfile_check(&$dirfile_items) {
foreach($dirfile_items as $key => $item) {
$item_path = $item['path'];
if($item['type'] == 'dir') {
if(!dir_writeable(ROOT_PATH.$item_path)) {
if(is_dir(ROOT_PATH.$item_path)) {
$dirfile_items[$key]['status'] = 0;
$dirfile_items[$key]['current'] = '+r';
//echo $item_path.' <font color="#FF0000 size="-1">可读不可写</font><br><br>';
//echo '<font color="#FF0000 size="-1">网站目录下存在可读不可写文件夹,请修改所有目录权限后再升级</font><br><br>';
echo "<script> alert('网站目录下存在只读文件夹,请将所有文件夹权限修改为可读可写后再升级');location.href='./index.php?g=System&m=System&a=main'; </script>";
die;
} else {
$dirfile_items[$key]['status'] = -1;
$dirfile_items[$key]['current'] = 'nodir';
//echo $item_path.' <font color="#FF0000 size="-1">目录无可读可写权限</font><br><br>';
//echo '<font color="#FF0000 size="-1">网站目录下存在不可读不可写文件夹,请修改所有目录权限后再升级</font><br><br>';
echo "<script> alert('网站目录下存在只读文件夹,请将所有文件夹权限修改为可读可写后再升级');location.href='./index.php?g=System&m=System&a=main'; </script>";
die;
}
} else {
//echo '<br>3';
$dirfile_items[$key]['status'] = 1;
$dirfile_items[$key]['current'] = '+r+w';
//echo $item_path.' <font size="-1">权限通过</font><br><br>';
}
} else {
//echo '<br>4';
if(file_exists(ROOT_PATH.$item_path)) {
if(is_writable(ROOT_PATH.$item_path)) {
$dirfile_items[$key]['status'] = 1;
$dirfile_items[$key]['current'] = '+r+w';
//$item_path = substr(strrchr($item_path,"/"),-100);
//$item_path = dirname($item_path, '.php');
//echo $item_path.' <font size="-1">权限通过</font><br><br>';
// echo '<br>5';
} else {
$dirfile_items[$key]['status'] = 0;
$dirfile_items[$key]['current'] = '+r';
// if (substr($item_path)
//echo $item_path.' <font color="#FF0000 size="-1">此目录下的所有文件都无可写权限,请修改此目录下的所有文件</font><br><br>';
//die;
//echo '<br>6';
//echo '<font color="#FF0000 size="-1">网站文件存在可读不可写文件,请修改所有文件为可读可写权限后再升级</font><br><br>';
echo "<script> alert('网站存在只读文件,请将所有文件修改为可读可写权限后再升级');location.href='./index.php?g=System&m=System&a=main'; </script>";
die;
}
} else {
//echo '<br>7';
if ($fp = @fopen(ROOT_PATH.$item_path,'wb+')){
$dirfile_items[$key]['status'] = 1;
$dirfile_items[$key]['current'] = '+r+w';
// echo $item_path.' <font size="-1">权限通过</font><br><br>';
}else {
$dirfile_items[$key]['status'] = -2;
$dirfile_items[$key]['current'] = 'nofile';
// echo $item_path.' <font color="#FF0000 size="-1">文件无可读可写权限</font><br><br>';
// die;
//echo '<font color="#FF0000 size="-1">网站文件存在不可读不可写文件,请修改所有文件为可读可写权限后再升级</font><br><br>';
echo "<script> alert('网站存在只读文件,请将所有文件修改为可读可写权限后再升级');location.href='./index.php?g=System&m=System&a=main'; </script>";
die;
}
}
}
}
//echo '<font color="#000000" size="-1">文件检测通过</font><br><br>';
/*echo "<script> alert('所有文件通过检测,请放心升级');location.href='./index.php?g=System&m=Update&a=index'; </script>"; */
}
示例10: evo_check
function evo_check()
{
/*
$arr[0]['name'] = milu_lang('can_visit_url');
$arr[0]['check'] = 1;
if(!function_exists('ini_get')){
$arr[0]['msg'] = milu_lang('no_open_no_run');
$arr[0]['check'] = 0;
$arr[0]['tip'] = milu_lang('no_get_value');
}else{
if(!ini_get('allow_url_fopen')){
$arr[0]['check'] = 0;
$arr[0]['msg'] = milu_lang('pick_no_run');
}
}
*/
/*
$arr[1]['name'] = milu_lang('open_crul');
$arr[1]['check'] = 1;
if(!function_exists('curl_init')){
$arr[1]['msg'] = milu_lang('open_crul_notice');
$arr[1]['check'] = 0;
}
*/
$arr[2]['name'] = milu_lang('open_tow_p');
if (function_exists('fsockopen') || function_exists('pfsockopen')) {
$arr[2]['check'] = 1;
} else {
$arr[2]['check'] = 0;
$arr[2]['msg'] = milu_lang('no_tow_notice');
}
$arr[3]['name'] = 'file_get_contents()' . milu_lang('func');
if (function_exists('file_get_contents')) {
$arr[3]['check'] = 1;
} else {
$arr[3]['check'] = 0;
if ($arr[2]['check'] == 0 && $arr[3]['check'] == 0) {
$arr[1]['msg'] = '<ul id="tipslis"><li>' . milu_lang('no_use_pick') . '</li></ul>';
}
}
$arr[4]['name'] = milu_lang('pick_dir_write');
$arr[4]['check'] = 1;
if (!dir_writeable(PICK_PATH . '/data/cache')) {
$arr[4]['check'] = 0;
$arr[4]['msg'] = '<li>' . milu_lang('dir_no_write', array('dir' => './source/plugin/milu_pick/data/cache')) . '</li>';
}
if (!dir_writeable(PICK_PATH . '/data/log')) {
$arr[4]['check'] = 0;
$arr[4]['msg'] .= '<li>' . milu_lang('dir_no_write', array('dir' => './source/plugin/milu_pick/data/log')) . '</li>';
}
if ($arr[4]['msg']) {
$arr[4]['msg'] = '<ul id="tipslis">' . $arr[4]['msg'] . '</ul>';
}
/*
$arr[6]['name'] = '插件文件完整性';
if($a == $b){
$arr[6]['check'] = 1;
}else{
$arr[6]['check'] = 0;
$arr[6]['msg'] = '<ul id="tipslis"><li>插件上传过程中,文件丢失,请重新上传文件</li></ul>';
}
*/
$arr[7]['name'] = milu_lang('open_gzinflate');
if (function_exists('gzinflate')) {
$arr[7]['check'] = 1;
} else {
$arr[7]['check'] = 0;
$arr[7]['msg'] = milu_lang('no_gzinflate_notice');
}
$arr[8]['name'] = milu_lang('open_zend');
if (($zend_re = is_zend()) > 0) {
$arr[8]['check'] = 1;
$arr[8]['msg'] = milu_lang('zend_notice');
} else {
$arr[8]['check'] = 0;
$arr[8]['msg'] = $zend_re == -1 ? milu_lang('http_visit', array('file' => 'source/plugin/milu_pick/zend/zendcheck.php')) : milu_lang('zend_enable');
}
return $arr;
}
示例11:
$msg .= "<font color=\"#FF0000\">{$lang['unwriteable_template']}</font>\t";
}
if (dir_writeable('./askdata')) {
$curr_data_writeable = $lang['writeable'];
} else {
$curr_data_writeable = $lang['unwriteable'];
$msg .= "<font color=\"#FF0000\">{$lang['unwriteable_askdata']}</font>\t";
}
if (dir_writeable('./askdata/templates')) {
$curr_template_writeable = $lang['writeable'];
} else {
$curr_template_writeable = $lang['unwriteable'];
$msg .= "<font color=\"#FF0000\">{$lang['unwriteable_askdata_template']}</font>\t";
$quit = TRUE;
}
if (dir_writeable('./askdata/cache')) {
$curr_cache_writeable = $lang['writeable'];
} else {
$curr_cache_writeable = $lang['unwriteable'];
$msg .= "<font color=\"#FF0000\">{$lang['unwriteable_askdata_cache']}</font>\t";
$quit = TRUE;
}
if (strstr($dbprefix, '.')) {
$msg .= "<font color=\"#FF0000\">{$lang['tablepre_invalid']}</font>\t";
$quit = TRUE;
}
$db->select_db($dbname);
if ($db->error()) {
if ($db->version() > '4.1') {
$db->query("CREATE DATABASE IF NOT EXISTS {$dbname} DEFAULT CHARACTER SET {$dbcharset}");
} else {
示例12: core
function core()
{
need_login('page');
@set_time_limit(0);
@ignore_user_abort(true);
$newversion = $this->getRequest('version');
$software = 'meiupic';
$version = MPIC_VERSION;
if ($newversion == $version) {
exit(lang('no_need_to_update'));
}
if (!$newversion) {
exit(lang('version_can_not_be_empty'));
}
//检查目录是否可以读写
$directory = @dir(ROOTDIR);
while ($entry = $directory->read()) {
if ($entry == '..' || $entry == '.') {
continue;
}
$filename = ROOTDIR . $entry;
if (is_dir($filename) && !dir_writeable($filename)) {
exit(lang('dir_not_writable', $filename));
} elseif (is_file($filename) && !is_writable($filename)) {
exit(lang('file_not_writable', $filename));
}
}
$directory->close();
$langset = LANGSET;
$time = time();
$hash = md5("{$newversion}{$software}{$version}{$langset}{$time}");
$q = base64_encode("newversion={$newversion}&software={$software}&version={$version}&langset={$langset}&time={$time}&hash={$hash}");
$url = CHECK_UPDATE_URL . '?act=update&q=' . $q;
$response = get_remote($url, 2);
if (!$response) {
exit(lang('connect_to_server_failed'));
}
$json =& loader::lib('json');
$result = $json->decode($response);
if ($result['return']) {
$tmpfile = ROOTDIR . 'cache/tmp/update.zip';
if (file_exists($tmpfile) && md5_file($tmpfile) == $result['md5']) {
echo lang('file_has_been_downloaded') . '<br />';
} else {
$content = get_remote($result['package']);
file_put_contents($tmpfile, $content);
$file_md5 = md5_file($tmpfile);
if ($file_md5 != $result['md5']) {
echo lang('download_package_failed') . '<br />';
exit;
}
echo lang('download_package_succ') . '<br />';
}
$zip =& loader::lib('zip');
$zip->load_file($tmpfile);
$zip->extract(PCLZIP_OPT_PATH, './', PCLZIP_OPT_REPLACE_NEWER);
echo lang('unzip_package_succ') . '<br />';
echo lang('delete_tmp_download_file') . '<br />';
@unlink($tmpfile);
echo lang('upgrade_after_jump') . '<br />';
redirect(site_link('default'), 1);
} else {
exit(lang('get_update_fail'));
}
}
示例13: array
include "../include/db_mysql.class.php";
include '../config.inc.php';
include "../include/template.class.php";
include '../include/etfunctions.func.php';
include 'install.func.php';
$options = array('template_dir' => './', 'cache_dir' => './', 'auto_update' => true, 'cache_lifetime' => 0);
$template = Template::getInstance();
$template->setOptions($options);
$s1 = dir_writeable("../include/cache");
$s2 = dir_writeable("../include/syst");
$s3 = dir_writeable("../attachments/head");
$s4 = dir_writeable("../attachments/usertemplates");
$s5 = dir_writeable("../templates/default/cache");
$s6 = dir_writeable("../admin/backup");
$s7 = dir_writeable("../admin/templates/cache");
$s8 = dir_writeable("../attachments/photo");
if (($s1 != 1 || $s2 != 1 || $s3 != 1 || $s4 != 1 || $s5 != 1 || $s6 != 1 || $s7 != 1 || $s8 != 1) && $step != 1) {
header("location: install.php?step=1");
exit;
}
if ($act == "checkinstall") {
$link = @mysql_connect($server, $db_username, $db_password, 1);
$connnect = $link && @mysql_select_db($db_name, $link) ? 'yes' : 'no';
if ($connnect == "yes" && $server && $db_username && $db_password && $db_name) {
header("location: install.php?step=3");
exit;
} else {
echo "<script>alert('数据库检测未通过,请重新修改 config.inc.php 文件!');location.href='install.php?step=2'</script>";
exit;
}
}
示例14: stepA
function stepA()
{
show_step(1, "开始安装", "环境以及文件目录权限检查");
$os = PHP_OS;
$pv = PHP_VERSION;
$up = getcon("upload_max_filesize");
$cj1 = getcon("allow_url_fopen");
echo <<<EOT
<div class="main"><h2 class="title">环境检查</h2>
<table class="tb" style="margin:20px 0 20px 55px;">
<tr>
\t<th>项目</th>
\t<th class="padleft">所需配置</th>
\t<th class="padleft">最佳配置</th>
\t<th class="padleft">当前服务器</th>
</tr>
<tr>
<td>操作系统</td>
<td class="padleft">不限制</td>
<td class="padleft">类Unix</td>
<td class="w pdleft1">{$os}</td>
</tr>
<tr>
<td>PHP 版本</td>
<td class="padleft">4.4</td>
<td class="padleft">5.0</td>
<td class="w pdleft1">{$pv}</td>
</tr>
<tr>
<td>附件上传</td>
<td class="padleft">不限制</td>
<td class="padleft">2M</td>
<td class="w pdleft1">{$up}</td>
</tr>
<tr>
<td>远程访问</td>
<td class="padleft">allow_url_fopen</td>
<td class="padleft">开启</td>
<td class="w pdleft1">{$cj1}</td>
</tr>
</table>
<h2 class="title">目录、文件权限检查</h2>
<table class="tb" style="margin:20px 0 20px 55px;width:90%;">
\t<tr>
\t<th>目录文件</th>
\t<th class="padleft">所需状态</th>
\t<th class="padleft">当前状态</th>
</tr>
EOT;
$arr = array("inc/config.php", "inc/cache.php", "inc/timmingset.xml", "inc/vodarea.txt", "inc/vodlang.txt", "upload/", "upload/vod/", "upload/topic/", "upload/cache/", "upload/export/", "upload/thirdpartlogo/", "install/index.php", "log");
foreach ($arr as $f) {
$st = "可写";
$cs = "w";
if (strpos($f, ".") > 0) {
if (!is_writable(root . $f)) {
$st = "不可写";
$cs = "nw";
}
} else {
if (!dir_writeable(root . $f)) {
$st = "不可写";
$cs = "nw";
}
}
echo '<tr><td>' . $f . '</td><td class="w pdleft1">可写</td><td class="' . $cs . ' pdleft1">' . $st . '</td></tr>';
}
unset($arr);
echo <<<EOT
</table>
<h2 class="title">函数依赖性检查</h2>
<table class="tb" style="margin:20px 0 20px 55px;width:90%;">
<tr>
\t<th>函数名称</th>
\t<th class="padleft">所需状态</th>
\t<th class="padleft">当前状态</th>
</tr>
EOT;
$arr = array("mysql_connect", "curl_init", "curl_exec", "mb_convert_encoding", "dom_import_simplexml");
foreach ($arr as $f) {
$st = "支持";
$cs = "w";
if (!function_exists($f)) {
$st = "不支持";
$cs = "nw";
}
echo '<tr><td>' . $f . '</td><td class="w pdleft1">支持</td><td class="' . $cs . ' pdleft1">' . $st . '</td></tr>';
}
unset($arr);
echo <<<EOT
</table>
</div>
<form method="get" autocomplete="off" action="index.php">
<input type="hidden" name="action" value="b" />
<div class="btnbox marginbot">
<input class="right btnnext" type="submit" value="下一步">
</div>
</form>
EOT;
}
示例15: shownav
shownav('tools', 'nav_fileperms');
showsubmenusteps('nav_fileperms', array(array('nav_fileperms_confirm', $step == 1), array('nav_fileperms_verify', $step == 2), array('nav_fileperms_completed', $step == 3)));
if ($step == 1) {
cpmsg(cplang('fileperms_check_note'), 'action=tools&operation=fileperms&step=2', 'button', '', FALSE);
} elseif ($step == 2) {
cpmsg(cplang('fileperms_check_waiting'), 'action=tools&operation=fileperms&step=3', 'loading', '', FALSE);
} elseif ($step == 3) {
showtips('fileperms_tips');
$entryarray = array('data', 'data/attachment', 'data/attachment/album', 'data/attachment/category', 'data/attachment/common', 'data/attachment/forum', 'data/attachment/group', 'data/attachment/portal', 'data/attachment/profile', 'data/attachment/swfupload', 'data/attachment/temp', 'data/cache', 'data/log', 'data/template', 'data/threadcache', 'data/diy');
$result = '';
foreach ($entryarray as $entry) {
$fullentry = DISCUZ_ROOT . './' . $entry;
if (!is_dir($fullentry) && !file_exists($fullentry)) {
continue;
} else {
if (!dir_writeable($fullentry)) {
$result .= '<li class="error">' . (is_dir($fullentry) ? $lang['dir'] : $lang['file']) . " ./{$entry} {$lang['fileperms_unwritable']}</li>";
}
}
}
$result = $result ? $result : '<li>' . $lang['fileperms_check_ok'] . '</li>';
echo '<div class="colorbox"><ul class="fileperms">' . $result . '</ul></div>';
}
}
function jsinsertunit()
{
?>
<script type="text/JavaScript">
function isUndefined(variable) {
return typeof variable == 'undefined' ? true : false;
}