当前位置: 首页>>代码示例>>PHP>>正文


PHP actionLink函数代码示例

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


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

示例1: Plural

function Plural($i, $s)
{
    $wordto2 = array('użytkownik' => 'użytkowników', 'godziny' => 'godzin', 'użytkownika' => 'użytkowników', 'prywatną wiadomość' => 'prywatne wiadomości', 'post' => 'posty', 'temat' => 'tematy', 'plik' => 'pliki', 'MySQL query' => 'MySQL queries', 'nową <a href="' . actionLink("private") . '">prywatną wiadomość' => 'nowe <a href="' . actionLink("private") . '">prywatne wiadomości', 'gość' => 'gości', 'bot' => 'boty', 'nowy post' => 'nowe posty', 'year' => 'years', 'zapytanie MySQL' => 'zapytania MySQL');
    $wordto5 = array('użytkownik' => 'użytkowników', 'godziny' => 'godzin', 'użytkownika' => 'użytkowników', 'post' => 'postów', 'temat' => 'tematów', 'prywatną wiadomość' => 'prywatnych wiadomości', 'plik' => 'plików', 'MySQL query' => 'MySQL queries', 'nową <a href="private.php">prywatną wiadomość' => 'nowych <a href="private.php">prywatnych wiadomości', 'gość' => 'gości', 'bot' => 'botów', 'nowy post' => 'nowe postów', 'year' => 'years', 'zapytanie MySQL' => 'zapytań MySQL');
    if ($i > 1 && $i < 5) {
        // from two to four
        if (isset($wordto2[$s])) {
            $s = $wordto2[$s];
        }
    } elseif ($i > 4 || $i < 1) {
        // 0 and 5+ makes other form
        if (isset($wordto5[$s])) {
            $s = $wordto5[$s];
        }
    }
    return $i . " " . $s;
}
开发者ID:knytrune,项目名称:ABXD,代码行数:17,代码来源:pl_PL.php

示例2: uploadFile

function uploadFile($file, $cattype, $cat)
{
    global $loguserid, $uploaddirs, $goodfiles, $badfiles, $userquota, $maxSize;
    $targetdir = $uploaddirs[$cattype];
    $totalsize = foldersize($targetdir);
    $filedata = $_FILES[$file];
    $c = FetchResult("SELECT COUNT(*) FROM {uploader} WHERE filename={0} AND cattype={1} AND user={2} AND deldate=0", $filedata['name'], $cattype, $loguserid);
    if ($c > 0) {
        return "You already have a file with this name. Please delete the old copy before uploading a new one.";
    }
    if ($filedata['size'] == 0) {
        if ($filedata['tmp_name'] == '') {
            return 'No file given.';
        } else {
            return 'File is empty.';
        }
    }
    if ($filedata['size'] > $maxSize) {
        return 'File is too large. Maximum size allowed is ' . BytesToSize($maxSize) . '.';
    }
    $randomid = Shake();
    $pname = $randomid . '_' . Shake();
    $fname = $_FILES['newfile']['name'];
    $temp = $_FILES['newfile']['tmp_name'];
    $size = $_FILES['size']['size'];
    $parts = explode(".", $fname);
    $extension = end($parts);
    if ($totalsize + $size > $quot) {
        Alert(format(__("Uploading \"{0}\" would break the quota."), $fname));
    } else {
        if (in_array(strtolower($extension), $badfiles) || is_array($goodfiles) && !in_array(strtolower($extension), $goodfiles)) {
            return 'Forbidden file type.';
        } else {
            $description = $_POST['description'];
            $big_descr = $cat['showindownloads'] ? $_POST['big_description'] : '';
            Query("insert into {uploader} (id, filename, description, big_description, date, user, private, category, deldate, physicalname) values ({7}, {0}, {1}, {6}, {2}, {3}, {4}, {5}, 0, {8})", $fname, $description, time(), $loguserid, $privateFlag, $_POST['cat'], $big_descr, $randomid, $pname);
            copy($temp, $targetdir . "/" . $pname);
            Report("[b]" . $loguser['name'] . "[/] uploaded file \"[b]" . $fname . "[/]\"" . ($privateFlag ? " (privately)" : ""), $privateFlag);
            die(header("Location: " . actionLink("uploaderlist", "", "cat=" . $_POST["cat"])));
        }
    }
}
开发者ID:Servault,项目名称:Blargboard,代码行数:42,代码来源:lib.php

