Exemple #1
0
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td class='row_style1'><strong>{$msg}</strong></td>\n";
    echo "</tr>\n";
    echo "</table>\n";
    echo "</div>\n";
}
//use the module class to get the list of modules from the db and add any missing modules
$module = new modules();
$module->db = $db;
$module->dir = $_SESSION['switch']['mod']['dir'];
$module->get_modules();
$result = $module->modules;
$module_count = count($result);
$module->synch();
$module->xml();
$msg = $module->msg;
//show the msg
if ($msg) {
    echo "<div align='center'>\n";
    echo "<table width='40%'>\n";
    echo "<tr>\n";
    echo "<th align='left'>" . $text['label-message'] . "</th>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td class='row_style1'>{$msg}</td>\n";
    echo "</tr>\n";
    echo "</table>\n";
    echo "</div>\n";
}
//show the content
Exemple #2
0
 function save_switch_xml()
 {
     if (is_readable($_SESSION['switch']['dialplan']['dir'])) {
         save_dialplan_xml();
     }
     if (is_readable($_SESSION['switch']['extensions']['dir'])) {
         if (file_exists($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/app/extensions/resources/classes/extension.php")) {
             require_once $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "app/extensions/resources/classes/extension.php";
             $extension = new extension();
             $extension->xml();
         }
     }
     if (is_readable($_SESSION['switch']['conf']['dir'])) {
         if (file_exists($_SERVER["PROJECT_ROOT"] . "/app/settings/app_config.php")) {
             save_setting_xml();
         }
         if (file_exists($_SERVER["PROJECT_ROOT"] . "/app/modules/app_config.php")) {
             require_once $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/app/modules/resources/classes/modules.php";
             $module = new modules();
             $module->xml();
             //$msg = $module->msg;
         }
         if (file_exists($_SERVER["PROJECT_ROOT"] . "/app/vars/app_config.php")) {
             save_var_xml();
         }
         if (file_exists($_SERVER["PROJECT_ROOT"] . "/app/call_center/app_config.php")) {
             save_call_center_xml();
         }
         if (file_exists($_SERVER["PROJECT_ROOT"] . "/app/gateways/app_config.php")) {
             save_gateway_xml();
         }
         //if (file_exists($_SERVER["PROJECT_ROOT"]."/app/ivr_menu/app_config.php")) {
         //	save_ivr_menu_xml();
         //}
         if (file_exists($_SERVER["PROJECT_ROOT"] . "/app/sip_profiles/app_config.php")) {
             save_sip_profile_xml();
         }
     }
 }