本文整理汇总了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;