示例3: array

<?php

if (!defined('BLARG')) {
    die;
}
$userMenu = array();
if ($loguserid) {
    if (HasPermission('user.editprofile')) {
        $userMenu[actionLink('editprofile')] = __('Edit profile');
        if (HasPermission('user.editavatars')) {
            $userMenu[actionLink('editavatars')] = __('Mood avatars');
        }
    }
    $userMenu[actionLink('private')] = __('Private messages');
    $userMenu[actionLink('favorites')] = __('Favorites');
    $bucket = 'userMenu';
    include __DIR__ . "/../lib/pluginloader.php";
}
$layout_userpanel = $userMenu;
开发者ID:Servault,项目名称:Blargboard,代码行数:19,代码来源:userpanel.php

示例4: __

if ($_POST['mood']) {
    $moodSelects[(int) $_POST['mood']] = "selected=\"selected\" ";
}
$moodOptions = "<option " . $moodSelects[0] . "value=\"0\">" . __("[Default avatar]") . "</option>\n";
$rMoods = Query("select mid, name from {moodavatars} where uid={0} order by mid asc", $loguserid);
while ($mood = Fetch($rMoods)) {
    $moodOptions .= format("\n\t<option {0} value=\"{1}\">{2}</option>\n", $moodSelects[$mood['mid']], $mood['mid'], htmlspecialchars($mood['name']));
}
$ninja = FetchResult("select id from {posts} where thread={0} order by date desc limit 0, 1", $tid);
$mod_lock = '';
if (HasPermission('mod.closethreads', $fid)) {
    if (!$thread['closed']) {
        $mod_lock = "<label><input type=\"checkbox\" " . getCheck("lock") . " name=\"lock\">&nbsp;" . __("Close thread", 1) . "</label>\n";
    } else {
        $mod_lock = "<label><input type=\"checkbox\" " . getCheck("unlock") . "  name=\"unlock\">&nbsp;" . __("Open thread", 1) . "</label>\n";
    }
}
$mod_stick = '';
if (HasPermission('mod.stickthreads', $fid)) {
    if (!$thread['sticky']) {
        $mod_stick = "<label><input type=\"checkbox\" " . getCheck("stick") . "  name=\"stick\">&nbsp;" . __("Sticky", 1) . "</label>\n";
    } else {
        $mod_stick = "<label><input type=\"checkbox\" " . getCheck("unstick") . "  name=\"unstick\">&nbsp;" . __("Unstick", 1) . "</label>\n";
    }
}
$fields = array('text' => "<textarea id=\"text\" name=\"text\" rows=\"16\">\n{$prefill}</textarea>", 'mood' => "<select size=1 name=\"mood\">" . $moodOptions . "</select>", 'nopl' => "<label><input type=\"checkbox\" " . getCheck('nopl') . " name=\"nopl\">&nbsp;" . __("Disable post layout", 1) . "</label>", 'nosm' => "<label><input type=\"checkbox\" " . getCheck('nosm') . " name=\"nosm\">&nbsp;" . __("Disable smilies", 1) . "</label>", 'lock' => $mod_lock, 'stick' => $mod_stick, 'btnPost' => "<input type=\"submit\" name=\"actionpost\" value=\"" . __("Post") . "\">", 'btnPreview' => "<input type=\"submit\" name=\"actionpreview\" value=\"" . __("Preview") . "\">");
echo "\n\t<form name=\"postform\" action=\"" . htmlentities(actionLink("newreply", $tid)) . "\" method=\"post\" enctype=\"multipart/form-data\">\n\t\t<input type=\"hidden\" name=\"ninja\" value=\"{$ninja}\">";
RenderTemplate('form_newreply', array('fields' => $fields));
PostAttachForm($attachs);
echo "\n\t\t</form>\n\t<script type=\"text/javascript\">\n\t\tdocument.postform.text.focus();\n\t</script>\n";
doThreadPreview($tid);
开发者ID:Servault,项目名称:Blargboard,代码行数:31,代码来源:newreply.php

