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


PHP match函数代码示例

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


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

示例1: login

 public function login(AIS2Connection $connection)
 {
     $login = $this->username;
     $krbpwd = $this->krbpwd;
     // Username a password si nebudeme pamatat dlhsie ako treba
     $this->username = null;
     $this->krbpwd = null;
     $data = $connection->get(self::LOGIN);
     if (preg_match('@\\<title\\>IIKS \\- Prihlásenie\\</title\\>@', $data)) {
         assert($login !== null && $krbpwd !== null);
         $data = $connection->post(self::COSIGN_LOGIN, array('ref' => self::LOGIN, 'login' => $login, 'krbpwd' => $krbpwd));
         if (!preg_match('@\\<base href\\="https://ais2\\.uniba\\.sk/ais/portal/pages/portal_layout\\.jsp"\\>@', $data)) {
             if (preg_match('@Pri pokuse o prihlásenie sa vyskytol problém:@', $data)) {
                 if ($reason = match($data, '@\\<div style\\="color:#FF0000;"\\>\\<b\\>([^<]*)\\<\\/b\\>@')) {
                     throw new Exception('Nepodarilo sa prihlásiť, dôvod: <b>' . $reason . '</b>');
                 }
             }
             if ($reason = match($data, '@\\<title\\>IIKS - Chyba pri prihlasovaní:([^<]*)\\<\\/title\\>@')) {
                 throw new Exception('Nepodarilo sa prihlásiť, dôvod: <b>' . $reason . '</b>');
             }
             throw new Exception('Nepodarilo sa prihlásiť, dôvod neznámy.');
         }
         $this->loggedIn = true;
         return true;
     }
     $this->loggedIn = true;
     // naozaj?
     return true;
 }
开发者ID:BGCX067,项目名称:fajr-svn-to-git,代码行数:29,代码来源:AIS2CosignLogin.php

示例2: showList

 function showList($q)
 {
     include "showProject.php";
     //---get user information---//
     if ($q !== "") {
         $userid = match("users", "username", "userid", $q);
     } else {
         $sessionid = $_SESSION["sessionid"];
         $random = $_SESSION["random"];
         $query = "SELECT * FROM sessions WHERE sessionid = '{$sessionid}' AND random = '{$random}' ";
         $recordSet = mysql_query($query) or die(mysql_error());
         $row = mysql_fetch_array($recordSet);
         $userid = $row["userid"];
     }
     //---get projects---//
     $arrayProjectids = array();
     $query = "SELECT * FROM projects WHERE shoot = '{$userid}' OR video = '{$userid}' OR photo = '{$userid}' OR copy = '{$userid}' ";
     $recordSet = mysql_query($query) or die(mysql_error());
     while ($row = mysql_fetch_array($recordSet)) {
         array_push($arrayProjectids, $row["projectid"]);
     }
     //---build return---//
     $returnArray = array();
     foreach ($arrayProjectids as $projectid) {
         array_push($returnArray, "project:|:|:|:" . showProject($projectid));
     }
     //---return information---//
     return implode(":|::|::|:", $returnArray);
 }
开发者ID:jamesbmayr,项目名称:project-tracker,代码行数:29,代码来源:showList.php

示例3: validateNewEmail

 function validateNewEmail($key, $newEmail)
 {
     $errorMessage = "";
     $successMessage = "";
     if (isset($key) and isset($newEmail)) {
         if ($key !== $_SESSION["key"]) {
             $errorMessage = "Please validate email again.";
         } elseif ($newEmail !== $_SESSION["newEmail"]) {
             $errorMessage = "Please validate email again.";
         } elseif (match("users", "email", "userid", $newEmail) > 0) {
             $errorMessage = "This email is taken.";
         } else {
             $sessionid = $_SESSION["sessionid"];
             $random = $_SESSION["random"];
             $query = "SELECT * FROM sessions WHERE sessionid = '{$sessionid}' AND random = '{$random}' ";
             $recordSet = mysql_query($query) or die(mysql_error());
             $row = mysql_fetch_array($recordSet);
             $userid = $row["userid"];
             if ($row["userid"] > 0) {
                 unset($_SESSION["newEmail"]);
                 unset($_SESSION["key"]);
                 $query = "UPDATE users SET email = ('{$newEmail}') WHERE userid = '{$userid}' ";
                 mysql_query($query) or die(mysql_error());
                 $successMessage = "Email updated.";
             } else {
                 $errorMessage = "Sign in conflict.";
             }
         }
     } else {
         $errorMessage = "Please complete all fields.";
     }
     return $errorMessage . ":|:|:|:" . $successMessage;
 }
