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


PHP parameters函数代码示例

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


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

示例1: add

 public function add()
 {
     if (isset($_POST['vid_url']) && isset($_POST['jeu_id'])) {
         if (empty($_POST['jeu_id'])) {
             echo "3";
         }
         if (empty($_POST['vid_url'])) {
             echo "2";
         } else {
             if (!filter_var($_POST['vid_url'], FILTER_VALIDATE_URL)) {
                 echo "5";
             } else {
                 $verif = 0;
                 foreach (T_e_video_vid::findAll() as $t_e_video_vid) {
                     if ($t_e_video_vid->vid_url == $_POST['vid_url'] && $t_e_video_vid->jeu_id == $_POST['jeu_id']) {
                         echo "4";
                         $verif = 1;
                     }
                 }
                 if ($verif == 0) {
                     $newvideo = new T_e_video_vid();
                     $newvideo->jeu_id = parameters()["jeu_id"];
                     $newvideo->vid_url = parameters()["vid_url"];
                     echo "1";
                 }
             }
         }
     } else {
         echo "3";
     }
 }
开发者ID:js-dev88,项目名称:sprints,代码行数:31,代码来源:T_e_video_vidController.php

示例2: view

 public function view()
 {
     $b = new T_e_jeuvideo_jeu(parameters()["id"]);
     $nbAvis = count(T_e_avis_avi::FindAll($b->jeu_id));
     for ($i = 0; $i < $nbAvis; $i++) {
         if (isset($_POST['pouce_id_avi' . $i]) && isset($_POST['pouce_id_cli' . $i]) && isset($_POST['submit_vert' . $i])) {
             if (T_j_avisrecommande_avr::countAvisrByClient($_POST['pouce_id_avi' . $i], $_POST['pouce_id_cli' . $i]) != 0) {
                 T_j_avisrecommande_avr::deleteD($_POST['pouce_id_avi' . $i], $_POST['pouce_id_cli' . $i]);
             } else {
                 if (T_j_avisdeconseille_avd::countAvisdByClient($_POST['pouce_id_avi' . $i], $_POST['pouce_id_cli' . $i]) != 0) {
                     T_j_avisdeconseille_avd::deleteD($_POST['pouce_id_avi' . $i], $_POST['pouce_id_cli' . $i]);
                 }
                 $recommend = new T_j_avisrecommande_avr($_POST['pouce_id_avi' . $i], $_POST['pouce_id_cli' . $i]);
             }
         }
     }
     for ($i = 0; $i < $nbAvis; $i++) {
         if (isset($_POST['rpouce_id_avi' . $i]) && isset($_POST['rpouce_id_cli' . $i]) && isset($_POST['submit_rouge' . $i])) {
             if (T_j_avisdeconseille_avd::countAvisdByClient($_POST['rpouce_id_avi' . $i], $_POST['rpouce_id_cli' . $i]) != 0) {
                 T_j_avisdeconseille_avd::deleteD($_POST['rpouce_id_avi' . $i], $_POST['rpouce_id_cli' . $i]);
             } else {
                 if (T_j_avisrecommande_avr::countAvisrByClient($_POST['rpouce_id_avi' . $i], $_POST['rpouce_id_cli' . $i]) != 0) {
                     T_j_avisrecommande_avr::deleteD($_POST['rpouce_id_avi' . $i], $_POST['rpouce_id_cli' . $i]);
                 }
                 $recommend = new T_j_avisdeconseille_avd($_POST['rpouce_id_avi' . $i], $_POST['rpouce_id_cli' . $i]);
             }
         }
     }
     $this->render("view", $b);
 }
开发者ID:js-dev88,项目名称:sprints,代码行数:30,代码来源:T_e_jeuvideo_jeuController.php

示例3: view

 public function view()
 {
     try {
         $b = new T_e_jeuvideo_jeu(parameters()["id"]);
         $this->render("view", $b);
     } catch (Exception $e) {
         $this->render("error");
     }
 }
开发者ID:js-dev88,项目名称:sprints,代码行数:9,代码来源:T_e_jeuvideo_jeuController.php

