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


PHP browse函数代码示例

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


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

示例1: browse

function browse($dir)
{
    global $filenames;
    if ($handle = opendir($dir)) {
        while (false !== ($file = readdir($handle))) {
            if ($file != "." && $file != ".." && is_file($dir . '/' . $file)) {
                $filenames[] = $dir . '/' . $file;
            } else {
                if ($file != "." && $file != ".." && is_dir($dir . '/' . $file)) {
                    browse($dir . '/' . $file);
                }
            }
        }
        closedir($handle);
    }
    return $filenames;
}
开发者ID:joel-medeiros,项目名称:setcabc,代码行数:17,代码来源:exportar_view.php

示例2: browse

function browse($path = null)
{
    $xoops_root_path = \XoopsBaseConfig::get('root-path');
    $root = $xoops_root_path . DIRECTORY_SEPARATOR . $path;
    $files = scandir($root);
    foreach ($files as $file) {
        if ($file == '.' or $file == '..') {
            continue;
        }
        if (is_dir($root . DIRECTORY_SEPARATOR . $file)) {
            $path1 = $path . DIRECTORY_SEPARATOR . $file;
            $excludes = array('xoops_lib' . DIRECTORY_SEPARATOR . 'vendor', 'xoops_lib' . DIRECTORY_SEPARATOR . 'smarty', 'xoops_lib' . DIRECTORY_SEPARATOR . 'Xmf', 'xoops_lib' . DIRECTORY_SEPARATOR . 'HTMLPurifier', 'class' . DIRECTORY_SEPARATOR . 'mail' . DIRECTORY_SEPARATOR . 'phpmailer', 'class' . DIRECTORY_SEPARATOR . 'xoopseditor' . DIRECTORY_SEPARATOR . 'tinymce', 'class' . DIRECTORY_SEPARATOR . 'xoopseditor' . DIRECTORY_SEPARATOR . 'tinymce4');
            if (in_array($path1, $excludes)) {
                continue;
            }
            browse($path1);
        } else {
            $index = strrpos($file, '.php');
            if ($index !== false) {
                verify($file, $path);
            }
        }
    }
}
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:24,代码来源:verifyTestFiles.php

示例3: browse

function browse($json_array)
{
    global $useGsonPrimitives;
    global $depth;
    global $stack;
    global $map;
    $contentType = contentType::NORMAL;
    foreach ($json_array as $key => $val) {
        if (is_numeric($key)) {
            //===>is an item of an array ( within [...])
            if (is_array($val)) {
                //item in array is an {}object
                browse($val);
            } else {
                //item in array is a primitive
                if ($useGsonPrimitives && getTypeName($val) == "int") {
                    $contentType = contentType::PRIMITIVE_INT;
                    $map->add("RealmInt", 'val', "int", null, null);
                } elseif ($useGsonPrimitives && getTypeName($val) == "String") {
                    $contentType = contentType::PRIMITIVE_STRING;
                    $map->add("RealmString", 'val', "String", null, null);
                } else {
                    $map->add(end($stack), 'value', getTypeName($val), null, null);
                }
            }
        } else {
            if (is_array($val)) {
                //===>is a new object ({} or [])
                $depth++;
                array_push($stack, $key);
                $innerType = browse($val);
                array_pop($stack);
                $depth--;
                if ($useGsonPrimitives && $innerType == contentType::PRIMITIVE_INT) {
                    $map->add(end($stack), lcfirst($key), getTypeName($val, "RealmInt"), $key, "RealmInt");
                } else {
                    if ($useGsonPrimitives && $innerType == contentType::PRIMITIVE_STRING) {
                        $map->add(end($stack), lcfirst($key), getTypeName($val, "RealmString"), $key, "RealmString");
                    } else {
                        $map->add(end($stack), lcfirst($key), getTypeName($val, ucfirst($key)), $key, ucfirst($key));
                    }
                }
            } else {
                if (getTypeName($val) != NULL) {
                    $map->add(end($stack), lcfirst($key), getTypeName($val), $key, null);
                }
            }
        }
    }
    return $contentType;
}
开发者ID:tomasz-m,项目名称:realmGenerator,代码行数:51,代码来源:processor.php

