Пример #1
0
 function add($_id, $_b)
 {
     $c = new Query();
     $c->value("mento_id", $_id);
     $c->value("bios", $_b);
     $this->insert($c);
 }
Пример #2
0
 function add_res($_arr)
 {
     // $this->debug();
     $d = new Query();
     $d->from = "program_file_res";
     $d->where_eq("c_file_id", $_arr["c_file_id"]);
     $d->where_eq("apply_id", $_arr["apply_id"]);
     $res = $this->fetch_one("id", $d);
     if ($res) {
         $c = new Query();
         $c->from = "program_file_res";
         $c->value("file", $_arr["file"]);
         $c->where_eq("id", $res["id"]);
         $this->update($c);
         $_id = $res["s_id"];
     } else {
         $c = new Query();
         $c->from = "program_file_res";
         $c->value("c_file_id", $_arr["c_file_id"]);
         $c->value("apply_id", $_arr["apply_id"]);
         $c->value("file", $_arr["file"]);
         $this->insert($c);
         $_id = $this->last_id();
     }
     return $_id;
 }
Пример #3
0
 function add($_user, $_local)
 {
     $d = new Query();
     $d->value("user_id", $_user);
     $d->value("inv_id", $_local);
     $this->insert($d);
 }
Пример #4
0
 function add_c($_user, $_interist)
 {
     $d = new Query();
     $d->value("user_id", $_user);
     $d->value("interist_id", $_interist);
     $this->insert($d);
 }
Пример #5
0
 function add_c($_user, $_skill)
 {
     $d = new Query();
     $d->value("user_id", $_user);
     $d->value("market_id", $_skill);
     $this->insert($d);
 }
Пример #6
0
 function add($_startup_id, $_founder)
 {
     $c = new Query();
     $c->value("startup_id", $_startup_id);
     $c->value("founder", $_founder);
     $this->insert($c);
 }
Пример #7
0
 function add($_id, $_an, $_al)
 {
     $c = new Query();
     $c->value("mento_id", $_id);
     $c->value("title", $_an);
     $c->value("url", $_al);
     $this->insert($c);
 }
Пример #8
0
 function add_c($_user, $_skill)
 {
     //        $this->debug();
     $d = new Query();
     $d->value("user_id", $_user);
     $d->value("skill_id", $_skill);
     $this->insert($d);
 }
Пример #9
0
 function add_c($_user, $_c)
 {
     //        $this->debug();
     $d = new Query();
     $d->value("startup_id", $_user);
     $d->value("bussiness_id", $_c);
     $this->insert($d);
 }
Пример #10
0
 function add($_id, $_q)
 {
     // $this->debug();
     $c = new Query();
     $c->value("mento_id", $_id);
     $c->value("subject", $_q);
     $this->insert($c);
 }
Пример #11
0
 function edit($_id, $_type, $_cid)
 {
     $c = new Query();
     $c->value("type", $_type);
     $c->value("cid", $_cid);
     $c->where_eq("id", $_id);
     $this->update($c);
 }
Пример #12
0
 function add($_id, $_uid, $_email)
 {
     // $this->debug();
     $c = new Query();
     $c->value("mentor_id", $_id);
     $c->value("user_id", $_uid);
     $c->value("email", $_email);
     $this->insert($c);
 }
Пример #13
0
 function add($id_user, $login_name)
 {
     $akey = sha256(make_code() . $login_name);
     $c = new Query();
     $c->value('user_id', $id_user);
     $c->value('akey', $akey);
     $this->insert($c);
     return $akey;
 }
Пример #14
0
 function add($_id, $_value, $_type)
 {
     //            $this->debug();
     $c = new Query();
     $c->value("recruit_id", $_id);
     $c->value("code_id", $_value);
     $c->value("code_type", $_type);
     $this->insert($c);
 }
Пример #15
0
 function add($_arr)
 {
     $this->debug();
     $c = new Query();
     $c->value("apply_id", $_arr["apply_id"]);
     $c->value("form_id", $_arr["form_id"]);
     $c->value("contents", $_arr["contents"]);
     $this->insert($c);
 }
Пример #16
0
 function res_add($_arr)
 {
     // $this->debug();
     $c = new Query();
     $c->from = "competitions_form_res";
     $c->value("apply_id", $_arr["apply_id"]);
     $c->value("c_form_id", $_arr["c_form_id"]);
     $c->value("res", $_arr["res"]);
     $this->insert($c);
 }
Пример #17
0
 function add($_arr)
 {
     //        $this->debug();
     $c = new Query();
     $c->value("following", $_arr["following"]);
     $c->value("follower", $_arr["follower"]);
     $c->value("type", $_arr["type"]);
     $c->value("date_created", "now()", 1);
     $this->insert($c);
     return $this->last_id();
 }