示例5: __

		<input type="text" name="pollOption[' . $i . ']" value="' . $opttext . '" size=48 maxlength=40>
		&nbsp;Color: <input type="text" name="pollColor[' . $i . ']" value="' . $color . '" size=10 maxlength=7 class="color {hash:true,required:false,pickerFaceColor:\'black\',pickerFace:3,pickerBorder:0,pickerInsetColor:\'black\',pickerPosition:\'left\',pickerMode:\'HVS\'}">
		&nbsp; <input type="submit" name="pollRemove[' . $i . ']" value="&#xD7;" onclick="removeOption(this.parentNode);return false;">
	</div>';
    }
}
$pollSettings .= '</div>';
$pollSettings .= '<input type="submit" name="pollAdd" value="' . __('Add option') . '" onclick="addOption();return false;">';
$moodSelects = array();
if ($_POST['mood']) {
    $moodSelects[(int) $_POST['mood']] = "selected=\"selected\" ";
}
$moodOptions = "<option " . $moodSelects[0] . "value=\"0\">" . __("[Default avatar]") . "</option>\n";
$rMoods = Query("select mid, name from {moodavatars} where uid={0} order by mid asc", $loguserid);
while ($mood = Fetch($rMoods)) {
    $moodOptions .= format("\n\t<option {0} value=\"{1}\">{2}</option>\n", $moodSelects[$mood['mid']], $mood['mid'], htmlspecialchars($mood['name']));
}
$mod_lock = '';
$mod_stick = '';
if (HasPermission('mod.closethreads', $forum['id'])) {
    $mod_lock = "<label><input type=\"checkbox\" " . getCheck("lock") . " name=\"lock\">&nbsp;" . __("Close thread", 1) . "</label>\n";
}
if (HasPermission('mod.stickthreads', $forum['id'])) {
    $mod_stick = "<label><input type=\"checkbox\" " . getCheck("stick") . "  name=\"stick\">&nbsp;" . __("Sticky", 1) . "</label>\n";
}
$fields = array('title' => "<input type=\"text\" name=\"title\" size=80 maxlength=\"60\" value=\"{$trefill}\">", 'icon' => $iconSettings, 'pollQuestion' => "<input type=\"text\" name=\"pollQuestion\" value=\"" . htmlspecialchars($_POST['pollQuestion']) . "\" size=80 maxlength=\"100\">", 'pollOptions' => $pollSettings, 'pollMultivote' => "<label><input type=\"checkbox\" " . ($_POST['multivote'] ? "checked=\"checked\"" : "") . " name=\"multivote\">&nbsp;" . __("Multivote", 1) . "</label>", 'text' => "<textarea id=\"text\" name=\"text\" rows=\"16\">\n{$prefill}</textarea>", 'mood' => "<select size=1 name=\"mood\">" . $moodOptions . "</select>", 'nopl' => "<label><input type=\"checkbox\" " . getCheck('nopl') . " name=\"nopl\">&nbsp;" . __("Disable post layout", 1) . "</label>", 'nosm' => "<label><input type=\"checkbox\" " . getCheck('nosm') . " name=\"nosm\">&nbsp;" . __("Disable smilies", 1) . "</label>", 'lock' => $mod_lock, 'stick' => $mod_stick, 'btnPost' => "<input type=\"submit\" name=\"actionpost\" value=\"" . __("Post") . "\">", 'btnPreview' => "<input type=\"submit\" name=\"actionpreview\" value=\"" . __("Preview") . "\">", 'btnAddPoll' => "<input type=\"submit\" name=\"addpoll\" value=\"" . __("Add poll") . "\" onclick=\"addPoll();return false;\">", 'btnRemovePoll' => "<input type=\"submit\" name=\"deletepoll\" value=\"" . __("Remove poll") . "\" onclick=\"removePoll();return false;\">");
echo "\n\t<script src=\"" . resourceLink("js/threadtagging.js") . "\"></script>\n\t<script src=\"" . resourceLink('js/polleditor.js') . "\"></script>\n\t<form name=\"postform\" action=\"" . htmlentities(actionLink("newthread", $fid)) . "\" method=\"post\" enctype=\"multipart/form-data\">";
RenderTemplate('form_newthread', array('fields' => $fields, 'pollMode' => (int) $_POST['poll']));
PostAttachForm($attachs);
echo "\n\t\t<input type=\"hidden\" name=\"poll\" id=\"pollModeVal\" value=\"" . (int) $_POST['poll'] . "\">\n\t</form>\n\t<script type=\"text/javascript\">\n\t\tdocument.postform.text.focus();\n\t</script>\n";
LoadPostToolbar();
开发者ID:RoadrunnerWMC,项目名称:Blargboard-1.1,代码行数:31,代码来源:newthread.php

