• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getSettingWithDefault函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getSettingWithDefault函数的典型用法代码示例。如果您正苦于以下问题:PHP getSettingWithDefault函数的具体用法?PHP getSettingWithDefault怎么用?PHP getSettingWithDefault使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getSettingWithDefault函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: mysql_free_result

		</tr>
		</table>
		</form>
<?php 
    }
    mysql_free_result($res);
} else {
    echo error_message_with_hide($message, 0);
    get_tags(1);
    // refresh tags cache
    $sql = 'select count(TgID) as value from tags where (1=1) ' . $wh_query;
    $recno = get_first_value($sql);
    if ($debug) {
        echo $sql . ' ===&gt; ' . $recno;
    }
    $maxperpage = getSettingWithDefault('set-tags-per-page');
    $pages = $recno == 0 ? 0 : intval(($recno - 1) / $maxperpage) + 1;
    if ($currentpage < 1) {
        $currentpage = 1;
    }
    if ($currentpage > $pages) {
        $currentpage = $pages;
    }
    $limit = 'LIMIT ' . ($currentpage - 1) * $maxperpage . ',' . $maxperpage;
    $sorts = array('TgText', 'TgComment', 'TgID desc');
    $lsorts = count($sorts);
    if ($currentsort < 1) {
        $currentsort = 1;
    }
    if ($currentsort > $lsorts) {
        $currentsort = $lsorts;
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:edit_tags.php


示例2: mysql_free_result

		<input type="submit" name="op" value="Change" /></td>
		</tr>
		</table>
		</form>
		
		<?php 
    }
    mysql_free_result($res);
} else {
    echo error_message_with_hide($message, 0);
    $sql = 'select count(*) as value from (select AtID from (archivedtexts left JOIN archtexttags ON AtID = AgAtID) where (1=1) ' . $wh_lang . $wh_query . ' group by AtID ' . $wh_tag . ') as dummy';
    $recno = get_first_value($sql);
    if ($debug) {
        echo $sql . ' ===&gt; ' . $recno;
    }
    $maxperpage = getSettingWithDefault('set-archivedtexts-per-page');
    $pages = $recno == 0 ? 0 : intval(($recno - 1) / $maxperpage) + 1;
    if ($currentpage < 1) {
        $currentpage = 1;
    }
    if ($currentpage > $pages) {
        $currentpage = $pages;
    }
    $limit = 'LIMIT ' . ($currentpage - 1) * $maxperpage . ',' . $maxperpage;
    $sorts = array('AtTitle', 'AtID desc');
    $lsorts = count($sorts);
    if ($currentsort < 1) {
        $currentsort = 1;
    }
    if ($currentsort > $lsorts) {
        $currentsort = $lsorts;
开发者ID:hans,项目名称:lwt,代码行数:31,代码来源:edit_archivedtexts.php


示例3: getSettingWithDefault

?>
<script type="text/javascript">
//<![CDATA[
var context = window.parent.frames['l'].document;
$('.word<?php 
echo $wid;
?>
', context).removeClass('todo todosty').addClass('done<?php 
echo $stchange >= 0 ? 'ok' : 'wrong';
?>
sty').attr('data_status','<?php 
echo $status;
?>
').attr('data_todo','0');
<?php 
$waittime = getSettingWithDefault('set-test-main-frame-waiting-time') + 0;
if ($waittime <= 0) {
    ?>
window.parent.frames['l'].location.reload();
<?php 
} else {
    ?>
setTimeout('window.parent.frames[\'l\'].location.reload();', <?php 
    echo $waittime;
    ?>
);
<?php 
}
?>
//]]>
</script>
开发者ID:hans,项目名称:lwt,代码行数:31,代码来源:set_test_status.php


示例4: tohtml

<input class="notempty right" type="text" 
name="set-terms-per-page" 
value="<?php 
echo tohtml(getSettingWithDefault('set-terms-per-page'));
?>
" maxlength="4" size="4" /></td>
<td class="td1 center"><img src="icn/status-busy.png" title="Field must not be empty" alt="Field must not be empty" /></td>
</tr>
<!-- ******************************************************* -->
<tr>
<td class="td1 center">Tags per Page</td>
<td class="td1 center">
<input class="notempty right" type="text" 
name="set-tags-per-page" 
value="<?php 
echo tohtml(getSettingWithDefault('set-tags-per-page'));
?>
" maxlength="4" size="4" /></td>
<td class="td1 center"><img src="icn/status-busy.png" title="Field must not be empty" alt="Field must not be empty" /></td>
</tr>
<!-- ******************************************************* -->
<tr>
<td class="td1 right" colspan="4"> 
<input type="button" value="&lt;&lt; Back" onclick="location.href='index.php';" />&nbsp; &nbsp; | &nbsp; &nbsp;
<input type="button" value="Reset all settings to default" onclick="location.href='settings.php?op=reset';" />&nbsp; &nbsp; | &nbsp; &nbsp;
<input type="submit" name="op" value="Save" /></td>
</tr>
<!-- ******************************************************* -->
</table>
</form>
开发者ID:russell359,项目名称:lwt,代码行数:30,代码来源:settings.php


示例5: stripTheSlashesIfNeeded

dedication to be an overt act of relinquishment in perpetuity
of all present and future rights to this software under
copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE 
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
THE SOFTWARE.

For more information, please refer to [http://unlicense.org/].
***************************************************************/
/**************************************************************
Call: ajax_show_sentences.php?...
      ... lang=[langid] ... language
      ... word=[word] ... word in lowercase
      ... sentctl=[sentctl] ... sentence js control
Show sentences in edit_texts.php, etc.
***************************************************************/
require_once 'settings.inc.php';
require_once 'connect.inc.php';
require_once 'dbutils.inc.php';
require_once 'utilities.inc.php';
$lang = $_POST['lang'] + 0;
$word = stripTheSlashesIfNeeded($_POST['word']);
$ctl = stripTheSlashesIfNeeded($_POST['ctl']);
echo get20Sentences($lang, $word, $ctl, (int) getSettingWithDefault('set-term-sentence-count'));
开发者ID:Fips11,项目名称:lwt,代码行数:30,代码来源:ajax_show_sentences.php


示例6: texttodocount2

<table class="width99pc"><tr><td class="center" colspan="7" style="padding:10px;" nowrap="nowrap">TO DO: <span id="learnstatus"><?php 
echo texttodocount2($_REQUEST['text']);
?>
</span>&nbsp;&nbsp;&nbsp;&nbsp;<span title="[Show All] = ON: ALL terms are shown, and all multi-word terms are shown as superscripts before the first word. The superscript indicates the number of words in the multi-word term. 
[Show All] = OFF: Multi-word terms now hide single words and shorter or overlapping multi-word terms.">Show All&nbsp;<input type="checkbox" id="showallwords" <?php 
echo get_checked($showAll);
?>
 /></span><span id="thetextid" class="hide"><?php 
echo $textid;
?>
</span></td></tr>

<?php 
// AUDIO PLAYER
if ($audio != '') {
    $playerskin = getSettingWithDefault('set-player-skin-name');
    ?>
<link type="text/css" href="css/jplayer_skin/<?php 
    echo $playerskin;
    ?>
.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery.jplayer.min.js"><!-- jPlayer © Happyworm ** http://www.jplayer.org/about/ --></script>
<tr>
<td class="width45pc">&nbsp;</td>
<td class="center">
<span id="do-single" class="click hide"><img src="icn/arrow-stop.png" alt="Do not repeat" title="Do not repeat" style="width:24px;height:24px;" /></span><span id="do-repeat" class="click"><img src="icn/arrow-repeat.png" alt="Repeat audio" title="Repeat audio" style="width:24px;height:24px;" /></span>
</td>
<td class="center">&nbsp;</td>
<td>
<div id="jquery_jplayer_1" class="jp-jplayer">
</div>
开发者ID:hans,项目名称:lwt,代码行数:31,代码来源:do_text_header.php


示例7: framesetheader

    framesetheader('Test');
    ?>
<frameset cols="<?php 
    echo tohtml(getSettingWithDefault('set-test-l-framewidth-percent'));
    ?>
%,*">
	<frameset rows="<?php 
    echo tohtml(getSettingWithDefault('set-test-h-frameheight'));
    ?>
,*">
		<frame src="do_test_header.php?<?php 
    echo $p;
    ?>
" scrolling="no" name="h" />			
		<frame src="empty.htm" scrolling="auto" name="l" />
	</frameset>	
	<frameset rows="<?php 
    echo tohtml(getSettingWithDefault('set-test-r-frameheight-percent'));
    ?>
%,*">
		<frame src="empty.htm" scrolling="auto" name="ro" />
		<frame src="empty.htm" scrolling="auto" name="ru" />
	</frameset>
	<noframes><body><p>Sorry - your browser does not support frames.</p></body></noframes>
</frameset>
</html>
<?php 
} else {
    header("Location: edit_texts.php");
    exit;
}
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:do_test.php


示例8: isset

        ?>
" scrolling="yes" name="header"></iframe>
</div>
<div id="frame-l">
	<iframe id="frame-l-2" src="display_impr_text_text.php?text=<?php 
        echo $_REQUEST['text'];
        ?>
" scrolling="yes" name="text"></iframe>
</div>

<?php 
    } else {
        ?>

<frameset rows="<?php 
        echo isset($audio) ? getSettingWithDefault('set-text-h-frameheight-with-audio') - 90 : getSettingWithDefault('set-text-h-frameheight-no-audio') - 90;
        ?>
,*">
	<frame src="display_impr_text_header.php?text=<?php 
        echo $_REQUEST['text'];
        ?>
" scrolling="no" name="header" />			
	<frame src="display_impr_text_text.php?text=<?php 
        echo $_REQUEST['text'];
        ?>
" scrolling="auto" name="text" />
</frameset>
<noframes><body><p>Sorry - your browser does not support frames.</p></body></noframes>
</frameset>
</html>
<?php 
开发者ID:nahabi4,项目名称:lwt,代码行数:31,代码来源:display_impr_text.php


示例9: do_mysql_query

);"><img src="icn/sticky-notes-stack.png" title="Show Sentences" alt="Show Sentences" /> Show Sentences</span></div>	
		<?php 
    } else {
        $sql = 'select WoTranslation, WoSentence, WoRomanization, WoStatus from ' . $tbpref . 'words where WoID = ' . $wid;
        $res = do_mysql_query($sql);
        if ($record = mysql_fetch_assoc($res)) {
            $status = $record['WoStatus'];
            if ($fromAnn == '') {
                if ($status >= 98) {
                    $status = 1;
                }
            }
            $sentence = repl_tab_nl($record['WoSentence']);
            if ($sentence == '' && isset($_REQUEST['tid']) && isset($_REQUEST['ord'])) {
                $seid = get_first_value("select TiSeID as value from " . $tbpref . "textitems where TiTxID = " . $_REQUEST['tid'] . " and TiWordCount = 1 and TiOrder = " . $_REQUEST['ord']);
                $sent = getSentence($seid, $termlc, (int) getSettingWithDefault('set-term-sentence-count'));
                $sentence = repl_tab_nl($sent[1]);
            }
            $transl = repl_tab_nl($record['WoTranslation']);
            if ($transl == '*') {
                $transl = '';
            }
            ?>
		
			<form name="editword" class="validate" action="<?php 
            echo $_SERVER['PHP_SELF'];
            ?>
" method="post">
			<input type="hidden" name="WoLgID" id="langfield" value="<?php 
            echo $lang;
            ?>
开发者ID:Fips11,项目名称:lwt,代码行数:31,代码来源:edit_word.php


示例10: length

        }
        ?>
<th class="th1 clickable">Title [Tags] / Audio:&nbsp;<img src="icn/speaker-volume.png" title="With Audio" alt="With Audio" />, Src.Link:&nbsp;<img src="icn/chain.png" title="Source Link available" alt="Source Link available" />, Ann.Text:&nbsp;<img src="icn/tick.png" title="Annotated Text available" alt="Annotated Text available" /></th>
<th class="th1 sorttable_numeric clickable">Total<br />Words</th>
<th class="th1 sorttable_numeric clickable">Saved<br />Wo+Ex</th>
<th class="th1 sorttable_numeric clickable">Unkn.<br />Words</th>
<th class="th1 sorttable_numeric clickable">Unkn.<br />%</th>
</tr>

<?php 
        $sql = 'select TxID, TxTitle, LgName, TxAudioURI, TxSourceURI, length(TxAnnotatedText) as annotlen, ifnull(concat(\'[\',group_concat(distinct T2Text order by T2Text separator \', \'),\']\'),\'\') as taglist from ((' . $tbpref . 'texts left JOIN ' . $tbpref . 'texttags ON TxID = TtTxID) left join ' . $tbpref . 'tags2 on T2ID = TtT2ID), ' . $tbpref . 'languages where LgID=TxLgID ' . $wh_lang . $wh_query . ' group by TxID ' . $wh_tag . ' order by ' . $sorts[$currentsort - 1] . ' ' . $limit;
        if ($debug) {
            echo $sql;
        }
        $res = do_mysql_query($sql);
        $showCounts = getSettingWithDefault('set-show-text-word-counts') + 0;
        while ($record = mysql_fetch_assoc($res)) {
            if ($showCounts) {
                flush();
                $txttotalwords = textwordcount($record['TxID']);
                $txtworkedwords = textworkcount($record['TxID']);
                $txtworkedexpr = textexprcount($record['TxID']);
                $txtworkedall = $txtworkedwords + $txtworkedexpr;
                $txttodowords = $txttotalwords - $txtworkedwords;
                $percentunknown = 0;
                if ($txttotalwords != 0) {
                    $percentunknown = round(100 * $txttodowords / $txttotalwords, 0);
                    if ($percentunknown > 100) {
                        $percentunknown = 100;
                    }
                    if ($percentunknown < 0) {
开发者ID:nahabi4,项目名称:lwt,代码行数:31,代码来源:edit_texts.php


示例11: get_first_sepa

function get_first_sepa()
{
    static $sepa;
    if (!$sepa) {
        $sepa = mb_substr(getSettingWithDefault('set-term-translation-delimiters'), 0, 1, 'UTF-8');
    }
    return $sepa;
}
开发者ID:shoehn,项目名称:learningwithtext,代码行数:8,代码来源:utilities.inc.php


示例12: print_similar_terms_tabrow

function print_similar_terms_tabrow()
{
    if ((int) getSettingWithDefault("set-similar-terms-count") > 0) {
        echo '<tr><td class="td1 right">Similar<br />Terms:</td><td class="td1"><span id="simwords" class="smaller">&nbsp;</span></td></tr>';
    }
}
开发者ID:Fips11,项目名称:lwt,代码行数:6,代码来源:simterms.inc.php


示例13: makeStatusClassFilter

?>
';
WBLINK3 = '<?php 
echo $wb3;
?>
';
RTL = <?php 
echo $rtlScript;
?>
;
TID = '<?php 
echo $_REQUEST['text'];
?>
';
ADDFILTER = '<?php 
echo makeStatusClassFilter(getSettingWithDefault('set-text-visit-statuses-via-key'));
?>
';
$(document).ready( function() {
	$('.word').each(word_each_do_text_text);
	$('.mword').each(mword_each_do_text_text);
	$('.word').click(word_click_event_do_text_text);
	$('.mword').click(mword_click_event_do_text_text);
	$('.word').dblclick(word_dblclick_event_do_text_text);
	$('.mword').dblclick(word_dblclick_event_do_text_text);
	$(document).keydown(keydown_event_do_text_text);
});
//]]>
</script>
<?php 
echo '<div id="thetext" ' . ($rtlScript ? 'dir="rtl"' : '') . '><p style="' . ($removeSpaces ? 'word-break:break-all;' : '') . 'font-size:' . $textsize . '%;line-height: 1.4; margin-bottom: 10px;">';
开发者ID:russell359,项目名称:lwt,代码行数:31,代码来源:do_text_text.php


示例14: makeAudioPlayer

function makeAudioPlayer($audio)
{
    if ($audio != '') {
        $playerskin = getSettingWithDefault('set-player-skin-name');
        if ($playerskin != "jplayer.blue.monday") {
            $playerskin = "jplayer.blue.monday.modified";
        }
        $repeatMode = getSettingZeroOrOne('currentplayerrepeatmode', 0);
        ?>
<link type="text/css" href="css/jplayer_skin/<?php 
        echo $playerskin;
        ?>
.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery.jplayer.min.js"><!-- jPlayer © Happyworm ** http://www.jplayer.org/about/ --></script>
<table class="width99pc" cellspacing="0" cellpadding="3">
<tr>
<td class="width45pc">&nbsp;</td>
<td class="center borderleft" style="padding-left:10px;">
<span id="do-single" class="click<?php 
        echo $repeatMode ? '' : ' hide';
        ?>
"><img src="icn/arrow-repeat.png" alt="Toggle Repeat (Now ON)" title="Toogle Repeat (Now ON)" style="width:24px;height:24px;" /></span><span id="do-repeat" class="click<?php 
        echo $repeatMode ? ' hide' : '';
        ?>
"><img src="icn/arrow-norepeat.png" alt="Toggle Repeat (Now OFF)" title="Toggle Repeat (Now OFF)" style="width:24px;height:24px;" /></span>
</td>
<td class="center bordermiddle">&nbsp;</td>
<td class="bordermiddle">
<div id="jquery_jplayer_1" class="jp-jplayer">
</div>
<div id="jp_container_1" class="jp-audio">
	<div class="jp-type-single">
		<div class="jp-gui jp-interface">
			<ul class="jp-controls">
				<li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
				<li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
				<li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
				<li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
				<li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
			</ul>
			<div class="jp-progress">
				<div class="jp-seek-bar">
					<div class="jp-play-bar"></div>
				</div>
			</div>
			<div class="jp-volume-bar">
				<div class="jp-volume-bar-value"></div>
			</div>
			<div class="jp-time-holder">
				<div class="jp-current-time"></div>
				<div class="jp-duration"></div>
			</div>
		</div>
	</div>
</div>
</td>
<td class="center bordermiddle">&nbsp;</td>
<td class="center borderright" style="padding-right:10px;">
<?php 
        $currentplayerseconds = getSetting('currentplayerseconds');
        if ($currentplayerseconds == '') {
            $currentplayerseconds = 5;
        }
        ?>
<select id="backtime" name="backtime" onchange="{do_ajax_save_setting('currentplayerseconds',document.getElementById('backtime').options[document.getElementById('backtime').selectedIndex].value);}"><?php 
        echo get_seconds_selectoptions($currentplayerseconds);
        ?>
</select><br />
<span id="backbutt" class="click"><img src="icn/arrow-circle-225-left.png" alt="Rewind n seconds" title="Rewind n seconds" /></span>&nbsp;&nbsp;<span id="forwbutt" class="click"><img src="icn/arrow-circle-315.png" alt="Forward n seconds" title="Forward n seconds" /></span>
<span id="playTime" class="hide"></span>
</td>
<td class="width45pc">&nbsp;</td>
</tr>
<script type="text/javascript">
//<![CDATA[

function new_pos(p) {
	$("#jquery_jplayer_1").jPlayer("playHead", p);
}

function click_single() {
	$("#jquery_jplayer_1").unbind($.jPlayer.event.ended + ".jp-repeat");
	$("#do-single").addClass('hide');
	$("#do-repeat").removeClass('hide');
	do_ajax_save_setting('currentplayerrepeatmode','0');
	return false;
}

function click_repeat() {
	$("#jquery_jplayer_1").bind($.jPlayer.event.ended + ".jp-repeat", function(event) { 
		$(this).jPlayer("play"); 
	});
	$("#do-repeat").addClass('hide');
	$("#do-single").removeClass('hide');
	do_ajax_save_setting('currentplayerrepeatmode','1');
	return false;
}

function click_back() {
	var t = parseInt($("#playTime").text(),10);
//.........这里部分代码省略.........
开发者ID:chajadan,项目名称:lwt,代码行数:101,代码来源:utilities.inc.php


示例15: str_replace

        $r .= '</span></td></tr>';
    } else {
        if (trim($vals[1]) != '') {
            $nontermbuffer .= str_replace("¶", '<img src="icn/new_line.png" title="New Line" alt="New Line" />', tohtml($vals[1]));
        }
    }
}
if ($nontermbuffer != '') {
    $r .= '<tr><td class="td1 center" style="font-size:' . $textsize . '%;">';
    $r .= $nontermbuffer;
    $r .= '</td><td class="td1 right" colspan="3"><img class="click" src="icn/tick.png" title="Back to \'Display/Print Mode\'" alt="Back to \'Display/Print Mode\'" onclick="location.href=\'print_impr_text.php?text=' . $textid . '\';" /></td></tr>';
}
$r .= '<th class="th1 center">Text</th>';
$r .= '<th class="th1 center">Dict.</th>';
$r .= '<th class="th1 center">Edit<br />Term</th>';
$r .= '<th class="th1 center">Term Translations (Delim.: ' . tohtml(getSettingWithDefault('set-term-translation-delimiters')) . ')<br /><input type="button" value="Reload" onclick="do_ajax_edit_impr_text(1e6,\'\');" /><a name="bottom"></a></th>';
$r .= '</tr></table></form>' . "\n";
/*
$r .= '<script type="text/javascript">' . "\n";
$r .= '//<![CDATA[' . "\n";
$r .= '$(document).ready( function() {' . "\n";
$r .= "$('input.impr-ann-text').change(changeImprAnnText);\n";
$r .= "$('input.impr-ann-radio').change(changeImprAnnRadio);\n";
$r .= '} );' . "\n";
$r .= '//]]>' . "\n";
$r .= '</script>' . "\n";
*/
if ($wordlc == '') {
    echo "\$('#editimprtextdata').html(" . prepare_textdata_js($r) . ");";
} else {
    echo $rr;
开发者ID:nahabi4,项目名称:lwt,代码行数:31,代码来源:ajax_edit_impr_text.php



注:本文中的getSettingWithDefault函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getSettings函数代码示例发布时间:2022-05-15
下一篇:
PHP getSettingValue函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap