本文整理匯總了PHP中ajax::get_quote_for_facebook方法的典型用法代碼示例。如果您正苦於以下問題:PHP ajax::get_quote_for_facebook方法的具體用法?PHP ajax::get_quote_for_facebook怎麽用?PHP ajax::get_quote_for_facebook使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ajax
的用法示例。
在下文中一共展示了ajax::get_quote_for_facebook方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ajax
function ajax()
{
global $user, $tenjin, $config_q;
if ($_GET["vote_for"] == 1) {
echo quote::vote_for(array("quote_id" => $_GET["q_id"], "user_id" => $user->data["user_id"], "ip" => $_SERVER['REMOTE_ADDR']));
} else {
if ($_GET["vote_against"] == 1) {
echo quote::vote_against(array("quote_id" => $_GET["q_id"], "user_id" => $user->data["user_id"], "ip" => $_SERVER['REMOTE_ADDR']));
/*
$cv = new vote(array(
"quote_id" => $_GET["q_id"],
"user_id" => $user->data["user_id"],
"ip" => $_SERVER['REMOTE_ADDR'],
));
$cv->vote_for();
*/
}
}
if ($_GET["get_quote_for_facebook"] == 1) {
echo ajax::get_quote_for_facebook($_GET["q_id"]);
}
if ($_GET["get_quotes_for_facebook"] == 1) {
quote::get_random_quotes_for_facebook();
die;
}
/* a strange kind of acl but ok
from here on you have to have permissions
*/
if (!can_access()) {
return true;
}
if ($_GET["dialog__add_quote"] == 1) {
$tenjin_template = $config_q["template_dir"] . '/dialog__add_quote.phtml';
$output = $tenjin->render($tenjin_template, $context);
echo $output;
} elseif ($_GET["get_tags"] == 1) {
/*$this->format_tags_as_links(array(
"tags" => $_POST["tags"],
));*/
} elseif ($_GET["format_tags_as_links"] == 1) {
$tag = new tag();
echo $tag->format_tags_as_links($_POST["tags"]);
} elseif ($_GET["set_tags"] == 1) {
$this->set_tags(array("tags" => $_POST["tags"], "q_id" => $_POST["q_id"]));
} elseif ($_GET["get_quote"] == 1) {
echo "get_quote";
} elseif ($_GET["set_quote"] == 1) {
echo "set_quote";
} elseif ($_GET["get_category"] == 1) {
$this->get_category(array("category_id" => $_POST["category_id"], "q_id" => $_POST["q_id"]));
} elseif ($_GET["set_category"] == 1) {
$this->set_category(array("category_id" => $_POST["category_id"], "q_id" => $_POST["q_id"]));
}
}