示例6: ForumsWithPermission

<?php

$viewableforums = ForumsWithPermission('forum.viewforum');
$tag = $_GET['tag'];
$tagcode = '"[' . $tag . ']"';
$forum = $_GET['fid'];
$cond = "WHERE MATCH (t.title) AGAINST ({0} IN BOOLEAN MODE)";
if ($forum) {
    $cond .= " AND t.forum = {1}";
}
$total = Fetch(Query("SELECT count(*) from threads t {$cond} AND t.forum IN ({2c})", $tag, $forum, $viewableforums));
$total = $total[0];
$tpp = $loguser['threadsperpage'];
if (isset($_GET['from'])) {
    $from = (int) $_GET['from'];
} else {
    $from = 0;
}
if (!$tpp) {
    $tpp = 50;
}
$rThreads = Query("\tSELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tf.(title, id),\n\t\t\t\t\t\t" . ($loguserid ? "tr.date readdate," : '') . "\n\t\t\t\t\t\tsu.(_userfields),\n\t\t\t\t\t\tlu.(_userfields)\n\t\t\t\t\tFROM\n\t\t\t\t\t\tthreads t\n\t\t\t\t\t\t" . ($loguserid ? "LEFT JOIN threadsread tr ON tr.thread=t.id AND tr.id={2}" : '') . "\n\t\t\t\t\t\tLEFT JOIN users su ON su.id=t.user\n\t\t\t\t\t\tLEFT JOIN users lu ON lu.id=t.lastposter\n\t\t\t\t\t\tLEFT JOIN forums f ON f.id=t.forum\n\t\t\t\t\t{$cond} AND f.id IN ({5c})\n\t\t\t\t\tORDER BY sticky DESC, lastpostdate DESC LIMIT {3u}, {4u}", $tagcode, $forum, $loguserid, $from, $tpp, $viewableforums);
$pagelinks = PageLinks(actionLink("tagsearch", "", "tag={$tag}&fid={$forum}&from="), $tpp, $from, $total);
if (NumRows($rThreads)) {
    makeThreadListing($rThreads, $pagelinks, false, !$forum);
} else {
    Alert(format(__("Tag {0} was not found in any thread."), htmlspecialchars($tag)), __("No threads found."));
}
开发者ID:RoadrunnerWMC,项目名称:Blargboard-1.1,代码行数:28,代码来源:tagsearch.php

示例7: elseif

                            } elseif ($type <= 3) {
                                $r = imagesx($img1) / imagesy($img1);
                                if ($r > 1) {
                                    $img2 = imagecreatetruecolor($dimx, floor($dimy / $r));
                                    imagecopyresampled($img2, $img1, 0, 0, 0, 0, $dimx, $dimy / $r, imagesx($img1), imagesy($img1));
                                } else {
                                    $img2 = imagecreatetruecolor(floor($dimx * $r), $dimy);
                                    imagecopyresampled($img2, $img1, 0, 0, 0, 0, $dimx * $r, $dimy, imagesx($img1), imagesy($img1));
                                }
                                imagepng($img2, $file);
                            } else {
                                $error .= "<li>Invalid format.</li>";
                            }
                        }
                        $usepic = $file;
                    } else {
                        Kill(__("Could not update your avatar for the following reason(s):") . "<ul>" . $error . "</ul>");
                    }
                }
            }
        }
    }
}
$moodRows = "";
$rMoods = Query("select mid, name from {moodavatars} where uid={0} order by mid asc", $loguserid);
while ($mood = Fetch($rMoods)) {
    $cellClass = ($cellClass + 1) % 2;
    $moodRows .= format("\n\t\t<tr class=\"cell{0}\">\n\t\t\t<td style=\"width: 100px;\">\n\t\t\t\t<img src=\"img/avatars/{1}_{2}\" alt=\"\">\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<form method=\"post\" action=\"" . actionLink("editavatars") . "\">\n\t\t\t\t\t<input type=\"hidden\" name=\"mid\" value=\"{2}\" />\n\t\t\t\t\t<input type=\"text\" id=\"name{2}\" name=\"name\" style=\"width: 60%;\" value=\"{3}\" />\n\t\t\t\t\t<input type=\"submit\" name=\"action\" value=\"" . __("Rename") . "\" />\n\t\t\t\t\t<input type=\"submit\" name=\"action\" value=\"" . __("Delete") . "\" />\n\t\t\t\t</form>\n\t\t\t</td>\n\t\t</tr>\n", $cellClass, $loguserid, $mood['mid'], htmlspecialchars($mood['name']));
}
write("\n\t<table class=\"margin outline width50\">\n\t\t<tr class=\"header1\">\n\t\t\t<th colspan=\"2\">\n\t\t\t\t" . __("Mood avatars") . "\n\t\t\t</th>\n\t\t</tr>\n\t\t{0}\n\t\t<tr class=\"header1\">\n\t\t\t<th colspan=\"2\">\n\t\t\t\t" . __("Add new") . "\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr class=\"cell2\">\n\t\t\t<td>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<form method=\"post\" action=\"" . actionLink("editavatars") . "\" enctype=\"multipart/form-data\">\n\t\t\t\t\t<label for=\"newName\">" . __("Name:") . "</label>\n\t\t\t\t\t<input type=\"text\" id=\"newName\" name=\"name\" style=\"width: 60%;\" /><br />\n\n\t\t\t\t\t<label for=\"pic\">" . __("Image:") . "</label>\n\t\t\t\t\t<input type=\"file\" id=\"pic\" name=\"picture\"  style=\"width: 75%;\" />\n\n\t\t\t\t\t<input type=\"submit\" name=\"action\" value=\"" . __("Add") . "\" />\n\t\t\t\t</form>\n\t\t\t</td>\n\t</table>\n", $moodRows);
开发者ID:knytrune,项目名称:ABXD,代码行数:30,代码来源:editavatars.php

