示例#1
0
/**
 * blah
 *
 * @param int $id id of the banner
 *
 * @return null
 */
function BannerImage_drawForm($id = 0)
{
    if (!$id) {
        $fdata = array('id' => 0, 'html' => '', 'name' => 'banner');
    } else {
        $fdata = dbRow("select * from banners_images where id={$id}");
    }
    echo '<form method="post" action="/ww.admin/plugin.php?_plugin=banner-ima' . 'ge&amp;_page=index" enctype="multipart/form-data"><input type="hidden' . '" name="id" value="' . (int) $fdata['id'] . '" />';
    echo '<table>';
    // {
    echo '<tr><th>Name</th><td><input name="name" value="' . htmlspecialchars($fdata['name']) . '" /></td></tr>';
    // }
    // { what pages should this be applied to
    echo '<tr><th>Pages</th><td>This banner will only be shown on the <select' . ' name="pages_' . $fdata['id'] . '[]" multiple="multiple" style="max-width' . ':200px;height:500px">';
    $ps = dbAll('select * from banners_pages where bannerid=' . $fdata['id']);
    $pages = array();
    if (count($ps)) {
        foreach ($ps as $p) {
            $pages[] = $p['pageid'];
        }
    }
    BannerImage_selectKiddies(0, 1, $pages);
    echo '</select> pages. <span style="color:red;font-weight:bold">If no pag' . 'es are specified, then the banner will be shown on all pages.</span><' . '/td></tr>';
    // }
    // { show HTML form
    echo '<tr><th>Banner</th><td><div id="banner_image_html">' . ckeditor('html_' . $fdata['id'], Core_unfixImageResizes($fdata['html']), 0, '', 180) . '</div></td></tr>';
    // }
    // { show submit button and end form
    echo '<tr><td><a href="./plugin.php?_plugin=banner-image&_page=index&dele' . 'te_banner=' . $fdata['id'] . '" onclick="return confirm(\'are you sure yo' . 'u want to remove this banner?\');" title="remove banner">[x]</a></td>' . '<td><input type="submit" name="save_banner" value="Update" /></td></tr>';
    // }
    echo '</table></form>';
}
示例#2
0
文件: form.php 项目: raylouis/kvwebme
/**
 * function for showing a page's body, overriding using a plugin if necessary
 *
 * @param array $page      the page's db row
 * @param array $page_vars any meta data for the page
 *
 * @return the page form
 */
function Page_showBody($page, $page_vars)
{
    foreach ($GLOBALS['PLUGINS'] as $plugin) {
        if (isset($plugin['admin']['body_override'])) {
            return $plugin['admin']['body_override']($page, $page_vars);
        }
    }
    return ckeditor('body', $page['body'], null, 1);
}
示例#3
0
    }
    echo '>' . $r['name'] . '</option>';
}
echo '</select></td></tr>';
// }
// { subject
echo '<tr><th>' . __('Subject of the email') . '</th>' . '<td><input name="onlinestore-emails-subject" class="wide"' . ' value="' . htmlspecialchars(@$rs['email_' . $email . '_subject']['val']) . '"/></td>' . '</tr>';
// }
// { recipient
echo '<tr><th>' . __('Admin who receives a copy of this email') . '</th>' . '<td><input type="email" name="onlinestore-emails-recipient"' . ' multiple="multiple"' . ' value="' . htmlspecialchars(@$rs['email_' . $email . '_recipient']['val']) . '"/></td>' . '</tr>';
// }
// { replyto
echo '<tr><th>' . __('Reply-to address') . '</th>' . '<td><input type="email" name="onlinestore-emails-replyto"' . ' multiple="multiple"' . ' value="' . htmlspecialchars(@$rs['email_' . $email . '_replyto']['val']) . '"/></td>' . '</tr>';
// }
// { body
echo '<tr><th>' . __('Email Body') . '</th>';
if (isset($rs['email_' . $email]['val']) && $rs['email_' . $email]['val']) {
    $body = $rs['email_' . $email]['val'];
} else {
    $fname = dirname(__FILE__) . '/email_template_' . $email . '.html';
    if (file_exists($fname)) {
        $body = file_get_contents($fname);
    } else {
        $body = '';
    }
}
echo '<td>' . ckeditor('onlinestore-emails-body', $body) . '</td></tr>';
// }
echo '<tr><th></th><td>' . '<input type="hidden" name="action" value="save"/>' . '<button>' . __('Save') . '</button></td></tr></table></form>';
// }
WW_addScript('online-store/admin/emails.js');
示例#4
0
/**
 * display a field
 *
 * @param array $datafield the field's data
 * @param array $def       field definition data
 *
 * @return string categories
 */
