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


PHP messages函数代码示例

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


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

示例1: iroffer

function iroffer($bot)
{
    global $_CONFIG;
    try {
        $conn = new IROFFER($bot->host(), $bot->port(), $bot->password(), $_CONFIG['iroffer_timeout']);
    } catch (IROFFER_ERROR $error) {
        messages()->error($error->getMessage());
        header("Location: " . view('main'));
        exit(0);
    }
    return $conn;
}
开发者ID:KasaiDot,项目名称:phpIrofferAdmin,代码行数:12,代码来源:functions.php

示例2: display

function display($page)
{
    global $tpl, $_PARAMS, $_ACTION, $_CONFIG;
    $tpl->assign('action', $_ACTION);
    $tpl->assign('ROOT', ROOT);
    $tpl->assign('subpage', '');
    $tpl->assign('params', $_PARAMS);
    $tpl->assign('config', $_CONFIG);
    $tpl->assign('messages', messages());
    $tpl->assign('user', user());
    $tpl->inheritance_merge_compiled_includes = false;
    $tpl->display($page);
}
开发者ID:KasaiDot,项目名称:phpIrofferAdmin,代码行数:13,代码来源:template.php

示例3: create

 public static function create($name, $host, $port, $password, $user_id)
 {
     if (db()->query("INSERT INTO bots (name, host, port, password) VALUES (" . db()->quote($name) . "," . db()->quote($host) . "," . db()->quote($port) . "," . db()->quote($password) . ")")) {
         $id = db()->lastInsertId();
         db()->query("INSERT INTO `bot_user` (`bot_id`, `user_id`) VALUES (" . db()->quote($id) . "," . db()->quote($user_id) . ")") or die(dberror());
     } else {
         $query = db()->query("SELECT id FROM bots WHERE " . "host=" . db()->quote($host) . " AND " . "port=" . db()->quote($port) . " AND " . "password=" . db()->quote($password)) or die(dberror());
         if ($data = $query->fetch()) {
             db()->query("INSERT INTO `bot_user` (`bot_id`, `user_id`) VALUES (" . db()->quote($data['id']) . "," . db()->quote($user_id) . ")") or die(dberror());
         } else {
             messages()->error(_('couple (host, port) already used and wrong password'));
         }
     }
 }
开发者ID:KasaiDot,项目名称:phpIrofferAdmin,代码行数:14,代码来源:bot.php

示例4: prepareViewResponse

 /**
  * @param $request
  * @param $response
  *
  * @return View
  */
 protected function prepareViewResponse($request, $response)
 {
     $controllerClassName = $request->route()->getAction()['controller'];
     $controllerClassName = substr($controllerClassName, 0, strpos($controllerClassName, '@'));
     $controller = app()->make($controllerClassName);
     $layout = $controller->getLayout();
     /** @var View $response */
     list($response, $sections) = $response->render(function ($view, $contents) use($layout) {
         return [view($layout, ['html' => $contents, '_originalTemplateName' => $view->getName()], $view->getData()), $view->getFactory()->getSections()];
     });
     if (is_array($sections)) {
         foreach ($sections as $sectionId => $sectionContent) {
             $response->getFactory()->startSection($sectionId, $sectionContent);
         }
     }
     if ($request instanceof Request && ($request->wantsJson() || $request->has('callback'))) {
         $response = ['messages' => messages()->all(), 'title' => !empty($response['title']) ? $response['title'] : null, 'data' => array_except($response->getData(), 'html'), 'response' => ['html' => $response['html'], 'sections' => array_except(array_merge((array) $sections, $response->renderSections()), '__content')]];
         if ($request->has('callback')) {
             $response = $request->get('callback') . '(' . json_encode($response) . ')';
         }
     }
     return $response;
 }
开发者ID:portonefive,项目名称:essentials,代码行数:29,代码来源:Router.php

示例5: overlay

 /**
  * @param        $message
  * @param        $title
  * @param string $class
  *
  * @return \PortOneFive\Essentials\Messaging\MessageManager
  */
 function overlay($message, $title, $class = 'info')
 {
     return messages()->overlay($message, $title, $class);
 }
开发者ID:portonefive,项目名称:essentials,代码行数:11,代码来源:helpers.php

