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

PHP beginsWith函数代码示例

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

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



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

示例1: get

 function get()
 {
     global $g_mv_tests, $g_log_id;
     if (isset($_SESSION["_mv_" . $this->test])) {
         return $_SESSION["_mv_" . $this->test]["var"];
     }
     if (beginsWith($this->test, "man")) {
         return 0;
     }
     $r = array_filter($g_mv_tests, function ($c) {
         return $c["test"] == $this->test && $c["goal"] == $this->goal;
     });
     // reindex array
     $r = array_values($r);
     if (count($r) == 0) {
         internal_error("No variants found for test: " . $this->test . " ,goal: " . $this->goal);
     }
     if ($r[0]["completed"] != null) {
         $res = $r[0];
     } else {
         // assign the user randomly
         shuffle($r);
         $res = $r[0];
     }
     $_SESSION["_mv_" . $this->test] = ["var" => $res["variation"], "start_log_id" => $g_log_id];
     return $res["variation"];
 }
开发者ID:sdrinf,项目名称:cog,代码行数:27,代码来源:cog_variants.php


示例2: getContent

 private function getContent($url)
 {
     if (beginsWith(URL\takeDomain($url), 'blockchain.info') && beginsWith(URL\takePath($url), '/q/addressbalance/')) {
         return $this->addressBalanceRequest(withoutPrefix(URL\takePath($url), '/q/addressbalance/'));
     } else {
         if ($url == 'http://blockchain.info/q/addressbalance/peanuts') {
             return 'Checksum does not validate';
         } else {
             if (beginsWith($url, 'http://blockchain.info/tobtc?currency=USD')) {
                 return '0.00778083';
             } else {
                 if ($url == 'http://api.easyjquery.com/ips/?ip=99.99.99.99') {
                     return '{"Country": "US"}';
                 } else {
                     if ($url == 'https://freegeoip.net/json/99.99.99.99') {
                         return '{"ip":"99.99.99.99","country_code":"US","country_name":"United States",' . '"region_code":"","region_name":"","city":"","zipcode":"","latitude":38,' . '"longitude":-97,"metro_code":"","areacode":""}';
                     } else {
                         if ($url == 'https://freegeoip.net/json/175.156.249.231') {
                             return "404 page not found";
                         } else {
                             throw new Exception("Mock 'get' function couldn't handle following URL: {$url}");
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:JustAHappyKid,项目名称:bitcoin-chipin,代码行数:28,代码来源:http-client.php


示例3: add_js

 public function add_js($file, $module_name)
 {
     if (beginsWith($file, 'http://') || beginsWith($file, 'https://') || beginsWith($file, '//')) {
         $this->js[] = $file;
     } else {
         $this->js[] = get_url('/' . PATH_TO_MODULES . '/' . $module_name . '/' . $file);
     }
 }
开发者ID:nodefortytwo,项目名称:engagement,代码行数:8,代码来源:template.class.php


示例4: map

 function map($url)
 {
     foreach ($this->urlmaps as $k => $v) {
         // add regex prefix, and suffix
         if (!beginsWith($k, "^")) {
             $k = "^" . $k;
         }
         if (!endsWith($k, "\$")) {
             $k = $k . "\$";
         }
         if (ereg($k, $url, $this->regparams)) {
             return $v;
         }
     }
     return null;
 }
开发者ID:sdrinf,项目名称:cog,代码行数:16,代码来源:cog_webhandler.php


示例5: load

 public function load($db_row = array())
 {
     if (!empty($db_row)) {
         $this->id = $db_row['id'];
         return $this->load_from_id($db_row);
     }
     if (is_int((int) $this->id) && (int) $this->id > 0) {
         $this->id = (int) $this->id;
         return $this->load_from_id();
     } else {
         if (beginsWith($this->id, 'http')) {
             return $this->load_from_url();
         } else {
             return $this->load_from_name();
         }
     }
 }
开发者ID:nodefortytwo,项目名称:engagement,代码行数:17,代码来源:engagement.page.class.php


示例6: testSignupProcess

 function testSignupProcess()
 {
     $this->createHomepageWidgets();
     $this->get('/');
     $this->clickLink("//a[contains(@href, 'signup')]");
     $this->get('/account/signup');
     $this->followRedirects(true);
     $this->submitForm($this->getForm(), array('username' => 'sammy', 'email' => '[email protected]', 'password1' => 'luckystars', 'password2' => 'luckystars', 'memorydealers-updates' => 'on'));
     $u = User::loadFromUsername('sammy');
     assertEqual('[email protected]', $u->email);
     $subscriptions = current(DB\simpleSelect('subscriptions', 'user_id = ?', array($u->id)));
     assertFalse(empty($subscriptions), 'Expected to find record in subscriptions table for user');
     assertTrue($subscriptions['chipin'] == false || $subscriptions['chipin'] == 0);
     assertTrue($subscriptions['memorydealers'] == true || $subscriptions['memorydealers'] == 1);
     $this->logout();
     $this->login('sammy', 'luckystars');
     $this->get('/dashboard/');
     assertTrue(beginsWith($this->getCurrentPath(), '/dashboard'));
 }
开发者ID:JustAHappyKid,项目名称:bitcoin-chipin,代码行数:19,代码来源:signup.php


示例7: getBalanceInSatoshis

function getBalanceInSatoshis($address)
{
    $client = new HttpClient();
    $response = $client->get(balanceLookupURL($address));
    if ($response->statusCode == 200 && isInteger($response->content)) {
        return intval($response->content);
    } else {
        $e = strtolower($response->content);
        preg_match('@<title>(.*)</title>@', $response->content, $matches);
        $title = at($matches, 1);
        if ($e == 'checksum does not validate' || beginsWith($e, 'illegal character') || in_array($e, array('input to short', 'input too short'))) {
            throw new InvalidAddress("{$address} appears to be an invalid Bitcoin address");
        } else {
            if (contains($e, 'cloudflare') && !empty($title)) {
                throw new NetworkError("CloudFlare-reported problem at blockchain.info: " . withoutPrefix($title, "blockchain.info | "));
            } else {
                if (contains(strtolower($title), 'under maintenance')) {
                    throw new NetworkError("Blockchain.info appears to be under maintenance");
                } else {
                    if (contains($e, "maximum concurrent requests reached")) {
                        throw new NetworkError("Maximum concurrent requests to Blockchain.info reached");
                    } else {
                        if (!empty($title)) {
                            throw new NetworkError("Unknown error when attempting to check address-balance " . "for ({$address}) via blockchain.info: {$title}");
                        } else {
                            if (trim($e) == '') {
                                throw new NetworkError("Blockchain.info returned empty/content-less response");
                            } else {
                                if ($e == 'lock wait timeout exceeded; try restarting transaction') {
                                    throw new NetworkError("Blockchain.info responded with error message about lock timeout");
                                } else {
                                    throw new \Exception("Unexpected result received from blockchain.info when " . "attempting to get balance of address {$address}: {$response->content}");
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
开发者ID:JustAHappyKid,项目名称:bitcoin-chipin,代码行数:41,代码来源:blockchain-dot-info.php


示例8: file

################### doxygen errors in .doxygen-files  ##########################
if ($user == "all" && in_array("doxygen_errors", $tests)) {
    $file = file("{$bin_path}/doc/doxygen/doxygen-error.log");
    foreach ($file as $line) {
        $line = trim($line);
        if (ereg("(.*/[a-zA-Z0-9_]+\\.doxygen):[0-9]+:", $line, $parts)) {
            realOutput("Doxygen errors in '" . $parts[1] . "'", $user, "");
            print "  See 'OpenMS/doc/doxygen/doxygen-error.log'\n";
        }
    }
}
########################### warnings TOPP test  #################################
if (in_array("topp_output", $tests)) {
    $file_warnings = array();
    foreach ($test_log as $name => $warnings) {
        if (beginsWith($name, "TOPP_")) {
            $name = substr($name, 5);
            $name = substr($name, 0, strpos($name, '_'));
            $topp_file = "src/topp/" . $name . ".cpp";
            if (in_array($topp_file, $files_todo)) {
                if (!isset($file_warnings[$topp_file])) {
                    $file_warnings[$topp_file] = array();
                }
                $file_warnings[$topp_file] = array_merge($file_warnings[$topp_file], $warnings);
            }
        }
    }
    //print errors/warnings bundled for each TOPP tool
    foreach ($file_warnings as $file => $warnings) {
        realOutput("Error/warnings in TOPP tool test of '{$file}'", $user, $file);
        $warnings = array_unique($warnings);
开发者ID:gitter-badger,项目名称:OpenMS,代码行数:31,代码来源:checker.php


示例9: count

             $tagfound[$tags[$j]] = 1;
         }
         // server side index
         if (array_key_exists($tags[$j], $idx)) {
             $idx[$tags[$j]][] = count($geo);
         } else {
             $idx[$tags[$j]] = array(count($geo));
         }
     }
 }
 // filter the tags hstore
 if ($row[1] !== null) {
     $hstore = json_decode('{' . str_replace('"=>"', '":"', $row[1]) . '}', true);
     foreach ($hstore as $j => $val) {
         //if( beginsWith($j,'name:') ||  beginsWith($j,'tiger:')  ||  beginsWith($j,'nist:') ) continue;
         if (beginsWith($j, 'tiger:') || beginsWith($j, 'nist:')) {
             continue;
         }
         $type[$j] = $val;
         if (array_key_exists($j, $tagfound)) {
             $tagfound[$j]++;
         } else {
             $tagfound[$j] = 1;
         }
         // server side index
         if (array_key_exists($j, $idx)) {
             $idx[$j][] = count($geo);
         } else {
             $idx[$j] = array(count($geo));
         }
     }
开发者ID:nicolas-raoul,项目名称:wikiminiatlas,代码行数:31,代码来源:jsontile_dev.php


示例10: getPathInfo

 /**
  * Get the path info, which is everything that follows the application
  * node in the URL. (without query info).
  * The returned pathinfo will not start or end with '/'.
  *
  * @return String
  */
 public static function getPathInfo()
 {
     $appRoot = self::getAppRoot();
     // Get the URL path (everything until the '?')
     $path = MapUtil::get($_SERVER, 'CONTEXT_PREFIX');
     // CONTEXT_PREFIX is aparently new to apache 2.3.13
     // If undefined, fall back to previous method. This one, though, is known
     // to have a problem when the URL is root. ('/').
     if ($path === null || $path === "") {
         $path = isset($_SERVER['SCRIPT_URL']) ? $_SERVER['SCRIPT_URL'] : $_SERVER['PHP_SELF'];
     }
     $pathInfo = substr($path, strlen($appRoot));
     if (beginsWith($pathInfo, '/')) {
         $pathInfo = substr($pathInfo, 1);
     }
     if (endsWith($pathInfo, '/')) {
         $pathInfo = substr($pathInfo, 0, -1);
     }
     return $pathInfo;
 }
开发者ID:fruition-sciences,项目名称:phpfw,代码行数:27,代码来源:Application.php


示例11: CalculateObjectDescriptionForAssociation

 protected function CalculateObjectDescriptionForAssociation($strAssociationTableName, $strTableName, $strReferencedTableName, $blnPluralize)
 {
     // Strip Prefixes (if applicable)
     $strTableName = $this->StripPrefixFromTable($strTableName);
     $strAssociationTableName = $this->StripPrefixFromTable($strAssociationTableName);
     $strReferencedTableName = $this->StripPrefixFromTable($strReferencedTableName);
     // Starting Point
     $strToReturn = QConvertNotation::CamelCaseFromUnderscore($strReferencedTableName);
     if ($blnPluralize) {
         $strToReturn = $this->Pluralize($strToReturn);
     }
     // Let's start with strAssociationTableName
     // Rip out trailing "_assn" if applicable
     $strAssociationTableName = str_replace($this->strAssociationTableSuffix, '', $strAssociationTableName);
     // remove instances of the table names in the association table name
     $strTableName2 = str_replace('_', '', $strTableName);
     // remove underscores if they are there
     $strReferencedTableName2 = str_replace('_', '', $strReferencedTableName);
     // remove underscores if they are there
     if (beginsWith($strAssociationTableName, $strTableName . '_')) {
         $strAssociationTableName = trimOffFront($strTableName . '_', $strAssociationTableName);
     } elseif (beginsWith($strAssociationTableName, $strTableName2 . '_')) {
         $strAssociationTableName = trimOffFront($strTableName2 . '_', $strAssociationTableName);
     } elseif (beginsWith($strAssociationTableName, $strReferencedTableName . '_')) {
         $strAssociationTableName = trimOffFront($strReferencedTableName . '_', $strAssociationTableName);
     } elseif (beginsWith($strAssociationTableName, $strReferencedTableName2 . '_')) {
         $strAssociationTableName = trimOffFront($strReferencedTableName2 . '_', $strAssociationTableName);
     } elseif ($strAssociationTableName == $strTableName || $strAssociationTableName == $strTableName2 || $strAssociationTableName == $strReferencedTableName || $strAssociationTableName == $strReferencedTableName2) {
         $strAssociationTableName = "";
     }
     if (endsWith($strAssociationTableName, '_' . $strTableName)) {
         $strAssociationTableName = trimOffEnd('_' . $strTableName, $strAssociationTableName);
     } elseif (endsWith($strAssociationTableName, '_' . $strTableName2)) {
         $strAssociationTableName = trimOffEnd('_' . $strTableName2, $strAssociationTableName);
     } elseif (endsWith($strAssociationTableName, '_' . $strReferencedTableName)) {
         $strAssociationTableName = trimOffEnd('_' . $strReferencedTableName, $strAssociationTableName);
     } elseif (endsWith($strAssociationTableName, '_' . $strReferencedTableName2)) {
         $strAssociationTableName = trimOffEnd('_' . $strReferencedTableName2, $strAssociationTableName);
     } elseif ($strAssociationTableName == $strTableName || $strAssociationTableName == $strTableName2 || $strAssociationTableName == $strReferencedTableName || $strAssociationTableName == $strReferencedTableName2) {
         $strAssociationTableName = "";
     }
     // Change any double "__" to single "_"
     $strAssociationTableName = str_replace("__", "_", $strAssociationTableName);
     $strAssociationTableName = str_replace("__", "_", $strAssociationTableName);
     $strAssociationTableName = str_replace("__", "_", $strAssociationTableName);
     // If we have nothing left or just a single "_" in AssociationTableName, return "Starting Point"
     if ($strAssociationTableName == "_" || $strAssociationTableName == "") {
         return sprintf("%s%s%s", $this->strAssociatedObjectPrefix, $strToReturn, $this->strAssociatedObjectSuffix);
     }
     // Otherwise, add "As" and the predicate
     return sprintf("%s%sAs%s%s", $this->strAssociatedObjectPrefix, $strToReturn, QConvertNotation::CamelCaseFromUnderscore($strAssociationTableName), $this->strAssociatedObjectSuffix);
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:52,代码来源:QCodeGenBase.class.php


示例12: CKAN

    if (strtolower(substr($txt, 0, strlen($begin))) == strtolower($begin)) {
        return true;
    }
    return false;
}
//error_reporting(0);
?>
<html>
<head>
<title>AODS Link-updater</title>
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
</head>
<body>

    <?php 
$count = 0;
$ckan = new CKAN("");
$ckan->getDatasets();
foreach ($ckan->datasets as $key => $set) {
    foreach ($set->res_url as $i => $url) {
        if (beginsWith($url, "http://os.amsterdam")) {
            $ckan->changeResource($set->name, $i, str_replace("http://os.amsterdam", "http://ois.amsterdam", $url), $set->res_description[$i]);
        }
    }
}
?>
  
</body>
</html>

开发者ID:AmsterdamData,项目名称:CKAN,代码行数:29,代码来源:updateoislinks.php


示例13: substr

     }
 } else {
     $monobook['nsclass'] = 'mediawiki ns-1 ltr';
     /* Special page */
     $monobook['content_actions']['nstab-main']['wiki'] = ':' . substr($ID, strlen($monobook['discussion-location']));
     $monobook['content_actions']['nstab-main']['text'] = $lang['monobook_article'];
     $monobook['content_actions']['nstab-main']['accesskey'] = 'v';
     if ($monobook['discussion'] == 1) {
         $monobook['content_actions']['talk']['class'] = "selected";
         $monobook['content_actions']['talk']['wiki'] = ':' . $ID;
         //Etienne : Discussion, not found in the lang.php files
         //$monobook['content_actions']['talk']['text'] = "Discussion";
         $monobook['content_actions']['talk']['text'] = $lang['monobook_discussion'];
     }
 }
 if (beginsWith($ID, "wiki:user:")) {
     $monobook['nsclass'] = 'mediawiki ns-1 ltr';
     /* Special page */
     $monobook['content_actions']['nstab-main']['text'] = $lang['monobook_userpage'];
     $monobook['content_actions']['nstab-main']['accesskey'] = 'v';
 }
 /* Now the edit button... */
 if ($ACT == "edit") {
     $monobook['content_actions']['edit']['class'] = "selected";
 }
 $monobook['content_actions']['edit']['href'] = DOKU_BASE . DOKU_SCRIPT . "?id=" . $ID . "&amp;do=edit&amp;rev=" . $_REQUEST['rev'];
 $monobook['content_actions']['edit']['accesskey'] = 'e';
 if ($INFO['writable']) {
     if ($INFO['exists']) {
         $monobook['content_actions']['edit']['text'] = $lang['btn_edit'];
         $monobook['content_actions']['edit']['accesskey'] = 'e';
开发者ID:BackupTheBerlios,项目名称:openaqua-svn,代码行数:31,代码来源:context.php


示例14: parseSQLFile

function parseSQLFile($filename, &$tables, &$edges)
{
    //init
    $tables = array();
    $edges = array();
    //parse file
    $file = file($filename);
    for ($i = 0; $i < count($file); ++$i) {
        $line = trim($file[$i]);
        //node
        if (beginsWith($line, "CREATE TABLE")) {
            $parts = explode(" ", $line);
            $current_table = $parts[2];
            $tables[$current_table] = array();
            $j = $i + 1;
            $line = trim($file[$j]);
            //table
            while (!beginsWith($line, "CREATE TABLE") && !beginsWith($line, "ALTER TABLE") && $line != "") {
                //primary key
                if (beginsWith($line, "PRIMARY KEY")) {
                    $parts = explode(" ", $line);
                    $tables[$current_table][rp($parts[3])][] = "P";
                } elseif (beginsWith($line, "KEY")) {
                    $parts = explode(" ", $line);
                    $tables[$current_table][rp($parts[2])][] = "I";
                } else {
                    $parts = explode(" ", $line);
                    if ($parts[0] != ")") {
                        $tables[$current_table][$parts[0]] = array();
                    }
                }
                ++$j;
                $line = trim($file[$j]);
            }
        } elseif (beginsWith($line, "ALTER TABLE")) {
            $parts = explode("`", $line);
            $from = $parts[1];
            $j = $i + 1;
            while (beginsWith(trim($file[$j]), "ADD CONSTRAINT")) {
                $parts = explode(" ", $file[$j]);
                $to = $parts[9];
                $tables[$from][rp($parts[7])][] = "F";
                $edges[] = array($from, $to);
                ++$j;
            }
        }
    }
}
开发者ID:gitter-badger,项目名称:OpenMS,代码行数:48,代码来源:sql2graph.php


示例15: varsToSearch

function varsToSearch($prefix, $vars)
{
    $search = array();
    foreach ($vars as $key => $value) {
        if (beginsWith($key, $prefix) && $value != "") {
            $key = substr($key, strlen($prefix));
            $subkeyarray = false;
            if (endsWith($key, '_lower')) {
                $key = substr($key, 0, strlen($key) - strlen('_lower'));
                $subkey = 'lower';
            } else {
                if (endsWith($key, '_upper')) {
                    $key = substr($key, 0, strlen($key) - strlen('_upper'));
                    $subkey = 'upper';
                } else {
                    if (endsWith($key, '_list')) {
                        $keyvalue = explode('__', substr($key, 0, strlen($key) - strlen('_list')));
                        $key = $keyvalue[0];
                        $value = $keyvalue[1];
                        $subkey = 'list';
                        $subkeyarray = true;
                    } else {
                        if (endsWith($key, '_multimatch')) {
                            $key = substr($key, 0, strlen($key) - strlen('_multimatch'));
                            if (empty($value)) {
                                $value = array();
                            } else {
                                $value = explode(",", $value);
                            }
                            $subkey = 'list';
                        } else {
                            $subkey = 'value';
                        }
                    }
                }
            }
            if (!isset($search[$key])) {
                $search[$key] = array();
            }
            if ($subkeyarray) {
                if (!isset($search[$key][$subkey])) {
                    $search[$key][$subkey] = array();
                }
                $search[$key][$subkey][] = $value;
            } else {
                $search[$key][$subkey] = $value;
            }
        }
    }
    return $search;
}
开发者ID:redhog,项目名称:DemoWave,代码行数:51,代码来源:utils.php


示例16: getComments

function getComments($file_path)
{
    $source = file_get_contents($file_path);
    $tokens = token_get_all($source);
    foreach ($tokens as $token) {
        if (is_string($token)) {
            // simple 1-character token
            // ignore code tokens
        } else {
            // token array
            list($id, $text) = $token;
            switch ($id) {
                case T_CLASS:
                    return;
                    break;
                case T_DOC_COMMENT:
                    // This is the only case we care about
                    if (!beginsWith($text, '/*************************************')) {
                        echo '<ul>';
                        $head = getTag($text, '/**');
                        $author = getTag($text, '@author');
                        $return = getTag($text, '@return');
                        $a = getTags($text, '@param');
                        // Print the results
                        if ($head && strlen(trim($head)) > 0) {
                            echo "<li><STRONG>Header:</STRONG> {$head}</li>";
                        }
                        if ($return && strlen($return) > 0) {
                            echo "<li><STRONG>Return Value:</STRONG> {$return}</li>";
                        }
                        if ($author && strlen($author) > 0) {
                            echo "<li><STRONG>Author:</STRONG> {$author}</li>";
                        }
                        echo '<ul>';
                        foreach ($a as $s) {
                            echo "<li>{$s}</li>";
                        }
                        echo '</ul>';
                        echo '</ul>';
                    }
                    break;
                default:
                    // anything else -> ignore
                    break;
            }
        }
    }
}
开发者ID:jkinner,项目名称:ringside,代码行数:48,代码来源:index.php


示例17: E_

        return "<option value='{$value}'>{$comment}</option>";
    }
}
?>

<h1><?php 
E_("Search for users");
?>
</h1>
<form action="<?php 
echo $_SERVER["SCRIPT_NAME"] . '?' . queryString(queryConstruct());
?>
" method="get" enctype="multipart/form-data">
 <?php 
foreach ($_GET as $key => $value) {
    if (!beginsWith($key, 'users_search_')) {
        echo "<input name='{$key}' value='{$value}' type='hidden'>\n";
    }
}
?>
 <table>
  <tr> 
   <?php 
echo drawSearchField(T_('Id'), 'users_search_id', false, 'bound', 10);
?>
   <?php 
echo drawSearchField(T_('User name'), 'users_search_username', false, 'match', 10);
?>
  </tr>
  <tr> 
   <?php 
开发者ID:redhog,项目名称:DemoWave,代码行数:31,代码来源:users.php


示例18: mysql_query

 include APPLICATION_INCPATH . 'htmlheader.inc.php';
 $sql = "SELECT name FROM `{$dbDashboard}`";
 $result = mysql_query($sql);
 if (mysql_error()) {
     trigger_error(mysql_error(), E_USER_WARNING);
 }
 echo "<h2>" . icon('dashboard', 32) . " ";
 echo $strInstallDashboardComponents . "</h2>";
 echo "<p align='center'>" . sprintf($strComponentMustBePlacedInDashboardDir, "<var>dashboard_NAME</var>") . "</p>";
 while ($dashboardnames = mysql_fetch_object($result)) {
     $dashboard[$dashboardnames->name] = $dashboardnames->name;
 }
 $path = APPLICATION_PLUGINPATH;
 $dir_handle = @opendir($path) or trigger_error("Unable to open dashboard directory {$path}", E_USER_ERROR);
 while ($file = readdir($dir_handle)) {
     if (beginsWith($file, "dashboard_") && endsWith($file, ".php")) {
         //echo "file name ".$file."<br />";
         if (empty($dashboard[substr($file, 10, strlen($file) - 14)])) {
             //echo "file name ".$file." - ".substr($file, 10, strlen($file)-14)."<br />";
             //$html .= "echo "<option value='{$row->id}'>$row->realname</option>\n";";
             $html .= "<option value='" . substr($file, 10, strlen($file) - 14) . "'>" . substr($file, 10, strlen($file) - 14) . " ({$file})</option>";
         }
     }
 }
 closedir($dir_handle);
 if (empty($html)) {
     echo "<p align='center'>{$strNoNewDashboardComponentsToInstall}</p>";
     echo "<p align='center'><a href='manage_dashboard.php'>{$strBackToList}</a></p>";
 } else {
     echo "<form action='{$_SERVER['PHP_SELF']}' method='post'>\n";
     echo "<table align='center' class='vertical'><tr><td>\n";
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:manage_dashboard.php


示例19: queryString

        $args = queryString(queryConstruct(array(), array('search_referendums_show')));
    } else {
        $status = "heading_collapsed";
        $args = queryString(queryConstruct(array('search_referendums_show' => '1'), array()));
    }
    $title = T_("Search for referendums");
    echo "<h2 class='{$status}'><a href='{$_SERVER["SCRIPT_NAME"]}?{$args}'>{$title}</a></h2>";
    if (array_get($_GET, 'search_referendums_show', '')) {
        ?>
   <form action="<?php 
        echo $_SERVER["SCRIPT_NAME"];
        ?>
" method="get" enctype="multipart/url-encoded">
    <?php 
        foreach ($_GET as $key => $value) {
            if (!beginsWith($key, 'referendum_search_')) {
                echo "<input name='{$key}' value='{$value}' type='hidden'>\n";
            }
        }
        ?>
    <table>
     <tr> 
      <?php 
        echo drawSearchField(T_('Id'), 'referendum_search_referendum', false, 'bound', 10);
        echo drawSearchField(T_('Total'), 'referendum_search_area', false, 'bound', 10, 'vote-sum');
        ?>
     </tr>
     <tr>
      <?php 
        echo drawSearchField(T_('Title'), 'referendum_search_title', false, 'match', 10);
        echo drawSearchField(T_('Current'), 'referendum_search_sum', false, 'bound', 10, 'current-vote-sum');
开发者ID:redhog,项目名称:DemoWave,代码行数:31,代码来源:searchreferendums.php


示例20: dirname

<?php

if (isset($DOKU_TPL) == FALSE) {
    $DOKU_TPL = DOKU_TPL;
}
if (isset($DOKU_TPLINC) == FALSE) {
    $DOKU_TPLINC = DOKU_TPLINC;
}
if (file_exists(DOKU_PLUGIN . 'displaywikipage/code.php')) {
    include_once DOKU_PLUGIN . 'displaywikipage/code.php';
}
if (file_exists(DOKU_PLUGIN . 'referrers/code.php')) {
    include_once DOKU_PLUGIN . 'referrers/code.php';
}
@(include dirname(__FILE__) . '/string_fn.php');
if (beginsWith(getenv("REMOTE_ADDR"), 'xxx')) {
    echo "<html><body><h3>You have been blocked from this server.</h3></body></html>";
} else {
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php 
    echo $conf['lang'];
    ?>
"
 lang="<?php 
    echo $conf['lang'];
    ?>
" dir="<?php 
    echo $lang['direction'];
    ?>
">
开发者ID:BackupTheBerlios,项目名称:openaqua-svn,代码行数:31,代码来源:main.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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