示例4: copySubtree

    // actually do copying after a user has selected object versions to copy
    $newParentNodeID = $http->postVariable('SelectedNodeID');
    copySubtree($NodeID, $newParentNodeID, $notifications, $allVersions, $keepCreator, $keepTime);
    if ($showNotification) {
        showNotificationAfterCopying($http, $Module, $Result, $notifications, $srcNode);
        return;
    }
    return $Module->redirectToView('view', array('full', $newParentNodeID));
} else {
    if ($Module->isCurrentAction('CopySubtree')) {
        // we get here after a user selects target node to place the source object under
        if ($chooseVersions or $chooseCreator or $chooseTime) {
            // redirect to the page with choice of versions to copy
            chooseOptionsToCopy($Module, $Result, $srcNode, $chooseVersions, $chooseCreator, $chooseTime);
        } else {
            // actually do copying of the pre-configured object version(s)
            $selectedNodeIDArray = eZContentBrowse::result($Module->currentAction());
            $newParentNodeID = $selectedNodeIDArray[0];
            copySubtree($NodeID, $newParentNodeID, $notifications, $allVersions, $keepCreator, $keepTime);
            if ($showNotification) {
                showNotificationAfterCopying($http, $Module, $Result, $notifications, $srcNode);
                return;
            }
            return $Module->redirectToView('view', array('full', $newParentNodeID));
        }
    } else {
        //Browse for target node.
        //We get here when a user clicks "copy" button when viewing some node.
        browse($Module, $srcNode);
    }
}
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:31,代码来源:copysubtree.php

示例5: sendAnswereIt

function sendAnswereIt($iter)
{
    global $server;
    if (!file_exists("./answers/" . date('d-F') . ".json")) {
        return FALSE;
    }
    $html = browse("{$server}/AnswereIt.php");
    if (strstr($html, "AICompletion.php")) {
        return FALSE;
    }
    $reshtml = str_get_html($html);
    if ($reshtml && is_object($reshtml) && isset($reshtml->nodes)) {
        $p = $reshtml->find('p[class="qutinsubfont"]');
        $div = $reshtml->find('div[class="graphimg"]');
        $grp = $div[0]->first_child()->src;
        $img = $p[0]->first_child()->src;
    }
    $a = time();
    file_put_contents("tmp/{$a}.jpg", browse($img));
    file_put_contents("grp/{$a}.png", browse($grp));
    // graphic processing
    $str1 = processGraphic("grp/{$a}.png");
    // distance processing
    $str2 = processDistance("tmp/{$a}.jpg");
    // proceessing ends
    $str3 = $str1 + $str2;
    $ans = array();
    $ans = json_decode(file_get_contents("./answers/" . date('d-F') . ".json"), true);
    $hayKeys = array_keys($ans);
    $str = findClosest($str3, $hayKeys);
    if (isset($ans["{$str}"])) {
        $answer = $ans["{$str}"];
        $reshtml = str_get_html($html);
        $fieldList = array();
        if ($reshtml && is_object($reshtml) && isset($reshtml->nodes)) {
            $input = $reshtml->find('input');
            $loop = count($input);
            for ($i = 0; $i < $loop; $i++) {
                if (isset($input[$i]->attr["name"])) {
                    $fieldList[$input[$i]->attr["name"]] = $input[$i]->attr["value"];
                    if ($input[$i]->attr["value"] == "Type your answer here") {
                        if (isset($input[$i]->attr["style"])) {
                            if ($input[$i]->attr["style"] == 'border:0 none;') {
                                $fieldList[$input[$i]->attr["name"]] = $answer;
                            }
                        }
                    }
                }
            }
            $fieldList["x"] = rand(10, 50);
            $fieldList["y"] = rand(1, 15);
            $html = browse("{$server}/AnswereIt.php", 1, $fieldList);
            if (strstr($html, "AnswereItGraph.php")) {
                echo "\nANSWEREIT.{$iter} answered {$str} with answer : {$answer}";
                return TRUE;
            }
        }
    } else {
        echo "\nAnswer for this str not found : {$str}  original str : {$str3}";
        error_count();
        return TRUE;
    }
}
开发者ID:vijayant123,项目名称:cURLfun,代码行数:63,代码来源:functions.php