示例8: ircColor

<?php

if ($isHidden) {
    return;
}
$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$thename = $loguser["name"];
if ($loguser["displayname"]) {
    $thename = $loguser["displayname"];
}
$fpage = ircForumPrefix($forum);
$link = getServerDomainNoSlash() . actionLink("post", $pid);
ircReport("" . $c2 . "New reply by{$c1} " . ircUserColor($thename, $loguser['sex'], 0) . "{$c2}: {$c1}" . $thread["title"] . "{$c2} (" . $fpage . $forum["title"] . ")" . " -- " . $link);
开发者ID:Servault,项目名称:Blargboard,代码行数:14,代码来源:newreply.php

示例9: Format

    }
}
if (isset($_POST['actionpreview']) || isset($_POST['actionpost'])) {
    $prefill = $_POST['text'];
    if ($_POST['nopl']) {
        $nopl = "checked=\"checked\"";
    }
    if ($_POST['nosm']) {
        $nosm = "checked=\"checked\"";
    }
} else {
    $prefill = $post['text'];
    if ($post['options'] & 1) {
        $nopl = "checked=\"checked\"";
    }
    if ($post['options'] & 2) {
        $nosm = "checked=\"checked\"";
    }
    $_POST['mood'] = $post['mood'];
}
if ($_POST['mood']) {
    $moodSelects[(int) $_POST['mood']] = "selected=\"selected\" ";
}
$moodOptions = Format("<option {0}value=\"0\">" . __("[Default avatar]") . "</option>\n", $moodSelects[0]);
$rMoods = Query("select mid, name from {moodavatars} where uid={0} order by mid asc", $post['user']);
while ($mood = Fetch($rMoods)) {
    $moodOptions .= Format("<option {0}value=\"{1}\">{2}</option>\n", $moodSelects[$mood['mid']], $mood['mid'], htmlspecialchars($mood['name']));
}
$form = "\n\t<form name=\"postform\" action=\"" . actionLink("editpost") . "\" method=\"post\">\n\t\t<table class=\"outline margin width100\">\n\t\t\t<tr class=\"header1\">\n\t\t\t\t<th colspan=\"2\">\n\t\t\t\t\t" . __("Edit Post") . "\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t\t<tr class=\"cell0\">\n\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t<textarea id=\"text\" name=\"text\" rows=\"16\" style=\"width: 98%;\">" . htmlspecialchars($prefill) . "</textarea>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr class=\"cell2\">\n\t\t\t\t<td></td>\n\t\t\t\t<td>\n\t\t\t\t\t<input type=\"submit\" name=\"actionpost\" value=\"" . __("Edit") . "\" />\n\t\t\t\t\t<input type=\"submit\" name=\"actionpreview\" value=\"" . __("Preview") . "\" />\n\t\t\t\t\t<select size=\"1\" name=\"mood\">\n\t\t\t\t\t\t{$moodOptions}\n\t\t\t\t\t</select>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"nopl\" {$pid} />&nbsp;" . __("Disable post layout", 1) . "\n\t\t\t\t\t</label>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"nosm\" {$nosm} />&nbsp;" . __("Disable smilies", 1) . "\n\t\t\t\t\t</label>\n\t\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"{$pid}\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"key\" value=\"" . $loguser['token'] . "\" />\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t</form>";
doPostForm($form);
doThreadPreview($tid);
开发者ID:knytrune,项目名称:ABXD,代码行数:31,代码来源:editpost.php