示例4: view

 public function view()
 {
     try {
         $b = new T_e_adresse_adr(parameters()["adr_id"]);
         $this->render("view");
     } catch (Exception $e) {
         (new SiteController())->render("index");
         $this->render("error");
     }
 }
开发者ID:js-dev88,项目名称:sprints,代码行数:10,代码来源:T_e_adresse_adrController.php

示例5: view

 public function view()
 {
     try {
         $b = new T_e_client_cli(parameters()["cli_id"]);
         $this->render("view", $b);
     } catch (Exception $e) {
         //(new SiteController())->render("index");
         $this->render("error");
     }
 }
开发者ID:js-dev88,项目名称:sprints,代码行数:10,代码来源:T_e_client_cliController.php

示例6: view

 public function view()
 {
     try {
         $b = new T_r_console_con(parameters()["id"]);
         $this->render("view");
     } catch (Exception $e) {
         (new SiteController())->render("index");
         $this->render("error");
     }
 }
开发者ID:js-dev88,项目名称:sprints,代码行数:10,代码来源:T_r_console_conController.php

示例7: view

 public function view()
 {
     try {
         $b = new T_e_photo_pho(parameters()["id"]);
         $this->render("view", $b);
     } catch (Exception $e) {
         print_r($e);
         (new SiteController())->render("index");
         $this->render("error");
     }
 }
开发者ID:js-dev88,项目名称:sprints,代码行数:11,代码来源:T_e_photo_phoController.php

示例8: B2jContactParseRoute

function B2jContactParseRoute($segments)
{
    $vars = array();
    $parameters = parameters();
    foreach ($parameters as $index => $name) {
        if (isset($segments[$index])) {
            $vars[$name] = preg_replace('/[^A-Z0-9_]/i', "", $segments[$index]);
        } else {
            break;
        }
    }
    return $vars;
}
开发者ID:grlf,项目名称:eyedock,代码行数:13,代码来源:router.php

示例9: FoxContactParseRoute

function FoxContactParseRoute($segments)
{
    $vars = array();
    $parameters = parameters();
    foreach ($parameters as $index => $name) {
        if (isset($segments[$index])) {
            // $segments[$index] should be safe, but we don't trust the user input
            // Ony allows alphanumeric character and underscores. Forbid all the other stuff.
            $vars[$name] = preg_replace('/[^A-Z0-9_]/i', "", $segments[$index]);
        } else {
            // At the first missing parameter, we can't continue.
            // BuildRoute respect a specific order of the parameters.
            break;
        }
    }
    return $vars;
}
开发者ID:jehanryan,项目名称:Flotech,代码行数:17,代码来源:router.php

示例10: addvideo

 public function addvideo()
 {
     $m = new message();
     if (isset(parameters()["input"])) {
         if (preg_match('/youtube/', parameters()['input'])) {
             $video = new T_E_VIDEO_VID();
             $videos = $video->findByGame(parameters()['jeu']);
             if (count($videos) != 0) {
                 $m->setFlash("Il y a déjà une video pour ce jeu");
             } else {
                 preg_match('/[\\?\\&]v=([^\\?\\&]+)/', parameters()['input'], $matches);
                 $video->addVideo(parameters()['jeu'], 'https://www.youtube.com/embed/' . $matches[1] . '?rel=0&showinfo=0&color=white&iv_load_policy=3');
             }
         } else {
             $m->setFlash("Ce n'est pas une url de youtube");
         }
     }
     $this->render("addvideo", T_E_JEUVIDEO_JEU::findAll());
 }
开发者ID:ColinPeyrat,项目名称:scrum-ecommerce,代码行数:19,代码来源:SERVICE_VENTEController.php

示例11: route

?>
"
                       href="<?php 
echo route('enabled=' . (parameters()->enabled === 0 ? '' : '0'));
?>
">
                        <?php 
echo translate('Unpublished');
?>
                    </a>
                    <a class="<?php 
echo parameters()->enabled === 1 ? 'active' : '';
?>
"
                       href="<?php 
echo route('enabled=' . (parameters()->enabled === 1 ? '' : '1'));
?>
">
                        <?php 