function Products_showDataField($datafield, $def)
{
    if ($def['t'] == 'selected-image') {
        return;
    }
    echo '<tr><th>' . htmlspecialchars($def['n']) . '</th><td>';
    switch ($def['t']) {
        case 'checkbox':
            // {
            echo '<input name="data_fields[' . htmlspecialchars($def['n']) . ']" ' . 'type="checkbox"';
            if ($def['r']) {
                echo ' class="required"';
            }
            if ($datafield['v']) {
                echo ' checked="checked"';
            }
            echo ' />';
            break;
            // }
        // }
        case 'date':
            // {
            if (@$def['u']) {
                echo 'this will be entered by the user';
            } else {
                echo '<input class="date-human';
                if ($def['r']) {
                    echo ' required';
                }
                echo '" name="data_fields[' . htmlspecialchars($def['n']) . ']" value="' . htmlspecialchars($datafield['v']) . '" />';
            }
            break;
            // }
        // }
        case 'selectbox':
            // {
            if (@$def['u']) {
                if ($datafield['v'] == '') {
                    $datafield['v'] = $def['e'];
                }
                echo '<textarea class="selectbox-userdefined" ' . 'name="data_fields[' . htmlspecialchars($def['n']) . ']">' . htmlspecialchars($datafield['v']) . '</textarea>';
            } else {
                $opts = explode("\n", $def['e']);
                echo '<select name="data_fields[' . htmlspecialchars($def['n']) . ']">';
                foreach ($opts as $opt) {
                    echo '<option';
                    if ($opt == $datafield['v']) {
                        echo ' selected="selected"';
                    }
                    echo '>' . htmlspecialchars($opt) . '</option>';
                }
                echo '</select>';
            }
            break;
            // }
        // }
        case 'textarea':
            // {
            echo ckeditor('data_fields[' . htmlspecialchars($def['n']) . ']', $datafield['v'], null, true);
            break;
            // }
        // }
        case 'user':
            // {
            require_once SCRIPTBASE . '/ww.incs/api-admin.php';
            echo '<select name="data_fields[' . htmlspecialchars($def['n']) . ']">' . '<option value="0"> -- ' . __('Choose') . ' -- </option>';
            $groups = explode("\n", $def['e']);
            foreach ($groups as $k => $v) {
                if ($v == '') {
                    unset($groups[$k]);
                } else {
                    $groups[$k] = addslashes($v);
                }
            }
            $gids = dbAll('select id from groups where name in ("' . join('", "', $groups) . '")', 'id');
            $users = dbAll('select distinct id,name,email from user_accounts,users_groups' . ' where groups_id in (' . join(',', array_keys($gids)) . ')' . ' and user_accounts_id=id order by name,email');
            foreach ($users as $user) {
                echo '<option value="' . $user['id'] . '"';
                if ($user['id'] == $datafield['v']) {
                    echo ' selected="selected"';
                }
                $name = $user['name'];
                $email = $user['email'];
                if ($name) {
                    if ($email) {
                        $name .= ' (' . $email . ')';
                    }
                } else {
                    $name = $email;
                }
                echo '>' . htmlspecialchars($name) . '</option>';
            }
            echo '</select>';
            break;
            // }
        // }
        default:
            // { inputbox
            echo '<input name="data_fields[' . htmlspecialchars($def['n']) . ']"';
            if ($def['r'] && !@$def['u']) {
                echo ' class="required"';
            }
            echo ' value="' . htmlspecialchars($datafield['v']) . '" />';
            // }
    }
    echo '</td></tr>';
}
                            <?php 
}
?>
                        </select>
                        </p>

                        <label for="title">Title</label>
                        <p><input type="text" id="title" name="title" class="validate[required]" value="<?php 
echo $action == "add" ? set_value('title') : $thread_info->title;
?>
" ></p>

                        <p>Content</p>
                        <p>
                        <?php 
ckeditor($action == "add" ? set_value('post_content') : $thread_info->content, 'post_content');
?>
                        </p>

                        <label for="tags">Tags</label>
                        <p><textarea id="tags" name="tags"><?php 
echo $action == "add" ? set_value('tags') : isset($tags) ? $tags : '';
?>
</textarea></p>
                		
                        <?php 
