本文整理汇总了PHP中CDate::date_switch方法的典型用法代码示例。如果您正苦于以下问题:PHP CDate::date_switch方法的具体用法?PHP CDate::date_switch怎么用?PHP CDate::date_switch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDate
的用法示例。
在下文中一共展示了CDate::date_switch方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
<th><a href="?">Rang</a></th>
<th>Publié</th>
<th>Modif</th>
<th title="suppr"> Suppr </th>
</tr>
<?php
$i = 0;
while ($article = mysql_fetch_array($r_article)) {
?>
<tr>
<td><a href="?a=5&id=<?php echo $article['id'] ?>"><?php echo $article['id'] ?></a></td>
<td height><?php echo stripslashes($article['nom']) ?></td>
<td align="center"><?php echo $article['loginreda'] ?></td>
<td align="center"><?php echo $article['loginlecteur'] ?></td>
<td align="center"><?php echo $article['nomcat'] ?></td>
<td align="center"><?php echo CDate::date_switch(CDate::formate_date($article['date'])) ?></td>
<td align="center"><?php echo CHtmlSession::get_rang('article', $article['id'], $article['idreda']) ?></td>
<td align="center"><?php echo CHtmlSession::get_etat($article['id'], $article['etat'], $article['idreda']) ?></td>
<td align="center"><?php echo CHtmlSession::get_editbutton($article['id'], $article['idreda']) ?></td>
<td align="center"><?php echo CHtmlSession::get_delbutton($a, $article['id'], $id, $article['idreda']) ?></td>
</tr>
<?php } ?>
</table>
<?php } ?>
<?php
//----------------------------------------------------------------------------------------------
// AJOUT
//----------------------------------------------------------------------------------------------
?>
<?php if($a == 4) { ?>
示例2: while
<?php
$i = 0;
while ($opportunite = mysql_fetch_array($r_opportunite)) {
$xzsql = "SELECT nom from texte where id=".$opportunite['texId'];
//print_r($xzsql);
$text = CBdd::select_one($xzsql,'nom');
$xzsql = "SELECT piece from hbpiecesjointes where id=".$opportunite['pieId'];
//print_r($xzsql);
$piece= CBdd::select_one($xzsql,'piece');
?>
<tr>
<td><a href="?a=5&id=<?=$opportunite['id'] ?>"><?=$opportunite['id'] ?></a></td>
<td><?=utf8_encode ($opportunite['nom']); ?></td>
<td><?=$text ; ?></td>
<td><?=str_replace('../../userfiles/pieces_jointes/', '',$piece); ?></td>
<td align="center"><?=CDate::date_switch(CDate::formate_date($opportunite['date'])) ?></td>
<td align="center"><?=CHtml::get_etat($opportunite['id'], $opportunite['etat'], $opportunite['id']); ?></td>
<td align="center"><?=CHtmlSession::get_editbutton($opportunite['id'], $opportunite['id']) ?></td>
<td align="center"><?=CHtml::get_delbutton($a, $opportunite['id'], $id, $opportunite['id']) ?></td>
</tr>
<?php } ?>
</table>
<?php } ?>
<?php
//----------------------------------------------------------------------------------------------
// AJOUT
//----------------------------------------------------------------------------------------------
?>
<?php if($a == 4) { ?>
<form id="form_ajout" method="post" action="opportunite.php">
示例3: utf8_encode
$nomSec=CBdd::select_one($sql_nomSec, 'nom_sec');
?>
<div class="bulle">
<?php echo utf8_encode($nomSec); ?>
</div>
</td>
<td class="zinfo"> <?php
echo $user['categorie_ent'];
$sql_nomCat='select nom_cat FROM cat WHERE id_cat='.$user['categorie_ent'];
$nomCat=CBdd::select_one($sql_nomCat, 'nom_cat');
?>
<div class="bulle">
<?php echo utf8_encode($nomCat); ?>
</div>
</td>
<td align="center"><?php if ($user['dateajout_ent'] != "00-00-0000") echo CDate::date_switch($user['dateajout_ent']) ?></td>
<td align="center"><?php echo CHtmlUser::get_etat_contact($user['id_ent'], $user['etat_contact'], 0) ?></td>
<td style="text-align: center;">
<?php echo $opp_num[$user['idopportunite']]; ?>
</td>
<td align="center"><a href="contact.php?a=5&id=<?php echo $user['id_ent'] ?>" target="_parent"><img src="../img/b_edit.png" alt="modifier, afficher" /></a></td>
<td align="center"><?php echo CHtmlSession::get_delbutton($a, $user['id_ent'], $id, $user['id_ent']) ?></td>
<td><a href="envoi.php?destinataire=<?php echo $user['email'] ?>&a=4" target="_parent">>></a></td>
<td align="center"><?php if(CBdd::select_one("SELECT count(id) AS nb_reponse FROM reponse WHERE iduser = " . $user['id_ent'], 'nb_reponse')) { ?>
<a href="../src/reponse.php?id=<?php echo $user['id_ent'] ?>" target="popup" onclick="popup(this.href, this.target, '600', '500'); return false;"> >> </a>
<?php } ?></td>
<td><input type="checkbox" name="ids[]" class="id_del" value="<?php echo $user['id_ent'] ?>"/></td>
示例4: forceGetOrPost
function forceGetOrPost ($_zVarName, $_zDefault = '') {
if (isset ($_GET[$_zVarName])) {
return $_GET[$_zVarName];
}
elseif (isset ($_POST[$_zVarName])) {
return $_POST[$_zVarName];
}
else {
CSession::get($_zVarName, $_zDefault);
}
}
$id_groupe = isset($id_groupe) ? $id_groupe : CFunctions::getUserParam($id_groupe, 0) ;
$filtre_etat_contact = forceGetOrPost('filtre_etat_contact', $etat_contact);
$filtre_date_debut = CDate::date_switch(forceGetOrPost ('filtre_date_debut'));
$filtre_date_fin = CDate::date_switch(forceGetOrPost ('filtre_date_fin'));
$filtre_id_groupe = forceGetOrPost ('filtre_id_groupe', $id_groupe);
$filtre_email = forceGetOrPost ('filtre_email', -1);
$filtre_nom = forceGetOrPost ('filtre_nom', '%%');
$filtre_prenom = forceGetOrPost ('filtre_prenom', '%%');
$filtre_societe = forceGetOrPost ('filtre_societe', '%%');
if (isset($_GET['alphaA'])) $_SESSION['alphaA'] = $_GET['alphaA'];
$filtre_idopportunite = forceGetOrPost ('filtre_idopportunite', array(0));
if (empty ($filtre_idopportunite)) {
$filtre_idopportunite = array (0);
}
?>
<script type="text/javascript">
$(function () {
$('body').css ({'margin-top': '-14px'});
$('#filtre_email').val ('<?=$filtre_email ;?>');
示例5: while
while ($listeCom = mysql_fetch_assoc($requetCcom)) {
//----------- Owen recuperation nom pays pour commune
$sqlNomCat = "select pays FROM departement WHERE id_dep='".$listeCom['departement']."'";
$id_pays = CBdd::select_one($sqlNomCat, 'pays');
$Zsql = "SELECT nom FROM pays WHERE id_pays=".$id_pays;
$nom_pays = CBdd::select_one($Zsql, 'nom');
?>
<tr>
<td><a href="?a=5&id=<?php echo $listeCom['id_com'] ?>"><?php echo $listeCom['id_com'] ?></a></td>
<td><?php echo utf8_encode($listeCom['nom_com']) ?></td>
<td><?php echo $listeCom['CP'] ?></td>
<td><?php echo $nom_pays ?></td>
<td><?php echo $listeCom['urlCommune'] ?></td>
<td align="center"><?php echo CDate::date_switch(CDate::formate_date($listeCom['date_com'])) ?></td>
<td align="center"><a href="commune.php?a=5&id=<?php echo $listeCom['id_com'] ?>" target="_parent"><img src="../img/b_edit.png" alt="modifier, afficher" /></a></td>
<td align="center"><?php echo CHtmlSession::get_delbutton($a, $listeCom['id_com'], $id, $listeCom['idreda']) ?></td>
<td align="center"><input type="checkbox" name="ids[]" class="id_del" value="<?php echo $listeCom['id_com'] ?>"/></td>
</tr>
<?php
$i++;
}
?>
</table>
<p> <?php echo CForm::get_hidden(7); ?> </p>
<p>
<input type="hidden" name="id_groupe" value="<?php echo $_SESSION['id_groupe']; ?>"/>
</p>
</form>
示例6: foreach
</tr>
<?php
$i = 0;
foreach (CUserFile::sort($arr_urlrep) as $urlrep) {
$info_file = CUserFile::get_info_file($urlrep);
$file_name = $info_file['name'];
$file_mtime= $info_file['mtime'];
$file_type = $info_file['type'];
$file_url = $info_file['url'];
$file_base = $info_file['base'];
$actif_btn = CTableUser::is_admin($_SESSION['idmbr'])?1:0;
?>
<tr>
<td><a href="fichier.php?a=66&url_base_fils=<?php echo $file_url ?>&url_base=<?php echo $file_base ?>"><?php echo $file_name ?></a></td>
<td align="center"><?php echo $file_url ?></td>
<td align="center"><?php echo CDate::date_switch(CDate::formate_date($file_mtime)) ?></td>
<td align="center"><?php echo CHtml::get_editbutton($urlrep, $actif_btn) ?></td>
<td align="center"><?php echo CHtml::get_delbutton($a, $urlrep, $id, $actif_btn) ?></td>
</tr>
<?php } ?>
</table>
<?php } ?>
<?php
//----------------------------------------------------------------------------------------------
// AJOUT
//----------------------------------------------------------------------------------------------
?>
<?php if($a == 4) { ?>
<form id="form_ajout" method="post" action="dossier.php">
<p> <?php echo CForm::get_hidden(44) ?> </p>
<fieldset>
示例7: for
<?php for($c = 0; $c < 194; $c++) echo " ";?>
<input type="submit" value="Supprimer" />
</p>
<table style="width: 875px; margin-left: 1px;" border="1" cellpadding="0" cellspacing="0">
<tr align="center">
<th align="left" width="40px"><a href="?order=id">Id</a></th>
<th align="left"><a href="?order=nom">Fichier</a></th>
<th width="80px">Date d'ajout</th>
<th title="suppr" width="40px"> Suppr </th>
<th width="80px">Checkbox</th>
</tr>
<?php foreach($oFics as $ik=>$fics){?>
<tr>
<td><?php echo $fics['tmp_id'];?></td>
<td><?php echo CTableMoulListe::get_nom_by_id($fics['tmp_fic']);?></td>
<td><?php echo CDate::date_switch(CDate::formate_date($fics['tmp_date']));?></td>
<td><a href='?a=555&idtmp=<?php echo $fics['tmp_id'];?>' title='suppr'><img src='../img/delete.png' alt='delete' /></a></td>
<td><input class="caseacocher" name="tab_fic[<?php echo $ik ?>]" type="checkbox" id="tab_fic[<?php echo $fics['tmp_id'] ?>]" value="<?php echo $fics['tmp_id'];?>" /></td>
<input type="hidden" name="igp" value="<?php echo $fics['tmp_grp'];?>" />
</tr>
<?php }?>
</table>
</form>
<?php }?>
<!-- InstanceEndEditable -->
</div>
</div>
<hr class="clearfloat" />
</div>
</div>
</body>
示例8:
<th align="left"><a href="?order=nom">Fichier</a></th>
<th align="left" width="100px"><a href="?order=mtp_zDateCreation">Date de création</a></th>
<th width="80px">Emails initiale</th>
<th width="80px">Email Valide</th>
<th width="40px">Suppr</th>
</tr>
<?php foreach($oDatas as $ikey=>$datas){
$iNbml = CTableMoultmp::get_iEmail($datas['mtp_iListId']);
$zDate = CTableMoultmp::select_date($datas['mtp_iListId']);
$iNbmlVl = CTableMoulGp::get_iEmail($datas['mtp_iListId']);
$zFichier = CTableMoulListe::get_nom_by_id($datas['mtp_iListId']);
?>
<tr>
<td><?php echo$ikey+1;?></td>
<td><?php echo $zFichier ;?></td>
<td><?php echo CDate::date_switch(CDate::formate_date($zDate));?></td>
<td><?php echo $iNbml;?></td>
<td><?php echo $iNbmlVl;?></td>
<td>
<?php if($a == 3 ){
if($datas['mtp_iListId'] == $zFic){?>
<a href='?a=33&fic=<?php echo $datas['mtp_iListId'];?>' title='suppr'>ok?</a>
<?php }
else {?>
<a href='?a=3&fic=<?php echo $datas['mtp_iListId'];?>' title='suppr'><img src='../img/delete.png' alt='delete' /></a>
<?php }
}?>
<?php if($a != 3) {?>
<a href='?a=3&fic=<?php echo $datas['mtp_iListId'];?>' title='suppr'><img src='../img/delete.png' alt='delete' /></a>
<?php }?>
</td>
示例9: include
<?php
include("../inc/init.php");
if(!empty($_GET['message_number'])) $message_number = $_GET['message_number'];
if(!empty($_GET['passe'])) $passe = $_GET['passe'];
$imap = new CImap(CTableConfiguration::get_value_by_element('POP_SERVER'), CTableUser::get_email_admin(), $passe);
if(@$imap->connect()) {
$info = @$imap->get_info($message_number);
$email_id = $imap->load($message_number);
echo "Sauvegarde du message " . $message_number;
?>
<script type="text/javascript">
$('first').insert({after:'<tr><td><a href="show_reception.php?id=<?php echo $email_id ?>" target="popup" onclick="popup(this.href, this.target, 800, 600);"><?php echo $email_id ?></a></td><td><?php echo CTableGroupe::get_href($info['from']) ?></td><td><?php echo utf8_encode($info['subject']) ?></td><td><?php echo CDate::date_switch(CDate::formate_date($info['date'])) ?></td><td align="center" class="info etat <?php echo 'etat_0'?>"><div class="bulle"><img src="../img/publish_x.png" alt="Non lu" /> Non lu<br /><a href="reception.php?a=2&id=<?php echo $email_id ?>&etat=1"><img src="../img/publish_g.png" alt="Lu" /> Lu</a><br /><a href="reception.php?a=2&id=<?php echo $email_id ?>&etat=2"><img src="../img/publish_u.png" alt="Archivé" /> Archivé</a></div></td></tr>'});
</script>
<?php
} else {
echo "Echec de chargement du message " . $message_number;
}
?>
<a href="show_reception.php?id=<?php echo stripslashes($email['id']) ?>" target="popup" onclick="popup(this.href, this.target, '800', '600');"> <?php echo $email['id'] ?> </a>
示例10: isset
CSession::init();
$etat_contact = isset($etat_contact) ? $etat_contact : CFunctions::getUserParam('etat_contact', 0) ;
$id_groupe = isset($id_groupe) ? $id_groupe : CFunctions::getUserParam('id_groupe', 0) ;
$filtre_date_debut = isset($filtre_date_debut) ? $filtre_date_debut : CFunctions::getUserParam('filtre_date_debut', '') ;
$filtre_date_fin = isset($filtre_date_fin) ? $filtre_date_fin : CFunctions::getUserParam('filtre_date_fin', '') ;
$filtre_email = isset($filtre_email) ? $filtre_email : CFunctions::getUserParam('filtre_email', -1) ;
$filtre_nom = isset($filtre_nom) ? $filtre_nom : CFunctions::getUserParam('filtre_nom', '%%') ;
$filtre_prenom = isset($filtre_prenom) ? $filtre_prenom : CFunctions::getUserParam('filtre_prenom', '%%') ;
$filtre_idopportunite = isset($filtre_idopportunite) ? $filtre_idopportunite : CFunctions::getUserParam('filtre_idopportunite', array(0)) ;
$filtre_etat_contact = CSession::get('filtre_etat_contact', $etat_contact);
$filtre_id_groupe = CSession::get('filtre_id_groupe', $id_groupe);
$filtre_date_debut = CDate::date_switch(CSession::get('filtre_date_debut', $filtre_date_debut));
$filtre_date_fin = CDate::date_switch(CSession::get('filtre_date_fin', $filtre_date_fin));
$filtre_email = CSession::get('filtre_email', $filtre_email);
$filtre_nom = CSession::get('filtre_nom', $filtre_nom);
$filtre_prenom = CSession::get('filtre_prenom', $filtre_prenom);
$filtre_idopportunite = CSession::get('filtre_idopportunite', $filtre_idopportunite);
$filtre = array();
switch ($filtre_id_groupe) {
case '0':
$liste_user_all_groupe = '(' . trim (implode (',', CTableGrGroupe::get_array_id_user_all_groupe ()), ',') . ')';
$listeGroupe__ = str_replace (array ('(,', ',)', ',,'), array ('(', ')', ''), ($liste_user_all_groupe));
$Test = str_replace (array ('(', ',', ')'), array ('', '', ''), $listeGroupe__);
if ($Test) {
$filtre_groupe = " AND id NOT IN " . $listeGroupe__;
示例11: while
$i = 0;
while ($listeCat = mysql_fetch_array($requetCat)) {
//----------- Owen recuperation nom secteur pour categorie
$sqlNomCat='select nom_sec FROM secteur WHERE id_sec='.$listeCat['cat_motcle'];
$secteur=CBdd::select_one($sqlNomCat, 'nom_sec');
// SELECTION CATEGORIE
$zsql = "SELECT nom_cat FROM cat where id_cat=".$listeCat['cat_motcle'];
$nomCat = CBdd::select_one($zsql, 'nom_cat');
?>
<tr>
<td><a href="?a=5&id=<?php echo $listeCat['id_mocle'] ?>"><?php echo $listeCat['id_motcle'] ?></a></td>
<td><?php echo $listeCat['nom_motcle'] ?></td>
<td><?php echo $nomCat ?></td>
<td align="center"><?php echo CDate::date_switch(CDate::formate_date($listeCat['date_motcle'])) ?></td>
<td align="center"><?php echo CHtmlSession::get_editbutton($listeCat['id_motcle'], $listeCat['idreda']) ?></td>
<td align="center"><?php echo CHtmlSession::get_delbutton($a, $listeCat['id_motcle'], $id, $listeCat['idreda']) ?></td>
</tr>
<?php } ?>
</table>
<?php } ?>
<?php
//----------------------------------------------------------------------------------------------
// AJOUT
//----------------------------------------------------------------------------------------------
?>
<?php if($a == 4) { ?>
<form id="form_ajout" method="post" action="motcle.php" enctype="multipart/form-data">
<p> <?php echo CForm::get_hidden(44) ?> </p>
示例12: simplexml_load_file
<tr align="center">
<th align="left">Url du fichier</th>
<th>Fréquence changement</th>
<th>Priorité d'exploration</th>
<th>Derniere modification</th>
</tr>
<?php
$xml = simplexml_load_file($url);
foreach($xml->url as $url) {
$loc = strtolower(utf8_decode($url->loc));
$lastmod = strtolower(utf8_decode($url->lastmod));
$changefreq = utf8_decode($url->changefreq);
$priority = utf8_decode($url->priority);?>
<tr>
<td><?php echo $loc ?></td>
<td><?php echo $changefreq ?></td>
<td><?php echo $priority ?></td>
<td><?php echo CDate::date_switch($lastmod) ?></td>
</tr>
<?php } ?>
</table>
<?php } ?>
<!-- InstanceEndEditable --></div>
</div>
<hr class="clearfloat" />
</div>
</div>
</body>
<!-- InstanceEnd --></html>
示例13: mysql_fetch_array
<th>Modif</th>
<th>Suppr</th>
</tr>
<?php
$i = 0;
if($r_galerie) {
while ($galerie = mysql_fetch_array($r_galerie)) {
$page = CBdd::select_one("SELECT nom FROM page WHERE id = ".$galerie['idpage'], "nom");
$article = CBdd::select_one("SELECT nom FROM article WHERE id = (SELECT idart FROM page WHERE id = ".$galerie['idpage'].")", "nom");
$categorie = CBdd::select_one("SELECT nomcat FROM article_cat WHERE id = (SELECT idart FROM page WHERE id = ".$galerie['idpage'].")", "nomcat");
$nb_image = CBdd::select_one("SELECT COUNT(id) as nb FROM image WHERE idgal = ".$galerie['id'], "nb");
?>
<tr>
<td> <?php echo $galerie['id'] ?> </td>
<td><?php echo CDate::date_switch(CDate::formate_date($galerie['date'])) ?></td>
<td align="center"><?php echo CFunction::clean(stripslashes($galerie['nom'])); ?></td>
<td align="center"><?php echo $categorie; ?></td>
<td align="center"><?php echo $article; ?></td>
<td align="center"><?php echo $page; ?></td>
<td style="text-align: center;"><?php echo $nb_image; ?></td>
<td style="text-align: center;"><?php echo CHtmlSession::get_etat($galerie['id'], $galerie['etat_diaporama'], $galerie['idreda'], 7) ?></td>
<td style="text-align: center;"><?php echo CHtmlSession::get_rang('galerie', $galerie['id'], $galerie['idreda']) ?></td>
<td style="text-align: center;"><?php echo CHtmlSession::get_etat($galerie['id'], $galerie['etat'], $galerie['idreda']) ?></td>
<td style="text-align: center;"><?php echo CHtmlSession::get_editbutton($galerie['id'], $galerie['idreda']) ?></td>
<td style="text-align: center;"><?php echo CHtmlSession::get_delbutton($a, $galerie['id'], $id, $galerie['idreda']) ?></td>
</tr>
<?php }
}
?>
</table>
示例14: max
}
</style>
</head>
<body>
<?php
$sql = "SELECT * FROM user WHERE id=" . $id;
$user = CBdd::select_row($sql);
?>
<h1>Réponse de : <?php echo CFunction::clean($user['nom']) . " " . CFunction::clean($user['prenom']) . " - Tel : " . $user['telephone'] ?></h1>
<?php
$sql = "SELECT * FROM reponse WHERE iduser = " . $id . " AND date = (SELECT max(date) FROM reponse WHERE iduser = " . $id . ") ORDER BY id ASC";
$res = CBdd::select($sql);
$date = "";
?>
<ol>
<?php
while($reponse = mysql_fetch_array($res)) {
$date = $reponse['date'];
?>
<li>
<p><?php echo CFunction::clean( CFunction::force_stripslashes($reponse["question"])) ?></p>
<p>=> <?php echo CFunction::clean( CFunction::force_stripslashes($reponse["nom"])) ?></p>
</li>
<?php } ?>
</ol>
<hr />
<p>Réponses réalisées le : <?php echo CDate::date_switch(CDate::formate_date($date)) ?></p>
</body>
</html>
示例15: utf8_encode
?>
</td>
<td><?php echo utf8_encode(stripslashes($email['exp_prenom'])); ?></td>
<td><?php echo utf8_encode(stripslashes($email['exp_societe'])); ?></td>
<td>
<?php
if($groupe) {
echo $groupe['nom'];
}
else {
echo ' ';
}
?>
</td>
<td><?php echo utf8_encode(stripslashes($email['nom'])) ?></td>
<td><?php echo CDate::date_switch(CDate::formate_date($email['date'])) ?></td>
<td align="center" class="info etat <?php echo 'etat_' . $email['etat']?>"><div class="bulle">
<?php if($email['etat'] != 0) { ?>
<a href="reception.php?a=2&id=<?php echo $email['id'] ?>&etat=0"><img src="../img/publish_x.png" alt="Non lu" />Non lu</a>
<?php } else { ?>
<img src="../img/publish_x.png" alt="Non envoyé" /> Non lu
<?php } ?>
<br />
<?php if($email['etat'] != 1) { ?>
<a href="reception.php?a=2&id=<?php echo $email['id'] ?>&etat=1"><img src="../img/publish_g.png" alt="Lu" /> Lu</a>
<?php } else { ?>
<img src="../img/publish_g.png" alt="Envoyé" /> Lu
<?php } ?>
<br />
<?php if($email['etat'] != 2) { ?>
<a href="reception.php?a=2&id=<?php echo $email['id'] ?>&etat=2"><img src="../img/publish_u.png" alt="Archivé" /> Archivé</a>