Ejemplo n.º 1
0
    if (isset($_POST['skype_id'])) {
        $skype_id_array = explode("@", str_replace("live:", "", $_POST['skype_id']));
    }
    $option = array("skype_id" => $skype_id_array[0], "user_name" => isset($_POST['user_name']) ? $_POST['user_name'] : '', "button_theme" => isset($_POST['button_theme']) ? $_POST['button_theme'] : '', "button_template" => isset($_POST['button_template']) ? stripslashes($_POST['button_template']) : '', "use_function" => isset($_POST['use_function']) ? $_POST['use_function'] : '', "use_voicemail" => isset($_POST['use_voicemail']) ? $_POST['use_voicemail'] : '', "use_buttonsnap" => isset($_POST['use_buttonsnap']) ? $_POST['use_buttonsnap'] : '', "local_images" => isset($_POST['local_images']) ? $_POST['local_images'] : '', "no_scheme" => isset($_POST['no_scheme']) ? $_POST['no_scheme'] : '', "add_text" => isset($_POST['add_text']) ? $_POST['add_text'] : '', "call_text" => isset($_POST['call_text']) ? $_POST['call_text'] : '', "chat_text" => isset($_POST['chat_text']) ? $_POST['chat_text'] : '', "sendfile_text" => isset($_POST['sendfile_text']) ? $_POST['sendfile_text'] : '', "userinfo_text" => isset($_POST['userinfo_text']) ? $_POST['userinfo_text'] : '', "voicemail_text" => isset($_POST['voicemail_text']) ? $_POST['voicemail_text'] : '', "seperator1_text" => isset($_POST['seperator1_text']) ? $_POST['seperator1_text'] : '', "use_getskype" => isset($_POST['use_getskype']) ? $_POST['use_getskype'] : '', "getskype_newline" => isset($_POST['getskype_newline']) ? $_POST['getskype_newline'] : '', "getskype_text" => isset($_POST['getskype_text']) ? $_POST['getskype_text'] : '', "getskype_link" => isset($_POST['getskype_link']) ? $_POST['getskype_link'] : '', "getskype_custom_link" => isset($_POST['getskype_custom_link']) ? $_POST['getskype_custom_link'] : '');
    $option = array_merge(Skype_Online_Status::$config, $option);
    // strip nostatus flag after settings have been updated
    if (isset($option['nostatus'])) {
        unset($option['nostatus']);
    }
    update_option('skype_status', $option);
    echo "<div id=\"notice\" class=\"updated fade\"><p><strong>" . __('Options updated!', 'skype-online-status') . "</strong></p></div>";
    Skype_Online_Status::$config = $option;
} else {
    if (!empty($_POST['skype_status_reset'])) {
        // pressed reset button
        Skype_Online_Status::$config = Skype_Online_Status::get_default_values();
        update_option('skype_status', Skype_Online_Status::$config);
        echo "<div id=\"notice\" class=\"updated fade\"><p><strong>" . __('Options reset!', 'skype-online-status') . "</strong></p></div>";
    } else {
        $option = Skype_Online_Status::$config;
    }
}
// get all the selected options (except test call id) and their previews into an array
Skype_Online_Status::$preview_options = wp_parse_args(array('skype_id' => 'echo123', 'user_name' => __('Skype Test Call', 'skype-online-status')), $option);
Skype_Online_Status::$walk = Skype_Online_Status::walk_templates('', Skype_Online_Status::$preview_options, "", "", true);
// build output
foreach (Skype_Online_Status::$walk['previews'] as $key => $value) {
    Skype_Online_Status::$previews .= "<div class=\"preview-wrapper\" id=\"{$value['0']}\" style=\"display:";
    if ($value[0] == $option['button_theme']) {
        Skype_Online_Status::$previews .= "block";
        Skype_Online_Status::$current_theme_fullname = $key;
Ejemplo n.º 2
0
?>
" scrolling="auto" allowtransparency="yes" style="margin:0;padding:0;border:0;width:100%;height:600px"></iframe>
		<p style="text-align:right"><a href="#wphead"><?php 
_e('Top');
?>
</a></p>

	<?php 
if (defined('WP_DEBUG') && WP_DEBUG) {
    echo "<h3>DEBUG INFO</h3>\n\t\t<div style=\"width:32%;float:left\"><h4>Old database values</h4><textarea readonly=\"readonly\" style=\"width:100%;height:600px\">";
    foreach (Skype_Online_Status::$config as $key => $value) {
        echo $key . " => " . stripslashes(htmlspecialchars($value)) . "\r\n";
    }
    unset($value);
    echo "</textarea></div>\n\t\t<div style=\"width:32%;margin:0 2%;float:left\"><h4>Updated to</h4><textarea readonly=\"readonly\" style=\"width:100%;height:600px\">";
    if (!empty($_POST['skype_status_update']) || !empty($_POST['skype_status_reset'])) {
        foreach ($option as $key => $value) {
            echo $key . " => " . stripslashes(htmlspecialchars($value)) . "\r\n";
        }
        unset($value);
    }
    echo "</textarea></div>\n\t\t<div style=\"width:32%;float:left\"><h4>Default values</h4><textarea readonly=\"readonly\" style=\"width:100%;height:600px\">";
    foreach (Skype_Online_Status::get_default_values() as $key => $value) {
        echo $key . " => " . stripslashes(htmlspecialchars($value)) . "\r\n";
    }
    unset($value);
    echo "</textarea></div><div style=\"clear:both\"></div>\n\t\t<div id=\"globals\"><h4>Pluging global values and flags</h4> \n\t\t<p>SOSVERSION=" . SOSVERSION . "<br />SOSVERSION_DATE=" . SOSVERSION_DATE . "</p>\n\t\t</div>";
}
?>
	</div> <!-- #notes -->