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


PHP Format::input方法代码示例

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


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

示例1: if

<?php
if(!defined('OSTSCPINC') || !is_object($thisuser) || !$thisuser->isStaff()) die('Acesso Negado');
$info=($_POST && $errors)?Format::input($_POST):array(); //on error...use the post data
?>
<div width="100%">
    <?if($errors['err']) {?>
        <p align="center" id="errormessage"><?=$errors['err']?></p>
    <?}elseif($msg) {?>
        <p align="center" class="infomessage"><?=$msg?></p>
    <?}elseif($warn) {?>
        <p class="warnmessage"><?=$warn?></p>
    <?}?>
</div>
<table width="80%" border="0" cellspacing=1 cellpadding=2>
   <form action="tickets.php" method="post" enctype="multipart/form-data">
    <input type='hidden' name='a' value='open'>
    <tr><td align="left" colspan=2>Por favor, preencha o formulário abaixo para abrir um novo ticket.</td></tr>
    <tr>
        <td align="left" nowrap width="20%"><b>Endereço de E-mail:</b></td>
        <td>
            <input type="text" id="email" name="email" size="25" value="<?=$info['email']?>">
            &nbsp;<font class="error"><b>*</b>&nbsp;<?=$errors['email']?></font>
            <? if($cfg->notifyONNewStaffTicket()) {?>
               &nbsp;&nbsp;&nbsp;
               <input type="checkbox" name="alertuser" <?=(!$errors || $info['alertuser'])? 'checked': ''?>>Alerte o usuário.
            <?}?>
        </td>
    </tr>
    <tr>
        <td align="left" ><b>Nome Completo:</b></td>
        <td>
开发者ID:ricardowarhead,项目名称:osticket_pt_BR,代码行数:31,代码来源:newticket.inc.php

示例2: die

<?php

if (!defined('KTKADMININC') || !$thisuser->isadmin()) {
    die(_('Access Denied'));
}
$info = $errors && $_POST ? Format::input($_POST) : Format::htmlchars($role);
if ($role && $_REQUEST['a'] != 'new') {
    $title = sprintf(_('Edit Role: %s'), $info['dept_access'] == 'SADMIN' ? _('Administrator') : $role['role_name']);
    $action = 'update';
} else {
    $title = _('Add New Role');
    $action = 'create';
    $info['role_enabled'] = isset($info['role_enabled']) ? $info['role_enabled'] : 1;
    //Default to active
}
?>

<form action="admin.php" method="POST" name="role">
  <input type="hidden" name="do" value="<?php 
echo $action;
?>
">
  <input type="hidden" name="a" value="<?php 
echo Format::htmlchars($_REQUEST['a']);
?>
">
  <input type="hidden" name="t" value="roles">
  <input type="hidden" name="role_id" value="<?php 
echo $info['role_id'];
?>
">
开发者ID:jahanzaibbahadur,项目名称:Katak-support,代码行数:31,代码来源:role.inc.php

示例3: die

<?php

if (!defined('OSTCLIENTINC')) {
    die('Access Denied');
}
$email = Format::input($_POST['lemail'] ? $_POST['lemail'] : $_GET['e']);
$ticketid = Format::input($_POST['lticket'] ? $_POST['lticket'] : $_GET['t']);
if ($cfg->isClientEmailVerificationRequired()) {
    $button = __("Email Access Link");
} else {
    $button = __("View Ticket");
}
?>
<div class="container topheader"><div class="row">
<div id="login-overlay">
   <div class="content">
      <div class="modal-header">
         <div class="modal-title lead"><?php 
echo __('Check Ticket Status');
?>
</div>
      </div>
      <div class="modal-body">
         <div class="row">
            <div class="col-xs-6">
               <p class="lead"></span></p>
               <ul class="list-unstyled" style="line-height: 2">
                  <li><span class="fa fa-check text-success"></span><?php 