if ($action == "edit") {
    echo form_hidden('thread_id', $thread_info->ID);
}
?>
示例#6
0
foreach ($types as $k => $v) {
    $c .= '<option value="' . $k . '"';
    if ($k == @$vars['onlinestore_viewtype']) {
        $c .= ' selected="selected"';
    }
    $c .= '>' . __($v) . '</option>';
}
$c .= '</select>';
// }
// { checkout form
$c .= '<div class="online-store-checkout-form">';
if ($page['body'] == '' || $page['body'] == '<h1>' . htmlspecialchars($page['name']) . '</h1><p>&nbsp;</p>') {
    $page['body'] = file_get_contents(dirname(__FILE__) . '/body_template_sample.html');
}
$txt = isset($vars['online_stores_proceedToPayment']) ? $vars['online_stores_proceedToPayment'] : 'Proceed to Payment';
$c .= ckeditor('body', $page['body']) . 'text for "Proceed to Payment" button:' . ' <input name="page_vars[online_stores_proceedToPayment]"' . ' value="' . htmlspecialchars($txt) . '"/><br/>' . '<a href="#" class="docs" page="/ww.plugins/online-store/docs/form.html">' . __('Checkout Template Codes') . '</a></div>';
// }
$c .= '</div>';
// }
// { form fields
if (!isset($vars['online_stores_fields']) || !$vars['online_stores_fields']) {
    $vars['online_stores_fields'] = '{}';
}
$c .= '<div id="online-stores-fields">' . '<script>var os_fields=' . $vars['online_stores_fields'] . ';</script>' . '<input type="hidden" name="page_vars[online_stores_fields]" value="' . htmlspecialchars($vars['online_stores_fields']) . '" />' . '</div>';
// }
// { countries
// { list of countries
$continents = array('Africa' => array('Algeria', 'Angola', 'Benin', 'Botswana', 'Burkina', 'Burundi', 'Cameroon', 'Cape Verde', 'Central African Republic', 'Chad', 'Comoros', 'Congo', 'Congo, Democratic Republic of', 'Djibouti', 'Egypt', 'Equatorial Guinea', 'Eritrea', 'Ethiopia', 'Gabon', 'Gambia', 'Ghana', 'Guinea', 'Guinea-Bissau', 'Ivory Coast', 'Kenya', 'Lesotho', 'Liberia', 'Libya', 'Madagascar', 'Malawi', 'Mali', 'Mauritania', 'Mauritius', 'Morocco', 'Mozambique', 'Namibia', 'Niger', 'Nigeria', 'Rwanda', 'Sao Tome and Principe', 'Senegal', 'Seychelles', 'Sierra Leone', 'Somalia', 'South Africa', 'South Sudan', 'Sudan', 'Swaziland', 'Tanzania', 'Togo', 'Tunisia', 'Uganda', 'Zambia', 'Zimbabwe'), 'Asia' => array('Afghanistan', 'Bahrain', 'Bangladesh', 'Bhutan', 'Brunei', 'Burma (Myanmar)', 'Cambodia', 'China', 'East Timor', 'India', 'Indonesia', 'Iran', 'Iraq', 'Israel', 'Japan', 'Jordan', 'Kazakhstan', 'Korea, North', 'Korea, South', 'Kuwait', 'Kyrgyzstan', 'Laos', 'Lebanon', 'Malaysia', 'Maldives', 'Mongolia', 'Nepal', 'Oman', 'Pakistan', 'Philippines', 'Qatar', 'Russian Federation', 'Saudi Arabia', 'Singapore', 'Sri Lanka', 'Syria', 'Tajikistan', 'Thailand', 'Turkey', 'Turkmenistan', 'United Arab Emirates', 'Uzbekistan', 'Vietnam', 'Yemen'), 'Europe' => array('Albania', 'Andorra', 'Armenia', 'Austria', 'Azerbaijan', 'Belarus', 'Belgium', 'Bosnia and Herzegovina', 'Bulgaria', 'Croatia', 'Cyprus', 'Czech Republic', 'Denmark', 'Estonia', 'Finland', 'France', 'Georgia', 'Germany', 'Greece', 'Hungary', 'Iceland', 'Ireland', 'Italy', 'Latvia', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macedonia', 'Malta', 'Moldova', 'Monaco', 'Montenegro', 'Netherlands', 'Norway', 'Poland', 'Portugal', 'Romania', 'San Marino', 'Serbia', 'Slovakia', 'Slovenia', 'Spain', 'Sweden', 'Switzerland', 'Ukraine', 'United Kingdom', 'Vatican City'), 'North America' => array('Antigua and Barbuda', 'Bahamas', 'Barbados', 'Belize', 'Canada', 'Costa Rica', 'Cuba', 'Dominica', 'Dominican Republic', 'El Salvador', 'Grenada', 'Guatemala', 'Haiti', 'Honduras', 'Jamaica', 'Mexico', 'Nicaragua', 'Panama', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Vincent and the Grenadines', 'Trinidad and Tobago', 'United States'), 'Oceania' => array('Australia', 'Fiji', 'Kiribati', 'Marshall Islands', 'Micronesia', 'Nauru', 'New Zealand', 'Palau', 'Papua New Guinea', 'Samoa', 'Solomon Islands', 'Tonga', 'Tuvalu', 'Vanuatu'), 'South America' => array('Argentina', 'Bolivia', 'Brazil', 'Chile', 'Colombia', 'Ecuador', 'Guyana', 'Paraguay', 'Peru', 'Suriname', 'Uruguay', 'Venezuela'));
// }
$c .= '<div id="online-store-countries"><div class="tabs"><ul>';
$cnum = 0;
示例#7
0
文件: form.php 项目: raylouis/kvwebme
    require_once dirname(__FILE__) . '/../api-admin.php';
    $_REQUEST = array('name' => 'Main Forum', 'page' => $page['id']);
    Forum_adminForumAdd();
    $forums = dbAll('select name, id from forums where page_id = ' . $page['id']);
}
foreach ($forums as $forum) {
    $c .= '<tr id="forum-' . $forum['id'] . '"><td>' . htmlspecialchars($forum['name']) . '</td><td>';
    foreach ($groups as $group) {
        $c .= htmlspecialchars($group['name']) . ' <input type="checkbox" name="moderators-' . $forum['id'] . '[]"' . ' value=' . $group['id'] . ' class="moderators"';
        $sql = 'select moderator_groups from forums where id = ' . $forum['id'];
        $mods = explode(',', dbOne($sql, 'moderator_groups'));
        if (in_array($group['id'], $mods, false)) {
            $c .= ' checked="checked" ';
        }
        $c .= ' /><br />';
    }
    $c .= '<a href="javascript:;" class="add-group" ' . 'id="add-group-link-for-forum-' . $forum['id'] . '">[+]</a>';
    $c .= '</td><td>' . '<a href="javascript:;" id="delete-forum-' . $forum['id'] . '" ' . 'class="delete-forum-link">[x]</a></td></tr>';
}
$c .= '</tbody></table>';
$c .= '<a href="javascript:;" class="add-forum" page="' . $page['id'] . '">[+]</a>' . '</div>';
// }
// { header
$c .= '<div id="t-header"><p>Text to be shown above the form</p>' . ckeditor('body', $page['body']) . '</div>';
// }
// { footer
$c .= '<div id="t-footer"><p>Text to appear below the form.</p>';
$c .= ckeditor('page_vars[footer]', isset($vars['footer']) ? $vars['footer'] : '', 0);
$c .= '</div>';
// }
$c .= '</div>';
}
?>
			            </select>
				        <input class="btn" type="button" value="Add New Brand" id="add_new" />
				        </p>

				        <label for="title">Title</label>
				        <p><input type="text" id="title" name="title" value="<?php 
echo $action == "add" ? set_value('title') : $review_info->title;
?>
" class="validate[required]" ></p>

				        <p>Content</p>
				        <p>
				        <?php 
ckeditor($action == "add" ? set_value('post_content') : $review_info->content, 'post_content');
?>
				        <!--<textarea id="content" name="content"><?php 
echo $action == "add" ? set_value('post_content') : $review_info->content;
?>
</textarea>-->
				        </p>

				        <label for="tags">Tags</label>
				        <p><textarea id="tags" name="tags"><?php 
echo $action == "add" ? set_value('tags') : isset($tags) ? $tags : '';
?>
</textarea></p>

				        <label for="rating">Rate this product</label>
						<p><input type="range" id="rating" name="rating" min="0" max="5" step="1" value="<?php 
