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


PHP Site::url方法代码示例

本文整理汇总了PHP中Site::url方法的典型用法代码示例。如果您正苦于以下问题:PHP Site::url方法的具体用法?PHP Site::url怎么用?PHP Site::url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Site的用法示例。


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

示例1: __construct

 public function __construct()
 {
     global $GLOBALS, $data;
     self::$editors =& $GLOBALS;
     self::$data =& $data;
     self::$url = Options::get('siteurl');
     self::$domain = Options::get('sitedomain');
     self::$name = Options::get('sitename');
     self::$key = Options::get('sitekeywords');
     self::$desc = Options::get('sitedesc');
     self::$email = Options::get('siteemail');
     self::$slogan = Options::get('siteslogan');
 }
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:13,代码来源:Site.class.php

示例2:

?tag=<?php 
        echo Notification::get('tag');
    }
    ?>
"><?php 
    echo $parent_page['title'];
    ?>
</a>&nbsp;<span>&rarr;</span>&nbsp;<a href="<?php 
    echo Site::url() . $page['parent'] . '/' . $page['slug'];
    ?>
"><?php 
    echo $page['title'];
    ?>
</a>
<?php 
} else {
    ?>
    <a href="<?php 
    echo Site::url() . "/" . $page['slug'];
    if (Notification::get('tag')) {
        ?>
?tag=<?php 
        echo Notification::get('tag');
    }
    ?>
"><?php 
    echo $page['title'];
    ?>
</a>
<?php 
}
开发者ID:cmroanirgo,项目名称:monstra,代码行数:31,代码来源:breadcrumbs.view.php

示例3:

