function nccsf_coming_soon_page()
{
    date_default_timezone_set(get_option('timezone_string'));
    $current_user = wp_get_current_user();
    if (is_user_logged_in()) {
        if (current_user_can('manage_options')) {
            echo '';
        } elseif (in_array($current_user->ID, nccsf_top('site_access'))) {
            echo '';
        } else {
            require_once nccsf_product_info('product_dir') . '/themes/theme.php';
            die;
        }
    } else {
        require_once nccsf_product_info('product_dir') . '/themes/theme.php';
        die;
    }
}
示例#2
0
?>
/themes/jquery.min.js"></script>
        <script type="text/javascript" src="<?php 
echo nccsf_product_info('extend_url');
?>
/themes/twitter.min.js"></script>

        <script type="text/javascript" src="<?php 
echo nccsf_product_info('extend_url');
?>
/themes/theme.js"></script>

        <?php 
if (nccsf_top('color_scheme') == 'custom') {
    $bg_color = nccsf_top('custom_color_scheme');
    $link_color = nccsf_top('custom_link_color');
    echo '
<style type="text/css">
body{background-color: #' . $bg_color . ';} 
a{color:#' . $link_color . ' !important;}
#email_subscription{background:#' . $bg_color . ' !important;} 
</style>
';
}
?>
        
    </head>
    <body>


        <div id="logo">
示例#3
0
function nccsf_email_subscription()
{
    if (nccsf_top('module_email_subscription') == 'enable') {
        $content = '<div id="email_subscription" class="module clearfix">';
        $content .= '<div id="email_subscription_form">
<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open(\'http://feedburner.google.com/fb/a/mailverify?uri=' . nccsf_top('feedburner_id') . '\', \'popupwindow\', \'scrollbars=yes,width=550,height=520\');return true">
<input type="text" placeholder="' . __('Enter your email address', 'nccsf') . '" name="email"/>
<input type="hidden" value="' . nccsf_top('feedburner_id') . '" name="uri"/>
<input type="hidden" name="loc" value="en_US"/>
<input type="submit" value="' . __('Notify Me', 'nccsf') . '" />
</form>
</div>
';
        $content .= '</div><p>&nbsp;</p>';
    } else {
        $content = '';
    }
    return $content;
}
示例#4
0
function nccsf_display_options($options, $submit_button = null)
{
    global $wpdb, $nccsf_msg;
    ?>

    <div id="nc-wrap" class="clearfix">
        <form action="" method="post">

            <?php 
    echo '<p>Check out the <a target="_blank" href="' . nccsf_product_info('pro_version_url') . '" title="">Premium Version </a> of this product.</p>';
    ?>
            
    <?php 
    if (!empty($_POST)) {
        $options_table = nccsf_product_info('options_table_name');
        foreach ($_POST as $key => $value) {
            if (is_array($value)) {
                $update_value = serialize($value);
            } else {
                $update_value = $value;
            }
            $wpdb->query("UPDATE {$options_table} SET option_value = '{$update_value}' WHERE option_name = '{$key}'");
        }
        $fw_message = '<span class="fw-message-success fade">' . __('Settings Updated Successfully!', 'nccsf') . '</span>';
        echo $fw_message;
    }
    // MESSAGES WITHOUT POST
    echo $nccsf_msg;
    ?>


<table width="100%" border="0" cellspacing="0" cellpadding="0">

<?php 
    foreach ($options as $option) {
        ?>


<?php 
        if ($option['otype'] == 'heading') {
            ?>
<tr id="<?php 
            echo $option['oid'];
            ?>
" class="fw-heading"><td colspan="2"><?php 
            echo $option['odefault'];
            ?>
</td></tr>
<?php 
        }
        ?>



<?php 
        if ($option['otype'] == 'sub-heading') {
            ?>
<tr id="<?php 
            echo $option['oid'];
            ?>
" class="fw-heading"><td colspan="2"><?php 
            echo $option['odefault'];
            ?>
</td></tr>
<?php 
        }
        ?>


<?php 
        if ($option['otype'] == 'info') {
            ?>
<tr class="fw-info-white">
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<span class="fw-info-panel"><?php 
            echo $option['odefault'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>


<?php 
        if ($option['otype'] == 'info-yellow') {
            ?>
<tr class="fw-info-row">
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<span class="fw-info-panel"><?php 
            echo $option['odefault'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>






<?php 
        if ($option['otype'] == 'text' || $option['otype'] == 'textbox') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<input type="text" name="<?php 
            echo $option['oid'];
            ?>
" value="<?php 
            echo nccsf_top($option['oid']);
            ?>
" /> 
<span class="fw-suffix"><?php 
            echo $option['osuffix'];
            ?>
</span>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>



<?php 
        if ($option['otype'] == 'textarea') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<textarea rows="5" cols="40" name="<?php 
            echo $option['oid'];
            ?>
"><?php 
            echo nccsf_top($option['oid']);
            ?>
</textarea> 
<span class="fw-suffix"><?php 
            echo $option['osuffix'];
            ?>
</span>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>


<?php 
        if ($option['otype'] == 'wysiwyg') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<textarea class="wysiwyg" rows="5" cols="40" name="<?php 
            echo $option['oid'];
            ?>
"><?php 
            echo nccsf_top($option['oid']);
            ?>
</textarea>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>


<?php 
        if ($option['otype'] == 'dropdown') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<select name="<?php 
            echo $option['oid'];
            ?>
">
<option value=""><?php 
            _e('Please Select', 'nccsf');
            ?>
</option>
<?php 
            foreach ($option['ovalue'] as $key => $opt) {
                if ($key == nccsf_top($option['oid'])) {
                    echo '<option selected value="' . $key . '">' . $opt . '</option>' . "\n";
                } else {
                    echo '<option value="' . $key . '">' . $opt . '</option>' . "\n";
                }
            }
            ?>
</select>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>


<?php 
        if ($option['otype'] == 'multi-dropdown' || $option['otype'] == 'multi-select' || $option['otype'] == 'multiselect' || $option['otype'] == 'multidropdown') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<select multiple size="4" class="fw-multiselect" name="<?php 
            echo $option['oid'];
            ?>
[]">
<option value=""><?php 
            _e('Please Select', 'nccsf');
            ?>
</option>
<?php 
            foreach ($option['ovalue'] as $key => $opt) {
                if (in_array($key, nccsf_top($option['oid']))) {
                    echo '<option selected value="' . $key . '">' . $opt . '</option>' . "\n";
                } else {
                    echo '<option value="' . $key . '">' . $opt . '</option>' . "\n";
                }
            }
            ?>
</select>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>


<?php 
        if ($option['otype'] == 'users') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<select multiple size="4" class="fw-multiselect" name="<?php 
            echo $option['oid'];
            ?>
[]">
    <option value="none"><?php 
            _e('None', 'nccsf');
            ?>
</option>
<?php 
            foreach (get_users() as $user) {
                if (in_array($user->ID, nccsf_top($option['oid']))) {
                    echo '<option selected value="' . $user->ID . '">' . $user->ID . ' - ' . $user->user_login . ' | ' . $user->user_email . '</option>' . "\n";
                } else {
                    echo '<option value="' . $user->ID . '">' . $user->ID . ' - ' . $user->user_login . ' | ' . $user->user_email . '</option>' . "\n";
                }
            }
            ?>
</select>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>


<?php 
        if ($option['otype'] == 'category') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<select name="<?php 
            echo $option['oid'];
            ?>
">
<option value=""><?php 
            _e('Please Select', 'nccsf');
            ?>
</option>
<?php 
            $args = array('type' => 'post', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => 0, 'taxonomy' => 'category');
            $categories = get_categories($args);
            foreach ($categories as $category) {
                if ($category->term_id == nccsf_top($option['oid'])) {
                    echo '<option selected value="' . $category->term_id . '">' . $category->cat_name . '</option>' . "\n";
                } else {
                    echo '<option value="' . $category->term_id . '">' . $category->cat_name . '</option>' . "\n";
                }
            }
            ?>
</select>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>



<?php 
        if ($option['otype'] == 'categories') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<select multiple size="4" class="fw-multiselect" name="<?php 
            echo $option['oid'];
            ?>
[]">
<option value=""><?php 
            _e('None', 'nccsf');
            ?>
</option>
<?php 
            $args = array('type' => 'post', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => 0, 'taxonomy' => 'category');
            $categories = get_categories($args);
            foreach ($categories as $category) {
                if (in_array($category->term_id, nccsf_top($option['oid']))) {
                    echo '<option selected value="' . $category->term_id . '">' . $category->cat_name . '</option>' . "\n";
                } else {
                    echo '<option value="' . $category->term_id . '">' . $category->cat_name . '</option>' . "\n";
                }
            }
            ?>
</select>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>



<?php 
        if ($option['otype'] == 'page') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<select name="<?php 
            echo $option['oid'];
            ?>
">
<option value=""><?php 
            _e('Please Select', 'nccsf');
            ?>
</option>
<?php 
            $args = array('sort_order' => 'ASC', 'sort_column' => 'post_title', 'parent' => -1);
            $pages = get_pages($args);
            foreach ($pages as $pagg) {
                if ($pagg->ID == nccsf_top($option['oid'])) {
                    echo '<option selected value="' . $pagg->ID . '">' . $pagg->post_title . '</option>' . "\n";
                } else {
                    echo '<option value="' . $pagg->ID . '">' . $pagg->post_title . '</option>' . "\n";
                }
            }
            ?>
</select>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>



<?php 
        if ($option['otype'] == 'pages') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<select multiple size="4" class="fw-multiselect" name="<?php 
            echo $option['oid'];
            ?>
[]">
<option value="0"><?php 
            _e('None', 'nccsf');
            ?>
</option>
<?php 
            $args = array('sort_order' => 'ASC', 'sort_column' => 'post_title', 'parent' => -1);
            $pages = get_pages($args);
            foreach ($pages as $pagg) {
                if (in_array($pagg->ID, nccsf_top($option['oid']))) {
                    echo '<option selected value="' . $pagg->ID . '">' . $pagg->post_title . '</option>' . "\n";
                } else {
                    echo '<option value="' . $pagg->ID . '">' . $pagg->post_title . '</option>' . "\n";
                }
            }
            ?>
</select>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>



<?php 
        if ($option['otype'] == 'tag') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<select name="<?php 
            echo $option['oid'];
            ?>
">
<option value=""><?php 
            _e('Please Select', 'nccsf');
            ?>
</option>
<?php 
            $tags = get_tags(array('orderby' => 'name'));
            foreach ($tags as $tag) {
                if ($tag->slug == nccsf_top($option['oid'])) {
                    echo '<option selected value="' . $tag->slug . '">' . $tag->name . '</option>' . "\n";
                } else {
                    echo '<option value="' . $tag->slug . '">' . $tag->name . '</option>' . "\n";
                }
            }
            ?>
</select>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>



<?php 
        if ($option['otype'] == 'tags') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>
<select multiple size="4" class="fw-multiselect" name="<?php 
            echo $option['oid'];
            ?>
[]">
<option value="0"><?php 
            _e('None', 'nccsf');
            ?>
</option>
<?php 
            $tags = get_tags(array('orderby' => 'name'));
            foreach ($tags as $tag) {
                if (in_array($tag->slug, nccsf_top($option['oid']))) {
                    echo '<option selected value="' . $tag->slug . '">' . $tag->name . '</option>' . "\n";
                } else {
                    echo '<option value="' . $tag->slug . '">' . $tag->name . '</option>' . "\n";
                }
            }
            ?>
</select>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>



<?php 
        if ($option['otype'] == 'checkbox') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td class="fw-checkboxes">
<span class="fw-info-panel">
<?php 
            foreach ($option['ovalue'] as $key => $opt) {
                if (@in_array($key, nccsf_top($option['oid']))) {
                    echo '<label><input checked="checked" name="' . $option['oid'] . '[]" type="checkbox" value="' . $key . '" /> ' . $opt . ' </label>';
                } else {
                    echo '<label><input name="' . $option['oid'] . '[]" type="checkbox" value="' . $key . '" /> ' . $opt . ' </label>';
                }
            }
            echo '<input checked name="' . $option['oid'] . '[]" type="checkbox" value="null" class="hidden" />';
            ?>
</span>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>


<?php 
        if ($option['otype'] == 'radio') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td class="fw-checkboxes">
<span class="fw-info-panel">
<?php 
            foreach ($option['ovalue'] as $key => $opt) {
                if ($key == nccsf_top($option['oid'])) {
                    echo '<label><input checked name="' . $option['oid'] . '" type="radio" value="' . $key . '" /> ' . $opt . ' </label>';
                } else {
                    echo '<label><input name="' . $option['oid'] . '" type="radio" value="' . $key . '" /> ' . $opt . ' </label>';
                }
            }
            ?>
</span>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>



<?php 
        if ($option['otype'] == 'date') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td class="fw-relative">
<input type="text" name="<?php 
            echo $option['oid'];
            ?>
" class="date-picker" value="<?php 
            echo nccsf_top($option['oid']);
            ?>
" />
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>


<?php 
        if ($option['otype'] == 'upload' || $option['otype'] == 'file') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td class="fw-relative">
<input id="<?php 
            echo 'img-' . rand(4, 9999);
            ?>
" class="upload_image" type="text" name="<?php 
            echo $option['oid'];
            ?>
" value="<?php 
            echo nccsf_top($option['oid']);
            ?>
" />
<input class="upload_image_button button-secondary" type="button" value="<?php 
            _e('Upload Image', 'nccsf');
            ?>
" />
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>
</td>
</tr>
<?php 
        }
        ?>



<?php 
        if ($option['otype'] == 'color') {
            ?>
<tr>
<td class="label">
<span><?php 
            echo $option['oname'];
            ?>
</span>
</td>
<td>


<input id="<?php 
            echo $option['oid'];
            ?>
_color" name="<?php 
            echo $option['oid'];
            ?>
" class="fw-colorpicker-input" type="text" value="<?php 
            echo nccsf_top($option['oid']);
            ?>
" />
<span id="<?php 
            echo $option['oid'];
            ?>
_preview_color" class="fw_preview_color" style="background-color:#<?php 
            echo nccsf_top($option['oid']);
            ?>
">&nbsp;</span>
<span class="fw-desc"><?php 
            echo $option['oinfo'];
            ?>
</span>

<script type="text/javascript">
jQuery('#<?php 
            echo $option['oid'];
            ?>
_color').ColorPicker({
color: '#0000ff',
onShow: function (colpkr) {
jQuery(colpkr).fadeIn(500);
return false;
},
onHide: function (colpkr) {
jQuery(colpkr).fadeOut(500);
return false;
},
onChange: function (hsb, hex, rgb) {
jQuery('#<?php 
            echo $option['oid'];
            ?>
_color').val(hex);
jQuery('#<?php 
            echo $option['oid'];
            ?>
_preview_color').css({"background-color":"#"+hex});
}
});
</script>




</td>
</tr>

<?php 
        }
        ?>

<?php 
    }
    ?>

    <?php 
    if ($submit_button == null) {
        ?>
                    <tr>
                        <td>&nbsp;</td>
                        <td>
                            <input name="save_settings" type="submit" class="button-primary" value="<?php 
        _e('Save Settings', 'nccsf');
        ?>
" />
                        </td>
                    </tr>
    <?php 
    }
    ?>

            </table>

        </form>
    </div><!-- /nc-wrap -->

    <?php 
}