本文整理匯總了PHP中Photo::approve方法的典型用法代碼示例。如果您正苦於以下問題:PHP Photo::approve方法的具體用法?PHP Photo::approve怎麽用?PHP Photo::approve使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Photo
的用法示例。
在下文中一共展示了Photo::approve方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: approvePhoto
function approvePhoto()
{
$session = Session::singletone();
$db = Database::singletone()->db();
$pid = Utils::pg("pid", 0);
$this->_query->appendChild($this->_dom->createElement("photo-id", $pid));
if ($pid <= 0) {
$this->error("bad-arguments");
return;
}
if (!$session->checkPerm("approve-photos")) {
$this->error("permission-denied");
return;
}
$photo = new Photo($pid);
$photo->approve();
$this->success();
}
示例2: fill_category_tree
$photo_approved = $_POST['photo_approved'];
$photo->_dbo->photo_title = $photo_title;
$photo->_dbo->photo_description = $photo_description;
$photo->_cids = array();
if (!empty($_POST['photo_cids']))
$photo->_cids = $_POST['photo_cids'];
$approve = false;
if (empty($photo->_dbo->photo_approved) && Permissions::checkPerm("approve_photos") && $photo_approved) {
$approve = true;
}
$photo->update();
if ($approve)
$photo->approve();
if (!empty($ref))
header("Location: " . $ref);
$pane = new HTML_MessagePane("upd", "Zdjêcie zapisane", "", "a_ok_pane", "a_ok_pane_hdr");
$pane->show();
} catch (Exception2 $e) {
$pane = new HTML_MessagePane("upd", $e->getMessage(), $e->getDescription(), "a_fail_pane", "a_fail_pane_hdr");
$pane->show();
}
}
function fill_category_tree($field, $ccid, $level) {
global $db;