当前位置: 首页>>代码示例>>PHP>>正文


PHP rcms_scandir函数代码示例

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


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

示例1: web_AvailableDBBackupsList

 function web_AvailableDBBackupsList()
 {
     $backupsPath = DATA_PATH . 'backups/sql/';
     $availbacks = rcms_scandir($backupsPath);
     $result = __('No existing DB backups here');
     if (!empty($availbacks)) {
         $cells = wf_TableCell(__('Date'));
         $cells .= wf_TableCell(__('Size'));
         $cells .= wf_TableCell(__('Filename'));
         $cells .= wf_TableCell(__('Actions'));
         $rows = wf_TableRow($cells, 'row1');
         foreach ($availbacks as $eachDump) {
             $fileDate = filectime($backupsPath . $eachDump);
             $fileDate = date("Y-m-d H:i:s", $fileDate);
             $fileSize = filesize($backupsPath . $eachDump);
             $fileSize = stg_convert_size($fileSize);
             $encodedDumpPath = base64_encode($backupsPath . $eachDump);
             $downloadLink = wf_Link('?module=backups&download=' . $encodedDumpPath, $eachDump, false, '');
             $actLinks = wf_JSAlert('?module=backups&deletedump=' . $encodedDumpPath, web_delete_icon(), __('Removing this may lead to irreparable results')) . ' ';
             $actLinks .= wf_Link('?module=backups&download=' . $encodedDumpPath, wf_img('skins/icon_download.png', __('Download')), false, '');
             $actLinks .= wf_JSAlert('?module=backups&restore=true&restoredump=' . $encodedDumpPath, wf_img('skins/icon_restoredb.png', __('Restore DB')), __('Are you serious'));
             $cells = wf_TableCell($fileDate);
             $cells .= wf_TableCell($fileSize);
             $cells .= wf_TableCell($downloadLink);
             $cells .= wf_TableCell($actLinks);
             $rows .= wf_TableRow($cells, 'row3');
         }
         $result = wf_TableBody($rows, '100%', '0', 'sortable');
     }
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例2: show_small_image

function show_small_image($id)
{
    global $system;
    $images = rcms_scandir(GALLERY_PATH);
    $gal = '';
    for ($i = 0; $i < count($images); $i++) {
        if (is_pict($images[$i])) {
            if ($id == $i) {
                $stat = getimagesize(GALLERY_PATH . $images[$id]);
                $w = $stat[0];
                $h = $stat[1];
                if ($w > 150) {
                    $x = $w / 150;
                    $h = $h / $x;
                    $w = 150;
                } elseif ($h > 150) {
                    $x = $h / 150;
                    $w = $w / $x;
                    $h = 150;
                }
                $gal .= '<a href="?module=gallery"><img src="' . GALLERY_PATH . $images[$id] . '" width="' . $w . '" height="' . $h . '" border=0></a>';
                $system->showMenuWindow('', $gal, 'center');
            }
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:reloadcms-svn,代码行数:26,代码来源:index.php

示例3: ucm_get

function ucm_get($id, $dir = MENU_MODULES_PATH)
{
    $dirs = rcms_scandir($dir, 'ucm.*');
    $workdir = $dir . 'ucm.' . $id;
    $return = array();
    if (is_dir($workdir)) {
        preg_match_all("/\\<\\?php show_window\\('(.*?)', (.*), '(.*?)'\\); \\?\\>/ims", file_get_contents($workdir . '/index.php'), $matches, PREG_SET_ORDER);
        $return = array($matches[0][1], file_get_contents($workdir . '/data.txt'), $matches[0][3]);
    }
    return $return;
}
开发者ID:BackupTheBerlios,项目名称:reloadcms-svn,代码行数:11,代码来源:ucm.php

示例4: web_EventsAdminSelector

 /**
  * Returns selector of administrator logins
  * 
  * @param string $name
  * @param string $label
  * @return string
  */
 function web_EventsAdminSelector($name, $label = '')
 {
     $all = rcms_scandir(USERS_PATH);
     $alllogins = array('' => '-');
     if (!empty($all)) {
         foreach ($all as $each) {
             $alllogins[$each] = $each;
         }
     }
     $result = wf_Selector($name, $alllogins, $label, '', false);
     return $result;
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:19,代码来源:index.php

示例5: fupload_get_list

function fupload_get_list($dir = FILES_PATH)
{
    $sd = rcms_scandir($dir);
    $i = 0;
    $return = array();
    foreach ($sd as $file) {
        $return[$i]['name'] = $file;
        $return[$i]['size'] = filesize($dir . $file);
        $return[$i]['mtime'] = filemtime($dir . $file);
        $i++;
    }
    return $return;
}
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:13,代码来源:file-uploads.php

示例6: user_skin_select

function user_skin_select($dir, $select_name, $default = '', $style = '', $script = '')
{
    $skins = rcms_scandir($dir);
    $frm = '<select name="' . $select_name . '" style="' . $style . '" ' . $script . '>';
    foreach ($skins as $skin) {
        if (is_dir($dir . $skin) && is_file($dir . $skin . '/skin_name.txt')) {
            $name = file_get_contents($dir . $skin . '/skin_name.txt');
            $frm .= '<option value="' . $skin . '"' . ($default == $skin ? ' selected="selected">' : '>') . $name . '</option>';
        }
    }
    $frm .= '</select>';
    return $frm;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:13,代码来源:templates.php

示例7: gallery_delete_comment

function gallery_delete_comment($id, $cid)
{
    $images = rcms_scandir(GALLERY_PATH);
    if ($data = @file_get_contents(GALLERY_PATH . $images[$id] . '.cm')) {
        $data = unserialize($data);
    } else {
        return false;
    }
    if (isset($data[$cid])) {
        unset($data[$cid]);
        file_write_contents(GALLERY_PATH . $images[$id] . '.cm', serialize($data));
    }
    return true;
}
开发者ID:BackupTheBerlios,项目名称:reloadcms-svn,代码行数:14,代码来源:index.php

示例8: ucm_list

function ucm_list()
{
    $files = rcms_scandir(DF_PATH, '*.ucm');
    $return = array();
    foreach ($files as $filename) {
        $file = file(DF_PATH . $filename);
        $title = preg_replace("/[\n\r]+/", '', $file[0]);
        $align = preg_replace("/[\n\r]+/", '', $file[1]);
        unset($file[0]);
        unset($file[1]);
        $return[substr($filename, 0, -4)] = array($title, implode('', $file), $align);
        $file = '';
    }
    return $return;
}
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:15,代码来源:ucm.php

示例9: dhcp_show_templates

 function dhcp_show_templates()
 {
     $allTemplates = rcms_scandir(CONFIG_PATH . 'dhcp/');
     $result = '';
     if (!empty($allTemplates)) {
         foreach ($allTemplates as $each) {
             $templateData = file_get_contents(CONFIG_PATH . 'dhcp/' . $each);
             $templateData = nl2br($templateData);
             $result .= wf_modal($each, $each, $templateData, 'ubButton', 800, 600);
         }
     } else {
         $result = __('Nothing found');
     }
     show_window(__('Global templates'), $result);
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:15,代码来源:index.php

示例10: getQueueData

 /**
  * Returns array containing all SMS queue data as index=>data
  * 
  * @return array
  */
 public function getQueueData()
 {
     $result = array();
     $smsQueue = rcms_scandir(self::QUEUE_PATH);
     if (!empty($smsQueue)) {
         foreach ($smsQueue as $io => $eachsmsfile) {
             $smsDate = date("Y-m-d H:i:s", filectime(self::QUEUE_PATH . $eachsmsfile));
             $smsData = rcms_parse_ini_file(self::QUEUE_PATH . $eachsmsfile);
             $result[$io]['filename'] = $eachsmsfile;
             $result[$io]['date'] = $smsDate;
             $result[$io]['number'] = $smsData['NUMBER'];
             $result[$io]['message'] = $smsData['MESSAGE'];
         }
     }
     return $result;
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:21,代码来源:api.usms.php

示例11: show_smiles

function show_smiles($data)
{
    $form = '';
    if (!smiles_disabled()) {
        $smile = parse_ini_file(CONFIG_PATH . 'smiles.ini');
        $res = rcms_scandir(SMILES_PATH);
        sort($res);
        foreach ($res as $key) {
            if (isset($smile[$key])) {
                $form .= '<img src="' . SMILES_PATH . $key . '" value="' . basename($key, ".gif") . '" alt = "' . basename($key, ".gif") . '" onclick="document.forms[\'' . $data[0] . '\'].elements[\'' . $data[1] . '\'].value += \'[' . basename($key, ".gif") . ']\'">' . "\n";
            }
        }
        if ($form !== '') {
            $form = '<hr>' . $form . '<hr>';
        }
    }
    echo $form;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:18,代码来源:smiles.php

示例12: getQueueData

 /**
  * Returns array containing all emails queue data as index=>data
  * 
  * @return array
  */
 public function getQueueData()
 {
     $result = array();
     $messagesQueue = rcms_scandir(self::QUEUE_PATH);
     if (!empty($messagesQueue)) {
         foreach ($messagesQueue as $io => $eachmessage) {
             $messageDate = date("Y-m-d H:i:s", filectime(self::QUEUE_PATH . $eachmessage));
             $messageData = file_get_contents(self::QUEUE_PATH . $eachmessage);
             $messageData = json_decode($messageData, true);
             $result[$io]['filename'] = $eachmessage;
             $result[$io]['date'] = $messageDate;
             $result[$io]['email'] = $messageData['email'];
             $result[$io]['subj'] = $messageData['subj'];
             $result[$io]['message'] = $messageData['message'];
         }
     }
     return $result;
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:23,代码来源:api.email.php

示例13: web_list_admins

 /**
  * Returns available administrators list
  * 
  * @return string
  */
 function web_list_admins()
 {
     $alladmins = rcms_scandir(USERS_PATH);
     $cells = wf_TableCell(__('Admin'));
     $cells .= wf_TableCell(__('Actions'));
     $rows = wf_TableRow($cells, 'row1');
     if (!empty($alladmins)) {
         foreach ($alladmins as $eachadmin) {
             $actions = wf_JSAlert('?module=permissions&delete=' . $eachadmin, web_delete_icon(), 'Removing this may lead to irreparable results');
             $actions .= wf_Link('?module=permissions&passwd=' . $eachadmin, web_key_icon());
             $actions .= wf_Link('?module=permissions&edit=' . $eachadmin, web_edit_icon('Rights'));
             $cells = wf_TableCell($eachadmin);
             $cells .= wf_TableCell($actions);
             $rows .= wf_TableRow($cells, 'row3');
         }
     }
     $form = wf_TableBody($rows, '100%', '0', 'sortable');
     return $form;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:24,代码来源:index.php

示例14: checkrights

function checkrights($el, $rec = false)
{
    $perms = show_perms($el);
    if (is_readable($el) && is_writeable($el)) {
        $color = 'green';
    } else {
        $color = 'red';
    }
    echo '
<tr>
    <td width="100%" class="row1" style="color: ' . $color . '">' . $el . '</td>
    <td class="row2" nowrap>' . show_perms($el) . '</td>
</tr>';
    if (is_dir($el) && $rec) {
        $dir = rcms_scandir($el);
        foreach ($dir as $del) {
            checkrights($el . '/' . $del, true);
        }
    }
}
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:20,代码来源:rights_test.php

示例15: rcms_parse_menu

function rcms_parse_menu($format)
{
    global $lang;
    $modules_dir = rcms_scandir(MODULES_PATH);
    $enabled = parse_ini_file(CONFIG_PATH . 'modules.ini');
    $additional = parse_ini_file(CONFIG_PATH . 'navigation.ini', true);
    $result = '';
    $MODULES = array();
    foreach ($enabled as $module) {
        if (file_exists(MODULES_PATH . $module . '/module.php')) {
            include MODULES_PATH . $module . '/module.php';
        }
    }
    foreach ($MODULES as $module) {
        $result .= str_replace('{link}', '?module=' . $module['id'], str_replace('{title}', $module['name'], $format));
    }
    foreach ($additional as $link) {
        $result .= str_replace('{link}', @$link['url'], str_replace('{title}', @$link['name'], $format));
    }
    return $result;
}
开发者ID:BackupTheBerlios,项目名称:reloadcms-svn,代码行数:21,代码来源:templates.php


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