本文整理汇总了PHP中front::og方法的典型用法代码示例。如果您正苦于以下问题:PHP front::og方法的具体用法?PHP front::og怎么用?PHP front::og使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类front
的用法示例。
在下文中一共展示了front::og方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: savewysiwygAction
public function savewysiwygAction()
{
$db = front::og('db');
$alias = front::$_req['alias'];
// проверяем права (могут быть разные для разных страниц)
switch ($alias) {
default:
$permission = null;
}
if (!$permission || !hasPermissions($permission)) {
return;
}
$text = front::$_req['form']['n_text'];
$text = iconv('UTF-8', 'CP1251', $text);
$text = __paramValue('ckedit', $text);
$title = front::$_req['form']['title'];
$title = iconv('UTF-8', 'CP1251', $title);
$title = __paramValue('string', $title);
$save = array('title' => $title, 'n_text' => $text);
if ($alias) {
$aff = $db->update('UPDATE static_pages SET ?s WHERE (alias = ?)', $save, $alias);
if (!$aff) {
$save['alias'] = $alias;
$db->insert('static_pages', $save, false);
}
}
echo json_encode(array('success' => true, 'alias' => $alias));
}
示例2: savewysiwygAction
function savewysiwygAction()
{
$db = front::og("db");
$alias = front::$_req["alias"];
// проверяем права (могут быть разные для разных страниц)
switch ($alias) {
default:
$permission = null;
}
if (!$permission || !hasPermissions($permission)) {
return;
}
$text = front::$_req["form"]["n_text"];
$text = iconv('UTF-8', 'CP1251', $text);
$text = __paramValue('ckedit', $text);
$title = front::$_req["form"]["title"];
$title = iconv('UTF-8', 'CP1251', $title);
$title = __paramValue('string', $title);
$save = array("title" => $title, "n_text" => $text);
if ($alias) {
$aff = $db->update("UPDATE static_pages SET ?s WHERE (alias = ?)", $save, $alias);
if (!$aff) {
$save["alias"] = $alias;
$db->insert("static_pages", $save, false);
}
}
echo json_encode(array("success" => true, "alias" => $alias));
}
示例3: get
static function get($alias)
{
$res = front::og("db")->select("SELECT * FROM static_pages WHERE alias = ? LIMIT 1;", $alias)->fetchRow();
if (!$res) {
$res = array("alias" => $alias);
}
return $res;
}
示例4: get
public static function get($alias)
{
$res = front::og('db')->select('SELECT * FROM static_pages WHERE alias = ? LIMIT 1;', $alias)->fetchRow();
if (!$res) {
$res = array('alias' => $alias);
}
return $res;
}
示例5: saveAction
function saveAction()
{
$db = front::og("db");
$save = front::toWin(array("title" => front::$_req["form"]["title"], "msg" => front::$_req["form"]["msg"], "id_blog" => 0, "id_user" => $_SESSION["uid"]));
if (intval($id = front::$_req["id"]) > 0) {
$aff = $db->update("UPDATE corporative_blog SET ?s WHERE (id = ?n)", $save, $id);
} else {
$id = $db->insert("corporative_blog", $save);
}
echo json_encode(array("success" => true, "id" => $id));
}
示例6: saveAction
public function saveAction()
{
$db = front::og('db');
$save = front::toWin(array('title' => front::$_req['form']['title'], 'msg' => front::$_req['form']['msg'], 'id_blog' => 0, 'id_user' => $_SESSION['uid']));
if (intval($id = front::$_req['id']) > 0) {
$aff = $db->update('UPDATE corporative_blog SET ?s WHERE (id = ?n)', $save, $id);
} else {
$id = $db->insert('corporative_blog', $save);
}
echo json_encode(array('success' => true, 'id' => $id));
}
示例7: editRadzelAction
public function editRadzelAction()
{
$db = front::og('db');
$save = front::toWin(array('name' => front::$_req['title']));
if (intval($id = front::$_req['id']) > 0) {
$aff = $db->update('UPDATE faq_category SET ?s WHERE (id = ?n)', $save, $id);
} else {
$id = $db->insert('faq_category', $save);
}
echo json_encode(array('success' => true, 'id' => $id));
}
示例8: saveAction
function saveAction()
{
$db = front::og("db");
$save = front::toWin(array("name" => front::$_req["form"]["name"], "login" => front::$_req["form"]["login"], "occupation" => front::$_req["form"]["occupation"], "email" => front::$_req["form"]["email"], "icq" => front::$_req["form"]["icq"], "skype" => front::$_req["form"]["skype"], "login" => front::$_req["form"]["login"], "groupid" => front::$_req["form"]["groupid"], "additional" => front::$_req["form"]["additional"]));
if (intval($id = front::$_req["id"]) > 0) {
$aff = $db->update("UPDATE team_people SET ?s WHERE (id = ?n)", $save, $id);
} else {
$id = $db->insert("team_people", $save);
}
echo json_encode(array("success" => true, "id" => $id));
}
示例9: saveAction
public function saveAction()
{
$db = front::og('db');
$save = front::toWin(array('header' => front::$_req['form']['header'], 'n_text' => front::$_req['form']['n_text'], 'post_date' => front::$_req['form']['post_date']));
if (intval($id = front::$_req['id']) > 0) {
$aff = $db->update('UPDATE news SET ?s WHERE (id = ?n)', $save, $id);
} else {
$id = $db->insert('news', $save);
}
echo json_encode(array('success' => true, 'id' => $id));
}
示例10: saveAction
public function saveAction()
{
$db = front::og('db');
$save = front::toWin(array('name' => front::$_req['form']['name'], 'login' => front::$_req['form']['login'], 'occupation' => front::$_req['form']['occupation'], 'email' => front::$_req['form']['email'], 'icq' => front::$_req['form']['icq'], 'skype' => front::$_req['form']['skype'], 'login' => front::$_req['form']['login'], 'groupid' => front::$_req['form']['groupid'], 'additional' => front::$_req['form']['additional']));
if (intval($id = front::$_req['id']) > 0) {
$aff = $db->update('UPDATE team_people SET ?s WHERE (id = ?n)', $save, $id);
} else {
$id = $db->insert('team_people', $save);
}
echo json_encode(array('success' => true, 'id' => $id));
}
示例11: saveAction
function saveAction()
{
$db = front::og("db");
$save = front::toWin(array("header" => front::$_req["form"]["header"], "n_text" => front::$_req["form"]["n_text"], "post_date" => front::$_req["form"]["post_date"]));
if (intval($id = front::$_req["id"]) > 0) {
$aff = $db->update("UPDATE news SET ?s WHERE (id = ?n)", $save, $id);
} else {
$id = $db->insert("news", $save);
}
echo json_encode(array("success" => true, "id" => $id));
}
示例12: editRadzelAction
function editRadzelAction()
{
$db = front::og("db");
$save = front::toWin(array("name" => front::$_req["title"]));
if (intval($id = front::$_req["id"]) > 0) {
$aff = $db->update("UPDATE faq_category SET ?s WHERE (id = ?n)", $save, $id);
} else {
$id = $db->insert("faq_category", $save);
}
echo json_encode(array("success" => true, "id" => $id));
}
示例13: saveAction
public function saveAction()
{
$db = front::og('db');
$save = front::toWin(array('msgtext' => front::$_req['form']['msgtext'], 'sign' => front::$_req['form']['sign'], 'link' => front::$_req['form']['link'], 'logo' => page_admin_flash_upload2::getFileValue(front::$_req['form']['logo'], 'about/opinions/')));
// foreach($save as &$one) { $one = ($one);}
if (intval($id = front::$_req['id']) > 0) {
$aff = $db->update('UPDATE sopinions SET ?s WHERE (id = ?n)', $save, $id);
} else {
$id = $db->insert('sopinions', $save);
}
echo json_encode(array('success' => true, 'id' => $id));
}
示例14: editRadzelAction
public function editRadzelAction()
{
$db = front::og('db');
$save = front::toWin(array('title' => front::$_req['title']));
if (intval($id = front::$_req['id']) > 0) {
$aff = $db->update('UPDATE team_groups SET ?s WHERE (id = ?n)', $save, $id);
} else {
team::CreateGroup(front::$_req['title']);
//$id = $db->insert("team_groups", $save);
}
echo json_encode(array('success' => true, 'id' => $id));
}
示例15: saveAction
function saveAction()
{
$db = front::og("db");
$save = front::toWin(array("msgtext" => front::$_req["form"]["msgtext"], "sign" => front::$_req["form"]["sign"], "link" => front::$_req["form"]["link"], "logo" => page_admin_flash_upload2::getFileValue(front::$_req["form"]["logo"], "about/opinions/")));
// foreach($save as &$one) { $one = ($one);}
if (intval($id = front::$_req["id"]) > 0) {
$aff = $db->update("UPDATE sopinions SET ?s WHERE (id = ?n)", $save, $id);
} else {
$id = $db->insert("sopinions", $save);
}
echo json_encode(array("success" => true, "id" => $id));
}