本文整理汇总了PHP中tg函数的典型用法代码示例。如果您正苦于以下问题:PHP tg函数的具体用法?PHP tg怎么用?PHP tg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
public static function load()
{
if (tg('ajax') != "0") {
// exit('ajax exist');
include_once AFFICH_REP . 'layout/ajax.php';
} else {
include_once AFFICH_REP . 'layout/base.php';
}
}
示例2: index
public function index()
{
global $db;
if (!$db->Query("SELECT titr" . LANG . " as titre ,cont" . LANG . " as content, aut" . LANG . " as autor, id,img,img_d,app,slider,DATE_FORMAT(dat, '%d/%m/%Y ') as dat ,video from contenu where id=" . tg('id') . " and titr" . LANG . " IS NOT NULL and modul=9 order by id DESC limit 0,3")) {
$db->Kill('Error5');
}
if ($db->RowCount() > 0) {
$result = $db->RowArray();
return $result;
}
}
示例3: load
public static function load()
{
$msg_ajax = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\AJAX";
$msg_app = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\APP";
$msg_file = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\FILE";
$msg_perm = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\PERMISSION_USER";
$msg_sess = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\SESSION_USER";
//Check if is Ajax request
if (empty($_SERVER['HTTP_X_REQUESTED_WITH']) && tg('_tsk') !== 'shopdf') {
exit(msgbox($msg_ajax, 0, './', 5));
}
global $db;
Cookie::auto_lastexec('time');
Cookie::auto_logout('time', 600);
//Cookie::session_autoclosed();
//Start check APP
if (tg('_tsk') == '0') {
exit("3#{$msg_app}");
}
$app_id = tg('_tsk');
if (!$db->Query("SELECT * FROM task where app='" . $app_id . "' ")) {
$db->Kill($db->Error());
}
if ($db->RowCount() == 0) {
exit("3#{$msg_app}");
}
$array = $db->RowArray();
$appc_idc = $array['id'];
$needsession = $array['session'];
$app_rep = $array['rep'];
$app_file = $array['file'];
$array_godapp = array(1, 2, 3, 4, 5, 6, 11, 21, 43, 49, 56, 57, 58, 59, 70, 130, 138, 157);
if ($needsession == 1 && !isset($_SESSION['userid'])) {
exit("3#{$msg_sess}");
}
if (!in_array($appc_idc, $array_godapp)) {
$sql = "SELECT * FROM permission_users where perm=1 and appid=" . $appc_idc . " and userid=" . $_SESSION['userid'];
if (!$db->Query($sql)) {
$db->Kill($db->Error());
}
if ($db->RowCount() <= 0) {
exit("3#{$msg_perm}");
}
}
if (!file_exists(CONTROLLER_REP . $app_rep . SLASH . $app_file . '_c.php')) {
exit("3#{$msg_file}");
}
define('ACTIV_APP', $array['dscrip']);
define('MODUL_APP', $array['modul']);
define('APP_ID', $array['id']);
require_once CONTROLLER_REP . SLASH . $app_rep . SLASH . $app_file . '_c.php';
}
示例4: load
public static function load($view_rep, $view_file)
{
if (tg('_tsk') == 'news') {
$instance = new news();
$array = $instance->index();
}
if (isset($array)) {
$titre = lg('TITR') . ' | ' . $array['titre'];
$content = htmlentities($array['titre']);
$image = "http://{$_SERVER['HTTP_HOST']}" . criimg_link('upload/news/' . $array['img'], 200, 200, 'PNG');
$actual_link = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
} else {
$titre = lg('TITR');
$content = 'Site Internet Officiel de la présidence de la République du Tchad.';
$image = './img/header.jpg';
$actual_link = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
}
include_once AFFICH_REP . 'layout/header.php';
include_once AFFICH_REP . 'layout/limen.php';
include_once AFFICH_REP . $view_rep . SLASH . $view_file . '_v.php';
}
示例5: load
public static function load()
{
if (isset($_SESSION['userid'])) {
if (tg('ajax') == 1) {
$template = (include_once AFFICH_REP . 'layout/ajax.php');
} else {
//Il faut voir si le service est outside of ONAPE utiliser mainoutside.php
if (isset($_SESSION['service']) && cryptage(session::get('service'), 0) == 19) {
$template = (include_once AFFICH_REP . 'layout/main_outside.php');
} else {
$template = (include_once AFFICH_REP . 'layout/main.php');
}
}
// $this->template = include_once(AFFICH_REP.'layout/main.php');
} else {
if (tg('ajax') == 1) {
$template = (include_once AFFICH_REP . 'layout/ajax.php');
} else {
$template = (include_once AFFICH_REP . 'layout/mainns.php');
}
}
//end else
}
示例6: define
<?php
if (tp('q') != '' && tg('s') == 0) {
define('POST', tp('q'));
header('location:././?_tsk=recherche&m=2&s=' . POST);
} else {
if (tg('s') !== 0) {
define('POST', tg('s'));
} else {
exit(header('location:./'));
}
}
if (strlen(POST) < 3) {
msgbox(lg('RECHERR'), 0, './', 4);
} else {
view::load('page', 'recherche');
}
示例7: lg
<div class="one_half" id="contact1">
<?php
global $db;
if (tg('id') != 0) {
if (!$db->Query("SELECT id , titr" . LANG . " as titre ,cont" . LANG . " as content, id,img,app,video,document from contenu where id = " . tg('id') . " and titrfr IS NOT NULL and modul=2 order by id DESC ")) {
$db->Kill('Error5');
}
} else {
if (!$db->Query("SELECT id , titr" . LANG . " as titre ,cont" . LANG . " as content, id,img,app,video,document from contenu where titrfr IS NOT NULL and modul=2 order by id DESC limit 0,1")) {
$db->Kill('Error5');
}
}
if ($db->RowCount() > 0) {
$array = $db->RowArray();
$id = $array['id'];
chang_title($array['titre']);
?>
<!-- ################################################################################################ -->
<h1 class="heading"> <?php
echo lg('COMPRES');
?>
</h1>
<article>
<p style="color:#55ABDA;font-size: 25px;text-align: center;line-height: 45px;"><?php
echo $array['titre'];
?>
</p>
示例8: tg
}
});
});
</script>
<div class="login-container">
<div class="well-login">
<form novalidate="novalidate" method="post" id="signupform" action="./?_tsk=recovery&ajax=1&tb=1">
<fieldset>
<input name="verif" type="hidden" value="1" />
<input name="token" type="hidden" value="<?php
echo tg('token');
?>
" />
<div class="alert alert-info">
<strong> réinitialisation !</strong> veuillez insérer et confirmer votre nouveau mot de passe.
</div>
<div class="control-group">
<div class="controls">
<div>
<input id="psw1" name="psw1" type="password" placeholder="Mot de passe" class="input-xlarge login-input user-pass" value="">
</div>
</div>
</div>
<div class="control-group">
<div class="controls">
<div>
示例9: tg
<?php
global $db;
$sql = "SELECT * FROM mail where id= " . tg('usrid');
if (!$db->Query($sql)) {
$db->Kill($sql);
}
if ($db->RowCount() > 0) {
$array = $db->RowArray();
}
?>
<script type="text/javascript">
function ajax_loadmessage($msg,$time,$c) {
jQuery("#message")
.show(500) // You can change .show to .fadeIn or some other animation
.css("margin", "0 1px 20px 0")
.html($msg)
.delay($time)
.attr("class",$c)
.fadeOut($time);
jQuery("#horizontalLine")
.css("margin", "-7px 0 50px 0");
}
$(function () {
// validate signup form on keyup and submit
var validator1 = $("#signupform").validate({
rules: {
nom: "required",
示例10:
}
});
});
</script>
<?php
//Contenu de la page
global $db;
if (!$db->Query("SELECT * FROM lienu where id=" . tg('id'))) {
$db->Kill('Error1');
}
$array = $db->RowArray();
?>
<div class="breadcrumbs" id="breadcrumbs">
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i>
<a href="./">Tableau de bord</a>
<span class="divider">
<i class="icon-angle-right arrow-icon"></i>
</span>
</li>
示例11: DISTINCT
$sql = "select DISTINCT(ets_diplom.ets)as lenom from ets_diplom where ets LIKE {$q}";
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if (tg('t') == "f") {
$sql = "select DISTINCT(diplome)as lenom from diplomes where diplome LIKE {$q}";
}
if (!$db->Query($sql)) {
$db->Kill('');
}
while (!$db->EndOfSeek()) {
$row = $db->Row();
$cname = $row->lenom;
//$leid = $row->id;
echo "{$cname}\n";
}
?>
示例12: tg
<?php
//Suppression ligne
if (tg('del') != 0) {
$sqladdby = "Select addby from noteservice where noteservice.id=" . tg('del');
$userss = $_SESSION['userid'];
$useradd = $db->QuerySingleValue0($sqladdby);
if ($userss != $useradd) {
// Autorisation test
exit("2");
}
model::load('note', 'note');
if (!delet(tg('del'))) {
//Function error
exit("1");
}
// Succes function
exit("0");
}
if (tg('srch') == 0) {
view::load('note', 'note');
} else {
view::load('note', 'notesrch');
}
示例13: while
?>
résultats</p>
</div>
<?php
if ($db->RowCount() > 0) {
$totalrow = $db->RowCount();
// nombre d'enregistrement dans une table retourner par mysql_num_rows() par exemple ou autre ,
if (!$db->Query("SELECT titr" . LANG . " as titre ,id,app,cont" . LANG . " as content from " . $mode . " where titr" . LANG . " like '%" . $post . "%' or cont" . LANG . " like '%" . $post . "%' limit " . ($pagination->get_page() - 1) * $records_per_page . ', ' . $records_per_page)) {
$db->Kill('Error1s');
}
$pagination->records($totalrow);
$pagination->records_per_page($records_per_page);
while (!$db->EndOfSeek()) {
$row = $db->Row();
$applic = $row->app;
if (tg('m') == 4) {
$mode = 'com';
}
?>
<div id="act" style="height:auto; max-height:93; min-height:35;">
<a class="titactp" href="./<?php
echo $mode . '-' . $row->id . '-' . fl($row->titre) . '.html';
?>
">
<div class="attribute-title">
<p><?php
echo limitmot($row->titre, 10);
?>
...</p>
</div>
<div class="attribute-short">
示例14: DAY
}
if (tp('jour') != 0) {
$wher .= " and DAY(dat) = " . tp('jour');
}
if (tp('motcle') != '') {
$wher .= " and titr" . LANG . " LIKE '%" . tp('motcle') . "%'";
}
if (tp('mois') != 0) {
$wher .= " and MONTH(dat) = " . tp('mois');
}
if (!$db->Query("SELECT id , titr" . LANG . " as titre ,document ,dat from contenu where titr" . LANG . " IS NOT NULL and modul=" . tg('id') . " {$wher} order by id DESC ")) {
$db->Kill('Error1s');
}
if ($db->RowCount() > 0) {
$totalrow = $db->RowCount();
if (!$db->Query("SELECT id , titr" . LANG . " as titre ,document , dat from contenu where titr" . LANG . " IS NOT NULL and modul=" . tg('id') . " {$wher} order by id DESC limit " . ($pagination->get_page() - 1) * $records_per_page . ', ' . $records_per_page)) {
$db->Kill('Error1s');
}
$pagination->records($totalrow);
$pagination->records_per_page($records_per_page);
?>
<div class="sidebar">
<!-- ################################################################################################ -->
<article>
<nav class="sdb_holder">
<ul>
<?php
while (!$db->EndOfSeek()) {
$row = $db->Row();
示例15: addcollecte
$montant = $cycle_v * $array['montant'];
if ($datetime3 > $datetime4 or $datetime3 == $datetime4) {
addcollecte($id_contrat, date('Y-m-d-', strtotime($date_start)), date('Y-m-d-', strtotime($date_end)), $montant, "Payé", date('Y-m-d-', strtotime($date_start)));
} else {
addcollecte($id_contrat, date('Y-m-d-', strtotime($date_start)), date('Y-m-d-', strtotime($date_end)), $montant, "Non Payé", '');
}
}
// $reponse = 'ok';
exit("1#Opération réussie");
//Success Opération
}
}
if (tp('del') == 1) {
global $db;
$id_contrat = tp('lin');
$idvil = tg('id');
$nbr_collecte = $db->QuerySingleValue0("select count(id) from collecte where id_location={$id_contrat}");
model::load('gestionvilla', 'contralocatvila');
if ($nbr_collecte > 0) {
if (!deletcollecte($id_contrat)) {
exit("2#Erreur Système COL");
}
if (!deletcontrat($id_contrat)) {
exit("2#Erreur Système CON");
}
if (!$db->Query("update villa set contrat=0,statut=0 where id=" . $idvil)) {
exit("2#Erreur Système VIL");
}
exit("1#Opération réussie");
} else {
if (!deletcontrat($id_contrat)) {