本文整理汇总了PHP中CFunctions::formate_chaine方法的典型用法代码示例。如果您正苦于以下问题:PHP CFunctions::formate_chaine方法的具体用法?PHP CFunctions::formate_chaine怎么用?PHP CFunctions::formate_chaine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFunctions
的用法示例。
在下文中一共展示了CFunctions::formate_chaine方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CTableRdv
$id_rdv = CTableRdv::get_idrdv_of_user($id);
$trdv = new CTableRdv(array('id' => $id_rdv));
$rdv = $trdv->select_row();
$type_rdv = $rdv['type'];
$etat_rdv = $rdv['etat'];
$date_rdv = $rdv['date'];
$heure_rdv = $rdv['heure'];
$nom_rdv = $rdv['nom'];
break;
case 55 : // Modifier 2
//user
if(!empty($_POST['id'])) $id = $_POST['id'];
if(!empty($_POST['login'])) $login = CFunctions::formate_chaine(trim($_POST['login']),'');
if(!empty($_POST['passe'])) $passe = CFunctions::formate_chaine(trim($_POST['passe']),'');
if(!empty($_POST['etat'])) $etat = $_POST['etat'];
if(!empty($_POST['type'])) $type = $_POST['type'];
if(!empty($_POST['civilite'])) $civilite = $_POST['civilite'];
if(!empty($_POST['nom'])) $nom = $_POST['nom'];
if(!empty($_POST['prenom'])) $prenom = $_POST['prenom'];
if(!empty($_POST['adresse'])) $adresse = $_POST['adresse'];
if(!empty($_POST['cp'])) $cp =$_POST['cp'];
if(!empty($_POST['ville'])) $ville = $_POST['ville'];
if(!empty($_POST['pays'])) $pays = $_POST['pays'];
if(!empty($_POST['email'])) $email = trim($_POST['email']);
if(!empty($_POST['telephone'])) $telephone = trim($_POST['telephone']);
if(!empty($_POST['mobile'])) $mobile = trim($_POST['mobile']);
if(!empty($_POST['societe'])) $societe = $_POST['societe'];
if(!empty($_POST['web'])) $web = $_POST['web'];
if(!empty($_POST['commentaire'])) $commentaire = $_POST['commentaire'];
示例2:
break;
case 55 : // Modifier 2
//user
if(!empty($_POST['id'])) $id = $_POST['id'];
// PARTIE GAUCHE
if(!empty($_POST['login'])) $login = CFunctions::formate_chaine(trim($_POST['login']),'');
if(!empty($_POST['passe'])) $passe = CFunctions::formate_chaine(trim($_POST['passe']),'');
if(!empty($_POST['etat'])) $etat = $_POST['etat'];
if(!empty($_POST['type'])) $type = $_POST['type'];
$paiement_abo = CFunctions::getUserParam('paiement_abo', 0) ;
$ent = CFunctions::getUserParam('ent', 0) ;
$paye_p = CFunctions::getUserParam('paye_p', 0) ;
$montant_vignette = CFunctions::formate_chaine(CFunctions::getUserParam('montant_vignette', '')) ;
$montant_p = CFunctions::formate_chaine(CFunctions::getUserParam('montant_p', '')) ;
if(isset($_POST['url'])) {
$url_2 = $_POST['url'];
$url_3=str_replace("http://","",$url_2);
$url_4=str_replace("www.","",$url_3);
www.
$url_1='http://'.$url_4;
}
// PARTIE CENTRE
if(!empty($_POST['nom_sec'])) $nom_sec = CFunctions::clean($_POST['nom_sec']);
if(!empty($_POST['nom_cat'])) $nom_cat = CFunctions::clean($_POST['nom_cat']);
if(!empty($_POST['responsable'])) $responsable = CFunctions::clean($_POST['responsable']);
if(!empty($_POST['adresse'])) $adresse = CFunctions::clean($_POST['adresse']);
if(!empty($_POST['cp'])) $cp = CFunctions::clean($_POST['cp']);
示例3: export
function export() {
$id_groupe = $this->table['id'];
$nom_groupe = self::get_element($id_groupe);
$nom_csv = CFunctions::formate_chaine($nom_groupe) . ".csv";
header("Content-Type: application/csv-tab-delimited-table");
header("Content-disposition: filename=" . $nom_csv);
$resQuery = CBdd::select("SELECT civilite, nom, prenom, societe, adresse, cp, ville, pays, email, telephone, mobile, web FROM hbclients WHERE id IN (" . implode(",", self::get_array_id_user($id_groupe)) . ")");
if ($resQuery) {
// titre des colonnes
$fields = mysql_num_fields($resQuery);
$i = 0;
$field_name = '';
while ($i < $fields) {
$field_name .= '"' . mysql_field_name($resQuery, $i).'",';
$i++;
}
$field_name = trim($field_name, ',');
echo $field_name . "\r\n";
// donn�es de la table
while ($arrSelect = mysql_fetch_array($resQuery, MYSQL_ASSOC)) {
$data = '';
foreach($arrSelect as $key=>$elem) {
if($key == "civilite") {
$elem = CTableCivilite::get_name($elem);
} elseif ($key == "pays") {
$elem = CTablePays::get_name($elem);
}
$data .= '"' . utf8_decode($elem) . '",';
}
$data = trim($data, ",");
echo $data . "\r\n";
}
return 1;
} else {
return 0;
}
}