echo __('Please provide your email address and a ticket number.');
if ($cfg->isClientEmailVerificationRequired()) {
    echo ' ' . __('An access link will be emailed to you.');
开发者ID:majklovec,项目名称:osticket-bootstrap-theme,代码行数:31,代码来源:accesslink.inc.php

示例4: die

<?php

if (!defined('OSTCLIENTINC') || !is_object($thisclient) || !is_object($ticket)) {
    die('Kwaheri');
}
//bye..see ya
//Double check access one last time...
if (strcasecmp($thisclient->getEmail(), $ticket->getEmail())) {
    die('Access Denied');
}
$info = $_POST && $errors ? Format::input($_POST) : array();
//Re-use the post info on error...savekeyboards.org
$dept = $ticket->getDept();
//Making sure we don't leak out internal dept names
$dept = $dept && $dept->isPublic() ? $dept : $cfg->getDefaultDept();
//We roll like that...
?>
<table width="100%" cellpadding="1" cellspacing="0" border="0">
    <tr><td colspan=2 width=100% class="msg">Ticket #<?php 
echo $ticket->getExtId();
?>
 
        &nbsp;<a href="view.php?id=<?php 
echo $ticket->getExtId();
?>
" title="Reload"><span class="Icon refresh">&nbsp;</span></a></td></tr> 
    <tr>
       <td width=50%>	
        <table align="center" class="infotable" cellspacing="1" cellpadding="3" width="100%" border=0>
	        <tr>
				<th width="100" >Ticket Status:</th>
开发者ID:kumarsivarajan,项目名称:ctrl-dock,代码行数:31,代码来源:viewticket.inc.php

示例5: die

<?php

if (!defined('OSTCLIENTINC')) {
    die('Access Denied');
}
$userid = Format::input($_POST['userid']);
?>
<h1><?php 
echo __('Forgot My Password');
?>
</h1>
<p><?php 
echo __('Enter your username or email address in the form below and press the <strong>Send Email</strong> button to have a password reset link sent to your email account on file.');
?>

<form action="pwreset.php" method="post" id="clientLogin">
    <div style="width:50%;display:inline-block">
    <?php 
csrf_token();
?>
    <input type="hidden" name="do" value="sendmail"/>
    <strong><?php 
echo Format::htmlchars($banner);
?>
</strong>
    <br>
    <div>
        <label for="username"><?php 
echo __('Username');
?>
:</label>
开发者ID:dmiguel92,项目名称:osTicket-1.8,代码行数:31,代码来源:pwreset.request.php

示例6: die

<?php

if (!defined('OSTADMININC') || !$thisuser->isadmin()) {
    die($trl->translate("TEXT_ACCESS_DENIED"));
}
$info = $errors && $_POST ? Format::input($_POST) : Format::htmlchars($group);
if ($group && $_REQUEST['a'] != 'new') {
    $title = 'Edit Group: ' . $group['group_name'];
    $action = 'update';
} else {
    $title = 'Add New Group';
    $action = 'create';
    $info['group_enabled'] = isset($info['group_enabled']) ? $info['group_enabled'] : 1;
    //Default to active
}
?>
<table width="100%" border="0" cellspacing=0 cellpadding=0>
 <form action="admin.php" method="POST" name="group">
 <input type="hidden" name="do" value="<?php 
echo $action;
?>
">
 <input type="hidden" name="a" value="<?php 
echo Format::htmlchars($_REQUEST['a']);
?>
">
 <input type="hidden" name="t" value="groups">
 <input type="hidden" name="group_id" value="<?php 
echo $info['group_id'];
?>
">
开发者ID:KingsleyGU,项目名称:OSTicket-Reloaded,代码行数:31,代码来源:group.inc.php

示例7: save

 static function save($id, $vars, &$errors)
 {
     global $cfg;
     if ($id && $id != $_POST['dept_id']) {
         $errors['err'] = _('Missing or invalid Dept ID');
     }
     if (!$_POST['email_id'] || !is_numeric($_POST['email_id'])) {
         $errors['email_id'] = _('Dept email required');
     }
     if (!is_numeric($_POST['tpl_id'])) {
         $errors['tpl_id'] = _('Template required');
     }
     if (!$_POST['dept_name']) {
         $errors['dept_name'] = _('Dept name required');
     } elseif (strlen($_POST['dept_name']) < 4) {
         $errors['dept_name'] = _('Dept name must be at least 4 chars.');
     } else {
         $sql = 'SELECT dept_id FROM ' . DEPT_TABLE . ' WHERE dept_name=' . db_input($_POST['dept_name']);
         if ($id) {
             $sql .= ' AND dept_id!=' . db_input($id);
         }
         if (db_num_rows(db_query($sql))) {
             $errors['dept_name'] = _('Department already exists');
         }
     }
     if ($_POST['ispublic'] && !$_POST['dept_signature']) {
         $errors['dept_signature'] = _('Signature required');
     }
     if (!$_POST['ispublic'] && $_POST['dept_id'] == $cfg->getDefaultDeptId()) {
         $errors['ispublic'] = _('Default department can not be private');
     }
     if (!$errors) {
         $sql = ' SET updated=NOW() ' . ',ispublic=' . db_input($_POST['ispublic']) . ',email_id=' . db_input($_POST['email_id']) . ',tpl_id=' . db_input($_POST['tpl_id']) . ',autoresp_email_id=' . db_input($_POST['autoresp_email_id']) . ',manager_id=' . db_input($_POST['manager_id'] ? $_POST['manager_id'] : 0) . ',dept_name=' . db_input(Format::striptags($_POST['dept_name'])) . ',dept_signature=' . db_input(Format::striptags($_POST['dept_signature'])) . ',ticket_auto_response=' . db_input($_POST['ticket_auto_response']) . ',message_auto_response=' . db_input($_POST['message_auto_response']) . ',can_append_signature=' . db_input(isset($_POST['can_append_signature']) ? 1 : 0);
         if ($id) {
             $sql = 'UPDATE ' . DEPT_TABLE . ' ' . $sql . ' WHERE dept_id=' . db_input($id);
             if (!db_query($sql) || !db_affected_rows()) {
                 $errors['err'] = _('Unable to update ') . Format::input($_POST['dept_name']) . _(' Dept. Error occured');
             }
         } else {
             $sql = 'INSERT INTO ' . DEPT_TABLE . ' ' . $sql . ',created=NOW()';
             if (db_query($sql) && ($deptID = db_insert_id())) {
                 return $deptID;
             }
             $errors['err'] = _('Unable to create department. Internal error');
         }
     }
     return $errors ? false : true;
 }
开发者ID:jahanzaibbahadur,项目名称:Katak-support,代码行数:48,代码来源:class.dept.php

示例8:

    if (!$errors) {
        $thisuser->reload();
        $_SESSION['TZ_OFFSET'] = $thisuser->getTZoffset();
        $_SESSION['daylight'] = $thisuser->observeDaylight();
    }
}
//Tab and Nav options.
$nav->setTabActive('profile');
$nav->addSubMenu(array('desc' => $trl->translate("LABEL_MY_PROFILE"), 'href' => 'profile.php', 'iconclass' => 'user'));
$nav->addSubMenu(array('desc' => $trl->translate("LABEL_PREFERENCES"), 'href' => 'profile.php?t=pref', 'iconclass' => 'userPref'));
$nav->addSubMenu(array('desc' => $trl->translate("LABEL_CHANGE_PASSWORD"), 'href' => 'profile.php?t=passwd', 'iconclass' => 'userPasswd'));
//Warnings if any.
if ($thisuser->onVacation()) {
    $warn .= $trl->translate("TEXT_WELCOME_BACK_VACATION");
}
$rep = $errors && $_POST ? Format::input($_POST) : Format::htmlchars($thisuser->getData());
// page logic
$inc = 'myprofile.inc.php';
switch (strtolower($_REQUEST['t'])) {
    case 'pref':
        $inc = 'mypref.inc.php';
        break;
    case 'passwd':
        $inc = 'changepasswd.inc.php';
        break;
    case 'info':
    default:
        $inc = 'myprofile.inc.php';
}
//Forced password Change.
if ($thisuser->forcePasswdChange()) {
开发者ID:iHunt101,项目名称:OsTicket,代码行数:31,代码来源:profile.php

示例9: email

<?php
if(!defined('SETUPINC')) die('Kwaheri wafiki!');

$info=($errors && $_POST)?Format::input($_POST):array(); //use post data.
   
if(!isset($info['title'])) {
    $info['title']='osTicket :: Support Ticket System';
}
if(!isset($info['dbhost'])) {
    $info['dbhost']='localhost';
}
if(!isset($info['prefix'])) {
    $info['prefix']='ost_';
}


?>
<div style="padding:3px; padding-top:1px; padding-bottom:5px;">
&nbsp;All fields are required.
<form action=install.php method=post name=setup>
<table width="100%" cellspacing="0" cellpadding="2" class="setup">
    <tr class="title"><td colspan=2>osTicket web path and title</td></tr>
    <tr class="subtitle"><td colspan=2>Url to osTicket installation on your server and the title.</td></tr>
    <tr><td width=150>HelpDesk URL:</td><td><b><?=URL?></b></td></tr>
    <tr>
        <td>HelpDesk Title:</td><td><input type=text name=title size=40 value="<?=$info['title']?>">
            &nbsp;<font class="error"><?=$errors['title']?></font></td>
    </tr>
    <tr class="title"><td colspan=2>System email</td></tr>
    <tr class="subtitle"><td colspan=2>Default system email (e.g support@yourdomain.com) You can change or add more emails later.</td></tr>
    <tr><td>Default Email:</td><td><input type=text name=sysemail size=40 value="<?=$info['sysemail']?>">
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:install.inc.php

示例10:

<?php
//Note that ticket is initiated in tickets.php.
if(!defined('OSTSCPINC') || !@$thisuser->isStaff() || !is_object($ticket) ) die('Invalid path');
if(!$ticket->getId() or (!$thisuser->canAccessDept($ticket->getDeptId()) and $thisuser->getId()!=$ticket->getStaffId())) die('Access Denied');

$info=($_POST && $errors)?Format::input($_POST):array(); //Re-use the post info on error...savekeyboards.org

//Auto-lock the ticket if locking is enabled..if locked already simply renew it.
if($cfg->getLockTime() && !$ticket->acquireLock())
    $warn.='Unable to obtain a lock on the ticket';

//We are ready baby...lets roll. Akon rocks! 
$dept  = $ticket->getDept();  //Dept
$staff = $ticket->getStaff(); //Assiged staff.
$lock  = $ticket->getLock();  //Ticket lock obj
$id=$ticket->getId(); //Ticket ID.

if($staff)
    $warn.='&nbsp;&nbsp;<span class="Icon assignedTicket">Ticket is assigned to '.$staff->getName().'</span>';
if(!$errors['err'] && ($lock && $lock->getStaffId()!=$thisuser->getId()))
    $errors['err']='This ticket is currently locked by another staff member!';
if(!$errors['err'] && ($emailBanned=BanList::isbanned($ticket->getEmail())))
    $errors['err']='Email is in banlist! Must be removed before any reply/response';    
if($ticket->isOverdue())
    $warn.='&nbsp;&nbsp;<span class="Icon overdueTicket">Marked overdue!</span>';
    
?>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
    <tr>
        <td class="msg" width=50%>
            Ticket #<?=$ticket->getExtId()?>&nbsp;<a href="tickets.php?id=<?=$id?>" title="Reload"><span class="Icon refresh">&nbsp;</span></a></td>
开发者ID:razagilani,项目名称:Os-Ticketing-System,代码行数:31,代码来源:viewticket.inc.php

示例11: array

    'kb' =>
        array(__('Knowledgebase Settings'), 'settings.kb'),
    'autoresp' =>
        array(__('Autoresponder Settings'), 'settings.autoresponder'),
    'alerts' =>
        array(__('Alerts and Notices Settings'), 'settings.alerts'),
);
//Handle a POST.
$target=($_REQUEST['t'] && $settingOptions[$_REQUEST['t']])?$_REQUEST['t']:'system';
$page = false;
if (isset($settingOptions[$target]))
    $page = $settingOptions[$target];

if($page && $_POST && !$errors) {
    if($cfg && $cfg->updateSettings($_POST,$errors)) {
        $msg=sprintf(__('Successfully updated %s'), Format::htmlchars($page[0]));
    } elseif(!$errors['err']) {
        $errors['err']=__('Unable to update settings - correct errors below and try again');
    }
}

$config=($errors && $_POST)?Format::input($_POST):Format::htmlchars($cfg->getConfigInfo());
$ost->addExtraHeader('<meta name="tip-namespace" content="'.$page[1].'" />',
    "$('#content').data('tipNamespace', '".$page[1]."');");

$nav->setTabActive('settings', ('settings.php?t='.$target));
require_once(STAFFINC_DIR.'header.inc.php');
include_once(STAFFINC_DIR."settings-$target.inc.php");
include_once(STAFFINC_DIR.'footer.inc.php');
?>
开发者ID:KingsleyGU,项目名称:osticket,代码行数:30,代码来源:settings.php

示例12: save

 function save($id, $vars, &$errors)
 {
     global $cfg;
     if ($id && $id != $_POST['dept_id']) {
         $errors['err'] = 'Ausente ou inválido identificação do departamento';
     }
     if (!$_POST['email_id'] || !is_numeric($_POST['email_id'])) {
         $errors['email_id'] = 'E-mail do departamento obrigatório';
     }
     if (!is_numeric($_POST['tpl_id'])) {
         $errors['tpl_id'] = 'Modelo exigido';
     }
     if (!$_POST['dept_name']) {
         $errors['dept_name'] = 'Nome do departamento exigido';
     } elseif (strlen($_POST['dept_name']) < 4) {
         $errors['dept_name'] = 'Nome do departamento deve ter no mínimo 4 caracteres.';
     } else {
         $sql = 'SELECT dept_id FROM ' . DEPT_TABLE . ' WHERE dept_name=' . db_input($_POST['dept_name']);
         if ($id) {
             $sql .= ' AND dept_id!=' . db_input($id);
         }
         if (db_num_rows(db_query($sql))) {
             $errors['dept_name'] = 'Departamento já existe';
         }
     }
     if ($_POST['ispublic'] && !$_POST['dept_signature']) {
         $errors['dept_signature'] = 'Assinatura obrigatória';
     }
     if (!$_POST['ispublic'] && $_POST['dept_id'] == $cfg->getDefaultDeptId()) {
         $errors['ispublic'] = 'Departamento padrão não pode ser privado';
     }
     if (!$errors) {
         $sql = ' SET updated=NOW() ' . ',ispublic=' . db_input($_POST['ispublic']) . ',email_id=' . db_input($_POST['email_id']) . ',tpl_id=' . db_input($_POST['tpl_id']) . ',autoresp_email_id=' . db_input($_POST['autoresp_email_id']) . ',manager_id=' . db_input($_POST['manager_id'] ? $_POST['manager_id'] : 0) . ',dept_name=' . db_input(Format::striptags($_POST['dept_name'])) . ',dept_signature=' . db_input(Format::striptags($_POST['dept_signature'])) . ',ticket_auto_response=' . db_input($_POST['ticket_auto_response']) . ',message_auto_response=' . db_input($_POST['message_auto_response']) . ',can_append_signature=' . db_input(isset($_POST['can_append_signature']) ? 1 : 0);
         if ($id) {
             $sql = 'UPDATE ' . DEPT_TABLE . ' ' . $sql . ' WHERE dept_id=' . db_input($id);
             if (!db_query($sql) || !db_affected_rows()) {
                 $errors['err'] = 'Não é possível atualizar ' . Format::input($_POST['dept_name']) . ' Ocorreu um erro no departamento';
             }
         } else {
             $sql = 'INSERT INTO ' . DEPT_TABLE . ' ' . $sql . ',created=NOW()';
             if (db_query($sql) && ($deptID = db_insert_id())) {
                 return $deptID;
             }
             $errors['err'] = 'Não é possível criar departamento. Erro interno.';
         }
     }
     return $errors ? false : true;
 }
