예제 #1
0
            $line = $data['line'];
            $final['displayname_' . $line] = $_REQUEST['displayname_' . $line];
        }
        $sql = "UPDATE endpointman_mac_list SET specific_settings = '" . serialize($final) . "' WHERE id =" . $_REQUEST['edit_id'];
        $endpoint->db->query($sql);
    }
    $info = $endpoint->get_phone_info($_REQUEST['edit_id']);
    $specific_settings = !empty($info['specific_settings']) ? unserialize($info['specific_settings']) : array();
    $z = 0;
    foreach ($info['line'] as $data) {
        $line = $data['line'];
        $displayname[$z]['displayname'] = isset($specific_settings['displayname_' . $line]) ? $specific_settings['displayname_' . $line] : '{$displayname.line.' . $line . '}';
        $displayname[$z]['line'] = $line;
        $z++;
    }
    $endpoint->prepare_message_box();
    $endpoint->tpl->assign("display_name", $displayname);
    echo $endpoint->tpl->draw('specifics_pop');
}
if ($_REQUEST['pop_type'] == 'edit_template') {
    if (empty($_REQUEST['edit_id'])) {
        $message = _("No Device Selected to Edit!") . "!";
        if (isset($message)) {
            $endpoint->display_message_box($message, $endpoint->tpl, 0);
        }
        if (isset($error_message)) {
            $endpoint->display_message_box($error_message, $endpoint->tpl, 1);
        }
    } else {
        $template_editor = TRUE;
        $sql = "UPDATE  endpointman_mac_list SET  model =  '" . $_REQUEST['model_list'] . "' WHERE  id =" . $_REQUEST['edit_id'];