本文整理汇总了PHP中yourls_html_head函数的典型用法代码示例。如果您正苦于以下问题:PHP yourls_html_head函数的具体用法?PHP yourls_html_head怎么用?PHP yourls_html_head使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yourls_html_head函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: show404
function show404($shorturl)
{
yourls_status_header(404);
yourls_html_head('page404', 'This page does not exist');
yourls_html_logo();
?>
<div class="main-column">
<div class="panel panel-teaser">
<div class="panel-header">
<h1>Page Not Found</h1>
</div>
<div class="panel-body">
<p>Leider konnten wir keine Adresse unter dem Kürzel <strong><?php
echo $shorturl;
?>
</strong> finden.
Das bedeutet, dass diese Kurz-URL nicht existiert.
</div>
</div>
</div>
<div class="sidebar-column">
<div class="panel panel-sidebar">
<h2>Über den Kurz-URL-Dienst</h2>
<div class="panel-body">
<span class="caret"></span>
<p>Auf der Website <?php
echo $_SERVER['SERVER_NAME'];
?>
lassen sich Kurzlinks
zu Ressourcen der <a href="http://www.uni-frankfurt.de/">Goethe-Universität Frankfurt</a>
erstellen. <a href="/">Zur Startseite</a>
</div>
</div>
</div>
<?php
yourls_html_footer();
}
开发者ID:mimischi,项目名称:gu-urlshorter,代码行数:43,代码来源:404.php
示例2: GetPasswordForm
function GetPasswordForm()
{
yourls_html_head('preview', 'Short URL preview');
$form = <<<HTML
<section>\t\t\t\t
<div id="container_demo" >
<div id="wrapper">
\t\t\t\t<form method="post" action="{$url}">
\t\t\t\t\t<p class="text">
\t\t\t\t\t\t<strong>Provide Password</strong><br /><input type="text" id="submit-pass" name="pass" value="" class="text" size="40" />
\t\t\t\t\t<p class="login button">
\t\t\t\t\t\t<input type="submit" />
\t\t\t\t\t</p>
\t\t\t\t</form>
</div>
</div>
</section>
HTML;
//yourls_html_footer();
return $form;
}
开发者ID:idemirel,项目名称:YOURLS-Password-Protected-Links,代码行数:21,代码来源:plugin.php
示例3: ozh_preview_show
function ozh_preview_show($keyword)
{
require_once YOURLS_INC . '/functions-html.php';
yourls_html_head('preview', 'Short URL preview');
yourls_html_logo();
$title = yourls_get_keyword_title($keyword);
$url = yourls_get_keyword_longurl($keyword);
$base = YOURLS_SITE;
$char = OZH_PREVIEW_CHAR;
echo <<<HTML
<h2>Link Preview</h2>
<p>You requested the short URL <strong><a href="{$base}/{$keyword}">{$base}/{$keyword}</a></strong></p>
<p>This short URL points to:</p>
<ul>
<li>Long URL: <strong><a href="{$base}/{$keyword}">{$url}</a></strong></li>
<li>Page title: <strong>{$title}</strong></li>
</ul>
<p>If you still want to visit this link, please <strong><a href="{$base}/{$keyword}">click here</a></strong>.</p>
<p>Thank you for using our shortening service.</p>
HTML;
yourls_html_footer();
}
开发者ID:Efreak,项目名称:YOURLS,代码行数:23,代码来源:plugin.php
示例4: session_start
session_start();
include "../../../includes/load-yourls.php";
include "muhtmlfunctions.php";
if (YOURLS_PRIVATE === false) {
die;
// NO DIRECT CALLS IF PUBLIC!
}
$act = $_GET['act'];
if ($act == "logout") {
$_SESSION['user'] = "";
unset($_SESSION);
unset($_SESSION["user"]);
$error_msg = "Signed off.";
}
if (!isLogged()) {
yourls_html_head('login');
mu_html_menu();
// Login form
switch ($act) {
case "login":
$username = yourls_escape($_POST['username']);
$password = $_POST['password'];
if (!empty($username) && !empty($password)) {
if (isValidUser($username, $password)) {
$token = getUserTokenByEmail($username);
$id = getUserIdByToken($token);
$_SESSION['user'] = array("id" => $id, "user" => $username, "token" => $token);
yourls_redirect("index.php");
} else {
$error_msg = "Problems to login.";
require_once 'form.php';
开发者ID:Efreak,项目名称:YOURLS,代码行数:31,代码来源:index.php
示例5: str_replace
<?php
// Make sure we're in YOURLS context
if (!defined('YOURLS_ABSPATH')) {
// Attempt to guess URL via YOURLS
$url = 'http://' . $_SERVER['HTTP_HOST'] . str_replace(array('/pages/', '.php'), array('/', ''), $_SERVER['REQUEST_URI']);
echo "Try this instead: <a href='{$url}'>{$url}</a>";
die;
}
// Display page content. Any PHP, HTML and YOURLS function can go here.
$url = YOURLS_SITE . '/credits';
yourls_html_head('credits', 'Credits');
yourls_html_logo();
?>
<div class="main-column">
<div class="panel panel-teaser">
<div class="panel-header">
<h1>Über den KurzURL-Dienst an der Goethe-Universität</h1>
</div>
<div class="panel-body">
<p>Dieser Kurz-URL-Dienst entstand auf Initiative durch Studenten des Projektes
<a href="http://riedberg.tv">RiedbergTV</a>, welches durch den
<a href="http://www.studiumdigitale.uni-frankfurt.de/elf/self15/index.html">studentischen eLearning-Förderfonds (SeLF) 2015/16</a>
finanziert wird. Mit <a href="http://www.studiumdigitale.uni-frankfurt.de">Studiumdigitale</a>
besitzt dieser Kurz-URL-Dienst einen Partner, der die langfristige Funktion dieses Dienstes
garantieren kann.
<p>Mit dem <a href="http://th.physik.uni-frankfurt.de">Institut für theoretische Physik</a>
haben wir einen weiteren Unterstützer, der den reibungslosen technischen Betrieb dieses Dienstes
bestärkt. Betrieben wird dieser Dienst durch das
<a href="http://elearning.physik.uni-frankfurt.de/projekt">eLearning-Projekt des Fachbereichs Physik</a>.
开发者ID:mimischi,项目名称:gu-urlshorter,代码行数:31,代码来源:credits.php
示例6: yourls_create_sql_tables
if (yourls_create_htaccess()) {
$success[] = 'File <tt>.htaccess</tt> successfully created/updated.';
} else {
$warning[] = 'Could not write file <tt>.htaccess</tt> in YOURLS root directory. You will have to do it manually. See <a href="http://yourls.org/htaccess">how</a>.';
}
// Create SQL tables
$install = yourls_create_sql_tables();
if (isset($install['error'])) {
$error = array_merge($error, $install['error']);
}
if (isset($install['success'])) {
$success = array_merge($success, $install['success']);
}
}
// Start output
yourls_html_head('install', 'Install YOURLS');
?>
<div id="login">
<form method="post" action="?"><?php
// reset any QUERY parameters
?>
<p>
<img src="<?php
echo YOURLS_SITE;
?>
/images/yourls-logo.png" alt="YOURLS" title="YOURLS" />
</p>
<?php
// Print errors, warnings and success messages
foreach (array('error', 'warning', 'success') as $info) {
if (count(${$info}) > 0) {
开发者ID:469306621,项目名称:Languages,代码行数:31,代码来源:install.php
示例7: yourls__
if (yourls_create_htaccess()) {
$success[] = yourls__('File <tt>.htaccess</tt> successfully created/updated.');
} else {
$warning[] = yourls__('Could not write file <tt>.htaccess</tt> in YOURLS root directory. You will have to do it manually. See <a href="http://yourls.org/htaccess">how</a>.');
}
// Create SQL tables
$install = yourls_create_sql_tables();
if (isset($install['error'])) {
$error = array_merge($error, $install['error']);
}
if (isset($install['success'])) {
$success = array_merge($success, $install['success']);
}
}
// Start output
yourls_html_head('install', yourls__('Install YOURLS'));
?>
<div id="login">
<form method="post" action="?"><?php
// reset any QUERY parameters
?>
<p>
<img src="<?php
yourls_site_url();
?>
/images/yourls-logo.png" alt="YOURLS" title="YOURLS" />
</p>
<?php
// Print errors, warnings and success messages
foreach (array('error', 'warning', 'success') as $info) {
if (count(${$info}) > 0) {
开发者ID:steenhulthin,项目名称:hult.in,代码行数:31,代码来源:install.php
示例8: ceil
$max_on_page = $total_items;
} else {
$max_on_page = $offset + $perpage;
}
// Determine Number Of Items To Display On Page
if ($offset + 1 > $total_items) {
$display_on_page = $total_items;
} else {
$display_on_page = $offset + 1;
}
// Determing Total Amount Of Pages
$total_pages = ceil($total_items / $perpage);
}
// Begin output of the page
$context = $is_bookmark ? 'bookmark' : 'index';
yourls_html_head($context);
yourls_html_logo();
yourls_html_menu();
yourls_do_action('admin_page_before_content');
if (!$is_bookmark) {
?>
<p><?php
echo $search_sentence;
?>
</p>
<p><?php
printf(yourls__('Display <strong>%1$s</strong> to <strong class="increment">%2$s</strong> of <strong class="increment">%3$s</strong> URLs'), $display_on_page, $max_on_page, $total_items);
if ($total_items_clicks !== false) {
echo ", " . sprintf(yourls_n('counting <strong>1</strong> click', 'counting <strong>%s</strong> clicks', $total_items_clicks), yourls_number_format_i18n($total_items_clicks));
}
?>
开发者ID:yourls,项目名称:yourls,代码行数:31,代码来源:index.php
示例9: print_r
echo "<pre>";
echo "referrers: "; print_r( $referrers );
echo "referrer sort: "; print_r( $referrer_sort );
echo "direct: $direct\n";
echo "notdirect: $notdirect\n";
echo "dates: "; print_r( $dates );
echo "list of days: "; print_r( $list_of_days );
echo "list_of_months: "; print_r( $list_of_months );
echo "list_of_years: "; print_r( $list_of_years );
echo "last_24h: "; print_r( $last_24h );
//echo "countries: "; print_r( $countries );
die();
/**/
}
yourls_html_head('infos', 'Statistics for ' . YOURLS_SITE . '/' . $keyword);
yourls_html_logo();
yourls_html_menu();
?>
<h2 id="informations"><?php
echo $title;
?>
</h2>
<h3><span class="label">Short URL:</span> <img src="<?php
echo YOURLS_SITE;
?>
/images/favicon.gif"/>
<?php
if ($aggregate) {
开发者ID:TheProjecter,项目名称:yourls-ext,代码行数:31,代码来源:yourls-infos.php
示例10: define
<?php
define('YOURLS_ADMIN', true);
define('YOURLS_NO_UPGRADE_CHECK', true);
// Bypass version checking to prevent loop
require_once dirname(dirname(__FILE__)) . '/includes/load-yourls.php';
require_once YOURLS_INC . '/functions-upgrade.php';
require_once YOURLS_INC . '/functions-install.php';
yourls_maybe_require_auth();
yourls_html_head('upgrade', 'Upgrade YOURLS');
yourls_html_logo();
yourls_html_menu();
?>
<h2>Upgrade YOURLS</h2>
<?php
// Check if upgrade is needed
if (!yourls_upgrade_is_needed()) {
echo '<p>Upgrade not required. Go <a href="' . yourls_admin_url('index.php') . '">back to play</a>!</p>';
} else {
/*
step 1: create new tables and populate them, update old tables structure,
step 2: convert each row of outdated tables if needed
step 3: - if applicable finish updating outdated tables (indexes etc)
- update version & db_version in options, this is all done!
*/
// From what are we upgrading?
if (isset($_GET['oldver']) && isset($_GET['oldsql'])) {
$oldver = yourls_sanitize_version($_GET['oldver']);
$oldsql = yourls_sanitize_version($_GET['oldsql']);
} else {
list($oldver, $oldsql) = yourls_get_current_version_from_sql();
开发者ID:469306621,项目名称:Languages,代码行数:31,代码来源:upgrade.php
示例11: define
<?php
define('YOURLS_ADMIN', true);
require_once dirname(dirname(__FILE__)) . '/includes/load-yourls.php';
yourls_maybe_require_auth();
yourls_html_head('tools', 'Cool YOURLS Tools');
yourls_html_logo();
yourls_html_menu();
?>
<div class="sub_wrap">
<h2>Bookmarklets</h2>
<p>YOURLS comes with <span>four</span> handy <span>bookmarklets</span> for easier link shortening.</p>
<h3>Standard or Instant, Simple or Custom</h3>
<ul>
<li>The <span>Standard Bookmarklets</span> will take you to a page where you can easily edit or delete your brand new short URL.</li>
<li>The <span>Instant Bookmarklets</span> will pop the short URL without leaving the page you are viewing.</li>
<li>The <span>Simple Bookmarklets</span> will generate a short URL with a random or sequential keyword</li>
<li>The <span>Custom Keyword Bookmarklets</span> will prompt you for a custom keyword first</li>
</ul>
<p>With the Standard Bookmarklets you will also get a <span>Quick Share</span> tool box to make posting to Twitter, Facebook or Friendfeed a snap. If you want to share a description along with the link you're shortening, simply <span>select text</span> on the page you're viewing before clicking on your bookmarklet link</p>
<h3>The Bookmarklets</h3>
开发者ID:469306621,项目名称:Languages,代码行数:31,代码来源:tools.php
示例12: yourls_create_sql_tables
if (yourls_create_htaccess()) {
$success[] = 'File <tt>.htaccess</tt> successfully created/updated.';
} else {
$warning[] = 'Could not write file <tt>.htaccess</tt> in YOURLS root directory. You will have to do it manually. See <a href="http://yourls.org/htaccess">how</a>.';
}
// Create SQL tables
$install = yourls_create_sql_tables();
if (isset($install['error'])) {
$error = array_merge($error, $install['error']);
}
if (isset($install['success'])) {
$success = array_merge($success, $install['success']);
}
}
// Start output
yourls_html_head('install');
?>
<div id="login">
<form method="post" action="?"><?php
// reset any QUERY parameters
?>
<p>
<img src="<?php
echo YOURLS_SITE;
?>
/images/yourls-logo.png" alt="YOURLS" title="YOURLS" />
</p>
<?php
// Print errors, warnings and success messages
foreach (array('error', 'warning', 'success') as $info) {
if (count(${$info}) > 0) {
开发者ID:rmontero,项目名称:dla_ecommerce_site,代码行数:31,代码来源:install.php
示例13: str_replace
<?php
// Make sure we're in YOURLS context
if (!defined('YOURLS_ABSPATH')) {
// Attempt to guess URL via YOURLS
$url = 'http://' . $_SERVER['HTTP_HOST'] . str_replace(array('/pages/', '.php'), array('/', ''), $_SERVER['REQUEST_URI']);
echo "Try this instead: <a href='{$url}'>{$url}</a>";
die;
}
// Display page content. Any PHP, HTML and YOURLS function can go here.
$url = YOURLS_SITE . '/infos';
yourls_html_head('infos', 'Informationen über YOURLS an der Goethe-Universität');
yourls_html_logo();
?>
<div class="main-column">
<div class="panel panel-teaser">
<div class="panel-header">
<h1>Der Kurz-URL-Dienst an der Goethe-Universität</h1>
</div>
<div class="panel-body">
<?php
$host = $_SERVER['HTTP_HOST'];
$hostlink = "<a href='{$host}'>{$host}</a>";
?>
<p>Willkommen beim Kurz-URL-Dienst an der <a href="http://www.uni-frankfurt.de">Goethe-Universität Frankfurt am Main</a>.
<p>Sie erreichen diesen Dienst unter folgenden Adressen:
<ul>
<li> <a href="http://tinygu.de">tinygu.de</a> </li>
<li> <a href="http://goethe.link">goethe.link</a> </li>
</ul></p>
开发者ID:mimischi,项目名称:gu-urlshorter,代码行数:31,代码来源:infos.php
示例14: print_r
echo "<pre>";
echo "referrers: "; print_r( $referrers );
echo "referrer sort: "; print_r( $referrer_sort );
echo "direct: $direct\n";
echo "notdirect: $notdirect\n";
echo "dates: "; print_r( $dates );
echo "list of days: "; print_r( $list_of_days );
echo "list_of_months: "; print_r( $list_of_months );
echo "list_of_years: "; print_r( $list_of_years );
echo "last_24h: "; print_r( $last_24h );
//echo "countries: "; print_r( $countries );
die();
/**/
}
yourls_html_head('infos');
yourls_html_logo();
yourls_html_menu();
?>
<h2 id="informations">Information</h2>
<h3>Short URL: <img src="<?php
echo YOURLS_SITE;
?>
/images/favicon.gif"/>
<?php
if ($aggregate) {
$i = 0;
foreach ($keyword_list as $k) {
$i++;
开发者ID:momoim,项目名称:momo-api,代码行数:31,代码来源:yourls-infos.php
示例15: dirname
<?php
// Require Files
require_once dirname(dirname(__FILE__)) . '/includes/load-yourls.php';
yourls_maybe_require_auth();
yourls_html_head('tools');
?>
<h1>
<a href="<?php
echo YOURLS_SITE;
?>
/admin/index.php" title="YOURLS"><span>YOURLS</span>: <span>Y</span>our <span>O</span>wn <span>URL</span> <span>S</span>hortener<br/>
<img src="<?php
echo YOURLS_SITE;
?>
/images/yourls-logo.png" alt="YOURLS" title="YOURLS" style="border: 0px;" /></a>
</h1>
<?php
if (yourls_is_private()) {
?>
<p>Your are logged in as: <strong><?php
echo YOURLS_USER;
?>
</strong>. <a href="?mode=logout" title="Logout">Logout</a></p>
<?php
}
?>
<div id="tools_desc">
<h2>Bookmarklet</h2>
开发者ID:rmontero,项目名称:dla_ecommerce_site,代码行数:31,代码来源:tools.php
示例16: action_auth_successful
/**
* Yourls action auth_successful
*
* @return bool
*/
public function action_auth_successful()
{
if (!yourls_is_admin()) {
return true;
}
/**
* Check page permissions
*/
if (preg_match('#\\/admin\\/(.*?)\\.php#', $_SERVER['SCRIPT_FILENAME'], $matches)) {
if (!in_array($matches[1], $this->helperGetAllowedPermissions())) {
yourls_add_notice(yourls__('Denied access to this page', self::APP_NAMESPACE));
yourls_html_head('accessdenied', yourls__('Denied access to this page', self::APP_NAMESPACE));
yourls_html_logo();
yourls_html_menu();
yourls_html_footer();
die;
}
}
/**
* Check action permissions
*/
if (yourls_is_Ajax()) {
$action = $this->getRequest('action');
$permissions = $this->helperGetAllowedPermissions();
$bol = false;
switch ($action) {
case 'edit_display':
case 'edit_save':
if (!in_array('edit', $permissions['action'])) {
$bol = true;
}
break;
case 'add':
case 'delete':
if (!in_array($action, $permissions['action'])) {
$bol = true;
}
break;
}
if ($bol) {
$this->setRequest('action_old', $action);
$this->setRequest('action', 'accessdenied');
}
}
}
开发者ID:laemmi,项目名称:laemmi-yourls-easy-ldap,代码行数:50,代码来源:Plugin.php
示例17: yourls__
}
} else {
$result = yourls__('No plugin specified, or not a valid plugin');
}
yourls_add_notice($result);
}
// Handle message upon succesfull (de)activation
if (isset($_GET['success']) && ($_GET['success'] == 'activated' or $_GET['success'] == 'deactivated')) {
if ($_GET['success'] == 'activated') {
$message = yourls__('Plugin has been activated');
} elseif ($_GET['success'] == 'deactivated') {
$message = yourls__('Plugin has been deactivated');
}
yourls_add_notice($message);
}
yourls_html_head('plugins', yourls__('Manage Plugins'));
yourls_html_logo();
yourls_html_menu();
?>
<h2><?php
yourls_e('Plugins');
?>
</h2>
<?php
$plugins = (array) yourls_get_plugins();
uasort($plugins, 'yourls_plugins_sort_callback');
$count = count($plugins);
$plugins_count = sprintf(yourls_n('%s plugin', '%s plugins', $count), $count);
$count_active = yourls_has_active_plugins();
开发者ID:steenhulthin,项目名称:hult.in,代码行数:31,代码来源:plugins.php
示例18: yourls_plugin_admin_page
/**
* Handle plugin administration page
*
*/
function yourls_plugin_admin_page($plugin_page)
{
global $ydb;
// Check the plugin page is actually registered
if (!isset($ydb->plugin_pages[$plugin_page])) {
yourls_die('This page does not exist. Maybe a plugin you thought was activated is inactive?', 'Invalid link');
}
// Draw the page itself
yourls_do_action('load-' . $plugin_page);
yourls_html_head('plugin_page_' . $plugin_page, $ydb->plugin_pages[$plugin_page]['title']);
yourls_html_logo();
yourls_html_menu();
call_user_func($ydb->plugin_pages[$plugin_page]['function']);
yourls_html_footer();
die;
}
开发者ID:469306621,项目名称:Languages,代码行数:20,代码来源:functions-plugins.php
示例19: yourls_add_notice
default:
$result = 'Unsupported action';
break;
}
} else {
$result = 'No plugin specified, or not a valid plugin';
}
yourls_add_notice($result);
}
// Handle message upon succesfull (de)activation
if (isset($_GET['success'])) {
if ($_GET['success'] == 'activated' or $_GET['success'] == 'deactivated') {
yourls_add_notice('Plugin ' . $_GET['success']);
}
}
yourls_html_head('plugins', 'Manage Plugins');
yourls_html_logo();
yourls_html_menu();
?>
<h2>Plugins</h2>
<?php
$plugins = (array) yourls_get_plugins();
$count = count($plugins);
$count_active = yourls_has_active_plugins();
?>
<p id="plugin_summary">You currently have <strong><?php
echo $count . ' ' . yourls_plural('plugin', $count);
?>
开发者ID:469306621,项目名称:Languages,代码行数:31,代码来源:plugins.php
示例20: define
<?php
define('YOURLS_ADMIN', true);
require_once dirname(dirname(__FILE__)) . '/includes/load-yourls.php';
yourls_maybe_require_auth();
yourls_html_head('tools', yourls__('Cool YOURLS Tools'));
yourls_html_logo();
yourls_html_menu();
?>
<div class="sub_wrap">
<h2><?php
yourls_e('Bookmarklets');
?>
</h2>
<p><?php
yourls_e('YOURLS comes with <span>four</span> handy <span>bookmarklets</span> for easier link shortening.');
?>
</p>
<h3><?php
yourls_e('Standard or Instant, Simple or Custom');
?>
</h3>
<ul>
<li><?php
yourls_e('The <span>Standard Bookmarklets</span> will take you to a page where you can easily edit or delete your brand new short URL.');
?>
开发者ID:GasmoN,项目名称:yourls,代码行数:31,代码来源:tools.php
注:本文中的yourls_html_head函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论