示例#9
0
文件: form.php 项目: raylouis/kvwebme
$c .= '</div>';
// }
// { email to sender
$c .= '<div id="email-to-sender"><p>Email to send to the sender.</p>';
if (!isset($vars['recommendthissite_emailtosender'])) {
    $vars['recommendthissite_emailtosender'] = '<p>Dear {{$sender_name}}</p>' . '<p>Thank you for recommending our site to your friend. We really ' . 'appreciate it!</p>' . '<p>Kind Regards</p><p>{{$smarty.server.HTTP_HOST}}</p>';
    $vars['recommendthissite_emailtosender_subject'] = 'Your recommendation of {{$smarty.server.HTTP_HOST}}';
}
$c .= '<table><tr><th>Subject</th><td><input ' . 'name="page_vars[recommendthissite_emailtosender_subject]" value="' . htmlspecialchars($vars['recommendthissite_emailtosender_subject']) . '" /></td></tr>' . '<tr><td colspan="2">' . ckeditor('page_vars[recommendthissite_emailtosender]', $vars['recommendthissite_emailtosender']) . '</td></tr></table>';
$c .= '</div>';
// }
// { email to admin
$c .= '<div id="email-to-admin"><p>Email to send to the admin.</p>';
if (!isset($vars['recommendthissite_emailtoadmin'])) {
    $vars['recommendthissite_emailtoadmin'] = '<p>{{$sender_name}} ' . '({{$sender_email}}) has recommended your site ' . '{{$smarty.server.HTTP_HOST}} to {{$friend_name}} ' . '({{$friend_email}})</p>';
    $vars['recommendthissite_emailtoadmin_subject'] = '[{{$smarty.server.HTTP_HOST}}] Website Recommendation';
    $vars['recommendthissite_emailtoadmin_email'] = 'info@' . preg_replace('/^www\\./', '', $_SERVER['HTTP_HOST']);
}
$c .= '<table><tr><th>Admin Email</th><td><input ' . 'name="page_vars[recommendthissite_emailtoadmin_email]" value="' . htmlspecialchars($vars['recommendthissite_emailtoadmin_email']) . '" /></td></tr>' . '<tr><th>Subject</th><td><input ' . 'name="page_vars[recommendthissite_emailtoadmin_subject]" value="' . htmlspecialchars($vars['recommendthissite_emailtoadmin_subject']) . '" /></td></tr>' . '<tr><td colspan="2">' . ckeditor('page_vars[recommendthissite_emailtoadmin]', $vars['recommendthissite_emailtoadmin']) . '</td></tr></table>';
$c .= '</div>';
// }
// { success message
$c .= '<div id="success">';
$c .= '<p>What should be displayed on-screen when the message is sent.</p>';
if (!isset($vars['recommendthissite_successmsg'])) {
    $vars['recommendthissite_successmsg'] = '<p>Thank you for your recommendation.' . '</p><p>We really appreciate it!</p>';
}
$c .= ckeditor('page_vars[recommendthissite_successmsg]', $vars['recommendthissite_successmsg']);
$c .= '</div>';
// }
echo '</div>';
示例#10
0
if ($action == "add") {
    echo form_open_multipart('backadmin/project/create_exec', array('id' => 'form'));
} else {
    echo form_open_multipart('backadmin/project/update_exec', array('id' => 'form'));
}
?>

                <label for="title">Title</label>
                <p><input type="text" id="title" name="title" value="<?php 
echo $action == "add" ? set_value('title') : htmlspecialchars($project_info->title);
?>
" class="validate[required]"></p>
        
                <p>Content</p>
                <?php 
ckeditor($action == "add" ? set_value('post_content') : $project_info->content, 'post_content');
?>
        
                <label for="tag">Tags</label>
                <p><textarea id="tags" name="tags"><?php 
echo $action == "add" ? set_value('tags') : isset($tags) ? $tags : '';
?>
</textarea></p>
                
                <p><strong>Upload up to 3 images for this project</strong></p>
                <?php 
