本文整理汇总了PHP中parametres_perso::check_submited_fields方法的典型用法代码示例。如果您正苦于以下问题:PHP parametres_perso::check_submited_fields方法的具体用法?PHP parametres_perso::check_submited_fields怎么用?PHP parametres_perso::check_submited_fields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parametres_perso
的用法示例。
在下文中一共展示了parametres_perso::check_submited_fields方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
// $org_cb
// $expl_id
// $expl_bulletin
// $expl_typdoc
$expl_cote = clean_string($expl_cote);
// $expl_section
// $expl_statut
// $expl_location
// $expl_codestat
$expl_note = clean_string($expl_note);
$expl_comment = clean_string($f_ex_comment);
$expl_prix = clean_string($expl_prix);
// $expl_owner
//Verification des champs personalises
$p_perso = new parametres_perso("expl");
$nberrors = $p_perso->check_submited_fields();
if ($nberrors) {
error_message_history($msg["notice_champs_perso"], $p_perso->error_message, 1);
exit;
}
// controle sur le nouveau code barre si applicable :
if ($org_cb != $f_ex_cb) {
// si le nouveau code-barre est deja utilise, on reste sur l'ancien
$requete = "SELECT expl_id FROM exemplaires WHERE expl_cb='{$f_ex_cb}'";
$myQuery = pmb_mysql_query($requete, $dbh);
if (!($result = pmb_mysql_result($myQuery, 0, 0))) {
$expl_cb = $f_ex_cb;
} else {
// Verif si expl_id est celui poste
if ($expl_id == $result[0]) {
$expl_cb = $org_cb;
示例2: array
//.........这里部分代码省略.........
$aut['subdivision'] = clean_string($this->aut_array[$i]['subdivision']);
$aut['numero'] = clean_string($this->aut_array[$i]['numero']);
$aut['lieu'] = clean_string($this->aut_array[$i]['lieu']);
$aut['ville'] = clean_string($this->aut_array[$i]['ville']);
$aut['pays'] = clean_string($this->aut_array[$i]['pays']);
$aut['web'] = clean_string($this->aut_array[$i]['web']);
$aut['author_comment'] = clean_string($this->aut_array[$i]['author_comment']);
$aut['authority_number'] = clean_string($this->aut_array[$i]['authority_number']);
/* Origine de l'autorité : on reprend les infos d'origine de la notice pour les attribuées aux origines des autorités */
$id_origine_auth = 0;
$id_origine_auth = origin_authorities::import($this->origine_notice);
if ($id_origine_auth == 0) {
$id_origine_auth = 1;
}
// import de l'autorité auteur si elle n'existe pas et conservation des infos sur l'origine de l'autorité
if ($aut['authority_number'] != '' && $id_origine_auth) {
$this->aut_array[$i]["id"] = $this->insert_authority_infos($aut['authority_number'], "author", $id_origine_auth, $aut);
}
if (!$this->aut_array[$i]["id"]) {
$this->aut_array[$i]["id"] = auteur::import($aut);
}
if ($this->aut_array[$i]["id"]) {
$rqt = $rqt_ins . " (" . $this->aut_array[$i]["id"] . "," . $notice_retour . ",'" . $this->aut_array[$i]['fonction'] . "'," . $this->aut_array[$i]['responsabilite'] . "," . $i . ") ";
$res_ins = pmb_mysql_query($rqt, $dbh);
}
}
// traitement des categories
if ($this->categorisation_type == "categorisation_auto") {
traite_categories_enreg($notice_retour, $this->categories);
} else {
$rqt_del = "delete from notices_categories where notcateg_notice='{$notice_retour}' ";
$res_del = @pmb_mysql_query($rqt_del, $dbh);
$rqt_ins = "insert into notices_categories (notcateg_notice, num_noeud, ordre_categorie) VALUES ";
$rqt_ins_values = array();
foreach ($this->categories as $i => $category) {
$id_categ = $category['categ_id'];
if ($id_categ) {
$rqt_ins_values[] = " ('{$notice_retour}','{$id_categ}', {$i}) ";
}
}
$rqt_ins .= implode(",", $rqt_ins_values);
$res_ins = @pmb_mysql_query($rqt_ins, $dbh);
}
// traitement des langues
// langues de la publication
$rqt_del = "delete from notices_langues where num_notice='{$notice_retour}' ";
$res_del = pmb_mysql_query($rqt_del, $dbh);
if (is_array($this->language_code) && count($this->language_code)) {
$rqt_ins = "insert into notices_langues (num_notice, type_langue, code_langue, ordre_langue) VALUES ";
foreach ($this->language_code as $ordre_lang => $code_lang) {
if ($code_lang) {
$rqt = $rqt_ins . " ('{$notice_retour}',0, '{$code_lang}', {$ordre_lang}) ";
$res_ins = @pmb_mysql_query($rqt, $dbh);
}
}
}
// langues originales
if (is_array($this->original_language_code) && count($this->original_language_code)) {
$rqt_ins = "insert into notices_langues (num_notice, type_langue, code_langue, ordre_langue) VALUES ";
foreach ($this->original_language_code as $ordre_lang => $code_lang) {
if ($code_lang) {
$rqt = $rqt_ins . " ('{$notice_retour}',1, '{$code_lang}', {$ordre_lang}) ";
$res_ins = @pmb_mysql_query($rqt, $dbh);
}
}
}
//Traitement des champs personnalisés (du formulaire !!!)
$p_perso = new parametres_perso("notices");
$nberrors = $p_perso->check_submited_fields();
$p_perso->rec_fields_perso($notice_retour);
//Traitement import perso
global $notice_id, $notice_org, $notice_type_org;
if (function_exists('z_recup_noticeunimarc_suite') && function_exists('recup_noticeunimarc_suite')) {
//Suppression des champs persos
$requete = "delete from notices_custom_values where notices_custom_origine=" . $notice_retour;
@pmb_mysql_query($requete);
$notice_id = $notice_retour;
z_recup_noticeunimarc_suite($notice_org);
z_import_new_notice_suite();
}
// Mise à jour des index de la notice
notice::majNotices($notice_retour);
// Mise à jour de la table notices_global_index
notice::majNoticesGlobalIndex($notice_retour);
// Mise à jour de la table notices_mots_global_index
notice::majNoticesMotsGlobalIndex($notice_retour);
//Documents numériques
foreach ($this->doc_nums as $doc_num) {
if (!$doc_num["a"]) {
continue;
}
explnum_add_from_url($notice_retour, $this->bull_id, $doc_num["b"], $doc_num["a"], false, $this->source_id, $doc_num["f"], '', $doc_num["s"]);
}
//synchro_rdf
if ($pmb_synchro_rdf) {
$synchro_rdf->addRdf($notice_retour, 0);
}
$retour = array($new_notice, $notice_retour);
return $retour;
}
示例3: stdClass
function update_from_form()
{
global $state_collections, $origine, $archive, $cote, $note, $lacune, $serial_id, $archstatut_id, $archtype_id, $location_id, $archempla_id;
global $deflt_docs_location;
$value = new stdClass();
$value->id_serial = stripslashes($serial_id);
if (!$location_id) {
$location_id = $deflt_docs_location;
}
$value->location_id = stripslashes($location_id);
$value->state_collections = stripslashes($state_collections);
$value->collstate_emplacement = stripslashes($archempla_id);
$value->collstate_type = stripslashes($archtype_id);
$value->collstate_origine = stripslashes($origine);
$value->collstate_note = stripslashes($note);
$value->collstate_cote = stripslashes($cote);
$value->collstate_archive = stripslashes($archive);
$value->collstate_lacune = stripslashes($lacune);
if (!$archstatut_id) {
$archstatut_id = 1;
}
$value->collstate_statut = stripslashes($archstatut_id);
$this->update($value);
//Traitement des champs perso
$p_perso = new parametres_perso("collstate");
$p_perso->check_submited_fields();
$p_perso->rec_fields_perso($this->id);
if ($value->id_serial) {
notice::majNoticesMotsGlobalIndex($value->id_serial, 'collstate');
}
}
示例4: save
static function save(&$demande)
{
global $dbh, $pmb_type_audit;
if ($demande->id_demande) {
//MODIFICATION
$query = "UPDATE demandes SET\n\t\t\tsujet_demande='" . $demande->sujet_demande . "',\r\n\t\t\tnum_demandeur='" . $demande->num_demandeur . "',\r\n\t\t\tdate_demande='" . $demande->date_demande . "',\r\n\t\t\tdeadline_demande='" . $demande->deadline_demande . "',\r\n\t\t\tdate_prevue='" . $demande->date_prevue . "',\r\n\t\t\tprogression='" . $demande->progression . "',\r\n\t\t\ttitre_demande='" . $demande->titre_demande . "',\r\n\t\t\ttype_demande='" . $demande->type_demande . "',\r\n\t\t\ttheme_demande='" . $demande->theme_demande . "',\n\t\t\tnum_user_cloture='" . $demande->num_user_cloture . "',\n\t\t\tnum_linked_notice = '" . $demande->get_num_linked_notice() . "'\r\n\t\t\tWHERE id_demande='" . $demande->id_demande . "'";
pmb_mysql_query($query, $dbh);
if ($pmb_type_audit) {
audit::insert_modif(AUDIT_DEMANDE, $demande->id_demande);
}
} else {
//On ajoute une notice ?
self::save_notice($demande);
//CREATION de la demande
$query = "INSERT INTO demandes SET\n\t\t\tsujet_demande='" . $demande->sujet_demande . "',\r\n\t\t\tetat_demande='" . $demande->etat_demande . "',\r\n\t\t\tnum_demandeur='" . $demande->num_demandeur . "',\r\n\t\t\tdate_demande='" . $demande->date_demande . "',\r\n\t\t\tdate_prevue='" . $demande->date_prevue . "',\r\n\t\t\tdeadline_demande='" . $demande->deadline_demande . "',\r\n\t\t\tprogression='" . $demande->progression . "',\r\n\t\t\ttitre_demande='" . $demande->titre_demande . "',\r\n\t\t\ttype_demande='" . $demande->type_demande . "',\r\n\t\t\ttheme_demande='" . $demande->theme_demande . "',\r\n\t\t\tnum_notice='" . $demande->num_notice . "',\n\t\t\tdmde_read_opac='1',\n\t\t\tnum_linked_notice = '" . $demande->get_num_linked_notice() . "'";
pmb_mysql_query($query, $dbh);
$demande->id_demande = pmb_mysql_insert_id($dbh);
if ($pmb_type_audit) {
audit::insert_creation(AUDIT_DEMANDE, $demande->id_demande);
}
}
//Vérification des champs personalisés
$p_perso = new parametres_perso("demandes");
$nberrors = $p_perso->check_submited_fields();
if ($nberrors) {
error_message_history("", $p_perso->error_message, 1);
} else {
//Insertion des champs personalisés
$p_perso->rec_fields_perso($demande->id_demande);
}
//MAJ des users de la demande
self::save_demandes_users($demande);
}
示例5: add_expl
function add_expl()
{
global $typ_lig, $id_prod;
global $pmb_droits_explr_localises, $explr_visible_mod;
global $f_ex_cb, $f_ex_cote, $f_ex_typdoc, $f_ex_location, $f_ex_statut, $f_ex_cstat;
global $f_ex_note, $f_ex_comment, $f_ex_prix, $f_ex_owner;
global ${'f_ex_section' . $f_ex_location};
$error = false;
// visibilité des exemplaires
// On ne vérifie que si l'utilisateur peut créer sur au moins une localisation.
if ($pmb_droits_explr_localises && !$explr_visible_mod) {
return $error;
}
$id_notice = 0;
$id_bulletin = 0;
switch ($typ_lig) {
case '1':
//notice
$id_notice = $id_prod;
break;
case '2':
//bulletin
$id_bulletin = $id_prod;
break;
default:
//non catalogué
break;
}
if (!$id_bulletin && !$id_notice) {
return $error;
}
//Vérification des champs personalisés
$p_perso = new parametres_perso("expl");
$nberrors = $p_perso->check_submited_fields();
if ($nberrors) {
return $error;
}
if ($id_notice) {
$nex = new exemplaire($f_ex_cb, 0, $id_notice, 0);
} else {
$nex = new exemplaire($f_ex_cb, 0, 0, $id_bulletin);
}
if ($nex->expl_id) {
return $error;
} else {
$nex->typdoc_id = $f_ex_typdoc;
$nex->expl_cb = $nex_expl_cb;
$nex->cote = $f_ex_cote;
$nex->section_id = ${'f_ex_section' . $f_ex_location};
$nex->statut_id = $f_ex_statut;
$nex->location_id = $f_ex_location;
$nex->codestat_id = $f_ex_cstat;
$nex->note = $f_ex_note;
$nex->prix = $f_ex_prix;
$nex->owner_id = $f_ex_owner;
$nex->create_date = today();
$nex->expl_comment = $f_ex_comment;
if (!$nex->save()) {
return $error;
}
$p_perso->rec_fields_perso($nex->expl_id);
}
return !$error;
}