开发者ID:jamesbmayr,项目名称:project-tracker,代码行数:33,代码来源:validateNewEmail.php

示例4: sendValidation

 function sendValidation($email)
 {
     $errorMessage = "";
     $successMessage = "";
     if (isset($email)) {
         if (match("users", "email", "userid", $email) > 0) {
             $errorMessage = "This email is taken.";
         } else {
             $_SESSION["key"] = substr(str_shuffle(str_repeat('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', mt_rand(1, 16))), 0, 16);
             $_SESSION["email"] = $email;
             $subject = "validation";
             $message = "\n\t\t\t\t\t\t\t<html>\n\t\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t\t<title>validation</title>\n\t\t\t\t\t\t\t\t</head>\n\t\t\t\t\t\t\t\t<body style='background-color: rgba(048,122,183,1); color: rgba(255,255,255,1); font-family: arial, sans-serif; text-align: center; font-size: 50px; border-radius: 10px'>\n\t\t\t\t\t\t\t\t\t<div style='padding-top: 50px; padding-bottom: 50px'>\n\t\t\t\t\t\t\t\t\t\t<a href='http://example.com/welcome.html?email=" . $_SESSION["email"] . "&key=" . $_SESSION["key"] . "'>Validate this email address.</a>\n\t\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</body>\n\t\t\t\t\t\t\t</html>";
             $headers = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . 'From: info@example.com' . "\r\n" . 'Reply-To: info@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
             mail($email, $subject, $message, $headers);
             $domain = explode("@", $email);
             $domain = $domain[1];
             //$successMessage = "https://".$domain;
             $successMessage = "http://example.com/welcome.html?email=" . $_SESSION["email"] . "&key=" . $_SESSION["key"];
             //testing only
         }
     } else {
         $errorMessage = "Please enter a valid email address.";
     }
     return $errorMessage . ":|:|:|:" . $successMessage;
 }
开发者ID:jamesbmayr,项目名称:project-tracker,代码行数:25,代码来源:sendValidation.php

示例5: saveProject

 function saveProject($q, $projectName, $shoot, $video, $photo, $copy, $shootDate, $dueDate, $notes)
 {
     $errorMessage = "";
     $successMessage = "";
     //---existingProject---//
     if (match("projects", "projectName", "projectid", $q) > 0) {
         $projectid = match("projects", "projectName", "projectid", $q);
         $shoot = match("users", "username", "userid", $shoot);
         $video = match("users", "username", "userid", $video);
         $photo = match("users", "username", "userid", $photo);
         $copy = match("users", "username", "userid", $copy);
         $query = "UPDATE projects SET projectName = '{$projectName}', shoot = '{$shoot}', video = '{$video}', photo = '{$photo}', copy = '{$copy}', shootDate = '{$shootDate}', dueDate = '{$dueDate}', notes = '{$notes}' WHERE projectid = '{$projectid}' ";
         mysql_query($query) or die(mysql_error());
         $successMessage = "Data updated.";
     } else {
         if (match("users", "username", "userid", $projectName) > 0 or match("users", "username", "userid", $projectName) > 0) {
             $errorMessage = "This project name is taken.";
         } else {
             $shoot = match("users", "username", "userid", $shoot);
             $video = match("users", "username", "userid", $video);
             $photo = match("users", "username", "userid", $photo);
             $copy = match("users", "username", "userid", $copy);
             $query = "INSERT INTO projects (projectName, shoot, video, photo, copy, shootDate, dueDate, notes) VALUES('{$projectName}','{$shoot}','{$video}','{$photo}','{$copy}','{$shootDate}','{$dueDate}','{$notes}')";
             mysql_query($query) or die(mysql_error());
             $successMessage = "Project created.";
         }
     }
     return $errorMessage . ":|:|:|:" . $successMessage . ":|:|:|:" . $projectName;
 }