示例6: changed_location

			$('#point_select').show();
			$('#route_select').hide();
		};
	}
	
	function changed_location() {
		$('#route1').load('ajax/ajax_routes.php?lid='+$('#location_id').val());
		$('#sp1').load('ajax/ajax_points.php?type=sp&lid='+$('#location_id').val());
		$('#ep1').load('ajax/ajax_points.php?type=ep&lid='+$('#location_id').val());
	}
</script>

<h1>{t t='Request a Ride'}</h1>

<?php 
messages($msgs, $errors);
?>

<form action="request.php" method="get">

	<fieldset>  
	<legend>{t t='Main Info'}</legend>

	<ol>
	
	<li>	
	<label for="user_number_id">{t t='Phone number'}</label>
	<?php 
global $user;
echo c2r_getHmtlSelectUserNumbers($user->id);
?>
开发者ID:smarti04,项目名称:open-carpool,代码行数:31,代码来源:request.php

示例7: iroffer

<?php

/*
* This file is part of phpIrofferAdmin.
*
* (c) 2013 Valentin Samir
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
require "includes/controler.php";
if ($_PARAMS['bot'] !== false) {
    $conn = iroffer($_PARAMS['bot']);
    $tpl->assign('groups', $conn->xdl($group_only = true));
    $files = $conn->listul($_PARAMS['path']);
    if (is_array($files)) {
        $tpl->assign('files', $files);
    } else {
        if (preg_match('/Can\'t Access Directory: (.*) Not a directory/', $files, $match)) {
            messages()->error(sprintf(_('%s is not a directory'), str_replace('//', '/', $match[1])));
        } else {
            messages()->error($files);
        }
        $_PARAMS['path'] = dirname($_PARAMS['path']);
        header('Location: ' . view('files_listing', $_PARAMS));
        die;
    }
    display("templates/bot_listul.tpl");
} else {
    header("Location: " . view('main'));
}
开发者ID:KasaiDot,项目名称:phpIrofferAdmin,代码行数:31,代码来源:bot_listul.php

示例8: user_load

<?php

if ($_SESSION['uid']) {
    $user = user_load($_SESSION['uid']);
    messages('Hello ' . $user->name);
}
开发者ID:hubgit,项目名称:user,代码行数:6,代码来源:index.php

示例9: function

require 'config/db.php';
require 'model/user.php';
require 'model/message.php';
$app = new Slim\App();
$app->get('/', function ($request, $response, $args) {
    $response->write("Welcome to Slim!");
    return $response;
});
$app->get('/hello[/{name}]', function ($request, $response, $args) {
    $response->write("Hello, " . $args['name']);
    return $response;
})->setArgument('name', 'World!');
$app->get('/user/{id}', function ($request, $response, $args) {
    $newResponse = $response->withHeader('Content-type', 'application/json');
    $newResponse->write(json_encode(getUser(getDbConnection(), $args['id'])));
    return $newResponse;
});
$app->get('/messages', function ($request, $response, $args) {
    $newResponse = $response->withHeader('Content-type', 'application/json');
    $queryParams = $request->getQueryParams();
    if (isset($queryParams['lat']) || isset($queryParams['lng'])) {
        $lat = $queryParams['lat'];
        $lng = $queryParams['lng'];
        $messages = messagesWithLatLng(getDbConnection(), $lat, $lng);
    } else {
        $messages = messages(getDbConnection());
    }
    $newResponse->write(json_encode($messages));
    return $newResponse;
});
$app->run();
开发者ID:puuga,项目名称:opennote-api,代码行数:31,代码来源:api.php

示例10: messages

                      <li><?php 
echo " UserID: " . $userID . "";
?>
</li>
                      <li><?php 
echo "Logged in as: " . $username . "";
?>
</ul>
</div>
<!-- END NAV -->

<div id="content">

<?php 
//show any messages if there are any.
messages();
?>

<h1>Manage Events</h1>

<table>
<tr>
	<th><strong>Title</strong></th>
	<th><strong>Action</strong></th>
</tr>

<?php 
// Query här: Matcha pages på user inloggad.
$sql = mysqli_query($conn, "SELECT * FROM pages WHERE userID='{$userID}' ORDER BY pageID");
while ($row = mysqli_fetch_object($sql)) {
    echo "<tr>";
开发者ID:arielrova,项目名称:mittrum,代码行数:31,代码来源:index.php

示例11: skin_include

// -------------------------- BODY HEADER INCLUDED HERE --------------------------
skin_include('_body_header.inc.php');
// Note: You can customize the default BODY header by copying the generic
// /skins/_body_header.inc.php file into the current skin folder.
// -------------------------------- END OF BODY HEADER ---------------------------
// -------------------------- LEFT NAVIGATION BAR INCLUDED HERE ------------------
skin_include('_left_navigation_bar.inc.php');
// -------------------------------- END OF LEFT NAVIGATION BAR -------------------
?>

<!-- =================================== START OF MAIN AREA =================================== -->
<div class="bPosts">

	<?php 
// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
messages(array('block_start' => '<div class="action_messages">', 'block_end' => '</div>'));
// --------------------------------- END OF MESSAGES ---------------------------------
?>

	<?php 
// ------------------------ TITLE FOR THE CURRENT REQUEST ------------------------
request_title(array('title_before' => '<h1 class="page_title">', 'title_after' => '</h1>', 'title_single_disp' => false, 'title_page_disp' => false, 'format' => 'htmlbody', 'edit_text_create' => T_('Post a new topic'), 'edit_text_update' => T_('Edit post'), 'category_text' => '', 'categories_text' => '', 'catdir_text' => ''));
// ----------------------------- END OF REQUEST TITLE ----------------------------
?>

	<?php 
// Display message if no post:
display_if_empty();
echo '<div id="styled_content_block">';
// Beginning of posts display
if ($Item =& mainlist_get_item()) {
开发者ID:b2evolution,项目名称:manual_skin,代码行数:31,代码来源:single.main.php

示例12: deletionHasSucceed

 /**
  * Response when content deletion has succeed.
  *
  * @param  \Orchestra\Story\Model\Content  $content
  *
  * @return mixed
  */
 public function deletionHasSucceed(Content $content)
 {
     messages('success', 'Post has been deleted.');
     return redirect(handles('orchestra::storycms/posts'));
 }