示例10: forumRedirectURL

function forumRedirectURL($redir)
{
    if ($redir[0] == ':') {
        $redir = explode(':', $redir);
        return actionLink($redir[1], $redir[2], $redir[3], $redir[4]);
    } else {
        return $redir;
    }
}
开发者ID:RoadrunnerWMC,项目名称:Blargboard-1.1,代码行数:9,代码来源:snippets.php

示例11: Query

    $from = 0;
}
if (!$ppp) {
    $ppp = 25;
}
$rPosts = Query("\n\tSELECT\n\t\tp.*,\n\t\tpt.text, pt.revision, pt.user AS revuser, pt.date AS revdate,\n\t\tu.(_userfields), u.(rankset,title,picture,posts,postheader,signature,signsep,lastposttime,lastactivity,regdate,globalblock),\n\t\tru.(_userfields),\n\t\tdu.(_userfields),\n\t\tt.id thread, t.title threadname,\n\t\tf.id fid\n\tFROM\n\t\t{posts} p\n\t\tLEFT JOIN {posts_text} pt ON pt.pid = p.id AND pt.revision = p.currentrevision\n\t\tLEFT JOIN {users} u ON u.id = p.user\n\t\tLEFT JOIN {users} ru ON ru.id=pt.user\n\t\tLEFT JOIN {users} du ON du.id=p.deletedby\n\t\tLEFT JOIN {threads} t ON t.id=p.thread\n\t\tLEFT JOIN {forums} f ON f.id=t.forum\n\tWHERE u.id={1} AND " . forumAccessControlSql() . "\n\tORDER BY date ASC LIMIT {2u}, {3u}", $loguserid, $id, $from, $ppp);
$numonpage = NumRows($rPosts);
$uname = $user["name"];
if ($user["displayname"]) {
    $uname = $user["displayname"];
}
$crumbs = new PipeMenu();
$crumbs->add(new PipeMenuLinkEntry(__("Member list"), "memberlist"));
$crumbs->add(new PipeMenuHtmlEntry(userLink($user)));
$crumbs->add(new PipeMenuTextEntry(__("Posts")));
makeBreadcrumbs($crumbs);
if ($total == 0) {
    Kill(__("This user hasn't made any posts yet."));
}
$pagelinks = PageLinks(actionLink("listposts", $id, "from="), $ppp, $from, $total);
if ($pagelinks) {
    write("<div class=\"smallFonts pages\">" . __("Pages:") . " {0}</div>", $pagelinks);
}
if (NumRows($rPosts)) {
    while ($post = Fetch($rPosts)) {
        MakePost($post, POST_NORMAL, array('threadlink' => 1, 'tid' => $post['thread'], 'fid' => $post['fid'], 'noreplylinks' => 1));
    }
}
if ($pagelinks) {
    write("<div class=\"smallFonts pages\">" . __("Pages:") . " {0}</div>", $pagelinks);
}
开发者ID:knytrune,项目名称:ABXD,代码行数:31,代码来源:listposts.php