for ($i = 0; $i <= 2; $i++) {
    ?>
                    <label for="photo<?php 
    echo $i + 1;
    ?>
示例#11
0
if ($action == "add") {
    echo form_open_multipart('backadmin/article/create_exec', array('id' => 'form'));
} else {
    echo form_open_multipart('backadmin/article/update_exec', array('id' => 'form'));
}
?>

                <label for="title">Title</label>
                <p><input type="text" id="title" name="title" value="<?php 
echo $action == "add" ? set_value('title') : $article_info->title;
?>
" class="validate[required]"></p>
        
                <p>Content</p>
                <?php 
ckeditor($action == "add" ? set_value('post_content') : $article_info->content, 'post_content');
?>
                <!--<textarea id="content" name="content"><?php 
echo $action == "add" ? set_value('post_content') : $article_info->content;
?>
</textarea>-->
        
                <label for="short_desc">Short Desc</label>
                <p><textarea id="short_desc" name="short_desc"><?php 
echo $action == "add" ? set_value('short_desc') : isset($article_info->short_desc) ? $article_info->short_desc : '';
?>
</textarea></p>
                

				<?php 
if ($action == "edit") {
示例#12
0
echo ckeditor_title('desc', htmlspecialchars_decode(Input::post('desc')));
?>
        <?php 
echo Form::error('desc', $err);
?>
    </div>
</div>

<div class="form-group">
    <?php 
echo Form::label(__('art.detail'), 'content', array('class' => 'col-sm-2 control-label required'));
?>
    <!--BEGIN ADD CKEDITOR -->
    <div class="form-spacing col-lg-9 col-md-9 col-sm-9">
        <?php 
echo ckeditor('content', htmlspecialchars_decode(Input::post('content')));
?>
        <?php 
echo Form::error('content', $err);
?>
    </div>
    <!--END ADD CKEDITOR -->
</div>

<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
        <?php 
echo Form::button('submit', __('common.btn_submit'), array('class' => 'btn btn-success'));
?>
        <?php 
echo Html::anchor("admin/article?{$current_cat_view}", __('common.cancel'), array('class' => 'btn btn-default'));
示例#13
0
echo ckeditor_title('desc', htmlspecialchars_decode(Input::post('desc', isset($a) ? $a->desc : '')));
?>
        <?php 
echo Form::error('desc', $err);
?>
    </div>
</div>

<div class="form-group">
    <?php 
echo Form::label(__('art.detail'), 'content', array('class' => 'col-sm-2 control-label required'));
?>
    <!--BEGIN ADD CKEDITOR -->
    <div class="form-spacing col-lg-9 col-md-9 col-sm-9">
        <?php 
echo ckeditor('content', htmlspecialchars_decode(Input::post('content', isset($a) ? $a->content : '')), array('class' => 'form-control', 'rows' => 4, 'height' => '400px'), '');
?>
        <?php 
echo Form::error('content', $err);
?>
    </div>
    <!--END ADD CKEDITOR -->
</div>

<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
        <?php 
echo Form::button('submit', __('common.save'), array('class' => 'btn btn-info'));
?>
        <?php 
echo Html::anchor("admin/article?{$current_cat_view}", __('common.cancel'), array('class' => 'btn btn-default'));
示例#14
0
 * @category   None
 * @package    None
 * @subpackage None
 * @author     Kae Verens <*****@*****.**>
 * @license    GPL Version 2
 * @link       www.kvweb.me
 */
$c = '<div class="tabs">' . '<ul>' . '<li><a href="#ads-header">Header</a></li>' . '<li><a href="#ads-footer">Footer</a></li>' . '<li><a href="#ads-payment-details">Options</a></li>' . '</ul>';
// { header
$c .= '<div id="ads-header">' . '<p>' . __('This text will appear above the contents.') . '</p>';
$c .= ckeditor('body', $page['body']);
$c .= '</div>';
// }
// { footer
$c .= '<div id="ads-footer">' . '<p>' . __('This text will appear below the contents.') . '</p>';
$c .= ckeditor('page_vars[footer]', isset($vars['footer']) ? $vars['footer'] : '');
$c .= '</div>';
// }
// { payment details
$c .= '<div id="ads-payment-details"><table>' . '<tr><th>' . __('Paypal address') . '</th><td><input name="page_vars[ads-paypal]" value="' . htmlspecialchars($vars['ads-paypal']) . '" type="email" /></td></tr>' . '<tr><th>' . __('Profile Page Payment Tab') . '</th><td>' . ckeditor('page_vars[ads-profile-page]', isset($vars['ads-profile-page']) ? $vars['ads-profile-page'] : '') . '</td></tr>' . '<tr><th>Fullpage parent</th><td>' . '<select id="ads_fullpage_parent" name="' . 'page_vars[ads_fullpage_parent]">';
if (@$vars['ads_fullpage_parent']) {
    $parent = Page::getInstance($vars['ads_fullpage_parent']);
    $c .= '<option value="' . $parent->id . '">' . htmlspecialchars(__FromJSON($parent->name)) . '</option>';
} else {
    $page_vars['ads_fullpage_parent'] = 0;
    $c .= '<option value="0"> -- none -- </option>';
}
$c .= '</select></td></tr>' . '</table></div>';
// }
$c .= '</div>';
$c .= '<script src="/ww.plugins/ads/admin/page-type.js"></script>';
示例#15
0
}
echo '<div id="poll-tabs">';
echo '<ul>';
echo '<li><a href="#polls-main-details-tab">Main</a></li>';
echo '<li><a href="#polls-answers-tab">Answers</a></li>';
echo '</ul>';
// { main details
echo '<div id="polls-main-details-tab">';
echo '<table class="poll_creation_table" style="width:100%">';
echo '<tr><th>Name</th><td><input name="name" value="' . htmlspecialchars($data['name']) . '" /></td>';
echo '<th>Enabled</th><td><select name="enabled">' . '<option value="1">Yes</option><option value="0"';
if ($data['enabled'] == 0) {
    echo ' selected="selected"';
}
echo '">No</option></select></td></tr>';
echo '<tr><th>Question</th><td colspan="3">' . ckeditor('body', $data['body']) . '</td></tr>';
echo '</table></div>';
// }
// { answers
echo '<div id="polls-answers-tab"><table id="poll_answers" width="100%">';
echo '<tr><th>Answer</th><th>Votes so far</th><th><a href="javascript:add' . '_answer_row()">add answer</a></th></tr>';
if ($id) {
    $answers = dbAll("select * from poll_answer where poll_id={$id} order by num");
    foreach ($answers as $answer) {
        $count = dbOne('select count(ip) as votes from poll_vote where poll_id=' . $id . ' and num=' . $answer['num'], 'votes');
        echo '<tr><td><input class="large" name="answers[]" value="' . htmlspecialchars($answer['answer']) . '" /></td>' . '<td style="text-align:center;">' . $count . '</td>' . '<td>&nbsp;</td></tr>';
    }
}
echo '<tr><td><input class="large" name="answers[]" /></td>' . '<td colspan="2">&nbsp;</td></tr>';
echo '</table>';
echo '<script>function add_answer_row(){$("#poll_answers > tbody").append' . '("<tr><td><input class=\\"large\\" name=\\"answers[]\\" /></td><td colspa' . 'n=\\"2\\">&nbsp;</td></tr>");}</script>';
示例#16
0
 *
 * @category None
 * @package  None
 * @author   Kae Verens <*****@*****.**>
 * @license  GPL 2.0
 * @link     http://kvsites.ie/
 */
$variants = explode('<div>ABTESTINGDELIMITER</div>', $page['body']);
$body = '<div class="tabs"><ul>';
for ($i = 0; $i < count($variants) + 1; ++$i) {
    $body .= '<li><a href="#abtesting-' . $i . '">A/B Test ' . ($i + 1) . '</a></li>';
}
$body .= '<li><a href="#abtesting-details">A/B Test Details</a></li>';
$body .= '</ul>';
for ($i = 0; $i < count($variants); ++$i) {
    $body .= '<div id="abtesting-' . $i . '">' . ckeditor('abtesting[' . $i . ']', $variants[$i]) . '</div>';
}
$body .= '<div id="abtesting-' . $i . '">' . ckeditor('abtesting[' . $i . ']', '') . '</div>';
// { details
$body .= '<div id="abtesting-details"><table><tr><th>Target page</th><td>';
$body .= '<select name="page_vars[abtesting-target]">';
if (@$page_vars['abtesting-target']) {
    $parent = Page::getInstance($page_vars['abtesting-target']);
    $body .= '<option value="' . $parent->id . '">' . htmlspecialchars($parent->alias) . '</option>';
} else {
    $body .= '<option value="0"> -- none -- </option>';
}
$body .= '</select></td></tr></table></div>';
// }
$body .= '</div>';
WW_addScript('ab-testing/admin/body-override.js');
示例#17
0
    case '9':
        // { table of contents
        echo '<tr><td colspan="6"><div class="tabs">';
        echo '<ul>';
        echo '<li><a href="#table-of-contents-header">Header</a></li>';
        echo '<li><a href="#table-of-contents-footer">Footer</a></li>';
        echo '</ul>';
        echo '<div id="table-of-contents-header">';
        echo '<p>This will appear above the table of contents.</p>';
        echo ckeditor('body', $page['body']) . '</div>';
        echo '<div id="table-of-contents-footer">';
        echo '<p>This will appear below the table of contents.</p>';
        if (!isset($page_vars['footer'])) {
            $page_vars['footer'] = '';
        }
        echo ckeditor('page_vars[footer]', $page_vars['footer']) . '</div>';
        echo '</div></td></tr>';
        break;
        // }
    // }
    default:
        // { plugin
        if ($plugin && isset($plugin['admin']['page_type']) && function_exists($plugin['admin']['page_type'])) {
            echo '<tr><td colspan="6">' . $plugin['admin']['page_type']($page, $page_vars) . '</td></tr>';
        }
        // }
}
// }
echo '</table></div>';
// }
// { Advanced Options
示例#18
0
// }
// { Users must log in to purchase
echo '
	<tr>
		<th>' . __('Do customers need to log in before purchasing?') . '</th>
		<td><select name="wizard-login">
			<option value="no">' . __('No') . '</option>
			<option value="yes">' . __('Yes') . '</option>
		</select></td>
	</tr>';