开发者ID:ricardowarhead,项目名称:osticket_pt_BR,代码行数:48,代码来源:class.dept.php

示例13: die

<?php

if (!defined('SETUPINC')) {
    die('Adiaux amikoj!');
}
$info = $errors && $_POST ? Format::input($_POST) : array();
//use post data.
if (!isset($info['title'])) {
    $info['title'] = 'KataK Support - Ticket System';
}
if (!isset($info['dbhost'])) {
    $info['dbhost'] = 'localhost';
}
if (!isset($info['prefix'])) {
    $info['prefix'] = 'ost_';
}
?>
&nbsp;All fields are required.
<form action="upgradeOST.php" method="post" name="setup" id="setup">
<table width="100%" cellspacing="0" cellpadding="2" class="setup">
    <tr class="title"><td colspan=2>Admin user</td></tr>
    <tr class="subtitle"><td colspan=2>Autentication data administrator of the old osTicket system.</td></tr>
    <tr>
        <td colspan=2>
         <table border=0 cellspacing=0 cellpadding=2 class="clean">
            <tr><td width=150>Username:</td>
                <td><input type=text name=username size=20 value="<?php 
echo $info['username'];
?>
">
                    &nbsp;<span class="error"><?php 
开发者ID:jahanzaibbahadur,项目名称:Katak-support,代码行数:31,代码来源:upgradeOST.inc.php