示例12: format

            }
            if ($width > 90) {
                $color = "orange";
            }
            if ($width > 100) {
                $width = 100;
                $color = "red;";
            }
            $alt = format("{0}&nbsp;of&nbsp;{1},&nbsp;{2}%", BytesToSize($personalsize), BytesToSize($pQuota), $width);
            $bar = format("<div class=\"pollbar\" style=\"width: {0}%; background: {2}\" title=\"{1}\">&nbsp;{$width}%</div>", $width, $alt, $color);
        }
    }
    write("\n<div style=\"clear: both;\">\n\t<div class=\"pollbarContainer\" style=\"float: right; width: 50%;\">\n\t\t{2}\n\t</div>\n\t" . __("Personal folder space usage: {0} of {1}") . "\n</div>\n", BytesToSize($personalsize), BytesToSize($pQuota), $bar);
}
write($uploadPart);
write("<form method=\"post\" action=\"" . actionLink("uploader") . "\">");
write($sortOptions);
write($private);
write($public);
write("</form>");
//From the PHP Manual User Comments
function foldersize($path)
{
    $total_size = 0;
    if (!file_exists($path)) {
        mkdir($path);
    }
    $files = scandir($path);
    $files = array_slice($files, 2);
    foreach ($files as $t) {
        $size = filesize($path . "/" . $t);
开发者ID:RoadrunnerWMC,项目名称:ABXD-plugins,代码行数:31,代码来源:page_uploader.php

示例13: CheckPermission

CheckPermission('admin.ipsearch');
$ip = $_GET["id"];
if (!filter_var($ip, FILTER_VALIDATE_IP)) {
    Kill("Invalid IP");
}
$links = array();
$links[] = "<a href=\"http://dnsquery.org/ipwhois/{$ip}\" target=\"_blank\">Whois Query</a>";
$links[] = "<a onclick=\"if(confirm('Are you sure you want to IP-ban {$ip}?')) {document.getElementById('banform').submit();} return false;\" href=\"#\">IP Ban</a>";
MakeCrumbs(array(actionLink("admin") => __("Admin"), actionLink("ipbans") => __("IP ban manager"), '' => $ip), $links);
$rUsers = Query("select * from {users} where lastip={0}", $ip);
echo "<h3>Users with this IP</h3>";
$userList = "";
$ipBanComment = "";
$i = 1;
if (NumRows($rUsers)) {
    while ($user = Fetch($rUsers)) {
        $ipBanComment .= $user["name"] . " ";
        $cellClass = ($cellClass + 1) % 2;
        if ($user['lasturl']) {
            $lastUrl = "<a href=\"" . $user['lasturl'] . "\">" . $user['lasturl'] . "</a>";
        } else {
            $lastUrl = __("None");
        }
        $userList .= format("\n\t\t<tr class=\"cell{0}\">\n\t\t\t<td>\n\t\t\t\t{1}\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t{2}\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t{3}\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t{4}\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t{5}\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t{6}\n\t\t\t</td>\n\t\t</tr>\n\t", $cellClass, $i, UserLink($user), cdate("d-m-y G:i:s", $user['lastactivity']), $user['lastposttime'] ? cdate("d-m-y G:i:s", $user['lastposttime']) : __("Never"), $lastUrl, formatIP($user['lastip']));
        $i++;
    }
} else {
    $userList = "<tr class=\"cell0\"><td colspan=\"6\">" . __("No users") . "</td></tr>";
}
echo "<form id=\"banform\" action=\"" . htmlentities(actionLink('ipbans')) . "\" method=\"post\">\n\t<input type=\"hidden\" name=\"ip\" value=\"{$ip}\">\n\t<input type=\"hidden\" name=\"reason\" value=\"" . htmlentities($ipBanComment) . "\">\n\t<input type=\"hidden\" name=\"days\" value=\"0\">\n\t<input type=\"hidden\" name=\"actionadd\" value=\"yes, do it!\">\n</form>";
echo "\n\t<table class=\"outline margin\">\n\t\t<tr class=\"header1\">\n\t\t\t<th style=\"width: 30px;\">\n\t\t\t\t#\n\t\t\t</th>\n\t\t\t<th>\n\t\t\t\t" . __("Name") . "\n\t\t\t</th>\n\t\t\t<th style=\"width: 140px;\">\n\t\t\t\t" . __("Last view") . "\n\t\t\t</th>\n\t\t\t<th style=\"width: 140px;\">\n\t\t\t\t" . __("Last post") . "\n\t\t\t</th>\n\t\t\t<th>\n\t\t\t\t" . __("URL") . "\n\t\t\t</th>\n\t\t\t<th style=\"width: 140px;\">\n\t\t\t\t" . __("IP") . "\n\t\t\t</th>\n\t\t</tr>\n\t\t{$userList}\n\t</table>";
开发者ID:RoadrunnerWMC,项目名称:Blargboard-1.1,代码行数:31,代码来源:ipquery.php

示例14: Kill

} else {
    Kill(__("Unknown user ID."));
}
$title = __("Post list");
$total = FetchResult("\n\t\t\tSELECT\n\t\t\t\tcount(p.id)\n\t\t\tFROM\n\t\t\t\t{posts} p\n\t\t\t\tLEFT JOIN {threads} t ON t.id=p.thread{$extrashit}\n\t\t\tWHERE p.user={0} AND t.forum IN ({1c})", $id, ForumsWithPermission('forum.viewforum'));
$ppp = $loguser['postsperpage'];
if (isset($_GET['from'])) {
    $from = (int) $_GET['from'];
} else {
    $from = 0;
}
if (!$ppp) {
    $ppp = 25;
}
$rPosts = Query("\tSELECT\n\t\t\t\tp.*,\n\t\t\t\tpt.text, pt.revision, pt.user AS revuser, pt.date AS revdate,\n\t\t\t\tu.(_userfields), u.(rankset,title,picture,posts,postheader,signature,signsep,lastposttime,lastactivity,regdate,globalblock,fulllayout),\n\t\t\t\tru.(_userfields),\n\t\t\t\tdu.(_userfields),\n\t\t\t\tt.id thread, t.title threadname,\n\t\t\t\tf.id fid\n\t\t\tFROM\n\t\t\t\t{posts} p\n\t\t\t\tLEFT JOIN {posts_text} pt ON pt.pid = p.id AND pt.revision = p.currentrevision\n\t\t\t\tLEFT JOIN {users} u ON u.id = p.user\n\t\t\t\tLEFT JOIN {users} ru ON ru.id=pt.user\n\t\t\t\tLEFT JOIN {users} du ON du.id=p.deletedby\n\t\t\t\tLEFT JOIN {threads} t ON t.id=p.thread\n\t\t\t\tLEFT JOIN {forums} f ON f.id=t.forum\n\t\t\t\tLEFT JOIN {categories} c ON c.id=f.catid\n\t\t\tWHERE u.id={1} AND f.id IN ({4c}){$extrashit}\n\t\t\tORDER BY date ASC LIMIT {2u}, {3u}", $loguserid, $id, $from, $ppp, ForumsWithPermission('forum.viewforum'));
$numonpage = NumRows($rPosts);
$uname = $user["name"];
if ($user["displayname"]) {
    $uname = $user["displayname"];
}
MakeCrumbs(array(actionLink("profile", $id, "", $user["name"]) => htmlspecialchars($uname), '' => __("List of posts")));
$pagelinks = PageLinks(actionLink("listposts", $id, "from=", $user['name']), $ppp, $from, $total);
RenderTemplate('pagelinks', array('pagelinks' => $pagelinks, 'position' => 'top'));
if (NumRows($rPosts)) {
    while ($post = Fetch($rPosts)) {
        MakePost($post, POST_NORMAL, array('threadlink' => 1, 'tid' => $post['thread'], 'fid' => $post['fid'], 'noreplylinks' => 1));
    }
} else {
    Alert('This user has no posts.', 'Notice');
}
RenderTemplate('pagelinks', array('pagelinks' => $pagelinks, 'position' => 'bottom'));
开发者ID:Servault,项目名称:Blargboard,代码行数:31,代码来源:listposts.php

示例15: bbcodeQuoteGeneric

function bbcodeQuoteGeneric($contents, $arg, $text)
{
    if (!$arg) {
        return "<div class='quote'><div class='quotecontent'>{$contents}</div></div>";
    }
    // Possible formats:
    // [quote=blah]
    // [quote="blah blah" id="123"]
    if (preg_match('/"(.*)" id="(.*)"/', $arg, $match)) {
        $who = htmlspecialchars($match[1]);
        $id = (int) $match[2];
        return "<div class='quote'><div class='quoteheader'><a href=\"" . htmlentities(actionLink("post", $id)) . "\">{$text} {$who}</a></div><div class='quotecontent'>{$contents}</div></div>";
    } else {
        if ($arg[0] == '"') {
            $arg = substr($arg, 1, -1);
        }
        $who = htmlspecialchars($arg);
        return "<div class='quote'><div class='quoteheader'>{$text} {$who}</div><div class='quotecontent'>{$contents}</div></div>";
    }
}
开发者ID:RoadrunnerWMC,项目名称:Blargboard-1.1,代码行数:20,代码来源:bbcode_callbacks.php


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