當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Controller::createUrl方法代碼示例

本文整理匯總了PHP中Controller::createUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Controller::createUrl方法的具體用法?PHP Controller::createUrl怎麽用?PHP Controller::createUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Controller的用法示例。


在下文中一共展示了Controller::createUrl方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: checkLogin

 public function checkLogin()
 {
     if (!isset($_SESSION['ticeStuId'])) {
         Tool::alertLocation(null, Controller::createUrl('user/login'));
         return false;
     }
     return true;
 }
開發者ID:denglitong,項目名稱:tice,代碼行數:8,代碼來源:Controller.class.php

示例2: checkAdmin

 public static function checkAdmin()
 {
     if (!isset($_SESSION['ticeAdmin'])) {
         Tool::alertLocation('請先登錄', Controller::createUrl('default/login'));
         return false;
     }
     return true;
 }
開發者ID:denglitong,項目名稱:tice,代碼行數:8,代碼來源:Controller.class.php

示例3: beforeControllerAction

 public function beforeControllerAction($controller, $action)
 {
     if (parent::beforeControllerAction($controller, $action)) {
         if (Yii::app()->user->isGuest) {
             Controller::redirect(Controller::createUrl(Yii::app()->user->loginUrl[0]));
         }
         // this method is called before any module controller action is performed
         // you may place customized code here
         return true;
     } else {
         return false;
     }
 }
開發者ID:cfletcher1856,項目名稱:austinblinddraw,代碼行數:13,代碼來源:DirectorModule.php

示例4: beforeControllerAction

 public function beforeControllerAction($controller, $action)
 {
     if (parent::beforeControllerAction($controller, $action)) {
         if (Yii::app()->user->isGuest) {
             Controller::redirect(Controller::createUrl(Yii::app()->user->loginUrl[0]));
         }
         if (!Yii::app()->user->isAdmin()) {
             throw new CHttpException(403, 'You are not authorized to perform this action.');
         }
         // this method is called before any module controller action is performed
         // you may place customized code here
         return true;
     } else {
         return false;
     }
 }
開發者ID:cfletcher1856,項目名稱:austinblinddraw,代碼行數:16,代碼來源:AdminModule.php

示例5:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>sidebar</title>
    <link rel="stylesheet" href="css/admin/default/admin.css">
</head>
<body id="sidebar">

<dl>
    <a href="<?php 
echo Controller::createUrl('site/search');
?>
" target="main"><dd><p>查詢體測數據</p></dd></a>
</dl>

</body>
</html>
開發者ID:denglitong,項目名稱:tice,代碼行數:18,代碼來源:sidebar.php

示例6:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首頁</title>
</head>

<frameset rows="90px,*" border="0">
    <frame src="<?php 
echo Controller::createUrl('site/header');
?>
" noresize="true" scrolling="no"/>
    <frameset cols="*,978px,*" border="1px">
        <frame>
        <frameset cols="176px,*" scrolling="yes">
            <frame src="<?php 
echo Controller::createUrl('site/sidebar');
?>
" name="sidebar" noresize="true" scrolling="no"/>
            <frame src="<?php 
echo Controller::createUrl('site/main');
?>
" name="main" />
        </frameset>
        <frame>
    </frameset>
</frameset>


</html>
開發者ID:denglitong,項目名稱:tice,代碼行數:30,代碼來源:admin.php

示例7: checkLogin

<head lang="en">
    <meta charset="UTF-8">
    <title>請登錄</title>
    <link rel="stylesheet" href="css/admin/default/admin.css">
    <script src="js/admin/default/jquery-1.11.1.min.js"></script>
    <script src="js/admin/default/adminLogin.js"></script>
</head>
<body>

<form id="admin_login" name="login" method="post" action="<?php 
echo Controller::createUrl('site/login');
?>
">
    <fieldset>
        <legend>學生體測查詢平台登錄</legend>
        <label><span class="width">學號:</span><input type="text" name="name" class="text"></label>
        <label><span class="width">密碼:</span><input type="password" name="password" class="text"></label>
        <label><span class="width">驗證碼:</span><input type="test" class="text code" name="code" id="code">
            <img id="codeImg" src="<?php 
echo Controller::createUrl('validateCode/index');
?>
"
                 onclick="javascript:this.src='index.php?r=validateCode/index&tm='+Math.random();">
        </label>
        <input type="submit" value="登錄" onclick="return checkLogin(); " class="submit" name="send">
    </fieldset>
</form>

</body>

</html>
開發者ID:denglitong,項目名稱:tice,代碼行數:31,代碼來源:login.php

示例8:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>header</title>
    <link rel="stylesheet" href="css/admin/default/admin.css">
</head>
<body>

<div id="header">

    <ul>
        <a href="<?php 
echo Controller::createUrl('site/resetPasswd');
?>
" target="main"><li>修改密碼</li></a>
        <a href="<?php 
echo Controller::createUrl('site/logout');
?>
" target="_parent"><li>退出</li></a>
    </ul>
    <p>歡迎您!學號:<?php 
echo $_SESSION['ticeStuId'];
?>
</p>
</div>



</body>
</html>
開發者ID:denglitong,項目名稱:tice,代碼行數:31,代碼來源:header.php

示例9:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>sidebar</title>
    <link rel="stylesheet" href="css/admin/default/admin.css">
</head>
<body id="sidebar">

<dl>
    <a href="<?php 
echo Controller::createUrl('data/manual');
?>
" target="main"><dd><p>上傳文件格式說明</p></dd></a>
    <a href="<?php 
echo Controller::createUrl('data/config');
?>
" target="main"><dd><p>設置上傳文件格式</p></dd></a>
    <a href="<?php 
