Exemple #1
0
 function add()
 {
     $wd = new wra_db();
     $this->id = WRA::getnewkey("" . WRA_CONF::$db_prefix . 'cats');
     $wd->query = 'INSERT INTO `' . WRA_CONF::$db_prefix . "cats` (\n `id`,\n `title`,\n `ruicon`,\n `alicon`,\n `style`,\n `img`\n )VALUES(\n '{$this->id}',\n '{$this->title}',\n '{$this->ruicon}',\n '{$this->alicon}',\n '{$this->style}',\n '{$this->img}'\n )";
     $wd->execute();
     if (!WRA_CONF::$usegetkey) {
         $this->id = $wd->getlastkey();
     }
     $wd->close();
     unset($wd);
 }
 function add()
 {
     $wd = new wra_db();
     $this->id = WRA::getnewkey("" . WRA_CONF::$db_prefix . 'sessions');
     $wd->query = 'INSERT INTO `' . WRA_CONF::$db_prefix . "sessions` (\n         `id`,\n         `sessionid`,\n         `user_id`,\n         `begintime`,\n         `ip`\n         )VALUES(\n         '{$this->id}',\n         '{$this->sessionid}',\n         '{$this->user_id}',\n         '{$this->begintime}',\n         '{$this->ip}'\n         )";
     $wd->execute();
     if (!WRA_CONF::$usegetkey) {
         $this->id = $wd->getlastkey();
     }
     $wd->close();
     unset($wd);
 }
 function add()
 {
     //добавление нового объекта
     $wd = new wra_db();
     $this->id = WRA::getnewkey("" . WRA_CONF::$db_prefix . 'adminnotices');
     $wd->query = "INSERT INTO `" . WRA_CONF::$db_prefix . "adminnotices` (\n `id`,\n `dateadd`,\n `ip`,\n `message`,\n `status`,`header`\n )VALUES(\n '{$this->id}',\n '{$this->dateadd}',\n '{$this->ip}',\n '{$this->message}',\n '{$this->status}', '{$this->header}'\n )";
     $wd->execute();
     if (!WRA_CONF::$usegetkey) {
         $this->id = $wd->getlastkey();
     }
     $wd->close();
     unset($wd);
 }
 function add()
 {
     //добавление нового объекта
     if (!isset($this->creator_id)) {
         $this->creator_id = wra_userscontext::curuser();
     }
     $wd = new wra_db();
     if (!isset($this->id)) {
         $this->id = WRA::getnewkey('' . WRA_CONF::$db_prefix . 'usersrights');
     }
     $wd->query = "INSERT INTO `" . WRA_CONF::$db_prefix . "usersrights` (\n             `id`,\n             `user_id`,\n             `right_id`\n             )VALUES(\n             '{$this->id}',\n             '{$this->user_id}',\n             '{$this->right_id}'\n             )";
     $wd->execute();
     if (!WRA_CONF::$usegetkey) {
         $this->id = $wd->getlastkey();
     }
     $wd->close();
     unset($wd);
 }
 function add()
 {
     $wd = new wra_db();
     $this->id = WRA::getnewkey("" . WRA_CONF::$db_prefix . 'foursqvenues');
     $wd->query = 'INSERT INTO `' . WRA_CONF::$db_prefix . "foursqvenues` (\n `id`,\n `time`,\n `name`,\n `address`,\n `city`,\n `ttl`,\n `source`,\n `lat`,\n `lng`,\n `color_id`,\n `cat_id`,\n `picture`,\n `link`,\n `description`,\n `status`,\n\n `updated`,\n `resource`,\n `points`,\n `type_id`,\n `strokeweight`,\n `strokeopacity`,\n `strokecolor`,\n `symbolpath`,\n `fillcolor`,\n `fillopacity`,\n `twitpic`,\n `user_added`,\n `tts`,\n `status_id`\n )VALUES(\n '{$this->id}',\n '{$this->time}',\n '{$this->name}',\n '{$this->address}',\n '{$this->city}',\n '{$this->ttl}',\n '{$this->source}',\n '{$this->lat}',\n '{$this->lng}',\n '{$this->color_id}',\n '{$this->cat_id}',\n '{$this->picture}',\n '{$this->link}',\n '{$this->description}',\n '{$this->status}',\n '{$this->updated}',\n\n '{$this->resource}',\n '{$this->points}',\n '{$this->type_id}',\n '{$this->strokeweight}',\n '{$this->strokeopacity}',\n '{$this->strokecolor}',\n '{$this->symbolpath}',\n '{$this->fillcolor}',\n '{$this->fillopacity}',\n '{$this->twitpic}',\n '{$this->user_added}',\n '{$this->tts}',\n '{$this->status_id}'\n )";
     foreach (WRA_CONF::$clones as $k => $v) {
         $url = 'URL';
         $data = array('query' => $wd->query, 'code' => WRA_CONF::$updatecode);
         $options = array('http' => array('header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data)));
         $url = $v . 'sinc';
         $context = stream_context_create($options);
         $result = file_get_contents($url, false, $context);
         // wra_works::add('sincresult', '', $result);
     }
     $wd->execute();
     if (!WRA_CONF::$usegetkey) {
         $this->id = $wd->getlastkey();
     }
     $wd->close();
     unset($wd);
 }
Exemple #6
0
 function add()
 {
     //добавление нового объекта
     $reg_date = time();
     $wd = new wra_db();
     $this->id = WRA::getnewkey("" . WRA_CONF::$db_prefix . 'twu');
     $wd->query = 'INSERT INTO `' . WRA_CONF::$db_prefix . "twu` (\n             `id`,\n             `userid`,\n             `twuserid`,\n             `display_name`,\n             `regdate`,\n             `username`,\n             `usersurname`,\n             `link`,\n             `gender`,\n             `photo`,\n             `points`,\n             `access_token`,\n             `email`,\n             `phone`,\n             `adres`,\n             `reg_date`\n             )VALUES(\n             '{$this->id}',\n             '{$this->userid}',\n             '{$this->twuserid}',\n             '{$this->display_name}',\n             '{$this->regdate}',\n             '{$this->username}',\n             '{$this->usersurname}',\n             '{$this->link}',\n             '{$this->gender}',\n             '{$this->photo}',\n             '{$this->points}',\n             '{$this->access_token}',\n             '{$this->email}',\n             '{$this->phone}',\n             '{$this->adres}',\n             '{$reg_date}'\n             )";
     $wd->execute();
     if (!WRA_CONF::$usegetkey) {
         $this->id = $wd->getlastkey();
     }
     $wd->close();
     unset($wd);
 }
Exemple #7
0
 function add()
 {
     $wd = new wra_db($wf);
     if (!isset($this->id)) {
         $this->id = WRA::getnewkey('' . WRA_CONF::$db_prefix . 'users');
     }
     $this->lasttime = WRA::getcurtime();
     $wd->query = 'INSERT INTO  `' . WRA_CONF::$db_prefix . "users` (  `id` ,  `login` ,  `email` ,  `password` ,  `active` ,  `displayname` ,  `namei` ,  `namef` ,  `nameo` ,  `cellphone` ,  `cityid` ,  `lasttime` ,  `dolg` ,  `icq` ,  `twitter` ,  `web`,`adresid`,`groupid`,`avatar`,`adres`\n\t\t\t\t,`tmbavatar`,`issotr`,`company`,`bday`,`description`,`gender`,`interests`,`infor`,`fromwhere`,`signin` ) \n\t\tVALUES (\n\t\t\t\t'{$this->id}' ,  '{$this->email}' ,  '{$this->email}' ,  '{$this->password}' ,  '{$this->active}' ,  '{$this->displayname}' ,  '{$this->namei}' ,  '{$this->namef}' ,  '{$this->nameo}' ,  '{$this->cellphone}' ,  '{$this->cityid}' ,  '{$this->lasttime}' ,  '{$this->dolg}' ,  '{$this->icq}' ,  '{$this->twitter}' ,  '{$this->web}' ,'{$this->adresid}','{$this->groupid}','{$this->avatar}','{$this->adres}'\n\t\t\t\t,'{$this->tmbavatar}','{$this->issotr}','{$this->company}','{$this->bday}','{$this->description}','{$this->gender}','{$this->interests}','{$this->infor}','{$this->fromwhere}','{$this->signin}'\n\t\t);";
     $wd->execute();
     if (!WRA_CONF::$usegetkey) {
         $this->id = $wd->getlastkey();
     }
     $wd->close();
     unset($wd);
 }
Exemple #8
0
 function add()
 {
     $wd = new wra_db();
     $this->id = WRA::getnewkey("" . WRA_CONF::$db_prefix . 'langed');
     $wd->query = "INSERT INTO `" . WRA_CONF::$db_prefix . "langed` (\n\t\t\t\t`id`,\n\t\t\t\t`table`,\n\t\t\t\t`field`,\n\t\t\t\t`lang`,\n\t\t\t\t`value`,`rowid`,`key`\n\t\t\t\t)VALUES(\n\t\t\t\t'{$this->id}',\n\t\t\t\t'{$this->table}',\n\t\t\t\t'{$this->field}',\n\t\t\t\t'{$this->lang}',\n\t\t\t\t'{$this->value}',\n\t\t\t\t'{$this->rowid}',\n\t\t\t\t'{$this->key}'\n\t\t\t\t)";
     $wd->execute();
     $this->id = $wd->getlastkey();
     $wd->close();
     unset($wd);
 }
Exemple #9
0
 function add()
 {
     //добавление нового объекта
     if (!isset($this->creator_id)) {
         $this->creator_id = wra_userscontext::curuser();
     }
     $wd = new wra_db();
     $this->id = WRA::getnewkey("" . WRA_CONF::$db_prefix . 'virtualpage');
     $wd->query = "INSERT INTO `" . WRA_CONF::$db_prefix . "virtualpage` (\n `id`,\n `header`,\n `content`,\n `link`,\n `menuid`,\n `infoid`\n )VALUES(\n '{$this->id}',\n '{$this->header}',\n '{$this->content}',\n '{$this->link}',\n '{$this->menuid}',\n '{$this->infoid}'\n )";
     $wd->execute();
     if (!WRA_CONF::$usegetkey) {
         $this->id = $wd->getlastkey();
     }
     $wd->close();
     unset($wd);
     $this->currentobjid = wra_objects::addnewobject("wra_virtualpage", $this->id, $this->objectadres);
 }
Exemple #10
0
 function add()
 {
     $wd = new wra_db();
     $this->id = WRA::getnewkey("" . WRA_CONF::$db_prefix . 'liqpay');
     $wd->query = 'INSERT INTO `' . WRA_CONF::$db_prefix . "liqpay` (\n `id`,\n `version`,\n `merchant_id`,\n `result_url`,\n `server_url`,\n `order_id`,\n `amount`,\n `currency`,\n `description`,\n `default_phone`,\n `pay_way`,\n `goods_id`,\n `dateadd`,\n `ipadd`,\n `cartid`,\n `statusid`,\n `exp_time`,\n `pays_count`,\n `status`,\n `code`,\n `transaction_id`,\n `pay_way_paid`,\n `pays_count_return`,\n `returndate`\n )VALUES(\n '{$this->id}',\n '{$this->version}',\n '{$this->merchant_id}',\n '{$this->result_url}',\n '{$this->server_url}',\n '{$this->order_id}',\n '{$this->amount}',\n '{$this->currency}',\n '{$this->description}',\n '{$this->default_phone}',\n '{$this->pay_way}',\n '{$this->goods_id}',\n '{$this->dateadd}',\n '{$this->ipadd}',\n '{$this->cartid}',\n '{$this->statusid}',\n '{$this->exp_time}',\n '{$this->pays_count}',\n '{$this->status}',\n '{$this->code}',\n '{$this->transaction_id}',\n '{$this->pay_way_paid}',\n '{$this->pays_count_return}',\n '{$this->returndate}'\n )";
     $wd->execute();
     if (!WRA_CONF::$usegetkey) {
         $this->id = $wd->getlastkey();
     }
     $wd->close();
     unset($wd);
 }
Exemple #11
0
 function add()
 {
     //добавление нового объекта
     if (!isset($this->creator_id)) {
         $this->creator_id = wra_userscontext::curuser();
     }
     $reg_date = time();
     $wd = new wra_db();
     $this->id = WRA::getnewkey("" . WRA_CONF::$db_prefix . 'fbu');
     $wd->query = 'INSERT INTO `' . WRA_CONF::$db_prefix . "fbu` (\n             `id`,\n             `userid`,\n             `fbuserid`,\n             `display_name`,\n             `regdate`,\n             `username`,\n             `usersurname`,\n             `link`,\n             `gender`,\n             `photo`,\n             `points`,\n             `access_token`,\n             `email`,\n             `phone`,\n             `adres`,\n             `reg_date`\n             )VALUES(\n             '{$this->id}',\n             '{$this->userid}',\n             '{$this->fbuserid}',\n             '{$this->display_name}',\n             '{$this->regdate}',\n             '{$this->username}',\n             '{$this->usersurname}',\n             '{$this->link}',\n             '{$this->gender}',\n             '{$this->photo}',\n             '{$this->points}',\n             '{$this->access_token}',\n             '{$this->email}',\n             '{$this->phone}',\n             '{$this->adres}',\n             '{$reg_date}'\n             )";
     $wd->execute();
     if (!WRA_CONF::$usegetkey) {
         $this->id = $wd->getlastkey();
     }
     $wd->close();
     // $this->currentobjid = wra_objects::addnewobject('wra_fbu', $this->id, $this->objectadres);
     unset($wd);
 }