本文整理汇总了PHP中style_list函数的典型用法代码示例。如果您正苦于以下问题:PHP style_list函数的具体用法?PHP style_list怎么用?PHP style_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了style_list函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: styles_combo
function styles_combo($all = false, $selected = "")
{
global $THIS_BASEPATH, $language;
if (!$all) {
$sr = style_list();
foreach ($sr as $s) {
$news[] = $s["style_url"];
}
}
$dir = @opendir("{$THIS_BASEPATH}/style");
$lc = "\n<select name=\"style_url\" size=\"1\">";
if ($selected == "") {
$lc .= "\n<option value=\"\">" . $language["SELECT"] . "</option>";
}
while ($file = @readdir($dir)) {
if (is_dir("{$THIS_BASEPATH}/style/{$file}") && $file != "." && $file != ".." && file_exists("{$THIS_BASEPATH}/style/{$file}/index.php")) {
if (!$all && !in_array("style/{$file}", $news) || $all) {
$lc .= "\n<option value=\"{$file}\" " . ($selected == "style/{$file}" ? "selected=\"selected\"" : "") . ">{$file}</option>";
}
}
}
@closedir($dir);
$lc .= "</select>";
return $lc;
}
示例2: style_list
if (answer)
window.location='index.php?page=usercp&uid=<?php
echo $CURUSER["uid"];
?>
&do=pm&action=list'
// -->
}
</script>
<?php
if (isset($CURUSER) && $CURUSER && $CURUSER["uid"] > 1) {
print "<form name=\"jump1\" action=\"index.php\" method=\"post\">\n";
?>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<?php
$style = style_list();
$langue = language_list();
$block[0]["id"] = "yes";
$block[0]["block"] = "side blocks";
$block[1]["id"] = "nol";
$block[1]["block"] = "no left";
$block[2]["id"] = "nor";
$block[2]["block"] = "no right";
$block[3]["id"] = "no";
$block[3]["block"] = "no blocks";
// group image
$rsr = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT picture FROM {$TABLE_PREFIX}users_level WHERE id_level=" . $CURUSER['id']);
$rosr = mysqli_fetch_array($rsr);
if ($rosr["picture"] == '') {
$xx = '';
} else {
示例3: tabella
function tabella($action, $dati = array())
{
global $idflag, $link, $idlangue, $idstyle, $CURUSER, $USE_IMAGECODE, $TABLE_PREFIX, $language, $tpl_account, $THIS_BASEPATH;
if ($action == "signup") {
$dati["username"] = "";
$dati["email"] = "";
$dati["language"] = $idlangue;
}
// avoid error with js
$language["DIF_PASSWORDS"] = AddSlashes($language["DIF_PASSWORDS"]);
$language["INSERT_PASSWORD"] = AddSlashes($language["INSERT_PASSWORD"]);
$language["USER_PWD_AGAIN"] = AddSlashes($language["USER_PWD_AGAIN"]);
$language["INSERT_USERNAME"] = AddSlashes($language["INSERT_USERNAME"]);
$language["ERR_NO_EMAIL"] = AddSlashes($language["ERR_NO_EMAIL"]);
$language["ERR_NO_EMAIL_AGAIN"] = AddSlashes($language["ERR_NO_EMAIL_AGAIN"]);
$language["DIF_EMAIL"] = AddSlashes($language["DIF_EMAIL"]);
$tpl_account->set("language", $language);
$tpl_account->set("account_action", $action);
$tpl_account->set("account_form_actionlink", htmlspecialchars("index.php?page=signup&act={$action}&returnto={$link}"));
$tpl_account->set("account_uid", $dati["id"]);
$tpl_account->set("account_returnto", urlencode($link));
$tpl_account->set("account_IDlanguage", $idlang);
$tpl_account->set("account_IDstyle", $idstyle);
$tpl_account->set("account_IDcountry", $idflag);
$tpl_account->set("account_username", $dati["username"]);
$tpl_account->set("dati", $dati);
$tpl_account->set("DEL", $action == "delete", true);
$tpl_account->set("DISPLAY_FULL", $action == "signup", true);
if ($action == "del") {
$tpl_account->set("account_from_delete_confirm", "<input type=\"submit\" name=\"elimina\" value=\"" . $language["FRM_DELETE"] . "\" /> <input type=\"submit\" name=\"elimina\" value=\"" . $language["FRM_CANCEL"] . "\" />");
} else {
$tpl_account->set("account_from_delete_confirm", "<input type=\"submit\" name=\"conferma\" value=\"" . $language["FRM_CONFIRM"] . "\" /> <input type=\"reset\" name=\"annulla\" value=\"" . $language["FRM_CANCEL"] . "\" />");
}
$lres = language_list();
$option = "\n<select name=\"language\" size=\"1\">";
foreach ($lres as $langue) {
$option .= "\n<option ";
if ($langue["id"] == $dati["language"]) {
$option .= "\"selected\" ";
}
$option .= "value=\"" . $langue["id"] . "\">" . $langue["language"] . "</option>";
}
$option .= "\n</select>";
$tpl_account->set("account_combo_language", $option);
$sres = style_list();
$option = "\n<select name=\"style\" size=\"1\">";
foreach ($sres as $style) {
$option .= "\n<option ";
if ($style["id"] == $dati["style"]) {
$option .= "\"selected\" ";
}
$option .= "value=\"" . $style["id"] . "\">" . $style["style"] . "</option>";
}
$option .= "\n</select>";
$tpl_account->set("account_combo_style", $option);
$fres = flag_list();
$option = "\n<select name=\"flag\" size=\"1\">\n<option value='0'>---</option>";
$thisip = $_SERVER["REMOTE_ADDR"];
$remotedns = gethostbyaddr($thisip);
if ($remotedns != $thisip) {
$remotedns = strtoupper($remotedns);
preg_match('/^(.+)\\.([A-Z]{2,3})$/', $remotedns, $tldm);
if (isset($tldm[2])) {
$remotedns = mysql_escape_string($tldm[2]);
}
}
foreach ($fres as $flag) {
$option .= "\n<option ";
if ($flag["id"] == $dati["flag"] || $flag["domain"] == $remotedns && $action == "signup") {
$option .= "\"selected\" ";
}
$option .= "value=\"" . $flag["id"] . "\">" . $flag["name"] . "</option>";
}
$option .= "\n</select>";
$tpl_account->set("account_combo_country", $option);
$zone = date('Z', time());
$daylight = date('I', time()) * 3600;
$os = $zone - $daylight;
if ($os != 0) {
$timeoff = $os / 3600;
} else {
$timeoff = 0;
}
if (!$CURUSER || $CURUSER["uid"] == 1) {
$dati["time_offset"] = $timeoff;
}
$tres = timezone_list();
$option = "<select name=\"timezone\">";
foreach ($tres as $timezone) {
$option .= "\n<option ";
if ($timezone["difference"] == $dati["time_offset"]) {
$option .= "selected=\"selected\" ";
}
$option .= "value=\"" . $timezone["difference"] . "\">" . unesc($timezone["timezone"]) . "</option>";
}
$option .= "\n</select>";
$tpl_account->set("account_combo_timezone", $option);
// -----------------------------
// Captcha hack
// -----------------------------
//.........这里部分代码省略.........
示例4: language_list
$lres = language_list();
$langtpl = array();
foreach ($lres as $langue) {
$langtpl["language_combo"] .= "\n<option ";
if ($langue["id"] == $CURUSER["language"]) {
$langtpl["language_combo"] .= "selected=\"selected\" ";
}
$langtpl["language_combo"] .= "value=\"" . $langue["id"] . "\">" . unesc($langue["language"]) . "</option>";
$langtpl["language_combo"] .= $option;
}
unset($lres);
$usercptpl->set("lang", $langtpl);
}
if ($btit_settings["hide_style_visible"] != "visible") {
//style list
$sres = style_list();
$styletpl = array();
foreach ($sres as $style) {
$styletpl["style_combo"] .= "\n<option ";
if ($style["id"] == $CURUSER["style"]) {
$styletpl["style_combo"] .= "selected=\"selected\" ";
}
$styletpl["style_combo"] .= "value=\"" . $style["id"] . "\">" . unesc($style["style"]) . "</option>";
$styletpl["style_combo"] .= $option;
}
unset($sres);
$usercptpl->set("style", $styletpl);
}
//flag list
$fres = flag_list();
$flagtpl = array();
示例5: team_list
$opts['default'] = $curu['team'];
}
# team list
$teams = team_list();
$admintpl->set('team_combo', get_combo($teams, $opts));
# lang list
$opts['name'] = 'language';
$opts['value'] = 'language';
$opts['default'] = $curu['language'];
$langs = language_list();
$admintpl->set('language_combo', get_combo($langs, $opts));
# style list
$opts['name'] = 'style';
$opts['value'] = 'style';
$opts['default'] = $curu['style'];
$styles = style_list();
$admintpl->set('style_combo', get_combo($styles, $opts));
# timezone list
$opts['name'] = 'timezone';
$opts['id'] = 'difference';
$opts['value'] = 'timezone';
$opts['default'] = $curu['time_offset'];
$tzones = timezone_list();
$admintpl->set('tz_combo', get_combo($tzones, $opts));
# flag list
$opts['complete'] = false;
$opts['value'] = 'name';
$opts['id'] = 'id';
$opts['default'] = $curu['flag'];
$flags = flag_list();
$admintpl->set('flag_combo', get_combo($flags, $opts));
示例6: intval
$id = intval($_GET["id"]);
if ($id != $DEFAULT_LANGUAGE) {
$rlang = $db->query("SELECT * FROM language WHERE id = " . $id);
$reslang = $rlang->fetch_array(MYSQLI_BOTH);
$lang = $reslang["language_url"];
if (unlink($lang)) {
$db->query("UPDATE users SET language = " . $DEFAULT_LANGUAGE . " WHERE language = " . $id);
$db->query("DELETE FROM language WHERE id = " . $id);
@unlink(CACHE_PATH . 'language_list.txt');
} else {
err_msg(ERROR, DELFAILED);
}
}
redirect("admincp.php?user=" . user::$current["uid"] . "&code=" . user::$current["random"] . "&do=language&action=read");
} elseif ($do == "style" && $action == "read") {
$cat = style_list();
block_begin(STYLE_SETTINGS);
print "<br /> <a href='admincp.php?user=" . user::$current["uid"] . "&code=" . user::$current["random"] . "&do=style&action=add'><img alt='" . INSERT_NEW_STYLE . "' border='0' src='images/new.gif'></a>\n";
print "<br /><br />\n<table class='lista' width='100%' align='center'>\n";
print "<tr>\n";
print "<td class='header' align='center'>" . STYLE_NAME . "</td>\n";
print "<td class='header' align='center'>" . STYLE_URL . "</td>\n";
print "<td class='header' align='center'>" . MEMBERS . "</td>\n";
print "<td class='header' align='center'>" . EDIT . "</td>\n";
print "<td class='header' align='center'>" . DELETE . "</td>\n";
print "</tr>\n";
foreach ($cat as $category) {
$res = $db->query("SELECT * FROM users WHERE style = " . (int) $category["id"]);
$total_users = intval(0 + @$res->num_rows);
print "<tr>\n";
print "<td class='lista' align='center'>" . security::html_safe(unesc($category["style"])) . "</td>\n";
示例7: tabella
//.........这里部分代码省略.........
@($idt = mysqli_fetch_assoc($rdt));
$tpl_account->set("refb", $idt["username"]);
} else {
$tpl_account->set("refb", "Nobody");
}
}
// DT referral end
//begin invitation system by dodge
if ($INVITATIONSON) {
$tpl_account->set("BY_INVITATION", true, true);
$tpl_account->set("account_IDcode", $code);
$tpl_account->set("account_IDinviter", $inviter);
}
//end invitation system
if ($action == "del") {
$tpl_account->set("account_from_delete_confirm", "<input type=\"submit\" name=\"elimina\" value=\"" . $language["FRM_DELETE"] . "\" /> <input type=\"submit\" name=\"elimina\" value=\"" . $language["FRM_CANCEL"] . "\" />");
} else {
$tpl_account->set("account_from_delete_confirm", "<input type=\"submit\" name=\"conferma\" value=\"" . $language["FRM_CONFIRM"] . "\" /> <input type=\"reset\" name=\"annulla\" value=\"" . $language["FRM_CANCEL"] . "\" />");
}
if ($btit_settings["hide_language_visible"] != "visible") {
$lres = language_list();
$option = "\n<select name=\"language\" size=\"1\">";
foreach ($lres as $langue) {
$option .= "\n<option ";
if ($langue["id"] == $dati["language"]) {
$option .= "selected=\"selected\" ";
}
$option .= "value=\"" . $langue["id"] . "\">" . $langue["language"] . "</option>";
}
$option .= "\n</select>";
$tpl_account->set("account_combo_language", $option);
}
if ($btit_settings["hide_style_visible"] != "visible") {
$sres = style_list();
$option = "\n<select name=\"style\" size=\"1\">";
foreach ($sres as $style) {
$option .= "\n<option ";
if ($style["id"] == $dati["style"]) {
$option .= "selected=\"selected\" ";
}
$option .= "value=\"" . $style["id"] . "\">" . $style["style"] . "</option>";
}
$option .= "\n</select>";
$tpl_account->set("account_combo_style", $option);
}
$fres = flag_list();
$option = "\n<select name=\"flag\" size=\"1\">\n<option value='0'>---</option>";
$thisip = $_SERVER["REMOTE_ADDR"];
$remotedns = gethostbyaddr($thisip);
if ($remotedns != $thisip) {
$remotedns = strtoupper($remotedns);
preg_match('/^(.+)\\.([A-Z]{2,3})$/', $remotedns, $tldm);
if (isset($tldm[2])) {
$remotedns = mysqli_real_escape_string($DBDT, $tldm[2]);
}
}
foreach ($fres as $flag) {
$option .= "\n<option ";
if ($flag["id"] == $dati["flag"] || $flag["domain"] == $remotedns && $action == "signup") {
$option .= "selected=\"selected\" ";
}
$option .= "value=\"" . $flag["id"] . "\">" . $flag["name"] . "</option>";
}
$option .= "\n</select>";
$tpl_account->set("account_combo_country", $option);
$zone = date('Z', time());
示例8: tabella
//.........这里部分代码省略.........
</tr>
<tr>
<td align="left" class="header"><?php
echo USER_PWD_AGAIN;
?>
:</td>
<td align="left" class="lista"><input type="password" size="40" name="pwd1" /></td>
</tr>
<tr>
<td align="left" class="header"><?php
echo USER_EMAIL;
?>
:</td>
<td align="left" class="lista"><input type="text" size="30" name="email" value="<?php
if ($action == "mod") {
echo security::html_safe($dati['email']);
}
?>
"/></td>
</tr>
<?php
$lres = language_list();
print "<tr>\n\t<td align='left' class='header'>" . USER_LANGUE . ":</td>";
print "\n\t<td align='left' class='lista'><select name='language'>";
foreach ($lres as $langue) {
$option = "\n<option ";
if ($langue["id"] == $dati["language"]) {
$option .= "selected='selected' ";
}
$option .= "value='" . (int) $langue["id"] . "'>" . security::html_safe($langue["language"]) . "</option>";
print $option;
}
print "</select></td>\n</tr>";
$sres = style_list();
print "<tr>\n\t<td align='left' class='header'>" . USER_STYLE . ":</td>";
print "\n\t<td align='left' class='lista'><select name='style'>";
foreach ($sres as $style) {
$option = "\n<option ";
if ($style["id"] == $dati["style"]) {
$option .= "selected='selected' ";
}
$option .= "value='" . (int) $style["id"] . "'>" . security::html_safe($style["style"]) . "</option>";
print $option;
}
print "</select></td>\n</tr>";
$fres = flag_list();
print "<tr>\n\t<td align='left' class='header'>" . PEER_COUNTRY . ":</td>";
print "\n\t<td align='left' class='lista'><select name='flag'>\n<option value='0'>---</option>";
$thisip = vars::$realip;
$remotedns = gethostbyaddr($thisip);
if ($remotedns != $thisip) {
$remotedns = utf8::strtoupper($remotedns);
preg_match('/^(.+)\\.([A-Z]{2,3})$/', $remotedns, $tldm);
if (isset($tldm[2])) {
$remotedns = $db->real_escape_string($tldm[2]);
}
}
foreach ($fres as $flag) {
$option = "\n<option ";
if ($flag["id"] == $dati["flag"] || $flag["domain"] == $remotedns && $action == "signup") {
$option .= "selected='selected' ";
}
$option .= "value='" . (int) $flag["id"] . "'>" . security::html_safe($flag["name"]) . "</option>";
print $option;
}
print "</select></td>\n</tr>";