开发者ID:dinghua,项目名称:crm,代码行数:12,代码来源:PostsController.php

示例13: userHasLoggedOut

 /**
  * Response to user has logged out successfully.
  *
  * @return mixed
  */
 public function userHasLoggedOut()
 {
     messages('success', trans('orchestra/foundation::response.credential.logged-out'));
     return Redirect::intended(handles(Input::get('redirect', 'orchestra::login')));
 }
开发者ID:azraai,项目名称:foundation,代码行数:10,代码来源:CredentialController.php

示例14: admin_messages_admin_main

function admin_messages_admin_main($var)
{
    $op = pnVarCleanFromInput('op');
    if (!pnSecAuthAction(0, 'Messages::', '::', ACCESS_EDIT)) {
        include 'header.php';
        echo _MESSAGESNOAUTH;
        include 'footer.php';
    } else {
        switch ($op) {
            case "messages":
                messages();
                break;
            case "editmsg":
                editmsg();
                break;
            case "addmsg":
                addmsg();
                break;
            case "deletemsg":
                deletemsg();
                break;
            case "savemsg":
                savemsg();
                break;
            default:
                messages();
                break;
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:30,代码来源:admin.php

示例15: usersMenus

	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');
	include_once('ressources/class.artica.inc');
	include_once('ressources/class.ini.inc');
	include_once('ressources/class.spamassassin.inc');
	include_once('ressources/class.mime.parser.inc');
	include_once(dirname(__FILE__).'/ressources/class.rfc822.addresses.inc');
	$user=new usersMenus();
		if($user->AsPostfixAdministrator==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}
	
	if(isset($_GET["tabs"])){tabs();exit;}
	if(isset($_GET["messages"])){messages();exit;}
	if(isset($_GET["add"])){messages_add();exit;}
	if(isset($_POST["upload-message"])){message_upload();exit;}
	if(isset($_GET["messages-list"])){messages_list();exit;}
	if(isset($_GET["show-results"])){message_results();exit;}
	if(isset($_GET["analyze-message"])){message_analyze();exit;}
	if(isset($_GET["delete-message"])){message_delete();exit;}
	
	
js();


function js(){
	
	$tpl=new templates();
	$page=CurrentPageName();
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:31,代码来源:spamassassin.analyze.php


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