本文整理汇总了PHP中i函数的典型用法代码示例。如果您正苦于以下问题:PHP i函数的具体用法?PHP i怎么用?PHP i使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了i函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct($SET)
{
$this->id = i();
html::addJsFile(sysURL . 'core/js/qgSettingsEditor.js');
$this->SET = $SET;
$_SESSION['qgSettingsEditor roots'][$SET->i] = 1;
}
开发者ID:atifzaidi,项目名称:shwups-cms,代码行数:7,代码来源:qgSettingsEditor.class.php
示例2: index
public function index($start = 0)
{
$this->load->library("admin");
$this->session->set_userdata("URL_BACK", uri_string());
$items = ITEMS_POR_PAG;
$this->load->library("admin");
$items_lista = crearConsulta("SELECT p FROM " . $this->entityStr . " p");
$this->load->library('pagination');
$config['base_url'] = site_url($this->ctrlPath . "/index");
$config['total_rows'] = count($items_lista->execute());
$config['per_page'] = $items;
$config['uri_segment'] = 3;
//1->Controlador, 2->Metodo, 3 en adelante son los argumentos
$this->pagination->initialize($config);
$items_lista->setMaxResults($items)->setFirstResult($start);
$this->admin->listado($items_lista->execute());
$this->admin->campos($this->camposTabla);
$this->admin->id("id");
$this->admin->titulos($this->titulosTabla);
if ($this->accionesDefault) {
$this->acciones = array("agregar" => array("url" => $this->ctrlPath . "agregar"), "editar" => array("url" => $this->ctrlPath . "/editar", "texto" => icon("fa-pencil") . " Editar", "propiedades" => array("class" => "btn-primary")), "eliminar" => array("texto" => i("", array("class" => "glyphicon glyphicon-remove")) . " Eliminar", "url" => $this->ctrlPath . "/eliminar", "propiedades" => array("class" => "eliminar_link btn-danger")));
}
$this->admin->acciones($this->acciones);
if ($this->vistaPre !== NULL) {
$this->admin->agregarVistaPre($this->vistaPre, $this->datosPre);
}
$this->admin->titulo($this->tituloMaestro);
$this->admin->show();
}
开发者ID:josercl,项目名称:forum,代码行数:29,代码来源:MY_Admin_controller.php
示例3: render
public function render()
{
// Here comes the rendering process
//classes
$footerClass = "impressum stdanimation1_2";
//array mit link, icon, label
// mit i übersetzen
$footerArray[] = array("link" => "index.php?view=impressum", "icon" => "icon_house_alt", "label" => "Impressum");
$footerArray[] = array("link" => "index.php?view=contact", "icon" => "icon_tag", "label" => "Contact");
$footerArray[] = array("link" => "index.php?view=version", "icon" => "icon_profile", "label" => "Shop version");
$footerArray[] = array("link" => "index.php?view=support", "icon" => "icon_gift", "label" => "Support");
$footerList = "";
//create a list item for every array found
$footerList = "";
foreach ($footerArray as $footerpoint) {
//do translation
$footerpoint["label"] = i($footerpoint["label"]);
$footerList .= '
<div class="' . $footerClass . '" ><a href="' . $footerpoint["link"] . '">' . $footerpoint["label"] . '</a></div>
';
}
return $footerList;
/*
return '<div class="impressum stdanimation1_2">Impressum</div>
<div class="impressum stdanimation1_2">Kontakt</div>
<div class="impressum stdanimation1_2">Shopversion</div>
<div class="impressum stdanimation1_2">Über uns</div>
<div class="impressum stdanimation1_2">Support Hotline</div>';
*/
}
开发者ID:Makae,项目名称:ch.bfh.bti7054.w2014.q.groot,代码行数:32,代码来源:viewlet.footer.php
示例4: notifyNewArgument
public function notifyNewArgument(Question $q, Argument $a)
{
global $sDB, $sTimer, $sTemplate;
$sTimer->start("notifyNewArgument");
$res = $sDB->exec("SELECT `notifications`.`userId`, `notifications`.`flags`, `users`.`email`, `users`.`userName` FROM `notifications`\n LEFT JOIN `users` ON `users`.`userId` = `notifications`.`userId`\n WHERE `questionId` = '" . i($q->questionId()) . "';");
while ($row = mysql_fetch_object($res)) {
// no notifications for our own arguments.
/*if($a->userId() == $row->userId)
{
continue;
}*/
$uId = new BaseConvert($row->userId);
$qId = new BaseConvert($q->questionId());
$profileUrl = $sTemplate->getShortUrlBase() . "u" . $uId->val();
$unfollowUrl = $sTemplate->getShortUrlBase() . "f" . $qId->val();
$url = $a->shortUrl();
if (!SHORTURL_BASE) {
$profileUrl = $sTemplate->getRoot() . "user/" . $row->userId . "/";
$unfollowUrl = $sTemplate->getRoot() . "unfollow.php?qId=" . $q->questionId();
$url = $a->fullurl();
}
$subject = $sTemplate->getString("NOTIFICATION_NEW_ARGUMENT_SUBJECT");
$message = $sTemplate->getString("NOTIFICATION_NEW_ARGUMENT_BODY", array("[USERNAME]", "[AUTHOR]", "[URL]", "[QUESTION]", "[ARGUMENT]", "[UNFOLLOW_URL]", "[PROFILE_URL]"), array($row->userName, $a->author(), $url, $q->title(), $a->headline(), $unfollowUrl, $profileUrl));
$this->sendMail($row->email, "", $subject, $message);
}
$sTimer->stop("notifyNewArgument");
}
开发者ID:PiratenparteiHessen,项目名称:wikiarguments,代码行数:27,代码来源:notificationMgr.php
示例5: __construct
/**
* constructor
*/
public function __construct()
{
$this->major = self::getVersion(i(self::VERSION_PART_MAJOR));
$this->minor = self::getVersion(i(self::VERSION_PART_MINOR));
$this->revision = self::getVersion(i(self::VERSION_PART_REVISION));
$this->build = self::getVersion(i(self::VERSION_PART_BUILD));
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:10,代码来源:FrameworkVersion.class.php
示例6: Argument
public function Argument($argumentId, $row = false, $parent = false)
{
global $sDB, $sQuery;
if (!$row) {
$res = $sDB->exec("SELECT * FROM `arguments` WHERE `argumentId` = '" . i($argumentId) . "' LIMIT 1;");
$row = mysql_fetch_object($res);
}
if (!$row) {
$this->argumentId = -1;
return;
}
$this->argumentId = $argumentId;
$this->questionId = $row->questionId;
$this->parentId = $row->parentId;
$this->parent = $parent;
$this->userId = $row->userId;
$this->username = $sQuery->getUsernameById($row->userId);
$this->headline = $row->headline;
$this->abstract = $row->abstract;
$this->details = $row->details;
$this->dateAdded = $row->dateAdded;
$this->type = $row->type;
$this->score = $row->score;
$this->url = $row->url;
$this->timeSince = timeSinceString($row->dateAdded);
$this->arguments = array();
}
开发者ID:PiratenparteiHessen,项目名称:wikiarguments,代码行数:27,代码来源:argument.php
示例7: new_dropoff_transaction
function new_dropoff_transaction()
{
$s = q("insert into transaction values('', NULL, '', CURDATE());");
if (a() > 0) {
return i();
}
return false;
}
开发者ID:mwcs01,项目名称:openpantry,代码行数:8,代码来源:transaction.lib.php
示例8: create_aid
function create_aid($name)
{
$s = q("insert into aid values('','" . clean_query($name) . "','0');");
if (a() > 0) {
return i();
}
return false;
}
开发者ID:mwcs01,项目名称:openpantry,代码行数:8,代码来源:food_source.lib.php
示例9: create_product
function create_product($name, $quantity)
{
$s = q("insert into product values('', '" . $name . "', '" . $quantity . "');");
if (a() > 0) {
return i();
}
return false;
}
开发者ID:mwcs01,项目名称:openpantry,代码行数:8,代码来源:inventory.lib.php
示例10: remove
public function remove(Charcoal_Integer $index, Charcoal_Integer $length = NULL)
{
if (!$length) {
$length = i(1);
}
$index = $index->getValue();
$length = $length->getValue();
return array_splice($this->values, $index, $length);
}
开发者ID:stk2k,项目名称:charcoalphp2,代码行数:9,代码来源:Vector.class.php
示例11: getTranslatedGenres
public static function getTranslatedGenres()
{
$list = static::findList(null, array('id', 'key'));
$genres = array();
foreach ($list as $row) {
$genres[] = array('value' => $row['id'], 'label' => i('db_genre_key_' . $row['key']));
}
return $genres;
}
开发者ID:Makae,项目名称:ch.bfh.bti7054.w2014.q.groot,代码行数:9,代码来源:class.genre.php
示例12: param
function param($name, $default_value = false)
{
global $QUERY;
$return = i($QUERY, $name);
if (!$return and $default_value === false) {
die("Neccessary Parameter Missing: {$name}");
}
return $return;
}
开发者ID:makeadiff,项目名称:exdon,代码行数:9,代码来源:application.php
示例13: array_to_string
function array_to_string($result)
{
$data = i('IP,PING次数,掉包量' . "\n");
//栏目名称
$size_result = sizeof($result);
for ($i = 0; $i < $size_result; $i++) {
$data .= i($result[$i]['IP']) . ',' . i($result[$i]['PING']) . ',' . i($result[$i]['TIME_OUT']) . "\n";
}
return $data;
}
开发者ID:hongweipeng,项目名称:screen,代码行数:10,代码来源:lossRateAllPcExport.php
示例14: question
public function question()
{
$LoginLogic = D('Login', 'Logic');
$studentID = $LoginLogic->apiLoginCheck();
$paperID = I('post.paperID');
$num = i('post.q');
$examLogic = D('Exam', 'Logic');
$question = $examLogic->getQuestion($paperID, $num);
$this->ajaxReturn($question);
}
开发者ID:keifergu,项目名称:OnlineExam,代码行数:10,代码来源:IndexController.class.php
示例15: ajaxWiki
public function ajaxWiki()
{
$query = isset($_REQUEST['query']) ? $_REQUEST['query'] : null;
$result = Utilities::wiki($query);
if (!$result) {
$result = i('We could not find a suitable wikipedia article');
}
// we will return the value as json encoded content
return json_encode(array('query' => $query, 'wiki' => $result));
}
开发者ID:Makae,项目名称:ch.bfh.bti7054.w2014.q.groot,代码行数:10,代码来源:view.ajax.php
示例16: ajax_check_name
/**
* 验证用户名是否存在
*/
public function ajax_check_name()
{
$name = i('username', '', 'trim');
$id = i('id', 0, 'intval');
if ($this->_mod->name_exists($name, $id)) {
echo 0;
} else {
echo 1;
}
}
开发者ID:hello7921,项目名称:haorizi,代码行数:13,代码来源:AdminController.class.php
示例17: _getShowCase
private function _getShowCase($genre, $page = 0, $size = 4)
{
$books = $this->_getBooksByGenre($genre, $page, $size);
$num_books = Core::instance()->getDb()->countBookyByGenre($genre);
if (count($books) == 0) {
return null;
}
$args = array('books' => $books, 'style' => 'showcase', 'text_details' => i('To the details'), 'navigation' => true, 'prev_hidden' => $num_books <= $size, 'next_hidden' => count($books) < $size, 'config' => urlencode(json_encode(array('page' => $page, 'size' => $size, 'request' => Controller::instance()->getViewUrl() . '&ajax=1&ajax_fn=nextShowcasePage&page={%page%}&size={%size%}&genre=' . $genre))));
return TemplateRenderer::instance()->extendedRender('theme/templates/snippets/showcase.html', $args);
}
开发者ID:Makae,项目名称:ch.bfh.bti7054.w2014.q.groot,代码行数:10,代码来源:view.genres.php
示例18: array_to_string
function array_to_string($result)
{
$data = i('网络,机房,PING_IP,掉包数,掉包率(%)' . "\n");
//栏目名称
$size_result = sizeof($result);
for ($i = 0; $i < $size_result; $i++) {
$data .= i($result[$i]['NAME']) . ',' . i($result[$i]['MROOM_NAME']) . ',' . i($result[$i]['PING_IP']) . ',' . i($result[$i]['TIME_OUT']) . ',' . i($result[$i]['PREC_TIME_OUT']) . "\n";
}
return $data;
}
开发者ID:hongweipeng,项目名称:screen,代码行数:10,代码来源:ip500lossRateExport.php
示例19: array_to_string
function array_to_string($result)
{
$data = i('用户名,时长(分钟),流入(MB),流出(MB),总流量(MB),主要流量分布' . "\n");
//栏目名称
$size_result = sizeof($result);
for ($i = 0; $i < $size_result; $i++) {
$data .= i($result[$i]['VPN_USER']) . ',' . i($result[$i]['TOTALTIME']) . ',' . i($result[$i]['SEND_BYTES']) . ',' . i($result[$i]['RECEIVE_BYTES']) . ',' . i($result[$i]['TOTALBYTES']) . ',' . i($result[$i]['REMARKS']) . "\n";
}
return $data;
}
开发者ID:hongweipeng,项目名称:screen,代码行数:10,代码来源:userVpnTotalFlowExport.php
示例20: index
public function index()
{
/*页面跳转选项*/
//$this->redirect('edit','',3,'跳转界面');
//$this->success('跳转成功',U('User/login'),3);
//$this->error('出错了,跳转失败',U('User/login'),5);
//$this->ajaxReturn(getTestdata(),'xml');
/*获取输入变量*/
$server = i('server.HTTP_HOST');
dump($server);
}
开发者ID:Catheryan,项目名称:thinkphp,代码行数:11,代码来源:UserController.class.php
注:本文中的i函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论