コード例 #1
0
 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));
 }
コード例 #2
0
 public function saveAction()
 {
     $db = front::og('db');
     $pic = page_admin_flash_upload2::getFileValue(front::$_req['form']['userpic'], 'team/');
     $save = front::toWin(array('name' => front::$_req['form']['name'], 'login' => front::$_req['form']['login'], 'occupation' => front::$_req['form']['occupation'], 'email' => front::$_req['form']['email'], 'userpic' => $pic, 'icq' => front::$_req['form']['icq'], 'skype' => front::$_req['form']['skype'], 'login' => front::$_req['form']['login'], 'groupid' => front::$_req['form']['groupid'], 'additional' => nl2br(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));
 }
コード例 #3
0
 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));
 }
コード例 #4
0
 function saveAction()
 {
     $db = front::og("db");
     $pic = page_admin_flash_upload2::getFileValue(front::$_req["form"]["userpic"], "team/");
     $save = front::toWin(array("name" => front::$_req["form"]["name"], "login" => front::$_req["form"]["login"], "occupation" => front::$_req["form"]["occupation"], "email" => front::$_req["form"]["email"], "userpic" => $pic, "icq" => front::$_req["form"]["icq"], "skype" => front::$_req["form"]["skype"], "login" => front::$_req["form"]["login"], "groupid" => front::$_req["form"]["groupid"], "additional" => nl2br(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));
 }