示例6: browse

 function browse($offset = 0, $limit = 10, $order_column = 'item_number', $order_type = 'asc')
 {
     $caption = "DAFTAR GUDANG";
     $data['_content'] = browse($this->sql, $caption, 'gudang', $offset, $limit, 'kode', 500, 300);
     $url = '';
     $this->session->set_userdata('_right_menu', $url);
     $this->template->display_browse2($data);
 }
开发者ID:AlvaCorp,项目名称:maxon,代码行数:8,代码来源:gudang.php

示例7: copyObject

$chooseVersions = $versionHandling == 'user-defined';
if ($chooseVersions) {
    $allVersions = $Module->actionParameter('VersionChoice') == 1 ? true : false;
} else {
    $allVersions = $versionHandling == 'last-published' ? false : true;
}
if ($Module->isCurrentAction('Copy')) {
    // actually do copying after a user has selected object versions to copy
    $newParentNodeID = $http->postVariable('SelectedNodeID');
    return copyObject($Module, $object, $allVersions, $newParentNodeID);
} else {
    if ($Module->isCurrentAction('CopyNode')) {
        // we get here after a user selects target node to place the source object under
        if ($chooseVersions) {
            // redirect to the page with choice of versions to copy
            $Result = array();
            chooseObjectVersionsToCopy($Module, $Result, $object);
        } else {
            // actually do copying of the pre-configured object version(s)
            $selectedNodeIDArray = eZContentBrowse::result($Module->currentAction());
            $newParentNodeID = $selectedNodeIDArray[0];
            return copyObject($Module, $object, $allVersions, $newParentNodeID);
        }
    } else {
        /*
        Browse for target node.
        We get here when a user clicks "copy" button when viewing some node.
        */
        browse($Module, $object);
    }
}
开发者ID:runelangseid,项目名称:ezpublish,代码行数:31,代码来源:copy.php

示例8: browse

 function browse($offset = 0, $limit = 50, $order_column = 'purchase_order_number', $order_type = 'asc')
 {
     //var_dump($_GET);
     $header = array('Nomor', 'Tanggal', 'Jumlah', 'Supplier', 'Supplier Name', 'Kota', 'Toko');
     $caption = "DAFTAR FAKTUR PEMBELIAN";
     $data['_content'] = browse("select purchase_order_number, \n\t\t\tpo_date, amount, \n\t\t\ti.supplier_number,c.supplier_name,c.city,i.warehouse_code\n\t\t\tfrom purchase_order i\n\t\t\tleft join suppliers c on c.supplier_number=i.supplier_number\n\t\t\twhere potype='i' and warehouse_code='" . $this->access->cid . "'\n\t\t\t", $caption, 'beli', $offset, $limit, $order_column, $order_type, $header);
     $this->template->display_browse('template_browse', $data);
 }
开发者ID:AlvaCorp,项目名称:maxon,代码行数:8,代码来源:beli.php

示例9: exit

            exit("AnswereIt completed!");
        }
        $reshtml = str_get_html($html);
        if ($reshtml && is_object($reshtml) && isset($reshtml->nodes)) {
            $p = $reshtml->find('p[class="qutinsubfont"]');
            $div = $reshtml->find('div[class="graphimg"]');
            $grp = $div[0]->first_child()->src;
            $img = $p[0]->first_child()->src;
        }
        $a = time();
        file_put_contents("tmp/{$a}.jpg", browse($img));
        file_put_contents("grp/{$a}.png", browse($grp));
        file_put_contents("tmp/{$a}.1.jpg", browse("{$server}/unsanswerit.php?iaodifu=1"));
        file_put_contents("tmp/{$a}.2.jpg", browse("{$server}/unsanswerit.php?iaodifu=2"));
        file_put_contents("tmp/{$a}.3.jpg", browse("{$server}/unsanswerit.php?iaodifu=3"));
        file_put_contents("tmp/{$a}.4.jpg", browse("{$server}/unsanswerit.php?iaodifu=4"));
        // graphic processing
        $str1 = processGraphic("grp/{$a}.png");
        // distance processing
        $str2 = processDistance("tmp/{$a}.jpg");
        // proceessing ends
        echo $str = $str1 + $str2;
    }
}
?>

