当前位置: 首页>>代码示例>>PHP>>正文


PHP changnom函数代码示例

本文整理汇总了PHP中changnom函数的典型用法代码示例。如果您正苦于以下问题:PHP changnom函数的具体用法?PHP changnom怎么用?PHP changnom使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了changnom函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addevent

function addevent($titrfr, $titren, $titrar, $contfr, $conten, $contar, $img, $id, $autfr, $auten, $autar, $dat)
{
    global $db;
    $date = date('Y-m-d-', strtotime($dat));
    $values["titrfr"] = MySQL::SQLValue($titrfr);
    $values["titren"] = MySQL::SQLValue($titren);
    $values["titrar"] = MySQL::SQLValue($titrar);
    $values["contfr"] = MySQL::SQLValue($contfr);
    $values["conten"] = MySQL::SQLValue($conten);
    $values["contar"] = MySQL::SQLValue($contar);
    $values["autfr"] = MySQL::SQLValue($autfr);
    $values["auten"] = MySQL::SQLValue($auten);
    $values["autar"] = MySQL::SQLValue($autar);
    $values["app"] = MySQL::SQLValue('?_tsk=event&id=' . $id);
    $values["dat"] = MySQL::SQLValue($date);
    // Execute the insert
    $result = $db->InsertRow("event", $values);
    // If we have an error
    if (!$result) {
        // Show the error and kill the script
        $db->Kill('Error Insert');
        return false;
    } else {
        if ($img != "") {
            $basedir = "upload/event";
            if (!file_exists($basedir)) {
                mkdir($basedir, 0, true);
            }
            $newdir = "../upload/event/";
            copyfile($img, $id, $newdir, "event_");
            autoarchive($newdir . changnom($img, $id, 'event_'), "Image Evénement {$id} ", 12, $id, "event", "img", $_SESSION['userid'], cryptage(session::get('service'), 0));
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:PRSIT,代码行数:35,代码来源:addevent_m.php

示例2: editreform

function editreform($nextid, $titre, $desc, $montant, $pj, $date)
{
    global $db;
    $usrid = $_SESSION['userid'];
    $date_operation = date('Y-m-d-', strtotime($date));
    $values["titre"] = MySQL::SQLValue($titre);
    $values["description"] = MySQL::SQLValue($desc);
    $values["montant"] = MySQL::SQLValue($montant);
    $values["date_operation"] = MySQL::SQLValue($date_operation);
    $where["id"] = MySQL::SQLValue($nextid);
    if (!$db->UpdateRows("produit_reform", $values, $where)) {
        $db->Kill($db->Error());
        return false;
    } else {
        $sql = $db->BuildSQLInsert("produit_reform", $values);
        logg('Enregistrement Produit Reform ', 167, $nextid, $_SESSION['userid']);
        if ($pj != "") {
            $basedir = "upload/produit";
            if (!file_exists($basedir)) {
                mkdir($basedir, 0, true);
            }
            $newdir = $basedir . "/";
            copyfile($pj, $nextid, $newdir, "Attachement_produit_reform");
            autoarchive($newdir . changnom($pj, $nextid, 'Attachement_produit_reform'), "Fichier joint produit Reform  {$nextid}", 100, $nextid, "produit_reform", "pj", $_SESSION['userid'], cryptage(session::get('service'), 0));
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:28,代码来源:editreform_m.php

示例3: addnews

function addnews($titrfr, $titren, $titrar, $img, $id, $art, $typ)
{
    global $db;
    $values["titrfr"] = MySQL::SQLValue($titrfr);
    $values["titren"] = MySQL::SQLValue($titren);
    $values["titrar"] = MySQL::SQLValue($titrar);
    $values["article"] = MySQL::SQLValue($art);
    $values["typ"] = MySQL::SQLValue($typ);
    // Execute the insert
    $result = $db->InsertRow("document", $values);
    // If we have an error
    if (!$result) {
        // Show the error and kill the script
        $db->Kill($result);
        return false;
    } else {
        if ($img != "") {
            $basedir = "upload/doc";
            if (!file_exists($basedir)) {
                mkdir($basedir, 0, true);
            }
            $newdir = "../upload/doc/";
            if (!file_exists($newdir)) {
                mkdir($newdir, 0, true);
            }
            $file = "./upload/doc/" . changnom($img, $id, 'doc_');
            copyfile($img, $id, $newdir, "doc_");
            autoarchive($file, "Document page {$id} ", 12, $id, "document", "img", $_SESSION['userid'], cryptage(session::get('service'), 0));
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:PRSIT,代码行数:32,代码来源:adddoc_m.php

示例4: addalbum

function addalbum($titrfr, $titren, $img, $id, $titrear)
{
    global $db;
    $values["titrfr"] = MySQL::SQLValue($titrfr);
    $values["titren"] = MySQL::SQLValue($titren);
    $values["titrar"] = MySQL::SQLValue($titrear);
    $values["album"] = MySQL::SQLValue(changnom($img, $id, 'Album_'));
    $values["arch"] = MySQL::SQLValue("0");
    // Execute the insert
    $result = $db->InsertRow("album", $values);
    // If we have an error
    if (!$result) {
        // Show the error and kill the script
        $db->Kill($result);
        return false;
    } else {
        $basedir = "upload/album/";
        //if(!file_exists($basedir)){mkdir($basedir);}
        if (!file_exists($basedir . "/" . $id)) {
            mkdir($basedir . "/" . $id, 0, true);
        }
        $newdir = "../upload/album/" . $id . "/";
        if (!file_exists($newdir)) {
            mkdir($newdir, 0, true);
        }
        if ($img != "") {
            copyfile($img, $id, $basedir, "Album_");
            clearDir($newdir);
            extractzip($basedir, "Album_" . $id . ".zip", $id, $newdir);
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:PRSIT,代码行数:33,代码来源:addalbum_m.php

示例5: add_contrat

function add_contrat($nextid, $titre, $fournisseur, $date, $montant_global, $article, $paragraphe, $chapitre, $pj)
{
    global $db;
    $usrid = $_SESSION['userid'];
    $date = date('Y-m-d-', strtotime($date));
    $values["titre"] = MySQL::SQLValue($titre);
    $values["date"] = MySQL::SQLValue($date);
    $values["id_fournisseur"] = MySQL::SQLValue($fournisseur);
    $values["id_chapitre"] = MySQL::SQLValue($chapitre);
    $values["id_article"] = MySQL::SQLValue($article);
    $values["id_paragraphe"] = MySQL::SQLValue($paragraphe);
    $values["montant_global"] = MySQL::SQLValue($montant_global);
    $values["montant_paye"] = MySQL::SQLValue(0);
    $values["pourcentage"] = MySQL::SQLValue(0);
    $values["montant_rest"] = MySQL::SQLValue($montant_global);
    $values["addby"] = MySQL::SQLValue($usrid);
    if (!$db->InsertRow("contrat", $values)) {
        $db->Kill($db->Error());
        return false;
    } else {
        logg('Enregistrement Contrat Fournisseur ', 254, $nextid, $_SESSION['userid']);
        // Save PJ to archive
        if ($pj != "") {
            $basedir = "upload/contrat";
            if (!file_exists($basedir)) {
                mkdir($basedir, 0, true);
            }
            $newdir = $basedir . "/";
            copyfile($pj, $nextid, $newdir, "Attachement_contrat_");
            autoarchive($newdir . changnom($pj, $nextid, 'Attachement_contrat_'), "Fichier joint contrat fournisseur {$nextid}", 254, $nextid, "contrat", "pj", $_SESSION['userid'], cryptage(session::get('service'), 0));
        }
    }
    return true;
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:34,代码来源:addcontratf_m.php

示例6: editsalarie

function editsalarie($id, $nom, $prenom, $fonction, $salarie, $date, $agence, $service, $matricule, $nom_banque, $num_compte, $taux_anc, $status, $photo, $etatf, $nbrf)
{
    global $db;
    global $db2;
    $date_embauche = date('Y-m-d-', strtotime($date));
    $values["nom"] = MySQL::SQLValue($nom);
    $values["prenom"] = MySQL::SQLValue($prenom);
    $values["fonction"] = MySQL::SQLValue($fonction);
    $values["date_embauche"] = MySQL::SQLValue($date_embauche);
    $values["agence"] = MySQL::SQLValue($agence);
    $values["service"] = MySQL::SQLValue($service);
    $values["matricule"] = MySQL::SQLValue($matricule);
    $values["situation_familiale"] = MySQL::SQLValue($etatf);
    $values["nbr_enfant"] = MySQL::SQLValue($nbrf);
    $values["status"] = MySQL::SQLValue($status);
    if ($photo != null) {
        $values["photo"] = MySQL::SQLValue(changnom($photo, $id, 'photo_'));
    }
    $where["id"] = MySQL::SQLValue($id);
    if (!$db->UpdateRows("info_personnel", $values, $where)) {
        $db->Kill($db->Error());
        return false;
    } else {
        $sql = $db->BuildSQLInsert("info_personnel", $values);
        if ($photo != "") {
            $basedir = "upload/salarie/";
            if (!file_exists($basedir)) {
                mkdir($basedir, 0, true);
            }
            $newdir = $basedir . "/";
            copyfile($photo, $id, $newdir, "photo_");
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:35,代码来源:editsalarie_m.php

示例7: addaemploi

function addaemploi($id_aemploi, $montant, $date_paiement, $mode_paiement, $ref_pj, $pj)
{
    global $db;
    $nextid = getnextidtable('autorisation_emploi');
    $usrid = $_SESSION['userid'];
    $date = date('Y-m-d-', strtotime($date_paiement));
    $values["pj"] = MySQL::SQLValue($pj);
    $values["ref_pj"] = MySQL::SQLValue($ref_pj);
    $values["id_aemploi"] = MySQL::SQLValue($id_aemploi);
    $values["mode_paiement"] = MySQL::SQLValue($mode_paiement);
    $values["date_paiement"] = MySQL::SQLValue($date);
    $values["montant"] = MySQL::SQLValue($montant);
    $values["addby"] = MySQL::SQLValue($usrid);
    if (!$db->InsertRow("autorisation_emploi", $values)) {
        $db->Kill($db->Error());
        return false;
    } else {
        $sql = $db->BuildSQLInsert("autorisation_emploi", $values);
        logg('Enregistrement Autorisation Emploi ', 246, $nextid, $_SESSION['userid']);
        if ($pj != "") {
            $basedir = "upload/Autorisation";
            if (!file_exists($basedir)) {
                mkdir($basedir, 0, true);
            }
            $newdir = $basedir . "/";
            copyfile($pj, $nextid, $newdir, "Attachement_autorisation_");
            autoarchive($newdir . changnom($pj, $nextid, 'Attachement_autorisation_'), "Fichier joint autorisation emploi {$nextid}", 246, $nextid, "autorisation_emploi", "pj", $_SESSION['userid'], cryptage(session::get('service'), 0));
        }
    }
    return true;
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:31,代码来源:addaemploi_m.php

示例8: editlocation

function editlocation($nextid, $nom, $adresse, $pj, $tel, $mail, $villa, $date_debut, $date_fin, $type_paiement, $montant_location, $agarantie_location)
{
    global $db;
    $usrid = $_SESSION['userid'];
    $datedebut = date('Y-m-d-', strtotime($date_debut));
    $datefin = date('Y-m-d-', strtotime($date_fin));
    $values["nomlocataire"] = MySQL::SQLValue($nom);
    $values["adresse"] = MySQL::SQLValue($adresse);
    $values["tel"] = MySQL::SQLValue($tel);
    $values["mail"] = MySQL::SQLValue($mail);
    $values["idvilla"] = MySQL::SQLValue($villa);
    $values["date_debut"] = MySQL::SQLValue($datedebut);
    $values["date_fin"] = MySQL::SQLValue($datefin);
    $values["montant"] = MySQL::SQLValue($montant_location);
    $values["depot_garantie"] = MySQL::SQLValue($agarantie_location);
    $values["type_paiement"] = MySQL::SQLValue($type_paiement);
    $where["id"] = MySQL::SQLValue($nextid);
    if (!$db->UpdateRows("contrat_location_villa", $values, $where)) {
        $db->Kill($db->Error());
        return false;
    } else {
        $sql = $db->BuildSQLInsert("contrat_location_villa", $values);
        logg('Enregistrement Location Villa ', 100, $nextid, $_SESSION['userid']);
        if ($pj != "") {
            $basedir = "upload/location";
            if (!file_exists($basedir)) {
                mkdir($basedir, 0, true);
            }
            $newdir = $basedir . "/";
            copyfile($pj, $nextid, $newdir, "Attachement_location_");
            autoarchive($newdir . changnom($pj, $nextid, 'Attachement_location_'), "Fichier joint location ville {$nextid}", 100, $nextid, "location_villa", "pj", $_SESSION['userid'], cryptage(session::get('service'), 0));
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:35,代码来源:editlocation_m.php

示例9: edit_quote

function edit_quote($id, $date, $montant, $pj)
{
    global $db;
    $date = date('Y-m-d-', strtotime($date));
    $values["datinsert"] = MySQL::SQLValue($date);
    $values["montant"] = MySQL::SQLValue($montant);
    $where["id"] = MySQL::SQLValue($id);
    if (!$db->UpdateRows("quotpatronal", $values, $where)) {
        $db->Kill($db->Error());
        return false;
    } else {
        $sql = $db->BuildSQLInsert("quotpatronal", $values);
        logg('Enregistrement Quote Part Patronal ', 175, $id, $_SESSION['userid']);
        if ($pj != "") {
            $basedir = "upload/quotpatronal";
            if (!file_exists($basedir)) {
                mkdir($basedir, 0, true);
            }
            $newdir = $basedir . "/";
            copyfile($pj, $id, $newdir, "Attachement_quotpatronal_");
            autoarchive($newdir . changnom($pj, $id, 'Attachement_quotpatronal_'), "Fichier joint Quote Part Patronal {$id}", 175, $id, "quotpatronal", "piece_jointe", $_SESSION['userid'], cryptage(session::get('service'), 0));
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:25,代码来源:editquote_m.php

示例10: adduser

function adduser($nom, $fnom, $lnom, $pass, $mail, $service, $signe, $id, $agence, $tel, $img)
{
    // $arrayVariable["column name"] = formatted SQL value
    global $db;
    $values["nom"] = MySQL::SQLValue($nom);
    $values["mail"] = MySQL::SQLValue($mail);
    $values["pass"] = MySQL::SQLValue(md5($pass));
    $values["servic"] = MySQL::SQLValue($service);
    $values["fnom"] = MySQL::SQLValue($fnom);
    $values["lnom"] = MySQL::SQLValue($lnom);
    $values["tel"] = MySQL::SQLValue($tel);
    $values["active"] = MySQL::SQLValue(1);
    $values["defapp"] = MySQL::SQLValue(3);
    $values["agence"] = MySQL::SQLValue($agence);
    $values["signature"] = MySQL::SQLValue(changnom($signe, $id, 'signature_'));
    $values["photo"] = MySQL::SQLValue(changnom($img, $id, 'photo_'));
    // Execute the insert
    $result = $db->InsertRow("users_sys", $values);
    // If we have an error
    if (!$result) {
        // Show the error and kill the script
        $db->Kill($db->Error());
        return false;
    } else {
        addrules($id, $service);
        $newdir = "upload/signature/";
        if ($signe != "") {
            copyfile($signe, $id, $newdir, "signature_");
        }
        if ($img != "") {
            copyfile($img, $id, $newdir, "signature_");
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:35,代码来源:user_m.php

示例11: setcontrat

function setcontrat($id, $date, $pj)
{
    global $db;
    $etat = "Résilié";
    $nextid = getnextidtable('contrat_location_villa');
    $date = date('Y-m-d-', strtotime($date));
    $values["date_resiliation"] = MySQL::SQLValue($date);
    $values["etat"] = MySQL::SQLValue($etat);
    $where["id"] = MySQL::SQLValue($id);
    if (!$db->UpdateRows("contrat_location_villa", $values, $where)) {
        $db->Kill($db->Error());
        return false;
    } else {
        $sql = $db->BuildSQLInsert("contrat_location_villa", $values);
        logg('Enregistrement Location Villa ', 233, $id, $_SESSION['userid']);
        if ($pj != "") {
            $basedir = "upload/location";
            if (!file_exists($basedir)) {
                mkdir($basedir, 0, true);
            }
            $newdir = $basedir . "/";
            copyfile($pj, $id, $newdir, "Attachement_location_");
            autoarchive($newdir . changnom($pj, $id, 'Attachement_location_'), "Fichier joint location ville {$id}", 233, $id, "contrat_location_villa", "pj_resiliation", $_SESSION['userid'], cryptage(session::get('service'), 0));
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:27,代码来源:resiliercontrat_m.php

示例12: editdoc

function editdoc($titrfr, $titren, $titrar, $img, $id, $art, $typ)
{
    global $db;
    $values["titrfr"] = MySQL::SQLValue($titrfr);
    $values["titren"] = MySQL::SQLValue($titren);
    $values["titrar"] = MySQL::SQLValue($titrar);
    $values["article"] = MySQL::SQLValue($art);
    $values["typ"] = MySQL::SQLValue($typ);
    if ($img != "") {
        $values["img"] = MySQL::SQLValue(changnom($img, $id, 'doc_'));
    }
    $where["id"] = MySQL::SQLValue($id);
    // Execute the insert
    $result = $db->UpdateRows("document", $values, $where);
    // If we have an error
    if (!$result) {
        // Show the error and kill the script
        $db->Kill('Error Update');
        return false;
    } else {
        if ($img != "") {
            $olddir = "upload/doc/";
            $newdir = "../upload/doc/";
            copyfile($img, $id, $newdir, "doc_");
            autoarchive($newdir . changnom($img, $id, 'doc_'), "Document page {$id} ", 12, $id, "document", "img", $_SESSION['userid'], cryptage(session::get('service'), 0));
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:PRSIT,代码行数:29,代码来源:editdoc_m.php

示例13: setcollecte

function setcollecte($id, $mode_paiement, $pj, $date_paiement)
{
    global $db;
    //$nextid=getnextidtable('collecte');
    $date = date('Y-m-d-', strtotime($date_paiement));
    $values["mode_paiement"] = MySQL::SQLValue($mode_paiement);
    $values["date_paiement"] = MySQL::SQLValue($date);
    $values["etat_paiement"] = MySQL::SQLValue("Payé");
    $where["id"] = MySQL::SQLValue($id);
    if (!$db->UpdateRows("collecte", $values, $where)) {
        $db->Kill($db->Error());
        return false;
    } else {
        $sql = $db->BuildSQLInsert("collecte", $values);
        logg('Enregistrement collecte ', 195, $id, $_SESSION['userid']);
        if ($pj != "") {
            $basedir = "upload/collecte";
            if (!file_exists($basedir)) {
                mkdir($basedir, 0, true);
            }
            $newdir = $basedir . "/";
            copyfile($pj, $id, $newdir, "Attachement_collecte_");
            autoarchive($newdir . changnom($pj, $id, 'Attachement_collecte_'), "Fichier joint collecte  {$id}", 195, $id, "collecte", "piece_jointe", $_SESSION['userid'], cryptage(session::get('service'), 0));
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:27,代码来源:paiementlocat_m.php

示例14: editalbum

function editalbum($titrfr, $titren, $titrar, $img, $id)
{
    global $db;
    $values["titrfr"] = MySQL::SQLValue($titrfr);
    $values["titren"] = MySQL::SQLValue($titren);
    $values["titrar"] = MySQL::SQLValue($titrar);
    if ($img != "") {
        $values["album"] = MySQL::SQLValue(changnom($img, $id, "album_"));
    }
    $where["id"] = MySQL::SQLValue($id);
    // Execute the insert
    $result = $db->UpdateRows("album", $values, $where);
    // If we have an error
    if (!$result) {
        // Show the error and kill the script
        $db->Kill($result);
        return false;
    } else {
        if ($img != "") {
            $olddir = "upload/album/";
            $newdir = "../upload/album/" . $id . "/";
            copyfile($img, $id, $olddir, "album_");
            clearDir($newdir);
            extractzip($olddir, "album_" . $id . ".zip", $id, $newdir);
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:PRSIT,代码行数:28,代码来源:editalbum_m.php

示例15: editcollecte

function editcollecte($idcontrat, $paiement, $date, $pj)
{
    global $db;
    $usrid = $_SESSION['userid'];
    $nextid = getnextidtable('collecte');
    //$date1=date_create($date);
    //$datep=date_format($date1,"Y-m-d");
    $date_paiement = date('Y-m-d-', strtotime($date));
    $values["mode_paiement"] = MySQL::SQLValue($paiement);
    $values["date_paiement"] = MySQL::SQLValue($date_paiement);
    $where["id"] = MySQL::SQLValue($idcontrat);
    if (!$db->UpdateRows("collecte", $values, $where)) {
        $db->Kill($db->Error());
        return false;
    } else {
        $sql = $db->BuildSQLInsert("collecte", $values);
        logg('Enregistrement collecte ', 201, $nextid, $_SESSION['userid']);
        if ($pj != "") {
            $basedir = "upload/collecte";
            if (!file_exists($basedir)) {
                mkdir($basedir, 0, true);
            }
            $newdir = $basedir . "/";
            copyfile($pj, $nextid, $newdir, "collecte");
            autoarchive($newdir . changnom($pj, $nextid, 'collecte'), "Fichier joint collecte {$nextid}", 201, $nextid, "collecte", "piece_jointe", $_SESSION['userid'], cryptage(session::get('service'), 0));
        }
        return true;
    }
}
开发者ID:ATS001,项目名称:MRN_ERP,代码行数:29,代码来源:editcollecte_m.php


注:本文中的changnom函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。