// }
// { payment types checkboxes
$payment_types = array('Paypal', 'Bank Transfer', 'Realex');
echo '
	<tr>
		<th>' . __('Which payment methods would you like to use?') . '</th>
		<td></td>
	</tr>';
foreach ($payment_types as $type) {
    echo '<tr><td><span style="margin-left:30px">' . $type . '</span></td><td>' . '<input type="checkbox" name="wizard-payment-' . $type . '" id="' . $type . '" value="1" class="toggle"></td></tr>';
}
// }
// { payment - paypal
echo '<tr id="Paypal-toggle" style="display:none"><td colspan="2"><h2>' . __('Paypal') . '</h2><i>' . __('Don\'t have a paypal account?') . ' <a href="https://registration.paypal.com/" target="_blank">' . __('Register here') . '</a></i><table>' . '<tr><td>' . __('Paypal Email Address') . '</td><td>' . '<input type="email" name="wizard-paypal-email"></td></tr>' . '</table></td></tr>';
// }
// { payment - bank transfer
echo '<tr id="Bank-Transfer-toggle" style="display:none"><td colspan="2"><h2>' . __('Bank Transfer') . '</h2><table>' . '<tr><th>' . __('Bank Name') . '</th><td>' . '<input type="text" name="wizard-transfer-bank-name"/></td></tr>' . '<tr><th>' . __('Sort Code') . '</th><td>' . '<input type="text" name="wizard-transfer-sort-code"/></td></tr>' . '<tr><th>' . __('Account Name') . '</th><td>' . '<input type="text" name="wizard-transfer-account-name"/></td></tr>' . '<tr><th>' . __('Account Number') . '</th><td>' . '<input type="text" name="wizard-transfer-account-number"/></td></tr>' . '<tr><th>' . __('Message To Buyer') . '</th><td>' . ckeditor('wizard-transfer-message-to-buyer', '<p>' . __('Thank you for your purchase. Please send {{$total}} to the following' . ' bank account, quoting the invoice number') . ' {{$invoice_number}}:</p><table>' . '<tr><th>' . __('Bank') . '</th><td>{{$bank_name}}</td></tr>' . '<tr><th>' . __('Account Name') . '</th><td>{{$account_name}}</td></tr>' . '<tr><th>' . __('Sort Code') . '</th><td>{{$sort_code}}</td></tr>' . '<tr><th>' . __('Account Number') . '</th><td>{{$account_number}}</td></tr>' . '</table>') . '</td></tr></table></td></tr>';
// }
// { payment - realex
$hostname = $_SERVER['HTTP_HOST'];
echo '<tr id="Realex-toggle" style="display:none"><td colspan="2">' . '<h2>' . __('Realex') . '</h2><i>' . __('Don\'t have a realex account?') . ' <a href="http://www.realexpayments.com/apply-now" target="_blank">' . __('Apply here') . '</a></i><table>' . '<tr><th>' . __('Merchant ID') . '</th><td><input type="text" name="wizard-realex-merchant-id"/></td></tr>' . '<tr><th>' . __('Shared Secret') . '</th><td>' . '<input type="text" name="wizard-realex-shared-secret"/></td></tr>' . '<tr><th>' . __('Redirect After Payment') . '</th><td><select' . ' name="wizard-realax-redirect-after-payment" id="redirect-after-payment">' . '<option value="0" selected="selected">---</option></select></td></tr>' . '<tr><th>' . __('Mode') . '</th><td><select name="wizard-realax-mode">' . '<option value="test">' . __('Test Mode') . '</option>' . '<option value="live">Live</option></select>' . __('In test mode, you can use the realex payment method by adding' . ' "?testmode=1" to the URL') . '</td></tr>' . '<tr><td colspan="2">' . __('Note that some manual configuration is necessary. You will need to' . ' provide RealEx with a template (see their Real Auth Developers Guide' . ' for an example), and with the following Response ScriptURL: http://%1' . '/ww.plugins/online-store/verify/realex.php', array($hostname), 'core') . '</td></tr>' . '</table></td></tr>' . '</table></div><input type="submit" value="Back" class="back-link"/>' . '<input type="submit" value="' . htmlspecialchars(__('Next')) . '" class="next-link" style="float:right"/>';
示例#19
0
$html .= '<div id="privacy-messages-registeration"><br />';
$html .= '<p>This message appears above the user registration form.</p>';
if (!isset($page_vars['userlogin_message_registration'])) {
    $page_vars['userlogin_message_registration'] = '<p>' . __('Please enter your name and email address. After submitting, please' . ' check your email account for your account verification link.', 'core') . '</p>';
}
$html .= ckeditor('page_vars[userlogin_message_registration]', $page_vars['userlogin_message_registration'], false);
$html .= '</div>';
// }
$html .= '</div></div>';
// }
// { terms and conditions
if (!isset($page_vars['userlogin_terms_and_conditions'])) {
    $page_vars['userlogin_terms_and_conditions'] = '';
}
$contents = $page_vars['userlogin_terms_and_conditions'];
$html .= '<div id="privacy-conditions">' . '<p>Leave blank if no terms and conditions agreement is needed</p>' . ckeditor('page_vars[userlogin_terms_and_conditions]', $contents, false) . '</div>';
// }
// { addition privacy fields
$html .= '<div id="privacy-data">';
$html .= '<p>These are fields that you can ask your subscribers to fill-in ' . 'for your info.</p>';
$html .= '<table id="privacyfieldsTable" width="100%"><tr>';
$html .= '<th width="30%">Name</th>';
$html .= '<th width="30%">Type</th>';
$html .= '<th width="10%">Required</th>';
$html .= '<th id="extrasColumn">' . '<a href="javascript:privacyfieldsAddRow()">add field</a></th></tr>';
$html .= '</table>';
$html .= '<ul id="privacy_fields" style="list-style:none">';
if (!isset($page_vars['privacy_extra_fields'])) {
    $page_vars['privacy_extra_fields'] = '[]';
}
$rs = json_decode($page_vars['privacy_extra_fields']);
示例#20
0
            <input type="button" value="Add New Brand" id="add_new" />
		</div><!-- .section -->

		<div class="section">
			<div class="small_info">
				Title
			</div>
			<input type="text" name="title" value="<?php 