Пример #18
0
 function edit_by_fb($_arr)
 {
     $c = new Query();
     $c->value("ids", $_arr["ids"]);
     $c->value("secret", $_arr["secret"]);
     $c->value("date_created", "now()", 1);
     if ($_arr["public"]) {
         $c->value("public", $_arr["public"]);
     }
     $c->where_eq("user_id", $_arr["user_id"]);
     $c->where_eq("type", $_arr["type"]);
     $this->update($c);
 }
Пример #19
0
 function add($_user_id, $_education, $_education_sp, $_education_st, $_id = '')
 {
     $c = new Query();
     $c->value("user_id", $_user_id);
     $c->value("education", $_education);
     $c->value("education_sp", $_education_sp);
     $c->value("education_st", $_education_st);
     if ($_id) {
         $c->where_eq("id", $_id);
         $this->update($c);
     } else {
         $this->insert($c);
     }
 }
Пример #20
0
 function add($_arr)
 {
     $c = new Query();
     $c->value("_key", $_arr["_key"]);
     $c->value("_value", $_arr["_value"]);
     if ($_arr["id"]) {
         $c->where_eq("id", $_arr["id"]);
         $this->update($c);
         $id = $_arr["id"];
     } else {
         $this->insert($c);
         $id = $this->last_id();
     }
     return $id;
 }
Пример #21
0
 function edit($_id, $_state)
 {
     $c = new Query();
     $c->value("visible", $_state);
     $c->where_eq("id", $_id);
     $this->update($c);
 }
Пример #22
0
 function add_error($_id)
 {
     $c = new Query();
     $c->where_eq('id', $_id);
     $c->value('error_cnt', 'error_cnt+1', true);
     $this->update($c);
 }
Пример #23
0
 function add($_arr)
 {
     $c = new Query();
     $c->value("name", $_arr["name"]);
     $c->value("description", $_arr["description"]);
     $c->value("visible", $_arr["visible"]);
     if ($_arr["id"]) {
         $c->where_eq("id", $_arr["id"]);
         $this->update($c);
         $_id = $this->last_id();
     } else {
         $this->insert($c);
         $_id = $_arr["id"];
     }
     return $_id;
 }
Пример #24
0
 function add($_arr)
 {
     $c = new Query();
     $c->value("competition_id", $_arr["competition_id"]);
     $c->value("name", $_arr["name"]);
     $c->value("score", $_arr["score"]);
     if ($_arr["id"]) {
         $c->where_eq("id", $_arr["id"]);
         $this->update($c);
         $_id = $_arr["s_id"];
     } else {
         $this->insert($c);
         $_id = $this->last_id();
     }
     return $_id;
 }
Пример #25
0
 function reset($_oh, $_aid)
 {
     $c = new Query();
     $c->value("apply_id", "");
     $c->where_eq("oh_id", $_oh);
     $c->where_eq("apply_id", $_aid);
     $this->update($c);
 }
Пример #26
0
 function add_picture($_key, $_pic, $_id)
 {
     //        $this->debug();
     $c = new Query();
     $c->value($_key, $_pic);
     $c->where_eq("id", $_id);
     $this->update($c);
 }
Пример #27
0
 function add_cont($_n_id, $_type, $_cont_id)
 {
     //        $this->debug();
     $c = new Query();
     $c->from = "newsletter_cont";
     if ($_n_id) {
         $c->value("newsl_id", $_n_id);
     }
     if ($_type) {
         $c->value("type", $_type);
     }
     if ($_cont_id) {
         $c->value("cont_id", $_cont_id);
     }
     $this->insert($c);
     $id = $this->last_id();
     return $id;
 }
Пример #28
0
 function edit_state_ref($_user, $_email, $_state)
 {
     //        $this->debug();
     $c = new Query();
     $c->from = "startup_reference_req";
     $c->value("state", $_state);
     $c->where_eq("startup_id", $_user);
     $c->where_eq("email", $_email);
     $this->update($c);
 }
Пример #29
0
 function add($_user, $_local)
 {
     //        $this->debug();
     $c = new Query();
     $c->from = "local";
     $c->where_eq("local", $_local);
     $res = $this->fetch_one("*", $c);
     if (!$res) {
         $a = new Query();
         $a->from = "local";
         $a->value("local", $_local);
         $this->insert($a);
         $res["id"] = $this->last_id();
     }
     $d = new Query();
     $d->value("startup_id", $_user);
     $d->value("local_id", $res["id"]);
     $this->insert($d);
 }
Пример #30
0
 function edit_state_by_cnt($_id, $_cnt)
 {
     // $this->debug();
     $c = new Query();
     $c->value("state", 1);
     $c->where_eq("event_id", $_id);
     $c->limit = $_cnt;
     $c->order = "id ASC";
     $this->update($c);
 }