示例14: die

<?php

if (!defined('KTKUSERINC')) {
    die('Adiaux amikoj!');
}
$e = Format::input($_POST['username'] ? $_POST['username'] : $_GET['e']);
?>
<div>
    <?php 
if ($errors['err']) {
    ?>
        <p id="errormessage"><?php 
    echo $errors['err'];
    ?>
</p>
    <?php 
} elseif ($warn) {
    ?>
        <p class="warnmessage"><?php 
    echo $warn;
    ?>
</p>
    <?php 
}
?>
</div>
<div style="margin:5px 0px 100px 0; width:100%;">
    <p>
        <?php 
echo _("To insert or view the status of a ticket, provide us with your login data below.<br/>If you don't have username and password, please ask at the customer service.");
?>
开发者ID:jahanzaibbahadur,项目名称:Katak-support,代码行数:31,代码来源:clientlogin.inc.php

示例15: die

<?php

if (!defined('OSTCLIENTINC')) {
    die('Access Denied');
}
$email = Format::input($_POST['luser'] ?: $_GET['e']);
$passwd = Format::input($_POST['lpasswd'] ?: $_GET['t']);
$content = Page::lookup(Page::getIdByType('banner-client'));
if ($content) {
    list($title, $body) = $ost->replaceTemplateVariables(array($content->getName(), $content->getBody()));
} else {
    $title = 'Sign In';
    $body = 'To better serve you, we encourage our clients to register for
        an account and verify the email address we have on record.';
}
?>
<h1><?php 
echo Format::display($title);
?>
</h1>
<p><?php 
echo Format::display($body);
?>
</p>
<form action="login.php" method="post" id="clientLogin">
    <?php 
csrf_token();
?>
<div style="display:table-row">
    <div style="width:40%;display:table-cell;box-shadow: 12px 0 15px -15px rgba(0,0,0,0.4);padding:15px;">
    <strong><?php 
开发者ID:ed00m,项目名称:osTicket-1.8,代码行数:31,代码来源:login.inc.php


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