echo $review->title;
?>
" />
		</div><!-- .section -->

		<div class="section">
			<?php 
ckeditor($review->content, 'post_content');
?>
			<!--<textarea name="content"><?php 
echo $review->content;
?>
</textarea>-->
		</div><!-- .section -->


		<div class="section">
			<input type="text" name="tags" value="<?php 
echo isset($tags) ? $tags : '';
?>
" />
			<div class="small_info">
				multiple tags separated by comma
示例#21
0
 if (strpos($r['meta'], '{') !== 0) {
     $r['meta'] = '{}';
 }
 $meta = json_decode($r['meta'], true);
 // }}
 echo '<table>';
 // }
 // { name
 echo '<tr><th>Name</th><td><input name="name" value="' . htmlspecialchars($r['name']) . '"';
 if ($id == 1) {
     echo ' disabled="disabled"';
 }
 echo '/></td></tr>';
 // }
 // { user profile message
 echo '<tr><th>A message to show in the user profile.</th><td>' . ckeditor('meta[user-profile-message]', @$meta['user-profile-message'], 100) . '</td></tr>';
 // }
 // { paid memberships
 echo '<tr><td colspan="2"><fieldset><legend>paid memberships</legend><table>';
 // { does this group require paid membership?
 echo '<tr><th style="width:30%">Does this group require paid membership?</th><td><select name="meta[paid-membership]"><option value="">No</option><option value="yes"';
 if ('yes' == @$meta['paid-membership']) {
     echo ' selected="selected"';
 }
 echo '>Yes</option></td></tr>';
 // }
 // { membership period
 $periods = array('Day', 'Week', 'Month', 'Year');
 $num = (int) @$meta['paid-membership-subscription-period-num'];
 if (!$num) {
     $num = 7;
示例#22
0
}
?>
            </select>
            <input type="button" value="Add New Brand" id="add_new" />
		</div><!-- .section -->

		<div class="section">
			<div class="small_info">
				Title
			</div>
			<input type="text" name="title" placeholder="title ..." />
		</div><!-- .section -->

		<div class="section">
			<?php 
ckeditor('', 'post_content');
?>
			<!--<textarea name="content" placeholder="content ..."></textarea>-->
		</div><!-- .section -->
		<div class="section">
			<input type="text" name="tags" placeholder="tags ..." />
			<div class="small_info">
				multiple tags separated by comma
			</div>
		</div><!-- .section -->
		<div class="section">
			<div class="small_info">
				Rate product 1 - 5
			</div>
			<input type="range" id="rating" name="rating" min="0" max="5" step="1" value="0">
            <div class="rateit" data-rateit-backingfld="#rating"></div>