开发者ID:jamesbmayr,项目名称:project-tracker,代码行数:29,代码来源:saveProject.php

示例6: parse_expressions

 public static function parse_expressions($css = "")
 {
     # If theres no css string given, use the master css
     if ($css == "") {
         $css = CSS::$css;
     }
     foreach (self::$numericProperties as $property) {
         preg_match_all('/[^\\s;\\}\\{\\-_A-Za-z\\*]*(?P<property_name>' . $property . ')\\s*\\:\\s*(?P<property_value>.*?)\\s*\\;/', $css, $matches);
         for ($i = 0; $i < count($matches[0]); $i++) {
             if (match('/(\\#\\[[\'\\"]?([^]]*?)[\'\\"]?\\])/', $matches['property_value'][$i])) {
                 continue;
             }
             $result = self::operate($matches['property_value'][$i], $matches['property_name'][$i]);
             if ($result !== false) {
                 $css = str_replace($matches[0][$i], "{$matches['property_name'][$i]}: {$result};", $css);
             }
         }
     }
     preg_match_all('/[^a-zA-Z]\\((?P<to_operate>[^\\)]*?)\\)/', $css, $matches);
     for ($i = 0; $i < count($matches[0]); $i++) {
         $result = self::operate($matches['to_operate'][$i], null, true);
         if ($result !== false) {
             $css = str_replace($matches[0][$i], " " . $result, $css);
         }
     }
     return $css;
 }
开发者ID:naonak,项目名称:Expression2,代码行数:27,代码来源:Expression2.php

示例7: getZapisneListy

 public function getZapisneListy($studiumIndex)
 {
     $this->open();
     $data = $this->requestData(array('compName' => 'nacitatDataAction', 'objProperties' => array('x' => -4, 'y' => -4, 'focusedComponent' => 'nacitatButton'), 'embObj' => array('objName' => 'studiaTable', 'dataView' => array('activeIndex' => $studiumIndex, 'selectedIndexes' => $studiumIndex))));
     $data = match($data, AIS2Utils::DATA_PATTERN);
     return new AIS2Table($this->tabulka_zoznam_zapisnych_listov, $data);
 }
开发者ID:BGCX067,项目名称:fajr-svn-to-git,代码行数:7,代码来源:AIS2AdministraciaStudiaScreen.php

示例8: follow

 function follow($q)
 {
     $profileActionButton = "none";
     //---get profile information---//
     $profileid = match("users", "username", "userid", $q);
     //---get user information---//
     $sessionid = $_SESSION["sessionid"];
     $random = $_SESSION["random"];
     $query = "SELECT * FROM sessions WHERE sessionid = '{$sessionid}' AND random = '{$random}' ";
     $recordSet = mysql_query($query) or die(mysql_error());
     $row = mysql_fetch_array($recordSet);
     //---profileActionButton---//
     if ($row["userid"] > 0) {
         $myid = $row["userid"];
         $query = "SELECT * FROM users WHERE userid = '{$myid}' ";
         $recordSet = mysql_query($query) or die(mysql_error());
         $row = mysql_fetch_array($recordSet);
         $arrayFollowing = explode(":||:", $row["following"]);
         if ($profileid === $myid) {
             $profileActionButton = "edit_profile";
         } elseif (in_array($profileid, $arrayFollowing)) {
             $profileActionButton = "unfollow";
         } else {
             array_push($arrayFollowing, $profileid);
             $following = implode(":||:", $arrayFollowing);
             $query = "UPDATE users SET following = '{$following}' WHERE userid = '{$myid}' ";
             mysql_query($query) or die(mysql_error());
             $profileActionButton = "unfollow";
             include "notify.php";
             notify($profileid, "@{" . $myid . "}@ is now following you.");
         }
     }
     return $profileActionButton;
 }
