本文整理汇总了PHP中cmtx_setting函数的典型用法代码示例。如果您正苦于以下问题:PHP cmtx_setting函数的具体用法?PHP cmtx_setting怎么用?PHP cmtx_setting使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cmtx_setting函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cmtx_setting
?>
"/>
<p />
<label class='settings_email_editor_admin_email_test'><?php
echo CMTX_FIELD_LABEL_FROM_EMAIL;
?>
</label> <input type="email" required name="admin_email_test_from_email" size="35" maxlength="250" value="<?php
echo cmtx_setting('admin_email_test_from_email');
?>
"/>
<p />
<label class='settings_email_editor_admin_email_test'><?php
echo CMTX_FIELD_LABEL_REPLY_EMAIL;
?>
</label> <input type="email" required name="admin_email_test_reply_to" size="35" maxlength="250" value="<?php
echo cmtx_setting('admin_email_test_reply_to');
?>
"/>
<p /><br />
<b><?php
echo CMTX_FIELD_VALUE_VARIABLES;
?>
</b>: <i>[admin link] [signature]</i>
<textarea name="email_content" cols="" rows="10" style="width:100%"><?php
echo $data;
?>
</textarea>
<p />
<?php
cmtx_set_csrf_form_key();
?>
示例2: cmtx_setting
echo CMTX_FIELD_LABEL_ENABLED;
?>
</label> <?php
if (cmtx_setting('task_enabled_delete_bans')) {
?>
<input type="checkbox" checked="checked" name="enabled"/> <?php
} else {
?>
<input type="checkbox" name="enabled"/> <?php
}
?>
<p />
<label class='task_delete_bans'><?php
echo CMTX_FIELD_LABEL_DAYS;
?>
</label> <input type="text" required name="days" size="1" maxlength="4" value="<?php
echo cmtx_setting('days_to_delete_bans');
?>
"/>
<p />
<?php
cmtx_set_csrf_form_key();
?>
<input type="submit" class="button" name="submit" title="<?php
echo CMTX_BUTTON_UPDATE;
?>
" value="<?php
echo CMTX_BUTTON_UPDATE;
?>
"/>
</form>
示例3: cmtx_delete_replies
}
function cmtx_delete_replies($id)
{
//delete replies of comment
global $cmtx_mysql_table_prefix;
$query = cmtx_db_query("SELECT * FROM `" . $cmtx_mysql_table_prefix . "comments` WHERE `reply_to` = '{$id}'");
while ($comments = cmtx_db_fetch_assoc($query)) {
$id = $comments["id"];
cmtx_db_query("DELETE FROM `" . $cmtx_mysql_table_prefix . "comments` WHERE `id` = '{$id}'");
cmtx_db_query("DELETE FROM `" . $cmtx_mysql_table_prefix . "voters` WHERE `comment_id` = '{$id}'");
cmtx_db_query("DELETE FROM `" . $cmtx_mysql_table_prefix . "reporters` WHERE `comment_id` = '{$id}'");
cmtx_delete_replies($id);
}
}
//end of delete-replies function
//delete comments older than the configured time period
$query = cmtx_db_query("SELECT * FROM `" . $cmtx_mysql_table_prefix . "comments` WHERE `dated` < DATE_SUB(NOW(), INTERVAL " . cmtx_setting('days_to_delete_comments') . " DAY)");
//select comments to delete
while ($comments = cmtx_db_fetch_assoc($query)) {
//while there are comments to delete
$id = $comments["id"];
//get the ID of the comment
cmtx_db_query("DELETE FROM `" . $cmtx_mysql_table_prefix . "comments` WHERE `id` = '{$id}'");
//delete it
cmtx_db_query("DELETE FROM `" . $cmtx_mysql_table_prefix . "voters` WHERE `comment_id` = '{$id}'");
//delete its voters
cmtx_db_query("DELETE FROM `" . $cmtx_mysql_table_prefix . "reporters` WHERE `comment_id` = '{$id}'");
//delete its reporters
cmtx_delete_replies($id);
//delete its replies
}
示例4: cmtx_setting
?>
</label> <?php
if (cmtx_setting('akismet_enabled')) {
?>
<input type="checkbox" checked="checked" name="enabled"/> <?php
} else {
?>
<input type="checkbox" name="enabled"/> <?php
}
?>
<p />
<label class='settings_akismet'><?php
echo CMTX_FIELD_LABEL_AKISMET_KEY;
?>
</label> <input type="text" name="akismet_key" size="15" maxlength="250" value="<?php
echo cmtx_setting('akismet_key');
?>
"/>
<p />
<?php
cmtx_set_csrf_form_key();
?>
<input type="submit" class="button" name="submit" title="<?php
echo CMTX_BUTTON_UPDATE;
?>
" value="<?php
echo CMTX_BUTTON_UPDATE;
?>
"/>
</form>
示例5: cmtx_generate_hint
</label> <?php
if (cmtx_setting('check_time')) {
?>
<input type="checkbox" checked="checked" name="check_time"/> <?php
} else {
?>
<input type="checkbox" name="check_time"/> <?php
}
cmtx_generate_hint(CMTX_HINT_CHECK_TIME);
?>
<p />
<label class='settings_security'><?php
echo CMTX_FIELD_LABEL_BAN_COOKIE;
?>
</label> <input type="text" required name="ban_cookie_days" size="1" maxlength="3" value="<?php
echo cmtx_setting('ban_cookie_days');
?>
"/> <span class='note'><?php
echo CMTX_NOTE_DAYS;
?>
</span>
<?php
cmtx_generate_hint(CMTX_HINT_BAN_COOKIE);
?>
<p />
<?php
cmtx_set_csrf_form_key();
?>
<input type="submit" class="button" name="submit" title="<?php
echo CMTX_BUTTON_UPDATE;
?>
示例6: fopen
if ($i != 5) {
echo "<br />";
}
$i++;
}
}
?>
</div>
</div>
</div>
<p />
<?php
if (isset($_POST['submit_notes']) && !cmtx_setting('is_demo')) {
cmtx_check_csrf_form_key();
$data = $_POST['admin_notes'];
$file = 'includes/words/custom/admin_notes.txt';
$handle = fopen($file, 'w');
fputs($handle, $data);
fclose($handle);
}
?>
<?php
if (file_exists('includes/words/custom/admin_notes.txt')) {
$data = file_get_contents('includes/words/custom/admin_notes.txt');
} else {
$data = file_get_contents('includes/words/admin_notes.txt');
}
示例7: cmtx_setting
}
}
echo '<p />';
echo '<b><u>Error Logs</u></b>';
echo '<p />';
if (is_writable('../includes/logs/errors.log')) {
echo '/' . cmtx_setting('commentics_folder') . '/' . 'includes/logs/errors.log <span class="positive">' . CMTX_FIELD_VALUE_IS_WRITABLE . '</span>.';
} else {
echo '/' . cmtx_setting('commentics_folder') . '/' . 'includes/logs/errors.log <span class="negative">' . CMTX_FIELD_VALUE_IS_NOT_WRITABLE . '</span>.';
$permissions_correct = false;
}
echo '<br />';
if (is_writable('includes/logs/errors.log')) {
echo '/' . cmtx_setting('commentics_folder') . '/' . cmtx_setting('admin_folder') . '/includes/logs/errors.log <span class="positive">' . CMTX_FIELD_VALUE_IS_WRITABLE . '</span>.';
} else {
echo '/' . cmtx_setting('commentics_folder') . '/' . cmtx_setting('admin_folder') . '/includes/logs/errors.log <span class="negative">' . CMTX_FIELD_VALUE_IS_NOT_WRITABLE . '</span>.';
$permissions_correct = false;
}
echo '<p />';
if ($permissions_correct) {
echo '<span class="positive">' . CMTX_FIELD_VALUE_PERMISSIONS_CORRECT . '</span>.';
} else {
echo '<span class="negative">' . CMTX_FIELD_VALUE_PERMISSIONS_INCORRECT . '</span>.';
}
?>
<p />
<input type="button" class="button" name="refresh" title="<?php
echo CMTX_BUTTON_REFRESH;
?>
示例8: cmtx_generate_hint
</label> <?php
if (cmtx_setting('viewers_refresh_enabled')) {
?>
<input type="checkbox" checked="checked" name="viewers_refresh_enabled"/> <?php
} else {
?>
<input type="checkbox" name="viewers_refresh_enabled"/> <?php
}
cmtx_generate_hint(CMTX_HINT_VISITOR_REFRESH);
?>
<p />
<label class='settings_viewers'><?php
echo CMTX_FIELD_LABEL_INTERVAL;
?>
</label> <input type="text" required name="viewers_refresh_time" size="1" maxlength="250" value="<?php
echo cmtx_setting('viewers_refresh_time');
?>
"/> <span class='note'><?php
echo CMTX_NOTE_SECONDS;
?>
</span>
<?php
cmtx_generate_hint(CMTX_HINT_VISITOR_INTERVAL);
?>
<p />
<?php
cmtx_set_csrf_form_key();
?>
<input type="submit" class="button" name="submit" title="<?php
echo CMTX_BUTTON_UPDATE;
?>
示例9: cmtx_setting
?>
"/>
<p />
<label class='settings_email_editor_user_subscriber_notification_reply'><?php
echo CMTX_FIELD_LABEL_FROM_EMAIL;
?>
</label> <input type="email" required name="subscriber_notification_reply_from_email" size="35" maxlength="250" value="<?php
echo cmtx_setting('subscriber_notification_reply_from_email');
?>
"/>
<p />
<label class='settings_email_editor_user_subscriber_notification_reply'><?php
echo CMTX_FIELD_LABEL_REPLY_EMAIL;
?>
</label> <input type="email" required name="subscriber_notification_reply_reply_to" size="35" maxlength="250" value="<?php
echo cmtx_setting('subscriber_notification_reply_reply_to');
?>
"/>
<p /><br />
<b><?php
echo CMTX_FIELD_VALUE_VARIABLES;
?>
</b>: <i>[name] [page reference] [page url] [comment url] [poster] [comment] [signature] [subscription link]</i>
<textarea name="email_content" cols="" rows="10" style="width:100%"><?php
echo $data;
?>
</textarea>
<p />
<?php
cmtx_set_csrf_form_key();
?>
开发者ID:jonathancromie,项目名称:ifb299,代码行数:31,代码来源:settings_email_editor_user_subscriber_notification_reply.php
示例10: die
<?php
/*
Copyright © 2009-2014 Commentics Development Team [commentics.org]
License: GNU General Public License v3.0
http://www.commentics.org/license/
This file is part of Commentics.
Commentics is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Commentics is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Commentics. If not, see <http://www.gnu.org/licenses/>.
Text to help preserve UTF-8 file encoding: 汉语漢語.
*/
if (!isset($cmtx_path)) {
die('Access Denied.');
}
//delete voters older than the configured time period
cmtx_db_query("DELETE FROM `" . $cmtx_mysql_table_prefix . "voters` WHERE `dated` < DATE_SUB(NOW(), INTERVAL " . cmtx_setting('days_to_delete_voters') . " DAY)");
示例11: str_ireplace
</label> <?php
if (cmtx_setting('rich_snippets')) {
?>
<input type="checkbox" checked="checked" name="rich_snippets"/> <?php
} else {
?>
<input type="checkbox" name="rich_snippets"/> <?php
}
?>
<p />
<label class='settings_rich_snippets'><?php
echo CMTX_FIELD_LABEL_RICH_SNIPPETS_FORMAT;
?>
</label>
<?php
$rich_snippets_markups = "<select name='rich_snippets_markups'>\n<option value='Microdata'>Microdata</option>\n<option value='Microformats'>Microformats</option>\n<option value='RDFa'>RDFa</option>\n</select>";
$rich_snippets_markups = str_ireplace("'" . cmtx_setting('rich_snippets_markup') . "'", "'" . cmtx_setting('rich_snippets_markup') . "' selected='selected'", $rich_snippets_markups);
echo $rich_snippets_markups;
?>
<p />
<?php
cmtx_set_csrf_form_key();
?>
<input type="submit" class="button" name="submit" title="<?php
echo CMTX_BUTTON_UPDATE;
?>
" value="<?php
echo CMTX_BUTTON_UPDATE;
?>
"/>
</form>
示例12: cmtx_setting
echo CMTX_FIELD_LABEL_LIMIT_ITEMS;
?>
</label> <?php
if (cmtx_setting('rss_most_recent_enabled')) {
?>
<input type="checkbox" checked="checked" name="rss_most_recent_enabled"/> <?php
} else {
?>
<input type="checkbox" name="rss_most_recent_enabled"/> <?php
}
?>
<p />
<label class='settings_rss'><?php
echo CMTX_FIELD_LABEL_LIMIT_AMOUNT;
?>
:</label> <input type="text" required name="rss_most_recent_amount" size="1" maxlength="250" value="<?php
echo cmtx_setting('rss_most_recent_amount');
?>
"/>
<p />
<?php
cmtx_set_csrf_form_key();
?>
<input type="submit" class="button" name="submit" title="<?php
echo CMTX_BUTTON_UPDATE;
?>
" value="<?php
echo CMTX_BUTTON_UPDATE;
?>
"/>
</form>
示例13: str_ireplace
echo CMTX_FIELD_LABEL_RECAPTCHA_THEME;
?>
</label>
<?php
$recaptcha_themes = "<select name='recaptcha_themes'>\n<option value='red'>red</option>\n<option value='white'>white</option>\n<option value='blackglass'>blackglass</option>\n<option value='clean'>clean</option>\n</select>";
$recaptcha_themes = str_ireplace("'" . cmtx_setting('recaptcha_theme') . "'", "'" . cmtx_setting('recaptcha_theme') . "' selected='selected'", $recaptcha_themes);
echo $recaptcha_themes;
?>
<p />
<label class='layout_form_captchas_recaptcha'><?php
echo CMTX_FIELD_LABEL_RECAPTCHA_LANGUAGE;
?>
</label>
<?php
$recaptcha_languages = "<select name='recaptcha_languages'>\n<option value='en'>english</option>\n<option value='nl'>dutch</option>\n<option value='fr'>french</option>\n<option value='de'>german</option>\n<option value='pt'>portuguese</option>\n<option value='ru'>russian</option>\n<option value='es'>spanish</option>\n<option value='tr'>turkish</option>\n</select>";
$recaptcha_languages = str_ireplace("'" . cmtx_setting('recaptcha_language') . "'", "'" . cmtx_setting('recaptcha_language') . "' selected='selected'", $recaptcha_languages);
echo $recaptcha_languages;
?>
<p />
<?php
cmtx_set_csrf_form_key();
?>
<input type="submit" class="button" name="submit" title="<?php
echo CMTX_BUTTON_UPDATE;
?>
" value="<?php
echo CMTX_BUTTON_UPDATE;
?>
"/>
</form>
示例14: cmtx_setting
echo cmtx_setting('comment_maximum_characters');
?>
"/>
<p />
<label class='layout_form_maximums'><?php
echo CMTX_FIELD_LABEL_QUESTION;
?>
</label> <input type="text" required name="field_maximum_question" size="1" maxlength="250" value="<?php
echo cmtx_setting('field_maximum_question');
?>
"/>
<p />
<label class='layout_form_maximums'><?php
echo CMTX_FIELD_LABEL_CAPTCHA;
?>
</label> <input type="text" required name="field_maximum_captcha" size="1" maxlength="250" value="<?php
echo cmtx_setting('field_maximum_captcha');
?>
"/>
<p />
<?php
cmtx_set_csrf_form_key();
?>
<input type="submit" class="button" name="submit" title="<?php
echo CMTX_BUTTON_UPDATE;
?>
" value="<?php
echo CMTX_BUTTON_UPDATE;
?>
"/>
</form>
示例15:
<label class='edit_comment'><?php
echo CMTX_FIELD_LABEL_DISLIKES;
?>
</label>
<?php
echo $dislikes;
if ($dislikes == 1) {
echo " " . CMTX_FIELD_VALUE_ONE_DISLIKE;
} else {
echo " " . CMTX_FIELD_VALUE_MANY_DISLIKES;
}
}
?>
<?php
if (cmtx_setting('show_flag')) {
?>
<br /><hr class="separator"/><br />
<label class='edit_comment'><?php
echo CMTX_FIELD_LABEL_REPORTS;
?>
</label><?php
if ($reports == 0) {
echo CMTX_FIELD_VALUE_NO_REPORTS;
}
if ($reports == 1) {
echo CMTX_FIELD_VALUE_ONE_REPORT;
}
if ($reports > 1) {
echo CMTX_FIELD_VALUE_THERE_ARE . " " . $reports . " " . CMTX_FIELD_VALUE_REPORTS;
}