示例#23
0
$rs = dbAll('select id,name from groups order by name');
$opts = json_decode($page_vars['issue_tracker_edit_all']);
foreach ($rs as $r) {
    $html .= '<option value="' . $r['id'] . '"';
    if (in_array($r['id'], $opts)) {
        $html .= ' selected="selected"';
    }
    $html .= '>' . htmlspecialchars($r['name']) . '</option>';
}
$html .= '</select></td></tr>';
// }
$html .= '</table>';
$html .= '</div>';
// }
// { header
$html .= '<div id="issuetracker-header">';
$html .= '<p>Text to be shown above the product/product list</p>';
$html .= ckeditor('body', $page['body'], null, 1);
$html .= '</div>';
// }
// { footer
$html .= '<div id="issuetracker-footer">';
$html .= '<p>Text to be shown below the product/product list</p>';
$html .= ckeditor('page_vars[footer]', isset($vars['footer']) ? $vars['footer'] : '', null, 1);
$html .= '</div>';
// }
$html .= '</div>';
WW_addScript('issue-tracker/str.js');
WW_addScript('issue-tracker/admin.js');
WW_addScript('/j/jquery.multiselect/jquery.multiselect.min.js');
WW_addCSS('/j/jquery.multiselect/jquery.multiselect.css');
示例#24
0
                $name = preg_replace('/.*themes-personal\\/[^\\/]*\\/h\\/|\\.html/', '', $f);
                echo '<option ';
                if ($name == $r['template']) {
                    echo ' selected="selected"';
                }
                echo '>' . $name . '</option>';
            }
            echo '</select>';
        } else {
            $name = htmlspecialchars(preg_replace('/.*themes-personal\\/[^\\/]*\\/h\\/|\\.html/', '', $d[0]));
            echo '<input type="hidden" name="template" value="' . $name . '" />' . $name;
        }
        echo '</td></tr>';
        // }
        // { message
        echo '<tr><th>Message</th><td colspan="3">' . ckeditor('message', @$r['message'], 0, 0, 150) . '</td></tr>';
        // }
        // { save
        echo '<tr><th colspan="2"><input type="hidden" name="id" value="' . $id . '" />';
        echo '<input type="submit" name="action" value="Save Protected Files" />';
        if ($id) {
            echo '<a style="margin-left:20px;" href="/ww.admin/plugin.php?_plugin' . '=protected_files&amp;id=' . $id . '&amp;action=delete" onclick="retur' . 'n confirm(\'are you sure you want to remove this?\')" title="dele' . 'te">[x]</a>';
        }
        echo '</th></tr></table></form>';
        // }
        // }
}
?>
<script>
	$(function(){
		$('#directory').remoteselectoptions({url:'/a/f=adminDirectoriesGet'});
示例#25
0
$c .= ' When large image shown: <select name="page_vars[image_gallery-hide-sidebar]" val="' . @$vars['image_gallery-gallery-hide-sidebar'] . '">' . '<option value="">do nothing</option><option value="1"';
if (@$vars['image_gallery-hide-sidebar']) {
    $c .= ' selected="selected"';
}
$c .= '>hide sidebar</option></select>';
$content = @$vars['gallery-template'];
$c .= ckeditor('page_vars[gallery-template]', $content, 0);
$c .= '</div>';
// }
// { header
$c .= '<div id="image-gallery-header">' . '<p>This text will appear above the gallery.</p>';
$c .= ckeditor('body', $page['body'], 0, $cssurl);
$c .= '</div>';
// }
// { footer
$c .= '<div id="image-gallery-footer">' . '<p>This text will appear below the gallery.</p>' . ckeditor('page_vars[footer]', isset($vars['footer']) ? $vars['footer'] : '', 0, $cssurl);
$c .= '</div>';
// }
// { frames
$c .= '<div id="image-gallery-frames">' . '<p>Picture frames for your images.</p>' . '<select id="val-image_gallery_frame" name="page_vars[image_gallery_frame]">' . '<option value=""> -- none -- </option>';
$framedir = dirname(__FILE__) . '/../frames';
if (file_exists($framedir)) {
    $frames = new DirectoryIterator($framedir);
    foreach ($frames as $frame) {
        if ($frame->isDot() || $frame->getFilename() == '.svn') {
            continue;
        }
        $fname = $frame->getFilename();
        $c .= '<option';
        if ($fname == @$vars['image_gallery_frame']) {
            $c .= ' selected="selected"';
示例#26
0
if (@$DBVARS['maintenance-mode'] == 'yes') {
    echo ' selected="selected"';
    $display = '';
}
if (!isset($DBVARS['maintenance-mode-ips']) || $DBVARS['maintenance-mode-ips'] == '') {
    $DBVARS['maintenance-mode-ips'] = $_SERVER['REMOTE_ADDR'];
}
echo '>' . __('Yes') . '</option>
</select></td></tr>
<tr class="maintenance-message" ' . $display . '>
	<th>' . __('IP Addresses') . '</th>
	<td><textarea name="maintenance-mode-ips" style="width:200px;height:50px">' . htmlspecialchars(@$DBVARS['maintenance-mode-ips']) . '</textarea></td></tr>';
$message = @$DBVARS['maintenance-mode-message'] == '' ? '<h1>' . __('Temporarily Unavailable') . '</h1><p>' . __('This website is undergoing maintenance and is temporarily unavailable') . '.</p>' : $DBVARS['maintenance-mode-message'];
echo '<tr ' . $display . ' class="maintenance-message">
	<th>' . __('Maintenance mode message') . ':</th>
	<td>' . ckeditor('maintenance-mode-message', $message) . '</td>
</tr>';
// }
// { disable jquery-ui css
$values = array('Load jQuery UI CSS normally', 'Load only in admin area', 'Load only in front-end', 'Do not load at all');
echo '<tr><th>' . __('Don\'t load the jQuery-UI CSS') . '</th><td>' . '<select name="disable-jqueryui-css">';
foreach ($values as $k => $v) {
    echo '<option value="' . $k . '"';
    if ($k == (int) @$DBVARS['disable-jqueryui-css']) {
        echo ' selected="selected"';
    }
    echo '>' . $v . '</option>';
}
echo '</select></td></tr>';
// }
// { number format
示例#27
0
文件: form.php 项目: raylouis/kvwebme
$c .= '</select></td>';
// }
// { what language from
$c .= '<th>Language From</th><td>';
$c .= '<select id="page_vars_translate_language_from" ' . 'name="page_vars[translate_language_from]">';
if ($vars['translate_language_from']) {
    $c .= '<option value="' . htmlspecialchars($vars['translate_language_from']) . '">' . htmlspecialchars($vars['translate_language_from']) . '</option>';
} else {
    $vars['translate_language_from'] = 0;
    $c .= '<option value="0"> -- choose -- </option>';
}
$c .= '</select></td>';
// }
// { what language to
$c .= '<th>Language To</th><td>';
$c .= '<select id="page_vars_translate_language" ' . 'name="page_vars[translate_language]">';
if ($vars['translate_language']) {
    $c .= '<option value="' . htmlspecialchars($vars['translate_language']) . '">' . htmlspecialchars($vars['translate_language']) . '</option>';
} else {
    $vars['translate_language'] = 0;
    $c .= '<option value="0"> -- choose -- </option>';
}
$c .= '</select></td>';
// }
// { body
$c .= '<tr><th>Body</th><td colspan="5">';
$c .= '<p>To force a re-translation, clear the box below and update.</p>';
$c .= ckeditor('body', $page['body'], false);
$c .= '</td></tr>';
// }
WW_addScript('translate/admin/form.js');