开发者ID:jamesbmayr,项目名称:project-tracker,代码行数:34,代码来源:follow.php

示例9: serve

function serve(array $actions, $verb, $path, ...$args)
{
    $pair = match($actions, $verb, $path);
    $func = array_shift($pair) ?: function () {
        return response('', 404, []);
    };
    $caps = array_shift($pair) ?: null;
    return empty($caps) ? $func(...$args) : $func($caps, ...$args);
}
开发者ID:badphp,项目名称:dispatch,代码行数:9,代码来源:dispatch.php

示例10: decode

function decode($encryptedText, $upperLeft, $upperRight, $lowerLeft, $lowerRight)
{
    $decodedText = "";
    for ($i = 0; $i < strlen($encryptedText) - 1; $i += 2) {
        $pair = textPairing($encryptedText, $i);
        $decodedText .= match($pair, $upperLeft, $upperRight, $lowerLeft, $lowerRight);
    }
    return $decodedText;
}
开发者ID:WilliamRADFunk,项目名称:encryptor,代码行数:9,代码来源:foursquare.php

示例11: getTokens

 protected static function getTokens(&$block)
 {
     $tokens = [];
     foreach (static::$tokens as $name => $pattern) {
         $token = match($pattern, $block);
         $tokens[$name] = $token ? $token[1] : null;
     }
     return $tokens;
 }
开发者ID:evertt,项目名称:slade,代码行数:9,代码来源:ConditionalBlock.php

示例12: getAttributes

 protected static function getAttributes(&$block)
 {
     extract(static::$tokens);
     $attributes = [];
     while ($token = match($attribute, $block)) {
         $attributes[$token[1]] = $token[2];
     }
     return $attributes;
 }
开发者ID:evertt,项目名称:slade,代码行数:9,代码来源:ExtendBlock.php

示例13: saveSettings

 function saveSettings($newUsername, $newPassword, $newEmailNotifications, $newAbout, $newPicture)
 {
     $errorMessage = "";
     $successMessage = "";
     //---get user information---//
     $sessionid = $_SESSION["sessionid"];
     $random = $_SESSION["random"];
     $query = "SELECT * FROM sessions WHERE sessionid = '{$sessionid}' AND random = '{$random}' ";
     $recordSet = mysql_query($query) or die(mysql_error());
     $row = mysql_fetch_array($recordSet);
     $userid = $row["userid"];
     //---update username---//
     if (isset($newUsername) and strlen($newUsername) > 0 and match("users", "username", "userid", $newUsername) !== $userid) {
         if (match("users", "username", "userid", $newUsername) > 0 or match("projects", "projectName", "projectid", $newUsername)) {
             $errorMessage = "This username is taken.";
         } else {
             $query = "UPDATE users SET username = ('{$newUsername}') WHERE userid = '{$userid}' ";
             mysql_query($query) or die(mysql_error());
             $successMessage = $successMessage . "Username updated. ";
         }
     }
     //---update password---//
     if (isset($newPassword) and strlen($newPassword) > 0) {
         $salt = substr(str_shuffle(str_repeat('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', mt_rand(1, 16))), 0, 16);
         $newPassword = sha1($newPassword . $salt);
         $query = "UPDATE users SET password = ('{$newPassword}') WHERE userid = '{$userid}' ";
         mysql_query($query) or die(mysql_error());
         $query = "UPDATE users SET salt = ('{$salt}') WHERE userid = '{$userid}' ";
         mysql_query($query) or die(mysql_error());
         $successMessage = $successMessage . "Password updated. ";
     }
     //---update email notifications---//
     if (isset($newEmailNotifications)) {
         $query = "UPDATE users SET emailNotifications = ('{$newEmailNotifications}') WHERE userid = '{$userid}' ";
         mysql_query($query) or die(mysql_error());
         $successMessage = $successMessage . "Email notifications updated. ";
     }
     //---update about---//
     if (isset($newAbout) and strlen($newAbout) > 0) {
         $newAbout = strip_tags($newAbout);
         $newAbout = addslashes($newAbout);
         $query = "UPDATE users SET about = ('{$newAbout}') WHERE userid = '{$userid}' ";
         mysql_query($query) or die(mysql_error());
         $successMessage = $successMessage . "About updated. ";
     }
     //---update picture---//
     if (isset($newPicture) and strlen($newPicture) > 0) {
         $newPicture = strip_tags($newPicture);
         $newPicture = addslashes($newPicture);
         $query = "UPDATE users SET picture = ('{$newPicture}') WHERE userid = '{$userid}' ";
         mysql_query($query) or die(mysql_error());
         $successMessage = $successMessage . "Picture updated. ";
     }
     //---return messages---//
     return $errorMessage . ":|:|:|:" . $successMessage;
 }