echo translate('Published');
?>
                    </a>
                </div>
                <div class="scopebar-search">
                    <?php 
echo helper('grid.search', array('submit_on_clear' => true));
?>
                </div>
            </div>
            <div class="todo_table_container">
                <table class="table table-striped footable">
开发者ID:nooku,项目名称:joomla-todo,代码行数:31,代码来源:default.html.php

示例12: defined

<?
/**
 * @package     DOCman
 * @copyright   Copyright (C) 2011 - 2014 Timble CVBA. (http://www.timble.net)
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.joomlatools.com
 */
defined('KOOWA') or die; ?>
<? if (parameters()->total): ?>

<?= helper('bootstrap.load', array(
    'package' => 'docman',
    'wrapper' => false
)) ?>

<div class="koowa">
    <div class="mod_docman mod_docman--categories <?= JFactory::getLanguage()->isRTL() ? ' koowa--rtl' : '' ?>">
    <?
    foreach ($categories as $category):
        $level      = $category->level;
        $next_level = $categories->hasNext() ? $categories->getInnerIterator()->current()->level : false;

        if ($level > $previous_level): // Start a new level ?>
        <ul <?= $params->show_icon ? ' class="mod_docman_icons"' :'' ?>>
        <? endif; ?>
            <li class="module_document module_document__level<?= $level ?>">
            <?= import('mod://site/docman_categories._category.html', array(
                'category' => $category,
                'params'   => $params
            )); ?>
        <? if ($next_level === false && $level >= $next_level): ?>
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:31,代码来源:default.html.php

示例13: add


//.........这里部分代码省略.........
             $msgerror = "Le champ Mot de passe est vide";
             $data[] = $msgerror;
         }
         if (empty($_POST['mdp_confirm'])) {
             $msgerror = "Le champ Confirmez votre mot de passe est vide";
             $data[] = $msgerror;
         }
         if (preg_match($pattern, $_POST['cli_motpasse'])) {
             $msgerror = "Caractères spéciaux interdits dans le champ Mot de passe";
             $data[] = $msgerror;
         }
         if (strlen($_POST['cli_motpasse']) < 8 || strlen($_POST['cli_motpasse']) > 15) {
             $msgerror = "Le mot de passe doit contenir entre 8 et 15 caractères alphanumériques";
             $data[] = $msgerror;
         }
         if ($_POST['cli_motpasse'] != $_POST['mdp_confirm']) {
             $msgerror = "Le mot de passe et la confirmation ne correspondent pas";
             $data[] = $msgerror;
         }
         //verif mail
         if (empty($_POST['cli_mel'])) {
             $msgerror = "Le champ Adresse email est vide";
             $data[] = $msgerror;
         } else {
             if (!filter_var($_POST['cli_mel'], FILTER_VALIDATE_EMAIL)) {
                 $msgerror = "Le format de l'adresse mail est invalide";
                 $data[] = $msgerror;
             }
         }
         $listeclients = T_e_client_cli::findAll();
         foreach ($listeclients as $t_e_client_cli) {
             if ($_POST['cli_mel'] == $t_e_client_cli->cli_mel) {
                 $msgerror = "Adresse email déjà utilisée";
                 $data[] = $msgerror;
             }
         }
         if (empty($_POST['mail_confirm'])) {
             $msgerror = "Le champ Confirmez votre adresse email est vide";
             $data[] = $msgerror;
         }
         if ($_POST['cli_mel'] != $_POST['mail_confirm']) {
             $msgerror = "L\\'email et la confirmation ne correspondent pas";
             $data[] = $msgerror;
         }
         //verif nom et prenom
         if (empty($_POST['cli_nom'])) {
             $msgerror = "Le champ Nom est vide";
             $data[] = $msgerror;
         } elseif (preg_match($pattern_nom, $_POST['cli_nom'])) {
             $msgerror = "Veuillez rentrer un nom valide";
             $data[] = $msgerror;
         }
         if (empty($_POST['cli_prenom'])) {
             $msgerror = "Le champ Prénom est vide";
             $data[] = $msgerror;
         } elseif (preg_match($pattern_nom, $_POST['cli_prenom'])) {
             $msgerror = "Veuillez rentrer un prénom valide";
             $data[] = $msgerror;
         }
         //verif tel
         if (empty($_POST['cli_telfixe']) && empty($_POST['cli_telportable'])) {
             $msgerror = "Au moins un numéro de téléphone doit être renseigné";
             $data[] = $msgerror;
         }
         if (!empty($_POST['cli_telfixe']) && !preg_match($patterntelfixe, $_POST['cli_telfixe'])) {
             $msgerror = "Format téléphone fixe invalide";
             $data[] = $msgerror;
         }
         if (!empty($_POST['cli_telportable']) && !preg_match($patterntelport, $_POST['cli_telportable'])) {
             $msgerror = "Format téléphone portable invalide";
             $data[] = $msgerror;
         }
         foreach ($listeclients as $t_e_client_cli) {
             if ($_POST['cli_telportable'] == $t_e_client_cli->cli_telportable && $_POST['cli_telportable'] != null) {
                 $msgerror = "Numéro de téléphone portable déjà utilisé";
                 $data[] = $msgerror;
                 break;
             }
         }
         if (!empty($data)) {
             $this->render("add", $data);
         } else {
             $client = new T_e_client_cli();
             $client->cli_mel = parameters()["cli_mel"];
             $client->cli_motpasse = md5(parameters()["cli_motpasse"]);
             $client->cli_pseudo = parameters()["cli_pseudo"];
             $client->cli_civilite = parameters()["cli_civilite"];
             $client->cli_nom = parameters()["cli_nom"];
             $client->cli_prenom = parameters()["cli_prenom"];
             $client->cli_telfixe = parameters()["cli_telfixe"];
             $client->cli_telportable = parameters()["cli_telportable"];
             $client2 = new T_e_client_cli($client->cli_id);
             $_SESSION['client'] = serialize($client2);
             $c = new SiteController();
             $c->index();
         }
     } else {
         $this->render("add");
     }
 }