<html>
	<head>
		<title>DESI BOYZ ADVANCE INSERTiON SYSTEM {FREAKARGE 4.0b}</title>
		<script type="text/javascript" src="./includes/keypress/keypress.js"></script>
		<script type="text/javascript">
开发者ID:vijayant123,项目名称:cURLfun,代码行数:31,代码来源:answerit.php

示例10: listNotes

function listNotes($dir)
{
    $array = browse($dir, array("simplenotesync.db"));
    $content = "<p>Notes</p>";
    if (count($array) > 0) {
        $content .= "<ul>";
        foreach ($array as $file) {
            $content .= '<li>' . substr($file, 0, -4) . '</li>';
        }
        $content .= "</ul>";
    } else {
        $content = '<p class="notif" >No notes</p>';
    }
    return $content;
}
开发者ID:nchourrout,项目名称:QuickNote,代码行数:15,代码来源:index.php

示例11: strip_tags

            $errors[] = "IP address is not valid!";
        }
    }
}
$filter['port'] = 0;
if (isset($_GET['port']) && !empty($_GET['port'])) {
    $port = strip_tags(trim($_GET['port']));
    if (preg_match("/^\\d+\$/", $filter['port'])) {
        if ((int) $_GET['port'] > 0 && (int) $_GET['port'] <= 65535) {
            $filter['port'] = (int) $_GET['port'];
        } else {
            $errors[] = 'Port number (' . (int) $filter['port'] . ') is not valid!';
        }
    } else {
        $filter['port'] = 0;
        $errors[] = 'Port number must be an integer from 1 to 65535';
    }
}
$filter['protocol'] = isset($_GET['protocol']) && !empty($_GET['protocol']) ? DB::escape($_GET['protocol']) : '';
$filter['state'] = isset($_GET['state']) && !empty($_GET['state']) ? DB::escape($_GET['state']) : '';
$filter['service'] = isset($_GET['service']) && !empty($_GET['service']) ? DB::escape($_GET['service']) : '';
$filter['banner'] = isset($_GET['banner']) && !empty($_GET['banner']) ? DB::escape($_GET['banner']) : '';
$filter['exact-match'] = isset($_GET['exact-match']) && (int) $_GET['exact-match'] === 1 ? 1 : 0;
$filter['text'] = isset($_GET['text']) && !empty($_GET['text']) ? DB::escape($_GET['text']) : '';
$filter['page'] = isset($_GET['page']) && (int) $_GET['page'] > 1 ? DB::escape($_GET['page']) : 1;
$filter['rec_per_page'] = isset($_GET['rec_per_page']) && in_array((int) $_GET['rec_per_page'], array(10, 20, 40, 50, 100)) ? (int) $_GET['rec_per_page'] : 10;
if (defined('EXPORT')) {
    $results = browse($filter, true);
} else {
    $results = browse($filter);
}
开发者ID:zhuyue1314,项目名称:masscan-web-ui,代码行数:31,代码来源:data_validation.php

