當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CAppUI::stepAjax方法代碼示例

本文整理匯總了PHP中CAppUI::stepAjax方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::stepAjax方法的具體用法?PHP CAppUI::stepAjax怎麽用?PHP CAppUI::stepAjax使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CAppUI的用法示例。


在下文中一共展示了CAppUI::stepAjax方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUserMailHash

 /**
  * Set the hash for the user mails
  *
  * @return bool
  */
 protected function setUserMailHash()
 {
     $ds = CSQLDataSource::get("std");
     $mails = $ds->loadList("SELECT m.user_mail_id, m.account_class, m.account_id, m.from, m.to, m.subject, c.content FROM user_mail as m, content_html as c WHERE m.account_class IS NOT NULL AND m.account_id IS NOT NULL AND m.text_html_id = c.content_id ORDER BY m.user_mail_id DESC;");
     if (count($mails)) {
         $values = array();
         foreach ($mails as $_mail) {
             $data = "==FROM==\n" . $_mail['from'] . "\n==TO==\n" . $_mail['to'] . "\n==SUBJECT==\n" . $_mail['subject'] . "\n==CONTENT==\n" . $_mail['content'];
             $hash = CMbSecurity::hash(CMbSecurity::SHA256, $data);
             $values[] = '(' . $_mail['user_mail_id'] . ', ' . $_mail['account_id'] . ', \'' . $_mail['account_class'] . "', '{$hash}')";
         }
         $mails = $ds->loadList("SELECT m.user_mail_id, m.account_class, m.account_id, m.from, m.to, m.subject, c.content FROM user_mail AS m, content_any AS c WHERE m.account_class IS NOT NULL AND m.account_id IS NOT NULL AND m.text_html_id IS NULL AND m.text_plain_id = c.content_id ORDER BY m.user_mail_id DESC;");
         foreach ($mails as $_mail) {
             $data = "==FROM==\n" . $_mail['from'] . "\n==TO==\n" . $_mail['to'] . "\n==SUBJECT==\n" . $_mail['subject'] . "\n==CONTENT==\n" . $_mail['content'];
             $hash = CMbSecurity::hash(CMbSecurity::SHA256, $data);
             $values[] = '(' . $_mail['user_mail_id'] . ', ' . $_mail['account_id'] . ', \'' . $_mail['account_class'] . "', '{$hash}')";
         }
         $query = "INSERT INTO `user_mail` (`user_mail_id`, `account_id`, `account_class`, `hash`) VALUES " . implode(', ', $values) . " ON DUPLICATE KEY UPDATE `hash` = VALUES(`hash`);";
         $ds->query($query);
         if ($msg = $ds->error()) {
             CAppUI::stepAjax($msg, UI_MSG_WARNING);
             return false;
         }
     }
     return true;
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:31,代碼來源:setup.php

示例2: CDoObjectAddEdit

 /**
  * Constructor
  *
  * @param string $className Class name
  * @param int    $objectKey Object key name
  */
 function CDoObjectAddEdit($className, $objectKey = null)
 {
     if (CAppUI::conf("readonly")) {
         CAppUI::stepAjax("Mode-readonly-title", UI_MSG_ERROR);
         return;
     }
     global $m;
     $this->className = $className;
     $this->postRedirect = null;
     $this->redirect = "m={$m}";
     $this->redirectStore = null;
     $this->redirectError = null;
     $this->redirectDelete = null;
     $this->createMsg = CAppUI::tr("{$className}-msg-create");
     $this->modifyMsg = CAppUI::tr("{$className}-msg-modify");
     $this->deleteMsg = CAppUI::tr("{$className}-msg-delete");
     $this->request =& $_POST;
     $this->_logIt = true;
     // @todo : à supprimer cf déplacement dans le doBind()
     $this->_obj = new $this->className();
     $this->_old = new $this->className();
     $this->onAfterInstanciation();
     // Lancer ceci apres chaque instanciation de _obj et _old !!
     $this->objectKey = $objectKey ? $objectKey : $this->_obj->_spec->key;
     $this->objectKeys = $this->objectKey . "s";
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:32,代碼來源:CDoObjectAddEdit.class.php

示例3: stepAjax

 public function stepAjax($type = UI_MSG_WARNING)
 {
     $args = func_get_args();
     $msg = CAppUI::tr($this->getMessage(), array_slice($args, 1));
     CAppUI::$localize = false;
     CAppUI::stepAjax($msg, $type);
     CAppUI::$localize = true;
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:8,代碼來源:CMbException.class.php

示例4: send

 /**
  * @see parent::send()
  */
 function send(CCompteRendu $docItem)
 {
     if ($xml = CDMPAntaresXML::generateXML($docItem)) {
         return true;
     }
     CAppUI::stepAjax("Document non valide", UI_MSG_ERROR);
     return false;
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:11,代碼來源:CDMPSender.class.php

示例5: importFile

/**
 * import the csv firstname file
 *
 * @param string $targetPath filepath
 * @param int    $start      start from
 * @param int    $count      step of import
 *
 * @return void
 */
function importFile($targetPath, $start, $count)
{
    $fp = fopen($targetPath, 'r');
    //0 = first line
    if ($start == 0) {
        $start++;
    }
    $line_nb = 0;
    while ($line = fgetcsv($fp, null, ";")) {
        if ($line_nb >= $start && $line_nb < $start + $count) {
            $found = false;
            $fn = CMbString::removeDiacritics(trim($line[0]));
            $sex = trim($line[1]);
            $language = CMbString::removeDiacritics(trim($line[2]));
            if ($sex == "m,f" || $sex == "f,m") {
                $sex = "u";
            }
            $firstname = new CFirstNameAssociativeSex();
            $firstname->firstname = $fn;
            $firstname->language = $language;
            $firstname->loadMatchingObjectEsc();
            if ($firstname->_id) {
                // found
                $found = true;
                if ($sex != $firstname->sex) {
                    $firstname->sex = "u";
                }
            } else {
                // not found
                $firstname->sex = $sex;
            }
            // store & message
            if ($msg = $firstname->store()) {
                CAppUI::stepAjax($msg, UI_MSG_WARNING);
            } else {
                if ($found == true) {
                    CAppUI::stepAjax("prénom <strong>{$fn}</strong>, mis à jour <strong>[{$firstname->sex}]</strong>");
                } else {
                    CAppUI::stepAjax("prénom <strong>{$fn}</strong>, ajouté <strong>[{$firstname->sex}]</strong>");
                }
            }
        }
        $line_nb++;
    }
    return;
}
開發者ID:fbone,項目名稱:mediboard4,代碼行數:55,代碼來源:do_import_firstnames.php

示例6: send

 /**
  * @see parent::send()
  */
 function send(CCompteRendu $docItem)
 {
     $object = $docItem->loadTargetObject();
     if ($object instanceof CConsultAnesth) {
         $object = $object->loadRefConsultation();
     }
     if ($object instanceof CPatient) {
         CAppUI::stepAjax("Impossible d'ajouter un document lié directement à un patient", UI_MSG_ERROR);
     }
     $receiver_hl7v3 = new CReceiverHL7v3();
     $receiver_hl7v3->actif = 1;
     $receiver_hl7v3->group_id = CGroups::loadCurrent()->_id;
     /** @var CReceiverHL7v3[] $receivers */
     $receivers = $receiver_hl7v3->loadMatchingList();
     foreach ($receivers as $_receiver) {
         $request = $_receiver->sendEventProvideAndRegisterDocumentSetRequest($docItem);
         mbTrace($request);
     }
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:22,代碼來源:CDocumentSourceSender.class.php

示例7: buildPartialTables

/**
 * Fonction de construction du cache d'info des durées
 * d'hospi et d'interv
 *
 * @param string $tableName   Nom de la table de cache
 * @param string $tableFields Champs de la table de cache
 * @param array  $queryFields Liste des champs du select
 * @param string $querySelect Chaine contenant les éléments SELECT à utiliser
 * @param array  $queryWhere  Chaine contenant les éléments WHERE à utiliser
 *
 * @return void
 */
function buildPartialTables($tableName, $tableFields, $queryFields, $querySelect, $queryWhere)
{
    $ds = CSQLDataSource::get("std");
    $joinedFields = join(", ", $queryFields);
    // Intervale de temps
    $intervalle = CValue::get("intervalle");
    switch ($intervalle) {
        case "month":
            $deb = CMbDT::date("-1 month");
            break;
        case "6month":
            $deb = CMbDT::date("-6 month");
            break;
        case "year":
            $deb = CMbDT::date("-1  year");
            break;
        default:
            $deb = CMbDT::date("-10 year");
    }
    $fin = CMbDT::date();
    // Suppression si existe
    $drop = "DROP TABLE IF EXISTS `{$tableName}`";
    $ds->exec($drop);
    // Création de la table partielle
    $create = "CREATE TABLE `{$tableName}` (" . "\n`chir_id` int(11) unsigned NOT NULL default '0'," . "{$tableFields}" . "\n`ccam` varchar(255) NOT NULL default ''," . "\nKEY `chir_id` (`chir_id`)," . "\nKEY `ccam` (`ccam`)" . "\n) /*! ENGINE=MyISAM */;";
    $ds->exec($create);
    // Remplissage de la table partielle
    $query = "INSERT INTO `{$tableName}` ({$joinedFields}, `chir_id`, `ccam`)\r\n    SELECT {$querySelect}\r\n    operations.chir_id,\r\n    operations.codes_ccam AS ccam\r\n    FROM operations\r\n    LEFT JOIN users\r\n    ON operations.chir_id = users.user_id\r\n    LEFT JOIN plagesop\r\n    ON operations.plageop_id = plagesop.plageop_id\r\n    WHERE operations.annulee = '0'\r\n    {$queryWhere}\r\n    AND operations.date BETWEEN '{$deb}' AND '{$fin}'\r\n    GROUP BY operations.chir_id, ccam\r\n    ORDER BY ccam;";
    $ds->exec($query);
    CAppUI::stepAjax("Nombre de valeurs pour la table '{$tableName}': " . $ds->affectedRows(), UI_MSG_OK);
    // Insert dans la table principale si vide
    if (!$ds->loadResult("SELECT COUNT(*) FROM temps_op")) {
        $query = "INSERT INTO temps_op ({$joinedFields}, `chir_id`, `ccam`)\r\n      SELECT {$joinedFields}, `chir_id`, `ccam`\r\n      FROM {$tableName}";
        $ds->exec($query);
    } else {
        $query = "UPDATE temps_op, {$tableName} SET ";
        foreach ($queryFields as $queryField) {
            $query .= "\ntemps_op.{$queryField} = {$tableName}.{$queryField}, ";
        }
        $query .= "temps_op.chir_id = {$tableName}.chir_id" . "\nWHERE temps_op.chir_id = {$tableName}.chir_id" . "\nAND temps_op.ccam = {$tableName}.ccam";
        $ds->exec($query);
    }
}
開發者ID:fbone,項目名稱:mediboard4,代碼行數:55,代碼來源:httpreq_temps_op_new.php

示例8: addFileIntoDB

/**
 * Parse le fichier et remplit la table correspondante
 *
 * @param string $file  File path
 * @param string $table Table name
 *
 * @return void
 */
function addFileIntoDB($file, $table)
{
    $reussi = 0;
    $echoue = 0;
    $ds = CSQLDataSource::get("cdarr");
    $handle = fopen($file, "r");
    // Ne pas utiliser fgetcsv, qui refuse de prendre en compte les caractères en majusucules accentués (et d'autres caractères spéciaux)
    while ($line = fgets($handle)) {
        $line = str_replace("'", "\\'", $line);
        $datas = explode("|", $line);
        $query = "INSERT INTO {$table} VALUES('" . implode("','", $datas) . "')";
        $ds->exec($query);
        if ($msg = $ds->error()) {
            $echoue++;
        } else {
            $reussi++;
        }
    }
    fclose($handle);
    CAppUI::stepAjax("ssr-import-cdarr-report", UI_MSG_OK, $file, $table, $reussi, $echoue);
}
開發者ID:fbone,項目名稱:mediboard4,代碼行數:29,代碼來源:import_cdarr.php

示例9: loadNewMessages

 /**
  * Load unread messages
  *
  * @param null $user_id user to load, null = current
  *
  * @return CUserMessageDest[]
  */
 static function loadNewMessages($user_id = null)
 {
     $dests = array();
     if (CModule::getActive("messagerie")) {
         $dest = new self();
         if ($dest->_ref_module->mod_version < 0.3) {
             CAppUI::stepAjax("CModule%s-msg-pls_update_module", UI_MSG_WARNING, $dest->_ref_module->mod_name);
             return $dests;
         }
         $user = CMediusers::get($user_id);
         $where = array();
         $where["to_user_id"] = " = '{$user->_id}'";
         $where["datetime_sent"] = " IS NOT NULL";
         $where["datetime_read"] = " IS NULL";
         /** @var CUserMessageDest[] $dests */
         $dests = $dest->loadList($where);
         foreach ($dests as $_dest) {
             $_dest->loadRefFwd();
         }
     }
     return $dests;
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:29,代碼來源:CUserMessageDest.class.php

示例10: addFileIntoDB

function addFileIntoDB($file, $table)
{
    $reussi = 0;
    $echoue = 0;
    $ds = CSQLDataSource::get("ccamV2");
    $handle = fopen($file, "r");
    $values = array();
    $batch = 50;
    // Ne pas utiliser fgetcsv, qui refuse de prendre en compte les caractères en majusucules accentués (et d'autres caractères spéciaux)
    while ($line = fgets($handle)) {
        $line = str_replace("'", "\\'", $line);
        $values[] = explode("|", $line);
        if (count($values) == $batch) {
            insertValues($ds, $table, $values, $echoue, $reussi);
            $values = array();
        }
    }
    if (count($values)) {
        insertValues($ds, $table, $values, $echoue, $reussi);
    }
    CAppUI::stepAjax("Import du fichier {$file} dans la table {$table} : {$reussi} lignes ajoutée(s), {$echoue} échouée(s)", UI_MSG_OK);
    fclose($handle);
}
開發者ID:fbone,項目名稱:mediboard4,代碼行數:23,代碼來源:httpreq_do_add_ccam.php

示例11: printFile

 function printFile($file)
 {
     // Test de la commande smbclient
     exec("whereis smbclient", $ret);
     if (preg_match("@\\/smbclient@", $ret[0]) == 0) {
         CAppUI::stepAjax("La commande smbclient n'est pas disponible", UI_MSG_ERROR);
     }
     if (file_get_contents($file->_file_path) === false) {
         CAppUI::stepAjax("Impossible d'accéder au PDF", UI_MSG_ERROR);
     }
     // Construction de l'uri
     $uri = escapeshellarg("//{$this->hostname}/{$this->printer_name}") . " ";
     if ($this->password) {
         $uri .= escapeshellarg($this->password);
     }
     $uri .= " -c " . escapeshellarg('print ' . escapeshellarg($file->_file_path)) . " ";
     if ($this->username) {
         $uri .= "-U " . escapeshellarg($this->username) . " ";
     }
     if ($this->workgroup) {
         $uri .= "-W " . escapeshellarg($this->workgroup) . " ";
     }
     if (!$this->password) {
         $uri .= "-N";
     }
     exec("smbclient {$uri}", $res);
     if (count($res)) {
         $mess = "";
         foreach ($res as $_res) {
             $mess .= $_res . "\n";
         }
         CAppUI::stepAjax("Impression échouée \n" . $mess, UI_MSG_ERROR);
     } else {
         CAppUI::stepAjax("Impression réussie", UI_MSG_OK);
     }
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:36,代碼來源:CSMB.class.php

示例12: fichier

<?php

/**
 * $Id: httpreq_do_add_insee.php 19219 2013-05-21 12:26:07Z phenxdesign $
 *
 * @package    Mediboard
 * @subpackage Patients
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 19219 $
 */
CCanDo::checkAdmin();
$sourcePath = "modules/dPpatients/INSEE/insee.tar.gz";
$targetDir = "tmp/insee";
$targetPath = "tmp/insee/insee.sql";
// Extract the SQL dump
if (null == ($nbFiles = CMbPath::extract($sourcePath, $targetDir))) {
    CAppUI::stepAjax("Erreur, impossible d'extraire l'archive", UI_MSG_ERROR);
}
CAppUI::stepAjax("Extraction de {$nbFiles} fichier(s)", UI_MSG_OK);
$ds = CSQLDataSource::get("INSEE");
if (null == ($lineCount = $ds->queryDump($targetPath, true))) {
    $msg = $ds->error();
    CAppUI::stepAjax("Erreur de requête SQL: {$msg}", UI_MSG_ERROR);
}
CAppUI::stepAjax("import effectué avec succès de {$lineCount} lignes", UI_MSG_OK);
開發者ID:fbone,項目名稱:mediboard4,代碼行數:26,代碼來源:httpreq_do_add_insee.php

示例13: array_merge

////////// Smarty templates
// DO NOT use CMbPath::removed because it must be used in the installer
$templates = array_merge(glob("tmp/templates_c/*/*/*/*/*"), glob("tmp/templates_c/*/*/*/*"), glob("tmp/templates_c/*/*/*"));
foreach ($templates as $_template) {
    if (is_file($_template)) {
        unlink($_template);
    }
}
$template_dirs = array_merge(glob("tmp/templates_c/*/*/*/*", GLOB_ONLYDIR), glob("tmp/templates_c/*/*/*", GLOB_ONLYDIR), glob("tmp/templates_c/*/*", GLOB_ONLYDIR));
foreach ($template_dirs as $_dir) {
    rmdir($_dir);
}
CAppUI::stepAjax("template-cache-removed", UI_MSG_OK, count($templates));
////////// Module specific removals
foreach (glob("modules/*/empty_shared_memory.php") as $script) {
    include $script;
}
// Remove locales, at the end because otherwise, next message aren't translated
foreach (glob("locales/*", GLOB_ONLYDIR) as $localeDir) {
    $localeName = basename($localeDir);
    $sharedName = "locales-{$localeName}";
    if (!SHM::get("{$sharedName}-" . CAppUI::LOCALES_PREFIX)) {
        CAppUI::stepAjax("Locales-shm-none", UI_MSG_OK, $localeName);
        continue;
    }
    if (!SHM::remKeys("{$sharedName}-*")) {
        CAppUI::stepAjax("Locales-shm-rem-ko", UI_MSG_WARNING, $localeName);
        continue;
    }
    CAppUI::stepAjax("Locales-shm-rem-ok", UI_MSG_OK, $localeName);
}
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:31,代碼來源:httpreq_do_empty_shared_memory.php

示例14: array_diff_key

    $where["functions_mediboard.group_id"] = "= '{$group_id}'";
    $users_all = $user->loadList($where, null, null, null, $ljoin);
    /** @var $users CUser[] */
    $users = array_diff_key($users_all, $users_ldap);
    $users = array_slice($users, $start, $count);
    $count = $count_no_associate = $count_associate = 0;
    foreach ($users as $_user) {
        try {
            $source_ldap = CLDAP::bind($_user, $ldaprdn, $ldappass);
            $_user = CLDAP::searchAndMap($_user, $source_ldap, $source_ldap->_ldapconn, $_user->user_username, null);
        } catch (CMbException $e) {
            $e->stepAjax();
        }
        if ($_user->_count_ldap != 0) {
            $count_associate++;
        }
        if ($_user->_count_ldap == 0) {
            CAppUI::stepAjax("'{$_user->_view}' / '{$_user->user_username}' non associé", UI_MSG_WARNING);
            $count_no_associate++;
        }
        $count++;
    }
    if ($count == 0) {
        echo "<script type='text/javascript'>stop=true;</script>";
    }
    $next = $start + $count_no_associate;
    CAppUI::stepAjax("{$count_associate} comptes associés");
    CAppUI::stepAjax("{$count_no_associate} comptes non associés", UI_MSG_WARNING);
    CValue::setSession("start", $next);
    CAppUI::stepAjax("On continuera au n° {$next} / " . count($users) . " restants");
}
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:31,代碼來源:ajax_ldap_massive_import.php

示例15: explode

    $objects_id = explode("-", $objects_id);
}
$user = CMediusers::get();
CMbArray::removeValue("", $objects_id);
$objects = array();
$result = null;
$checkMerge = null;
$statuses = array();
$merge_type = null;
if (class_exists($objects_class) && count($objects_id)) {
    foreach ($objects_id as $object_id) {
        /** @var CMbObject $object */
        $object = new $objects_class();
        $merge_type = $object->_spec->merge_type;
        if ($merge_type == 'none') {
            CAppUI::stepAjax("Merging_%sclass_is_forbidden_by_spec", UI_MSG_ERROR, CAppUI::tr($object->_class));
        }
        // the CMbObject is loaded
        if (!$object->load($object_id)) {
            CAppUI::setMsg("Chargement impossible de l'objet [{$object_id}]", UI_MSG_ERROR);
            continue;
        }
        $object->loadView();
        $object->loadAllFwdRefs(true);
        $object->_selected = false;
        $object->_disabled = false;
        $objects[] = $object;
    }
    // Default préselection of first object
    $_selected = reset($objects);
    // selection of the first CSejour or CPatient with an ext ID
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:object_merger.php


注:本文中的CAppUI::stepAjax方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。