开发者ID:js-dev88,项目名称:sprints,代码行数:101,代码来源:T_e_client_cliController.php

示例14: foreach

}
if (isset($_GET)) {
    foreach ($_GET as $k => $v) {
        $parameters[$k] = $v;
    }
}
// Pour accès ultérieur sans "global"
function parameters()
{
    global $parameters;
    return $parameters;
}
// Gestion des la route : paramètre r = controller/action
if (isset(parameters()["r"])) {
    try {
        $route = parameters()["r"];
        if (strpos($route, "/") === FALSE) {
            list($controller, $action) = array($route, "index");
        } else {
            list($controller, $action) = explode("/", $route);
        }
        $controller = ucfirst($controller) . "Controller";
        $c = new $controller();
        $c->{$action}();
    } catch (Exception $e) {
        $c = new SiteController();
        $c->error404();
    }
} else {
    $c = new SiteController();
    $c->index();
开发者ID:js-dev88,项目名称:sprints,代码行数:31,代码来源:route.php

示例15: function

<ktml:script src="media://koowa/com_files/js/files.compact.js" />

<script>
Files.sitebase = '<?= $sitebase; ?>';
Files.token = '<?= $token; ?>';

window.addEvent('domready', function() {
	var config = <?= json_encode(KObjectConfig::unbox(parameters()->config)); ?>,
		options = {
            cookie: {
                path: '<?=object('request')->getSiteUrl()?>'
            },
            root_text: <?= json_encode(translate('Root folder')) ?>,
			editor: <?= json_encode(parameters()->editor); ?>,
			types: <?= json_encode(KObjectConfig::unbox(parameters()->types)); ?>,
			container: <?= json_encode($container ? $container->toArray() : null); ?>
		};
	options = Object.append(options, config);

	Files.app = new Files.Compact.App(options);

    <? if ($can_upload): ?>
    $('files-new-folder-create').addEvent('click', function(e){
        e.stop();

        var element = $('files-new-folder-input'),
            value = element.get('value');

        if (value.length > 0) {
            var folder = new Files.Folder({name: value, folder: Files.app.getPath()});
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:30,代码来源:compact.html.php


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