开发者ID:jamesbmayr,项目名称:project-tracker,代码行数:56,代码来源:saveSettings.php

示例14: BOUCLE_documenthtml_b8a8020987dd01f8087ad24f961857eb

function BOUCLE_documenthtml_b8a8020987dd01f8087ad24f961857eb(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    $in = array();
    if (!is_array($a = @$Pile[0]['mode'])) {
        $in[] = $a;
    } else {
        $in = array_merge($in, $a);
    }
    if (!isset($command['table'])) {
        $command['table'] = 'documents';
        $command['id'] = '_document';
        $command['from'] = array('documents' => 'spip_documents', 'L1' => 'spip_types_documents');
        $command['type'] = array();
        $command['groupby'] = array();
        $command['select'] = array("documents.id_document", "L1.titre AS type_document", "documents.taille", "documents.mode", "documents.largeur", "documents.hauteur", "documents.titre", "L1.mime_type");
        $command['orderby'] = array();
        $command['join'] = array('L1' => array('documents', 'extension'));
        $command['limit'] = '';
        $command['having'] = array();
    }
    $command['where'] = array(array('(documents.taille > 0 OR documents.distant=\'oui\')'), array('=', 'documents.id_document', sql_quote(@$Pile[0]['id_document'], '', 'bigint(21) NOT NULL AUTO_INCREMENT')), !(is_array(@$Pile[0]['mode']) ? count(@$Pile[0]['mode']) : strlen(@$Pile[0]['mode'])) ? '' : (is_array(@$Pile[0]['mode']) ? sql_in('documents.mode', sql_quote($in)) : array('=', 'documents.mode', sql_quote(@$Pile[0]['mode'], '', 'varchar(10) NOT NULL DEFAULT \'document\''))));
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('plugins-dist/medias/modeles/img.html', 'html_b8a8020987dd01f8087ad24f961857eb', '_document', 1, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            $t0 .= '

' . vide($Pile['vars'][$_zzz = (string) 'image'] = interdire_scripts(($a = match(entites_html(sinon(table_valeur(@$Pile[0], (string) 'mode_force', null), interdire_scripts($Pile[$SP]['mode'])), true), 'image|vignette') or is_string($a) and strlen($a)) ? $a : interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'embed', null), true)) ? ' ' : '')) . (($t1 = strval(table_valeur($Pile["vars"], (string) 'image', null))) !== '' ? $t1 . ('
<span class=\'spip_document_' . $Pile[$SP]['id_document'] . ' spip_documents' . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'align', null), true)))) !== '' ? ' spip_documents_' . $t2 : '') . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'class', null), true)))) !== '' ? ' ' . $t2 : '') . ' spip_lien_ok\'' . (($t2 = strval(interdire_scripts(match(entites_html(table_valeur(@$Pile[0], (string) 'align', null), true), 'left|right')))) !== '' ? '
 style=\'float:' . $t2 . ';\'' : '') . '>
' . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'lien', null), true)))) !== '' ? '<a href="' . $t2 . ('"' . (($t3 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'lien_class', null), true)))) !== '' ? ' class="' . $t3 . '"' : '') . '>') : '') . '<img src=\'' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_document'], 'document', '', '', true))) . '\'' . (($t2 = strval(interdire_scripts($Pile[$SP]['largeur']))) !== '' ? ' width="' . $t2 . '"' : '') . (($t2 = strval(interdire_scripts($Pile[$SP]['hauteur']))) !== '' ? ' height="' . $t2 . '"' : '') . ' alt="' . interdire_scripts(texte_backend(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))) . '"' . (($t2 = strval(interdire_scripts(texte_backend(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))))) !== '' ? ' title="' . $t2 . '"' : '') . ' />' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'lien', null), true) ? '</a>' : '') . '</span>
') : '') . (!table_valeur($Pile["vars"], (string) 'image', null) ? ' ' . ('
	' . vide($Pile['vars'][$_zzz = (string) 'fichier'] = extraire_attribut(quete_logo_document(quete_document($Pile[$SP]['id_document'], ''), '', '', '', 0, 0, ''), 'src')) . '
	' . vide($Pile['vars'][$_zzz = (string) 'width'] = extraire_attribut(quete_logo_document(quete_document($Pile[$SP]['id_document'], ''), '', '', '', 0, 0, ''), 'width')) . '
	' . vide($Pile['vars'][$_zzz = (string) 'height'] = extraire_attribut(quete_logo_document(quete_document($Pile[$SP]['id_document'], ''), '', '', '', 0, 0, ''), 'height')) . '
<span class=\'spip_document_' . $Pile[$SP]['id_document'] . ' spip_documents' . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'align', null), true)))) !== '' ? ' spip_documents_' . $t2 : '') . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'class', null), true)))) !== '' ? ' ' . $t2 : '') . ' spip_lien_ok\'' . (($t2 = strval(interdire_scripts(match(entites_html(table_valeur(@$Pile[0], (string) 'align', null), true), 'left|right')))) !== '' ? '
 style=\'float:' . $t2 . (';' . (($t3 = strval(table_valeur($Pile["vars"], (string) 'width', null))) !== '' ? ' width:' . $t3 . 'px;' : '') . '\'') : '') . '><a href="' . interdire_scripts(($a = entites_html(table_valeur(@$Pile[0], (string) 'lien', null), true) or is_string($a) and strlen($a)) ? $a : vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_document'], 'document', '', '', true)))) . '"' . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'lien', null), true) ? '' : 'type="' . interdire_scripts($Pile[$SP]['mime_type']) . '"'))) !== '' ? '
 ' . $t2 : '') . (($t2 = strval(interdire_scripts(texte_backend(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))))) !== '' ? ' title="' . $t2 . '"' : '') . '><img src=\'' . table_valeur($Pile["vars"], (string) 'fichier', null) . '\' width=\'' . table_valeur($Pile["vars"], (string) 'width', null) . '\' height=\'' . table_valeur($Pile["vars"], (string) 'height', null) . '\' alt=\'' . interdire_scripts(attribut_html(strlen(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])) ? interdire_scripts(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])) . ' {' . interdire_scripts($Pile[$SP]['type_document']) . '}' : interdire_scripts($Pile[$SP]['type_document']))) . '\' /></a></span>
') : '');
        }
        $iter->free();
    }
    if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
        spip_log(intval(1000 * $timer) . "ms BOUCLE_document @ plugins-dist/medias/modeles/img.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:56,代码来源:html_b8a8020987dd01f8087ad24f961857eb.php

示例15: validate_id

function validate_id()
{
    $fields = func_get_args();
    $arr = array_shift($fields);
    foreach ($fields as $field) {
        if (!preg . match("^[0-9]+\$", $arr[$field])) {
            throw new Exception("Field '{$field}' is not an ID");
        }
    }
}
开发者ID:nicevoice,项目名称:MapCraft,代码行数:10,代码来源:validators.php


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