<svg version="1.1" class="tile_overlay" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 330 200" style="enable-background:new 0 0 330 200;" xml:space="preserve">
<style>.tile_overlay_path_carnation {fill: #fff;}</style>
<path class="tile_overlay_path tile_overlay_path_carnation" d="M490.1,280.649c0,44.459-36.041,80.5-80.5,80.5s-80.5-36.041-80.5-80.5s36.041-80.5,80.5-80.5
S490.1,236.19,490.1,280.649z"/>
</svg>
<div class="overlay_content">
<h2>Carnation<br/></h2>
<a class="popup" data-toggle="modal" data-target="#galleryModal">
<i class="glyphicon glyphicon-info-sign"></i>
<div class="popup_content">
<p class="hero_url"><?php 
echo Site::url();
?>
/public/assets/img/gallery/carnation/carnation-popup.jpg</p>
<p class="title">Carnation Website</p>
<p class="tags">web development, responsive, IE7+</p>
<p class="description">
Carnation site was built with custom filter and dynamic recipes. The challenge was to make the filter easily usable on mobile.
</p>
<p class="preview_url">http://www.carnation.com.au</p>
</div>
</a>
<a href="http://www.carnation.com.au" class="url" target="_blank"><i class="glyphicon glyphicon-link"></i></a>
</div>
</div>
<img src="<?php 
echo Site::url();
?>
/public/assets/img/gallery/carnation/carnation.jpg">
</div>
开发者ID:jessicaGithub,项目名称:portfolio2016,代码行数:31,代码来源:theme.default.minify.gallery-carnation.chunk.php

示例4: array

        // Update user hash
        $users->updateWhere("[login='" . $user_login . "']", array('hash' => $new_hash));
        $mail = new PHPMailer();
        $mail->CharSet = 'utf-8';
        $mail->ContentType = 'text/html';
        $mail->SetFrom(Option::get('system_email'));
        $mail->AddReplyTo(Option::get('system_email'));
        $mail->AddAddress($user['email'], $user['login']);
        $mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));
        $mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')->assign('site_url', $site_url)->assign('site_name', $site_name)->assign('user_id', $user['id'])->assign('user_login', $user['login'])->assign('new_hash', $new_hash)->assign('email_template', 'reset-password')->render());
        $mail->Send();
        // Set notification
        Notification::set('success', __('Your login details for :site_name has been sent', 'users', array(':site_name' => $site_name)));
        Notification::set('reset_password', 'reset_password');
        // Redirect to password-reset page
        Request::redirect(Site::url() . '/admin');
    }
    Notification::setNow('reset_password', 'reset_password');
}
// If admin user is login = true then set is_admin = true
if (Session::exists('admin') && Session::get('admin') == true) {
    $is_admin = true;
} else {
    $is_admin = false;
}
// Logout user from system
if (Request::get('logout') && Request::get('logout') == 'do') {
    Session::destroy();
}
// If is admin then load admin area
if ($is_admin) {
开发者ID:rowena-altastratus,项目名称:altastratus,代码行数:31,代码来源:index.php

示例5: __

" name="skype">
		</div>
		<div class="form-group">
			<label><?php 
echo __('About Me', 'users');
?>
</label>
			<textarea class="form-control" name="about_me"><?php 
echo $user['about_me'];
?>
</textarea>
		</div>
		<div class="form-group">
			<label><?php 
echo __('New Password', 'users');
?>
</label>
			<input class="form-control" type="text" name="new_password">
		</div>
		<div class="form-group">
		<input type="submit" class="btn btn-primary" value="<?php 
echo __('Save', 'users');
?>
" name="edit_profile">
		<?php 
echo Html::anchor(__('Cancel', 'users'), Site::url() . '/users/' . Uri::segment(1), array('title' => __('Cancel', 'pages'), 'class' => 'btn btn-default'));
?>
		</div>
		</form>
	</div>
</div>
开发者ID:rowena-altastratus,项目名称:altastratus,代码行数:31,代码来源:edit.view.php

示例6:

<?php

if ($parent) {
    ?>
    <a href="<?php 
    echo Site::url() . '/' . $page['parent'];
    ?>
"><?php 
    echo $parent_page['title'];
    ?>
</a>&nbsp;<span>&rarr;</span>&nbsp;<a href="<?php 
    echo Site::url() . '/' . $page['parent'] . '/' . $page['slug'];
    ?>
"><?php 
    echo $page['title'];
    ?>
</a>
<?php 
} else {
    ?>
    <a href="<?php 
    echo Site::url() . '/' . $page['slug'];
    ?>
"><?php 
    echo $page['title'];
    ?>
</a>
<?php 
}
开发者ID:rowena-altastratus,项目名称:altastratus,代码行数:29,代码来源:breadcrumbs.view.php

示例7: getLogin

 /**
  * Get User login
  */
 public static function getLogin()
 {
     // Is User Loged in ?
     if (!Session::get('user_id')) {
         // Login Form Submit
         if (Request::post('login_submit')) {
             if (Cookie::get('login_attempts') && Cookie::get('login_attempts') >= 5) {
                 Notification::setNow('error', __('You are banned for 10 minutes. Try again later', 'users'));
             } else {
                 // Check csrf
                 if (Security::check(Request::post('csrf'))) {
                     $user = Users::$users->select("[login='" . trim(Request::post('username')) . "']", null);
                     if (count($user) !== 0) {
                         if ($user['login'] == Request::post('username')) {
                             if (trim($user['password']) == Security::encryptPassword(Request::post('password'))) {
                                 if ($user['role'] == 'admin' || $user['role'] == 'editor') {
                                     Session::set('admin', true);
                                 }
                                 Session::set('user_id', (int) $user['id']);
                                 Session::set('user_login', (string) $user['login']);
                                 Session::set('user_role', (string) $user['role']);
                                 Session::set('user_email', (string) $user['email']);
                                 Request::redirect(Site::url() . '/users/' . Session::get('user_id'));
                             } else {
                                 Notification::setNow('error', __('Wrong <b>username</b> or <b>password</b>', 'users'));
                                 if (Cookie::get('login_attempts')) {
                                     if (Cookie::get('login_attempts') < 5) {
                                         $attempts = Cookie::get('login_attempts') + 1;
                                         Cookie::set('login_attempts', $attempts, 600);
                                     } else {
                                         Notification::setNow('error', __('You are banned for 10 minutes. Try again later', 'users'));
                                     }
                                 } else {
                                     Cookie::set('login_attempts', 1, 600);
                                 }
                             }
                         }
                     } else {
                         Notification::setNow('error', __('Wrong <b>username</b> or <b>password</b>', 'users'));
                         if (Cookie::get('login_attempts')) {
                             if (Cookie::get('login_attempts') < 5) {
                                 $attempts = Cookie::get('login_attempts') + 1;
                                 Cookie::set('login_attempts', $attempts, 600);
                             } else {
                                 Notification::setNow('error', __('You are banned for 10 minutes. Try again later', 'users'));
                             }
                         } else {
                             Cookie::set('login_attempts', 1, 600);
                         }
                     }
                 } else {
                     die('Request was denied because it contained an invalid security token. Please refresh the page and try again.');
                 }
             }
         }
         View::factory('box/users/views/frontend/login')->display();
     } else {
         Request::redirect(Site::url() . '/users/' . Session::get('user_id'));
     }
 }
开发者ID:rowena-altastratus,项目名称:altastratus,代码行数:63,代码来源:users.plugin.php

示例8: foreach

if (Session::exists('admin') && Session::get('admin') == true) {
    $is_admin = true;
} else {
    $is_admin = false;
}
// Logout user from system
if (Request::get('logout') && Request::get('logout') == 'do') {
    Session::destroy();
}
// If is admin then load admin area
if ($is_admin) {
    // If id is empty then redirect to default plugin PAGES
    if (Request::get('id')) {
        $area = Request::get('id');
    } else {
        Request::redirect(Site::url() . '/admin/index.php?id=dashboard');
    }
    $plugins_registered = Plugin::$plugins;
    foreach ($plugins_registered as $plugin) {
        $plugins_registered_areas[] = $plugin['id'];
    }
    // Show plugins admin area only for registered plugins
    if (in_array($area, $plugins_registered_areas)) {
        $plugin_admin_area = true;
    } else {
        $plugin_admin_area = false;
    }
    // Backend pre render
    Action::run('admin_pre_render');
    // Display admin template
    require 'themes' . DS . Option::get('theme_admin_name') . DS . 'index.template.php';
开发者ID:Repkit,项目名称:monstra,代码行数:31,代码来源:index.php


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