本文整理匯總了PHP中Rank::resortOrder方法的典型用法代碼示例。如果您正苦於以下問題:PHP Rank::resortOrder方法的具體用法?PHP Rank::resortOrder怎麽用?PHP Rank::resortOrder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Rank
的用法示例。
在下文中一共展示了Rank::resortOrder方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
$dispError .= "<b>·</b> Unable to upload rank image file. Please make sure the file extension is either .jpg, .png, .gif or .bmp<br>";
} else {
$rankImgURL = "images/ranks/" . $uploadFile->getUploadedFileName();
$arrUpdateValues[] = $rankImgURL;
$arrUpdateColumns[] = "imageurl";
}
} elseif ($_POST['rankimageurl'] != "") {
$arrUpdateValues[] = $_POST['rankimageurl'];
$arrUpdateColumns[] = "imageurl";
}
if ($countErrors == 0) {
// No errors after checking/uploading new rank image
$rank->select($_GET['rID']);
$rank->update($arrUpdateColumns, $arrUpdateValues);
if ($resortRanks) {
$rank->resortOrder();
}
$rankInfo = $rank->get_info_filtered();
// Update privileges
$result = $mysqli->query("DELETE FROM " . $dbprefix . "rank_privileges WHERE rank_id = '" . $rankInfo['rank_id'] . "'");
if ($result) {
$arrColumns = array("rank_id", "console_id");
$privObj = new Basic($mysqli, "rank_privileges", "privilege_id");
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "console ORDER BY sortnum");
$rankOptions = "";
while ($row = $result->fetch_assoc()) {
$strPostVarName = "consoleid_" . $row['console_id'];
if (isset($_POST[$strPostVarName]) && $_POST[$strPostVarName] == 1) {
$arrValues = array($rankInfo['rank_id'], $row['console_id']);
$privObj->addNew($arrColumns, $arrValues);
}