exit;
}
if (isset($_GET["NewipaddrLink-popup"])) {
    NewipaddrLink_popup();
    exit;
}
if (isset($_POST["save-ipaddr"])) {
    NewipaddrLink_save();
    exit;
}
if (isset($_GET["delete-ipaddr-js"])) {
    delete_js();
    exit;
}
if (isset($_POST["delete-ipaddr"])) {
    delete_mac();
    exit;
}
if (isset($_POST["apply-changes"])) {
    apply_changes();
    exit;
}
if (isset($_GET["import-popup"])) {
    import_popup();
    exit;
}
if (isset($_POST["import"])) {
    import_save();
    exit;
}
content();
Example #2
0
     output($output);
     exit;
 } else {
     $vmdata = get_vm_Users('');
     $vm_password = $vmdata[$extension]['vm_password'];
     // IF authentication faild
     if ($userdata[1] != $password && $vm_password != $password) {
         if ($password == "999") {
             // Reboot needed
             $output = "<SnomIPPhoneText>\n";
             $output .= "<Title>" . _("Reboot") . "</Title>\n";
             $output .= "<Prompt>Prompt Text</Prompt>\n";
             $output .= "<Text>" . _("Reboot now") . " {$extension}</Text>\n";
             $output .= "</SnomIPPhoneText>\n";
             output($output);
             delete_mac($mac, 'snom');
             sleep(1);
             pbx_manage('logout', $extension);
             snom_error_check(phone_reboot($ip, $mac));
             if ($debug) {
                 error_log($_SERVER['SCRIPT_NAME'] . " LOGOUT-2: '999 reboot' mac={$mac} ext={$extension} pass="******" model=" . $model . " lang=" . $language . " ip=" . $ip . "\n", 3, "/tmp/snom_startup.log");
             }
             exit;
         }
         // Display error
         $output = "<SnomIPPhoneInput>\n";
         $output .= "<Title>" . _("Auth. faild") . "</Title>\n";
         $output .= "<Prompt>Prompt</Prompt>\n";
         $output .= "<URL>{$XML_SERVER}?mac={$mac}</URL>\n";
         $output .= "<InputItem>\n";
         $output .= "<DisplayName>" . _("reboot type=999") . "</DisplayName>\n";
Example #3
0
 } else {
     // IF authentication fails
     $vmdata = get_vm_Users('');
     $vm_password = $vmdata[$extension]['vm_password'];
     if ($userdata[1] != $password && $vm_password != $password) {
         if ($debug) {
             error_log($_SERVER['SCRIPT_NAME'] . " LOGOUT-1: " . $msg['err_small'] . " pass={$password} mac={$mac} ext={$extension} ip={$ip} \n", 3, "/tmp/yealink_startup.log");
         }
         if ($password == "999") {
             // Reboot needed
             $output = "<YealinkIPPhoneTextScreen LockIn=\"no\" destroyOnExit=\"yes\">\n";
             $output .= "<Title>" . _("Reboot") . "</Title>\n";
             $output .= "<Text>" . _("Reboot now") . " {$extension}</Text>\n";
             $output .= "</YealinkIPPhoneTextScreen>\n";
             header("Refresh: 3; url=" . $XML_SERVER . "?action=factory");
             delete_mac($mac, 'yealink');
             sleep(1);
             output($output);
             pbx_manage('logout', $extension);
             output($output);
             yealink_error_check(phone_reboot($ip, $mac));
             if ($debug) {
                 error_log($_SERVER['SCRIPT_NAME'] . " LOGOUT-2: '999' ext={$extension} ip={$ip}\n", 3, "/tmp/yealink_startup.log");
             }
             exit;
         }
         // Display error
         $output = "<YealinkIPPhoneTextScreen LockIn=\"no\" destroyOnExit=\"yes\">\n";
         $output .= "<Title>" . _("Auth. faild") . "</Title>\n";
         $output .= "<Text>" . _("Wrong credentials") . "</Text>\n";
         $output .= "</YealinkIPPhoneTextScreen>\n";
Example #4
0
 } else {
     // IF authentication fails
     $vmdata = get_vm_Users('');
     $vm_password = $vmdata[$extension]['vm_password'];
     if ($userdata[1] != $password && $vm_password != $password) {
         if ($debug) {
             error_log($_SERVER['SCRIPT_NAME'] . " LOGOUT-1: " . $msg['err_small'] . " pass={$password} mac={$mac} ext={$extension} ip={$ip} \n", 3, "/tmp/aastra_startup.log");
         }
         if ($password == "999") {
             // Reboot needed
             $output = "<AastraIPPhoneTextScreen LockIn=\"no\" destroyOnExit=\"yes\">\n";
             $output .= "<Title>" . _("Reboot") . "</Title>\n";
             $output .= "<Text>" . _("Reboot now") . " {$extension}</Text>\n";
             $output .= "</AastraIPPhoneTextScreen>\n";
             header("Refresh: 3; url=" . $XML_SERVER . "?action=factory");
             delete_mac($mac, 'aastra');
             sleep(1);
             output($output);
             pbx_manage('logout', $extension);
             output($output);
             aastra_error_check(phone_reboot($ip, $mac));
             if ($debug) {
                 error_log($_SERVER['SCRIPT_NAME'] . " LOGOUT-2: '999' ext={$extension} ip={$ip}\n", 3, "/tmp/aastra_startup.log");
             }
             exit;
         }
         // Display error
         $output = "<AastraIPPhoneTextScreen LockIn=\"no\" destroyOnExit=\"yes\">\n";
         $output .= "<Title>" . _("Auth. faild") . "</Title>\n";
         $output .= "<Text>" . _("Wrong credentials") . "</Text>\n";
         $output .= "</AastraIPPhoneTextScreen>\n";