예제 #1
0
 public function loadExtras(array $storage, CAppUI $AppUI, $m, $type = 'tabs')
 {
     //Set up extra $type
     if (!isset($storage['all_' . $type][$m])) {
         // For some reason on some systems if you don't set this up
         // first you get recursive pointers to the all_$type array, creating
         // phantom tabs.
         if (!isset($storage['all_' . $type])) {
             $storage['all_' . $type] = array();
         }
         $storage['all_' . $type][$m] = array();
         $all_items =& $storage['all_' . $type][$m];
         foreach ($AppUI->getActiveModules() as $dir => $module) {
             if (!canAccess($dir)) {
                 continue;
             }
             $modules_tabs = $AppUI->readFiles(W2P_BASE_DIR . '/modules/' . $dir . '/', '^' . $m . '_tab.*\\.php');
             foreach ($modules_tabs as $tab) {
                 // Get the name as the subextension
                 // cut the module_tab. and the .php parts of the filename
                 // (begining and end)
                 $nameparts = explode('.', $tab);
                 $filename = substr($tab, 0, -4);
                 if (count($nameparts) > 3) {
                     $file = $nameparts[1];
                     if (!isset($all_items[$file])) {
                         $all_items[$file] = array();
                     }
                     $tabArray =& $all_items[$file];
                     $name = $nameparts[2];
                 } else {
                     $tabArray =& $all_items;
                     $name = $nameparts[1];
                 }
                 $tabArray[] = array('name' => ucfirst(str_replace('_', ' ', $name)), 'file' => W2P_BASE_DIR . '/modules/' . $dir . '/' . $filename, 'module' => $dir);
             }
         }
     } else {
         $all_items =& $storage['all_' . $type][$m];
     }
 }
예제 #2
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Cabinet
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::check();
// Chargement de la liste des icones presents dans le fichier
$icones = CAppUI::readFiles("modules/dPcabinet/images/categories", ".png");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("icones", $icones);
$smarty->display("icone_selector.tpl");
    }
}
if ($categories = @CAppUI::conf($module)) {
    foreach ($categories as $category => $values) {
        addConfigConfigCategory($module, $category, $values);
    }
}
if ($module == "system") {
    foreach (CAppUI::conf() as $chapter => $values) {
        if (!CModule::exists($chapter) && $chapter != "db") {
            addConfigConfigCategory(null, $chapter, $values);
        }
    }
}
if ($module != "common") {
    $files = CAppUI::readFiles("modules/{$module}", '\\.php$');
    addLocale("Module", "Name", "module-{$module}-court");
    addLocale("Module", "Name", "module-{$module}-long");
    foreach ($files as $_file) {
        $_tab = substr($_file, 0, -4);
        if (in_array($_tab, array("setup", "index", "config", "preferences", "configuration"))) {
            continue;
        }
        addLocale("Module", "Tabs", "mod-{$module}-tab-{$_tab}");
    }
}
$empty_locales = array_fill(0, 5, null);
foreach ($all_locales as &$_locale) {
    $_locale = str_replace(array('\\n', '\\t'), array("\n", "\t"), $_locale);
}
$completion = round(100 * $local_count / $total_count);
예제 #4
0
    CAppUI::stepAjax("{$count} fichiers '{$type}' à passer en échanges HPRIM");
} else {
    if ($count <= 0) {
        CAppUI::stepAjax("Aucun fichier à passer en échange HPRIM", UI_MSG_ERROR);
    }
    $evt = $class = null;
    if ($type == "pmsi") {
        $domEvenement = new CHPrimXMLEvenementsPmsi();
        $evt = "evenementsPMSI";
    } elseif ($type == "actes") {
        $domEvenement = new CHPrimXMLEvenementsServeurActes();
        $evt = "evenementsServeurActes";
    } else {
        CAppUI::stepAjax("Type de l'échange invalide", UI_MSG_ERROR);
    }
    $files = CAppUI::readFiles($path);
    ini_set("memory_limit", "512M");
    CApp::setTimeLimit(360);
    CMbObject::$useObjectCache = false;
    $counter = 0;
    foreach ($files as $_file) {
        $xmlfile = file_get_contents("{$path}/{$_file}");
        // Chargement du fichier XML
        $domEvenement->loadXML($xmlfile);
        // Création de l'échange
        $echg_hprim = new CEchangeHprim();
        $data = $domEvenement->getEnteteEvenementXML($evt);
        $data = array_merge($data, $domEvenement->getContentsXML());
        $dest_hprim = new CDestinataireHprim();
        $dest_hprim->register($data['idClient']);
        $echg_hprim->date_production = $data['dateHeureProduction'];