echo Controller::createUrl('data/upload');
?>
" target="main"><dd><p>上傳體測數據</p></dd></a>
</dl>

</body>
</html>
開發者ID:denglitong,項目名稱:tice,代碼行數:26,代碼來源:sidebar.php

示例10:

            font-weight: bold;
            font-size: 20px;
            cursor: pointer;
            color: green;
        }
        p.green {
            font-weight: bold;
            font-size: 20px;
            color: green;
        }
    </style>
</head>

<body>
    <form method="post" action="<?php 
echo Controller::createUrl('data/config');
?>
">
        <ul>
            <li>
                學校類型:
                <select name="schoolType">
                    <option value="_placeHolder">請選擇</option>
                    <?php 
foreach ($schoolArr as $key => $name) {
    $selected = $key == $config->schoolType ? 'selected' : '';
    echo '<option value="' . $key . '" ' . $selected . '>' . $name . '</option>';
}
?>
                </select>
            </li>
開發者ID:denglitong,項目名稱:tice,代碼行數:31,代碼來源:config.php

示例11: checkReset

    <meta charset="UTF-8">
    <title>修改密碼</title>
    <script src="js/admin/default/jquery-1.11.1.min.js"></script>
    <script src="js/admin/default/adminLogin.js"></script>
    <style>
        span.width {
            display: inline-block;
            width: 100px;
            text-align: right;
        }
    </style>
</head>
<body>

<form id="admin_login" name="login" method="post" action="<?php 
echo Controller::createUrl('site/resetPasswd');
?>
">
    <dl>
        <dd>
            <span class="width">原密碼:</span><input type="password" name="oldPassword" class="text">
        </dd>
        <dd>
            <span class="width">新密碼:</span><input type="password" name="password" class="text">
        </dd>
        <dd>
            <span class="width">新密碼確認:</span><input type="password" name="confirm" class="text">
        </dd>
        <dd>
            <input type="submit" value="修改" onclick="return checkReset(); " class="submit" name="send">
        </dd>
開發者ID:denglitong,項目名稱:tice,代碼行數:31,代碼來源:resetPasswd.php

示例12:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>header</title>
    <link rel="stylesheet" href="css/admin/default/admin.css">
</head>
<body>

<div id="header">

    <ul>
        <a href="<?php 
echo Controller::createUrl('default/resetPasswd');
?>
" target="main"><li>修改密碼</li></a>
        <a href="<?php 
echo Controller::createUrl('default/logout');
?>
" target="_parent"><li>退出</li></a>
    </ul>
    <p>歡迎您,管理員<?php 
echo $_SESSION['ticeAdmin'];
?>
 !</p>
</div>



</body>
</html>
開發者ID:denglitong,項目名稱:tice,代碼行數:31,代碼來源:header.php

示例13: array

		<div class="topnav_text"><a href='#'>Home</a> | <a href='#'>My Account</a> | <a href='#'>Settings</a> | <a href='#'>Logout</a> </div>
	</div>
	<div id="header">
		<div id="logo"><img src="<?php 
echo Yii::app()->theme->baseUrl;
?>
/images/logo.png"></img><?php 
//echo CHtml::encode(Yii::app()->name);
?>
</div>
	</div><!-- header -->
	

	<div id="mainmenu">
		<?php 
$this->widget('zii.widgets.CMenu', array('items' => array(array('label' => 'Home', 'url' => array('/site/index')), array('url' => Yii::app()->getModule('user')->loginUrl, 'label' => Yii::app()->getModule('user')->t("Login"), 'visible' => Yii::app()->user->isGuest), array('url' => Yii::app()->getModule('user')->registrationUrl, 'label' => Yii::app()->getModule('user')->t("Register"), 'visible' => Yii::app()->user->isGuest), array('url' => Yii::app()->getModule('user')->profileUrl, 'label' => Yii::app()->getModule('user')->t("Profile"), 'visible' => !Yii::app()->user->isGuest), array('url' => Yii::app()->getModule('user')->logoutUrl, 'label' => Yii::app()->getModule('user')->t("Logout") . ' (' . Yii::app()->user->name . ')', 'visible' => !Yii::app()->user->isGuest), array('url' => Controller::createUrl('/schemes'), 'label' => 'Schemes'), array('url' => Controller::createUrl('/Designation'), 'label' => 'Designation'), array('url' => Controller::createUrl('/Designation_types'), 'label' => 'Designation_types'), array('url' => Controller::createUrl('/Designation_types'), 'label' => 'Designation_types'), array('url' => Controller::createUrl('/Department'), 'label' => 'Department'), array('url' => Controller::createUrl('/Issues'), 'label' => 'Issues'), array('url' => Controller::createUrl('/Instructions'), 'label' => 'Instructions'))));
?>
	</div><!-- mainmenu -->
	<?php 
//my addition
//echo "<p class=\"currentvalues\"><span> Current User:".Yii::app()->user->name."(".User::model()->findByPk(Yii::app()->user->id)->profile->firstname." ".User::model()->findByPk(Yii::app()->user->id)->profile->lastname.")"."</span>";
//echo "<span> Current Scheme:"."Scheme Name"."</span></p>";
//my addition
if (isset($this->breadcrumbs)) {
    ?>
		<?php 
    $this->widget('zii.widgets.CBreadcrumbs', array('links' => $this->breadcrumbs));
    ?>
<!-- breadcrumbs -->
	<?php 
}
開發者ID:ranvirp,項目名稱:rdp,代碼行數:31,代碼來源:main.php


注:本文中的Controller::createUrl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。