本文整理汇总了PHP中tp函数的典型用法代码示例。如果您正苦于以下问题:PHP tp函数的具体用法?PHP tp怎么用?PHP tp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tp函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: compare_date
function compare_date($idcontrat, $date_resiliation)
{
global $db;
$date_resiliation = date('Y-m-d-', strtotime($date_resiliation));
if (!$db->Query("SELECT * from contrat_location_villa where id=" . tp('idcontrat'))) {
$db->Kill($db->Error());
}
$array = $db->RowArray();
if ($date_resiliation > $array['date_debut'] && $date_resiliation < $array['date_fin']) {
return true;
} else {
return false;
}
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:14,代码来源:resiliercontrat_m.php
示例2: tp
<?php
if (tp('verif') == 1) {
global $db;
$depense_id = tp('depense1');
model::load('depense', 'paiement_dep');
if (!add_paiement_dep($depense_id, tp('ficheid'), tp('pjsid'), tp('ncheque'), tp('remarque'))) {
exit("2#Erreur Système");
} else {
exit("1#Enregistrement réussi");
}
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:12,代码来源:paiement_dep_c.php
示例3: exit
<?php
if (tp('verif') == 1) {
model::load('synthese', 'editsynthese');
if (!editsyn(tp('titrfr'), tp('titren'), tp('titrar'), tp('contfr'), tp('conten'), tp('contar'), tp('id'), tp('dat'))) {
exit("0");
} else {
exit("1");
}
} else {
view::load('synthese', 'editsynthese');
}
开发者ID:ATS001,项目名称:PRSIT,代码行数:11,代码来源:editsynthese_c.php
示例4: DateTime
<?php
if (tp('verif') == 1) {
global $db;
//Check if id corespond nom
$datedebut = new DateTime(tp('date_debut'));
$datefin = new DateTime(tp('date_fin'));
if ($datedebut >= $datefin) {
exit("0");
}
model::load('recette', 'editlocation');
if (!editlocation(tp('id'), tp('nom'), tp('adresse'), tp('pjid'), tp('tel'), tp('email'), tp('villa'), tp('date_debut'), tp('date_fin'), tp('type_paiement'), tp('montant_location'), tp('agarantie_location'))) {
exit("1");
} else {
exit("2");
}
} else {
view::load('recette', 'editlocation');
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:19,代码来源:editlocation_c.php
示例5: tp
<?php
if (tp('verif') == 1) {
//verif si il y a une image.
if (tp('photoid') != '') {
$img = tp('photoid');
} else {
$img = '';
}
$nextid = getnextidtable('contenu');
model::load('contenu', 'addcontenu');
if (!addcontenu(tp('titrfr'), tp('titren'), tp('titrar'), tp('contfr'), tp('conten'), tp('contar'), tp('modul'), $img, $nextid, tp('vod'), tp('fileuploadid'), tp('dat'))) {
exit("0");
} else {
exit("1");
}
} else {
view::load('contenu', 'addcontenu');
}
开发者ID:ATS001,项目名称:PRSIT,代码行数:19,代码来源:addcontenu_c.php
示例6: pagination
?>
</h1>
<?php
global $db;
$records_per_page = 100;
$pagination = new pagination();
if (!$db->Query("SELECT id , titr" . LANG . " as titre ,document ,dat , modul from contenu where titr" . LANG . " LIKE '%" . tp('mot') . "%' or cont" . LANG . " LIKE '%" . tp('mot') . "%' 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 , modul from contenu where titr" . LANG . " LIKE '%" . tp('mot') . "%' or cont" . LANG . " LIKE '%" . tp('mot') . "%' 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();
开发者ID:ATS001,项目名称:PRSIT,代码行数:31,代码来源:rechercher_v.php
示例7: tp
<?php
global $db;
if (tp('del') == 1) {
$id_villa = tp('lin');
//Check if have contrat
$nbr_contrat = $db->QuerySingleValue0("select count(id) from contrat_location_villa where idvilla= {$id_villa} ");
if ($nbr_contrat > 0) {
exit("2#{$nbr_contrat}");
}
model::load('gestionvilla', 'gestionvilla');
//Execute Model
if (!delet($id_villa)) {
exit("3");
//Error opération
} else {
exit("1");
//Success Opération
}
}
$nextid = getnextidtable('contrat_location_villa');
$session = new session();
$session->set('nextid', $nextid);
view::load('gestionvilla', 'gestionvilla');
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:24,代码来源:gestionvilla_c.php
示例8: tp
//Success Opération
}
} else {
if (tp('show') == 1) {
$id_vod = tp('lin');
model::load('vod', 'vod');
//Execute Model
if (!showvod($id_vod)) {
exit("2#Erreur Système");
//Error opération
} else {
exit("1#Suppression réussie");
//Success Opération
}
} else {
if (tp('arch') == 1) {
$id_vod = tp('lin');
model::load('vod', 'vod');
//Execute Model
if (!archvod($id_vod)) {
exit("2#Erreur Système");
//Error opération
} else {
exit("1#Suppression réussie");
//Success Opération
}
} else {
view::load('vod', 'vod');
}
}
}
开发者ID:ATS001,项目名称:PRSIT,代码行数:31,代码来源:vod_c.php
示例9: cryptage
<?php
if (tp('verif') == 1) {
$service = cryptage($_SESSION['service'], 0);
$usrid = $_SESSION['userid'];
model::load('admin', 'editcompte');
if (tp('password') != null) {
if (!$db->Query("SELECT * FROM users_sys where id={$usrid} and pass='" . md5(tp('passwordi')) . "'")) {
$db->Kill('Error1');
}
if ($db->RowCount() > 0) {
if (!edituser(tp('firstname'), tp('lastname'), tp('password'), tp('tel'), tp('email'))) {
exit("2");
} else {
exit("1");
}
} else {
exit("3");
}
} else {
if (!edituser(tp('firstname'), tp('lastname'), tp('password'), tp('tel'), tp('email'))) {
exit("2");
} else {
exit("1");
}
}
} else {
view::load('admin', 'editcompte');
}
开发者ID:ATS001,项目名称:MRN,代码行数:29,代码来源:editcompte_c.php
示例10: tp
<?php
// function dynselect($nam,$tabl,$id,$ord, $txt,$indx=NULL,$class=NULL,$selected=NULL,$multi=NULL,$where=NULL )
//Usage get select Articl par chapitre
if (tp('tab') == "artic") {
$table = tp('id');
$output = '<label class="control-label">Article :</label> <div class="controls">';
$output .= dynselect("article", $table, "id", "id", 'titrfr', "[Choisir un Article]", "span8", "", "");
$output .= '</div>';
exit($output);
}
开发者ID:ATS001,项目名称:PRSIT,代码行数:11,代码来源:loadenselect_c.php
示例11: tp
<?php
if (tp('verif') == 1) {
$id_paragraphe = tp('id_par');
$id_article = tp('article');
$id_chapitre = tp('chapitre');
$titr_paragraphe = tp('titre');
$montant = tp('montant');
//Exist Montant Article and Chapitre used for update Montant
$exist_montant = $db->QuerySingleValue0("select montant from paragraphe where id = {$id_paragraphe}");
$exist_article = $db->QuerySingleValue0("select id_article from paragraphe where id = {$id_paragraphe}");
$exist_chapitre = $db->QuerySingleValue0("select id_chapitre from article where id = {$exist_article}");
//Check if have same Titre and same Article
$titr_paragraphe_sql = str_replace(' ', '', $titr_paragraphe);
$nbr_paragraphe_exist = $db->QuerySingleValue0("select count(id) from paragraphe where REPLACE(titre, ' ','') = '{$titr_paragraphe_sql}' and paragraphe.id_article = {$id_article} AND id <> {$id_paragraphe} ");
if ($nbr_paragraphe_exist > 0) {
exit("3#{$nbr_paragraphe_exist}");
}
model::load('budget', 'budget');
if (!edit_paragraphe($id_paragraphe, $id_chapitre, $id_article, $titr_paragraphe, $montant, $exist_article, $exist_chapitre, $exist_montant)) {
exit("2");
} else {
exit("1");
}
} else {
view::load('budget', 'editparagraphe');
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:27,代码来源:editparagraphe_c.php
示例12: tp
<?php
if (tp('verif') == 1) {
$paragraphe_s = tp('id_par');
$article_s = $db->QuerySingleValue0("select id_article from paragraphe where id = {$paragraphe_s}");
$chapitre_s = $db->QuerySingleValue0("select id_chapitre from article where id = {$article_s}");
$paragraphe_d = tp('paragraphe');
$article_d = tp('article');
$chapitre_d = tp('chapitre');
$mont_ajout = tp('mont_ajout');
//Check Montant plus disponible source
$exist_montant_dsipo = $db->QuerySingleValue0("select mont_disp from paragraphe where id = {$paragraphe_s}");
if ($exist_montant_dsipo < $mont_ajout) {
exit("2#Le montant à ajouter dépasse le montant source {$exist_montant_dsipo} {$mont_ajout} ");
}
//Check if Paragraphe source same at Destination
if ($paragraphe_s == $paragraphe_d) {
exit("3#Le paragraphe destionation doit être différent de paragraphe Source");
}
//($paragraphe_s,$article_s,$chapitre_s,$paragraphe_d,$article_d,$chapitre_d,$mont)
model::load('budget', 'budget');
if (!amenagement_budget($paragraphe_s, $article_s, $chapitre_s, $paragraphe_d, $article_d, $chapitre_d, $mont_ajout)) {
exit("2");
} else {
exit("1");
}
}
view::load('budget', 'amenagement');
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:28,代码来源:amenagement_c.php
示例13: tp
<?php
if (tp('verif') == 1) {
global $db;
model::load('quotpatronal', 'editquote');
$date = tp('date');
$datee = tp('datee');
$datetime1 = new DateTime($date);
$datetime2 = new DateTime($datee);
if ($datetime1 != $datetime2) {
if (verif_quot($date)) {
exit("3");
} else {
if (!edit_quote(tp('id'), tp('date'), tp('montant'), tp('pjid'))) {
exit("2");
} else {
exit("1");
}
}
} else {
if (!edit_quote(tp('id'), tp('date'), tp('montant'), tp('pjid'))) {
exit("2");
} else {
exit("1");
}
}
}
view::load('quotpatronal', 'editquote');
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:28,代码来源:editquote_c.php
示例14: tp
<?php
if (tp('del') == 1) {
$id_personnel = tp('lin');
//vérification sur table avance
$fullquery = "select * from avance_salaire where id_salarie = {$id_personnel} ";
if (!$db->Query($fullquery)) {
$db->Kill($db->Error());
}
if ($db->RowCount() > 0) {
exit("0#Suppression Impossible");
}
//vérification sur table salaire
$fullquery = "select * from salaire where id_salarie = {$id_personnel} ";
if (!$db->Query($fullquery)) {
$db->Kill($db->Error());
}
if ($db->RowCount() > 0) {
exit("0#Suppression Impossible");
}
model::load('salarie', 'salarie');
//Execute Model
if (!delet_personnel($id_personnel)) {
exit("2#Erreur Système");
//Error opération
} else {
exit("1#Suppression réussie");
//Success Opération
}
} else {
view::load('salarie', 'salarie');
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:31,代码来源:salarie_c.php
示例15: ChaineAleatoire
<?php
if (tp('verif') == 1) {
if (tp('captcha') != $_SESSION['Captcha']) {
$messageok = 0;
} else {
model::load('page', 'contact');
if (!addmail(tp('name'), tp('email'), tp('to'), tp('sujet'), tp('message'), tp('ip'))) {
$messageok = 1;
} else {
//session_start();
function ChaineAleatoire($nbcar)
{
$chaine = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
srand((double) microtime() * 1000000);
$variable = '';
for ($i = 0; $i < $nbcar; $i++) {
$variable .= $chaine[rand() % strlen($chaine)];
}
return $variable;
}
if (isset($_SESSION['Captcha'])) {
unset($_SESSION['Captcha']);
}
$_SESSION['Captcha'] = ChaineAleatoire(5);
$messageok = 2;
}
}
define('MAILSTAT', $messageok);
view::load('page', 'contact');
} else {
开发者ID:ATS001,项目名称:PRSIT,代码行数:31,代码来源:contact_c.php
示例16: exit
<?php
if (tp('verif') == 1) {
model::load('villa', 'addvilla');
if (!addvilla(tp('nom'), tp('adresse'), tp('prix'))) {
exit("0");
} else {
exit("1");
}
} else {
view::load('villa', 'addvilla');
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:12,代码来源:addvilla_c.php
示例17: tp
<?php
if (tp('verif') == 1) {
$if = tp('if');
$rs = tp('rs');
//Check if have same Titre and same Chapitre
$exist = $db->QuerySingleValue0("select count(id) from fournisseur where `if` = '{$if}' ");
if ($exist > 0) {
exit("Ce bénificaire existe dans la base de donnée");
}
model::load('benificaire', 'benificaire');
if (!add_fournisseur(tp('rs'), tp('nom'), tp('prenom'), tp('adr'), tp('if'), tp('ville'), tp('pays'), tp('tel'), tp('mail'), tp('mobile'), tp('fax'))) {
exit("2");
} else {
exit("1");
}
} else {
view::load('benificaire', 'addbenificaire');
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:19,代码来源:addbenificaire_c.php
示例18:
<?php
if (tp('mot') != '') {
view::load('page', 'rechercher');
} else {
view::load('tdb', 'tdb');
}
开发者ID:ATS001,项目名称:PRSIT,代码行数:7,代码来源:rechercher_c.php
示例19: DateTime
$datetime5 = new DateTime($date_start);
$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 {
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:31,代码来源:contralocatvila_c.php
示例20: DateTime
$date_contrat = new DateTime(tp("date"));
$dat_du_jour = new DateTime(date('d-m-Y'));
if ($date_contrat > $dat_du_jour) {
exit("2# La Date du Contrat Invalid ");
}
model::load('contrat', 'editcontrat');
$montant_dispo = $db->QuerySingleValue0("select mont_disp from paragraphe where id = " . tp('paragraphe'));
if ($montant_dispo < tp('montant')) {
exit("2# Le Montant de contrat dépasse les fonds de la source ");
}
$nom_fornisseur = str_replace(' ', '', tp('fournisseur'));
$id_fournisseur = $db->QuerySingleValue0("select id from fournisseur where REPLACE(rs, ' ','') = '{$nom_fornisseur}' ");
if ($id_fournisseur == "0") {
exit("3#Ce fournisseur n'existe pas dans la base de données");
}
if (!edit_contrat(tp('idcontrat'), tp('titre'), $id_fournisseur, tp('date'), tp('montant'), tp('article'), tp('paragraphe'), tp('chapitre'), tp('pjid'))) {
exit("3# Erreur Operation");
} else {
exit("1# Opperation reussie");
}
} else {
view::load('contrat', 'editcontrat');
}
?>
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:24,代码来源:editcontrat_c.php
注:本文中的tp函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论