示例12: time

            $div1 = $reshtml->find('div[class="kbcqutionimg"]');
            $div = $reshtml->find('div[class="kbcqutionimage"]');
            //	$ans = $reshtml -> find('img[width="200"]');
            $img = $div1[0]->first_child()->src;
            $grp = $div[0]->children(1)->src;
            //	$ans1 = $ans[0] -> src;
            //print_r($ans); exit();
        }
        $a = time();
        file_put_contents("ukbc/tmp/{$a}.jpg", browse($img));
        file_put_contents("ukbc/grp/{$a}.png", browse($grp));
        //	file_put_contents("ukbc/temp/$a.png", browse($ans1));
        file_put_contents("ukbc/tmp/{$a}.1.jpg", browse("{$server}/JWaXCZNAHZ.php?iaodifufewc=1"));
        file_put_contents("ukbc/tmp/{$a}.2.jpg", browse("{$server}/JWaXCZNAHZ.php?iaodifufewc=2"));
        file_put_contents("ukbc/tmp/{$a}.3.jpg", browse("{$server}/JWaXCZNAHZ.php?iaodifufewc=3"));
        file_put_contents("ukbc/tmp/{$a}.4.jpg", browse("{$server}/JWaXCZNAHZ.php?iaodifufewc=4"));
        // graphic processing
        $str1 = processGraphic("ukbc/grp/{$a}.png");
        // distance processing
        $str2 = processDistance("ukbc/tmp/{$a}.jpg");
        // proceessing ends
        echo $str = $str1 + $str2;
    }
}
?>

<html>
	<head>
		<title>DESI BOYZ ADVANCE INSERTiON SYSTEM {FREAKARGE 4.0b}</title>
		<script type="text/javascript" src="./includes/keypress/keypress.js"></script>
		<script type="text/javascript">
开发者ID:vijayant123,项目名称:cURLfun,代码行数:31,代码来源:ukbc.php

示例13: playlist

 case "playlist":
     return playlist();
     break;
 case "saveplaylist":
     return savePlaylist();
     break;
 case "deleteplaylist":
     return deletePlaylist();
     break;
 case "curtrack":
     return getCurrentTrack();
     break;
 case "search":
     return search();
 case "browse":
     return browse();
     break;
 case "home":
     return home();
     break;
 case "chart":
     return chart();
     break;
 case "userhistories":
     return userHistories();
     break;
 case "jukebox":
     return jukebox();
     break;
 case "adduser":
     return adduser();
开发者ID:jinzora,项目名称:jinzora3,代码行数:31,代码来源:api.php

示例14: list_pcap_files

function list_pcap_files($dir)
{
    $ret = '';
    $dir = rtrim(realpath($dir), '/') . '/';
    $ret .= "PCAPs found - " . $dir . "<br/>\n";
    $tmp = browse($dir, '.pcap');
    $ret .= '<a href="index.php">Browse</a><br/>';
    foreach ($tmp as $f) {
        $ret .= '<a href="index.php?file=' . $f->name . '">' . $f->name . '</a> - ' . conv_bytes($f->size);
        if (been_parsed($dir . $f->name)) {
            $ret .= ' (Done/<a href="index.php?file=' . $f->name . '&force=1">Refresh</a>)';
        }
        $ret .= "<br/>";
    }
    $ret .= "<br/>";
    return $ret;
}
开发者ID:jloronoz,项目名称:php-pcap-analyzer,代码行数:17,代码来源:index.php

示例15: Header

<?php

include_once '../config/symbini.php';
include_once $serverRoot . '/classes/AgentManager.php';
Header("Content-Type: text/html; charset=" . $charset);
$lang = array_key_exists("lang", $_REQUEST) ? $_REQUEST["lang"] : $defaultLang;
$spDisplay = "Agent Search";
$name = array_key_exists("name", $_REQUEST) ? $_REQUEST["name"] : "";
pageheader($name);
if (strlen($name) > 0) {
    echo searchform($name);
    echo search($name);
} else {
    echo searchform();
    echo browse();
}
footer();
function search($term)
{
    $am = new AgentManager();
    $result = "<div id='loadedWithPage'><table id='innertable'>\n";
    $result .= $am->agentNameSearch($term);
    $result .= "</table></div>\n";
    return $result;
}
function browse()
{
    $am = new AgentManager();
    $result = "<div id='loadedWithPage'>\n";
    $result .= "<h3>Collector and other agent records</h3>";
    $result .= $am->getNameStats();
开发者ID:Symbiota,项目名称:Symbiota,代码行数:31,代码来源:index.php


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