query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Update Individual Id Sku Hierarchy table Data //
public function updateTbldSkuHierarchyById ( $hierarchy_id, $data ) { $this->db->where( 'id', $hierarchy_id ); return $this->db->update( 'tbld_sku_hierarchy', $data ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateItemSubCategory()\n {\n }", "private function changesku(){\t \r\n\t $this->chartValue(); //adding to output\r\n\t $this->idleStHealthChk(); //adding to output\r\n\t}", "function update_tbllevel($level_id,$params)\n {\n $this->db->where('level_id',$level_id);\n return $this->db->update('tbllevel',$params);\n }", "function update($data){\n $this->deleteKritByUser($data['user_id']); //reset seluruh nilai kriteria berpasangan untuk pakar tertentu\n $this->getKriteria();\n /*foreach($this->getKriteria() as $kr){\n $this->kriteriaLabel[] = $kr->id_kriteria;\n }*/\n \n for($i=0;$i<count($data['kritEigen']);$i++){\n // update nilai eigen di table eigen_kriteria\n $this->db->set(array(\n 'value_eigen' => $data['kritEigen'][$i],\n $this->id => $this->kriteriaLabel[$i],\n 'id_user' => $data['user_id']\n )\n );\n $this->db->insert(\"eigen_kriteria\");\n \n // memasukkan nilai kriteria berpasangan ke pair_kriteria\n for($j=0;$j<count($data['kritMatriks']);$j++){\n $this->db->set(array(\n 'id_kriteria' => $this->kriteriaLabel[$i],\n 'id_kriteria_pair' => $this->kriteriaLabel[$j],\n 'id_user' => $data['user_id'], // pakai id_user\n 'value' => $data['kritMatriks'][$i][$j]\n ));\n $this->db->replace($this->pairwise);\n }\n } \n }", "public function actionUpdate($id)\n {\n $model = $this->loadModel($id);\n $Item = Item::model()->with('orderItems')->findAll(new CDbCriteria(array('condition' => \"order_id='$id'\")));\n foreach ($Item as $key1 => $items)\n foreach ($items->orderItems as $key2 => $orderItem) {\n $ItemSku[$key1][$key2] = Sku::model()->findByAttributes(array('item_id' => $orderItem->item_id, 'props_name' => $orderItem->props_name));\n }\n if (isset($_POST['Order']) && isset($_POST['Sku'])) {\n $transaction = $model->dbConnection->beginTransaction();\n try {\n\n $model->attributes = $_POST['Order'];\n $model->update_time = time();\n if ($model->save()) {\n $flag = array();\n $OrderItem = OrderItem::model()->findAllByAttributes(array('order_id' => $id));\n foreach ($OrderItem as $key => $original) {\n $criteria=new CDbCriteria();\n $criteria->addCondition('item_id=:item_id');\n// $criteria->addCondition('price=:price');\n $criteria->addCondition('props_name=:props_name');\n $criteria->params[':item_id']=$original->item_id;\n// $criteria->params[':price']=$original->price;\n $criteria->params[':props_name']=$original->props_name;\n $sku = Sku::model()->find($criteria);\n $sku->stock+=$original->area;\n $sku->save();\n foreach ($_POST['Sku']['sku_id'] as $skuId) {\n if ($sku->sku_id == $skuId) $flag[$key] = 1;\n }\n }\n foreach ($OrderItem as $key => $original) {\n if ($flag[$key] != 1)\n {\n $original->delete();\n }\n }\n\n foreach ($_POST['Sku']['item_id'] as $key => $itemId) {\n $item = Item::model()->findByPk($itemId);\n $sku = Sku::model()->findByPk($_POST['Sku']['sku_id'][$key]);\n if ($sku->stock < $_POST['Item-number'][$key]) {\n throw new Exception('Stock is not enough');\n }\n $criteria=new CDbCriteria();\n $criteria->addCondition('item_id=:item_id');\n $criteria->addCondition('price=:price');\n $criteria->addCondition('props_name=:props_name');\n $criteria->params[':item_id']=$sku->item_id;\n $criteria->params[':price']=$sku->price;\n $criteria->params[':props_name']=$sku->props_name;\n $orderItem=OrderItem::model()->find($criteria);\n if(!isset($orderItem)){\n $orderItem=new OrderItem;\n $orderItem->item_id = $itemId;\n $orderItem->title = $item->title;\n $orderItem->desc = $item->desc;\n $orderItem->pic = $item->getMainPic();\n }\n $orderItem->props_name = $sku->props_name;\n $orderItem->price = $sku->price;\n $orderItem->area = $_POST['Item-number'][$key];\n $sku->stock -= $_POST['Item-number'][$key];\n if (!$sku->save()) {\n throw new Exception('Cut down stock fail');\n }\n $orderItem->total_price = $orderItem->price * $orderItem->area;\n $orderItem->order_id = $model->order_id;\n if (!$orderItem->save()) {\n throw new Exception('save order item fail');\n }\n }\n } else {\n throw new Exception('save order fail');\n }\n $transaction->commit();\n $this->redirect(array('view', 'id' => $model->order_id));\n } catch (Exception $e) {\n $transaction->rollBack();\n }\n }\n $this->render('update', array(\n 'model' => $model, 'Item' => $Item, 'ItemSku' => $ItemSku\n ));\n }", "public function updateNode($id, $data){\n $dataline = '';\n $partupdate = false;\n\n $dataline .= '`just_created` = 0, ';\n\n for($i=0, $l=count($data); $i<$l; $i++){\n foreach($data[$i] as $key => $value){\n if($key == 'part'){\n $partupdate = true;\n $dataline .= \" `\".$key.\"` = '\".$this->checkPart($id, $value).\"',\";\n }elseif($key != 'id' && $key != 'pid'){\n $dataline .= \" `\".$key.\"` = '\".$value.\"',\";\n };\n };\n };\n\n $dataline = substr($dataline, 0, strlen($dataline)-1).' ';\n\n $query = \"\n UPDATE\n `structure_data`\n SET\n \".$dataline.\"\n WHERE\n `id` = \".$id.\"\n \";\n mysql_query($query);\n\n\n if($partupdate){\n $this->setPath($id);\n $this->setPathR($id);\n };\n }", "public function testUpdateUnitRelationshipSource()\n {\n }", "function update_shipto($shipto_id,$params){\n $this->company_db->update('tbl_shipto', $params,array(\"id\"=>$shipto_id)); \n }", "public function updateMenLevelById($m_id) {\r\t\t$a_point = $this->user_model->getMemById($m_id)->aggregate_point;\r\t\t\r\t\tif ( 0 <= $a_point && $a_point <= 100)\r\t\t\t$level = 1;\r\t\telse if ( 100 < $a_point && $a_point <= 1000)\r\t\t\t$level = 2;\r\t\telse if ( 1000 < $a_point && $a_point <= 5000)\r\t\t\t$level = 3;\r\t\telse if ( 5000 < $a_point && $a_point <= 10000)\r\t\t\t$level = 4;\r\t\telse \r\t\t\t$level = 5;\r\t\t\t\r\t\t$this->db->where('m_id', $m_id);\r\t\t$this->db->update('member', array('level'=>$level));\r\t}", "function update() {\n\t\n\t \t$sql = \"UPDATE evs_database.evs_group \n\t \t\t\tSET\tgru_id=?, gru_name=?, gru_head_dept=? \n\t \t\t\tWHERE gru_id=?\";\n\t\t\n\t\t$this->db->query($sql, array($this->gru_id_new, $this->gru_name, $this->gru_head_dept, $this->gru_id_old));\n\t\t \n\t }", "public function update()\n {\n $idSubmenu = $this->input->post('id_submenu');\n $data = [\n 'menu_id' => $this->input->post('menu_id'),\n 'name' => $this->input->post('name'),\n 'url' => $this->input->post('url'),\n 'icon' => $this->input->post('icon'),\n 'is_active' => $this->input->post('is_active'),\n ];\n // validation\n if ($data['name'] == null || $data['url'] == null || $data['icon'] == null) {\n echo json_encode(['message' => 'Please fill some data']);\n } else {\n echo json_encode($this->db->update('user_submenu', $data, ['id_submenu' => $idSubmenu]));\n }\n }", "public function ubah_subjudul_detail($data, $where)\n {\n \t$this->db->where($where);\n \t$this->db->update('sub_detail_pros', $data);\n }", "public function update($id, $obj, $projectid) {\n\t\t\t$lid = $obj[\"usecaseid\"];\n\t\t\t$nid = \"\";\n\t\t\tif($id == $obj[\"parent\"])\n\t\t\t\t$obj[\"parent\"] = 'NULL';\n\t\t\tif($obj['parent'] == '')\n\t\t\t\t$obj[\"parent\"] = 'NULL';\n\t\t\tif($obj[\"parent\"] != $this->getParent($id))\n\t\t\t\tif($obj['parent'] == 'NULL')\n\t\t\t\t\t$nid = $this->getIdWithoutParent($projectid);\n\t\t\t\telse\n\t\t\t\t\t$nid = $this->getIdWithParent($obj['parent'], $projectid);\n\t\t\telse\n\t\t\t\t$nid = $lid;\n\t\t\t$this->query(\"UPDATE usecase SET usecaseid = '{$nid}', name = '{$obj['name']}', description = '{$obj['description']}', precondition = '{$obj['precondition']}', postcondition = '{$obj['postcondition']}', mainscenario = '{$obj['mainscenario']}', alternativescenario = '{$obj['alternativescenario']}', parent = {$obj['parent']} WHERE id = {$id};\");\n\t\t\t$this->resultSet();\n\t\t\t$this->query(\"DELETE FROM usecaseinclusions WHERE usecaseid = {$id};\");\n\t\t\t$this->resultSet();\n\t\t\tforeach($obj['inclusion'] as $includedusecaseid) {\n\t\t\t\t$this->query(\"INSERT INTO usecaseinclusions VALUES ({$id}, {$includedusecaseid})\");\n\t\t\t\t$this->resultSet();\n\t\t\t}\n\t\t\t$this->query(\"DELETE FROM usecaseextensions WHERE usecaseid = {$id};\");\n\t\t\t$this->resultSet();\n\t\t\tforeach($obj['extension'] as $extendedusecaseid) {\n\t\t\t\t$this->query(\"INSERT INTO usecaseextensions VALUES ({$id}, {$extendedusecaseid})\");\n\t\t\t\t$this->resultSet();\n\t\t\t}\n\t\t\t$this->query(\"DELETE FROM usecasegeneralizations WHERE usecaseid = {$id};\");\n\t\t\t$this->resultSet();\n\t\t\tforeach($obj['generalization'] as $usecasegeneralizationsid) {\n\t\t\t\t$this->query(\"INSERT INTO usecasegeneralizations VALUES ({$id}, {$usecasegeneralizationsid})\");\n\t\t\t\t$this->resultSet();\n\t\t\t}\n\t\t\t$this->query(\"DELETE FROM usecaseactors WHERE usecaseid = {$id};\");\n\t\t\t$this->resultSet();\n\t\t\tforeach($obj['actor'] as $actorid) {\n\t\t\t\t$this->query(\"INSERT INTO usecaseactors VALUES ({$id}, {$actorid})\");\n\t\t\t\t$this->resultSet();\n\t\t\t}\n\t\t\t$this->fix($id, $lid, $nid);\n\t\t}", "public function update_siswa($data) {\n $penggunaID = $this->session->userdata['id'];\n $this->db->where('penggunaID', $penggunaID);\n $this->db->update('tb_siswa', $data);\n \n }", "function update_student_id1($id,$data){\n\t$this->db->where('student_id', $id);\n\t$this->db->update('students', $data);\n\t}", "public function update($id, $nama_produk,$kategori_produk,$jumlah_produk,$harga_produk,$deskripsi,$sub_total)\n {//UPDATE `biodata` SET `nama`=[value-2],`jenis_kelamin`=[value-3],`tgl_lahir`=[value-4],`umur`=[value-5],`agama`=[value-6],`alamat`=[value-7] WHERE `id`=[value-1]\n mysqli_query($this->koneksi,\"update ulangan set nama_produk='$nama_produk',kategori_produk='$kategori_produk', jumlah_produk='$jumlah_produk' ,harga_produk='$harga_produk', deskripsi='$deskripsi',sub_total='$sub_total' where id='$id'\");\n }", "function set_userGroup($data, $oldId){\n $data_user = array();\n $data_group = array();\n $data_user['id'] = $data['id'];\n $data_user['username'] = $data['username'];\n $data_user['password'] = $data['password'];\n $data_user['email'] = $data['email'];\n\n $group = $data['group'];\n $data['group'] = selectRecord(TAB_GROUPS, \"role = '$group'\")['id'];\n $data_group['userId'] = $data['id'];\n $data_group['groupId'] = $data['group'];\n\n updateRecord(TAB_USR_ROLE, $data_group, \"userId = $oldId\");\n updateRecord(TAB_USERS, $data_user, \"id = $oldId\");\n $data_info = array();\n if($data['group'] == 1){\n $data_info = array();\n $data_info['employment'] = \"-\";\n $data_info['img_address'] = \"upload/user/user-default.png\";\n $data_info['user'] = $data['id'];\n insertRecord(TAB_PERSONALINFO, $data_info);\n }\n}", "function updateData($data,$id)\n\t{\n\t\tdbIdReport('update','update Benefit',json_encode($data), 100);\n\t\t$this->db->where('ben_id', $id);\n\t\t$this->db->update($this->table, $data);\n\t\t$str = $this->db->last_query();\t\n\t\tlogConfig(\"update Benefit:$str\",'logDB');\n\t\t\n\t}", "public function m_update_supervisor_field($id){\n \n $sup->Companyname = $_POST['Companyname'];\n $sup->Position = $_POST['Position'];\n $sup->Departmentname = $_POST['Departmentname'];\n $sup->Emailpersonal = $_POST['Emailpersonal'];\n $sup->PhoneNumber = $_POST['PhoneNumber'];\n //update value to supervisor table with last id of users table \n $this->db->where('supervisor.UsersId', $id);\n if ($this->db->update('supervisor', $sup)) {\n return true;\n } else {\n return false;\n }\n }", "public function update($id)\n {\n $input = Input::all();\n if( !empty($input['level']) ){\n // Neu co nhap trinh do cua cac mon hoc\n $levelIds = $input['level'];\n $levelOlds = Common::getLevelOfUser($id);\n $levelAdds = array_diff($levelIds, $levelOlds); // Lay cac Id moi de them vao\n $levelDels = array_diff($levelOlds, $levelIds); // Lay cac Id se xoa\n foreach ($levelDels as $key => $levelId) {\n UserCenterLevel::where('user_id', $id)->where('level_id', $levelId)->delete();\n }\n foreach ($levelAdds as $key => $levelId) {\n // Them moi level\n $userCenterLevel = CenterLevel::where('level_id', $levelId)\n ->where('center_id', $input['center_id'])\n ->first();\n if ($userCenterLevel != null) {\n $userCenterLevelId = $userCenterLevel->id;\n UserCenterLevel::create([\n 'user_id' => $id,\n 'center_level_id' => $userCenterLevelId,\n 'level_id' => $levelId\n ]);\n }\n }\n\n } else{\n // Neu khong nhap gi thi xoa het trong bang center_user_level\n $userCenterLevel = UserCenterLevel::where('user_id', $id)->delete();\n // if( $userCenterLevel ){\n // $userCenterLevel->delete();\n // }\n }\n CommonNormal::update($id, $input);\n return Redirect::action('ManagerUserController@index')->withMessage('Lưu thông tin thành viên thành công!');\n }", "public function updateUserSubModulo($data,$id_modulo,$userUID,$ID_PERFIL){\n\t\t$sql =\"DELETE FROM user_menu_modulos where `id_modulo` = '\".$id_modulo.\"' and `id_user` ='\".$userUID.\"'\";\n\t\t$query = $this->db->query($sql);\n\n\t\tif(count($data)>0){\n\t\t\tif($query){\n\t\t\t\t//Carafar los modulo nuevos\n\t\t\t\t$i =0;\n\t\t\t\tforeach ($data as $key => $value) {\n\n\t\t\t\t\t$new[\"id_sud_modulo\"] = $key;\n\t\t\t\t\t$new[\"id_user\"] = $userUID;\n\t\t\t\t\t$new[\"id_modulo\"] = $id_modulo;\n\t\t\t\t\t$new[\"fecha\"] = date(\"Y-m-d H:i:s\");\n\t\t\t\t\t$new[\"estado\"] = 1;\n\t\t\t\t\t$new[\"id_perfil\"] = $ID_PERFIL;\n\t\t\t\t\t\n\t\t\t\t\t$this->db->insert('user_menu_modulos',$new); \n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function update() {\n\t\t$sql = \"UPDATE umgroup \n\t\t\t\tSET\tGpNameT=?, GpNameE=?, GpDesc=?, GpStID=? \n\t\t\t\tWHERE GpID=?\";\t\n\t\t\n\t\t \n\t\t$this->ums->query($sql, array($this->GpNameT, $this->GpNameE, $this->GpDesc, $this->GpStID, $this->GpID));\n\n\t}", "function updateProduct() \n{\n global $products;\n echo \"<table border='1' cellspacing = '0px' cellpadding \n = '10px'><thead><tr>\n <th>Category</th>th>Subcategory</th>\n <th>ID</th><th>Name</th><th>Brand</th></tr></thead><tbody>\";\n foreach ($products as $category=>$value) {\n foreach ($value as $subcategory=>$x) {\n foreach ($x as $product=>$y) {\n if ($y['id'] == 'PR002') {\n $y['name'] = \"BIG-555\";\n echo \"<tr><td>\".$category.\"</td>\";\n echo \"<td>\".$subcategory.\"</td>\";\n echo \"<td>\".$y['id'].\"</td>\";\n echo \"<td>\".$y['name'].\"</td>\";\n echo \"<td>\".$y['brand'].\"</td></tr>\";\n } else {\n echo \"<tr><td>\".$category.\"</td>\";\n echo \"<td>\".$subcategory.\"</td>\";\n echo \"<td>\".$y['id'].\"</td>\";\n echo \"<td>\".$y['name'].\"</td>\";\n echo \"<td>\".$y['brand'].\"</td></tr>\";\n }\n }\n }\n }\n echo \"</tbody></table>\";\n}", "public function element_update($id, $data, $inherit = false) {\n if (!isset($id)) {\n $this->error = \"ERR_MISSING_PARAMS\";\n return false;\n }\n\n global $db;\n $original_data = $this->element_read($id);\n $datanew = array_merge($original_data, $data);\n $datanew[\"ID_KAT\"] = $id;\n $datanew[\"FK_INFOSEITE\"] = ($data[\"FK_INFOSEITE\"] > 0 ? (int)$data[\"FK_INFOSEITE\"] : null);\n if ($data[\"KATHEAD\"] != \"DOONE\") {\n \t$query = \"UPDATE `kat` SET FK_INFOSEITE=\".($datanew[\"FK_INFOSEITE\"] == null ? \"NULL\" : $datanew[\"FK_INFOSEITE\"]).\"\\n\".\n \t\t\t\"WHERE LFT BETWEEN \".(int)$original_data[\"LFT\"].\" AND \".(int)$original_data[\"RGT\"].\"\\n\".\n \t\t\t\"\tAND ROOT=\".(int)$original_data[\"ROOT\"];\n \tif ($data[\"KATHEAD\"] == \"DOFILL\") {\n \t\t$query .= \" AND FK_INFOSEITE IS NULL\";\n \t}\n \t$db->querynow($query);\n }\n if ($data[\"KATART_RECURSIVE\"]) {\n $query = \"UPDATE `kat` SET LU_KATART=\".(int)$datanew[\"LU_KATART\"].\"\\n\".\n \"WHERE LFT BETWEEN \".(int)$original_data[\"LFT\"].\" AND \".(int)$original_data[\"RGT\"].\"\\n\".\n \"\tAND ROOT=\".(int)$original_data[\"ROOT\"];\n $db->querynow($query);\n }\n if ($this->updateid = $db->update($this->table, $datanew)) {\n unset($this->cache_nodes[$this->updateid]);\n if (!$inherit && isset($data[\"KAT_TABLE\"]) &&\n ($original_data[\"KAT_TABLE\"] != $data[\"KAT_TABLE\"])) {\n // Tabelle wurde geändert und soll nicht auf Kind-Elemente übertragen werden, zwingen!\n $datanew = array();\n $datanew[\"KAT_TABLE\"] = $data[\"KAT_TABLE\"];\n $data = $datanew;\n $inherit = true;\n }\n if ($inherit) {\n unset($data[\"ID_KAT\"]);\n unset($data[\"PARENT\"]);\n unset($data[\"V1\"]);\n unset($data[\"V2\"]);\n unset($data[\"ICON\"]);\n unset($data[\"ICON_DEL\"]);\n unset($data[\"LU_KATART\"]);\n foreach($data as $key => $null) {\n if(strstr($key, 'FK_')) {\n unset($data[$key]);\n }\n }\n $childs = $db->fetch_table(\"SELECT ID_KAT FROM `\".$this->table.\"` WHERE ROOT=\".$this->root.\" AND PARENT=\".$id);\n for ($i = 0; $i < count($childs); $i++) {\n if (!$this->element_update($childs[$i][\"ID_KAT\"], $data, true)) {\n $this->error = \"ERR_UPDATE_FAILED\";\n return false;\n }\n }\n }\n return true;\n } else {\n $this->error = \"ERR_UPDATE_FAILED\";\n return false;\n }\n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "public function update(Request $request, $id)\n {\n \n $data = array();\n $data['subcategory_name'] = $request->subcategory_name;\n $data['category_id'] = $request->category_id;\n DB::table('subcategories')->where('id',$id)->update($data);\n }", "public function actionChildUpdate() {\n $code = $_GET['code'];\n $provinceCode = $_GET['provinceCode'];\n $cityCode = $_GET['cityCode'];\n $ppkCode = $_GET['ppkCode'];\n $models = PackageAccount::model()->findAllByAttributes(array('package_code' => \"$code\"));\n if ($models) {\n foreach ($models as $model) {\n $model->province_code = $provinceCode;\n $model->city_code = $cityCode;\n $model->ppk_code = $ppkCode;\n $model->update();\n }\n }\n }", "public function testUpdateSuperfund()\n {\n }", "function updateUser($data, $id){\n\t$where = ['id' => $id];\n\treturn dbUpdate('categories', $data, $where);\n}", "public function updateSchoolWithDetails(array $data, $id);", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n $parent_category = [];\n $get_categorys = [];\n $get_category = Category::getCateory($model->parent_category);\n \n if(!empty($get_category)){ // cek jika parent nya adalah level pertama sperti kategori produk , kategori berita\n $get_categorys = Category::getCategories($get_category->parent_category);\n if(!empty($get_categorys)){\n $model->sub_category = $model->parent_category;\n }\n\n if(!empty($get_category) && ($get_category->parent_category !== 0 && $get_category->parent_category !== '')){\n $parent_category = Category::getParentCategorys($get_category->id);\n $model->parent_category = $get_category->parent_category;\n }else{\n $parent_category = Category::getParentCategorys($model->id);\n// echo '<pre>';print_r($parent_category);die;\n }\n }else{\n $parent_category = Category::getParentCategorys($model->parent_category);\n }\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n \n } else {\n return $this->render('update', [\n 'model' => $model,\n 'parent_category' => $parent_category,\n 'sub_categorys' => $get_categorys\n ]);\n }\n }", "public function update(Request $request, $id)\n {\n //\n $data = $request->all();\n $validator = \\Validator::make($data, [\n 'name' => 'required|max:255',\n 'sku_top_id' => 'required|min:1|exists:goods_skus,id,pid,0',\n 'banner' => 'required|exists:images,id',\n 'details' => 'required'\n ]);\n if ($validator->fails()) {\n return $this->jsonFailResponse($validator->errors()->first());\n }\n $skuIds = [];\n foreach (array_pluck($data['details'], 'sku_id_str') as $skuIdStr) {\n $skuIds[] = explode(',', $skuIdStr);\n }\n $sku_type_id_arr = GoodsSku::whereIn('id', array_collapse($skuIds))->get()->pluck('pid')->unique()->toArray();\n if (count($sku_type_id_arr) < 1) {\n return $this->jsonFailResponse('至少一种sku类型');\n }\n $data['sku_type_ids'] = implode(',', $sku_type_id_arr);\n try {\n \\DB::transaction(function () use ($id, $data) {\n// $goods = new Goods();\n $goods = Goods::findOrFail($id);\n $goods = $goods->fill($data)->save();\n foreach ($data['details'] as $detail) {\n //判断是否存在id\n if ($detail['id']) {\n $goodsDetail = GoodsDetail::findOrFail($detail['id']);\n $goodsDetail->fill($detail)->save();\n } else {\n $goodsDetail = $goods->details()->create($detail);\n $temp = [];\n foreach (explode(',', $detail['sku_id_str']) as $sku_id) {\n $temp[] = ['sku_id' => $sku_id];\n }\n $goodsDetail->skus()->createMany($temp);\n }\n }\n });\n } catch (\\Exception $e) {\n return $this->jsonFailResponse('插入数据库失败');\n }\n return $this->jsonSuccessResponse();\n }", "public function update(Request $request, $id)\n {\n $wikiCat = WikiCategory::find($id);\n \n //fetch all records\n $oldCategoryEntries = WikiCategoryUser::where('wiki_category_id',$id)->pluck('user_id')->toArray();\n $allRoles = false;\n foreach($request->all() as $k => $r){\n if (strpos($k, 'role_id') !== false ){\n if($r == 'Alle')\n $allRoles = true;\n }\n }\n \n if( !$request->has('top_category') )\n RequestMerge::merge(['top_category' => 0] );\n \n $wikiCat->fill($request->all());\n $wikiCat->save();\n $wkuArray = array();\n $rolesArray = array();\n if( $request->has('user_id') ){\n WikiCategoryUser::where('wiki_category_id',$id)->delete();\n // dd('brejk');\n foreach($request->get('user_id') as $uid){\n $wku= WikiCategoryUser::where('user_id',$uid)->where('wiki_category_id',$id)->first();\n if( $wku == null ){\n $nWku = new WikiCategoryUser();\n $nWku->user_id = $uid;\n $nWku->wiki_category_id = $id;\n $nWku->save();\n }\n $wkuArray[] = $uid;\n }\n }\n else\n $allWikiUsers = WikiCategoryUser::where('wiki_category_id',$id)->delete(); \n //finish tihs part\n \n if( $request->has('role_id') ){\n \n if( in_array('Alle',$request->get('role_id') ) ){\n $wikiCat->all_roles = 1;\n $wikiCat->save();\n WikiRole::where('wiki_category_id',$id)->delete(); \n //$wikiRoles =WikiRole::where('wiki_category_id',$id)->pluck('role_id')->toArray();\n /*$roles= Role::where('wiki_role',1)->get();\n foreach($roles as $r){\n if( !in_array($r->id,$wikiRoles) ){\n $wr = new WikiRole();\n $wr->role_id = $r->id;\n $wr->wiki_category_id = $id;\n $wr->save();\n }\n \n }*/\n }\n else{\n $wikiCat->all_roles = 0;\n $wikiCat->save();\n \n WikiRole::where('wiki_category_id',$id)->delete(); \n foreach($request->get('role_id') as $gid){\n $wikiRole= WikiRole::where('role_id',$gid)->where('wiki_category_id',$id)->first();\n if( $wikiRole == null ){\n $wikiRole = new WikiRole();\n $wikiRole->role_id = $gid;\n $wikiRole->wiki_category_id = $id;\n $wikiRole->save();\n }\n $wkuArray[] = $gid;\n }\n }\n }\n else\n WikiRole::where('wiki_category_id',$id)->delete(); \n \n session()->flash('message',trans('wiki.wikiCategoryCreateSuccess'));\n return redirect()->back();\n }", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "function update_division($storeid, $data)\r\n {\r\n\t\t$this->db->where('storeid', $storeid);\r\n\t\t$result=$this->db->update('division', $data);\r\n\t\treturn $result;\r\n\t}", "function actualizar_repuestos_submantencion($id,$data){\n\t\t$this->db->where('mantenciones_subdetalles.id',$id);\n\t\t$this->db->update('mantenciones_subdetalles',$data);\n\t\treturn $this->db->insert_id();\n\t}", "function update() {\n\t\n\t \t$sql = \"UPDATE evs_database.evs_identification \n\t \t\t\tSET\tidf_identification_detail_en=?, idf_identification_detail_th=?, idf_pos_id=?, idf_ctg_id=? \n\t \t\t\tWHERE idf_id=?\";\n\t\t\n\t\t$this->db->query($sql, array($this->idf_identification_detail_en, $this->idf_identification_detail_th, $this->idf_pos_id, $this->idf_ctg_id, $this->idf_id));\n\t\t\n\t }", "public function updateRecord() {\r\n\t\tif (isset($_POST['level']) && $_POST['level']=='header') $this->updateHeader();\r\n\t\tif (isset($_POST['level']) && $_POST['level']=='detail') $this->updateDetail();\r\n\t}", "function editSubUnderCategory()\n\t{\n\n\t\t$id=$_GET['prodid'];\n\n\t\tif(((int)$id)>0)\n\t\t{\n\t\t\t $sql='select * from products_table where product_id='.$id;\n\t\t\t\n\t\t\t$obj=new Bin_Query();\n\t\t\t\n\t\t\t$obj->executeQuery($sql);\n\t\t\t\n\t\t\t$sqlid=\"SELECT * FROM category_table where sub_category_parent_id='\".$obj->records[0]['sub_category_id'].\"' AND category_parent_id ='\".$obj->records[0]['category_id'].\"'\"; \n\t\t\t\n\t\t\t$query=new Bin_Query();\n\t\t\t\n\t\t\t$query->executeQuery($sqlid);\n\t\t\t\n\t\t\treturn Display_DManageProducts::displaySubUnderCategory($query->records,$obj->records[0]['sub_under_category_id']);\n\t\t\t\n\t }\n\n\n\t}", "public function update($data)\n {\n\n// $this->node->getF\n }", "public function up_status_siswa($id_pengguna){\n $this->db->where(\"id\",$id_pengguna);\n $this->db->set(\"status\",0);\n $this->db->update(\"tb_pengguna\");\n }", "public function updateUserProductByProId($array_product = array()){\n \t\t global $myuser, $admin_id, $arrayBranch, $array_unit, $class_import_export;\n if($this->check_id()){\n if(empty($array_product)) return array();\n $row_product = $this->checkProId();\n $des_logs = '';\n if(!empty($row_product)){\n $array_update = array(); // mảng tên trường và value khi update vào bảng user_products\n $array_datas = array(); // mảng tên trường và value khi update vào bảng datas\n $new_name = '';\n $unit_parent = 0;\n $unit = 0;\n $specifi = 0;\n $set_log_delete = '';\n $usp_sale_money = 0;\n $active = 1;\n $usp_wholesale = 0;\n foreach($array_product as $column => $value){\n $check_col = $this->CheckExitColumn(USER_PRODUCTS,$column); // check tên trường tồn tại trong bang user_product\n if(empty($check_col)) return array();\n if(strstr($check_col['Type'],'int') !== false){ // check kiểu dữ liệu của trường\n if(trim($check_col['Field']) != 'usp_active'){ // kiểm tra tên trường . nếu khác trường usp_active thì giá trị phải lớn hơn 0\n if((int)$value <= 0) return array();\n }\n }\n if(strstr($check_col['Type'],'varchar') !== false){ // check kiểu dữ liệu của trường\n if(trim($value) == '') return array();\n $value = $value;\n }\n $array_update[] = $column . \" = '\" . $value .\"'\";\n switch($column){\n case 'usp_pro_name':\n $array_datas[] = \"dat_name = '\" . $value . \"'\";\n $new_name = $value;\n $des_logs .= \"\\n Sửa tên thuốc từ: <b>\". $row_product['usp_pro_name'] .\"</b> sang <b>\". $value .\"</b>\";\n break;\n case 'usp_unit_import':\n $array_datas[] = \"dat_unit_import = \" . $value;\n $unit_parent = $value;\n $des_logs .= \"\\n Sửa đơn vị nhập từ: <b>\". $array_unit[$row_product['usp_unit_import']] .\"</b> sang <b>\". $array_unit[$value] .\"</b>\";\n break;\n case 'usp_unit':\n $array_datas[] = \"dat_unit = \" . $value;\n $unit = $value;\n $des_logs .= \"\\n Sửa đơn vị bán từ: <b>\". $array_unit[$row_product['usp_unit']] .\"</b> sang <b>\". $array_unit[$value] .\"</b>\";\n break;\n case 'usp_specifi':\n $array_datas[] = \"dat_specifi = \" . $value;\n $specifi = $value;\n $des_logs .= \"\\n Sửa đơn vị bán từ: <b>\". $row_product['usp_specifi'] .\"</b> sang <b>\". $value .\"</b>\";\n break;\n case 'usp_sale_money':\n $usp_sale_money = $value;\n $des_logs .= \"\\n Sửa tiền hoa hồng từ: <b>\". $row_product['usp_sale_money'] .\"</b> sang <b>\". $value .\"</b>\";\n break;\n case 'usp_wholesale':\n $usp_wholesale = $value;\n $des_logs .= \"\\n Cập nhật giá bán buôn: <b>\". $value .\"</b>\";\n break;\n case 'usp_active':\n if($value == 0){\n $active = 0;\n $set_log_delete = ',usp_last_delete = '. time();\n $des_logs .= \"\\n Chuyển sản phẩm sang ngừng bán\";\n }else{\n $set_log_delete = ',usp_last_delete = '. time();\n $des_logs .= \"\\n Khôi phục sản phẩm để bán\";\n }\n break;\n }\n }\n //gán thông tin sản phẩm vào chính người sửa luôn\n\t\t\t\t\t $array_update[] = \"usp_use_child_id = \" . $this->use_id;\n \n $str_col_val = implode(', ',$array_update);\n $sql_update = \"UPDATE \" . USER_PRODUCTS . \" SET \". $str_col_val . $set_log_delete . \"\n WHERE usp_id = \" . $this->id . \"\n AND usp_branch_id = \" . $this->branch_id . \"\n AND usp_use_parent_id = \" . $this->admim_id;\n //kiem tra xem co quyen edit khong\n if(isset($_SERVER) && ($_SERVER['REMOTE_ADDR'] == '14.177.216.14' || $_SERVER['SERVER_NAME'] == 'localhost')){\n file_put_contents('../logs/logsupdate.cfn', $sql_update);\n }\n $db_ex = new db_execute($sql_update);\n \n // ghi logs \n logsAddEditData($row_product['usp_dat_id'],$new_name,$row_product['usp_id'],$unit_parent,$unit,$admin_id,$myuser->u_id, $specifi);\n \n // ghi log hành động\n $data_action = array(\n 'file' => json_encode(debug_backtrace()),\n 'action' => 'edit',\n 'des' => $des_logs,\n 'pro_id' => $this->id\n );\n\n log_action($data_action);\n \n // nếu chưa active dùng chung thì update luôn vào bảng data tên và đơn vị tính\n $dat_id = $row_product['usp_dat_id']; \n if($row_product['usp_dat_active'] == 0 && !empty($array_datas)){\n $str_col_data = implode(', ',$array_datas);\n $db_update_datas = new db_execute(\"UPDATE datas SET \" . $str_col_data . \" WHERE dat_id = \" . $dat_id);\n unset($db_update_datas);\n }\n \n // kiểm tra để cập nhật cho tất cả các sản phẩm của các chi nhánh cùng người chủ này quản lý cũng thay đổi luôn\n /*\n if(count($arrayBranch) > 1){\n $db_update = new db_execute(\"UPDATE \" . USER_PRODUCTS . \" SET \" . $str_col_val . \"\n WHERE usp_use_parent_id = \" . $this->admim_id . \"\n AND usp_id <> \" . $this->id . \" AND usp_dat_id = \" . $dat_id);\n unset($db_update);\n }\n */\n \n // nếu khách hàng thay đổi đơn vị bán thì\n //- xóa lịch sử nhập kho\n //- reset số tồn kho = 0\n if(($row_product['usp_unit'] > 0 && $unit > 0 && $unit != $row_product['usp_unit']) || $active == 0){\n $this->delete_reset_stock(array('pro_id' => $this->id));\n }\n \n //nếu là khôi phục thì update lại thông tin giá nhập giá bán\n if($active == 1){\n $import_last = $class_import_export->import_get_last_stocks(array('pro_id' => $this->id, 'quantity' => 1));\n \n $pr_im = isset($import_last['uss_price_import'])? $import_last['uss_price_import'] : 0;\n $pr_ex = isset($import_last['uss_price_out'])? $import_last['uss_price_out'] : 0;\n \n $db_update = new db_execute(\"UPDATE \" . USER_PRODUCTS . \"\n SET usp_price_import = \" . doubleval($pr_im) . \", usp_price = \" . doubleval($pr_ex) . \"\n WHERE usp_id = \" . $this->id);\n unset($db_update);\n }\n \n return $this->checkProId();\n }\n }\n return array();\n }", "public function update(){\t\t\tif( is_null( $this->id ) ) trigger_error( \"User::update(): Attempt to update a user object that does not have its ID property set.\", E_USER_ERROR );\r\n\t\t\t\r\n\t\t\r\n\r\n\t\t\t//Update the object\r\n\t\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\t\t\r\n\t\t\t$sql = \"UPDATE \".TABLENAME_GROUPS.\" SET name=:name, caption=:caption, adminId=:adminId, per2Id=:per2Id, per3Id=:per3Id, icon_link=:icon_link, status=:status WHERE id = :id\";\r\n\t\t\t$st = $conn->prepare( $sql );\r\n\t\t\t$st->bindValue( \":name\", $this->name, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":caption\", $this->caption, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":adminId\", $this->adminId, PDO::PARAM_INT );\r\n\t\t\t$st->bindValue( \":per2Id\", $this->per2Id, PDO::PARAM_INT );\r\n\t\t\t$st->bindValue( \":per3Id\", $this->per3Id, PDO::PARAM_INT );\r\n\t\t\t$st->bindValue( \":icon_link\", $this->icon_link, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":status\", $this->status, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t\techo \"<br>\";\r\n\t\t\t$st->execute();\r\n\t\t//\tprint_r($st->errorInfo());\r\n\t\t\t$conn = null;\t\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}", "public function update()\n {\n\t$id = $this->input->post('id');\n\n $input = array(\n\t\t\t'name' => $nama = $this->input->post('level')\n\t\t);\n\n if ($this->level->where('idlevel', $id)->update($input)) {\n $this->session->set_flashdata('success', '<strong>Success</strong>, Data siswa berhasil diupdate.');\n } else {\n $this->session->set_flashdata('error', '<strong>Failed</strong>, Data siswa gagal diupdate.');\n }\n redirect('level');\n }", "public function upadateUraianById($idUraian, $data)\n {\n return $this->db->update('tb_dist_jwbuo', $data, ['id_uraian' => $idUraian]);\n }", "public function updateSimpleProduct($data=[],$attribute_set_id,$sku){\n\n $data['sku'] = $sku;\n foreach($data['additional_attributes']['single_data'] as $item){\n $data['custom_attributes'][] = [ \"attribute_code\" => $item['key'], \"value\" => $item['value'] ];\n }\n $data['custom_attributes'][] = [ \"attribute_code\" => \"description\", \"value\" => $data['description'] ];\n $data['custom_attributes'][] = [ \"attribute_code\" => \"short_description\", \"value\" => $data['short_description'] ];\n array_push( $data['custom_attributes'] , ['attribute_code' => 'category_ids', 'value' => $data['categories']] );\n unset( $data['additional_attributes'], $data['categories'], $data['websites'], $data['description'], $data['short_description'], $data['tax_class_id'] );\n $result = $this->curlRequest(\"/rest/V1/products\",1,json_encode($data));\n return $result;\n\n }", "function hapus3($kode_penjualan)\r\n\t{\r\n\t\t\r\n\t\t$data = mysql_query(\"select * from det_penjualan where kode_penjualan='$kode_penjualan'\");\r\n\t\t\r\n\t\twhile($d = mysql_fetch_array($data))\r\n\t\t{\r\n\t\t\t$jum=$d['Jumlah'];\r\n\t\t\techo $jum;\r\n\r\n\t\t\t$nama=$d['Nama_Item'];\r\n\t\t\tmysql_query(\"update item set Stok=Stok+$jum where Nama_Item='$nama'\");\r\n\t\t}\r\n\t\tmysql_query(\"delete from penjualan where kode_penjualan='$kode_penjualan'\");\r\n\t\tmysql_query(\"delete from det_penjualan where kode_penjualan='$kode_penjualan'\");\r\n\t\t//kurang trigger untuk menambah stok item jika detail penjualan di delete.\r\n\t}", "function summons_details_update($data,$id)\n\t{\n\t$this->db->where('id', $id);\n\t$this->db->update('summons_details', $data);\n\t}", "public function updateDetail(array $data, int $id): void\n {\n }", "public function assignHeadUnit($idU,$idS)\n {\n //DESHABILITAR al jefe actual de esta unidad, si es que lo tiene\n $spendingUnit = SpendingUnit::select('id')->where('id',$idS)->first();\n $useradmin_old = $spendingUnit->users()\n ->where(['role_id'=>1,'role_status'=>1,'spending_unit_status'=>1,'global_status'=>1])\n ->get();\n $valor = count($useradmin_old);\n if($valor==1){\n $useradmin_old_ru = $useradmin_old[0];\n $role_usero_id = $useradmin_old_ru->pivot->id;\n $role_user1 = DB::table('role_user')\n ->where('id',$role_usero_id)\n ->update(['spending_unit_status'=>0,'global_status'=>0,'updated_at' => now()]);\n }\n //HABILITAR al nuevo jefe de esta unidad\n $user_admin_no_unit = User::find($idU);\n //caso usuario con asignacion de rol jefe reciente \n $admin_new = $user_admin_no_unit->roles()\n ->where(['role_id'=>1,'role_status'=>1,'spending_unit_status'=>0,'global_status'=>1])\n ->get();\n $admin_new_valor = count($admin_new);\n if($admin_new_valor == 1){\n $admin_new_ru = $admin_new[0];\n $role_usern_id = $admin_new_ru->pivot->id;\n $role_user2 = DB::table('role_user')\n ->where('id',$role_usern_id)\n ->update(['spending_unit_id'=>$idS,'spending_unit_status'=>1,'updated_at' => now()]);\n }\n else{\n //caso usuario exjefe, quedo con rol pero sin unidad\n if($admin_new_valor==0){\n $user_admin_no_unit->roles()->attach(1,['spending_unit_id'=>$idS,'spending_unit_status'=>1]);\n }\n }\n return response()->json(['message'=> \"Asignacion de jefe exitosa\"], $this-> successStatus);\n //return response()->json(['message'=>true], 200);\n }", "private function setPath($id){\n $query = \"\n UPDATE\n `structure_data`\n SET\n `path` = '\".$this->getNodePath($id).\"'\n WHERE\n `id` = \".$id.\"\n \";\n mysql_query($query);\n }", "public function update_data($data,$id)\n {\n $this->db->where('id',$id);\n $this->db->update('user',$data);\n }", "function cognitivefactory_tree_up($cognitivefactoryid, $userid, $groupid, $id, $istree = 1) {\n global $CFG, $DB;\n\n $res = $DB->get_record('cognitivefactory_opdata', array('id' => $id));\n if (!$res) return;\n $operator = ($istree) ? 'hierarchize' : 'order' ;\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, false);\n $treeClause = ($istree) ? \" AND itemdest = {$res->itemdest} \" : '';\n\n if ($res->intvalue > 1) {\n $newordering = $res->intvalue - 1;\n\n $sql = \"\n SELECT \n id\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = '{$operator}' AND\n intvalue = {$newordering}\n {$treeClause}\n {$accessClause}\n \";\n // echo $sql;\n $result = $DB->get_record_sql($sql);\n $resid = $result->id;\n\n // swapping\n $opdata = new StdClass();\n $opdata->id = $resid;\n $opdata->intvalue = $res->intvalue;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n\n $opdata = new StdClass();\n $opdata->id = $id;\n $opdata->intvalue = $newordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n }\n}", "public function update()\n {\n echo uniqid('km-');\n // $data = $this->Users_model->get_all();\n // foreach ($data as $datas) {\n // $d['users_id'] = uniqid('km-');\n // $this->Users_model->update_users($datas->users_email, $d);\n // }\n }", "public function update_object ($obj)\n {\n parent::update_object ($obj);\n $this->access_id = $obj->parent_folder_id ();\n }", "public function update($data) { \n\n\t\tif ($data['name'] != $this->name) { \n\t\t\t$this->update_name($data['name']); \n\t\t} \n\t\tif ($data['pl_type'] != $this->type) { \n\t\t\t$this->update_type($data['pl_type']); \n\t\t} \n\n\t}", "public function update(Request $request, $id)\n {\n //\n // $optiontypegroup->update($request->all());\n $optiontype = Optiontypegroup::find($id); \n $optiontype->group_name = $request->group_name;\n $optiontype->site_id = $request->site_id;\n $optiontype->parent_id = $request->parent_id;\n \n $optiontype->save();\n return response(null,201);\n }", "function update($primary){\n $this->primary=$primary;\n //\n //create the update\n $update= new update($this, $primary);\n //\n //Execute the the insert\n $update->query($this->entity->get_parent());\n }", "public function testUpdateSupplierGroup()\n {\n }", "public function change()\n {\n $sellersTable = TableRegistry::get('Sellers');\n $sellerDataTable = TableRegistry::get('ProductSellerData');\n $sellers = $sellersTable->find()->toArray();\n foreach($sellers as $seller){\n\n $sellerData = $sellerDataTable->find()->where(['seller_id'=>$seller['id']])->order(['updated_on'=>'DESC'])->first();\n\n $query = $sellersTable->query();\n $query->update()\n ->set(['rating' => $sellerData->rating,'rating_count' => $sellerData->rating_count])\n ->where(['id' => $seller['id']])\n ->execute();\n }\n\n }", "function update_category_detail($siteData,$category_id)\n\t{\n\t\t$this->db->where('id', $category_id);\n\t\t$this->db->update('category', $siteData); \n\t\t\n\t}", "function update_aroundus_POI_details($data)\n {\n $this->db->where('rGeninfoId', $data['rGeninfoId']);\n return $this->db->update('r_app_aroundus_gen_info', $data);\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "function __update_statd($pmdid, $arr) {\n //return $this -> db -> update('pembayaran_detail_tab', $arr);\nreturn $this -> db-> query(\"update pembayaran_detail_tab set pstatus='3' where pmdid='$pmdid'\");\t\t\n\t\t\n\t}", "function update()\n {\n $this->dbInit();\n if ( isset( $this->ID ) )\n {\n query( \"UPDATE Grp set Name='$this->Name', Description='$this->Description',\n\t\tUserAdmin='$this->UserAdmin',\n \t\tUserGroupAdmin='$this->UserGroupAdmin',\n\t\tPersonTypeAdmin='$this->PersonTypeAdmin',\n\t\tCompanyTypeAdmin='$this->CompanyTypeAdmin',\n\t\tPhoneTypeAdmin='$this->PhoneTypeAdmin',\n\t\tAddressTypeAdmin='$this->AddressTypeAdmin' WHERE ID='$this->ID'\" );\n }\n }", "function update() {\n\t\t$sql = \"UPDATE \".$this->hr_db.\".hr_amphur\n\t\t\t\tSET\tamph_name=?, amph_name_en=?, amph_pv_id=?\n\t\t\t\tWHERE amph_id=?\";\n\t\t$this->hr->query($sql, array($this->amph_name, $this->amph_name_en, $this->amph_pv_id, $this->amph_id));\n\t}", "public function update(Group $root);", "public function update(Request $request, $id)\n {\n if ($request['relation'] > 0){\n $s = Submenu::find($request['relation']);\n $level = $s->level + 1;\n }\n else {\n $level = 1;\n }\n\n $submenu = Submenu::find($id);\n\n $submenu->update([\n 'name' => $request['title'],\n 'content' => $request['content'],\n 'level' => $level,\n 'relation' => $request['relation'] ? $request['relation']:0,\n 'nameKg' => $request['titleKg'],\n 'contentKg' => $request['contentKg']\n ]);\n $submenu->save();\n $file = File::where([['submenu_id',$id],['language','ru']])->take(1)->get();\n if ($file->toJson() != '[]'){\n Storage::delete('files/'.$file[0]->name);\n }\n $file1 = File::where([['submenu_id',$id],['language','kg']])->take(1)->get();\n if ($file1->toJson() != '[]'){\n Storage::delete('/files/'.$file1[0]->name);\n }\n $submenu->add_file($request, $submenu->id);\n return redirect(route('admin.menu.index'));\n }", "function update_student_id1($id,$data){\n$this->db->where('student_id', $id);\n$this->db->update('students', $data);\n}", "function superadmin_update($id=NULL) {\n\t\t $this->set('meta_title','Edit User Group');\n\t\t $errors ='';\n\t\t if(isset($this->data['Role']['id'])) {\n\t\t\t $this->id = (int)$this->data['Role']['id'];\n\t\t\t $this->set('id',$this->id);\n\t\t }\n\t\t else {\n\t\t \t$this->id = (int)$id;\n\t\t\t$this->set('id',$this->id);\n\t\t }\t\n\t\t if(!$this->id) {\n\t\t \t$this->Session->setFlash('Invalid User Group update id.');\n\t\t $this->redirect(array('controller'=>'roles','action'=>'index'));\n\t\t }\n\t\t $this->Role->set($this->data);\n\t\t\n\t \t if(!empty($this->data) && is_array($this->data)){\n\t\t \n\t\t\t\n\t\t \n\t\t $this->Role->set($this->data);\n\t\t \n\t\t$errorsArr='';\n\t\t if(!$this->Role->validates()) \n\t\t\t{\n\t\t\t\n\t\t\t\t$errorsArr = $this->Role->validationErrors;\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\n \t\t if($errorsArr) {\n\t\t \n\t\t $this->Session->setFlash($errors);\n\t\t\t\t\n\t\t\t\t $this->set('data',$this->data);\n\t\t\t\t\n\t\t\t// $this->redirect(array('controller'=>'roles','action' =>\"update\",$this->id));\n\t\t\t}\n\t\t\telse { \n\t\t\t\t $this->request->data['Role']['id']\t= $this->id;\n\t\t\t\t if($this->request->data['Role']['id'] != 1) {\n\t\t\t\t\t if(in_array($this->params['controller'].'/'.substr($this->params['action'],5),$userpermissions) || $this->Session->read('Auth.Adminuser.role_id')==1) {\n\t\t\t\t\t $this->data['Role']['allowedfunctions']= $this->common->arrayToCsvString($this->data['Role']['allowedfunctions']);\n\t\t\t\t\t }\t\n\t\t\t\t } \t\t\t \n\t\t\t\t // pr($this->data);\n\t\t\t \t if($this->Role->save($this->data)) {\n\t\t\t\t $this->Session->write('popup','User Group has been updated successfully.');\n\t\t\t\t\t\t$this->Session->setFlash('User Group has been updated successfully.'); \n\t\t\t\t\t\t$this->redirect(array('controller'=>'roles','action' => \"index/message:success\"));\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t \t$this->Session->setFlash('Data save problem, Please try again.'); \n\t\t\t\t\t\t$this->redirect(array('controller'=>'roles','action' => \"update\",$this->id));\n\t\t\t\t }\t\t\n\t\t \t}//end if not error\n\t \t}// end if of check data array\n\t\t else {\n\t\t $this->set('data',$this->Role->read('',$id));\n\t\t }\n\t }", "public function UpdateFood($sku, $foodDesc, $category, $price){\r\n $conn = new ConnectionManager();\r\n $pdo = $conn->getConnection();\r\n \r\n \r\n // YOUR CODE GOES HERE\r\n\r\n\r\n\r\n return $isOk;\r\n }", "function _update_table_infos($data, $table_name, $table_id)\n {\n $model = model($table_name)->get_info($table_id);\n $model = mod($table_name)->add_info_url($model);\n $_data = array();\n $_data['comment_count'] = $model->comment_count + 1;\n if (isset($data['rate']) && $data['rate']) {\n $_data['rate_total'] = $model->rate_total + 1;\n $arrs = array(\n 1 => 'rate_one',\n 2 => 'rate_two',\n 3 => 'rate_three',\n 4 => 'rate_four',\n 5 => 'rate_five'\n );\n $_data[$arrs[$data['rate']]] = $model->{$arrs[$data['rate']]} + 1;\n\n $count = 0;\n for ($i = 1; $i < 6; $i++) {\n if ($data['rate'] == $i)\n $count += ($model->{$arrs[$i]} + 1) * $i;\n else\n $count += $model->{$arrs[$i]} * $i;\n }\n $_data['rate'] = round($count / $_data['rate_total'], 1);\n }\n\n if ($table_name == 'site') {\n model('setting')->set_group('site-rating', $_data);\n } else\n model($table_name)->update($model->id, $_data);\n\n\n return $model;\n\n }", "function UpdateAdminUser($id,$data)\n {\n $this->db->where('id', $id);\n $this->db->update('users', $data);\n }", "public function testProfilePrototypeUpdateByIdGroups()\n {\n\n }", "private function update_status_gasolina($id) \n {\n\n }", "function UpdateFaculty($id, $data) {\n $this->db->where('faculty_id', $id);\n return $this->db->update('faculty_mst', $data);\n }", "public function home_featured_data_update(Request $request) {\n Session::put('menu_item_parent', 'home');\n Session::put('menu_item_child', 'home_featured_data');\n Session::put('menu_item_child_child', '');\n if($request->input('id')) {\n $id = $request->input('id');\n $data = $request->all();\n unset($data['id']);\n $slug = SiteHelper::slugify($request->featured_data_title);\n $slugCount = HomeFeaturedData::where('slug', $slug)->where('id', '!=', $id)->count();\n if ($slugCount > 0) {\n $slug = $slug. '-'.$id;\n }\n $data['slug'] = $slug;\n HomeFeaturedData::find($id)->update($data); \n } else {\n $data = $request->all();\n unset($data['id']);\n\n $slug = SiteHelper::slugify($request->featured_data_title);\n $slugCount = HomeFeaturedData::where('slug', $slug)->count();\n if ($slugCount > 0) {\n $data['slug'] = '';\n }else {\n $data['slug'] = $slug;\n } \n\n $insertedData = HomeFeaturedData::create($data);\n $id = $insertedData->id; \n \n if ($slugCount > 0) {\n $data = []; \n $data['slug'] = $slug.'-'.$id;\n HomeFeaturedData::find($id)->update($data);\n }\n }\n\n $this->home_featured_data_upload_attach($request, $id);\n $this->home_featured_data_upload_logo($request, $id);\n Session::flash('flash_success', 'Featured Data has been updated successfully');\n return \"success\";\n\n }", "function update_kategori($id_kategori_point,$params)\n {\n $this->db->where('id_kategori_point',$id_kategori_point);\n return $this->db->update('kategori',$params);\n }", "public function updateMenu($obj = array()){\n\t\t\t\t//echo \"did = \".$obj['did'];\n\n\t\t\t\t/*$this->_ci->db\n\t\t\t\t\t->set('cover', 'CASE WHEN `image_id` = $is_cover THEN 1 ELSE 0 END', FALSE)\n\t\t\t\t\t->where('album_id', $album_id)\n\t\t\t\t\t->update('images');*/\n\n\t\t\t\t//$data=array('last_login'=>current_login,'current_login'=>date('Y-m-d H:i:s'));\n\n\t\t\t\t$this->_ci->db->where('admin_menu_id2',$obj['admin_menu_id2']);\n\t\t\t\t$this->_ci->db->update('_admin_menu',$obj);\n\n \t\t//return false;\t\n\t\n\t}", "public function updateMenu($obj = array()){\n\t\t\t\t//echo \"did = \".$obj['did'];\n\n\t\t\t\t/*$this->_ci->db\n\t\t\t\t\t->set('cover', 'CASE WHEN `image_id` = $is_cover THEN 1 ELSE 0 END', FALSE)\n\t\t\t\t\t->where('album_id', $album_id)\n\t\t\t\t\t->update('images');*/\n\n\t\t\t\t//$data=array('last_login'=>current_login,'current_login'=>date('Y-m-d H:i:s'));\n\n\t\t\t\t$this->_ci->db->where('admin_menu_id2',$obj['admin_menu_id2']);\n\t\t\t\t$this->_ci->db->update('_admin_menu',$obj);\n\n \t\t//return false;\t\n\t\n\t}", "public function change()\n {\n ## Alter Jenis Izin ##\n $table = $this->table('jenis_izin');\n $table\n ->changeColumn('oss_id', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ])\n ->renameColumn('oss_id', 'kode_oss');\n $table->update();\n\n ## BEGIN - Create Table data_sinc ##\n $table = $this->table('data_sinc');\n\n $table->addColumn('instansi_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['instansi_id']);\n\n $table->addColumn('dibuat_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_dibuat', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_diubah', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('diubah_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('key', 'string', [\n 'default' => null,\n 'limit' => 1000,\n 'null' => false,\n ])->addIndex(['key']);\n\n $table->addColumn('keterangan', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n\n $table->addColumn('parent_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['parent_id']);\n\n $table->addColumn('index', 'string', [\n 'default' => null,\n 'limit' => 100,\n 'null' => false,\n ])->addIndex(['index']);\n\n $table->create();\n\n ## BEGIN - Create Table data_sinc_detail ##\n $table = $this->table('data_sinc_detail');\n\n $table->addColumn('instansi_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['instansi_id']);\n\n $table->addColumn('dibuat_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_dibuat', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_diubah', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('diubah_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('data_sinc_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['data_sinc_id']);\n\n $table->addColumn('data_kolom_id', 'biginteger', [\n 'default' => null,\n 'null' => false,\n ])->addIndex(['data_kolom_id']);\n\n $table->addColumn('oss_type_kolom', 'string', [\n 'default' => null,\n 'limit' => 5,\n 'null' => false,\n ])->addIndex(['oss_type_kolom']);\n\n $table->addColumn('oss_kolom', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ])->addIndex(['oss_kolom']);\n\n $table->create();\n\n ## BEGIN - Create Table nib ##\n $table = $this->table('nib');\n\n $table->addColumn('instansi_id', 'biginteger', [\n 'default' => null,\n 'null' => true,\n ])->addIndex(['instansi_id']);\n\n $table->addColumn('dibuat_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_dibuat', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('tgl_diubah', 'datetime', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ]);\n\n $table->addColumn('diubah_oleh', 'string', [\n 'default' => null,\n 'limit' => 25,\n 'null' => true,\n ]);\n\n $table->addColumn('alamat_investasi', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n\n $table->addColumn('daerah_investasi', 'string', [\n 'default' => null,\n 'limit' => 10,\n 'null' => true,\n ]);\n\n $table->addColumn('status_penanaman_modal', 'string', [\n 'default' => null,\n 'limit' => 2,\n 'null' => true,\n ])->addIndex(['status_penanaman_modal']);\n\n $table->addColumn('status_badan_hukum', 'string', [\n 'default' => null,\n 'limit' => 2,\n 'null' => true,\n ])->addIndex(['status_badan_hukum']);\n\n $table->addColumn('jangka_waktu', 'datetime', [\n 'default' => null,\n 'null' => true,\n ]);\n\n $table->addColumn('oss_id', 'string', [\n 'default' => null,\n 'limit' => 20,\n 'null' => true,\n ])->addIndex(['oss_id']);\n\n $table->addColumn('nib', 'string', [\n 'default' => null,\n 'limit' => 14,\n 'null' => false,\n ])->addIndex(['nib']);\n\n $table->create();\n }", "public function skuPut($id, $shop_id, $sku, Request $request)\n {\n if (!$this->isOwner('App\\Entity\\ProductsSkus', ['product' => $id, 'shop' => $shop_id])) {\n return $this->notFoundResponse;\n }\n\n if (isset($this->entity->sku) && $this->entity->sku == $sku) {\n // Default values.\n $newSku = $this->entity->sku;\n $newActive = isset($this->entity->active) ? $this->entity->active : 1;\n\n // Parse json request for new values.\n $json = $request->getContent();\n $arr = json_decode($json, true);\n if (isset($arr) && is_array($arr) && isset($arr['skus'])) {\n if (isset($arr['skus']['sku']) && !empty($arr['skus']['sku'])) {\n $newSku = $arr['skus']['sku'];\n }\n if (isset($arr['skus']['active']) && is_bool($arr['skus']['active'])) {\n $newActive = $arr['skus']['active'] ? 1 : 0;\n }\n }\n\n // Update found entity with new data.\n $this->entity->setSku($newSku);\n $this->entity->setActive($newActive);\n $this->entity->setShopId($shop_id);\n $this->em->flush();\n\n // All affected orders' line items will have their SKU changed.\n $orders = $this->entity->shop->orders;\n foreach ($orders as $order) {\n $line_item = $this->em->find('App\\Entity\\LineItems', ['order' => $order->getId(), 'product' => $id]);\n if (is_object($line_item) && isset($line_item->sku) && $line_item->sku == $sku) {\n $line_item->sku = $newSku;\n $this->em->flush();\n }\n }\n\n // Send response. Lookup and return parent Product.\n // $product = $this->em->find('App\\Entity\\Products', $id);\n $product = $this->entity->product;\n if ($product instanceof Products) {\n $response = new JsonResponse($product->jsonSerialize(), 200);\n } else {\n return new Response('Product not found.', 404);\n }\n } else {\n return $this->notFoundResponse;\n }\n\n return $response;\n }", "public function simpan_sub_detail($data)\n\t{\n\t\t$this->db->insert('sub_detail_pros', $data);\n\t}", "function update_table( Modyllic_Changeset_Table $table ) {\n $this->update['tables'][$table->name] = $table;\n }", "function index_put() {\n\t\t$id = $this->put('id');\n\t\t$data = array(\n\t\t\t'id' => $this->put('id'),\n\t\t\t'nik' => $this->put('nik'),\n\t\t\t'nama' => $this->put('nama'),\n\t\t\t'noHp' => $this->put('noHp'),\n\t\t\t'level' => $this->put('level'),\n\t\t\t'email' => $this->put('email'),\n\t\t\t'driver_detailname' => $this->put('driver_detailname'),\n\t\t\t'password' => $this->put('password')\n\t\t);\n\t\t$this->db->where('id', $id);\n\t\t$update = $this->db->update('driver_detail', $data);\n\t\tif ($update) {\n\t\t\t$this->response($data, 200);\n\t\t} else {\n\t\t\t$this->response(array('status' => 'fail', 502));\n\t\t}\n\t}", "public function alterarFotoCapaGrupo($grupoID)\n { \n\n $usuarioID = $_SESSION['usuario_id'];\n\n // Verifica se este usuário é administrador deste grupo\n $verificaUsuarioCriouGrupo = COUNT($this->mapper->grupo(array('usuario_criacao' => $usuarioID, 'id' => $grupoID))->fetchall());\n\n if($verificaUsuarioCriouGrupo == 1){\n\n $grupoPagina = 0;\n\n // Configurações de acesso ao bucket no s3\n $bucket=\"bucket-socialgroups\";\n $awsAccessKey=\"AKIAIKVT6CC24NGCKLPQ\";\n $awsSecretKey=\"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\";\n $s3 = new S3($awsAccessKey, $awsSecretKey);\n // Configurações de acesso ao bucket no s3\n\n $posicao = 0;\n\n\n foreach($_FILES as $file){\n\n $tmpname = $file['tmp_name'];\n\n // Armazena a extensão do arquivo em uma url\n $extencao = strrchr($file['name'], '.');\n $codigoFile = md5($file['name'][$posicao].date('Y-m-d H:i:s'));\n\n $posicao++;\n\n\n if($s3->putObjectFile($tmpname, $bucket , $codigoFile.$extencao, S3::ACL_PUBLIC_READ) ){\n\n $s3file='https://'.$bucket.'.s3.amazonaws.com/'.$codigoFile.$extencao;\n $capa = $s3file;\n\n }\n\n\n // Atualiza Foto capa do grupo\n $atualizaFotoCapaGrupo = $this->mapper->grupo(array('id' => $grupoID))->fetch();\n $atualizaFotoCapaGrupo->grupo_avatar = $capa;\n $this->mapper->grupo->persist($atualizaFotoCapaGrupo);\n $this->mapper->flush();\n // Atualiza Foto capa do grupo\n\n }\n\n\n // Retorna dados após reload na pagina\n $GetGrupos = new GetGrupos();\n // Retorna dados após reload na pagina\n\n $returnacao = 'alterarCapaGrupo';\n\n return $GetGrupos->grupoSelecionado($grupoID, $grupoPagina, $returnacao);\n\n }\n\n\n\n\n \n\n }", "public function update(Request $request, $id)\n {\n $data = User::where('id', $id)->first();\n $data->level = $request->level;\n \t\tif($data->save()){\n return redirect('admin/petugas/index')\n ->with(['success' => 'Level petugas berhasil diubah']);\n }else{\n return redirect('admin/petugas/index')\n ->with(['error' => 'Level petugas gagal diubah']);\n }\n }", "public function update(Request $request, $id)\n {\n //\n $education = Education::findOrFail($id);\n\n if($request->has('status') && $request->input('status') == '0'):\n if($request->input('parent_id') <= 0):\n if($education->children()->count() > 0):\n //to delete the education major category need to check have the major or not\n return response()->json(array('status'=>'error','message'=>'Cannot update major category because it contains the major'),200);\n endif;\n else:\n if($education->user_profiles()->count() > 0):\n return response()->json(array('status'=>'error','message'=>'Cannot update major because it used by the career advisior'),200);\n endif; //end of education major\n endif;\n endif;\n $education->name = $request->input('title');\n $education->parent = $request->input('parent_id');\n $education->description = $request->input('description');\n $education->slug = str_slug($request->input('title'));\n $education->status = $request->input('status');\n $education->save();\n return response()->json(array('status'=>'success','result'=>'successfully updated!!'),200);\n }", "function update($id, $data)\n {\n $this->db->where('id', $id);\n\n return $this->db->update('sets', $data);\n }", "public function change()\n {\n $this->query(\"update `UserRole` set `description`='Administrator of system' where `role_id`=2\");\n $this->query(\"update `UserRole` set `description`='Owner of site' where `role_id`=1\");\n $this->query(\"update `Site` set `site_name`='teamlab-srv.oft-e.com' where `id`=1\");\n $this->query(\"update `Site` set `site_name`='smartbiz24.ru' where `id`=2\");\n $this->query(\"update `Site` set `site_name`='yandex.ru' where `id`=3\");\n $this->query(\"update `Site` set `site_name`='google.com' where `id`=4\");\n $this->query(\"update `User` set `first_name`='Witaliy' where `id`=1\");\n $this->query(\"update `User` set `first_name`='Victor' where `id`=2\");\n $this->query(\"update `User` set `first_name`='Peter' where `id`=3\");\n $this->query(\"update `User` set `first_name`='Sergey' where `id`=4\");\n $this->query(\"update `User` set `first_name`='Igor' where `id`=5\");\n }", "public function update(Request $request, $id)\n {\n //查询子分类\n $child = Sort::where('pid',$id)-> first();\n if($child){\n return back()->with('error','当前分类有子分类,不允许修改');\n exit;\n }\n $pid = $request->input('pid','');\n if($pid == 0){\n //顶级\n $path = 0;\n }else{\n //获取父级的信息\n $parent_data = Sort::find($pid);\n $path = $parent_data->path.','.$parent_data->id;\n }\n $sort = Sort::find($id);\n $sort->sname = $request->input('sname','');\n $sort->pid = $request->input('pid','');\n $sort->status = $request->input('status',1);\n $sort->path = $path;\n \n if($sort->save()){\n return redirect('/admin/sort')->with('success','修改成功'); \n }else{\n return back()->with('error','删除失败');\n }\n }", "public function editunit_aksi_top($id, $data_aksi) {\n\t\t$this->db->where('id_aksi', $id)\n\t\t\t\t ->update('tb_aksiunit', $data_aksi);\n\t}", "function editDishDetail($id){\n\n\t\t$dishDetails\t= $this->Dishes_model->getDishDetails($id);\n\t\t//echo \"<pre>\";print_r($dishDetails);exit;\n\t\tif ($id != null && sizeof($dishDetails)>0) {\n\t\t\t$data['userdata']\t= $this->session->userdata('current_user');\n\t\t\t$data['menu'] \t= $this->menu;\n\t\t\t$submenu \t\t\t= $this->submenu;\n\t\t\t$submenuArray \t\t= array();\n\n\t\t\tforeach($submenu as $key=>$value){\n\n\t\t\t\t$submenuArray[$value->parent_page_id][] = $value;\n\t\t\t}\n\t\t\t//echo \"<pre>\";print_r($submenuArray);exit;\n\t\t\t$data['submenu'] \t\t= $submenuArray;\n\t\t\t$data['dish_data']\t\t= $dishDetails;\n\t\t\t$data['categoryList']\t= $this->Dishes_model->getCategory();\n\t\t\t$data['imagesList'] \t= $this->Dishes_model->getImages();\n\n\t\t\tif ($this->input->post('update')=='Update') {\n\t\t\t\t$this->form_validation->set_rules('category_id', 'Category Name', 'required');\n\t\t\t\t$this->form_validation->set_rules('dish_name', \t 'Dish Name', 'required|callback_isDishExist['.json_encode($this->input->post()).']');\n\t\t\t\t$this->form_validation->set_rules('description', 'Descripation', 'required');\n\t\t\t\t$this->form_validation->set_rules('price', 'Dish Price', 'required');\n\n\t\t\t\tif ($this->form_validation->run() == FALSE){\n\t\t \t\n\t\t }\n\t\t else{\n\t\t \tif($_FILES['image']['name'] != \"\"){\n\n\t\t\t\t\t\t$config['upload_path'] \t\t= './assets/uploads/products/'; \n\t\t $config['allowed_types'] = 'gif|jpg|png|jpeg|GIF|JPG|PNG|JPEG';\n\t\t $config['max_size'] = 5120;\n\t\t \n\t\t $this->upload->initialize($config);\n\t\t if (! $this->upload->do_upload('image')){\n\t \t$error = array('error' => $this->upload->display_errors());\n\t\t }\n\t\t else{\n\t $dataupload \t \t\t\t= array('upload_data' => $this->upload->data());\n\t\t $dishData['dish_image'] = $dataupload['upload_data']['file_name'];\n\t\t if($data['dish_data'][0]->dish_image){\n\t\t\t\t\t\t\t\t$img = \"./assets/uploads/products/\".$data['dish_data'][0]->dish_image;\n\t\t\t\t\t\t\t\t\tunlink($img);\t\t\t\t\t\t\n\t\t\t\t\t \t\t}\t\n\t\t }\n\t\t }\n\t\t else{\n\n\t\t \t$dishData['dish_image'] = $data['dish_data'][0]->dish_image;\n\t\t }\n\t\t \tif(isset($error) && sizeof($error)>0){\n\n\t \t\t\t\t$data['image_error']=$error['error'];\n\t\t \t}\n\t\t \telse{\n\t\t\t $dishData['category_id']\t= trim($this->input->post('category_id'));\n\t\t\t $dishData['product_en_name']\t\t\t= trim($this->input->post('dish_name'));\n\t\t\t $dishData['en_description']\t= trim($this->input->post('description'));\n\t\t\t $dishData['price']\t\t\t= trim($this->input->post('price'));\n\t\t\t $dishData['discount_type']\t= trim($this->input->post('discount_type'));\n\t\t\t $dishData['discount']\t\t= trim($this->input->post('discount'));\n\t\t\t //$dishData['created_by'] \t= $data['userdata'][0]->user_id;\t\n\t\t\t $dishData['created_date']\t= date(\"Y-m-d H:i:s\");\n\n\t\t\t $result = $this->Dishes_model->editDishDetail($dishData,$id);\n\n\t\t\t if ($_FILES['other_image']['name'] != \"\") {\n\n\t\t\t \t\t$filesCount = count($_FILES['other_image']['name']);\n\t\t\t \tfor($i = 0; $i < $filesCount; $i++){\n\n\t\t\t\t $_FILES['userFile']['name'] \t= $_FILES['other_image']['name'][$i];\n\t\t\t\t $_FILES['userFile']['type'] \t= $_FILES['other_image']['type'][$i];\n\t\t\t\t $_FILES['userFile']['tmp_name'] = $_FILES['other_image']['tmp_name'][$i];\n\t\t\t\t $_FILES['userFile']['error'] \t= $_FILES['other_image']['error'][$i];\n\t\t\t\t $_FILES['userFile']['size'] \t= $_FILES['other_image']['size'][$i];\n\n\t\t\t\t $config['upload_path'] \t\t= './assets/uploads/products/'; \n\t\t\t\t $config['allowed_types'] = 'gif|jpg|png|jpeg|GIF|JPG|PNG|JPEG';\n\t\t\t\t $config['max_size'] = 5120;\n\t\t\t\t \n\t\t\t\t $this->upload->initialize($config);\n\t\t\t\t if($this->upload->do_upload('userFile')){\n\t\t\t\t $fileData = $this->upload->data();\n\t\t\t\t $uploadData[$i]['file_name'] = $fileData['file_name'];\n\t\t\t\t $images['media_name']=$uploadData[$i]['file_name'];\n\t\t\t\t \t\t\n\t\t\t\t }\n\t\t\t\t else{\n\t\t \t\t$error1 = array('error1' => $this->upload->display_errors());\n\n\t\t\t\t }\n\t\t\t\t if(isset($error1) && sizeof($error1)>0){\n\t\t\t \t\n\t\t\t\t \t\t\t$data['image_error1']=$error['error1'];\n\t\t\t\t\t \t}\n\t\t\t\t\t \telse{\n\t\t\t\t\t \t\t$images['product_id'] \t= $id;\n\t\t\t\t\t \t\t$images['updated_by'] \t= $data['userdata'][0]->user_id;\t\n\t\t\t\t \t\t$images['updated_date']\t= date(\"Y-m-d H:i:s\");\n\t\t\t\t \t\t\n\t\t \t\t\t\t\t$result1 = $this->Dishes_model->addDishMedia($images);\n\n\t\t\t\t\t \t}\n\t\t\t \t}\n\t \t\t\t}\n\n\t\t\t if (sizeof($result)>0 || sizeof($result1)>0) {\n\t\t\t \t $this->session->set_flashdata('success_msg', \"Dish Details updated successfully!\");\n\t\t\t \t redirect('Dishes/dishList');\n\t\t\t }\n\t\t\t else{\n\t\t\t \t $this->session->set_flashdata('error_msg', \"Something went wrong while updating Dish details\");\n\t\t\t \t redirect('Dishes/editDishDetail');\n\t\t\t }\n\t\t\t\t\t}\n\t\t }\n \t\t\t}\n\t\t\t$this->load->view('Elements/header',$data);\n\t\t\t$this->load->view('Dishes/edit_dish');\n\t\t\t$this->load->view('Elements/footer');\n\t\t}\n\t\telse{\n\t\t\tredirect('Dishes/dishList');\n\t\t}\n\t}", "public function updateCategory(array $data, int $id): void\n {\n }", "public function simpan_ubah_unit($data,$where)\n\t{\n\t\t$this->db->where($where);\n\t\t$this->db->update('unit', $data);\n\t}", "public function update_data_user($data, $id)\n {\n $this->db->update('social_media', $data, array('socialUsuarioId'=>$id));\n }", "function sumo_put_user_grouplevel($id=FALSE)\n{\n\t$user\t = sumo_get_user_info($id, 'id', FALSE);\n\t$group_level = $user['group_level'];\n\n\tif(!empty($group_level))\n\t{\n\t\tGLOBAL $SUMO, $language;\n\n\t\t$num_groups = count($group_level);\n\t\t$group \t\t= array_keys($group_level);\n\t\t$value\t\t= array_values($group_level);\n\t\t$list \t\t= '';\n\n\t\tfor($g=0; $g<$num_groups; $g++)\n\t\t{\n\t\t\tif($group[$g])\n\t\t\t{\n\t\t\t\t$SUMO['user']['group_level'][$group[$g]] = !isset($SUMO['user']['group_level'][$group[$g]]) ? '' : $SUMO['user']['group_level'][$group[$g]];\n\n\t\t\t\t$style \t\t\t= sumo_alternate_str('tab-row-on', 'tab-row-off');\n\t\t\t\t$val \t\t\t= \"<select name='group_level[$g]'>\\n<option value='\".$value[$g].\"'>\".$value[$g].\"</option>\\n\";\n\t\t\t\t$last_value\t\t= !isset($SUMO['user']['group_level'][$group[$g]]) ? 7 : $SUMO['user']['group_level'][$group[$g]];\n\t\t\t\t$last_value = (in_array('sumo', $SUMO['user']['group']) && $group[$g] != 'sumo') ? 7 : $last_value;\n\t\t\t\t$group_name[$g] = \"<input type='hidden' name='group_name[$g]' value='\".$group[$g].\"'>\".$group[$g];\n\n\t\t\t\t// Create link to remove group\n\t\t\t\tif($SUMO['user']['group_level'][$group[$g]] > $value[$g] || $SUMO['user']['group_level']['sumo'] >= 4)\n\t\t\t\t\t$delete = \"<a href='javascript:sumo_ajax_get(\\\"\".$_SESSION['module'].\".content\\\",\\\"?module=users&action=deletegroup&group=\".$group[$g].\":\".$value[$g].\"&id=\".intval($id).\"&decoration=false&SecurityOptions_visibility=1\\\");'>\".$language['Remove'].\"</a>\";\n\t\t\t\telse\n\t\t\t\t\t$delete = '';\n\n\n\t\t\t\tif($SUMO['user']['group_level'][$group[$g]] > $value[$g] || in_array('sumo', $SUMO['user']['group']))\n\t\t\t\t{\n\t\t\t\t\tfor($l=1; $l<=$last_value; $l++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($l != $value[$g]) $val .= \"<option value='$l'>$l</option>\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$val .= \"</select>\";\n\n\t\t\t\t// Only for SUMO user (administrator)\n\t\t\t\tif($user['user'] == 'sumo')\n\t\t\t\t{\n\t\t\t\t\t$val = 7;\n\t\t\t\t\t$delete = '';\n\t\t\t\t}\n\n\n\t\t\t\t$list .= \"<tr>\\n\"\n\t\t\t\t\t\t.\" <td class='\".$style.\"'>\".$group_name[$g].\"</td>\\n\"\n\t\t\t\t\t\t.\" <td class='\".$style.\"'>\".sumo_get_group_description($group[$g]).\"</td>\\n\"\n\t\t\t\t\t\t.\" <td class='\".$style.\"'>\".$val.\"</td>\\n\"\n\t\t\t\t\t\t.\" <td class='\".$style.\"'>\".$delete.\"</td>\\n\"\n\t\t\t\t\t\t.\"</tr>\\n\";\n\t\t\t}\n\t\t}\n\n\t\treturn $list;\n\t}\n\telse return FALSE;\n}", "function Specialities_Update(){\n\t\t\n\t\t//when click on button\n\t\tif(isset($_POST['updatesp'])){\n\t\t\t\n\t\t\t\t// get id move to variable\n\t\t\t$get_id = $_GET['Edit'];\n\t\t\t\n\t\t\t//values for Specialities table\n\t\t\t$values = \"specialitie_name='\".$_POST['sp'].\"'\";\n\t\t\t\n\t\t // update Specialities from table\n\t\t $this->Update('specialities',$values,\"where id='$get_id'\",'Specialities?m');\n\t\t} // ifisset close\n\t}" ]
[ "0.5921233", "0.55760735", "0.5543882", "0.5524524", "0.5460642", "0.5426022", "0.5423431", "0.54173607", "0.5405218", "0.5395277", "0.5383643", "0.5378977", "0.53701013", "0.536224", "0.5361701", "0.5348429", "0.53216577", "0.5300968", "0.52959687", "0.5285785", "0.5280287", "0.52698314", "0.524776", "0.5246451", "0.52261484", "0.52261484", "0.52261484", "0.52202696", "0.52193767", "0.5203305", "0.52019817", "0.52019674", "0.5193732", "0.51899946", "0.51854664", "0.51829875", "0.51816547", "0.5177276", "0.5163532", "0.51615393", "0.51603943", "0.51383257", "0.51355743", "0.51317877", "0.51190466", "0.51185846", "0.5117935", "0.51089054", "0.5104991", "0.51032734", "0.5088995", "0.5081258", "0.50803703", "0.5078357", "0.50780076", "0.5073342", "0.5071685", "0.50688213", "0.5067457", "0.50668895", "0.50658315", "0.50649154", "0.5062117", "0.5053477", "0.5053475", "0.5040847", "0.50389045", "0.5038611", "0.5036253", "0.5035784", "0.5035412", "0.5030911", "0.5029007", "0.50286955", "0.5026387", "0.50228846", "0.5019195", "0.5016839", "0.5015692", "0.501216", "0.5008192", "0.5008192", "0.50025517", "0.50019574", "0.49963126", "0.49927303", "0.49926767", "0.49815598", "0.49771488", "0.4976556", "0.4974424", "0.49725777", "0.49704793", "0.4969791", "0.49696782", "0.49662676", "0.49660853", "0.49630654", "0.4961547", "0.49594715" ]
0.6477451
0
Delete Individual Id Sku Hierarchy table Data //
public function deleteTbldSkuHierarchyById ( $hierarchy_id ) { $this->db->where( 'id', $hierarchy_id ); $this->db->delete( 'tbld_sku_hierarchy' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hapus_data($npm){\r\n $where = array('npm_kd'=> $npm);\r\n $this->db->where($where);\r\n $this->db->delete($this->table_name);\r\n }", "function deleteSchool(){\n mysql_query(\"DELETE FROM school WHERE id='$this->schoolId'\") or die(mysql_error());\n \n // Delete the delegate positions table\n mysql_query(\"DROP TABLE school_$this->schoolId\") or die(mysql_error());\n }", "function DeleteSHItem($id)\n{\n\tglobal $db;\n\t$sh_table = DB_PREFIX . 'pico_site_heirarchy';\n\t$sub_items = $db->force_multi_assoc('SELECT * FROM `'.$sh_table.'` WHERE `parent`=? ORDER BY `position` ASC', $id);\n\tif (is_array($sub_items))\n\t{\n\t\tforeach ($sub_items as $item)\n\t\t{\n\t\t\tDeleteSHItem($item['entry_id']);\n\t\t}\n\t}\n\t$info = $db->assoc('SELECT * FROM `'.$sh_table.'` WHERE `entry_id`=?', $id);\n\t$db->run('UPDATE `'.$sh_table.'` SET `position` = (`position`-1) WHERE `parent`=? AND `position`>?', $info['parent'], $info['position']);\n\t$db->run('DELETE FROM `'.$sh_table.'` WHERE `entry_id`=?', $id);\n}", "public function deleteVesti($id){\n\t\t\t$this->db->where('skolaId', $id);\n\t\t\t$this->db->delete('vesti');\n\t\t}", "public function deleteData($id)\n {\n $this->db->where('id_user', $id);\n $this->db->delete('rumusan');\n }", "public function deleteSolicitudes($id){\r\n $this->db->where();\r\n $this->db->delete(\"Solicitudes\");\r\n }", "function delete_tbllevel($level_id)\n {\n return $this->db->delete('tbllevel',array('level_id'=>$level_id));\n }", "private function sub_delete($id='')\n\t{\n\t\t$sql = \"DELETE FROM analisis_parameter WHERE id_indikator IN(SELECT id FROM analisis_indikator WHERE id_master = ?)\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_respon WHERE id_periode IN(SELECT id FROM analisis_periode WHERE id_master = ?)\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_kategori_indikator WHERE id_master = ?\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_klasifikasi WHERE id_master = ?\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_respon_hasil WHERE id_master = ?\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_partisipasi WHERE id_master = ?\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_periode WHERE id_master = ?\";\n\t\t$this->db->query($sql, $id);\n\n\t\t$sql = \"DELETE FROM analisis_indikator WHERE id_master = ?\";\n\t\t$this->db->query($sql, $id);\n\t}", "function remove_rows($table_id, $data) {\n\t$cmsEditDel = new cmsEditDel($table_id, $data);\n\t$delete_id = $cmsEditDel->dbChange();\n\tunset($cmsEditDel);\n\t\n\tif (empty($delete_id)) return;\n\t\n\t$child = getChildTables($table_id);\n\treset($child);\n\twhile (list($table_id, $field_name) = each($child)) {\n\t\tremove_rows($table_id, array($field_name => $delete_id));\n\t}\n\t\n}", "function delete_data($table, $id){\n\n $query = $this->db->delete($table, array('id' => $id));\n\n }", "function delete_from_best($pdo, $level_id)\n{\n $stmt = $pdo->prepare('\n DELETE FROM best_levels\n WHERE level_id = :level_id\n ');\n $stmt->bindValue(\":level_id\", $level_id, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->rowCount();\n}", "function delete_complete_research_group($main_object,$value){\n //delete 1\n //from log in table\n $main_object->research_group=$value;\n $query_make = new Query_Make();\n $attribute = array(\"research_group\");\n $value = array($main_object->research_group);\n $sql = $query_make->delete_query($query_make,\"LogInTable\",$attribute,$value);\n $result = $main_object->exeute_query($main_object,$sql);\n if($result) {\n echo \"delete 1 done \";\n //from supervisor Table \n $attribute = array(\"research_group\");\n $value = array($main_object->research_group);\n $sql = $query_make->delete_query($query_make,\"Supervisor\",$attribute,$value);\n $result = $main_object->exeute_query($main_object,$sql);\n if($result) {\n echo \"delete 2 done \";\n //Thesis Group Info Table \n $attribute = array(\"research_group\");\n $value = array($main_object->research_group);\n $sql = $query_make->delete_query($query_make,\"ThesisGroupInfo\",$attribute,$value);\n $result = $main_object->exeute_query($main_object,$sql);\n if($result) {\n echo \"delete 3 done \";\n //StudentInformation Table \n $attribute = array(\"research_group\");\n $value = array($main_object->research_group);\n $sql = $query_make->delete_query($query_make,\"StudentInformation\",$attribute,$value);\n $result = $main_object->exeute_query($main_object,$sql);\n if($result) {\n echo \"delete 4 done\";\n //ReseachGroupInfo Table \n $attribute = array(\"name\");\n $value = array($main_object->research_group);\n $sql = $query_make->delete_query($query_make,\"ResearchGroupInfo\",$attribute,$value);\n $result = $main_object->exeute_query($main_object,$sql);\n\n if($result) {\n echo \"successful\";\n }\n else {\n echo \"not successful\"; \n }\n }\n else {\n echo \"unsuccessful\";\n }\n\n }\n else {\n echo \"unsuccessful\";\n }\n\n }\n\n }\n else {\n echo \"unsuccessful\"; \n }\n }", "public function hapus($id = 0, $semua = FALSE)\n\t{\n\t\tif ( ! $semua) $this->session->success = 1;\n\n\t\t$outp = $this->db->where('id', $id)->delete('kategori');\n\n\t\tstatus_sukses($outp, $gagal_saja = TRUE); //Tampilkan Pesan\n\t}", "function delete($id) {\n $this->db->where('id', $id);\n $this->db->delete('sub_categories');\n }", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n // need to delete from tag maps too\n // tbd\n }", "function delete(){\n\t\t$sql = \"DELETE FROM `svg_info` WHERE `id`='\".addslashes($this->id).\"'\";\n\n\t\t$this->connection->send_query($sql);\n\t}", "public function delete($id)\n {\n echo json_encode($this->db->delete('user_submenu', ['id_submenu' => $id]));\n }", "function ihc_delete_user_level_relation($l_id=FALSE, $u_id=FALSE){\n\tif ($u_id && $l_id){\n\t\t$levels_str = get_user_meta($u_id, 'ihc_user_levels', true);\n\t\t$levels_arr = explode(',', $levels_str);\n\t\tif (!is_array($l_id)){\n\t\t\t$lid_arr[] = $l_id;\n\t\t}\n\t\t$levels_arr = array_diff($levels_arr, $lid_arr);\n\t\t$levels_str = implode(',', $levels_arr);\n\t\tupdate_user_meta($u_id, 'ihc_user_levels', $levels_str);\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . \"ihc_user_levels\";\n\t\t$u_id = esc_sql($u_id);\n\t\t$l_id = esc_sql($l_id);\n\t\t$wpdb->query('DELETE FROM ' . $table_name . ' WHERE user_id=\"'.$u_id.'\" AND level_id=\"'.$l_id.'\";');\n\t\tihc_downgrade_levels_when_expire($u_id, $l_id);\n\n\t\tdo_action('ihc_action_after_subscription_delete', $u_id, $l_id);\n\t}\n}", "public function delIdentity()\n\t{\n\t\t// Verifier l'adhesion\n\t\t$q = new Bn_query('u2a', '_asso');\n\t\t$q->setFields('u2a_adherentid');\n\t\t$q->addWhere('u2a_userid='. $this->getVal('id', -1));\n\t\t$adheId = $q->getOne();\n\t\t$q->deleteRow();\n\t\t$q->setTables('adherents');\n\t\t$q->deleteRow('adhe_id=' . $adheId);\n\t}", "public function delete($id_soal_siswa);", "function delete_desa($id)\n\t{\n\t\t//--> hapus data desa\n\t\t$this->db->delete('sub_instansi', array('id' => $id));\n\n \t\treturn true;\n\t}", "function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_amphur\n\t\t\t\tWHERE amph_id=?\";\n\t\t$this->hr->query($sql, array($this->amph_id));\n\t}", "function deleteuser_vizitki($user_id) {\n\tglobal $database;\n\n\t// DELETE vizitki ENTRIES AND COMMENTS\n\t$database->database_query(\"DELETE FROM se_vizitkientries, se_vizitkicomments USING se_vizitkientries LEFT JOIN se_vizitkicomments ON se_vizitkientries.vizitkientry_id=se_vizitkicomments.vizitkicomment_vizitkientry_id WHERE se_vizitkientries.vizitkientry_user_id='$user_id'\");\n\n\t// DELETE COMMENTS POSTED BY USER\n\t$database->database_query(\"DELETE FROM se_vizitkicomments WHERE vizitkicomment_authoruser_id='$user_id'\");\n\n\t// DELETE STYLE\n\t$database->database_query(\"DELETE FROM se_vizitkistyles WHERE vizitkistyle_user_id='$user_id'\");\n\n}", "public function destroy($id)\n {\n DB::table('subcategories')->where('id',$id)->delete();\n }", "public function hapus($id_004) \n\t{\n\t\t$this->db->delete('data_b', array('id_004' => $id_004));\n\t}", "public function delete($key = NULL){\n if (!is_null($key)) return parent::delete($key);\n \n\t\t//delete children\n\t\t$children_groups = Jelly::select('Client_ShareholderGroup')->where('parent', '=', $this->id())->execute();\n\t\tforeach($children_groups as $cg){\n\t\t\t$cg->delete();\n\t\t}\n\t\t$children_persons = Jelly::select('Client_Shareholder')->where('parent', '=', $this->id())->execute();\n\t\tforeach($children_persons as $cp){\n\t\t\t$cp->delete();\n\t\t}\n\t\t\n\t\tJelly::delete('Client_ShareholderGroup')->where('_id', '=', $this->id())->execute();\n }", "public function deleteData()\n {\t\t\n \t$arrayId = $this->getAllUserId($this->readFromLocalFile());\n \tforeach($arrayId as $id)\n \t{\n \t\t$user = User::find()->where(['id' => $id])->one();\n \t\tif($user)\n \t\t{\n \t\t\t$user->delete();\n \t\t}\n \t}\n \t$this->deleteSelectedLocalItems('user');\n }", "function dataDeletesk($id) {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t= \"DELETE FROM sk\n\t\t\t\t\t\t\t WHERE id= '$id'\";\n\t\t\t\t\n\t\t\t\t$sql\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\t// CEK SQL\n\t\t\t\tif($sql == TRUE) {\n\t\t\t\t\treturn TRUE;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}", "function hapus_pengguna($id){\n\n $this->db->where('id_user', $id);\n $this->db->delete('tb_user'); \n\n \n \n\t}", "function delete() {\n\t\t$sql = \"DELETE FROM umgroup\n\t\t\t\tWHERE GpID=?\";\n\t\t\n\t\t \n\t\t$this->ums->query($sql, array($this->GpID));\n\n\t}", "function hapusjabatan($id) {\n\t\t$this->db->where('ID_JBT', $id);\n\t\t$this->db->delete('IKD.IKD_D_JABATAN_STRUKTURAL'); \t\t\n }", "public function delKate($id){\n\t\t$this->db->delete('kategori', array(\"idkategori\" => $id));\n\t}", "public function hapusSiswa($id)\n {\n $this->db->delete('siswa', ['id' => $id]);\n }", "function del_by_id($table,$kode){\n\t\t$this->db->where('username',$kode);/*ative record*/\n\t\t$this->db->delete($table);\n\t}", "public function delete_innersidebar_seopages_id($seopages_id){\n $sqld_seo = \"delete from digital_marketing where journal_id='$seopages_id'\";\n $resultd_seo = mysqli_query($this->db,$sqld_seo);\n return $resultd_seo; \n }", "function delete() {\n\t\t$sqlStatements = array();\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS tags\";\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS siteViews\";\n\t\texecuteSqlStatements($sqlStatements);\n\t}", "function hapus_data($id)\r\n\t{\r\n\t\t$this->db->where('id',$id);\r\n\t\t$this->db->delete(\"alket\");\r\n\t\theader('location:'.base_url().\"index.php/home/view\");\r\n\t}", "function delete_buku_tamu($id_bukutamu){\n $id_bukutamu = array('id_buku_tamu' => $id_bukutamu);\n $this->load->model('fungsi');\n $this->fungsi->Delete('apps_siperat_buku_tamu', $id_bukutamu);\n redirect(base_url('/admin/'),'refresh');\n\t}", "function DelArtikelAuftrag($id)\n {\n\n\n }", "function Specialities_Delete(){\n\t\t\n\t\t//when get id from url\n\t\tif(isset($_GET['Delete'])){\n\t\t\t\n\t\t\t// get id move to variable\n\t\t\t$get_id = $_GET['Delete'];\n\t\t\t\n\t\t\t//delete Specialities from table\n\t\t\t$this->Delete('specialities',$get_id,'Specialities?m');\n\t\t} // ifisset close\n\t}", "public function delete(){\r\n $rsid_array = $this -> uri -> segment_array();\r\n\r\n foreach ($rsid_array as $key => $value) {\r\n \r\n //If the key is greater than 2 i.e is one of the the ids\r\n if ($key > 2) {\r\n\r\n //Run delete\r\n $this -> db -> delete('refSubs', array('id' => $value));\r\n\r\n } \r\n }\r\n\r\n }", "function row_delete()\n\t{\n\t $this->db->where('id', $id);\n\t $this->db->delete('testimonials'); \n\t}", "function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_person_detail\n\t\t\t\tWHERE psd_ps_id=?\";\n\t\t$this->hr->query($sql, array($this->psd_ps_id));\n\t}", "public static function delete_parent($id)\n {\n $department_parent = Department::where('parent',$id)->get();\n foreach ($department_parent as $sub)\n {\n self::delete_parent($sub->id);\n if ( !empty($sub->icon))\n {\n Storage::has($sub->icon)?Storage::delete($sub->icon):'';\n }\n\n $subdepartment = Department::find($sub->id);\n if (!empty($subdepartment))\n {\n $subdepartment->delete();\n }\n }\n $dep = Department::find($id);\n if ( !empty($dep->icon))\n {\n Storage::has($dep->icon)?Storage::delete($dep->icon):'';\n }\n $dep->delete();\n }", "public function deleteInterests($id){\n $sql =<<<SQL\nDELETE FROM Interests\nWHERE idUser=?\nSQL;\n $pdo = $this->pdo();\n $statement = $pdo->prepare($sql);\n\n $statement->execute(array($id));\n }", "function tree_delete_rec($id) {\n global $CFG, $DB;\n\n $deleted = array();\n if (empty($id)) return $deleted; \n\n // echo \"deleting $id<br/>\";\n // getting all subnodes to delete if is tree.\n if ($istree) {\n $sql = \"\n SELECT \n id\n FROM \n {{$table}cognitivefactory_opdata}\n WHERE\n operatorid = 'hierarchize' AND\n itemdest = {$id}\n \";\n // deleting subnodes if any\n if ($subs = $DB->get_record_sql($sql)) {\n foreach ($subs as $aSub) {\n $deleted = array_merge($deleted, tree_delete_rec($aSub->id));\n }\n }\n }\n // deleting current node\n $DB->delete_records('cognitivefactory_opdata', array('id' => $id)); \n $deleted[] = $id;\n return $deleted;\n}", "public function delete () {\n if(count($this->data[$this->id])) {\n foreach($this->data[$this->id] as $key=>$prop) {\n if($prop[\"link\"] == \"P127F\")\n $broader = $key;\n }\n }\n unset($this->data[$this->id][$broader]);\n \n // if there are still links, we must stop\n if(count($this->data[$this->id])) \n throw new Exception(\"Cannot remove because record has links! (remove them first)\");\n\n // remove table data linked to this record\n foreach($this->tables as $table) {\n $table->deleteMyData($this->id);\n }\n \n // remove link to class hierarchy and then the record itself\n IdaDb::deleteBy(\"_sys_classes_join\", array(\"subject\"=>$this->id));\n IdaDb::deleteBy(\"_sys_records\", array(\"id\"=>$this->id));\n \n }", "public function deleteFollowup($id){\n // Call deleteData() method of Page Model\n FamilyFollowup::deleteData($id);\n \n echo \"Delete successfully\";\n exit;\n }", "public function testMarketingCampaignsTypesIdSubTypesSubTypeIdDelete()\n {\n\n }", "function DELETEDataKelas ($id_kelas){\r\n\r\n //Perintah Delete Data Siswa\r\n $this->MKelas->DELETE($id_kelas);\r\n }", "public function destroy($id)\n { \n // 查询是否有子类\n $data = DB::table('goods_label')->where('pid','=',$id)->first();\n if (count($data)>0) {\n // 有子类不能删除\n echo 2;\n }else{\n $res = DB::table('goods_label')->where('id','=',$id)->delete();\n if ($res) {\n echo 1;\n }else{\n echo 0;\n }\n }\n }", "public function deleteTable(){\n\t \n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('DELETE FROM wp_nouveautes_test WHERE datep_nouveaute > \"2014-04-13\"');\n\n\t\t$wpdb->query('DELETE FROM wp_custom_categories_test WHERE term_id > 247');\n\t\t\t\t \n\t\t$wpdb->query('TRUNCATE TABLE wp_subcategories_test');\n\t\t\n\t\t$wpdb->query('TRUNCATE TABLE wp_extracategories_test');\n\t\t\n\t\t$wpdb->query('TRUNCATE TABLE wp_updated');\n\t\t \t\t \n\t}", "function delete() {\n \tglobal $mysql;\n \tif(empty($this->id)) return;\n \t$tablename = $this->class_name();\n \t$id = $this->id;\n \t$query = \"DELETE FROM $tablename WHERE id=$id\";\n \t$mysql->update($query);\n }", "private function delSubs($id){\n\t\t$db = Zend_Registry::get('db');\n\t\t$select = $db->select()\n\t\t\t\t\t->from('pages')\n\t\t\t\t\t->where('parent_id = ?',$id);\n\t\t$results = $db->fetchAll($select);\n\t\tif($results){\n\t\t\t$db->delete('pages',array(\n\t\t\t\t'id = ?' => $results[id],\n\t\t\t));\n\t\t\t$db->delete('routes',array(\n\t\t\t\t'type = ?' => 'content',\n\t\t\t\t'seg_id = ?' => $results[id],\n\t\t\t));\n\t\t\t// recurse through possible child items\n\t\t\t$this->delSubs($results[id]);\n\t\t}\n\t}", "function delete() {\n\t \t\n\t \t$sql = \"DELETE FROM evs_database.evs_group (gru_id, gru_name, gru_head_dept,gru_company_id)\n\t \tVALUES(?, ?, ?,?) \n\t\tWHERE gru_id = '$gru_id' \";\n\t\t\n\t \t$this->db->query($sql, array($this->gru_id, $this->gru_name, $this->gru_head_dept ,$this->gru_company_id));\n\t }", "public function destroy($id)\n {\n Subcategory_standar::findOrFail($id)->delete();\n }", "function admin_delete($id=null){\n\t $id = base64_decode($id);\n\t $this->UserGroup->id = $id;\n $this->UserGroup->delete($id);\n $this->Session->setFlash('User Group deleted sucessfully.','message/green');\n $this->redirect(array('action' => 'index'));\n }", "public function delete()\n {\n try {\n parent::delete(null, $this->data['id']);\n } catch (Exception $e) {\n die('ERROR');\n }\n }", "public function delete_seopages_id($seopages_id){\n $sqld_seo = \"delete from digital_marketing where id='$seopages_id'\";\n $resultd_seo = mysqli_query($this->db,$sqld_seo);\n return $resultd_seo; \n }", "function deleteDemandes($idTags, $idUser){\r\n \r\n\r\n }", "public function deleteDatabaseStructure( );", "function delete_type($id)\n\t\t{\n\t\t\n\t\t$this->db->where('revenue_id',$id);\n\t\t\n\t\t$this->db->delete($this->table_name);\n\t\t\n\t\t}", "public function delete () {\n $this->db->delete('turmas', array('idturma' => $this->idturma));\n }", "public function delete($id)\n {\n $this->db->where('id', $id);\n $this->db->delete('reeks');\n }", "function newsItem_HapusData( $tbl_news, $id){\n\t\t$sql = mysql_query(\"\n\t\t\tDELETE FROM $tbl_news WHERE id='$id'\n\t\t\");\n\t\treturn $sql;\n\t}", "function _process_delete($update_id)\n{\n\n $data = $this->fetch_data_from_db($update_id);\n \n $this->_delete($update_id);\n\n //delete the faciitiy record from store_items\n}", "public function hapus($KdSubKategori){\n self::find($KdSubKategori)->delete();\n }", "public function delete_fk_kehadiran($tahun,$id)\n\t{\n\t\t$this->db->where('idsiswa',$id);\n\t\t$this->db->where('idtahun_pelajaran',$tahun);\n $this->db->delete('sr_kehadiran');\n\t}", "public function delete($id) {\n \n \t$oUserUserGroupAO = CYTSecureDAOFactory::getUserUserGroupDAO();\n $oUserUserGroupAO->deleteUserUserGroupForUser($id);\n\t\tparent::delete( $id );\n\t\t\n \t\n }", "public function delete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'detailfasilitaskesehatan', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$query = $this->podb->deleteFrom('detailfasilitaskesehatan')->where('id', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query->execute();\n\t\t\t$this->poflash->success('Detailfasilitaskesehatan has been successfully deleted', 'admin.php?mod=detailfasilitaskesehatan');\n\t\t}\n\t}", "public function DeleteFood($sku){\r\n $conn = new ConnectionManager();\r\n $pdo = $conn->getConnection();\r\n \r\n\r\n // YOUR CODE GOES HERE\r\n\r\n return $isOk;\r\n }", "function delete()\n {\n $GLOBALS['DB']->exec(\"DELETE FROM stores WHERE id = {$this->getId()};\");\n $GLOBALS['DB']->exec(\"DELETE FROM stores_brands WHERE store_id = {$this->getId()};\");\n }", "protected function deleteData($data) {\n \t$data = parent::deleteData($data);\n\n \tif (!$data) {\n \t\treturn $data;\n \t}\n\n $path = $data->getPath();\n\n $query = $this->createQuery(0, null, true);\n $query->setFields('{id}');\n $query->addCondition('{parent} = %1% OR {parent} LIKE %2%', $path, $path . self::PATH_SEPARATOR . '%');\n \t$children = $query->query();\n\n \t$this->delete($children);\n\n \treturn $data;\n }", "public function hapus($user_id){\n $this->db->where('user_id', $user_id);\n $this->db->delete('tbl_users'); // Untuk mengeksekusi perintah delete data\n }", "public function DeleteData($id){\n \t$db = $this->getDb();\n \t\t$where = array(0 => \"aclusuariosonline_id = \".$id);\n\t\t$db->delete($this->_nametable, $where);\t\t\n\t}", "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}", "function delete_siswa($id_siswa)\n {\n return $this->db->delete('siswa',array('id_siswa'=>$id_siswa));\n }", "public function delete_info($i_id) {\n \n }", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function destroy($id)\n {\n $subtemaall =Subtema::find($id);\n $subtemaall->delete();\n }", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "function delete_kategori_induk($id)\n {\n return $this->db->delete('kategori_induk',array('kode_kategori_induk'=>$id));\n }", "public function delete(){\n \t\ttry{\n \t\t\t$db = DB::get();\n \t\t\t$sql = \"UPDATE t_\" . self::$Table . \" \n \t\t\t\t\tSET \" . self::$Table . \"_supprime='1' \n \t\t\t\t\tWHERE \" . self::$Table . \"_id = '\".$this->Id.\"' \";\n \t\t\n \t\t\t$result = $db->query($sql);\n \t\t}\n \t\tcatch(Exception $e){\n \t\t\tvar_dump($e->getMessage());\n \t\t}\n }", "function hapus_pelanggan(){\n\t\t$id['kd_pelanggan'] = $this->uri->segment(3);\n\t\t$this->model_app->deleteData('tbl_pelanggan',$id);\n\t\tredirect('master_pelanggan');\n\t}", "public function fulldelete() {\n if ($this->id && !$this->elements) {\n $this->elements = self::get_instances(array('setid' => $this->id));\n }\n\n foreach ($this->elements as $elm) {\n $elm->delete();\n }\n\n parent::delete();\n }", "function delete() {\n\t\t$sql = \"DELETE FROM cost_detail\n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq));\n\t}", "public function delete($id) {\r\n $sql= \"delete from bestelling where id=? limit 1\";\r\n $args=func_get_args();\r\n parent::execPreppedStmt($sql,$args);\r\n }", "public function destroy($id)\n {\n $hierarchy = Hierarchy::find($id)->delete();\n Session::put('message', 'Hierarchy Deleted Successfully !!');\n return Redirect::to('/admin/hierarchy/'); \n }", "public function delete_info($i_id)\r\n { \r\n }", "public function deleteById($parentId);", "public function delete($tables,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->delete($tables);\n }", "public function delete($tables,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->delete($tables);\n }", "public function delete($tables,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->delete($tables);\n }", "function delete_objlist($obj_level){\n\t\t$username = $this->session->userdata('username');\n\t\t$query = $this->db->query(\"delete from `sys_user_obj` where obj_level = '\". $obj_level .\"'\");\n\t\treturn $query;\n\t}", "public function delete(){\n\t $this->model->clear()->filter(array('preview_master_id' => WaxUrl::get(\"id\")))->delete();\n\t parent::delete();\n\t}", "public function vymaz(){\r\n $db = napoj_db();\r\n $sql =<<<EOF\r\n DELETE FROM Diskusie WHERE id = \"$this->ID\";\r\nEOF;\r\n $ret = $db->exec($sql);\r\n if(!$ret){\r\n echo $db->lastErrorMsg();\r\n }\r\n $db->close();\r\n }", "public function delete() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\tif (! isset ( $this->id )) {\r\n\t\t\t\techo \"Fatal Error: Id is not set for the object! Please do \\$objA->setId(\\$dsh_id); in: \" . __METHOD__;\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t//check if record exists\r\n\t\t\tif(! $this->exists ()) {\r\n\t\t\t\techo \"Fatal Error: No record found with primary key of ($this->id)\";\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\r\n\t\t\t$sql = \"DELETE FROM $this->sqlTable \";\r\n\t\t\t$sql .= \" WHERE dsh_id = ?\";\r\n\r\n\t\t\t$ks_db->query ( $sql, $this->id );\r\n\r\n\t\t\t$ks_db->commit ();\r\n\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql );\r\n\t\t\techo \"Fatal Error: \" . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "function ajaxDeleteMaster($id){ $sqlselect = \"SELECT id_data from ps.tdata where id_master = '$id'\";\n $result = $this->db->query($sqlselect)->result_array();\n\n if(count($result) > 0){\n echo 'failed';\n }else{\n //del data\n $sqldelete = \"DELETE FROM ps.tmaster WHERE id='$id';\";\n $sqldelete .= \"DELETE FROM ps.tappr WHERE id='$id';\";\n\n $this->db->query($sqldelete);\n echo 'ok';\n }\n }", "public function delete($id){\n $sql=\" DELETE FROM \" .$this->table[0].\" WHERE sid= '\".$id.\"'\";\n return mysqli_query($this->conn, $sql);\n }", "function delete(){\n // Delete subclauses\n foreach($this->subClause as $clause){\n $clause->delete();\n }\n \n mysql_query(\"DELETE FROM resolution WHERE id='$this->clauseId'\") or die(mysql_error());\n }" ]
[ "0.62733424", "0.62235725", "0.62157756", "0.62139976", "0.6106473", "0.61022407", "0.607078", "0.59924895", "0.59680104", "0.5967285", "0.5959872", "0.5956823", "0.5943167", "0.59360796", "0.5932611", "0.592903", "0.5920857", "0.5917502", "0.58952016", "0.58492196", "0.5833862", "0.5831211", "0.5826286", "0.58206236", "0.5820274", "0.58144397", "0.5811189", "0.58044726", "0.57949847", "0.57909805", "0.5784548", "0.57795364", "0.5779226", "0.5775689", "0.577487", "0.5767456", "0.57656497", "0.57580936", "0.5740346", "0.57322925", "0.5726117", "0.57249254", "0.5719947", "0.5717912", "0.5717144", "0.571634", "0.5698539", "0.5697084", "0.56811136", "0.5678244", "0.56778926", "0.56774276", "0.5676515", "0.56750387", "0.56723994", "0.5671509", "0.5667026", "0.566302", "0.5654131", "0.56528586", "0.5644509", "0.56371295", "0.5636835", "0.56348085", "0.563454", "0.56319964", "0.5631299", "0.56257087", "0.5625366", "0.56181306", "0.5616867", "0.5616424", "0.5615741", "0.5610379", "0.5606151", "0.5605206", "0.5604948", "0.5604377", "0.5601027", "0.55995965", "0.55965114", "0.559645", "0.55931437", "0.55922997", "0.5592288", "0.5587288", "0.5579557", "0.5579046", "0.55769193", "0.5572983", "0.5568446", "0.5568446", "0.5568446", "0.556841", "0.5560879", "0.5557902", "0.5548203", "0.5547785", "0.5542464", "0.55402607" ]
0.6052395
7
/ sku Hierarchy end / sku Hierarchy Element Start
public function getSkuHierarchyElements () { // $sql = "select t1.id as sku_hierarchy_element_by_id,t1.element_name,t1.element_code,t1.element_description,t1.element_category_id,t1.parent_element_id, // t2.id as parent_layer_id,t3.id,t3.layer_name as element_category, // (Select b.element_name from tbld_sku_hierarchy_elements as b where t2.id = b.id) // as parent_element_name from tbld_sku_hierarchy_elements // as t1 left join tbld_sku_hierarchy_elements as t2 on t2.id = t1.parent_element_id // left join tbld_sku_hierarchy as t3 on t2.element_category_id = t3.id "; $sql = "SELECT t1.*,t1.id as sku_hierarchy_element_by_id,t2.layer_name as element_category,t3.element_name as parent_element_name FROM `tbld_sku_hierarchy_elements` as t1 left join `tbld_sku_hierarchy` as t2 on t1.element_category_id=t2.id left join `tbld_sku_hierarchy_elements` as t3 on t1.parent_element_id=t3.id"; $query = $this->db->query( $sql )->result_array(); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_sitetree(&$massiv, $start, $level){\n\t\tglobal $web;\n\t\t\n\t\t$list \t= '';\n\t\t$class \t= '';\n\t\tif (!isset($massiv[$start])) return;\n\t\t\n\t\tif ($level == 1) {\n\t\t\t$class \t= 'sub';\n\t\t} elseif ($level == 2) {\n\t\t\t$class = 'subsub';\n\t\t}\n\t\t\n\t\tforeach($massiv[$start] as $key=>$value){\n\t\t\t$list .= '<a class=\"'.$class.'\" href=\"'.SmartUrlEncode(WBG::crosslink($value)).'\">'.$value['title'].'</a>';\n\t\t\t$list .= get_sitetree($massiv, $key, $level+1);\n\t }\n\t \n\t\treturn $list;\n\t}", "public function getSkuHierarchy ()\n {\n $sql = \"select t1.id,t1.layer_name,t1.layer_code,t1.layer_description,t1.parent_layer_id,t2.id as parent_layer_id,\"\n . \" (Select b.layer_name from tbld_sku_hierarchy as b where t2.id = b.id) as parent_layer_name from tbld_sku_hierarchy as t1 left join tbld_sku_hierarchy as t2 on t2.id = t1.parent_layer_id \";\n $query = $this->db->query( $sql )->result_array();\n return $query;\n }", "function wp_find_hierarchy_loop_tortoise_hare($callback, $start, $override = array(), $callback_args = array(), $_return_loop = \\false)\n {\n }", "function getChildNodes() ;", "public function test_ouwiki_build_up_sub_index() {\n $index = [\n 1 => (object) ['linksto' => [2]],\n 2 => (object) ['linksto' => [1]]\n ];\n $subtree = [];\n ouwiki_build_up_sub_index(1, $index,$subtree);\n $this->assertEquals($index, $subtree);\n }", "public function getElementPrefix();", "function addSubListIndex($supElem,$subElem){\r\n\t\tif($supElem->data==null) $supElem->data=new LinkedList($supElem->key);\r\n\t\t$supElem->data->insertLast($subElem);\r\n\t}", "public function getSkuName ()\n {\n $sql = \" SELECT t1.id,sku_name,sku_description,sku_code,sku_weight_id,sku_lpc,sku_volume,sku_launch_date,t8.sku_type_name,\n GROUP_CONCAT(t5.unit_name SEPARATOR '<br /><br />') AS unit,t2.quantity,\n GROUP_CONCAT(ROUND(t2.db_lifting_price,2) SEPARATOR '<br /><br />') as db_lifting_price ,\n GROUP_CONCAT(ROUND(t2.outlet_lifting_price,2) SEPARATOR '<br /><br />') AS outlet_lifting_price,\n GROUP_CONCAT(ROUND(t2.mrp_lifting_price,2) SEPARATOR '<br /><br /> ') AS mrp_lifting_price ,\n t3.element_name,t4.sku_active_status_name,t5.unit_name,t6.element_name as product,\n t7.element_name as catagory\n FROM tbld_sku AS t1\n INNER JOIN\n `tbli_sku_mou_price_mapping` AS t2\n ON t1.id = t2.sku_id\n INNER JOIN\n tbld_sku_active_status AS t4\n ON t1.sku_active_status_id = t4.id\n INNER JOIN\n tbld_sku_hierarchy_elements AS t3\n ON t1.parent_id = t3.id\n INNER JOIN\n tbld_unit AS t5\n ON t5.id= t2.mou_id\n left join tbld_sku_hierarchy_elements as t6\n on t6.id = t3.parent_element_id\n left join tbld_sku_hierarchy_elements as t7\n on t7.id = t6.parent_element_id\n left Join `tbld_sku_type` as t8\n On t1.sku_type_id=t8.id\n GROUP BY t2.sku_id\n ORDER BY t2.sku_id,t2.quantity asc\";\n $query = $this->db->query( $sql )->result_array();\n return $query;\n }", "function wp_find_hierarchy_loop($callback, $start, $start_parent, $callback_args = array())\n {\n }", "function start_lvl(&$output, $depth = 0, $args = array()) {\n\t\t $output .= \"<span class='subcategories'>\";\n\t\t}", "public function getFirstChild();", "public function getChildNodes() {}", "public function getChildNodes() {}", "function _get_item_segments()\n{\n$segments = \"musical/instrument/\";\nreturn $segments;\n\n}", "public function getSubNodeNames();", "function getSkus() {\n\techo \"Getting Skus </br>\";\n\t$response = getRequest('/api/sku');\n\tprintInfo($response);\n}", "public function getStopPageTree() {}", "function GetStructureInArray( $spr, $level_start = 0, $lang_id = NULL, $default_val = NULL, $spacer = NULL, $show_shortname = 1, $show_name = 1, $show_sublevels = 1, $front_back = 'back', $mas=NULL )\n {\n $db = DBs::getInstance();\n if( empty($lang_id) ) $lang_id = $this->lang_id;\n if( $show_sublevels==0){\n $rows = 0;\n }\n else\n {\n if($level_start!=0)\n {\n $q = \"SELECT `node` FROM `\".$spr.\"` WHERE `level`='$level_start' group by level\";\n $res = $db->db_Query( $q );\n if( !$res )return false;\n $row=$db->db_FetchAssoc();\n $curr_node = $row['node'];\n }\n else\n $curr_node = 0;\n $q = \"SELECT MAX(`node`) as max FROM `\".$spr.\"`\";\n $res = $db->db_Query( $q );\n if( !$res )return false;\n $row = $db->db_FetchAssoc();\n $max_node = $row['max'];\n $rows = $max_node - $curr_node;\n }\n $q='SELECT t0.node as node0, t0.cod as cod0 ';\n if ($show_shortname==1) $q.=', t0.short as short0';\n if ($show_name==1) $q.=', t0.name as name0';\n for($i=1; $i<=$rows;$i++)\n {\n $q.=', '.'t'.$i.'.node as node'.$i.', '.'t'.$i.'.cod as cod'.$i;\n if ($show_shortname==1) $q.=', t'.$i.'.short as short'.$i;\n if ($show_name==1) $q.=', t'.$i.'.name as name'.$i;\n }\n $q.= ' FROM '.$spr.' AS t0 ';\n for($i=1; $i<=$rows;$i++)\n {\n $q.='LEFT JOIN '.$spr.' AS t'.$i.' ON ( t'.$i.'.level = t'.($i-1).'.cod AND t'.$i.'.lang_id = t'.($i-1).'.lang_id) ';\n }\n $q.=' WHERE 1 ';\n $q = $q.\" AND t0.level = '\".$level_start.\"' AND t0.lang_id='\".$lang_id.\"' ORDER BY t0.move \";\n $res = $db->db_Query( $q );\n //echo '<br>q='.$q.' res='.$res.' $db->result='.$db->result;\n if( !$res )return false;\n $rows_count = $db->db_GetNumRows();\n //echo '<br> $rows='.$rows;\n $mas[''] = $default_val;\n for( $i = 0; $i < $rows_count; $i++ )\n {\n $row=$db->db_FetchAssoc();\n for($j=0;$j<=$rows;$j++){\n if(!isset($mas[$row['cod'.$j]]) && !is_null($row['cod'.$j]))\n {\n $output_str = $spacer;\n for($k=1;$k<=$row['node'.$j];$k++){\n $output_str.= $spacer;\n }\n if( $show_shortname ) $output_str = $output_str.' '.stripslashes($row['short'.$j]);\n if( $show_name ) $output_str = $output_str.' '.stripslashes($row['name'.$j]);\n\n $mas[$row['cod'.$j]] = $output_str;\n }\n }\n }\n return $mas;\n }", "function get_usertyp($usrid){\r\n\t\r\n}", "function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)\n {\n }", "public function __construct($_sKU = NULL,$_startPrice = NULL,$_quantity = NULL,$_variationSpecifics = NULL,$_quantitySold = NULL,$_sellingStatus = NULL,$_discountPriceInfo = NULL,$_any = NULL)\r\n\t{\r\n\t\tparent::__construct(array('SKU'=>$_sKU,'StartPrice'=>$_startPrice,'Quantity'=>$_quantity,'VariationSpecifics'=>($_variationSpecifics instanceof EbayShoppingStructNameValueListArrayType)?$_variationSpecifics:new EbayShoppingStructNameValueListArrayType($_variationSpecifics),'QuantitySold'=>$_quantitySold,'SellingStatus'=>$_sellingStatus,'DiscountPriceInfo'=>$_discountPriceInfo,'any'=>$_any));\r\n\t}", "public function getChildElements() {}", "private function changesku(){\t \r\n\t $this->chartValue(); //adding to output\r\n\t $this->idleStHealthChk(); //adding to output\r\n\t}", "function beginSubMenu() {\n\t\treturn html_ao('ul', array('class' => 'submenu'));\n\t}", "function _get_items_segments()\n{\n$segments = \"music/instruments/\";\nreturn $segments;\n\n}", "abstract protected function get_root_element();", "public function getChildNodes();", "public function nodeLow();", "abstract protected function getGroupStructure();", "public function getSku();", "public function getSku();", "public function getSku() {\n return $this->_sku;\n }", "function pi_authoring_convert_heirarchy_form_elements(&$hierarchy_elements)\n{\n\t$rows = array();\n\tforeach (element_children($hierarchy_elements) as $region)\n\t{\n\t\t$rows[$region] = array();\n\t\tforeach (element_children($hierarchy_elements[$region]) as $key)\n\t\t{\n\t\t\t$rows[$region][$key] = array();\n\t\t\t$hierarchy_elements[$region][$key]['weight']['#attributes']['class'] = 'sort_list-weight sort_list-weight-'. $region;\n\t\t\t$hierarchy_elements[$region][$key]['region']['#attributes']['class'] = 'sort_list-region-select sort_list-region-'. $region;\n\n\t\t\t$rows[$region][$key]['title'] = drupal_render($hierarchy_elements[$region][$key]['title']);\n\t\t\t$rows[$region][$key]['description'] = drupal_render($hierarchy_elements[$region][$key]['description']);\n\t\t\t\n\t\t\t$rows[$region][$key]['region'] = drupal_render($hierarchy_elements[$region][$key]['region']);\n\t\t\t$rows[$region][$key]['weight'] = drupal_render($hierarchy_elements[$region][$key]['weight']);\n\t\t}\n\t}\n\treturn $rows;\n}", "public function nodeMid();", "public function getSku()\n {\n return $this->sku;\n }", "private function getProductQuery(string $sku): string\n {\n return <<<QUERY\n{\n products(search: \"{$sku}\") {\n items {\n sku\n ... on BundleProduct {\n items {\n sku\n option_id\n uid\n required\n type\n title\n options {\n uid\n label\n product {\n sku\n }\n can_change_quantity\n id\n uid\n price\n quantity\n }\n }\n }\n }\n }\n}\nQUERY;\n }", "function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {\n\n\t\tif ($item->title == 'Instagram') {\n\t\t\t$output .= sprintf( \"\\n<li><span class='screen-reader-text'>%s</span><a href='%s' target='_blank'>\n\t\t\t<svg width='24' height='24' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z'></path></svg>\n\t\t\t</a></li>\\n\", // I dont understand the %s entirley but it brings things up \"s\"tring from below https://www.php.net/manual/en/function.sprintf.php\n\t\t\t\t$item->title,\n\t\t\t\t$item->url\n\t\t\t);\n\t\t} elseif ($item->title == 'Facebook') {\n\t\t\t$output .= sprintf( \"\\n<li><span class='screen-reader-text'>%s</span><a href='%s' target='_blank'>\n\t\t\t<svg width='24' height='24' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z'></path></svg>\n\t\t\t</a></li>\\n\",\n\t\t\t\t$item->title,\n\t\t\t\t$item->url\n\t\t\t);\n\t\t} elseif ($item->title == 'mailto:') {\n\t\t\t$output .= sprintf( \"\\n<li><span class='screen-reader-text'>%s</span><a href='mailto:%s' target='_blank'>\n\t\t\t<svg width='24' height='24' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M20,4H4C2.895,4,2,4.895,2,6v12c0,1.105,0.895,2,2,2h16c1.105,0,2-0.895,2-2V6C22,4.895,21.105,4,20,4z M20,8.236l-8,4.882 L4,8.236V6h16V8.236z'></path></svg>\n\t\t\t</a></li>\\n\",\n\t\t\t\t$item->title,\n\t\t\t\t$item->url\n\t\t\t);\n\t\t} else {\n\t\t\t$output .= sprintf( \"\\n<li><span class='screenreader'>%s</span</li>\\n\",\n\t\t\t\t$item->title\n\t\t\t);\n\t\t}\n\t}", "public function getItemPath($item_id,$start=true){\n\n if($item_id != 0) {\n $sql=\"SELECT * FROM `\".$this->db_table.\"` WHERE `\".$this->item_identifier_field_name.\"`='\".$item_id.\"' \";\n $res=mysql_query($sql);\n $itemdata=mysql_fetch_assoc($res);\n array_push($this->item_path,$itemdata); \n\n if($itemdata[$this->parent_identifier_field_name]!=0) {\n $this->item_path=$this->getItemPath($itemdata[$this->parent_identifier_field_name],false);\n } \n if ($start) {\n $this->item_path=array_reverse($this->item_path);\n }\n }\n return $this->item_path;\n\n }", "private function get_ancestry($html, $rec) //$rec here is just for debug\n {\n $final = array();\n if(preg_match(\"/<div id=\\'totaxonomicTree\\'(.*?)<\\/div>/ims\", $html, $arr)) {\n if(preg_match_all(\"/<li>(.*?)<\\/li>/ims\", $arr[1], $arr2)) {\n foreach($arr2[1] as $str) {\n $str = str_replace(\" \", \"\", $str);\n $tmp = explode(\":\", $str);\n $tmp = array_map('trim', $tmp);\n $final[strtolower($tmp[0])] = $tmp[1];\n }\n // print_r($final); exit;\n return $final;\n }\n }\n else { //this else block is just for debug purposes\n /*\n if(in_array($rec['taxon_id'], array(95039, 95040, 78183, 108068, 107786, 92832, 107788, 90892, 90245, 108160, 87383, 108067, 106720, 102603, 108161))) {} //these taxon_id's are for dieseases names e.g. 'African swine fever' OR non-taxon names\n elseif(in_array($rec['taxon_id'], array(121671, 120803, 120994, 109730))) {} //acceptable to have no ancestry e.g. 'Bothriocephalus acheilognathi infection' but with ranges\n else {\n print_r($rec);\n echo(\"\\nInvestigate no ancestry\\n\");\n }\n if($rec['taxon_ranges']) {\n echo(\"\\nInvestigate no ancestry. Ranges total: \".count($rec['taxon_ranges']).\"\\n\");\n }\n */\n }\n return $final;\n }", "public function findProduct(\r\n $sku\r\n, $name = null\r\n, $skuMatchMode = 'IGNORE_DASH'\r\n, $baseSkuSearchFlag = true\r\n) { \r\n global $baseSkuAttributeId;\r\n\t$sku = str_replace('\\'', '', $sku);\r\n\t$sku = str_replace('\\\\', '', $sku);\r\n\t$sku = trim($sku, '()');\r\n\t$resource = Mage::getSingleton('core/resource');\r\n\t$readConnection = $resource->getConnection('core_read');\r\n\t$table = $resource->getTableName('catalog/product');\r\n $findResult = array('search_mask' => null, 'product_data' => array(), \r\n 'no_base_sku_count' => 0, 'base_sku_count' => 0\r\n );\r\n\t// try to match words\r\n\tif (strlen($sku) >=4) { \r\n if ($skuMatchMode == 'LEFT') { \r\n $findResult['search_mask'] = \" \" . $sku . \" %\";\r\n $searchExpression = \"concat(' ', sku, ' ') like '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'LEFT_IGNORE_DASH') { \r\n $findResult['search_mask'] = str_replace('-', ' ', \" \" . $sku . \" %\");\r\n $searchExpression = \"concat(' ', replace(sku, '-', ' '), ' ') like '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'EXACT') { \r\n $findResult['search_mask'] = $sku;\r\n $searchExpression = \"sku = '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'IGNORE_DASH') { \r\n $findResult['search_mask'] = str_replace('-', ' ', $sku);\r\n $searchExpression = \"replace(sku, '-', ' ') = '\" . $findResult['search_mask'] . \"'\";\r\n } else {\r\n throw new Exception('Uknown skuMatchMode: \"' . $skuMatchMode . '\"');\r\n } \r\n $findResult['product_data'] = $readConnection->fetchAll(\r\n \"select entity_id as product_id, sku \r\n from \" . $table . \" p\r\n where \r\n -- website SKU is at the beginning\r\n \" . $searchExpression\r\n );\r\n if ($baseSkuSearchFlag) { \r\n // add base sku search\r\n if (!isset($baseSkuAttributeId)) {\r\n $baseSkuAttributeId = $readConnection->fetchOne(\r\n \"select attribute_id from eav_attribute where attribute_code = 'base_sku'\"\r\n );\r\n } \r\n $baseSkuResult = \r\n $readConnection->fetchAll( \r\n \"select \r\n entity_id as product_id\r\n , (select sku from catalog_product_entity p where p.entity_id = v.entity_id) as sku\r\n , value as base_sku\r\n from\r\n catalog_product_entity_varchar v\r\n where \r\n -- source sku is like (contains) base sku\r\n -- replace dashes with spaces\r\n ' \" . str_replace('-', ' ', $sku) . \" ' \r\n like concat('% ', replace(value, '-', ' '), ' %')\r\n and v.attribute_id = \" . $baseSkuAttributeId \r\n );\r\n $findResult['no_base_sku_count'] = count($findResult['product_data']); \r\n if (count($baseSkuResult) > 0) {\r\n $findResult['base_sku_count'] = count($baseSkuResult);\r\n $findResult['product_data'] = array_merge($findResult['product_data'], $baseSkuResult);\r\n $findResult['search_mask'] = $findResult['search_mask'] . \" && base_sku\";\r\n $this->logMessage('baseSkuResult: count=' . count($baseSkuResult));\r\n }\r\n }\r\n\t}\t\r\n\tif (!empty($name) && count($findResult['product_data']) == 0) { \r\n\t $words = explode(' ', strtr(trim($name), '-:', ' '));\r\n\t foreach ($words as $word) { \r\n\t\t$findResult = findProduct($word, null, $skuMatchMode, $baseSkuSearchFlag);\r\n\t\t// For name words allow only one match\r\n\t\tif (count($findResult['product_data']) == 1) { \r\n\t\t return $findResult;\r\n\t\t} \r\n\t } \r\n\t} \r\n\treturn $findResult;\r\n}", "function tep_get_subCategory($tagValue){\n\tglobal $languages_id,$customer_group_id;\n\t//禁用的电池分类ID @nathan 2011-11-2\n\t//$disable_batteries = array(1,3,21,23,25,73,111,307,314,499);\n\t$disable_batteries = array(23,25,73,111,307,499);\n\t$disable_batteries_three = array(188,191,192,193,194,195,502,556,112,115,117,126,129,136,139,141,172,175,601,181,306,312,313,500,501,562,197,198,202,204,205,206,208,210,211,212,213,217,218,220,503,504,505,521,557,558,559,560,561,563,507,508,509,510,511,512,513,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,741);\n\t$jsonData = array();\n\tif (isset($tagValue) && !empty($tagValue)){\n\t\t# \n\t\t# URL\n\t\t# Ʒ\n\t\t# |_| |=|\n\t\t$topNavi_categories_sql = sprintf(\"SELECT DISTINCT C.categories_id,C.parent_id, CD.categories_name FROM %s AS CD INNER JOIN %s AS C ON CD.categories_id=C.categories_id WHERE CD.language_id=%u AND C.products_group_access like '%s' AND C.parent_id=%u ORDER BY C.sort_order ASC\",TABLE_CATEGORIES_DESCRIPTION,TABLE_CATEGORIES,(int)$languages_id,\"%\".$customer_group_id.\"%\",(int)$tagValue);\n\t\t$topNavi_categories_query = tep_db_query($topNavi_categories_sql);\n\t\tif (tep_db_num_rows($topNavi_categories_query) > 0){\n\t\t\t$i = 0;\n\t\t\twhile ($topNavi_categories = tep_db_fetch_array($topNavi_categories_query)) {\n\t\t\t\t//禁止显示的电池分类 @nathan 2011-11-2\n\t\t\t\tif($tagValue == 408 && in_array($topNavi_categories['categories_id'], $disable_batteries)) continue;\n\n\t\t\t\t$products_in_category = tep_count_products_in_category($topNavi_categories['categories_id']);\n\t\t\t\tif ($products_in_category > 0){\n\t\t\t\t\t$jsonData[$i]['name'] = $topNavi_categories['categories_name'];\n\t\t\t\t\t$jsonData[$i]['url'] = tep_href_link(FILENAME_DEFAULT,tep_get_abscPath($topNavi_categories['categories_id']),'NONSSL',false);\n\t\t\t\t\t$jsonData[$i]['parent'] = '0';\n\t\t\t\t\t$jsonData[$i]['num'] = tep_count_products_in_category($topNavi_categories['categories_id']);\n\t\t\t\t\t$i++;\n\t\t\t\t\t$sub_categories_sql = sprintf(\"SELECT DISTINCT C.categories_id,C.parent_id, CD.categories_name FROM %s AS CD INNER JOIN %s AS C ON CD.categories_id=C.categories_id WHERE CD.language_id=%u AND C.products_group_access like '%s' AND C.parent_id=%u ORDER BY C.sort_order ASC\",TABLE_CATEGORIES_DESCRIPTION,TABLE_CATEGORIES,(int)$languages_id,\"%\".$customer_group_id.\"%\",(int)$topNavi_categories['categories_id']);\n\t\t\t\t\t$sub_categories_query = tep_db_query($sub_categories_sql);\n\t\t\t\t\tif (tep_db_num_rows($sub_categories_query) > 0){\n\t\t\t\t\t\twhile ($sub_categories = tep_db_fetch_array($sub_categories_query)) {\n\t\t\t\t\t\t\tif(in_array($sub_categories['categories_id'], $disable_batteries_three)) continue;\n\t\t\t\t\t\t\t$products_in_subcategory = tep_count_products_in_category($sub_categories['categories_id']);\n\t\t\t\t\t\t\tif ($products_in_subcategory > 0){\n\t\t\t\t\t\t\t\t$jsonData[$i]['name'] = $sub_categories['categories_name'];\n\t\t\t\t\t\t\t\t$jsonData[$i]['url'] = tep_href_link(FILENAME_DEFAULT,tep_get_abscPath($sub_categories['categories_id']),'NONSSL',false);\n\t\t\t\t\t\t\t\t$jsonData[$i]['parent'] = $sub_categories['categories_id'];\n\t\t\t\t\t\t\t\t$jsonData[$i]['num'] = tep_count_products_in_category($sub_categories['categories_id']);\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}unset($products_in_subcategory);\n\t\t\t\t\t\t}unset($sub_categories);\n\t\t\t\t\t}unset($sub_categories_query,$sub_categories_sql);\n\t\t\t\t}unset($products_in_category);\n\t\t\t}unset($topNavi_categories);\n\t\t}unset($topNavi_categories_query,$topNavi_categories_sql);\n\t\t//echo json_encode($jsonData);\n\t\treturn $jsonData;\n\t}else{\n\t\treturn false;\n\t}\n}", "function get_prefix($CategoryID)\n{\n global $tpl, $template, $config, $mysql, $lang, $twig, $prefixed;\n $ParentID = $mysql->result('SELECT parent_id FROM '.prefix.'_eshop_categories WHERE id = '.$CategoryID.' ');\n \n $prefixed[$CategoryID]['f'] .= '&nbsp;&nbsp;&nbsp;';\n #$add_prefix .= '&nbsp;&nbsp;&nbsp;'; \n {\n if ($ParentID == 0) \n { \n $add_prefix .= ''; \n }\n else\n {\n $prefixed[$CategoryID]['s'] .= '<img src=\"/engine/plugins/eshop/tpl/img/tree.gif\">&nbsp;&nbsp;&nbsp;';\n $add_prefix .= '<img src=\"/engine/plugins/eshop/tpl/img/tree.gif\">&nbsp;&nbsp;&nbsp;';\n \n foreach ($mysql->select(\"SELECT * FROM \".prefix.\"_eshop_categories WHERE id=\".$ParentID.\" \") as $row2)\n {\n $CategoryID2 = $row2['id']; \n $ParentID2 = $row2['parent_id'];\n }\n\n get_prefix($CategoryID2);\n }\n }\n #var_dump($prefixed[$CategoryID]);\n return $add_prefix;\n}", "public function myHierarchy_get(){\n\t\t$userId = $this->token_payload[\"user_id\"];\n\t\tresponse($this,true,200,$this->getAllAccessibleProfiles($userId));\n\t}", "public function testGetSku()\n {\n $data_from_collection = $this->data['annual_collection'];\n $this->assertEquals(\n $data_from_collection['attributes']['plan_sku'],\n $this->makePlan($data_from_collection)->getSku()\n );\n\n $data_from_site = $this->data['annual_site'];\n $this->assertEquals($data_from_site['sku'], $this->makePlan($data_from_site)->getSku());\n }", "public function getSubUlClassLevel1()\n {\n return $this->subUlClassLevel1;\n }", "function getChilds($id = NULL);", "function endElement($parser, $name) {\n ## here we rest the current tag\n $this->current_tag = \"\";\n \n switch($name) {\n case 'PAGE' : {\n \t ## let's store the name for this page\n \t $this->page_object[$this->page_counter]['NAME'] = $this->page_name;\n \t $this->page_counter++;\n \t \n ## clear the vars\n $this->current_block = '';\n $this->page_name = '';\n \n break;\n } \n case 'ROW' : {\n \t$this->rows_object[$this->row_counter]['NAME'] = $this->row_name;\n \t$this->page_object[$this->page_counter][$this->row_counter]['NAME'] = $this->row_name;\n \t$this->row_counter++;\n \n \t## clear the vars\n \t$this->current_block = '';\n \t\t\t\t$this->row_name = '';\n \tbreak;\n } \n default: { \n ## store the thing- needs to be checked!\n if(isset($this->rows_object[$this->row_counter])) {\n \t$num_elements = count($this->rows_object[$this->row_counter]);\n } else {\n \t$num_elements = 0;\n }\n \n $this->rows_object[$this->row_counter][$num_elements++] = $this->element_object;\n\n if(isset($this->page_object[$this->page_counter][$this->row_counter])) {\n \t$num_elements = count($this->page_object[$this->page_counter][$this->row_counter]);\n } else {\n \t$num_elements = 0;\n }\n \n $this->page_object[$this->page_counter][$this->row_counter][$num_elements++] = $this->element_object;\n $this->objects[$this->element_object['TYPE']] = true;\n \n ## clear the vars\n $this->element_object = '';\n $this->current_block = '';\n break;\n }\n\n } \n\n }", "function cognitivefactory_tree_get_upper_branch($id, $includeStart = false, $returnordering = false) {\n global $CFG, $DB;\n\n $nodelist = array();\n $res = $DB->get_record('cognitivefactory_opdata', array('id' => $id));\n if ($includeStart) $nodelist[] = ($returnordering) ? $res->intvalue : $id ; \n while($res->itemdest != 0) {\n $res = $DB->get_record($table, array('id' => $res->itemdest, 'operatorid' => 'hierarchize'));\n $nodelist[] = ($returnordering) ? $res->intvalue : $res->itemdest;\n }\n $nodelist = array_reverse($nodelist);\n return $nodelist;\n}", "function startElement($parser, $name, $attrs) {\n\tglobal $depth, $curpath, $cfg, $havedata;\n\n\t$listtags = explode(\" \", \"rule user group key dnsserver winsserver pages \" .\n\t\"encryption-algorithm-option hash-algorithm-option hosts tunnel onetoone \" .\n\t\"staticmap route alias pipe queue shellcmd cacert earlyshellcmd mobilekey \" .\n\t\"servernat proxyarpnet passthrumac allowedip wolentry vlan domainoverrides element\");\n\n\n\t\n\tarray_push($curpath, strtolower($name));\n\t\n\t$ptr =& $cfg;\n\tforeach ($curpath as $path) {\n\t\t$ptr =& $ptr[$path];\n\t}\n\t\n\t/* is it an element that belongs to a list? */\n\tif (in_array(strtolower($name), $listtags)) {\n\t\n\t\t/* is there an array already? */\n\t\tif (!is_array($ptr)) {\n\t\t\t/* make an array */\n\t\t\t$ptr = array();\n\t\t}\n\t\t\n\t\tarray_push($curpath, count($ptr));\n\t\t\n\t} else if (isset($ptr)) {\n\t\t/* multiple entries not allowed for this element, bail out */\n\t\tdie(sprintf(\"XML error: %s at line %d cannot occur more than once\\n\",\n\t\t\t\t$name,\n\t\t\t\txml_get_current_line_number($parser)));\n\t}\n\t\n\t$depth++;\n\t$havedata = $depth;\n}", "public function getElements($start = 0, $end = -1);", "public function get_product_attributes() : array {\n\t\t$sku_wrapper = $this->dom->find( '#j-product-info-sku' );\n\t\tif ( 1 > count( $sku_wrapper ) ) {\n\t\t\treturn [\n\t\t\t\t'attributes' => [],\n\t\t\t];\n\t\t}\n\n\t\t$sku_sets = $sku_wrapper[0]->find( '.p-property-item' );\n\t\t$sku_data = [];\n\t\tfor ( $i = 0; $i < count( $sku_sets ); $i++ ) { // @codingStandardsIgnoreLine Count is lightweight\n\t\t\t// Drop it into a var so it can be looped.\n\t\t\t$sku_set = $sku_sets[ $i ];\n\n\t\t\t// Get the variation label.\n\t\t\t$label = $sku_set->find( '.p-item-title' )[0]->text();\n\t\t\t$label = trim( str_replace( ':', '', $label ) );\n\n\t\t\t// Get the error now.\n\t\t\t$msg_error = trim( $sku_set->find( '.sku-msg-error' )[0]->text() );\n\n\t\t\t// Get all sku props\n\t\t\t$sku_props = $sku_set->find( '.sku-attr-list' );\n\n\t\t\t// Get the sku prop ID, for later use.\n\t\t\t$sku_prop_id = $sku_props[0]->attr( 'data-sku-prop-id' );\n\n\t\t\t$skus = [];\n\t\t\t$sku_children = $sku_props[0]->find( 'li' );\n\t\t\tfor ( $y = 0; $y < count( $sku_children ); $y++ ) { // @codingStandardsIgnoreLine Count is lightweight\n\t\t\t\t// Saves typing later.\n\t\t\t\t$child = $sku_children[ $y ];\n\n\t\t\t\t// Get the anchor object.\n\t\t\t\t$anchor = $child->find( 'a[^data-role=sku]' );\n\t\t\t\tif ( 1 > count( $anchor ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Get the sku properties from the anchor.\n\t\t\t\t$id = $anchor[0]->getAttribute( 'data-sku-id' );\n\n\t\t\t\t// @TODO: Seems to be auto-updated somehow through the JS.\n\t\t\t\t$spm_anchor_id = $anchor[0]->getAttribute( 'data-spm-anchor-id' );\n\n\t\t\t\t$image = $anchor[0]->find( 'img' );\n\t\t\t\tif ( 1 > count( $image ) ) {\n\t\t\t\t\t// This isn't an image-based SKU.\n\t\t\t\t\t$sku_label = trim( $anchor[0]->text() );\n\t\t\t\t} else {\n\t\t\t\t\t// This is an image-based SKU, return the image URL and additional data.\n\t\t\t\t\t$sku_label = $image[0]->getAttribute( 'title' );\n\n\t\t\t\t\t// @TODO: Seems to be auto-updated somehow through the JS.\n\t\t\t\t\t$img_spm_anchor_id = $image[0]->getAttribute( 'data-spm-anchor-id' );\n\t\t\t\t\t$src = $image[0]->getAttribute( 'src' );\n\t\t\t\t\t$big_pic = $image[0]->getAttribute( 'bigpic' );\n\t\t\t\t}\n\n\t\t\t\t$sku = compact( 'id', 'sku_label', 'spm_anchor_id' );\n\t\t\t\tif ( 1 <= count( $image ) ) {\n\t\t\t\t\t$sku['image'] = compact( 'src', 'big_pic', 'img_spm_anchor_id' );\n\t\t\t\t}\n\n\t\t\t\t$skus[] = $sku;\n\t\t\t}\n\n\t\t\t$sku_data[] = compact( 'sku_prop_id', 'label', 'msg_error', 'skus' );\n\t\t}\n\t\treturn [ 'attributes' => $sku_data ];\n\t}", "function getProduct($u){\n global $baseurl, $o, $r, $i, $local;\n $path = \"\";\n $d = new simple_html_dom();\n $d->load(scraperwiki::scrape($u));\n if (is_null($d->find('div[id=medproimg]',0))) {\n return 0;\n }\n//echo \"Loaded URL: \" . $u . \"\\n\";\n $imgfileurl = $d->find('div[id=medproimg]',0)->first_child()->href;\n $imgfile = trim(strrchr($imgfileurl,\"/\"),\"/ \");\n $img = \"/\" . substr($imgfile,0,1) . \"/\" . substr($imgfile,1,1) . \"/\" . $imgfile;\n fputcsv($i,array($imgfileurl,$img));\n $catname = \"\";\n $cats = $d->find('div[id=breadcrumb] ul li a');\n foreach ($cats as $cat) {\n $catname .= trim($cat->innertext) . \"/\";\n }\n $catname .= trim($d->find('div[id=breadcrumb] ul a b',0)->innertext);\n if (!is_null($d->find('div[id=prospecsbox]',0))) {\n $description = $d->find('div[id=prospecsbox]',0)->outertext;\n } else {\n $description = \"\";\n }\n if (!is_null($d->find('div[id=ctl00_cphContent_divShippingBilling]',0))) {\n $description .= $d->find('div[id=ctl00_cphContent_divShippingBilling]',0)->outertext;\n }\n if (!is_null($d->find('span[id=ctl00_cphContent_hidebrandid]',0))) {\n $brand = trim($d->find('span[id=ctl00_cphContent_hidebrandid]',0)->first_child()->innertext);\n } else {\n $brand = \"\";\n }\n $data = array(\n trim($d->find('span[id=pskuonly]',0)->innertext),\n \"\",\n \"Default\",\n \"simple\",\n $catname,\n \"Home\",\n \"base\",\n \"12/12/15 22:48\",\n $description,\n \"No\",\n 0,\n $img,\n $brand,\n \"\",\n \"Use config\",\n \"Use config\",\n trim($d->find('div[id=productname]',0)->first_child()->innertext),\n \"Product Info Column\",\n \"1 column\",\n trim($d->find('div[id=proprice]',0)->first_child()->innertext,\"$ \"),\n 0,\n \"\",\n $img,\n 1,\n 2,\n $img,\n \"12/12/15 22:48\",\n \"\",\n \"\",\n 4,\n 1.0000,\n 0,\n 1,\n 1,\n 0,\n 0,\n 1,\n 1,\n 1,\n 0,\n 1,\n 1,\n 1,\n 0,\n 1,\n 0,\n 1,\n 0,\n 1,\n 0,\n 0,\n 88,\n $img,\n $d->find('div[id=medproimg]',0)->first_child()->title,\n 1,\n 0 \n );\n fputcsv($o,$data);\n $thumbs = $d->find('div[id=altvidthmbs] thmbs');\n if (count($thumbs) > 1) {\n for ($x = 0; $x <= (count($thumbs) - 2); $x++) {\n $imgfileurl = $thumbs[$x]->first_child()->href;\n $imgfile = trim(strrchr($imgfileurl,\"/\"),\"/ \");\n $img = \"/\" . substr($imgfile,0,1) . \"/\" . substr($imgfile,1,1) . \"/\" . $imgfile;\n fputcsv($i,array($imgfileurl,$img));\n $data = array(\n \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\n \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\n \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\n \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\n \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\n \"\",\"88\",\n $img,\n $thumbs[$x]->first_child()->title,\n ($x + 2),\n 0\n );\n fputcsv($o,$data);\n }\n }\n $reviews = $d->find('table[id=ctl00_cphContent_datalistReviews] div.pr-review-wrap');\n if (count($reviews) > 0) {\n foreach ($reviews as $rev) {\n $data = array(\n trim($d->find('span[id=pskuonly]',0)->innertext),\n trim($rev->find('p.pr-review-rating-headline span',0)->innertext),\n trim($rev->find('span.pr-rating',0)->innertext),\n trim($rev->find('span[id$=labelUser]',0)->innertext),\n trim($rev->find('span[id$=labelLocation]',0)->innertext),\n trim($rev->find('div.pr-review-author-date',0)->innertext),\n trim($rev->find('span[id$=labelComments]',0)->innertext)\n );\n fputcsv($r,$data);\n }\n }\n echo trim($d->find('div[id=productname]',0)->first_child()->innertext) . \"\\n\";\n return 1;\n}", "public function getRTERootBlockElement()\n\t{\n\t}", "public function prase_json1(){\n\t\t\t$stry=\"{\";\n\t\t\n\t\t\t$stry=$stry.\"\\\"\".$this->xml->getName().\"\\\"\".\":{\";\n\t\t\t$bg=$this->xml->children();\n\t\t\n\t\t\t\n\t\t\tforeach ($bg[1]->children() as $ff){\n\t\t\t$stry=$stry.\"\\\"\".$ff->getName().\"\\\":\\\"\".$ff.\"\\\",\";\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t$stry=substr($stry,0,strlen($stry)-1);\n\t\t\n\t\t$stry.=\"},\";\n\t\t\n\t\t$stry=substr($stry,0,strlen($stry)-1);\n\t\t$stry.=\"}\";\n\t\t\t\n\t\t\t\n\t\treturn $stry;\n\t\t\t\n\t\t\t\n\t}", "protected function define_structure() {\n $userinfo = $this->get_setting_value('userinfo');\n\n // Define each element separated\n $glossary = new backup_nested_element('glossary', array('id'), array(\n 'name', 'intro', 'introformat', 'allowduplicatedentries', 'displayformat',\n 'mainglossary', 'showspecial', 'showalphabet', 'showall',\n 'allowcomments', 'allowprintview', 'usedynalink', 'defaultapproval',\n 'globalglossary', 'entbypage', 'editalways', 'rsstype',\n 'rssarticles', 'assessed', 'assesstimestart', 'assesstimefinish',\n 'scale', 'timecreated', 'timemodified', 'completionentries'));\n\n $entries = new backup_nested_element('entries');\n\n $entry = new backup_nested_element('entry', array('id'), array(\n 'userid', 'concept', 'definition', 'definitionformat',\n 'definitiontrust', 'attachment', 'timecreated', 'timemodified',\n 'teacherentry', 'sourceglossaryid', 'usedynalink', 'casesensitive',\n 'fullmatch', 'approved'));\n\n $tags = new backup_nested_element('entriestags');\n $tag = new backup_nested_element('tag', array('id'), array('itemid', 'rawname'));\n\n $aliases = new backup_nested_element('aliases');\n\n $alias = new backup_nested_element('alias', array('id'), array(\n 'alias_text'));\n\n $ratings = new backup_nested_element('ratings');\n\n $rating = new backup_nested_element('rating', array('id'), array(\n 'component', 'ratingarea', 'scaleid', 'value', 'userid', 'timecreated', 'timemodified'));\n\n $categories = new backup_nested_element('categories');\n\n $category = new backup_nested_element('category', array('id'), array(\n 'name', 'usedynalink'));\n\n $categoryentries = new backup_nested_element('category_entries');\n\n $categoryentry = new backup_nested_element('category_entry', array('id'), array(\n 'entryid'));\n\n // Build the tree\n $glossary->add_child($entries);\n $entries->add_child($entry);\n\n $glossary->add_child($tags);\n $tags->add_child($tag);\n\n $entry->add_child($aliases);\n $aliases->add_child($alias);\n\n $entry->add_child($ratings);\n $ratings->add_child($rating);\n\n $glossary->add_child($categories);\n $categories->add_child($category);\n\n $category->add_child($categoryentries);\n $categoryentries->add_child($categoryentry);\n\n // Define sources\n $glossary->set_source_table('glossary', array('id' => backup::VAR_ACTIVITYID));\n\n $category->set_source_table('glossary_categories', array('glossaryid' => backup::VAR_PARENTID));\n\n // All the rest of elements only happen if we are including user info\n if ($userinfo) {\n $entry->set_source_table('glossary_entries', array('glossaryid' => backup::VAR_PARENTID));\n\n $alias->set_source_table('glossary_alias', array('entryid' => backup::VAR_PARENTID));\n $alias->set_source_alias('alias', 'alias_text');\n\n $rating->set_source_table('rating', array('contextid' => backup::VAR_CONTEXTID,\n 'itemid' => backup::VAR_PARENTID,\n 'component' => backup_helper::is_sqlparam('mod_glossary'),\n 'ratingarea' => backup_helper::is_sqlparam('entry')));\n $rating->set_source_alias('rating', 'value');\n\n $categoryentry->set_source_table('glossary_entries_categories', array('categoryid' => backup::VAR_PARENTID));\n\n if (core_tag_tag::is_enabled('mod_glossary', 'glossary_entries')) {\n $tag->set_source_sql('SELECT t.id, ti.itemid, t.rawname\n FROM {tag} t\n JOIN {tag_instance} ti ON ti.tagid = t.id\n WHERE ti.itemtype = ?\n AND ti.component = ?\n AND ti.contextid = ?', array(\n backup_helper::is_sqlparam('glossary_entries'),\n backup_helper::is_sqlparam('mod_glossary'),\n backup::VAR_CONTEXTID));\n }\n }\n\n // Define id annotations\n $glossary->annotate_ids('scale', 'scale');\n\n $entry->annotate_ids('user', 'userid');\n\n $rating->annotate_ids('scale', 'scaleid');\n\n $rating->annotate_ids('user', 'userid');\n\n // Define file annotations\n $glossary->annotate_files('mod_glossary', 'intro', null); // This file area hasn't itemid\n\n $entry->annotate_files('mod_glossary', 'entry', 'id');\n $entry->annotate_files('mod_glossary', 'attachment', 'id');\n\n // Return the root element (glossary), wrapped into standard activity structure\n return $this->prepare_activity_structure($glossary);\n }", "function get_subelements($element, $i = 1)\n\t\t{\n\t\t\t$output = \"\";\n\t\t\t\t\t\n\t\t\tforeach($element['subelements'] as $key => $subelement)\n\t\t\t{\n\t\t\t\tif(isset($element['std']) && is_array($element['std']) && isset($element['std'][$i][$subelement['id']]))\n\t\t\t\t{\n\t\t\t\t\t$subelement['std'] = $element['std'][$i][$subelement['id']];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(isset($element['ajax_request']))\n\t\t\t\t{\n\t\t\t\t\t$subelement['ajax_request'] = $element['ajax_request'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$subelement['subgroup_item'] = true;\n\t\t\t\t$subelement['id'] = $element['id'].\"-__-\".$subelement['id'];\n\t\t\t\t\n\t\t\t\tif(isset($element['apply_all'])) $subelement['apply_all'] = $element['apply_all'];\n\t\t\t\t$output .= $this->render_single_element($subelement);\n\t\t\t}\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "protected function loadParentId(){return 0;}", "public function getElementText($start = 0, $end = -1);", "function OBJM_AddNewObjectToSCXML($elemID, $type, $class, $level, $nodeTitle, $parentID, $dataID, $datatype, $dataOrig)\r\n{\r\n\t$retval = $_SESSION['sceneCompXMLDOM']->load($_SESSION['sceneCompXMLFilePath']);\r\n\tif($retval != true)\r\n\t\treturn false;\r\n\r\n\t$displaystring = $nodeTitle;\r\n\tglobal $treehandlerfnname;\r\n\t\r\n\t//\r\n\t$elemID = strtoupper($elemID); \r\n\t$type = strtoupper($type);\r\n\t$class = strtoupper($class);\r\n\t$level = strtoupper($level); \r\n\t$parentID = strtoupper($parentID); \r\n\t//$attrdefinition = array(\"id\"=>$elemID, \"type\"=>$type,\"class\"=>$class,\"level\"=>$level, \"data-origin\"=>\"original\" , \"data-srcid\"=>\"none\", \"onclick\"=>$treehandlerfnname, \"dataid\"=>$dataID, \"data-type\"=>$datatype);\r\n\t$attrdefinition = array(\"id\"=>$elemID, \"type\"=>$type,\"class\"=>$class,\"level\"=>$level, \"data-origin\"=>$dataOrig , \"data-srcid\"=>\"none\", \"dataid\"=>$dataID, \"data-type\"=>$datatype, \"name\"=>$nodeTitle);\r\n\t$retval = CDOC_COMMON_AddXMLElement($_SESSION['sceneCompXMLDOM'], $_SESSION['sceneCompXMLFilePath'],\r\n\t\t\t\"li\", $displaystring, $parentID, $attrdefinition, true);\r\n\tif($retval != true)\r\n\t\treturn false;\r\n\t$newObj = $_SESSION['sceneCompXMLDOM']->getElementById($elemID);\t \r\n\t$retval = $_SESSION['sceneCompXMLDOM']->saveXML($newObj); \r\n\treturn $retval;\r\n}", "public function getSubgroup() {}", "function GetStructureInArrayForNews( $spr, $level_start = 0, $lang_id = NULL, $default_val = NULL, $spacer = NULL, $show_shortname = 1, $show_name = 1, $show_sublevels = 1, $front_back = 'back', $mas=NULL )\n {\n $db = DBs::getInstance();\n if( empty($lang_id) ) $lang_id = $this->lang_id;\n if( $show_sublevels==0){\n $rows = 0;\n }\n else\n {\n if($level_start!=0)\n {\n $q = \"SELECT `node` FROM `\".$spr.\"` WHERE `level`='$level_start' group by level\";\n $res = $db->db_Query( $q );\n if( !$res )return false;\n $row=$db->db_FetchAssoc();\n $curr_node = $row['node'];\n }\n else\n $curr_node = 0;\n $q = \"SELECT MAX(`node`) as max FROM `\".$spr.\"`\";\n $res = $db->db_Query( $q );\n if( !$res )return false;\n $row = $db->db_FetchAssoc();\n $max_node = $row['max'];\n $rows = $max_node - $curr_node;\n }\n $q='SELECT t0.node as node0, t0.cod as cod0 ';\n //if ($show_shortname==1) $q.=', t0.short as short0';\n if ($show_name==1) $q.=', t0.name as name0';\n for($i=1; $i<=$rows;$i++)\n {\n $q.=', '.'t'.$i.'.node as node'.$i.', '.'t'.$i.'.cod as cod'.$i;\n //if ($show_shortname==1) $q.=', t'.$i.'.short as short'.$i;\n if ($show_name==1) $q.=', t'.$i.'.name as name'.$i;\n }\n $q.= ' FROM '.$spr.' AS t0 ';\n for($i=1; $i<=$rows;$i++)\n {\n $q.='LEFT JOIN '.$spr.' AS t'.$i.' ON ( t'.$i.'.level = t'.($i-1).'.cod AND t'.$i.'.lang_id = t'.($i-1).'.lang_id) ';\n }\n $q.=' WHERE 1 ';\n $q = $q.\" AND t0.level = '\".$level_start.\"' AND t0.lang_id='\".$lang_id.\"' ORDER BY t0.move \";\n $res = $db->db_Query( $q );\n //echo $q;\n //echo '<br>q='.$q.' res='.$res.' $db->result='.$db->result;\n if( !$res )return false;\n $rows_count = $db->db_GetNumRows();\n //echo '<br> $rows='.$rows;\n $mas = Array();\n $mas[''] = $default_val;\n //var_dump($mas);\n for( $i = 0; $i < $rows_count; $i++ )\n {\n $row=$db->db_FetchAssoc();\n //var_dump($row);\n for($j=0;$j<=$rows;$j++){\n if(!isset($mas[$row['cod'.$j]]) && !is_null($row['cod'.$j]))\n {\n $output_str = null;\n if ($j>0) $output_str .= $spacer.'-';\n\n for($k=1;$k<=$row['node'.$j];$k++){\n $output_str.= $spacer;\n }\n if( $show_name ) $output_str = ' '.$output_str.stripslashes($row['name'.$j]);\n\n $mas[$row['cod'.$j]] = $output_str;\n }\n }\n }\n return $mas;\n }", "public function getSubLocality();", "abstract public function getVerticesStart();", "public function name() { return $this[0]->nodeName; }", "public function getUnstableStructure() {}", "function aggregator_element_start($parser, $name, $attributes) {\n global $item, $element, $tag;\n\n switch ($name) {\n case 'IMAGE':\n case 'TEXTINPUT':\n $element = $name;\n break;\n case 'ITEM':\n $element = $name;\n $item += 1;\n }\n\n $tag = $name;\n}", "function get_ancestors($object_id = 0, $object_type = '', $resource_type = '')\n {\n }", "public function getChilds();", "function composeL1EditForm_nodeDivs() {\n\n /*\n Some things we should have a handle on.\n */\n global $dom;\n $root = $dom->documentElement;\n $children = $root->childNodes;\n $length = $children->length;\n $nodeID = $_SESSION['EKA_nodeID'];\n\n /*\n I'm thinking out-loud here while looking ot the specification I wrote\n in Yahoo! Notepad.\n \n We need to compose a string consisting of the node divs for a patricular\n range of child indices. So, the first thing we need to establish is the\n range. There are three types of ranges: all, local, toEnd. We need to\n have a value for the index of the first and last child in the range.\n */\n $focus = $_SESSION['EKA_intendedFocusAfterL1Edit'];\n if ($focus == 'all') {\n $first = 0;\n $last = ($length - 1);\n } elseif ($focus == 'local') {\n /*The range should be from the second node before nodeID to the second\n node after nodeID (assuming all these nodes exist - adjust appropriately)*/\n /*\n The players: $nodeID, 0, ($length - 1).\n We would prefer that $first = ($nodeID - 2).\n Our second preference is $first = ($nodeID - 1).\n Our last resort is $first = $nodeID.\n */\n $firstPref = ($nodeID - 2);\n $secondPref = ($nodeID - 1);\n if (!($firstPref < 0)) {\n $first = $firstPref;\n } elseif (!($secondPref < 0)) {\n $first = $secondPref;\n } else {\n $first = $nodeID;\n }\n /*\n Our first preference would be $last = ($nodeID + 2).\n Our second preferende would be $last = ($nodeID + 1).\n Our last resort is $last = $nodeID.\n */\n $firstPref = ($nodeID + 2);\n $secondPref = ($nodeID + 1);\n if (!($firstPref > ($length - 1))) {\n $last = $firstPref;\n } elseif (!($secondPref > ($length - 1))) {\n $last = $secondPref;\n } else {\n $last = $nodeID;\n }\n } elseif ($focus == 'toEnd') {\n /*The range should be from the second node before nodeID to the last\n node (assuming all these nodes exist - adjust appropriately)*/\n /*\n We would prefer that $first = ($nodeID - 2).\n Our second preference is $first = ($nodeID - 1).\n Our last resort is $first = $nodeID.\n */\n $firstPref = ($nodeID - 2);\n $secondPref = ($nodeID - 1);\n if (!($firstPref < 0)) {\n $first = $firstPref;\n } elseif (!($secondPref < 0)) {\n $first = $secondPref;\n } else {\n $first = $nodeID;\n }\n $last = ($length - 1);\n } else {\n form_destroy();\n die('Non-valid focus. Err 119410. -Programmer.');\n }\n\n $string = makeL1EditForm_nodeDivs($first, $last);\n return $string;\n}", "public function getProductSKU()\n {\n }", "private function getSkuSelectionList() {\r\n //$this->jsonOutput[\"skuSelectionList\"] = $this->settingVars->pageArray[\"SKU_SELECTION_LIST\"];\r\n\t\tif(isset($this->jsonOutput[\"settings\"]['sku_settings']) && $this->jsonOutput[\"settings\"]['sku_settings'] != \"\")\r\n\t\t\t$this->jsonOutput[\"skuSelectionList\"] = $this->jsonOutput[\"settings\"]['sku_settings'];\r\n }", "function yaz_element($id, $elementset)\n{\n}", "public function getItemSku();", "public function testAddItemSubCategoryTag()\n {\n }", "public function sku()\n {\n return $this->belongsTo(Productos::class, 'fk_id_sku', 'id_sku');\n }", "public function getTopLevelUnit()\n {\n return $this->topLevelUnit instanceof BusinessUnitKeyReferenceBuilder ? $this->topLevelUnit->build() : $this->topLevelUnit;\n }", "public function getSubdivisionList();", "function ST_indexR($ST_h, $ST_v, $ST_w) {\n\t$i = $ST_v[$ST_w];\n\t/* echo(\"<br> ST_indexR: i=$i\"); */\n\tif ($ST_h == 0) $ST_h = new ST_node($i);\n\t/* echo(\"<br> h->index: $ST_h->index, d: $ST_h->d, l: $ST_h->l, m: $ST_h->m, r: $ST_h->r \"); */\n\tif ($i == 0) {\n\t\tif ($ST_h->index == -1) $ST_h->index = $this->ST_N++;\n\t\t$this->ST_val = $ST_h->index;\n\t\treturn $ST_h;\n\t\t}\n\tif ($i < $ST_h->d) $ST_h->l = $this->ST_indexR($ST_h->l, $ST_v, $ST_w);\n\tif ($i == $ST_h->d) $ST_h->m = $this->ST_indexR($ST_h->m, $ST_v, $ST_w+1);\n\tif ($i > $ST_h->d) $ST_h->r = $this->ST_indexR($ST_h->r, $ST_v, $ST_w);\n\treturn $ST_h;\n\t}", "public function findSpareBox() {\r\n\t\t\r\n\t}", "function ext_tree($parent_id, $con, $lev, $info) {\n\n // rows selection from TBSM tables\n $sel = \"SELECT SERVICEINSTANCEID, SERVICEINSTANCENAME, DISPLAYNAME, SERVICESLANAME, TIMEWINDOWNAME\n\t\t\t\tFROM TBSMBASE.SERVICEINSTANCE, TBSMBASE.SERVICEINSTANCERELATIONSHIP\n\t\t\t\tWHERE PARENTINSTANCEKEY = '$parent_id' AND SERVICEINSTANCEID = CHILDINSTANCEKEY\";\n $stmt = db2_prepare($con, $sel);\n $result = db2_execute($stmt);\n\n $values = 0;\n while ($row = db2_fetch_assoc($stmt)) {\n $values++;\n $info[$lev] = array (\n 'level' => $lev,\n 'endpoint' => false,\n 'id' => $row['SERVICEINSTANCEID'],\n 'service' => $row['SERVICEINSTANCENAME'],\n 'display' => $row['DISPLAYNAME'],\n 'template' => $row['SERVICESLANAME'],\n 'maintenance' => $row['TIMEWINDOWNAME'],\n );\n // unique value\n if (!in_array($row['SERVICEINSTANCEID'], array_column($GLOBALS['results'], 'id')))\n $GLOBALS['results'][] = $info[count($info)-1];\n\n // recursive function call\n ext_tree($row['SERVICEINSTANCEID'], $con, $lev+1, $info);\n }\n\n return ($values > 0);\n}", "public static function lorPageElement();", "function _get_item_segments()\n {\n $segments = \"handicrafting/handicrafts/\";\n return $segments;\n }", "function endSubMenu() {\n\t\treturn html_ac(html_ap() - 1);\n\t}", "protected function buildCat4Element()\r\n\t{\r\n\t\treturn null;\t\t\r\n\t}", "public function getRootNode() {}", "function __construct() \n {\n // CODE\n parent::__construct( XMLObject_Menu::ROOT_NODE_MENU );\n \n }", "public function getSubAClassLevel0()\n {\n return $this->subAClassLevel0;\n }", "function start_lvl( &$output, $depth = 0, $args = array() ) {\n\t\t$left = ( $depth + 1 ) * 15;\n\n\t\t$indent = str_repeat(\"\\t\", $depth);\n\t\t// $output .= \"\\n\" . '<li class=\"child\" style=\"left:' . $left . 'px\"><label>' . \"\\n\";\n\t\t$output .= '';\n\t}", "protected function node_prefix() {\n return null;\n }", "public function getSubLiClassLevel0()\n {\n return $this->subLiClassLevel0;\n }", "public function initVarfromXml() {\n if ((array) $this->xml_data) {\n foreach ($this->xml_data->xpath('//page_group') as $item) {\n foreach ($item->children() as $child) {\n $seq = 0;\n if (!empty($child['seq'])) {\n $seq = (string) $child['seq'];\n }\n if ($seq < 99) {\n\n if ($child['type'] == 'IE') {\n foreach ($child->xpath('input') as $value) {\n $tp = 0;\n if (empty($value->value)) {\n $datav = (string) $value->default;\n } else {\n $datav = (string) $value->value;\n }\n if (strtolower($value->type) == 'number')\n $tp = 1;\n if (empty($this->sccpvalues[(string) $value->name])) {\n $this->sccpvalues[(string) $value->name] = array('keyword' => (string) $value->name, 'data' => $datav, 'type' => $tp, 'seq' => $seq);\n// $this->sccpvalues[] = array('keyword' => (string)$value->name, 'data' =>(string)$value->default, 'type'=> '0');\n }\n }\n }\n if ($child['type'] == 'IS' || $child['type'] == 'IED') {\n if (empty($child->value)) {\n $datav = (string) $child->default;\n } else {\n $datav = (string) $child->value;\n }\n if (empty($this->sccpvalues[(string) $child->name])) {\n $this->sccpvalues[(string) $child->name] = array('keyword' => (string) $child->name, 'data' => $datav, 'type' => '2', 'seq' => $seq);\n// $this->sccpvalues[] = array('keyword' => (string)$child->name, 'data' =>(string)$child-> default,'type'=>'0');\n }\n }\n if ($child['type'] == 'SLD' || $child['type'] == 'SLS' || $child['type'] == 'SLT' || $child['type'] == 'SL' || $child['type'] == 'SLM' || $child['type'] == 'SLZ' || $child['type'] == 'SLZN' || $child['type'] == 'SLA') {\n if (empty($child->value)) {\n $datav = (string) $child->default;\n } else {\n $datav = (string) $child->value;\n }\n if (empty($this->sccpvalues[(string) $child->name])) {\n $this->sccpvalues[(string) $child->name] = array('keyword' => (string) $child->name, 'data' => $datav, 'type' => '2', 'seq' => $seq);\n }\n }\n }\n }\n }\n }\n }", "function visita_XML($node,$lev) {\r\n\t$i=0;\r\n\twhile ($node) {\r\n\t\t$nome=$node->node_name();\r\n\t\techo \"<br> Livello $lev ° Elemento $i ° Nodo : $nome <br>\";\r\n\t\tprint_r($node);\r\n\t\tif ($node->has_attributes()) {\r\n\t\t\techo \"<br>-------- ATTRIBUTI ---------<br>\";\r\n\t\t\t$attr=$node->attributes();\r\n\t\t\tforeach ($attr as $v) {\r\n\t\t\t\tprint_r($v);\r\n\t\t\t\techo \"<br>\";\r\n\t\t\t}\r\n\t\t}\r\n\t\techo \"<br> Nodi Figli : \".count($node->child_nodes()).\"<br>\";\r\n\t\t$i++;\r\n\t\tif ($node->has_child_nodes()) {\r\n\t\t\t$lev++;\r\n\t\t\tvisita_XML($node->first_child(),$lev);\r\n\t\t\t$lev--;\r\n\t\t}\r\n\t\t$node= $node->next_sibling();\t\r\n\t}\r\n}", "public function getSalesOfficeCode()\n {\n return $this->firstNodeAttribute(\"IDOC/E1EDK14/QUALF[.='016']/parent::*\", 'ORGID', null);\n }", "function start_tag($parser, $name, $attrs) {\n //echo \"<b>Element: $name</b><br>\";\t// ??? ????????\n switch ($name) {\n case 'tarif':\n $this->curElem = array();\n break;\n case 'office':\n $this->curElem = array();\n break;\n default:\n $this->index = $name;\n break;\n };\n }", "public static function getRootNodeName()\n {\n return 'SuperFund';\n }", "protected function _createSubset() {}", "public function getSku() {\n return $this->item->getSku();\n }", "function ElementTabToXML($nameLineElement,$lineElement,$xmlSolution,$solutionElementXML):bool{\n //TODO LABEL IN OUTPUT union label part ect\n //print_r($nameLineElement);\n if($lineElement == \"[]\"){\n return false;\n }\n if($nameLineElement == \"group\"){\n $elementSub = $xmlSolution->createElement(\"class\");\n foreach(transformDznToArray($lineElement) as $element){\n $subSubElement = $xmlSolution->createElement(\"group\");\n ElementStringToXML(\"refId\",$element,$xmlSolution,$subSubElement);\n $elementSub->appendChild($subSubElement);\n }\n $solutionElementXML->appendChild($elementSub);\n }\n elseif(in_array($nameLineElement,[\"rooms\",\"teachers\"])){\n\n $elementSub = $xmlSolution->createElement(\"choose\".ucfirst($nameLineElement));\n foreach(transformDznToArray($lineElement) as $element){\n $subSubElement = $xmlSolution->createElement(substr($nameLineElement,0,-1));\n ElementStringToXML(\"refId\",$element,$xmlSolution,$subSubElement);\n $elementSub->appendChild($subSubElement);\n }\n $solutionElementXML->appendChild($elementSub);\n\n }\n elseif($nameLineElement==\"equipements\"){\n\n }\n elseif($nameLineElement==\"slot\"){\n $elementSub = $xmlSolution->createElement(\"schedule\");\n\n $tabResult = transformDznToArray($lineElement);\n $subSubElement1 = $xmlSolution->createAttribute(\"slot\");\n $subSubElement1->value = cleanString($tabResult[0]);\n $subSubElement2 = $xmlSolution->createAttribute(\"sessionLength\");\n $subSubElement2->value = cleanString($tabResult[1]);\n\n $elementSub->appendChild($subSubElement1);\n $elementSub->appendChild($subSubElement2);\n \n $solutionElementXML->appendChild($elementSub);\n\n }\n else{exit (\"ERROR FIELD DON'T EXIST\");}\n return true;\n\n}", "public function process_root_element($data) {\n }", "function _get_items_segments()\n {\n $segments = \"crafts/handicrafts/\";\n return $segments;\n }" ]
[ "0.56494725", "0.537528", "0.49004683", "0.4899578", "0.48560148", "0.48519626", "0.48373234", "0.48091143", "0.4774365", "0.47695708", "0.4730076", "0.47124228", "0.47107628", "0.47100213", "0.46926615", "0.46922186", "0.4612582", "0.46087143", "0.46086264", "0.45995483", "0.4599397", "0.45908636", "0.4583822", "0.45752573", "0.45456412", "0.45228633", "0.4522703", "0.4521669", "0.45085692", "0.4496534", "0.4496534", "0.44537327", "0.4451656", "0.44495302", "0.4441805", "0.4419809", "0.4401659", "0.4398655", "0.4398614", "0.43958297", "0.43688005", "0.43618307", "0.43562403", "0.434396", "0.4335613", "0.43333218", "0.43298703", "0.43228555", "0.43186426", "0.43160582", "0.431374", "0.43102658", "0.4307229", "0.4305176", "0.43041822", "0.43024224", "0.43019468", "0.4301203", "0.42967454", "0.4293751", "0.42919013", "0.42917177", "0.42888585", "0.42888057", "0.42870656", "0.42866832", "0.4285929", "0.4284944", "0.42848632", "0.42844212", "0.42702705", "0.4268735", "0.426829", "0.42643178", "0.42611206", "0.4260861", "0.42599568", "0.42595476", "0.42567778", "0.42555684", "0.4248423", "0.42462763", "0.42454675", "0.42451924", "0.42450994", "0.42432284", "0.4241103", "0.42382175", "0.4236904", "0.42344034", "0.42329636", "0.42325503", "0.4230142", "0.42286086", "0.4217933", "0.4216928", "0.4214341", "0.4214211", "0.4210869", "0.42046818" ]
0.59179157
0
/ sku Hierarchy Element end / sku Type Start
public function getSkuTypes () { $this->db->select( '*' ); $query = $this->db->get( 'tbld_sku_type' )->result_array(); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSku();", "public function getSku();", "function get_sitetree(&$massiv, $start, $level){\n\t\tglobal $web;\n\t\t\n\t\t$list \t= '';\n\t\t$class \t= '';\n\t\tif (!isset($massiv[$start])) return;\n\t\t\n\t\tif ($level == 1) {\n\t\t\t$class \t= 'sub';\n\t\t} elseif ($level == 2) {\n\t\t\t$class = 'subsub';\n\t\t}\n\t\t\n\t\tforeach($massiv[$start] as $key=>$value){\n\t\t\t$list .= '<a class=\"'.$class.'\" href=\"'.SmartUrlEncode(WBG::crosslink($value)).'\">'.$value['title'].'</a>';\n\t\t\t$list .= get_sitetree($massiv, $key, $level+1);\n\t }\n\t \n\t\treturn $list;\n\t}", "function getSkus() {\n\techo \"Getting Skus </br>\";\n\t$response = getRequest('/api/sku');\n\tprintInfo($response);\n}", "public function getSkuHierarchyElements ()\n{\n\n// $sql = \"select t1.id as sku_hierarchy_element_by_id,t1.element_name,t1.element_code,t1.element_description,t1.element_category_id,t1.parent_element_id,\n// t2.id as parent_layer_id,t3.id,t3.layer_name as element_category,\n// (Select b.element_name from tbld_sku_hierarchy_elements as b where t2.id = b.id)\n// as parent_element_name from tbld_sku_hierarchy_elements\n// as t1 left join tbld_sku_hierarchy_elements as t2 on t2.id = t1.parent_element_id\n// left join tbld_sku_hierarchy as t3 on t2.element_category_id = t3.id \";\n $sql = \"SELECT t1.*,t1.id as sku_hierarchy_element_by_id,t2.layer_name as element_category,t3.element_name as parent_element_name FROM `tbld_sku_hierarchy_elements` as t1\n left join `tbld_sku_hierarchy` as t2 on t1.element_category_id=t2.id\n left join `tbld_sku_hierarchy_elements` as t3 on t1.parent_element_id=t3.id\";\n $query = $this->db->query( $sql )->result_array();\n\n return $query;\n\n}", "public function getItemSku();", "public function getSkuName ()\n {\n $sql = \" SELECT t1.id,sku_name,sku_description,sku_code,sku_weight_id,sku_lpc,sku_volume,sku_launch_date,t8.sku_type_name,\n GROUP_CONCAT(t5.unit_name SEPARATOR '<br /><br />') AS unit,t2.quantity,\n GROUP_CONCAT(ROUND(t2.db_lifting_price,2) SEPARATOR '<br /><br />') as db_lifting_price ,\n GROUP_CONCAT(ROUND(t2.outlet_lifting_price,2) SEPARATOR '<br /><br />') AS outlet_lifting_price,\n GROUP_CONCAT(ROUND(t2.mrp_lifting_price,2) SEPARATOR '<br /><br /> ') AS mrp_lifting_price ,\n t3.element_name,t4.sku_active_status_name,t5.unit_name,t6.element_name as product,\n t7.element_name as catagory\n FROM tbld_sku AS t1\n INNER JOIN\n `tbli_sku_mou_price_mapping` AS t2\n ON t1.id = t2.sku_id\n INNER JOIN\n tbld_sku_active_status AS t4\n ON t1.sku_active_status_id = t4.id\n INNER JOIN\n tbld_sku_hierarchy_elements AS t3\n ON t1.parent_id = t3.id\n INNER JOIN\n tbld_unit AS t5\n ON t5.id= t2.mou_id\n left join tbld_sku_hierarchy_elements as t6\n on t6.id = t3.parent_element_id\n left join tbld_sku_hierarchy_elements as t7\n on t7.id = t6.parent_element_id\n left Join `tbld_sku_type` as t8\n On t1.sku_type_id=t8.id\n GROUP BY t2.sku_id\n ORDER BY t2.sku_id,t2.quantity asc\";\n $query = $this->db->query( $sql )->result_array();\n return $query;\n }", "function get_usertyp($usrid){\r\n\t\r\n}", "public function getProductSKU()\n {\n }", "public function getSku()\n {\n return $this->sku;\n }", "public function __construct($_sKU = NULL,$_startPrice = NULL,$_quantity = NULL,$_variationSpecifics = NULL,$_quantitySold = NULL,$_sellingStatus = NULL,$_discountPriceInfo = NULL,$_any = NULL)\r\n\t{\r\n\t\tparent::__construct(array('SKU'=>$_sKU,'StartPrice'=>$_startPrice,'Quantity'=>$_quantity,'VariationSpecifics'=>($_variationSpecifics instanceof EbayShoppingStructNameValueListArrayType)?$_variationSpecifics:new EbayShoppingStructNameValueListArrayType($_variationSpecifics),'QuantitySold'=>$_quantitySold,'SellingStatus'=>$_sellingStatus,'DiscountPriceInfo'=>$_discountPriceInfo,'any'=>$_any));\r\n\t}", "public function get_subtypes()\n {\n }", "public function getElementPrefix();", "public function getSku() {\n return $this->_sku;\n }", "public function testGetSku()\n {\n $data_from_collection = $this->data['annual_collection'];\n $this->assertEquals(\n $data_from_collection['attributes']['plan_sku'],\n $this->makePlan($data_from_collection)->getSku()\n );\n\n $data_from_site = $this->data['annual_site'];\n $this->assertEquals($data_from_site['sku'], $this->makePlan($data_from_site)->getSku());\n }", "private function changesku(){\t \r\n\t $this->chartValue(); //adding to output\r\n\t $this->idleStHealthChk(); //adding to output\r\n\t}", "private function getProductQuery(string $sku): string\n {\n return <<<QUERY\n{\n products(search: \"{$sku}\") {\n items {\n sku\n ... on BundleProduct {\n items {\n sku\n option_id\n uid\n required\n type\n title\n options {\n uid\n label\n product {\n sku\n }\n can_change_quantity\n id\n uid\n price\n quantity\n }\n }\n }\n }\n }\n}\nQUERY;\n }", "public function getSkuHierarchy ()\n {\n $sql = \"select t1.id,t1.layer_name,t1.layer_code,t1.layer_description,t1.parent_layer_id,t2.id as parent_layer_id,\"\n . \" (Select b.layer_name from tbld_sku_hierarchy as b where t2.id = b.id) as parent_layer_name from tbld_sku_hierarchy as t1 left join tbld_sku_hierarchy as t2 on t2.id = t1.parent_layer_id \";\n $query = $this->db->query( $sql )->result_array();\n return $query;\n }", "function _get_item_segments()\n{\n$segments = \"musical/instrument/\";\nreturn $segments;\n\n}", "public function setSku($sku);", "public static function _register()\n {\n self::assignElements([\n 'SKU' => ['type' => 'SKUType', 'xmlns' => self::XMLNS],\n 'StartPrice' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'Quantity' => ['type' => 'int'],\n 'VariationSpecifics' => ['type' => 'NameValueListArrayType', 'xmlns' => self::XMLNS],\n 'UnitsAvailable' => ['type' => 'int'],\n 'UnitCost' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'SellingStatus' => ['type' => 'SellingStatusType', 'xmlns' => self::XMLNS],\n 'VariationTitle' => [],\n 'VariationViewItemURL' => [],\n 'Delete' => ['type' => 'bool'],\n 'SellingManagerProductInventoryStatus' => ['type' => 'SellingManagerProductInventoryStatusType', 'xmlns' => self::XMLNS],\n 'WatchCount' => ['type' => 'int'],\n 'PrivateNotes' => [],\n 'DiscountPriceInfo' => ['type' => 'DiscountPriceInfoType', 'xmlns' => self::XMLNS],\n 'VariationProductListingDetails' => ['type' => 'VariationProductListingDetailsType', 'xmlns' => self::XMLNS]\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "public function getSKUPartsData() {\n $partsData = DB::table('part_number')->select('SKU', 'id')->get();\n $sku = '';\n $sku .=\"<option value='\" . '' . \"' selected='selected' > select sku</option>\";\n foreach ($partsData as $key => $value) {\n $sku .=\"<option value='\" . $value->id . \"'>\" . $value->SKU . \"</option>\";\n }\n return $sku;\n }", "public function getSku() {\n return $this->item->getSku();\n }", "function _get_items_segments()\n{\n$segments = \"music/instruments/\";\nreturn $segments;\n\n}", "public function getSku()\n {\n return $this->getTypeInstance(true)->getSku($this);\n }", "public function sku()\n {\n return $this->belongsTo(Productos::class, 'fk_id_sku', 'id_sku');\n }", "public function getSKU()\n {\n return $this->sKU;\n }", "public function get_product_attributes() : array {\n\t\t$sku_wrapper = $this->dom->find( '#j-product-info-sku' );\n\t\tif ( 1 > count( $sku_wrapper ) ) {\n\t\t\treturn [\n\t\t\t\t'attributes' => [],\n\t\t\t];\n\t\t}\n\n\t\t$sku_sets = $sku_wrapper[0]->find( '.p-property-item' );\n\t\t$sku_data = [];\n\t\tfor ( $i = 0; $i < count( $sku_sets ); $i++ ) { // @codingStandardsIgnoreLine Count is lightweight\n\t\t\t// Drop it into a var so it can be looped.\n\t\t\t$sku_set = $sku_sets[ $i ];\n\n\t\t\t// Get the variation label.\n\t\t\t$label = $sku_set->find( '.p-item-title' )[0]->text();\n\t\t\t$label = trim( str_replace( ':', '', $label ) );\n\n\t\t\t// Get the error now.\n\t\t\t$msg_error = trim( $sku_set->find( '.sku-msg-error' )[0]->text() );\n\n\t\t\t// Get all sku props\n\t\t\t$sku_props = $sku_set->find( '.sku-attr-list' );\n\n\t\t\t// Get the sku prop ID, for later use.\n\t\t\t$sku_prop_id = $sku_props[0]->attr( 'data-sku-prop-id' );\n\n\t\t\t$skus = [];\n\t\t\t$sku_children = $sku_props[0]->find( 'li' );\n\t\t\tfor ( $y = 0; $y < count( $sku_children ); $y++ ) { // @codingStandardsIgnoreLine Count is lightweight\n\t\t\t\t// Saves typing later.\n\t\t\t\t$child = $sku_children[ $y ];\n\n\t\t\t\t// Get the anchor object.\n\t\t\t\t$anchor = $child->find( 'a[^data-role=sku]' );\n\t\t\t\tif ( 1 > count( $anchor ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Get the sku properties from the anchor.\n\t\t\t\t$id = $anchor[0]->getAttribute( 'data-sku-id' );\n\n\t\t\t\t// @TODO: Seems to be auto-updated somehow through the JS.\n\t\t\t\t$spm_anchor_id = $anchor[0]->getAttribute( 'data-spm-anchor-id' );\n\n\t\t\t\t$image = $anchor[0]->find( 'img' );\n\t\t\t\tif ( 1 > count( $image ) ) {\n\t\t\t\t\t// This isn't an image-based SKU.\n\t\t\t\t\t$sku_label = trim( $anchor[0]->text() );\n\t\t\t\t} else {\n\t\t\t\t\t// This is an image-based SKU, return the image URL and additional data.\n\t\t\t\t\t$sku_label = $image[0]->getAttribute( 'title' );\n\n\t\t\t\t\t// @TODO: Seems to be auto-updated somehow through the JS.\n\t\t\t\t\t$img_spm_anchor_id = $image[0]->getAttribute( 'data-spm-anchor-id' );\n\t\t\t\t\t$src = $image[0]->getAttribute( 'src' );\n\t\t\t\t\t$big_pic = $image[0]->getAttribute( 'bigpic' );\n\t\t\t\t}\n\n\t\t\t\t$sku = compact( 'id', 'sku_label', 'spm_anchor_id' );\n\t\t\t\tif ( 1 <= count( $image ) ) {\n\t\t\t\t\t$sku['image'] = compact( 'src', 'big_pic', 'img_spm_anchor_id' );\n\t\t\t\t}\n\n\t\t\t\t$skus[] = $sku;\n\t\t\t}\n\n\t\t\t$sku_data[] = compact( 'sku_prop_id', 'label', 'msg_error', 'skus' );\n\t\t}\n\t\treturn [ 'attributes' => $sku_data ];\n\t}", "public function findProduct(\r\n $sku\r\n, $name = null\r\n, $skuMatchMode = 'IGNORE_DASH'\r\n, $baseSkuSearchFlag = true\r\n) { \r\n global $baseSkuAttributeId;\r\n\t$sku = str_replace('\\'', '', $sku);\r\n\t$sku = str_replace('\\\\', '', $sku);\r\n\t$sku = trim($sku, '()');\r\n\t$resource = Mage::getSingleton('core/resource');\r\n\t$readConnection = $resource->getConnection('core_read');\r\n\t$table = $resource->getTableName('catalog/product');\r\n $findResult = array('search_mask' => null, 'product_data' => array(), \r\n 'no_base_sku_count' => 0, 'base_sku_count' => 0\r\n );\r\n\t// try to match words\r\n\tif (strlen($sku) >=4) { \r\n if ($skuMatchMode == 'LEFT') { \r\n $findResult['search_mask'] = \" \" . $sku . \" %\";\r\n $searchExpression = \"concat(' ', sku, ' ') like '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'LEFT_IGNORE_DASH') { \r\n $findResult['search_mask'] = str_replace('-', ' ', \" \" . $sku . \" %\");\r\n $searchExpression = \"concat(' ', replace(sku, '-', ' '), ' ') like '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'EXACT') { \r\n $findResult['search_mask'] = $sku;\r\n $searchExpression = \"sku = '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'IGNORE_DASH') { \r\n $findResult['search_mask'] = str_replace('-', ' ', $sku);\r\n $searchExpression = \"replace(sku, '-', ' ') = '\" . $findResult['search_mask'] . \"'\";\r\n } else {\r\n throw new Exception('Uknown skuMatchMode: \"' . $skuMatchMode . '\"');\r\n } \r\n $findResult['product_data'] = $readConnection->fetchAll(\r\n \"select entity_id as product_id, sku \r\n from \" . $table . \" p\r\n where \r\n -- website SKU is at the beginning\r\n \" . $searchExpression\r\n );\r\n if ($baseSkuSearchFlag) { \r\n // add base sku search\r\n if (!isset($baseSkuAttributeId)) {\r\n $baseSkuAttributeId = $readConnection->fetchOne(\r\n \"select attribute_id from eav_attribute where attribute_code = 'base_sku'\"\r\n );\r\n } \r\n $baseSkuResult = \r\n $readConnection->fetchAll( \r\n \"select \r\n entity_id as product_id\r\n , (select sku from catalog_product_entity p where p.entity_id = v.entity_id) as sku\r\n , value as base_sku\r\n from\r\n catalog_product_entity_varchar v\r\n where \r\n -- source sku is like (contains) base sku\r\n -- replace dashes with spaces\r\n ' \" . str_replace('-', ' ', $sku) . \" ' \r\n like concat('% ', replace(value, '-', ' '), ' %')\r\n and v.attribute_id = \" . $baseSkuAttributeId \r\n );\r\n $findResult['no_base_sku_count'] = count($findResult['product_data']); \r\n if (count($baseSkuResult) > 0) {\r\n $findResult['base_sku_count'] = count($baseSkuResult);\r\n $findResult['product_data'] = array_merge($findResult['product_data'], $baseSkuResult);\r\n $findResult['search_mask'] = $findResult['search_mask'] . \" && base_sku\";\r\n $this->logMessage('baseSkuResult: count=' . count($baseSkuResult));\r\n }\r\n }\r\n\t}\t\r\n\tif (!empty($name) && count($findResult['product_data']) == 0) { \r\n\t $words = explode(' ', strtr(trim($name), '-:', ' '));\r\n\t foreach ($words as $word) { \r\n\t\t$findResult = findProduct($word, null, $skuMatchMode, $baseSkuSearchFlag);\r\n\t\t// For name words allow only one match\r\n\t\tif (count($findResult['product_data']) == 1) { \r\n\t\t return $findResult;\r\n\t\t} \r\n\t } \r\n\t} \r\n\treturn $findResult;\r\n}", "public function getElementText($start = 0, $end = -1);", "public function getSkuId()\n {\n return $this->skuId;\n }", "private function getSkuSelectionList() {\r\n //$this->jsonOutput[\"skuSelectionList\"] = $this->settingVars->pageArray[\"SKU_SELECTION_LIST\"];\r\n\t\tif(isset($this->jsonOutput[\"settings\"]['sku_settings']) && $this->jsonOutput[\"settings\"]['sku_settings'] != \"\")\r\n\t\t\t$this->jsonOutput[\"skuSelectionList\"] = $this->jsonOutput[\"settings\"]['sku_settings'];\r\n }", "public function getSellerSKU() \n {\n return $this->_fields['SellerSKU']['FieldValue'];\n }", "private function getUnit($product)\n { \n $units= $product->units;\n\n if(!$units->isEmpty())\n {\n $unitName=NULL;\n\n foreach ($units as $unit) {\n\n $unitName .= $unit->unit_type . \"+\";\n }\n\n return trim($unitName,\"+\");\n\n }\n else\n {\n return NULL;\n }\n }", "protected function getSkus($product)\n {\n $skus = parent::getSkus($product);\n\n foreach ($product->getVariants() as $variant) {\n $skus[] = $variant->getSku();\n }\n\n return $skus;\n }", "public function getBlockGift($skuGift) {\n\t return;\n\t}", "function display_sku_as_meta_data( $item, $order ) {\n\t\t\t$product = BEWPI_WC_Order_Compatibility::get_product( $order, $item );\n\t\t\t$sku = $product && BEWPI_WC_Product_Compatibility::get_prop( $product, 'sku' ) ? BEWPI_WC_Product_Compatibility::get_prop( $product, 'sku' ) : '-';\n\t\t\t?>\n\t\t\t<br>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<strong><?php esc_html_e( 'SKU:', 'woocommerce-pdf-invoices' ); ?></strong> <?php echo esc_html( $sku ); ?>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<?php\n\t\t}", "abstract public function getTaxType();", "public function getElementType() {}", "public function createSimpleProduct($type,$data=[],$attribute_set_id,$sku){\n\n $data['type_id'] = $type;\n $data['attribute_set_id'] = $attribute_set_id;\n $data['sku'] = $sku;\n foreach($data['additional_attributes']['single_data'] as $item){\n $data['custom_attributes'][] = [ \"attribute_code\" => $item['key'], \"value\" => $item['value'] ];\n }\n $data['custom_attributes'][] = [ \"attribute_code\" => \"description\", \"value\" => $data['description'] ];\n $data['custom_attributes'][] = [ \"attribute_code\" => \"short_description\", \"value\" => $data['short_description'] ];\n array_push( $data['custom_attributes'] , ['attribute_code' => 'category_ids', 'value' => $data['categories']] );\n array_push( $data['custom_attributes'] , ['attribute_code' => 'url_key', 'value' => Inflector::slug($data['name'].' '.$sku)] );\n unset( $data['additional_attributes'], $data['categories'], $data['websites'], $data['description'], $data['short_description'], $data['tax_class_id'] );\n\n $result = $this->curlRequest(\"/rest/V1/products\",1,json_encode([\"product\" => $data]));\n \n return $result;\n }", "public function getSkins(): array;", "public function generatesku()\n {\n $newsku = 111111;\n //We need to generate a random sku number that does not already exist\n $exists = true;\n $newsku = mt_rand(100000,999999);\n do {\n $product = $this->Product->findBysku($newsku);\n if(empty($product))\n $exists = false;\n } while($exists);\n return $newsku;\n }", "public function getSku()\n {\n return 'Tomato';\n }", "public function setSkus($s)\n {\n if (is_string($s)) {\n $s = [$s];\n }\n if (is_array($s)) {\n $this->resetASINs();\n $this->resetSKUs();\n $i = 1;\n foreach ($s as $x) {\n $this->options['SellerSKUList.Id.'.$i] = $x;\n $i++;\n }\n } else {\n return false;\n }\n }", "function addSubListIndex($supElem,$subElem){\r\n\t\tif($supElem->data==null) $supElem->data=new LinkedList($supElem->key);\r\n\t\t$supElem->data->insertLast($subElem);\r\n\t}", "public function getSKU()\n {\n return $this->getValue('nb_catalog_item_lang_sku');\n }", "function generateSku(){\n\t\t$characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$sku = mt_rand(10000, 99999) . mt_rand(10000, 99999) . $characters[mt_rand(0, strlen($characters) - 1)];\n\t\treturn str_shuffle($sku);\n\t}", "public function hydrate_skus_form()\n {\n // Get entity manager\n $em = EntityManagerSingleton::getInstance();\n\n // Get product options\n $sku_info = [];\n $options = $em->getRepository('Library\\Model\\Product\\Option')->findByProduct($this->product_id);\n\n $sku_info['product_options'] = $options;\n\n // Get skus\n $sku_info['skus'] = $this->product->getSkus();\n\n // Get status options\n $sku_info['status_options'] = $this->status_options;\n\n return $sku_info;\n }", "public function getSku(): ?string {\n $val = $this->getBackingStore()->get('sku');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'sku'\");\n }", "abstract protected function getTradeType();", "public function getList($sku);", "function aggregator_element_start($parser, $name, $attributes) {\n global $item, $element, $tag;\n\n switch ($name) {\n case 'IMAGE':\n case 'TEXTINPUT':\n $element = $name;\n break;\n case 'ITEM':\n $element = $name;\n $item += 1;\n }\n\n $tag = $name;\n}", "function _get_item_segments()\n {\n $segments = \"handicrafting/handicrafts/\";\n return $segments;\n }", "public function getSku()\n {\n if (is_null($this->sku)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_SKU);\n if (is_null($data)) {\n return null;\n }\n $this->sku = (string) $data;\n }\n\n return $this->sku;\n }", "function _get_items_segments()\n {\n $segments = \"crafts/handicrafts/\";\n return $segments;\n }", "public function getElements($start = 0, $end = -1);", "public function getElementType();", "function dcs_dropship_product_info_page_shortcode($atts, $content=null)\r\n{\r\n\t$retval = dcs_dropship_product_info_page($_GET['sku']);\r\n\r\n\treturn $retval;\r\n}", "function extract_unit($string, $start, $end)\n{\n\t$pos = stripos($string, $start);\n\t$str = substr($string, $pos);\n\t$str_two = substr($str, strlen($start));\n\t$second_pos = stripos($str_two, $end);\n\t$str_three = substr($str_two, 0, $second_pos);\n\n\t$unit = trim($str_three); // remove whitespaces\n\n\treturn $unit;\n}", "public function scan(string $sku)\n {\n $this->addProduct($sku);\n }", "public function getSku()\n {\n $skuAttribute = $this->helper->getSkuConfig();\n\n return $this->getAttribute($skuAttribute);\n }", "public function initVarfromXml() {\n if ((array) $this->xml_data) {\n foreach ($this->xml_data->xpath('//page_group') as $item) {\n foreach ($item->children() as $child) {\n $seq = 0;\n if (!empty($child['seq'])) {\n $seq = (string) $child['seq'];\n }\n if ($seq < 99) {\n\n if ($child['type'] == 'IE') {\n foreach ($child->xpath('input') as $value) {\n $tp = 0;\n if (empty($value->value)) {\n $datav = (string) $value->default;\n } else {\n $datav = (string) $value->value;\n }\n if (strtolower($value->type) == 'number')\n $tp = 1;\n if (empty($this->sccpvalues[(string) $value->name])) {\n $this->sccpvalues[(string) $value->name] = array('keyword' => (string) $value->name, 'data' => $datav, 'type' => $tp, 'seq' => $seq);\n// $this->sccpvalues[] = array('keyword' => (string)$value->name, 'data' =>(string)$value->default, 'type'=> '0');\n }\n }\n }\n if ($child['type'] == 'IS' || $child['type'] == 'IED') {\n if (empty($child->value)) {\n $datav = (string) $child->default;\n } else {\n $datav = (string) $child->value;\n }\n if (empty($this->sccpvalues[(string) $child->name])) {\n $this->sccpvalues[(string) $child->name] = array('keyword' => (string) $child->name, 'data' => $datav, 'type' => '2', 'seq' => $seq);\n// $this->sccpvalues[] = array('keyword' => (string)$child->name, 'data' =>(string)$child-> default,'type'=>'0');\n }\n }\n if ($child['type'] == 'SLD' || $child['type'] == 'SLS' || $child['type'] == 'SLT' || $child['type'] == 'SL' || $child['type'] == 'SLM' || $child['type'] == 'SLZ' || $child['type'] == 'SLZN' || $child['type'] == 'SLA') {\n if (empty($child->value)) {\n $datav = (string) $child->default;\n } else {\n $datav = (string) $child->value;\n }\n if (empty($this->sccpvalues[(string) $child->name])) {\n $this->sccpvalues[(string) $child->name] = array('keyword' => (string) $child->name, 'data' => $datav, 'type' => '2', 'seq' => $seq);\n }\n }\n }\n }\n }\n }\n }", "public function getSkuId(): int\n {\n return $this->skuId;\n }", "public function setSKU($sku) {\r\n $this->_data['SKU'] = $sku;\r\n return $this;\r\n }", "function extract_unit($string, $start, $end)\n {\n $pos = stripos($string, $start);\n $str = substr($string, $pos);\n $str_two = substr($str, strlen($start));\n $second_pos = stripos($str_two, $end);\n $str_three = substr($str_two, 0, $second_pos);\n $unit = trim($str_three); // remove whitespaces\n\n return $unit;\n }", "function start_lvl(&$output, $depth = 0, $args = array()) {\n\t\t $output .= \"<span class='subcategories'>\";\n\t\t}", "public function getSku()\n {\n return $this->quoteItem->getSku();\n }", "function standings_key_superclass() { return 'superclass'; }", "public function setSellerSKU($value) \n {\n $this->_fields['SellerSKU']['FieldValue'] = $value;\n return $this;\n }", "public function getSubLocality();", "public static function getGrandTypes();", "function wp_get_elements_class_name($block)\n {\n }", "public function getProductBySku($sku);", "public function show(SkuFormat $skuFormat)\n {\n //\n }", "function start_tag($parser, $name, $attrs) {\n //echo \"<b>Element: $name</b><br>\";\t// ??? ????????\n switch ($name) {\n case 'tarif':\n $this->curElem = array();\n break;\n case 'office':\n $this->curElem = array();\n break;\n default:\n $this->index = $name;\n break;\n };\n }", "public function generate()\n {\n $skuCount = (int) Option::get(\"catalog.generator\", \"sku_count\");\n if($skuCount > 0)\n parent::generate();\n }", "public function getSkuSuffix() : string\n {\n return $this->skuSuffix;\n }", "function end_tag($parser, $name) {\n if ((is_array($this->curElem)) && ($name == 'tarif')) {\n $this->rz[] = $this->curElem;\n $this->curElem = null;\n };\n if ((is_array($this->curElem)) && ($name == 'office')) {\n $this->rz_office[] = $this->curElem; //$this->curElem['to_tarif'];\n $this->curElem = null;\n };\n $this->index = null;\n }", "function nova_bs_fusion_apply_group_nova_bs_skins_info() {\n $groups = array();\n $groups['region_specific'] = array(\n 'title' => t('Region specific'),\n 'description' => t('Skins dependent on content'),\n 'weight' => 20,\n );\n\n return $groups;\n}", "function getStartPrice($_DATA)\n { \n $dp=$this->dp; \n \n $nodeId = $_DATA['objId']; //$this->utf8Urldecode($_DATA['objId']);\n $q= \"SELECT START_OF_DAY_PRICE FROM imk_II WHERE ISIN_CODE = '$nodeId'\";\n\n $dp->setQuery($q);\n $price = $dp->loadResult();\n \n return $price;\n }", "public function setSku($sku) {\n $this->_sku = $sku;\n return $this;\n }", "function getType()\n\t{\n\t\treturn \"st\";\n\t}", "public function getSku($i = 0)\n {\n if (isset($this->prepList[$i]['SellerSKU'])) {\n return $this->prepList[$i]['SellerSKU'];\n } else {\n return false;\n }\n }", "public function getStamina()\n {\n return $this->getXml()->getElementsByTagName('StaminaSkill')->item(0)->nodeValue;\n }", "public function getChildType(): string;", "function get_attribute_by_type($_type,$_id_member=FALSE,$_id_product=FALSE,$_id_zhout=FALSE,$_data_product = array(),$_id_source=NULL)\n\t{\n\t\tswitch($_type)\n\t\t{\n\t\t\tcase 'wishes_product' : $_wishes_product = $this->CI->model_zhout->get_wishes_product_by_id_product($_id_product);\n\t\t\t\t\t\t\t\t\t//Must relate with model wishlist return must an integer\n\t\t\t\t\t\t\t\t\t$_wishlist_already_added = $this->CI->model_product->is_added_stuff($_id_product,$_id_member);\n\t\t\t\t\t\t\t\t\t$_wishlist_html ='';\n\t\t\t\t\t\t\t\t\t$_wishlist_html ='<a href=\"javascript:void(0);\"'.((!$_wishlist_already_added)?'onClick =\"addWishlist(this)\"' :'').'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t id=\"'.$_id_product.' id_source=\"'.$_id_source.'\">';\n\t\t\t\t\t\t\t\t\tif($_wishes_product)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$_wishlist_html .= 'Wishes('.$_wishes_product.')';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t \t$_wishlist_html .= 'Wishes(0)';\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$_wishlist_html .= '</a>';\n\t\t\t\t\t\t\t\t\treturn $_wishlist_html;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\tcase 'addthis_button' : \n\t\t\t\t\t\t\t\t\treturn '<div class=\"addthis_toolbox addthis_default_style \"\n\t\t\t\t\t\t \t\t\taddthis:url=\"'.$_data_url = ((isset($_data_product['product_detail_page_link']))? $_data_product['product_detail_page_link']:'product internal').'\"\n \t\t\t\t\t \t\t\taddthis:title=\"'.$_data_title =((isset($_data_product['product_detaill']))? $_data_product['product_detail_page_link']:'product internal').'\"\n \t\t\taddthis:description=\"'.$_data_desc =((isset($_data_product['desc']))?$_data_product['desc']:'' ).'\">\n\t\t\t\t\t\t\t\t\t<a class=\"addthis_counter addthis_pill_style\"></a>\n\t\t\t\t\t\t\t\t\t</div>';\n\t\t\t \n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\tcase 'comment_view'\t\t : $_data_comment =$this->CI->model_zhout->get_comment_by_id_zhout($_id_zhout);\n\t\t\t\t\t\t\t\t\tif(count($_data_comment))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment = array();\n\t\t\t\t\t\t\t\t\t\tif(count($_data_comment)> 2)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$_data_comment =$this->CI->model_zhout->get_comment_by_id_zhout($_id_zhout,0,2,$this->_DEFAULT_SHOW_COMMENT_FROM_LAST);\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_show_all_comment'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_data_comment'] = $_data_comment;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_show_comment_input'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_id_zhout'] =$_id_zhout;\n\t\t\t\t\t\t\t\t\t\t\t$this->_INPUT_DATA['comment_text']['value']['ref'] = $_id_zhout;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_comment_text'] =call_user_func($this->_INPUT_DATA['comment_text']['type'],$this->_INPUT_DATA['comment_text']['value']);\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_for_single_ajax'] =FALSE;\n\t\t\t\t\t\t\t\t\t\t\treturn $this->CI->load->view('zhout/zhout_comment_view',$_data_view_comment,TRUE);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if(count($_data_comment)> 0 && count($_data_comment)<=2)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_show_all_comment'] = FALSE;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_data_comment'] = $_data_comment;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_show_comment_input'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_id_zhout'] =$_id_zhout;\n\t\t\t\t\t\t\t\t\t\t\t$this->_INPUT_DATA['comment_text']['value']['ref'] = $_id_zhout;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_comment_text'] =call_user_func($this->_INPUT_DATA['comment_text']['type'],$this->_INPUT_DATA['comment_text']['value']);\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_for_single_ajax'] =FALSE;\n\t\t\t\t\t\t\t\t\t\t\treturn $this->CI->load->view('zhout/zhout_comment_view',$_data_view_comment,TRUE);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_show_all_comment'] = FALSE;\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_data_comment'] = $_data_comment;\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_show_comment_input'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_id_zhout'] =$_id_zhout;\n\t\t\t\t\t\t\t\t\t\t$this->_INPUT_DATA['comment_text']['value']['ref'] = $_id_zhout;\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_comment_text'] =call_user_func($this->_INPUT_DATA['comment_text']['type'],$this->_INPUT_DATA['comment_text']['value']);\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_for_single_ajax'] =FALSE;\n\t\t\t\t\t\t\t\t\t\treturn $this->CI->load->view('zhout/zhout_comment_view',$_data_view_comment,TRUE);\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn FALSE;\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\tcase 'comment_status'\t : $_count_comment = $this->CI->model_zhout->get_comment_by_id_zhout($_id_zhout);\n\t\t\t\t\t\t\t\t\t $_status_comment ='<a href =\"javascript:void(0)\" id=\"comment_status-'.$_id_zhout.'\" onClick=\"commentStatus(this);\" >';\n\t\t\t\t\t\t\t\t\t if(count($_count_comment))\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t \t$_status_comment .= 'COMMENT('.count($_count_comment).')';\t\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t \t$_status_comment .= 'COMMENT('.count($_count_comment).')';\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t $_status_comment .= '</a>';\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t return $_status_comment; \n\t\t\t\t\t\t\t\t\tbreak;\n\t\t case 'more_comments'\t\t: $_data_comment =$this->CI->model_zhout->get_comment_by_id_zhout($_id_zhout,0,FALSE,$this->_DEFAULT_SHOW_COMMENT_FROM_LAST);\n\t\t \t\t\t\t\t\t\t $_data_view_comment['_show_all_comment'] = FALSE;\n\t\t\t\t\t\t\t\t\t $_data_view_comment['_data_comment'] = $_data_comment;\n\t\t\t\t\t\t\t\t\t $_data_view_comment['_show_comment_input'] = TRUE;\n\t\t\t\t\t\t\t\t\t $_data_view_comment['_id_zhout'] =$_id_zhout;\n\t\t\t\t\t\t\t\t\t $this->_INPUT_DATA['comment_text']['value']['ref'] = $_id_zhout;\n\t\t\t\t\t\t\t\t\t $_data_view_comment['_comment_text'] =call_user_func($this->_INPUT_DATA['comment_text']['type'],$this->_INPUT_DATA['comment_text']['value']);\n\t\t\t\t\t\t\t\t\t $_data_view_comment['_for_single_ajax'] =TRUE;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t return $this->CI->load->view('zhout/zhout_comment_view',$_data_view_comment,TRUE);\n\t\t\t\t\t\t\t\t\t \n\t\t \t\t\t\t\t\t\t\t\n\t\t}\n\t}", "public function getElementTypeLowerCase() {}", "function beginSubMenu() {\n\t\treturn html_ao('ul', array('class' => 'submenu'));\n\t}", "function getProduct($u){\n global $baseurl, $o, $r, $i, $local;\n $path = \"\";\n $d = new simple_html_dom();\n $d->load(scraperwiki::scrape($u));\n if (is_null($d->find('div[id=medproimg]',0))) {\n return 0;\n }\n//echo \"Loaded URL: \" . $u . \"\\n\";\n $imgfileurl = $d->find('div[id=medproimg]',0)->first_child()->href;\n $imgfile = trim(strrchr($imgfileurl,\"/\"),\"/ \");\n $img = \"/\" . substr($imgfile,0,1) . \"/\" . substr($imgfile,1,1) . \"/\" . $imgfile;\n fputcsv($i,array($imgfileurl,$img));\n $catname = \"\";\n $cats = $d->find('div[id=breadcrumb] ul li a');\n foreach ($cats as $cat) {\n $catname .= trim($cat->innertext) . \"/\";\n }\n $catname .= trim($d->find('div[id=breadcrumb] ul a b',0)->innertext);\n if (!is_null($d->find('div[id=prospecsbox]',0))) {\n $description = $d->find('div[id=prospecsbox]',0)->outertext;\n } else {\n $description = \"\";\n }\n if (!is_null($d->find('div[id=ctl00_cphContent_divShippingBilling]',0))) {\n $description .= $d->find('div[id=ctl00_cphContent_divShippingBilling]',0)->outertext;\n }\n if (!is_null($d->find('span[id=ctl00_cphContent_hidebrandid]',0))) {\n $brand = trim($d->find('span[id=ctl00_cphContent_hidebrandid]',0)->first_child()->innertext);\n } else {\n $brand = \"\";\n }\n $data = array(\n trim($d->find('span[id=pskuonly]',0)->innertext),\n \"\",\n \"Default\",\n \"simple\",\n $catname,\n \"Home\",\n \"base\",\n \"12/12/15 22:48\",\n $description,\n \"No\",\n 0,\n $img,\n $brand,\n \"\",\n \"Use config\",\n \"Use config\",\n trim($d->find('div[id=productname]',0)->first_child()->innertext),\n \"Product Info Column\",\n \"1 column\",\n trim($d->find('div[id=proprice]',0)->first_child()->innertext,\"$ \"),\n 0,\n \"\",\n $img,\n 1,\n 2,\n $img,\n \"12/12/15 22:48\",\n \"\",\n \"\",\n 4,\n 1.0000,\n 0,\n 1,\n 1,\n 0,\n 0,\n 1,\n 1,\n 1,\n 0,\n 1,\n 1,\n 1,\n 0,\n 1,\n 0,\n 1,\n 0,\n 1,\n 0,\n 0,\n 88,\n $img,\n $d->find('div[id=medproimg]',0)->first_child()->title,\n 1,\n 0 \n );\n fputcsv($o,$data);\n $thumbs = $d->find('div[id=altvidthmbs] thmbs');\n if (count($thumbs) > 1) {\n for ($x = 0; $x <= (count($thumbs) - 2); $x++) {\n $imgfileurl = $thumbs[$x]->first_child()->href;\n $imgfile = trim(strrchr($imgfileurl,\"/\"),\"/ \");\n $img = \"/\" . substr($imgfile,0,1) . \"/\" . substr($imgfile,1,1) . \"/\" . $imgfile;\n fputcsv($i,array($imgfileurl,$img));\n $data = array(\n \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\n \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\n \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\n \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\n \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\n \"\",\"88\",\n $img,\n $thumbs[$x]->first_child()->title,\n ($x + 2),\n 0\n );\n fputcsv($o,$data);\n }\n }\n $reviews = $d->find('table[id=ctl00_cphContent_datalistReviews] div.pr-review-wrap');\n if (count($reviews) > 0) {\n foreach ($reviews as $rev) {\n $data = array(\n trim($d->find('span[id=pskuonly]',0)->innertext),\n trim($rev->find('p.pr-review-rating-headline span',0)->innertext),\n trim($rev->find('span.pr-rating',0)->innertext),\n trim($rev->find('span[id$=labelUser]',0)->innertext),\n trim($rev->find('span[id$=labelLocation]',0)->innertext),\n trim($rev->find('div.pr-review-author-date',0)->innertext),\n trim($rev->find('span[id$=labelComments]',0)->innertext)\n );\n fputcsv($r,$data);\n }\n }\n echo trim($d->find('div[id=productname]',0)->first_child()->innertext) . \"\\n\";\n return 1;\n}", "public function register_fundraiser_product_type()\n {\n // This is kind of dumb but neccessary. WooCommerce doesn't want\n // to load namespaced classes so we can't depend on our Autoloader.\n require_once( __DIR__ . '/Fundraisers/FundraiserProduct.php' );\n }", "function get_type_partners()\n{\n return 'atu_partners';\n}", "public function testAddItemSubCategoryTag()\n {\n }", "public function getSubNodeNames();", "public function getDataWithTypeLeveluid() {}", "public function getExternalSkuData ()\n {\n $sql = \"SELECT t1.id,t1.sku_name,t1.sku_creation_date,t1.sku_description,t3.sku_active_status_name,t4.unit_name FROM\n `tbld_sku` as t1 \n inner join `tbli_sku_mou_price_mapping` as t2 on t1.id=t2.sku_id\n left join `tbld_sku_active_status` as t3 on t1.sku_active_status_id=t3.id\n left join `tbld_unit` as t4 on t2.mou_id=t4.id\n where t1.sku_type_id=2\";\n $query = $this->db->query( $sql )->result_array();\n return $query;\n }", "public function getSalesOfficeCode()\n {\n return $this->firstNodeAttribute(\"IDOC/E1EDK14/QUALF[.='016']/parent::*\", 'ORGID', null);\n }", "function tideways_span_create($category)\n{\n}", "function extractGoodsCodeFromSINHYUPOrderGoods($str){\r\n\r\n $list = new LinkedList();\r\n $cnt=strlen($str);\r\n $max=0;\r\n $start=-1;\r\n for($i=0; $i<$cnt; $i++){\r\n $list->insertAtBack(ord(substr($str,$i,1)));\r\n }\r\n // echo \"size of List :\".$list->sizeOfList().\"<br>\";\r\n // echo \"cnt : $cnt<br>\";\r\n $curNode=$list->getHead();\r\n $i=0;\r\n while($curNode!=null){\r\n if($curNode->getData()>=48 && $curNode->getData()<=57 && $max!=3){//숫자라면\r\n if($start<0){\r\n $start=$i;\r\n }\r\n $max++;\r\n // echo $max.\"<br>\";\r\n\r\n }\r\n else{//숫자가 아니라면\r\n if($curNode->getData()==45 && $max==3){\r\n $max++;\r\n // echo $max.\"<br>\";\r\n }\r\n else{\r\n $max=0;\r\n $start=-1;\r\n }\r\n\r\n }\r\n if($max==10){\r\n\r\n $goodsCode=substr($str,$start,$max);\r\n // echo \"complete! goodsCode : \".$goodsCode.\"<br>\";\r\n $list=null;\r\n return $goodsCode;\r\n }\r\n $curNode=$curNode->getNext();\r\n $i++;\r\n\r\n }\r\n $goodsCode=\"\";\r\n $list=null;\r\n return $goodsCode;\r\n }", "function getUnitList($type) {\n global $userUnitList;\n $data = array();\n foreach($userUnitList[$type] as $name) {\n array_push($data, array(\n 'name' => $name,\n 'img' => \"/imgs/{$name}.gif\"\n ));\n }\n return $data;\n }", "function endElement($parser, $name) {\n ## here we rest the current tag\n $this->current_tag = \"\";\n \n switch($name) {\n case 'PAGE' : {\n \t ## let's store the name for this page\n \t $this->page_object[$this->page_counter]['NAME'] = $this->page_name;\n \t $this->page_counter++;\n \t \n ## clear the vars\n $this->current_block = '';\n $this->page_name = '';\n \n break;\n } \n case 'ROW' : {\n \t$this->rows_object[$this->row_counter]['NAME'] = $this->row_name;\n \t$this->page_object[$this->page_counter][$this->row_counter]['NAME'] = $this->row_name;\n \t$this->row_counter++;\n \n \t## clear the vars\n \t$this->current_block = '';\n \t\t\t\t$this->row_name = '';\n \tbreak;\n } \n default: { \n ## store the thing- needs to be checked!\n if(isset($this->rows_object[$this->row_counter])) {\n \t$num_elements = count($this->rows_object[$this->row_counter]);\n } else {\n \t$num_elements = 0;\n }\n \n $this->rows_object[$this->row_counter][$num_elements++] = $this->element_object;\n\n if(isset($this->page_object[$this->page_counter][$this->row_counter])) {\n \t$num_elements = count($this->page_object[$this->page_counter][$this->row_counter]);\n } else {\n \t$num_elements = 0;\n }\n \n $this->page_object[$this->page_counter][$this->row_counter][$num_elements++] = $this->element_object;\n $this->objects[$this->element_object['TYPE']] = true;\n \n ## clear the vars\n $this->element_object = '';\n $this->current_block = '';\n break;\n }\n\n } \n\n }", "private function loadTypes() : void {\n\t\t$this->types[DuelType::DUEL_TYPE_1V1] = new DuelType($this, DuelType::DUEL_TYPE_1V1, LanguageUtils::translateColors(\"&l&31v1\"), Item::get(Item::MOB_HEAD, Skull::TYPE_HUMAN, 1), \"http://jacknoordhuis.net/minecraft/icons/items/397-3.png\", 2, 2);\n\t\t$this->types[DuelType::DUEL_TYPE_2v2] = new DuelType($this, DuelType::DUEL_TYPE_2v2, LanguageUtils::translateColors(\"&l&32v2\"), Item::get(Item::MOB_HEAD, Skull::TYPE_HUMAN, 2), \"http://jacknoordhuis.net/minecraft/icons/items/397-3.png\", 4, 4);\n\t\t$this->types[DuelType::DUEL_TYPE_FFA] = new DuelType($this, DuelType::DUEL_TYPE_FFA, LanguageUtils::translateColors(\"&l&3FFA\"), Item::get(Item::MOB_HEAD, Skull::TYPE_DRAGON, 1), \"http://jacknoordhuis.net/minecraft/icons/items/397-5.png\", 24, 2);\n\t}" ]
[ "0.51832384", "0.51832384", "0.5126006", "0.5083428", "0.5051348", "0.49378672", "0.49171", "0.48871616", "0.4880285", "0.48791653", "0.48661", "0.4829861", "0.48140955", "0.48014766", "0.4789938", "0.47875044", "0.47833332", "0.47145694", "0.46972987", "0.4678153", "0.46377426", "0.4632368", "0.4589207", "0.45765126", "0.4548818", "0.4546417", "0.4546211", "0.4520186", "0.44980273", "0.446555", "0.44627506", "0.44616148", "0.4447934", "0.44450375", "0.4427627", "0.4417035", "0.44119012", "0.4403748", "0.4383117", "0.43708616", "0.43581083", "0.43525612", "0.4327902", "0.43227822", "0.4321954", "0.43217617", "0.43167722", "0.43117982", "0.42986566", "0.4297042", "0.42922503", "0.4283711", "0.4283364", "0.42772856", "0.42763448", "0.42710927", "0.426785", "0.42574468", "0.42569843", "0.42553613", "0.4248273", "0.42469984", "0.42458954", "0.42447323", "0.42440924", "0.4242503", "0.4239414", "0.42250735", "0.4222273", "0.4217167", "0.42171657", "0.42116925", "0.42011744", "0.41999698", "0.4194676", "0.4191538", "0.4191148", "0.4189811", "0.4184161", "0.4179109", "0.41789943", "0.41759175", "0.41740763", "0.41698235", "0.4165892", "0.41567233", "0.41554478", "0.4154576", "0.41521987", "0.4151771", "0.41508135", "0.4145551", "0.4143262", "0.41432115", "0.4137789", "0.41363755", "0.41347486", "0.41261965", "0.41227213", "0.4120767", "0.41184968" ]
0.0
-1
/ sky Type End / sku start/
public function getSkuName () { $sql = " SELECT t1.id,sku_name,sku_description,sku_code,sku_weight_id,sku_lpc,sku_volume,sku_launch_date,t8.sku_type_name, GROUP_CONCAT(t5.unit_name SEPARATOR '<br /><br />') AS unit,t2.quantity, GROUP_CONCAT(ROUND(t2.db_lifting_price,2) SEPARATOR '<br /><br />') as db_lifting_price , GROUP_CONCAT(ROUND(t2.outlet_lifting_price,2) SEPARATOR '<br /><br />') AS outlet_lifting_price, GROUP_CONCAT(ROUND(t2.mrp_lifting_price,2) SEPARATOR '<br /><br /> ') AS mrp_lifting_price , t3.element_name,t4.sku_active_status_name,t5.unit_name,t6.element_name as product, t7.element_name as catagory FROM tbld_sku AS t1 INNER JOIN `tbli_sku_mou_price_mapping` AS t2 ON t1.id = t2.sku_id INNER JOIN tbld_sku_active_status AS t4 ON t1.sku_active_status_id = t4.id INNER JOIN tbld_sku_hierarchy_elements AS t3 ON t1.parent_id = t3.id INNER JOIN tbld_unit AS t5 ON t5.id= t2.mou_id left join tbld_sku_hierarchy_elements as t6 on t6.id = t3.parent_element_id left join tbld_sku_hierarchy_elements as t7 on t7.id = t6.parent_element_id left Join `tbld_sku_type` as t8 On t1.sku_type_id=t8.id GROUP BY t2.sku_id ORDER BY t2.sku_id,t2.quantity asc"; $query = $this->db->query( $sql )->result_array(); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function changesku(){\t \r\n\t $this->chartValue(); //adding to output\r\n\t $this->idleStHealthChk(); //adding to output\r\n\t}", "function getSkus() {\n\techo \"Getting Skus </br>\";\n\t$response = getRequest('/api/sku');\n\tprintInfo($response);\n}", "public function getSku();", "public function getSku();", "public function generate()\n {\n $skuCount = (int) Option::get(\"catalog.generator\", \"sku_count\");\n if($skuCount > 0)\n parent::generate();\n }", "function nova_bs_fusion_apply_group_nova_bs_skins_info() {\n $groups = array();\n $groups['region_specific'] = array(\n 'title' => t('Region specific'),\n 'description' => t('Skins dependent on content'),\n 'weight' => 20,\n );\n\n return $groups;\n}", "public function getProductSKU()\n {\n }", "public function getSku()\n {\n return 'Tomato';\n }", "private function getSkuSelectionList() {\r\n //$this->jsonOutput[\"skuSelectionList\"] = $this->settingVars->pageArray[\"SKU_SELECTION_LIST\"];\r\n\t\tif(isset($this->jsonOutput[\"settings\"]['sku_settings']) && $this->jsonOutput[\"settings\"]['sku_settings'] != \"\")\r\n\t\t\t$this->jsonOutput[\"skuSelectionList\"] = $this->jsonOutput[\"settings\"]['sku_settings'];\r\n }", "function generateSku(){\n\t\t$characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$sku = mt_rand(10000, 99999) . mt_rand(10000, 99999) . $characters[mt_rand(0, strlen($characters) - 1)];\n\t\treturn str_shuffle($sku);\n\t}", "public function setSku($sku);", "public function testGetSku()\n {\n $data_from_collection = $this->data['annual_collection'];\n $this->assertEquals(\n $data_from_collection['attributes']['plan_sku'],\n $this->makePlan($data_from_collection)->getSku()\n );\n\n $data_from_site = $this->data['annual_site'];\n $this->assertEquals($data_from_site['sku'], $this->makePlan($data_from_site)->getSku());\n }", "public function show(SkuFormat $skuFormat)\n {\n //\n }", "public function getSKUPartsData() {\n $partsData = DB::table('part_number')->select('SKU', 'id')->get();\n $sku = '';\n $sku .=\"<option value='\" . '' . \"' selected='selected' > select sku</option>\";\n foreach ($partsData as $key => $value) {\n $sku .=\"<option value='\" . $value->id . \"'>\" . $value->SKU . \"</option>\";\n }\n return $sku;\n }", "public function getSkins(): array;", "public function getSku()\n {\n return $this->sku;\n }", "private function papar_keputusan_enxiety($skor2){\n switch($skor2){\n case in_array($skor2, range(0,4)): $keputusan= 'NORMAL'; break;\n case in_array($skor2, range(5,6)): $keputusan= 'RINGAN'; break;\n case in_array($skor2, range(7,8)): $keputusan= 'SEDERHANA'; break;\n case in_array($skor2, range(9,10)): $keputusan= 'TERUK'; break;\n case ($skor2 >= 11 ): $keputusan= 'SANGAT TERUK'; break;\n }\t\t\n return $keputusan;\t\n }", "public function getItemSku();", "public function store(Request $request)\n {\n switch($request->seccion) {\n case 'ortopedia':\n $sku = 'ORTO' . $request->categoria_abr . $request->producto_abr . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->categoria . ' '. $request->producto . ' ' . $request->marca . ' ' . $request->modelo . ' ' . $request->talla . ' ' . $request->unidad . ' ' . $request->color;\n break;\n case 'micas':\n $sku = 'MICA' . $request->familia_abr . $request->materiales_abr . $request->tipo_abr . $request->tratamiento_abr . $request->color_abr;\n $desc = $request->familia . ' ' . $request->materiales . ' ' . $request->tipo . ' ' . $request->tratamiento . ' ' . $request->color;\n break;\n case 'armazones':\n $sku = 'ARMA' . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->marca . ' ' . $request->modelo . ' ' . $request->color . ' ' . $request->medidas . ' '. $request->unidad;\n break;\n case 'contacto':\n $sku = 'CONT' . $request->categoria_abr . ' ' . $request->tipo_abr . $request->marca_abr . $request->periodo_abr;\n $desc = $request->categoria . ' ' . $request->tipo . ' ' . $request->marca . ' ' . $request->periodo;\n break;\n case 'generales':\n $sku = 'GRAL' . $request->producto_abr . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->producto . ' ' . $request->marca . ' ' . $request->modelo . ' ' . $request->color;\n break;\n default:\n break;\n }\n $sku = str_replace(' ', '', $sku);\n $request['sku_interno'] = $sku;\n $request['descripcion'] = $desc;\n $producto = Producto::create($request->all());\n $aux1 = $request->foto1 ? (Storage::putFileAs('productos/' . $request->seccion . '/' . $producto->id, $request->file('foto1'), 'foto1.jpg')) : null;\n $aux2 = $request->foto2 ? (Storage::putFileAs('productos/' . $request->seccion . '/' . $producto->id, $request->file('foto2'), 'foto2.jpg')) : null;\n $aux3 = $request->foto3 ? (Storage::putFileAs('productos/' . $request->seccion . '/' . $producto->id, $request->file('foto3'), 'foto3.jpg')) : null;\n $producto->foto1 = $aux1;\n $producto->foto2 = $aux2;\n $producto->foto3 = $aux3;\n $producto->save();\n $historial = new Historial(['tipo' => 'Alta de Producto', 'descripcion' => 'Producto registrado.']);\n $producto->historiales()->save($historial);\n return redirect()->route('productos.show', ['producto' => $producto]);\n }", "public function generatesku()\n {\n $newsku = 111111;\n //We need to generate a random sku number that does not already exist\n $exists = true;\n $newsku = mt_rand(100000,999999);\n do {\n $product = $this->Product->findBysku($newsku);\n if(empty($product))\n $exists = false;\n } while($exists);\n return $newsku;\n }", "public function saveSkins()\n {\n \\XLite\\Core\\Database::getCacheDriver()->save(\n get_called_class() . '.SubstitutonalSkins',\n $this->resourcesCache\n );\n }", "public function getSKU()\n {\n return $this->sKU;\n }", "public function testGetStoreFrontSkuReturnsSkuWhenSkusShown ()\n\t{\n\t\t$showSkuBackup = Store_Config::get('ShowProductSKU');\n\t\tStore_Config::override('ShowProductSKU', true);\n\t\t$details = new Store_Product_Details;\n\t\t$details->setSku('test');\n\t\t$this->assertSame('test', $details->getStoreFrontSku());\n\t\tStore_Config::override('ShowProductSKU', $showSkuBackup);\n\t}", "function get_usertyp($usrid){\r\n\t\r\n}", "public function getSkuSuffix() : string\n {\n return $this->skuSuffix;\n }", "function Skin_Base( $skin=\"\", $type=\"\", $globals=\"\" )\n\t{\n\t\t$this->debug = 1 ;\n\t\t$this->type = $type ;\n\t\t$this->set_globals($globals) ;\n\t\t$this->skin = $skin ;\n\t\t\n\t\t$this->skindir = \"./skin/$skin\" ;\n\n\t\t///기본 전역 변수는 안에서 세팅 해놓자.\n\t\t$this->default_globals = '$__SERVER, $__GET, $__POST, $__COOKIE, $__FILES, $__ENV, $__SESSION ' ;\n\t\t$this->globals = \"global \".$this->default_globals.\", \".$globals.\" ;\" ; \n\n\t\tif($this->debug) echo(\"Skin_Base <\".time().\"><br>\") ;\n\n\t}", "function monsterinsights_get_license_key_type() {\n\t$type = false;\n\t$license = monsterinsights_get_license();\n\tif ( ! empty( $license['type'] ) && is_string( $license['type'] ) ) {\n\t\tif ( in_array( $license['type'], array( 'master', 'pro', 'plus', 'basic' ) ) ) {\n\t\t\t$type = $license['type'];\n\t\t}\n\t}\n\treturn $type;\n}", "public function actionWalmartproductinfo()\n {\n $sku = false;\n $productdata = \"add sku on url like ?sku=product_sku\";\n if (isset($_GET['sku'])) {\n $sku = $_GET['sku'];\n }\n $merchant_id = MERCHANT_ID;\n $config = Data::getConfiguration($merchant_id);\n $walmartHelper = new Walmartapi($config['consumer_id'], $config['secret_key']);\n if ($sku) {\n $productdata = $walmartHelper->getItem($sku);\n }\n print_r($productdata);\n die;\n }", "private function resetSkus()\n {\n foreach ($this->options as $op=>$junk) {\n if (preg_match('#SellerSKUList#', $op)) {\n unset($this->options[$op]);\n }\n }\n }", "function block_skinChooser_body(){\n $skins = listAllSkins($_SESSION[\"userId\"]);\n $customSkin = getIniKey($_SESSION[\"userId\"],\"enable\");\n $actualSkin = getIniKey($_SESSION[\"userId\"],\"fileName\");\n\n if(empty($skins)){\n echo \"<h2 style=\\\"color:red\\\">You have to upload at least one skin to use this functionnality</h2>\";\n }else{\n //Check box to enable custom skin\n echo \"Enable custom skin: <br>\";\n echo \"<span style=\\\"font-size:13px\\\"> By default the osu!replayViewer skin is used</span><br>\";\n echo '<label class=\"checkbox\">';\n if($customSkin == 1){\n echo '<input type=\"checkbox\" name=\"customSkin\" id=\"checkBox\" oninput=\"updateCustomSkin()\" checked>';\n }else{\n echo '<input type=\"checkbox\" name=\"customSkin\" oninput=\"updateCustomSkin()\" id=\"checkBox\">';\n }\n echo '</label>';\n echo '<br><br>';\n\n echo \"Choose your custom skin : <br>\";\n\n //Combobox with all skins uploaded\n echo '<div class=\"select\">';\n echo \"<select id='skinsSelector' name='skin'>\";\n foreach($skins as $skin)\n {\n if($skin == $actualSkin){\n echo \"<option value='\".$skin.\"' selected>\".$skin.\"</option>\";\n }else{\n echo \"<option value='\".$skin.\"'>\".$skin.\"</option>\";\n }\n }\n echo \"</select></div>\";\n }\n}", "public function generateSku()\n {\n $number=mt_rand(1000,9999);\n if($this->checkSku($number)){\n return $this->generateSku();\n }\n return (string)$number;\n }", "public function getSky();", "function rowstart($type) {\r\n\tif ($type == \"sell\") {\r\n\t\techo\"<tr style=\\\"background-color:#BADA55;\\\">\\n\";\r\n\t} elseif ($type == \"buy\") {\r\n\t\techo\"<tr style=\\\"background-color:#7555da; color:#EEEEEE;\\\">\\n\";\r\n\t} else { \r\n\t\techo\"<tr>\\n\";\r\n\t}\r\n}", "public function hydrate_skus_form()\n {\n // Get entity manager\n $em = EntityManagerSingleton::getInstance();\n\n // Get product options\n $sku_info = [];\n $options = $em->getRepository('Library\\Model\\Product\\Option')->findByProduct($this->product_id);\n\n $sku_info['product_options'] = $options;\n\n // Get skus\n $sku_info['skus'] = $this->product->getSkus();\n\n // Get status options\n $sku_info['status_options'] = $this->status_options;\n\n return $sku_info;\n }", "function checkSung()\n {\n return self::SUNG;\n }", "function stop(){\n\t\tif($this->time_end==0){\n\t\t\t $this->time_end = $this->microtime_float();\n\t\t\t $this->time_spend = $this->time_end - $this->time_start;\n\t\t}\n\t}", "public function __construct($_sKU = NULL,$_startPrice = NULL,$_quantity = NULL,$_variationSpecifics = NULL,$_quantitySold = NULL,$_sellingStatus = NULL,$_discountPriceInfo = NULL,$_any = NULL)\r\n\t{\r\n\t\tparent::__construct(array('SKU'=>$_sKU,'StartPrice'=>$_startPrice,'Quantity'=>$_quantity,'VariationSpecifics'=>($_variationSpecifics instanceof EbayShoppingStructNameValueListArrayType)?$_variationSpecifics:new EbayShoppingStructNameValueListArrayType($_variationSpecifics),'QuantitySold'=>$_quantitySold,'SellingStatus'=>$_sellingStatus,'DiscountPriceInfo'=>$_discountPriceInfo,'any'=>$_any));\r\n\t}", "public function getSku() {\n return $this->_sku;\n }", "public function setSku(?string $value): void {\n $this->getBackingStore()->set('sku', $value);\n }", "function ois_shortcode_skin($attr) {\r\n $to_return = '';\r\n $skin_id = $attr['skin'];\r\n\t\r\n\tif (!is_numeric($skin_id))\r\n\t{\r\n\t\t// fail fast.\r\n\t\treturn \"<!-- OptinSkin Error: A non-numeric ID was given to the short-code.\" .\r\n\t\t\t\" Please use the Skin ID, not the name. -->\";\r\n\t}\r\n // Check for split testing\r\n if (isset($attr['split']))\r\n {\r\n $split_ids = $attr['split'];\r\n $split_ids = explode(',', $split_ids);\r\n array_push($split_ids, $skin_id);\r\n // Choose a random skin from this list.\r\n $skin_id = trim($split_ids[array_rand($split_ids)]);\r\n } // if\r\n\r\n $to_return .= ois_make_skin($skin_id);\r\n return $to_return;\r\n}", "function main_section() {\n\t\t\t\t// GNDN\n\t\t}", "protected function get_station_type( ) {\n if ($this->current_group_text == 'AUTO' || $this->current_group_text == 'COR') {\n $this->wxInfo['CODE_STATION_TYPE'] = $this->current_group_text;\n $this->varConcatenate($this->wxInfo, 'IGNORES', $this->current_group_text);\n $this->current_ptr++;\n }\n $this->current_group++;\n }", "function display_sku_as_meta_data( $item, $order ) {\n\t\t\t$product = BEWPI_WC_Order_Compatibility::get_product( $order, $item );\n\t\t\t$sku = $product && BEWPI_WC_Product_Compatibility::get_prop( $product, 'sku' ) ? BEWPI_WC_Product_Compatibility::get_prop( $product, 'sku' ) : '-';\n\t\t\t?>\n\t\t\t<br>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<strong><?php esc_html_e( 'SKU:', 'woocommerce-pdf-invoices' ); ?></strong> <?php echo esc_html( $sku ); ?>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<?php\n\t\t}", "private function endonuclease_vendors() {\r\n\r\n $vendors = array(\r\n \"AarI\" => \"F\",\r\n \"AasI\" => \"F\",\r\n \"AatI\" => \"O\",\r\n \"AatII\" => \"AFGIKMNORV\",\r\n \"AbsI\" => \"I\",\r\n \"AccI\" => \"ABGJKMNORSUWX\",\r\n \"AccII\" => \"AJK\",\r\n \"AccIII\" => \"GJKRW\",\r\n \"Acc16I\" => \"IV\",\r\n \"Acc36I\" => \"I\",\r\n \"Acc65I\" => \"FGINRVW\",\r\n \"AccB1I\" => \"IV\",\r\n \"AccB7I\" => \"IRV\",\r\n \"AccBSI\" => \"IV\",\r\n \"AciI\" => \"N\",\r\n \"AclI\" => \"INV\",\r\n \"AclWI\" => \"I\",\r\n \"AcoI\" => \"I\",\r\n \"AcsI\" => \"IMV\",\r\n \"AcuI\" => \"IN\",\r\n \"AcvI\" => \"QX\",\r\n \"AcyI\" => \"JM\",\r\n \"AdeI\" => \"F\",\r\n \"AfaI\" => \"AK\",\r\n \"AfeI\" => \"IN\",\r\n \"AfiI\" => \"V\",\r\n \"AflII\" => \"AJKNO\",\r\n \"AflIII\" => \"GMNSW\",\r\n \"AgeI\" => \"JNR\",\r\n \"AhdI\" => \"N\",\r\n \"AhlI\" => \"IV\",\r\n \"AjiI\" => \"F\",\r\n \"AjnI\" => \"I\",\r\n \"AjuI\" => \"F\",\r\n \"AleI\" => \"N\",\r\n \"AlfI\" => \"F\",\r\n \"AloI\" => \"F\",\r\n \"AluI\" => \"ABFGHIJKMNOQRSUVWXY\",\r\n \"AluBI\" => \"I\",\r\n \"AlwI\" => \"N\",\r\n \"Alw21I\" => \"F\",\r\n \"Alw26I\" => \"FR\",\r\n \"Alw44I\" => \"FJMORS\",\r\n \"AlwNI\" => \"N\",\r\n \"Ama87I\" => \"IV\",\r\n \"Aor13HI\" => \"K\",\r\n \"Aor51HI\" => \"AK\",\r\n \"ApaI\" => \"ABFGIJKMNOQRSUVWX\",\r\n \"ApaLI\" => \"AKNU\",\r\n \"ApeKI\" => \"N\",\r\n \"ApoI\" => \"N\",\r\n \"AscI\" => \"GNW\",\r\n \"AseI\" => \"JNO\",\r\n \"AsiGI\" => \"IV\",\r\n \"AsiSI\" => \"N\",\r\n \"AspI\" => \"M\",\r\n \"Asp700I\" => \"M\",\r\n \"Asp718I\" => \"M\",\r\n \"AspA2I\" => \"IV\",\r\n \"AspEI\" => \"M\",\r\n \"AspLEI\" => \"IV\",\r\n \"AspS9I\" => \"IV\",\r\n \"AssI\" => \"U\",\r\n \"AsuC2I\" => \"I\",\r\n \"AsuHPI\" => \"IV\",\r\n \"AsuNHI\" => \"IV\",\r\n \"AvaI\" => \"ABGJMNORSUWX\",\r\n \"AvaII\" => \"AGJKMNRSWY\",\r\n \"AviII\" => \"M\",\r\n \"AvrII\" => \"N\",\r\n \"AxyI\" => \"J\",\r\n \"BaeI\" => \"N\",\r\n \"BalI\" => \"AJKR\",\r\n \"BamHI\" => \"ABFGHIJKMNOQRSUVWXY\",\r\n \"BanI\" => \"NORU\",\r\n \"BanII\" => \"AGKMNOQRSWX\",\r\n \"BanIII\" => \"O\",\r\n \"BarI\" => \"I\",\r\n \"BasI\" => \"U\",\r\n \"BauI\" => \"F\",\r\n \"BbeI\" => \"AK\",\r\n \"BbrPI\" => \"MO\",\r\n \"BbsI\" => \"N\",\r\n \"BbuI\" => \"R\",\r\n \"BbvI\" => \"N\",\r\n \"Bbv12I\" => \"IV\",\r\n \"BbvCI\" => \"N\",\r\n \"BccI\" => \"N\",\r\n \"BceAI\" => \"N\",\r\n \"BcgI\" => \"N\",\r\n \"BciVI\" => \"N\",\r\n \"BclI\" => \"FGJMNORSUWY\",\r\n \"BcnI\" => \"FK\",\r\n \"BcuI\" => \"F\",\r\n \"BdaI\" => \"F\",\r\n \"BfaI\" => \"N\",\r\n \"BfiI\" => \"F\",\r\n \"BfmI\" => \"F\",\r\n \"BfrI\" => \"MO\",\r\n \"BfuI\" => \"F\",\r\n \"BfuAI\" => \"N\",\r\n \"BfuCI\" => \"N\",\r\n \"BglI\" => \"AFGHIJKMNOQRSUVWXY\",\r\n \"BglII\" => \"ABFGHIJKMNOQRSUVWXY\",\r\n \"BisI\" => \"I\",\r\n \"BlnI\" => \"AKMS\",\r\n \"BlpI\" => \"N\",\r\n \"BlsI\" => \"I\",\r\n \"BmcAI\" => \"V\",\r\n \"Bme18I\" => \"IV\",\r\n \"Bme1390I\" => \"F\",\r\n \"Bme1580I\" => \"N\",\r\n \"BmeRI\" => \"V\",\r\n \"BmeT110I\" => \"K\",\r\n \"BmgBI\" => \"N\",\r\n \"BmgT120I\" => \"K\",\r\n \"BmiI\" => \"V\",\r\n \"BmrI\" => \"N\",\r\n \"BmrFI\" => \"V\",\r\n \"BmtI\" => \"INV\",\r\n \"BmuI\" => \"I\",\r\n \"BoxI\" => \"F\",\r\n \"BpiI\" => \"F\",\r\n \"BplI\" => \"F\",\r\n \"BpmI\" => \"IN\",\r\n \"Bpu10I\" => \"FINV\",\r\n \"Bpu14I\" => \"IV\",\r\n \"Bpu1102I\" => \"AFK\",\r\n \"BpuAI\" => \"M\",\r\n \"BpuEI\" => \"N\",\r\n \"BpuMI\" => \"V\",\r\n \"BpvUI\" => \"V\",\r\n \"BsaI\" => \"N\",\r\n \"Bsa29I\" => \"I\",\r\n \"BsaAI\" => \"N\",\r\n \"BsaBI\" => \"N\",\r\n \"BsaHI\" => \"N\",\r\n \"BsaJI\" => \"N\",\r\n \"BsaMI\" => \"GR\",\r\n \"BsaWI\" => \"N\",\r\n \"BsaXI\" => \"N\",\r\n \"Bsc4I\" => \"I\",\r\n \"Bse1I\" => \"IV\",\r\n \"Bse8I\" => \"IV\",\r\n \"Bse21I\" => \"IV\",\r\n \"Bse118I\" => \"IV\",\r\n \"BseAI\" => \"CM\",\r\n \"BseBI\" => \"C\",\r\n \"BseCI\" => \"C\",\r\n \"BseDI\" => \"F\",\r\n \"Bse3DI\" => \"IV\",\r\n \"BseGI\" => \"F\",\r\n \"BseJI\" => \"F\",\r\n \"BseLI\" => \"F\",\r\n \"BseMI\" => \"F\",\r\n \"BseMII\" => \"F\",\r\n \"BseNI\" => \"F\",\r\n \"BsePI\" => \"IV\",\r\n \"BseRI\" => \"N\",\r\n \"BseSI\" => \"F\",\r\n \"BseXI\" => \"F\",\r\n \"BseX3I\" => \"IV\",\r\n \"BseYI\" => \"N\",\r\n \"BsgI\" => \"N\",\r\n \"Bsh1236I\" => \"F\",\r\n \"Bsh1285I\" => \"F\",\r\n \"BshFI\" => \"C\",\r\n \"BshNI\" => \"F\",\r\n \"BshTI\" => \"F\",\r\n \"BshVI\" => \"V\",\r\n \"BsiEI\" => \"N\",\r\n \"BsiHKAI\" => \"N\",\r\n \"BsiHKCI\" => \"QX\",\r\n \"BsiSI\" => \"C\",\r\n \"BsiWI\" => \"MNO\",\r\n \"BsiYI\" => \"M\",\r\n \"BslI\" => \"GNW\",\r\n \"BslFI\" => \"I\",\r\n \"BsmI\" => \"JMNOSW\",\r\n \"BsmAI\" => \"N\",\r\n \"BsmBI\" => \"N\",\r\n \"BsmFI\" => \"N\",\r\n \"BsnI\" => \"V\",\r\n \"Bso31I\" => \"IV\",\r\n \"BsoBI\" => \"N\",\r\n \"Bsp13I\" => \"IV\",\r\n \"Bsp19I\" => \"IV\",\r\n \"Bsp68I\" => \"F\",\r\n \"Bsp119I\" => \"F\",\r\n \"Bsp120I\" => \"F\",\r\n \"Bsp143I\" => \"F\",\r\n \"Bsp1286I\" => \"JKNR\",\r\n \"Bsp1407I\" => \"FK\",\r\n \"Bsp1720I\" => \"IV\",\r\n \"BspACI\" => \"I\",\r\n \"BspANI\" => \"X\",\r\n \"BspCNI\" => \"N\",\r\n \"BspDI\" => \"N\",\r\n \"BspEI\" => \"N\",\r\n \"BspFNI\" => \"I\",\r\n \"BspHI\" => \"N\",\r\n \"BspLI\" => \"F\",\r\n \"BspLU11I\" => \"M\",\r\n \"BspMI\" => \"N\",\r\n \"BspMAI\" => \"X\",\r\n \"BspOI\" => \"F\",\r\n \"BspPI\" => \"F\",\r\n \"BspQI\" => \"N\",\r\n \"BspTI\" => \"F\",\r\n \"BspT104I\" => \"K\",\r\n \"BspT107I\" => \"K\",\r\n \"BspTNI\" => \"QX\",\r\n \"BspXI\" => \"GW\",\r\n \"BsrI\" => \"N\",\r\n \"BsrBI\" => \"N\",\r\n \"BsrDI\" => \"N\",\r\n \"BsrFI\" => \"N\",\r\n \"BsrGI\" => \"N\",\r\n \"BsrSI\" => \"R\",\r\n \"BssAI\" => \"C\",\r\n \"BssECI\" => \"I\",\r\n \"BssHII\" => \"AJKMNOQRSX\",\r\n \"BssKI\" => \"N\",\r\n \"BssMI\" => \"V\",\r\n \"BssNI\" => \"V\",\r\n \"BssNAI\" => \"IV\",\r\n \"BssSI\" => \"N\",\r\n \"BssT1I\" => \"IV\",\r\n \"Bst6I\" => \"IV\",\r\n \"Bst98I\" => \"R\",\r\n \"Bst1107I\" => \"FKM\",\r\n \"BstACI\" => \"I\",\r\n \"BstAPI\" => \"IN\",\r\n \"BstAUI\" => \"IV\",\r\n \"BstBI\" => \"N\",\r\n \"Bst2BI\" => \"IV\",\r\n \"BstBAI\" => \"IV\",\r\n \"Bst4CI\" => \"IV\",\r\n \"BstC8I\" => \"I\",\r\n \"BstDEI\" => \"IV\",\r\n \"BstDSI\" => \"IV\",\r\n \"BstEII\" => \"GHJMNORSUW\",\r\n \"BstENI\" => \"IV\",\r\n \"BstF5I\" => \"IV\",\r\n \"BstFNI\" => \"IV\",\r\n \"BstH2I\" => \"IV\",\r\n \"BstHHI\" => \"IV\",\r\n \"BstKTI\" => \"I\",\r\n \"BstMAI\" => \"IV\",\r\n \"BstMBI\" => \"IV\",\r\n \"BstMCI\" => \"IV\",\r\n \"BstMWI\" => \"I\",\r\n \"BstNI\" => \"N\",\r\n \"BstNSI\" => \"IV\",\r\n \"BstOI\" => \"R\",\r\n \"BstPI\" => \"K\",\r\n \"BstPAI\" => \"IV\",\r\n \"BstSCI\" => \"I\",\r\n \"BstSFI\" => \"I\",\r\n \"BstSLI\" => \"I\",\r\n \"BstSNI\" => \"IV\",\r\n \"BstUI\" => \"N\",\r\n \"Bst2UI\" => \"IV\",\r\n \"BstV1I\" => \"I\",\r\n \"BstV2I\" => \"IV\",\r\n \"BstXI\" => \"AFGHIJKMNOQRVWX\",\r\n \"BstX2I\" => \"IV\",\r\n \"BstYI\" => \"N\",\r\n \"BstZI\" => \"R\",\r\n \"BstZ17I\" => \"N\",\r\n \"Bsu15I\" => \"F\",\r\n \"Bsu36I\" => \"NR\",\r\n \"BsuRI\" => \"FI\",\r\n \"BsuTUI\" => \"X\",\r\n \"BtgI\" => \"N\",\r\n \"BtgZI\" => \"N\",\r\n \"BtrI\" => \"IV\",\r\n \"BtsI\" => \"N\",\r\n \"BtsCI\" => \"N\",\r\n \"BtuMI\" => \"V\",\r\n \"BveI\" => \"F\",\r\n \"Cac8I\" => \"N\",\r\n \"CaiI\" => \"F\",\r\n \"CciNI\" => \"IV\",\r\n \"CelII\" => \"M\",\r\n \"CfoI\" => \"MRS\",\r\n \"CfrI\" => \"F\",\r\n \"Cfr9I\" => \"FO\",\r\n \"Cfr10I\" => \"FGKO\",\r\n \"Cfr13I\" => \"AFO\",\r\n \"Cfr42I\" => \"F\",\r\n \"ClaI\" => \"ABHKMNRSU\",\r\n \"CpoI\" => \"AFK\",\r\n \"CseI\" => \"F\",\r\n \"CspI\" => \"OR\",\r\n \"Csp6I\" => \"F\",\r\n \"Csp45I\" => \"OR\",\r\n \"CspAI\" => \"C\",\r\n \"CspCI\" => \"N\",\r\n \"CviAII\" => \"N\",\r\n \"CviJI\" => \"QX\",\r\n \"CviKI-1\" => \"N\",\r\n \"CviQI\" => \"N\",\r\n \"DdeI\" => \"BGMNORSW\",\r\n \"DinI\" => \"V\",\r\n \"DpnI\" => \"BEFGMNRSW\",\r\n \"DpnII\" => \"N\",\r\n \"DraI\" => \"ABFGIJKMNOQRSUVWXY\",\r\n \"DraII\" => \"GMW\",\r\n \"DraIII\" => \"GIMNVW\",\r\n \"DrdI\" => \"N\",\r\n \"DriI\" => \"I\",\r\n \"DseDI\" => \"IV\",\r\n \"EaeI\" => \"AKMN\",\r\n \"EagI\" => \"GNW\",\r\n \"Eam1104I\" => \"F\",\r\n \"Eam1105I\" => \"FK\",\r\n \"EarI\" => \"N\",\r\n \"EciI\" => \"N\",\r\n \"Ecl136II\" => \"F\",\r\n \"EclHKI\" => \"R\",\r\n \"EclXI\" => \"MS\",\r\n \"Eco24I\" => \"F\",\r\n \"Eco31I\" => \"F\",\r\n \"Eco32I\" => \"F\",\r\n \"Eco47I\" => \"FO\",\r\n \"Eco47III\" => \"FGMORW\",\r\n \"Eco52I\" => \"FKO\",\r\n \"Eco57I\" => \"F\",\r\n \"Eco72I\" => \"F\",\r\n \"Eco81I\" => \"AFKO\",\r\n \"Eco88I\" => \"F\",\r\n \"Eco91I\" => \"F\",\r\n \"Eco105I\" => \"FO\",\r\n \"Eco130I\" => \"F\",\r\n \"Eco147I\" => \"F\",\r\n \"EcoICRI\" => \"IRV\",\r\n \"Eco57MI\" => \"F\",\r\n \"EcoNI\" => \"N\",\r\n \"EcoO65I\" => \"K\",\r\n \"EcoO109I\" => \"AFJKN\",\r\n \"EcoP15I\" => \"N\",\r\n \"EcoRI\" => \"ABCFGHIJKMNOQRSUVWXY\",\r\n \"EcoRII\" => \"FJMOS\",\r\n \"EcoRV\" => \"ABCGHIJKMNOQRSUVWXY\",\r\n \"EcoT14I\" => \"K\",\r\n \"EcoT22I\" => \"AKO\",\r\n \"EcoT38I\" => \"J\",\r\n \"EgeI\" => \"I\",\r\n \"EheI\" => \"FO\",\r\n \"ErhI\" => \"IV\",\r\n \"Esp3I\" => \"F\",\r\n \"FaeI\" => \"I\",\r\n \"FalI\" => \"I\",\r\n \"FaqI\" => \"F\",\r\n \"FatI\" => \"IN\",\r\n \"FauI\" => \"IN\",\r\n \"FauNDI\" => \"IV\",\r\n \"FbaI\" => \"AK\",\r\n \"FblI\" => \"IV\",\r\n \"Fnu4HI\" => \"N\",\r\n \"FokI\" => \"AGIJKMNQRVWX\",\r\n \"FriOI\" => \"IV\",\r\n \"FseI\" => \"AN\",\r\n \"FspI\" => \"JNO\",\r\n \"FspAI\" => \"F\",\r\n \"FspBI\" => \"F\",\r\n \"Fsp4HI\" => \"I\",\r\n \"GlaI\" => \"I\",\r\n \"GluI\" => \"I\",\r\n \"GsuI\" => \"F\",\r\n \"HaeII\" => \"GJKMNORSW\",\r\n \"HaeIII\" => \"ABGHIJKMNOQRSUWXY\",\r\n \"HapII\" => \"AK\",\r\n \"HgaI\" => \"IN\",\r\n \"HhaI\" => \"ABFGJKNORUWY\",\r\n \"Hin1I\" => \"FKO\",\r\n \"Hin1II\" => \"F\",\r\n \"Hin4I\" => \"F\",\r\n \"Hin6I\" => \"F\",\r\n \"HinP1I\" => \"N\",\r\n \"HincII\" => \"ABFGHJKNOQRUWXY\",\r\n \"HindII\" => \"IMSV\",\r\n \"HindIII\" => \"ABCFGHIJKMNOQRSUVWXY\",\r\n \"HinfI\" => \"ABCFGHIJKMNOQRUVWXY\",\r\n \"HpaI\" => \"ABCGHIJKMNOQRSUVWX\",\r\n \"HpaII\" => \"BFGIMNOQRSUVWX\",\r\n \"HphI\" => \"FN\",\r\n \"Hpy8I\" => \"F\",\r\n \"Hpy99I\" => \"N\",\r\n \"Hpy188I\" => \"N\",\r\n \"Hpy188III\" => \"N\",\r\n \"HpyAV\" => \"N\",\r\n \"HpyCH4III\" => \"N\",\r\n \"HpyCH4IV\" => \"N\",\r\n \"HpyCH4V\" => \"N\",\r\n \"HpyF3I\" => \"F\",\r\n \"HpyF10VI\" => \"F\",\r\n \"Hsp92I\" => \"R\",\r\n \"Hsp92II\" => \"R\",\r\n \"HspAI\" => \"IV\",\r\n \"ItaI\" => \"M\",\r\n \"KasI\" => \"N\",\r\n \"KpnI\" => \"ABCFGHIJKMNOQRSUVWXY\",\r\n \"Kpn2I\" => \"F\",\r\n \"KspI\" => \"MS\",\r\n \"Ksp22I\" => \"IV\",\r\n \"Ksp632I\" => \"M\",\r\n \"KspAI\" => \"F\",\r\n \"Kzo9I\" => \"I\",\r\n \"LguI\" => \"F\",\r\n \"LweI\" => \"F\",\r\n \"MabI\" => \"I\",\r\n \"MaeI\" => \"M\",\r\n \"MaeII\" => \"M\",\r\n \"MaeIII\" => \"M\",\r\n \"MalI\" => \"I\",\r\n \"MamI\" => \"M\",\r\n \"MbiI\" => \"F\",\r\n \"MboI\" => \"ABCFGKNQRUWXY\",\r\n \"MboII\" => \"AFGIJKNOQRVWX\",\r\n \"MfeI\" => \"N\",\r\n \"MflI\" => \"K\",\r\n \"MhlI\" => \"IV\",\r\n \"MlsI\" => \"F\",\r\n \"MluI\" => \"ABFGHIJKMNOQRSUVWX\",\r\n \"MluNI\" => \"MS\",\r\n \"MlyI\" => \"N\",\r\n \"Mly113I\" => \"I\",\r\n \"MmeI\" => \"NX\",\r\n \"MnlI\" => \"FGINQVWX\",\r\n \"Mph1103I\" => \"F\",\r\n \"MreI\" => \"F\",\r\n \"MroI\" => \"MO\",\r\n \"MroNI\" => \"IV\",\r\n \"MroXI\" => \"IV\",\r\n \"MscI\" => \"BNO\",\r\n \"MseI\" => \"BN\",\r\n \"MslI\" => \"N\",\r\n \"MspI\" => \"AFGHIJKMNOQRSUVWXY\",\r\n \"Msp20I\" => \"IV\",\r\n \"MspA1I\" => \"INRV\",\r\n \"MspCI\" => \"C\",\r\n \"MspR9I\" => \"I\",\r\n \"MssI\" => \"F\",\r\n \"MunI\" => \"FKM\",\r\n \"MvaI\" => \"AFGKMOSW\",\r\n \"Mva1269I\" => \"F\",\r\n \"MvnI\" => \"M\",\r\n \"MvrI\" => \"U\",\r\n \"MwoI\" => \"N\",\r\n \"NaeI\" => \"ACKMNORU\",\r\n \"NarI\" => \"GJMNOQRUWX\",\r\n \"NciI\" => \"GJNORSW\",\r\n \"NcoI\" => \"ABCFGHJKMNOQRSUWXY\",\r\n \"NdeI\" => \"ABFGJKMNQRSWXY\",\r\n \"NdeII\" => \"GJMRSW\",\r\n \"NgoMIV\" => \"NR\",\r\n \"NheI\" => \"ABFGJKMNORSUW\",\r\n \"NlaIII\" => \"GNW\",\r\n \"NlaIV\" => \"GNW\",\r\n \"NmeAIII\" => \"N\",\r\n \"NmuCI\" => \"F\",\r\n \"NotI\" => \"ABCFGHJKMNOQRSUWXY\",\r\n \"NruI\" => \"ABCGIJKMNOQRSUWX\",\r\n \"NsbI\" => \"FK\",\r\n \"NsiI\" => \"BGHJMNRSUW\",\r\n \"NspI\" => \"MN\",\r\n \"NspV\" => \"JO\",\r\n \"OliI\" => \"F\",\r\n \"PacI\" => \"GNOW\",\r\n \"PaeI\" => \"F\",\r\n \"PaeR7I\" => \"N\",\r\n \"PagI\" => \"F\",\r\n \"PalAI\" => \"I\",\r\n \"PasI\" => \"F\",\r\n \"PauI\" => \"F\",\r\n \"PceI\" => \"IV\",\r\n \"PciI\" => \"IN\",\r\n \"PciSI\" => \"I\",\r\n \"PctI\" => \"IV\",\r\n \"PdiI\" => \"F\",\r\n \"PdmI\" => \"F\",\r\n \"PfeI\" => \"F\",\r\n \"Pfl23II\" => \"F\",\r\n \"PflFI\" => \"N\",\r\n \"PflMI\" => \"N\",\r\n \"PfoI\" => \"F\",\r\n \"PhoI\" => \"N\",\r\n \"PinAI\" => \"BM\",\r\n \"PleI\" => \"N\",\r\n \"Ple19I\" => \"I\",\r\n \"PmaCI\" => \"AK\",\r\n \"PmeI\" => \"GNW\",\r\n \"PmlI\" => \"N\",\r\n \"PpiI\" => \"F\",\r\n \"PpsI\" => \"I\",\r\n \"Ppu21I\" => \"F\",\r\n \"PpuMI\" => \"NO\",\r\n \"PscI\" => \"F\",\r\n \"PshAI\" => \"AKN\",\r\n \"PshBI\" => \"K\",\r\n \"PsiI\" => \"IN\",\r\n \"Psp5II\" => \"F\",\r\n \"Psp6I\" => \"I\",\r\n \"Psp1406I\" => \"FK\",\r\n \"Psp124BI\" => \"IV\",\r\n \"PspCI\" => \"IV\",\r\n \"PspEI\" => \"IV\",\r\n \"PspGI\" => \"N\",\r\n \"PspLI\" => \"I\",\r\n \"PspN4I\" => \"I\",\r\n \"PspOMI\" => \"INV\",\r\n \"PspPPI\" => \"I\",\r\n \"PspXI\" => \"IN\",\r\n \"PsrI\" => \"I\",\r\n \"PstI\" => \"ABCFGHIJKMNOQRSUVWXY\",\r\n \"PsuI\" => \"F\",\r\n \"PsyI\" => \"F\",\r\n \"PvuI\" => \"ABFGKMNOQRSUWXY\",\r\n \"PvuII\" => \"ABCFGHIJKMNORSUVWXY\",\r\n \"RcaI\" => \"M\",\r\n \"RgaI\" => \"I\",\r\n \"RigI\" => \"I\",\r\n \"RsaI\" => \"BCFGHIJMNOQRSVWXY\",\r\n \"RsaNI\" => \"I\",\r\n \"RseI\" => \"F\",\r\n \"RsrII\" => \"MNQX\",\r\n \"Rsr2I\" => \"IV\",\r\n \"SacI\" => \"AFGHJKMNOQRSUWX\",\r\n \"SacII\" => \"AGHJKNOQRWX\",\r\n \"SalI\" => \"ABCFGHIJKMNOQRSUVWXY\",\r\n \"SanDI\" => \"E\",\r\n \"SapI\" => \"N\",\r\n \"SatI\" => \"F\",\r\n \"Sau96I\" => \"GJMNOUW\",\r\n \"Sau3AI\" => \"AGHJKMNOQRSUWX\",\r\n \"SbfI\" => \"INV\",\r\n \"ScaI\" => \"ABCFGJKMNOQRSWX\",\r\n \"SchI\" => \"F\",\r\n \"ScrFI\" => \"JMNOS\",\r\n \"SdaI\" => \"F\",\r\n \"SduI\" => \"F\",\r\n \"SetI\" => \"I\",\r\n \"SexAI\" => \"MN\",\r\n \"SfaNI\" => \"INV\",\r\n \"SfcI\" => \"N\",\r\n \"SfiI\" => \"ACFGIJKMNOQRSUVWX\",\r\n \"SfoI\" => \"N\",\r\n \"Sfr274I\" => \"IV\",\r\n \"Sfr303I\" => \"IV\",\r\n \"SfuI\" => \"M\",\r\n \"SgfI\" => \"R\",\r\n \"SgrAI\" => \"MN\",\r\n \"SgrBI\" => \"C\",\r\n \"SgrDI\" => \"F\",\r\n \"SgsI\" => \"F\",\r\n \"SinI\" => \"GQRWX\",\r\n \"SlaI\" => \"C\",\r\n \"SmaI\" => \"ABCFGHIJKMNOQRSUVWXY\",\r\n \"SmiI\" => \"FIKV\",\r\n \"SmiMI\" => \"IV\",\r\n \"SmlI\" => \"N\",\r\n \"SmoI\" => \"F\",\r\n \"SmuI\" => \"F\",\r\n \"SnaBI\" => \"ACKMNR\",\r\n \"SpeI\" => \"ABGHJKMNOQRSUWX\",\r\n \"SphI\" => \"ABCGHIJKMNOQRSVWX\",\r\n \"SrfI\" => \"EO\",\r\n \"Sse9I\" => \"IV\",\r\n \"Sse8387I\" => \"AK\",\r\n \"SseBI\" => \"C\",\r\n \"SsiI\" => \"F\",\r\n \"SspI\" => \"ABCFGIJKMNOQRSUVWX\",\r\n \"SstI\" => \"BC\",\r\n \"SstII\" => \"B\",\r\n \"StrI\" => \"U\",\r\n \"StuI\" => \"ABJKMNQRSUX\",\r\n \"StyI\" => \"CJMNRS\",\r\n \"StyD4I\" => \"N\",\r\n \"SwaI\" => \"GJMNSW\",\r\n \"TaaI\" => \"F\",\r\n \"TaiI\" => \"F\",\r\n \"TaqI\" => \"ABCFGIJKMNOQRSUVWXY\",\r\n \"TaqII\" => \"QX\",\r\n \"TasI\" => \"F\",\r\n \"TatI\" => \"F\",\r\n \"TauI\" => \"F\",\r\n \"TfiI\" => \"N\",\r\n \"TliI\" => \"N\",\r\n \"Tru1I\" => \"F\",\r\n \"Tru9I\" => \"GIMRVW\",\r\n \"TseI\" => \"N\",\r\n \"TsoI\" => \"F\",\r\n \"Tsp45I\" => \"N\",\r\n \"Tsp509I\" => \"N\",\r\n \"TspDTI\" => \"X\",\r\n \"TspEI\" => \"O\",\r\n \"TspGWI\" => \"X\",\r\n \"TspMI\" => \"N\",\r\n \"TspRI\" => \"N\",\r\n \"TstI\" => \"F\",\r\n \"Tth111I\" => \"GIKNQRVWX\",\r\n \"Van91I\" => \"AFKM\",\r\n \"Vha464I\" => \"IV\",\r\n \"VneI\" => \"IV\",\r\n \"VpaK11BI\" => \"K\",\r\n \"VspI\" => \"FIRV\",\r\n \"XagI\" => \"F\",\r\n \"XapI\" => \"F\",\r\n \"XbaI\" => \"ABCFGHIJKMNOQRSUVWXY\",\r\n \"XceI\" => \"F\",\r\n \"XcmI\" => \"N\",\r\n \"XhoI\" => \"ABFGHJKMNOQRSUWXY\",\r\n \"XhoII\" => \"GMRW\",\r\n \"XmaI\" => \"INRUV\",\r\n \"XmaCI\" => \"M\",\r\n \"XmaJI\" => \"F\",\r\n \"XmiI\" => \"F\",\r\n \"XmnI\" => \"GNRUW\",\r\n \"XspI\" => \"K\",\r\n \"ZraI\" => \"INV\",\r\n \"ZrmI\" => \"I\",\r\n \"Zsp2I\" => \"IV\"\r\n );\r\n return $vendors;\r\n }", "function displaySkin()\n\t{\n\t\tinclude(\"classes/Display/DSkin.php\");\n\t\t\n\t\t\t$sql = \"SELECT * FROM `skins_table`\";\n\t\t\t$query = new Bin_Query();\n\t\t\t\n\t\t\tif($query->executeQuery($sql))\n\t\t\t{\t\t\n\t\t\t\t\n\t\t\t\treturn Display_DSkin::displaySkin($query->records);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//$output['showskin'] = \"No skin Found\";\n\t\t\t}\n\t\t\t\n\t}", "abstract public function regionISOCode();", "function dcs_dropship_product_info_page_shortcode($atts, $content=null)\r\n{\r\n\t$retval = dcs_dropship_product_info_page($_GET['sku']);\r\n\r\n\treturn $retval;\r\n}", "function aurora_borealis() {\n\t$chosen = steamed_hams_get_lyric();\n\techo \"<p id='seymour'>$chosen</p>\";\n}", "protected function get_cloud_cover( ) {\n// to decode all cloud layer observations. Only the last layer is saved.\n// Format is SKC or CLR for clear skies, or cccnnn where ccc = 3-letter code and\n// nnn = altitude of cloud layer in hundreds of feet. 'VV' seems to be used for\n// very low cloud layers. (Other conversion factor: 1 m = 3.28084 ft)\n\n// Ignore this group\n if (preg_match('#(PROB[0-9]{2})|(TEMPO)|(BECMG)#',$this->current_group_text,$pieces)\n ||preg_match('#^(TX|TN)[0-9]{2}/[0-9]{4}Z#',$this->current_group_text,$pieces)\n ||preg_match('#^FM[0-9]{6}#',$this->current_group_text,$pieces)\n ||preg_match('#^WS[0-9]{3}#',$this->current_group_text,$pieces)\n ||preg_match('#^QNH[0-9]{4}INS$#',$this->current_group_text,$pieces)) {\n $this->current_group++;\n return;\n }\n\n\n// Clear sky or particular sky\n if ($this->current_group_text == 'SKC' || $this->current_group_text == 'CLR' || $this->current_group_text == 'NSC'||$this->current_group_text == 'NCD') {\n $this->wxInfo['ITEMS'][$this->tend]['CLOUDS'] = $this->get_i18nClouds($this->current_group_text);\n $this->wxInfo['ITEMS'][$this->tend]['CODE_CLOUDS'] = $this->current_group_text;\n $this->current_ptr++;\n $this->current_group++;\n return;\n }\n\n\n if (preg_match('#^(//////(CB|TCU)?)#',$this->current_group_text,$pieces)) {\n $this->varConcatenate($this->wxInfo['ITEMS'][$this->tend],'CODE_CLOUDS', $this->current_group_text);\n $this->current_ptr++;\n return;\n }\n\n if (preg_match('#^([A-Z]{2,3})([0-9]{3})?(///)?#',$this->current_group_text,$pieces)) { // codes for CB and TCU are ignored\n $this->varConcatenate($this->wxInfo['ITEMS'][$this->tend],'CODE_CLOUDS', $this->current_group_text);\n if (isset($this->wxInfo['ITEMS'][$this->tend]['CLOUDS'])) {\n $this->wxInfo['ITEMS'][$this->tend]['CLOUDS'] .= ', ';\n } else {\n $this->wxInfo['ITEMS'][$this->tend]['CLOUDS'] = '';\n }\n $this->wxInfo['ITEMS'][$this->tend]['CLOUDS'] .= $this->get_i18nClouds($pieces[1]);\n $this->wxInfo['ITEMS'][$this->tend]['CLOUDS'] .= '('.convertLength((integer) 100 * $pieces[2], 'Meter').' m)';\n if ($pieces[1] == 'VV') {\n $altitude = (integer) 100 * $pieces[2]; // units are feet\n $this->wxInfo['ITEMS'][$this->tend]['VVISIBILITY'] = $altitude;\n }\n $this->current_ptr++;\n return;\n }\n\n\n if (isset($this->wxInfo['ITEMS'][$this->tend]['CODE_CLOUDS'])) {\n $code_clouds = explode(' ',$this->wxInfo['ITEMS'][$this->tend]['CODE_CLOUDS']);\n if (isset($code_clouds[0])) $this->wxInfo['ITEMS'][$this->tend]['CODE_CLOUD1'] = $code_clouds[0];\n if (isset($code_clouds[1])) $this->wxInfo['ITEMS'][$this->tend]['CODE_CLOUD2'] = $code_clouds[1];\n if (isset($code_clouds[2])) $this->wxInfo['ITEMS'][$this->tend]['CODE_CLOUD3'] = $code_clouds[2];\n if (isset($code_clouds[3])) $this->wxInfo['ITEMS'][$this->tend]['CODE_CLOUD4'] = $code_clouds[3];\n if (isset($code_clouds[4])) $this->wxInfo['ITEMS'][$this->tend]['CODE_CLOUD5'] = $code_clouds[4];\n }\n $this->current_group++;\n return;\n\n }", "public function getSkuId()\n {\n return $this->skuId;\n }", "private function getProductQuery(string $sku): string\n {\n return <<<QUERY\n{\n products(search: \"{$sku}\") {\n items {\n sku\n ... on BundleProduct {\n items {\n sku\n option_id\n uid\n required\n type\n title\n options {\n uid\n label\n product {\n sku\n }\n can_change_quantity\n id\n uid\n price\n quantity\n }\n }\n }\n }\n }\n}\nQUERY;\n }", "public function generateProductSKU()\n {\n return $this->skuString . int_random();\n }", "function tideways_span_create($category)\n{\n}", "public function getSkuId(): int\n {\n return $this->skuId;\n }", "function vendor_type_name_static($vst, $type='i') {\n // $type is the type of string to return:\n // i -> initial\n // n -> name\n // p -> plural name\n\n $table['i'] = array( \n 0 => \"A\",\n 1 => \"M\",\n 2 => \"E\", \n 3 => \"R\", \n 4 => \"W\", \n 5 => \"T\", \n 6 => \"G\" \n ); \n \n $table['n'] = array( \n 0 => \"All\", \n 1 => \"Manufacturer\", \n 2 => \"Exclusive Importer\", \n 3 => \"Manufacturers Representive\", \n 4 => \"Wholesale Facility\", \n 5 => \"Retail Facility\", \n 6 => \"Grower\" \n ); \n \n $table['p'] = array( \n 0 => \"All\", \n 1 => \"Manufacturers\", \n 2 => \"Exclusive Importers\", \n 3 => \"Manufacturers Representives\", \n 4 => \"Wholesale Facilities\", \n 5 => \"Retail Facilities\", \n 6 => \"Growers\" \n ); \n return($table[$type][$vst]); \n }", "public function serch()\n {\n }", "function _wpsc_fix_united_kingdom() {\n\n\t$legacy_ok_country_was_visible = true;\n\n\tif ( $wpsc_country = WPSC_Countries::get_country( 'UK' ) ) {\n\n\t\t$legacy_ok_country_was_visible = $wpsc_country->is_visible();\n\n\t\t$wpsc_country = new WPSC_Country(\n\t\t\t\tarray(\n\t\t\t\t\t\t'visible' => '0',\n\t\t\t\t\t\t'isocode' => 'UK',\n\t\t\t\t)\n\t\t);\n\n\t\t$wpsc_country->set( '_is_country_legacy', true );\n\t}\n\n\t$wpsc_country = new WPSC_Country(\n\t\tarray(\n\t\t\t\t'country' => __( 'United Kingdom', 'wpsc' ),\n\t\t\t\t'isocode' => 'GB',\n\t\t\t\t'currency' => __( 'Pound Sterling', 'wpsc' ),\n\t\t\t\t'symbol' => __( '£', 'wpsc' ),\n\t\t\t\t'symbol_html' => __( '&#163;', 'wpsc' ),\n\t\t\t\t'code' => __( 'GBP', 'wpsc' ),\n\t\t\t\t'continent' => 'europe',\n\t\t\t\t'visible' => $legacy_ok_country_was_visible ? '0' : '1',\n\t\t\t\t'has_regions' => '0',\n\t\t\t\t'tax' => '0',\n\t\t)\n\t);\n\n\t//make sure base country is ok after the UK/GB fix\n\t$base_country = get_option( 'base_country', '' );\n\tif ( ! empty( $base_country ) && is_numeric( $base_country ) ) {\n\t\t$wpsc_country = new WPSC_Country( $base_country );\n\t\tif ( 'UK' == $wpsc_country->get_isocode() ) {\n\t\t\t$wpsc_country = new WPSC_Country( 'GB' );\n\t\t\tupdate_option( 'base_country' , $wpsc_country->get_id() );\n\t\t}\n\t}\n\n}", "public function startPowerUnits() {\n\t\t\n\t}", "public function getNewSku($sku = null)\n {\n return $this->skuProcessor->getNewSku($sku);\n }", "public function checkSung()\n {\n return self::SUNG;\n }", "protected function getSkus($product)\n {\n $skus = parent::getSkus($product);\n\n foreach ($product->getVariants() as $variant) {\n $skus[] = $variant->getSku();\n }\n\n return $skus;\n }", "function Kravatte_SANSE($key)\n \t{\n \t$this->TAG_SIZE = 32;\n\tself::k_key($key);\n\tself::reset_state();\n self::initialize_history('',True);\n\t}", "public function getSkinName(){\n $info = $this->getInfo();\n return $info[\"skin\"];\n }", "abstract public function getStart();", "public function setSkus($s)\n {\n if (is_string($s)) {\n $s = [$s];\n }\n if (is_array($s)) {\n $this->resetASINs();\n $this->resetSKUs();\n $i = 1;\n foreach ($s as $x) {\n $this->options['SellerSKUList.Id.'.$i] = $x;\n $i++;\n }\n } else {\n return false;\n }\n }", "private function papar_keputusan_stress($skor3){\n switch($skor3){\n case in_array($skor3, range(0,7)): $keputusan= 'NORMAL'; break;\n case in_array($skor3, range(8,9)): $keputusan= 'RINGAN'; break;\n case in_array($skor3, range(10,13)): $keputusan= 'SEDERHANA'; break;\n case in_array($skor3, range(14,17)): $keputusan= 'TERUK'; break;\n case ($skor3 >= 18 ): $keputusan= 'SANGAT TERUK'; break;\n }\t\t\n return $keputusan;\t\n }", "public function update(Request $request, Producto $producto)\n {\n switch($producto->seccion) {\n case 'ortopedia':\n $sku = 'ORTO' . $request->categoria_abr . $request->producto_abr . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->categoria . ' '. $request->producto . ' ' . $request->marca . ' ' . $request->modelo . ' ' . $request->talla . ' ' . $request->unidad . ' ' . $request->color;\n break;\n case 'micas':\n $sku = 'MICA' . $request->familia_abr . $request->materiales_abr . $request->tipo_abr . $request->tratamiento_abr . $request->color_abr;\n $desc = $request->familia . ' ' . $request->materiales . ' ' . $request->tipo . ' ' . $request->tratamiento . ' ' . $request->color;\n break;\n case 'armazones':\n $sku = 'ARMA' . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->marca . ' ' . $request->modelo . ' ' . $request->color . ' ' . $request->medidas . ' '. $request->unidad;\n break;\n case 'contacto':\n $sku = 'CONT' . $request->categoria_abr . ' ' . $request->tipo_abr . $request->marca_abr . $request->periodo_abr;\n $desc = $request->categoria . ' ' . $request->tipo . ' ' . $request->marca . ' ' . $request->periodo;\n break;\n case 'generales':\n $sku = 'GRAL' . $request->producto_abr . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->producto . ' ' . $request->marca . ' ' . $request->modelo . ' ' . $request->color;\n break;\n default:\n break;\n }\n $sku = str_replace(' ', '', $sku);\n $aux1 = $request->foto1 ? (Storage::putFileAs('productos/' . $producto->seccion . '/' . $producto->id, $request->file('foto1'), 'foto1.jpg')) : null;\n $aux2 = $request->foto2 ? (Storage::putFileAs('productos/' . $producto->seccion . '/' . $producto->id, $request->file('foto2'), 'foto2.jpg')) : null;\n $aux3 = $request->foto3 ? (Storage::putFileAs('productos/' . $producto->seccion . '/' . $producto->id, $request->file('foto3'), 'foto3.jpg')) : null;\n $request['sku_interno'] = $sku;\n $request['descripcion'] = $desc;\n $producto->update($request->all());\n $producto->foto1 = $aux1;\n $producto->foto2 = $aux2;\n $producto->foto3 = $aux3;\n $producto->save();\n $historial = new Historial(['tipo' => 'Modificación de Producto', 'descripcion' => 'Producto modificado.']);\n $producto->historiales()->save($historial);\n return redirect()->route('productos.show', ['producto' => $producto]);\n }", "function pricing() {\n\t\t\tparent::controller();\n\t\t\t\n\t\t}", "function wh_short_code() {\n\n return 'waouh_filtres';\n}", "public function manufacture(): void;", "function prod_semen() {\n $level = $this->session->userdata('level');\n /////////////////////////////////////////////////\n $load['Title'] = \"Production Plant TLCC\";\n// $tahun = $this->input->get('tahun');\n $tahunsementara = $this->input->get('input');\n if (empty($tahunsementara['tahun'])) {\n $tahunsementara['tahun'] = date('Y');\n }\n $tahun = $tahunsementara['tahun'];\n \n $tahunx = !empty($tahun) ? $tahun : date('Y');\n $load['thn'] = $tahunx;\n $thn = $tahunx;\n\n $load['li_active'] = $this->plant_link->plant_production('tlcc', 'prod_semen');\n $load['DProduction'] = $this->Mplant_tlcc->GetProduction($thn);\n $load['myData'] = $this->Mplant_tlcc->getProdFinishMill($thn);\n $load['rkap_cement'] = $this->Mplant_tlcc->getRKAPCementPlant($thn);\n $this->template->load('plant_information/administrator_index', 'plant_information/tlcc/prod_semen', $load);\n // if ($level == 1) {\n // $this->template->load('plant_information/administrator_index', 'plant_information/tlcc/prod_semen', $load);\n // } elseif ($level == 2) {\n // $this->template->load('plant_information/operator_index', 'plant_information/tlcc/prod_semen', $load);\n // } elseif ($level == 3) {\n // $this->template->load('plant_information/home_index', 'plant_information/tlcc/prod_semen', $load);\n // }\n }", "function addStartUnits($ct, $gid, $uid)\n\t{\n\t\t$startArr = array();\n\t\t$startArr[\"Austria\"] = array(\"vie\" => \"a\", \"bud\" => \"a\", \"tri\" => \"f\");\n\t\t$startArr[\"England\"] = array(\"lon\" => \"f\", \"edi\" => \"f\", \"lvp\" => \"a\");\n\t\t$startArr[\"France\"] = array(\"par\" => \"a\", \"mar\" => \"a\", \"bre\" => \"f\");\n\t\t$startArr[\"Germany\"] = array(\"ber\" => \"a\", \"mun\" => \"a\", \"kie\" => \"f\");\n\t\t$startArr[\"Italy\"] = array(\"rom\" => \"a\", \"ven\" => \"a\", \"nap\" => \"f\");\n\t\t$startArr[\"Russia\"] = array(\"mos\" => \"a\", \"sev\" => \"f\", \"war\" => \"a\", \"stp\" => \"f\");\n\t\t$startArr[\"Turkey\"] = array(\"ank\" => \"f\", \"con\" => \"a\", \"smy\" => \"a\");\t\t\n\t\t\n\t\t$citys = $startArr[$ct];\n\t\tforeach($citys as $city => $type)\n\t\t{\n\t\t\t$query = \"INSERT INTO curr_map (gid, aid, owner, type, year, season)\n\t\t\t\tVALUES($gid, '$city', '$uid', '$type', 1901, 's');\";\n\t\t\t\n\t\t\t$result = mysql_query($query) or die(\"db access error\" . mysql_error());\n\t\t}\n\t}", "function wtsCtrlSaisieForfaits($ar){\n\n $p = new XParam($ar, array('mode'=>'a'));\n $mode = $p->get('mode');\n $r = array('ok'=>1, 'errors'=>array(), 'message'=>'');\n $cards = $p->get('card');\n $chips = $p->get('CHIPID');\n $accs = $p->get('ACCNO');\n $crcs = $p->get('CRC');\n $cardlabels = $p->get('NEWCARDLabel');\n $usedcards = array();\n // lecture de l'offre\n $offresoid = $p->get('offreoid');\n $productsoid = $p->get('productoid');\n $validfroms = $p->get('validfrom');\n $validtills = $p->get('validtill');\n \n $justgrps = $p->get('justgrp');\n\n // parcours des lignes et controles\n foreach($cards as $lineid => $card){\n $card2 = substr($card, 0, 7);\n /*\n\t$card = \n\tNEWCARD_'oidproduit' = achat nouvelle carte\n\tNEWCARD'uniqid' = carte en commande issue du panier\n\tWTPCARD strictement = saisie du numéro ou copie choix depuis les cartes du compte\n\tWTPCARD'unidiq'= carte saisie sélectionnée dans le panier\n\tdonc si substr(card, 0, 7) == NEWCARD : controles sur cartes en achat \n si substr(card, 0, 7) == WTPCARD : controles sur cartes en rechargement\n */\n if ($card2 == 'WTPCARD'){\n //$wtp = sprintf(\"%s-%s-%s\", $chips[$lineid], $crcs[$lineid], $accs[$lineid]);\n $wtp = $this->modresort->formatWTPParts(array($chips[$lineid], $crcs[$lineid], $accs[$lineid]));\n // TA, SKD 01- ou 1- le reste est fait dans le module\n if (strlen($wtp) != 16 && strlen($wtp) != 25 && strlen($wtp) != 24){\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_remplirwtp');\n break;\n } else if (!isset($usedcards[$wtp])){\n $usedcards[$wtp] = 1;\n // verification du WTP\n $r2 = $this->wtsCheckWTP(array('mode'=>'r', 'b'=>0, 'chipid'=>$chips[$lineid], 'accno'=>$accs[$lineid], 'crc'=>$crcs[$lineid]));\n if ($r2['ok'] != 1){\n $r['ok'] = 0; \n\t if (isset($r2['errormess'])){\n\t $r['message'] = $r2['errormess'];\n\t } else {\n\t $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_wtpinvalide');\n\t }\n\t array_push($r['errors'], \n\t\t array(\"CHIPDID[$lineid]\", '', $lineid), \n\t\t array(\"ACCNO[$lineid]\", '', $lineid), \n\t\t array(\"CRC[$lineid]\", '', $lineid),\n\t\t array(\"WTPMASK[$lineid]\", '', $lineid)\n\t\t );\n }\n // autres controles :\n $productoid = $productsoid[$lineid];\n $offreoid = $productsoid[$lineid];\n $validfrom = $validfroms[$lineid];\n $validtill = $validtills[$lineid];\n $justgrp = $justgrps[$lineid];\n if ($r['ok'] == 1){\n $r3 = $this->localWTPCheck($wtp, $offreoid, $productoid, $justgrp, false, $validfrom, $validtill, $lineid);\n if ($r3['ok'] != 1){\n $r['ok'] = 0;\n $r['message'] = $r3['message'];\n }\n }\n if (($r['ok'] == 1 || $r['ok'] == 0 && $r['iswarn'])){\n $r41 = $this->checkProductInCaddie($wtp, $offreoid, $productoid, $validfrom, $validtill);\n if ($r41['ok'] != 1){\n $r['ok'] = 0;\n $r['iswarn'] = $r41['iswarn'];\n if ($r['iswarn']){\n if ($r['message'] == '')\n $r['message'] = $r41['message'];\n else\n $r['message'] .= \"\\n\".$r41['message'];\n } else {\n $r['message'] = $r41['message'];\n }\n }\n }\n if (($r['ok'] == 1 || $r['ok'] == 0 && $r['iswarn'])){\n\t $r4 = $this->checkProductInOrder($wtp, $offreoid, $productoid, $validfrom, $validtill);\n if ($r4['ok'] != 1){\n $r['ok'] = 0;\n $r['iswarn'] = $r4['iswarn'];\n if ($r['iswarn']){\n if ($r['message'] == '')\n $r['message'] = $r4['message'];\n else\n $r['message'] .= \"\\n\".$r4['message'];\n } else {\n $r['message'] = $r4['message'];\n }\n }\n }\n // verifier que la carte n'est pas déjà dans le panier\n // si oui que ces forfaits sont compatibles ... avec le validfrom\n }else{\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_cartesuniques');\n break;\n }\n } else if ($card2 == 'NEWCARD'){\n $wtp = $cardlabels[$lineid];\n $justgrp = $justgrps[$lineid];\n $productoid = $productsoid[$lineid];\n $validfrom = $validfroms[$lineid];\n $validtill = $validtills[$lineid];\n $r31 = $this->localWTPCheck($wtp, $offreoid, $productoid, $justgrp, true, $validfrom, $validtill, $lineid);\n if ($r31['ok'] != 1){\n $r['ok'] = 0;\n $r['message'] = $r31['message'];\n break;\n }\n if (!isset($usedcards[$wtp])){\n $usedcards[$wtp] = 1;\n }else{\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_cartesuniques');\n break;\n }\n }\n }\n // sleep(10);\n\n // si ok vérification des dates (on prend le premier produit, tous devant avoir les même caractériqiques)\n if ($r['ok'] == 1){\n $this->checkDelais($r, $productsoid, $validfroms);\n }\n\n // if ($r['ok'] == 1){\n // $r['ok'] = 0; $r['message']='tests '.$r['message'];\n // $r['iswarn'] = 1;\n // }\n\n\n // TESTS PENDNT AJOUT PANIER\n // $r = array('ok'=>1,'iswarn'=>1, 'errors'=>array('kk'), 'message'=>'PAS DE CONTROLES');\n\n\n if (count($r['errors'])>0)\n $r['ok'] = 0;\n if ($mode == 'a'){\n header('Content-Type:application/json; charset=UTF-8');\n die(json_encode($r));\n }\n return $r;\n }", "function theme_nt_landium_section_servicestwo( $atts, $content = null ) {\r\n extract( shortcode_atts(array(\r\n\t\"section_id\"\t\t=> '',\r\n\t\"heading_display\"\t=> '',\r\n\t\"heading_align\"\t\t=> '',\r\n\t\"section_heading\"\t=> '',\r\n\t\"section_desc\"\t\t=> '',\r\n\t\"item_column\"\t\t=> '',\r\n\t\"desk_column\"\t\t=> '',\r\n\t\"desk_column_offset\"=> '',\r\n\t\"mob_column\"\t\t=> '',\r\n\t\"servicesloop\"\t\t=> '',\r\n\t\"icon_type\"\t\t\t=> '',\r\n\t\"itemimg_icon\"\t\t=> '',\r\n\t\"item_fonticon\"\t\t=> '',\r\n\t\"item_title\"\t\t=> '',\r\n\t\"item_desc\"\t\t\t=> '',\r\n\t\"sectionbgcss\"\t\t=> '',\r\n\t//custom style\r\n\t\"customstyle\"\t\t=> '',\r\n\t\"currentitem\"\t\t=> '',\r\n\t\"animation\"\t\t\t=> '',\r\n\t\"size\"\t\t\t\t=> '',\r\n\t\"lineh\"\t\t\t\t=> '',\r\n\t\"weight\"\t\t\t=> '',\r\n\t\"color\"\t\t\t\t=> '',\r\n\t\"position\"\t\t\t=> '',\r\n\t\"bgcolor\"\t\t\t=> '',\r\n\t\"padtop\"\t\t\t=> '',\r\n\t\"padright\"\t\t\t=> '',\r\n\t\"padbottom\"\t\t\t=> '',\r\n\t\"padleft\"\t\t\t=> '',\r\n\t\"brdtop\"\t\t\t=> '',\r\n\t\"brdright\"\t\t\t=> '',\r\n\t\"brdbottom\"\t\t\t=> '',\r\n\t\"brdleft\"\t\t\t=> '',\r\n\t\"borderstyl\"\t\t=> '',\r\n\t\"bordercolor\"\t\t=> '',\r\n\t\"borderradius\"\t\t=> '',\r\n\r\n\t), $atts) );\r\n\r\n\t$sectionbg_css = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $sectionbgcss, ' ' ), $atts );\r\n\t$id = ($section_id != '') ? 'id=\"'. esc_attr($section_id) . '\"' : '';\r\n\t$services_loop = (array) vc_param_group_parse_atts($servicesloop);\r\n\r\n\t$custom_style = (array) vc_param_group_parse_atts($customstyle);\r\n\tforeach ( $custom_style as $styl ) {\r\n\t\tif ( !empty( $styl ) ){\r\n\t\t\t$currentitem= ( !empty( $styl['currentitem'] ) ) ? $styl['currentitem'] : '';\r\n\t\t\t$size \t\t= ( !empty( $styl['size'] ) ) ? $styl['size'] : '';\r\n\t\t\t$weight \t= ( !empty( $styl['weight'] ) ) ? $styl['weight'] : '';\r\n\t\t\t$lineh \t\t= ( !empty( $styl['lineh'] ) ) ? $styl['lineh'] : '';\r\n\t\t\t$color \t\t= ( !empty( $styl['color'] ) ) ? $styl['color'] : '';\r\n\t\t\t$position \t= ( !empty( $styl['position'] ) ) ? $styl['position'] : '';\r\n\t\t\t$fstyle \t= ( !empty( $styl['fstyle'] ) ) ? $styl['fstyle'] : '';\r\n\t\t\t$bgcolor \t= ( !empty( $styl['bgcolor'] ) ) ? $styl['bgcolor'] : '';\r\n\t\t\t$padtop \t= ( !empty( $styl['padtop'] ) ) ? ' padding-top:'.$styl['padtop'].';' : '';\r\n\t\t\t$padright \t= ( !empty( $styl['padright'] ) ) ? ' padding-right:'.$styl['padright'].';' : '';\r\n\t\t\t$padbottom \t= ( !empty( $styl['padbottom'] ) ) ? ' padding-bottom:'.$styl['padbottom'].';' : '';\r\n\t\t\t$padleft \t= ( !empty( $styl['padleft'] ) ) ? ' padding-left:'.$styl['padleft'].';' : '';\r\n\t\t\t$padding \t= ( $padtop || $padright || $padbottom || $padleft ) ? $padtop.$padright.$padbottom.$padleft : '';\r\n\t\t\t$brdtop \t= ( !empty( $styl['brdtop'] ) ) ? ' border-top:'.$styl['brdtop'].';' : '';\r\n\t\t\t$brdright \t= ( !empty( $styl['brdright'] ) ) ? ' border-right:'.$styl['brdright'].';' : '';\r\n\t\t\t$brdbottom \t= ( !empty( $styl['brdbottom'] ) ) ? ' border-bottom:'.$styl['brdbottom'].';' : '';\r\n\t\t\t$brdleft \t= ( !empty( $styl['brdleft'] ) ) ? ' border-left:'.$styl['brdleft'].';' : '';\r\n\t\t\t$border \t= ( $brdtop || $brdright || $brdbottom || $brdleft ) ? $brdtop.$brdright.$brdbottom.$brdleft : '';\r\n\t\t\t$borderstyl = ( !empty( $styl['borderstyl'] ) ) ? $styl['borderstyl'] : '';\r\n\t\t\t$bordercolor= ( !empty( $styl['bordercolor'] ) ) ? $styl['bordercolor'] : '';\r\n\t\t\t$borderradius= ( !empty( $styl['borderradius'] ) ) ? $styl['borderradius'] : '';\r\n\r\n\t\t\tif ( $currentitem == '1' ){\r\n\t\t\t\t$current1 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation1 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}elseif ( $currentitem == '2' ){\r\n\t\t\t\t$current2 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation2 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}elseif ( $currentitem == '3' ){\r\n\t\t\t\t$current3 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation3 = nt_landium_animation( $styl['animation']);\r\n\t\t\t\t$imgiconclass = ' img-'.$position.'';\r\n\t\t\t}elseif ( $currentitem == '4' ){\r\n\t\t\t\t$current4 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation4 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}elseif ( $currentitem == '5' ){\r\n\t\t\t\t$current5 = nt_landium_customstyle( $size, $lineh, $weight, $color, $position, $fstyle, $bgcolor, $padding, $border, $borderstyl, $bordercolor, $borderradius );\r\n\t\t\t\t$animation5 = nt_landium_animation( $styl['animation']);\r\n\t\t\t}else{\r\n\t\t\t\t$current1 = $current2 = $current3 = $current4 = $current5 = $animation1 = $animation2 = $animation3 = $animation4 = $animation5 = '';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t$out = '';\r\n\r\n\t\t\t$out .= '<!-- start section -->';\r\n\t\t\t$out .= '<a '.$id.' class=\"ancor\"></a>';\r\n\t\t\t$out .= '<section class=\"section section--background-dark'.esc_attr( $sectionbg_css ).'\">';\r\n\t\t\t\t$out .= '<div class=\"container\">';\r\n\t\t\t\t$headingdisplay = $heading_display ? $heading_display : 'show';\r\n\t\t\t\t$headingalign = $heading_align ? $heading_align : 'center';\r\n\t\t\t\tif ( $headingdisplay !='hide' ) {\r\n\t\t\t\t\t$out .= '<div class=\"section-heading section-heading--center section-heading--white\">';\r\n\t\t\t\t\t\tif ( $section_heading !='' ) { $out .= '<h2 class=\"title h1'.$animation1.'\"'.$current1.'>'.landium_sanitize_data( $section_heading ).'</h2>'; }\r\n\t\t\t\t\t\tif ( $section_desc !='' ) { $out .= '<p class=\"sec-desc'.$animation2.'\"'.$current2.'>'.landium_sanitize_data( $section_desc ).'</p>'; }\r\n\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t}\r\n\t\t\t\t\t$out .= '<div class=\"list-with-icon list-with-icon--style-2\">';\r\n\t\t\t\t\t\t$out .= '<div class=\"list__inner\">';\r\n\t\t\t\t\t\t\t$out .= '<div class=\"row\">';\r\n\r\n\t\t\t\t\t\t\tif ( $item_column !='custom' ) {\r\n\t\t\t\t\t\t\t\t$itemcolumntotal = $item_column ? $item_column : 'col-sm-6 col-md-4';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ( $item_column =='custom' ) {\r\n\t\t\t\t\t\t\t\t$deskcolumn = $desk_column ? $desk_column : 'col-md-4';\r\n\t\t\t\t\t\t\t\t$deskcolumn_offset = $desk_column_offset ? $desk_column_offset : '';\r\n\t\t\t\t\t\t\t\t$mobcolumn = $mob_column ? $mob_column : 'col-sm-6';\r\n\t\t\t\t\t\t\t\t$itemcolumn = ''.esc_attr( $deskcolumn ).' '.esc_attr( $deskcolumn_offset ).' '.esc_attr( $mobcolumn ).'';\r\n\t\t\t\t\t\t\t\t$itemcolumntotal = preg_replace('/\\s\\s+/', ' ', $itemcolumn);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tforeach ( $services_loop as $serv ) {\r\n\t\t\t\t\t\t\t\t$out .= '<!-- start item -->';\r\n\t\t\t\t\t\t\t\t$out .= '<div class=\"col-xs-12 '.$itemcolumntotal.'\">';\r\n\t\t\t\t\t\t\t\t\t$out .= '<div class=\"list__item text-center\">';\r\n\t\t\t\t\t\t\t\tif ( isset( $serv['icon_type'] ) !='' ){ $icon_type = $serv['icon_type']; } else{ $icon_type = 'fonticon'; }\r\n\t\t\t\t\t\t\t\tif ( $icon_type == 'imgicon' ){\r\n\t\t\t\t\t\t\t\t\tif ( isset( $serv['itemimg_icon'] ) !='' ){\r\n\t\t\t\t\t\t\t\t\t\t$itemimgicon = wp_get_attachment_url( $serv['itemimg_icon'],'full' );\r\n\t\t\t\t\t\t\t\t\t\t$out .= '<img class=\"list__item__ico img-responsive'.$animation3.''.$imgiconclass.'\" src=\"'.esc_url( $itemimgicon ).'\" alt=\"img-icon\" />';\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t\tif ( isset( $serv['item_fonticon'] ) !='' ){$out .= '<i class=\"list__item__ico font-icon '.$serv['item_fonticon'].''.$animation3.'\"'.$current3.'></i>'; }\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif ( isset( $serv['item_title'] ) !='' ){$out .= '<h3 class=\"list__item__title'.$animation4.'\"'.$current4.'>'.$serv['item_title'].'</h3>'; }\r\n\t\t\t\t\t\t\t\t\tif ( isset( $serv['item_desc'] ) !='' ){$out .= '<p class=\"list-desc'.$animation5.'\"'.$current5.'>'.$serv['item_desc'].'</p>'; }\r\n\t\t\t\t\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t\t\t\t\t$out .= '<!-- end item -->';\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t\t$out .= '</div>';\r\n\t\t\t\t$out .= '</div>';\r\n\t\t\t$out .= '</section>';\r\n\t\t\t$out .= '<!-- end section -->';\r\n\r\n\treturn $out;\r\n}", "public function get_squad_types() {\n return array(\n self::NOT_PLAYING => __( 'Not playing', 'clanpress' ),\n self::PLAYING => __( 'Playing', 'clanpress' ),\n );\n }", "function action_woocommerce_order_item_meta_start( $item_name, $item, $order ) { \r\n\t\r\n\t$product_id = $item['product_id'];\r\n\t$_enable_warehouse=get_metadata('post',$product_id,'_enable_warehouse',true);\r\n\tif($_enable_warehouse==1) \r\n\treturn $item_name.' (shipped by warehouse) ';\r\n\telse return $item_name;\r\n\t\r\n\t\r\n}", "public function generate_header_definitions() {\n\n\t\tif ( is_page_template( 'page-monster.php' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\t?>\n<script type='text/javascript'>\n var adUnitPath = dfp.adunitpath;\n var article_skyscraper_mapping, article_lead_unit_mapping, article_cube_mapping, sf_mapping, sf_inline_mapping, article_mapping, sf_super_leaderboard_mapping, super_leaderboard_mapping, hp_upper_super_leaderboard_mapping, gallery_cube_mapping, hp_cube_mapping, article_leaderboard_mapping, hp_ear_mapping;\n var googletag = googletag || {};\n googletag.cmd = googletag.cmd || [];\n var CSTAdTags = {};\n googletag.cmd.push(function () {\n article_lead_unit_mapping = googletag.sizeMapping()\n .addSize([1025, 0], [728, 90]) //desktop\n\t .addSize([800, 1200], [ [320, 50] ] ) //tablet\n\t .addSize([800, 1280], [ [320, 50] ] ) //tablet\n\t .addSize([768, 1024], [ [320, 50] ] ) //tablet\n .addSize([0, 0], [[320, 50],[300,50]]) //other\n\t .build();\n super_leaderboard_mapping = googletag.sizeMapping().\n addSize([1200, 800], [ [970,90], [728,90] ] ). //tablet\n addSize([1025, 0], [728, 90]). //desktop\n addSize([992, 0], [ [970, 90], [728, 90] ] ). //desktop\n addSize([1024, 768], [ [320, 50], [300, 50] ] ). //tablet\n addSize([800, 1200], [ [320, 50], [300, 50] ] ). //tablet\n addSize([768, 1024], [ [320, 50], [300, 50] ] ). //tablet\n addSize([640, 480], [[320, 50], [300, 50]]). //phone\n addSize([414, 0], [[320, 50], [300, 50]]). //phone\n addSize([375, 667], [[320, 50], [300, 50]]). //phone\n addSize([0, 0], [[320, 50], [300, 50]]). //other\n build();\n hp_upper_super_leaderboard_mapping = googletag.sizeMapping().\n addSize([1200, 800], [ [970,90], [728,90] ] ). //tablet\n addSize([992, 0], [ [970, 90], [728, 90] ] ). //desktop\n addSize([800, 1200], [ [728,90] ] ). //tablet\n addSize([768, 1024], [ [728,90] ] ). //tablet\n addSize([640, 480], [[320, 50], [300, 50]]). //phone\n addSize([414, 0], [[320, 50], [300, 50]]). //phone\n addSize([375, 667], [[320, 50], [300, 50]]). //phone\n addSize([0, 0], [[320, 50], [300, 50]]). //other\n\t build();\n sf_super_leaderboard_mapping = googletag.sizeMapping().\n addSize([1200, 800], [ [970, 250], [970,90], [728,90] ] ). //tablet\n addSize([992, 0], [ [970, 250], [970, 90], [728, 90] ] ). //desktop\n addSize([800, 1200], [ [728,90] ] ). //tablet\n addSize([768, 1024], [ [728,90] ] ). //tablet\n addSize([640, 480], [[320, 50], [300, 50]]). //phone\n addSize([414, 0], [[320, 50], [300, 50]]). //phone\n addSize([375, 667], [[320, 50], [300, 50]]). //phone\n addSize([0, 0], [[320, 50], [300, 50]]). //other\n\t build();\n article_cube_mapping = googletag.sizeMapping()\n .addSize([0, 0], []) //other\n\t .addSize([1025, 0], [[300, 600], [300, 250]]) //desktop\n\t .build();\n article_skyscraper_mapping = googletag.sizeMapping()\n .addSize([0, 0], []) //other\n\t .addSize([1025, 0], [[160,600]]) //desktop\n\t .build();\n hp_ear_mapping = googletag.sizeMapping()\n .addSize([0, 0], []) //other\n\t .addSize([992, 0], [[184,90]]) //desktop\n\t .build();\n hp_cube_mapping = googletag.sizeMapping()\n\t .addSize([1025, 0], [[300, 600]]) //desktop\n\t .addSize([768,1024], [[300, 600]]) //desktop no sidebar\n\t .addSize([768, 0], [[300, 600]]) //desktop\n\t .addSize([732, 0], [[300, 250]]) //mobile device\n\t .addSize([640, 480], [[320, 50], [300, 50]]) //phone\n\t .addSize([375, 667], [[320, 50], [300, 50]]) //phone\n\t .addSize([0, 0], [[300, 50], [320, 50]])\n\t .build();\n gallery_cube_mapping = googletag.sizeMapping()\n .addSize([0, 0], []) //other\n\t .addSize([1025, 0], [[300, 250]]) //desktop\n\t .build();\n article_mapping = googletag.sizeMapping().\n addSize([992, 0], [ [728, 90] ] ). //desktop\n addSize([800, 1200], [ [728,90] ] ). //tablet\n addSize([768, 1024], [ [728,90] ] ). //tablet\n addSize([640, 480], [[300, 50], [320, 50]]). //phone\n addSize([375, 667], [[300, 50], [320, 50]]). //phone\n addSize([0, 0], [[300, 50], [320, 50]]). //other\n build();\n article_leaderboard_mapping = googletag.sizeMapping().\n addSize([992, 0], [ [728, 90] ] ). //desktop\n addSize([800, 1200], [ [728,90] ] ). //tablet\n addSize([768, 1024], [ [728,90] ] ). //tablet\n addSize([640, 480], [[320, 50], [300, 50]]). //phone\n addSize([375, 667], [[320, 50], [300, 50]]). //phone\n addSize([0, 0], [320, 50], [300, 50]). //other\n build();\n sf_mapping = googletag.sizeMapping()\n .addSize([0, 0], []) //other\n\t .addSize([992, 0], [[300, 600], [300, 250]]) //desktop\n .addSize([768, 0], [[300, 600], [300, 250]]) //tablet\n .build();\n sf_inline_mapping = googletag.sizeMapping()\n .addSize([992, 0], [[300, 250]]) //desktop\n .addSize([768, 0], [[300, 250]]) //tablet\n .addSize([640, 0], [[320, 50]]) //phone\n .addSize([414, 0], [[320, 50]]) //phone\n .addSize([375, 0], [[320, 50]]) //phone\n .addSize([0, 0], [320, 50]) //other\n .build();\n if (dfp.front_page) {\n googletag.defineSlot(adUnitPath, [[2, 2], [970, 90]], 'div-gpt-sbb-1')\n .addService(googletag.pubads())\n .setTargeting(\"pos\", \"sbb\")\n .setCollapseEmptyDiv(true, true);\n googletag.defineSlot(adUnitPath, [[728, 90]], 'div-gpt-super-leaderboard-3')\n .defineSizeMapping(super_leaderboard_mapping)\n .addService(googletag.pubads())\n .setTargeting(\"pos\", \"Super Leaderboard 3\")\n .setCollapseEmptyDiv(true, true);\n googletag.defineSlot(adUnitPath, [[728, 90]], 'div-gpt-super-leaderboard-4')\n .defineSizeMapping(super_leaderboard_mapping)\n .addService(googletag.pubads())\n .setTargeting(\"pos\", \"Super Leaderboard 4\")\n .setCollapseEmptyDiv(true, true);\n googletag.defineSlot(adUnitPath, [[728, 90]], 'div-gpt-super-leaderboard-5')\n .defineSizeMapping(super_leaderboard_mapping)\n .addService(googletag.pubads())\n .setTargeting(\"pos\", \"Super Leaderboard 5\")\n .setCollapseEmptyDiv(true, true);\n googletag.defineSlot(adUnitPath, [184, 90], 'div-gpt-sponsor-ear-left')\n .defineSizeMapping(hp_ear_mapping)\n .addService(googletag.pubads()).setTargeting(\"pos\", \"Sponsor Ear Left\")\n .setCollapseEmptyDiv(true, true);\n googletag.defineSlot(adUnitPath, [184, 90], 'div-gpt-sponsor-ear-right')\n .defineSizeMapping(hp_ear_mapping)\n .addService(googletag.pubads()).setTargeting(\"pos\", \"Sponsor Ear Right\")\n .setCollapseEmptyDiv(true, true);\n }\n if (dfp.author) {\n googletag.defineSlot(adUnitPath, [ [728, 90] ], 'div-gpt-super-leaderboard-2')\n .defineSizeMapping(super_leaderboard_mapping)\n .addService(googletag.pubads())\n .setTargeting(\"pos\", \"Super leaderboard 2 970x90\")\n .setCollapseEmptyDiv(true, true);\n }\n if (dfp.search||dfp.fourohfour||dfp.article) {\n googletag.defineSlot(adUnitPath, [[728, 90]], 'div-gpt-atf-leaderboard-1')\n .defineSizeMapping(article_leaderboard_mapping)\n .addService(googletag.pubads())\n .setTargeting(\"pos\", \"atf leaderboard\");\n }\n if (dfp.article) {\n CSTAdTags['div-gpt-sky-scraper-1'] = googletag.defineSlot(adUnitPath, [160, 600], 'div-gpt-sky-scraper-1')\n\t\t.defineSizeMapping(article_skyscraper_mapping)\n\t\t.addService(googletag.pubads())\n\t\t.setTargeting(\"pos\", \"SkyScraper\");\n }\n if(dfp.gallery) {\n CSTAdTags['div-gpt-gallery-1'] = googletag.defineSlot(adUnitPath, [300, 250], 'div-gpt-gallery-1')\n .addService(googletag.pubads())\n\t\t.defineSizeMapping(gallery_cube_mapping)\n .setTargeting(\"pos\",\"gallery 1\");\n }\n googletag.pubads().enableSingleRequest();\n window.CSTAds = window.CSTAds || false;\n if (window.CSTAds) {\n googletag.pubads().addEventListener('slotVisibilityChanged', CSTAds.handleGptVisibility);\n googletag.pubads().addEventListener('impressionViewable', CSTAds.handleGptImpressionViewability);\n\t}\n googletag.enableServices();\n});\n\n</script>\n<?php\n\t}", "public function generate_sku(int $product_id)\n {\n $ret_val = ['system_error' => false];\n\n try\n {\n $ret_val['sku'] = $this->productService->generateItemSkuFromProduct($product_id);\n }\n catch(\\Exception $ex)\n {\n $ret_val['system_error'] = $ex->getMessage();\n }\n\n return $ret_val;\n }", "public function getSKU()\n {\n return $this->getValue('nb_catalog_item_lang_sku');\n }", "function show_earthriestext($products) {\r\n\tglobal $product;\r\n\t$pid=$product->id;\r\n\t$_enable_warehouse=get_metadata('post',$pid,'_enable_warehouse',true);\r\n\r\n\t\r\n\tif($_enable_warehouse==1) {\r\n\t\t $output= '<div style=\"font-size: 10px;color: #000;\">fulfilled by Eartheries warehouse</div>';\r\n\t\techo sprintf($output);\r\n\t}\r\n\t\r\n\t\r\n}", "protected function _getEndJs()\n\t{\n\t\t$js = parent::_getEndJs();\n\t\t$js .= \"pageJs._containerIds=\" . json_encode(array(\n\t\t\t\t'sku' => 'sku_div'\n\t\t\t\t,'description' => 'description_div'\n\t\t\t\t,'vendor' => 'vendor_div'\n\t\t\t\t,'prices' => 'prices_div'\n\t\t\t\t,'comments' => 'comments_div'\n\t\t\t\t,'saveBtn' => 'save_btn'\n\t\t)) . \";\";\n\t\t$js .= \"pageJs.load();\";\n\t\t$js .= \"pageJs.bindAllEventNObjects();\";\n\t\treturn $js;\n\t}", "function initSpCost(){\r\n\t$SP_Cost = 0;\r\n}", "public function getBlockGift($skuGift) {\n\t return;\n\t}", "public function getSku()\n {\n return $this->getTypeInstance(true)->getSku($this);\n }", "public function product_analytics($uniqid='',$pagetype='') {\r\n\t if( $pagetype != '' && $uniqid != '' ) {\r\n\r\n\t $userIp = $_SERVER['REMOTE_ADDR'];\r\n $user_agent = $_SERVER['HTTP_USER_AGENT'];\r\n $os_array = array('/windows phone 8/i' => 'Mobile',\r\n '/windows phone os 7/i' => 'Mobile',\r\n '/windows nt 6.3/i' => 'Desktop',\r\n '/windows nt 6.2/i' => 'Desktop',\r\n '/windows nt 6.1/i' => 'Desktop',\r\n '/windows nt 6.0/i' => 'Desktop',\r\n '/windows nt 5.2/i' => 'Desktop',\r\n '/windows nt 5.1/i' => 'Desktop',\r\n '/windows xp/i' => 'Desktop',\r\n '/windows nt 5.0/i' => 'Desktop',\r\n '/windows me/i' => 'Desktop',\r\n '/win98/i' => 'Desktop',\r\n '/win95/i' => 'Desktop',\r\n '/win16/i' => 'Desktop',\r\n '/macintosh|mac os x/i' => 'Desktop',\r\n '/mac_powerpc/i' => 'Desktop',\r\n '/linux/i' => 'Desktop',\r\n '/ubuntu/i' => 'Desktop',\r\n '/iphone/i' => 'Mobile',\r\n '/ipod/i' => 'Tablet',\r\n '/ipad/i' => 'Tablet',\r\n '/android/i' => 'Mobile',\r\n '/blackberry/i' => 'Mobile',\r\n '/webos/i' => 'Mobile');\r\n\r\n $found = false;\r\n $device = 'Desktop';\r\n foreach ($os_array as $regex => $value)\r\n {\r\n if($found)\r\n break;\r\n else if (preg_match($regex, $user_agent))\r\n {\r\n $device = $value;\r\n }\r\n }\r\n\r\n if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE)\r\n $browser = 'Internet explorer';\r\n elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== FALSE) //For Supporting IE 11\r\n $browser = 'Internet explorer';\r\n elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== FALSE)\r\n $browser = 'Mozilla Firefox';\r\n elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== FALSE)\r\n $browser = 'Google Chrome';\r\n elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== FALSE)\r\n $browser = \"Opera Mini\";\r\n elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== FALSE)\r\n $browser = \"Opera\";\r\n elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== FALSE)\r\n $browser = \"Safari\";\r\n else\r\n $browser = 'Others';\r\n\r\n\r\n $dataArr = array(\r\n\t 'prod_analysis_prodid' => $uniqid,\r\n\t 'prod_analysis_date' => date('Y-m-d'),\r\n\t 'prod_analysis_browser' => $browser,\r\n\t 'prod_analysis_device' => $device,\r\n\t 'prod_analysis_ipaddr' => $userIp,\r\n\t 'prod_analysis_pagetype' => $pagetype\r\n\t );\r\n\t $anaDetails = $this->CI->DatabaseModel->access_database('ts_product_analysis','select','',$dataArr);\r\n\t if( !empty($anaDetails) ) {\r\n\t $currentCount = $anaDetails[0]['prod_analysis_views'];\r\n\t $currentRowId = $anaDetails[0]['prod_analysis_id'];\r\n\t }\r\n\t else {\r\n $currentRowId = $this->CI->DatabaseModel->access_database('ts_product_analysis','insert',$dataArr,'');\r\n $currentCount = 0;\r\n\t }\r\n\t $newCount = $currentCount + 1;\r\n\t $dataArr['prod_analysis_views'] = $newCount;\r\n\t $this->CI->DatabaseModel->access_database('ts_product_analysis','update',$dataArr,array('prod_analysis_id'=>$currentRowId));\r\n\t return $newCount;\r\n\t }\r\n\t else {\r\n\t return 'ZERO'; // to homepage\r\n\t }\r\n\t}", "public function createnewproduct()\n {\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\n $product = Mage::getModel('catalog/product');\n $websiteId = Mage::app()->getWebsite('base')->getId();\n $storeId = Mage::app()->getStore('default')->getId();\n\n //Set SKU dynamically over here\n $collection = Mage::getModel('catalog/product')\n ->getCollection()\n ->addAttributeToSort('created_at', 'desc');\n $collection->getSelect()->limit(1);\n $latestItemId = $collection->getLastItem()->getId();\n if($latestItemId) {\n $nextProid = $latestItemId + 1;\n } else {\n $nextProid = 1;\n }\n $SampleSKU = 'titechPro'.$nextProid;\n\n try {\n $product\n ->setStoreId($storeId) //you can set data in store scope\n ->setWebsiteIds(array($websiteId)) //website ID the product is assigned to, as an array\n ->setAttributeSetId(4) //ID of a attribute set named 'default'\n ->setTypeId('simple') //product type\n ->setCreatedAt(strtotime('now')) //product creation time\n ->setUpdatedAt(strtotime('now')) //product update time\n ->setSku($SampleSKU) //SKU\n ->setName('Titech sample product') //product name\n ->setWeight(4.0000)\n ->setStatus(1) //product status (1 - enabled, 2 - disabled)\n ->setTaxClassId(4) //tax class (0 - none, 1 - default, 2 - taxable, 4 - shipping)\n ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH) //catalog and search visibility\n //->setManufacturer(28) //manufacturer id\n //->setColor(24)\n //->setNewsFromDate('06/26/2014') //product set as new from\n //->setNewsToDate('06/30/2014') //product set as new to\n ->setCountryOfManufacture('IN') //country of manufacture (2-letter country code)\n ->setPrice(11.22) //price in form 11.22\n ->setCost(22.33) //price in form 11.22\n //->setSpecialPrice(00.44) //special price in form 11.22\n //->setSpecialFromDate('06/1/2014') //special price from (MM-DD-YYYY)\n //->setSpecialToDate('06/30/2014') //special price to (MM-DD-YYYY)\n ->setMsrpEnabled(1) //enable MAP\n ->setMsrpDisplayActualPriceType(1) //display actual price (1 - on gesture, 2 - in cart, 3 - before order confirmation, 4 - use config)\n ->setMsrp(99.99) //Manufacturer's Suggested Retail Price\n ->setMetaTitle('Sample meta title 2')\n ->setMetaKeyword('Sample meta keyword 2')\n ->setMetaDescription('Sample meta description 2')\n ->setDescription('This is a long description for sample product')\n ->setShortDescription('This is a short description for sample product')\n ->setMediaGallery (array('images'=>array (), 'values'=>array ())) //media gallery initialization\n ->addImageToMediaGallery('media/catalog/product/ti/ti_logo.png', array('image','thumbnail','small_image'), false, false) //assigning image, thumb and small image to media gallery\n ->setStockData(array(\n 'use_config_manage_stock' => 0, //'Use config settings' checkbox\n 'manage_stock'=>1, //manage stock\n 'min_sale_qty'=>1, //Minimum Qty Allowed in Shopping Cart\n 'max_sale_qty'=>2, //Maximum Qty Allowed in Shopping Cart\n 'is_in_stock' => 1, //Stock Availability\n 'qty' => 999 //qty\n )\n )\n ->setCategoryIds(array(2)); //assign product to categories - Set to Default\n\n $product->save();\n return $product->getIdBySku($SampleSKU);\n } catch(Exception $e) {\n Mage::log($e->getMessage());\n }\n }", "public function scan(string $sku)\n {\n $this->addProduct($sku);\n }", "public function setSKU($sku) {\r\n $this->_data['SKU'] = $sku;\r\n return $this;\r\n }", "public function Restituer()\n {\n // section -64--88-56-1-313d700b:16f04d7fd4a:-8000:00000000000009BC begin\n // section -64--88-56-1-313d700b:16f04d7fd4a:-8000:00000000000009BC end\n }", "public function unit_sold() {\n $data['header'] = $this->header;\n $this->load->view('report_unit_sold_v', $data);\n }", "function renderStep1() {\n\t\t$this->substituteOptionMarker('region');\n\t}", "public function Highshine(int $user){\n $products = DB::select('select * from products where id = 2 and is_active = 1');\n $shades = DB::select('select * from shades where shade_id = 2 and is_active = 1');\n\n return view('highshine-details', [\n\n 'products' => $products,\n 'shades' =>$shades,\n 'id'=>$user\n\n ]);\n\n }", "function lb_get_seo_title($product) {\n //$price = lb_format_price($product['finalprice'], true, true);\n $price = round((float)$product['finalprice']/100, 0) . ':-';\n \n $seo_title = 'Köp ' . $product['name'] . (isset($product['merchant'])?' från ' . $product['merchant']:'') . ' för ' . $price . (true == (bool)$product['onsale']?' (' . $product['salediscount'] . '% rabatt!)':'');\n \n error_log('lb_get_seo_title - product[finalprice]=' . $product['finalprice'] . ', price=' . $price . ', product: ' . print_r($product, true));\n\n return wpts_spin($seo_title);\n}", "function showEnd( $appctx )\n\t\t{\n\t\t$appctx->Moins() ;\n\t\t}", "public function preOpenSkullWoodsCurtains() {\n $this->setValue($this::ROOM_DATA + 0x93, 0x80);\n }", "function get_type_partners()\n{\n return 'atu_partners';\n}", "function init_typekit() {\n\n\t\t$token = get_option(\"ct_typekit_token\", \"\");\n\t\t$kit_id = get_option(\"ct_typekit_kit_id\", \"\");\n\n\t\tif(empty($kit_id) || empty($token)) {\n\t\t\techo \"typeKitFonts=[];\";\n\t\t}\n\t\telse {\n\t\t\t// Get Typekit fonts\n\t\t\t$response = wp_remote_get( 'https://typekit.com/api/v1/json/kits/'.$kit_id.'?token='.$token, \n\t\t\t\tarray( \t'timeout' => 120, \n\t\t\t\t\t\t'httpversion' => '1.1' ) );\n\n\t\t\t$response = json_decode( $response[\"body\"], true );\n\n\t\t\t//var_dump( $response );\n\n\t\t\tif ( isset( $response[\"kit\"] ) && $response[\"kit\"] && is_array( $response[\"kit\"][\"families\"] ) ) {\n\n\t\t\t\t$fonts = [];\n\n\t\t\t\tforeach ( $response[\"kit\"][\"families\"] as $family ) {\n\t\t\t\t\t$fonts[] = array(\n\t\t\t\t\t\t\t//\"slug\" => $family[\"slug\"],\n\t\t\t\t\t\t\t\"slug\" => $family[\"css_names\"][0],\n\t\t\t\t\t\t\t\"name\" => $family[\"name\"]\n\t\t\t\t\t\t);\t\n\t\t\t\t}\n\n\t\t\t\t$output = json_encode( $fonts );\n\t\t\t\t$output = htmlspecialchars( $output, ENT_QUOTES );\n\n\t\t\t\techo \"typeKitFonts=$output;\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\techo \"typeKitFonts=[];\";\t\n\t\t\t}\n\t\t}\n\t}", "function endCase() {\n\t}", "public static function bootHasSku()\n {\n static::observe(SkuObserver::class);\n }", "public function finishPurchase() {}" ]
[ "0.6040414", "0.5886506", "0.5355766", "0.5355766", "0.52503365", "0.5239037", "0.51626706", "0.5157741", "0.5147707", "0.5128393", "0.5109693", "0.5103479", "0.5023111", "0.49958763", "0.49940407", "0.48756325", "0.48499376", "0.48297203", "0.48259583", "0.48176807", "0.47796834", "0.4769022", "0.47630253", "0.47600648", "0.47568983", "0.4720959", "0.47144988", "0.47134846", "0.47123316", "0.4686401", "0.46863988", "0.46842864", "0.46439952", "0.4636233", "0.46357557", "0.46318927", "0.46149915", "0.4596096", "0.4576669", "0.45733723", "0.45709836", "0.45655596", "0.45632124", "0.45559105", "0.45555747", "0.45530117", "0.4552314", "0.45452616", "0.45417947", "0.45405433", "0.4497558", "0.44935927", "0.44927892", "0.44882745", "0.4485012", "0.44844767", "0.44843072", "0.44816855", "0.44792026", "0.44649303", "0.44596958", "0.4455529", "0.44539714", "0.44499436", "0.44459295", "0.4442337", "0.44416356", "0.4436692", "0.4431271", "0.44294414", "0.4424573", "0.4422972", "0.44182274", "0.44167808", "0.4416513", "0.44035274", "0.43930665", "0.4391044", "0.43869874", "0.43863147", "0.4378886", "0.43779972", "0.4376171", "0.43733242", "0.43713897", "0.4364205", "0.43641558", "0.43619132", "0.43579987", "0.43579778", "0.43563136", "0.43551752", "0.4354632", "0.43538362", "0.43522266", "0.4350548", "0.4350108", "0.43496442", "0.43491325", "0.43461943" ]
0.4525807
50
/ sku End/ / External sku start/
public function getExternalSkuData () { $sql = "SELECT t1.id,t1.sku_name,t1.sku_creation_date,t1.sku_description,t3.sku_active_status_name,t4.unit_name FROM `tbld_sku` as t1 inner join `tbli_sku_mou_price_mapping` as t2 on t1.id=t2.sku_id left join `tbld_sku_active_status` as t3 on t1.sku_active_status_id=t3.id left join `tbld_unit` as t4 on t2.mou_id=t4.id where t1.sku_type_id=2"; $query = $this->db->query( $sql )->result_array(); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function changesku(){\t \r\n\t $this->chartValue(); //adding to output\r\n\t $this->idleStHealthChk(); //adding to output\r\n\t}", "function getSkus() {\n\techo \"Getting Skus </br>\";\n\t$response = getRequest('/api/sku');\n\tprintInfo($response);\n}", "public function generate()\n {\n $skuCount = (int) Option::get(\"catalog.generator\", \"sku_count\");\n if($skuCount > 0)\n parent::generate();\n }", "public function setSku($sku);", "function generateSku(){\n\t\t$characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$sku = mt_rand(10000, 99999) . mt_rand(10000, 99999) . $characters[mt_rand(0, strlen($characters) - 1)];\n\t\treturn str_shuffle($sku);\n\t}", "public function getProductSKU()\n {\n }", "public static function bootHasSku()\n {\n static::observe(SkuObserver::class);\n }", "public function scan(string $sku)\n {\n $this->addProduct($sku);\n }", "public function generatesku()\n {\n $newsku = 111111;\n //We need to generate a random sku number that does not already exist\n $exists = true;\n $newsku = mt_rand(100000,999999);\n do {\n $product = $this->Product->findBysku($newsku);\n if(empty($product))\n $exists = false;\n } while($exists);\n return $newsku;\n }", "public function getSku();", "public function getSku();", "function on_buy()\r\n\t{\r\n\t}", "public function setSku(?string $value): void {\n $this->getBackingStore()->set('sku', $value);\n }", "private function resetSkus()\n {\n foreach ($this->options as $op=>$junk) {\n if (preg_match('#SellerSKUList#', $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function testGetStoreFrontSkuReturnsSkuWhenSkusShown ()\n\t{\n\t\t$showSkuBackup = Store_Config::get('ShowProductSKU');\n\t\tStore_Config::override('ShowProductSKU', true);\n\t\t$details = new Store_Product_Details;\n\t\t$details->setSku('test');\n\t\t$this->assertSame('test', $details->getStoreFrontSku());\n\t\tStore_Config::override('ShowProductSKU', $showSkuBackup);\n\t}", "public function startPowerUnits() {\n\t\techo \"systems are not ready yet\";\n\t}", "public function getSku()\n {\n return $this->sku;\n }", "public function testGetSku()\n {\n $data_from_collection = $this->data['annual_collection'];\n $this->assertEquals(\n $data_from_collection['attributes']['plan_sku'],\n $this->makePlan($data_from_collection)->getSku()\n );\n\n $data_from_site = $this->data['annual_site'];\n $this->assertEquals($data_from_site['sku'], $this->makePlan($data_from_site)->getSku());\n }", "public function getSkuId()\n {\n return $this->skuId;\n }", "public function startPowerUnits() {\n\t\t\n\t}", "public function generateSku()\n {\n $number=mt_rand(1000,9999);\n if($this->checkSku($number)){\n return $this->generateSku();\n }\n return (string)$number;\n }", "public function getSkuId(): int\n {\n return $this->skuId;\n }", "function uds_pricing_init()\n{\n\tglobal $uds_errors;\n\t// Basic init\n\t$dir = UDS_PRICING_URL;\n\tif(is_admin()) {\n\t\t$error = uds_pricing_process_products();\n\t\tif(is_wp_error($error)) {\n\t\t\t$uds_errors[] = $error;\n\t\t}\n\t\t\n\t\t$error = uds_pricing_process();\n\t\tif(is_wp_error($error)) {\n\t\t\t$uds_errors[] = $error;\n\t\t}\n\t}\n}", "public function getSKU()\n {\n return $this->sKU;\n }", "public function getItemSku();", "public function generateProductSKU()\n {\n return $this->skuString . int_random();\n }", "public function show(SkuFormat $skuFormat)\n {\n //\n }", "public function actionWalmartproductinfo()\n {\n $sku = false;\n $productdata = \"add sku on url like ?sku=product_sku\";\n if (isset($_GET['sku'])) {\n $sku = $_GET['sku'];\n }\n $merchant_id = MERCHANT_ID;\n $config = Data::getConfiguration($merchant_id);\n $walmartHelper = new Walmartapi($config['consumer_id'], $config['secret_key']);\n if ($sku) {\n $productdata = $walmartHelper->getItem($sku);\n }\n print_r($productdata);\n die;\n }", "public function getSku()\n {\n return 'Tomato';\n }", "public function startPowerUnits() {\n\t\techo \"power units started.<br>\";\n\t\t$this->missionControl->setState($this->missionControl->getRetractArms());\n\t}", "public function getNewSku($sku = null)\n {\n return $this->skuProcessor->getNewSku($sku);\n }", "public function setSKU($sku) {\r\n $this->_data['SKU'] = $sku;\r\n return $this;\r\n }", "public function getSku() {\n return $this->_sku;\n }", "function on_start(){\n //$userID = $u->getUserID();\n \n //print \"runnin\";\n //$cartEventClassName = 'ScottcAffiliateRelation';\n //$cartEventClassPath = 'packages/scottc_affiliates/libraries/affiliate_relation.php';\n $eventClassName = 'AffiliateGateway';\n $eventClassPath = 'packages/affiliate_gateway/libraries/affiliate_gateway.php';\n \n define(\"ENABLE_APPLICATION_EVENTS\", true);\n \n Events::extend('on_start', $eventClassName, 'eventOnStart', $eventClassPath, $_GET);\n //Events::extend('on_page_view', 'AffiliateGateway', 'eventOnStart', 'packages/affiliate_gateway/libraries/affiliate_gateway.php');\n \n // if($_GET){\n // Loader::library('affiliate_relation',SCOTTECOMAFFILATESPACKAGEHANDLE);\n // $har = new ScottcAffiliateRelation($_GET);\n // }\n }", "public function finishPurchase() {}", "public function woocommerce_loaded() {\n /*************************************/\n /* Adding AJAX function */\n /*************************************/\n add_action( 'init', 'waes_ajax_function' );\n function waes_ajax_function() {\n add_action('wp_ajax_waes_load_sku', 'waes_load_sku');\n }\n }", "public function deprecateSkus($originErpId, $skus)\n {\n $connection = $this->_resourceConnection->getConnection();\n $tableName = $this->_resourceConnection->getTableName('temando_origin_inventory');\n foreach ($skus as $sku => $qty) {\n $updateQuery = \"UPDATE \" . $tableName . \" SET units=(units-\" . $qty .\n \") WHERE erp_id='\".$originErpId.\"' AND sku='\". addslashes($sku).\"'\";\n\n $connection->query($updateQuery);\n }\n }", "public function buy()\n\t{\n\t\t$data['aktif']\t= 'prospektus';\n\t\t$this->template->load('template','prospektus/V_buy', $data);\n\t}", "function block_skinChooser_body(){\n $skins = listAllSkins($_SESSION[\"userId\"]);\n $customSkin = getIniKey($_SESSION[\"userId\"],\"enable\");\n $actualSkin = getIniKey($_SESSION[\"userId\"],\"fileName\");\n\n if(empty($skins)){\n echo \"<h2 style=\\\"color:red\\\">You have to upload at least one skin to use this functionnality</h2>\";\n }else{\n //Check box to enable custom skin\n echo \"Enable custom skin: <br>\";\n echo \"<span style=\\\"font-size:13px\\\"> By default the osu!replayViewer skin is used</span><br>\";\n echo '<label class=\"checkbox\">';\n if($customSkin == 1){\n echo '<input type=\"checkbox\" name=\"customSkin\" id=\"checkBox\" oninput=\"updateCustomSkin()\" checked>';\n }else{\n echo '<input type=\"checkbox\" name=\"customSkin\" oninput=\"updateCustomSkin()\" id=\"checkBox\">';\n }\n echo '</label>';\n echo '<br><br>';\n\n echo \"Choose your custom skin : <br>\";\n\n //Combobox with all skins uploaded\n echo '<div class=\"select\">';\n echo \"<select id='skinsSelector' name='skin'>\";\n foreach($skins as $skin)\n {\n if($skin == $actualSkin){\n echo \"<option value='\".$skin.\"' selected>\".$skin.\"</option>\";\n }else{\n echo \"<option value='\".$skin.\"'>\".$skin.\"</option>\";\n }\n }\n echo \"</select></div>\";\n }\n}", "private function getSkuSelectionList() {\r\n //$this->jsonOutput[\"skuSelectionList\"] = $this->settingVars->pageArray[\"SKU_SELECTION_LIST\"];\r\n\t\tif(isset($this->jsonOutput[\"settings\"]['sku_settings']) && $this->jsonOutput[\"settings\"]['sku_settings'] != \"\")\r\n\t\t\t$this->jsonOutput[\"skuSelectionList\"] = $this->jsonOutput[\"settings\"]['sku_settings'];\r\n }", "public function createnewproduct()\n {\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\n $product = Mage::getModel('catalog/product');\n $websiteId = Mage::app()->getWebsite('base')->getId();\n $storeId = Mage::app()->getStore('default')->getId();\n\n //Set SKU dynamically over here\n $collection = Mage::getModel('catalog/product')\n ->getCollection()\n ->addAttributeToSort('created_at', 'desc');\n $collection->getSelect()->limit(1);\n $latestItemId = $collection->getLastItem()->getId();\n if($latestItemId) {\n $nextProid = $latestItemId + 1;\n } else {\n $nextProid = 1;\n }\n $SampleSKU = 'titechPro'.$nextProid;\n\n try {\n $product\n ->setStoreId($storeId) //you can set data in store scope\n ->setWebsiteIds(array($websiteId)) //website ID the product is assigned to, as an array\n ->setAttributeSetId(4) //ID of a attribute set named 'default'\n ->setTypeId('simple') //product type\n ->setCreatedAt(strtotime('now')) //product creation time\n ->setUpdatedAt(strtotime('now')) //product update time\n ->setSku($SampleSKU) //SKU\n ->setName('Titech sample product') //product name\n ->setWeight(4.0000)\n ->setStatus(1) //product status (1 - enabled, 2 - disabled)\n ->setTaxClassId(4) //tax class (0 - none, 1 - default, 2 - taxable, 4 - shipping)\n ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH) //catalog and search visibility\n //->setManufacturer(28) //manufacturer id\n //->setColor(24)\n //->setNewsFromDate('06/26/2014') //product set as new from\n //->setNewsToDate('06/30/2014') //product set as new to\n ->setCountryOfManufacture('IN') //country of manufacture (2-letter country code)\n ->setPrice(11.22) //price in form 11.22\n ->setCost(22.33) //price in form 11.22\n //->setSpecialPrice(00.44) //special price in form 11.22\n //->setSpecialFromDate('06/1/2014') //special price from (MM-DD-YYYY)\n //->setSpecialToDate('06/30/2014') //special price to (MM-DD-YYYY)\n ->setMsrpEnabled(1) //enable MAP\n ->setMsrpDisplayActualPriceType(1) //display actual price (1 - on gesture, 2 - in cart, 3 - before order confirmation, 4 - use config)\n ->setMsrp(99.99) //Manufacturer's Suggested Retail Price\n ->setMetaTitle('Sample meta title 2')\n ->setMetaKeyword('Sample meta keyword 2')\n ->setMetaDescription('Sample meta description 2')\n ->setDescription('This is a long description for sample product')\n ->setShortDescription('This is a short description for sample product')\n ->setMediaGallery (array('images'=>array (), 'values'=>array ())) //media gallery initialization\n ->addImageToMediaGallery('media/catalog/product/ti/ti_logo.png', array('image','thumbnail','small_image'), false, false) //assigning image, thumb and small image to media gallery\n ->setStockData(array(\n 'use_config_manage_stock' => 0, //'Use config settings' checkbox\n 'manage_stock'=>1, //manage stock\n 'min_sale_qty'=>1, //Minimum Qty Allowed in Shopping Cart\n 'max_sale_qty'=>2, //Maximum Qty Allowed in Shopping Cart\n 'is_in_stock' => 1, //Stock Availability\n 'qty' => 999 //qty\n )\n )\n ->setCategoryIds(array(2)); //assign product to categories - Set to Default\n\n $product->save();\n return $product->getIdBySku($SampleSKU);\n } catch(Exception $e) {\n Mage::log($e->getMessage());\n }\n }", "public function generate_sku(int $product_id)\n {\n $ret_val = ['system_error' => false];\n\n try\n {\n $ret_val['sku'] = $this->productService->generateItemSkuFromProduct($product_id);\n }\n catch(\\Exception $ex)\n {\n $ret_val['system_error'] = $ex->getMessage();\n }\n\n return $ret_val;\n }", "public function setSellerSKU($value) \n {\n $this->_fields['SellerSKU']['FieldValue'] = $value;\n return $this;\n }", "public function saveSkins()\n {\n \\XLite\\Core\\Database::getCacheDriver()->save(\n get_called_class() . '.SubstitutonalSkins',\n $this->resourcesCache\n );\n }", "public function setSkus($s)\n {\n if (is_string($s)) {\n $s = [$s];\n }\n if (is_array($s)) {\n $this->resetASINs();\n $this->resetSKUs();\n $i = 1;\n foreach ($s as $x) {\n $this->options['SellerSKUList.Id.'.$i] = $x;\n $i++;\n }\n } else {\n return false;\n }\n }", "public function __construct($_sKU = NULL,$_startPrice = NULL,$_quantity = NULL,$_variationSpecifics = NULL,$_quantitySold = NULL,$_sellingStatus = NULL,$_discountPriceInfo = NULL,$_any = NULL)\r\n\t{\r\n\t\tparent::__construct(array('SKU'=>$_sKU,'StartPrice'=>$_startPrice,'Quantity'=>$_quantity,'VariationSpecifics'=>($_variationSpecifics instanceof EbayShoppingStructNameValueListArrayType)?$_variationSpecifics:new EbayShoppingStructNameValueListArrayType($_variationSpecifics),'QuantitySold'=>$_quantitySold,'SellingStatus'=>$_sellingStatus,'DiscountPriceInfo'=>$_discountPriceInfo,'any'=>$_any));\r\n\t}", "public function generateSKU()\n {\n $number=mt_rand(1000,999999);\n if ($this->checkSKU($number)){\n return $this->generateSKU();\n }\n return (string)$number;\n }", "function amt_wsc_team_install(){\n}", "public function verifyAmazonSku(Varien_Event_Observer $observer)\n {\n $product = $observer->getProduct();\n if ($product->getAmazonMcfEnabled()) {\n /**\n * @var Amazon_MCF_Model_Service_Inventory $service\n */\n $service = Mage::getModel('amazon_mcf/service_inventory');\n /**\n *\n *\n * @var Amazon_MCF_Helper_Data $helper\n */\n $helper = Mage::helper('amazon_mcf');\n $sku = $product->getAmazonMcfSku()\n ? $product->getAmazonMcfSku() : $product->getSku();\n\n $response = $service->getFulfillmentInventoryList(\n array('member' => array($sku))\n );\n\n if ($response) {\n // if there is a list of updates to provided skus, process them.\n $supplyList = $response->getListInventorySupplyResult()\n ->getInventorySupplyList()\n ->getmember();\n\n $asin = $supplyList[0]->getASIN();\n if (!$asin) {\n $helper->logInventory(\n \"Product configured to be FBA but sku ($sku) \n not matched in Seller Central\"\n );\n $message = \"The SKU entered does not have an associated Seller \n SKU at Amazon. Please check the SKU value matches \n between systems: \";\n\n Mage::getSingleton(\"adminhtml/session\")\n ->addWarning($helper->__($message) . $sku);\n }\n }\n }\n }", "public function bp_productssubnav_tab_action() {\n\t\techo $this->get_instance( \\MyVideoRoomExtrasParking\\Library\\SectionTemplates::class )->control_panel_store_products();\n\t}", "public function processNewSale($data, $payment_data, $sku)\n\t{\n\t\t$AID = $this->checkDomain();\n\t\t$TID = 1;\n\t\t$SID = '';\n\n\t\tif(Session::has('AID')){\n\t\t\t$AID = Session::get('AID');\n\t\t}\n\t\tif(Session::has('TID')){\n\t\t\t$TID = Session::get('TID');\n\t\t}\n\t\tif(Session::has('SID')){\n\t\t\t$SID = Session::get('SID');\n\t\t}\n\n\t\t$pd = preg_replace('/\\s+/', ' ',$payment_data['card_name']);\n\t\t$paymentYear = substr($payment_data['card_year'], -2);\n\t\t$paymentInfo = explode(' ', $pd);\n\n\t\t$this->call('ProcessNewSale', [[\n\t\t\t\t'LeadID' => $data['lead_id'],\n\t\t\t\t'API_username' => $this->API_username,\n\t\t\t\t'API_password' => $this->API_password,\n\t\t\t\t'ATI_Order' => [\n\t\t\t\t\t\t'ShippingInfo' => [\n\t\t\t\t\t\t\t\t'FirstName' => $data['first_name'],\n\t\t\t\t\t\t\t\t'LastName' => $data['last_name'],\n\t\t\t\t\t\t\t\t'Address1' => isset($data['address_1'])?$data['address_1']:'',\n\t\t\t\t\t\t\t\t'City' => $data['city'],\n\t\t\t\t\t\t\t\t'Zip' => $data['zip'],\n\t\t\t\t\t\t\t\t'Country' => 'USA',\n\t\t\t\t\t\t\t\t'Phone' => isset($data['phone_number'])?$data['phone_number']:'',\n\t\t\t\t\t\t\t\t'Email' => $data['email'],\n\t\t\t\t\t\t\t\t'State' => $data['state']\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'BillingInfo' => [\n\t\t\t\t\t\t\t\t'BillingAddress' => [\n\t\t\t\t\t\t\t\t\t\t'FirstName' => isset($paymentInfo[0]) ? $paymentInfo[0] : ' ',\n\t\t\t\t\t\t\t\t\t\t'LastName' => isset($paymentInfo[1]) ? $paymentInfo[1] : ' ',\n\t\t\t\t\t\t\t\t\t\t'Address1' => isset($data['address_1'])?$data['address_1']:'',\n\t\t\t\t\t\t\t\t\t\t'City' => $data['city'],\n\t\t\t\t\t\t\t\t\t\t'Zip' => $payment_data['zip'],\n\t\t\t\t\t\t\t\t\t\t'Country' => 'USA',\n\t\t\t\t\t\t\t\t\t\t'Phone' => isset($data['phone_number'])?$data['phone_number']:'',\n\t\t\t\t\t\t\t\t\t\t'Email' => $data['email'],\n\t\t\t\t\t\t\t\t\t\t'State' => $data['state']\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t'CardType' => substr($payment_data['card_number'], 0,1) == '5' ? 'Mastercard' : 'Visa',\n\t\t\t\t\t\t\t\t'CardNumber' => trim($payment_data['card_number']),\n\t\t\t\t\t\t\t\t'CVV' => trim($payment_data['card_cvv']),\n\t\t\t\t\t\t\t\t'ExpDate_MMYY' => trim($payment_data['card_month'] . $paymentYear),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'CartItems' => [\n\t\t\t\t\t\t\t\t'ATI_CartItem' => [\n\t\t\t\t\t\t\t\t\t\t'ATI_Sku' => $sku,\n\t\t\t\t\t\t\t\t\t\t'qty' => 1\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'PreviewOnlyFlag' => false,\n\t\t\t\t'MemberPassword' => $data['real_password'],\n\t\t\t\t'AID' => $AID,\n\t\t\t\t'TID' => $TID,\n\t\t\t\t'SID' => $SID,\n\t\t\t\t'MemberIPAddress'=>$data['ip']\n\t\t]]);\n\n\t\t$array = $this->parseXMLToJson();\n\t\tif (isset($array['ProcessNewSaleResponse']['ProcessNewSaleResult'])) {\n\t\t\tif (isset($array['ProcessNewSaleResponse']['ProcessNewSaleResult']['Result']['ErrorMessage'])) {\n\t\t\t\tif (count($array['ProcessNewSaleResponse']['ProcessNewSaleResult']['Result']['ErrorMessage']) == 0) {\n\t\t\t\t\treturn ['order_id' => $array['ProcessNewSaleResponse']['ProcessNewSaleResult']['OrderID'], 'member_id' => $array['ProcessNewSaleResponse']['ProcessNewSaleResult']['MemberID']];\n\t\t\t\t} else {\n\t\t\t\t\treturn ['error' => $array['ProcessNewSaleResponse']['ProcessNewSaleResult']['Result']['ErrorMessage']];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getSKU()\n {\n return $this->getValue('nb_catalog_item_lang_sku');\n }", "function dcs_dropship_product_info_page_shortcode($atts, $content=null)\r\n{\r\n\t$retval = dcs_dropship_product_info_page($_GET['sku']);\r\n\r\n\treturn $retval;\r\n}", "function pricing() {\n\t\t\tparent::controller();\n\t\t\t\n\t\t}", "public function getSku($i = 0)\n {\n if (isset($this->prepList[$i]['SellerSKU'])) {\n return $this->prepList[$i]['SellerSKU'];\n } else {\n return false;\n }\n }", "function dynamik_skins_check()\n{\n\tif( current_user_can( 'manage_options' ) )\n\t{\n\t\tif( !empty( $_GET['fct'] ) )\n\t\t{\n\t\t\tswitch( $_GET['fct'] )\n\t\t\t{\n\t\t\t\tcase 'delete_skin':\n\t\t\t\tdynamik_delete_skin();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'activate_skin':\n\t\t\t\tdynamik_activate_skin();\n\t\t\t\tbreak;\n\t\n\t\t\t\tcase 'restore_skin':\n\t\t\t\tdynamik_restore_skin();\n\t\t\t\tbreak;\n\t\n\t\t\t\tcase 'snapshot_skin':\n\t\t\t\tdynamik_snapshot_skin();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}", "protected function Reserve()\n {\n }", "public function start()\n {\n die(\"Must override this function in a driver\");\n }", "public function getSellerSKU() \n {\n return $this->_fields['SellerSKU']['FieldValue'];\n }", "public static function getCustomsku($product_id)\n {\n $custom_sku = 'ced-'.$product_id;\n return $custom_sku;\n }", "function makeOffer()\r\n {\r\n \r\n }", "function dynamik_activate_skin()\n{\n\tglobal $skin_message;\n\t$dynamik_gen_skin_options = get_option( 'dynamik_gen_skin_options' );\n\t$skin_name = $_GET['skinname'];\n\n\tdynamik_skin_images_cleanup();\n\tdynamik_skin_options_update( $dynamik_gen_skin_options['active_skin'] );\n\n\tforeach( $dynamik_gen_skin_options['available_skins'] as $available_skin => $value )\n\t{\n\t\tif( false != dynamik_skins_folder_scan( $value ) && $value == $skin_name )\n\t\t{\n\t\t\t$dynamik_gen_skin_options['active_skin'] = $skin_name;\n\t\t\tupdate_option( 'dynamik_gen_skin_options', $dynamik_gen_skin_options );\n\t\t\t$active_dynamik_skin_options = get_option( 'dynamik_gen_' . $skin_name . '_skin' );\n\t\t\tupdate_option( 'dynamik_gen_design_options', $active_dynamik_skin_options['design_options'] );\n\t\t\t$responsive_options = $active_dynamik_skin_options['responsive_options'];\n\t\t\t/* Vertical Toggle Shortcode Option Check */\n\t\t\tif( !isset( $active_dynamik_skin_options['responsive_options']['vertical_toggle_button_shortcodes'] ) )\n\t\t\t{\n\t\t\t\t$vertical_toggle_shortcode_defaults = array(\n\t\t\t\t\t'vertical_toggle_button_shortcodes' => '[dynamik_toggle_menu_1_text] [dynamik_toggle_menu_icon] ',\n\t\t\t\t\t'vertical_toggle_button_subnav_shortcodes' => '[dynamik_toggle_menu_2_text] [dynamik_toggle_menu_icon] '\n\t\t\t\t);\n\t\t\t\t$responsive_options = array_merge( $active_dynamik_skin_options['responsive_options'], $vertical_toggle_shortcode_defaults );\n\t\t\t}\n\t\t\tupdate_option( 'dynamik_gen_responsive_options', $responsive_options );\n\t\t}\n\t}\n\n\tif( is_dir( dynamik_get_skins_folder_path() . '/' . $skin_name . '/images' ) )\n\t{\n\t\t$handle = opendir( dynamik_get_skins_folder_path() . '/' . $skin_name . '/images' );\n\t\twhile( false !== ( $file = readdir( $handle ) ) )\n\t\t{\n\t\t\t$ext = strtolower( substr( strrchr( $file, '.' ), 1 ) );\n\t\t\tif( $ext == 'jpg' || $ext == 'jpeg' || $ext == 'gif' || $ext == 'png' )\n\t\t\t{\n\t\t\t\tcopy( dynamik_get_skins_folder_path() . '/' . $skin_name . '/images/' . $file, dynamik_get_stylesheet_location( 'path' ) . 'images' . '/' . $file );\n\t\t\t}\n\t\t}\n\t\tclosedir( $handle );\n\n\t\t$handle = opendir( dynamik_get_skins_folder_path() . '/' . $skin_name . '/images/adminthumbnails' );\n\t\twhile( false !== ( $file = readdir( $handle ) ) )\n\t\t{\n\t\t\t$ext = strtolower( substr( strrchr( $file, '.' ), 1 ) );\n\t\t\tif( $ext == 'jpg' || $ext == 'jpeg' || $ext == 'gif' || $ext == 'png' )\n\t\t\t{\n\t\t\t\tcopy( dynamik_get_skins_folder_path() . '/' . $skin_name . '/images/adminthumbnails/' . $file, dynamik_get_stylesheet_location( 'path' ) . 'images/adminthumbnails/' . $file );\n\t\t\t}\n\t\t}\n\t\tclosedir( $handle );\n\t}\n\n\tdynamik_write_files( $css = true, $ez = true, $custom = false );\n\n\t$skin_message = '<div class=\"notice-box\" style=\"margin:0 0 15px;\"><strong>' . __( 'Dynamik Skin Activated', 'dynamik' ) . '</strong></div>';\n}", "function Sivent2($args=array())\n {\n $unit=$this->GetGETint(\"Unit\");\n\n $args[ \"SessionsTable\" ]=$unit.\"__Sessions\";\n $args[ \"SavePath\" ]=\"?Unit=\".$unit.\"&Action=Start\";\n \n parent::Application($args);\n\n $event=$this->CGI_GETint(\"Event\");\n if (!empty($event))\n {\n $args=$this->CGI_Query2Hash($this->URL_CommonArgs); \n $args[ \"Event\" ]=$event;\n\n $add=\"Event=\".$event;\n if (!empty($this->URL_CommonArgs)) { $add=\"&\".$add; }\n \n $this->URL_CommonArgs.=$add;\n }\n\n $this->App_CSS_Add();\n }", "public function start() {\n\t\tif ( $this->in_progress() ) {\n\t\t\t$this->cancel( false );\n\t\t}\n\n\t\t$license = trim( get_option( 'ratesync_license_key' ) );\n\n\t\tif ( empty( $license ) ) {\n\t\t\t$this->add_error( __( 'A valid license key is required.', 'wc-ratesync' ) );\n\t\t}\n\n\t\tupdate_option( 'ratesync_sync_status', 'in_progress' );\n\t\tupdate_option( 'ratesync_last_sync', time() );\n\t\tupdate_option( 'ratesync_sync_queue', wc_rs_get_tax_states() );\n\t\t\n\t\t$this->trigger_import();\n\t}", "public function run()\n {\n $stock1 = new StockUnit();\n $stock1->label = 'piece';\n $stock1->relative_sku_to_sku = 1;\n $stock1->save();\n }", "public function sku()\n {\n return $this->belongsTo(Productos::class, 'fk_id_sku', 'id_sku');\n }", "public function getProductBySku($sku);", "public function processOrderExistingAccount($data, $payment_data, $sku)\n\t{\n\t\t$AID = $this->checkDomain();\n\t\t$TID = 1;\n\t\t$SID = '';\n\n\t\tif(Session::has('AID')){\n\t\t\t$AID = Session::get('AID');\n\t\t}\n\t\tif(Session::has('TID')){\n\t\t\t$TID = Session::get('TID');\n\t\t}\n\t\tif(Session::has('SID')){\n\t\t\t$SID = Session::get('SID');\n\t\t}\n\n\n\t\tswitch($sku){\n\t\t\tcase '521622':\n\t\t\tcase '521634':\n\t\t\t$orderType = 'minutes';\n\t\t\t\t$description = '5 Minute Package';\n\t\t\t\t$totalMinutes = '00:05:00';\n\t\t\t\tbreak;\n\t\t\tcase '521635':\n\t\t\t\t$orderType = 'minutes';\n\t\t\t\t$description = '3 Minute Package';\n\t\t\t\t$totalMinutes = '00:03:00';\n\t\t\t\tbreak;\n\t\t\tcase '521623':\n\t\t\t\t$orderType = 'minutes';\n\t\t\t\t$description = '10 Minute Package';\n\t\t\t\t$totalMinutes = '00:10:00';\n\t\t\t\tbreak;\n\t\t\tcase '521624':\n\t\t\t\t$orderType = 'minutes';\n\t\t\t\t$description = '15 Minute Package';\n\t\t\t\t$totalMinutes = '00:15:00';\n\t\t\t\tbreak;\n\t\t\tcase '521632':\n\t\t\t\t$orderType = 'transit3';\n\t\t\t\t$description = 'Future Forecast Report';\n\t\t\t\t$totalMinutes = '00:00:00';\n\t\t\t\tbreak;\n\t\t\tcase '521630':\n\t\t\t\t$orderType = 'natal';\n\t\t\t\t$description = 'Personal Map Report';\n\t\t\t\t$totalMinutes = '00:00:00';\n\t\t\t\tbreak;\n\t\t\tcase '521631':\n\t\t\t\t$orderType = 'relationship';\n\t\t\t\t$description = 'Romantic Report';\n\t\t\t\t$totalMinutes = '00:00:00';\n\t\t\t\tbreak;\n\t\t\tcase '521628':\n\t\t\t\t$orderType = 'downloadReport';\n\t\t\t\t$description = 'Download Report';\n\t\t\t\t$totalMinutes = '00:00:00';\n\t\t\t\tbreak;\n\t\t\tcase '521629':\n\t\t\t\t$orderType = 'emailReport';\n\t\t\t\t$description = 'Email Report';\n\t\t\t\t$totalMinutes = '00:00:00';\n\t\t\t\tbreak;\n\t\t\tcase '521626':\n\t\t\t\t$orderType = 'downloadChat';\n\t\t\t\t$description = 'Download Chat';\n\t\t\t\t$totalMinutes = '00:00:00';\n\t\t\t\tbreak;\n\t\t\tcase '521625':\n\t\t\t\t$orderType = 'emailChat';\n\t\t\t\t$description = 'Email Chat';\n\t\t\t\t$totalMinutes = '00:00:00';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$orderType = 'N/A';\n\t\t\t\t$description = 'N/A';\n\t\t\t\t$totalMinutes = '00:00:00';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$user = Auth::user();\n\t\t$pd = preg_replace('/\\s+/', ' ',$payment_data['card_name']);\n\n\t\t$paymentYear = substr($payment_data['card_year'], -2);\n\t\t$paymentInfo = explode(' ', $pd);\n\n\t\t$pfname = isset($paymentInfo[0]) ? $paymentInfo[0] : '';\n\t\t$plname = isset($paymentInfo[1]) ? $paymentInfo[1] : '';\n\n\t\t$xml = '<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">\n \t\t\t\t<soap12:Body>\n\t\t\t <ProcessOrder_ExistingAccount xmlns=\"http://www.livecosmos.com//\">\n\t\t\t <API_username>'.$this->API_username.'</API_username>\n\t\t\t\t<API_password>'.$this->API_password.'</API_password>\n\t\t\t <MemberID>'.$user->member_id.'</MemberID>\n\t\t\t <ATI_Order>\n\t\t\t <ShippingInfo>\n\t\t\t <FirstName>'.$data['first_name'].'</FirstName>\n\t\t\t <LastName>'.$data['last_name'].'</LastName>\n\t\t\t <Zip>'.trim($user->zip).'</Zip>\n\t\t\t <Country>USA</Country>\n\t\t\t <Email>'.$user->email.'</Email>\n\t\t\t </ShippingInfo>\n\t\t\t <BillingInfo>\n\t\t\t <BillingAddress>\n\t\t\t <FirstName>'.$pfname.'</FirstName>\n\t\t\t <LastName>'.$plname.'</LastName>\n\t\t\t <Zip>'.trim($payment_data['zip']).'</Zip>\n\t\t\t <Country>USA</Country>\n\t\t\t <Email>'.$user->email.'</Email>\n\t\t\t </BillingAddress>\n\t\t\t <CardNumber>'.trim($payment_data['card_number']).'</CardNumber>\n\t\t\t <CVV>'.trim($payment_data['card_cvv']).'</CVV>\n\t\t\t <ExpDate_MMYY>'.trim($payment_data['card_month'] . $paymentYear).'</ExpDate_MMYY>\n\t\t\t </BillingInfo>\n\t\t\t <CartItems>\n\t\t\t <ATI_CartItem>\n\t\t\t <ATI_Sku>'.$sku.'</ATI_Sku>\n\t\t\t <qty>1</qty>\n\t\t\t </ATI_CartItem>\n\t\t\t </CartItems>\n\t\t\t </ATI_Order>\n\t\t\t <PreviewOnlyFlag>false</PreviewOnlyFlag>\n\t\t\t <LeadID>0</LeadID>\n\t\t\t <AID>'.$AID.'</AID>\n\t\t\t\t\t<SID>'.$SID.'</SID>\n\t\t\t\t\t<TID>'.$TID.'</TID>\n\t\t\t <MemberIPAddress>'.$user->ip.'</MemberIPAddress>\n\t\t\t </ProcessOrder_ExistingAccount>\n\t\t\t </soap12:Body>\n\t\t\t </soap12:Envelope>';\n\n\n\t\t//Log::debug($xml);\n\n\t\t$array = $this->parseXMLToJson($xml);\n\n\t\tif (isset($array['ProcessOrder_ExistingAccountResponse']['ProcessOrder_ExistingAccountResult'])) {\n\t\t\tif (isset($array['ProcessOrder_ExistingAccountResponse']['ProcessOrder_ExistingAccountResult']['Result']['ErrorMessage'])) {\n\t\t\t\tif (count($array['ProcessOrder_ExistingAccountResponse']['ProcessOrder_ExistingAccountResult']['Result']['ErrorMessage']) == 0) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t\t'order_id' => $array['ProcessOrder_ExistingAccountResponse']['ProcessOrder_ExistingAccountResult']['OrderID'],\n\t\t\t\t\t\t\t'total' => $array['ProcessOrder_ExistingAccountResponse']['ProcessOrder_ExistingAccountResult']['Total'],\n\t\t\t\t\t\t\t'subtotal' => $array['ProcessOrder_ExistingAccountResponse']['ProcessOrder_ExistingAccountResult']['SubTotal'],\n\t\t\t\t\t\t\t'discount' => $array['ProcessOrder_ExistingAccountResponse']['ProcessOrder_ExistingAccountResult']['Discount'],\n\t\t\t\t\t\t\t'type'=>$orderType,\n\t\t\t\t\t\t\t'totalMinutes'=>$totalMinutes,\n\t\t\t\t\t\t\t'description' => $description,\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\treturn ['error' => $array['ProcessOrder_ExistingAccountResponse']['ProcessOrder_ExistingAccountResult']['Result']['ErrorMessage']];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function store(Request $request)\n {\n switch($request->seccion) {\n case 'ortopedia':\n $sku = 'ORTO' . $request->categoria_abr . $request->producto_abr . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->categoria . ' '. $request->producto . ' ' . $request->marca . ' ' . $request->modelo . ' ' . $request->talla . ' ' . $request->unidad . ' ' . $request->color;\n break;\n case 'micas':\n $sku = 'MICA' . $request->familia_abr . $request->materiales_abr . $request->tipo_abr . $request->tratamiento_abr . $request->color_abr;\n $desc = $request->familia . ' ' . $request->materiales . ' ' . $request->tipo . ' ' . $request->tratamiento . ' ' . $request->color;\n break;\n case 'armazones':\n $sku = 'ARMA' . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->marca . ' ' . $request->modelo . ' ' . $request->color . ' ' . $request->medidas . ' '. $request->unidad;\n break;\n case 'contacto':\n $sku = 'CONT' . $request->categoria_abr . ' ' . $request->tipo_abr . $request->marca_abr . $request->periodo_abr;\n $desc = $request->categoria . ' ' . $request->tipo . ' ' . $request->marca . ' ' . $request->periodo;\n break;\n case 'generales':\n $sku = 'GRAL' . $request->producto_abr . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->producto . ' ' . $request->marca . ' ' . $request->modelo . ' ' . $request->color;\n break;\n default:\n break;\n }\n $sku = str_replace(' ', '', $sku);\n $request['sku_interno'] = $sku;\n $request['descripcion'] = $desc;\n $producto = Producto::create($request->all());\n $aux1 = $request->foto1 ? (Storage::putFileAs('productos/' . $request->seccion . '/' . $producto->id, $request->file('foto1'), 'foto1.jpg')) : null;\n $aux2 = $request->foto2 ? (Storage::putFileAs('productos/' . $request->seccion . '/' . $producto->id, $request->file('foto2'), 'foto2.jpg')) : null;\n $aux3 = $request->foto3 ? (Storage::putFileAs('productos/' . $request->seccion . '/' . $producto->id, $request->file('foto3'), 'foto3.jpg')) : null;\n $producto->foto1 = $aux1;\n $producto->foto2 = $aux2;\n $producto->foto3 = $aux3;\n $producto->save();\n $historial = new Historial(['tipo' => 'Alta de Producto', 'descripcion' => 'Producto registrado.']);\n $producto->historiales()->save($historial);\n return redirect()->route('productos.show', ['producto' => $producto]);\n }", "public function setSku($sku) {\n $this->_sku = $sku;\n return $this;\n }", "function display_sku_as_meta_data( $item, $order ) {\n\t\t\t$product = BEWPI_WC_Order_Compatibility::get_product( $order, $item );\n\t\t\t$sku = $product && BEWPI_WC_Product_Compatibility::get_prop( $product, 'sku' ) ? BEWPI_WC_Product_Compatibility::get_prop( $product, 'sku' ) : '-';\n\t\t\t?>\n\t\t\t<br>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<strong><?php esc_html_e( 'SKU:', 'woocommerce-pdf-invoices' ); ?></strong> <?php echo esc_html( $sku ); ?>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<?php\n\t\t}", "public function getMyPriceForSKU($request);", "function cmst_vendor_add() {\n\t\tglobal $conn;\n\n\t\t// Initialize table object\n\t\t$GLOBALS[\"mst_vendor\"] = new cmst_vendor();\n\n\t\t// Intialize page id (for backward compatibility)\n\t\tif (!defined(\"EW_PAGE_ID\"))\n\t\t\tdefine(\"EW_PAGE_ID\", 'add', TRUE);\n\n\t\t// Initialize table name (for backward compatibility)\n\t\tif (!defined(\"EW_TABLE_NAME\"))\n\t\t\tdefine(\"EW_TABLE_NAME\", 'mst_vendor', TRUE);\n\n\t\t// Open connection to the database\n\t\t$conn = ew_Connect();\n\t}", "abstract function start();", "public function setRecommendedSku(?string $value): void {\n $this->getBackingStore()->set('recommendedSku', $value);\n }", "public function addproducttopoAction() {\n $id = $this->getRequest()->getParam('id');\n $sku = $this->getRequest()->getParam('sku');\n $model = Mage::getModel('inventorypurchasing/purchaseorder_draftpo')->load($id);\n try {\n $productId = Mage::getModel('catalog/product')->getIdBySku($sku);\n if (!$productId) {\n throw new Exception($this->helper()->__('Not found sku: %s', \"<i>$sku</i>\"));\n }\n $model->addProduct($productId);\n Mage::getSingleton('vendors/session')->addSuccess(\n $this->helper()->__('Product %s has been added.', \"<i>$sku</i>\")\n );\n $this->_redirect('*/*/view', array('id' => $id));\n } catch (Exception $e) {\n Mage::getSingleton('vendors/session')->addError($this->helper()->__('There is error while adding product.'));\n Mage::getSingleton('vendors/session')->addError($e->getMessage());\n $this->_redirect('*/*/view', array('id' => $id));\n }\n }", "public function actionWalmartproductinventoryinfo()\n {\n $sku = false;\n $productdata = \"add sku on url like ?sku=product_sku\";\n if (isset($_GET['sku'])) {\n $sku = $_GET['sku'];\n }\n $merchant_id = MERCHANT_ID;\n $config = Data::getConfiguration($merchant_id);\n $walmartHelper = new Walmartapi($config['consumer_id'], $config['secret_key']);\n if ($sku) {\n $productdata = $walmartHelper->getInventory($sku);\n }\n\n print_r($productdata);\n die;\n }", "public function addItem(string $sku): bool;", "abstract public function start();", "abstract public function start();", "public function getSkuSuffix() : string\n {\n return $this->skuSuffix;\n }", "private function getExistingSku($sku)\n {\n return $this->_oldSku[strtolower($sku)];\n }", "function shoestrap_activate_license() {\n global $wp_version;\n\n $license = shoestrap_getVariable( 'shoestrap_license_key' );\n\n $api_params = array(\n 'edd_action' => 'activate_license',\n 'license' => $license,\n 'item_name' => urlencode( SHOESTRAP_THEME_NAME )\n );\n\n $response = wp_remote_get( add_query_arg( $api_params, SHOESTRAP_STORE_URL ), array( 'timeout' => 15, 'sslverify' => false ) );\n\n if ( is_wp_error( $response ) ) :\n return false;\n endif;\n\n $license_data = json_decode( wp_remote_retrieve_body( $response ) );\n}", "public function removeFromCart($username, $sku){\n $cartQuery = mysqli_fetch_array($this->connection->query(\"SELECT cart FROM users WHERE username = '$username'\"));\n $cart = $cartQuery['cart'];\n $currentInventoryQuant = mysqli_fetch_array($this->connection->query(\"SELECT quantity FROM items WHERE sku = '$sku'\"));\n\n //Add queries to update overall inventory\n $updatedInventory = $currentInventoryQuant[0] + $cart[$sku-1];\n $query = \"UPDATE items SET quantity = '$updatedInventory' WHERE sku = '$sku'\";\n $this->connection->query($query);\n\n //Send an updated query using the new cartQuery arrays\n $cart[$sku-1] = 0;\n $query = \"UPDATE users SET cart = '$cart' WHERE username = '$username'\";\n $this->connection->query($query);\n return true;\n }", "public static function prepareProduct($product, $sku_id = 0)\n {\n // Текущая валюта\n $current_cur = wa('shop')->getConfig()->getCurrency(false);\n // Основная валюта\n $primary_cur = wa('shop')->getConfig()->getCurrency(true);\n\n if ($sku_id) {\n $sku = (new shopProductSkusModel())->getById($sku_id);\n // Если переданные данные совпадают\n if ($sku && $sku['product_id'] == $product['id']) {\n $product_currency = !empty($product['unconverted_currency']) ? $product['unconverted_currency'] : $product['currency'];\n $currency_rounding = shopFlexdiscountHelper::getSettings('currency_rounding');\n\n // Вызываем хук frontend_products\n $skus = array($sku['id'] => $sku);\n $event_params = array(\"skus\" => &$skus);\n wa('shop')->event('frontend_products', $event_params);\n $sku = reset($skus);\n $sku['product'] = $product;\n $sku['sku_id'] = $sku['id'];\n $sku['id'] = $sku['product_id'];\n $sku['quantity'] = !empty($product['quantity']) ? $product['quantity'] : 1;\n // Переводим цены товара в текущую валюту\n $sku['price'] = isset($sku['old_price']) ? $sku['old_price'] : $sku['price'];\n $sku['price'] = shop_currency($sku['price'], $product_currency, $current_cur, false);\n $sku['compare_price'] = isset($sku['old_compare_price']) ? $sku['old_compare_price'] : $sku['compare_price'];\n $sku['compare_price'] = shop_currency($sku['compare_price'], $product_currency, $current_cur, false);\n $sku['purchase_price'] = shop_currency($sku['purchase_price'], $product_currency, $current_cur, false);\n if (!empty($currency_rounding)) {\n $sku['price'] = shopRounding::roundCurrency($sku['price'], $current_cur);\n $sku['compare_price'] = shopRounding::roundCurrency($sku['compare_price'], $current_cur);\n $sku['purchase_price'] = shopRounding::roundCurrency($sku['purchase_price'], $current_cur);\n }\n if ($sku['compare_price'] == $sku['price']) {\n $sku['compare_price'] = 0;\n }\n // Сохраняем услуги, если они имеются\n if (!empty($product['services'])) {\n $sku['services'] = $product['services'];\n }\n $product = $sku;\n }\n } else {\n // Переводим цены товара в текущую валюту\n $product['price'] = isset($product['old_price']) ? $product['old_price'] : $product['price'];\n $product['price'] = shop_currency($product['price'], isset($product['old_price']) ? $current_cur : $primary_cur, $current_cur, false);\n\n $product['compare_price'] = isset($product['old_compare_price']) ? $product['old_compare_price'] : $product['compare_price'];\n $product['compare_price'] = shop_currency($product['compare_price'], isset($product['old_compare_price']) ? $current_cur : $primary_cur, $current_cur, false);\n if ($product['compare_price'] == $product['price']) {\n $product['compare_price'] = 0;\n }\n if (isset($product['purchase_price'])) {\n $product['purchase_price'] = shop_currency($product['purchase_price'], $primary_cur, $current_cur, false);\n }\n if (!isset($product['unconverted_currency'])) {\n $product['unconverted_currency'] = $product['currency'];\n }\n }\n\n $product['type'] = 'product';\n $product['currency'] = $current_cur;\n\n return $product;\n }", "public function AddStock($SKU, $Qty) {\n\n\t\t$inventoryTable = 'Inventory';\n\t\t$productPiece = \" (SKU) VALUES ('\" . $this->SKU . \"')\";\n\t\t\n $piece2 = \"WHERE ProductSKU ='\" . $this->SKU . \"'\";\n\t}", "public function startAction() \n {\n $this->helper()->log(\n 'Session : ' . $this->getSessionID() . ' Starting sezzle payment',\n Zend_Log::DEBUG\n );\n try {\n $params = Mage::app()->getRequest()->getParams();\n if ($params) {\n $this->_saveCart($params);\n }\n\n // Check with security updated on form key\n if (!$this->_validateFormKey()) {\n $frontendFormKey = Mage::app()->getRequest()->getParam('form_key');\n $sessionFormKey = Mage::getSingleton('core/session')->getFormKey();\n\n $this->helper()->log(\n 'Session : ' . $this->getSessionID() . ' Detected fraud. Front-End Key:' . $frontendFormKey . ' Session Key:' . $sessionFormKey,\n Zend_Log::ERR\n );\n\n Mage::throwException(Mage::helper('sezzle_sezzlepay')->__('Detected fraud.'));\n return;\n }\n\n $this->_initCheckout();\n\n if ($this->_getQuote()->getIsMultiShipping()) {\n $this->helper()->log(\n 'Session : ' . $this->getSessionID() . ' Sezzle payment is not supported for this checkout',\n Zend_Log::DEBUG\n );\n Mage::throwException(\n Mage::helper('sezzle_sezzlepay')->__('Sezzle payment is not supported for this checkout.')\n );\n }\n\n $this->userProcessing($this->_quote, $this->getRequest());\n\n // Check if customer has to be logged in to process to checkout\n $quoteCheckoutMethod = $this->_getQuote()->getCheckoutMethod();\n if ($quoteCheckoutMethod == Mage_Checkout_Model_Type_Onepage::METHOD_GUEST &&\n !Mage::helper('checkout')->isAllowedGuestCheckout(\n $this->_getQuote(),\n $this->_getQuote()->getStoreId()\n )) {\n $this->helper()->log(\n 'Session : ' . $this->getSessionID() . ' Guest checkout not allowed in this website. Redirecting to login.',\n Zend_Log::DEBUG\n );\n Mage::getSingleton('core/session')->addNotice(\n Mage::helper('sezzle_sezzlepay')->__('To proceed to Checkout, please log in using your email address.')\n );\n $this->redirectLogin();\n Mage::getSingleton('customer/session')\n ->setBeforeAuthUrl(Mage::getUrl('*/*/*', array('_current' => true)));\n return;\n }\n\n // Utilise Magento Session to preserve Store Credit details\n if (Mage::getEdition() == Mage::EDITION_ENTERPRISE) {\n $this->helper()->log(\n 'Session : ' . $this->getSessionID() . ' Store is enterprise edition.',\n Zend_Log::DEBUG\n );\n $this->_quote = $this->helper()->storeCreditSessionSet($this->_quote);\n $this->_quote = $this->helper()->giftCardsSessionSet($this->_quote);\n $this->helper()->log(\n 'Session : ' . $this->getSessionID() . ' Set credit and card session.',\n Zend_Log::DEBUG\n );\n }\n\n $redirectUrl = Mage::getModel('sezzle_sezzlepay/PaymentMethod')->start($this->_quote);\n $response = array(\n 'success' => true,\n 'redirect' => $redirectUrl,\n );\n } catch (Exception $e) {\n // Debug log\n if (empty($this->_quote)) {\n $this->helper()->log(\n $this->__(\n 'Session : ' . $this->getSessionID() . ' Error occur during process, Quote not found. %s.', $e->getMessage(),\n Zend_Log::ERR\n )\n );\n } else {\n $this->helper()->log(\n $this->__(\n 'Session : ' . $this->getSessionID() . ' Error occur during process. %s. QuoteID=%s', $e->getMessage(), $this->_quote->getId()\n ), Zend_Log::ERR\n );\n }\n\n // Adding error for redirect and JSON\n $message = Mage::helper('sezzle_sezzlepay')->__('There was an error processing your order. %s', $e->getMessage());\n\n $this->_getCheckoutSession()->addError($message);\n\n // Response to the\n $response = array(\n 'success' => false,\n 'message' => $message,\n 'redirect' => Mage::getUrl('checkout/cart'),\n );\n }\n\n $this->getResponse()\n ->setHeader('Content-type', 'application/json')\n ->setBody(json_encode($response));\n }", "public function getSku() {\n return $this->item->getSku();\n }", "public function getUniqueKey()\n\t{\n\t\t$product = $this->getCurrent();\n\t\t\n\t\tif (is_null($product)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$sku = $product->getSku();\n\t\tMage::log(\"Got SKU: $sku\");\n\t\t\n\t\treturn $sku;\n\t}", "public function getSkusInfo($skus, $showInactive = false, $filters = false)\n\t{\n\t\t$sqlIn = '(0';\n\t\tif (is_array($skus) || is_object($skus))\n\t\t{\n\t\t\tforeach ($skus as $sId)\n\t\t\t{\n\t\t\t\t$sqlIn .= ', ' . $sId;\n\t\t\t}\n\t\t}\n\t\t$sqlIn .= ')';\n\n\t\t// Get only results for existing SKUs and existing products associated with each SKU\n\t\t$sql = \"SELECT p.*, s.*, o.`oId`, o.`oName`, m.`smKey`, m.`smValue` FROM `#__storefront_skus` s\n\t\t\t\tLEFT JOIN `#__storefront_products` p ON s.`pId` = p.`pId`\n\t\t\t\tLEFT JOIN `#__storefront_sku_options` so ON so.`sId` = s.`sId`\n\t\t\t\tLEFT JOIN `#__storefront_options` o ON o.`oId` = so.`oId`\n\t\t\t\tLEFT JOIN `#__storefront_sku_meta` m ON s.`sId` = m.`sId`\n\t\t\t\tWHERE\n\t\t\t\ts.`sId` IN {$sqlIn}\n\t\t\t\tAND p.`pId` IS NOT NULL \";\n\t\tif (!$showInactive)\n\t\t{\n\t\t\t$sql .= \"\n\t\t\t\tAND p.`pActive` = 1\n\t\t\t\tAND s.`sActive` = 1 \";\n\n\t\t\t// check publish up and down\n\t\t\t$sql .= \" AND (p.`publish_up` IS NULL OR p.`publish_up` <= NOW())\";\n\t\t\t$sql .= \" AND (p.`publish_down` IS NULL OR p.`publish_down` = '0000-00-00 00:00:00' OR p.`publish_down` > NOW())\";\n\n\t\t\t$sql .= \" AND (s.`publish_up` IS NULL OR s.`publish_up` <= NOW())\";\n\t\t\t$sql .= \" AND (s.`publish_down` IS NULL OR s.`publish_down` = '0000-00-00 00:00:00' OR s.`publish_down` > NOW())\";\n\t\t}\n\n\t\t// Filter by filters\n\t\tif (isset($filters['sort']))\n\t\t{\n\t\t\tif ($filters['sort'] == 'title')\n\t\t\t{\n\t\t\t\t$filters['sort'] = 'sSku';\n\t\t\t}\n\t\t\telseif ($filters['sort'] == 'state')\n\t\t\t{\n\t\t\t\t$filters['sort'] = 'sActive';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$filters['sort'] = 'sSku';\n\t\t\t}\n\n\t\t\t$sql .= \" ORDER BY \" . $filters['sort'];\n\n\t\t\tif (isset($filters['sort_Dir']))\n\t\t\t{\n\t\t\t\t$sql .= ' ' . $filters['sort_Dir'];\n\t\t\t}\n\n\t\t\t$sql .= \", `sId`\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql .= \" ORDER BY s.`sId`\";\n\t\t}\n\n\t\t$this->_db->setQuery($sql);\n\t\t$this->_db->execute();\n\n\t\t$rawSkusInfo = $this->_db->loadObjectList();\n\n\t\t/*\n\t\t\tParse the result and organize it by SKU (since same SKU can be returned several times, depending on the number of options):\n\n\t\t\t$skusInfo => Array(\n\t\t\t\t[sId] => Array(\n\t\t\t\t\t[info] => Object\n\t\t\t\t\t[options] => Array(\n\t\t\t\t\t\t[oId] => Option name\n\t\t\t\t\t\t...\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t*/\n\n\t\t$skusInfo = array();\n\t\t$skuoptions = array();\n\t\t$skuMeta = array();\n\t\t$currentSku = false;\n\t\tforeach ($rawSkusInfo as $row)\n\t\t{\n\t\t\tif ($currentSku != $row->sId)\n\t\t\t{\n\t\t\t\t$skusInfo[$row->sId]['info'] = $row;\n\t\t\t\tif ($currentSku && !empty($skuoptions))\n\t\t\t\t{\n\t\t\t\t\t$skusInfo[$currentSku]['options'] = $skuoptions;\n\t\t\t\t}\n\t\t\t\tif ($currentSku && !empty($skuMeta))\n\t\t\t\t{\n\t\t\t\t\t$skusInfo[$currentSku]['meta'] = $skuMeta;\n\t\t\t\t}\n\t\t\t\t$currentSku = $row->sId;\n\t\t\t\t$skuoptions = array();\n\t\t\t\t$skuMeta = array();\n\t\t\t}\n\n\t\t\t// Fix the NULL price\n\t\t\tif ($row->sPrice == '')\n\t\t\t{\n\t\t\t\t$row->sPrice = 0;\n\t\t\t}\n\n\t\t\tif (!empty($row->oName))\n\t\t\t{\n\t\t\t\t$skuoptions[$row->oId] = $row->oName;\n\t\t\t}\n\n\t\t\tif (!empty($row->smKey) && !empty($row->smValue))\n\t\t\t{\n\t\t\t\t$skuMeta[$row->smKey] = $row->smValue;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($skuoptions))\n\t\t{\n\t\t\t$skusInfo[$currentSku]['options'] = $skuoptions;\n\t\t}\n\t\tif (!empty($skuMeta))\n\t\t{\n\t\t\t$skusInfo[$currentSku]['meta'] = $skuMeta;\n\t\t}\n\n\t\t//print_r($skusInfo); die();\n\t\treturn $skusInfo;\n\t}", "function _checkIfSkuExists($sku, $connection_read){ \n $sql = \"SELECT COUNT(*) AS count_no FROM catalog_product_entity WHERE sku = ?\";\n $count = $connection_read->fetchOne($sql, array($sku));\n if($count > 0){\n return true;\n }else{\n return false;\n }\n}", "function SkuFromID($parametro){\n\t$db = new mysql();\n\t\n\t$result = $db->consulta(\"SELECT IDPRODUCTO,FECHA FROM \".PREFIX.\"productos WHERE IDPRODUCTO='\".$parametro.\"' LIMIT 1\");\n\t$row = $db->recuperar_array($result);\t\n\t$sku = $row['PRESKU'].$parametro;\n\treturn $sku;\n}", "public function start_harvest(){\n $this->checkinit();\n $this->harvest_laststart = $this->dt();\n $this->save_flags();\n }", "public function actionWu()\n {\n $service = $this->getService(Payment::WU_ID);\n\n Yii::$app->test->show($service->getInfoView());\n }", "abstract protected function edu_up();", "public function getSKUPartsData() {\n $partsData = DB::table('part_number')->select('SKU', 'id')->get();\n $sku = '';\n $sku .=\"<option value='\" . '' . \"' selected='selected' > select sku</option>\";\n foreach ($partsData as $key => $value) {\n $sku .=\"<option value='\" . $value->id . \"'>\" . $value->SKU . \"</option>\";\n }\n return $sku;\n }", "private function getProductQuery(string $sku): string\n {\n return <<<QUERY\n{\n products(search: \"{$sku}\") {\n items {\n sku\n ... on BundleProduct {\n items {\n sku\n option_id\n uid\n required\n type\n title\n options {\n uid\n label\n product {\n sku\n }\n can_change_quantity\n id\n uid\n price\n quantity\n }\n }\n }\n }\n }\n}\nQUERY;\n }", "function initSpCost(){\r\n\t$SP_Cost = 0;\r\n}", "protected function _initSkus()\n {\n $this->skuProcessor->setTypeModels($this->_productTypeModels);\n $this->_oldSku = $this->skuProcessor->reloadOldSkus()->getOldSkus();\n return $this;\n }", "public function findProduct(\r\n $sku\r\n, $name = null\r\n, $skuMatchMode = 'IGNORE_DASH'\r\n, $baseSkuSearchFlag = true\r\n) { \r\n global $baseSkuAttributeId;\r\n\t$sku = str_replace('\\'', '', $sku);\r\n\t$sku = str_replace('\\\\', '', $sku);\r\n\t$sku = trim($sku, '()');\r\n\t$resource = Mage::getSingleton('core/resource');\r\n\t$readConnection = $resource->getConnection('core_read');\r\n\t$table = $resource->getTableName('catalog/product');\r\n $findResult = array('search_mask' => null, 'product_data' => array(), \r\n 'no_base_sku_count' => 0, 'base_sku_count' => 0\r\n );\r\n\t// try to match words\r\n\tif (strlen($sku) >=4) { \r\n if ($skuMatchMode == 'LEFT') { \r\n $findResult['search_mask'] = \" \" . $sku . \" %\";\r\n $searchExpression = \"concat(' ', sku, ' ') like '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'LEFT_IGNORE_DASH') { \r\n $findResult['search_mask'] = str_replace('-', ' ', \" \" . $sku . \" %\");\r\n $searchExpression = \"concat(' ', replace(sku, '-', ' '), ' ') like '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'EXACT') { \r\n $findResult['search_mask'] = $sku;\r\n $searchExpression = \"sku = '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'IGNORE_DASH') { \r\n $findResult['search_mask'] = str_replace('-', ' ', $sku);\r\n $searchExpression = \"replace(sku, '-', ' ') = '\" . $findResult['search_mask'] . \"'\";\r\n } else {\r\n throw new Exception('Uknown skuMatchMode: \"' . $skuMatchMode . '\"');\r\n } \r\n $findResult['product_data'] = $readConnection->fetchAll(\r\n \"select entity_id as product_id, sku \r\n from \" . $table . \" p\r\n where \r\n -- website SKU is at the beginning\r\n \" . $searchExpression\r\n );\r\n if ($baseSkuSearchFlag) { \r\n // add base sku search\r\n if (!isset($baseSkuAttributeId)) {\r\n $baseSkuAttributeId = $readConnection->fetchOne(\r\n \"select attribute_id from eav_attribute where attribute_code = 'base_sku'\"\r\n );\r\n } \r\n $baseSkuResult = \r\n $readConnection->fetchAll( \r\n \"select \r\n entity_id as product_id\r\n , (select sku from catalog_product_entity p where p.entity_id = v.entity_id) as sku\r\n , value as base_sku\r\n from\r\n catalog_product_entity_varchar v\r\n where \r\n -- source sku is like (contains) base sku\r\n -- replace dashes with spaces\r\n ' \" . str_replace('-', ' ', $sku) . \" ' \r\n like concat('% ', replace(value, '-', ' '), ' %')\r\n and v.attribute_id = \" . $baseSkuAttributeId \r\n );\r\n $findResult['no_base_sku_count'] = count($findResult['product_data']); \r\n if (count($baseSkuResult) > 0) {\r\n $findResult['base_sku_count'] = count($baseSkuResult);\r\n $findResult['product_data'] = array_merge($findResult['product_data'], $baseSkuResult);\r\n $findResult['search_mask'] = $findResult['search_mask'] . \" && base_sku\";\r\n $this->logMessage('baseSkuResult: count=' . count($baseSkuResult));\r\n }\r\n }\r\n\t}\t\r\n\tif (!empty($name) && count($findResult['product_data']) == 0) { \r\n\t $words = explode(' ', strtr(trim($name), '-:', ' '));\r\n\t foreach ($words as $word) { \r\n\t\t$findResult = findProduct($word, null, $skuMatchMode, $baseSkuSearchFlag);\r\n\t\t// For name words allow only one match\r\n\t\tif (count($findResult['product_data']) == 1) { \r\n\t\t return $findResult;\r\n\t\t} \r\n\t } \r\n\t} \r\n\treturn $findResult;\r\n}", "public function kaufen(){\n\t\t\t$shopping_cart = array(\n\t\t\t'id' => $_POST['id'],\n\t\t\t'product_name' => $_POST['product_name'],\n\t\t\t'price' => $_POST['price']\n\t\t\t);\n\n\t\t//put the product information into the session\n\t\t\t$this->session->set_userdata($shopping_cart);\n\n\t\t//load the page where you buy your products via Stripe\n\t\tredirect(base_url('buy'));\n\t}" ]
[ "0.66697866", "0.6255671", "0.59873074", "0.57983744", "0.5670071", "0.56231505", "0.5606088", "0.5541013", "0.5502858", "0.5484087", "0.5484087", "0.54610896", "0.541938", "0.5357097", "0.5330703", "0.531216", "0.52789634", "0.5259147", "0.52298397", "0.5221661", "0.5214289", "0.5187903", "0.51797926", "0.51738185", "0.51720715", "0.5155235", "0.51331574", "0.51213646", "0.50871193", "0.5075432", "0.50633425", "0.50423515", "0.50422966", "0.5037458", "0.5017785", "0.4992181", "0.49885195", "0.4986924", "0.49814445", "0.49514398", "0.49478847", "0.49331695", "0.4916651", "0.49155584", "0.49125782", "0.49115098", "0.49076143", "0.49021658", "0.48863578", "0.4874578", "0.4853061", "0.48419148", "0.48416886", "0.48357365", "0.48031548", "0.47972023", "0.47861665", "0.47810003", "0.47800028", "0.47797546", "0.4772258", "0.47702676", "0.47635168", "0.47597426", "0.4759011", "0.47529098", "0.47525254", "0.4738953", "0.47342014", "0.47296226", "0.4728297", "0.472204", "0.47132048", "0.47028518", "0.470274", "0.47018805", "0.47017974", "0.46961808", "0.46927914", "0.46927914", "0.46924353", "0.4691724", "0.46913034", "0.46887702", "0.4687549", "0.46793932", "0.46772686", "0.46769443", "0.46724218", "0.4664101", "0.4663082", "0.46620047", "0.4657115", "0.46552646", "0.46502063", "0.46445704", "0.46362472", "0.4633855", "0.46242645", "0.4617152", "0.46133068" ]
0.0
-1
/ DBHouse SKU Mapping
public function getDBHouseID ( $product_line_id ) { $this->db->select( 'dbhouse_id' ); $this->db->from( 'tbli_dbhouse_product_line_mapping' ); $this->db->where( 'product_line_id', $product_line_id ); $query = $this->db->get()->result_array(); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProductSKU()\n {\n }", "protected function getPrimaryKeyColumnName()\n {\n return ColumnKeys::SKU;\n }", "public function getSku();", "public function getSku();", "public function getSKUPartsData() {\n $partsData = DB::table('part_number')->select('SKU', 'id')->get();\n $sku = '';\n $sku .=\"<option value='\" . '' . \"' selected='selected' > select sku</option>\";\n foreach ($partsData as $key => $value) {\n $sku .=\"<option value='\" . $value->id . \"'>\" . $value->SKU . \"</option>\";\n }\n return $sku;\n }", "function generateSku(){\n\t\t$characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$sku = mt_rand(10000, 99999) . mt_rand(10000, 99999) . $characters[mt_rand(0, strlen($characters) - 1)];\n\t\treturn str_shuffle($sku);\n\t}", "public function getProductSKUQuantityMap() {\n $output = array();\n $products = $this->getFieldItems('commerce_product');\n $quantity = $this->getEntity()->quantity;\n\n $product_ids = array();\n foreach ($products as $product) {\n $product_ids[] = $product['product_id'];\n }\n\n $commerce_products = commerce_product_load_multiple($product_ids);\n\n foreach ($commerce_products as $product_id => $product) {\n $sku = $product->sku;\n if (array_key_exists($sku, $output)) {\n $output[$sku] += $quantity;\n }\n else {\n $output[$sku] = $quantity;\n }\n }\n\n return $output;\n }", "public function generateProductSKU()\n {\n return $this->skuString . int_random();\n }", "public function setSku($sku);", "public function sku()\n {\n return $this->belongsTo(Productos::class, 'fk_id_sku', 'id_sku');\n }", "public function getSKU()\n {\n return $this->sKU;\n }", "public function getItemSku();", "public function generatesku()\n {\n $newsku = 111111;\n //We need to generate a random sku number that does not already exist\n $exists = true;\n $newsku = mt_rand(100000,999999);\n do {\n $product = $this->Product->findBysku($newsku);\n if(empty($product))\n $exists = false;\n } while($exists);\n return $newsku;\n }", "protected function addSkuPkMapping(array $product)\n {\n $this->addSkuEntityIdMapping($product[MemberNames::SKU], $product[MemberNames::ENTITY_ID]);\n }", "public function getProductBySku($sku);", "function getVendorMapping($iUserID)\r\n {\r\n $aVendorMapping = array();\r\n $sSQL = \"SELECT \".vendor_orig.\",\".vendor_preferred.\" FROM \".vendor_mapping.\" WHERE \".user_id.\"=\".sFix($iUserID);\r\n $pData = mysql_query($sSQL);\r\n if (!mysql_error())\r\n {\r\n while ($pRow = mysql_fetch_array($pData))\r\n {\r\n $aVendorMapping[$pRow[vendor_orig]] = $pRow[vendor_preferred];\r\n }\r\n }\r\n return $aVendorMapping;\r\n }", "public function check_correct_sku_mapping($batch_id, $using_master_sku=false);", "function SkuFromID($parametro){\n\t$db = new mysql();\n\t\n\t$result = $db->consulta(\"SELECT IDPRODUCTO,FECHA FROM \".PREFIX.\"productos WHERE IDPRODUCTO='\".$parametro.\"' LIMIT 1\");\n\t$row = $db->recuperar_array($result);\t\n\t$sku = $row['PRESKU'].$parametro;\n\treturn $sku;\n}", "public function skus()\n {\n return $this->hasMany('App\\Models\\Sku');\n }", "public function hydrate_skus_form()\n {\n // Get entity manager\n $em = EntityManagerSingleton::getInstance();\n\n // Get product options\n $sku_info = [];\n $options = $em->getRepository('Library\\Model\\Product\\Option')->findByProduct($this->product_id);\n\n $sku_info['product_options'] = $options;\n\n // Get skus\n $sku_info['skus'] = $this->product->getSkus();\n\n // Get status options\n $sku_info['status_options'] = $this->status_options;\n\n return $sku_info;\n }", "private function prepareNewSkuData($sku)\n {\n $data = [];\n foreach ($this->getExistingSku($sku) as $key => $value) {\n $data[$key] = $value;\n }\n\n $data['attr_set_code'] = $this->_attrSetIdToName[$this->getExistingSku($sku)['attr_set_id']];\n\n return $data;\n }", "public function getSku()\n {\n return $this->sku;\n }", "public function getSkuId()\n {\n return $this->skuId;\n }", "public function getSKU()\n {\n return $this->getValue('nb_catalog_item_lang_sku');\n }", "public function getSkuName ()\n {\n $sql = \" SELECT t1.id,sku_name,sku_description,sku_code,sku_weight_id,sku_lpc,sku_volume,sku_launch_date,t8.sku_type_name,\n GROUP_CONCAT(t5.unit_name SEPARATOR '<br /><br />') AS unit,t2.quantity,\n GROUP_CONCAT(ROUND(t2.db_lifting_price,2) SEPARATOR '<br /><br />') as db_lifting_price ,\n GROUP_CONCAT(ROUND(t2.outlet_lifting_price,2) SEPARATOR '<br /><br />') AS outlet_lifting_price,\n GROUP_CONCAT(ROUND(t2.mrp_lifting_price,2) SEPARATOR '<br /><br /> ') AS mrp_lifting_price ,\n t3.element_name,t4.sku_active_status_name,t5.unit_name,t6.element_name as product,\n t7.element_name as catagory\n FROM tbld_sku AS t1\n INNER JOIN\n `tbli_sku_mou_price_mapping` AS t2\n ON t1.id = t2.sku_id\n INNER JOIN\n tbld_sku_active_status AS t4\n ON t1.sku_active_status_id = t4.id\n INNER JOIN\n tbld_sku_hierarchy_elements AS t3\n ON t1.parent_id = t3.id\n INNER JOIN\n tbld_unit AS t5\n ON t5.id= t2.mou_id\n left join tbld_sku_hierarchy_elements as t6\n on t6.id = t3.parent_element_id\n left join tbld_sku_hierarchy_elements as t7\n on t7.id = t6.parent_element_id\n left Join `tbld_sku_type` as t8\n On t1.sku_type_id=t8.id\n GROUP BY t2.sku_id\n ORDER BY t2.sku_id,t2.quantity asc\";\n $query = $this->db->query( $sql )->result_array();\n return $query;\n }", "function get_products_array( $sku ) {\n global $wpdb;\n $sku = implode(',' , $sku);\n $products = $wpdb->get_results( \"SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value IN ({$sku}) \");\n if ( $products ) return $products;\n return null;\n}", "public function generateSku()\n {\n $number=mt_rand(1000,9999);\n if($this->checkSku($number)){\n return $this->generateSku();\n }\n return (string)$number;\n }", "public function getSkuId(): int\n {\n return $this->skuId;\n }", "public function generateSKU()\n {\n $number=mt_rand(1000,999999);\n if ($this->checkSKU($number)){\n return $this->generateSKU();\n }\n return (string)$number;\n }", "function addVendorMapping($sVendorOrig, $sVendorPreferred, $iUserID)\r\n {\r\n $sSQL = \"INSERT INTO \".vendor_mapping.\" VALUES (\".sFix($iUserID).\", \".sFix($sVendorOrig).\", \".sFix($sVendorPreferred).\")\";\r\n $pData = mysql_query($sSQL);\r\n if (!mysql_error())\r\n {\r\n return TRUE;\r\n }\r\n else\r\n {\r\n return FALSE;\r\n }\r\n }", "public function addsku_packaging ( $data )\n {\n return $this->db->insert( 'tbli_sku_mou_price_mapping', $data );\n }", "public function getSku()\n {\n return 'Tomato';\n }", "public function testGetSku()\n {\n $data_from_collection = $this->data['annual_collection'];\n $this->assertEquals(\n $data_from_collection['attributes']['plan_sku'],\n $this->makePlan($data_from_collection)->getSku()\n );\n\n $data_from_site = $this->data['annual_site'];\n $this->assertEquals($data_from_site['sku'], $this->makePlan($data_from_site)->getSku());\n }", "public function setSKU($sku) {\r\n $this->_data['SKU'] = $sku;\r\n return $this;\r\n }", "private function changesku(){\t \r\n\t $this->chartValue(); //adding to output\r\n\t $this->idleStHealthChk(); //adding to output\r\n\t}", "public function getList($sku);", "public function mapSku($pId, $options, $throwExceptionOnNomatch = true)\n\t{\n\t\t// Find the number of options required for this product\n\t\t$sql = \"SELECT COUNT(pog.`ogId`) AS cnt FROM `#__storefront_product_option_groups` pog WHERE pog.`pId` = '{$pId}'\";\n\n\t\t/*\n\t\t$sql = \"SELECT COUNT(s.`sId`) AS cnt FROM `#__storefront_skus` s\n\t\t\t\tINNER JOIN `#__storefront_sku_options` so ON s.`sId` = so.`sId`\n\t\t\t\tWHERE s.`pId` = '{$pId}' AND s.`sActive` > 0\n\t\t\t\tGROUP BY s.`sId` ORDER BY cnt DESC LIMIT 1\";\n\t\t*/\n\t\t$this->_db->setQuery($sql);\n\t\t$this->_db->execute();\n\n\t\tif ($this->_db->getNumRows() < 1)\n\t\t{\n\t\t\t$totalOptionsRequired = 0;\n\t\t}\n\t\telse {\n\t\t\t$totalOptionsRequired = $this->_db->loadResult();\n\t\t}\n\n\t\tif (!empty($options) && $totalOptionsRequired > count($options))\n\t\t{\n\t\t\tthrow new \\Exception(Lang::txt('COM_STOREFRONT_NOT_ENOUGH_OPTIONS'));\n\t\t}\n\n\t\t// find if there is a SKU match\n\t\tif (!empty($options))\n\t\t{\n\t\t\t$skuOptionsSql = '(0';\n\t\t\tforeach ($options as $oId)\n\t\t\t{\n\t\t\t\t$skuOptionsSql .= \" OR so.`oId` = '{$oId}'\";\n\t\t\t}\n\t\t\t$skuOptionsSql .= ')';\n\t\t}\n\n\t\t$sql = \"SELECT s.`sId`, COUNT(so.`oId`) AS matches FROM `#__storefront_skus` s\n\t\t\t\tLEFT JOIN `#__storefront_sku_options` so ON s.`sId` = so.`sId`\n\t\t\t\tWHERE s.`pId` = '{$pId}' AND s.sActive > 0\";\n\t\tif (!empty($options))\n\t\t{\n\t\t\t$sql .= \" AND {$skuOptionsSql}\";\n\t\t}\n\t\t$sql .= \" GROUP BY s.`sId` HAVING matches = {$totalOptionsRequired}\";\n\n\t\t$this->_db->setQuery($sql);\n\t\t$sId = $this->_db->loadObject();\n\n\t\tif ($sId)\n\t\t{\n\t\t\treturn $sId->sId;\n\t\t}\n\n\t\t// no match\n\t\tif ($throwExceptionOnNomatch)\n\t\t{\n\t\t\tthrow new \\Exception(Lang::txt('COM_STOREFRONT_SKU_NOT_FOUND'));\n\t\t}\n\t\treturn false;\n\t}", "public function getUniqueKey()\n\t{\n\t\t$product = $this->getCurrent();\n\t\t\n\t\tif (is_null($product)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$sku = $product->getSku();\n\t\tMage::log(\"Got SKU: $sku\");\n\t\t\n\t\treturn $sku;\n\t}", "function getSkus() {\n\techo \"Getting Skus </br>\";\n\t$response = getRequest('/api/sku');\n\tprintInfo($response);\n}", "function display_sku_as_meta_data( $item, $order ) {\n\t\t\t$product = BEWPI_WC_Order_Compatibility::get_product( $order, $item );\n\t\t\t$sku = $product && BEWPI_WC_Product_Compatibility::get_prop( $product, 'sku' ) ? BEWPI_WC_Product_Compatibility::get_prop( $product, 'sku' ) : '-';\n\t\t\t?>\n\t\t\t<br>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<strong><?php esc_html_e( 'SKU:', 'woocommerce-pdf-invoices' ); ?></strong> <?php echo esc_html( $sku ); ?>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<?php\n\t\t}", "private function getProductQuery(string $sku): string\n {\n return <<<QUERY\n{\n products(search: \"{$sku}\") {\n items {\n sku\n ... on BundleProduct {\n items {\n sku\n option_id\n uid\n required\n type\n title\n options {\n uid\n label\n product {\n sku\n }\n can_change_quantity\n id\n uid\n price\n quantity\n }\n }\n }\n }\n }\n}\nQUERY;\n }", "public function getExternalSkuData ()\n {\n $sql = \"SELECT t1.id,t1.sku_name,t1.sku_creation_date,t1.sku_description,t3.sku_active_status_name,t4.unit_name FROM\n `tbld_sku` as t1 \n inner join `tbli_sku_mou_price_mapping` as t2 on t1.id=t2.sku_id\n left join `tbld_sku_active_status` as t3 on t1.sku_active_status_id=t3.id\n left join `tbld_unit` as t4 on t2.mou_id=t4.id\n where t1.sku_type_id=2\";\n $query = $this->db->query( $sql )->result_array();\n return $query;\n }", "function products_table(){\n\n $collection = collect_find('Products');\n\n $products = $collection->find();\n\n foreach ($products as $item) {\n\n $id = ((array) $item['_id'])['oid'];\n $item = (array) $item;\n cms_user($item['name'], $item['price'],$item['stock'], $id);\n \n }\n}", "private function getExistingSku($sku)\n {\n return $this->_oldSku[strtolower($sku)];\n }", "public function setSkus($s)\n {\n if (is_string($s)) {\n $s = [$s];\n }\n if (is_array($s)) {\n $this->resetASINs();\n $this->resetSKUs();\n $i = 1;\n foreach ($s as $x) {\n $this->options['SellerSKUList.Id.'.$i] = $x;\n $i++;\n }\n } else {\n return false;\n }\n }", "public function setSKU($sKU)\n {\n $this->sKU = $sKU;\n return $this;\n }", "protected function getSkuColumnName()\n {\n return $this->skuColumnName;\n }", "public function getSku() {\n return $this->_sku;\n }", "function wc_importer_shopify_special_mappings( $mappings, $raw_headers ) {\n\t// Only map if this is looks like a Shopify export.\n\tif ( 0 !== count( array_diff( array( 'Title', 'Body (HTML)', 'Type', 'Variant SKU' ), $raw_headers ) ) ) {\n\t\treturn $mappings;\n\t}\n\t$shopify_mappings = array(\n\t\t'Option%d Name' => 'attributes:name',\n\t\t'Option%d Value' => 'attributes:value',\n\t);\n\treturn array_merge( $mappings, $shopify_mappings );\n}", "public function transform(ProductSKU $productSKU)\n {\n return [\n 'id' => (int) $productSKU['id'],\n 'product_id' => (int) $productSKU['product_id'],\n 'price' => $productSKU['price'],\n 'discount' => $productSKU['discount'],\n 'tax' => $productSKU['tax'],\n 'shipping_charge' => $productSKU['shipping_charge'],\n 'size' => $productSKU['size'],\n 'color' => $productSKU['color'],\n 'weight' => $productSKU['weight'],\n 'volume' => $productSKU['volume'],\n 'is_trending' => (bool) $productSKU['is_trending'],\n 'product_images' => $productSKU->ProductImages,\n 'product_stock' =>$productSKU->ProductStock,\n 'product' => $productSKU->product\n ];\n }", "private function getSkuSelectionList() {\r\n //$this->jsonOutput[\"skuSelectionList\"] = $this->settingVars->pageArray[\"SKU_SELECTION_LIST\"];\r\n\t\tif(isset($this->jsonOutput[\"settings\"]['sku_settings']) && $this->jsonOutput[\"settings\"]['sku_settings'] != \"\")\r\n\t\t\t$this->jsonOutput[\"skuSelectionList\"] = $this->jsonOutput[\"settings\"]['sku_settings'];\r\n }", "public function dataProviderRetrieveSkuById()\n {\n return [\n [\n null,\n 2,\n ['sku_1' => [1 => 1]]\n ],\n [\n 'sku_1',\n 1,\n ['sku_1' => [1 => 1]]\n ],\n [\n null,\n 1,\n ['sku_1' => [2 => 1]]\n ],\n ];\n }", "public function getMap() {\n return [\n 'sku' => 'itemNo',\n 'shortDescription' => 'description',\n 'longDescription' => 'description2',\n 'measurementUnit' => 'unitOfMeasure',\n 'mpn' => 'vendorItemNo',\n 'ean' => 'eanNo',\n ];\n }", "function getRepositoryIDNameMapping() {\n return ['0001' => 'dbGaP',\n '0002' => 'PDB',\n '0003' => 'GEO',\n '0004' => 'LINCS',\n '0005' => 'GEMMA',\n '0006' => 'ArrayExpress',\n '0007' => 'SRA',\n '0008'=> 'BioProject',\n '0009' => 'ClinicalTrials',\n '0010'=>'Dryad',\n '0011'=>'cvrg',\n '0012'=>'Dataverse',\n '0013'=>'NeuroMorpho.Org',\n '0014'=>'PeptideAtlas',\n '0015'=>'CTN',\n '0016'=>'TCIA',\n '0017'=>'MPD',\n '0018'=>'NIDDKCR',\n '0019'=>'openfmri',\n '0020'=>'NURSA',\n '0021'=>'PhysioBank',\n '0022'=>'ProteomeXchange',\n '0023'=>'YPED',\n '0024'=>'CIL',\n '0025'=>'ICPRS',\n '0026'=>'GDC',\n '0027'=>'BMRB',\n '0028'=>'UniProt:Swiss-Prot ',\n '0029'=>'ClinVar',\n '0030'=>'Retina',\n '0031'=>'PDBe:EMDB',\n '0032'=>'Epigenomics',\n '0033'=>'nitrcir',\n '0034'=>'NeuroVault:Atlases',\n '0035'=>'NeuroVault:Cols',\n '0036'=>'NeuroVault: NIDM',\n '0037'=>'RGD',\n '0038'=>'GigaDB',\n '0039'=>'MorphoBank',\n '0040'=>'VectorBase',\n '0041'=>'GND',\n '0042'=>'PeerJ',\n '0043'=>'Zenodo',\n '0044'=>'OmicsDI',\n '0045'=>'SBGrid',\n '0046'=>'SimTK',\n '0047'=>'CXIDB',\n '0048'=>'BILS',\n '0049'=>'ADA',\n '0050'=>'UKDA',\n '0051'=>'Adaptive Biotechnologies',\n '0052'=>'MITLCP',\n '0053'=>'UCSF-CTSI',\n '0054'=>'FDZ-DZA',\n '0055'=>'MBF',\n '0056'=>'NIMH',\n '0057'=>'JHUDMS',\n '0058'=>'CANDI',\n '0059'=>'LSHTM',\n '0060'=>'Databrary',\n '0061'=>'ImmPort',\n '0062'=>'NSGM',\n '0063'=>'CRCNS',\n '0064'=>'NSRR',\n '0065'=>'NSD',\n '0066'=>'LSDB',\n '0067'=>'GeneNetwork',\n '0068'=>'Ndar Papers',\n '0069'=>\"Thieme\",\n '0070'=>'Figshare',\n '0071'=>'CCDC',\n '0072'=>'Wormbase',\n '0073'=>'GTex',\n '0074'=>'Metabolomics'\n ];\n}", "public function findProduct(\r\n $sku\r\n, $name = null\r\n, $skuMatchMode = 'IGNORE_DASH'\r\n, $baseSkuSearchFlag = true\r\n) { \r\n global $baseSkuAttributeId;\r\n\t$sku = str_replace('\\'', '', $sku);\r\n\t$sku = str_replace('\\\\', '', $sku);\r\n\t$sku = trim($sku, '()');\r\n\t$resource = Mage::getSingleton('core/resource');\r\n\t$readConnection = $resource->getConnection('core_read');\r\n\t$table = $resource->getTableName('catalog/product');\r\n $findResult = array('search_mask' => null, 'product_data' => array(), \r\n 'no_base_sku_count' => 0, 'base_sku_count' => 0\r\n );\r\n\t// try to match words\r\n\tif (strlen($sku) >=4) { \r\n if ($skuMatchMode == 'LEFT') { \r\n $findResult['search_mask'] = \" \" . $sku . \" %\";\r\n $searchExpression = \"concat(' ', sku, ' ') like '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'LEFT_IGNORE_DASH') { \r\n $findResult['search_mask'] = str_replace('-', ' ', \" \" . $sku . \" %\");\r\n $searchExpression = \"concat(' ', replace(sku, '-', ' '), ' ') like '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'EXACT') { \r\n $findResult['search_mask'] = $sku;\r\n $searchExpression = \"sku = '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'IGNORE_DASH') { \r\n $findResult['search_mask'] = str_replace('-', ' ', $sku);\r\n $searchExpression = \"replace(sku, '-', ' ') = '\" . $findResult['search_mask'] . \"'\";\r\n } else {\r\n throw new Exception('Uknown skuMatchMode: \"' . $skuMatchMode . '\"');\r\n } \r\n $findResult['product_data'] = $readConnection->fetchAll(\r\n \"select entity_id as product_id, sku \r\n from \" . $table . \" p\r\n where \r\n -- website SKU is at the beginning\r\n \" . $searchExpression\r\n );\r\n if ($baseSkuSearchFlag) { \r\n // add base sku search\r\n if (!isset($baseSkuAttributeId)) {\r\n $baseSkuAttributeId = $readConnection->fetchOne(\r\n \"select attribute_id from eav_attribute where attribute_code = 'base_sku'\"\r\n );\r\n } \r\n $baseSkuResult = \r\n $readConnection->fetchAll( \r\n \"select \r\n entity_id as product_id\r\n , (select sku from catalog_product_entity p where p.entity_id = v.entity_id) as sku\r\n , value as base_sku\r\n from\r\n catalog_product_entity_varchar v\r\n where \r\n -- source sku is like (contains) base sku\r\n -- replace dashes with spaces\r\n ' \" . str_replace('-', ' ', $sku) . \" ' \r\n like concat('% ', replace(value, '-', ' '), ' %')\r\n and v.attribute_id = \" . $baseSkuAttributeId \r\n );\r\n $findResult['no_base_sku_count'] = count($findResult['product_data']); \r\n if (count($baseSkuResult) > 0) {\r\n $findResult['base_sku_count'] = count($baseSkuResult);\r\n $findResult['product_data'] = array_merge($findResult['product_data'], $baseSkuResult);\r\n $findResult['search_mask'] = $findResult['search_mask'] . \" && base_sku\";\r\n $this->logMessage('baseSkuResult: count=' . count($baseSkuResult));\r\n }\r\n }\r\n\t}\t\r\n\tif (!empty($name) && count($findResult['product_data']) == 0) { \r\n\t $words = explode(' ', strtr(trim($name), '-:', ' '));\r\n\t foreach ($words as $word) { \r\n\t\t$findResult = findProduct($word, null, $skuMatchMode, $baseSkuSearchFlag);\r\n\t\t// For name words allow only one match\r\n\t\tif (count($findResult['product_data']) == 1) { \r\n\t\t return $findResult;\r\n\t\t} \r\n\t } \r\n\t} \r\n\treturn $findResult;\r\n}", "public function getProductIds($sku)\n\t{\n\t\t$tname=$this->tablename(\"catalog_product_entity\");\n\t\t$result=$this->selectAll(\n\t\t\"SELECT sku,entity_id as pid,attribute_set_id as asid FROM $tname WHERE sku=?\",\n\t\t$sku);\n\t\tif(count($result)>0)\n\t\t{\n\t\t\treturn $result[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function saveSkins()\n {\n \\XLite\\Core\\Database::getCacheDriver()->save(\n get_called_class() . '.SubstitutonalSkins',\n $this->resourcesCache\n );\n }", "public function getSellerSKU() \n {\n return $this->_fields['SellerSKU']['FieldValue'];\n }", "protected function addSkuStoreViewCodeMapping($sku, $storeViewCode)\n {\n $this->getSubject()->addSkuStoreViewCodeMapping($sku, $storeViewCode);\n }", "function es_product_bulk_price($price, $quantity, $sku) {\n\t/*\n\t* PUB41 - Your child’s first year at school Bulk discount\n\t* For orders of x >= 20 $12.95, x >= 50 $9.90\n\t*/\n\tif ($sku == 'PUB41') {\n\t\tif ($quantity >= 20 AND $quantity < 50) {\n\t\t\t$price = 12.95;\n\t\t}\n\t\telseif ($quantity >= 50) {\n\t\t\t$price = 9.95;\n\t\t}\n\t}\n\telseif($sku == 'SUND507') {\n\t\tif ($quantity >= 3)\n\t\t\t$price = 10.95;\n\t}\n\telseif($sku == 'SUND621') {\n\t\tif ($quantity >= 3)\n\t\t\t$price = 16.95;\n\t}\n\telseif($sku == 'SUND620') {\n\t\tif ($quantity >= 5)\n\t\t\t$price = 14.95;\n\t}\n\t\n\treturn $price;\n}", "public function setVariantIdAsKey($data) {\n\t\t\n\t\tif (isset($data['CartItem'])) {\n\t\t\t$cartItems = Set::combine($data, 'CartItem.{n}.variant_id', 'CartItem.{n}');\n\t\t\tif (!empty($cartItems)) {\n\t\t\t\t$data['CartItem'] = $cartItems;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "public function generate()\n {\n $skuCount = (int) Option::get(\"catalog.generator\", \"sku_count\");\n if($skuCount > 0)\n parent::generate();\n }", "protected function addSkuToPkMapping($sku, $pk)\n {\n $this->getSubject()->addSkuToPkMapping($sku, $pk);\n }", "private function getSkusFromResults($results)\n {\n // Get entity manager\n $em = EntityManagerSingleton::getInstance();\n\n $sku_ids = [];\n\n if (!empty($results))\n {\n foreach ($results as $result)\n {\n $sku_ids[] = $result['sku_id'];\n }\n }\n\n $skus = $em->getRepository('Library\\Model\\Product\\Sku')->findBy(['id' => $sku_ids]);\n return $skus;\n }", "public function get_unit_price($sku_id) {\n $sql = \"SELECT t1.outlet_lifting_price as price, t2.sku_code, t2.sku_description\n FROM `tbli_sku_mou_price_mapping` as t1 \n Inner JOIN `tbld_sku` as t2 On t1.sku_id=t2.id\n where sku_id=$sku_id and quantity=1\";\n $query = $this->db->query($sql)->result_array();\n\n return $query;\n }", "private function getNewSkuFieldsForSelect()\n {\n $fields = ['sku', $this->getProductEntityLinkField()];\n if ($this->getProductEntityLinkField() != $this->getProductIdentifierField()) {\n $fields[] = $this->getProductIdentifierField();\n }\n return $fields;\n }", "public function getSku()\n {\n $skuAttribute = $this->helper->getSkuConfig();\n\n return $this->getAttribute($skuAttribute);\n }", "public function info($uid)\n {\n $query = $this->from()->where(['uid' => $uid, 'is_delete' => 0]);\n $num = $query->count();\n $carts = $query->fetchAll();\n $totalPrice = 0;\n\n foreach ($carts as $key => $cart) {\n // count total price\n $totalPrice += ($cart['price'] * $cart['num']);\n\n // get sku info detail\n $sku = $this->from('sku')->where(['id' => $cart['sku_id'], 'is_delete' => 0])->fetch();\n $skuAttr = $this->from('sku_attr')\n ->where(['sku_id' => $sku['id']])\n ->select(null)\n ->select(['id', 'attr', 'opt'])\n ->fetchAll();\n $spu = $this->from('spu')\n ->where(['id' => $sku['spu_id'], 'is_delete' => 0])\n ->select(null)\n ->select(['cate_id', 'brand', 'cover_url'])\n ->fetch();\n $carts[$key] = array_merge($spu, $cart);\n $carts[$key]['attr'] = $skuAttr;\n }\n\n // strcutrue result\n $res['num'] = $num;\n $res['freight'] = $totalPrice >= \\Core\\Config::get('freight_limit') ? 0 : \\Core\\Config::get('freight');\n $res['total_price'] = $totalPrice + $res['freight'];\n $res['product'] = $carts;\n\n return $res;\n }", "public static function vendorItemsArr(){\n\t\treturn array(\"IANS\"=>array(array(\"name\"=>\"1 slice of cheese or pepperoni pizza\",\"cost\"=>5,\"code\"=>\"IANSSLICE1_\"),array(\"name\"=>\"Small Salad\",\"cost\"=>5,\"code\"=>\"IANSSALAD1_\"),array(\"name\"=>\"Premium Slice\",\"cost\"=>10,\"code\"=>\"IANSSLICE2_\")));\n\t}", "public function createDataProduct($raw_data = array(), $sku) {\n $product = new Product($raw_data);\n foreach ($this->reference as $name => $p) {\n $f_name = \"extract_\".$this->pimhelper->normalize_field($name);\n $value = $this->$f_name($product->raw_data);\n $product->setField($name, $value);\n }\n // Set product entity\n $this->products[$sku] = $product;\n }", "public function getSku()\n {\n if (is_null($this->sku)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_SKU);\n if (is_null($data)) {\n return null;\n }\n $this->sku = (string) $data;\n }\n\n return $this->sku;\n }", "public function getSkins(): array;", "public function scan(string $sku)\n {\n $this->addProduct($sku);\n }", "public function run()\n {\n \\App\\Variation::create([\n \"sku\" => \"#\" . rand(1, 100000000),\n// \"image\" => \"https://i1.rozetka.ua/goods/4381047/adidas_4059323881564_images_4381047304.jpg\",\n \"product_id\" => 1,\n \"price\" => 2500,\n \"in_stock\" => 15\n ]);\n\n// \\App\\Variation::create([\n// \"sku\" => \"#\" . rand(1, 100000000),\n// \"image\" => \"https://i2.rozetka.ua/goods/1528038/nike_812654_001_11_5_images_1528038611.jpg\",\n// \"product_id\" => 1,\n// \"price\" => 2000,\n// \"in_stock\" => 8\n// ]);\n//\n// \\App\\Variation::create([\n// \"sku\" => \"#\" . rand(1, 100000000),\n// \"image\" => \"https://i2.rozetka.ua/goods/5032905/nike_886737447079_images_5032905456.jpg\",\n// \"product_id\" => 1,\n// \"price\" => 1300,\n// \"in_stock\" => 5\n// ]);\n\n \\App\\Variation::create([\n \"sku\" => \"#\" . rand(1, 100000000),\n// \"image\" => \"https://i1.rozetka.ua/goods/2286747/adidas_aq1625_4.5_images_2286747890.jpg\",\n \"product_id\" => 1,\n \"price\" => 1300,\n \"in_stock\" => 5\n ]);\n }", "public function setSku(?string $value): void {\n $this->getBackingStore()->set('sku', $value);\n }", "public function getFoodbyID($sku){\r\n $conn = new ConnectionManager();\r\n $pdo = $conn->getConnection();\r\n \r\n\r\n // YOUR CODE GOES HERE\r\n\r\n return $result;\r\n }", "public function getMyPriceForSKU($request);", "public function importUsaLevelCounties()\n {\n return $this->importData('USA_adm/USA_adm2.shp', 0);\n }", "public function getSku() {\n return $this->item->getSku();\n }", "protected function createVariantsMap()\n {\n return $this->variantsMap;\n }", "public function __construct($_sKU = NULL,$_startPrice = NULL,$_quantity = NULL,$_variationSpecifics = NULL,$_quantitySold = NULL,$_sellingStatus = NULL,$_discountPriceInfo = NULL,$_any = NULL)\r\n\t{\r\n\t\tparent::__construct(array('SKU'=>$_sKU,'StartPrice'=>$_startPrice,'Quantity'=>$_quantity,'VariationSpecifics'=>($_variationSpecifics instanceof EbayShoppingStructNameValueListArrayType)?$_variationSpecifics:new EbayShoppingStructNameValueListArrayType($_variationSpecifics),'QuantitySold'=>$_quantitySold,'SellingStatus'=>$_sellingStatus,'DiscountPriceInfo'=>$_discountPriceInfo,'any'=>$_any));\r\n\t}", "function getRepositoryIDMapping() {\n return ['0001' => 'dbgap',\n '0002' => 'pdb',\n '0003' => 'geo',\n '0004' => 'lincs',\n '0005' => 'gemma',\n '0006' => 'arrayexpress',\n '0007' => 'sra',\n '0008'=> 'bioproject',\n '0009' => 'clinicaltrials',\n '0010'=>'dryad',\n '0011'=>'cvrg',\n '0012'=>'dataverse',\n '0013'=>'neuromorpho',\n '0014'=>'peptideatlas',\n '0015'=>'ctn',\n '0016'=>'cia',\n '0017'=>'mpd',\n '0018'=>'niddkcr',\n '0019'=>'openfmri',\n '0020'=>'nursadatasets',\n '0021'=>'physiobank',\n '0022'=>'proteomexchange',\n '0023'=>'yped',\n '0024'=>'cil',\n '0025'=>'icpsr',\n '0026'=>'gdc',\n '0027'=>'bmrb',\n '0028'=>'swissprot',\n '0029'=>'clinvar',\n '0030'=>'retina',\n '0031'=>'emdb',\n '0032'=>'epigenomics',\n '0033'=>'nitrcir',\n '0034'=>'neurovaultatlases',\n '0035'=>'neurovaultcols',\n '0036'=>'neurovaultnidm',\n '0037'=>'rgd',\n '0038'=>'datacitebgi',\n '0039'=>'datacitemorphobank',\n '0040'=>'vectorbase',\n '0041'=>'datacitegnd',\n '0042'=>'datacitepeerj',\n '0043'=>'datacitezenodo',\n '0044'=>'omicsdi',\n '0045'=>'datacitesbgrid',\n '0046'=>'simtk',\n '0047'=>'datacitecxidb',\n '0048'=>'datacitebils',\n '0049'=>'dataciteada',\n '0050'=>'dataciteukda',\n '0051'=>'dataciteadaptive',\n '0052'=>'datacitemit',\n '0053'=>'datacitectsi',\n '0054'=>'datacitefdz',\n '0055'=>'datacitembf',\n '0056'=>'datacitenimh',\n '0057'=>'datacitejhu',\n '0058'=>'datacitecandi',\n '0059'=>'datacitelshtm',\n '0060'=>'datacitedatabrary',\n '0061'=>'immport',\n '0062'=>'datacitesdscsg',\n '0063'=>'datacitecrcns',\n '0064'=>'nsrr',\n '0065'=>'naturedata',\n '0066'=>'lsdb',\n '0067'=>'genenetwork',\n '0068'=>'ndarpapers',\n '0069'=>'datacitethieme',\n '0070'=>'datacitefigshare',\n '0071'=>'dataciteccdc',\n '0072'=>'wormbase',\n '0073'=>'gtexldacc',\n '0074'=> 'metabolomics'\n\n ];\n}", "function _checkIfSkuExists($sku, $connection_read){ \n $sql = \"SELECT COUNT(*) AS count_no FROM catalog_product_entity WHERE sku = ?\";\n $count = $connection_read->fetchOne($sql, array($sku));\n if($count > 0){\n return true;\n }else{\n return false;\n }\n}", "function _load_users_by_bout_number($bid, $tid) {\n $uids = _get_uids_by_bout_number($bid, $tid);\n /*\n $result = db_query('SELECT id.draw_number, id.uid FROM {iwps_draw} as id LEFT JOIN {iwps_bout_schematic} as ibs ON (ibs.draw_number = id.draw_number) WHERE ibs.bid = :bid AND id.tid = :tid', array(':bid' => $bid, ':tid' => $tid));\n foreach ($result as $record) {\n $uids[] = $record->uid;\n }\n */\n $users = user_load_multiple($uids);\n $weight = 0;\n foreach ($users as $user) {\n $user->iwps_weight = $weight++;\n }\n return $users;\n}", "public function __construct(LoaderInterface $registryLoader, ProductBunchProcessorInterface $productProcessor, $columName = MemberNames::SKU)\n {\n\n // initialize the column name and the registry loader\n $this->columnName = $columName;\n $this->registryLoader = $registryLoader;\n\n // initialize the array with the SKUs\n foreach ($productProcessor->loadProducts() as $product) {\n $this->values[] = $product[$this->columnName];\n }\n }", "function sf_build_memberships_table()\n{\n\tglobal $wpdb;\n\n\t$users = $wpdb->get_results(\"SELECT user_id, usergroups FROM \".SFMEMBERS);\n\tif ($users)\n\t{\n\t\tforeach ($users as $user)\n\t\t{\n\t\t\t$memberships = maybe_unserialize($user->usergroups);\n\t\t\tif ($memberships)\n\t\t\t{\n\t\t\t\tfor ($x=0; $x<count($memberships); $x++)\n\t\t\t\t{\n\t\t\t\t\t$sql =\"INSERT INTO \".SFMEMBERSHIPS.\" (user_id, usergroup_id) \";\n\t\t\t\t\t$sql.=\"VALUES ('\".$user->user_id.\"', '\".$memberships[$x].\"');\";\n\t\t\t\t\t$wpdb->query($sql);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "protected function _mapProducts($data, $brandId, $shopId) {\n\n foreach ($data as $key => $product) {\n # Set initial score\n $score = Configure::read('Product.Score.initialScore');\n $specialScores = Configure::read('Product.Score.' . $data[$key]['Product']['country_code'] . '.byCategory');\n\n if (!empty($specialScores[$data[$key]['Product']['category_id']])) {\n $score = $specialScores[$data[$key]['Product']['category_id']];\n }\n\n # Find product ID\n $productId = $this->_getProductId($product['Product']['feed_sku'], $brandId, $shopId);\n\n if ($productId) {\n $this->_Product->id = $productId;\n\n $score = $this->_Product->field('score'); # Keep current score on update\n $data[$key]['Product']['id'] = $productId;\n }\n\n # Merge problematic fields due stata string length limitation\n $data[$key]['Product']['url'] .= @$data[$key]['Product']['url_1'];\n $data[$key]['Product']['url'] .= @$data[$key]['Product']['url_2'];\n\n $data[$key]['Product']['description'] .= @$data[$key]['Product']['description_1'];\n $data[$key]['Product']['description'] .= @$data[$key]['Product']['description_2'];\n $data[$key]['Product']['description'] .= @$data[$key]['Product']['description_3'];\n $data[$key]['Product']['description'] .= @$data[$key]['Product']['description_4'];\n $data[$key]['Product']['description'] .= @$data[$key]['Product']['description_5'];\n\n $data[$key]['Image'][0]['url'] .= @$data[$key]['Image'][0]['url_1'];\n $data[$key]['Image'][0]['url'] .= @$data[$key]['Image'][0]['url_2'];\n\n\n $data[$key]['Product']['score'] = $score;\n #$data[$key]['Product']['country_code'] = $this->_countryCode;\n $data[$key]['Product']['price_old'] = !empty($data[$key]['Product']['price_old']) ? $data[$key]['Product']['price_old'] : 0;\n $data[$key]['Product']['shipping_cost'] = !empty($data[$key]['Product']['shipping_cost']) ? $data[$key]['Product']['shipping_cost'] : 0;\n $data[$key]['Product']['status'] = 'disabled';\n $data[$key]['Product']['shop_id'] = $shopId;\n $data[$key]['Product']['brand_id'] = $brandId;\n $data[$key]['Product']['order'] = (float)mt_rand() / (float)mt_getrandmax();\n \n unset($data[$key]['Brand']);\n unset($data[$key]['FeedImport']); // Shouldn't be necessary\n }\n\n return $data;\n }", "function nova_bs_fusion_apply_group_nova_bs_skins_info() {\n $groups = array();\n $groups['region_specific'] = array(\n 'title' => t('Region specific'),\n 'description' => t('Skins dependent on content'),\n 'weight' => 20,\n );\n\n return $groups;\n}", "public function getDtdMapping();", "function _wpsc_db_upgrade_11() {\n\t_wpsc_fix_united_kingdom();\n\t_wpsc_set_legacy_country_meta();\n}", "public function saveDataProvider()\n {\n return [\n [\n 'skus' => [\n 'newSku' => [\n 'sku_assoc1' => ['entity_id' => 1],\n 'productsku' => ['entity_id' => 3, 'attr_set_code' => 'Default', 'type_id' => 'grouped']\n ],\n 'oldSku' => ['sku_assoc2' => ['entity_id' => 2]]\n ],\n 'bunch' => [\n 'associated_skus' => 'sku_assoc1=1, sku_assoc2=2',\n 'sku' => 'productsku',\n 'product_type' => 'grouped'\n ]\n ],\n [\n 'skus' => [\n 'newSku' => [\n 'productsku' => ['entity_id' => 1, 'attr_set_code' => 'Default', 'type_id' => 'grouped']\n ],\n 'oldSku' => []\n ],\n 'bunch' => [\n 'associated_skus' => '',\n 'sku' => 'productsku',\n 'product_type' => 'grouped'\n ]\n ],\n [\n 'skus' => ['newSku' => [],'oldSku' => []],\n 'bunch' => [\n 'associated_skus' => 'sku_assoc1=1, sku_assoc2=2',\n 'sku' => 'productsku',\n 'product_type' => 'grouped'\n ]\n ],\n [\n 'skus' => [\n 'newSku' => [\n 'sku_assoc1' => ['entity_id' => 1],\n 'productsku' => ['entity_id' => 3, 'attr_set_code' => 'Default', 'type_id' => 'grouped']\n ],\n 'oldSku' => []\n ],\n 'bunch' => [\n 'associated_skus' => 'sku_assoc1=1',\n 'sku' => 'productsku',\n 'product_type' => 'simple'\n ]\n ]\n ];\n }", "function mapUsername($username) {\n $toMap = array(\n 'lauri^^' => 'Ladexi',\n 'luckyalfa' => 'lalfa',\n 'krudda' => 'Imperf3kt',\n 'chhotu_uttam' => 'Chhotu uttam',\n 'satenruiko' => 'dbx10',\n 'lizbeth' => 'Vazkii',\n 'fenn' => 'Pokefenn',\n );\n if(isset($toMap[strtolower($username)])) {\n $username = $toMap[strtolower($username)];\n }\n return $username;\n}", "public function getProductIdentifier()\n {\n $value = $this->_config->get('dataprocessing/products/identifier');\n\n if ($value === null) {\n $value = 'sku';\n }\n\n return $value;\n }", "protected function getSkuToPkMappingUtil()\n {\n return $this->skuToPkMappingUtil;\n }", "public function getSku()\n {\n return $this->getTypeInstance(true)->getSku($this);\n }", "function get_profile_usrid($usrid){\r\n\t\r\n}", "public function convertSaleItemsData();", "public function getProductQuantityMap() {\n $output = array();\n $products = $this->getFieldItems('commerce_product');\n $quantity = $this->getEntity()->quantity;\n foreach ($products as $product) {\n $product_id = $product['product_id'];\n if (array_key_exists($product_id, $output)) {\n $output[$product_id] += $quantity;\n }\n else {\n $output[$product_id] = $quantity;\n }\n }\n\n return $output;\n }", "function wc_uk_counties_add_counties( $states ) {\n\n $states['GB'] = array(\n 'AV' => 'Avon',\n 'BE' => 'Bedfordshire',\n 'BK' => 'Berkshire',\n 'BU' => 'Buckinghamshire',\n 'CA' => 'Cambridgeshire',\n 'CH' => 'Cheshire',\n 'CL' => 'Cleveland',\n 'CO' => 'Cornwall',\n 'CD' => 'County Durham',\n 'CU' => 'Cumbria',\n 'DE' => 'Derbyshire',\n 'DV' => 'Devon',\n 'DO' => 'Dorset',\n 'ES' => 'East Sussex',\n 'EX' => 'Essex',\n 'GL' => 'Gloucestershire',\n 'HA' => 'Hampshire',\n 'HE' => 'Herefordshire',\n 'HT' => 'Hertfordshire',\n 'IW' => 'Isle of Wight',\n 'KE' => 'Kent',\n 'LA' => 'Lancashire',\n 'LE' => 'Leicestershire',\n 'LI' => 'Lincolnshire',\n 'LO' => 'London',\n 'ME' => 'Merseyside',\n 'MI' => 'Middlesex',\n 'NO' => 'Norfolk',\n 'NH' => 'North Humberside',\n 'NY' => 'North Yorkshire',\n 'NS' => 'Northamptonshire',\n 'NL' => 'Northumberland',\n 'NT' => 'Nottinghamshire',\n 'OX' => 'Oxfordshire',\n 'SH' => 'Shropshire',\n 'SO' => 'Somerset',\n 'SM' => 'South Humberside',\n 'SY' => 'South Yorkshire',\n 'SF' => 'Staffordshire',\n 'SU' => 'Suffolk',\n 'SR' => 'Surrey',\n 'TW' => 'Tyne and Wear',\n 'WA' => 'Warwickshire',\n 'WM' => 'West Midlands',\n 'WS' => 'West Sussex',\n 'WY' => 'West Yorkshire',\n 'WI' => 'Wiltshire',\n 'WO' => 'Worcestershire',\n 'ABD' => 'Scotland / Aberdeenshire',\n 'ANS' => 'Scotland / Angus',\n 'ARL' => 'Scotland / Argyle & Bute',\n 'AYR' => 'Scotland / Ayrshire',\n 'CLK' => 'Scotland / Clackmannanshire',\n 'DGY' => 'Scotland / Dumfries & Galloway',\n 'DNB' => 'Scotland / Dunbartonshire',\n 'DDE' => 'Scotland / Dundee',\n 'ELN' => 'Scotland / East Lothian',\n 'EDB' => 'Scotland / Edinburgh',\n 'FIF' => 'Scotland / Fife',\n 'GGW' => 'Scotland / Glasgow',\n 'HLD' => 'Scotland / Highland',\n 'LKS' => 'Scotland / Lanarkshire',\n 'MLN' => 'Scotland / Midlothian',\n 'MOR' => 'Scotland / Moray',\n 'OKI' => 'Scotland / Orkney',\n 'PER' => 'Scotland / Perth and Kinross',\n 'RFW' => 'Scotland / Renfrewshire',\n 'SB' => 'Scotland / Scottish Borders',\n 'SHI' => 'Scotland / Shetland Isles',\n 'STI' => 'Scotland / Stirling',\n 'WLN' => 'Scotland / West Lothian',\n 'WIS' => 'Scotland / Western Isles',\n 'AGY' => 'Wales / Anglesey',\n 'GNT' => 'Wales / Blaenau Gwent',\n 'CP' => 'Wales / Caerphilly',\n 'CF' => 'Wales / Cardiff',\n 'CAE' => 'Wales / Carmarthenshire',\n 'CR' => 'Wales / Ceredigion',\n 'CW' => 'Wales / Conwy',\n 'DEN' => 'Wales / Denbighshire',\n 'FLN' => 'Wales / Flintshire',\n 'GLA' => 'Wales / Glamorgan',\n 'GWN' => 'Wales / Gwynedd',\n 'MT' => 'Wales / Merthyr Tydfil',\n 'MON' => 'Wales / Monmouthshire',\n 'PT' => 'Wales / Neath Port Talbot',\n 'NP' => 'Wales / Newport',\n 'PEM' => 'Wales / Pembrokeshire',\n 'POW' => 'Wales / Powys',\n 'RT' => 'Wales / Rhondda Cynon Taff',\n 'SS' => 'Wales / Swansea',\n 'TF' => 'Wales / Torfaen',\n 'WX' => 'Wales / Wrexham',\n 'ANT' => 'Northern Ireland / County Antrim',\n 'ARM' => 'Northern Ireland / County Armagh',\n 'DOW' => 'Northern Ireland / County Down',\n 'FER' => 'Northern Ireland / County Fermanagh',\n 'LDY' => 'Northern Ireland / County Londonderry',\n 'TYR' => 'Northern Ireland / County Tyrone',\n );\n return $states;\n\n}", "public function store(Request $request)\n {\n switch($request->seccion) {\n case 'ortopedia':\n $sku = 'ORTO' . $request->categoria_abr . $request->producto_abr . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->categoria . ' '. $request->producto . ' ' . $request->marca . ' ' . $request->modelo . ' ' . $request->talla . ' ' . $request->unidad . ' ' . $request->color;\n break;\n case 'micas':\n $sku = 'MICA' . $request->familia_abr . $request->materiales_abr . $request->tipo_abr . $request->tratamiento_abr . $request->color_abr;\n $desc = $request->familia . ' ' . $request->materiales . ' ' . $request->tipo . ' ' . $request->tratamiento . ' ' . $request->color;\n break;\n case 'armazones':\n $sku = 'ARMA' . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->marca . ' ' . $request->modelo . ' ' . $request->color . ' ' . $request->medidas . ' '. $request->unidad;\n break;\n case 'contacto':\n $sku = 'CONT' . $request->categoria_abr . ' ' . $request->tipo_abr . $request->marca_abr . $request->periodo_abr;\n $desc = $request->categoria . ' ' . $request->tipo . ' ' . $request->marca . ' ' . $request->periodo;\n break;\n case 'generales':\n $sku = 'GRAL' . $request->producto_abr . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->producto . ' ' . $request->marca . ' ' . $request->modelo . ' ' . $request->color;\n break;\n default:\n break;\n }\n $sku = str_replace(' ', '', $sku);\n $request['sku_interno'] = $sku;\n $request['descripcion'] = $desc;\n $producto = Producto::create($request->all());\n $aux1 = $request->foto1 ? (Storage::putFileAs('productos/' . $request->seccion . '/' . $producto->id, $request->file('foto1'), 'foto1.jpg')) : null;\n $aux2 = $request->foto2 ? (Storage::putFileAs('productos/' . $request->seccion . '/' . $producto->id, $request->file('foto2'), 'foto2.jpg')) : null;\n $aux3 = $request->foto3 ? (Storage::putFileAs('productos/' . $request->seccion . '/' . $producto->id, $request->file('foto3'), 'foto3.jpg')) : null;\n $producto->foto1 = $aux1;\n $producto->foto2 = $aux2;\n $producto->foto3 = $aux3;\n $producto->save();\n $historial = new Historial(['tipo' => 'Alta de Producto', 'descripcion' => 'Producto registrado.']);\n $producto->historiales()->save($historial);\n return redirect()->route('productos.show', ['producto' => $producto]);\n }", "public function get_product_attributes() : array {\n\t\t$sku_wrapper = $this->dom->find( '#j-product-info-sku' );\n\t\tif ( 1 > count( $sku_wrapper ) ) {\n\t\t\treturn [\n\t\t\t\t'attributes' => [],\n\t\t\t];\n\t\t}\n\n\t\t$sku_sets = $sku_wrapper[0]->find( '.p-property-item' );\n\t\t$sku_data = [];\n\t\tfor ( $i = 0; $i < count( $sku_sets ); $i++ ) { // @codingStandardsIgnoreLine Count is lightweight\n\t\t\t// Drop it into a var so it can be looped.\n\t\t\t$sku_set = $sku_sets[ $i ];\n\n\t\t\t// Get the variation label.\n\t\t\t$label = $sku_set->find( '.p-item-title' )[0]->text();\n\t\t\t$label = trim( str_replace( ':', '', $label ) );\n\n\t\t\t// Get the error now.\n\t\t\t$msg_error = trim( $sku_set->find( '.sku-msg-error' )[0]->text() );\n\n\t\t\t// Get all sku props\n\t\t\t$sku_props = $sku_set->find( '.sku-attr-list' );\n\n\t\t\t// Get the sku prop ID, for later use.\n\t\t\t$sku_prop_id = $sku_props[0]->attr( 'data-sku-prop-id' );\n\n\t\t\t$skus = [];\n\t\t\t$sku_children = $sku_props[0]->find( 'li' );\n\t\t\tfor ( $y = 0; $y < count( $sku_children ); $y++ ) { // @codingStandardsIgnoreLine Count is lightweight\n\t\t\t\t// Saves typing later.\n\t\t\t\t$child = $sku_children[ $y ];\n\n\t\t\t\t// Get the anchor object.\n\t\t\t\t$anchor = $child->find( 'a[^data-role=sku]' );\n\t\t\t\tif ( 1 > count( $anchor ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Get the sku properties from the anchor.\n\t\t\t\t$id = $anchor[0]->getAttribute( 'data-sku-id' );\n\n\t\t\t\t// @TODO: Seems to be auto-updated somehow through the JS.\n\t\t\t\t$spm_anchor_id = $anchor[0]->getAttribute( 'data-spm-anchor-id' );\n\n\t\t\t\t$image = $anchor[0]->find( 'img' );\n\t\t\t\tif ( 1 > count( $image ) ) {\n\t\t\t\t\t// This isn't an image-based SKU.\n\t\t\t\t\t$sku_label = trim( $anchor[0]->text() );\n\t\t\t\t} else {\n\t\t\t\t\t// This is an image-based SKU, return the image URL and additional data.\n\t\t\t\t\t$sku_label = $image[0]->getAttribute( 'title' );\n\n\t\t\t\t\t// @TODO: Seems to be auto-updated somehow through the JS.\n\t\t\t\t\t$img_spm_anchor_id = $image[0]->getAttribute( 'data-spm-anchor-id' );\n\t\t\t\t\t$src = $image[0]->getAttribute( 'src' );\n\t\t\t\t\t$big_pic = $image[0]->getAttribute( 'bigpic' );\n\t\t\t\t}\n\n\t\t\t\t$sku = compact( 'id', 'sku_label', 'spm_anchor_id' );\n\t\t\t\tif ( 1 <= count( $image ) ) {\n\t\t\t\t\t$sku['image'] = compact( 'src', 'big_pic', 'img_spm_anchor_id' );\n\t\t\t\t}\n\n\t\t\t\t$skus[] = $sku;\n\t\t\t}\n\n\t\t\t$sku_data[] = compact( 'sku_prop_id', 'label', 'msg_error', 'skus' );\n\t\t}\n\t\treturn [ 'attributes' => $sku_data ];\n\t}" ]
[ "0.59674865", "0.59408355", "0.5776662", "0.5776662", "0.5775418", "0.57518893", "0.5717515", "0.56815773", "0.5626246", "0.5599588", "0.55876255", "0.5581125", "0.54886085", "0.5485359", "0.5438903", "0.54207534", "0.5413655", "0.5366685", "0.5311246", "0.53036743", "0.5302621", "0.5256471", "0.52475315", "0.52436155", "0.5234748", "0.520678", "0.5192116", "0.51824516", "0.5150272", "0.51401305", "0.5129104", "0.51184195", "0.5069431", "0.5067387", "0.5062966", "0.50320154", "0.5010496", "0.5005372", "0.49997413", "0.49961805", "0.49930063", "0.49853736", "0.49545953", "0.49420744", "0.49347153", "0.49199966", "0.48972702", "0.48968202", "0.4893485", "0.48857453", "0.4876609", "0.4875629", "0.48663542", "0.4853749", "0.4848058", "0.4833484", "0.48188093", "0.48179427", "0.4816481", "0.48065418", "0.47776785", "0.47656396", "0.47649455", "0.47639412", "0.47391042", "0.47361416", "0.4726416", "0.47129995", "0.47084665", "0.47010806", "0.46952373", "0.46950892", "0.46914357", "0.46876532", "0.46871537", "0.4678726", "0.46773812", "0.46770296", "0.46635205", "0.46481657", "0.46403694", "0.46348667", "0.46312627", "0.4619772", "0.46007323", "0.4584703", "0.4583915", "0.4583643", "0.45813102", "0.45647085", "0.45587438", "0.45557836", "0.45550627", "0.45528212", "0.4551535", "0.45478696", "0.4546046", "0.45363608", "0.45340452", "0.45338908", "0.45275423" ]
0.0
-1
/ SR SKU Mapping
public function getSRID ( $product_line_id ) { $this->db->select( 'emp_id' ); $this->db->from( 'tbli_db_house_emp_product_line_mapping' ); $this->db->where( 'pl_id', $product_line_id ); $query = $this->db->get()->result_array(); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProductSKU()\n {\n }", "function generateSku(){\n\t\t$characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$sku = mt_rand(10000, 99999) . mt_rand(10000, 99999) . $characters[mt_rand(0, strlen($characters) - 1)];\n\t\treturn str_shuffle($sku);\n\t}", "public function setSku($sku);", "public function getSKU()\n {\n return $this->sKU;\n }", "public function check_correct_sku_mapping($batch_id, $using_master_sku=false);", "public function getSku();", "public function getSku();", "public function getProductSKUQuantityMap() {\n $output = array();\n $products = $this->getFieldItems('commerce_product');\n $quantity = $this->getEntity()->quantity;\n\n $product_ids = array();\n foreach ($products as $product) {\n $product_ids[] = $product['product_id'];\n }\n\n $commerce_products = commerce_product_load_multiple($product_ids);\n\n foreach ($commerce_products as $product_id => $product) {\n $sku = $product->sku;\n if (array_key_exists($sku, $output)) {\n $output[$sku] += $quantity;\n }\n else {\n $output[$sku] = $quantity;\n }\n }\n\n return $output;\n }", "public function getSku()\n {\n return $this->sku;\n }", "public function getSKU()\n {\n return $this->getValue('nb_catalog_item_lang_sku');\n }", "public function getSkuId()\n {\n return $this->skuId;\n }", "public function generateProductSKU()\n {\n return $this->skuString . int_random();\n }", "public function generatesku()\n {\n $newsku = 111111;\n //We need to generate a random sku number that does not already exist\n $exists = true;\n $newsku = mt_rand(100000,999999);\n do {\n $product = $this->Product->findBysku($newsku);\n if(empty($product))\n $exists = false;\n } while($exists);\n return $newsku;\n }", "public function sku()\n {\n return $this->belongsTo(Productos::class, 'fk_id_sku', 'id_sku');\n }", "private function changesku(){\t \r\n\t $this->chartValue(); //adding to output\r\n\t $this->idleStHealthChk(); //adding to output\r\n\t}", "protected function addSkuPkMapping(array $product)\n {\n $this->addSkuEntityIdMapping($product[MemberNames::SKU], $product[MemberNames::ENTITY_ID]);\n }", "public function getSku() {\n return $this->_sku;\n }", "public function setSKU($sku) {\r\n $this->_data['SKU'] = $sku;\r\n return $this;\r\n }", "public function getItemSku();", "public function hydrate_skus_form()\n {\n // Get entity manager\n $em = EntityManagerSingleton::getInstance();\n\n // Get product options\n $sku_info = [];\n $options = $em->getRepository('Library\\Model\\Product\\Option')->findByProduct($this->product_id);\n\n $sku_info['product_options'] = $options;\n\n // Get skus\n $sku_info['skus'] = $this->product->getSkus();\n\n // Get status options\n $sku_info['status_options'] = $this->status_options;\n\n return $sku_info;\n }", "public function mapSku($pId, $options, $throwExceptionOnNomatch = true)\n\t{\n\t\t// Find the number of options required for this product\n\t\t$sql = \"SELECT COUNT(pog.`ogId`) AS cnt FROM `#__storefront_product_option_groups` pog WHERE pog.`pId` = '{$pId}'\";\n\n\t\t/*\n\t\t$sql = \"SELECT COUNT(s.`sId`) AS cnt FROM `#__storefront_skus` s\n\t\t\t\tINNER JOIN `#__storefront_sku_options` so ON s.`sId` = so.`sId`\n\t\t\t\tWHERE s.`pId` = '{$pId}' AND s.`sActive` > 0\n\t\t\t\tGROUP BY s.`sId` ORDER BY cnt DESC LIMIT 1\";\n\t\t*/\n\t\t$this->_db->setQuery($sql);\n\t\t$this->_db->execute();\n\n\t\tif ($this->_db->getNumRows() < 1)\n\t\t{\n\t\t\t$totalOptionsRequired = 0;\n\t\t}\n\t\telse {\n\t\t\t$totalOptionsRequired = $this->_db->loadResult();\n\t\t}\n\n\t\tif (!empty($options) && $totalOptionsRequired > count($options))\n\t\t{\n\t\t\tthrow new \\Exception(Lang::txt('COM_STOREFRONT_NOT_ENOUGH_OPTIONS'));\n\t\t}\n\n\t\t// find if there is a SKU match\n\t\tif (!empty($options))\n\t\t{\n\t\t\t$skuOptionsSql = '(0';\n\t\t\tforeach ($options as $oId)\n\t\t\t{\n\t\t\t\t$skuOptionsSql .= \" OR so.`oId` = '{$oId}'\";\n\t\t\t}\n\t\t\t$skuOptionsSql .= ')';\n\t\t}\n\n\t\t$sql = \"SELECT s.`sId`, COUNT(so.`oId`) AS matches FROM `#__storefront_skus` s\n\t\t\t\tLEFT JOIN `#__storefront_sku_options` so ON s.`sId` = so.`sId`\n\t\t\t\tWHERE s.`pId` = '{$pId}' AND s.sActive > 0\";\n\t\tif (!empty($options))\n\t\t{\n\t\t\t$sql .= \" AND {$skuOptionsSql}\";\n\t\t}\n\t\t$sql .= \" GROUP BY s.`sId` HAVING matches = {$totalOptionsRequired}\";\n\n\t\t$this->_db->setQuery($sql);\n\t\t$sId = $this->_db->loadObject();\n\n\t\tif ($sId)\n\t\t{\n\t\t\treturn $sId->sId;\n\t\t}\n\n\t\t// no match\n\t\tif ($throwExceptionOnNomatch)\n\t\t{\n\t\t\tthrow new \\Exception(Lang::txt('COM_STOREFRONT_SKU_NOT_FOUND'));\n\t\t}\n\t\treturn false;\n\t}", "public function getSKUPartsData() {\n $partsData = DB::table('part_number')->select('SKU', 'id')->get();\n $sku = '';\n $sku .=\"<option value='\" . '' . \"' selected='selected' > select sku</option>\";\n foreach ($partsData as $key => $value) {\n $sku .=\"<option value='\" . $value->id . \"'>\" . $value->SKU . \"</option>\";\n }\n return $sku;\n }", "function getSkus() {\n\techo \"Getting Skus </br>\";\n\t$response = getRequest('/api/sku');\n\tprintInfo($response);\n}", "public function getProductBySku($sku);", "public function setSkus($s)\n {\n if (is_string($s)) {\n $s = [$s];\n }\n if (is_array($s)) {\n $this->resetASINs();\n $this->resetSKUs();\n $i = 1;\n foreach ($s as $x) {\n $this->options['SellerSKUList.Id.'.$i] = $x;\n $i++;\n }\n } else {\n return false;\n }\n }", "public function getSkuId(): int\n {\n return $this->skuId;\n }", "public function testGetSku()\n {\n $data_from_collection = $this->data['annual_collection'];\n $this->assertEquals(\n $data_from_collection['attributes']['plan_sku'],\n $this->makePlan($data_from_collection)->getSku()\n );\n\n $data_from_site = $this->data['annual_site'];\n $this->assertEquals($data_from_site['sku'], $this->makePlan($data_from_site)->getSku());\n }", "public function saveSkins()\n {\n \\XLite\\Core\\Database::getCacheDriver()->save(\n get_called_class() . '.SubstitutonalSkins',\n $this->resourcesCache\n );\n }", "public function findProduct(\r\n $sku\r\n, $name = null\r\n, $skuMatchMode = 'IGNORE_DASH'\r\n, $baseSkuSearchFlag = true\r\n) { \r\n global $baseSkuAttributeId;\r\n\t$sku = str_replace('\\'', '', $sku);\r\n\t$sku = str_replace('\\\\', '', $sku);\r\n\t$sku = trim($sku, '()');\r\n\t$resource = Mage::getSingleton('core/resource');\r\n\t$readConnection = $resource->getConnection('core_read');\r\n\t$table = $resource->getTableName('catalog/product');\r\n $findResult = array('search_mask' => null, 'product_data' => array(), \r\n 'no_base_sku_count' => 0, 'base_sku_count' => 0\r\n );\r\n\t// try to match words\r\n\tif (strlen($sku) >=4) { \r\n if ($skuMatchMode == 'LEFT') { \r\n $findResult['search_mask'] = \" \" . $sku . \" %\";\r\n $searchExpression = \"concat(' ', sku, ' ') like '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'LEFT_IGNORE_DASH') { \r\n $findResult['search_mask'] = str_replace('-', ' ', \" \" . $sku . \" %\");\r\n $searchExpression = \"concat(' ', replace(sku, '-', ' '), ' ') like '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'EXACT') { \r\n $findResult['search_mask'] = $sku;\r\n $searchExpression = \"sku = '\" . $findResult['search_mask'] . \"'\";\r\n } else if ($skuMatchMode == 'IGNORE_DASH') { \r\n $findResult['search_mask'] = str_replace('-', ' ', $sku);\r\n $searchExpression = \"replace(sku, '-', ' ') = '\" . $findResult['search_mask'] . \"'\";\r\n } else {\r\n throw new Exception('Uknown skuMatchMode: \"' . $skuMatchMode . '\"');\r\n } \r\n $findResult['product_data'] = $readConnection->fetchAll(\r\n \"select entity_id as product_id, sku \r\n from \" . $table . \" p\r\n where \r\n -- website SKU is at the beginning\r\n \" . $searchExpression\r\n );\r\n if ($baseSkuSearchFlag) { \r\n // add base sku search\r\n if (!isset($baseSkuAttributeId)) {\r\n $baseSkuAttributeId = $readConnection->fetchOne(\r\n \"select attribute_id from eav_attribute where attribute_code = 'base_sku'\"\r\n );\r\n } \r\n $baseSkuResult = \r\n $readConnection->fetchAll( \r\n \"select \r\n entity_id as product_id\r\n , (select sku from catalog_product_entity p where p.entity_id = v.entity_id) as sku\r\n , value as base_sku\r\n from\r\n catalog_product_entity_varchar v\r\n where \r\n -- source sku is like (contains) base sku\r\n -- replace dashes with spaces\r\n ' \" . str_replace('-', ' ', $sku) . \" ' \r\n like concat('% ', replace(value, '-', ' '), ' %')\r\n and v.attribute_id = \" . $baseSkuAttributeId \r\n );\r\n $findResult['no_base_sku_count'] = count($findResult['product_data']); \r\n if (count($baseSkuResult) > 0) {\r\n $findResult['base_sku_count'] = count($baseSkuResult);\r\n $findResult['product_data'] = array_merge($findResult['product_data'], $baseSkuResult);\r\n $findResult['search_mask'] = $findResult['search_mask'] . \" && base_sku\";\r\n $this->logMessage('baseSkuResult: count=' . count($baseSkuResult));\r\n }\r\n }\r\n\t}\t\r\n\tif (!empty($name) && count($findResult['product_data']) == 0) { \r\n\t $words = explode(' ', strtr(trim($name), '-:', ' '));\r\n\t foreach ($words as $word) { \r\n\t\t$findResult = findProduct($word, null, $skuMatchMode, $baseSkuSearchFlag);\r\n\t\t// For name words allow only one match\r\n\t\tif (count($findResult['product_data']) == 1) { \r\n\t\t return $findResult;\r\n\t\t} \r\n\t } \r\n\t} \r\n\treturn $findResult;\r\n}", "private function prepareNewSkuData($sku)\n {\n $data = [];\n foreach ($this->getExistingSku($sku) as $key => $value) {\n $data[$key] = $value;\n }\n\n $data['attr_set_code'] = $this->_attrSetIdToName[$this->getExistingSku($sku)['attr_set_id']];\n\n return $data;\n }", "private function getSkuSelectionList() {\r\n //$this->jsonOutput[\"skuSelectionList\"] = $this->settingVars->pageArray[\"SKU_SELECTION_LIST\"];\r\n\t\tif(isset($this->jsonOutput[\"settings\"]['sku_settings']) && $this->jsonOutput[\"settings\"]['sku_settings'] != \"\")\r\n\t\t\t$this->jsonOutput[\"skuSelectionList\"] = $this->jsonOutput[\"settings\"]['sku_settings'];\r\n }", "private function getExistingSku($sku)\n {\n return $this->_oldSku[strtolower($sku)];\n }", "public function getSku()\n {\n $skuAttribute = $this->helper->getSkuConfig();\n\n return $this->getAttribute($skuAttribute);\n }", "public function setSKU($sKU)\n {\n $this->sKU = $sKU;\n return $this;\n }", "public function getMap() {\n return [\n 'sku' => 'itemNo',\n 'shortDescription' => 'description',\n 'longDescription' => 'description2',\n 'measurementUnit' => 'unitOfMeasure',\n 'mpn' => 'vendorItemNo',\n 'ean' => 'eanNo',\n ];\n }", "public function skus()\n {\n return $this->hasMany('App\\Models\\Sku');\n }", "function wc_ru_regions_add_counties( $states ) {\n\n $states['RU'] = array(\n 'AD' => 'Республика Адыгея (Адыгея)',\n 'BA' => 'Республика Башкортостан',\n 'BU' => 'Республика Бурятия',\n 'AL' => 'Республика Алтай',\n 'DA' => 'Республика Дагестан',\n 'IN' => 'Республика Ингушетия',\n 'KABA' => 'Кабардино-Балкарская Республика',\n 'KA' => 'Республика Калмыкия',\n 'KACH' => 'Карачаево-Черкесская Республика',\n 'KAR' => 'Республика Карелия',\n 'KOM' => 'Республика Коми',\n 'MAR' => 'Республика Марий Эл',\n 'MOR' => 'Республика Мордовия',\n 'SAH' => 'Республика Саха (Якутия)',\n 'SEV' => 'Республика Северная Осетия - Алания',\n 'TAT' => 'Республика Татарстан (Татарстан)',\n 'TI' => 'Республика Тыва',\n 'UD' => 'Удмуртская Республика',\n 'HA' => 'Республика Хакасия',\n 'CHE' => 'Чеченская Республика',\n 'CHU' => 'Чувашская Республика - Чувашия',\n 'ALT' => 'Алтайский край',\n 'KRD' => 'Краснодарский край',\n 'KRY' => 'Красноярский край',\n 'PRI' => 'Приморский край',\n 'STA' => 'Ставропольский край',\n 'HAB' => 'Хабаровский край',\n 'AM' => 'Амурская область',\n 'AR' => 'Архангельская область',\n 'AS' => 'Астраханская область',\n 'BE' => 'Белгородская область',\n 'BR' => 'Брянская область',\n 'VL' => 'Владимирская область',\n 'VG' => 'Волгоградская область',\n 'VOG' => 'Вологодская область',\n 'VR' => 'Воронежская область',\n 'IV' => 'Ивановская область',\n 'IR' => 'Иркутская область',\n 'KON' => 'Калининградская область',\n 'KLG' => 'Калужская область',\n 'KM' => 'Камчатский край',\n 'KE' => 'Кемеровская область',\n 'KI' => 'Кировская область',\n 'KO' => 'Костромская область',\n 'KU' => 'Курганская область',\n 'KUR' => 'Курская область',\n 'LEO' => 'Ленинградская область',\n 'LI' => 'Липецкая область',\n 'MA' => 'Магаданская область',\n 'MO' => 'Московская область',\n 'MU' => 'Мурманская область',\n 'NI' => 'Нижегородская область',\n 'NO' => 'Новгородская область',\n 'NOV' => 'Новосибирская область',\n 'OM' => 'Омская область',\n 'OR' => 'Оренбургская область',\n 'ORL' => 'Орловская область',\n 'PEN' => 'Пензенская область',\n 'PER' => 'Пермский край',\n 'PS' => 'Псковская область',\n 'RO' => 'Ростовская область',\n 'RY' => 'Рязанская область',\n 'SA' => 'Самарская область',\n 'SAR' => 'Саратовская область',\n 'SHL' => 'Сахалинская область',\n 'SV' => 'Свердловская область',\n 'SM' => 'Смоленская область',\n 'TA' => 'Тамбовская область',\n 'TV' => 'Тверская область',\n 'TO' => 'Томская область',\n 'TU' => 'Тульская область',\n 'TY' => 'Тюменская область',\n 'UL' => 'Ульяновская область',\n 'CH' => 'Челябинская область',\n 'ZA' => 'Забайкальский край',\n 'YA' => 'Ярославская область',\n 'DC' => 'г. Москва',\n 'LE' => 'Санкт-Петербург',\n 'EV' => 'Еврейская автономная область',\n 'NE' => 'Ненецкий автономный округ',\n 'HAN' => 'Ханты-Мансийский автономный округ - Югра',\n 'CHK' => 'Чукотский автономный округ',\n 'YM' => 'Ямало-Ненецкий автономный округ',\n 'KRM' => 'Республика Крым',\n 'SVS' => 'Севастополь',\n 'OTH' => 'Иные территории, включая город и космодром Байконур',\n );\n return $states;\n\n}", "public function getSku() {\n return $this->item->getSku();\n }", "private function getSkusFromResults($results)\n {\n // Get entity manager\n $em = EntityManagerSingleton::getInstance();\n\n $sku_ids = [];\n\n if (!empty($results))\n {\n foreach ($results as $result)\n {\n $sku_ids[] = $result['sku_id'];\n }\n }\n\n $skus = $em->getRepository('Library\\Model\\Product\\Sku')->findBy(['id' => $sku_ids]);\n return $skus;\n }", "public function getSku()\n {\n return 'Tomato';\n }", "public function scan(string $sku)\n {\n $this->addProduct($sku);\n }", "function SkuFromID($parametro){\n\t$db = new mysql();\n\t\n\t$result = $db->consulta(\"SELECT IDPRODUCTO,FECHA FROM \".PREFIX.\"productos WHERE IDPRODUCTO='\".$parametro.\"' LIMIT 1\");\n\t$row = $db->recuperar_array($result);\t\n\t$sku = $row['PRESKU'].$parametro;\n\treturn $sku;\n}", "public function getSkuName ()\n {\n $sql = \" SELECT t1.id,sku_name,sku_description,sku_code,sku_weight_id,sku_lpc,sku_volume,sku_launch_date,t8.sku_type_name,\n GROUP_CONCAT(t5.unit_name SEPARATOR '<br /><br />') AS unit,t2.quantity,\n GROUP_CONCAT(ROUND(t2.db_lifting_price,2) SEPARATOR '<br /><br />') as db_lifting_price ,\n GROUP_CONCAT(ROUND(t2.outlet_lifting_price,2) SEPARATOR '<br /><br />') AS outlet_lifting_price,\n GROUP_CONCAT(ROUND(t2.mrp_lifting_price,2) SEPARATOR '<br /><br /> ') AS mrp_lifting_price ,\n t3.element_name,t4.sku_active_status_name,t5.unit_name,t6.element_name as product,\n t7.element_name as catagory\n FROM tbld_sku AS t1\n INNER JOIN\n `tbli_sku_mou_price_mapping` AS t2\n ON t1.id = t2.sku_id\n INNER JOIN\n tbld_sku_active_status AS t4\n ON t1.sku_active_status_id = t4.id\n INNER JOIN\n tbld_sku_hierarchy_elements AS t3\n ON t1.parent_id = t3.id\n INNER JOIN\n tbld_unit AS t5\n ON t5.id= t2.mou_id\n left join tbld_sku_hierarchy_elements as t6\n on t6.id = t3.parent_element_id\n left join tbld_sku_hierarchy_elements as t7\n on t7.id = t6.parent_element_id\n left Join `tbld_sku_type` as t8\n On t1.sku_type_id=t8.id\n GROUP BY t2.sku_id\n ORDER BY t2.sku_id,t2.quantity asc\";\n $query = $this->db->query( $sql )->result_array();\n return $query;\n }", "protected function addSkuStoreViewCodeMapping($sku, $storeViewCode)\n {\n $this->getSubject()->addSkuStoreViewCodeMapping($sku, $storeViewCode);\n }", "public function generateSku()\n {\n $number=mt_rand(1000,9999);\n if($this->checkSku($number)){\n return $this->generateSku();\n }\n return (string)$number;\n }", "public function getSku()\n {\n if (is_null($this->sku)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_SKU);\n if (is_null($data)) {\n return null;\n }\n $this->sku = (string) $data;\n }\n\n return $this->sku;\n }", "public function getUniqueKey()\n\t{\n\t\t$product = $this->getCurrent();\n\t\t\n\t\tif (is_null($product)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$sku = $product->getSku();\n\t\tMage::log(\"Got SKU: $sku\");\n\t\t\n\t\treturn $sku;\n\t}", "public function get_product_attributes() : array {\n\t\t$sku_wrapper = $this->dom->find( '#j-product-info-sku' );\n\t\tif ( 1 > count( $sku_wrapper ) ) {\n\t\t\treturn [\n\t\t\t\t'attributes' => [],\n\t\t\t];\n\t\t}\n\n\t\t$sku_sets = $sku_wrapper[0]->find( '.p-property-item' );\n\t\t$sku_data = [];\n\t\tfor ( $i = 0; $i < count( $sku_sets ); $i++ ) { // @codingStandardsIgnoreLine Count is lightweight\n\t\t\t// Drop it into a var so it can be looped.\n\t\t\t$sku_set = $sku_sets[ $i ];\n\n\t\t\t// Get the variation label.\n\t\t\t$label = $sku_set->find( '.p-item-title' )[0]->text();\n\t\t\t$label = trim( str_replace( ':', '', $label ) );\n\n\t\t\t// Get the error now.\n\t\t\t$msg_error = trim( $sku_set->find( '.sku-msg-error' )[0]->text() );\n\n\t\t\t// Get all sku props\n\t\t\t$sku_props = $sku_set->find( '.sku-attr-list' );\n\n\t\t\t// Get the sku prop ID, for later use.\n\t\t\t$sku_prop_id = $sku_props[0]->attr( 'data-sku-prop-id' );\n\n\t\t\t$skus = [];\n\t\t\t$sku_children = $sku_props[0]->find( 'li' );\n\t\t\tfor ( $y = 0; $y < count( $sku_children ); $y++ ) { // @codingStandardsIgnoreLine Count is lightweight\n\t\t\t\t// Saves typing later.\n\t\t\t\t$child = $sku_children[ $y ];\n\n\t\t\t\t// Get the anchor object.\n\t\t\t\t$anchor = $child->find( 'a[^data-role=sku]' );\n\t\t\t\tif ( 1 > count( $anchor ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Get the sku properties from the anchor.\n\t\t\t\t$id = $anchor[0]->getAttribute( 'data-sku-id' );\n\n\t\t\t\t// @TODO: Seems to be auto-updated somehow through the JS.\n\t\t\t\t$spm_anchor_id = $anchor[0]->getAttribute( 'data-spm-anchor-id' );\n\n\t\t\t\t$image = $anchor[0]->find( 'img' );\n\t\t\t\tif ( 1 > count( $image ) ) {\n\t\t\t\t\t// This isn't an image-based SKU.\n\t\t\t\t\t$sku_label = trim( $anchor[0]->text() );\n\t\t\t\t} else {\n\t\t\t\t\t// This is an image-based SKU, return the image URL and additional data.\n\t\t\t\t\t$sku_label = $image[0]->getAttribute( 'title' );\n\n\t\t\t\t\t// @TODO: Seems to be auto-updated somehow through the JS.\n\t\t\t\t\t$img_spm_anchor_id = $image[0]->getAttribute( 'data-spm-anchor-id' );\n\t\t\t\t\t$src = $image[0]->getAttribute( 'src' );\n\t\t\t\t\t$big_pic = $image[0]->getAttribute( 'bigpic' );\n\t\t\t\t}\n\n\t\t\t\t$sku = compact( 'id', 'sku_label', 'spm_anchor_id' );\n\t\t\t\tif ( 1 <= count( $image ) ) {\n\t\t\t\t\t$sku['image'] = compact( 'src', 'big_pic', 'img_spm_anchor_id' );\n\t\t\t\t}\n\n\t\t\t\t$skus[] = $sku;\n\t\t\t}\n\n\t\t\t$sku_data[] = compact( 'sku_prop_id', 'label', 'msg_error', 'skus' );\n\t\t}\n\t\treturn [ 'attributes' => $sku_data ];\n\t}", "function getVendorMapping($iUserID)\r\n {\r\n $aVendorMapping = array();\r\n $sSQL = \"SELECT \".vendor_orig.\",\".vendor_preferred.\" FROM \".vendor_mapping.\" WHERE \".user_id.\"=\".sFix($iUserID);\r\n $pData = mysql_query($sSQL);\r\n if (!mysql_error())\r\n {\r\n while ($pRow = mysql_fetch_array($pData))\r\n {\r\n $aVendorMapping[$pRow[vendor_orig]] = $pRow[vendor_preferred];\r\n }\r\n }\r\n return $aVendorMapping;\r\n }", "protected function getPrimaryKeyColumnName()\n {\n return ColumnKeys::SKU;\n }", "protected function createVariantsMap()\n {\n return $this->variantsMap;\n }", "function display_sku_as_meta_data( $item, $order ) {\n\t\t\t$product = BEWPI_WC_Order_Compatibility::get_product( $order, $item );\n\t\t\t$sku = $product && BEWPI_WC_Product_Compatibility::get_prop( $product, 'sku' ) ? BEWPI_WC_Product_Compatibility::get_prop( $product, 'sku' ) : '-';\n\t\t\t?>\n\t\t\t<br>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<strong><?php esc_html_e( 'SKU:', 'woocommerce-pdf-invoices' ); ?></strong> <?php echo esc_html( $sku ); ?>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<?php\n\t\t}", "function get_products_array( $sku ) {\n global $wpdb;\n $sku = implode(',' , $sku);\n $products = $wpdb->get_results( \"SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value IN ({$sku}) \");\n if ( $products ) return $products;\n return null;\n}", "protected function addSkuToPkMapping($sku, $pk)\n {\n $this->getSubject()->addSkuToPkMapping($sku, $pk);\n }", "public function generateSKU()\n {\n $number=mt_rand(1000,999999);\n if ($this->checkSKU($number)){\n return $this->generateSKU();\n }\n return (string)$number;\n }", "public function getList($sku);", "public function getSellerSKU() \n {\n return $this->_fields['SellerSKU']['FieldValue'];\n }", "public static function getCustomsku($product_id)\n {\n $custom_sku = 'ced-'.$product_id;\n return $custom_sku;\n }", "public function generate_sku(int $product_id)\n {\n $ret_val = ['system_error' => false];\n\n try\n {\n $ret_val['sku'] = $this->productService->generateItemSkuFromProduct($product_id);\n }\n catch(\\Exception $ex)\n {\n $ret_val['system_error'] = $ex->getMessage();\n }\n\n return $ret_val;\n }", "function wc_importer_shopify_special_mappings( $mappings, $raw_headers ) {\n\t// Only map if this is looks like a Shopify export.\n\tif ( 0 !== count( array_diff( array( 'Title', 'Body (HTML)', 'Type', 'Variant SKU' ), $raw_headers ) ) ) {\n\t\treturn $mappings;\n\t}\n\t$shopify_mappings = array(\n\t\t'Option%d Name' => 'attributes:name',\n\t\t'Option%d Value' => 'attributes:value',\n\t);\n\treturn array_merge( $mappings, $shopify_mappings );\n}", "public function setSku($sku) {\n $this->_sku = $sku;\n return $this;\n }", "function addVendorMapping($sVendorOrig, $sVendorPreferred, $iUserID)\r\n {\r\n $sSQL = \"INSERT INTO \".vendor_mapping.\" VALUES (\".sFix($iUserID).\", \".sFix($sVendorOrig).\", \".sFix($sVendorPreferred).\")\";\r\n $pData = mysql_query($sSQL);\r\n if (!mysql_error())\r\n {\r\n return TRUE;\r\n }\r\n else\r\n {\r\n return FALSE;\r\n }\r\n }", "public function getSkins(): array;", "public function getSku()\n {\n return $this->getTypeInstance(true)->getSku($this);\n }", "public static function prepareProduct($product, $sku_id = 0)\n {\n // Текущая валюта\n $current_cur = wa('shop')->getConfig()->getCurrency(false);\n // Основная валюта\n $primary_cur = wa('shop')->getConfig()->getCurrency(true);\n\n if ($sku_id) {\n $sku = (new shopProductSkusModel())->getById($sku_id);\n // Если переданные данные совпадают\n if ($sku && $sku['product_id'] == $product['id']) {\n $product_currency = !empty($product['unconverted_currency']) ? $product['unconverted_currency'] : $product['currency'];\n $currency_rounding = shopFlexdiscountHelper::getSettings('currency_rounding');\n\n // Вызываем хук frontend_products\n $skus = array($sku['id'] => $sku);\n $event_params = array(\"skus\" => &$skus);\n wa('shop')->event('frontend_products', $event_params);\n $sku = reset($skus);\n $sku['product'] = $product;\n $sku['sku_id'] = $sku['id'];\n $sku['id'] = $sku['product_id'];\n $sku['quantity'] = !empty($product['quantity']) ? $product['quantity'] : 1;\n // Переводим цены товара в текущую валюту\n $sku['price'] = isset($sku['old_price']) ? $sku['old_price'] : $sku['price'];\n $sku['price'] = shop_currency($sku['price'], $product_currency, $current_cur, false);\n $sku['compare_price'] = isset($sku['old_compare_price']) ? $sku['old_compare_price'] : $sku['compare_price'];\n $sku['compare_price'] = shop_currency($sku['compare_price'], $product_currency, $current_cur, false);\n $sku['purchase_price'] = shop_currency($sku['purchase_price'], $product_currency, $current_cur, false);\n if (!empty($currency_rounding)) {\n $sku['price'] = shopRounding::roundCurrency($sku['price'], $current_cur);\n $sku['compare_price'] = shopRounding::roundCurrency($sku['compare_price'], $current_cur);\n $sku['purchase_price'] = shopRounding::roundCurrency($sku['purchase_price'], $current_cur);\n }\n if ($sku['compare_price'] == $sku['price']) {\n $sku['compare_price'] = 0;\n }\n // Сохраняем услуги, если они имеются\n if (!empty($product['services'])) {\n $sku['services'] = $product['services'];\n }\n $product = $sku;\n }\n } else {\n // Переводим цены товара в текущую валюту\n $product['price'] = isset($product['old_price']) ? $product['old_price'] : $product['price'];\n $product['price'] = shop_currency($product['price'], isset($product['old_price']) ? $current_cur : $primary_cur, $current_cur, false);\n\n $product['compare_price'] = isset($product['old_compare_price']) ? $product['old_compare_price'] : $product['compare_price'];\n $product['compare_price'] = shop_currency($product['compare_price'], isset($product['old_compare_price']) ? $current_cur : $primary_cur, $current_cur, false);\n if ($product['compare_price'] == $product['price']) {\n $product['compare_price'] = 0;\n }\n if (isset($product['purchase_price'])) {\n $product['purchase_price'] = shop_currency($product['purchase_price'], $primary_cur, $current_cur, false);\n }\n if (!isset($product['unconverted_currency'])) {\n $product['unconverted_currency'] = $product['currency'];\n }\n }\n\n $product['type'] = 'product';\n $product['currency'] = $current_cur;\n\n return $product;\n }", "private function papar_keputusan_stress($skor3){\n switch($skor3){\n case in_array($skor3, range(0,7)): $keputusan= 'NORMAL'; break;\n case in_array($skor3, range(8,9)): $keputusan= 'RINGAN'; break;\n case in_array($skor3, range(10,13)): $keputusan= 'SEDERHANA'; break;\n case in_array($skor3, range(14,17)): $keputusan= 'TERUK'; break;\n case ($skor3 >= 18 ): $keputusan= 'SANGAT TERUK'; break;\n }\t\t\n return $keputusan;\t\n }", "public function transform(ProductSKU $productSKU)\n {\n return [\n 'id' => (int) $productSKU['id'],\n 'product_id' => (int) $productSKU['product_id'],\n 'price' => $productSKU['price'],\n 'discount' => $productSKU['discount'],\n 'tax' => $productSKU['tax'],\n 'shipping_charge' => $productSKU['shipping_charge'],\n 'size' => $productSKU['size'],\n 'color' => $productSKU['color'],\n 'weight' => $productSKU['weight'],\n 'volume' => $productSKU['volume'],\n 'is_trending' => (bool) $productSKU['is_trending'],\n 'product_images' => $productSKU->ProductImages,\n 'product_stock' =>$productSKU->ProductStock,\n 'product' => $productSKU->product\n ];\n }", "private function papar_keputusan_enxiety($skor2){\n switch($skor2){\n case in_array($skor2, range(0,4)): $keputusan= 'NORMAL'; break;\n case in_array($skor2, range(5,6)): $keputusan= 'RINGAN'; break;\n case in_array($skor2, range(7,8)): $keputusan= 'SEDERHANA'; break;\n case in_array($skor2, range(9,10)): $keputusan= 'TERUK'; break;\n case ($skor2 >= 11 ): $keputusan= 'SANGAT TERUK'; break;\n }\t\t\n return $keputusan;\t\n }", "function getRegarInfo($_MaSK){\n\t\t$sql=\"SELECT sk.MaSK, sk.TieuDe, sk.HinhSK FROM sukien sk WHERE sk.MaCTGD = (SELECT sk1.MaCTGD FROM sukien sk1 WHERE sk1.MaSK = $_MaSK) AND sk.MaSK!=$_MaSK LIMIT 4\";\n\t\t$this->setQuery($sql);\n\t\treturn $this->loadAllRows();\n\t}", "public static function shipping_map() {\n\n\t\t$countryRegions = array();\n\t\t$regions = Region_Shipping::get();\n\t\tif ($regions && $regions->exists()) {\n\n\t\t\tforeach ($regions as $region) {\n\t\t\t\t$country = $region->Country();\n\t\t\t\t$countryRegions[$country->Code][$region->Code] = $region->Title;\n\t\t\t}\n\t\t}\n\t\treturn $countryRegions;\n\t}", "function get_profile_usrid($usrid){\r\n\t\r\n}", "public function store(Request $request)\n {\n switch($request->seccion) {\n case 'ortopedia':\n $sku = 'ORTO' . $request->categoria_abr . $request->producto_abr . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->categoria . ' '. $request->producto . ' ' . $request->marca . ' ' . $request->modelo . ' ' . $request->talla . ' ' . $request->unidad . ' ' . $request->color;\n break;\n case 'micas':\n $sku = 'MICA' . $request->familia_abr . $request->materiales_abr . $request->tipo_abr . $request->tratamiento_abr . $request->color_abr;\n $desc = $request->familia . ' ' . $request->materiales . ' ' . $request->tipo . ' ' . $request->tratamiento . ' ' . $request->color;\n break;\n case 'armazones':\n $sku = 'ARMA' . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->marca . ' ' . $request->modelo . ' ' . $request->color . ' ' . $request->medidas . ' '. $request->unidad;\n break;\n case 'contacto':\n $sku = 'CONT' . $request->categoria_abr . ' ' . $request->tipo_abr . $request->marca_abr . $request->periodo_abr;\n $desc = $request->categoria . ' ' . $request->tipo . ' ' . $request->marca . ' ' . $request->periodo;\n break;\n case 'generales':\n $sku = 'GRAL' . $request->producto_abr . $request->marca_abr . $request->modelo_abr . $request->color_abr;\n $desc = $request->producto . ' ' . $request->marca . ' ' . $request->modelo . ' ' . $request->color;\n break;\n default:\n break;\n }\n $sku = str_replace(' ', '', $sku);\n $request['sku_interno'] = $sku;\n $request['descripcion'] = $desc;\n $producto = Producto::create($request->all());\n $aux1 = $request->foto1 ? (Storage::putFileAs('productos/' . $request->seccion . '/' . $producto->id, $request->file('foto1'), 'foto1.jpg')) : null;\n $aux2 = $request->foto2 ? (Storage::putFileAs('productos/' . $request->seccion . '/' . $producto->id, $request->file('foto2'), 'foto2.jpg')) : null;\n $aux3 = $request->foto3 ? (Storage::putFileAs('productos/' . $request->seccion . '/' . $producto->id, $request->file('foto3'), 'foto3.jpg')) : null;\n $producto->foto1 = $aux1;\n $producto->foto2 = $aux2;\n $producto->foto3 = $aux3;\n $producto->save();\n $historial = new Historial(['tipo' => 'Alta de Producto', 'descripcion' => 'Producto registrado.']);\n $producto->historiales()->save($historial);\n return redirect()->route('productos.show', ['producto' => $producto]);\n }", "public function generate()\n {\n $skuCount = (int) Option::get(\"catalog.generator\", \"sku_count\");\n if($skuCount > 0)\n parent::generate();\n }", "private function aturan_beban_sks2($jenjang, $sks, $mhs, $kd_kelas='x0x'){\n\t\tif($kd_kelas=='x0x'){\n\t\t\t$jenis_mk = '';\n\t\t}else if($kd_kelas == 'TUGAS_AKHIR'){\n\t\t\t$jenis_mk = 'SKRIPSI';\n\t\t}else{\n\t\t\t$jenis_mk = $this->_cek_jenis_mk($kd_kelas);\n\t\t}\n\t\t\n\t\tswitch ($jenjang){\n\t\t\tcase \"S0\":{\n\t\t\t\tif($jenis_mk == 'SKRIPSI'){\n\t\t\t\t\tif($sks == 0) $rule_sks = 0; else $rule_sks = $mhs/6;\n\t\t\t\t}else{\n\t\t\t\t\t# rule pendidikan untuk jenjang DI/DII/DIII/DIV\n\t\t\t\t\tif($mhs == 0) $rule_sks = 0;\n\t\t\t\t\telse if ($mhs <= 40) $rule_sks = $sks*1;\n\t\t\t\t\telse if ($mhs > 40 && $mhs <= 80) $rule_sks = $sks*1.5;\n\t\t\t\t\telse $rule_sks = $sks*2;\n\t\t\t\t}\n\t\t\t}break;\n\t\t\tcase \"S1\":{\n\t\t\t\tif($jenis_mk == 'SKRIPSI'){\n\t\t\t\t\tif($sks == 0) $rule_sks = 0; else $rule_sks = $mhs/6;\n\t\t\t\t}else{\n\t\t\t\t\t# rule pendidikan untuk jenjang S1 bukan TA\n\t\t\t\t\tif($mhs == 0) $rule_sks = 0;\n\t\t\t\t\telse if ($mhs <= 40) $rule_sks = $sks*1;\n\t\t\t\t\telse if ($mhs > 40 && $mhs <= 80) $rule_sks = $sks*1.5;\n\t\t\t\t\telse $rule_sks = $sks*2;\n\t\t\t\t}\n\t\t\t}break;\n\t\t\tcase \"S2\":{\n\t\t\t\tif($jenis_mk == 'SKRIPSI'){\n\t\t\t\t\tif($sks == 0) $rule_sks = 0; else $rule_sks = $mhs/3;\n\t\t\t\t}else{\n\t\t\t\t\t# rule pendidikan untuk jenjang S2\n\t\t\t\t\tif ($mhs <= 25) $rule_sks = $sks*1;\n\t\t\t\t\telse if ($mhs > 25 && $mhs <= 50) $rule_sks = $sks*1.5;\n\t\t\t\t\telse $rule_sks = $sks*2;\n\t\t\t\t}\n\t\t\t}break;\n\t\t\tcase \"S3\":{\n\t\t\t\tif($jenis_mk == 'SKRIPSI'){\n\t\t\t\t\tif($sks == 0) $rule_sks = 0; else $rule_sks = $mhs/2;\n\t\t\t\t}else{\n\t\t\t\t\t# rule pendidikan untuk jenjang S2\n\t\t\t\t\tif ($mhs <= 25) $rule_sks = $sks*1;\n\t\t\t\t\telse if ($mhs > 25 && $mhs <= 50) $rule_sks = $sks*1.5;\n\t\t\t\t\telse $rule_sks = $sks*2;\n\t\t\t\t}\n\t\t\t}break;\n\t\t}\n\t\treturn $rule_sks;\n\t}", "protected function getSkus($product)\n {\n $skus = parent::getSkus($product);\n\n foreach ($product->getVariants() as $variant) {\n $skus[] = $variant->getSku();\n }\n\n return $skus;\n }", "function nova_bs_fusion_apply_group_nova_bs_skins_info() {\n $groups = array();\n $groups['region_specific'] = array(\n 'title' => t('Region specific'),\n 'description' => t('Skins dependent on content'),\n 'weight' => 20,\n );\n\n return $groups;\n}", "public function dataProviderRetrieveSkuById()\n {\n return [\n [\n null,\n 2,\n ['sku_1' => [1 => 1]]\n ],\n [\n 'sku_1',\n 1,\n ['sku_1' => [1 => 1]]\n ],\n [\n null,\n 1,\n ['sku_1' => [2 => 1]]\n ],\n ];\n }", "public function getSkuArrAt($offset)\n {\n return $this->get(self::sku_arr, $offset);\n }", "public function __construct ( $user_sph_map=array (), $user_attr_map=array() )\r\n\t{\r\n\t\t$this->_user_sph_map = array_change_key_case (\r\n\t\t\tarray_map ( 'strtolower', $user_sph_map ),\r\n\t\t\tCASE_LOWER\r\n\t\t);\r\n\t\t$this->_user_attr_map = array_change_key_case (\r\n\t\t\tarray_map ( 'strtolower', $user_attr_map ),\r\n\t\t\tCASE_LOWER\r\n\t\t);\r\n\t\t$this->_qts = array ();\r\n\t\t$this->_raw = '';\r\n\t}", "public function getProductIds($sku)\n\t{\n\t\t$tname=$this->tablename(\"catalog_product_entity\");\n\t\t$result=$this->selectAll(\n\t\t\"SELECT sku,entity_id as pid,attribute_set_id as asid FROM $tname WHERE sku=?\",\n\t\t$sku);\n\t\tif(count($result)>0)\n\t\t{\n\t\t\treturn $result[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private function getProductQuery(string $sku): string\n {\n return <<<QUERY\n{\n products(search: \"{$sku}\") {\n items {\n sku\n ... on BundleProduct {\n items {\n sku\n option_id\n uid\n required\n type\n title\n options {\n uid\n label\n product {\n sku\n }\n can_change_quantity\n id\n uid\n price\n quantity\n }\n }\n }\n }\n }\n}\nQUERY;\n }", "public function map() {\n\n $item = $this->item;\n $map = [];\n\n $map['id_inmueble'] = $item['id'];\n $map['referencia'] = $item['reference'];\n\n //Opcional Agency data\n $map['id_sucursal'] = ''; //site id?\n $map['propietario'] = '';\n $map['email_sucursal'] = '';\n $map['email_comercializadora'] = $this->config['email'];\n //Opcional\n\n $map['venta_01'] = $this->isSale() ? 1 : 0;\n $map['alquiler_01'] = $this->isRent() ? 1 : 0;\n $map['alquiler_opcion_venta_01'] = 0;\n $map['traspaso_01'] = $this->isTransfer() ? 1 : 0;\n $map['alquiler_temporada_01'] = 0;\n\n $map['precio_venta'] = $this->isSale() ? $item['price'] : 0;\n $map['precio_alquiler'] = $this->isRent() ? $item['price'] : 0;\n $map['precio_alquiler_opcion_compra'] = 0;\n $map['precio_traspaso'] = $this->isTransfer() ? $item['price'] : 0;\n $map['precio_alquiler_temporada'] = 0;\n\n list($tip_inm, $tipo, $tip_inm2, $subtipo) = $this->getTipos();\n $map['tipo'] = $tipo;\n $map['tip_inm'] = $tip_inm;\n $map['subtipo'] = $subtipo;\n $map['tip_inm2'] = $tip_inm2;\n\n list($provincia, $cod_prov) = $this->getProvincia();\n $map['provincia'] = $provincia;\n $map['cod_prov'] = $cod_prov;\n\n list($poblacion, $cod_pob) = $this->getPoblacion();\n $map['localidad'] = $poblacion;\n $map['cod_pob'] = $cod_pob;\n\n $map['ubicacion'] = $item['location']['address'];\n $map['cp'] = self::h($item['location']['zipcode']);\n\n list($zona, $cod_zona) = $this->getZone();\n $map['cod_zona'] = self::h($cod_zona);\n\n $map['banos'] = self::h($item['baths']);\n $map['aseos'] = self::h($item['toilettes']);\n $map['habitaciones'] = self::h($item['rooms']);\n\n $map['m2construidos'] = $item['size'] ? $this->convertSize($item['size']) : '';\n $map['m2utiles'] = $item['size_real'] ? $this->convertSize($item['size_real']) : '';\n $map['m2terraza'] = '';\n $map['m2jardin'] = '';\n $map['m2salon'] = '';\n\n $map['destacado'] = self::h($item['title'][$this->iso_lang]);\n $map['descripcion'] = self::h($item['description'][$this->iso_lang]);\n $map['calidades'] = '';\n $map['urbanizacion'] = '';\n $map['estadococina'] = '';\n $map['numeroplanta'] = '';\n $map['anoconstruccion'] = self::h($item['construction_year']);\n $map['gastoscomunidad'] = '';\n\n $map['garaje_01'] = self::b($item['features']['garage']);\n $map['terraza_01'] = self::b($item['features']['terrace']);\n $map['ascensor_01'] = self::b($item['features']['elevator']);\n $map['trastero_01'] = '';\n $map['piscina_01'] = self::b($item['features']['pool']);\n $map['buhardilla_01'] = '';\n $map['lavadero_01'] = '';\n $map['jardin_01'] = self::b($item['features']['garden']);\n $map['piscinacom_01'] = '';\n $map['eqdeportivos_01'] = '';\n $map['vistasalmar_01'] = '';\n $map['vistasalamontana_01'] = '';\n $map['vistasalaciudad_01'] = '';\n $map['cercatransportepub_01'] = '';\n $map['aireacondicionado_01'] = self::b($item['features']['air-conditioning']);\n $map['calefaccion_01'] = self::b($item['features']['heating']);\n $map['chimenea_01'] = '';\n $map['cocina_office'] = '';\n $map['despacho'] = '';\n $map['amueblado'] = self::b($item['features']['furnished']);\n $map['vigilancia'] = '';\n $map['escaparate'] = '';\n\n $map['m2_almacen'] = '';\n $map['m2_fachada'] = '';\n $map['centro_neg'] = '';\n $map['planta_diaf'] = '';\n $map['m2_terreno'] = $item['type'] == 'lot' ? $this->convertSize($item['size']) : '';\n $map['m2_industrial'] = $item['type'] == 'industrial' ? $this->convertSize($item['size']) : '';\n $map['m2_oficinas'] = '';\n $map['m_altura'] = '';\n $map['entrada_camion'] = '';\n $map['vestuarios'] = '';\n $map['edificable'] = '';\n $map['calif_energetica'] = self::h($item['ec']);\n $map['de_banco'] = '';\n\n $map['photos']['photo'] = $this->getImages();\n $map['videos'] = '';\n\n $map['videos_360']['video'] = $this->get_3d_url();\n\n $map['mapa']['latitud'] = self::h($item['location']['lat']);\n $map['mapa']['longitud'] = self::h($item['location']['lng']);\n $map['mapa']['zoom'] = 16; //14 15 16 17\n $map['mapa']['puntero'] = !empty($item['show_address']) && $item['show_address'] ? 1 : 0;\n\n $map['producto_premium'] = 0;\n $map['producto_destacado'] = 0;\n $map['producto_oportunidad'] = 0;\n\n return $map;\n }", "protected function _initSkus()\n {\n $this->skuProcessor->setTypeModels($this->_productTypeModels);\n $this->_oldSku = $this->skuProcessor->reloadOldSkus()->getOldSkus();\n return $this;\n }", "function getSNPsStrains($source_id){\n global $snp_service;$url=\"$snp_service?format=xml&str=1\";\n $xml = simplexml_load_file($url,null, LIBXML_NOCDATA);\n $strains=array();\n if($xml){\n $sources=$xml->children()->strain; $index=0; $count=count($sources);\n while($index < $count){$bg=\"\";\n $source=$sources[$index]; ++$index;$id= $source->children()->id;\n $name= $source->children()->name;\n $this_source=$source->children()->source;\n $strains[\"$name\"][\"id\"]=$id;\n if($this_source==$source_id) $strains[\"$name\"][\"display\"]=1;\n else $strains[\"$name\"][\"display\"]=0; \n }\n } \n return $strains; \n}", "protected function _mapProducts($data, $brandId, $shopId) {\n\n foreach ($data as $key => $product) {\n # Set initial score\n $score = Configure::read('Product.Score.initialScore');\n $specialScores = Configure::read('Product.Score.' . $data[$key]['Product']['country_code'] . '.byCategory');\n\n if (!empty($specialScores[$data[$key]['Product']['category_id']])) {\n $score = $specialScores[$data[$key]['Product']['category_id']];\n }\n\n # Find product ID\n $productId = $this->_getProductId($product['Product']['feed_sku'], $brandId, $shopId);\n\n if ($productId) {\n $this->_Product->id = $productId;\n\n $score = $this->_Product->field('score'); # Keep current score on update\n $data[$key]['Product']['id'] = $productId;\n }\n\n # Merge problematic fields due stata string length limitation\n $data[$key]['Product']['url'] .= @$data[$key]['Product']['url_1'];\n $data[$key]['Product']['url'] .= @$data[$key]['Product']['url_2'];\n\n $data[$key]['Product']['description'] .= @$data[$key]['Product']['description_1'];\n $data[$key]['Product']['description'] .= @$data[$key]['Product']['description_2'];\n $data[$key]['Product']['description'] .= @$data[$key]['Product']['description_3'];\n $data[$key]['Product']['description'] .= @$data[$key]['Product']['description_4'];\n $data[$key]['Product']['description'] .= @$data[$key]['Product']['description_5'];\n\n $data[$key]['Image'][0]['url'] .= @$data[$key]['Image'][0]['url_1'];\n $data[$key]['Image'][0]['url'] .= @$data[$key]['Image'][0]['url_2'];\n\n\n $data[$key]['Product']['score'] = $score;\n #$data[$key]['Product']['country_code'] = $this->_countryCode;\n $data[$key]['Product']['price_old'] = !empty($data[$key]['Product']['price_old']) ? $data[$key]['Product']['price_old'] : 0;\n $data[$key]['Product']['shipping_cost'] = !empty($data[$key]['Product']['shipping_cost']) ? $data[$key]['Product']['shipping_cost'] : 0;\n $data[$key]['Product']['status'] = 'disabled';\n $data[$key]['Product']['shop_id'] = $shopId;\n $data[$key]['Product']['brand_id'] = $brandId;\n $data[$key]['Product']['order'] = (float)mt_rand() / (float)mt_getrandmax();\n \n unset($data[$key]['Brand']);\n unset($data[$key]['FeedImport']); // Shouldn't be necessary\n }\n\n return $data;\n }", "public function getAssetMapping(Uuid $uuid);", "public function getSKU(): ?string\n {\n return isset($this->SKU) ? $this->SKU : null;\n }", "public function getNewSku($sku = null)\n {\n return $this->skuProcessor->getNewSku($sku);\n }", "public function getExternalSkuData ()\n {\n $sql = \"SELECT t1.id,t1.sku_name,t1.sku_creation_date,t1.sku_description,t3.sku_active_status_name,t4.unit_name FROM\n `tbld_sku` as t1 \n inner join `tbli_sku_mou_price_mapping` as t2 on t1.id=t2.sku_id\n left join `tbld_sku_active_status` as t3 on t1.sku_active_status_id=t3.id\n left join `tbld_unit` as t4 on t2.mou_id=t4.id\n where t1.sku_type_id=2\";\n $query = $this->db->query( $sql )->result_array();\n return $query;\n }", "public function importUsaLevelStates()\n {\n return $this->importData('USA_adm/USA_adm1.shp', 0);\n }", "public function setSellerSKU($value) \n {\n $this->_fields['SellerSKU']['FieldValue'] = $value;\n return $this;\n }", "protected function getSkuToPkMappingUtil()\n {\n return $this->skuToPkMappingUtil;\n }", "public static function get_product_id_by_sku($sku)\n {\n return wc_get_product_id_by_sku($sku);\n }", "public function setSku($sku)\n {\n $this->sku = $sku;\n\n return $this;\n }", "function localisation_sc_map() {\n\treturn vdsl_get_template( 'archive-retailers.php' );\n}", "public function importUsaLevelCountry()\n {\n return $this->importData('USA_adm/USA_adm0.shp', 0);\n }", "function retina($f, $si, $sj, $e, $spiking) {\n\t$count = array(); $num = $f;\n\tfor($i = $f; $i < 3 + $f; $i++)\n\t\tfor($j = $f; $j < 3 + $f; $j++) {\n\t\t\t$count[$i][$j] = $num;\n\t\t\t$num++;\n\t\t}\n\n\tfor($i = $si; $i < 2 + $si; $i++) {\n\t\tfor($j = $sj; $j < 2 + $sj; $j++) {\n\t\t\t$spiking->freshNode($count[$i][$j], array($e), \"\");\n\t\t}\n\t}\n}", "public function setSku(?string $value): void {\n $this->getBackingStore()->set('sku', $value);\n }", "function register_license_settings() {\n\t\t// creates our settings in the options table\n\t\tregister_setting( $this->get_settings_page_slug(), $this->product_slug . '-license-key', 'sanitize_license' );\n\t}", "public function __construct($_sKU = NULL,$_startPrice = NULL,$_quantity = NULL,$_variationSpecifics = NULL,$_quantitySold = NULL,$_sellingStatus = NULL,$_discountPriceInfo = NULL,$_any = NULL)\r\n\t{\r\n\t\tparent::__construct(array('SKU'=>$_sKU,'StartPrice'=>$_startPrice,'Quantity'=>$_quantity,'VariationSpecifics'=>($_variationSpecifics instanceof EbayShoppingStructNameValueListArrayType)?$_variationSpecifics:new EbayShoppingStructNameValueListArrayType($_variationSpecifics),'QuantitySold'=>$_quantitySold,'SellingStatus'=>$_sellingStatus,'DiscountPriceInfo'=>$_discountPriceInfo,'any'=>$_any));\r\n\t}", "public function skis()\n {\n return $this->hasMany('App\\Models\\Ski', 'personnel_no', 'personnel_no');\n }" ]
[ "0.58582574", "0.5853661", "0.58448863", "0.58376545", "0.579764", "0.5779383", "0.5779383", "0.5764133", "0.5730836", "0.56383586", "0.5626426", "0.5619818", "0.55911314", "0.5573953", "0.5527622", "0.5496251", "0.549089", "0.54848135", "0.54567075", "0.5446881", "0.54427326", "0.5440559", "0.5416475", "0.5408161", "0.5394425", "0.5333731", "0.528292", "0.52706206", "0.52405554", "0.52316296", "0.5220652", "0.5214182", "0.520351", "0.51991326", "0.51441175", "0.51287466", "0.51279414", "0.5111156", "0.5105792", "0.51016414", "0.5101031", "0.50998414", "0.5096516", "0.50946766", "0.5067459", "0.5062274", "0.50382334", "0.5038123", "0.50158906", "0.50081515", "0.49910498", "0.49901402", "0.49848446", "0.49837112", "0.49829987", "0.49776444", "0.4972245", "0.495556", "0.49526304", "0.4945814", "0.49441776", "0.49163797", "0.48902392", "0.48894694", "0.48516154", "0.4842899", "0.48381644", "0.48308793", "0.48120633", "0.47951594", "0.47869357", "0.47797585", "0.47619393", "0.47605163", "0.47350585", "0.47341987", "0.4726131", "0.47161978", "0.47126842", "0.46892634", "0.4682263", "0.4681783", "0.467777", "0.46695697", "0.46589395", "0.46545038", "0.46540856", "0.4642719", "0.4641741", "0.4636656", "0.4633227", "0.46290278", "0.4617648", "0.46155503", "0.4613856", "0.46135095", "0.45919958", "0.45874864", "0.45824137", "0.45804963", "0.45762128" ]
0.0
-1
/ Add Sku Unit
public function addSkuUnits ( $data ) { return $this->db->insert( 'tbld_unit', $data ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function changesku(){\t \r\n\t $this->chartValue(); //adding to output\r\n\t $this->idleStHealthChk(); //adding to output\r\n\t}", "public function setSku($sku);", "function fontunit($args) {\r\n\t\t$args['selections'] = array('px'=>'px','pt'=>'pt', 'em'=>'em');\r\n\t\t$args['multiple'] = false;\r\n\t\t$args['width'] = '60';\r\n\t\t$args['tooltip'] = 'Choose the units';\r\n\t\t$this->select($args);\r\n\t}", "function add_unit_to_army($unit_id, $army_id)\n\t{\n\t\t$result = pg_prepare(\"point_query\", \"SELECT init_point_cost FROM warhammer.unit_list WHERE unit_id=$1\");\n\t\t$result = pg_execute(\"point_query\", array($unit_id));\n\t\t$result_a = pg_fetch_array($result,0,PGSQL_ASSOC);\n\t\t$points = $result_a[\"init_point_cost\"];\n\t\t$result = pg_prepare(\"add_query\", \"INSERT INTO warhammer.user_army VALUES (DEFAULT,$1,null,$2)\");\n\t\t$result = pg_execute(\"add_query\", array($unit_id,$points));\n\t\tpg_free_result($result);\n\t}", "public function setSKU($sku) {\r\n $this->_data['SKU'] = $sku;\r\n return $this;\r\n }", "function generateSku(){\n\t\t$characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$sku = mt_rand(10000, 99999) . mt_rand(10000, 99999) . $characters[mt_rand(0, strlen($characters) - 1)];\n\t\treturn str_shuffle($sku);\n\t}", "public function setSkus($s)\n {\n if (is_string($s)) {\n $s = [$s];\n }\n if (is_array($s)) {\n $this->resetASINs();\n $this->resetSKUs();\n $i = 1;\n foreach ($s as $x) {\n $this->options['SellerSKUList.Id.'.$i] = $x;\n $i++;\n }\n } else {\n return false;\n }\n }", "public function getUnit();", "public function getSku()\n {\n return $this->sku;\n }", "public function testGetSku()\n {\n $data_from_collection = $this->data['annual_collection'];\n $this->assertEquals(\n $data_from_collection['attributes']['plan_sku'],\n $this->makePlan($data_from_collection)->getSku()\n );\n\n $data_from_site = $this->data['annual_site'];\n $this->assertEquals($data_from_site['sku'], $this->makePlan($data_from_site)->getSku());\n }", "public function generateProductSKU()\n {\n return $this->skuString . int_random();\n }", "protected abstract function unit();", "public function addToCart($username, $sku, $amount){\n $cartQuery = mysqli_fetch_array($this->connection->query(\"SELECT cart FROM users WHERE username = '$username'\"));\n $cart = $cartQuery['cart'];\n $currentInventoryQuant = mysqli_fetch_array($this->connection->query(\"SELECT quantity FROM items WHERE sku = '$sku'\"));\n\n //Add queries to update overall inventory\n $updatedInventory = $currentInventoryQuant[0] - $amount;\n $query = \"UPDATE items SET quantity = '$updatedInventory' WHERE sku = '$sku'\";\n $this->connection->query($query);\n\n //Send an updated query using the new cartQuery array\n $cart[$sku-1] = $amount;\n $query = \"UPDATE users SET cart = '$cart' WHERE username = '$username'\";\n $this->connection->query($query);\n return true;\n }", "public function getSku();", "public function getSku();", "public function getProductSKU()\n {\n }", "function SkuFromID($parametro){\n\t$db = new mysql();\n\t\n\t$result = $db->consulta(\"SELECT IDPRODUCTO,FECHA FROM \".PREFIX.\"productos WHERE IDPRODUCTO='\".$parametro.\"' LIMIT 1\");\n\t$row = $db->recuperar_array($result);\t\n\t$sku = $row['PRESKU'].$parametro;\n\treturn $sku;\n}", "public function getSku()\n {\n return 'Tomato';\n }", "public function getSKU()\n {\n return $this->sKU;\n }", "public function generateSku()\n {\n $number=mt_rand(1000,9999);\n if($this->checkSku($number)){\n return $this->generateSku();\n }\n return (string)$number;\n }", "public function AddStock($SKU, $Qty) {\n\n\t\t$inventoryTable = 'Inventory';\n\t\t$productPiece = \" (SKU) VALUES ('\" . $this->SKU . \"')\";\n\t\t\n $piece2 = \"WHERE ProductSKU ='\" . $this->SKU . \"'\";\n\t}", "public function generatesku()\n {\n $newsku = 111111;\n //We need to generate a random sku number that does not already exist\n $exists = true;\n $newsku = mt_rand(100000,999999);\n do {\n $product = $this->Product->findBysku($newsku);\n if(empty($product))\n $exists = false;\n } while($exists);\n return $newsku;\n }", "public function add(int $user_id, int $spu_id, int $sku_id, int $shop_id, int $number):bool\n {\n return $this->cart->add($user_id, $spu_id, $sku_id, $shop_id, $number);\n }", "public function getSku() {\n return $this->_sku;\n }", "public function getItemSku();", "public function addItem(string $sku): bool;", "public function setSku($sku) {\n $this->_sku = $sku;\n return $this;\n }", "public function getSku()\n {\n if (is_null($this->sku)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_SKU);\n if (is_null($data)) {\n return null;\n }\n $this->sku = (string) $data;\n }\n\n return $this->sku;\n }", "public function generateSKU()\n {\n $number=mt_rand(1000,999999);\n if ($this->checkSKU($number)){\n return $this->generateSKU();\n }\n return (string)$number;\n }", "public function getNewSku($sku = null)\n {\n return $this->skuProcessor->getNewSku($sku);\n }", "public function setSKU($sKU)\n {\n $this->sKU = $sKU;\n return $this;\n }", "private static function create_unit($row) {\n return new Unit(array(\n 'id' => $row['id'],\n 'name_singular' => $row['name_singular'],\n 'name_plural' => $row['name_plural'],\n 'abbreviation' => $row['abbreviation']));\n }", "public function addUnit($name, $value, $aliases = array()) {\n\n\t\t\tif (!StringMethods::match($name, \"#^([a-zA-Z]+)$#\")) {\n\t\t\t\tthrow new \\Exception(\"The unit's key must be letters only\", 1);\n\t\t\t}\n\n\t\t\tif (!is_numeric($value)) {\n\t\t\t\tthrow new \\Exception(\"{$name}'s value must be either an integer or a float value\", 1);\n\t\t\t}\n\t\t\t\n\t\t\t// Add new unit\n\t\t\t$this->_units[$name] = $value; \n\n\t\t\t// Process any aliases\n\t\t\tif (!empty($aliases)) {\n\t\t\t\tforeach ($aliases as $key => $value) {\n\t\t\t\t\t$this->addAlias($name, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "function display_sku_as_meta_data( $item, $order ) {\n\t\t\t$product = BEWPI_WC_Order_Compatibility::get_product( $order, $item );\n\t\t\t$sku = $product && BEWPI_WC_Product_Compatibility::get_prop( $product, 'sku' ) ? BEWPI_WC_Product_Compatibility::get_prop( $product, 'sku' ) : '-';\n\t\t\t?>\n\t\t\t<br>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<strong><?php esc_html_e( 'SKU:', 'woocommerce-pdf-invoices' ); ?></strong> <?php echo esc_html( $sku ); ?>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<?php\n\t\t}", "function ois_shortcode_skin($attr) {\r\n $to_return = '';\r\n $skin_id = $attr['skin'];\r\n\t\r\n\tif (!is_numeric($skin_id))\r\n\t{\r\n\t\t// fail fast.\r\n\t\treturn \"<!-- OptinSkin Error: A non-numeric ID was given to the short-code.\" .\r\n\t\t\t\" Please use the Skin ID, not the name. -->\";\r\n\t}\r\n // Check for split testing\r\n if (isset($attr['split']))\r\n {\r\n $split_ids = $attr['split'];\r\n $split_ids = explode(',', $split_ids);\r\n array_push($split_ids, $skin_id);\r\n // Choose a random skin from this list.\r\n $skin_id = trim($split_ids[array_rand($split_ids)]);\r\n } // if\r\n\r\n $to_return .= ois_make_skin($skin_id);\r\n return $to_return;\r\n}", "function getSkus() {\n\techo \"Getting Skus </br>\";\n\t$response = getRequest('/api/sku');\n\tprintInfo($response);\n}", "public function getSku() {\n return $this->item->getSku();\n }", "public function setSku(?string $sku = null): self\n {\n // validation for constraint: string\n if (!is_null($sku) && !is_string($sku)) {\n throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($sku, true), gettype($sku)), __LINE__);\n }\n if (is_null($sku) || (is_array($sku) && empty($sku))) {\n unset($this->Sku);\n } else {\n $this->Sku = $sku;\n }\n \n return $this;\n }", "public function getSKU()\n {\n return $this->getValue('nb_catalog_item_lang_sku');\n }", "public function unit()\n {\n $data = ['aktif' => 'unit',\n 'data_unit' => $this->M_prospektus->get_unit_menu()->result_array(),\n 'data_blok' => $this->M_prospektus->get_blok_kws()->result_array()\n ];\n\n $this->template->load('template','prospektus/V_data_unit', $data);\n }", "public function setSku(?string $value): void {\n $this->getBackingStore()->set('sku', $value);\n }", "public function addItem(string $sku, int $qty): Cart;", "protected function renderHeader($unit) {\n $draw = $this->getDraw();\n $draw->setFillColor('#000000');\n $draw->setStrokeWidth(0);\n $draw->setFontSize(20);\n\n $x = $this->currentX + $this->margin;\n $y = $this->currentY;\n\n $gon = new Imagick();\n $gon->readImage('../assets/octagon.png');\n $gon->resizeimage(45, 45, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 3, $y + 3);\n\n if($unit['slot'] != 'NA') {\n $gon = new Imagick();\n $gon->readImage('../assets/icon_'.$unit['slot'].'.png');\n $gon->resizeimage(35, 35, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 9, $y + 7);\n }\n\n $gon = new Imagick();\n $gon->readImage('../assets/octagon.png');\n $gon->resizeimage(45, 45, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 55, $y + 3);\n $draw->setFont('../assets/title_font.otf');\n $draw->setFontSize(26);\n\n $draw->setFillColor('#FFFFFF');\n if(strlen($unit['power']) == 1) {\n $this->image->annotateImage($draw, 71 + $x, $y + 33, 0, $unit['power']);\n } else if(strlen($unit['power']) == 3) {\n $this->image->annotateImage($draw, 56 + $x, $y + 33, 0, $unit['power']);\n } else{\n $this->image->annotateImage($draw, 64 + $x, $y + 33, 0, $unit['power']);\n }\n\n # unit name:\n $draw->setFillColor('#000000');\n $iters = 0;\n $title = $unit['customName'] ? $unit['customName'] : $unit['title'];\n $title_size = 28;\n $draw->setFontSize($title_size);\n $draw->setFont('../assets/title_font.otf');\n $check = $this->image->queryFontMetrics($draw, strtoupper($title));\n $maxNameWidth = 420;\n while($iters < 6 && $check['textWidth'] > $maxNameWidth) {\n $iters += 1;\n $title_size -= 2;\n $draw->setFontSize($title_size);\n $check = $this->image->queryFontMetrics($draw, strtoupper($unit['title']));\n }\n $title_x = $x + 110;\n $this->image->annotateImage($draw, $title_x, $y + 40, 0, strtoupper($title));\n $this->currentY += 50;\n $this->renderLine();\n }", "public function setSku($sku)\n {\n $this->sku = $sku;\n\n return $this;\n }", "public function setSKU(?string $sKU = null): self\n {\n // validation for constraint: string\n if (!is_null($sKU) && !is_string($sKU)) {\n throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($sKU, true), gettype($sKU)), __LINE__);\n }\n if (is_null($sKU) || (is_array($sKU) && empty($sKU))) {\n unset($this->SKU);\n } else {\n $this->SKU = $sKU;\n }\n \n return $this;\n }", "public function setUnit($value = false) {\n $this->_unit = $value;\n return $this;\n }", "public function setUnit($value = false) {\n $this->_unit = $value;\n return $this;\n }", "public function addunit($data){\n $id = $this->_db->insert('oase_unit' , $data);\n return $id;\n }", "public function addProductSku($user,$newProductSku){\n \n $prodId = $newProductSku->getProdId();\n $ownerId = $user->getUserId();\n\n $authuser = new UserDao();\n $authuser->setUserId($ownerId);\n $token = explode(\" \",$user->getToken())[1];\n $authuser->setToken($token);\n\n if($authuser->verifyUserToken() && $this->product->checkOwnerId($prodId,$ownerId)){\n\n \n $this->productSku->setProdId($prodId);\n $this->productSku->setMrpPrice($newProductSku->getMrpPrice());\n $this->productSku->setRetailPrice($newProductSku->getRetailPrice());\n $this->productSku->setStock($newProductSku->getStock());\n \n \n $response = $this->productSku->addProductSku();\n \n if($response['response'] == 1){\n unset($response['last_id']);\n }\n return $response;\n }\n else{\n $this->response->setResponse(0);\n $this->response->setMessage(\"Unauthorized user\");\n }\n\n return $this->response->getResponse();\n }", "public function getSkuId()\n {\n return $this->skuId;\n }", "public function saveSkins()\n {\n \\XLite\\Core\\Database::getCacheDriver()->save(\n get_called_class() . '.SubstitutonalSkins',\n $this->resourcesCache\n );\n }", "public function toUnit($toUnit) {\n\t\t\n\t\t\treturn call_user_func(array($this, $toUnit), array());\t\n\t\t}", "public function get_unit_price($sku_id) {\n $sql = \"SELECT t1.outlet_lifting_price as price, t2.sku_code, t2.sku_description\n FROM `tbli_sku_mou_price_mapping` as t1 \n Inner JOIN `tbld_sku` as t2 On t1.sku_id=t2.id\n where sku_id=$sku_id and quantity=1\";\n $query = $this->db->query($sql)->result_array();\n\n return $query;\n }", "function shop_uc_product_weight($variables) {\n $amount = $variables['amount'];\n $units = $variables['units'];\n\n// $output = '<div class=\"product-info weight\">'; // Sudhakar\n $output = t('!weight', array('!weight' => uc_weight_format($amount, $units)));\n// $output .= '</div>'; // Sudhakar\n\n return $output;\n}", "public function sku()\n {\n return $this->belongsTo(Productos::class, 'fk_id_sku', 'id_sku');\n }", "public static function addPermittedSkuUser($uId, $sId, $username = null)\n\t{\n\t\treturn self::addUser('sku', $uId, $sId, $username);\n\t}", "public function getSku()\n {\n $skuAttribute = $this->helper->getSkuConfig();\n\n return $this->getAttribute($skuAttribute);\n }", "public function deprecateSkus($originErpId, $skus)\n {\n $connection = $this->_resourceConnection->getConnection();\n $tableName = $this->_resourceConnection->getTableName('temando_origin_inventory');\n foreach ($skus as $sku => $qty) {\n $updateQuery = \"UPDATE \" . $tableName . \" SET units=(units-\" . $qty .\n \") WHERE erp_id='\".$originErpId.\"' AND sku='\". addslashes($sku).\"'\";\n\n $connection->query($updateQuery);\n }\n }", "public function addToSluch(Sluch $item)\n {\n $this->sluch[] = $item;\n return $this;\n }", "public function scan(string $sku)\n {\n $this->addProduct($sku);\n }", "public function addSkil($data,$table)\n {\n return $this->db->insert($table,$data);\n }", "public function getSku()\n {\n return $this->getTypeInstance(true)->getSku($this);\n }", "public function removeFromCart($username, $sku){\n $cartQuery = mysqli_fetch_array($this->connection->query(\"SELECT cart FROM users WHERE username = '$username'\"));\n $cart = $cartQuery['cart'];\n $currentInventoryQuant = mysqli_fetch_array($this->connection->query(\"SELECT quantity FROM items WHERE sku = '$sku'\"));\n\n //Add queries to update overall inventory\n $updatedInventory = $currentInventoryQuant[0] + $cart[$sku-1];\n $query = \"UPDATE items SET quantity = '$updatedInventory' WHERE sku = '$sku'\";\n $this->connection->query($query);\n\n //Send an updated query using the new cartQuery arrays\n $cart[$sku-1] = 0;\n $query = \"UPDATE users SET cart = '$cart' WHERE username = '$username'\";\n $this->connection->query($query);\n return true;\n }", "function getUVSpotCost (&$rawCost, $totalSheets) {\n\tif($_POST[\"uvSpot\"] == \"uvSpot\") {\n\t\t$uvSpotCost = UVSPOTSETUP;\n\t\t$uvSpotCost += ($totalSheets * UVSPOTCOST);\n\t}\nelse {\n\t$uvSpotCost = 0;\n\t}\n$rawCost += $uvSpotCost;\n}", "function _addItem ($quantity, $rate, $weight, $length, $width, $height, $description, $readytoship=0) {\r\n $index = $this->items_qty;\r\n $this->item_quantity[$index] = (string)$quantity;\r\n $this->item_weight[$index] = ( $weight ? (string)$weight : '0' );\r\n $this->item_length[$index] = ( $length ? (string)$length : '0' );\r\n $this->item_width[$index] = ( $width ? (string)$width : '0' );\r\n $this->item_height[$index] = ( $height ? (string)$height : '0' );\r\n $this->item_description[$index] = $description;\r\n $this->item_readytoship[$index] = $readytoship;\r\n $this->items_qty ++;\r\n $this->items_price += $quantity * $rate;\r\n }", "public function editCartQuant($username, $sku, $amount){\n $cartQuery = mysqli_fetch_array($this->connection->query(\"SELECT cart FROM users WHERE username = '$username'\"));\n $cart = $cartQuery['cart'];\n $currentInventoryQuant = mysqli_fetch_array($this->connection->query(\"SELECT quantity FROM items WHERE sku = '$sku'\"));\n\n //Update overall inventory\n $updatedInventory = $cart[$sku-1] - $amount;\n $updatedInventory = $currentInventoryQuant[0] + $updatedInventory;\n $query = \"UPDATE items SET quantity = '$updatedInventory' WHERE sku = '$sku'\";\n $this->connection->query($query);\n\n //Send an updated query using the new cartQuery array\n $cart[$sku-1] = $amount;\n $query = \"UPDATE users SET cart = '$cart' WHERE username = '$username'\";\n $this->connection->query($query);\n return true;\n }", "public function getSkuId(): int\n {\n return $this->skuId;\n }", "public function addItem($name, $description, $unitPrice, $quantity, $weight = 0, $type = 'Asset', $sku = '') {\n\n $this->jsonData['Cart']['Items'][] = array(\n 'Name' => $name,\n 'Description' => $description,\n 'UnitPrice' => $this->validateNumber($unitPrice, 18),\n 'Quantity' => $this->validateNumber($quantity, 9),\n 'Weight' => $this->validateNumber($weight, 9),\n 'Type' => $this->validateType($type, 'Item'),\n 'Sku' => $this->validateString($sku, 32) // Whatever the hell it is\n );\n\n }", "public function add(\n UserInterface $user,\n string $name,\n string $sku,\n string $description = null,\n array $options = []\n ) : ProductVariants {\n return CreateProductVariantAction::execute(\n $this->product,\n $user,\n $name,\n $sku,\n $description,\n $options\n );\n }", "function addSkin()\n\t{\n\t\t\t\n\n\t\treturn $this->uploadZipFile();\n\t\t/*$skinname=$_POST['skinname'];\n\t\t$mypath=$skinname;\n \t\tmkdir( \"themes/\".$mypath);*/\n\t}", "public function getProductSKUQuantity($sku) {\n $commerce_product = commerce_product_load_by_sku($sku);\n return $this->getProductQuantity($commerce_product->product_id);\n }", "public function setElUnit($elUnit) {\n $this->cElUnit = $elUnit;\n \n }", "protected function addCap($cap)\n {\n// $this->cap=$cap;\n echo $cap;\n }", "public function getUnit()\n\t{\n\t\treturn null;\n\t}", "public function setSellerSKU($value) \n {\n $this->_fields['SellerSKU']['FieldValue'] = $value;\n return $this;\n }", "private function decorateUnicode()\n {\n $suite_caption = self::SUIT;\n $number_caption = self::NUMBER;\n foreach($this->set as $single_card){\n $single_card->unicode = '&#x1f0' . Repository::$s_parts[ $single_card->$suite_caption ] . Repository::$n_parts[ $single_card->$number_caption ] . ';' ;\n $single_card->color = in_array($single_card->$suite_caption, ['hearts', 'diamonds']) ? 'red' : 'black';\n }\n }", "function custom_sizes( $sizes ) {\n return array_merge( $sizes, array(\n //the 'custom-size refers to the added size in the if code block above like 'bob-size'\n //'custom size name' is the string for the name of your size that is going to be displayed in the backend\n // like:\n // small 250x250\n // medium 640x480\n // orginal 800x600\n // custom size name 320x180\n 'custom-size' => __( 'custom size name' ),\n ) );\n}", "public function skuPut($id, $shop_id, $sku, Request $request)\n {\n if (!$this->isOwner('App\\Entity\\ProductsSkus', ['product' => $id, 'shop' => $shop_id])) {\n return $this->notFoundResponse;\n }\n\n if (isset($this->entity->sku) && $this->entity->sku == $sku) {\n // Default values.\n $newSku = $this->entity->sku;\n $newActive = isset($this->entity->active) ? $this->entity->active : 1;\n\n // Parse json request for new values.\n $json = $request->getContent();\n $arr = json_decode($json, true);\n if (isset($arr) && is_array($arr) && isset($arr['skus'])) {\n if (isset($arr['skus']['sku']) && !empty($arr['skus']['sku'])) {\n $newSku = $arr['skus']['sku'];\n }\n if (isset($arr['skus']['active']) && is_bool($arr['skus']['active'])) {\n $newActive = $arr['skus']['active'] ? 1 : 0;\n }\n }\n\n // Update found entity with new data.\n $this->entity->setSku($newSku);\n $this->entity->setActive($newActive);\n $this->entity->setShopId($shop_id);\n $this->em->flush();\n\n // All affected orders' line items will have their SKU changed.\n $orders = $this->entity->shop->orders;\n foreach ($orders as $order) {\n $line_item = $this->em->find('App\\Entity\\LineItems', ['order' => $order->getId(), 'product' => $id]);\n if (is_object($line_item) && isset($line_item->sku) && $line_item->sku == $sku) {\n $line_item->sku = $newSku;\n $this->em->flush();\n }\n }\n\n // Send response. Lookup and return parent Product.\n // $product = $this->em->find('App\\Entity\\Products', $id);\n $product = $this->entity->product;\n if ($product instanceof Products) {\n $response = new JsonResponse($product->jsonSerialize(), 200);\n } else {\n return new Response('Product not found.', 404);\n }\n } else {\n return $this->notFoundResponse;\n }\n\n return $response;\n }", "function cubize($name, $texture_top, $texture_side, $texture_bottom, $useMapColorTop = false, $debug = false){\n\n\truncmd('convert'\n\t.'( '.$texture_top.' -alpha set -virtual-pixel transparent '\n\t.($useMapColorTop ? '-size 1x1 xc:Green -fx \"u*v.p{0,0}\" ' : ' ')\n\t\t.'+distort Affine \"0,256 0,0 0,0 -87,-50 256,256 87,-50\" ) '\n\t.'( '.$texture_side.' -alpha set -virtual-pixel transparent -fill black -colorize 25% '\n\t\t.'+distort Affine \"256,0 0,0 0,0 -87,-50 256,256 0,100\" ) '\n\t.'( '.$texture_side.' -alpha set -virtual-pixel transparent -fill black -colorize 50% '\n\t\t.'+distort Affine \" 0,0 0,0 0,256 0,100 256,0 87,-50\" ) '\n\t.'-background none -compose plus -layers merge +repage -compose over cubes/'.$name.'.png',$debug);\n\n\t\n\t/*runcmd(\"convert \\\\\n \\\\( $texture_top -alpha set -virtual-pixel transparent \\\\\n +distort Affine '0,512 0,0 0,0 -87,-50 512,512 87,-50' \\\\) \\\\\n \\\\( $texture_side -alpha set -virtual-pixel transparent \\\\\n +distort Affine '512,0 0,0 0,0 -87,-50 512,512 0,100' \\\\) \\\\\n \\\\( $texture_side -alpha set -virtual-pixel transparent \\\\\n +distort Affine ' 0,0 0,0 0,320 0,100 320,0 87,-50' \\\\) \\\\\n \\\\\n -background none -compose plus -layers merge +repage \\\\\n -bordercolor black -compose over -border 5x2 isometric_cube.png\",$debug);*/\n\n # Create some square images for the cube\n //system('convert '.$texture_top.' -resize 256x256 top.png');\n //runcmd('convert '.$texture_top.' -resize 256x256^ -gravity center -extent 256x256 top.png',$debug);\n //runcmd('convert '.$texture_side.' -resize 256x256 side.png',$debug);\n //system('convert '.$texture_side.' -resize 256x256 right.jpg');\n\n # top image shear.\n //system('convert top.png -resize 256x256! -alpha set -background none -shear 0x30 -rotate -60 -gravity center top_shear.png');\n //runcmd('convert top.png -resize 260x301! -alpha set -background none -shear 0x30 top_shear0.png',$debug);\n //runcmd('convert top_shear0.png -alpha set -background none -rotate -60 -gravity center -crop 520x301+0+0 top_shear3.png',$debug);\n # left image shear\n //system('convert side.png -resize 256x256! -alpha set -background none -shear 0x30 left_shear.png');\n\t//runcmd('convert side.png -resize 260x301! -alpha set -background none -shear 0x30 left_shear.png',$debug);\n # right image shear\n //system('convert side.png -resize 256x256! -alpha set -background none -shear 0x-30 right_shear.png');\n\t//runcmd('convert side.png -resize 260x301! -alpha set -background none -shear 0x-30 right_shear.png',$debug);\n\n # combine them.\n //system('convert left_shear.png right_shear.png +append ( top_shear.png -repage +33-220 ) -background none -layers merge +repage cubes/'.$name.'.png');\n //runcmd('convert left_shear.png right_shear.png +append \\\\( top_shear.png -repage +0-149 \\\\) -background none -layers merge +repage -resize 30% isometric_shears7.png 2>&1',$debug);\n\n # cleanup\n //rm -f top.jpg left.jpg right.jpg\n //rm -f top_shear.png left_shear.png right_shear.png\n \n\n}", "function create_uzi($szoveg,$tipus=\"warning\") {\n return \"<div class='\".$tipus.\"_uzi'>$szoveg</div>\";\n // .warning_uzi\n // .error_uzi\n // .accept_uzi\n }", "public function AddProduct () {\n $piece1 = '(';\n \t$piece2 = '';\n\t\t\n\t\tif(isset($SKU)) {\n\t\t\t$piece1 .= 'ProductSKU,';\n\t\t\t$piece2 .= \"'\" . $this->SKU . \"'\";\n $piece2 .= ',';\n\t\t}\n\t\telse {\n\t\t\techo \" \\n Error: SKU Field Empty \\n \";\n\t\t\treturn false;\n }\n\t\t\n\t\t$productTable = 'Products';\n\t\t$productPiece = \" (SKU) VALUES ('\" . $this->SKU . \"')\";\n\t\t\n\t\n $productResults = OrderData::InsertData($productTable, $productPiece);\n\t\t\n\t\tif($productResults === false)\n\t\t\treturn false;\n\t\t\n\t\t\n\t\tif(isset($Qty)) {\n\t\t\t$piece1 .= 'TotalAMT,';\n\t\t\t$piece2 .= \"\" . $this->initialquantityStock . \"\";\n $piece2 .= ',';\n\t\t}\n\t\telse {\n\t\t\techo \" \\n Error: Quantity Field Empty \\n \";\n\t\t\treturn false;\n }\n\t\t\n\t\t$piece1 .= 'CommittedAMT,';\n\t\t$piece2 .= $this->committedStock . ',';\n\n \t\t$piece1 .= 'AvailableAMT';\n $piece2 .= $this->availableStock . ')';\n\t\t\n\t\t$piece1 .= ') VALUES (';\n\n $inventoryPiece = $piece1 . $piece2;\n\t\t\n\t\t$inventoryTable = 'Inventory';\n\t\t$productPiece = \" (SKU) VALUES ('\" . $this->SKU . \"')\";\n\t\t\n\t\n $inventoryResults = OrderData::InsertData($inventoryTable, $inventoryPiece);\n\t\t\n\t\tif($inventoryResults === false)\n\t\t\treturn false;\n\t\t\t\n\t\treturn true;\n\t}", "public function show(Unit $unit)\n {\n //\n }", "public function show(Unit $unit)\n {\n //\n }", "public function show(Unit $unit)\n {\n //\n }", "public function show(Unit $unit)\n {\n //\n }", "public function addproducttopoAction() {\n $id = $this->getRequest()->getParam('id');\n $sku = $this->getRequest()->getParam('sku');\n $model = Mage::getModel('inventorypurchasing/purchaseorder_draftpo')->load($id);\n try {\n $productId = Mage::getModel('catalog/product')->getIdBySku($sku);\n if (!$productId) {\n throw new Exception($this->helper()->__('Not found sku: %s', \"<i>$sku</i>\"));\n }\n $model->addProduct($productId);\n Mage::getSingleton('vendors/session')->addSuccess(\n $this->helper()->__('Product %s has been added.', \"<i>$sku</i>\")\n );\n $this->_redirect('*/*/view', array('id' => $id));\n } catch (Exception $e) {\n Mage::getSingleton('vendors/session')->addError($this->helper()->__('There is error while adding product.'));\n Mage::getSingleton('vendors/session')->addError($e->getMessage());\n $this->_redirect('*/*/view', array('id' => $id));\n }\n }", "public function register_settings() {\n\t\t\tregister_setting( 'wpex_skins_options', 'theme_skin', array( $this, 'sanitize' ) );\n\t\t}", "function TubeView(&$pxl, $src, $radius, $turbulence, $fade1, $fade2, $center, $bgColor) {}", "private function getExistingSku($sku)\n {\n return $this->_oldSku[strtolower($sku)];\n }", "function Skin_Base( $skin=\"\", $type=\"\", $globals=\"\" )\n\t{\n\t\t$this->debug = 1 ;\n\t\t$this->type = $type ;\n\t\t$this->set_globals($globals) ;\n\t\t$this->skin = $skin ;\n\t\t\n\t\t$this->skindir = \"./skin/$skin\" ;\n\n\t\t///기본 전역 변수는 안에서 세팅 해놓자.\n\t\t$this->default_globals = '$__SERVER, $__GET, $__POST, $__COOKIE, $__FILES, $__ENV, $__SESSION ' ;\n\t\t$this->globals = \"global \".$this->default_globals.\", \".$globals.\" ;\" ; \n\n\t\tif($this->debug) echo(\"Skin_Base <\".time().\"><br>\") ;\n\n\t}", "public function addYUnit($i, $unit, $roundTo = 2, $factor = 1) {\n\t\tif ($factor != 1) {\n\t\t\t$this->Options['yaxes'][$i-1]['tickFormatter'] = 'function (v) { v = v * '.$factor.'; return '.$this->jsRoundUnit($roundTo).' + \\' '.$unit.'\\'; }';\n\t\t} else {\n\t\t\t$this->Options['yaxes'][$i-1]['tickFormatter'] = 'function (v) { return '.$this->jsRoundUnit($roundTo).' + \\' '.$unit.'\\'; }';\n\t\t}\n\t}", "public static function addWhitelistedSkuUser($uId, $sId, $username = null)\n\t{\n\t\treturn self::addUser('skuWhitelist', $uId, $sId, $username);\n\t}", "protected function addPix($pix)\n {\n echo '<img src=\"'.$pix.'\">';\n }", "public function setSkuSuffix(string $skuSuffix) : self\n {\n $this->skuSuffix = $skuSuffix;\n return $this;\n }", "public function nextUnit(): string;", "public function __construct($unit = '') {\n $this->init();\n $this->exp = $this->unitExp($unit);\n }", "abstract public function getUnitOfMaterial(): string;", "public function addTransactionLineItem($order_id, $sku = '', $product_name = '', $category = '', $unit_price = 0, $quantity = 0) {\n\t\t\n\t\tif ( empty( $this->commerce_event ) ) {\n\t\t\t$this->addTransaction('none set');\n\t\t}\n\t\t\n\t\t$li = array();\n\t\t$li['li_order_id'] = $order_id ;\n\t\t$li['li_sku'] = $sku ;\n\t\t$li['li_product_name'] = $product_name ;\n\t\t$li['li_category'] = $category ;\n\t\t$li['li_unit_price'] = $unit_price ;\n\t\t$li['li_quantity'] = $quantity ;\n\t\t\n\t\t$items = $this->commerce_event->get( 'ct_line_items' );\n\t\t$items[] = $li;\n\t\t$this->commerce_event->set( 'ct_line_items', $items );\n\t}", "function addToInventory($userid, $ingredient, $qty, $units){\n\t if(($userid != NULL) &&($ingredient != NULL) && ($qty != NULL)&& ($units != NULL))\n\t { \n\t if($qty <= 0)\n\t\t return;\n\t\t $count = @mysql_query(\"SELECT COUNT(*) as count FROM Inventory WHERE (UserID = '$userid' \n\t\t AND IngredientName = '$ingredient' AND Units ='$units')\");\n\t\t $countdata = mysql_fetch_assoc($count);\n\t\t if($countdata['count'] >= 1)\n\t\t\t @mysql_query(\"UPDATE Inventory SET Quantity = Quantity + '$qty' WHERE (UserID ='$userid' \n\t\t\t AND IngredientName = '$ingredient' AND Units ='$units')\");\n\t\t else\n\t\t @mysql_query(\"INSERT INTO Inventory VALUES ('$userid','$ingredient','$qty','$units')\");\n\t\t}\n\t}", "public function add($data)\n {\n // create product SKU\n $this->model->creating(function ($product) use ($data) {\n\n $product->sku = $this->generateProductSKU();\n\n $product->category_id = array_get($data, 'category_id');\n $product->subcategory_id = array_get($data, 'subcategory_id');\n $product->brand_id = array_get($data, 'brand_id');\n });\n\n return parent::add($data);\n }" ]
[ "0.5584529", "0.5435871", "0.5255547", "0.51158816", "0.5105537", "0.5058601", "0.5003133", "0.4996606", "0.49886966", "0.49545717", "0.49364898", "0.49245793", "0.49234742", "0.49061763", "0.49061763", "0.4882671", "0.48621067", "0.48466876", "0.48177937", "0.48103306", "0.4804211", "0.47937196", "0.4791107", "0.47812656", "0.4775994", "0.47691843", "0.47643337", "0.47471127", "0.47383416", "0.47176853", "0.47143862", "0.4692777", "0.46882188", "0.46831036", "0.4663413", "0.4658613", "0.46550918", "0.46455172", "0.46443167", "0.46405804", "0.46358192", "0.46285957", "0.46220332", "0.46205586", "0.46075124", "0.45892873", "0.45892873", "0.45838755", "0.45758587", "0.45674482", "0.456282", "0.4561673", "0.45295075", "0.45246172", "0.45170742", "0.4517064", "0.4496775", "0.44956747", "0.44925445", "0.44836456", "0.44826636", "0.44620052", "0.44615257", "0.44490296", "0.4445659", "0.44437954", "0.44398087", "0.4437532", "0.44326863", "0.44284022", "0.4417529", "0.4414739", "0.44014698", "0.43958306", "0.43951082", "0.4382105", "0.4371085", "0.4360408", "0.4359424", "0.4354087", "0.43509042", "0.43465558", "0.43465558", "0.43465558", "0.43465558", "0.43363354", "0.43315354", "0.43293375", "0.43185934", "0.4317398", "0.43164465", "0.43144011", "0.43139896", "0.43113095", "0.43043438", "0.42787188", "0.42757833", "0.42745948", "0.42728397", "0.42715797" ]
0.5890436
0
/ Add SKU Packaging
public function addsku_packaging ( $data ) { return $this->db->insert( 'tbli_sku_mou_price_mapping', $data ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AddProduct () {\n $piece1 = '(';\n \t$piece2 = '';\n\t\t\n\t\tif(isset($SKU)) {\n\t\t\t$piece1 .= 'ProductSKU,';\n\t\t\t$piece2 .= \"'\" . $this->SKU . \"'\";\n $piece2 .= ',';\n\t\t}\n\t\telse {\n\t\t\techo \" \\n Error: SKU Field Empty \\n \";\n\t\t\treturn false;\n }\n\t\t\n\t\t$productTable = 'Products';\n\t\t$productPiece = \" (SKU) VALUES ('\" . $this->SKU . \"')\";\n\t\t\n\t\n $productResults = OrderData::InsertData($productTable, $productPiece);\n\t\t\n\t\tif($productResults === false)\n\t\t\treturn false;\n\t\t\n\t\t\n\t\tif(isset($Qty)) {\n\t\t\t$piece1 .= 'TotalAMT,';\n\t\t\t$piece2 .= \"\" . $this->initialquantityStock . \"\";\n $piece2 .= ',';\n\t\t}\n\t\telse {\n\t\t\techo \" \\n Error: Quantity Field Empty \\n \";\n\t\t\treturn false;\n }\n\t\t\n\t\t$piece1 .= 'CommittedAMT,';\n\t\t$piece2 .= $this->committedStock . ',';\n\n \t\t$piece1 .= 'AvailableAMT';\n $piece2 .= $this->availableStock . ')';\n\t\t\n\t\t$piece1 .= ') VALUES (';\n\n $inventoryPiece = $piece1 . $piece2;\n\t\t\n\t\t$inventoryTable = 'Inventory';\n\t\t$productPiece = \" (SKU) VALUES ('\" . $this->SKU . \"')\";\n\t\t\n\t\n $inventoryResults = OrderData::InsertData($inventoryTable, $inventoryPiece);\n\t\t\n\t\tif($inventoryResults === false)\n\t\t\treturn false;\n\t\t\t\n\t\treturn true;\n\t}", "public function addItem(string $sku): bool;", "function addNamedPack($name) {\n if(empty($this->_packages[$name])) {\n include_once('pack.'.$name.'.inc');\n $c='x'.$name.'pack';\n $this->_packages[$name]=new $c();\n }\n }", "public static function add_vendor_info_in_product_summery() {\n include_once dirname( __FILE__ ) . '/templates/vendor-info.php';\n }", "public function addproducttopoAction() {\n $id = $this->getRequest()->getParam('id');\n $sku = $this->getRequest()->getParam('sku');\n $model = Mage::getModel('inventorypurchasing/purchaseorder_draftpo')->load($id);\n try {\n $productId = Mage::getModel('catalog/product')->getIdBySku($sku);\n if (!$productId) {\n throw new Exception($this->helper()->__('Not found sku: %s', \"<i>$sku</i>\"));\n }\n $model->addProduct($productId);\n Mage::getSingleton('vendors/session')->addSuccess(\n $this->helper()->__('Product %s has been added.', \"<i>$sku</i>\")\n );\n $this->_redirect('*/*/view', array('id' => $id));\n } catch (Exception $e) {\n Mage::getSingleton('vendors/session')->addError($this->helper()->__('There is error while adding product.'));\n Mage::getSingleton('vendors/session')->addError($e->getMessage());\n $this->_redirect('*/*/view', array('id' => $id));\n }\n }", "function addSkin()\n\t{\n\t\t\t\n\n\t\treturn $this->uploadZipFile();\n\t\t/*$skinname=$_POST['skinname'];\n\t\t$mypath=$skinname;\n \t\tmkdir( \"themes/\".$mypath);*/\n\t}", "function add_to_purchased_songs($song){\n echo 'Adding song to purchased songs...';\n if ($this->is_purchased($song)){\n echo $song->print_song_info() . 'is already purchased';\n return False;\n }\n array_push($this->purchased_songs, $song);\n echo '</br>' . $song->print_song_info() . 'added to purchases' . '</br>';\n return True;\n }", "public function addItem(string $sku, int $qty): Cart;", "public function add(Request $request)\n {\n $sku = $request->input('sku');\n\n if ($item = Product::where(['name' => $sku])->first()) {\n $this->basket->insert([\n 'id' => $item->id,\n 'name' => $item->name,\n 'price' => $item->price,\n 'weight' => $item->weight,\n 'quantity' => 1,\n ]);\n\n $total = $count = $cur_count = $cur_total = 0;\n foreach ($this->basket->contents() as $item) {\n if ($item->name == $sku) {\n $cur_count = $item->quantity;\n $cur_total = $item->price * $item->quantity;\n }\n }\n $count = $this->basket->totalItems();\n $total = number_format($this->basket->total(), 0, ' ', '&nbsp;');\n $basket = View::make('partials.head-cart', ['basket' => $this->basket]);\n\n return response()->json([\n 'total' => $total,\n 'count' => $count,\n 'basket' => $basket->render(),\n 'cur_sku' => $sku,\n 'cur_count' => $cur_count,\n 'cur_total' => $cur_total,\n ]);\n } else {\n return response()->json(['error' => 'Товар не найден']);\n }\n }", "public function AddStock($SKU, $Qty) {\n\n\t\t$inventoryTable = 'Inventory';\n\t\t$productPiece = \" (SKU) VALUES ('\" . $this->SKU . \"')\";\n\t\t\n $piece2 = \"WHERE ProductSKU ='\" . $this->SKU . \"'\";\n\t}", "public function add($data)\n {\n // create product SKU\n $this->model->creating(function ($product) use ($data) {\n\n $product->sku = $this->generateProductSKU();\n\n $product->category_id = array_get($data, 'category_id');\n $product->subcategory_id = array_get($data, 'subcategory_id');\n $product->brand_id = array_get($data, 'brand_id');\n });\n\n return parent::add($data);\n }", "function addVakoImage($object) {\n /* you can itentify the vako with $object->reference->ShopId */ \n $object->Item->ShopId = 'yourReturnedVakoImageIdOnMarketplace_'.rand(1000, 9999); \n}", "function jigoshop_upgrade_161() {\n\t\n\tJigoshop_Base::get_options()->add_option( 'jigoshop_catalog_product_button', 'cart' );\n\n}", "public function addToCart($username, $sku, $amount){\n $cartQuery = mysqli_fetch_array($this->connection->query(\"SELECT cart FROM users WHERE username = '$username'\"));\n $cart = $cartQuery['cart'];\n $currentInventoryQuant = mysqli_fetch_array($this->connection->query(\"SELECT quantity FROM items WHERE sku = '$sku'\"));\n\n //Add queries to update overall inventory\n $updatedInventory = $currentInventoryQuant[0] - $amount;\n $query = \"UPDATE items SET quantity = '$updatedInventory' WHERE sku = '$sku'\";\n $this->connection->query($query);\n\n //Send an updated query using the new cartQuery array\n $cart[$sku-1] = $amount;\n $query = \"UPDATE users SET cart = '$cart' WHERE username = '$username'\";\n $this->connection->query($query);\n return true;\n }", "private function addUPSSmallAttributes($installer, $eavSetup)\n {\n $attributes = $this->attrNames;\n if ($this->mageVersion < '2.2.5') {\n unset($attributes['dropship'], $attributes['dropship_location']);\n $count = 65;\n foreach ($attributes as $key => $attr) {\n $isExist = $this->eavConfig\n ->getAttribute('catalog_product', 'en_'.$attr.'')->getAttributeId();\n if ($isExist == null) {\n $this->getAttributeArray(\n $eavSetup,\n 'en_'.$attr,\n \\Magento\\Framework\\DB\\Ddl\\Table::TYPE_DECIMAL,\n ucfirst($attr),\n 'text',\n '',\n $count\n );\n }\n $count++;\n }\n }\n\n $isendropshipExist = $this->eavConfig->getAttribute('catalog_product', 'en_dropship')->getAttributeId();\n\n if ($isendropshipExist == null) {\n $this->getAttributeArray(\n $eavSetup,\n 'en_dropship',\n 'int',\n 'Enable Drop Ship',\n 'select',\n 'Magento\\Eav\\Model\\Entity\\Attribute\\Source\\Boolean',\n 71\n );\n }\n\n $isdropshiplocationExist = $this->eavConfig\n ->getAttribute('catalog_product', 'en_dropship_location')->getAttributeId();\n if ($isdropshiplocationExist == null) {\n $this->getAttributeArray(\n $eavSetup,\n 'en_dropship_location',\n 'int',\n 'Drop Ship Location',\n 'select',\n 'Eniture\\UPSSmallPackageQuotes\\Model\\Source\\DropshipOptions',\n 72\n );\n } else {\n $dataArr = [\n 'source_model' => 'Eniture\\UPSSmallPackageQuotes\\Model\\Source\\DropshipOptions',\n ];\n $this->connection\n ->update($this->tableNames['eav_attribute'], $dataArr, \"attribute_code = 'en_dropship_location'\");\n }\n\n $isHazmatExist = $this->eavConfig->getAttribute('catalog_product', 'en_hazmat')->getAttributeId();\n\n if ($isHazmatExist == null) {\n $this->getAttributeArray(\n $eavSetup,\n 'en_hazmat',\n 'int',\n 'Hazardous Material',\n 'select',\n 'Magento\\Eav\\Model\\Entity\\Attribute\\Source\\Boolean',\n 73\n );\n }\n\n $isInsurance = $this->eavConfig->getAttribute('catalog_product', 'en_insurance')->getAttributeId();\n\n if ($isInsurance == null) {\n $this->getAttributeArray(\n $eavSetup,\n 'en_insurance',\n 'int',\n 'Insure this item',\n 'select',\n 'Magento\\Eav\\Model\\Entity\\Attribute\\Source\\Boolean',\n 74\n );\n }\n $installer->endSetup();\n }", "function add_product_to_order($id_order,$id_product,$sauce){\r\n $bdd = Database3Splus::getinstance();//connexion();\r\n $amount = 1;\r\n $req = \"INSERT INTO order_details VALUES (:id_order, :id_product, :amount, :sauce)\";\r\n $result = $bdd->prepare($req);\r\n $result->bindParam(':id_order', $id_order);\r\n $result->bindParam(':id_product', $id_product);\r\n $result->bindParam(':amount', $amount);\r\n $result->bindParam(':sauce', $sauce);\r\n $result->execute();\r\n $count = $result->rowCount();\r\n\t\tif($count != 0){return TRUE;}\r\n\t\telse{return FALSE;}\r\n\t}", "private function addToCart () {\n }", "private function addToCart () {\n }", "public function addPaketTo($UUID=''){\t\n\t\tif ($UUID!=null) {\n\t\t\t$this->cek_PaketTo($UUID);\n\t\t} else {\n\t\t\t$data['files'] = array(\n\t\t\t\tAPPPATH . 'modules/templating/views/v-data-notfound.php',\n\t\t\t\t);\n\n\t\t\t$data['judul_halaman'] = \"Bundle Paket\";\n\t\t\t#START cek hakakses#\n\t\t\t$hakAkses=$this->session->userdata['HAKAKSES'];\n\n\t\t\tif ($hakAkses =='admin') {\n\t // jika admin\n\t\t\t\tif ($babID == null) {\n\t\t\t\t\tredirect(site_url('admin'));\n\t\t\t\t} else {\n\t\t\t\t\t$this->parser->parse('admin/v-index-admin', $data);\n\t\t\t\t}\n\t\t\t} else if($hakAkses=='guru'){\n\t\t\t\tif ($babID == null) {\n\t\t\t\t\tredirect(site_url('guru/dashboard/'));\n\t\t\t\t} else {\n\t\t\t\t\t// notification\n\t\t\t\t\t$data['datKomen']=$this->datKomen();\n\t\t\t\t\t$id_guru = $this->session->userdata['id_guru'];\n // get jumlah komen yg belum di baca\n\t\t\t\t\t$data['count_komen']=$this->mkomen->get_count_komen_guru($id_guru);\n\n\t\t\t\t\t$this->parser->parse('templating/index-b-guru', $data);\n\t\t\t\t}\n\t\t\t}else{\n\t // jika siswa redirect ke welcome\n\t\t\t\tredirect(site_url('welcome'));\n\t\t\t}\n\t #END Cek USer#\n\t\t}\n\t}", "public function addAction() {\n $this->assign('dir', \"goods\");\n $this->assign('ueditor', true);\n\t}", "public function install() {\n\t\t$this->load->model('design/layout');\n\t\t$this->load->model('setting/setting');\n\n\t\t$settings = array();\n\n\t\t// Add a module for every possible layout, in the content_bottom position\n\t\tforeach ($this->model_design_layout->getLayouts() as $layout) {\n\t\t\t$settings['basket_capture_module'][] = array(\n\t\t\t\t'layout_id' => $layout['layout_id'],\n\t\t\t\t'position' => 'content_bottom',\n\t\t\t\t'status' => '1',\n\t\t\t\t'sort_order' => '1',\n\t\t\t);\n\t\t}\n\n\t\t// Save the settings\n\t\t$this->model_setting_setting->editSetting('basket_capture', $settings);\t\t\n\t}", "public function createnewproduct()\n {\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\n $product = Mage::getModel('catalog/product');\n $websiteId = Mage::app()->getWebsite('base')->getId();\n $storeId = Mage::app()->getStore('default')->getId();\n\n //Set SKU dynamically over here\n $collection = Mage::getModel('catalog/product')\n ->getCollection()\n ->addAttributeToSort('created_at', 'desc');\n $collection->getSelect()->limit(1);\n $latestItemId = $collection->getLastItem()->getId();\n if($latestItemId) {\n $nextProid = $latestItemId + 1;\n } else {\n $nextProid = 1;\n }\n $SampleSKU = 'titechPro'.$nextProid;\n\n try {\n $product\n ->setStoreId($storeId) //you can set data in store scope\n ->setWebsiteIds(array($websiteId)) //website ID the product is assigned to, as an array\n ->setAttributeSetId(4) //ID of a attribute set named 'default'\n ->setTypeId('simple') //product type\n ->setCreatedAt(strtotime('now')) //product creation time\n ->setUpdatedAt(strtotime('now')) //product update time\n ->setSku($SampleSKU) //SKU\n ->setName('Titech sample product') //product name\n ->setWeight(4.0000)\n ->setStatus(1) //product status (1 - enabled, 2 - disabled)\n ->setTaxClassId(4) //tax class (0 - none, 1 - default, 2 - taxable, 4 - shipping)\n ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH) //catalog and search visibility\n //->setManufacturer(28) //manufacturer id\n //->setColor(24)\n //->setNewsFromDate('06/26/2014') //product set as new from\n //->setNewsToDate('06/30/2014') //product set as new to\n ->setCountryOfManufacture('IN') //country of manufacture (2-letter country code)\n ->setPrice(11.22) //price in form 11.22\n ->setCost(22.33) //price in form 11.22\n //->setSpecialPrice(00.44) //special price in form 11.22\n //->setSpecialFromDate('06/1/2014') //special price from (MM-DD-YYYY)\n //->setSpecialToDate('06/30/2014') //special price to (MM-DD-YYYY)\n ->setMsrpEnabled(1) //enable MAP\n ->setMsrpDisplayActualPriceType(1) //display actual price (1 - on gesture, 2 - in cart, 3 - before order confirmation, 4 - use config)\n ->setMsrp(99.99) //Manufacturer's Suggested Retail Price\n ->setMetaTitle('Sample meta title 2')\n ->setMetaKeyword('Sample meta keyword 2')\n ->setMetaDescription('Sample meta description 2')\n ->setDescription('This is a long description for sample product')\n ->setShortDescription('This is a short description for sample product')\n ->setMediaGallery (array('images'=>array (), 'values'=>array ())) //media gallery initialization\n ->addImageToMediaGallery('media/catalog/product/ti/ti_logo.png', array('image','thumbnail','small_image'), false, false) //assigning image, thumb and small image to media gallery\n ->setStockData(array(\n 'use_config_manage_stock' => 0, //'Use config settings' checkbox\n 'manage_stock'=>1, //manage stock\n 'min_sale_qty'=>1, //Minimum Qty Allowed in Shopping Cart\n 'max_sale_qty'=>2, //Maximum Qty Allowed in Shopping Cart\n 'is_in_stock' => 1, //Stock Availability\n 'qty' => 999 //qty\n )\n )\n ->setCategoryIds(array(2)); //assign product to categories - Set to Default\n\n $product->save();\n return $product->getIdBySku($SampleSKU);\n } catch(Exception $e) {\n Mage::log($e->getMessage());\n }\n }", "public function addProductSku($user,$newProductSku){\n \n $prodId = $newProductSku->getProdId();\n $ownerId = $user->getUserId();\n\n $authuser = new UserDao();\n $authuser->setUserId($ownerId);\n $token = explode(\" \",$user->getToken())[1];\n $authuser->setToken($token);\n\n if($authuser->verifyUserToken() && $this->product->checkOwnerId($prodId,$ownerId)){\n\n \n $this->productSku->setProdId($prodId);\n $this->productSku->setMrpPrice($newProductSku->getMrpPrice());\n $this->productSku->setRetailPrice($newProductSku->getRetailPrice());\n $this->productSku->setStock($newProductSku->getStock());\n \n \n $response = $this->productSku->addProductSku();\n \n if($response['response'] == 1){\n unset($response['last_id']);\n }\n return $response;\n }\n else{\n $this->response->setResponse(0);\n $this->response->setMessage(\"Unauthorized user\");\n }\n\n return $this->response->getResponse();\n }", "function add() {\n\t\tif (True) {\n\n\t\t\t// create an empty product.\n\t\t\t$o =& new ufo_product(0);\n\t\t\t$this->addedObject =& $o;\n\t\t\n\t\t\t// create an entry in the db.\n\t\t\t$o->initialize();\n\t\t\t$o->create();\n\t\t\t$o->edit();\n\n\t\t\t// add it to the product array.\n\t\t\t$this->product[] = $o;\n\t\t}\n\t}", "public function code_pack_install()\n\t{\n\t\t$prefix = trim((string) ee()->input->get_post('prefix'));\n\n\t\tif ($prefix === '')\n\t\t{\n\t\t\tee()->functions->redirect($this->base . '&method=code_pack');\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tload lib\n\t\t// -------------------------------------\n\n\t\t$lib_name = str_replace('_', '', $this->lower_name) . 'codepack';\n\t\t$load_name = str_replace(' ', '', ucwords(str_replace('_', ' ', $this->lower_name))) . 'CodePack';\n\n\t\tee()->load->library($load_name, $lib_name);\n\t\tee()->$lib_name->autoSetLang = true;\n\n\t\t// -------------------------------------\n\t\t//\t¡Las Variables en vivo! ¡Que divertido!\n\t\t// -------------------------------------\n\n\t\t$variables = array();\n\n\t\t$variables['code_pack_name']\t= $this->lower_name . '_code_pack';\n\t\t$variables['code_pack_path']\t= $this->addon_path . 'code_pack/';\n\t\t$variables['prefix']\t\t\t= $prefix;\n\n\t\t// -------------------------------------\n\t\t//\tinstall\n\t\t// -------------------------------------\n\n\t\t$details = ee()->$lib_name->getCodePackDetails($this->addon_path . 'code_pack/');\n\n\t\t$this->cached_vars['code_pack_name'] = $details['code_pack_name'];\n\t\t$this->cached_vars['code_pack_label'] = $details['code_pack_label'];\n\n\t\t$return = ee()->$lib_name->installCodePack($variables);\n\n\t\t$this->cached_vars = array_merge($this->cached_vars, $return);\n\n\t\t//--------------------------------------\n\t\t// menus and page content\n\t\t//--------------------------------------\n\n\t\t$this->cached_vars['module_menu_highlight'] = 'module_demo_templates';\n\n\t\t$this->add_crumb(lang('demo_templates'), $this->base . '&method=code_pack');\n\t\t$this->add_crumb(lang('install_demo_templates'));\n\n\t\t//$this->cached_vars['current_page'] = $this->view('code_pack_install.html', NULL, TRUE);\n\n\t\t//---------------------------------------------\n\t\t// Load Homepage\n\t\t//---------------------------------------------\n\n\t\treturn $this->ee_cp_view('code_pack_install.html');\n\t}", "public function add()\n\t{\n\t\t$product = ORM::factory('product', $this->input->post('product_id'));\n\t\t$quantity = $this->input->post('quantity', 1);\n\t\t$variant = ORM::factory('variant', $this->input->post('variant_id'));\n\t\t\n\t\t$this->cart->add_product($product, $variant, $quantity);\n\t\t\n\t\turl::redirect('cart');\n\t}", "public function code_pack_install()\n\t{\n\t\t$prefix = trim((string) ee()->input->get_post('prefix'));\n\n\t\tif ($prefix === '')\n\t\t{\n\t\t\tee()->functions->redirect($this->base . '&method=code_pack');\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tload lib\n\t\t// -------------------------------------\n\n\t\t$lib_name = str_replace('_', '', $this->lower_name) . 'codepack';\n\t\t$load_name = str_replace(' ', '', ucwords(str_replace('_', ' ', $this->lower_name))) . 'CodePack';\n\n\t\tee()->load->library($load_name, $lib_name);\n\t\tee()->$lib_name->autoSetLang = true;\n\n\t\t// -------------------------------------\n\t\t//\t¡Las Variables en vivo! ¡Que divertido!\n\t\t// -------------------------------------\n\n\t\t$variables = array();\n\n\t\t$variables['code_pack_name']\t= $this->lower_name . '_code_pack';\n\t\t$variables['code_pack_path']\t= $this->addon_path . 'code_pack/';\n\t\t$variables['prefix']\t\t\t= $prefix;\n\n\t\t// -------------------------------------\n\t\t//\tinstall\n\t\t// -------------------------------------\n\n\t\t$details = ee()->$lib_name->getCodePackDetails($this->addon_path . 'code_pack/');\n\n\t\t$this->cached_vars['code_pack_name'] = $details['code_pack_name'];\n\t\t$this->cached_vars['code_pack_label'] = $details['code_pack_label'];\n\n\t\t$return = ee()->$lib_name->installCodePack($variables);\n\n\t\t$this->cached_vars = array_merge($this->cached_vars, $return);\n\n\t\t//--------------------------------------\n\t\t// menus and page content\n\t\t//--------------------------------------\n\n\t\t$this->cached_vars['module_menu_highlight'] = 'module_demo_templates';\n\n\t\t$this->add_crumb(lang('demo_templates'), $this->base . '&method=code_pack');\n\t\t$this->add_crumb(lang('install_demo_templates'));\n\n\t\t$this->cached_vars['current_page'] = $this->view('code_pack_install.html', NULL, TRUE);\n\n\t\t//---------------------------------------------\n\t\t// Load Homepage\n\t\t//---------------------------------------------\n\n\t\treturn $this->ee_cp_view('index.html');\n\t}", "public function addNewVariant(){\n\t\t$map_id = $this->Generic_model->general_fetch_array_return_row('map_attributes_values', array('attribute_id'=>$this->input->post('newAttr'), 'value'=>$this->input->post('newValue')))->map_id;\n\t\t$skuid = str_replace(' ', '', $this->input->post('skuidNew'));\n\t\t$details = array(\n\t\t\t'pid' => $this->uri->segment(4),\n\t\t\t'skuid' => $skuid,\n\t\t\t'map_id' => $map_id,\n\t\t\t'instock' => $this->input->post('qtyNew'),\n\t\t\t'reorder_level' => $this->input->post('reorderLevelNew'),\n\t\t\t'min_qty_to_order' => $this->input->post('minQtyNew'),\n\t\t\t'oos_status' => $this->input->post('oosNew')\n\t\t);\n\t\t$response = $this->Generic_model->general_insert('stock_master', $details);\n\t\tif($response){\n\t\t\t$this->session->set_flashdata('success', 'Product Updated successfully with new variant.');\n\t\t}else{\n\t\t\t$this->session->set_flashdata('failure', 'Oops!! Something went wrong. Try again...');\n\t\t}\n\t\tredirect('admin/product/editProduct/'.$this->uri->segment(4));\n\t}", "public function add_product_bundle($image_name, $thumb_name)\n\t{\n\t\t\n\t\t\n\t\t$data = array(\n\t\t\t\t'product_bundle_name'=>ucwords(strtolower($this->input->post('product_bundle_name'))),\n\t\t\t\t'product_bundle_status'=>$this->input->post('product_bundle_status'),\n\t\t\t\t'product_bundle_price'=>$this->input->post('product_bundle_price'),\n\t\t\t\t'product_bundle_description'=>$this->input->post('product_bundle_description'),\n\t\t\t\t'created_on'=>date('Y-m-d H:i:s'),\n\t\t\t\t'created_by'=>$this->session->userdata('vendor_id'),\n\t\t\t\t'last_modified_by'=>$this->session->userdata('vendor_id'),\n\t\t\t\t'product_bundle_thumb_name'=>$thumb_name,\n\t\t\t\t'product_bundle_image_name'=>$image_name\n\t\t\t);\n\t\t\t\n\t\tif($this->db->insert('product_bundle', $data))\n\t\t{\n\t\t\treturn $this->db->insert_id();\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function generate()\n {\n $skuCount = (int) Option::get(\"catalog.generator\", \"sku_count\");\n if($skuCount > 0)\n parent::generate();\n }", "public function create_pack($form_name)\r\n\t{\r\n\t\t$api_params = array(\r\n\t\t\t'method' => 'moo.pack.createPack',\r\n\t\t\t'product' => $this->card_type,\r\n\t\t\t'friendlyName' => $this->pack_name.$form_name.' '.date(\"Y-m-d\"),\r\n\t\t);\r\n\r\n\t\t$response = $this->connect($api_params);\r\n\r\n\t\tif (isset($response->packId))\r\n\t\t{\r\n\t\t\t$this->pack_id = $response->packId;\r\n\t\t\t$this->dropin_url = $response->dropIns->imageChooser;\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function testAddPackingPlanTag()\n {\n }", "public function getProductSKU()\n {\n }", "public function scan(string $sku)\n {\n $this->addProduct($sku);\n }", "public function addItems(){\r\n $sellerId=$this->getsellerId();\r\n $productName= $this->getproductName();\r\n $productType=$this->getproductType();\r\n $productDescription=$this->getproductDescription();\r\n $productQuantity=$this->getproductQuantity();\r\n $productPrice=$this->getproductPrice();\r\n $productImage=$this->getproductImage();\r\n //productid\tproductType\tproductName\tproductDescription\tquantity\tprice\tpicture\tsellerid\r\n $query=\"INSERT INTO inventory(productType,productname, productdescription,quantity,price,picture,sellerid)\r\n VALUES ('$productType','$productName','$productDescription','$productQuantity','$productPrice','$productImage','$sellerId')\";\r\n return $query;\r\n }", "public function add_product_to_basket_post() {\n $user_id = $this -> post('user_id') ? $this -> post('user_id') : \"\";\n $special_id = (int) $this -> post('special_id') ? (int) $this -> post('special_id') : 0;\n $product_id = $this -> post('product_id') ? $this -> post('product_id') : \"\";\n $product_count = (int) $this -> post('product_count') ? (int) $this -> post('product_count') : \"1\";\n $addToShoppingList = trim($this -> post('add_to_shopping_list')) ? strtolower($this -> post('add_to_shopping_list')) : \"no\";\n $retailer_id = $this -> post('retailer_id') ? $this -> post('retailer_id') : \"\";\n $store_id = $this -> post('store_id') ? $this -> post('store_id') : \"\";\n $remove_previous = trim($this -> post('remove_previous')) ? trim( strtolower($this -> post('remove_previous'))) : \"no\";\n \n $allToAdd = \"No\";\n $isProductExist = \"No\";\n \n # Get Store details\n $storeDetails = $this -> basketmodel ->get_store_details($store_id);\n if($storeDetails)\n {\n $storeTypeId = $storeDetails['StoreTypeId'];\n \n # Get products StorePrice \n $productStorePrice = $this -> productmodel ->get_product_store_price($product_id,$retailer_id,$storeTypeId,$store_id);\n \n if($productStorePrice > 0 )\n {\n $allToAdd = \"Yes\"; \n }\n }\n \n if($allToAdd == \"Yes\")\n {\n # Remove all products from user's basket\n if( $remove_previous == 'yes')\n {\n $isRemoved = $this -> basketmodel -> remove_user_basket($user_id); \n }\n \n $result = $this -> basketmodel -> add_product_to_basket($special_id, $product_id, $user_id, $product_count,$retailer_id,$store_id);\n \n # Add to shopping list starts\n if($addToShoppingList == 'yes'){ \n \n # Get shopping list\n $shopping_list = $this -> quickshoppingmodel -> get_list($user_id);\n\n $shopping_list_array = array();\n if (!empty($shopping_list['ShoppingList'])) {\n $shopping_list_array = explode(\",\", $shopping_list['ShoppingList']);\n }\n\n $item_details = array();\n if (!empty($shopping_list_array)) {\n foreach ($shopping_list_array as $item) {\n $item = str_replace('|||', ',', $item);\n $item_array = explode(':::', $item);\n\n $item_array['name'] = $item_array[0];\n $item_array['product_id'] = $item_array[1];\n $item_array['retailer_id'] = $item_array[2];\n $item_array['store_type_id'] = $item_array[3];\n $item_array['store_id'] = $item_array[4];\n \n if( $item_array['product_id'] == $product_id){\n $item_array['count'] = $product_count;\n $isProductExist = \"Yes\";\n }else{\n $item_array['count'] = $item_array[5];\n }\n \n $item_array['bought'] = isset($item_array[6]) ? $item_array[6] : '0';\n\n unset($item_array[0], $item_array[1], $item_array[2], $item_array[3], $item_array[4], $item_array[5], $item_array[6]);\n $item_array['is_special'] = \"0\";\n\n $user_pref_retailer = $this -> basketmodel -> get_user_preferred_retailer($user_id);\n $product = $this -> productmodel -> product_details($item_array['product_id'], $user_pref_retailer -> Id, $user_id,$special_id);\n\n $product_price = $product['store_price'];\n if ($product['SpecialPrice'] > 0) {\n $product_price = $product['SpecialPrice'];\n $item_array['is_special'] = \"1\";\n }\n if ($product['SpecialPrice'] > 0 && $product['SpecialQty'] > 1) {\n $product_price = $product['SpecialPrice'] / $product['SpecialQty'];\n }\n if ($item_array['count'] > 1) {\n $product_price = $product_price * $item_array['count'];\n }\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n\n if ($product_price <= 0) {\n $product_price = '0.00';\n }\n else {\n $product_price = $product_price . '.00';\n }\n $item_array['price'] = $product_price;\n }\n else {\n $product_price = round($product_price, 2);\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n $product_price = $product_price . '.00';\n }\n elseif(strlen($prod_price_arr[1]) === 1){\n $product_price = $prod_price_arr[0].'.'.$prod_price_arr[1].'0';\n }\n $item_array['price'] = $product_price.'';\n }\n\n $item_details[] = $item_array;\n }\n }\n \n # Add new Item\n if( $isProductExist == \"No\" )\n { \n $userPreferrences = $this -> basketmodel -> get_user_preferred_retailer($user_id);\n $productDetails = $this -> productmodel -> product_details($product_id, $userPreferrences -> Id, $user_id,$special_id);\n\n $new_item_array = array ();\n $new_item_array['name'] = $productDetails['ProductName'];\n $new_item_array['product_id'] = $product_id;\n $new_item_array['retailer_id'] = $userPreferrences -> Id;\n $new_item_array['store_type_id'] = $userPreferrences -> StoreTypeId;\n $new_item_array['store_id'] = $userPreferrences -> StoreId;\n $new_item_array['count'] = $product_count;\n $new_item_array['bought'] = '0';\n $new_item_array['is_special'] = '0';\n\n $product_price = $productDetails['store_price'];\n if ($productDetails['SpecialPrice'] > 0) {\n $product_price = $productDetails['SpecialPrice'];\n $new_item_array['is_special'] = \"1\";\n }\n if ($productDetails['SpecialPrice'] > 0 && $productDetails['SpecialQty'] > 0) {\n $product_price = $productDetails['SpecialPrice'] / $productDetails['SpecialQty'];\n }\n if ($new_item_array['count'] > 1) {\n $product_price = $product_price * $new_item_array['count'];\n }\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n if ($product_price <= 0) {\n $product_price = '0.00';\n }\n else {\n $product_price = $product_price . '.00';\n }\n $new_item_array['price'] = $product_price;\n }\n else {\n $product_price = round($product_price, 2);\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n $product_price = $product_price . '.00';\n }\n elseif(strlen($prod_price_arr[1]) === 1){\n $product_price = $prod_price_arr[0].'.'.$prod_price_arr[1].'0';\n }\n $new_item_array['price'] = $product_price.'';\n }\n $item_details[] = $new_item_array;\n }//if( $isProductExist = \"No\" )\n\n $shopping_list_string = '';\n $i = 0;\n foreach($item_details as $singleItem)\n {\n if ($i == 0) {\n $shopping_list_string .= $singleItem['name'] . ':::' . $singleItem['product_id'] . ':::' . $singleItem['retailer_id'] . ':::' . $singleItem['store_type_id'] . ':::' . $singleItem['store_id'] . ':::' . $singleItem['count'] . ':::' . $singleItem['bought'];\n }\n else {\n $shopping_list_string .= ',' . $singleItem['name'] . ':::' . $singleItem['product_id'] . ':::' . $singleItem['retailer_id'] . ':::' . $singleItem['store_type_id'] . ':::' . $singleItem['store_id'] . ':::' . $singleItem['count'] . ':::' . $singleItem['bought'];\n }\n $i++; \n }\n\n $shoppingListData = array(\n 'UserId' => $user_id,\n 'ShoppingList' => $shopping_list_string,\n 'CreatedOn' => date('Y-m-d H:i:s'),\n );\n //Save the user shopping list\n $resultShoppingList = $this -> quickshoppingmodel -> save_list($user_id, $shoppingListData);\n \n } //if($addToShoppingList == 'yes')\n # Add product to shopping list ends\n \n //$basket_count = $this -> basketmodel -> get_basket_count($user_id);\n $basket_count = $this -> basketmodel -> get_user_basket_count($user_id,$retailer_id,$store_id);\n \n if ($result == 'duplicate') {\n $message = \"Product already added to basket\";\n $result = 0;\n }\n else {\n $message = \"Product added to basket successfully\";\n }\n\n if ($result) {\n $retArr['status'] = SUCCESS;\n $retArr['message'] = $message;\n $retArr['basket_count'] = $basket_count;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n else {\n $retArr['status'] = FAIL;\n $retArr['message'] = $message;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n \n }else{\n $retArr['status'] = FAIL;\n $retArr['message'] = \"Not allow to add this product.\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die; \n }\n }", "function action_rapide_sauve_pack() {\r\n\t$titre0 = $titre = _T('couteauprive:pack_actuel', array('date'=>cs_date())); $n=0;\r\n\tif(isset($GLOBALS['cs_installer'][$titre]))\r\n\t\twhile(isset($GLOBALS['cs_installer'][\"$titre (\".++$n.')']));\r\n\tif($n) $titre = \"$titre ($n)\";\r\n\tinclude_spip(_DIR_CS_TMP.'config');\r\n\t$pack = \"\\n# Le Couteau Suisse : pack de configuration du \".date(\"d M Y, H:i:s\").\"\\n\\$GLOBALS['cs_installer']['$titre'] = \" . var_export($GLOBALS['cs_installer'][$titre0], true) . \";\\n\";\r\n\t$fo = strlen(_FILE_OPTIONS)? _FILE_OPTIONS:false;\r\n\t$t='';\r\n\tif ($fo) {\r\n\t\tif (lire_fichier($fo, $t) && strlen($t)) {\r\n\t\t\t$t = preg_replace(',\\?'.'>\\s*$,m', $pack.'?'.'>', $t, 1);\r\n\t\t\tif(ecrire_fichier($fo, $t)) return;\r\n\t\t\telse cs_log(\"ERREUR : l'ecriture du fichier $fo a echoue !\");\r\n\t\t} else cs_log(\" -- fichier $fo illisible. Inclusion non permise\");\r\n\t\tif(strlen($t)) return;\r\n\t}\r\n\t// creation\r\n\t$fo = defined('_SPIP19100')?_DIR_RESTREINT.'mes_options.php':_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES._NOM_CONFIG.'.php';\r\n\t$ok = ecrire_fichier($fo, '<?'.\"php\\n\".$pack.\"\\n?\".'>');\r\ncs_log(\" -- fichier $fo absent \".($ok?'mais cree avec l\\'inclusion':' et impossible a creer'));\r\n}", "function geneshop_add2basket($node, $type) {\n // Verification of the absence of this node in basket.\n if (_geneshop_in_basket($node->nid)) {\n drupal_set_message(t('\"@title\" is already in your basket', array('@title' => $node->title)\n ), 'warning');\n }\n else {\n global $user;\n if ($user->uid == 0 && !drupal_session_started()) {\n // Must initialize sessions for anonymous users.\n drupal_session_start();\n }\n $item = array();\n $sql =<<<SQL\n SELECT *\n FROM chado.gene\n WHERE nid = :nid\nSQL;\n $args = array(':nid' => $node->nid);\n $result = db_query($sql, $args)->fetchObject();\n $vars = get_object_vars ( $result );\n $item['title'] = $result->name;\n $item['content'] = $result->name . \"~\" . $result->coordinate . \"~\" . $result->start . \"~\" . $result->stop . \"~\" . $result->gene_family . \"~\" . $result->description;\n $item['header'] = \"Name~Chromosome~Start~End~Gene family~Description\";\n if (variable_get('geneshop_show_qty', TRUE)) {\n $item['qty'] = 1;\n }\n if (variable_get('geneshop_show_price', FALSE) && ($price = _geneshop_get_price($node))) {\n if ($price <= 0 || !is_numeric($price)\n ) {\n drupal_set_message(t('Sorry, but this product currently unavailable\n for ordering'), 'warning');\n $item = FALSE;\n }\n else {\n if (!isset($_SESSION['basket']['currency'])) {\n $_SESSION['basket']['currency'] = variable_get('geneshop_price_suffix', '');\n }\n if (!isset($_SESSION['basket']['total_sum'])) {\n $_SESSION['basket']['total_sum'] = 0;\n }\n $_SESSION['basket']['total_sum'] += $price;\n $item['price'] = $_SESSION['basket']['store'][$node->nid]['unit_price'] = $price;\n }\n }\n if ($item) {\n $_SESSION['basket']['items'][$node->nid] = $item;\n /*drupal_set_message(t(\"'@title' added in your basket\", array('@title' => $node->title)));*/\n }\n }\n if ($type == 'ajax') {\n $basket_block = geneshop_block_content();\n $commands = array();\n $commands[] = ajax_command_replace(NULL, geneshop_add2basket_link($node->nid));\n $commands[] = ajax_command_replace('#geneshop-ajax-block-content', render($basket_block));\n $output = array('#type' => 'ajax', '#commands' => $commands);\n ajax_deliver($output);\n }\n else {\n // drupal_goto();\n }\n}", "public function addStore ($data) {\n $output = array();\n $sh_result = exec('sudo '.STORE_BUILD_DIR.'build_store.sh ' . $data['code'] . ' '. $data['final_domain'] . ' ' . $data['code'] , $output); \n\n\t $store_productsets = $data['store_productsets'];\n\t unset($data['store_productsets']);\n\t \n\t $this->db->add('store', $data);\n\t $store_id = $this->db->get_last_insert_id();\n\t \n\t $store_productsets_data['store_id'] = $store_id;\n\t \n\t $this->load->model('user/productset');\n\t \t \n \t\tforeach ($store_productsets as $productset_id) {\n \t\t \n \t\t if ($this->model_user_productset->is_own_or_core_productset($productset_id, $data['user_id'])) {\n \t\t \n \t\t $store_productsets_data['productset_id'] = $productset_id;\n \t\t $this->db->add('store_productsets', $store_productsets_data);\n \t\t }\n \t\t}\n\n // KMC : New 06/28/2010 :\n $this->buildNewStoreData($data['code'], $store_productsets); \n $template_output = $this->buildSiteTemplatePieces($data['code'], $data['user_id']);\n $output = array_merge($output, $template_output);\n return $output;\n\t}", "public function add() {\n $page = 'basket';\n $id = $_GET['id'];\n\n $product = $this->productManager->findOne($id);\n\n $productInBasket = $this->inBasket($id); //check if the product is in the basket\n\n if(!empty($product) && isset($_SESSION['user']['basket'])) {\n if ($productInBasket)\n $_SESSION['user']['basket'][$id]['quantity']++;\n else\n $_SESSION['user']['basket'][$id] = array(\"product\" => $product, \"quantity\" => 1);\n }\n\n header(\"Location: ./index.php?ctrl=basket&action=consult\");\n require('./View/default.php');\n }", "public function buyStock($u) {\r\n\t\t\tinclude 'database.php';\r\n\t\t\t$query = 'INSERT INTO experimentalshares (ownerId, valueAtPurchase, company) VALUES (:ownerId, :valueAtPurchase, :company)';\r\n\t\t\t$statement = $db->prepare($query);\r\n\t\t\t$statement->bindValue(':ownerId', $u->getId());\r\n\t\t\t$statement->bindValue(':valueAtPurchase', $this->currentValue);\r\n\t\t\t$statement->bindValue(':company', $this->name);\r\n\t\t\t$statement->execute();\r\n\t\t}", "function addToCart(){\n\t\tif(!isset($_POST['id'])) header(sprintf(\"Location: %s\", $this->Files['Cart']));\n\t\t// ---------- These are our posted variables --------------\t\t\n\t\t$TmpCart=array();\n\t\t$TmpCart['type'] \t= 1;\n\t\t$TmpCart['name'] \t= clean_variable($_POST['name'],true);\n\t\t$TmpCart['id']\t \t= clean_variable($_POST['id'],true);\n\t\t$TmpCart['qty'] \t= (is_int($_POST['qty']) && isset($_POST['qty']))?clean_variable($_POST['qty'],true):'1';\n\t\t$TmpCart['price'] = clean_variable($_POST['price'],true);\n\t\t\n\t\t// Process Products Specs and Attributes\n\t\t$SPC = \t\t\t(isset($_POST['spec'])) ? \n\t\t\t\t\t\t\t\t\t((!is_array($_POST['spec'])) ? array( $_POST['spec'] ) : $_POST['spec']):\n\t\t\t\t\t\t\t\tarray();\n\t\tif(is_array($SPC)) foreach($SPC as &$v) clean_variable($v,true);\n\t\t\n\t\t$TmpStrg = '';\n\t\tif(count($SPC) > 0){ /* // Check the Specs of the product and get the price for that spec. If differant use that price\n\t\t\tforeach($SPC as $k => $v){ \n\t\t\t\t$getSpecs = new sql_processor($this->DB,$this->Conn,$this->Gateway);\n\t\t\t\t$getSpecs->mysql(\"SELECT `att_price`, `att_sale`, `att_sale_exp` FROM `prod_link_prod_att` WHERE `att_id` = '$v' AND `prod_id` = '\".$TmpCart['id'].\"';\");\n\t\t\t\t$getSpecs->mssql(\"SELECT att_price, att_sale, att_sale_exp FROM prod_link_prod_att WHERE att_id = '$v' AND prod_id = '\".$TmpCart['id'].\"';\");\n\t\t\t\t$getSpecs = $getSpecs->Rows();\n\t\t\t\tif($getSpecs[0]['att_price'] > 0){\n\t\t\t\t\t$attSaleExp = ereg('[^A-Za-z0-9]', $getSpecs[0]['att_sale_exp']);\n\t\t\t\t\tif($attSaleExp == \"00000000000000\") $attprices += $getSpecs[0]['att_price'];\n\t\t\t\t\telse if ($attSaleExp > date(\"YmdHis\")) $attprices += $getSpecs[0]['att_sale'];\n\t\t\t\t\telse $attprices += $getSpecs[0]['att_price'];\n\t\t\t\t} else { $attprices = 0; }\n\t\t\t\t$TmpStrg .= ($TmpStrg == \"\") ? ($v.\".\".$attprices) : (\":\".$v.\".\".$attprices);\n\t\t\t} */\n\t\t}\n\t\t$TmpCart['spec'] = $TmpStrg;\n\t\t\n\t\t// Process Products Special Options\n\t\t$SPCL = \t\t(isset($_POST['special'])) ?\n\t\t\t\t\t\t\t\t\t((!is_array($_POST['special'])) ? array( $_POST['special'] ) : $_POST['special']):\n\t\t\t\t\t\t\t\tarray();\n\t\tif(is_array($SPCL)) foreach($SPCL as &$v) clean_variable($v,true);\n\t\t$TmpCart['special'] = (is_array($SPCL) && count($SPCL) > 0) ? implode(\":\",$SPCL) : $SPCL;\n\t\t\n\t\t\n\t\t$SLCT = \t\t(isset($_POST['selections'])) ?\n\t\t\t\t\t\t\t\t\t((!is_array($_POST['selections'])) ? array( $_POST['selections'] ) : $_POST['selections']):\n\t\t\t\t\t\t\t\tarray();\n\t\tif(is_array($SLCT)) foreach($SLCT as &$v) clean_variable($v,true);\n\t\t$TmpCart['selections'] = (is_array($SLCT) && count($SLCT) > 0) ? implode(\":\",$SLCT) : $SLCT;\n\t\t\n\t\t// Process Products Messages and Comments, mainly used for gift cards\n\t\t$MSG = \t\t\t(isset($_POST['message'])) \t\t\t? clean_variable($_POST['message'],true):'';\n\t\t$MSGTo = \t\t(isset($_POST['message_to'])) \t? clean_variable($_POST['message_to'],true):'';\n\t\t$MSGFrm = \t(isset($_POST['message_from'])) ? clean_variable($_POST['message_from'],true):'';\n\t\t\n\t\t$MSGEng = \t(isset($_POST['message']))?\n\t\t\t\t\t\t\t\t\t((!is_array($_POST['engraving']))? array( $_POST['engraving'] ) : $_POST['engraving'] ):\n\t\t\t\t\t\t\t\t'';\n\t\tif(is_array($MSGEng)) foreach($MSGEng as &$v) clean_variable($v,true);\n\t\t/*\n\t\t$getMsgs = new sql_processor($this->DB,$this->Conn,$this->Gateway);\n\t\t$getMsgs->mysql(\"SELECT `prod_msg_type` FROM `prod_products` WHERE `prod_id` = '\".$TmpCart['id'].\"';\");\n\t\t$getMsgs->mssql(\"SELECT prod_msg_type FROM prod_products WHERE prod_id = '\".$TmpCart['id'].\"';\");\n\t\t$getMsgs = $getMsgs->Rows();\n\t\t$Msgs = $getMsgs[0]['prod_msg_type'];\n\t\t*/\n\t\t$Msgs='';\n\t\tif(strlen(trim($Msgs)) > 0) $Msgs = unserialize(urldecode($Msgs));\n\t\telse $Msgs = array(); $Tarray = array();\n\t\tif(count($Msgs) > 0){\n\t\t\tforeach($Msgs as $k => $v){\n\t\t\t\tswitch($k){\n\t\t\t\t\tcase \"Cmnts\": if(strlen(trim($MSG)) > 0) $Tarray['Cmnts'][0] = $MSG; break; // Straight Comment for the Product\n\t\t\t\t\tcase \"ToFrm\":\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// To From comments for Gift Cards Ect.\n\t\t\t\t\t\tif(strlen(trim($MSGTo)) > 0){\n\t\t\t\t\t\t\t$Tarray['ToFrm'][0] = $MSGTo;\n\t\t\t\t\t\t\t$Tarray['ToFrm'][1] = $MSGFrm;\n\t\t\t\t\t\t} break;\n\t\t\t\t\tcase \"Engv\":\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Engravings for the product allows for multiple lines\n\t\t\t\t\t\tif(intval($v)>1){ if(strlen(trim($MSGEng)) > 0) $Tarray['Engv'][0] = $MSGEng;\n\t\t\t\t\t\t} else { $n=0; foreach($MSGEng as $v){\n\t\t\t\t\t\t\t\tif(strlen(trim($v)) > 0) $Tarray['Engv'][$n] = $v; $n++;\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t} break;\n\t\t\t\t}\n\t\t\t} $TmpCart['msgs'] = $Tarray;\n\t\t} else { $TmpCart['msgs'] = 0; }\n\t\t\n\t\t$TmpCart['attnd']\t= \t(isset($_POST['attendee']))? array(clean_variable($_POST['attendee'],true)) : array(0);\n\t\t\n\t\t$this->updateCart($TmpCart); // Update our cart with our new information\n\t\t\n\t\theader(sprintf(\"Location: %s\", $this->Files['Cart'] )); // Go to page to dispaly Cart -- Do this to prevent double insertion of product via refresh button\n\t}", "function addToCart() {\n\t\t$wine_name = $_SESSION['wine']['name'];\n\t\t//check if there is a registered user logged in\n\t\t// --> LET US NOT THINK ABOUT USERNAMES FOR NOW <--\n\t\t//if (!isset($_SESSION['user'])) {\n\t\t\t//generate a random username (string) for\n\t\t\t//unlogged user\n\t\t\t//$username = uniqid('',true);\n\t\t\t//$_SESSION['user']['username'] = $username;\n\t\t//}\n\n\t\t//get the cart\n\t\t$cart = $_SESSION['cart'];\n\t\t//get wine count\n\t\t$wine_qty = $_POST['wine_quantity'];\n\t\t// detect if the same item already exist in the cart\n\t\tif (isset($_SESSION['cart'][$wine_name])) {\n\t\t\t//just add the post quantity to the quantity in the cart\n\t\t\t$_SESSION['cart'][$wine_name] += $wine_qty;\n\t\t}\n\t\telse {\n\t\t\t//create an array of the selected item to be\n\t\t\t//added to the cart\n\t\t\t$_SESSION['cart'][$wine_name] = intval($wine_qty);\n\t\t\t//current date will also be used at view cart\n\t\t\t//\"purchase_date\" => date(\"Y-m-d h:i:sa\")\n\t\t}\n\t\t//redirect to homepage\n\t\theader('Location: index.php');\n\t}", "public function addToCart() {\n\t\t$baseQuantity = 1;\n\t\t$result = $this->db->select();\n\t\twhile(($row = mysql_fetch_assoc($result)) != FALSE){\n\t\t\t$_SESSION['cart'][] = array($row['id'], $row['name'], $row['description'], $row['cost'], $baseQuantity);\n\t\t}\n\t}", "abstract public function add(string $name, string $description, array $variants): int;", "function add()\n\t{\n\t\tif (!$this->checkLogin()) {\n\t\t\tredirect(base_url());\n\t\t}\n\n\t\t$pageData['header_title'] = APP_NAME . ' | Add Product';\n\t\t$pageData['page_title'] = 'Inventory Management';\n\t\t$pageData['parent_menu'] = 'inventory_management';\n\t\t$pageData['child_menu'] = 'add_new_product';\n\n\t\t//get branches\n\t\t$where = array('status_id =' => ACTIVE);\n\t\t$select = '*';\n\t\t$records = 2;\n\t\t$branches = $this->base_model->getCommon($this->branchesTable, $where, $select, $records);\n\t\t$pageData['branches'] = json_encode($branches);\n\t\t// print_r($branches);die;\n\t\t$this->load->view('admin/inventory_management/add', $pageData);\n\t}", "function jigoshop_upgrade_150() {\n\t\n\tJigoshop_Base::get_options()->add_option( 'jigoshop_cart_shows_shop_button', 'no' );\n\tJigoshop_Base::get_options()->add_option( 'jigoshop_enable_postcode_validating', 'no' );\n\tJigoshop_Base::get_options()->add_option( 'jigoshop_product_thumbnail_columns', '3' );\n\t\n}", "public function add_to_basket_post() {\n $user_id = $this -> post('user_id') ? $this -> post('user_id') : \"\";\n $special_id = $this -> post('special_id') ? $this -> post('special_id') : \"\";\n $product_id = $this -> post('product_id') ? $this -> post('product_id') : \"\";\n $product_count = (int) $this -> post('product_count') ? (int) $this -> post('product_count') : \"1\";\n \n $retailerId = (int) $this->post('retailer_id') ? (int)$this->post('retailer_id') : 0;\n $storeId = (int) $this->post('store_id') ? (int) $this->post('store_id') : 0;\n \n \n $allToAdd = \"No\";\n \n if($storeId > 0 )\n {\n $storeDetails = $this -> basketmodel -> get_store_retailer_details($storeId);\n $storeTypeId = $storeDetails['StoreTypeId'];\n }else{\n # Get user preference\n $user_preference = $this -> usermodel ->get_user_preference($user_id);\n if($user_preference)\n {\n $retailerId = $user_preference['RetailerId'];\n $storeTypeId = $user_preference['StoreTypeId'];\n $storeId = $user_preference['StoreId'];\n }\n }\n \n # Get products StorePrice \n $productStorePrice = $this -> productmodel ->get_product_store_price($product_id,$retailerId,$storeTypeId,$storeId);\n \n if($productStorePrice > 0 )\n {\n $allToAdd = \"Yes\"; \n }\n \n if($allToAdd == \"Yes\")\n {\n $result = $this -> basketmodel -> add_to_basket($special_id, $product_id, $user_id, $product_count);\n\n //$basket_count = $this -> basketmodel -> get_basket_count($user_id);\n $basket_count = $this -> basketmodel -> get_user_basket_count($user_id,$retailerId,$storeId);\n \n if ($result == 'duplicate') {\n $message = \"Product already added to basket\";\n $result = 0;\n }\n else {\n $message = \"Product added to basket successfully\";\n }\n\n if ($result) {\n $retArr['status'] = SUCCESS;\n $retArr['message'] = $message;\n $retArr['basket_count'] = $basket_count;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n else {\n $retArr['status'] = FAIL;\n $retArr['message'] = $message;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n \n }else{\n $retArr['status'] = FAIL;\n $retArr['message'] = \"Not allow to add this product.\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die; \n }\n }", "public function product_packaging() {\n permittedArea();\n\t\t\n\t\t$data['product_name'] = $this->db->group_by('product_preparation')->get('product_ingredients');\n\t\t\n \n\tif ($this->input->post()) {\n if ($this->input->post('submit') != 'add_packing')\n die('Error! sorry');\n\n $this->form_validation->set_rules('product_preparation', 'Product for Packing', 'trim|required');\n $this->form_validation->set_rules('prepaired_by', 'Assistant', 'trim|required');\n \n\t\t\n if ($this->form_validation->run() == true) {\n \n $insert = $this->Product_preparation_model->product_packaging();\n if ($insert) {\n $this->session->set_flashdata('successMsg', 'Packing Saved Successfully');\n redirect(base_url('Product_preparation/product_packaging'));\n }\n\t\t\t}\n\t\t\t \n }\n\n theme('product_packaging', $data);\n }", "function admin_add(){\n\t\t\n \t\t$this->layout='backend/backend';\n\t\t$this->set(\"title_for_layout\",ADD_VENDOR);\t\t\n\t\tif(!empty($this->data)){\t\t\t\t\n\t\t\t\t\n\t\t\t/*** Then, to check if the data validates, use the validates method of the model, \n\t\t\t * which will return true if it validates and false if it doesn’t:\n\t \t\t */ \n\t\t\t$errors = $this->Vendor->validate_data($this->data);\n\t\t\tif(count($errors) == 0){\n\t\t\t\t\n\t\t\t\tApp::import(\"Component\",\"Upload\");\n\t\t\t\t$upload = new UploadComponent();\n\t\t\t\t$allowed_ext = array('jpg','jpeg','gif','png','JPG','JPEG','GIF','PNG');\n\t\t\t\t$path_info = pathinfo($this->data['Vendor']['image']['name']);\n\t\t\t\t$file_extension = strtolower($path_info['extension']);\n\t\t\t\tif(in_array($file_extension,$allowed_ext)){\n\t\t\t\t\t$file = $this->data['Vendor']['image'];\n\t\t\t\t\t$thumb_directory_path = $this->create_directory(\"vendor_image_thumb\");\n\t\t\t\t\t$actual_directory_path = $this->create_directory(\"vendor_image_actual\");\n\t\t\t\t\t$filename = str_replace(array(\" \",\".\"),\"\",md5(microtime())).\".\".$path_info['extension'];\n\t\t\t\t\t$rules['type'] = 'resizecrop';\n\t\t\t\t\t$rules['size'] = array (50,50); \n\t\t\t\t\t$file_name = $upload->upload($file,$thumb_directory_path,$filename,$rules,$allowed_ext);\n\t\t\t\t\t$file_name = $upload->upload($file,$actual_directory_path,$filename,null,$allowed_ext);\n\t\t\t\t\tif($file_name){\n\t\t\t\t\t\t$data = $this->data;\n\t\t\t\t\t\t$data['Vendor']['image'] = $filename;\n\t\t\t\t\t\tif($this->Vendor->save($data)){\n\t\t\t\t\t\t\t$this->Session->setFlash(RECORD_SAVE, 'message/green');\n\t\t\t\t\t\t\t$this->redirect(array('controller'=>\"vendors\",'action'=>'list','admin'=>true)); \n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$this->Session->setFlash(RECORD_ERROR, 'message/red');\n\t\t\t\t\t\t\t$this->redirect($this->referer()); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$errors['image'][] = ERR_IMAGE_TYPE;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->set(\"errors\",$errors);\n\t\t}\n\t\t\n \t}", "public function addProduct(){\n\t\t// prepares the request\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . IP . \"/bde_site/api/product/\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Authorization: ' . TOKEN));\n\n\t\t// unset unused attributes from the variable\n\t\tunset($_POST['_token']);\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($_POST));\n\n\t\t// send the request\n\t\t$output = curl_exec($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\n\t\treturn redirect('/');\n\t}", "public function add_to_basket_new_post() {\n $user_id = $this -> post('user_id') ? $this -> post('user_id') : \"\";\n $special_id = (int) $this -> post('special_id') ? (int) $this -> post('special_id') : 0;\n $product_id = $this -> post('product_id') ? $this -> post('product_id') : \"\";\n $product_count = (int) $this -> post('product_count') ? (int) $this -> post('product_count') : \"1\";\n $addToShoppingList = trim($this -> post('add_to_shopping_list')) ? strtolower($this -> post('add_to_shopping_list')) : \"no\";\n $retailerId = (int) $this->post('retailer_id') ? (int)$this->post('retailer_id') : 0;\n $storeId = (int) $this->post('store_id') ? (int) $this->post('store_id') : 0;\n \n $allToAdd = \"No\";\n $isProductExist = \"No\";\n \n if($storeId > 0 )\n {\n $storeDetails = $this -> basketmodel -> get_store_retailer_details($storeId);\n $storeTypeId = $storeDetails['StoreTypeId'];\n }else{\n # Get user preference\n $user_preference = $this -> usermodel ->get_user_preference($user_id);\n\t\t\t\n if($user_preference)\n {\n $retailerId = $user_preference['RetailerId'];\n $storeTypeId = $user_preference['StoreTypeId'];\n $storeId = $user_preference['StoreId'];\n }\n }\n \n # Get products StorePrice \n $productStorePrice = $this -> productmodel ->get_product_store_price($product_id,$retailerId,$storeTypeId,$storeId);\n \n if($productStorePrice > 0 )\n {\n $allToAdd = \"Yes\"; \n }\n \n if($allToAdd == \"Yes\")\n {\n $result = $this -> basketmodel -> add_to_basket($special_id, $product_id, $user_id, $product_count);\n \n \n # Add to shopping list starts\n if($addToShoppingList == 'yes'){ \n \n # Get shopping list\n $shopping_list = $this -> quickshoppingmodel -> get_list($user_id);\n\n $shopping_list_array = array();\n if (!empty($shopping_list['ShoppingList'])) {\n $shopping_list_array = explode(\",\", $shopping_list['ShoppingList']);\n }\n\n $item_details = array();\n if (!empty($shopping_list_array)) {\n foreach ($shopping_list_array as $item) {\n $item = str_replace('|||', ',', $item);\n $item_array = explode(':::', $item);\n\n $item_array['name'] = $item_array[0];\n $item_array['product_id'] = $item_array[1];\n $item_array['retailer_id'] = $item_array[2];\n $item_array['store_type_id'] = $item_array[3];\n $item_array['store_id'] = $item_array[4];\n \n if( $item_array['product_id'] == $product_id){\n $item_array['count'] = $product_count;\n $isProductExist = \"Yes\";\n }else{\n $item_array['count'] = $item_array[5];\n }\n \n $item_array['bought'] = isset($item_array[6]) ? $item_array[6] : '0';\n\n unset($item_array[0], $item_array[1], $item_array[2], $item_array[3], $item_array[4], $item_array[5], $item_array[6]);\n $item_array['is_special'] = \"0\";\n\n $user_pref_retailer = $this -> basketmodel -> get_user_preferred_retailer($user_id);\n $product = $this -> productmodel -> product_details($item_array['product_id'], $user_pref_retailer -> Id, $user_id,$special_id);\n\n $product_price = $product['store_price'];\n if ($product['SpecialPrice'] > 0) {\n $product_price = $product['SpecialPrice'];\n $item_array['is_special'] = \"1\";\n }\n if ($product['SpecialPrice'] > 0 && $product['SpecialQty'] > 1) {\n $product_price = $product['SpecialPrice'] / $product['SpecialQty'];\n }\n if ($item_array['count'] > 1) {\n $product_price = $product_price * $item_array['count'];\n }\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n\n if ($product_price <= 0) {\n $product_price = '0.00';\n }\n else {\n $product_price = $product_price . '.00';\n }\n $item_array['price'] = $product_price;\n }\n else {\n $product_price = round($product_price, 2);\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n $product_price = $product_price . '.00';\n }\n elseif(strlen($prod_price_arr[1]) === 1){\n $product_price = $prod_price_arr[0].'.'.$prod_price_arr[1].'0';\n }\n $item_array['price'] = $product_price.'';\n }\n\n $item_details[] = $item_array;\n }\n }\n \n # Add new Item\n if( $isProductExist == \"No\" )\n { \n $userPreferrences = $this -> basketmodel -> get_user_preferred_retailer($user_id);\n $productDetails = $this -> productmodel -> product_details($product_id, $userPreferrences -> Id, $user_id,$special_id);\n\n $new_item_array = array ();\n $new_item_array['name'] = $productDetails['ProductName'];\n $new_item_array['product_id'] = $product_id;\n $new_item_array['retailer_id'] = $userPreferrences -> Id;\n $new_item_array['store_type_id'] = $userPreferrences -> StoreTypeId;\n $new_item_array['store_id'] = $userPreferrences -> StoreId;\n $new_item_array['count'] = $product_count;\n $new_item_array['bought'] = '0';\n $new_item_array['is_special'] = '0';\n\n $product_price = $productDetails['store_price'];\n if ($productDetails['SpecialPrice'] > 0) {\n $product_price = $productDetails['SpecialPrice'];\n $new_item_array['is_special'] = \"1\";\n }\n if ($productDetails['SpecialPrice'] > 0 && $productDetails['SpecialQty'] > 0) {\n $product_price = $productDetails['SpecialPrice'] / $productDetails['SpecialQty'];\n }\n if ($new_item_array['count'] > 1) {\n $product_price = $product_price * $new_item_array['count'];\n }\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n if ($product_price <= 0) {\n $product_price = '0.00';\n }\n else {\n $product_price = $product_price . '.00';\n }\n $new_item_array['price'] = $product_price;\n }\n else {\n $product_price = round($product_price, 2);\n $prod_price_arr = explode('.', $product_price);\n if (!isset($prod_price_arr[1])) {\n $product_price = $product_price . '.00';\n }\n elseif(strlen($prod_price_arr[1]) === 1){\n $product_price = $prod_price_arr[0].'.'.$prod_price_arr[1].'0';\n }\n $new_item_array['price'] = $product_price.'';\n }\n $item_details[] = $new_item_array;\n }//if( $isProductExist = \"No\" )\n\n $shopping_list_string = '';\n $i = 0;\n foreach($item_details as $singleItem)\n {\n if ($i == 0) {\n $shopping_list_string .= $singleItem['name'] . ':::' . $singleItem['product_id'] . ':::' . $singleItem['retailer_id'] . ':::' . $singleItem['store_type_id'] . ':::' . $singleItem['store_id'] . ':::' . $singleItem['count'] . ':::' . $singleItem['bought'];\n }\n else {\n $shopping_list_string .= ',' . $singleItem['name'] . ':::' . $singleItem['product_id'] . ':::' . $singleItem['retailer_id'] . ':::' . $singleItem['store_type_id'] . ':::' . $singleItem['store_id'] . ':::' . $singleItem['count'] . ':::' . $singleItem['bought'];\n }\n $i++; \n }\n\n $shoppingListData = array(\n 'UserId' => $user_id,\n 'ShoppingList' => $shopping_list_string,\n 'CreatedOn' => date('Y-m-d H:i:s'),\n );\n //Save the user shopping list\n $resultShoppingList = $this -> quickshoppingmodel -> save_list($user_id, $shoppingListData);\n \n } //if($addToShoppingList == 'yes')\n # Add product to shopping list ends\n \n //$basket_count = $this -> basketmodel -> get_basket_count($user_id);\n $basket_count = $this -> basketmodel -> get_user_basket_count($user_id,$retailerId,$storeId);\n \n if ($result == 'duplicate') {\n $message = \"Product already added to basket\";\n $result = 0;\n }\n else {\n $message = \"Product added to basket successfully\";\n }\n\n if ($result) {\n $retArr['status'] = SUCCESS;\n $retArr['message'] = $message;\n $retArr['basket_count'] = $basket_count;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n else {\n $retArr['status'] = FAIL;\n $retArr['message'] = $message;\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n \n }else{\n $retArr['status'] = FAIL;\n $retArr['message'] = \"Not allow to add this product.\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die; \n }\n }", "function cmst_vendor_add() {\n\t\tglobal $conn;\n\n\t\t// Initialize table object\n\t\t$GLOBALS[\"mst_vendor\"] = new cmst_vendor();\n\n\t\t// Intialize page id (for backward compatibility)\n\t\tif (!defined(\"EW_PAGE_ID\"))\n\t\t\tdefine(\"EW_PAGE_ID\", 'add', TRUE);\n\n\t\t// Initialize table name (for backward compatibility)\n\t\tif (!defined(\"EW_TABLE_NAME\"))\n\t\t\tdefine(\"EW_TABLE_NAME\", 'mst_vendor', TRUE);\n\n\t\t// Open connection to the database\n\t\t$conn = ew_Connect();\n\t}", "function add()\n\t{\n\t\t// hien thi form them san pham\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/add');\n\t}", "public function addItem($name, $description, $unitPrice, $quantity, $weight = 0, $type = 'Asset', $sku = '') {\n\n $this->jsonData['Cart']['Items'][] = array(\n 'Name' => $name,\n 'Description' => $description,\n 'UnitPrice' => $this->validateNumber($unitPrice, 18),\n 'Quantity' => $this->validateNumber($quantity, 9),\n 'Weight' => $this->validateNumber($weight, 9),\n 'Type' => $this->validateType($type, 'Item'),\n 'Sku' => $this->validateString($sku, 32) // Whatever the hell it is\n );\n\n }", "public function buy()\n\t{\n\t\t$data['aktif']\t= 'prospektus';\n\t\t$this->template->load('template','prospektus/V_buy', $data);\n\t}", "public function uploadApkAction() {\n\t $apkId = $this->getInput('apkId');\n\t $this->assign('apkId', $apkId);\n\t $this->getView()->display('common/uploadApk.phtml');\n\t exit;\n\t}", "public function run()\n {\n $packages = [\n ['name' => 'Chipboard packaging'],\n ['name' => 'Container'],\n ['name' => 'Corrugated boxes'],\n ['name' => 'Foil sealed bags'],\n ['name' => 'Pallets'],\n ['name' => 'Paper board boxes'],\n ['name' => 'Plastic boxes'],\n ['name' => 'Polybags'],\n ['name' => 'Rigid boxes'],\n ['name' => 'Envelopes'],\n ];\n\n Package::insert($packages);\n }", "public function add()\n {\n $item = new stdClass();\n $item->item_id = null;\n $item->barcode = null;\n $item->price = null;\n $item->stock = null;\n $item->name = null;\n $item->category_id = null;\n $query_category = $this->categorys_m->get();\n $query_unit = $this->units_m->get();\n $unit[null] = '-Pilih-';\n foreach ($query_unit->result() as $u) {\n\n $unit[$u->unit_id] = $u->name;\n };\n $data = [\n 'page' => 'add',\n 'row' => $item,\n 'category' => $query_category,\n 'unit' => $unit,\n 'selectedunit' => null\n ];\n $this->template->load('template', 'product/item/item_add', $data);\n }", "function addProduct($conn, $name, $vendor, $manufacturer, $rating, $quantity)\n {\n $query = \"LOCK TABLES \".strtoupper($vendor).\" WRITE\";\n $result = $conn->query($query);\n \n $query = $conn->prepare(\"INSERT INTO \".strtoupper($vendor).\"(name, vendor, manufacturer, rating, quantity) VALUES(?,?,?,?,?)\");\n $query->bind_param('sssdi', $name, $vendor, $manufacturer, $rating, $quantity);\n $result = $query->execute();\n \n $query = \"UNLOCK TABLES\";\n $result = $conn->query($query);\n \n if(!$result) die($conn->error);\n //else\n // echo(\"$name has been added to the \".strtoupper($vendor).\" table.<br />\");\n }", "function Add_UPCP_Profuse($Profuse_Name, $Profuse_Slug, $Profuse_Description, $Profuse_Image, $WC_Update = \"No\", $Profuse_WC_ID = 0) {\n\tglobal $wpdb;\n\tglobal $profuses_table_name;\n\tglobal $Full_Version;\n\n\t$WooCommerce_Sync = get_option(\"UPCP_WooCommerce_Sync\");\n\n\t$Date = date(\"Y-m-d H:i:s\");\n\n\tif ($Full_Version != \"Yes\") {exit();}\n\t$wpdb->insert($profuses_table_name,\n\t\tarray(\n\t\t\t'Profuse_Name' => $Profuse_Name,\n\t\t\t'Profuse_Slug' => $Profuse_Slug,\n\t\t\t'Profuse_Description' => $Profuse_Description,\n\t\t\t'Profuse_Image' => $Profuse_Image,\n\t\t\t'Profuse_Date_Created' => $Date,\n\t\t\t'Profuse_WC_ID' => $Profuse_WC_ID\n\t\t)\n\t);\n\t$Profuse_ID = $wpdb->insert_id;\n\n\t/* wooCommerce integration\n\tif ($WooCommerce_Sync == \"Yes\" and $WC_Update != \"Yes\") {UPCP_Add_Profuse_To_WC($wpdb->get_row($wpdb->prepare(\"SELECT * FROM $profuses_table_name WHERE Profuse_ID=%d\", $wpdb->insert_id)));}\n\telseif ($WooCommerce_Sync == \"Yes\") {\n\t\tforeach ($Term_ID_For_Value as $Term_ID => $Value) {\n\t\t\tupdate_term_meta($Term_ID, 'upcp_term_value', $Value);\n\t\t\tupdate_term_meta($Term_ID, 'upcp_term_MK_ID', $Profuse_ID);\n\t\t}\n\t}\n\t*/\n\n\t$update = __(\"Profuse has been successfully created.\", 'ultimate-product-catalogue');\n\treturn $update;\n}", "public function setSku($sku);", "abstract public function add_item();", "function addProduct(Product $product){\n \t$this->myCart ->add($product);\n }", "public function add(int $user_id, int $spu_id, int $sku_id, int $shop_id, int $number):bool\n {\n return $this->cart->add($user_id, $spu_id, $sku_id, $shop_id, $number);\n }", "public function add()\r\n\r\n {\r\n\r\n $this->page_title->push(lang('menu_products_add'));\r\n\r\n $this->data['pagetitle'] = $this->page_title->show();\r\n\r\n\r\n\r\n /* Breadcrumbs :: Common */\r\n\r\n $this->breadcrumbs->unshift(1, lang('menu_products_add'), 'admin/setup/products/add');\r\n\r\n\r\n\r\n /* Breadcrumbs */\r\n\r\n $this->data['breadcrumb'] = $this->breadcrumbs->show();\r\n\r\n\r\n\r\n /* Data */\r\n\r\n $this->data['error'] = $this->session->flashdata('errors');\r\n\r\n $this->data['message'] = isset($_GET['uploaded']) ? $this->session->flashdata('message') : NULL;\r\n\r\n $this->data['charset'] = 'utf-8';\r\n\r\n $this->data['form_url'] = 'admin/setup/product/store';\r\n\r\n $this->data['form_products_upload_url'] = 'admin/setup/product/store/bulk';\r\n\r\n\r\n\r\n $categories = $this->categories->getData();\r\n\r\n $this->data['categories_option'] = '';\r\n\r\n\r\n foreach ($categories[0]->data as $category) {\r\n\r\n if ($category->parent == 0) $this->data['categories_option'] .= '<optgroup label=\"' . $category->title . '\"></optgroup>';\r\n\r\n else $this->data['categories_option'] .= '<option value=\"' . $category->bar_code . '\">' . $category->bar_code . ' -- ' . $category->title . '</option>';\r\n\r\n }\r\n\r\n\r\n /* Load Template */\r\n\r\n $this->template->admin_render('admin/products/add', $this->data);\r\n\r\n\r\n\r\n }", "private function packMeta()\n {\n $transport = $this->modx->fromJSON(file_get_contents(__DIR__ . '/../transport.json'));\n unset($transport['support']['db']);\n\n $this->builder->setPackageAttributes([\n 'changelog' => file_get_contents(__DIR__ . '/../meta/changelog.txt'),\n 'license' => file_get_contents(__DIR__ . '/../meta/license.txt'),\n 'readme' => file_get_contents(__DIR__ . '/../meta/readme.txt'),\n 'requires' => $transport['support']\n ]);\n }", "function install($data='') {\r\n @umask(0);\r\n if (!Is_Dir(ROOT.\"./cms/products/\")) {\r\n mkdir(ROOT.\"./cms/products/\", 0777);\r\n }\r\n parent::install();\r\n }", "function addItemsToCart()\n\t{\n\t\t$order = $_POST['order'];\n\t\tsession_start();\n\t\tif(isset($_SESSION['userName']))\n\t\t{\n\t\t\t$result = addItemsToCartDB($_SESSION['userName'], $order);\n\t\t\tif($result['status'] == 'COMPLETE')\n\t\t\t{\n\t\t\t\techo json_encode($result);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n # Something went wrong\n\t\t\t\tdie(json_encode($result));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdie(json_encode(errors(417)));\n\t\t}\n\t}", "public function add(\n UserInterface $user,\n string $name,\n string $sku,\n string $description = null,\n array $options = []\n ) : ProductVariants {\n return CreateProductVariantAction::execute(\n $this->product,\n $user,\n $name,\n $sku,\n $description,\n $options\n );\n }", "function add_store()\n {\n\tglobal $template;\n\tglobal $connect;\n\n\t$sys_connect = sys_db_connect();\n\t$product_id = $_REQUEST[product_id];\n\t$product_name = addslashes($_REQUEST[product_name]);\n\t$shop_price = $_REQUEST[shop_price];\n\t$options = $_REQUEST[options];\n\t$memo = addslashes($_REQUEST[memo]);\n\n\n\t$sql = \"select product_id from ez_store \n\t\t where domain = '\"._DOMAIN_.\"' \n\t\t and product_id = '$product_id'\";\n\t$list0 = mysql_fetch_array(mysql_query($sql, $sys_connect));\n\n\n\t$sql = \"select * from products where product_id = '$product_id'\";\n\t$list = mysql_fetch_array(mysql_query($sql, $connect));\n\t\n\t////////////////////////////////////////\n\t// make thumb image\n\tif ($list[img_500] && file_exists(_save_dir.$list[img_500]))\n\t{\n\t $img_150 = _save_dir . str_replace(\"_500\", \"_150\", $list[img_500]);\n\t if (!file_exists($img_150))\n\t {\n\t\t$cmd = \"/usr/local/bin/convert -resize 150x150 \"._save_dir.$list[img_500].\" \".$img_150;\n\t\texec($cmd);\n\t }\n\t $img_250 = _save_dir . str_replace(\"_500\", \"_250\", $list[img_500]);\n\t if (!file_exists($img_250))\n\t {\n\t\t$cmd = \"/usr/local/bin/convert -resize 250x250 \"._save_dir.$list[img_500].\" \".$img_250;\n\t\texec($cmd);\n\t }\n\t}\n\n\tif ($list0[product_id])\t\t// update\n\t{\n\t $upd_sql = \"update ez_store set\n\t\t\t\tname = '$product_name',\n\t\t\t\tshop_price = '$shop_price',\n\t\t\t\toptions = '$options',\n\t\t\t\tmemo = '$memo',\n\t\t\t\tis_sale = 1\n\t\t\t where domain = '\"._DOMAIN_.\"'\n\t\t\t and product_id = '$product_id'\";\n\t mysql_query($upd_sql, $sys_connect) or die(mysql_error());\n\t}\n\telse\t\t\t\t// insert\n\t{\n\t ////////////////////////////////////////\n\t $ins_sql = \"insert into ez_store set\n\t\t\tdomain \t\t= '\" . _DOMAIN_ . \"',\n\t\t\tproduct_id \t= '$list[product_id]',\n\t\t\tname\t\t= '$list[name]',\n\t\t\torigin\t\t= '$list[origin]',\n\t\t\tbrand\t\t= '$list[brand]',\n\t\t\toptions\t\t= '$list[options]',\n\t\t\tshop_price\t= '$list[shop_price]',\n\t\t\ttrans_fee\t= '$list[trans_fee]',\n\t\t\tproduct_desc\t= '$list[product_desc]',\n\t\t\timg_500\t\t= '$list[img_500]',\n\t\t\timg_desc1\t= '$list[img_desc1]',\n\t\t\timg_desc2\t= '$list[img_desc2]',\n\t\t\timg_desc3\t= '$list[img_desc3]',\n\t\t\timg_desc4\t= '$list[img_desc4]',\n\t\t\timg_desc5\t= '$list[img_desc5]',\n\t\t\timg_desc6\t= '$list[img_desc6]',\n\t\t\treg_date \t= now(),\n\t\t\treg_time \t= now(),\n\t\t\tis_sale \t= 1\n\t \";\n\t mysql_query($ins_sql, $sys_connect) or die(mysql_error());\n\t}\n\n\t// add by sy.hwang 2007.5.4\n\t$sql = \"select seq from ez_store \n\t\t where domain = '\"._DOMAIN_.\"'\n\t\t and product_id = '$product_id'\";\n\t$list = mysql_fetch_array(mysql_query($sql, $sys_connect));\n\n\t$store_id = sprintf(\"A%05d\", $list[seq]);\n\t$upd_sql = \"update ez_store set store_id = '$store_id' \n\t\t where domain = '\"._DOMAIN_.\"'\n\t\t and product_id = '$product_id'\";\n\tmysql_query($upd_sql, $sys_connect) or die(mysql_error());\n\n\t$upd_sql = \"update products set is_store = 1 where product_id = '$product_id'\";\n\tmysql_query($upd_sql, $connect) or die(mysql_error());\n\t\n $this->redirect(\"popup.htm?template=CK18&product_id=$product_id\");\n exit;\n }", "function zipAddAlbum($album, $base, $zip) {\n\tglobal $_zp_zip_list, $zip_gallery;\n\t$albumbase = '.'.substr($album->name,$base).'/';\n\tforeach ($album->sidecars as $suffix) {\n\t\t$f = $albumbase.$album->name.'.'.$suffix;\n\t\tif (file_exists($f)) {\n\t\t\t$_zp_zip_list[] = $f;\n\t\t}\n\t}\n\t$images = $album->getImages();\n\tforeach ($images as $imagename) {\n\t\t$image = newImage($album, $imagename);\n\t\t$_zp_zip_list[] = $albumbase.$image->filename;\n\t\t$imagebase = stripSuffix($image->filename);\n\t\tforeach ($image->sidecars as $suffix) {\n\t\t\t$f = $albumbase.$imagebase.'.'.$suffix;\n\t\t\tif (file_exists($f)) {\n\t\t\t\t$_zp_zip_list[] = $f;\n\t\t\t}\n\t\t}\n\t}\n\t$albums = $album->getAlbums();\n\tforeach ($albums as $albumname) {\n\t\t$subalbum = new Album($zip_gallery,$albumname);\n\t\tif ($subalbum->exists && !$album->isDynamic()) {\n\t\t\tzipAddAlbum($subalbum, $base, $zip);\n\t\t}\n\t}\n}", "public function createSubshop()\n {\n /** @var Connection $dbal */\n $dbal = Shopware()->Container()->get('dbal_connection');\n $dbal->exec('INSERT INTO s_core_shops\n (id, main_id, name, title, position, host, base_path, base_url, hosts, secure, template_id, document_template_id, category_id, locale_id, currency_id, customer_group_id, fallback_id, customer_scope, `default`, active) VALUES\n (\"3\", NULL, \"Export Testshop\", \"Export Testshop\", \"0\", \"' . $this->subShopDomain . '\", NULL, NULL, \"\", \"0\", \"23\", \"23\", \"3\", \"1\", \"1\", \"1\", \"1\", \"0\", \"0\", \"1\");');\n\n $dbal->exec('UPDATE s_export SET languageID=3 WHERE id in (4711, 4712, 4713, 4714)');\n }", "function addToInventory($userid, $ingredient, $qty, $units){\n\t if(($userid != NULL) &&($ingredient != NULL) && ($qty != NULL)&& ($units != NULL))\n\t { \n\t if($qty <= 0)\n\t\t return;\n\t\t $count = @mysql_query(\"SELECT COUNT(*) as count FROM Inventory WHERE (UserID = '$userid' \n\t\t AND IngredientName = '$ingredient' AND Units ='$units')\");\n\t\t $countdata = mysql_fetch_assoc($count);\n\t\t if($countdata['count'] >= 1)\n\t\t\t @mysql_query(\"UPDATE Inventory SET Quantity = Quantity + '$qty' WHERE (UserID ='$userid' \n\t\t\t AND IngredientName = '$ingredient' AND Units ='$units')\");\n\t\t else\n\t\t @mysql_query(\"INSERT INTO Inventory VALUES ('$userid','$ingredient','$qty','$units')\");\n\t\t}\n\t}", "public function add_inventory($productName,$quantity){\r\n // math\r\n $conn = new mysqli($GLOBALS['servername'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\r\n $preSql = \"Select quantity from inventory where productName = '$productName'\";\r\n $preResult = $conn->query($preSql);\r\n $preRow = $preResult->fetch_assoc();\r\n $total = $preRow[\"quantity\"] + $quantity;\r\n // query\r\n $sql = \"Update inventory SET quantity = '$total' WHERE productName = '$productName'\";\r\n $conn->query($sql);\r\n }", "function add_to_cart($id,$qty){\r\n\r\n $row = $this->Web_model->get_by_id($id);\r\n $kategori = $this->Web_model->get_by_idkat($row->id_kategori);\r\n if ($row) {\r\n $datas= array(\r\n 'id' => $row->id_menu,\r\n 'name' => $row->nama_menu,\r\n 'price' => $row->harga,\r\n 'qty' => $qty, \r\n 'id_kategori' => $row->id_kategori,\r\n 'gambar' => $row->foto_menu,\r\n 'nama_kategori' => $kategori->nama_kategori,\r\n );\r\n $this->cart->product_name_rules = '[:print:]';\r\n $this->cart->insert($datas);\r\n echo(count($this->cart->contents()));\r\n }\r\n }", "public function add($sunglassesId) {\n\t\t$this->load->model('SunglassesModel');\n\t\t$this->SunglassesModel->addToCart($sunglassesId);\n\t\techo \"Adding product to cart\";\n\t}", "public function addProduct($productName)\n {\n $item = urlencode($productName);\n $this->produkty[] = $item;\n }", "public function addBox() {\n $page = 'basket';\n $id = -1;\n $product = array(\"id\"=>$id, \"name\"=>'Box', \"price\"=>50, \"imgLink\"=>\"./View/img/box.png\");\n\n\n $productInBasket = $this->inBasket($id); //check if the product is in the basket\n\n if(!empty($product) && isset($_SESSION['user']['basket'])) {\n if ($productInBasket)\n $_SESSION['user']['basket'][$id]['quantity']++;\n else\n $_SESSION['user']['basket'][$id] = array(\"product\" => $product, \"quantity\" => 1);\n }\n\n header(\"Location: ./index.php?ctrl=basket&action=consult\");\n require('./View/default.php');\n }", "public function addNewShippingRow(){\n\t\t$map_id = $this->Generic_model->general_fetch_array_return_row('map_attributes_values', array('attribute_id'=>$this->input->post('newRowAttr'), 'value'=>$this->input->post('newRowValue')))->map_id;\n\t\t$details = array(\n\t\t\t'pid' => $this->uri->segment(4),\n\t\t\t'map_id' => $map_id,\n\t\t\t'cost' => $this->input->post('costRowNew')\n\t\t);\n\t\t$response = $this->Generic_model->general_insert('stock_master', $details);\n\t\tif($response){\n\t\t\t$this->session->set_flashdata('success', 'Product Updated successfully with new variant.');\n\t\t}else{\n\t\t\t$this->session->set_flashdata('failure', 'Oops!! Something went wrong. Try again...');\n\t\t}\n\t\tredirect('admin/product/editProduct/'.$this->uri->segment(4));\n\t}", "function add_options_packages() {\n $this->configure_propack();\n }", "public function testAddPackingPlan()\n {\n }", "public function add()\n {\n $access = Utilities::checkAccess('item-warehouse', 'add');\n if($access == 1)\n { \n $data[\"merchantwarehouse\"] = Utilities::checkAccess('item-warehouse', 'merchantwarehouse');\n $data['_warehouse'] = Warehouse2::get_all_warehouse($this->user_info->shop_id);\n $data[\"_item\"] = Tbl_item::where(\"archived\",0)->where(\"item_type_id\",1)->where(\"shop_id\",$this->user_info->shop_id)->get();\n // $data[\"_cat\"] = Tbl_category::where(\"type_category\",\"inventory\")->where(\"type_parent_id\",0)->where(\"type_shop\",$this->user_info->shop_id)->get();\n return view(\"member.warehouse.warehouse_add\",$data);\n }\n else\n {\n return $this->show_no_access_modal();\n }\n }", "function nova_bs_fusion_apply_group_nova_bs_skins_info() {\n $groups = array();\n $groups['region_specific'] = array(\n 'title' => t('Region specific'),\n 'description' => t('Skins dependent on content'),\n 'weight' => 20,\n );\n\n return $groups;\n}", "public function addProduct()\n {\n foreach($_POST as $key => $value)\n {\n $product[$key] = filter_var($value, FILTER_SANITIZE_STRING);\n }\n\n $stmt = $this->dsn->prepare(\"SELECT * FROM products WHERE code = ? LIMIT 1\");\n $stmt->execute([$product['product_code']]);\n\n $stmt->bindColumn('name', $this->product_name);\n $stmt->bindColumn('price', $this->product_price);\n $stmt->bindColumn('image', $this->product_image);\n\n while($stmt->fetch())\n {\n $product[\"product_name\"] = $this->product_name;\n $product[\"product_price\"] = $this->product_price;\n $product[\"product_image\"] = $this->product_image;\n\n if(isset($_SESSION[\"products\"]))\n {\n if(isset($_SESSION[\"products\"][$product['product_code']]))\n {\n $_SESSION[\"products\"][$product['product_code']][\"product_qty\"] = $_SESSION[\"products\"][$product['product_code']][\"product_qty\"] + $_POST[\"product_qty\"];\n } else {\n $_SESSION[\"products\"][$product['product_code']] = $product;\n }\n } else {\n $_SESSION[\"products\"][$product['product_code']] = $product;\n }\n }\n\n $total_product = count($_SESSION[\"products\"]);\n\n die(json_encode(array('products'=>$total_product)));\n }", "public function addFood($sku, $foodDesc, $category, $price) {\r\n $conn = new ConnectionManager();\r\n $pdo = $conn->getConnection();\r\n \r\n // YOUR CODE GOES HERE\r\n\r\n\r\n return $isOk;\r\n }", "public function createuserproducts()\n {\n $site_id = $_POST['site_id'];\n $productid = $_POST['productid'];\n $pname = $_POST['pname'];\n $pprice = $_POST['pprice'];\n $pdescription = $_POST['pdescription'];\n $img1 = $_POST['img1'];\n\n $this->sitemodel->createuserproducts($site_id, $productid, $pname, $pprice, $pdescription, $img1);\n }", "public function testUpdatePackingPlan()\n {\n }", "public function addItem($attributes)\n {\n // Don't understand why _token must be removed here, but not in ProductController#store!\n unset($attributes['_token']);\n\n $bag = $this->getCurrent();\n $bag_item = $bag->items()->where('variant_id', $attributes['variant_id'])->first();\n if ($bag_item) {\n $bag_item->quantity += $attributes['quantity'];\n $bag_item->save();\n } else {\n $bag_item = $bag->items()->create($attributes);\n }\n return $bag_item;\n }", "function uc_order_edit_products_add($form, &$form_state) {\n $form_state['products_action'] = 'products_select';\n $form_state['refresh_products'] = TRUE;\n $form_state['rebuild'] = TRUE;\n $order = $form_state['build_info']['args'][0];\n\n $data = module_invoke_all('uc_add_to_cart_data', $form_state['values']['product_controls']);\n $product = uc_product_load_variant(intval($form_state['values']['product_controls']['nid']), $data);\n $product->qty = isset($form_state['values']['product_controls']['qty']) ? $form_state['values']['product_controls']['qty'] : $product->default_qty;\n\n drupal_alter('uc_order_product', $product, $order);\n uc_order_product_save($order->order_id, $product);\n $order->products[] = $product;\n\n uc_order_log_changes($order->order_id, array('add' => t('Added (@qty) @title to order.', array('@qty' => $product->qty, '@title' => $product->title))));\n\n // Decrement stock.\n if (module_exists('uc_stock')) {\n uc_stock_adjust_product_stock($product, 0, $order);\n }\n\n // Add this product to the form values for accurate tax calculations.\n $form_state['values']['products'][] = (array) $product;\n}", "public function testProductCreation()\n {\n $response = $this->json('POST', '/api/v1/products', ['name' => 'Sally','sku'=>'Test']);\n\n $response->assertStatus(201)->assertJson(['code' => 201]);\n }", "function addPackage($arrPost) {\n\n $objClassCommon = new ClassCommon();\n $varPackageACPrice = $objClassCommon->getAcCostForPackage($arrPost['frmOfferPrice']);\n\n $arrClms = array(\n 'fkWholesalerID' => $arrPost['frmWholesalerId'],\n 'PackageName' => $arrPost['frmPackageName'],\n 'PackageACPrice' => $varPackageACPrice,\n 'PackagePrice' => $arrPost['frmOfferPrice'],\n 'PackageImage' => $arrPost['PackageImage'],\n 'PackageDateAdded' => date(DATE_TIME_FORMAT_DB)\n );\n\n\n $arrAddID = $this->insert(TABLE_PACKAGE, $arrClms);\n\n if ($arrAddID > 0) {\n foreach ($arrPost['frmProductId'] as $val) {\n $arrClmsPro = array(\n 'fkPackageId' => $arrAddID,\n 'fkProductId' => $val\n );\n\n /**\n * This query is used update package id for mantioned products in package in product table.\n *\n * @author : Krishna Gupta\n *\n * @Created : 06-11-2015\n */\n $includedInAnyPackage = $this->getArrayResult(\"select fkPackageId from tbl_product where pkProductID=\" . $arrClmsPro['fkProductId'] . \"\");\n if (empty($includedInAnyPackage[0]['fkPackageId']) || ($includedInAnyPackage[0]['fkPackageId'] == 0)) {\n $query = mysql_query(\"Update tbl_product set fkPackageId=\" . $arrClmsPro['fkPackageId'] . \" where pkProductID=\" . $arrClmsPro['fkProductId'] . \"\");\n } else {\n $packageId = $includedInAnyPackage[0]['fkPackageId'] . ',' . $arrClmsPro['fkPackageId'];\n $query = mysql_query(\"Update tbl_product set fkPackageId=\" . \"'\" . $packageId . \"'\" . \" where pkProductID=\" . $arrClmsPro['fkProductId'] . \"\");\n }\n /* Ends */\n\n $this->insert(TABLE_PRODUCT_TO_PACKAGE, $arrClmsPro);\n }\n }\n return $arrAddID;\n }", "public function addSkuUnits ( $data )\n {\n return $this->db->insert( 'tbld_unit', $data );\n }", "function add()\n {\n $gameId = intval($this->registry->params[0]);\n $game = new \\Webshop\\Model\\Game();\n $game = $game->getOne(\"id\", $gameId);\n\n if (!is_numeric($gameId) || (!empty($_SESSION['cart']) && in_array($gameId, $_SESSION['cart']))) {\n echo \"gameId is niet numeric, geldig of winkelwagen bevat al deze game!\";\n } else {\n $amount = 1;\n (isset($_POST['amount']) ? $amount = intval($_POST['amount']) : '');\n\n $supply = $game->supply;\n // Throw error if the requested amount is higher then the supply\n if ($supply < $amount) {\n $_SESSION['addToCartError'] = \"We hebben maar \" . $supply. \" games in voorraad van \". $game->title;\n $amount = $supply;\n }\n\n $gameItem = [intval($gameId), $amount];\n $_SESSION['cart'][] = $gameItem;\n }\n header(\"Location: /cart\");\n }", "public function add($fruit) {\r\n \r\n // We get the number of $fruit in the basket\r\n // +1 to qty\r\n // Update value in basket\r\n\r\n $qty = $this->get($fruit);\r\n $this->itemQtyArr[$fruit] = $qty + 1;\r\n }", "function install ($parent)\n\t{\n\t\tif (!Folder::exists(JPATH_ROOT . '/images/com_jea/dpe'))\n\t\t{\n\t\t\tFolder::create(JPATH_ROOT . '/images/com_jea/dpe');\n\t\t}\n\t}", "public function run(Faker $faker)\n { \n \t$pack1 = new Pack;\n \t$pack1 -> pname = '手袋单人份';\n \t$pack1 -> save();\n $pack2 = new Pack;\n $pack2 -> pname = '礼盒双人份';\n $pack2 -> save();\n $pack3 = new Pack;\n $pack3 -> pname = '全家福礼包';\n $pack3 -> save();\n }", "function addVariation($data,$form){\r\n\t\tif(isset($data['ProductAttributes'])){\r\n\t\t\t$data['ProductAttributes'] = Convert::raw2sql($data['ProductAttributes']);\r\n\t\t\t$variation = $this->owner->getVariationByAttributes($data['ProductAttributes']);\r\n\t\t\tif($variation) {\r\n\t\t\t\tif($variation->canPurchase()) {\r\n\t\t\t\t\t$quantity = round($data['Quantity'], $variation->QuantityDecimals());\r\n\t\t\t\t\tif(!$quantity) {\r\n\t\t\t\t\t\t$quantity = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tShoppingCart::singleton()->addBuyable($variation,$quantity);\r\n\t\t\t\t\tif($variation->IsInCart()) {\r\n\t\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.SUCCESSFULLYADDED\",\"Added to cart.\");\r\n\t\t\t\t\t\t$status = \"good\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.NOTSUCCESSFULLYADDED\",\"Not added to cart.\");\r\n\t\t\t\t\t\t$status = \"bad\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTAVAILABLE\",\"That option is not available.\");\r\n\t\t\t\t\t$status = \"bad\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTAVAILABLE\",\"That option is not available.\");\r\n\t\t\t\t$status = \"bad\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$msg = _t(\"ProductWithVariationDecorator.VARIATIONNOTFOUND\",\"The item(s) you are looking for are not available.\");\r\n\t\t\t$status = \"bad\";\r\n\t\t}\r\n\t\tif(Director::is_ajax()){\r\n\t\t\treturn ShoppingCart::singleton()->setMessageAndReturn($msg, $status);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$form->sessionMessage($msg,$status);\r\n\t\t\tDirector::redirectBack();\r\n\t\t}\r\n\t}", "public function transferWarehouseProductToMagentoStockItem();", "function add()\n\t{\n\t\t$CFG = $this->config->item('image_configure');\n\t\t$data[\"title\"] = _e(\"Image\");\n\t\t## for check admin or not ##\n\t\t$data[\"response\"] = addPermissionMsg( $CFG[\"sector\"][\"add\"] );\t\t\t\n\t\t## Other auxilary variable ##\n\t\t$data['var'] = array();\t\t\n\t\t$this->load->module('context/context_admin');\n\t\t$user_context = $this->context_admin->getContext();\n\t\t$data['var']['context_dd'] = ( array('' => _e('Choose Context') ) + $user_context );\n\t\t$data['var']['relation_dd'] = ( array('' => _e('Choose Relation') ) );\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"image\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"image_add\", $data, true, \"image\");\n\t\t$this->template->build_admin_output($data);\n\t}" ]
[ "0.6094949", "0.58858764", "0.57368255", "0.5719166", "0.5696529", "0.56493306", "0.5614807", "0.5564492", "0.5545554", "0.5545529", "0.5544812", "0.5534833", "0.55290216", "0.5528978", "0.54499674", "0.54417497", "0.5406038", "0.5406038", "0.5389496", "0.53563946", "0.5305496", "0.528966", "0.52766055", "0.5250735", "0.5241938", "0.5238022", "0.5233499", "0.5227967", "0.52267635", "0.5212413", "0.5206182", "0.5168666", "0.5167252", "0.516222", "0.51562625", "0.5156223", "0.5151856", "0.5137865", "0.51333445", "0.51220345", "0.5116059", "0.51105314", "0.5109848", "0.5098249", "0.50949895", "0.5091995", "0.50839055", "0.5083171", "0.5079334", "0.50550604", "0.505443", "0.50537807", "0.50511193", "0.5047393", "0.5045183", "0.5040517", "0.5036502", "0.5035125", "0.5033856", "0.50288725", "0.50194466", "0.5017468", "0.50162464", "0.5014679", "0.5014403", "0.50100803", "0.50071675", "0.4999714", "0.49973536", "0.4992531", "0.49922734", "0.49812254", "0.49806592", "0.49795508", "0.49753106", "0.4973348", "0.4972815", "0.4971912", "0.49715087", "0.49683723", "0.49564347", "0.49548343", "0.49514526", "0.49507093", "0.4947353", "0.49464387", "0.4944214", "0.49434286", "0.49401927", "0.4939989", "0.49383816", "0.49376577", "0.49365678", "0.4919488", "0.4919046", "0.4918248", "0.49122244", "0.4910206", "0.49037346", "0.49025446" ]
0.6438181
0
/ db houses start/
public function getAllDbHouses () { $this->db->select( '*' ); $this->db->from( 'tbld_distribution_house' ); $query = $this->db->get()->result_array(); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function db_startup(){\n\t\n\t}", "public function startDump() {\n\t\t// Get the details for the current database.\n\t\t$cmd = $this->getDatabaseCommand();\n\t\t// Run the command.\n\t\tSakeMoreHelper::runCLI($cmd);\n\t}", "private function initDatabase() {\n \n \n \n }", "public function StartBD(){\n if (!$this->BDCon){\n $this->BDCon = pg_connect(\"dbname=$this->db_name port=$this->db_port host=$this->db_host user=$this->db_username password=$this->db_password\") or die(\"No se pudo CONECTAR a la BD\");\n }else{\n $this->EndBD();\n die(\"Doble conexion a BD\");\n }\n \n }", "function startup() {\n\t\t$this->_welcome();\n\t\tif (isset($this->params['datasource'])) {\n\t\t\t$this->dataSource = $this->params['datasource'];\n\t\t}\n\n\t\tif ($this->command && !in_array($this->command, array('help'))) {\n\t\t\tif (!config('database')) {\n\t\t\t\t$this->out(__('Your database configuration was not found. Take a moment to create one.', true), true);\n\t\t\t\treturn $this->DbConfig->execute();\n\t\t\t}\n\t\t}\n\t}", "protected function start(){\n\t\n\t\t\t$this->con = new PDO(\"mysql:host=$this->host;dbname=$this->banco;\", \"$this->user\" , \"$this->senha\");\n\t\t}", "public function start()\n {\n Session::start();\n\n Environment::start();\n \n Database::start($withDatabase = true);\n \n Router::start();\n }", "function _start() {\r\n\t\tglobal $db_con, $d_user, $d_pw, $d_base, $d_server, $d_pre;\r\n\t\t\r\n\t\tinclude_once('config.php');\r\n\t\t$db_con = connect_to_db($d_user, $d_pw, $d_base, $d_server);\r\n\t\tdefine('DB_PREFIX', $d_pre);\r\n}", "private static function setupDB() {\n\t\t$tbl = self::$table;\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\twfDebugLog( __METHOD__, \"\\tCreating tables\\n\" );\n\t\t$dbw->query(\n\t\t\t\"CREATE TABLE IF NOT EXISTS $tbl ( pathway varchar(255), day varchar(50) )\", DB_MASTER\n\t\t);\n\t\twfDebugLog( __METHOD__, \"\\tDone!\\n\" );\n\t}", "private function open_db() {\n\n\t\t//var_dump($this->connection); exit;\n\n\t\t\n\n\t}", "public function initDatabaseStructure( );", "public function run()\n {\n $location = Location::factory()->count(3000)->create();\n // $estateAgents = EstateAgent::factory()->count(500)->create();\n try {\n\n // $houses = House::factory()->count(300)->create();\n } catch (\\Exception $e) {\n dump($e);\n }\n }", "abstract protected function initDB();", "public function startup();", "public function run()\n {\n Household::factory()->count(200)->create();\n }", "public function run()\n {\n factory(Ospiti::class, 10) -> create();// create server per INSERIRE I DATI NEL DATABASE\n }", "public function start() {\n\n // TODO: Maybe sometimes\n\n }", "function configureFirstRun() {\n if(!$this->createDBTables())\n {\n echo \"First run configuration error. \"\n . \"Unable to create database tables!\";\n }\n }", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function run()\n {\n factory(Hotel::class, 100)->create();\n Hotel::create([\n \t'id'=>2000,\n \t'estrellas'=>4,\n \t'nombre'=>'Hotel_de_prueba',\n \t'descripcion'=>'este es un hotel de prueba',\n \t'ciudad_id'=>999]);\n }", "public function run()\n {\n StoreHouse::create([\n 'name' => 'Principal',\n 'address' => null,\n 'description' => 'Almacen de prueba',\n 'is_base' => true,\n ]);\n }", "function e107_db_debug() {\n\t\tglobal $eTimingStart;\n\n\t\t$this->aTimeMarks[0]=array(\n\t\t'Index' => 0,\n\t\t'What' => 'Start',\n\t\t'%Time' => 0,\n\t\t'%DB Time' => 0,\n\t\t'%DB Count' => 0,\n\t\t'Time' => ($eTimingStart),\n\t\t'DB Time' => 0,\n\t\t'DB Count' => 0\n\t\t);\n\t\t\n\t\tregister_shutdown_function('e107_debug_shutdown');\n\t}", "public function run()\n {\n Ward::unguard();\n if(!Ward::find(1)) {\n $path = __DIR__.'/sql-script/ward.sql';\n DB::unprepared(file_get_contents($path));\n //$this->command->info('Country table seeded!');\n }\n }", "public function mainAction()\n {\n echo shell_exec(\"mysql -u root -e 'CREATE DATABASE IF NOT EXISTS \" . $this->config->database->dbname . \";'\");\n\n // Run migrations if necessary\n echo shell_exec('php vendor/bin/phinx migrate -c config/phinx.php') . \"\\n\";\n }", "private static function initDatabase() {\n\t\t\tif (self::Config('use_db')) {\n\t\t\t\t$host = self::Config('mysql_host');\n\t\t\t\t$user = self::Config('mysql_user');\n\t\t\t\t$pass = self::Config('mysql_password');\n\t\t\t\t$name = self::Config('mysql_dbname');\n\t\t\t\tDBManager::init($host, $user, $pass, $name);\n\t\t\t}\n\t\t}", "public function start()\n {\n die(\"Must override this function in a driver\");\n }", "private function connectToDB()\n {\n $this->handler = new DBConnect();\n $this->handler = $this->handler->startConnection();\n }", "public function run()\n {\n // factory(Compony::class, 50)->create();\n Compony::factory()->count(50)->create();\n // DB::table('componies')->insert([\n // 'name'=> 'Vardenis' ,\n // 'type'=> 'Pavardenis',\n // 'description'=> 'Slapyvardis',\n // ]);\n }", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function init()\n {\n $this->logger->info('DBService : init');\n\n $this->connect();\n $this->createTable( $this->pdo );\n }", "public function open()\n {\n $this->conexion= mysqli_connect(\"localhost:3306\",\"root\") or die (msql_error());\n mysqli_select_db($this->conexion, 'alsaplane') or die (msql_error());\n }", "protected function createDatabaseStructure() {}", "public function run()\n {\n $states = require __DIR__.'/../files/states.php';\n \n State::truncate('states');\n\n State::insert($states);\n }", "public function run()\n {\n DB::table(\"banners\")->insert([\n \"titre\" => \"Rapid Solutions for Your Business!\",\n \"boutton\" => \"Get Started\",\n \"path\" => \"../bg/chien\"\n\n ]);\n }", "private function initDB(){\n $sql = \"\n CREATE SCHEMA IF NOT EXISTS `\".$this->_database.\"` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;\n USE `\".$this->_database.\"` ;\n \";\n try {\n $dbh = new PDO(\"mysql:host=$this->_host\", $this->_username, $this->_password,array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));\n $dbh->exec($sql)\n or die(print_r($dbh->errorInfo(), true));\n } catch (PDOException $e) {\n $err_data = array('stmt'=>'on init');\n Helper_Error::setError( Helper_Error::ERROR_TYPE_DB , $e->getMessage() , $err_data , $e->getCode() );\n die(\"DB init ERROR: \". $e->getMessage());\n }\n }", "function start() {\n // Warns if binary logging is not active\n //$r = $this->q(\"show variables like 'log_bin'\");\n //if (@mysql_fetch_object($r)->Value != 'ON') {\n // Binary log should be used for better data reliability\n // see http://dev.mysql.com/doc/refman/5.0/fr/commit.html\n // and http://dev.mysql.com/doc/refman/5.0/fr/binary-log.html\n // and http://www.cyberciti.biz/faq/what-is-mysql-binary-log/\n //}\n // Manages nested transactions:\n // only issues a BEGIN statement for the first transaction\n if (self::$started_transactions_count < 1) {\n // Backups current autocommit state\n self::$autocommit_state_backup = $this->autocommit();\n // Sets autocommit state to false\n $this->autocommit(false);\n // Begin transaction\n $this->q('BEGIN');\n // Resets internal variables\n self::$started_transactions_count = 0;\n $this->last_insert_id = null;\n $this->results = array();\n $this->exceptions = array();\n }\n // Manages transactions counter\n self::$started_transactions_count++;\n }", "public function start() {\n\t\t$this->writeTitle();\n\t\t\n\t\t$this->showAllTable();\n\t\t\n\t\t$this->addEntityForm();\n\t}", "function initDB(PDO $db) {\n $db->exec('drop table if exists \"caching\"');\n $db->exec('CREATE TABLE \"caching\" (\"id\" INTEGER PRIMARY KEY AUTOINCREMENT, \"keyword\" VARCHAR UNIQUE, \"object\" BLOB, \"exp\" INTEGER)');\n $db->exec('CREATE UNIQUE INDEX \"cleaup\" ON \"caching\" (\"keyword\",\"exp\")');\n $db->exec('CREATE INDEX \"exp\" ON \"caching\" (\"exp\")');\n $db->exec('CREATE UNIQUE INDEX \"keyword\" ON \"caching\" (\"keyword\")');\n }", "public function start()\n {\n }", "public function start()\n {\n }", "public function start()\n {\n }", "public function __construct(){\n $this->open_db();\n }", "public function run() {\n\t\t$start = microtime( true );\n//\t\t$this->call( ConfigsTablesSeeder::class );\n\t\tfactory( \\App\\Models\\Patients\\Patient::class, 50 )->create();\n\t\tfactory( \\App\\Models\\Commons\\Phone::class, 50 )->create();\n\t\t$this->command->info( 'DatabaseSeeder complete: in ' . round( ( microtime( true ) - $start ), 3 ) . 's ...' );\n\n\t}", "protected function _before() {\n\t\tparent::_before ();\n\t\t$this->dao = new SDAO ();\n\t\t$this->_startCache ();\n\t\t$this->dao->setModelDatabase ( Fortune::class, 'bench' );\n\t\t$this->_startDatabase ( $this->dao, 'bench' );\n\t}", "abstract public function start();", "abstract public function start();", "function startDatabase() {\n $link = mysql_connect('mysql.hostinger.com.br','u187390300_root','u187390300');\n if (!$link) {\n die('Not connected to MySQL: ' . mysql_error());\n }\n \n // Seleciona, abre e entra no database correto\n $db_selected = mysql_select_db('u187390300_engli', $link);\n if (!$db_selected) {\n die ('Not connected to Englishware database: ' . mysql_error());\n }\n}", "public function run()\n {\n //\n // DB::table('places')->insert([\n // 'name' => 'Jakarta',\n // 'visited' => 1,\n // 'date_visited' => now(),\n // 'distance' => 1000\n // ]);\n Place::factory()->count(50)->create();\n }", "public function __construct() {\n\t\t$this->db = pg_connect(\"host=localhost dbname='cdi13' user='cdi13' password='cdi13database'\");\n\t}", "public function run()\n {\n DB::table('adresses')->insert([\n 'line1' => 'Industrieweg 232',\n 'city' => 'Gent',\n 'ZIP' => '9030',\n 'country' => 'Belgium'\n ]);\n\n factory(App\\Adresses::class, 50)->create();\n }", "public function start() {\n $this->setup();\n $this->fight();\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n\n for ($i = 0; $i < 15; $i++) {\n DB::table('ware_houses')->insert([\n 'name' => $faker->name,\n 'address' => $faker->streetAddress(),\n 'created_at' =>now(),\n 'updated_at' =>now(),\n ]);\n }\n }", "function open_database() {\n\t\n\tglobal $database, $zurich, $action;\n\t\n\tdb_open($database);\n \n\t$zurich = db_retrieve(\"Zurich\", \"objects\");\n\tif (!$zurich or $action == 'reset') {\n\t\t$zurich = new Zurich(); // the very first time, create a new object\n\t\t}\n\t\n\t$zurich->set_time();\n}", "private static function initialize_db() {\n\t\tif ( ! defined( 'WP_CLI_SNAPSHOT_DB' ) ) {\n\t\t\tdefine( 'WP_CLI_SNAPSHOT_DB', Utils\\trailingslashit( WP_CLI_SNAPSHOT_DIR ) . 'wp_snapshot.db' );\n\t\t}\n\n\t\tif ( ! ( file_exists( WP_CLI_SNAPSHOT_DB ) ) ) {\n\t\t\tself::create_tables();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// phpcs:ignore PHPCompatibility.Extensions.RemovedExtensions.sqliteRemoved -- False positive.\n\t\tself::$dbo = new \\SQLite3( WP_CLI_SNAPSHOT_DB );\n\t}", "abstract function start();", "function setupDatabase($db){\n\t\tif($db == null) throw new Exception(\"Database is not given\");\n\t\t\n $sqlBirthdays = \"\n CREATE TABLE IF NOT EXISTS `birthdays` (\n `key` int(11) NOT NULL AUTO_INCREMENT,\n `date` date NOT NULL,\n `name` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,\n PRIMARY KEY (`key`)\n\t\t);\";\n\t\t\n\t\t$sqlEvents =\"\n\t\tCREATE TABLE IF NOT EXISTS `events` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `title` text NOT NULL,\n `date` date NOT NULL,\n `time` time NOT NULL,\n `descr` mediumtext CHARACTER SET latin1 COLLATE latin1_german1_ci NOT NULL,\n `startdate` date NOT NULL,\n `enddate` date NOT NULL,\n PRIMARY KEY (`id`)\n );\";\n\n $sqlTicker = \"\n\t\tCREATE TABLE IF NOT EXISTS `tickermsg` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `startdate` date NOT NULL,\n `enddate` date NOT NULL,\n `message` text NOT NULL,\n PRIMARY KEY (`id`)\n );\";\n\n // Execute the create querys\n $db->query($sqlBirthdays);\n $db->query($sqlEvents);\n $db->query($sqlTicker);\n }", "public function run()\n {\n App\\Models\\tableone::create([\n 'land_number_id' => '1',\n 'property_no' => '123123',\n 'land_area' => '21323',\n 'property_area' => '3213213',\n 'no_of_bedroom' => '3123123',\n 'no_of_bathroom' => '21312312',\n 'total_built_area' => '213213213',\n ]);\n $this->command->info('User table seeded!');\n }", "public function run()\n {\n $this->command->info('Begin Init base data.');\n\n $this->initAttr();\n $this->initSum();\n $this->initEnum();\n $this->initTags();\n $this->initSysBadge();\n $this->initSysTaskTag();\n $this->initSysUserSkill();\n $this->initUser();\n// $this->initSysIpSurvey();\n $this->command->info('All base data is ok!');\n }", "public function start(): void {}", "public function run()\n {\n \\DB::table('states')->insert([\n 'name_state' => 'progreso'\n ]);\n \\DB::table('states')->insert([\n 'name_state' => 'aprobado'\n ]);\n \\DB::table('states')->insert([\n 'name_state' => 'no aprobado'\n ]);\n // $this->call('UserTableSeeder');\n }", "function main() {\n\t\tApp::Uses('ConnectionManager', 'Model');\n\t\t$db =& ConnectionManager::getDataSource('default');\n\n\t\t$domain = substr(ROOT, max(strrpos(ROOT, '\\\\'), strrpos(ROOT, '/'))+1);\n\n\t\t$database = str_replace(array('.', '-'), array('_','_'), $domain); // Source's & Destination's 'Subdomains' & 'Top Level Domains'\n\t\t$FULLDUMPPATH=ROOT.DS.'sql'.DS.'full'.DS.exec(\"date '+%Y-%m-%d_%H-%M-%S'\").'.sql';\n\n\t\techo \"\\nDumping DB to sql/full/$FULLDUMPPATH.gz\\n\";\n\t\tpassthru(\"mysqldump -h {$db->config['host']} -u {$db->config['login']} --password=\\\"{$db->config['password']}\\\" $database > $FULLDUMPPATH\");\n\t\tpassthru(\"gzip $FULLDUMPPATH\");\n\t}", "function MetaDatabases() {}", "public function run()\n {\n $this->command->comment('Empezando ' . __CLASS__);\n\n DB::statement($this->towns);\n }", "private final function _createDbStructure()\n {\n if ($conn = $this->_getConnection()) {\n $installer = new lib_Install('install');\n try {\n $installer->install();\n } catch (Exception $e) {\n app::log($e->getMessage(), app::LOG_LEVEL_ERROR);\n }\n }\n }", "public function run()\n {\n \\App\\Sql::truncate(); //清空資料庫\n\n \\App\\Sql::create([\n 'name'=>'2019-03-06_init.sql',\n 'install'=>'1',\n ]);\n }", "protected function initDatabase() {\n\t\t$this->config\t\t= new Config();\n\t\tDatabase::$host\t\t= $this->config->host;\n\t\tDatabase::$username\t= $this->config->username;\n\t\tDatabase::$password\t= $this->config->password;\n\t\tDatabase::$dbname\t= $this->config->dbname;\n\t}", "public function run()\n {\n DB::table('hosts')->delete();\n $hosts = [\n [\n 'host_id' => 1,\n 'name' => 'PrivateGame',\n 'external_ip' => '40.114.196.95',\n ]\n ];\n DB::table('hosts')->insert($hosts);\n }", "public function run() {\n DB::table('sjabloon')->insert(['naam' => 'Testsjabloon 1']);\n DB::table('sjabloon')->insert(['naam' => 'Testsjabloon 2']);\n DB::table('sjabloon')->insert(['naam' => 'Testsjabloon 3']);\n DB::table('sjabloon')->insert(['naam' => 'Testsjabloon 4']);\n }", "public function run()\n {\n DB::table('salse_routes')->insert([\n 'name' => 'Barnes Place',\n 'comments' => '',\n 'status' => 'active',\n ]);\n DB::table('salse_routes')->insert([\n 'name' => 'Bauddhaloka Mawatha',\n 'comments' => '',\n 'status' => 'active',\n ]);\n DB::table('salse_routes')->insert([\n 'name' => 'Union Place',\n 'comments' => '',\n 'status' => 'active',\n ]);\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Sources::truncate();\n\n // Create few columns\n Sources::create(['name' => 'CoinMarketCap', 'url' => 'https://coinmarketcap.com/']);\n Sources::create(['name' => 'CoinCap', 'url' => 'https://coincap.io/']);\n }", "public function launch()\n {\n // $someModel->setConnection('mysql2');\n // $something = $someModel->find(1);\n // return $something;\n\n $agent=DB::connection('mysql2')->table('biller_profits')->first();\n dd($agent);\n // $blogs = DB::table('blogs')->orderBy('id', 'desc')->paginate(6);\n }", "public function run()\n {\n factory(societe_has_stage::class, 50)->create();\n }", "public function run()\n {\n exec(\"mysql -u \" . config('database.connections.mysql.username') . \" -p\" . config('database.connections.mysql.password') . \" \" . config('database.connections.mysql.database') . \" < \" . getcwd() . \"/database/hadith.sql\");\n }", "public function run()\n {\n $this->runQueriesFromSqlFile('1.3.4.3');\n }", "public function run()\n {\n $data=[\n \t['room_id'=>1,'door_id'=>1],\n ];\n DB::table('room_doors')->insert($data);\n }", "public function run()\n {\n //\n DB::table('states')->insert([\n \t'connected' => false,\n \t'playing' => false,\n \t'volume' => 30\n ]);\n }", "function begin() {\n\t\t\tself::$db->begin();\n\t\t\t$this->begin_executed = true;\n\t\t}", "public function run()\n {\n Dptable::create([\n\t 'name' => 'dp one',\n\t 'dp_id' => '1',\n\t 'address' => 'Kupandol',\n\t 'phone'\t=> '9845474556'\n\t ]);\n }", "function cl_ing_ingreso_det() {\r\n\r\n $this->database = new Database();\r\n }", "public function initializeTemporaryDBmount() {}", "public function run()\n {\n DB::table('home_l_s')->insert(\n [\n 'lien1'=>'Services',\n 'lien2'=>'Blog',\n 'lien3'=>'Contact',\n 'lien4'=>'Elements',\n 'src'=>'big-logo.png', \n 'slogan'=>'Get your freebie template now!',\n ],\n );\n }" ]
[ "0.73081326", "0.700807", "0.68761647", "0.6732055", "0.66143495", "0.6566201", "0.6560385", "0.6556669", "0.6553532", "0.6531732", "0.6480305", "0.63717836", "0.6369448", "0.6322773", "0.63081336", "0.6264797", "0.6191507", "0.61467224", "0.61405784", "0.61405784", "0.61402476", "0.6139776", "0.6138842", "0.6138842", "0.6138842", "0.6138842", "0.6138842", "0.6138842", "0.6132252", "0.61081773", "0.60842204", "0.608354", "0.6078949", "0.6067664", "0.6066394", "0.6055754", "0.6049506", "0.6045369", "0.6045369", "0.6045369", "0.6045369", "0.6045369", "0.6045369", "0.6045369", "0.6045369", "0.6045369", "0.6045369", "0.6045369", "0.6045369", "0.60431516", "0.6029062", "0.60023993", "0.5980653", "0.59762335", "0.59734476", "0.59546214", "0.595214", "0.5949784", "0.5947234", "0.5947234", "0.5947234", "0.5946001", "0.5933728", "0.5931408", "0.59301674", "0.59301674", "0.5926509", "0.59024715", "0.5902437", "0.58987254", "0.5894654", "0.5893877", "0.5887393", "0.5886082", "0.58835286", "0.58797526", "0.5871288", "0.5869842", "0.5864551", "0.58586866", "0.5856922", "0.585606", "0.5847709", "0.58448875", "0.5843954", "0.58403116", "0.58397067", "0.58374643", "0.58334714", "0.5833005", "0.582915", "0.582717", "0.5826829", "0.582618", "0.5822556", "0.5820563", "0.58202744", "0.5818697", "0.5817553", "0.5812852", "0.5812811" ]
0.0
-1
/ db houses end/ / inventory start/
public function insertInventory ( $data ) { return $this->db->insert( 'tbld_inventory', $data ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function manageinventory()\n\t\t{\n\t\t\t$stageDBO = DatabaseObjectFactory::build('Material');\n\t\t\t$arr = ['material_id','unit_price'];\n\t\t\t$materials = $stageDBO->getRecords($arr);\n\t\t\t\n\t\t\t$stageDBO = DatabaseObjectFactory::build('craft');\n\t\t\t$arr = ['craft_id','calculated_qoh'];\n\t\t\t$stageDBO->SetJoin(['[><]item' => 'item_id']);\n\t\t\t$crafts = $stageDBO->getRecords($arr);\n\n\t\t\t$stageDBO = DatabaseObjectFactory::build('return_details');\n\t\t\t$stageDBO->SetJoin(['[><]item' => 'item_id']);\n\t\t\t$arr = ['return_id','item_id','qty','current_price'];\n\t\t\t$returns = $stageDBO->getRecords($arr);\n\n\t\t\tinclude('views/pages/manageinventory.php');\n\t\t}", "public function start_harvest(){\n $this->checkinit();\n $this->harvest_laststart = $this->dt();\n $this->save_flags();\n }", "public function productinspector($start_id, $end_id);", "public function run()\n {\n $rests = Rest::all();\n $packagings = Packaging::all();\n $stickers = Sticker::all();\n\n foreach ($rests as $rest) {\n $i = new Inventory();\n $i->answered_id = 3;\n $i->component_type = 'rest_frameworks';\n $i->component_id = $rest->id;\n $i->expected_rests = 0;\n $i->expected_sum = 0;\n $i->real_sum = 0;\n $i->real_rest = 0;\n $i->save();\n }\n\n // stickers inventory\n foreach ($stickers as $sticker) {\n $i = new Inventory();\n $i->answered_id = 3;\n $i->component_type = 'stickers';\n $i->component_id = $sticker->id;\n $i->expected_rests = 0;\n $i->expected_sum = 0;\n $i->real_sum = 0;\n $i->real_rest = 0;\n $i->save();\n }\n \n // packagings inventory\n foreach ($packagings as $packaging) {\n $i = new Inventory();\n $i->answered_id = 3;\n $i->component_type = 'packagings';\n $i->component_id = $packaging->id;\n $i->expected_rests = 0;\n $i->expected_sum = 0;\n $i->real_sum = 0;\n $i->real_rest = 0;\n $i->save();\n }\n\n }", "public function testBookedSpacesEnd()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-17 15:00:00\";\n $end = \"2017-06-20 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "public function actionIndex()\t{\n //check\n $current = time()-1;\n $conditions = \"start_time <= NOW() AND bid_quote = 0 AND(end_time IS NULL OR end_time = '0000-00-00 00:00:00')\";\n $auctions = Auctions::model()->findAll($conditions);\n if ($auctions){\n foreach ($auctions as $auction){\n $tmp = explode(':', $auction->countdown);\n $countdown = $tmp[0]*3600 + $tmp[1]*60;\n \n $end_time = strtotime($auction->start_time) + $countdown;\n $loop_times = ($end_time - $current)/$countdown;\n \n if (intval($loop_times) == $loop_times)\n $auction->setEnd();\n }\n }\n \n // 1st place\n $conditions = \"start_time <= NOW() AND bid_quote > 0 AND(end_time IS NULL OR end_time = '0000-00-00 00:00:00')\";\n $auctions = Auctions::model()->findAll($conditions);\n if ($auctions){\n foreach ($auctions as $auction){\n $tmp = explode(':', $auction->countdown);\n $countdown = $tmp[0]*3600 + $tmp[1]*60;\n $end_time = strtotime($auction->start_time) + $countdown;\n $loop_times = ($end_time - $current)/$countdown;\n if (intval($loop_times) == $loop_times){\n $auction->set1stPlace($auction['id']);\n }\n }\n }\n\t}", "public function finish()\n {\n // we'll need the arguments to send to mastodon\n $args = $this->arguments;\n\n // replace the availability id with a unique key\n $db_availability = $this->get_record();\n unset( $args['id'] );\n $args['noid']['participant.uid'] = $db_availability->get_participant()->uid;\n $args['noid']['availability.monday'] = $db_availability->monday;\n $args['noid']['availability.tuesday'] = $db_availability->tuesday;\n $args['noid']['availability.wednesday'] = $db_availability->wednesday;\n $args['noid']['availability.thursday'] = $db_availability->thursday;\n $args['noid']['availability.friday'] = $db_availability->friday;\n $args['noid']['availability.saturday'] = $db_availability->saturday;\n $args['noid']['availability.sunday'] = $db_availability->sunday;\n $args['noid']['availability.start_time'] = $db_availability->start_time;\n $args['noid']['availability.end_time'] = $db_availability->end_time;\n\n parent::finish();\n\n // now send the same request to mastodon\n $mastodon_manager = lib::create( 'business\\cenozo_manager', MASTODON_URL );\n $mastodon_manager->push( 'availability', 'edit', $args );\n }", "public function run()\n {\n $item = new Item();\n $item->name = \"1-3\";\n $item->tier5_cost = 525;\n $item->other_cost = 1050;\n $item->step = 1;\n $item->save();\n $item = new Item();\n $item->name = \"4-9\";\n $item->tier5_cost = 1000;\n $item->other_cost = 2140;\n $item->step = 1;\n $item->save();\n $item = new Item();\n $item->name = \"10+\";\n $item->tier5_cost = 1600;\n $item->other_cost = 3270;\n $item->step = 1;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 1;\n $item->save();\n $item = new Item();\n $item->name = \"SOCIAL\";\n $item->tier5_cost = 550;\n $item->other_cost = 1150;\n $item->step = 2;\n $item->save();\n $item = new Item();\n $item->name = \"EMAIL\";\n $item->tier5_cost = 1000;\n $item->other_cost = 2000;\n $item->step = 2;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 2;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 2;\n $item->save();\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 1500;\n $item->other_cost = 3300;\n $item->step = 3;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 3;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 3;\n $item->save();\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 1500;\n $item->other_cost = 3000;\n $item->step = 4;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 4;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 4;\n $item->save();\n\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 1700;\n $item->other_cost = 3300;\n $item->step = 5;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 5;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 5;\n $item->save();\n\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 1000;\n $item->other_cost = 2000;\n $item->step = 6;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 6;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 6;\n $item->save();\n\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 3500;\n $item->other_cost = 6367;\n $item->step = 7;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 7;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 7;\n $item->save();\n\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 5555;\n $item->other_cost = 10827;\n $item->step = 8;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 8;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 8;\n $item->save();\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 3247;\n $item->other_cost = 6494;\n $item->step = 9;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 9;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 9;\n $item->save();\n\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 6000;\n $item->other_cost = 12732;\n $item->step = 10;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 10;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 10;\n $item->save();\n }", "function e107_db_debug() {\n\t\tglobal $eTimingStart;\n\n\t\t$this->aTimeMarks[0]=array(\n\t\t'Index' => 0,\n\t\t'What' => 'Start',\n\t\t'%Time' => 0,\n\t\t'%DB Time' => 0,\n\t\t'%DB Count' => 0,\n\t\t'Time' => ($eTimingStart),\n\t\t'DB Time' => 0,\n\t\t'DB Count' => 0\n\t\t);\n\t\t\n\t\tregister_shutdown_function('e107_debug_shutdown');\n\t}", "function recordInventory($run_timestamp, $location, $beer, $size, $inventory, $brewery_id)\n{\n\t$formattedSize = parseToMatchSiteshTable($size);\n\t$quantityInPackage = $formattedSize[0];\n\t$packageType = $formattedSize[1];\n\t$volumeML = $formattedSize[2];\n\n\t$recordStatement = \"INSERT INTO inventory_parsing (run_timestamp, beerstore_beer_id, beerstore_store_id, can_bottle_desc, single_package_type, single_package_quantity, single_package_volume, stock_at_timestamp, brewery_id)\n\tVALUES ('$run_timestamp', '$beer', '$location', '$size', '$packageType', '$quantityInPackage', '$volumeML', '$inventory', '$brewery_id')\";\n\tbeerTrackDBQuery($recordStatement);\n}", "function out($code=\"\", $category=\"\", $qty=0, $desc=\"\", $type=INVENTORY_TYPE, $warehouse=0)\n {\n $product = $this->m_product->getdata_detail(array(\"product_variant_code\"=>$code));\n\n // $data = $this->getdata(array(\"inventory_item_code\"=>$code, \"inventory_categories\"=>$category, \"inventory_operator\"=>\"in\"),1,\"\",\"inventory_id\",\"desc\");\n $data = $this->getdata(array(\"inventory_item_code\"=>$code, \"inventory_categories\"=>$category),1,\"\",\"inventory_id\",\"desc\");\n\n if($code==\"\" || $category==\"\" || $qty==\"\" || $product->num_rows()!=1 || $data->num_rows()!=1)\n {\n die(\"parameter out inventory harus di lengkapi, item code : $code, category : $category\");\n }\n\n // jika tidak ada item ini di inventory maka tidak perlu kalkulasi stock_awal, average_nominal dll\n if($data->num_rows()==1)\n {\n $nominal_average = $data->row()->inventory_average_nominal_now_per_item;\n $stock_awal = $data->row()->inventory_total_stock_now;\n $nominal_awal = $data->row()->inventory_total_nominal_now;\n $total_qty = $data->row()->inventory_total_stock_now - $qty;\n $total_nominal = $data->row()->inventory_total_nominal_now - ($data->row()->inventory_average_nominal_now_per_item*$qty);\n }\n\n // set nama product\n if($product->row()->product_variant_type==\"\" || $product->row()->product_variant_value==\"\")\n {\n $name = $product->row()->product_name;\n }\n else {\n $name = $product->row()->product_name.\" - \".$product->row()->product_variant_type.\" - \".$product->row()->product_variant_value;\n }\n\n // set log inventory\n if($desc==\"\")\n {\n $desc = \"insert by \".$this->session->userdata('username');\n }\n\n $data_insert = array(\n \"inventory_item_code\" => $code,\n \"inventory_name\" => $name,\n \"inventory_categories\" => $category,\n \"inventory_item_type\" => $type,\n \"inventory_operator\" => \"out\",\n \"inventory_qty\" => $qty,\n \"inventory_nominal_per_item\" => $nominal_average,\n \"inventory_total_nominal\" => $nominal_average*$qty,\n \"inventory_stock_awal\" => $stock_awal,\n \"inventory_nominal_stock_awal\" => $nominal_awal,\n \"inventory_average_nominal_now_per_item\" => $nominal_average,\n \"inventory_total_stock_now\" => $total_qty,\n \"inventory_total_nominal_now\" => $total_nominal,\n \"inventory_warehouse_id\" => $warehouse,\n \"inventory_date_craeted\" => date('Y-m-d H:i:s'),\n \"inventory_log\" => $desc,\n );\n $this->db->insert('inventory', $data_insert);\n return $this->db->insert_id();\n }", "public function testBookedSpacesStart()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-14 15:00:00\";\n $end = \"2017-06-17 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "public function backUp()\n {\n $inventory = $this->inventory;\n $this->oldInventory = $inventory;\n return;\n }", "public function testBookedSpacesAfter()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-18 15:00:00\";\n $end = \"2017-06-25 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(0, $total_places);\n }", "public function run()\n\t{\n\t\t// DB::table('inventories')->truncate();\n\n\t\t$insert = [\n\t\t\t[\n\t\t\t'itemId' => '1', \n\t\t\t'status' => 'inactive',\n\t\t\t'quantity'=>'100',\n\t\t\t'sellingPrice'=>'4.5',\n\t\t\t'created_at'=> new DateTime\n\t\t\t],\n\t\t\t[\n\t\t\t'itemID' => '2', \n\t\t\t'status' => 'inactive',\n\t\t\t'quantity'=>'200',\n\t\t\t'sellingPrice'=>'5.5',\n\t\t\t'created_at'=> new DateTime\n\t\t\t],\n\t\t\t[\n\t\t\t'itemID' => '3', \n\t\t\t'status' => 'inactive',\n\t\t\t'quantity'=>'50',\n\t\t\t'sellingPrice'=>'15.5',\n\t\t\t'created_at'=> new DateTime\n\t\t\t],\n\t\t\t[\n\t\t\t'itemID' => '4', \n\t\t\t'status' => 'inactive',\n\t\t\t'quantity'=>'55',\n\t\t\t'sellingPrice'=>'5.5',\n\t\t\t'created_at'=> new DateTime\n\t\t\t],\n\t\t\t[\n\t\t\t'itemID' => '5', \n\t\t\t'status' => 'inactive',\n\t\t\t'quantity'=>'100',\n\t\t\t'sellingPrice'=>'70',\n\t\t\t'created_at'=> new DateTime\n\t\t\t],\n\t\t\t[\n\t\t\t'itemID' => '6', \n\t\t\t'status' => 'inactive',\n\t\t\t'quantity'=>'33',\n\t\t\t'sellingPrice'=>'13',\n\t\t\t'created_at'=> new DateTime\n\t\t\t],\n\t\t\t[\n\t\t\t'itemID' => '7', \n\t\t\t'status' => 'inactive',\n\t\t\t'quantity'=>'50',\n\t\t\t'sellingPrice'=>'180',\n\t\t\t'created_at'=> new DateTime\n\t\t\t],\n\t\t\t[\n\t\t\t'itemID' => '8', \n\t\t\t'status' => 'inactive',\n\t\t\t'quantity'=>'40',\n\t\t\t'sellingPrice'=>'180',\n\t\t\t'created_at'=> new DateTime\n\t\t\t],\n\t\t\t[\n\t\t\t'itemID' => '9', \n\t\t\t'status' => 'inactive',\n\t\t\t'quantity'=>'100',\n\t\t\t'sellingPrice'=>'60',\n\t\t\t'created_at'=> new DateTime\n\t\t\t],\n\t\t\t[\n\t\t\t'itemID' => '10', \n\t\t\t'status' => 'inactive',\n\t\t\t'quantity'=>'120',\n\t\t\t'sellingPrice'=>'600',\n\t\t\t'created_at'=> new DateTime\n\t\t\t],\n\t\t\t[\n\t\t\t'itemID' => '11', \n\t\t\t'status' => 'inactive',\n\t\t\t'quantity'=>'25',\n\t\t\t'sellingPrice'=>'130',\n\t\t\t'created_at'=> new DateTime\n\t\t\t]\n\n\t\t];\n\n\t\tDB::table('tblinventory')->insert($insert);\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('inventories')->insert($inventories);\n\t}", "public function add_inventory() {\n\t\t$values=array(\"brand_id\"=>$_POST['brand_list_id'],\"product_id\"=>$_POST['product_list_id'],\"item_name\"=>$_POST['item_name'],\"entry_date\"=>$_POST['purchase_date'],\"buy_price\"=>$_POST['product_buy_price'],\"sell_price\"=>$_POST['product_sell_price'],\"quantity\"=>$_POST['item_qty'],\"update_by\"=>isset($_SESSION['user_id']));\n\t\tif($this->insert(\"inventory\",$values)) {\t\n\t\t\t$result=$this->runQuery('getAll','select max(id) as inv_item_id from inventory');\n\t\t\techo '{\"inventoryItemList\":{\"updateFlag\":false,\"item\":'.json_encode($result).'}}';\n\t\t}\n\t\telse\n\t\t\techo 'Error while inserting inventory tbl';\n\t}", "function EndStartRun()\n {\n if ($this->transaction_in_progress) \n {\n $this->db->CompleteTrans();\n $this->transaction_in_progress =false;\n }\n }", "public function reportOvercrowded($start_date,$end_date){\n\n\t\t$mcoData = new Application_Model_DbTable_McoData();\n\t\t$select = $mcoData->select()->setIntegrityCheck(false);\n\t\t$select ->from(array(\"md\" => \"mco_data\"),array('md.line','md.vehicle_number','md.start_hour','vp.name','md.end_hour',\n\t\t\t'gr.gratuity_factor','gr.turnover_factor','gr.research_date',\n\t\t\t'date_exibition' => 'md.start_date',\n\t\t\t'qtd_passenger' => new Zend_Db_Expr('(md.amount_passenger*gr.gratuity_factor)/gr.turnover_factor'),\n\t\t\t'qtd_passenger_way' => new Zend_Db_Expr('CASE WHEN mid_roulette != 0 THEN (((mid_roulette-start_roulette)*gr.gratuity_factor)/gr.turnover_factor) END'),\n\t\t\t'qtd_passenger_back' => new Zend_Db_Expr('CASE WHEN mid_roulette != 0 THEN (((end_roulette-mid_roulette)*gr.gratuity_factor)/gr.turnover_factor) END'),\n\t\t\t'capacity' => new Zend_Db_Expr('(((((vm.width_before_roulette*vm.length_before_roulette)+(vm.width_after_roulette*vm.length_after_roulette))/100)/5)+vm.amount_seats)'),\n\t\t\t'exceed_fp' => new Zend_Db_Expr('IF(((md.amount_passenger*gr.gratuity_factor)/gr.turnover_factor) < (((((vm.width_before_roulette*vm.length_before_roulette)+\n\t\t\t\t(vm.width_after_roulette*vm.length_after_roulette))/100)/5)+vm.amount_seats),0,1)'),\n\t\t\t'exceed_p' => new Zend_Db_Expr('IF(((md.amount_passenger*gr.gratuity_factor)/gr.turnover_factor) < (((((vm.width_before_roulette*vm.length_before_roulette)+\n\t\t\t\t(vm.width_after_roulette*vm.length_after_roulette))/100)/6.5)+vm.amount_seats),0,1)')))\n\t\t->joinInner(array('vh' => 'vehicle_historic'), 'md.vehicle_number=vh.external_number', array())\n\t\t->joinInner(array('vm' => 'vehicle_measures'), 'vm.id=vh.vehicle_id')\n\t\t->joinInner(array('v' => 'vehicle'), 'v.id=vh.vehicle_id')\n\t\t->joinInner(array('vp' => 'vehicle_pattern'), 'v.pattern=vp.id')\n\t\t->joinInner(array('gr' => 'gratuity_turnover'), 'md.line=gr.line')\n\t\t->where('md.start_date >= ?', Application_Model_General::dateToUs($start_date))\n\t\t->where('md.end_date <= ?', Application_Model_General::dateToUs($end_date))\n\t\t->where('substr(md.start_date,1,4) = substr(gr.research_date,1,4)')\n\t\t->where('md.status=1');\n\t\treturn $mcoData->fetchAll($select);\n\t}", "public function run()\n {\n $product = Product::create([\n \t'category_id' => 1,\n \t'brand_id' => 1,\n \t'presentation_id' => 1,\n \t'name' => 'AE3EFE',\n \t'minimum_stock' => 3,\n \t'stock' => 10,\n \t'purchase_price' => '2000',\n \t'sale_price' => '2500',\n 'state' => 1\n ]);\n\n Inventory::create([\n 'product_id' => $product->id,\n 'table_id' => $product->id,\n 'initial_balance' => $product->stock,\n 'input' => 0,\n 'output' => 0,\n 'balance' => $product->stock\n ]);\n\n $product = Product::create([\n 'category_id' => 1,\n 'brand_id' => 2,\n 'presentation_id' => 1,\n 'name' => 'cfdf',\n 'minimum_stock' => 3,\n 'stock' => 10,\n 'purchase_price' => '2000',\n 'sale_price' => '2500',\n 'state' => 1\n ]);\n\n Inventory::create([\n 'product_id' => $product->id,\n 'table_id' => $product->id,\n 'initial_balance' => $product->stock,\n 'input' => 0,\n 'output' => 0,\n 'balance' => $product->stock\n ]);\n\n $product = Product::create([\n 'category_id' => 1,\n 'brand_id' => 3,\n 'presentation_id' => 2,\n 'name' => 'trg',\n 'minimum_stock' => 3,\n 'stock' => 10,\n 'purchase_price' => '2000',\n 'sale_price' => '2500',\n 'state' => 1\n ]);\n\n Inventory::create([\n 'product_id' => $product->id,\n 'table_id' => $product->id,\n 'initial_balance' => $product->stock,\n 'input' => 0,\n 'output' => 0,\n 'balance' => $product->stock\n ]);\n }", "public function startDump() {\n\t\t// Get the details for the current database.\n\t\t$cmd = $this->getDatabaseCommand();\n\t\t// Run the command.\n\t\tSakeMoreHelper::runCLI($cmd);\n\t}", "public function run()\n {\n $items = [\n [\n 'material_id' => 3,\n 'dead' => DateTime::dateTimeThisDecade(),\n ],\n [\n 'material_id' => 1,\n 'dead' => Carbon::now()->addMonthNoOverflow()->toDateString(),\n ],\n [\n 'material_id' => 1,\n 'dead' => Carbon::now()->addMonthNoOverflow(6)->toDateString(),\n ],\n [\n 'material_id' => 2,\n 'dead' => Carbon::now()->addMonthNoOverflow(12)->toDateString(),\n ],\n [\n 'material_id' => 3,\n 'dead' => Carbon::now()->addMonthNoOverflow()->toDateString(),\n ],\n ];\n foreach ($items as $item) {\n $inventory = new \\App\\Inventory();\n $inventory->material_id = $item['material_id'];\n $inventory->lot_code = Str::random(10);\n $inventory->dead = $item['dead'];\n $inventory->stock_quantity = rand();\n $inventory->inventory_comment = Str::random(400);\n $inventory->status = rand(0,2);\n $inventory->created_at = Carbon::now();\n $inventory->updated_at = Carbon::now();\n $inventory->save();\n }\n }", "private function endAuction() {\n $queryBuilder = $this->manager->getRepository(Grund::class)->createQueryBuilder('g');\n $entities = $queryBuilder\n ->andWhere('g.status in (:statuses)')\n ->setParameter('statuses', [GrundStatus::FREMTIDIG, GrundStatus::ANNONCERET])\n ->andWhere('g.auktionslutdato IS NOT NULL')\n ->andWhere('g.auktionslutdato < :now')\n ->setParameter('now', new \\DateTime(null, new \\DateTimeZone('UTC')))\n ->getQuery()->getResult();\n\n $this->write(sprintf('End auction; #entities: %d', count($entities)));\n foreach ($entities as $entity) {\n $this->write(\n sprintf(\n \"% 8d: %s\\t%s\",\n $entity->getId(),\n (string) $entity,\n $entity->getAuktionslutdato()->format(\\DateTime::ISO8601)\n )\n );\n $entity->setStatus(GrundStatus::AUKTION_SLUT);\n $this->manager->persist($entity);\n }\n $this->manager->flush();\n }", "public function outOperation(){\n $this->inventory->setQuantity($this->inventory->getQuantity() - $this->getQuantity());\n $this->type = \"OUT\";\n }", "public function total_fuel_ga($start, $end)\n {\n \t$query = $this->db->query('select \n a.nap,\n b.code_unit,\n b.nomor_plat,\n a.tanggal_pengisian,\n SUM(a.qty) total\n FROM\n vehicle_fuel_consumption a LEFT JOIN vehicle_master b ON a.nap = b.nap\nWHERE DATE(a.tanggal_pengisian) BETWEEN \"'.$start.'\" \n AND \"'.$end.'\" GROUP BY a.nap');\n \treturn $query->result();\n }", "function addItem(){\r\n// this means, lets say last week i created a item with code x. then i deleted it.(set lock_item=1)\r\n// today as that item_name doesnt exist anymore, i want to reuse it to another item. i cant do \r\n// insert item query as it will lead to unique index criteria erro. so i must update earlier row.\r\n// current addItem function only sets lock_item=0, but doesnt update other rows.\r\n\r\n\tglobal $item, $lab, $item_name, $cost, $status, $comments, $operation, $connection, $result, $bill_serial,\r\n\t$iv_serial, $product_code, $tequip, $vendor,$comments_sql, $item_name_sql, $product_code_sql;\r\n\tif($item==-1||$lab==-1||$bill_serial==-1){\r\n\t\taddToToast(\"please select Lab/Vendor/Apparatus from dropdown\",0);\r\n\t}\r\n\telse{ \r\n\t\t/*\t\t\tInserting items one by one \t\t\t\t*/\r\n\t\tforeach ($item_name_sql as $key => $value) {\r\n\t\t //checking if the item is presenet in the inventory\r\n\t\t\tif(!doesItemExist(\"inventory\", \"item_code\", $item_name_sql[$key])){ //if item is not present in inventory\r\n\t\t\t\t$query=\"\r\n\t\t\t\tINSERT INTO \r\n\t\t\t\tinventory (\tlab_serial, \r\n\t\t\t\tserial_item, \r\n\t\t\t\titem_code,\r\n\t\t\t\tproduct_code, \r\n\t\t\t\ttequip, \r\n\t\t\t\tcost, \r\n\t\t\t\tstatus,\r\n\t\t\t\treceipt_serial,\r\n\t\t\t\tlast_operation\r\n\t\t\t\t) \r\n\t\t\t\tvalues(\r\n\t\t\t\t{$lab},\r\n\t\t\t\t{$item}, \r\n\t\t\t\t'{$item_name_sql[$key]}',\r\n\t\t\t\t'{$product_code_sql[$key]}',\r\n\t\t\t\t{$tequip}, \r\n\t\t\t\t{$cost},\r\n\t\t\t\t{$status},\r\n\t\t\t\t{$bill_serial},\r\n\t\t\t\t{$operation}\r\n\t\t\t) \";\r\n\t\t\tperform_query($connection, $query, \"failed to insert into inventory\");\r\n\t\t\t\t // to insert into inventory log, but we need serial of that item_code\r\n\t\t\t$iv_serial=mysqli_insert_id($connection);\r\n\t\t\tinventoryLog();\r\n\t\t\taddToToast(\"Created new apparatus of name {$item_name[$key]} of cost {$cost}\",1);\r\n\t\t}\r\n\t\telse{ \t\t\r\n\t\t\t //if item is already present, it may be an error\r\n\t\t\t \t\t\t//probability is that the item may have been locked and now needs to be unlocked\r\n\t\t\t$row=mysqli_fetch_assoc($result);\r\n\t\t\tif(1==$row['lock_item']){\r\n\t\t\t\t$date= date(\"Y-m-d H:i:s\");\r\n\t\t\t\t$query=\"SELECT serial from inventory where item_code={$item_name_sql[$key]}\";\r\n\t\t\t\t$result=perform_query($connection, $query, \"failed to get serial\");\r\n\t\t\t\t$row=mysqli_fetch_assoc($result);\r\n\t\t\t\t$iv_serial=$row['serial'];\r\n\t\t\t\t$query=\"UPDATE \r\n\t\t\t\tinventory \r\n\t\t\t\tset \r\n\t\t\t\tlock_item=0, \r\n\t\t\t\tupdated='{$date}', \r\n\t\t\t\tlab_serial={$lab}, \r\n\t\t\t\tcost={$cost} \r\n\t\t\t\twhere \r\n\t\t\t\titem_code='{$item_name_sql[$key]}'\";\r\n\t\t\t\tperform_query($connection, $query, \"failed to update\");\r\n\t\t\t\t$comments.=\" item was unlocked\";\r\n\t\t\t\tinventoryLog();\r\n\t\t\t\taddToToast(\"{$comments}\",1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\taddToToast(\"its already present \",0);\r\n\t\t}\t\r\n\t}\r\n\r\n} \r\n}", "function createTables()\n {\n //check to see if the product inventory table already exists\n //echo \"Checking table exists\";\n if (!$this->checkTableExists(\"PRODUCT_INVENTORY\")) {\n $sql =<<<EOF\n CREATE TABLE PRODUCT_INVENTORY\n (ID INTEGER PRIMARY KEY AUTOINCREMENT,\n NAME TEXT NOT NULL,\n COST_PRICE REAL NOT NULL,\n SALE_PRICE REAL NOT NULL,\n STOCK_LEVEL INTEGER NOT NULL,\n DESCRIPTION TEXT);\n\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Revolon starter kit\", 10.55, 15.99, 50, \"Revolon eyelashes starter kit\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Sukin Cleanser\", 6.55, 12.99, 102, \"Sukin Oil balancing GEL cleanser\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Tom Ford Black Orchid\", 80.50, 129.00, 15, \"Tom Ford Black Orchid 50ml fragrance\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Dior jadore\", 111.25, 149.00, 4, \"Dior Jadore 75ml fragrance\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Strepsils\", 1.29, 4.55, 201, \"Strepsils 12 pack\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Swisspers Cotton Tips\", 2.95, 4.60, 2012, \"400 cotton tips in box\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Radox Shower Gel\", 1.12, 3.00, 23, \"Radox uplifted shower GEL 250ml\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Dove go fresh\", 3.10, 5.10, 34, \"Dove go fresh deodorant\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Gilette Mach3\", 4.41, 6.80, 44, \"Gillette mach3 blade and razor\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Just For Men\", 7.12, 10.20, 32, \"Just for men hair colour range blue\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Oral B Toothbrush\", 2.29, 4.79, 10, \"Orab-B toothbrush SOFT\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"iWhite instant\", 24.49, 35.95, 11, \"Teeth whitening kit\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Sensodyne repair\", 1.20, 3.19, 2, \"Tooth paste to repair and protect teeth\");\n\nEOF;\n $ret = $this->exec($sql);\n // databaseDebug($this, $ret, \"Created PRODUCT_INVENTORY table\");\n } else {\n // echo \"PRODUCT_INVENTORY table already exists, not creating\";\n }\n if (!$this->checkTableExists(\"USERS\")) {\n $sql =<<<EOF\n CREATE TABLE USERS\n (ID INTEGER PRIMARY KEY AUTOINCREMENT,\n USERNAME TEXT NOT NULL,\n PASSWORD TEXT NOT NULL,\n FULL_NAME TEXT NOT NULL);\n\n INSERT INTO USERS (USERNAME, PASSWORD, FULL_NAME) VALUES (\"test\", \"test\", \"Test Person\");\nEOF;\n $ret = $this->exec($sql);\n // databaseDebug($this, $ret, \"Created USERS table\");\n } else {\n // echo \"USERS table already exists, not creating\";\n }\n\n if (!$this->checkTableExists(\"PURCHASES\")) {\n $sql =<<<EOF\n CREATE TABLE PURCHASES\n (ID INTEGER PRIMARY KEY AUTOINCREMENT,\n DATE INTEGER NOT NULL,\n ID_INVENTORY INTEGER NOT NULL,\n FOREIGN KEY(ID_INVENTORY) REFERENCES PRODUCT_INVENTORY(ID));\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-01\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-01\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-01\"), 1);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-02\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-02\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-02\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-03\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-03\"), 9);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-03\"), 11);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-03\"), 5);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-04\"), 13);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-04\"), 11);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-05\"), 5);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-05\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-05\"), 12);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-06\"), 12);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-06\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-06\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-07\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-07\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-07\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-07\"), 4);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-08\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-08\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-08\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-08\"), 6);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-09\"), 7);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-09\"), 8);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-09\"), 10);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-10\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-10\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-10\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-11\"), 11);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-11\"), 12);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-12\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-12\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-12\"), 1);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-13\"), 4);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-13\"), 5);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-13\"), 7);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-14\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-14\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-14\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-15\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-15\"), 9);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-16\"), 10);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-16\"), 11);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-16\"), 7);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-17\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-17\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-17\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-18\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-18\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-18\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-19\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-19\"), 4);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-19\"), 5);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-19\"), 6);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-20\"), 7);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-20\"), 8);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-20\"), 9);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-20\"), 10);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-20\"), 1);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-21\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-21\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-21\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-21\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-21\"), 3);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-22\"), 4);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-22\"), 5);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-23\"), 9);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-23\"), 8);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-23\"), 8);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-24\"), 8);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-24\"), 7);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-24\"), 6);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-25\"), 5);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-25\"), 4);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-26\"), 3);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-27\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-27\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-27\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-27\"), 3);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-28\"), 4);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-28\"), 5);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-28\"), 7);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-29\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-29\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-29\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-30\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-30\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-30\"), 3);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-31\"), 9);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-31\"), 10);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-31\"), 2);\nEOF;\n $ret = $this->exec($sql);\n // databaseDebug($this, $ret, \"Created PURCHASES table\");\n //databaseDebug($this, $ret, \"Created product inventory table\");\n } else {\n // echo \"PURCHASES table already exists, not creating\";\n }\n }", "public function run()\n {\n DB::table('sales_product')->insert([\n 'salesId' => 1,\n 'productId' => 2,\n 'quantity' => 5,\n 'isActive' => 1,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n DB::table('inventory')->where('productId',2)->decrement('quantity',5);\n }", "function insertInventoryEntry($db, $inventoryNr, $productNr, $userNr, $amount, $unit, $buyingDate, $expiringDate, $status) {\n \n // Set values of variables\n $inventoryEntryNr = null;\n \n // Insert inventor entry\n $sql = \"INSERT INTO Inventoryentry (InventoryEntryNr, InventoryNr, ProductNr, UserNr, Amount, Unit, BuyingDate, ExpiringDate, Status)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\n $stmt = $db->prepare($sql);\n $stmt->bind_param('iiiiisssi', $inventoryEntryNr, $inventoryNr, $productNr, $userNr, $amount, $unit, $buyingDate, $expiringDate, $status);\n $stmt->execute();\n\n\n }", "private function inventory_batch()\n\t{\n\t\t// load the sync db\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\n\t\t// find the most recent unprocessed shipments\n\t\t$query = ee()->sync_db->where('processed !=', '1')->order_by('id', 'asc')->get('products_inventory', 45000);\n\n\t\t// create arrays for processed inventory updates\n\t\t$ids_processed = array();\n\n\t\t// create array for the update query\n\t\t$inventory_update = array();\n\n\n\t\t// loop through each shipment\n\t\tforeach($query->result() as $inventory)\n\t\t{\n\t\t\t// add id to the processed array\n\t\t\t$ids_processed[] = $inventory->id;\n\n\t\t\t// add this update to the query\n\t\t\t$inventory_update[] = array(\n\t\t\t\t'sku' => $inventory->sku,\n\t\t\t\t'stock_level' => $inventory->quantity\n\t\t\t);\n\t\t\t\n\t\t} // end foreach\n\n\t\t// if we have records to process, update the stock levels and mark the records as processed\n\t\tif(count($ids_processed) > 0)\n\t\t{\n\t\t\t// run the update batch query\n\t\t\tee()->db->update_batch('store_stock', $inventory_update, 'sku'); \n\n\t\t\tee()->sync_db->where_in('id', $ids_processed)->set('processed', 1)->update('products_inventory');\n\t\t}\t\t\t\n\t\t\n\t}", "static function end(Reservation $res) {\n\t\t$db = new Db();\n\t\t$db->saveQry(\"INSERT INTO `#_reminder` (`reservation`, `status`) \".\n\t\t\t\t\"VALUES (?,?)\", $res->getId(), 'end');\n\t}", "function get_initial_inventory() {\n return [\n 'A' => 2,\n 'B' => 3,\n 'C' => 1,\n 'D' => 0,\n 'E' => 0\n ];\n}", "public function handle()\n {\n\t\t\n\t\t//qiwi\n\t\t$pdo = \\DB::connection(\"obmenneg\")->getPdo();\n\t\t$sql=\"select id_ad, contact_id, amount, amount_btc, round(amount/amount_btc::numeric,2) as course, \n\t\tcase when id_ad='609849' then round(amount/amount_btc::numeric,2)*1.02 else round(amount/amount_btc::numeric,2)*0.99 end as course_fact,\n\t\tcase when id_ad='609849' then round(amount/amount_btc::numeric,2)*1.02*amount_btc else round(amount/amount_btc::numeric,2)*0.99*amount_btc end\n\t\tas amount_fact,created_at from local_robots where id_ad in ('617372', '609849') and status='9' order by created_at asc\";\n\t\t$stats=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$sql=\"insert into local_balancing (id_ad, contact_id, amount, amount_btc, course, course_fact, amount_fact, remainder, created)\n\t\t\tselect ?,?,?,?,?,?,?,?,? WHERE NOT EXISTS (SELECT 1 FROM local_balancing WHERE contact_id=?)\";\n\t\t$sthInsert=$pdo->prepare($sql);\n\t\tforeach ($stats as $stat){\n\t\t\t$sthInsert->execute([$stat['id_ad'], $stat['contact_id'], $stat['amount'], $stat['amount_btc'], $stat['course'], $stat['course_fact'], \n\t\t\t$stat['amount_fact'], $stat['amount_btc'], $stat['created_at'], $stat['contact_id']]);\n\t\t}\n\t\t$sql=\"select * from local_balancing where id_ad='609849' and status='0' order by created asc\";\n\t\t$buys=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\n\t\t$sql=\"update local_balancing set status=?, remainder=?, details=?\n\t\t\tWHERE contact_id=?\";\n\t\t$sthUpdate=$pdo->prepare($sql);\n\t\t\n\t\t$sql=\"update local_balancing set status=?, remainder=?, details=?, return_course=?, profit=?\n\t\t\tWHERE contact_id=?\";\n\t\t$sthUpdated=$pdo->prepare($sql);\n\t\t\n\t\t$sql=\"update local_balancing set status=?, remainder=? \n\t\t\tWHERE contact_id=?\";\n\t\t$sthUpdatedd=$pdo->prepare($sql);\n\n\t\tforeach ($buys as $buy){\n\t\t\t$i=1;\n\t\t\t$sells=\\DB::connection('obmenneg')->table('local_balancing')->where('id_ad', '617372')->where('status', '0')->orderBy('created', 'asc')->get();\n\t\t\t$remainder_buy=$buy['remainder'];\n\t\t\twhile($i<=count($sells)){\n\t\t\t\t$sql=\"select * from local_balancing where id_ad='617372' and status='0' order by created asc\";\n\t\t\t\t$sell=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t\t\t$remainder_sell=$sell['remainder'];\n\t\t\t\t$details=$sell['details'];\n\t\t\t\tif ($buy['created']>$sell['created']){\n\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\n\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - продаж без закупок;\";\n\t\t\t\t\t$sthUpdate->execute(['3',$remainder_sell,$details,$sell['contact_id']]);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif ($remainder_buy>$remainder_sell){\n\t\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\t\t\t\t\t\t\n\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t$sum+=$kk;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ostPr=100-$procents;\n\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$remainder_buy=$remainder_buy-$remainder_sell;\n\t\t\t\t\t\t$remainder=$remainder_sell*100/$buy['remainder'];\n\t\t\t\t\t\t$profit=$sell['amount']-$sum*$sell['amount_btc'];\n\t\t\t\t\t\t$sthUpdated->execute(['1','0',$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t$sthUpdatedd->execute(['0',$remainder_buy,$buy['contact_id']]);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$remainder=$remainder_buy*100/$sell['amount_btc'];\t\t\n\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t$sum+=$kk;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ostPr=100-$procents;\n\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$remainder_sell=$remainder_sell-$remainder_buy;\n\t\t\t\t\t\t$profit=$sell['amount']-$sum*$sell['amount_btc'];\n\t\t\t\t\t\t$sthUpdated->execute(['0',$remainder_sell,$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t$sthUpdatedd->execute(['1',$buy['amount_btc'],$buy['contact_id']]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sql=\"select * from local_balancing where id_ad='617372' and status in ('0','3') order by created asc\";\n\t\t$buys=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\n\t\tforeach ($buys as $buy){\n\t\t\t$i=1;\n\t\t\t$sells=\\DB::connection('obmenneg')->table('local_balancing')->where('id_ad', '609849')->where('remainder', '>', '0')->orderBy('created', 'asc')->get();\n\t\t\t$remainder_buy=$buy['remainder'];\n\t\t\twhile($i<=count($sells)){\n\t\t\t\t$sql=\"select * from local_balancing where id_ad='609849' and remainder>'0' order by created asc\";\n\t\t\t\t$sell=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t\t\tif ($sell){\n\t\t\t\t\t$remainder_sell=$sell['remainder'];\n\t\t\t\t\t$details=$sell['details'];\n\t\t\t\t\tif ($buy['created']>$sell['created']){\n\t\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\n\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - покупок без продаж;\";\n\t\t\t\t\t\t$sthUpdate->execute(['1','0',$details,$sell['contact_id']]);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif ($remainder_buy>$remainder_sell){\n\t\t\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\t\t\t\t\t\t\n\t\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t\t$sum+=$kk;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$ostPr=100-$procents;\n\t\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$remainder_buy=$remainder_buy-$remainder_sell;\n\t\t\t\t\t\t\t$remainder=$remainder_sell*100/$buy['remainder'];\n\t\t\t\t\t\t\t$profit=$sum*$sell['amount_btc']-$sell['amount'];\n\t\t\t\t\t\t\t$sthUpdated->execute(['1','0',$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t\t$sthUpdatedd->execute(['3',$remainder_buy,$buy['contact_id']]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$remainder=$remainder_buy*100/$sell['amount_btc'];\t\t\n\t\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t\t$sum+=$kk;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$ostPr=100-$procents;\n\t\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$remainder_sell=$remainder_sell-$remainder_buy;\n\t\t\t\t\t\t\t$profit=$sum*$sell['amount_btc']-$sell['amount'];\n\t\t\t\t\t\t\t$sthUpdated->execute(['1',$remainder_sell,$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t\t$sthUpdatedd->execute(['1',$buy['amount_btc'],$buy['contact_id']]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//яндекс\n\t\t$pdo = \\DB::connection(\"obmenneg\")->getPdo();\n\t\t$sql=\"select id_ad, contact_id, amount, amount_btc, round(amount/amount_btc::numeric,2) as course, \n\t\tcase when id_ad='609928' then round(amount/amount_btc::numeric,2)*1.015 else round(amount/amount_btc::numeric,2)*0.99 end as course_fact,\n\t\tcase when id_ad='609928' then round(amount/amount_btc::numeric,2)*1.015*amount_btc else round(amount/amount_btc::numeric,2)*0.99*amount_btc end\n\t\tas amount_fact,created_at from local_robots where id_ad in ('609305', '609928') and status='9' order by created_at asc\";\n\t\t$stats=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$sql=\"insert into local_balancing (id_ad, contact_id, amount, amount_btc, course, course_fact, amount_fact, remainder, created)\n\t\t\tselect ?,?,?,?,?,?,?,?,? WHERE NOT EXISTS (SELECT 1 FROM local_balancing WHERE contact_id=?)\";\n\t\t$sthInsert=$pdo->prepare($sql);\n\t\tforeach ($stats as $stat){\n\t\t\t$sthInsert->execute([$stat['id_ad'], $stat['contact_id'], $stat['amount'], $stat['amount_btc'], $stat['course'], $stat['course_fact'], \n\t\t\t$stat['amount_fact'], $stat['amount_btc'], $stat['created_at'], $stat['contact_id']]);\n\t\t}\n\t\t$sql=\"select * from local_balancing where id_ad='609928' and status='0' order by created asc\";\n\t\t$buys=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\n\t\t$sql=\"update local_balancing set status=?, remainder=?, details=?\n\t\t\tWHERE contact_id=?\";\n\t\t$sthUpdate=$pdo->prepare($sql);\n\t\t\n\t\t$sql=\"update local_balancing set status=?, remainder=?, details=?, return_course=?, profit=?\n\t\t\tWHERE contact_id=?\";\n\t\t$sthUpdated=$pdo->prepare($sql);\n\t\t\n\t\t$sql=\"update local_balancing set status=?, remainder=? \n\t\t\tWHERE contact_id=?\";\n\t\t$sthUpdatedd=$pdo->prepare($sql);\n\t\t\n\t\tforeach ($buys as $buy){\n\t\t\t$i=1;\n\t\t\t$sells=\\DB::connection('obmenneg')->table('local_balancing')->where('id_ad', '609305')->where('status', '0')->orderBy('created', 'asc')->get();\n\t\t\t$remainder_buy=$buy['remainder'];\n\t\t\twhile($i<=count($sells)){\n\t\t\t\t$sql=\"select * from local_balancing where id_ad='609305' and status='0' order by created asc\";\n\t\t\t\t$sell=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t\t\t$remainder_sell=$sell['remainder'];\n\t\t\t\t$details=$sell['details'];\n\t\t\t\tif ($buy['created']>$sell['created']){\n\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\n\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - продаж без закупок;\";\n\t\t\t\t\t$sthUpdate->execute(['3',$remainder_sell,$details,$sell['contact_id']]);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif ($remainder_buy>$remainder_sell){\n\t\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\t\t\t\t\t\t\n\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t$sum+=$kk;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ostPr=100-$procents;\n\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$remainder_buy=$remainder_buy-$remainder_sell;\n\t\t\t\t\t\t$remainder=$remainder_sell*100/$buy['remainder'];\n\t\t\t\t\t\t$profit=$sell['amount']-$sum*$sell['amount_btc'];\n\t\t\t\t\t\t$sthUpdated->execute(['1','0',$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t$sthUpdatedd->execute(['0',$remainder_buy,$buy['contact_id']]);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$remainder=$remainder_buy*100/$sell['amount_btc'];\t\t\n\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t$sum+=$kk;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$ostPr=100-$procents;\n\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$remainder_sell=$remainder_sell-$remainder_buy;\n\t\t\t\t\t\t$profit=$sell['amount']-$sum*$sell['amount_btc'];\n\t\t\t\t\t\t$sthUpdated->execute(['0',$remainder_sell,$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t$sthUpdatedd->execute(['1',$buy['amount_btc'],$buy['contact_id']]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sql=\"select * from local_balancing where id_ad='609305' and status in ('0','3') order by created asc\";\n\t\t$buys=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\n\t\tforeach ($buys as $buy){\n\t\t\t$i=1;\n\t\t\t$sells=\\DB::connection('obmenneg')->table('local_balancing')->where('id_ad', '609928')->where('remainder', '>', '0')->orderBy('created', 'asc')->get();\n\t\t\t$remainder_buy=$buy['remainder'];\n\t\t\twhile($i<=count($sells)){\n\t\t\t\t$sql=\"select * from local_balancing where id_ad='609928' and remainder>'0' order by created asc\";\n\t\t\t\t$sell=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t\t\tif ($sell){\n\t\t\t\t\t$remainder_sell=$sell['remainder'];\n\t\t\t\t\t$details=$sell['details'];\n\t\t\t\t\tif ($buy['created']>$sell['created']){\n\t\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\n\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - покупок без продаж;\";\n\t\t\t\t\t\t$sthUpdate->execute(['1','0',$details,$sell['contact_id']]);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif ($remainder_buy>$remainder_sell){\n\t\t\t\t\t\t\t$remainder=$remainder_sell*100/$sell['amount_btc'];\t\t\t\t\t\t\n\t\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t\t$sum+=$kk;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$ostPr=100-$procents;\n\t\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$remainder_buy=$remainder_buy-$remainder_sell;\n\t\t\t\t\t\t\t$remainder=$remainder_sell*100/$buy['remainder'];\n\t\t\t\t\t\t\t$profit=$sum*$sell['amount_btc']-$sell['amount'];\n\t\t\t\t\t\t\t$sthUpdated->execute(['1','0',$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t\t$sthUpdatedd->execute(['3',$remainder_buy,$buy['contact_id']]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$remainder=$remainder_buy*100/$sell['amount_btc'];\t\t\n\t\t\t\t\t\t\t$details=$details . \"\" . round($remainder,6) . \"% - \" . $buy['course_fact'] . \";\";\n\t\t\t\t\t\t\t$courses=explode(\";\", $details);\n\t\t\t\t\t\t\t$sum=0;\n\t\t\t\t\t\t\t$procents=0;\n\t\t\t\t\t\t\t$allCourse=0;\n\t\t\t\t\t\t\t$countCourses=0;\n\t\t\t\t\t\t\tforeach ($courses as $course){\n\t\t\t\t\t\t\t\t$courDet=explode(\" - \", $course);\n\t\t\t\t\t\t\t\tif (count($courDet)==2){\n\t\t\t\t\t\t\t\t\t$pr=preg_replace(\"/[^.0-9]/\", '', $courDet[0]);\n\t\t\t\t\t\t\t\t\t$sm=preg_replace(\"/[^.0-9]/\", '', $courDet[1]);\n\t\t\t\t\t\t\t\t\tif (!$sm){\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$procents+=$pr;\n\t\t\t\t\t\t\t\t\t$allCourse+=$sm;\n\t\t\t\t\t\t\t\t\t$countCourses++;\n\t\t\t\t\t\t\t\t\t$kk=$pr*$sm/100;\n\t\t\t\t\t\t\t\t\t$sum+=$kk;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$ostPr=100-$procents;\n\t\t\t\t\t\t\tif ($ostPr>0){\n\t\t\t\t\t\t\t\t$srCourse=$allCourse/$countCourses;\n\t\t\t\t\t\t\t\t$srSum=$ostPr*$srCourse/100;\n\t\t\t\t\t\t\t\t$sum+=$srSum;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$remainder_sell=$remainder_sell-$remainder_buy;\n\t\t\t\t\t\t\t$profit=$sum*$sell['amount_btc']-$sell['amount'];\n\t\t\t\t\t\t\t$sthUpdated->execute(['1',$remainder_sell,$details,$sum,$profit,$sell['contact_id']]);\n\t\t\t\t\t\t\t$sthUpdatedd->execute(['1',$buy['amount_btc'],$buy['contact_id']]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t$sql=\"select sum(remainder) as amount_btc from local_balancing where id_ad='609849' and status='0' group by id_ad\";\n\t\t$qiwi_sum=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t$sql=\"select * from local_balancing where id_ad='609849' and status='0' order by created asc\";\n\t\t$qiwis=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$qiwi_actual=0;\n\t\tforeach ($qiwis as $qiwi){\n\t\t\t$procent=$qiwi['remainder'] / $qiwi_sum['amount_btc'];\n\t\t\t$sum=$procent*$qiwi['course_fact'];\n\t\t\t$qiwi_actual+=$sum;\n\t\t}\n\t\t$qiwi_actual=round($qiwi_actual*1.01);\n\t\t\\DB::connection('obmenneg')->table('local_ads')->where('id_ad', '617372')->update(['actual_price'=>$qiwi_actual]);\n\t\t\n\t\t$sql=\"select sum(remainder) as amount_btc from local_balancing_v2 where id_ad='617372' and status in ('0', '3') group by id_ad\";\n\t\t$qiwi_sum=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t$sql=\"select * from local_balancing_v2 where id_ad='617372' and status in ('0','3') order by created asc\";\n\t\t$qiwis=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$qiwi_actual=0;\n\t\tforeach ($qiwis as $qiwi){\n\t\t\t$procent=$qiwi['remainder'] / $qiwi_sum['amount_btc'];\n\t\t\t$sum=$procent*$qiwi['course_fact'];\n\t\t\t$qiwi_actual+=$sum;\n\t\t}\n\t\t$qiwi_actual=round($qiwi_actual*0.98);\n\t\t\\DB::connection('obmenneg')->table('local_ads')->where('id_ad', '609849')->update(['actual_price'=>$qiwi_actual]);\n\t\t\n\t\t$sql=\"select sum(remainder) as amount_btc from local_balancing where id_ad='609928' and status='0' group by id_ad\";\n\t\t$yandex_sum=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t$sql=\"select * from local_balancing where id_ad='609928' and status='0' order by created asc\";\n\t\t$yandexs=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$yandex_actual=0;\n\t\tforeach ($yandexs as $yandex){\n\t\t\t$procent=$yandex['remainder'] / $yandex_sum['amount_btc'];\n\t\t\t$sum=$procent*$yandex['course_fact'];\n\t\t\t$yandex_actual+=$sum;\n\t\t}\n\t\t$yandex_actual=round($yandex_actual*1.01);\n\t\t\\DB::connection('obmenneg')->table('local_ads')->where('id_ad', '609305')->update(['actual_price'=>$yandex_actual]);\n\t\t\n\t\t$sql=\"select sum(remainder) as amount_btc from local_balancing where id_ad='609305' and status='0' group by id_ad\";\n\t\t$yandex_sum=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetch(\\PDO::FETCH_ASSOC);\n\t\t$sql=\"select * from local_balancing where id_ad='609305' and status='0' order by created asc\";\n\t\t$yandexs=$pdo->query($sql, \\PDO::FETCH_ASSOC)->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t$yandex_actual=0;\n\t\tforeach ($yandexs as $yandex){\n\t\t\t$procent=$yandex['remainder'] / $yandex_sum['amount_btc'];\n\t\t\t$sum=$procent*$yandex['course_fact'];\n\t\t\t$yandex_actual+=$sum;\n\t\t}\n\t\t$yandex_actual=round($yandex_actual*0.985);\n\t\t\\DB::connection('obmenneg')->table('local_ads')->where('id_ad', '609928')->update(['actual_price'=>$yandex_actual]);\n\t}", "function end();", "public function processInventory()\n\t{\n\t\tif (($handle = fopen($this->outboundDir.$this->archivedFile, \"r\")) !== FALSE) {\n while (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) {\n if($i!=0)\n\t\t{\n\t\t\t$stock = (int) $data[1];\n $sku = $data[0];\n\t\t\t$this->blinkeInventory[$sku]['blinke'] = $stock;\n\t\n\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t\tfclose($handle);\n\t\t}\n\t\tMage::log(\"Total sku count from blinke- \" .count($this->blinkeInventory),null,$this->logfile);\n\t\n\t\tforeach($this->blinkeInventory as $sku=>$array)\n\t\t{\n\t\t\t$fstock = $array['blinke'];\n // calclulate stock by substracting stock for on hold orders\n if(array_key_exists($sku, $this->onHoldOrders))\n {\n Mage::log(\"On hold stock for $sku is. \".$this->onHoldOrders[$sku],null,$this->logfile);\n\t\t\t\t$this->blinkeInventory[$sku]['onHold'] = $this->onHoldOrders[$sku];\n Mage::log(\"Blinke stock for $sku is. \".$fstock,null,$this->logfile);\n $fstock = (int) ($fstock - $this->onHoldOrders[$sku]);\n\t\t\t\t$this->blinkeInventory[$sku]['finalMagento'] = $fstock;\n Mage::log(\"EDIT :: Final stock for $sku is $fstock\",null,$this->logfile); \n }\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->blinkeInventory[$sku]['finalMagento'] = $fstock;\n\t\t\t}\n\t\t\t\n\n\t\t\t//process inventory for the sku\n\t\t\t$product = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);\n\t\t\tif($product)\n\t\t {\n\t\t\t\ttry { $productId = $product->getIdBySku($sku); }\n\t\t catch(Exception $e)\n \t\t{\n \t\t\t Mage::log(\"Special SKU: $sku not found in magento\",null,$this->logfile);\n \t\t continue;\n\t\t }\n\n\t\t\t\t$stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);\n\t\t $stockItemId = $stockItem->getId();\n \t\tif (!$stockItemId) {\n\t Mage::log(\"STOCK ID for SKU: $sku doesnot exist\",null,$this->logfile);\n \t continue;\n \t\t} else {\n \t$stock = $stockItem->getData();\n \t\t}\n\t\t\t\t\n\t\t\t\t$originalStock = $stock['qty'];\n\t\t\t\t$this->blinkeInventory[$sku]['currentMagento'] = $originalStock;\n\t\t\t\tif($originalStock != $fstock)\n {\n \t\tif($fstock > 0)\n\t\t {\n \t\t $stock['qty'] = $fstock;\n\t\t $stock['is_in_stock'] = '1';\n\t\t $stock['manage_stock'] = '1';\n\t \t\t}\n\t\t\t\telse\n\t\t {\n \t\t $stock['qty'] = 0;\n \t\t}\n\t\t\t\t foreach($stock as $field => $value) {\n\t $stockItem->setData($field, $value?$value:0);\n \t\t }\n \t\ttry{\n \t\t$stockItem->save();\n\t\t }\n\t\t catch(Exception $e)\n \t\t{\n\t\t\t\t\tMage::log(\"cannot save inventory for $sku\",null,$this->logfile);\n\t\t continue;\n \t\t}\n\t\t Mage::log(\"Inventory updated for: $sku with value: $fstock from $originalStock\",null,$this->logfile);\n \t\tunset($stockItem);\n\t\t unset($product);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tMage::log(\"Inventory not updated for: $sku with value: $fstock from $originalStock\",null,$this->logfile);\n\t\t\t\t}\n\n\t\n\t\t\t}\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t Mage::log(\"Special SKU: $sku not found in magento\",null,$this->logfile);\n\t\t\t}\n\t\t}\n\t}", "public function deleteOperation(){\n if($this->type == \"IN\"){\n $this->inventory->setQuantity($this->inventory->getQuantity() - $this->getQuantity());\n }else{\n $this->inventory->setQuantity($this->inventory->getQuantity() + $this->getQuantity());\n }\n }", "public function perBill()\n\t{\n\t\t$this->restart( 'shop/finish' );\n\t}", "public function run()\n {\n DB::table('bedrooms')->insert([\n ['nro'=>201, 'nro_beds' => 1,'size_beds'=>'2 plaza','floor'=>2,'is_bath' => 1,'price' => 30],\n ['nro'=>202, 'nro_beds' => 2,'size_beds'=> '1 1/2 plaza','floor'=>2,'is_bath' => 1,'price' => 35],\n ['nro'=>203, 'nro_beds' => 1,'size_beds'=> '2 plaza','floor'=>2,'is_bath' => 1,'price' => 30],\n ['nro'=>204, 'nro_beds' => 1,'size_beds'=> '1 plaza','floor'=>2,'is_bath' => 0,'price' => 15],\n ]);\n }", "function SchedullerPO(){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Cek --> Update PO List, Update Quantity PO Open\n\t\t// echo \"hahah\";\t\t\n\t\trequire_once APPPATH.'third_party/sapclasses/sap.php';\n\t\t$sap = new SAPConnection();\n\t\t$sap->Connect(APPPATH.\"third_party/sapclasses/logon_dataDev.conf\");\n\t\tif ($sap->GetStatus() == SAPRFC_OK ) $sap->Open ();\n\t\tif ($sap->GetStatus() != SAPRFC_OK ) {\n\t\t\techo $sap->PrintStatus();\n\t\t\texit;\n\t\t}\n\n\t\t$fce = &$sap->NewFunction (\"Z_ZCMM_VMI_PO_DETAILC\");\n\t\t\n\t\tif ($fce == false) {\n\t\t\t$sap->PrintStatus();\n\t\t\texit;\n\t\t}\n\t\t\n\t\t$start \t= date(\"20170101\");\t\t\t\t\t// Date start VMI apps\n\t\t$end \t= date(\"Ymd\");\t\t\t\t\t\t// Date Now\n\t\t$opco\t\t\t\t\t= '7000';\n\t\t$fce->COMPANY \t\t\t= \"$opco\";\t\t// BUKRS\n\t\t// $fce->PO_TYPE \t\t= 'ZK17';\n\t\t// $fce->VENDOR \t\t= ;\n\t\t$fce->DATE['SIGN'] \t= 'I';\n\t\t$fce->DATE['OPTION']\t= 'BT';\n\t\t$fce->DATE['LOW'] \t= $start;\n\t\t$fce->DATE['HIGH'] \t= $end;\n\t\t\n\t\t$fce->PO_TYPE->row['SIGN'] \t= 'I';\n\t\t$fce->PO_TYPE->row['OPTION'] \t= 'EQ';\n\t\t$fce->PO_TYPE->row['LOW'] \t= 'ZK10';\n\t\t$fce->PO_TYPE->row['HIGH'] \t= '';\n\t\t$fce->PO_TYPE->Append($fce->PO_TYPE->row);\n\t\t\n\t\t$fce->PO_TYPE->row['SIGN'] \t= 'I';\n\t\t$fce->PO_TYPE->row['OPTION'] \t= 'EQ';\n\t\t$fce->PO_TYPE->row['LOW'] \t= 'ZK17';\n\t\t$fce->PO_TYPE->row['HIGH'] \t= '';\n\t\t$fce->PO_TYPE->Append($fce->PO_TYPE->row);\n\t\t\t\n $fce->call();\n\n if ($fce->GetStatus() == SAPRFC_OK) {\n $fce->T_ITEM->Reset();\n $data=array();\n $empty=0;\n $tampildata=array();\n while ($fce->T_ITEM->Next()) {\n\t\t\t\t$matnr \t\t= $fce->T_ITEM->row[\"MATNR\"];\t// Kode Material\n\t\t\t\t$lifnr \t\t= $fce->T_ITEM->row[\"LIFNR\"];\t// Kode Vendor\n\t\t\t\t$ebeln \t\t= $fce->T_ITEM->row[\"EBELN\"];\t// No PO\n\t\t\t\t$menge \t\t= intval($fce->T_ITEM->row[\"MENGE\"]);\t// Quantity PO\n\t\t\t\t$sisaqty\t= intval($fce->T_ITEM->row[\"DELIV_QTY\"]);\t// Quantity PO Open\n\t\t\t\t$werks \t\t= $fce->T_ITEM->row[\"WERKS\"];\t// Plant\n\t\t\t\t$vendor\t\t= $fce->T_ITEM->row[\"VENDNAME\"];\t// Nama Vendor\n\t\t\t\t$material \t= $fce->T_ITEM->row[\"MAKTX\"];\t// Nama Material\n\t\t\t\t$potype \t= $fce->T_ITEM->row[\"BSART\"];\t// Type PO\n\t\t\t\t// $mins \t\t= $fce->T_ITEM->row[\"EISBE\"];\t// Safety Stock\n\t\t\t\t$mins \t\t= $fce->T_ITEM->row[\"MINBE\"];\t// Re Order Point\n\t\t\t\t$maxs \t\t= $fce->T_ITEM->row[\"MABST\"];\t// Max\n\t\t\t\t$statuspo\t= $fce->T_ITEM->row[\"ELIKZ\"];\t// Max\n\t\t\t\t$start \t\t= date_format(date_create($fce->T_ITEM->row[\"BEDAT\"]),'d M Y');\n\t\t\t\t$end \t\t= date_format(date_create($fce->T_ITEM->row[\"EINDT\"]),'d M Y');\n\t\t\t\t\n\t\t\t\tif($statuspo == 'X' || $statuspo == 'x')\n\t\t\t\t{\n\t\t\t\t\t$sts = 0;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$sts = 1;\n\t\t\t\t}\n\t\t\t\t$sqlread= \"SELECT count(id_list) ADA\n\t\t\t\t\t\t\tFROM VMI_MASTER \n\t\t\t\t\t\t\twhere NO_PO = '$ebeln' and\n\t\t\t\t\t\t\tKODE_MATERIAL = '$matnr' and \n\t\t\t\t\t\t\tKODE_VENDOR = '$lifnr' and\n\t\t\t\t\t\t\tPLANT = '$werks' \n\t\t\t\t\t\t\t\";\n\t\t\t\t\t\t\t//and QUANTITY = '$menge'\n\t\t\t\t$jum \t= $this->db->query($sqlread)->row();\n\t\t\t\t$nilai \t= $jum->ADA;\n\t\t\t\t// echo $nilai.\"->\".$matnr.\" | \".$lifnr.\" | \".$ebeln.\" | \".$menge.\" | \".$werks.\" | \".$vendor.\" | \".$material.\" | \".$start.\" | \".$end.\" ==> \".$potype.\"<br/>\";\n\t\t\t\t// $ebeln == \"6310000038\" || $ebeln == \"6310000039\" || $ebeln == \"6310000040\" || $ebeln == \"6310000041\" || $ebeln == \"6310000042\" || $ebeln == \"6310000043\")\n\t\t\t\t\n\t\t\t\tif($nilai < 1){\n\t\t\t\t\tif($ebeln == \"6310000038\" || $ebeln == \"6310000039\" || $ebeln == \"6310000040\" || $ebeln == \"6310000041\" || $ebeln == \"6310000042\" || $ebeln == \"6310000043\"\n\t\t\t\t\t\t|| $lifnr == \"0000113004\" || $lifnr == \"0000110091\" || $lifnr == \"0000110253\" || $lifnr == \"0000110015\" || $lifnr == \"0000112369\" || $lifnr == \"0000110016\"){\t\t\t\t\t\t\n\t\t\t\t\t\t$sqlcount \t= \"SELECT max(ID_LIST) MAXX FROM VMI_MASTER\";\n\t\t\t\t\t\t$maxid \t\t= $this->db->query($sqlcount)->row();\t\t\n\t\t\t\t\t\t$max_list \t= $maxid->MAXX+1;\n\t\t\t\t\t\t$insert\t\t= \"insert into VMI_MASTER(ID_LIST,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tPLANT,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tKODE_MATERIAL,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNAMA_MATERIAL,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUNIT,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tKODE_VENDOR,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNAMA_VENDOR,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNO_PO,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tPO_ITEM,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCONTRACT_ACTIVE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCONTRACT_END,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDOC_DATE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSLOC,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMIN_STOCK,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMAX_STOCK,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSTOCK_AWAL,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSTOCK_VMI,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tQUANTITY,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tID_COMPANY,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSTATUS)\n\t\t\t\t\t\t\t\t\t\t\t\tvalues('$max_list',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$werks',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$matnr',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$material',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".$fce->T_ITEM->row[\"MEINS\"].\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$lifnr',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$vendor',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$ebeln',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".$fce->T_ITEM->row[\"EBELP\"].\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTO_DATE('\".date_format(date_create($start),'Y-m-d').\"','YYYY-MM-DD'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTO_DATE('\".date_format(date_create($end),'Y-m-d').\"','YYYY-MM-DD'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTO_DATE('\".date_format(date_create($start),'Y-m-d').\"','YYYY-MM-DD'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".$fce->T_ITEM->row[\"LGORT\"].\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".$fce->T_ITEM->row[\"EISBE\"].\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".$fce->T_ITEM->row[\"MABST\"].\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'0',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'0',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$sisaqty',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$opco',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$sts'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\";\n\t\t\t\t\t\t$save \t= $this->db->query($insert);\n\t\t\t\t\t\techo \"Baru ==> $ebeln | $material | $vendor | $opco | $werks | $potype<br/>\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"Skip ==> $ebeln | $material | $vendor | $opco | $werks | $potype<br/>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($nilai >= 1){\n\t\t\t\t\t$sqlread1 = \"SELECT ID_LIST\n\t\t\t\t\t\t\tFROM VMI_MASTER \n\t\t\t\t\t\t\twhere NO_PO = '$ebeln' and\n\t\t\t\t\t\t\tKODE_MATERIAL = '$matnr' and \n\t\t\t\t\t\t\tKODE_VENDOR = '$lifnr' and\n\t\t\t\t\t\t\tPLANT = '$werks' \n\t\t\t\t\t\t\t\";\n\t\t\t\t\t\t\t//and QUANTITY = '$menge'\n\t\t\t\t\t$getlist= $this->db->query($sqlread1)->row();\n\t\t\t\t\t$idlist = $getlist->ID_LIST;\n\t\t\t\t\t$update\t\t= \"update VMI_MASTER set quantity = '$sisaqty',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmin_stock = '$mins',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmax_stock = '$maxs',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSTATUS = '$sts'\n\t\t\t\t\t\t\t\t\t\t\t\t\twhere ID_LIST = '$idlist'\n\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t$update_data\t= $this->db->query($update);\n\t\t\t\t\t\techo \"$update <br/>\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\techo \"Skip ==> $ebeln | $material | $vendor | $opco| $werks | $potype<br/>\";\n\t\t\t\t}\n\t\t\t\t// echo \"<hr/>\"; \n\t\t\t}\n\t\t// echo \"<pre>\";\n\t\t// print_r($fce);\n\t\t// echo \"hahaha\";\n $fce->Close();\n\t\t}\n }", "public function reservation()\n\t{\n\n\t}", "public function run()\n {\n $types_id = $this->getTypeId('room');\n $publish = ['0', '1'];\n for ($i = 0; $i < 5 ; $i++) { \n $faker = Faker::create();\n $guestarrive = new Guestarrive;\n $guestarrive->notice = 'Same Day';\n $guestarrive->checkin_from = 'Flexible';\n $guestarrive->checkin_to = '6PM';\n $guestarrive->save();\n\n $price = new Houseprice;\n $price->type_price = '2';\n $price->price = rand(800, 2000);\n $price->food_price = rand(100, 300);\n $price->welcome_offer = rand(0, 1);\n $price->weekly_discount = rand(0, 5);\n $price->monthly_discount = rand(0, 10);\n $price->save();\n\n $food = new Food;\n $food->breakfast = rand(0, 1);\n $food->lunch = rand(0, 1);\n $food->dinner = rand(0, 1);\n $food->save();\n\n $house = new House;\n if ($i == 1) {\n $house->publish = '1';\n }\n else {\n $house->publish = $publish[rand(0, count($publish)-1)];\n }\n $house->house_title = $faker->text(16);\n $house->house_capacity = rand(1, 2);\n $house->house_property = 'home';\n $house->no_rooms = 1;\n $house->house_guestspace = 'Entrie';\n $house->house_bedrooms = rand(1, 4);\n $house->house_beds = rand(1, 2);\n $house->house_bathroom = rand(1, 2);\n $house->house_bathroomprivate = rand(0, 1);\n $house->house_address = 81;\n $house->house_postcode = 82150;\n $faker = Faker::create();\n $house->house_description = '<p>'.$faker->text(256).'</p>';\n $faker = Faker::create();\n $house->about_your_place = '<p>'.$faker->text(128).'</p>';\n $faker = Faker::create();\n $house->guest_can_access = '<p>'.$faker->text(128).'</p>';\n $faker = Faker::create();\n $house->optional_note = '<p>'.$faker->text(64).'</p>';\n $faker = Faker::create();\n $house->about_neighborhood = '<p>'.$faker->text(128).'</p>';\n $house->cover_image = '1551026527712.jpg';\n $house->user_id = rand(1, 3);\n $house->housetype_id = $types_id[rand(0, count($types_id)-1)];\n $house->sub_district_id = 3348;\n $house->district_id = 434;\n $house->province_id = 33;\n $house->guestarrives_id = $guestarrive->id;\n $house->houseprices_id = $price->id;\n $house->foods_id = $food->id;\n $house->save();\n\n $amenities_id = array();\n $amenities = Houseamenity::all()->random(3);\n foreach ($amenities as $key => $amenity) {\n array_push($amenities_id, $amenity->id);\n }\n $spaces_id = array();\n $spaces = Housespace::all()->random(3);\n foreach ($spaces as $key => $space) {\n array_push($spaces_id, $space->id);\n }\n $rules_id = array();\n $rules = Houserule::all()->random(3);\n foreach ($rules as $key => $rule) {\n array_push($rules_id, $rule->id);\n }\n $details_id = array();\n $details = Housedetail::all()->random(3);\n foreach ($details as $key => $detail) {\n array_push($details_id, $detail->id);\n }\n $house->houseamenities()->sync($amenities_id, false);\n $house->housespaces()->sync($spaces_id, false);\n $house->houserules()->sync($rules_id, false);\n $house->housedetails()->sync($details_id, false);\n\n $map = new Map;\n $map->map_lat = '7.898107099308214500';\n $map->map_lng = '98.348451820068360000';\n $map->houses_id = $house->id;\n $map->save();\n\n $image = new HouseImage;\n $image->name = '1551026527712.jpg';\n $image->house_id = $house->id;\n $image->save();\n $image = new HouseImage;\n $image->name = '1551026528452.jpg';\n $image->house_id = $house->id;\n $image->save();\n $image = new HouseImage;\n $image->name = '1551026528552.jpg';\n $image->house_id = $house->id;\n $image->save();\n $image = new HouseImage;\n $image->name = '1551026528672.jpg';\n $image->house_id = $house->id;\n $image->save();\n\n $premessage = \"Dear \" . $house->user->user_fname;\n $detailmessage = \"At \" . date('jS F, Y H:i:s', strtotime($house->created_at)) . \" you have create a room name '\". $house->house_title.\"'\";\n $endmessage = \"\";\n\n $data = array(\n 'email' => $house->user->email,\n 'subject' => \"LTT - Your property are ready to deploy\",\n 'bodyMessage' => $premessage,\n 'detailmessage' => $detailmessage,\n 'endmessage' => $endmessage,\n 'house' => $house\n );\n\n Mail::send('emails.room_create', $data, function($message) use ($data){\n $message->from('[email protected]');\n $message->to($data['email']);\n $message->subject($data['subject']);\n });\n }\n }", "public function index(){\n $this->smarty->display('admin/waterbar/inventory.tpl');\n }", "static function start_HUT_BI(){\n if (!is_object(self::$hut_bi)){\n b_debug::_debug(starting);\n foreach(array(\n\t\t // \"the build-in hut\" \n\t\t self::$hut_bi =>array('class' =>'bForm_vm_Hut'),\n\t\t \n\t\t // \"own accommodation\" \n\t\t self::$OA =>array('class' =>'bForm_vm_Room',\n\t\t\t\t\t 'a_name'=> LODGING_OA_TXT),\n\t\t // gap in the visit\n\t\t self::$BR =>array('class' =>'bForm_vm_Room',\n\t\t\t\t\t 'a_name'=> LODGING_BR_TXT),\n\t\t ) as $instance=>$args){\n\t\n\t$class_name = $args['class'];\n\tlocateAndInclude($class_name,'fatal');\n\t\n\tif ($class_name == 'bForm_vm_Hut'){\n\t // Instantiate \"build-in hut\" \n\t $args['keys'] = array('hut_code'=>HUT_BI);\n\t $args['fields']= array_merge($args['keys'],\n\t\t\t\t array('hut_name'=>HUT_BI));\n\t}else{\n\t // Hook the \"build-in rooms\" to the \"build-in hut\"\n\t $args['keys'] = array('a_hutid' => self::$hut_bi->ID,\n\t\t\t\t 'a_name' => $args['a_name']);\n\t $args['fields']= array_merge($args['keys'],\n\t\t\t\t array('a_price' => '9999=0',\n\t\t\t\t\t 'a_area' => 1,\n\t\t\t\t\t 'a_capacity' => 999,\n\t\t\t\t\t ));\n\t}\n\t\n\t// Instantiate the build-in class\n\tself::$$instance = new $class_name(b_fmt::joinX(' AND ',$args['keys'],\"'\"));\n\tself::$$instance->updateDB($args['fields']);\n\t\n\tself::$$instance->dbg(self::$$instance->getValue($class_name == 'bForm_vm_Hut' ? 'hut_name' : 'a_name'),cnf_dev);\n\tif (False) if (cnf_dev){\n\t self::$$instance->show_gv = True;\n\t foreach($args['fields'] as $k=>$v) self::$$instance->getValue($k);\n\t self::$$instance->show_gv = False;\n\t }\n }\n b_debug::_debug(exiting);\n }\n }", "public function updateProductInventory($command)\n {\n $command->info('Updating inventory...');\n $items = $this->sqlRepository->use(Item::class)->findAll();\n\n /** @var Item $item */\n foreach($items as $item)\n {\n $command->line('Evaluating Item ID: ' . $item->id);\n $rel_stock_locations = $item->rel_stock_location_items()->where('is_inactive', false)->get();\n\n /** @var RelStockLocationItem $rel_stock_location */\n foreach($rel_stock_locations as $rel_stock_location)\n {\n $quantity_reserved = 0;\n $total_quantity = ($rel_stock_location->quantity_available ?? 0);\n $total_quantity += ($rel_stock_location->quantity_reserved ?? 0);\n\n // Open all order lines on this line item\n $line_items = TransactionLineItem::whereRaw('item_id = ? AND transaction_line_itemable_type =? AND status != ?',\n [$item->id, 'SalesOrder', 'out_of_stock'])\n ->get();\n\n // Filter out line items that are not shipping from this location\n $line_items = $line_items->filter(function(TransactionLineItem $tli) use($rel_stock_location) {\n return($tli->ship_from_location_id == $rel_stock_location->stock_location_id);\n })\n ->filter(function(TransactionLineItem $tli) {\n // Filter out lines that are on canceled or shipped orders\n $parent_sales_order = SalesOrder::where('transaction_id', $tli->transaction_id)->first();\n return(in_array($parent_sales_order->status, ['pending', 'processing']));\n });\n\n /** @var TransactionLineItem $line_item */\n foreach($line_items as $line_item)\n {\n $quantity_reserved += $line_item->quantity;\n }\n\n $quantity_available = $total_quantity - $quantity_reserved;\n\n if($quantity_available < 0)\n $quantity_available = 0;\n\n if($quantity_reserved < 0)\n $quantity_reserved = 0;\n\n $rel_stock_location->quantity_reserved = $quantity_reserved;\n $rel_stock_location->quantity_available = $quantity_available;\n $rel_stock_location->save();\n\n $command->comment('Stock Location: ' . $rel_stock_location->stock_location->name . ' | Reserved: ' . $quantity_reserved . ' | Avail: ' . $quantity_available);\n }\n }\n\n $command->info('Complete!');\n }", "public function update_product_inventory()\n\t{\n\t\t/* Prepare statement */\n\t\tif (!$stmt_product_info = $this->mysqli->prepare('SELECT \n\t\tproduct.out_of_stock,\n\t\tproduct.out_of_stock_enabled,\n\t\tIF(product_variant.id IS NOT NULL,product_variant.qty,product.qty) AS qty\n\t\tFROM\n\t\tproduct \n\t\tLEFT JOIN\n\t\tproduct_variant\n\t\tON\n\t\t(product.id = product_variant.id_product AND product_variant.id = ?)\n\t\tWHERE\n\t\tproduct.id = ?\t\t\n\t\tAND\n\t\tproduct.track_inventory=1\n\t\tLIMIT 1')) throw new Exception('An error occured while trying to prepare get product track inventory info statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\n\t\t/* Prepare statement */\n\t\tif (!$stmt_upd_product_variant = $this->mysqli->prepare('UPDATE \n\t\tproduct_variant \n\t\tSET\n\t\tqty = ?,\n\t\tactive = ?\n\t\tWHERE\n\t\tid = ?')) throw new Exception('An error occured while trying to prepare update product variant qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\t\t\n\t\t/* Prepare statement */\n\t\tif (!$stmt_upd_product = $this->mysqli->prepare('UPDATE \n\t\tproduct\n\t\tSET\n\t\tqty = ?,\n\t\tactive = ?\n\t\tWHERE\n\t\tid = ?')) throw new Exception('An error occured while trying to prepare update product qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\n\t\t\n\t\t/* Prepare statement */\n\t\tif (!$stmt_option_info = $this->mysqli->prepare('SELECT \n\t\tout_of_stock\n\t\tFROM\n\t\toptions\n\t\tWHERE\n\t\tid = ?\n\t\tAND\n\t\ttrack_inventory=1\n\t\tLIMIT 1')) throw new Exception('An error occured while trying to prepare get options track inventory info.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\n\t\t\n\t\t/* Prepare statement */\n\t\tif (!$stmt_upd_option = $this->mysqli->prepare('UPDATE \n\t\toptions\n\t\tSET\n\t\tqty = IF(qty <= ?,0,qty - ?)\n\t\tWHERE\n\t\tid = ?')) throw new Exception('An error occured while trying to prepare update options qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\t\t\n\t\t$products = $this->get_products();\t\t\t\t\n foreach ($products as $row_product) {\n // Update Sub_product ELSE Update Product\n\t\t\tif (sizeof($row_product['sub_products'])) {\n foreach ($row_product['sub_products'] as $row_sub_product) {\n\t\t\t\t\t// sub product qty multipled by parent product qty\n\t\t\t\t\t$qty = $row_product['qty']*$row_sub_product['qty'];\n\t\t\t\t\t\n\t\t\t\t\tif (!$stmt_product_info->bind_param(\"ii\",$row_sub_product['id_product_variant'], $row_sub_product['id_product'])) throw new Exception('An error occured while trying to bind params to get product info statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\n\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t$stmt_product_info->execute();\n\t\t\t\t\t\n\t\t\t\t\t/* store result */\n\t\t\t\t\t$stmt_product_info->store_result();\t\t\n\t\t\t\t\t\n\t\t\t\t\tif ($stmt_product_info->num_rows) {\t\t\t\t\n\t\t\t\t\t\t/* bind result variables */\n\t\t\t\t\t\t$stmt_product_info->bind_result($out_of_stock,$out_of_stock_enabled,$qty_remaining);\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$stmt_product_info->fetch();\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$qty_in_stock = $qty_remaining-$qty;\n\t\t\t\t\t\tif ($qty_in_stock < 0) $qty_in_stock = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$active = $out_of_stock_enabled && $qty_in_stock == $out_of_stock ? 0:1;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($row_sub_product['id_product_variant']){\n\t\t\t\t\t\t\tif (!$stmt_upd_product_variant->bind_param(\"iii\", $qty_in_stock, $active,$row_sub_product['id_product_variant'])) throw new Exception('An error occured while trying to bind params to update product variant qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\t\tif (!$stmt_upd_product_variant->execute()) throw new Exception('An error occured while trying to update product variant qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif (!$stmt_upd_product->bind_param(\"iii\", $qty_in_stock, $active,$row_sub_product['id_product'])) throw new Exception('An error occured while trying to bind params to update product qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\t\tif (!$stmt_upd_product->execute()) throw new Exception('An error occured while trying to update product qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n }\n }else{\n\t\t\t\t// product qty\n\t\t\t\t$qty = $row_product['qty'];\n\t\t\t\t\n\t\t\t\tif (!$stmt_product_info->bind_param(\"ii\", $row_product['id_product_variant'], $row_product['id_product'])) throw new Exception('An error occured while trying to bind params to get product info statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\n\t\t\t\t/* Execute the statement */\n\t\t\t\t$stmt_product_info->execute();\n\t\t\t\t\n\t\t\t\t/* store result */\n\t\t\t\t$stmt_product_info->store_result();\t\t\n\t\t\t\t\n\t\t\t\tif ($stmt_product_info->num_rows) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t/* bind result variables */\n\t\t\t\t\t$stmt_product_info->bind_result($out_of_stock,$out_of_stock_enabled, $qty_remaining);\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$stmt_product_info->fetch();\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$qty_in_stock = $qty_remaining-$qty;\n\t\t\t\t\tif ($qty_in_stock < 0) $qty_in_stock = 0;\n\t\t\t\t\t\n\t\t\t\t\t$active = $out_of_stock_enabled && $qty_in_stock == $out_of_stock ? 0:1;\n\t\t\t\t\t\n\t\t\t\t\tif($row_product['id_product_variant']){\n\t\t\t\t\t\tif (!$stmt_upd_product_variant->bind_param(\"iii\", $qty_in_stock, $active,$row_product['id_product_variant'])) throw new Exception('An error occured while trying to bind params to update product variant qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\tif (!$stmt_upd_product_variant->execute()) throw new Exception('An error occured while trying to update product variant qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif (!$stmt_upd_product->bind_param(\"iii\",$qty_in_stock, $active,$row_product['id_product'])) throw new Exception('An error occured while trying to bind params to update product qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\tif (!$stmt_upd_product->execute()) throw new Exception('An error occured while trying to update product qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n // Update Options\n\t\t\tif(sizeof($this->get_product_options($row_product['id']))){\n $options = $this->get_product_options($row_product['id']);\n foreach ($options as $row_product_option_group) { \n foreach ($row_product_option_group['options'] as $row_product_option) {\n\t\t\t\t\t\t// sub product qty multipled by parent product qty\n\t\t\t\t\t\t$qty = $row_product['qty']*$row_product_option['qty'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!$stmt_option_info->bind_param(\"i\", $row_product_option['id_options'])) throw new Exception('An error occured while trying to bind params to get option info statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\t\t\n\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\t$stmt_option_info->execute();\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* store result */\n\t\t\t\t\t\t$stmt_option_info->store_result();\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($stmt_option_info->num_rows) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* bind result variables */\n\t\t\t\t\t\t\t$stmt_option_info->bind_result($out_of_stock);\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$stmt_option_info->fetch();\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!$stmt_upd_option->bind_param(\"iii\", $qty, $qty,$row_product_option['id_options'])) throw new Exception('An error occured while trying to bind params to update option qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\t\tif (!$stmt_upd_option->execute()) throw new Exception('An error occured while trying to update option qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n }\n }\n \t}\n\t\t\n\t\t$stmt_product_info->close();\n\t\t$stmt_upd_product_variant->close();\n\t\t$stmt_upd_product->close();\n\t\t$stmt_option_info->close();\n\t\t$stmt_upd_option->close();\n\t\t\t\t\t\t\t\t\t\t\t\n\t}", "function iend($ar=NULL) {\n $prefix = $this->_module->tabprefix;\n if (empty($prefix))\n $prefix = NULL;\n\n // creation des structures . si elles existent, on touche pas\n EPL_createAllStructures($prefix);\n \n // creation des modules de base (EF) sur les structures\n EPL_createAllEFModules($prefix);\n\n // creation des modules applicatifs principaux\n // manqueraient à ce jour :\n // annulation de commandes\n // saisie via le smartreader\n\n // espace client\n XModule::$_mcache=NULL;\n $mod = new XModuleWd(array('newmoid'=>XMODEXTERN_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Customer Area';\n $mod->_module->comment['FR'] = 'EPL - Customer Area';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - FO';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n $mod->_module->theclass = 'XModEPLCustomerArea';\n $foo = $this->_module->customermoid = $mod->iend();\n\n // catalogue\n XModule::$_mcache=NULL;\n $mod = new XModuleWd(array('newmoid'=>XMODEXTERN_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Catalog';\n $mod->_module->comment['FR'] = 'EPL - Catalog';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - FO';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n $mod->_module->theclass = 'XModEPLCatalog';\n $foo = $this->_module->catalogmoid = $mod->iend();\n \n // gestion de la fidélité : les transactions / wtp\n XModule::$_mcache=NULL;\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Transactions WTP fidélité';\n $mod->_module->table = 'WTSWTPTRANSACTION';\n $mod->_module->comment['FR'] = 'EPL - Loyalty Transactions';\n $mod->_module->group = 'EPL - Clients de la vente en ligne';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n $mod->_module->theclass = 'XModEPLLoyalty';\n $foo = $this->_module->loyaltymoid = $mod->iend();\n\n // gestion de la fidélité : les transactions / comptes fidélité\n XModule::$_mcache=NULL;\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Transactions des comptes fidélité';\n $mod->_module->table = 'WTSLLTTRANSACTION';\n $mod->_module->comment['FR'] = 'EPL - Loyalty Account Transactions';\n $mod->_module->group = 'EPL - Clients de la vente en ligne';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n $mod->_module->theclass = 'XModEPLLLTTransactions';\n $foo = $this->_module->loyaltytransmoid = $mod->iend();\n\n \n // fiches clients\n XModule::$_mcache=NULL;\n $mod = new XModuleWd(array('newmoid'=>XMODEXTERN_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Clients de la vente';\n $mod->_module->comment['FR'] = 'EPL - Clients de la vente';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Clients de la vente en ligne';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n $mod->_module->ssmod1 = $this->_module->loyaltytransmoid;\n $foo = $this->_module->customersheetemoid = $mod->iend();\n\n\n // gestion de la fidélité : les cartes\n XModule::$_mcache=NULL;\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Gestion de la fidélité';\n $mod->_module->table = 'WTSWTPBONUS';\n $mod->_module->comment['FR'] = 'EPL - Gestion de la fidélité';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Clients de la vente en ligne';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n $mod->_module->ssmodtitle1='Transactions';\n $mod->_module->ssmodfield1='wtpcard';\n $mod->_module->ssmod1=$this->_module->loyaltymoid;\n $mod->_module->ssmodactivate_additem1=1;\n $cardsmoid = $mod->iend();\n\n // traitement des commandes dans les 4 déclinaisons\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Commandes à valider';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'EPL - Commandes à valider';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 1;\n $mod->_module->theclass = 'XModEPLTrtCmd';\n $mod->_module->filtermode = 'AV';\n $cardsmoid = $mod->iend();\n\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Commandes à Editer/Expédier';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'Commandes à Editer/Expédier';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 1;\n $mod->_module->theclass = 'XModEPLTrtCmd';\n $mod->_module->filtermode = 'AEE';\n $cardsmoid = $mod->iend();\n\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Commandes valides non transmises';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'Commandes valides non transmises';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 1;\n $mod->_module->theclass = 'XModEPLTrtCmd';\n $mod->_module->filtermode = 'VNT';\n $cardsmoid = $mod->iend();\n\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Devis non finalisés';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'Devis non finalisés';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 1;\n $mod->_module->theclass = 'XModEPLTrtCmd';\n $mod->_module->filtermode = 'DNF';\n $cardsmoid = $mod->iend();\n\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Toutes les commandes';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'Toutes les commandes';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 1;\n $mod->_module->theclass = 'XModEPLTrtCmd';\n $mod->_module->filtermode = '';\n $cardsmoid = $mod->iend();\n \n\n // modification des commandes\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Modification des commandes';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'EPL - modification des commandes';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->theclass = 'XModEplUpdCmd';\n $mod->_module->trackchanges = 1;\n $cardsmoid = $mod->iend();\n\n // déclinaison des modifications de commandes\n // 1 version consultation caissse (qui doit être configurée manuellement en RO et filtré)\n // 1 version Commandes annulées (qui doit être configurée manuellement sur les commandes annulées (ETATFABRICATION)\n // 1 version toutes les commandes \n\n // annulation des commandes XModEplAnnulCmd\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Annulation des commandes';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'EPassLibre annunation des commandes';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->theclass = 'XModEplAnnulCmd';\n $mod->_module->trackchanges = 1;\n $cardsmoid = $mod->iend();\n\n // interface\n XModule::$_mcache=NULL;\n if ($this->_module->skidataresort){\n $modclass='XModEPLResortSKD';\n $resort = 'SkiData';\n $mgroup = 'EPL - Ski Data';\n } else {\n $modclass='XModEPLResortTA';\n $resort = 'Team Axess';\n $mgroup = 'EPL - Team Axess';\n }\n $mod = new XModuleWd(array('newmoid'=>XMODEXTERN_TOID, 'step'=>1, array('_options'=>array('local'=>true))));\n $mod->_module->modulename = 'EPL - '.$resort;\n $mod->_module->comment['FR'] = 'EPL - '.$resort;\n $mod->_module->group = $mgroup;\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n\n $mod->_module->theclass = $modclass;\n $foo = $this->_module->resortmoid = $mod->iend();\n\n // recupération de certains modules\n $m = XModule::modulesUsingTable(XModEPassLibre::$tableOFFER,true,false,false,false);\n $k = array_keys($m);\n $this->_module->offresmoid = $k[0];\n\n $m = XModule::modulesUsingTable(XModEPassLibre::$tablePOOL,true,false,false,false);\n $k = array_keys($m);\n $this->_module->secteursmoid = $k[0];\n\n // fin\n $moid = parent::iend($ar);\n return $moid;\n }", "public function run()\n {\n \t\t$items = [\n [\n 'movement_type' => 'Purchase Order',\n 'label' => config('global.stock_status.stock_in'),\n ],\n [\n 'movement_type' => 'Customer Return',\n 'label' => config('global.stock_status.stock_in'),\n ], \n [\n 'movement_type' => 'Return to Supplier',\n 'label' => config('global.stock_status.stock_out'),\n ], \n [\n 'movement_type' => 'Sale Order',\n 'label' => config('global.stock_status.stock_out'),\n 'is_enable' => 0,\n ],\n ];\n \n foreach ($items as $item)\n DB::table('stock_movement_types')->insert($item);\n }", "function get_amout_room($date_from,$date_end)\n {\n\t\t$sql1 = '\n\t\t SELECT \n\t\t\t\t\t\trs.id,\n\t\t\t\t\t\trs.change_price,\n\t\t\t\t\t\trr.tax_rate, \n\t\t\t\t\t\tservice_rate,\n\t\t\t\t\t\trs.in_date,\n\t\t\t\t\t\trr.arrival_time,\n rr.net_price,\n\t\t\t\t\t\trr.departure_time,\n\t\t\t\t\t\trr.price,\n\t\t\t\t\t\trs.status,\n\t\t\t\t\t\trr.id as reservation_room_id\n\t\t\t\t\tFROM \n\t\t\t\t\t\troom_status rs \n\t\t\t\t\t\tINNER JOIN reservation_room rr ON rr.id = rs.reservation_room_id \n\t\t\t\t\t\tINNER JOIN reservation r on rr.reservation_id = r.id\n\t\t\t\t\tWHERE \n\t\t\t\t\t\t(rs.status =\\'OCCUPIED\\' OR rs.status =\\'BOOKED\\')\n\t\t\t\t\t\tAND rs.in_date >= \\''.$date_from.'\\' \n\t\t\t\t\t\tAND rs.in_date <= \\''.$date_end.'\\' ';\n\t\t$room_totals = DB::fetch_all($sql1);\n\t\t// tinh tien phong su dung trong ngay\n\t\t$amount_room_days =array();\n\t\tforeach($room_totals as $key=>$value)\n {\n\t\t\t// tinh tien phong va phi dich phong thue cho tung phong rui cong thanh tog tien trong ngay\n\t\t\t$amount_room_days['id'] = $value['in_date'];\n\t\t\t$service_room = 0;\n\t\t\t$pay_room = 0;\n\t\t\t$tax_room = 0;\n\t\t\t$deposit_room = 0;\n\t\t\t$net=0;\n\t\t\t//if(($value['arrival_time'] != $value['departure_time'] \n// and $value['in_date'] < $value['departure_time'] and \n// ($value['status'] == 'OCCUPIED' ||$value['status'] == 'BOOKED')) \n// || ($value['arrival_time'] == $value['in_date']))\n if (1 == 1)\n {\n\t\t\t\t$service_room = ($value['change_price'] * $value['service_rate'])/100;\n\t\t\t\t// tien phong + dv 1 phong\n\t\t\t\t$pay_room = $value['change_price'] + $service_room ;\t\n\t\t\t\t// tinh tien thue cua 1 phong \n\t\t\t\t$tax_room = ($pay_room * $value['tax_rate'])/100;\t\n\t\t\t\t$net = $pay_room + $tax_room;\n\t\t\t}\n\t\t\t$room_totals[$key]['room_total'] = $net;// - $deposit_room;\n\t\t if (User::is_admin() and $value['in_date'] == '31-DEC-13' and $net > 0)\n {\n //echo System::display_number($net).'__'.$value['reservation_room_id'].'<br>';\n }\n\t\t\tif(!isset($amount_room_days[$value['in_date']]['amount_total']))\n {\n $amount_room_days[$value['in_date']]['count'] = 1; \n if ($net == 0)\n {\n $amount_room_days[$value['in_date']]['count'] = 0;\n }\n\t\t\t\t $amount_room_days[$value['in_date']]['amount_total'] = $room_totals[$key]['room_total'];\n\t\t\t}\n else\n {\n $amount_room_days[$value['in_date']]['count'] += 1;\n if ($net == 0)\n {\n $amount_room_days[$value['in_date']]['count'] -= 1;\n }\n\t\t\t\t $amount_room_days[$value['in_date']]['amount_total'] += $room_totals[$key]['room_total'];\n\t\t\t}\n\t\t}\n if (User::is_admin())\n {\n //System::debug($amount_room_days);\n }\n\t\treturn $amount_room_days;\n\t}", "public function run()\n {\n DB::table('volumes')->insert(['volume'=>'25']);\n DB::table('volumes')->insert(['volume'=>'50']);\n DB::table('volumes')->insert(['volume'=>'70']);\n DB::table('volumes')->insert(['volume'=>'75']);\n DB::table('volumes')->insert(['volume'=>'100']);\n DB::table('volumes')->insert(['volume'=>'175']);\n }", "function update_end()\n {\n }", "function get_avaliable_rooms($fromTime, $toTime){\n global $DB, $USER, $CFG;\n\n //reservation starts: Start = S, End = E\n //Location: Above Given Start Time : A, Between given start/end: M, After End Time: E\n\n //Cases:\n //SA EA, --(start above, end above) non useful\n //SA EM, --(start above, end mid)\n //SA EE, -- (Start above, end after)\n //SM EA -- (start mid, end above) -- no useful\n //SM EM -- start mid, end mid\n //SM EE -- start mid, end after\n //SE EA -- non useful\n //SE EM -- non useful\n //SE EE -- non useful\n\n\n $sql = \"SELECT DISTINCT * FROM {roomscheduler_rooms} room \".\n\"WHERE room.active = 1 AND room.id not in ( \". //check which rooms are not avaliable\n\"SELECT DISTINCT rom.id FROM {roomscheduler_reservations} res, {roomscheduler_rooms} rom \".\n\"WHERE rom.id = res.location AND res.active=1 AND ( \".\n\"(res.startdate <= $fromTime AND res.enddate <= $toTime and res.enddate > $fromTime ) OR \". //--(start above, end mid)\n\"(res.startdate <= $fromTime AND res.enddate > $toTime ) OR \". //-- (Start above, end after)\n\"(res.startdate >= $fromTime AND res.startdate < $toTime and res.enddate > $fromTime AND res.enddate <= $toTime ) OR \". //-- start mid, end mid\n\"(res.startdate >= $fromTime AND res.startdate < $toTime AND res.enddate > $toTime )) \".//-- start mid, end after\n\");\";\n\n$rooms = $DB->get_records_sql($sql, array(), $limitfrom=0, $limitnum=0);\n\n\nprint '<center><table id=\"open_rooms_table\">';\nprint '<tr><th>'.get_string('room','block_roomscheduler');\nprint '</th><th>'.get_string('resources','block_roomscheduler');\nprint '</th><th>'.get_string('bookroom','block_roomscheduler').'</th></tr>';\nif($rooms){\n$index = 1;\nforeach($rooms as $room){\n\nprint '<tr onclick=\"\"><td>';\n\nprint \"$index. \".$room->name;\n\nprint '</td><td>';\nprint $room->resources;\nprint '</td><td>';\n\nprint '<form><center>';\nif($room->reservable){\nprint '<input type=\"image\" src=\"img/success.gif\" value=\"Book Room\" onclick=\"book_room('.$room->id.');return false;\" />';\n} else {\n$email = $CFG->roomscheduler_manage_email;\n$subject = get_string('book_room_email_subject','block_roomscheduler');\n\n$information = get_string('email_room','block_roomscheduler').\" \".$room->name . \"%0A\";\n$information .= get_string('email_start','block_roomscheduler').\" \".date( 'F n, Y @ G:i' , $fromTime ). \"%0A\";\n$information .= get_string('email_end','block_roomscheduler').\" \".date( 'F n, Y @ G:i' , $toTime ). \"%0A\";\n$information .= get_string('email_reason','block_roomscheduler').\" _______________________________%0A%0A\";\n\n$body = get_string('book_room_email_body','block_roomscheduler') . $information;\n$body .= get_string('book_room_email_close','block_roomscheduler') . $USER->firstname .\" \".$USER->lastname ;\n\n\nprint '<a href=\"mailto:'.$email.'?subject='.$subject.'&body='.$body.'\" border=\"0\">\n <img src=\"img/email.png\"></a>';\n\n}\nprint '</form></center>';\nprint '</td></tr>';\n\n\n\n\n $index++;\n}\n}\nprint '</table></center>';\n\n}", "function characterEquipment($character_id, $player_id, $journey_id, $store_id) {\n\t\n\t\taddToDebugLog(\"characterEquipment(), Function Entry - supplied parameters: Player ID: \" . $player_id . \"; Journey ID: \" . $journey_id . \"; Character ID: \" . $charcter_id . \"; Store ID: \" . $store_id . \", INFO\");\n\t\t\n\t\t// Get Character Name\n\t\t$character_name = getCharacterDetails($character_id, 'character_name');\n\t\n\t\techo \"<table cellpadding=3 cellspacing=0 border=1>\";\n\t\techo \"<tr><td colspan=5 align=center><h2>\" . $character_name . \"</h2></tr>\";\n\t\techo \"<tr bgcolor=#bbb><td>Item<td align=center>Weight<td align=center>Value<td align=center>Actions</tr>\";\n\t\n\t\t$sql = \"SELECT * FROM hackcess.character_equipment WHERE character_id = \" . $character_id . \" AND slot NOT LIKE 'potion%' AND slot NOT LIKE 'pet%' ORDER BY slot ASC, ac_boost, attack_boost DESC;\";\n\t\t$result = search($sql);\n\t\t$rows = count($result);\n\t\n\t\t// 0: ID\n\t\t// 1: Name\n\t\t// 2: AC Boost\n\t\t// 3: ATK Boost\n\t\t// 4: Weight\n\t\t// 5: Slot\n\t\n\t\t$weight_total = 0;\n\t\t$current_slot = \"\";\n\t\tfor ($e = 0; $e < $rows; $e++) {\n\t\n\t\t\tif ($result[$e][5] != $current_slot) {\n\t\t\t\techo \"<tr><td colspan=5 bgcolor=#ddd align=center>\" . ucfirst($result[$e][5]) . \"</tr>\";\n\t\t\t\t$current_slot = $result[$e][5];\n\t\t\t}\n\t\n\t\t\t$bonus = $result[$e][2] + $result[$e][3];\n\t\t\techo \"<tr><td>+\" . $bonus . \" \" . $result[$e][1]; // Bonus + Item\n\t\t\techo \"<td align=center>\" . $result[$e][4]; // Weight\n\t\t\t\n\t\t\t//Value\n\t\t\t$value = $bonus * 50;\n\t\t\techo \"<td align=center>\" . $value;\n\t\n\t\t\t// Determine if the item of equipment is equipped or not\n\t\t\t$is_equipped = isEquipped($result[$e][5], $result[$e][0], $character_id);\n\t\t\t$weight_total = $weight_total + $result[$e][4];\n\t\t\tif ($is_equipped == 1) {\n\t\t\t\techo \"<td align=center bgcolor=#6f3>Equipped\";\n\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\techo \"<td align=center>\";\n\t\t\t\techo \"<a href='store.php?slot=\" . $result[$e][5] . \"&item_id=\" . $result[$e][0] . \"&character_id=\" . $character_id . \"&player_id=\" . $player_id . \"&journey_id=\" . $journey_id . \"&store_id=\" . $store_id . \"&action=sell'>Sell</a>\"; // $slot, $item_id, $character_id\n\t\t\t\techo \" | <a href='store.php?slot=\" . $result[$e][5] . \"&item_id=\" . $result[$e][0] . \"&character_id=\" . $character_id . \"&player_id=\" . $player_id . \"&journey_id=\" . $journey_id . \"&store_id=\" . $store_id . \"&action=equip&slot=\" . $result[$e][5] . \"'>Equip</a>\";\n\t\t\t}\n\t\t\t\t\n\t\t\techo \"</tr>\";\n\t\t\t\t\n\t\t}\n\t\n\t\t// Display Character potions\n\t\t$sql = \"SELECT * FROM hackcess.character_equipment WHERE character_id = \" . $character_id . \" AND slot LIKE 'potion%' ORDER BY ac_boost, attack_boost DESC;\";\n\t\t$result = search($sql);\n\t\t$rows = count($result);\t\n\n\t\techo \"<tr><td colspan=5 bgcolor=#ddd align=center>Potions</tr>\";\n\t\t\n\t\tfor ($p = 0; $p < $rows; $p++) {\n\t\t\t\n\t\t\techo \"<tr><td>\" . $result[$p][1]; // Item\n\t\t\techo \"<td align=center>-\"; // Weight\n\t\t\t\t\n\t\t\t//Value\n\t\t\t$potion_name = explode(' ', $result[$p][1]);\n\t\t\t$value = $potion_name[3] * 100;\n\t\t\techo \"<td align=center>\" . $value;\n\t\t\t\n\t\t\t// Write actions Sell\n\t\t\techo \"<td align=center>\";\n\t\t\techo \"<a href='store.php?slot=\" . $result[$p][5] . \"&item_id=\" . $result[$p][0] . \"&character_id=\" . $character_id . \"&player_id=\" . $player_id . \"&journey_id=\" . $journey_id . \"&store_id=\" . $store_id . \"&action=sell'>Sell</a>\"; // $slot, $item_id, $character_id\n\t\t\techo \"</tr>\";\t\t\t\n\t\t\t\n\t\t}\n\n\t\t// Display Character pets\n\t\t$sql = \"SELECT * FROM hackcess.character_equipment WHERE character_id = \" . $character_id . \" AND slot LIKE 'pet%';\";\n\t\t$result = search($sql);\n\t\t$rows = count($result);\n\t\t\n\t\techo \"<tr><td colspan=5 bgcolor=#ddd align=center>Pets</tr>\";\n\t\t\n\t\tfor ($p = 0; $p < $rows; $p++) {\n\t\t\t\t\n\t\t\t$details = explode(',', $result[$p][1]);\n\t\t\t$type = substr($result[$p][5], 4);\n\t\t\t\n\t\t\techo \"<tr><td>\" . $details[0] . \", Lvl \" . $details[1] . \" \" . ucfirst($type); // Item\n\t\t\techo \"<td align=center>-\"; // Weight\n\t\t\n\t\t\t//Value\n\t\t\t$value = ($details[1] * 500) + 5000;\n\t\t\techo \"<td align=center>\" . $value;\n\t\t\t\t\n\t\t\t// Write actions Sell\n\t\t\techo \"<td align=center>\";\n\t\t\techo \"<a href='store.php?slot=\" . $result[$p][5] . \"&item_id=\" . $result[$p][0] . \"&character_id=\" . $character_id . \"&player_id=\" . $player_id . \"&journey_id=\" . $journey_id . \"&store_id=\" . $store_id . \"&action=sell'>Sell</a>\"; // $slot, $item_id, $character_id\n\t\t\techo \"</tr>\";\n\t\t\t\t\n\t\t}\n\t\t\n\t\t// Get character strength\t\t\n\t\t$character_strength = getCharacterDetailsInfo($character_id, 'strength');\n\t\t$effects = getEffectBoosts($character_id);\n\t\t$traits = getTraitBoosts($character_id);\n\t\t$total_strength = $character_strength + $effects[\"str\"] + $traits[\"str\"];\n\t\t\n\t\techo \"<tr><td align=right>Total Weight<td align=center>\" . $weight_total;\n\t\techo \"<td align=center>\" . $total_strength . \"<td align=left>Strength</tr>\";\n\t\t\n\t\t// Character Gold\n\t\t$character_gold = getCharacterDetailsInfo($character_id,'gold');\n\t\techo \"<tr><td align=right colspan=2>Character Gold<td align=center>\" . $character_gold . \"<td></tr>\";\n\t\t\n\t\techo \"</table>\";\n\t \n\t}", "abstract protected function doEnd();", "public function run()\n {\n \tfor ($i=9; $i < 20; $i++) { \n \t\t# code...\n \t\tfor ($j=0; $j < 60; $j+=30) { \n \t\t\t# code...\n \t\t\t$fin = $j+30;\n \t\t\t$hrfin = $i;\n\n \t\t\tif($fin == 60){ \n \t\t\t\t$fin = 0;\n \t\t\t\t$hrfin++;\n \t\t\t}\n\t\t DB::table('blocks')->insert([\n\t\t 'startBlock' => \"$i:$j:00\",\n\t\t 'finishBlock' => \"$hrfin:$fin:00\",\n\t\t ]);\n \t\t}\n \t}\n }", "private function verifyRent(){\n\t\tglobal $db;\n\t\t$date_now = date('2018-10-18');\n\t\t$sql = $db->prepare(\"SELECT * FROM project01_stock WHERE vacancy = 'no'\");\n\t\t$sql->execute();\n\t\tif ($sql->rowCount()>0) {\n\t\t\t$sql = $sql->fetch();\n\t\t\t$rom_info = $sql;\n\n\t\t\t$sql = $db->prepare(\"UPDATE project01_stock SET vacancy = 'yes', date_init = '0000-00-00', date_end = '0000-00-00' WHERE date_end <= :date_end\");\n\t\t\t$sql->bindValue(\":date_end\", $date_now);\n\t\t\t$sql->execute();\n\t\t}\n\t}", "public function ended();", "function get_inventory_onhand($pcservno){\n\t$oConn = get_coneccion(\"CIA\");\n\t$lcsqlcmd = \"SELECT aradjt.cservno,\n\t\t\t\t\t sum(aradjt.nqty) as nqty\n\t\t\t\t FROM aradjm\n\t\t\t\t left outer join aradjt on aradjm.cadjno = aradjt.cadjno\n\t\t\t\t left outer join arserm on arserm.cservno = aradjt.cservno\n\t\t\t\t left outer join arcate on arcate.ccateno = aradjm.ccateno AND arcate.ctypecate = 'A'\n\t\t\t\t where arserm.lupdateonhand = true AND \n\t\t\t\t \t aradjm.lvoid = false and \n\t\t\t\t\t aradjt.cservno = '$pcservno' \n\t\t\t\t group by 1\n\t\t\t\t union all \n\t\t\t\t SELECT arinvt.cservno,\n\t\t\t\t\t\tsum(arinvt.nqty * -1) as nqty\n\t\t\t\tFROM arinvc\n\t\t\t\tLEFT OUTER JOIN arinvt on arinvc.cinvno = arinvt.cinvno\n\t\t\t\tLEFT OUTER JOIN arserm on arserm.cservno = arinvt.cservno\n\t\t\t\tleft outer join artcas on artcas.cpaycode = arinvc.cpaycode\n\t\t\t\twhere arserm.lupdateonhand = true and\n\t\t\t\t\t arinvc.lvoid = false and \n\t\t\t\t\t arinvt.cservno = '$pcservno' \n\t\t\t\tgroup by 1\n\t\t\t\";\t\n\t// determinando cuanto producto queda segun el caso \n\t$lnqty = 0;\n\t$lcresult = mysqli_query($oConn,$lcsqlcmd);\n\twhile($lnrowqty = mysqli_fetch_assoc($lcresult)){\n\t\t$lnqty += $lnrowqty[\"nqty\"];\t\n\t}\n\techo $lnqty;\n\t\n\t/*\t\n\t$lcResult = mysqli_query($oConn,$lcsqlcmd); // $oConn->query($lcSqlCmd);\n\t// convirtiendo estos datos en un array asociativo\n\t$ldata = mysqli_fetch_assoc($lcResult);\n\t// convirtiendo este array en archivo jason.\n\t$jsondata =json_encode($ldata,true);\n\t// retornando objeto json\n\techo $jsondata;\n\t*/\n}", "public function run()\n {\n $reservation1 = new Reservation();\n $reservation1->total_price = 150;\n $reservation1->start_date = '2019-11-14';\n $reservation1->end_date = '2019-11-16';\n $reservation1->user_id = 1;\n $reservation1->room_id = 2;\n $reservation1->save();\n\n $reservation2 = new Reservation();\n $reservation2->total_price = 2071.5;\n $reservation2->start_date = '2019-12-14';\n $reservation2->end_date = '2020-01-20';\n $reservation2->user_id = 1;\n $reservation2->room_id = 1;\n $reservation2->save();\n\n $reservation3 = new Reservation();\n $reservation3->total_price = 13020;\n $reservation3->start_date = '2019-12-19';\n $reservation3->end_date = '2020-01-28';\n $reservation3->user_id = 1;\n $reservation3->room_id = 5;\n $reservation3->save();\n }", "function dead_db()\n {\n }", "public function run()\n {\n \tModel::unguard();\n\n DB::table('room_capacities')->delete();\n\n $rows = array(\n\t\t\t['name' => 'Single Bed'],\n\t\t\t['name' => '2 Single Bed'],\n\t\t\t['name' => '1 Double Bed'],\n\t\t\t['name' => '1 Double 1 Single Bed'],\n\t\t\t['name' => '2 Double Bed'],\n\t\t\t['name' => '1 King and 1 Single Bed'],\n\t\t\t['name' => '1 King 1 Double Bed'],\n\t\t\t['name' => '1 King 1 Queen bed'],\n\t\t\t['name' => '1 Room Appartment with South faced Balcony'],\n\t\t\t['name' => 'Duplex'],\n\t\t);\n\n\t\tforeach ($rows as $row) {\n\t\t\tRoomCapacity::create($row);\n\t\t}\n\t\tModel::reguard();\n }", "public function run()\n {\n\n $wd_open = new Shift();\n $wd_open->name = 'weekday_opening';\n $wd_open->startTime = '083000';\n $wd_open->endTime = '173000';\n $wd_open->paidHours = 8;\n $wd_open->isActive = true;\n $wd_open->sortOrder = 1;\n $wd_open->save();\n\n $wd_close = new Shift();\n $wd_close->name = 'weekday_closing';\n $wd_close->startTime = '123000';\n $wd_close->endTime = '213000';\n $wd_close->paidHours = 8;\n $wd_close->isActive = true;\n $wd_close->sortOrder = 3;\n $wd_close->save();\n\n $wd_midshift = new Shift();\n $wd_midshift->name = 'weekday_midshift';\n $wd_midshift->startTime = '103000';\n $wd_midshift->endTime = '193000';\n $wd_midshift->paidHours = 8;\n $wd_midshift->isActive = true;\n $wd_midshift->sortOrder = 2;\n $wd_midshift->save();\n\n }", "public function run()\n {\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>1,\n \"product_variety_id\"=>1,\n \"total_amount\"=>1000000,\n \"quantity\"=>100,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>1,\n \"product_variety_id\"=>2,\n \"total_amount\"=>1100000,\n \"quantity\"=>120,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>2,\n \"product_variety_id\"=>3,\n \"total_amount\"=>1200000,\n \"quantity\"=>140,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>2,\n \"product_variety_id\"=>3,\n \"total_amount\"=>1300000,\n \"quantity\"=>160,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>2,\n \"product_variety_id\"=>4,\n \"total_amount\"=>1400000,\n \"quantity\"=>180,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>2,\n \"product_variety_id\"=>5,\n \"total_amount\"=>1600000,\n \"quantity\"=>20000,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>2,\n \"product_variety_id\"=>6,\n \"total_amount\"=>1800000,\n \"quantity\"=>22000,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>2,\n \"product_variety_id\"=>7,\n \"total_amount\"=>2000000,\n \"quantity\"=>24000,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>2,\n \"product_variety_id\"=>8,\n \"total_amount\"=>2200000,\n \"quantity\"=>26000,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>3,\n \"product_variety_id\"=>9,\n \"total_amount\"=>2400000,\n \"quantity\"=>28000,\"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>3,\n \"product_variety_id\"=>10,\n \"total_amount\"=>2600000,\n \"quantity\"=>30000,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>3,\n \"product_variety_id\"=>10,\n \"total_amount\"=>2600000,\n \"quantity\"=>30000,\"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>3,\n \"product_variety_id\"=>11,\n \"total_amount\"=>2800000,\n \"quantity\"=>32000,\"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>3,\n \"product_variety_id\"=>12,\n \"total_amount\"=>3400000,\n \"quantity\"=>34000,\"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>3,\n \"product_variety_id\"=>13,\n \"total_amount\"=>3600000,\n \"quantity\"=>36000,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>3,\n \"product_variety_id\"=>14,\n \"total_amount\"=>380000,\n \"quantity\"=>38000,\"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>1,\n \"product_variety_id\"=>15,\n \"total_amount\"=>4000000,\n \"quantity\"=>40000,\"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>1,\n \"product_variety_id\"=>16,\n \"total_amount\"=>4100000,\n \"quantity\"=>42000,\"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>4,\n \"product_variety_id\"=>17,\n \"total_amount\"=>4200000,\n \"quantity\"=>44000,\"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>4,\n \"product_variety_id\"=>18,\n \"total_amount\"=>4400000,\n \"quantity\"=>44000,\"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>2,\n \"product_variety_id\"=>19,\n \"total_amount\"=>4600000,\n \"quantity\"=>46000,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>2,\n \"product_variety_id\"=>20,\n \"total_amount\"=>4800000,\n \"quantity\"=>48000,\"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>3,\n \"product_variety_id\"=>21,\n \"total_amount\"=>5000000,\n \"quantity\"=>50000,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>4,\n \"product_variety_id\"=>22,\n \"total_amount\"=>5200000,\n \"quantity\"=>52000,\"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n DB::table('inventory_order_lines')->insert([\n \"order_header_id\"=>3,\n \"product_variety_id\"=>23,\n \"total_amount\"=>5400000,\n \"quantity\"=>54000,\n \"manufacture_date\"=>\"2017-04-18\",\n \"expire_date\"=>\"2020-03-18\"\n ]);\n\n\n\n\n }", "function in($code=\"\", $category=\"\", $qty=0, $nominal=\"\", $desc=\"\", $type=INVENTORY_TYPE, $warehouse=0)\n {\n $product = $this->m_product->getdata_detail(array(\"product_variant_code\"=>$code));\n\n if($code==\"\" || $category==\"\" || $qty==\"\" || $nominal==\"\" || $product->num_rows()!=1)\n {\n die(\"parameter insert inventory harus di lengkapi, item code : $code, category : $category\");\n }\n\n $data = $this->getdata(array(\"inventory_item_code\"=>$code, \"inventory_categories\"=>$category),1,\"\",\"inventory_id\",\"desc\");\n\n // jika tidak ada item ini di inventory maka tidak perlu kalkulasi stock_awal, average_nominal dll\n if($data->num_rows()!=1)\n {\n $stock_awal = 0;\n $nominal_awal = 0;\n $nominal_average = $nominal;\n $total_qty = $qty;\n $total_nominal = $nominal*$qty;\n }\n else {\n // hitung average\n for($a=0;$a<($qty+$data->row()->inventory_total_stock_now);$a++)\n {\n if($a<$qty)\n {\n $avr[] = $nominal;\n }\n else {\n $avr[] = $data->row()->inventory_average_nominal_now_per_item;\n }\n }\n\n $nominal_average = array_sum($avr)/($qty+$data->row()->inventory_total_stock_now);\n $stock_awal = $data->row()->inventory_total_stock_now;\n $nominal_awal = $data->row()->inventory_total_nominal_now;\n $total_qty = $data->row()->inventory_total_stock_now+$qty;\n $total_nominal = $data->row()->inventory_total_nominal_now+($nominal*$qty);\n }\n\n // set nama product\n if($product->row()->product_variant_type==\"\" || $product->row()->product_variant_value==\"\")\n {\n $name = $product->row()->product_name;\n }\n else {\n $name = $product->row()->product_name.\" - \".$product->row()->product_variant_type.\" - \".$product->row()->product_variant_value;\n }\n\n // set log inventory\n if($desc==\"\")\n {\n $desc = \"insert by \".$this->session->userdata('username');\n }\n\n $data_insert = array(\n \"inventory_item_code\" => $code,\n \"inventory_name\" => $name,\n \"inventory_categories\" => $category,\n \"inventory_item_type\" => $type,\n \"inventory_operator\" => \"in\",\n \"inventory_qty\" => $qty,\n \"inventory_nominal_per_item\" => $nominal,\n \"inventory_total_nominal\" => $nominal*$qty,\n \"inventory_stock_awal\" => $stock_awal,\n \"inventory_nominal_stock_awal\" => $nominal_awal,\n \"inventory_average_nominal_now_per_item\" => $nominal_average,\n \"inventory_total_stock_now\" => $total_qty,\n \"inventory_total_nominal_now\" => $total_nominal,\n \"inventory_warehouse_id\" => $warehouse,\n \"inventory_date_craeted\" => date('Y-m-d H:i:s'),\n \"inventory_log\" => $desc,\n );\n $this->db->insert('inventory', $data_insert);\n return $this->db->insert_id();\n }", "public function run()\n {\n $location = Location::factory()->count(3000)->create();\n // $estateAgents = EstateAgent::factory()->count(500)->create();\n try {\n\n // $houses = House::factory()->count(300)->create();\n } catch (\\Exception $e) {\n dump($e);\n }\n }", "function mainreset()\r\n{\r\n\tglobal $db;\r\n\tglobal $arrLanguage;\r\n\r\n\tstart();\r\n\t/// Add player's age. Decrement account freezing count (timeshift must be greater than 180, which is limit for \"active players, currently logged in\").\r\n\t$db -> Execute('UPDATE `players` SET `age`=`age`+1, `houserest`=\\'N\\'');\r\n\t$db -> Execute('UPDATE `players` SET `freeze`=`freeze`-1, `lpv`='.(time() - 200).' WHERE `freeze`>0');\r\n\r\n\t/// Pay for troops in outposts.\r\n\t$arrCosts = $db -> GetAll('SELECT `id`, `warriors`, `catapults`, `barricades`, `archers`, `gold`, `bcost`, `size`, `owner` FROM `outposts`');\r\n\t$arrMultipliers = array(9,3,1,9); // cost of one unit of troop type\r\n\tfor ($i = 0, $intMax = count($arrCosts); $i < $intMax; ++$i)\r\n\t{\r\n\t\t$cost = 3 * (($arrCosts[$i][1] + $arrCosts[$i][4]) * 3 + $arrCosts[$i][2]) + $arrCosts[$i][3];\r\n\t\t$result = $db -> GetRow('SELECT count(*) FROM `outpost_monsters` WHERE `outpost`='.$arrCosts[$i][0]);\r\n\t\t$cost += $result[0] * 50;\r\n\t\t$result = $db -> GetRow('SELECT count(*) FROM `outpost_veterans` WHERE `outpost`='.$arrCosts[$i][0]);\r\n\t\t$cost += $result[0] * 50;\r\n\t\t$cost *= 1 - $arrCosts[$i][6] / 100;\t// Cost reduction based on bonus skill.\r\n\t\tif ($arrCosts[$i][5] >= $cost)\t\t // There is enough gold to pay in treasury.\r\n\t\t\t$tax = $cost;\r\n\t\telse\r\n\t\t{\r\n\t\t\t$tax = $arrCosts[$i][5];\t// Take all gold...\r\n\t\t\t$cost -= $arrCosts[$i][5]; // ...and use it to pay as much as possible.\r\n\t\t\t// Dismissal order: warriors - catapults - barricades - archers.\r\n\t\t\t// Reason: lefts something for defense till the very end. Soldiers must stay in outpost or it's size degrades.\r\n\t\t\tfor ($j = 0;$j < 4; ++$j)\r\n\t\t\t{\r\n\t\t\t\tif ($cost <= $arrCosts[$i][$j+1] * $arrMultipliers[$j]) // If remaining cost can be \"paid\" by part of \"this\" army...\r\n\t\t\t\t{\r\n\t\t\t\t\t$arrCosts[$i][$j+1] -= $cost / $arrMultipliers[$j]; // Units that can't be paid - leave.\r\n\t\t\t\t\t$cost = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$arrCosts[$i][1] = 0;\t\t // All units of this type leave.\r\n\t\t\t\t\t$cost -= $arrCosts[$i][1] * $arrMultipliers[$j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$db -> Execute('INSERT INTO `log` (`owner`, `log`, `czas`) VALUES('.$arrCosts[$i][8].', \\'Twoja strażnica niszczeje, a nie opłacani żołnierze opuszczają Cię!\\', '.$db -> DBDate(date(\"y-m-d H:i:s\")).')');\r\n\t\t}\r\n\t\t$strQuery = 'UPDATE `outposts` SET `warriors`='.$arrCosts[$i][1].', `archers`='.$arrCosts[$i][4].', `catapults`='.$arrCosts[$i][2].',`barricades`='.$arrCosts[$i][3].', `gold`=`gold`-'.$tax;\r\n\t\tif ($arrCosts[$i][1] + $arrCosts[$i][4] < 1)\t// No soldiers left.\r\n\t\t\t$strQuery .= ' ,`size`='.--$arrCosts[$i][7];\r\n\t\tif(!$arrCosts[$i][7]) // Size = 0.\r\n\t\t{\r\n\t\t\t$db -> Execute('DELETE FROM `outposts` WHERE `id`='.$arrCosts[$i][0]);\r\n\t\t\t$db -> Execute('DELETE FROM `outpost_monster` WHERE `outpost`='.$arrCosts[$i][0]);\r\n\t\t\t$db -> Execute('DELETE FROM `outpost_veterans` WHERE `outpost`='.$arrCosts[$i][0]);\r\n\t\t}\r\n\t\telse\r\n\t\t\t$db -> Execute($strQuery.' WHERE `id`='.$arrCosts[$i][0]);\r\n\t}\r\n\tunset($arrCosts);\r\n\r\n\t/// Lenght of poll.\r\n\t$arrPolls = $db -> GetAll('SELECT `id`, `days` FROM `polls` WHERE `votes`=-1 AND `days`>1');\r\n\tfor ($i = 0, $intMax = count($arrPolls); $i < $intMax; ++$i)\r\n\t{\r\n\t\tif($arrPolls[$i][1] == 1)\r\n\t\t{\r\n\t\t\t$db -> Execute('UPDATE `polls` SET `members`=(SELECT count(*) FROM `players`) WHERE `id`='.$arrPolls[$i][0]);\r\n\t\t\t$db -> Execute('UPDATE `settings` SET `value`=\\'N\\' WHERE `setting`=\\'poll\\'');\r\n\t\t}\r\n\t}\r\n\t$db -> Execute('UPDATE `polls` SET `days`=`days`-1 WHERE `days`>1');\r\n\tunset($arrPolls);\r\n/**\r\n * Warehouse actions.\r\n * 1) Every 10th day there is a chance for caravan that buys goods.\r\n */\r\n\t$arrItems = array('copperore', 'zincore', 'tinore', 'ironore', 'copper', 'bronze', 'brass', 'iron', 'steel', 'coal', 'adamantium', 'meteor', 'crystal', 'pine', 'hazel', 'yew', 'elm', 'mithril', 'illani', 'illanias', 'nutari', 'dynallca', 'illani_seeds', 'illanias_seeds', 'nutari_seeds', 'dynallca_seeds');\r\n\t$arrTest = $db -> GetRow('SELECT `reset` FROM `warehouse` WHERE `reset`=10 LIMIT 1');\r\n\tif (!empty($arrTest))\r\n\t{\r\n\t\t$arrCaravanday = $db -> GetRow('SELECT `value` FROM `settings` WHERE `setting`=\\'day\\'');\r\n\t\t$strCaravan = 'N';\r\n\t\tif ($arrCaravanday[0] % 10 == 0 && rand(1, 10) == 10)\r\n\t\t{\r\n\t\t\tforeach ($arrItems as $strItem)\r\n\t\t\t{\r\n\t\t\t\t$intPercent = rand(1, 100) / 100;\r\n\t\t\t\t$db -> Execute('UPDATE `warehouse` SET `buy`=`buy`+`amount`*'.$intPercent.', `amount`=`amount`*'.(1 - $intPercent).' WHERE `mineral`=\\''.$strItem.'\\' AND `reset`=1');\r\n\t\t\t}\r\n\t\t\t$strCaravan = 'Y';\r\n\t\t}\r\n\t\t$db -> Execute('UPDATE `settings` SET `value`=\\''.$strCaravan.'\\' WHERE `setting`=\\'caravan\\'');\r\n/**\r\n * 2) Count prices in warehouse.\r\n * Variant 1: when there's full warehouse history available.\r\n */\r\n\t\t$arrPrice = array(0.14, 0.13, 0.12, 0.11, 0.1, 0.1, 0.09, 0.08, 0.07, 0.06);\r\n\t\tfor ($i = 0; $i < 26; ++$i)\r\n\t\t{\r\n\t\t\t$arrMineral = $db -> GetAll('SELECT `cost`, `sell`, `buy`, `amount` FROM `warehouse` WHERE `mineral`=\\''.$arrItems[$i].'\\' ORDER BY `reset` ASC');\r\n\t\t\t$intTotal = 0;\r\n\t\t\tfor ($j = 0; $j < 10; ++$j)\r\n\t\t\t\t$intTotal += $arrMineral[$j][1] + $arrMineral[$j][2];\r\n\t\t\tif (!$intTotal)\r\n\t\t\t\t$intTotal = 1;\r\n\t\t\t$intPrice = 0;\r\n\t\t\tfor ($j = 0; $j < 10; ++$j)\r\n\t\t\t\t$intPrice += (($arrMineral[$j][2] - $arrMineral[$j][1]) / $intTotal + 1) * $arrMineral[$j][0] * $arrPrice[$j];\r\n\t\t\t// If \"today\" amount == 0...\r\n\t\t // echo('<p>'.$arrItems[$i].'. Cena wyliczana wzorkiem: '.$intPrice.'<br />');\r\n\t\t\tif ($arrMineral[0][3] < 1)\r\n\t\t\t{// ...find out how long the warehouse is empty, and increment price a bit more.\r\n\t\t\t\t$arrTest = $db -> GetRow('SELECT `value` FROM `settings` WHERE `setting`=\\''.$arrItems[$i].'\\'');\r\n\t\t\t\tif ($arrTest[0] > 4)\r\n\t\t\t\t\t$intPrice = $arrMineral[0][0] + pow(2, floor($arrTest[0] / 5) - 1);\r\n\t\t\t // echo('Zero od '.$arrTest[0].' dni, po dodaniu bonusu: '.$intPrice);\r\n\t\t\t\t$db -> Execute('UPDATE `settings` SET `value`=`value`+1 WHERE `setting`=\\''.$arrItems[$i].'\\'');\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t$db -> Execute('UPDATE `settings` SET `value`=0 WHERE `setting`=\\''.$arrItems[$i].'\\'');\r\n\t\t\t$db -> Execute('DELETE FROM `warehouse` WHERE `mineral`=\\''.$arrItems[$i].'\\' AND `reset`=10');\r\n\t\t\t$db -> Execute('UPDATE `warehouse` SET `reset`=`reset`+1 WHERE `mineral`=\\''.$arrItems[$i].'\\'');\r\n\t\t\t$db -> Execute('INSERT INTO `warehouse` (`reset`, `mineral`, `cost`, `amount`) VALUES (1, \\''.$arrItems[$i].'\\', '.$intPrice.', '.$arrMineral[0][3].')');\r\n\t\t // echo '</p>';\r\n\t\t}\r\n\t}\r\n/// Variant 2: Not enough data. Add new reset copying the amount from old one (if it's day 1 of new era, use base values).\r\n\telse\r\n\t{\r\n\t$arrStartPrices = array(2,4,6,9,7,18,22,35,50,1,15,150,20,7,12,20,40,20,15,25,40,50,50,100,140,180);\r\n\t$arrStartAmount = array(50000,0,0,0,10000,0,0,0,0,100000,2000,500,2000,20000,0,0,0,10000,2000,2000,2000,2000,0,0,0,0);\r\n\t$strQuery = 'INSERT INTO `warehouse` (`reset`, `mineral`, `cost`, `amount`) VALUES (1, \\'';\r\n\t\tfor ($i = 0; $i < 26; ++$i)\r\n\t\t{\r\n\t\t\t$arrReset = $db -> GetRow('SELECT `amount`, `cost` FROM `warehouse` WHERE `mineral`=\\''.$arrItems[$i].'\\' AND `reset`=1');\r\n\t\t\tif (!empty($arrReset))\r\n\t\t\t{\r\n\t\t\t\t$db -> Execute('UPDATE `warehouse` SET `reset`=`reset`+1 WHERE `mineral`=\\''.$arrItems[$i].'\\'');\r\n\t\t\t\t$db -> Execute($strQuery.$arrItems[$i].'\\', '.$arrReset[1].', '.$arrReset[0].')');\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t$db -> Execute($strQuery.$arrItems[$i].'\\', '.$arrStartPrices[$i].', '.$arrStartAmount[$i].')');\r\n\t\t}\r\n\t}\r\n\t/// Add game age.\r\n\t$db -> Execute('UPDATE `settings` SET `value`=`value`+1 WHERE `setting`=\\'day\\'');\r\n\t/// Count amount of minerals in mines.\r\n\t$db -> Execute('UPDATE `mines_search` SET `days`=`days`-1');\r\n\t$arrSearchmin = $db -> GetAll('SELECT `player`, `mineral`, `searchdays` FROM `mines_search` WHERE `days`=0');\r\n\t$arrMinerals = array('coal' => 0.75,\r\n\t\t\t\t\t\t 'copper' => 1,\r\n\t\t\t\t\t\t 'zinc' => 2,\r\n\t\t\t\t\t\t 'tin' => 3,\r\n\t\t\t\t\t\t 'iron' => 4);\r\n\t$arrMaxDeposit = array(500,1500,3000); // max amount of ore based on day 1,2 or 3.\r\n\tfor ($i = 0, $intMax = count($arrSearchmin); $i < $intMax; ++$i)\r\n\t{\r\n\t\t$strMineral = $arrSearchmin[$i][1];\r\n\t\t$intAmount = ceil(rand(1, 10) * $arrMaxDeposit[$arrSearchmin[$i][2] - 1] / $arrMinerals[$strMineral]);\r\n\t\t$arrTest = $db -> GetRow('SELECT `owner` FROM `mines` WHERE `owner`='.$arrSearchmin[$i][0]);\r\n\t\tif (!empty($arrTest))\r\n\t\t\t$db -> Execute('UPDATE `mines` SET `'.$strMineral.\"`=`\".$strMineral.\"`+\".$intAmount.\" WHERE `owner`=\".$arrSearchmin[$i][0]);\r\n\t\telse\r\n\t\t\t$db -> Execute('INSERT INTO `mines` (`owner`,`'.$strMineral.'`) VALUES('.$arrSearchmin[$i][0].', '.$intAmount.')');\r\n\t}\r\n\t$db -> Execute('DELETE FROM `mines_search` WHERE `days`=0');\r\n\tunset($arrSearchmin, $arrMinerals, $arrMaxDeposit, $arrTest);\r\n\t/// Show new news (player's gossips).\r\n\t$db -> Execute('UPDATE `news` SET `show`=\\'Y\\' WHERE `show`=\\'N\\' AND `added`=\\'Y\\' ORDER BY `id` ASC LIMIT 1');\r\n\t/// Check construction of Astral Machine.\r\n\t$arrTest = $db -> GetRow('SELECT `value` FROM `settings` WHERE `setting`=\\'tribe\\'');\r\n\tif ($arrTest[0] == '')\r\n\t{\r\n\t\t$arrAstral = $db -> GetAll('SELECT `owner`, `used`, `directed` FROM `astral_machine` WHERE `aviable`=\\'Y\\'');\r\n\t\t$blnBreak = false;\r\n\t\tfor ($i = 0, $intMax = count($arrAstral); $i < $intMax; ++$i)\r\n\t\t{\r\n\t\t\tif ($arrAstral[$i][1] + $arrAstral[$i][2] >= 20000)\r\n\t\t\t{\r\n\t\t\t\t$arrName = $db -> GetRow('SELECT `name` FROM `tribes` WHERE `id`='.$arrAstral[$i][0]);\r\n\t\t\t\t$time = date(\"y-m-d H:i:s\");\r\n\t\t\t\tforeach ($arrLanguage as $strLanguage) // Prepare the news.\r\n\t\t\t\t{\r\n\t\t\t\t\trequire_once('languages/'.$strLanguage.'/resets.php');\r\n\t\t\t\t\t$strDate = $db -> DBDate($time);\r\n\t\t\t\t\t$db -> Execute('INSERT INTO `updates` (`starter`, `title`, `updates`, `lang`, `time`) VALUES(\\'(Herold)\\',\\''.U_TITLE.'\\',\\''.U_TEXT.$gamename.U_TEXT2.$gamename.U_TEXT3.$time.U_TEXT4.$arrName[0].U_TEXT5.'\\',\\''.$strLanguage.'\\', '.$strDate.')');\r\n\t\t\t\t}\r\n\t\t\t\t$db -> Execute('UPDATE `settings` SET `value`='.$arrAstral[$i][0].' WHERE `setting`=\\'tribe\\'');\r\n\r\n\t\t\t\t$arrComponents = array('C', 'O', 'T'); // Delete components used to build AM.\r\n\t\t\t\t$arrAmount = array(array(8, 8, 6, 6, 4, 4, 2),\r\n\t\t\t\t\t\t\t\t array(10, 8, 6, 4, 2),\r\n\t\t\t\t\t\t\t\t array(10, 8, 6, 4, 2));\r\n\t\t\t\tfor ($j = 0, $k=0; $j < 3; ++$j, $k=0)\r\n\t\t\t\t\tforeach ($arrAmount[$i] as $intAmount)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$strName = $arrComponents[$j].$k;\r\n\t\t\t\t\t\t$arrAmount = $db -> GetRow('SELECT `amount` FROM `astral` WHERE `owner`='.$arrAstral[$i][0].' AND `type`=\\''.$strName.'\\' AND `number`=0 AND `location`=\\'C\\'');\r\n\t\t\t\t\t\tif ($arrAmount[0] == $intAmount)\r\n\t\t\t\t\t\t\t$db -> Execute('DELETE FROM `astral` WHERE `owner`='.$arrAstral[$i][0].' AND `type`=\\''.$strName.'\\' AND `number`=0 AND `location`=\\'C\\'');\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$db -> Execute('UPDATE `astral` SET `amount`=`amount`-'.$intAmount.' WHERE `owner`='.$arrAstral[$i][0].' AND `type`=\\''.$strName.'\\' AND `number`=0 AND `location`=\\'C\\'');\r\n\t\t\t\t\t\t$k++;\r\n\t\t\t\t\t}\r\n\t\t\t\t$blnBreak = true;\r\n\t\t\t}\r\n\t\t\t$db -> Execute('UPDATE `astral_machine` SET `used`='.$arrAstral[$i][1] + $arrAstral[$i][2].', `directed`=0 WHERE `owner`='.$arrAstral[$i][0]);\r\n\t\t\tif ($blnBreak)\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tunset($arrTest, $arrAstral);\r\n\tstop();\r\n\t// Clear selected caches.\r\n\trequire_once 'libs/Smarty.class.php';\r\n\t$smarty = new Smarty;\r\n\t$smarty -> template_dir = './templates/';\r\n\t$smarty -> compile_dir = './templates_c/';\r\n\t$smarty -> cache_dir = './cache/';\r\n\t$smarty -> clear_cache('warehouse.tpl', 'Altara');\r\n\t$smarty -> clear_cache('warehouse.tpl', 'Ardulith');\r\n\tfor ($i=0; $i < 26; ++$i)\r\n\t\t$smarty -> clear_cache('warehouse.tpl', 'h|'.$i);\r\n\r\n\t//cores\r\n\t$db -> Execute('UPDATE `coresplayers` SET `age` = `age` + 1');\r\n\t$db -> Execute('UPDATE `coresplayers` SET `rest` = `rest` - 1 WHERE `rest` > 0');\r\n\r\n}", "public function run()\n {\n $divisions = [\n 'Technical Services Division',\n 'Finance and Administrative Services',\n 'Office of the Regional Director',\n 'USTC - Baguio',\n 'PSTC - Mountain Province',\n 'PSTC - Abra',\n 'PSTC - Apayao',\n 'PSTC - Benguet',\n 'PSTC - Ifugao',\n 'PSTC - Kalinga'\n ];\n\n $dataCount = count($divisions);\n\n foreach ($divisions as $ctr => $div) {\n $percentage = number_format((($ctr + 1) / $dataCount) * 100, 2);\n echo \"Inventory Stocks: [ $percentage% ] migrated.\\n\";\n\n $division = new EmpDivision;\n $division->division_name = $div;\n $division->save();\n }\n }", "function secondaryInvolvementInsertion($db, $Agent_ID, $Closing_ID, $price, $agentPercentage,\n\t$ownPercentage, $agentNumber, $workedAs){\n\t$insertion = $db->prepare(\"INSERT INTO `agent_involved_in_closing`\n\t\t(`Agent_ID`, `Closing_ID`, `earning`, `workedAs`)\n\t\tVALUES (?,?,?,?)\");\n\n\t$insertion->bind_param('iidi', $field1, $field2, $field3, $field4);\n\t$field1 = $Agent_ID;\n\t$field2 = $Closing_ID;\n\t$field3 = $price * $agentPercentage * $ownPercentage / 10000;\n\t$field4 = 6*$agentNumber + $workedAs;\n\n\tif($insertion->execute()){\n\t\t$insertion->close();\n\t\t\t// echo \"Agen pendukung berhasil dibuat <br>\";\n\t}else{\n\t\t$insertion->close();\n\t\techo \"Error: \" . mysqli_error($db);\n\t}\n}", "function processReservation($fname,$lname,$sourcelist,$destlist,$flight,$sdate){\n $connection = initDB();\n $query2;\n \n //Update Guest Table\n $query2 = \"SELECT * FROM Guest WHERE FirstName='\".$fname.\"' AND LastName='\".$lname.\"'\";\n $result2 = mysql_query($query2);\n //or die (\"Query Failed \".mysql_error());\n\n $registeredGuest = false;\n $guestID;\n\n while($row2 = mysql_fetch_array($result2)){ \n $guestID = $row2['GID'];\n $registeredGuest = true; \n }\n //Guest ID not available. First time flyer.\n if(! $registeredGuest){ \n //Update Guest table.\n //Get last Guest ID\n $query2 = \"SELECT MAX(GID) FROM Guest\";\n $result2 = mysql_query($query2);\n //or die (\"Query Failed \".mysql_error());\n $row2 = mysql_fetch_array($result2);\n $MGID = $row2[0];\n \n $guestID = $MGID + 1;\n \n $query2 = \"INSERT INTO Guest Values('\".$guestID.\"','\".$fname.\"','\".$lname.\"')\";\n $result2 = mysql_query($query2);\n //or die (\"Query Failed \".mysql_error()); \n } \n \n //Get the flight ID\n $query = \"SELECT * FROM Flights WHERE FName='\".$flight.\"'\";\n $result = mysql_query($query);\n //or die (\"Query Failed \".mysql_error());\n $row2 = mysql_fetch_array($result); \n $FID = $row2['FID']; \n \n //Update schedule table \n $query2 = \"SELECT MAX(SID) FROM Schedule\";\n $result2 = mysql_query($query2);\n //or die (\"Query Failed \".mysql_error());\n $row2 = mysql_fetch_array($result2);\n $MSID = $row2[0];\n //echo \"MAX GID \".$MGID;\n $SID = $MSID + 1; \n //Before updating the schedule and itinerary table\n //check duplicate itinerary.\n\n $query2 = \"SELECT * FROM Schedule WHERE GID='\".$guestID.\"' AND FID='\".$FID.\"' AND Date='\".$sdate.\"'\";\n $result2 = mysql_query($query2);\n //or die (\"Query Failed \".mysql_error());\n\n $duplicateItinerary = false;\n $guestID;\n\n while($row2 = mysql_fetch_array($result2)){ \n $duplicateItinerary = true; \n }\n\n if($duplicateItinerary){\n //Duplicate itineraries not allowed.\n return -1;\n } \n\n\n $query2 = \"INSERT INTO Schedule Values('\".$SID.\"','\".$guestID.\"','\".$FID.\"','\".$sdate.\"')\";\n $result2 = mysql_query($query2);\n //or die (\"Query Failed \".mysql_error());\n \n //Finally update the Itinerary Table \n $query2 = \"SELECT MAX(IID) FROM Itinerary\";\n $result2 = mysql_query($query2);\n // or die (\"Query Failed \".mysql_error());\n $row2 = mysql_fetch_array($result2);\n $MIID = $row2[0]; \n $IID = $MIID + 1;\n\n $query2 = \"INSERT INTO Itinerary Values('\".$IID.\"','\".$guestID.\"','\".$FID.\"','\".$SID.\"')\";\n $result2 = mysql_query($query2);\n //or die (\"Query Failed \".mysql_error());\n\n closeDB($connection);\n return $IID;\n}", "public function AddReservation($Room_id,$cust_id,$B_date,$E_date)\n{\n$DB=new DBManager();\n\n$DBegin=date_create($B_date);\n$DEnd=date_create($E_date);\n\n$diff=date_diff($DBegin,$DEnd);\n$interval = $DBegin->diff($DEnd);\n$intervalDays=$interval->days;\n\n\n$sql1=\"INSERT INTO reservation(cust_id,dateBegin,DateEnd,Room_id,period) VALUES ('$cust_id','$B_date','$E_date','$Room_id','$intervalDays')\";\n$resSel=$DB->AddDB($sql1);\n\n$sql2=\"UPDATE room SET status=1 WHERE id='$Room_id'\";\n$resUP=$DB->updateDB($sql2);\n\nif($resUP == \"Updated\")\n{\n return \" ***** Congratulations , You Reserved Room Successfully ***** \";\n}\nelse return \"problem\";\n\n}", "function storeEquipment($store_id, $journey_id, $character_id, $player_id) {\n\t\n\t\taddToDebugLog(\"manageEquipment(), Function Entry - supplied parameters: Player ID: \" . $player_id . \"; Journey ID: \" . $journey_id . \"; Character ID: \" . $charcter_id . \"; Store ID: \" . $store_id . \", INFO\");\n\t\n\t\t// Get store name\n\t\t$store_name = getStoreName($store_id);\n\t\n\t\techo \"<table cellpadding=3 cellspacing=0 border=1>\";\n\t\techo \"<tr><td colspan=5 align=center><h2>For Sale</h2></tr>\";\n\t\techo \"<tr bgcolor=#bbb><td>Item<td align=center>Weight<td align=center>Cost<td align=center>Buy</tr>\";\n\t\n\t\tgetStoreContentsBySlot($store_id, $journey_id, $character_id, $player_id, 'chest');\n\t\tgetStoreContentsBySlot($store_id, $journey_id, $character_id, $player_id, 'head');\n\t\tgetStoreContentsBySlot($store_id, $journey_id, $character_id, $player_id, 'legs');\n\t\tgetStoreContentsBySlot($store_id, $journey_id, $character_id, $player_id, 'shield');\n\t\tgetStoreContentsBySlot($store_id, $journey_id, $character_id, $player_id, 'weapon');\n\t\tgetStoreContentPotions($store_id, $journey_id, $character_id, $player_id);\n\t\tgetStoreContentPets($store_id, $journey_id, $character_id, $player_id);\n\t\n\t\techo \"</table>\";\n\t\n\t}", "public function run()\n {\n //\n ItemTransaction::create(['list_id'=>1,'inv_id'=>1,'amount'=>5,'type'=>0,'staff_id'=>1,'date'=>\\Carbon\\Carbon::now(),'remain_qty'=>10]);\n ItemTransaction::create(['list_id'=>1,'inv_id'=>1,'amount'=>5,'type'=>1,'staff_id'=>1,'date'=>\\Carbon\\Carbon::now(),'remain_qty'=>15]);\n }", "public function run()\n {\n $businesss = Business::factory()->count(env('SEED_LIMIT')/8)->health()->create();\n\n Business::factory()->count(env('SEED_LIMIT')*7/8)->create();\n }", "public function insert_reserve_long($ref, $id_ocupacion, $id_customer, $adults_qty, $children_qty, $interm_id, $qty_nights, $HS_nights, $LS_nights, $price_per_night, $priceHS, $amount_commision, $sub_total_rent, $ITBIS, $services_amount, $deposit, $general_amount, $status, $pago_qty,$pagos_monto,$price_long,$extra_nigths){\n $query=\"INSERT INTO `\".DB_PREFIX.\"reserves` ( `id`,\n \t\t\t\t\t\t\t\t\t\t\t\t`ref`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`id_occupancy`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`id_client`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`adults`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`children`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`id_interm`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`qty_nights`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`nightsHS`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`nightsLS`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`price_per_night`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`priceHS`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`commision`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`amount`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`tax`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`services_amount`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`deposit`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`total`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`status`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`pagos_qty`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`pagos_monto`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`price_long`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`extra_nights`)\n \t\t\t\t\tVALUES ( NULL ,'\".$this->link->myesc($ref).\"','\".$this->link->myesc($id_ocupacion).\"','\".$this->link->myesc($id_customer).\"','\".$this->link->myesc($adults_qty).\"','\".$this->link->myesc($children_qty).\"','\".$this->link->myesc($interm_id).\"','\".$this->link->myesc($qty_nights).\"','\".$this->link->myesc($HS_nights).\"','\".$this->link->myesc($LS_nights).\"','\".$this->link->myesc($price_per_night).\"','\".$this->link->myesc($priceHS).\"','\".$this->link->myesc($amount_commision).\"','\".$this->link->myesc($sub_total_rent).\"','\".$this->link->myesc($ITBIS).\"','\".$this->link->myesc($services_amount).\"','\".$this->link->myesc($deposit).\"','\".$this->link->myesc($general_amount).\"','\".$this->link->myesc($status).\"','\".$this->link->myesc($pago_qty).\"','\".$this->link->myesc($pagos_monto).\"','\".$this->link->myesc($price_long).\"','\".$this->link->myesc($extra_nigths).\"')\";\n\n $result = $this->link->execute($query);\n return $result;\n\t}", "public function run()\n {\n $pepperoni = new ActualStock();\n $pepperoni->top_id=1;\n $pepperoni->side_id=null;\n $pepperoni->Qty=350;\n $pepperoni->date=Carbon::now()->subDay();\n\n $pepperoni->save();\n\n $cheese = new ActualStock();\n $cheese->top_id=2;\n $cheese->side_id=null;\n $cheese->Qty=500;\n $cheese->date=Carbon::now()->subDay();\n\n $cheese->save();\n\n $pizzaSauce = new ActualStock();\n $pizzaSauce->top_id=3;\n $pizzaSauce->side_id=null;\n $pizzaSauce->Qty=500;\n $pizzaSauce->date=Carbon::now()->subDay();\n\n $pizzaSauce->save();\n\n $dough = new ActualStock();\n $dough->top_id=4;\n $dough->side_id=null;\n $dough->Qty=500;\n $dough->date=Carbon::now()->subDay();\n\n $dough->save();\n\n $ham = new ActualStock();\n $ham->top_id=5;\n $ham->side_id=null;\n $ham->Qty=300;\n $ham->date=Carbon::now()->subDay();\n\n $ham->save();\n\n $sausage = new ActualStock();\n $sausage->top_id=6;\n $sausage->side_id=null;\n $sausage->Qty=300;\n $sausage->date= Carbon::now()->subDay();\n\n $sausage->save();\n\n $onion = new ActualStock();\n $onion->top_id=7;\n $onion->side_id=null;\n $onion->Qty=200;\n $onion->date=Carbon::now()->subDay();\n\n $onion->save();\n\n $mushroom = new ActualStock();\n $mushroom->top_id=8;\n $mushroom->side_id=null;\n $mushroom->Qty=200;\n $mushroom->date=Carbon::now()->subDay();\n\n $mushroom->save();\n\n $beef = new ActualStock();\n $beef->top_id=9;\n $beef->side_id=null;\n $beef->Qty=200;\n $beef->date=Carbon::now()->subDay();\n\n $beef->save();\n\n $chorizo = new ActualStock();\n $chorizo->top_id=10;\n $chorizo->side_id=null;\n $chorizo->Qty=200;\n $chorizo->date=Carbon::now()->subDay();\n\n $chorizo->save();\n\n $bacon = new ActualStock();\n $bacon->top_id=11;\n $bacon->side_id=null;\n $bacon->Qty=200;\n $bacon->date=Carbon::now()->subDay();\n\n $bacon->save();\n\n $meatball = new ActualStock();\n $meatball->top_id=12;\n $meatball->side_id=null;\n $meatball->Qty=200;\n $meatball->date=Carbon::now()->subDay();\n\n $meatball->save();\n\n $greenAndRedPeppers = new ActualStock();\n $greenAndRedPeppers->top_id=13;\n $greenAndRedPeppers->side_id=null;\n $greenAndRedPeppers->Qty=200;\n $greenAndRedPeppers->date=Carbon::now()->subDay();\n\n $greenAndRedPeppers->save();\n\n $sweetcorn = new ActualStock();\n $sweetcorn->top_id=14;\n $sweetcorn->side_id=null;\n $sweetcorn->Qty=200;\n $sweetcorn->date=Carbon::now()->subDay();\n\n $sweetcorn->save();\n\n $freshTomato = new ActualStock();\n $freshTomato->top_id=15;\n $freshTomato->side_id=null;\n $freshTomato->Qty=200;\n $freshTomato->date=Carbon::now()->subDay();\n\n $freshTomato->save();\n\n $pineapple = new ActualStock();\n $pineapple->top_id=16;\n $pineapple->side_id=null;\n $pineapple->Qty=200;\n $pineapple->date=Carbon::now()->subDay();\n\n $pineapple->save();\n\n $chickenTender = new ActualStock();\n $chickenTender->top_id=null;\n $chickenTender->side_id=1;\n $chickenTender->Qty=100;\n $chickenTender->date=Carbon::now()->subDay();\n\n $chickenTender->save();\n\n $cookies = new ActualStock();\n $cookies->top_id=null;\n $cookies->side_id=2;\n $cookies->Qty=100;\n $cookies->date=Carbon::now()->subDay();\n\n $cookies->save();\n\n\n\n }", "public function getProductionDetail($line, $item, $start, $end)\n\t{\n\t\t$line = $line ? sprintf('and sx.Ref_DayChuyen = %1$d', $line) : '';\n\t\t$item = $item ? sprintf('and ctsp.Ref_MaSanPham = %1$d', $item) : '';\n\n\t\t$sql = sprintf(' \n\t\t\t\t\t\tselect SUM(sl.SoLuong) as SanLuongThucTe, t.*\n\t\t\t\t\t\tfrom \n\t\t\t\t\t\t\t(select sx.MaLenhSX, sx.Ref_DayChuyen\n\t\t\t\t\t\t \t,ctsp.Ref_MaSanPham,ctsx.MaSP,ctsx.TenSP, sx.DayChuyen\n\t\t\t\t\t\t\tfrom OSanXuat as sx\n\t\t\t\t\t\t\tinner join OChiTietSanXuat as ctsx on ctsx.IFID_M710 = sx.IFID_M710\n\t\t\t\t\t\t\tinner join OCauThanhSanPham as ctsp\n\t\t\t\t\t\t\ton ctsp.Ref_MaSanPham = ctsx.Ref_MaSP\n\t\t\t\t\t\t\twhere \n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(sx.TuNgay between %3$s and %4$s)\n\t\t\t\t\t\t\t\t\tor\n\t\t\t\t\t\t\t\t\t(sx.DenNgay between %3$s and %4$s)\n\t\t\t\t\t\t\t\t) \n\t\t\t\t\t\t\t\t%1$s %2$s\n\t\t\t\t\t\t\t) as t\n\t\t\t\t\t\t\tinner join OThongKeSanLuong as tksl on tksl.MaLenhSX = t.MaLenhSX\n\t\t\t\t\t\t\tinner join OSanLuong as sl on sl.IFID_M717 = tksl.IFID_M717\n\t\t\t\t\t\t\tgroup by t.Ref_DayChuyen, sl.MaSP \n\t\t\t\t\t\t\torder by t.Ref_DayChuyen, sl.MaSP\n\t\t\t\t\t\t ', $line, $item, $this->_o_DB->quote($start), $this->_o_DB->quote($end));\n\t\treturn $this->_o_DB->fetchOne($sql);\n\n\t}", "public static function reloadInventories (): void {\n\t\tglobal $DB;\n\t\t$res = $DB->query('SELECT IID, name, description FROM id_inventories');\n\t\twhile ($r = $res->fetch_assoc())\n\t\t\tself::$inventories[$r['IID']] = new Inventory($r['IID'], $r['name'], $r['description']);\n\t}", "public function run()\n {\n DB::table(\"start_and_end_hours\")->insert([[\n \"hour\" => \"7:30\",\n \"typeId\" => 1\n ], [\n \"hour\" => \"8:20\",\n \"typeId\" => 3\n ], [\n \"hour\" => \"9:10\",\n \"typeId\" => 3\n ], [\n \"hour\" => \"10:00\",\n \"typeId\" => 2\n ], [\n \"hour\" => \"10:10\",\n \"typeId\" => 1\n ], [\n \"hour\" => \"11:00\",\n \"typeId\" => 3\n ], [\n \"hour\" => \"11:50\",\n \"typeId\" => 2\n ], [\n \"hour\" => \"13:20\",\n \"typeId\" => 1\n ], [\n \"hour\" => \"14:10\",\n \"typeId\" => 3\n ], [\n \"hour\" => \"15:00\",\n \"typeId\" => 2\n ], [\n \"hour\" => \"15:10\",\n \"typeId\" => 1\n ], [\n \"hour\" => \"16:00\",\n \"typeId\" => 3\n ], [\n \"hour\" => \"16:50\",\n \"typeId\" => 3\n ], [\n \"hour\" => \"17:40\",\n \"typeId\" => 3\n ], [\n \"hour\" => \"18:30\",\n \"typeId\" => 3\n ], [\n \"hour\" => \"18:50\",\n \"typeId\" => 1\n ], [\n \"hour\" => \"19:40\",\n \"typeId\" => 3\n ], [\n \"hour\" => \"20:30\",\n \"typeId\" => 3\n ], [\n \"hour\" => \"21:20\",\n \"typeId\" => 2\n ], [\n \"hour\" => \"21:30\",\n \"typeId\" => 3\n ], [\n \"hour\" => \"22:20\",\n \"typeId\" => 2\n ]]);\n }", "public function testBookedSpacesBefore()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-12 15:00:00\";\n $end = \"2017-06-16 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(0, $total_places);\n }", "public function inventory($order){\n $order = Order::find($order->id);\n // Se obtiene el detalle de la orden\n $order_details = OrderDetail::where('order_id', $order->id)->get();\n foreach ($order_details as $od){\n $store_branche_id = $od['store_branche_id'];\n //Inventario\n $inventory = Inventory::where('product_id', $od['product_id'])->where('store_branche_id', $store_branche_id)->first();\n if(isset($inventory)){\n // Se realiza el movimiento del inventario de tipo E: Egreso\n $inventory->update([\n 'quantity' => $inventory->quantity - $od['quantity']\n ]);\n InventoryMovement::create([\n 'inventory_id' => $inventory->id,\n 'quantity' => $od['quantity'],\n 'order_id'=>$order->id,\n 'movement_type' => 'E'\n ]);\n }\n }\n }", "function EdenShop05($eden_shop_action){\n\t\n\tglobal $db_shop_setup,$db_shop_orders,$db_shop_orders_product,$db_shop_product,$db_category;\n\tglobal $project;\n\t\n\t$res_setup = mysql_query(\"\n\tSELECT shop_setup_05_toc_ok, shop_setup_05_toc_no, shop_setup_show_vat_subtotal, shop_setup_05_additional \n\tFROM $db_shop_setup \n\tWHERE shop_setup_lang='\".mysql_real_escape_string($_GET['lang']).\"'\"\n\t) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$ar_setup = mysql_fetch_array($res_setup);\n\t\n\t$res_order = mysql_query(\"\n\tSELECT * \n\tFROM $db_shop_orders \n\tWHERE shop_orders_id=\".(integer)$_GET['id']\n\t) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$ar_order = mysql_fetch_array($res_order);\n\techo \"<div align=\\\"center\\\">\\n\";\n\techo \"\t<div align=\\\"center\\\">\\n\";\n\techo \"\t\t<div id=\\\"edenshop_progress_border_top\\\"></div>\\n\";\n\techo \"\t\t<div id=\\\"edenshop_progress_border_mid\\\">\\n\";\n\techo \"\t\t\t<img src=\\\"images/edenshop_pbar_05_complete_en.gif\\\" width=\\\"500\\\" height=\\\"100\\\" alt=\\\"\\\">\\n\";\n\techo \"\t\t</div>\\n\";\n\techo \"\t\t<div id=\\\"edenshop_progress_border_bottom\\\"></div>\\n\";\n\techo \"\t</div>\\n\";\n\techo \"\t<div id=\\\"edenshop_progress_border_top\\\"></div>\\n\";\n\techo \"\t<div id=\\\"edenshop_progress_border_mid\\\">\\n\";\n\techo \"\t\t<div id=\\\"edenshop_progress_title\\\">\"; if ($_GET['state'] == \"ok\"){echo _SHOP_05_ORDER_COMPLETE;} elseif ($_GET['state'] == \"cancel\"){echo _SHOP_05_ORDER_CANCELED;} echo \"</div><br><br>\\n\";\n\techo \"\t\t<table id=\\\"edenshop_progress_05\\\">\\n\";\n\techo \"\t\t\t<tr>\\n\";\n\techo \"\t\t\t\t<td id=\\\"edenshop_progress_05_toc\\\" colspan=\\\"2\\\">\\n\";\n\t\t\t\t\t\t\tif ($_GET['state'] == \"ok\"){echo $ar_setup['shop_setup_05_toc_ok'];} elseif ($_GET['state'] == \"cancel\"){echo $ar_setup['shop_setup_05_toc_no'];} echo \"<br><br>\\n\";\n\techo \"\t\t\t\t</td>\\n\";\n\techo \"\t\t\t</tr>\\n\";\n\techo \"\t\t\t<tr>\\n\";\n\techo \"\t\t\t\t<td id=\\\"edenshop_progress_05_customer\\\">\\n\";\n\techo \"\t\t\t\t\t<table id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_main_title\\\" colspan=\\\"2\\\"><strong>\"._SHOP_04_CUSTOMER_ADDRESS.\"</strong></td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_NAME.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\"; if ($ar_order['shop_orders_admin_title'] != \"\"){echo $ar_order['shop_orders_admin_title'].\" \";} echo $ar_order['shop_orders_admin_firstname'].\" \".$ar_order['shop_orders_admin_name'].\"</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_ADDRESS.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\".$ar_order['shop_orders_admin_address1'].\"<br>\";\n\t\t\t\t\t\t\t\t\t\tif ($ar_order['shop_orders_admin_address2'] != \"\"){echo $ar_order['shop_orders_admin_address2'].\"<br>\";}\n\techo \"\t\t\t\t\t\t\t</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_CITY.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\".$ar_order['shop_orders_admin_city'].\"</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_POSTCODE.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\".$ar_order['shop_orders_admin_postcode'].\"</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_COUNTRY.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\".$ar_order['shop_orders_admin_country'].\"</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_EMAIL.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\".$ar_order['shop_orders_admin_email_address'].\"</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_TELEPHONE.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\".$ar_order['shop_orders_admin_telephone'].\"</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t</table>\\n\";\n\techo \"\t\t\t\t</td>\\n\";\n\techo \"\t\t\t\t<td id=\\\"edenshop_progress_05_delivery\\\">\\n\";\n\techo \"\t\t\t\t\t<table id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_main_title\\\" colspan=\\\"2\\\"><strong>\"._SHOP_04_DELIVERY_ADDRESS.\"</strong></td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_NAME.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\\n\";\n\t\t\t\t\t\t\t\t\t\tif ($ar_order['admin_contact_shop_use'] == 0){\n\t\t\t\t\t\t\t\t\t\t\tif ($ar_order['shop_orders_admin_title'] != \"\"){echo $ar_order['shop_orders_admin_title'].\" \";} echo $ar_order['shop_orders_admin_firstname'].\" \".$ar_order['shop_orders_admin_name'];\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif ($ar_order['admin_contact_shop_title'] != \"\"){echo $ar_order['admin_contact_shop_title'].\" \";} echo $ar_order['admin_contact_shop_firstname'].\" \".$ar['admin_contact_shop_name'];\n\t\t\t\t\t\t\t\t\t\t}\n\techo \"\t\t\t\t\t\t\t</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_ADDRESS.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\\n\";\n\t\t\t\t\t\t\t\t\t\tif ($ar_order['admin_contact_shop_use'] == 0){\n\t\t\t\t\t\t\t\t\t\t\techo $ar_order['shop_orders_admin_address1'].\"<br>\";\n\t\t\t\t\t\t\t\t\t\t\tif ($ar_order['shop_orders_admin_address2'] != \"\"){echo $ar_order['shop_orders_admin_address2'].\"<br>\";}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\techo $ar_order['admin_contact_shop_address_1'].\"<br>\";\n\t\t\t\t\t\t\t\t\t\t\tif ($ar_order['admin_contact_shop_address_2'] != \"\"){echo $ar_order['admin_contact_shop_address_2'].'<br>';}\n\t\t\t\t\t\t\t\t\t\t}\n\techo \"\t\t\t\t\t\t\t</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_CITY.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\\n\";\n\t\t\t\t\t\t\t\t\t\tif ($ar_order['admin_contact_shop_use'] == 0){\n\t\t\t\t\t\t\t\t\t\t\techo $ar_order['shop_orders_admin_city'];\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\techo $ar_order['admin_contact_shop_city'];\n\t\t\t\t\t\t\t\t\t\t}\n\techo \"\t\t\t\t\t\t\t</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_CITY.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\\n\";\n\t\t\t\t\t\t\t\t\t\tif ($ar_order['admin_contact_shop_use'] == 0){\n\t\t\t\t\t\t\t\t\t\t\techo $ar_order['shop_orders_admin_city'];\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\techo $ar_order['admin_contact_shop_city'];\n\t\t\t\t\t\t\t\t\t\t}\n\techo \"\t\t\t\t\t\t\t</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_POSTCODE.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\\n\";\n\t\t\t\t\t\t\t\t\t \tif ($ar_order['admin_contact_shop_use'] == 0){\n\t\t\t\t\t\t\t\t\t\t\techo $ar_order['shop_orders_admin_postcode'];\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\techo $ar_order['admin_contact_shop_postcode'];\n\t\t\t\t\t\t\t\t\t\t}\n\techo \"\t\t\t\t\t\t\t</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr id=\\\"edenshop_progress_address\\\">\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_sub_title\\\">\"._SHOP_CUSTOMER_COUNTRY.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_address_address\\\">\\n\";\n\t\t\t\t\t\t\t\t\t \tif ($ar_order['admin_contact_shop_use'] == 0){\n\t\t\t\t\t\t\t\t\t\t\techo $ar_order['shop_orders_admin_country'];\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\techo $ar_order['admin_contact_shop_country'];\n\t\t\t\t\t\t\t\t\t\t}\n\techo \"\t\t\t\t\t\t\t</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t</table>\\n\";\n\techo \"\t\t\t\t</td>\\n\";\n\techo \"\t\t\t</tr>\\n\";\n\techo \"\t\t</table>\\n\";\n\techo \"\t</div>\\n\";\n\techo \"\t<div id=\\\"edenshop_progress_border_bottom\\\"></div>\\n\";\n\techo \"</div>\\n\";\n\techo \"<div align=\\\"center\\\">\\n\";\n\techo \"\t<div id=\\\"edenshop_progress_border_top\\\"></div>\\n\";\n\techo \"\t<div id=\\\"edenshop_progress_border_mid\\\">\\n\";\n\techo \"\t\t<div id=\\\"edenshop_progress_title\\\">\"._SHOP_05_DETAILS.\"</div><br><br>\\n\";\n\techo \"\t\t<table id=\\\"\\\" cellpadding=\\\"2\\\" cellspacing=\\\"1\\\" border=\\\"0\\\" width=\\\"100%\\\">\\n\";\n\techo \"\t\t\t<tr>\\n\";\n\techo \"\t\t\t\t<td align=\\\"center\\\"><strong>\"._SHOP_CONFIRM_INV_NUM.\"</strong></td>\\n\";\n\techo \"\t\t\t\t<td align=\\\"center\\\"><strong>\"._SHOP_CONFIRM_ACC_NUM.\"</strong></td>\\n\";\n\techo \"\t\t\t\t<td align=\\\"center\\\"><strong>\"._SHOP_CONFIRM_INV_DATE.\"</strong></td>\\n\";\n \t\t\t\t\t\t /* <td align=\\\"center\\\"><strong> echo _SHOP_CONFIRM_EST_DEL_DATE;</strong></td> --> */\n\techo \"\t\t\t\t<td align=\\\"center\\\"><strong>\"._SHOP_CONFIRM_IP.\"</strong></td>\\n\";\n\techo \"\t\t\t</tr>\\n\";\n\techo \"\t\t\t<tr>\\n\";\n\techo \"\t\t\t\t<td align=\\\"center\\\">\".$ar_order['shop_orders_invoice_id'].\"</td>\\n\";\n\techo \"\t\t\t\t<td align=\\\"center\\\">\".$ar_order['shop_orders_admin_id'].\"</td>\\n\";\n\techo \"\t\t\t\t<td align=\\\"center\\\">\".date(\"d.m.Y\").\"</td>\\n\";\n\t\t\t\t\t\t/* <!-- <td align=\\\"center\\\">d</td> --> */\n\techo \"\t\t\t\t<td align=\\\"center\\\">\".$ar_order['shop_orders_ip_address'].\"</td>\\n\";\n\techo \"\t\t\t</tr>\\n\";\n\techo \"\t\t</table>\\n\";\n\techo \"\t</div>\\n\";\n\techo \"\t<div id=\\\"edenshop_progress_border_bottom\\\"></div>\\n\";\n\techo \"</div>\\n\";\n\techo \"<div align=\\\"center\\\">\\n\";\n\techo \"\t<div id=\\\"edenshop_progress_border_top\\\"></div>\\n\";\n\techo \"\t<div id=\\\"edenshop_progress_border_mid\\\">\\n\";\n\techo \"\t\t<div id=\\\"edenshop_progress_title\\\">\"._SHOP_05_ORDER.\"</div><br><br>\\n\";\n\techo \"\t\t\t<table id=\\\"edenshop_progress_basket_headline\\\" cellpadding=\\\"2\\\" cellspacing=\\\"1\\\" border=\\\"0\\\">\\n\";\n\techo \"\t\t\t\t<tr id=\\\"edenshop_progress_basket_name\\\">\\n\";\n\techo \"\t\t\t\t\t<td id=\\\"edenshop_progress_basket_name_qty\\\">\"._SHOP_QTY.\"</td>\\n\";\n\techo \"\t\t\t\t\t<td id=\\\"edenshop_progress_basket_name_code\\\">\"._SHOP_CODE.\"</td>\\n\";\n\techo \"\t\t\t\t\t<td id=\\\"edenshop_progress_basket_name_title\\\">\"._SHOP_TITLE.\"</td>\\n\";\n\t\t\t\t\t\t\tif ($ar_setup['shop_setup_show_vat_subtotal'] == 1){ echo \"<td id=\\\"edenshop_progress_basket_name_ex_vat\\\">\"._SHOP_PRICE_EX_VAT_S.\"</td>\"; }\n\techo \"\t\t\t\t\t<td id=\\\"edenshop_progress_basket_name_inc_vat\\\">\"._SHOP_PRICE_INC_VAT_S.\"</td>\\n\";\n\techo \"\t\t\t\t</tr>\";\n\t$res_order_products = mysql_query(\"\n\tSELECT shop_orders_shop_product_id, shop_orders_shop_product_name, shop_orders_shop_product_tax, shop_orders_shop_product_price, shop_orders_shop_product_quantity \n\tFROM $db_shop_orders_product \n\tWHERE shop_orders_orders_id=\".(integer)$ar_order['shop_orders_id'].\" ORDER BY shop_orders_product_id ASC\"\n\t) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\twhile($ar_order_products = mysql_fetch_array($res_order_products)){\n\t\t$res_product = mysql_query(\"\n\t\tSELECT p.shop_product_id, p.shop_product_product_code, c.category_name \n\t\tFROM $db_shop_product AS p, $db_category AS c \n\t\tWHERE p.shop_product_id=\".(integer)$ar_order_products['shop_orders_shop_product_id'].\" AND c.category_id = p.shop_product_master_category\"\n\t\t) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t$ar_product = mysql_fetch_array($res_product);\n\t\t\n\t\t$price_inc_vat = $ar_order_products['shop_orders_shop_product_price'] * $ar_order_products['shop_orders_shop_product_quantity'];\n\t\t$price_ex_vat = $price_inc_vat / ($ar_order_products['shop_orders_shop_product_tax']/100+1);\n\t\t$price_vat = ($price_inc_vat - $price_ex_vat);\n\t\t\n\t\t$basket_ex_vat = TepRound($price_ex_vat,2);\n\t\t$basket_inc_vat = TepRound($price_inc_vat,2);\n\t\techo \"<tr>\\n\";\n\t\techo \"\t<td id=\\\"edenshop_progress_basket_qty\\\">\".$ar_order_products['shop_orders_shop_product_quantity'].\"</td>\\n\";\n\t\techo \"\t<td id=\\\"edenshop_progress_basket_code\\\"><a href=\\\"index.php?action=\".strtolower($ar_product['category_name']).\"&amp;lang=\".$_GET['lang'].\"&amp;filter=\".$_GET['filter'].\"&amp;prod_id=\".$ar_product['shop_product_id'].\"&amp;spec=1\\\">\".$ar_product['shop_product_product_code'].\"</a></td>\\n\";\n\t\techo \"\t<td id=\\\"edenshop_progress_basket_title\\\">\".$ar_order_products['shop_orders_shop_product_name'].\"</td>\\n\";\n\t\t\t\tif ($ar_setup['shop_setup_show_vat_subtotal'] == 1){ echo \"<td id=\\\"edenshop_progress_basket_ex_vat\\\">\".PriceFormat($basket_ex_vat).\"</td>\"; }\n\t\techo \"\t<td id=\\\"edenshop_progress_basket_inc_vat\\\">\".PriceFormat($basket_inc_vat).\"</td>\\n\";\n\t\techo \"</tr>\\n\";\n\t\t$total_nett_price = $price_ex_vat + $total_nett_price;\n\t\t$total_vat = $price_vat + $total_vat;\n\t\t$subtotal = $price_inc_vat + $subtotal;\n\t}\n\t$total_total = $total_nett_price + $total_vat + $ar_order['shop_orders_carriage_price'];\n\techo \"</table>\\n\";\n\techo \"<table id=\\\"edenshop_progress_basket_headline\\\" cellpadding=\\\"2\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\n\techo \"\t<tr>\\n\";\n\techo \"\t\t<td id=\\\"edenshop_progress_basket_recalculate\\\"><br><span id=\\\"edenshop_progress_05_order_status\\\">\\n\";\n\t\t\t\t\tswitch ($ar_order['shop_orders_orders_status']) {\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\techo _SHOP_ORDER_STATUS_1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"2\":\n\t\t\t\t\t\techo _SHOP_ORDER_STATUS_2;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"3\":\n\t\t\t\t\t\techo _SHOP_ORDER_STATUS_3;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"4\":\n\t\t\t\t\t\techo _SHOP_ORDER_STATUS_4;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"5\":\n\t\t\t\t\t\techo _SHOP_ORDER_STATUS_5;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"6\":\n\t\t\t\t\t\techo _SHOP_ORDER_STATUS_6;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"7\":\n\t\t\t\t\t\techo _SHOP_ORDER_STATUS_7;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\techo \"\t\t\t</span>\";\n\techo \"\t\t\t\t</td>\\n\";\n\techo \"\t\t\t\t<td id=\\\"edenshop_progress_basket_total\\\">\\n\";\n\techo \"\t\t\t\t\t<table width=\\\"100%\\\" cellpadding=\\\"2\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\n\t\t\t\t\t\t\t\tif ($ar_setup['shop_setup_show_vat_subtotal'] == 1){\n\t\t\t\t\t\t\t\t\techo \"<tr>\\n\";\n\t\t\t\t\t\t\t\t\techo \" \t<td id=\\\"edenshop_progress_basket_total\\\">\"._SHOP_NETT_TOTAL.\"</td>\\n\";\n\t\t\t\t\t\t\t\t\techo \" \t<td id=\\\"edenshop_progress_basket_total_price\\\">\".PriceFormat(TepRound($total_nett_price)).\"</td>\\n\";\n\t\t\t\t\t\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t\t\t\t\t\techo \"\t<tr>\\n\";\n\t\t\t\t\t\t\t\t\techo \"\t<td colspan=\\\"2\\\" id=\\\"edenshop_progress_basket_dotted\\\"></td>\\n\";\n\t\t\t\t\t\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t\t\t\t\t\techo \"<tr>\\n\";\n\t\t\t\t\t\t\t\t\techo \"\t<td id=\\\"edenshop_progress_basket_total\\\">\"._SHOP_TOTAL_VAT.\"</td>\\n\";\n\t\t\t\t\t\t\t\t\techo \"\t<td id=\\\"edenshop_progress_basket_total_price\\\">\".$basket_total_vat = TepRound($total_vat,2); PriceFormat($basket_total_vat).\"</td>\\n\";\n\t\t\t\t\t\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t\t\t\t\t\techo \"<tr>\\n\";\n\t\t\t\t\t\t\t\t\techo \"\t<td colspan=\\\"2\\\" id=\\\"edenshop_progress_basket_dotted\\\"></td>\\n\";\n\t\t\t\t\t\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\techo \"<tr>\\n\";\n\t\t\t\t\t\t\t\t\techo \"\t<td id=\\\"edenshop_progress_basket_total\\\">\"._SHOP_SUBTOTAL.\"</td>\\n\";\n\t\t\t\t\t\t\t\t\techo \"\t<td id=\\\"edenshop_progress_basket_total_price\\\">\".PriceFormat(TepRound($subtotal,2)).\"</td>\\n\";\n\t\t\t\t\t\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t\t\t\t\t\techo \"<tr>\\n\";\n\t\t\t\t\t\t\t\t\techo \"\t<td colspan=\\\"2\\\" id=\\\"edenshop_basket_dotted\\\"></td>\\n\";\n\t\t\t\t\t\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t\t\t\t\t}\n\techo \"\t\t\t\t\t\t<tr>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_basket_total\\\">\"._SHOP_CARRIAGE.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_basket_total_price\\\">\".PriceFormat(TepRound($ar_order['shop_orders_carriage_price'])).\"</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr>\\n\";\n\techo \"\t\t\t\t\t\t\t<td colspan=\\\"2\\\" id=\\\"edenshop_progress_basket_dotted\\\"></td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t\t<tr>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_basket_total\\\">\"._SHOP_TOTAL.\"</td>\\n\";\n\techo \"\t\t\t\t\t\t\t<td id=\\\"edenshop_progress_basket_total_total\\\">\".PriceFormat(TepRound($total_total)).\"</td>\\n\";\n\techo \"\t\t\t\t\t\t</tr>\\n\";\n\techo \"\t\t\t\t\t</table>\\n\";\n\techo \"\t\t\t\t</td>\\n\";\n\techo \"\t\t\t</tr>\\n\";\n\techo \"\t\t</table>\\n\";\n\techo \"\t</div>\\n\";\n\techo \"\t<div id=\\\"edenshop_progress_border_bottom\\\"></div>\\n\";\n\techo \"</div>\\n\";\n\tif ($_GET['state'] == \"ok\"){\n\t\techo \"<div align=\\\"center\\\">\\n\";\n\t\techo \"\t<div id=\\\"edenshop_progress_border_top\\\"></div>\\n\";\n\t\techo \"\t<div id=\\\"edenshop_progress_border_mid\\\">\\n\";\n\t\techo \"\t\t<div id=\\\"edenshop_progress_title\\\">\"._SHOP_05_ADDITIONAL_INFO.\"</div><br><br>\\n\";\n\t\techo \"\t\t<table id=\\\"edenshop_progress_05\\\">\\n\";\n\t\techo \"\t\t\t<tr>\\n\";\n\t\techo \"\t\t\t\t<td id=\\\"edenshop_progress_05_ai\\\">\\n\";\n\t\techo \"\t\t\t\t\t\".$ar_setup['shop_setup_05_additional'].\"\\n\";\n\t\techo \"\t\t\t\t</td>\\n\";\n\t\techo \"\t\t\t</tr>\\n\";\n\t\techo \"\t\t</table>\\n\";\n\t\techo \"\t</div>\\n\";\n\t\techo \"\t<div id=\\\"edenshop_progress_border_bottom\\\"></div>\\n\";\n\t\techo \"</div><br>\";\n\t}\n}", "public function inventory() {\n // Not clear if we can implement this... (or should...)\n throw new DomainException(\"NOT IMPLEMENTED\");\n }", "public function rpt_summary_fuel_sarana($start, $end)\n {\n \t$query = $this->db->query('select \n a.nap,\n b.code_unit,\n b.nomor_plat,\n a.tanggal_pengisian,\n a.qty,\n a.hmkm,\n get_empname (a.fuelman) fuelman,\n get_empname (a.fuelman) driver \nFROM\n vehicle_fuel_consumption a LEFT JOIN vehicle_master b ON a.nap = b.nap\nWHERE DATE(a.tanggal_pengisian) BETWEEN \"'.$start.'\" \n AND \"'.$end.'\" ORDER BY a.nap, a.tanggal_pengisian ');\n \treturn $query->result();\n }", "public function finish()\n {\n parent::finish();\n \n foreach( $this->get_record_list() as $record )\n {\n $db_site = $record->get_site();\n $db_region = $record->get_region();\n\n // assemble the row for this record\n $this->add_row( $record->id,\n array( 'site.name' => $db_site ? $db_site->name : 'any',\n 'city' => $record->city ? $record->city : 'any',\n 'region.name' => $db_region ? $db_region->name : 'any',\n 'postcode' => $record->postcode ? $record->postcode : 'any' ) );\n }\n\n $this->finish_setting_rows();\n }", "protected function startTable() {}", "function Release($NbReleasing, $idPlace, $idGame)\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"UPDATE fishermenland.place SET PondFishesPlace = PondFishesPlace - CEILING($NbReleasing), ReleasedFishesPlace = ReleasedFishesPlace + CEILING($NbReleasing) WHERE idPlace = '$idPlace'\");\n $req = $dbh->query(\"UPDATE fishermenland.game SET LakeFishesGame = LakeFishesGame + CEILING($NbReleasing) WHERE idGame = '$idGame'\");\n}", "public function refactorBasedonItems()\n {\n foreach ($this->quote->cabinets AS $cabinet)\n {\n if ($cabinet->wood_xml)\n {\n $woods = self::returnWoodArray($cabinet);\n foreach ($woods AS $wood)\n {\n $this->cabItems += $wood['qty'];\n $this->instItems += $wood['qty'];\n }\n }\n }\n\n /*\n if ($this->cabItems < 30)\n {\n $this->cabItems = 30;\n }\n\n if ($this->instItems < 30 && $this->quote->type != 'Cabinet Small Job')\n {\n $this->instItems = 30;\n }\n\n\n if ($this->instItems > 35 && $this->instItems < 40)\n {\n $this->instItems = 40;\n }\n\n // Start Staging Price Blocks.\n if ($this->cabItems > 30 && $this->cabItems < 40)\n {\n $this->cabItems = 40;\n }\n */\n\n // For Designer\n if ($this->quote->type == 'Full Kitchen' || $this->quote->type == 'Cabinet and Install')\n {\n if ($this->cabItems <= 35)\n {\n $this->forDesigner = $this->getSetting('dL35');\n }\n else\n {\n if ($this->cabItems > 35 && $this->cabItems <= 55)\n {\n $this->forDesigner = $this->getSetting('dG35L55');\n }\n else\n {\n if ($this->cabItems > 55 && $this->cabItems <= 65)\n {\n $this->forDesigner = $this->getSetting('dG55L65');\n }\n else\n {\n if ($this->cabItems > 65 && $this->cabItems <= 75)\n {\n $this->forDesigner = $this->getSetting('dG65L75');\n }\n else\n {\n if ($this->cabItems > 75 && $this->cabItems <= 85)\n {\n $this->forDesigner = $this->getSetting('dG75L85');\n }\n else\n {\n if ($this->cabItems > 85 && $this->cabItems <= 94)\n {\n $this->forDesigner = $this->getSetting('dG85L94');\n }\n else\n {\n if ($this->cabItems > 94 && $this->cabItems <= 110)\n {\n $this->forDesigner = $this->getSetting('dG94L110');\n }\n else\n {\n if ($this->cabItems > 110)\n {\n $this->forDesigner = $this->getSetting('dG110');\n }\n }\n }\n }\n }\n }\n }\n }\n\n }\n else\n {\n if ($this->quote->type == 'Cabinet Small Job' || $this->quote->type == 'Builder')\n {\n $this->forDesigner = 250;\n }\n }\n\n // ----------------------- Quote Type Specific values\n\n // For Frugal + on Quote and remove plumber and electrician rates.\n if ($this->quote->type == 'Cabinet Only')\n {\n foreach ($this->quote->cabinets AS $cabinet)\n {\n if (!$cabinet->cabinet || !$cabinet->cabinet->vendor)\n {\n echo \\BS::alert(\"danger\", \"Unable To Determine Cabinets\",\n \"Cabinet type has not been selected! Unable to figure multiplier.\");\n return;\n }\n $add = ($cabinet->price * $cabinet->cabinet->vendor->multiplier) * .40;\n $this->forFrugal += $add; // Frugal gets 40% of the cabprice\n $this->setDebug(\"40% of {$cabinet->cabinet->frugal_name} to Frugal\", $add);\n $amt = ($cabinet->measure) ? 500 : 250;\n $this->forDesigner += $amt;\n $this->setDebug(\"Field Measure for Designer (Y=500/N=250)\", $amt);\n $this->forFrugal += 250; // for cabinet buildup.\n $this->setDebug(\"Frugal got $250 for Buildup\", 250);\n switch ($cabinet->location)\n {\n case 'North':\n $this->forFrugal += 300;\n $this->setDebug(\"Delivery North\", 300);\n break;\n case 'South':\n $this->forFrugal += 200;\n $this->setDebug(\"Delivery South\", 200);\n break;\n default:\n $this->forFrugal += 500;\n $this->setDebug(\"Further than 50m\", 500);\n break;\n }\n } // fe\n }\n else\n {\n if ($this->quote->type == 'Granite Only')\n {\n $this->forInstaller = 0;\n $this->forPlumber = 350;\n $this->forElectrician = 0;\n //$this->appElectrician = 0 ;\n //$this->forDesigner = 0;\n }\n else\n {\n if ($this->quote->type == \"Cabinet and Install\" || $this->quote->type == 'Builder')\n {\n if ($this->quote->type == 'Cabinet and Install')\n {\n foreach ($this->quote->cabinets AS $cabinet)\n {\n $add = ($cabinet->price * $cabinet->cabinet->vendor->multiplier) * .40;\n $this->forFrugal += $add; // Frugal gets 40% of the cabprice\n $this->setDebug(\"40% of {$cabinet->cabinet->frugal_name} to Frugal\", $add);\n }\n\n $this->forInstaller += $this->instItems * 20; // get 20 per installable item not attach\n $this->forFrugal += 250; // For delivery\n $this->forFrugal += 250; // for cabinet buildup.\n $this->forFrugal += $this->instItems * 10; // Cabinet + Install gets $10 for frugal.\n $this->forFrugal += $this->attCount * 30; // Attachment Count.\n } // If it's cabinet install\n else\n {\n if ($this->instItems < 40)\n {\n $this->forInstaller += 500;\n }\n else\n {\n $remainder = $this->instItems - 40;\n $this->forInstaller += 500;\n $this->forInstaller += $remainder * 10;\n } // more than 40\n } // If builder\n } // if cabinet and install or builder\n else\n {\n if ($this->cabItems <= 35)\n {\n $this->forFrugal += $this->getSetting('fL35');\n }\n else\n {\n if ($this->cabItems > 35 && $this->cabItems <= 55)\n {\n $this->forFrugal += $this->getSetting('fG35L55');\n }\n else\n {\n if ($this->cabItems > 55 && $this->cabItems <= 65)\n {\n $this->forFrugal += $this->getSetting('fG55L65');\n }\n else\n {\n if ($this->cabItems > 65 && $this->cabItems <= 75)\n {\n $this->forFrugal += $this->getSetting('fG65L75');\n }\n else\n {\n if ($this->cabItems > 75 && $this->cabItems <= 85)\n {\n $this->forFrugal += $this->getSetting('fG75L85');\n }\n else\n {\n if ($this->cabItems > 85 && $this->cabItems <= 94)\n {\n $this->forFrugal += $this->getSetting('fG85L94');\n }\n else\n {\n if ($this->cabItems > 94 && $this->cabItems <= 110)\n {\n $this->forFrugal += $this->getSetting('fG94L110');\n }\n else\n {\n if ($this->cabItems > 110)\n {\n $this->forFrugal += $this->getSetting('fG110');\n }\n }\n }\n }\n }\n }\n }\n }\n\n $this->forFrugal += ($this->attCount * 20);\n $this->setDebug(\"Frugal gets Attachment count * 20\", $this->attCount * 20);\n $this->forInstaller += ($this->instItems * 20);\n $this->setDebug(\"Installer gets Cabinet Installable ($this->instItems * 20)\",\n $this->instItems * 20);\n }\n }\n }\n\n $this->forElectrician += $this->appElectrician;\n $this->forPlumber += $this->appPlumber;\n $this->forInstaller += $this->accInstaller;\n $this->forFrugal += $this->accFrugal;\n // Additional - LED Lighting let's add this.\n $this->forDesigner += $this->designerLED;\n $this->forFrugal += $this->frugalLED;\n $this->forElectrician += $this->electricianLED;\n\n // No electrician or plumber if cabinet + install\n // For Frugal + on Quote and remove plumber and electrician rates.\n if ($this->quote->type == 'Cabinet and Install' || $this->quote->type == 'Cabinet Only')\n {\n $this->forPlumber = 0;\n $this->forElectrician = 0;\n }\n if ($this->quote->type == 'Cabinet Only')\n {\n $this->forInstaller = 0;\n }\n\n if ($this->quote->type == 'Granite Only')\n {\n $this->forElectrician = 0;\n }\n /*\n if ($this->quote->type == 'Cabinet Small Job')\n {\n if (!isset($this->gPrice))\n {\n $this->gPrice = 0;\n }\n\n $gMarkup = $this->gPrice * .2;\n $this->forFrugal += $gMarkup;\n\n $this->setDebug(\"Small Job Marks up Granite 20%\", $gMarkup);\n $sTotal = 0;\n if (isset($this->meta['sinks']))\n {\n foreach ($this->meta['sinks'] AS $sink)\n {\n if (!$sink)\n {\n continue;\n }\n $sink = Sink::find($sink);\n $sTotal += $sink->price;\n }\n $sMarkup = $sTotal * .2;\n $this->setDebug(\"Small Job Marks up Sink Costs 20%\", $sMarkup);\n $this->forFrugal += $sMarkup;\n }\n }\n */\n if ($this->quote->type == 'Cabinet Small Job')\n {\n $markup = $this->total * .4;\n $this->setDebug(\"Applying 40% Markup to Frugal for Cabinet Small Job\", $markup);\n $this->forFrugal = $markup;\n }\n\n // Add for installer to total\n $this->total += $this->forInstaller;\n $this->setDebug(\"Applying Installer Payouts to Quote\", $this->forInstaller);\n $this->total += $this->forElectrician;\n $this->setDebug(\"Applying Electrician Payouts to Quote\", $this->forElectrician);\n $this->total += $this->forPlumber;\n $this->setDebug(\"Applying Plumber Payouts to Quote\", $this->forPlumber);\n if ($this->quote->type != 'Builder')\n {\n $this->total += $this->forFrugal;\n $this->setDebug(\"Applying Frugal Payouts to Quote\", $this->forFrugal);\n }\n $this->total += $this->forDesigner;\n $this->setDebug(\"Applying Designer Payouts to Quote\", $this->forDesigner);\n if ($this->quote->type == 'Builder')\n {\n if ($this->quote->markup == 0)\n {\n $this->quote->markup = 30;\n $this->quote->save();\n }\n\n $perc = $this->quote->markup / 100;\n $markup = $this->total * $perc;\n $this->total += $markup;\n $this->setDebug(\"Applying {$this->quote->markup}% to Total For Builder Markup\", $markup);\n $this->forFrugal = $markup;\n }\n\n }", "function generateStore($grid_id, $journey_id, $character_id) {\n\t\t\n\t\tglobal $debug_enabled;\n\t\t\n\t\taddToDebugLog(\"generateStore(), Function Entry - Parameters: Grid ID: \" . $grid_id . \"; Journey ID: \" . $journey_id . \"; Character ID: \" . $character_id . \", INFO\");\n\t\t\n\t\t// Store will have 0-2 of each item\n\t\t// Items will be range from lowest modifier of existing items, to 5 levels above the highest modifier\n\t\t// Cost of an item will be 50 x the modifier value\n\t\t\n\t\t// Generate Store Name\n\t\t$store_name = generateStoreName();\n\t\t\n\t\t// Create store\n\t\t$dml = \"INSERT INTO hackcess.store (store_name, grid_id, journey_id, character_id) VALUES ('\" . $store_name . \"', \" . $grid_id . \", \" . $journey_id . \", \" . $character_id . \");\";\n\t\t$result = insert($dml);\n\t\tif ($result == TRUE) {\n\t\t\taddToDebugLog(\"generateStore(), New journal entry added, INFO\");\n\t\t} else {\n\t\t\taddToDebugLog(\"generateStore(), New journal entry not added, ERROR\");\n\t\t}\n\t\t\n\t\t// Get store ID\n\t\t$sql = \"SELECT store_id FROM hackcess.store ORDER BY store_id DESC LIMIT 1;\";\n\t\t$result = search($sql);\n\t\t$store_id = $result[0][0];\n\t\t\n\t\t// Populate with items\n\t\t\n\t\t// Get character lowest rank equipped item\n\t\t$sql = \"SELECT * FROM hackcess.character_equipment WHERE character_id = \" . $character_id . \";\";\n\t\t$result = search($sql);\n\t\t$rows = count($result);\n\t\t\n\t\t$min_ac = 1000;\n\t\t$min_atk = 1000;\n\t\tfor ($i = 0; $i < $rows; $i++) {\n\t\t\t$is_equipped = isEquipped($result[$i][5], $result[$i][0], $character_id);\n\t\t\tif ($is_equipped == 1 && $result[$i][2] > 0 && $result[$i][2] < $min_ac) { // AC\n\t\t\t\t$min_ac = $result[$i][2];\n\t\t\t}\n\t\t\tif ($is_equipped == 1 && $result[$i][3] > 0 && $result[$i][3] < $min_atk) { // ATK\n\t\t\t\t$min_atk = $result[$i][3];\n\t\t\t}\t\t\t\n\t\t}\n\t\taddToDebugLog(\"generateStore(), Min AC: \" . $min_ac . \"; Min ATK: \" . $min_atk . \", INFO\");\n\n\t\t// Head Items\n\t\tsrand(make_seed());\n\t\t$num_items = rand(1, 3);\n\t\tfor ($item = 0; $item < $num_items; $item++) {\n\t\t\tcreateStoreItem('head', $store_id, $min_ac);\n\t\t}\n\n\t\t// Chest Items\n\t\tsrand(make_seed());\n\t\t$num_items = rand(1, 3);\n\t\tfor ($item = 0; $item < $num_items; $item++) {\n\t\t\tcreateStoreItem('chest', $store_id, $min_ac);\n\t\t}\n\t\t\n\t\t// Legs Items\n\t\tsrand(make_seed());\n\t\t$num_items = rand(1, 3);\n\t\tfor ($item = 0; $item < $num_items; $item++) {\n\t\t\tcreateStoreItem('legs', $store_id, $min_ac);\n\t\t}\n\t\t\n\t\t// Shield Items\n\t\tsrand(make_seed());\n\t\t$num_items = rand(1, 3);\n\t\tfor ($item = 0; $item < $num_items; $item++) {\n\t\t\tcreateStoreItem('shield', $store_id, $min_ac);\n\t\t}\n\t\t\n\t\t// Sword Items\n\t\tsrand(make_seed());\n\t\t$num_items = rand(1, 3);\n\t\tfor ($item = 0; $item < $num_items; $item++) {\n\t\t\tcreateStoreItem('weapon', $store_id, $min_atk);\n\t\t}\n\n\t\t// Potions\n\t\tsrand(make_seed());\n\t\t$num_items = rand(1, 5);\n\t\tfor ($item = 0; $item < $num_items; $item++) {\n\t\t\tcreatePositiveEffect($store_id);\n\t\t}\n\n\t\t// Pets\n\t\tsrand(make_seed());\n\t\t$num_items = rand(0, 2);\n\t\tif ($debug_enabled == 1) { $num_items = 1; }\n\t\tfor ($item = 0; $item < $num_items; $item++) {\n\t\t\tcreateNewPet($store_id);\n\t\t}\n\t\t\n\t}", "public function begin(){\n $this->db->exec('SAVEPOINT xyz;');\n }", "public function takeFromStock($quantity = 1) {\n $this->leftInStock = $this->leftInStock - $quantity;\n $this->save();\n }", "function update_start_stage( $conds = array() )\n\t{\n\n\t\t$sql = \"UPDATE rt_transactions_status SET start_stage = '0' WHERE id != '\". $conds['id'] .\"' \";\n\t\t\n\t\t$query = $this->db->query($sql);\n\n\t\treturn $query;\n\t\t\n\t}", "public function run()\n {\n\n if (env('APP_ENV') != 'production') {\n\n $h = new Tool();\n $h->type = 'tool';\n $h->name = \"Clé à molette\";\n $h->description = \"Ben une clé quoi !\";\n $h->picture = NULL;\n $h->wardrobe_id = 89;\n $h->room_id = 2;\n $h->remainingQuantity = 4;\n $h->minQuantity = 2;\n $h->quantityUnit = \"unité\";\n $h->supplier = \"fournisseur\";\n $h->save();\n\n $h = new Chemical();\n $h->type = 'chemical';\n $h->name = \"TNT\";\n $h->description = \"Boom\";\n $h->picture = NULL;\n $h->room_id = 2;\n $h->wardrobe_id = 96;\n $h->remainingQuantity = 9;\n $h->minQuantity = 8;\n $h->quantityUnit = \"unité\";\n $h->toxicity = \"Importante\";\n $h->expiryDate = '2018-05-01';\n $h->dateOfPurchase = '2016-09-05';\n $h->supplier = \"NSA\";\n $h->save();\n\n $h = new Tool();\n $h->name = \"Lance-patate\";\n $h->description = \"C'est plutot cool mais c'est inutile.\";\n $h->picture = NULL;\n $h->room_id = 1;\n $h->remainingQuantity = 4;\n $h->minQuantity = 2;\n $h->quantityUnit = \"unité\";\n $h->save();\n\n }\n }", "public function dbAnalysisStoreExec() {}", "function RESET_DB($type) {\n\n $id=$this->IDpr;\n $this->DB->query(\"UPDATE products SET end_{$type}=NULL , {$type}=NULL WHERE id='{$id}' \");\n }", "function startCountingAdded()\n {\n\t$this->resetCountAdded();\n\t$this->startCountingAddedLevels();\n\t$this->startCountingAddedVehicles();\n\t$this->doStartCountingAdded();\n }", "function addProd($categoryId, $invName, $invDescription, $invImage, $invThumbnail, $invPrice, $invStock, $invSize, $invWeight, $invLocation, $invVendor, $invStyle) {\n $db = acmeConnect();\n //SQL\n $sql = 'INSERT INTO inventory (categoryId, invName, invDescription, invImage, invThumbnail, invPrice, invStock, invSize, invWeight, invLocation, invVendor, invStyle) VALUES (:categoryId, :invName, :invDescription, :invImage, :invThumbnail, :invPrice, :invStock, :invSize, :invWeight, :invLocation, :invVendor, :invStyle)';\n // Create the prepared statement using the acme connection\n $stmt = $db->prepare($sql);\n // The next 11 lines replace the placeholders in the SQL\n // statement with the actual values in the variables\n // and tells the database the type of data it is\n $stmt->bindValue(':categoryId', $categoryId, PDO::PARAM_STR);\n $stmt->bindValue(':invName', $invName, PDO::PARAM_STR);\n $stmt->bindValue(':invDescription', $invDescription, PDO::PARAM_STR);\n $stmt->bindValue(':invImage', $invImage, PDO::PARAM_STR);\n $stmt->bindValue(':invThumbnail', $invThumbnail, PDO::PARAM_STR);\n $stmt->bindValue(':invPrice', $invPrice, PDO::PARAM_STR);\n $stmt->bindValue(':invStock', $invStock, PDO::PARAM_STR);\n $stmt->bindValue(':invSize', $invSize, PDO::PARAM_STR);\n $stmt->bindValue(':invWeight', $invWeight, PDO::PARAM_STR);\n $stmt->bindValue(':invLocation', $invLocation, PDO::PARAM_STR);\n $stmt->bindValue(':invVendor', $invVendor, PDO::PARAM_STR);\n $stmt->bindValue(':invStyle', $invStyle, PDO::PARAM_STR);\n //this runs the statements above and inserts the data into the database\n $stmt->execute();\n //this checks to see how many rows were added as a result of the above statements\n $rowsChanged = $stmt->rowCount();\n //this closes the interaction between the function and the database server\n $stmt->closeCursor();\n //This sends the results from the rowCount above to the controller (used in showing a success message I assume)\n return $rowsChanged;\n }", "public function renderList()\n\t{\n $this->toolbar_title = $this->l('Inventory reports');\n \n if (Tools::isSubmit('id_container') && Tools::getValue('id_container') > 0)\n self::$currentIndex .= '&id_container='.(int)Tools::getValue('id_container');\n\n\t\t// Détermination de l'id container. Si aucun sélectionné, on prend le premier\n\t\tif (($id_container = $this->getCurrentValue('id_container')) == false)\n\t\t{\n\t\t\t$id_container = (int)Inventory::getFirstId();\n\t\t\t$this->tpl_list_vars['id_container'] = $id_container;\n\t\t}\n \n // get total stock gap of inventory\n $total_stock_gap = InventoryProduct::getTotalStockGap($id_container);\n \n\t\t $this->tpl_list_vars['total_gap'] = Tools::displayPrice($total_stock_gap);\n \n\t\t// Query\n\t\t$this->_select = '\n IF(a.id_warehouse = -1, \"'. html_entity_decode($this->l('No warehouse')) .'\",a.id_warehouse) as id_warehouse,\n\t\t\t\t\tpl.name as name,\n\t\t\t\t\tp.reference,\n\t\t\t\t\tsmrl.name as reason,\n\t\t\t\t\tsmr.sign, (\n\t\t\t\t\ta.qte_after - a.qte_before) as gap,\n\t\t\t\t\t(\n\t\t\t\t\t\tSELECT ps.product_supplier_reference\n\t\t\t\t\t\tFROM '._DB_PREFIX_.'product_supplier ps\n\t\t\t\t\t\tWHERE ps.id_product = a.id_product\n\t\t\t\t\t\tAND ps.id_product_attribute = 0\n\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t)as first_supplier_ref ';\n\t\t$this->_join = 'INNER JOIN '._DB_PREFIX_.'product_lang pl ON (a.id_product = pl.id_product AND pl.id_lang = '.(int)$this->context->language->id.')\n\t\t\t\tINNER JOIN '._DB_PREFIX_.'product p ON a.id_product = p.id_product\n\t\t\t\tINNER JOIN '._DB_PREFIX_.'stock_mvt_reason_lang smrl ON (a.id_mvt_reason = smrl.id_stock_mvt_reason AND smrl.id_lang = '.(int)$this->context->language->id.')\n\t\t\t\tINNER JOIN '._DB_PREFIX_.'stock_mvt_reason smr ON a.id_mvt_reason = smr.id_stock_mvt_reason\n\t\t\t\tINNER JOIN '._DB_PREFIX_.'erpip_inventory i ON a.id_erpip_inventory = i.id_erpip_inventory';\n\t\t$this->_where = 'AND i.id_erpip_inventory = '.$id_container;\n\t\t$this->_order = 'a.id_erpip_inventory_product DESC';\n\t\t$this->_group = 'GROUP BY a.id_erpip_inventory_product';\n\n\t\t// Envoi valeurs à la vue\n\t\t$this->tpl_list_vars['containers'] = Inventory::getContainers();\n\n\t\t$list = parent::renderList();\n\t\treturn $list;\n\t}", "public function addInventory($data)\n\t{\n\t\t$addInventory = $this->insert($data);\n\t\t$data['id_inventories'] = $this->getLastInsertValue();\n\t\treturn $data;\n\t}", "public function getInventorySnapshot()\n {\n return $this->inventory_snapshot;\n }", "public function run()\n { \n \t\\DB::table('ingredients')->insert(array (\n 'id_type' => '1',\n 'id_unit' => '1',\n 'ingrediente' => 'Harina Pan',\n 'stock' => '0',\n \t'caracteristica' => 'Precocida',\n 'stock_min' => '20',\n ));\n\n \\DB::table('providers_has_ingredients')->insert(array (\n 'ingrediente_id' => '1',\n \t'proveedor_id' => '1',\n ));\n\n \\DB::table('providers_has_ingredients')->insert(array (\n 'ingrediente_id' => '1',\n \t'proveedor_id' => '2',\n ));\n\n \\DB::table('ingredients')->insert(array (\n 'id_type' => '4',\n 'id_unit' => '4',\n 'ingrediente' => 'Maceite',\n 'stock' => '0',\n \t'caracteristica' => 'Aceite de soya',\n 'stock_min' => '20',\n\n ));\n\n \\DB::table('providers_has_ingredients')->insert(array (\n 'ingrediente_id' => '2',\n \t'proveedor_id' => '1',\n ));\n\n \\DB::table('providers_has_ingredients')->insert(array (\n 'ingrediente_id' => '2',\n \t'proveedor_id' => '2',\n ));\n }", "function State_32($parameters) \n\t{\n\t\t$application_id = $parameters->application_id;\n\t\tRemove_Standby($parameters->application_id);\n\t\tSet_Standby($application_id, $parameters->company_id, 'hold_reschedule');\n\t}", "function take_action_j($take_what){\n $_SESSION[\"inventory\"][$take_what]++;\n $_SESSION['world'][$_SESSION[\"room\"]][\"stuff\"][$take_what]--;\n echo (show_inv());\n}", "public function retractArms() {\n\t\techo \"Power units have not been started.<br>\";\n\t}" ]
[ "0.5603414", "0.5541704", "0.5300339", "0.5249104", "0.520799", "0.5109058", "0.5102577", "0.50899875", "0.50768036", "0.5054634", "0.5050996", "0.5027616", "0.50144535", "0.5011416", "0.49986196", "0.49305484", "0.49125412", "0.49048203", "0.48784658", "0.48768386", "0.4871974", "0.48538652", "0.4847672", "0.48421028", "0.4840012", "0.48225698", "0.4816187", "0.4807402", "0.479554", "0.47871146", "0.47729045", "0.47595158", "0.4754957", "0.4747074", "0.4711362", "0.47062433", "0.46934077", "0.46929568", "0.46883166", "0.46834594", "0.46792525", "0.46760118", "0.46711868", "0.46687526", "0.466749", "0.46631002", "0.46591252", "0.4650227", "0.46444407", "0.46402663", "0.46348718", "0.46333826", "0.4630217", "0.46291888", "0.4626619", "0.46249926", "0.4623429", "0.46176332", "0.4612218", "0.46099147", "0.46034127", "0.45999902", "0.45967317", "0.45935944", "0.4592649", "0.4589152", "0.45865977", "0.45860443", "0.45847085", "0.45815518", "0.45811015", "0.45781744", "0.4577012", "0.45749083", "0.4574877", "0.45680544", "0.45655644", "0.4563456", "0.45616356", "0.45568064", "0.45523363", "0.45445818", "0.45414817", "0.45393848", "0.4538632", "0.4536308", "0.45259824", "0.45217744", "0.45215476", "0.4518639", "0.45125535", "0.45085168", "0.449965", "0.44995895", "0.44989392", "0.44988874", "0.44977614", "0.44955236", "0.4489292", "0.44884342", "0.44883728" ]
0.0
-1
/ inventory end / / unit start/
public function getUnitQtyByUnitId ( $id ) { $this->db->select( 'qty' ); $this->db->where( "id", $id ); $query = $this->db->get( 'tbld_unit' )->result_array(); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function outOperation(){\n $this->inventory->setQuantity($this->inventory->getQuantity() - $this->getQuantity());\n $this->type = \"OUT\";\n }", "public function getUnit();", "public function startPowerUnits() {\n\t\t\n\t}", "public function nextUnit(): string;", "public function deleteOperation(){\n if($this->type == \"IN\"){\n $this->inventory->setQuantity($this->inventory->getQuantity() - $this->getQuantity());\n }else{\n $this->inventory->setQuantity($this->inventory->getQuantity() + $this->getQuantity());\n }\n }", "public function startPowerUnits() {\n\t\techo \"power units started.<br>\";\n\t\t$this->missionControl->setState($this->missionControl->getRetractArms());\n\t}", "public function getEnd();", "public function object()\n\t{\n\t\treturn \"InventoryAdjustmentLine\";\n\t}", "public function testDestiny2EquipItem()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testDestiny2EquipItems()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public static function manageinventory()\n\t\t{\n\t\t\t$stageDBO = DatabaseObjectFactory::build('Material');\n\t\t\t$arr = ['material_id','unit_price'];\n\t\t\t$materials = $stageDBO->getRecords($arr);\n\t\t\t\n\t\t\t$stageDBO = DatabaseObjectFactory::build('craft');\n\t\t\t$arr = ['craft_id','calculated_qoh'];\n\t\t\t$stageDBO->SetJoin(['[><]item' => 'item_id']);\n\t\t\t$crafts = $stageDBO->getRecords($arr);\n\n\t\t\t$stageDBO = DatabaseObjectFactory::build('return_details');\n\t\t\t$stageDBO->SetJoin(['[><]item' => 'item_id']);\n\t\t\t$arr = ['return_id','item_id','qty','current_price'];\n\t\t\t$returns = $stageDBO->getRecords($arr);\n\n\t\t\tinclude('views/pages/manageinventory.php');\n\t\t}", "abstract public function getUnitOfMaterial(): string;", "function out($code=\"\", $category=\"\", $qty=0, $desc=\"\", $type=INVENTORY_TYPE, $warehouse=0)\n {\n $product = $this->m_product->getdata_detail(array(\"product_variant_code\"=>$code));\n\n // $data = $this->getdata(array(\"inventory_item_code\"=>$code, \"inventory_categories\"=>$category, \"inventory_operator\"=>\"in\"),1,\"\",\"inventory_id\",\"desc\");\n $data = $this->getdata(array(\"inventory_item_code\"=>$code, \"inventory_categories\"=>$category),1,\"\",\"inventory_id\",\"desc\");\n\n if($code==\"\" || $category==\"\" || $qty==\"\" || $product->num_rows()!=1 || $data->num_rows()!=1)\n {\n die(\"parameter out inventory harus di lengkapi, item code : $code, category : $category\");\n }\n\n // jika tidak ada item ini di inventory maka tidak perlu kalkulasi stock_awal, average_nominal dll\n if($data->num_rows()==1)\n {\n $nominal_average = $data->row()->inventory_average_nominal_now_per_item;\n $stock_awal = $data->row()->inventory_total_stock_now;\n $nominal_awal = $data->row()->inventory_total_nominal_now;\n $total_qty = $data->row()->inventory_total_stock_now - $qty;\n $total_nominal = $data->row()->inventory_total_nominal_now - ($data->row()->inventory_average_nominal_now_per_item*$qty);\n }\n\n // set nama product\n if($product->row()->product_variant_type==\"\" || $product->row()->product_variant_value==\"\")\n {\n $name = $product->row()->product_name;\n }\n else {\n $name = $product->row()->product_name.\" - \".$product->row()->product_variant_type.\" - \".$product->row()->product_variant_value;\n }\n\n // set log inventory\n if($desc==\"\")\n {\n $desc = \"insert by \".$this->session->userdata('username');\n }\n\n $data_insert = array(\n \"inventory_item_code\" => $code,\n \"inventory_name\" => $name,\n \"inventory_categories\" => $category,\n \"inventory_item_type\" => $type,\n \"inventory_operator\" => \"out\",\n \"inventory_qty\" => $qty,\n \"inventory_nominal_per_item\" => $nominal_average,\n \"inventory_total_nominal\" => $nominal_average*$qty,\n \"inventory_stock_awal\" => $stock_awal,\n \"inventory_nominal_stock_awal\" => $nominal_awal,\n \"inventory_average_nominal_now_per_item\" => $nominal_average,\n \"inventory_total_stock_now\" => $total_qty,\n \"inventory_total_nominal_now\" => $total_nominal,\n \"inventory_warehouse_id\" => $warehouse,\n \"inventory_date_craeted\" => date('Y-m-d H:i:s'),\n \"inventory_log\" => $desc,\n );\n $this->db->insert('inventory', $data_insert);\n return $this->db->insert_id();\n }", "public function productinspector($start_id, $end_id);", "function extract_unit($string, $start, $end)\n {\n $pos = stripos($string, $start);\n $str = substr($string, $pos);\n $str_two = substr($str, strlen($start));\n $second_pos = stripos($str_two, $end);\n $str_three = substr($str_two, 0, $second_pos);\n $unit = trim($str_three); // remove whitespaces\n\n return $unit;\n }", "public function updateProductInventory($command)\n {\n $command->info('Updating inventory...');\n $items = $this->sqlRepository->use(Item::class)->findAll();\n\n /** @var Item $item */\n foreach($items as $item)\n {\n $command->line('Evaluating Item ID: ' . $item->id);\n $rel_stock_locations = $item->rel_stock_location_items()->where('is_inactive', false)->get();\n\n /** @var RelStockLocationItem $rel_stock_location */\n foreach($rel_stock_locations as $rel_stock_location)\n {\n $quantity_reserved = 0;\n $total_quantity = ($rel_stock_location->quantity_available ?? 0);\n $total_quantity += ($rel_stock_location->quantity_reserved ?? 0);\n\n // Open all order lines on this line item\n $line_items = TransactionLineItem::whereRaw('item_id = ? AND transaction_line_itemable_type =? AND status != ?',\n [$item->id, 'SalesOrder', 'out_of_stock'])\n ->get();\n\n // Filter out line items that are not shipping from this location\n $line_items = $line_items->filter(function(TransactionLineItem $tli) use($rel_stock_location) {\n return($tli->ship_from_location_id == $rel_stock_location->stock_location_id);\n })\n ->filter(function(TransactionLineItem $tli) {\n // Filter out lines that are on canceled or shipped orders\n $parent_sales_order = SalesOrder::where('transaction_id', $tli->transaction_id)->first();\n return(in_array($parent_sales_order->status, ['pending', 'processing']));\n });\n\n /** @var TransactionLineItem $line_item */\n foreach($line_items as $line_item)\n {\n $quantity_reserved += $line_item->quantity;\n }\n\n $quantity_available = $total_quantity - $quantity_reserved;\n\n if($quantity_available < 0)\n $quantity_available = 0;\n\n if($quantity_reserved < 0)\n $quantity_reserved = 0;\n\n $rel_stock_location->quantity_reserved = $quantity_reserved;\n $rel_stock_location->quantity_available = $quantity_available;\n $rel_stock_location->save();\n\n $command->comment('Stock Location: ' . $rel_stock_location->stock_location->name . ' | Reserved: ' . $quantity_reserved . ' | Avail: ' . $quantity_available);\n }\n }\n\n $command->info('Complete!');\n }", "public function testBookedSpacesEnd()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-17 15:00:00\";\n $end = \"2017-06-20 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "public function getTargetInventoryQuantity()\n {\n return $this->targetInventoryQuantity;\n }", "function in($code=\"\", $category=\"\", $qty=0, $nominal=\"\", $desc=\"\", $type=INVENTORY_TYPE, $warehouse=0)\n {\n $product = $this->m_product->getdata_detail(array(\"product_variant_code\"=>$code));\n\n if($code==\"\" || $category==\"\" || $qty==\"\" || $nominal==\"\" || $product->num_rows()!=1)\n {\n die(\"parameter insert inventory harus di lengkapi, item code : $code, category : $category\");\n }\n\n $data = $this->getdata(array(\"inventory_item_code\"=>$code, \"inventory_categories\"=>$category),1,\"\",\"inventory_id\",\"desc\");\n\n // jika tidak ada item ini di inventory maka tidak perlu kalkulasi stock_awal, average_nominal dll\n if($data->num_rows()!=1)\n {\n $stock_awal = 0;\n $nominal_awal = 0;\n $nominal_average = $nominal;\n $total_qty = $qty;\n $total_nominal = $nominal*$qty;\n }\n else {\n // hitung average\n for($a=0;$a<($qty+$data->row()->inventory_total_stock_now);$a++)\n {\n if($a<$qty)\n {\n $avr[] = $nominal;\n }\n else {\n $avr[] = $data->row()->inventory_average_nominal_now_per_item;\n }\n }\n\n $nominal_average = array_sum($avr)/($qty+$data->row()->inventory_total_stock_now);\n $stock_awal = $data->row()->inventory_total_stock_now;\n $nominal_awal = $data->row()->inventory_total_nominal_now;\n $total_qty = $data->row()->inventory_total_stock_now+$qty;\n $total_nominal = $data->row()->inventory_total_nominal_now+($nominal*$qty);\n }\n\n // set nama product\n if($product->row()->product_variant_type==\"\" || $product->row()->product_variant_value==\"\")\n {\n $name = $product->row()->product_name;\n }\n else {\n $name = $product->row()->product_name.\" - \".$product->row()->product_variant_type.\" - \".$product->row()->product_variant_value;\n }\n\n // set log inventory\n if($desc==\"\")\n {\n $desc = \"insert by \".$this->session->userdata('username');\n }\n\n $data_insert = array(\n \"inventory_item_code\" => $code,\n \"inventory_name\" => $name,\n \"inventory_categories\" => $category,\n \"inventory_item_type\" => $type,\n \"inventory_operator\" => \"in\",\n \"inventory_qty\" => $qty,\n \"inventory_nominal_per_item\" => $nominal,\n \"inventory_total_nominal\" => $nominal*$qty,\n \"inventory_stock_awal\" => $stock_awal,\n \"inventory_nominal_stock_awal\" => $nominal_awal,\n \"inventory_average_nominal_now_per_item\" => $nominal_average,\n \"inventory_total_stock_now\" => $total_qty,\n \"inventory_total_nominal_now\" => $total_nominal,\n \"inventory_warehouse_id\" => $warehouse,\n \"inventory_date_craeted\" => date('Y-m-d H:i:s'),\n \"inventory_log\" => $desc,\n );\n $this->db->insert('inventory', $data_insert);\n return $this->db->insert_id();\n }", "public function inventory() {\n // Not clear if we can implement this... (or should...)\n throw new DomainException(\"NOT IMPLEMENTED\");\n }", "function extract_unit($string, $start, $end)\n{\n\t$pos = stripos($string, $start);\n\t$str = substr($string, $pos);\n\t$str_two = substr($str, strlen($start));\n\t$second_pos = stripos($str_two, $end);\n\t$str_three = substr($str_two, 0, $second_pos);\n\n\t$unit = trim($str_three); // remove whitespaces\n\n\treturn $unit;\n}", "public function inOperation(){\n //When an Operation is created we have to adjust the price of the inventory\n //and the quantity\n //We adjust the price of the inventory based on the last In\n $this->inventory->setQuantity($this->inventory->getQuantity() + $this->getQuantity());\n $this->inventory->setPrice($this->price);\n $this->type = \"IN\";\n }", "public function getSlotEnd()\n {\n return $this->slotEnd;\n }", "abstract public function getStart();", "public function getEnd() {}", "public function getRangeUnit(): string;", "public function getInventorySnapshot()\n {\n return $this->inventory_snapshot;\n }", "public function getUnit()\n\t{\n\t\treturn null;\n\t}", "public function setInventory($itemId, $qty, $unit_id = null)\n {\n $stockClass = config('mojito.stockClass','Stock');\n $pivot = $stockClass::where('warehouse_id', '=', $this->id)->where('item_id','=',$itemId)->first();\n\n if ($pivot == null) {\n if ($unit_id == null) {\n $itemClass = config('mojito.itemClass', 'Item');\n $unit_id = $itemClass::find($itemId)->unit_id;\n }\n $stockClass::create([\n 'warehouse_id' => $this->id,\n 'item_id' => $itemId,\n 'quantity' => $qty,\n 'alert' => 0,\n 'unit_id' => $unit_id\n ]);\n } else{\n $pivot->update([\"quantity\" => $qty]);\n }\n\n return StockMovement::create([\n 'item_id' => $itemId,\n 'to_warehouse_id' => $this->id,\n 'quantity' => $qty,\n 'action' => Warehouse::ACTION_SET_INVENTORY\n ]);\n }", "protected abstract function unit();", "function get_initial_inventory() {\n return [\n 'A' => 2,\n 'B' => 3,\n 'C' => 1,\n 'D' => 0,\n 'E' => 0\n ];\n}", "public function testBookedSpacesStart()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-14 15:00:00\";\n $end = \"2017-06-17 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(2, $total_places);\n }", "public function getEnd(): int;", "public function total_fuel_ga($start, $end)\n {\n \t$query = $this->db->query('select \n a.nap,\n b.code_unit,\n b.nomor_plat,\n a.tanggal_pengisian,\n SUM(a.qty) total\n FROM\n vehicle_fuel_consumption a LEFT JOIN vehicle_master b ON a.nap = b.nap\nWHERE DATE(a.tanggal_pengisian) BETWEEN \"'.$start.'\" \n AND \"'.$end.'\" GROUP BY a.nap');\n \treturn $query->result();\n }", "function Units($args=array())\n {\n $this->Hash2Object($args);\n $this->AlwaysReadData=array(\"Name\");\n $this->Sort=array(\"Name\");\n $this->IDGETVar=\"Unit\";\n $this->UploadFilesHidden=FALSE;\n }", "public function start_harvest(){\n $this->checkinit();\n $this->harvest_laststart = $this->dt();\n $this->save_flags();\n }", "function StartEnd($v)\n{\n\treturn (preg_match(\"/^\\*\\*\\* (?:START|END)/m\",$v));\n}", "public function getInventoryMode();", "function characterEquipment($character_id, $player_id, $journey_id, $store_id) {\n\t\n\t\taddToDebugLog(\"characterEquipment(), Function Entry - supplied parameters: Player ID: \" . $player_id . \"; Journey ID: \" . $journey_id . \"; Character ID: \" . $charcter_id . \"; Store ID: \" . $store_id . \", INFO\");\n\t\t\n\t\t// Get Character Name\n\t\t$character_name = getCharacterDetails($character_id, 'character_name');\n\t\n\t\techo \"<table cellpadding=3 cellspacing=0 border=1>\";\n\t\techo \"<tr><td colspan=5 align=center><h2>\" . $character_name . \"</h2></tr>\";\n\t\techo \"<tr bgcolor=#bbb><td>Item<td align=center>Weight<td align=center>Value<td align=center>Actions</tr>\";\n\t\n\t\t$sql = \"SELECT * FROM hackcess.character_equipment WHERE character_id = \" . $character_id . \" AND slot NOT LIKE 'potion%' AND slot NOT LIKE 'pet%' ORDER BY slot ASC, ac_boost, attack_boost DESC;\";\n\t\t$result = search($sql);\n\t\t$rows = count($result);\n\t\n\t\t// 0: ID\n\t\t// 1: Name\n\t\t// 2: AC Boost\n\t\t// 3: ATK Boost\n\t\t// 4: Weight\n\t\t// 5: Slot\n\t\n\t\t$weight_total = 0;\n\t\t$current_slot = \"\";\n\t\tfor ($e = 0; $e < $rows; $e++) {\n\t\n\t\t\tif ($result[$e][5] != $current_slot) {\n\t\t\t\techo \"<tr><td colspan=5 bgcolor=#ddd align=center>\" . ucfirst($result[$e][5]) . \"</tr>\";\n\t\t\t\t$current_slot = $result[$e][5];\n\t\t\t}\n\t\n\t\t\t$bonus = $result[$e][2] + $result[$e][3];\n\t\t\techo \"<tr><td>+\" . $bonus . \" \" . $result[$e][1]; // Bonus + Item\n\t\t\techo \"<td align=center>\" . $result[$e][4]; // Weight\n\t\t\t\n\t\t\t//Value\n\t\t\t$value = $bonus * 50;\n\t\t\techo \"<td align=center>\" . $value;\n\t\n\t\t\t// Determine if the item of equipment is equipped or not\n\t\t\t$is_equipped = isEquipped($result[$e][5], $result[$e][0], $character_id);\n\t\t\t$weight_total = $weight_total + $result[$e][4];\n\t\t\tif ($is_equipped == 1) {\n\t\t\t\techo \"<td align=center bgcolor=#6f3>Equipped\";\n\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\techo \"<td align=center>\";\n\t\t\t\techo \"<a href='store.php?slot=\" . $result[$e][5] . \"&item_id=\" . $result[$e][0] . \"&character_id=\" . $character_id . \"&player_id=\" . $player_id . \"&journey_id=\" . $journey_id . \"&store_id=\" . $store_id . \"&action=sell'>Sell</a>\"; // $slot, $item_id, $character_id\n\t\t\t\techo \" | <a href='store.php?slot=\" . $result[$e][5] . \"&item_id=\" . $result[$e][0] . \"&character_id=\" . $character_id . \"&player_id=\" . $player_id . \"&journey_id=\" . $journey_id . \"&store_id=\" . $store_id . \"&action=equip&slot=\" . $result[$e][5] . \"'>Equip</a>\";\n\t\t\t}\n\t\t\t\t\n\t\t\techo \"</tr>\";\n\t\t\t\t\n\t\t}\n\t\n\t\t// Display Character potions\n\t\t$sql = \"SELECT * FROM hackcess.character_equipment WHERE character_id = \" . $character_id . \" AND slot LIKE 'potion%' ORDER BY ac_boost, attack_boost DESC;\";\n\t\t$result = search($sql);\n\t\t$rows = count($result);\t\n\n\t\techo \"<tr><td colspan=5 bgcolor=#ddd align=center>Potions</tr>\";\n\t\t\n\t\tfor ($p = 0; $p < $rows; $p++) {\n\t\t\t\n\t\t\techo \"<tr><td>\" . $result[$p][1]; // Item\n\t\t\techo \"<td align=center>-\"; // Weight\n\t\t\t\t\n\t\t\t//Value\n\t\t\t$potion_name = explode(' ', $result[$p][1]);\n\t\t\t$value = $potion_name[3] * 100;\n\t\t\techo \"<td align=center>\" . $value;\n\t\t\t\n\t\t\t// Write actions Sell\n\t\t\techo \"<td align=center>\";\n\t\t\techo \"<a href='store.php?slot=\" . $result[$p][5] . \"&item_id=\" . $result[$p][0] . \"&character_id=\" . $character_id . \"&player_id=\" . $player_id . \"&journey_id=\" . $journey_id . \"&store_id=\" . $store_id . \"&action=sell'>Sell</a>\"; // $slot, $item_id, $character_id\n\t\t\techo \"</tr>\";\t\t\t\n\t\t\t\n\t\t}\n\n\t\t// Display Character pets\n\t\t$sql = \"SELECT * FROM hackcess.character_equipment WHERE character_id = \" . $character_id . \" AND slot LIKE 'pet%';\";\n\t\t$result = search($sql);\n\t\t$rows = count($result);\n\t\t\n\t\techo \"<tr><td colspan=5 bgcolor=#ddd align=center>Pets</tr>\";\n\t\t\n\t\tfor ($p = 0; $p < $rows; $p++) {\n\t\t\t\t\n\t\t\t$details = explode(',', $result[$p][1]);\n\t\t\t$type = substr($result[$p][5], 4);\n\t\t\t\n\t\t\techo \"<tr><td>\" . $details[0] . \", Lvl \" . $details[1] . \" \" . ucfirst($type); // Item\n\t\t\techo \"<td align=center>-\"; // Weight\n\t\t\n\t\t\t//Value\n\t\t\t$value = ($details[1] * 500) + 5000;\n\t\t\techo \"<td align=center>\" . $value;\n\t\t\t\t\n\t\t\t// Write actions Sell\n\t\t\techo \"<td align=center>\";\n\t\t\techo \"<a href='store.php?slot=\" . $result[$p][5] . \"&item_id=\" . $result[$p][0] . \"&character_id=\" . $character_id . \"&player_id=\" . $player_id . \"&journey_id=\" . $journey_id . \"&store_id=\" . $store_id . \"&action=sell'>Sell</a>\"; // $slot, $item_id, $character_id\n\t\t\techo \"</tr>\";\n\t\t\t\t\n\t\t}\n\t\t\n\t\t// Get character strength\t\t\n\t\t$character_strength = getCharacterDetailsInfo($character_id, 'strength');\n\t\t$effects = getEffectBoosts($character_id);\n\t\t$traits = getTraitBoosts($character_id);\n\t\t$total_strength = $character_strength + $effects[\"str\"] + $traits[\"str\"];\n\t\t\n\t\techo \"<tr><td align=right>Total Weight<td align=center>\" . $weight_total;\n\t\techo \"<td align=center>\" . $total_strength . \"<td align=left>Strength</tr>\";\n\t\t\n\t\t// Character Gold\n\t\t$character_gold = getCharacterDetailsInfo($character_id,'gold');\n\t\techo \"<tr><td align=right colspan=2>Character Gold<td align=center>\" . $character_gold . \"<td></tr>\";\n\t\t\n\t\techo \"</table>\";\n\t \n\t}", "public function getUnitAmount();", "public function retractArms() {\n\t\techo \"Power units have not been started.<br>\";\n\t}", "public function getStart();", "public function getStart();", "function inventory_total($inventory) {\n $inventory_total = 0;\n foreach ($inventory as $product_id => $quantity) {\n $inventory_total += $quantity;\n }\n return $inventory_total;\n}", "function recordInventory($run_timestamp, $location, $beer, $size, $inventory, $brewery_id)\n{\n\t$formattedSize = parseToMatchSiteshTable($size);\n\t$quantityInPackage = $formattedSize[0];\n\t$packageType = $formattedSize[1];\n\t$volumeML = $formattedSize[2];\n\n\t$recordStatement = \"INSERT INTO inventory_parsing (run_timestamp, beerstore_beer_id, beerstore_store_id, can_bottle_desc, single_package_type, single_package_quantity, single_package_volume, stock_at_timestamp, brewery_id)\n\tVALUES ('$run_timestamp', '$beer', '$location', '$size', '$packageType', '$quantityInPackage', '$volumeML', '$inventory', '$brewery_id')\";\n\tbeerTrackDBQuery($recordStatement);\n}", "function output_inventory_screen($member_id)\n{\n\tif ((is_null($member_id)) || ($member_id==-1)) $member_id=get_member();\n\n\t$pic='';\n\t$avatar='';\n\tif ($member_id>$GLOBALS['FORUM_DRIVER']->get_guest_id())\n\t{\n\t\t$username=$GLOBALS['FORUM_DRIVER']->get_username($member_id);\n\t\tif (is_null($username)) $username=do_lang('UNKNOWN');\n\t\tif (method_exists($GLOBALS['FORUM_DRIVER'],'get_member_photo_url')) $pic=$GLOBALS['FORUM_DRIVER']->get_member_photo_url($member_id);\n\t\tif (method_exists($GLOBALS['FORUM_DRIVER'],'get_member_avatar_url')) $avatar=$GLOBALS['FORUM_DRIVER']->get_member_avatar_url($member_id);\n\t} else\n\t{\n\t\t$username=$GLOBALS['SITE_DB']->query_value('w_realms','troll_name',array('id'=>(-$member_id-1)));\n\t}\n\t$title=get_page_title('W_INVENTORY_OF',true,array(escape_html($username)));\n\t$health=$GLOBALS['SITE_DB']->query_value('w_members','health',array('id'=>$member_id));\n\n\t$rows=$GLOBALS['SITE_DB']->query_select('w_inventory',array('*'),array('item_owner'=>$member_id));\n\t$inventory=new ocp_tempcode();\n\tforeach ($rows as $myrow)\n\t{\n\t\t$item_rows=$GLOBALS['SITE_DB']->query_select('w_itemdef',array('*'),array('name'=>$myrow['item_name']));\n\t\tif (!array_key_exists(0,$item_rows)) continue;\n\t\t$item_row=$item_rows[0];\n\t\t$pic_url=$item_row['picture_url'];\n\t\tif ((url_is_local($pic_url)) && ($pic_url!='')) $pic_url=get_custom_base_url().'/'.str_replace(' ','%20',$pic_url);\n\t\t$description=$item_row['description'];\n\t\t$bribable=$item_row['bribable'];\n\t\t$healthy=$item_row['healthy'];\n\n\t\t$width='';\n\t\tif ($pic_url!='')\n\t\t{\n\t\t\t$ext=strtolower(substr($pic_url,strlen($pic_url)-4));\n\t\t\t$mypic=false;\n\t\t\tif (($ext=='jpeg') || ($ext=='.jpg')) $mypic=@imagecreatefromjpeg($pic_url);\n\t\t\tif ($ext=='.png') $mypic=@imagecreatefrompng($pic_url);\n\t\t\tif ((function_exists('imagecreatefromgif')) && ($ext=='.gif')) $mypic=@imagecreatefromgif($pic_url);\n\t\t\tif (($mypic===false) || (imagesx($mypic)>200)) $width='width: 200px';\n\t\t}\n\n\t\t$inventory->attach(do_template('W_INVENTORY_ITEM',array('_GUID'=>'6850866532d2e5a65ca1b74f5ed8e49a','HEALTHY'=>$healthy==1,'BRIBABLE'=>$bribable==1,'WIDTH'=>$width,'PIC_URL'=>$pic_url,'ITEM_NAME'=>$myrow['item_name'],'DESCRIPTION'=>$description,'ITEM_COUNT'=>integer_format($myrow['item_count']))));\n\t}\n\n\treturn do_template('W_INVENTORY_SCREEN',array('_GUID'=>'74dd29919831eb75212b9805511fdca8','TITLE'=>$title,'USERNAME'=>$username,'HEALTH'=>integer_format($health),'AVATAR'=>$avatar,'PIC'=>$pic,'INVENTORY'=>$inventory));\n}", "public function add_inventory() {\n\t\t$values=array(\"brand_id\"=>$_POST['brand_list_id'],\"product_id\"=>$_POST['product_list_id'],\"item_name\"=>$_POST['item_name'],\"entry_date\"=>$_POST['purchase_date'],\"buy_price\"=>$_POST['product_buy_price'],\"sell_price\"=>$_POST['product_sell_price'],\"quantity\"=>$_POST['item_qty'],\"update_by\"=>isset($_SESSION['user_id']));\n\t\tif($this->insert(\"inventory\",$values)) {\t\n\t\t\t$result=$this->runQuery('getAll','select max(id) as inv_item_id from inventory');\n\t\t\techo '{\"inventoryItemList\":{\"updateFlag\":false,\"item\":'.json_encode($result).'}}';\n\t\t}\n\t\telse\n\t\t\techo 'Error while inserting inventory tbl';\n\t}", "public function getElUnit() {\n return $this->cElUnit;\n }", "public function calculateQtyToShip();", "public function testBookedSpacesAfter()\n {\n $room = $this->objFromFixture(\n \"BookableProduct\",\n \"fancyroom\"\n );\n\n $start = \"2017-06-18 15:00:00\";\n $end = \"2017-06-25 11:00:00\";\n\n // Check that we find the correct number of \n // already booked spaces in thei time period\n $total_places = SimpleBookings::getTotalBookedSpaces(\n $start,\n $end,\n $room->ID\n );\n\n $this->assertEquals(0, $total_places);\n }", "public function getStart(): float;", "public function removeFromInventory()\n {\n self::Log('removed from inventory', $this->char_id);\n $this->char_id = null;\n $this->Update();\n }", "function mergeInventoryQuantities($left, $right)\n {\n // protecting against values below -1\n if (isset($left) && $left < -1) {\n $left = -1;\n }\n\n // protecting against values below -1\n if (isset($right) && $right < -1) {\n $right = -1;\n }\n\n if (!isset($left) || $left <= 0 && $right != 0) {\n return $right;\n }\n\n if (!isset($right) || $right <= 0 && $left != 0) {\n return $left;\n }\n\n return $left + $right;\n }", "public function getStart(): int;", "public function setBuffFromItems()\n {\n\n if (isset($_SESSION[\"inventory\"]) && sizeof($_SESSION[\"inventory\"]) > 0) {\n\n $atk_total_items = 0;\n $health_total_items = 0;\n $mana_total_items = 0;\n\n foreach ($_SESSION['inventory'] as $item) {\n if ($item->getStatAtk()) {\n $atk_total_items += $item->getStatAtk();\n }\n if ($item->getStatHealth()) {\n $health_total_items += $item->getStatHealth();\n }\n if ($item->getStatMana()) {\n $mana_total_items += $item->getStatMana();\n }\n }\n\n $_SESSION[\"character\"]->setAtk($_SESSION[\"character\"]->getBaseAtk() + $atk_total_items);\n $_SESSION[\"character\"]->setHp($_SESSION[\"character\"]->getBaseHp() + $health_total_items);\n $_SESSION[\"character\"]->setMana($_SESSION[\"character\"]->getBaseMana() + $mana_total_items);\n\n $_SESSION[\"character\"]->setBuffActivated(true);\n }\n }", "public function getProductionDetail($line, $item, $start, $end)\n\t{\n\t\t$line = $line ? sprintf('and sx.Ref_DayChuyen = %1$d', $line) : '';\n\t\t$item = $item ? sprintf('and ctsp.Ref_MaSanPham = %1$d', $item) : '';\n\n\t\t$sql = sprintf(' \n\t\t\t\t\t\tselect SUM(sl.SoLuong) as SanLuongThucTe, t.*\n\t\t\t\t\t\tfrom \n\t\t\t\t\t\t\t(select sx.MaLenhSX, sx.Ref_DayChuyen\n\t\t\t\t\t\t \t,ctsp.Ref_MaSanPham,ctsx.MaSP,ctsx.TenSP, sx.DayChuyen\n\t\t\t\t\t\t\tfrom OSanXuat as sx\n\t\t\t\t\t\t\tinner join OChiTietSanXuat as ctsx on ctsx.IFID_M710 = sx.IFID_M710\n\t\t\t\t\t\t\tinner join OCauThanhSanPham as ctsp\n\t\t\t\t\t\t\ton ctsp.Ref_MaSanPham = ctsx.Ref_MaSP\n\t\t\t\t\t\t\twhere \n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(sx.TuNgay between %3$s and %4$s)\n\t\t\t\t\t\t\t\t\tor\n\t\t\t\t\t\t\t\t\t(sx.DenNgay between %3$s and %4$s)\n\t\t\t\t\t\t\t\t) \n\t\t\t\t\t\t\t\t%1$s %2$s\n\t\t\t\t\t\t\t) as t\n\t\t\t\t\t\t\tinner join OThongKeSanLuong as tksl on tksl.MaLenhSX = t.MaLenhSX\n\t\t\t\t\t\t\tinner join OSanLuong as sl on sl.IFID_M717 = tksl.IFID_M717\n\t\t\t\t\t\t\tgroup by t.Ref_DayChuyen, sl.MaSP \n\t\t\t\t\t\t\torder by t.Ref_DayChuyen, sl.MaSP\n\t\t\t\t\t\t ', $line, $item, $this->_o_DB->quote($start), $this->_o_DB->quote($end));\n\t\treturn $this->_o_DB->fetchOne($sql);\n\n\t}", "abstract public function getOriginalQty();", "function removeFromInventory($userid, $ingredient, $qty, $units){\n\t\t if((userid != NULL) && ($ingredient != NULL) && ($qty != NULL)&& ($units != NULL))\n\t\t { \n\t\t if($qty <= 0)\n\t\t return;\n\t\t $amt = mysql_query(\"SELECT Quantity as Quantity FROM Inventory WHERE (UserID = '$userid' AND IngredientName = '$ingredient' AND Units ='$units')\");\n\t\t $amtdata = mysql_fetch_assoc($amt);\n if($amtdata['Quantity'] > $qty)\n\t\t\t @mysql_query(\"UPDATE Inventory SET Quantity = Quantity - '$qty' WHERE (UserID = '$userid' AND IngredientName = '$ingredient' AND Units ='$units')\");\n\t\t else\n\t\t @mysql_query(\"DELETE FROM Inventory WHERE (UserID = '$userid' AND IngredientName = '$ingredient' AND Units ='$units')\");\n\t }\n\t}", "public function update_product_inventory()\n\t{\n\t\t/* Prepare statement */\n\t\tif (!$stmt_product_info = $this->mysqli->prepare('SELECT \n\t\tproduct.out_of_stock,\n\t\tproduct.out_of_stock_enabled,\n\t\tIF(product_variant.id IS NOT NULL,product_variant.qty,product.qty) AS qty\n\t\tFROM\n\t\tproduct \n\t\tLEFT JOIN\n\t\tproduct_variant\n\t\tON\n\t\t(product.id = product_variant.id_product AND product_variant.id = ?)\n\t\tWHERE\n\t\tproduct.id = ?\t\t\n\t\tAND\n\t\tproduct.track_inventory=1\n\t\tLIMIT 1')) throw new Exception('An error occured while trying to prepare get product track inventory info statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\n\t\t/* Prepare statement */\n\t\tif (!$stmt_upd_product_variant = $this->mysqli->prepare('UPDATE \n\t\tproduct_variant \n\t\tSET\n\t\tqty = ?,\n\t\tactive = ?\n\t\tWHERE\n\t\tid = ?')) throw new Exception('An error occured while trying to prepare update product variant qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\t\t\n\t\t/* Prepare statement */\n\t\tif (!$stmt_upd_product = $this->mysqli->prepare('UPDATE \n\t\tproduct\n\t\tSET\n\t\tqty = ?,\n\t\tactive = ?\n\t\tWHERE\n\t\tid = ?')) throw new Exception('An error occured while trying to prepare update product qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\n\t\t\n\t\t/* Prepare statement */\n\t\tif (!$stmt_option_info = $this->mysqli->prepare('SELECT \n\t\tout_of_stock\n\t\tFROM\n\t\toptions\n\t\tWHERE\n\t\tid = ?\n\t\tAND\n\t\ttrack_inventory=1\n\t\tLIMIT 1')) throw new Exception('An error occured while trying to prepare get options track inventory info.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\n\t\t\n\t\t/* Prepare statement */\n\t\tif (!$stmt_upd_option = $this->mysqli->prepare('UPDATE \n\t\toptions\n\t\tSET\n\t\tqty = IF(qty <= ?,0,qty - ?)\n\t\tWHERE\n\t\tid = ?')) throw new Exception('An error occured while trying to prepare update options qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\t\t\n\t\t$products = $this->get_products();\t\t\t\t\n foreach ($products as $row_product) {\n // Update Sub_product ELSE Update Product\n\t\t\tif (sizeof($row_product['sub_products'])) {\n foreach ($row_product['sub_products'] as $row_sub_product) {\n\t\t\t\t\t// sub product qty multipled by parent product qty\n\t\t\t\t\t$qty = $row_product['qty']*$row_sub_product['qty'];\n\t\t\t\t\t\n\t\t\t\t\tif (!$stmt_product_info->bind_param(\"ii\",$row_sub_product['id_product_variant'], $row_sub_product['id_product'])) throw new Exception('An error occured while trying to bind params to get product info statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\n\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t$stmt_product_info->execute();\n\t\t\t\t\t\n\t\t\t\t\t/* store result */\n\t\t\t\t\t$stmt_product_info->store_result();\t\t\n\t\t\t\t\t\n\t\t\t\t\tif ($stmt_product_info->num_rows) {\t\t\t\t\n\t\t\t\t\t\t/* bind result variables */\n\t\t\t\t\t\t$stmt_product_info->bind_result($out_of_stock,$out_of_stock_enabled,$qty_remaining);\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$stmt_product_info->fetch();\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$qty_in_stock = $qty_remaining-$qty;\n\t\t\t\t\t\tif ($qty_in_stock < 0) $qty_in_stock = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$active = $out_of_stock_enabled && $qty_in_stock == $out_of_stock ? 0:1;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($row_sub_product['id_product_variant']){\n\t\t\t\t\t\t\tif (!$stmt_upd_product_variant->bind_param(\"iii\", $qty_in_stock, $active,$row_sub_product['id_product_variant'])) throw new Exception('An error occured while trying to bind params to update product variant qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\t\tif (!$stmt_upd_product_variant->execute()) throw new Exception('An error occured while trying to update product variant qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif (!$stmt_upd_product->bind_param(\"iii\", $qty_in_stock, $active,$row_sub_product['id_product'])) throw new Exception('An error occured while trying to bind params to update product qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\t\tif (!$stmt_upd_product->execute()) throw new Exception('An error occured while trying to update product qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n }\n }else{\n\t\t\t\t// product qty\n\t\t\t\t$qty = $row_product['qty'];\n\t\t\t\t\n\t\t\t\tif (!$stmt_product_info->bind_param(\"ii\", $row_product['id_product_variant'], $row_product['id_product'])) throw new Exception('An error occured while trying to bind params to get product info statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\n\t\t\t\t/* Execute the statement */\n\t\t\t\t$stmt_product_info->execute();\n\t\t\t\t\n\t\t\t\t/* store result */\n\t\t\t\t$stmt_product_info->store_result();\t\t\n\t\t\t\t\n\t\t\t\tif ($stmt_product_info->num_rows) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t/* bind result variables */\n\t\t\t\t\t$stmt_product_info->bind_result($out_of_stock,$out_of_stock_enabled, $qty_remaining);\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$stmt_product_info->fetch();\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$qty_in_stock = $qty_remaining-$qty;\n\t\t\t\t\tif ($qty_in_stock < 0) $qty_in_stock = 0;\n\t\t\t\t\t\n\t\t\t\t\t$active = $out_of_stock_enabled && $qty_in_stock == $out_of_stock ? 0:1;\n\t\t\t\t\t\n\t\t\t\t\tif($row_product['id_product_variant']){\n\t\t\t\t\t\tif (!$stmt_upd_product_variant->bind_param(\"iii\", $qty_in_stock, $active,$row_product['id_product_variant'])) throw new Exception('An error occured while trying to bind params to update product variant qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\tif (!$stmt_upd_product_variant->execute()) throw new Exception('An error occured while trying to update product variant qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif (!$stmt_upd_product->bind_param(\"iii\",$qty_in_stock, $active,$row_product['id_product'])) throw new Exception('An error occured while trying to bind params to update product qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\tif (!$stmt_upd_product->execute()) throw new Exception('An error occured while trying to update product qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n // Update Options\n\t\t\tif(sizeof($this->get_product_options($row_product['id']))){\n $options = $this->get_product_options($row_product['id']);\n foreach ($options as $row_product_option_group) { \n foreach ($row_product_option_group['options'] as $row_product_option) {\n\t\t\t\t\t\t// sub product qty multipled by parent product qty\n\t\t\t\t\t\t$qty = $row_product['qty']*$row_product_option['qty'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!$stmt_option_info->bind_param(\"i\", $row_product_option['id_options'])) throw new Exception('An error occured while trying to bind params to get option info statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\n\t\t\n\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\t$stmt_option_info->execute();\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* store result */\n\t\t\t\t\t\t$stmt_option_info->store_result();\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($stmt_option_info->num_rows) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* bind result variables */\n\t\t\t\t\t\t\t$stmt_option_info->bind_result($out_of_stock);\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$stmt_option_info->fetch();\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!$stmt_upd_option->bind_param(\"iii\", $qty, $qty,$row_product_option['id_options'])) throw new Exception('An error occured while trying to bind params to update option qty statement.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Execute the statement */\n\t\t\t\t\t\t\tif (!$stmt_upd_option->execute()) throw new Exception('An error occured while trying to update option qty.'.\"\\r\\n\\r\\n\".$this->mysqli->error);\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n }\n }\n \t}\n\t\t\n\t\t$stmt_product_info->close();\n\t\t$stmt_upd_product_variant->close();\n\t\t$stmt_upd_product->close();\n\t\t$stmt_option_info->close();\n\t\t$stmt_upd_option->close();\n\t\t\t\t\t\t\t\t\t\t\t\n\t}", "public function inventory($order){\n $order = Order::find($order->id);\n // Se obtiene el detalle de la orden\n $order_details = OrderDetail::where('order_id', $order->id)->get();\n foreach ($order_details as $od){\n $store_branche_id = $od['store_branche_id'];\n //Inventario\n $inventory = Inventory::where('product_id', $od['product_id'])->where('store_branche_id', $store_branche_id)->first();\n if(isset($inventory)){\n // Se realiza el movimiento del inventario de tipo E: Egreso\n $inventory->update([\n 'quantity' => $inventory->quantity - $od['quantity']\n ]);\n InventoryMovement::create([\n 'inventory_id' => $inventory->id,\n 'quantity' => $od['quantity'],\n 'order_id'=>$order->id,\n 'movement_type' => 'E'\n ]);\n }\n }\n }", "abstract protected function getPhase(): string;", "public function addInventory($data)\n\t{\n\t\t$addInventory = $this->insert($data);\n\t\t$data['id_inventories'] = $this->getLastInsertValue();\n\t\treturn $data;\n\t}", "public function unit()\n {\n $data = ['aktif' => 'unit',\n 'data_unit' => $this->M_prospektus->get_unit_menu()->result_array(),\n 'data_blok' => $this->M_prospektus->get_blok_kws()->result_array()\n ];\n\n $this->template->load('template','prospektus/V_data_unit', $data);\n }", "function addToInventory($userid, $ingredient, $qty, $units){\n\t if(($userid != NULL) &&($ingredient != NULL) && ($qty != NULL)&& ($units != NULL))\n\t { \n\t if($qty <= 0)\n\t\t return;\n\t\t $count = @mysql_query(\"SELECT COUNT(*) as count FROM Inventory WHERE (UserID = '$userid' \n\t\t AND IngredientName = '$ingredient' AND Units ='$units')\");\n\t\t $countdata = mysql_fetch_assoc($count);\n\t\t if($countdata['count'] >= 1)\n\t\t\t @mysql_query(\"UPDATE Inventory SET Quantity = Quantity + '$qty' WHERE (UserID ='$userid' \n\t\t\t AND IngredientName = '$ingredient' AND Units ='$units')\");\n\t\t else\n\t\t @mysql_query(\"INSERT INTO Inventory VALUES ('$userid','$ingredient','$qty','$units')\");\n\t\t}\n\t}", "public function add($itemId, $qty, $unit_id = null)\n {\n $stockClass = config('mojito.stockClass', 'Stock');\n $pivot = $stockClass::where('warehouse_id', '=', $this->id)->where('item_id', '=', $itemId)->first();\n\n if ($pivot == null) {\n return $this->setInventory($itemId, $qty, $unit_id);\n }\n $qty = Unit::convert($qty, $unit_id, $pivot->unit_id);\n $pivot->update([\"quantity\" => $pivot->quantity + $qty]);\n return StockMovement::create([\n 'item_id' => $itemId,\n 'to_warehouse_id' => $this->id,\n 'quantity' => $qty,\n 'action' => Warehouse::ACTION_ADD\n ]);\n }", "protected function _getUnitsPerEm() {}", "public function getStart() {}", "public function getcourseremainedunits() \n {\n \t//$_Mremainedtimes=$this->courseAunits*2+$this->courseTunits;\n \t$_Mremainedtimes=$this->courseAunits+$this->courseTunits;\n \tif($this->otherpart1slots!='')\n \t{\n \t\tif(strpos($this->otherpart1slots,'s')>=0)\n \t\t{$_Mremainedtimes=$_Mremainedtimes-2;}\n \t\telse if((strpos($this->otherpart1slots,'e'))||(strpos($this->otherpart1slots,'0')))\n \t\t{$_Mremainedtimes=$_Mremainedtimes-1;}\n \t}\n \tif($this->otherpart2slots!='')\n \t{\n \t\tif(strpos($this->otherpart2slots,'s')>=0)\n \t\t{$_Mremainedtimes=$_Mremainedtimes-2;}\n \t\telse if((strpos($this->otherpart2slots,'e'))||(strpos($this->otherpart2slots,'0')))\n \t\t{$_Mremainedtimes=$_Mremainedtimes-1;}\n \t}\n\treturn $_Mremainedtimes;\n \t\n }", "public function rpt_summary_fuel_sarana($start, $end)\n {\n \t$query = $this->db->query('select \n a.nap,\n b.code_unit,\n b.nomor_plat,\n a.tanggal_pengisian,\n a.qty,\n a.hmkm,\n get_empname (a.fuelman) fuelman,\n get_empname (a.fuelman) driver \nFROM\n vehicle_fuel_consumption a LEFT JOIN vehicle_master b ON a.nap = b.nap\nWHERE DATE(a.tanggal_pengisian) BETWEEN \"'.$start.'\" \n AND \"'.$end.'\" ORDER BY a.nap, a.tanggal_pengisian ');\n \treturn $query->result();\n }", "public function ended();", "public function getUnitName()\n {\n return $this->unit_name;\n }", "public function action() {\n $this->curPos ++;\n usleep(250000);\n// # advanced finish if you need it for some reason:\n// if($this->curPos>40) return 'We have finished right now!';\n return array('lastItem'=>$this->curPos, 'itemCount'=>$this->count);\n }", "private function generateAvailableUnits()\n {\n $code = rtrim($this->compileUnitTypes());\n\n return <<<EOF\n\n private \\$unitTypes = array(\n $code\n );\nEOF;\n }", "public function __itemTotals() {\n\n //$this->request->data['items'] = array_values($this->request->data['items']);\n\n $itemsCount = isset($this->request->data['items']) ? count($this->request->data['items']) : 0;\n\n// pr($this->request->data['Item']);\n// die('asdas');\n\n\n\n for ($i = 0; $i < $itemsCount; $i++) {\n\n\n\n\n\n\n\n $this->request->data['items'][$i]['total'] = $this->__lineItemTotal($this->request->data['items'][$i]['qty'], $this->request->data['items'][$i]['price'], $this->request->data['items'][$i]['rate']);\n\n\n\n // collect unit name from unit model\n\n $unit = $this->Papers->Items->Units->find()\n ->where(['id'=>$this->request->data['items'][$i]['unit_id']])\n ->select(['name'])\n ->first()\n ->toArray();\n\n $this->request->data['items'][$i]['name'] = $unit['name'];\n }\n }", "public function getEnd()\n {\n return isset($this->transaction['end']) ? $this->transaction['end'] : '';\n }", "public function test_it_should_decrease_sell_in_of_ordinary_item()\r\n {\r\n $initialSellIn = 5;\r\n $this->itemBuilder->ordinaryItem()->toSellIn($initialSellIn);\r\n\r\n $this->updateQuality();\r\n\r\n $this->assertThatSellInIs(lessThan($initialSellIn)); // variant (1a), general\r\n $this->assertThatSellInIs(equalTo($initialSellIn - 1)); // variant (1b), specific\r\n }", "public function getQty();", "public function getQty();", "public function run()\n {\n $items = [\n [\n 'material_id' => 3,\n 'dead' => DateTime::dateTimeThisDecade(),\n ],\n [\n 'material_id' => 1,\n 'dead' => Carbon::now()->addMonthNoOverflow()->toDateString(),\n ],\n [\n 'material_id' => 1,\n 'dead' => Carbon::now()->addMonthNoOverflow(6)->toDateString(),\n ],\n [\n 'material_id' => 2,\n 'dead' => Carbon::now()->addMonthNoOverflow(12)->toDateString(),\n ],\n [\n 'material_id' => 3,\n 'dead' => Carbon::now()->addMonthNoOverflow()->toDateString(),\n ],\n ];\n foreach ($items as $item) {\n $inventory = new \\App\\Inventory();\n $inventory->material_id = $item['material_id'];\n $inventory->lot_code = Str::random(10);\n $inventory->dead = $item['dead'];\n $inventory->stock_quantity = rand();\n $inventory->inventory_comment = Str::random(400);\n $inventory->status = rand(0,2);\n $inventory->created_at = Carbon::now();\n $inventory->updated_at = Carbon::now();\n $inventory->save();\n }\n }", "private function end() {\n return $this->formats['end'];\n }", "public function getQuantity();", "public function getQuantity();", "public function getQuantity();", "private function endItem()\n {\n if ($this->version == self::Turbo) {\n echo '</item>' . PHP_EOL;\n }\n }", "function it_updates_Sulfuras_items_after_sell_date()\n {\n $this->beConstructedWith('Sulfuras, Hand of Ragnaros', 10, -1);\n $this->tick();\n $this->quality->shouldBe(10);\n $this->sellIn->shouldBe(-1);\n }", "public function startPowerUnits() {\n\t\techo \"systems are not ready yet\";\n\t}", "public function processInventory()\n\t{\n\t\tif (($handle = fopen($this->outboundDir.$this->archivedFile, \"r\")) !== FALSE) {\n while (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) {\n if($i!=0)\n\t\t{\n\t\t\t$stock = (int) $data[1];\n $sku = $data[0];\n\t\t\t$this->blinkeInventory[$sku]['blinke'] = $stock;\n\t\n\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t\tfclose($handle);\n\t\t}\n\t\tMage::log(\"Total sku count from blinke- \" .count($this->blinkeInventory),null,$this->logfile);\n\t\n\t\tforeach($this->blinkeInventory as $sku=>$array)\n\t\t{\n\t\t\t$fstock = $array['blinke'];\n // calclulate stock by substracting stock for on hold orders\n if(array_key_exists($sku, $this->onHoldOrders))\n {\n Mage::log(\"On hold stock for $sku is. \".$this->onHoldOrders[$sku],null,$this->logfile);\n\t\t\t\t$this->blinkeInventory[$sku]['onHold'] = $this->onHoldOrders[$sku];\n Mage::log(\"Blinke stock for $sku is. \".$fstock,null,$this->logfile);\n $fstock = (int) ($fstock - $this->onHoldOrders[$sku]);\n\t\t\t\t$this->blinkeInventory[$sku]['finalMagento'] = $fstock;\n Mage::log(\"EDIT :: Final stock for $sku is $fstock\",null,$this->logfile); \n }\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->blinkeInventory[$sku]['finalMagento'] = $fstock;\n\t\t\t}\n\t\t\t\n\n\t\t\t//process inventory for the sku\n\t\t\t$product = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);\n\t\t\tif($product)\n\t\t {\n\t\t\t\ttry { $productId = $product->getIdBySku($sku); }\n\t\t catch(Exception $e)\n \t\t{\n \t\t\t Mage::log(\"Special SKU: $sku not found in magento\",null,$this->logfile);\n \t\t continue;\n\t\t }\n\n\t\t\t\t$stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);\n\t\t $stockItemId = $stockItem->getId();\n \t\tif (!$stockItemId) {\n\t Mage::log(\"STOCK ID for SKU: $sku doesnot exist\",null,$this->logfile);\n \t continue;\n \t\t} else {\n \t$stock = $stockItem->getData();\n \t\t}\n\t\t\t\t\n\t\t\t\t$originalStock = $stock['qty'];\n\t\t\t\t$this->blinkeInventory[$sku]['currentMagento'] = $originalStock;\n\t\t\t\tif($originalStock != $fstock)\n {\n \t\tif($fstock > 0)\n\t\t {\n \t\t $stock['qty'] = $fstock;\n\t\t $stock['is_in_stock'] = '1';\n\t\t $stock['manage_stock'] = '1';\n\t \t\t}\n\t\t\t\telse\n\t\t {\n \t\t $stock['qty'] = 0;\n \t\t}\n\t\t\t\t foreach($stock as $field => $value) {\n\t $stockItem->setData($field, $value?$value:0);\n \t\t }\n \t\ttry{\n \t\t$stockItem->save();\n\t\t }\n\t\t catch(Exception $e)\n \t\t{\n\t\t\t\t\tMage::log(\"cannot save inventory for $sku\",null,$this->logfile);\n\t\t continue;\n \t\t}\n\t\t Mage::log(\"Inventory updated for: $sku with value: $fstock from $originalStock\",null,$this->logfile);\n \t\tunset($stockItem);\n\t\t unset($product);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tMage::log(\"Inventory not updated for: $sku with value: $fstock from $originalStock\",null,$this->logfile);\n\t\t\t\t}\n\n\t\n\t\t\t}\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t Mage::log(\"Special SKU: $sku not found in magento\",null,$this->logfile);\n\t\t\t}\n\t\t}\n\t}", "public function salesOrderPlaceAfter($observer) {\n \n if (Mage::helper('core')->isModuleEnabled('Magestore_Inventorywarehouse'))\n return;\n if (Mage::registry('INVENTORY_CORE_ORDER_PLACE'))\n return;\n Mage::register('INVENTORY_CORE_ORDER_PLACE', true);\n $order = $observer->getOrder();\n $items = $order->getAllItems();\n $warehouseIds = null;\n $warehouseId = Mage::getModel('inventoryplus/warehouse')->getCollection()->getFirstItem()->getId();\n if (!$warehouseId) {\n Mage::log($observer->getOrder(), null, 'inventory_management.log');\n return;\n }\n foreach ($items as $item) {\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($item->getProductId()); \n $manageStock = $stockItem->getManageStock();\n if($stockItem->getUseConfigManageStock()){\n $manageStock = Mage::getStoreConfig('cataloginventory/item_options/manage_stock',Mage::app()->getStore()->getStoreId()); \n }\n if(!$manageStock){\n continue;\n }\n \n if (in_array($item->getProductType(), array('configurable', 'bundle', 'grouped')))\n continue;\n $qtyOrdered = 0;\n if (!$item->getQtyOrdered() || $item->getQtyOrdered() == 0) {\n if ($item->getParentItemId()) {\n $qtyOrdered = Mage::getModel('sales/order_item')->load($item->getParentItemId())->getQtyOrdered();\n }\n } else {\n $qtyOrdered = $item->getQtyOrdered();\n }\n $warehouseProduct = Mage::getModel('inventoryplus/warehouse_product')->getCollection()\n ->addFieldToFilter('warehouse_id', $warehouseId)\n ->addFieldToFilter('product_id', $item->getProductId())\n ->getFirstItem();\n $currentQty = $warehouseProduct->getAvailableQty() - $qtyOrdered;\n try {\n $warehouseProduct->setAvailableQty($currentQty)\n ->save();\n Mage::getModel('inventoryplus/warehouse_order')->setOrderId($order->getId())\n ->setWarehouseId($warehouseId)\n ->setProductId($item->getProductId())\n ->setItemId($item->getId())\n ->setQty($qtyOrdered)\n ->save();\n } catch (Exception $e) {\n Mage::log($e->getMessage(), null, 'inventory_management.log');\n }\n }\n }", "public function onTransaction(InventoryTransactionEvent $event){\n\t\t$transactions = $event->getTransaction()->getTransactions();\n\n\t\t$player = null;\n\t\t$chestinv = null;\n\t\t$action = null;\n\t\tforeach($transactions as $transaction){\n\t\t\tif(($inv = $transaction->getInventory()) instanceof CustomChestInventory){\n\t\t\t\tforeach($inv->getViewers() as $assumed){\n\t\t\t\t\tif($assumed instanceof Player){\n\t\t\t\t\t\t$player = $assumed;\n\t\t\t\t\t\t$chestinv = $inv;\n\t\t\t\t\t\t$action = $transaction;\n\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(($player ?? $chestinv ?? $action) === null){\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t* $player => Player interacting with the GUI.\n\t\t* $chestinv => The chest's inventory.\n\t\t* $action => BaseTransaction|Transaction|SimpleTransactionGroup\n\t\t*/\n\t\t$event->setCancelled();\n\t\t$item = $action->getSourceItem();\n\t\tif($item->getId() === Item::AIR){\n\t\t\treturn;\n\t\t}\n\n\t\tif(isset($item->getNamedTag()->turner)){\n\t\t\t$pagedata = $item->getNamedTag()->turner->getValue();\n\t\t\t$page = $pagedata[0] === 0 ? --$pagedata[1] : ++$pagedata[1];\n\t\t\t$this->plugin->fillInventoryWithShop($chestinv, $page);\n\t\t\treturn;\n\t\t}\n\n\t\t$data = isset($item->getNamedTag()->ChestShop) ? $item->getNamedTag()->ChestShop->getValue() : null;\n\t\tif($data === null){\n\t\t\treturn;\n\t\t}\n\n\t\t$price = $data[0] ?? $this->plugin->defaultprice;\n\t\tif(!isset($this->plugin->clicks[$player->getId()][$data[1]])){\n\t\t\t$this->plugin->clicks[$player->getId()][$data[1]] = 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif(EconomyAPI::getInstance()->myMoney($player) >= $price){\n\t \t \t$item = $this->plugin->getItemFromShop($data[1]);\n\t\t\t$player->sendMessage(Main::PREFIX.TF::GREEN.'Purchased '.TF::BOLD.$item->getName().TF::RESET.TF::GREEN.TF::GRAY.' (x'.$item->getCount().')'.TF::GREEN.' for $'.$price.'.');\n\t\t\t$player->getInventory()->addItem($item);\n\t\t\tEconomyAPI::getInstance()->reduceMoney($player, $price);\n\t\t\tunset($this->plugin->clicks[$player->getId()]);\n\t\t}else{\n\t\t\t$player->sendMessage(Main::PREFIX.TF::RED.'You cannot afford this item.');\n\t\t\t$chestinv->onClose($player);\n\t\t}\n\t}", "public function getNextUnit() : string\n {\n $targetUnit = null;\n $properties = get_object_vars($this);\n foreach ($properties as $unit => $value) {\n if (is_null($value)) {\n break;\n }\n $targetUnit = $unit;\n }\n\n return $targetUnit;\n }", "public function getMinimumInventoryQuantity()\n {\n return $this->minimumInventoryQuantity;\n }", "public function reservation()\n\t{\n\n\t}", "private function endAuction() {\n $queryBuilder = $this->manager->getRepository(Grund::class)->createQueryBuilder('g');\n $entities = $queryBuilder\n ->andWhere('g.status in (:statuses)')\n ->setParameter('statuses', [GrundStatus::FREMTIDIG, GrundStatus::ANNONCERET])\n ->andWhere('g.auktionslutdato IS NOT NULL')\n ->andWhere('g.auktionslutdato < :now')\n ->setParameter('now', new \\DateTime(null, new \\DateTimeZone('UTC')))\n ->getQuery()->getResult();\n\n $this->write(sprintf('End auction; #entities: %d', count($entities)));\n foreach ($entities as $entity) {\n $this->write(\n sprintf(\n \"% 8d: %s\\t%s\",\n $entity->getId(),\n (string) $entity,\n $entity->getAuktionslutdato()->format(\\DateTime::ISO8601)\n )\n );\n $entity->setStatus(GrundStatus::AUKTION_SLUT);\n $this->manager->persist($entity);\n }\n $this->manager->flush();\n }", "function stop(){\n\t\tif($this->time_end==0){\n\t\t\t $this->time_end = $this->microtime_float();\n\t\t\t $this->time_spend = $this->time_end - $this->time_start;\n\t\t}\n\t}", "function iend($ar=NULL) {\n $prefix = $this->_module->tabprefix;\n if (empty($prefix))\n $prefix = NULL;\n\n // creation des structures . si elles existent, on touche pas\n EPL_createAllStructures($prefix);\n \n // creation des modules de base (EF) sur les structures\n EPL_createAllEFModules($prefix);\n\n // creation des modules applicatifs principaux\n // manqueraient à ce jour :\n // annulation de commandes\n // saisie via le smartreader\n\n // espace client\n XModule::$_mcache=NULL;\n $mod = new XModuleWd(array('newmoid'=>XMODEXTERN_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Customer Area';\n $mod->_module->comment['FR'] = 'EPL - Customer Area';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - FO';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n $mod->_module->theclass = 'XModEPLCustomerArea';\n $foo = $this->_module->customermoid = $mod->iend();\n\n // catalogue\n XModule::$_mcache=NULL;\n $mod = new XModuleWd(array('newmoid'=>XMODEXTERN_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Catalog';\n $mod->_module->comment['FR'] = 'EPL - Catalog';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - FO';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n $mod->_module->theclass = 'XModEPLCatalog';\n $foo = $this->_module->catalogmoid = $mod->iend();\n \n // gestion de la fidélité : les transactions / wtp\n XModule::$_mcache=NULL;\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Transactions WTP fidélité';\n $mod->_module->table = 'WTSWTPTRANSACTION';\n $mod->_module->comment['FR'] = 'EPL - Loyalty Transactions';\n $mod->_module->group = 'EPL - Clients de la vente en ligne';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n $mod->_module->theclass = 'XModEPLLoyalty';\n $foo = $this->_module->loyaltymoid = $mod->iend();\n\n // gestion de la fidélité : les transactions / comptes fidélité\n XModule::$_mcache=NULL;\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Transactions des comptes fidélité';\n $mod->_module->table = 'WTSLLTTRANSACTION';\n $mod->_module->comment['FR'] = 'EPL - Loyalty Account Transactions';\n $mod->_module->group = 'EPL - Clients de la vente en ligne';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n $mod->_module->theclass = 'XModEPLLLTTransactions';\n $foo = $this->_module->loyaltytransmoid = $mod->iend();\n\n \n // fiches clients\n XModule::$_mcache=NULL;\n $mod = new XModuleWd(array('newmoid'=>XMODEXTERN_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Clients de la vente';\n $mod->_module->comment['FR'] = 'EPL - Clients de la vente';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Clients de la vente en ligne';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n $mod->_module->ssmod1 = $this->_module->loyaltytransmoid;\n $foo = $this->_module->customersheetemoid = $mod->iend();\n\n\n // gestion de la fidélité : les cartes\n XModule::$_mcache=NULL;\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Gestion de la fidélité';\n $mod->_module->table = 'WTSWTPBONUS';\n $mod->_module->comment['FR'] = 'EPL - Gestion de la fidélité';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Clients de la vente en ligne';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n $mod->_module->ssmodtitle1='Transactions';\n $mod->_module->ssmodfield1='wtpcard';\n $mod->_module->ssmod1=$this->_module->loyaltymoid;\n $mod->_module->ssmodactivate_additem1=1;\n $cardsmoid = $mod->iend();\n\n // traitement des commandes dans les 4 déclinaisons\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Commandes à valider';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'EPL - Commandes à valider';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 1;\n $mod->_module->theclass = 'XModEPLTrtCmd';\n $mod->_module->filtermode = 'AV';\n $cardsmoid = $mod->iend();\n\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Commandes à Editer/Expédier';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'Commandes à Editer/Expédier';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 1;\n $mod->_module->theclass = 'XModEPLTrtCmd';\n $mod->_module->filtermode = 'AEE';\n $cardsmoid = $mod->iend();\n\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Commandes valides non transmises';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'Commandes valides non transmises';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 1;\n $mod->_module->theclass = 'XModEPLTrtCmd';\n $mod->_module->filtermode = 'VNT';\n $cardsmoid = $mod->iend();\n\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Devis non finalisés';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'Devis non finalisés';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 1;\n $mod->_module->theclass = 'XModEPLTrtCmd';\n $mod->_module->filtermode = 'DNF';\n $cardsmoid = $mod->iend();\n\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Toutes les commandes';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'Toutes les commandes';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 1;\n $mod->_module->theclass = 'XModEPLTrtCmd';\n $mod->_module->filtermode = '';\n $cardsmoid = $mod->iend();\n \n\n // modification des commandes\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Modification des commandes';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'EPL - modification des commandes';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->theclass = 'XModEplUpdCmd';\n $mod->_module->trackchanges = 1;\n $cardsmoid = $mod->iend();\n\n // déclinaison des modifications de commandes\n // 1 version consultation caissse (qui doit être configurée manuellement en RO et filtré)\n // 1 version Commandes annulées (qui doit être configurée manuellement sur les commandes annulées (ETATFABRICATION)\n // 1 version toutes les commandes \n\n // annulation des commandes XModEplAnnulCmd\n $mod = new XModTableWd(array('newmoid'=>XMODTABLE_TOID, 'step'=>1, '_options'=>array('local'=>true)));\n $mod->_module->modulename = 'EPL - Annulation des commandes';\n $mod->_module->table = 'WTSORDER';\n $mod->_module->comment['FR'] = 'EPassLibre annunation des commandes';\n $mod->_module->comment['GB'] = $mod->_module->comment['FR'];\n $mod->_module->group = 'EPL - Traitement des commandes';\n $mod->_module->home = 1;\n $mod->_module->theclass = 'XModEplAnnulCmd';\n $mod->_module->trackchanges = 1;\n $cardsmoid = $mod->iend();\n\n // interface\n XModule::$_mcache=NULL;\n if ($this->_module->skidataresort){\n $modclass='XModEPLResortSKD';\n $resort = 'SkiData';\n $mgroup = 'EPL - Ski Data';\n } else {\n $modclass='XModEPLResortTA';\n $resort = 'Team Axess';\n $mgroup = 'EPL - Team Axess';\n }\n $mod = new XModuleWd(array('newmoid'=>XMODEXTERN_TOID, 'step'=>1, array('_options'=>array('local'=>true))));\n $mod->_module->modulename = 'EPL - '.$resort;\n $mod->_module->comment['FR'] = 'EPL - '.$resort;\n $mod->_module->group = $mgroup;\n $mod->_module->home = 1;\n $mod->_module->trackchanges = 0;\n\n $mod->_module->theclass = $modclass;\n $foo = $this->_module->resortmoid = $mod->iend();\n\n // recupération de certains modules\n $m = XModule::modulesUsingTable(XModEPassLibre::$tableOFFER,true,false,false,false);\n $k = array_keys($m);\n $this->_module->offresmoid = $k[0];\n\n $m = XModule::modulesUsingTable(XModEPassLibre::$tablePOOL,true,false,false,false);\n $k = array_keys($m);\n $this->_module->secteursmoid = $k[0];\n\n // fin\n $moid = parent::iend($ar);\n return $moid;\n }", "public function getProductStockMovementAction()\n {\n \t//recupere les infos\n \t$ProductId = Mage::app()->getRequest()->getParam('product_id');\n \t\n \t//cree le block et le retourne\n \t$this->loadLayout();\t//Charge le layout pour appliquer le theme pour l'admin\n \t$block = $this->getLayout()->createBlock('Purchase/Product_StockMovement', 'stockmovement');\n \t$block->setProductId($ProductId);\n \t$block->setTemplate('Purchase/Product/StockMovement.phtml'); \t\n \t$this->getResponse()->setBody($block->toHtml());\n }", "public function getTotalQtyOrdered();", "public function getStatus(): UnitEnum|string;", "public function run()\n {\n $stock1 = new StockUnit();\n $stock1->label = 'piece';\n $stock1->relative_sku_to_sku = 1;\n $stock1->save();\n }", "public function run()\n {\n $item = new Item();\n $item->name = \"1-3\";\n $item->tier5_cost = 525;\n $item->other_cost = 1050;\n $item->step = 1;\n $item->save();\n $item = new Item();\n $item->name = \"4-9\";\n $item->tier5_cost = 1000;\n $item->other_cost = 2140;\n $item->step = 1;\n $item->save();\n $item = new Item();\n $item->name = \"10+\";\n $item->tier5_cost = 1600;\n $item->other_cost = 3270;\n $item->step = 1;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 1;\n $item->save();\n $item = new Item();\n $item->name = \"SOCIAL\";\n $item->tier5_cost = 550;\n $item->other_cost = 1150;\n $item->step = 2;\n $item->save();\n $item = new Item();\n $item->name = \"EMAIL\";\n $item->tier5_cost = 1000;\n $item->other_cost = 2000;\n $item->step = 2;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 2;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 2;\n $item->save();\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 1500;\n $item->other_cost = 3300;\n $item->step = 3;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 3;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 3;\n $item->save();\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 1500;\n $item->other_cost = 3000;\n $item->step = 4;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 4;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 4;\n $item->save();\n\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 1700;\n $item->other_cost = 3300;\n $item->step = 5;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 5;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 5;\n $item->save();\n\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 1000;\n $item->other_cost = 2000;\n $item->step = 6;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 6;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 6;\n $item->save();\n\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 3500;\n $item->other_cost = 6367;\n $item->step = 7;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 7;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 7;\n $item->save();\n\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 5555;\n $item->other_cost = 10827;\n $item->step = 8;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 8;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 8;\n $item->save();\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 3247;\n $item->other_cost = 6494;\n $item->step = 9;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 9;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 9;\n $item->save();\n\n $item = new Item();\n $item->name = \"YES\";\n $item->tier5_cost = 6000;\n $item->other_cost = 12732;\n $item->step = 10;\n $item->save();\n $item = new Item();\n $item->name = \"NO\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 10;\n $item->save();\n $item = new Item();\n $item->name = \"DON'T KNOW\";\n $item->tier5_cost = 0;\n $item->other_cost = 0;\n $item->step = 10;\n $item->save();\n }", "function read_all_units($db, $serial, $instruction)\r\n{\r\n\tglobal\t$TABLE_M_UNITS;\r\n\tglobal\t$FIELD_UNIT, $FIELD_UNIT_VERSION, $FIELD_ONLINE;\r\n\tglobal\t$a_unit, $a_temp, $a_kwhtotal, $a_kwhdisplay, $a_current;\r\n\r\n\t$sql = \"SELECT $FIELD_UNIT,$FIELD_UNIT_VERSION FROM $TABLE_M_UNITS\";\r\n\tif (!($mysql_result = mysql_query($sql))) { print(mysql_error($db) .\"\\n\"); return; }\r\n\r\n\t$i = 0;\r\n\twhile ($row = mysql_fetch_array($mysql_result))\r\n\t{\r\n\t\t$unit = $row[0];\r\n\t\t$a_unit[$i] = $unit;\r\n\r\n//\t\tprint \"$unit\\t\";\r\n\t\t\r\n\t\t$addrh = ($unit >> 8) & 255;\r\n\t\t$addrl = $unit & 255;\r\n\r\n\t\t$result = send_message($serial, 93, $addrh, $addrl, 0, 0, \"\");\t\t\t\t\t// read databuffer\r\n\t\t\r\n\t\tif ($result >= 0)\r\n\t\t{\r\n\t\t\tif ($instruction == 90)\t\t\t\t\t\t\t\t\t\t\t\t\t\t// temperature\r\n\t\t\t{\r\n\t\t\t\t$a_temp[$i] = ($result & 255);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$number = 0;\r\n\t\t\t\tfor ($j = 5; $j >= 0; $j--)\r\n\t\t\t\t\t$number = ($number * 10) + (($result >> (4 * $j)) & 15);\r\n\t\t\t\t\t\r\n\t\t\t\tswitch ($instruction)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase 56:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// KWh total\r\n\t\t\t\t\t\t$a_kwhtotal[$i] = $number;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 143:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// KWh display\r\n\t\t\t\t\t\t$a_kwhdisplay[$i] = $number;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 68:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\r\n\t\t\t\t\t\t$a_current[$i] = $number / 10000;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$online = \"Y\";\r\n\t\t\t//print \"ok\\n\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tswitch ($instruction)\r\n\t\t\t{\r\n\t\t\t\tcase 90:\t$a_temp[$i] = 0;\t\tbreak;\r\n\t\t\t\tcase 56:\t$a_kwhtotal[$i] = 0;\tbreak;\r\n\t\t\t\tcase 143:\t$a_kwhdisplay[$i] = 0;\tbreak;\r\n\t\t\t\tcase 68:\t$a_current[$i] = 0;\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$online = \"N\";\r\n\t\t\t//print \"missing\\n\";\r\n\t\t}\r\n\r\n\t\t// update online status of this unit\r\n\t\t$sql = \"UPDATE $TABLE_M_UNITS SET $FIELD_ONLINE='$online' WHERE $FIELD_UNIT=$unit\";\r\n\t\tif (!mysql_query($sql)) print(mysql_error($db) .\"\\n\");\r\n\t\t\r\n\t\t$i++;\r\n\t}\r\n\tmysql_free_result($mysql_result);\r\n\t\r\n\t//print(\"\\n\");\r\n}" ]
[ "0.56536716", "0.55817884", "0.54207534", "0.54072124", "0.5344792", "0.53400266", "0.531343", "0.5273264", "0.5256596", "0.5250887", "0.52453804", "0.52367294", "0.52356726", "0.5215593", "0.5166344", "0.5163123", "0.51569957", "0.5146612", "0.5143631", "0.5125425", "0.5109483", "0.5107826", "0.5102045", "0.51003957", "0.5098233", "0.50955886", "0.5041272", "0.5022889", "0.50044525", "0.4959524", "0.49180344", "0.49114513", "0.48996517", "0.4859375", "0.4851554", "0.48512635", "0.48319444", "0.48295048", "0.48209396", "0.48152378", "0.47993243", "0.47939807", "0.47939807", "0.4790059", "0.47852853", "0.47725222", "0.47681138", "0.47502056", "0.4745929", "0.47422102", "0.4740742", "0.47349402", "0.46934077", "0.4687105", "0.4685603", "0.46656835", "0.4664901", "0.46496645", "0.46425003", "0.4641467", "0.4638172", "0.4637282", "0.46346992", "0.4634137", "0.462556", "0.46219492", "0.46081483", "0.46073633", "0.4601658", "0.45981792", "0.45949006", "0.4592661", "0.4591866", "0.45822677", "0.45803595", "0.45785517", "0.4569056", "0.4569056", "0.45653105", "0.45594224", "0.45569098", "0.45569098", "0.45569098", "0.45558372", "0.4555748", "0.4550104", "0.45494896", "0.45467564", "0.4540252", "0.45382133", "0.45344934", "0.4534445", "0.4528885", "0.45282596", "0.45274004", "0.45269653", "0.45254722", "0.45218167", "0.45162806", "0.4516097", "0.45075238" ]
0.0
-1
Make the cat go into its house
public function goHome() { if ($this->_home->door->isOpen()) { $this->_home->letCatIn($this); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function letCatIn(Cat $cat) {\r\n\t\t$this->_cats[] = $cat;\r\n\t}", "function target_add_cat($cat)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $cat['name']);\n\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'cat (id, name, view_order, cat_opt) \n\t VALUES('. (int)$cat['id'] .','. _esc($cat['name']) .','. (int)$cat['view_order'] .', 3)');\n\t$GLOBALS['cat_map'][ $cat['id'] ] = $cat['id'];\n/*\nfud_use('cat.inc', true);\n$nc = new fud_cat;\n$nc->name = $c->name;\n$nc->description = $c->description;\n$nc->view_order = $c->disporder;\n$nc->cat_opt = 1|2;\t// This should be the default in cat.inc. Fix in next release and del this line.\n$GLOBALS['cat_map'][$c->fid] = $nc->add('LAST');\t// FIRST should also be defaulted.\n*/\n}", "public function page_move_cat()\n\t{\n\t\t$move = ($this->mode == 'up_cat') ? -1 : 1;\n\n\t\t// Position de la categorie\n\t\t$sql = 'SELECT cat_order\n\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat\n\t\t\t\tWHERE cat_id = ' . intval($this->id);\n\t\t$current_cat_order = Fsb::$db->get($sql, 'cat_order');\n\n\t\tif ($current_cat_order)\n\t\t{\n\t\t\t// ID de la categorie a switcher\n\t\t\t$sql = 'SELECT cat_id\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat\n\t\t\t\t\tWHERE cat_order = ' . ($current_cat_order + $move);\n\t\t\t$swap_cat_id = Fsb::$db->get($sql, 'cat_id');\n\n\t\t\tif ($swap_cat_id)\n\t\t\t{\n\t\t\t\t// Mise a jour de la position des deux smilies\n\t\t\t\tFsb::$db->update('smilies_cat', array(\n\t\t\t\t\t'cat_order' =>\t($current_cat_order + $move),\n\t\t\t\t), 'WHERE cat_id = ' . intval($this->id));\n\n\t\t\t\tFsb::$db->update('smilies_cat', array(\n\t\t\t\t\t'cat_order' =>\t$current_cat_order,\n\t\t\t\t), 'WHERE cat_id = ' . $swap_cat_id);\n\n\t\t\t\tFsb::$db->destroy_cache('smilies_');\n\t\t\t}\n\t\t}\n\t\tHttp::redirect('index.' . PHPEXT . '?p=posts_smiley');\n\t}", "function _make_cat_compat(&$category)\n {\n }", "function cats_meow($glue) {\n\t $current_cat = single_cat_title( '', false );\n\t $separator = \"\\n\";\n\t $cats = explode( $separator, get_the_category_list($separator) );\n\t foreach ( $cats as $i => $str ) {\n\t if ( strstr( $str, \">$current_cat<\" ) ) {\n\t unset($cats[$i]);\n\t break;\n\t }\n\t }\n\t if ( empty($cats) )\n\t return false;\n\n\t return trim(join( $glue, $cats ));\n\t}", "function cats_meow($glue) {\n\t $current_cat = single_cat_title( '', false );\n\t $separator = \"\\n\";\n\t $cats = explode( $separator, get_the_category_list($separator) );\n\t foreach ( $cats as $i => $str ) {\n\t if ( strstr( $str, \">$current_cat<\" ) ) {\n\t unset($cats[$i]);\n\t break;\n\t }\n\t }\n\t if ( empty($cats) )\n\t return false;\n\n\t return trim(join( $glue, $cats ));\n\t}", "function createCat($name)\n\t{\n\t\tif(trim($name) == \"\")return $this->message(FORUM_URES_MEZO);\n\t\tif($this->isHavePriv(FORUM_PRIV_CAT_CREATE))\n\t\t\treturn mysql_query(\t\"INSERT INTO `\".$this->prefix.\"cat`(`cat_name`,`cat_parent`,`cat_created_by`,`cat_created_time`) \".\n\t\t\t\t\t\t\t\"VALUES('\".specChars($name,\"forum::createCat\").\"',\".$this->cat_id.\",\".$this->akt_user.\",\".time().\")\");\n\t\telse return $this->message(FORUM_MESSAGE_PRIV_ERROR);\n\t}", "private function recreateCategory(): void\n {\n $this->category = $this->categoryFactory->create();\n $this->category->load(2);\n }", "function sandbox_cats_meow($glue) {\n\t$current_cat = single_cat_title( '', false );\n\t$separator = \"\\n\";\n\t$cats = explode( $separator, get_the_category_list($separator) );\n\n\tforeach ( $cats as $i => $str ) {\n\t\tif ( strstr( $str, \">$current_cat<\" ) ) {\n\t\t\tunset($cats[$i]);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif ( empty($cats) )\n\t\treturn false;\n\n\treturn trim(join( $glue, $cats ));\n}", "public function cat(){\n $cat_id = intval(I('get.cat_id'));\n if(!$cat_id){\n http_response_code(404);\n }\n\n $display = cookie('display');\n if($display) {\n if (!preg_match(\"/^list|grid$/\", $display)) {\n die('hack out');\n }else{\n if($display == 'list') {\n $this->assign('display', 1);\n }else{\n $this->assign('display', 0);\n }\n }\n }\n $this->assign('cat_id', $cat_id);\n $mbx = D('Admin/cat')->parentList($cat_id);\n if($mbx){\n $this->assign('mbx',$mbx);\n }\n\n $cat_in_nav = M('cat')->field('cat_id,cat_name')->where('show_in_nav=1')->select();\n $this->assign('cat_in_nav',$cat_in_nav);\n $his = array_reverse(session('history'),true);\n $this->assign('history',$his);\n $sale = M('goods')->field('goods_id,goods_name,thumb_img,shop_price,goods_number')->order('goods_number desc')->limit(10)->select();\n $this->assign('sale',$sale);\n $this->assign('cattree',D('Admin/Cat')->gettree());\n\n $this->assign('cat_name', M('cat')->field('cat_name')->find($cat_id)['cat_name']);\n\n $this->display();\n }", "function setup_cat()\n {\n $this->ipsclass->DB->simple_construct( array( \"select\" => 'perms_view, def_view, id, name', 'from' => 'gallery_categories', 'where' => \"id={$this->ipsclass->input['cat']}\" ) );\n $this->ipsclass->DB->simple_exec(); \n $cat = $this->ipsclass->DB->fetch_row();\n\n // Are we allowed to view this category?\n if( ! $this->ipsclass->check_perms( $cat['perms_view'] ) )\n {\n $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); \n }\n\n return $cat;\n }", "public function run_change_cat($cat,$id){\n\n\t\t$sql = \"UPDATE `categories` SET `cat` = '$cat' WHERE `id` = $id\";\n\n\t\t\t$this->query($sql);\n\t}", "function tideways_span_create($category)\n{\n}", "public function page_add_edit_cat()\n\t{\n\t\t// Edition\n\t\t$cat_name = '';\n\t\tif ($this->mode == 'edit_cat')\n\t\t{\n\t\t\t$sql = 'SELECT cat_name\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat\n\t\t\t\t\tWHERE cat_id = ' . $this->id;\n\t\t\t$result = Fsb::$db->query($sql);\n\t\t\t$data = Fsb::$db->row($result);\n\t\t\tif (!$data)\n\t\t\t{\n\t\t\t\t$this->mode = 'add_cat';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tFsb::$db->free($result);\n\t\t\t\t$cat_name = $data['cat_name'];\n\t\t\t}\n\t\t}\n\n\t\tFsb::$tpl->set_switch('smileys_add_cat');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'L_ADD_EDIT' =>\t\t($this->mode == 'add_cat') ? Fsb::$session->lang('adm_smiley_add_cat') : Fsb::$session->lang('adm_smiley_edit_cat'),\n\t\t\t'CAT_NAME' =>\t\t$cat_name,\n\n\t\t\t'U_ACTION' =>\t\tsid('index.' . PHPEXT . '?p=posts_smiley&amp;mode=' . $this->mode . '&amp;id=' . $this->id),\n\t\t));\n\t}", "public function query_add_edit_cat()\n\t{\n\t\t$cat_name = trim(Http::request('cat_name', 'post'));\n\t\tif ($this->mode == 'add_cat')\n\t\t{\n\t\t\t$sql = 'SELECT MAX(cat_order) AS max_order\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat';\n\t\t\t$max_order = Fsb::$db->get($sql, 'max_order');\n\n\t\t\tFsb::$db->insert('smilies_cat', array(\n\t\t\t\t'cat_name' =>\t$cat_name,\n\t\t\t\t'cat_order' =>\t$max_order + 1,\n\t\t\t));\n\t\t\tFsb::$db->destroy_cache('smilies_');\n\n\t\t\tDisplay::message('adm_smiley_well_cat_add', 'index.' . PHPEXT . '?p=posts_smiley', 'posts_smiley');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFsb::$db->update('smilies_cat', array(\n\t\t\t\t'cat_name' =>\t$cat_name,\n\t\t\t), 'WHERE cat_id = ' . $this->id);\n\t\t\tFsb::$db->destroy_cache('smilies_');\n\n\t\t\tDisplay::message('adm_smiley_well_cat_edit', 'index.' . PHPEXT . '?p=posts_smiley', 'posts_smiley');\n\t\t}\n\t}", "function sensible_category() {\n wp_update_term(1, 'category', array(\n 'name' => 'News',\n 'slug' => 'news', \n 'description' => 'News'\n ));\n }", "public function cat(){\n return $this->belongsTo(Cat::class);\n }", "public function preOpenSkullWoodsCurtains() {\n $this->setValue($this::ROOM_DATA + 0x93, 0x80);\n }", "public function simpleDraw(){\n\t\t$pile = array();\n\t\t$root = array();\n\t\t$root['deep'] = 0;\n\t\t$root['cat'] = $this;\n\t\t$pile[] = $root;\n\n\t\twhile(count($pile)){\n\t\t\t$cat_array = array_pop($pile);\n\t\t\t$cat = $cat_array['cat'];\n\t\t\t$deep = $cat_array['deep'];\n\n\t\t\t\tfor($i =0; $i<$deep ; $i++){\n\t\t\t\techo '|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\n\t\t\t}\n\t\t\techo (($cat->hasSubCategories())?'|-':'&nbsp;&nbsp;');\n\t\t\techo '\t'.$cat->getLabel().'<br/>';\n\n\t\t\tforeach($cat->getSubCategories() as $c){\n\t\t\t\t$s = array();\n\t\t\t\t$s['deep'] = $deep + 1;\n\t\t\t\t$s['cat'] = $c;\n\t\t\t\t$pile[] = $s;\n\t\t\t}\n\t\t}\n\t}", "public function store(CatRequest $request) {\n $cat = new Category();\n $cat->name = $request->input('name');\n $slug = $request->input('slug');\n $cat->slug = ($slug == '') ? toSlug($request->input('name')) : toSlug($slug);\n $cat->type = 'cat';\n $cat->parent = $request->input('parent');\n $cat->order = $request->input('order');\n\n if ($cat->save()) {\n return redirect()->route('admin.cat')->with('Mess', 'Thêm mới thành công!');\n } else {\n return redirect()->route('admin.cat.create')->withInput()->with('errorMess', 'Có lỗi xảy ra, vui lòng thử lại sau');\n }\n }", "public function putCatsOutside() {\r\n\t\t$cats_house = $this->getCatsInside();\r\n\t\t$cats_boxes = $this->getCatsInBoxes();\r\n\t\t$cats_remaining = [];\r\n\t\tforeach ($cats_house as $cat_in_house) {\r\n\t\t\tif(!in_array($cat_in_house,$cats_boxes)) {\r\n\t\t\t\t$cats_remaining[] = $cat_in_house;\r\n\t\t\t\t$key = array_search($cat_in_house,$this->_cats);\r\n\t\t\t\tunset($this->_cats[$key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count($cats_remaining);\r\n\t}", "function deeez_cats2($category){\n$space_holder = \"\";\n$cat_string = \"\";\n\tforeach ($category as $categorysingle) {\n\t$cat_string .= $space_holder . $categorysingle->name;\n\t$space_holder = \"_\";\n\t}\n\treturn $cat_string;\n}", "public function addCat(cat $cat):bool {\n $query = $this->_db->prepare(\"INSERT INTO cat(name, age, sexe, color) VALUES(:name, :age, :sexe, :color)\");\n $result = $query->execute([\n \"name\" => $cat->getName(),\n \"age\" => $cat->getAge(),\n \"sexe\" => $cat->getSexe(),\n \"color\" => $cat->getColor()\n ]);\n return $result;\n }", "public function run()\n {\n $categories = [\n ['name'=>'Android'],\n ['name'=>'前端'],\n ['name'=>'IOS'],\n ['name'=>'后台'],\n ['name'=>'产品'],\n ['name'=>'需求'],\n ['name'=>'设计']\n ];\n\n foreach ($categories as $key => $value) {\n Cat::create($value);\n }\n }", "function make_them_sing(Singable $singing_animals) {\n\t$singing_animal->sing();\n}", "public function run()\n {\n $cat = new App\\Category();\n $cat->name = \"Main\";\n $cat->save();\n $cat2 = new App\\Category();\n $cat2->name = \"Others\";\n $cat2->save();\n }", "function saveCat()\n {\n //update stuff\n }", "private function createCreatureTop()\n {\n\n }", "function fillInCategories()\n {\n #echo \"eZNewsFlowerArticleCreator::fillInCategories()<br />\\n\";\n\n $name = $this->IniObject->GlobalIni->read_var( \"eZNewsCustomer\", \"Name\" );\n $itemType = new eZNewsItemType( \"flowercategory\" );\n $changeType = new eZNewsChangeType( \"publish\" );\n \n $categories = new eZNewsItem( $name );\n $categories->getChildren( &$childrenItems, $count );\n\n $canonicalParent = $this->Item->getIsCanonical();\n\n $i = 0;\n foreach( $childrenItems as $child )\n {\n $child->get( $outID );\n if( $child->ItemTypeID() == $itemType->ID() && $changeType->ID() == $child->status() )\n {\n $this->IniObject->set_var( \"item_id\", $child->ID() );\n $this->IniObject->set_var( \"item_name\", $child->name() );\n $this->IniObject->set_var( \"Selected\", \"\" );\n if( $i == 0 && empty( $canonicalParent ) )\n {\n $this->IniObject->set_var( \"Selected\", \"selected\" );\n }\n\n if( $child->ID() == $canonicalParent || $child->Name() == $canonicalParent ) \n {\n $this->IniObject->set_var( \"Selected\", \"selected\" );\n }\n \n $this->IniObject->parse( \"item\", \"item_template\", true );\n \n $i++;\n }\n }\n }", "public function run()\n {\n $c = \\App\\Category::find(373);\n foreach ($c->sub as $cat) {\n \tforeach($cat->products as $p){\n \t\t$p->name = str_replace($cat->title.', ', $cat->title.'. ', $p->name);\n \t\t//$p->name = $cat->title.', '.$p->name;\n \t\t$p->title = $p->name;\n \t\t$p->h1 = $p->name;\n \t\t$p->save();\n \t}\n \techo $cat->title;\n }\n }", "public function tagStore(CatRequest $request) {\n $cat = new Category();\n $cat->name = $request->input('name');\n $slug = $request->input('slug');\n $cat->slug = ($slug == '') ? toSlug($request->input('name')) : $slug;\n $cat->type = 'tag';\n $cat->order = $request->input('order');\n\n if ($cat->save()) {\n return redirect()->route('admin.tag')->with('Mess', 'Thêm mới thành công!');\n } else {\n return redirect()->route('admin.tag.create')->withInput()->with('errorMess', 'Có lỗi xảy ra, vui lòng thử lại sau');\n }\n }", "public function run(){\n DB::table('cats')->truncate();\n \n $cats = [\n [\n \"type\" => \"ロシアンブルー\"\n ],\n [\n \"type\" => \"アメリカンショートヘア\"\n ],\n [\n \"type\" => \"マンチカン\"\n ],\n [\n \"type\" => \"三毛猫\"\n ],\n [\n \"type\" => \"雑種\"\n ],\n ];\n\n foreach($cats as $cat) {\n \\App\\Cat::create($cat);\n }\n }", "function register_taxonomy_horse_category() {\n\t// create a new taxonomy\n\tregister_taxonomy(\n\t\t'horse_taxonomy',\n\t\t'horse_post',\n\t\tarray(\n\t\t\t'label' => 'Horse Categories',\n\t\t\t'rewrite' => array( 'slug' => 'horses' ),\n\t\t\t'query_var' => true,\n\t\t\t'public' => true,\n\t\t\t'hierarchical' => true,\n\t\t\t'has_archive' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_nav_menus' => true\n\t\t)\n\t);\n}", "public function buyAnimal($type) {\n $zoo = Zoo::first();\n $animal = Animal::where('type', $type)->first();\n $cage = $this->getAvailableCage($type);\n if ($cage !== null) {\n $zoo->purchaseAnimal($animal->price);\n $cage->setType($type);\n\n $animal = new OwnedAnimal();\n $animal->construct(\n $type, \"Sander\", random_int(0, 1), $cage->id);\n $animal->save();\n }\n\n return redirect('/');\n }", "public function setNameAttribute($cat)\n {\n \n $this->attributes['name'] = $cat;\n return $this->attributes['slug'] = Str::slug($cat);\n\n \n }", "public function run()\n {\n Category::truncate();\n \t$cateLists = ['Sportswear','Mens','Womens','Kids','Fashion','Households','Interiors','Clothing','Bags','Shoes'];\n \tforeach ($cateLists as $key => $value) {\n \t\t$cat = Category::create([\n \t\t\t\t'name'=> $value,\n \t\t\t]);\n \t}\n \t$list_sportswear = ['Nike','Under Armour','Adidas','Puma','Asics'];\n \tforeach ($list_sportswear as $key => $value) {\n \t\t$cat = Category::create([\n \t\t\t\t'name'=> $value,\n \t\t\t\t'category_id'=> 1\n \t\t\t]);\n \t}\n \t$list_mens=['Fendi','Guess','Valentino','Dior','Versace','Armani','Prada','Dolce And Gabbana','Chanel','Gucci'];\n \tforeach ($list_mens as $key => $value) {\n \t\t$cat = Category::create([\n \t\t\t\t'name'=> $value,\n \t\t\t\t'category_id'=> 11\n \t\t\t]);\n \t}\n \t$list_womens = ['Womens Fende','Womens Guess','Valentino','Womens Dior','Verace'];\n \tforeach ($list_womens as $key => $value) {\n \t\t$cat = Category::create([\n \t\t\t\t'name'=> $value,\n \t\t\t\t'category_id'=> 21\n \t\t\t]);\n \t}\n }", "public function getCat()\n {\n return $this->cat = get_the_category($this->id);\n }", "function makeThemSing(Singable $singingAnimal){\n $singingAnimal->sing();\n }", "public function run()\n {\n $cat = Category::create([\n 'cat_name' => 'Pengumuman',\n 'cat_slug' => Str::slug('Pengumuman'),\n ]);\n\n $cat = Category::create([\n 'cat_name' => 'PTS',\n 'cat_slug' => Str::slug('pts'),\n ]);\n $cat = Category::create([\n 'cat_name' => 'PAS',\n 'cat_slug' => Str::slug('pas'),\n ]);\n\n\n\n\n }", "public function action_cat()\n {\n $cat = $this->request->param('cat');\n $cat = mysql_real_escape_string ($cat);\n \n // Получаем список продукций\n // $category = ORM::factory('category')->where('cat_id', '=', $cat)->find();\n $category = ORM::factory('category')->where('path', '=', $cat)->find();\n\n if(!$category->loaded()){\n $this->redirect();\n }\n \n $count = $category->products->where('status', '<>', 0)->count_all();\n $pagination = Pagination::factory(array('total_items'=>$count,'items_per_page'=>2));\n $prods = array();\n $products = $category->products\n ->where('status', '<>', 0)\n ->limit($pagination->items_per_page)\n ->offset($pagination->offset)\n ->find_all();\n $prs = $category->products\n ->select('prod_cats.prod_id')\n ->where('status', '<>', 0)\n ->find_all();\n foreach ($prs as $p)\n {\n $prods[] = $p->prod_id;\n }\n if(count($prods))\n $brands = ORM::factory('brand')\n ->join('products')\n ->on('brand.brand_id', '=', 'products.brand_id')\n ->where('products.prod_id','in',$prods)\n ->group_by('brand.title')\n ->order_by('brand.title', 'ASC')\n ->find_all();\n \n \n \n //$products = $category->products->where('status', '!=', 0)->find_all();\n // $this->breadcrumbs[] = array('name' => $category->title, 'link' => '/catalog/cat/c' . $category->cat_id);\n $this->breadcrumbs[] = array('name' => $category->title, 'link' => '/catalog/cat/' . $category->path);\n $this->template->breadcrumbs = Breadcrumb::generate($this->breadcrumbs);\n \n $content = View::factory('/' . $this->theme . 'index/catalog/v_catalog_cat', array(\n 'products' => $products,\n 'cat' => $cat,\n 'pagination' =>$pagination,\n 'brands' =>$brands,\n \n ));\n \n // Выводим в шаблон\n \n $this->template->title = $category->title;\n $this->template->page_title = $category->title;\n $this->template->page_caption = $category->title;\n $this->template->center_block = array($content);\n $this->template->block_right = null; \n $filter = Filter::factory();\n $filter->loadFiltersOptions($category->cat_id);\n $this->template->filter = $filter->render();\n }", "private function _getLolcat()\n {\n $query = 'select id, title from flickr.photos.search(50) where tags=\"lolcat\" or text=\"lolcat\"';\n\n $array = $this->grabData($query);\n $stuff = $array['query']['results']['photo'];\n \n $id = $stuff[array_rand($stuff)]['id'];\n $title = $stuff[array_rand($stuff)]['title'];\n \n $sizes = $this->grabData('select source from flickr.photos.sizes where photo_id = '. $id);\n \n $this->_message($this->_data->nick.': '. $title .' => '. $sizes['query']['results']['size'][3]['source']);\n \n }", "public function createCategory();", "public function run()\n {\n factory(App\\Category::class, 200)->create()->each(function($cat){\n $cat->barangs()->saveMany(factory(App\\Barang::class, 10)->make());\n });\n }", "private function _composite()\n\t{\n\t\t//composite the spartan profile image\n\t\t$this->bg->compositeImage( $this->profile, imagick::COMPOSITE_OVER, -10, -40 );\n\n\t\t//composite the emblem next to the spartans name\n\t\t$this->bg->compositeImage( $this->emblem, imagick::COMPOSITE_OVER, (250 - ($this->metrics['spartan']['textWidth'] / 2)) - 40, 10 );\n\n\t\tif ($this->metrics['weaponChoice']['textWidth'] <= $this->metrics['favoriteWeapon']['textWidth']) {\n\t\t\t//put the weapon image next to the weapon text\n\t\t\t$this->bg->compositeImage( $this->weapon, imagick::COMPOSITE_OVER, ( 500 - $this->metrics['favoriteWeapon']['textWidth'] - $this->weaponScale['w'] - 30 ), 60 );\n\t\t} else { \n\t\t\t//put the image to the left of the weapon choice text, if the favorite weapon text is less than the weapon choice text\n\t\t\t$this->bg->compositeImage( $this->weapon, imagick::COMPOSITE_OVER, ( 500 - $this->metrics['weaponChoice']['textWidth'] - $this->weaponScale['w'] - 30 ), 60 );\n\t\t}\n\t}", "private function createCreatureFront()\n {\n\n }", "function insert(category $cat)\n {\n $query = \"INSERT INTO categories (categories_id, name, tag, description, slug, active)\n VALUE ('$cat->category_id', '$cat->name', '$cat->tag', '$cat->description', '$cat->slug', $cat->active)\";\n $result = $this->db->insert($query);\n }", "function app_category($cat_name = NULL, $parent_cat_id) {\n\tif (get_cat_ID($cat_name ) == 0) {\n\t\treturn wp_create_category($cat_name, $parent_cat_id);\n\t}\n\telse {\n\t\treturn get_cat_ID($cat_name);\n\t}\n}", "public function traits(){\n $this->clapHands();\n }", "function commit()\n\t{\n\t\t//or create a new db entry if object is not yet in db\n\t\tglobal $db,$config_vars;\n\n\n\t\t// fill palce_in_cat and cat_ids array if they are not yet filled;\n\n\t\tif (isset($this->id))\n\t\t{\n\t\t\tif ((!isset($this->cat_ids)) or (!isset($this->place_in_cat)))\n\t\t\t{\n\t\t\t\t$this->generate_content_in_cat_data();\n\t\t\t}\n\t\t}\n\n\n\n\n\n\t\t// if content is in no cat anymore\n\t\tif (sizeof($this->cat_ids) == 0)\n\t\t{\n\t\t\t// move content in the deleted pics cat.\n\t\t\t$del_content_cat = new categorie();\n\t\t\t$del_content_cat->generate_from_id($config_vars['deleted_content_cat']);\n\t\t\t$del_content_cat->content_amount++;\n\t\t\t$this->cat_ids[0] = $config_vars['deleted_content_cat'];\n\t\t\t$this->new_filename=$this->generate_filename();\n\n\t\t}\n\n\n\n\t\t// move to the new calculated localtaion (may be the same)\n\n\t\tif (isset($this->new_filename))\n\t\t{\n\t\t\tif (!is_dir(dirname($this->new_filename)))\n\t\t\t{\n\t\t\t\tmakedir(dirname($this->new_filename));\n\t\t\t}\n\n\n\t\t\t// echo \"rename({$this->file},$new_file)<br>\";\n\t\t\tif (rename($this->file,$this->new_filename))\n\t\t\t{\n\t\t\t\t$this->set_file($this->new_filename);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdie('content rename failed '.$this->file.' to '.$this->new_filename);\n\t\t\t}\n\n\t\t\t//echo \"rename pic\" .$this->file.\" -> \".$new_file.\"<br>\";\n\n\t\t\t// move thumb\n\t\t\tif (!is_dir(dirname($this->get_thumbfile())))\n\t\t\t{\n\t\t\t\tmakedir(dirname($this->get_thumbfile()));\n\t\t\t}\n\t\t}\n\n\n\t\t//echo \"rename thumb\" .$this->thumbfile.\" -> \".$this->get_thumbfile().\"<br>\";\n\t\t// but first check if thumb exists\n\n\t\t//echo \"rename({/*$this->thumbfile*/},\".$this->get_thumbfile().\")<br>\";\n\t\tif (is_file($this->thumbfile))\n\t\t{\n\t\t\tif (rename($this->thumbfile,$this->get_thumbfile()))\n\t\t\t{\n\t\t\t\t$this->thumbfile = $this->get_thumbfile();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdie('thumb rename failed');\n\t\t\t}\n\t\t}\n\n\n\t\t// check if already in db)\n\t\tif (isset($this->id))\n\t\t{\n\t\t\t// already in db\n\n\t\t\t// update entry in content table\n\t\t\t$sql = \"UPDATE \" . $config_vars['table_prefix'] . \"content\n\t\t\t\tSET\n\t\t\t\t\tfile = '$this->file',\n\t\t\t\t\tname = '\" . database_encode($this->name) . \"',\n\t\t\t\t\tviews = '$this->views',\n\t\t\t\t\tcurrent_rating = '$this->current_rating',\n\t\t\t\t\tcreation_date = '$this->creation_date',\n\t\t\t\t\tcontentgroup_id = '$this->contentgroup_id',\n\t\t\t\t\tlocked = '$this->locked',\n\t\t\t\t\twidth = '$this->width',\n\t\t\t\t\theight = '$this->height',\n\t\t\t\t\tcomments_amount = '$this->comments_amount'\n\t\t\t\tWHERE id = $this->id\";\n\n\t\t\tif (!$result = $db->sql_query($sql))\n\t\t\t{\n\t\t\t\t$error = new phreak_error(E_WARNING,SQL_ERROR,__LINE__,__FILE__,'commit',$this->id,0,0,$sql);\n\t\t\t\t$error->commit();\n\t\t\t\t//error_report(SQL_ERROR, 'commit' , __LINE__, __FILE__,$sql);\n\t\t\t}\n\n\t\t\t// update content_in_cat table\n\t\t\t// i will do this by first deleting all entry with this content and then generate them all new\n\n\t\t\t$this->clear_content_in_cat();\n\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$this->calc_size();\n\t\t\t//not in db\n\t\t\t$this->creation_date=date(\"Y-m-d H:i:s\");\n\t\t\t// add content to the content table\n\n\t\t\t//using a shorter version of boolean transmission for locked\n\t\t\t$sql = \"INSERT INTO \" . $config_vars['table_prefix'] . \"content\n\t\t\t\t(file,name,views,current_rating,creation_date,contentgroup_id,locked,width,height,comments_amount)\n\t\t\t\tVALUES ('$this->file', '\" . database_encode($this->name) . \"', '$this->views', '$this->current_rating', '$this->creation_date', '$this->contentgroup_id', '\" . (($this->locked) ? (\n\t\t\t\t'1') : ('0')) . \"','$this->width','$this->height','$this->comments_amount')\";\n\t\t\tif (!$result = $db->sql_query($sql))\n\t\t\t{\n\t\t\t\t$error = new phreak_error(E_WARNING,SQL_ERROR,__LINE__,__FILE__,'commit',$this->id,0,0,$sql);\n\t\t\t\t$error->commit();\n//\t\t\t\terror_report(SQL_ERROR, 'commit' , __LINE__, __FILE__,$sql);\n\t\t\t}\n\t\t\t// set id of object to the id of the insert\n\t\t\t$this->id = $db->sql_nextid();\n\t\t}\n\n\n\n\n\t\t// add content to the cats\n\t\t\n\t\t$this->fill_content_in_cat();\t\n\n\t\tif (is_object($del_content_cat))\n\t\t{\n\t\t\t$del_content_cat->commit();\n\t\t}\n\t\tif (is_object($this->add_to_cat))\n\t\t{\n\t\t\t$this->add_to_cat->commit();\n\t\t}\n\t\tif (is_object($this->remove_from_cat))\n\t\t{\n\t\t\t$this->remove_from_cat->commit();\n\t\t}\n\t\t\n\t\tif (is_array($this->commit_parent_cats))\n\t\t{\n\t\t\tforeach($this->commit_parent_cats as $parent_cat)\n\t\t\t{\n\t\t\t\t$parent_cat->commit();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn OP_SUCESSFUL;\n\t}", "public function hug(Huggable $h);", "private function packCategory()\n {\n /** @var modCategory $category */\n $category = $this->modx->newObject('modCategory');\n $category->set('category', self::PKG_NAME);\n\n $this->packCategoryElements($category, 'plugins');\n\n $this->builder->putVehicle($this->builder->createVehicle($category, [\n xPDOTransport::UNIQUE_KEY => 'category',\n xPDOTransport::PRESERVE_KEYS => false,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::RELATED_OBJECTS => true,\n xPDOTransport::RELATED_OBJECT_ATTRIBUTES => [\n 'Plugins' => [\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::UNIQUE_KEY => 'name'\n ],\n 'PluginEvents' => [\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::UNIQUE_KEY => ['pluginid','event'],\n ]\n ]\n ]));\n }", "public function store(CategoryRequest $request) {\n //\n $thumb ='images\\categories\\thumb';\n $full = 'images\\categories\\full';\n $input = $request->except('image');\n $input['status'] = $request->get('status') == 'on' ? 1 : 0;\n if ($request->get('parent')) {\n $parent_slug = Category::find($input['parent'])->slug;\n $input['slug'] = $parent_slug . '/' . str_slug($input['name']);\n } else {\n $input['slug'] = str_slug($input['name']);\n }\n $input['order'] = Category::max('order') + 1;\n $cat = new Category($input);\n if ($request->hasFile('image')) {\n $name = $input['slug'] . '.' . $request->file('image')->getClientOriginalExtension();\n $cat->image = $name;\n Image::make($request->file('image'))->save($full . '/' . $name);\n Image::make($request->file('image'))->resize('200', '200')->save($thumb . '/' . $name);\n }\n if ($cat->save()) {\n return redirect()->route('backend.category.index');\n }\n }", "public function run()\n {\n $batanes = new Category();\n $batanes->name = 'batanes';\n $batanes->slug = 'batanes';\n $batanes->save();\n\n $ilocos = new Category();\n $ilocos->name = 'ilocos';\n $ilocos->slug = 'ilocos';\n $ilocos->save();\n\n $aklan = new Category();\n $aklan->name = 'aklan';\n $aklan->slug = 'aklan';\n $aklan->save();\n }", "function makeCategory($ar_kat)\r\n\t{\r\n\t\tforeach($ar_kat as $val)\r\n\t\t{\r\n\t\t\t$this->trainNewCategory($val, $val);\r\n\t\t}\r\n\t\t\r\n\t\t/*isi word probability*/\r\n\t\tforeach($ar_kat as $val) //untuk setiap kategori\r\n\t\t{\r\n\t\t\tforeach ($this->arr_wc[$val]->vocab as $key => $row)\r\n\t\t\t{\r\n\t\t\t\t$prob = (1 + $row) / ($this->ctgrmgr->listCategory[$val]->jumWordInCategory + $this->arr_wc[$val]->jumVocab);\r\n\t\t\t\t//echo \"$row \";\r\n\t\t\t\t$this->ctgrmgr->listCategory[$val]->addWordProb($key, $prob);\r\n\t\t\t}\r\n\t\t\tif ($this->debug)\r\n\t\t\t{\r\n\t\t\t\techo \"<br/>\";\r\n\t\t\t\techo \"jum in category : \"; echo $this->ctgrmgr->listCategory[$val]->jumWordInCategory; echo \"<br/>\";\r\n\t\t\t\techo \"jum vocab : \"; echo $this->arr_wc[$val]->jumVocab; echo \"<br/>\";\r\n\t\t\t\techo \"get cat prob $val : \"; echo $this->ctgrmgr->getCatProb($val); echo \"<br/>\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->serializeCat();\r\n\t}", "function showCategory()\r\n {\r\n }", "private function runCategory()\n {\n $num = (int) $this->ask('How many records do you want to create for the categories table?');\n factory(Category::class, $num)->create();\n }", "public function postCategory($slug) {\n // 'name' che è il nome per esteso della categoria\n // 'slug' che è lo slug ricavato dal nome per esteso della categoria\n // questa funzione riceve in ingresso lo slug ($slug) della categoria\n // e deve ricavare l'elenco di tutti i posts che hanno quella categoria associata\n // identificati dallo slug ricevuto come parametro in ingresso.\n // Poi la funzione richiama una view e le passa l'elenco di tutti i posts trovati\n // e l'oggetto categoria, quella identificata dallo slug ricevuto in ingresso\n\n // cerco nella colonna 'slug' della mia tabella 'categories', la categoria (record) con slug uguale al parametro ricevuto\n $category = Category::where('slug', $slug)->first();\n\n // verifico se la select fatta sul DB mi ha ritornato qualcosa per la categoria ricercata tramite slug\n // ad esempio l'utente potrebbe modificare la stringa nella barra indirizzi, alterando il nome\n // dello slug e scrivendo un qualcosa che non esiste e non corrisponde a nessuna categoria del DB\n if (!empty($category)) {\n // qui sfrutto la relazione fra categorie e posts, cioè la relazione fra le entità/modelli\n // Category e Post. Nella classe Category è definito un metodo posts()\n // (cioè col nome dell'entità verso la quale è definita la relazione)\n // posts() ritorna $this->hasMany('App\\Post');\n // chiamo la proprietà posts (in questa maniera'$category->posts')\n // che restituisce i post che sono legati da relazione in base alla categoria\n $posts_by_category = $category->posts;\n\n // chiamo una view per visualizzare tutti i post della categoria ricercata,\n // gli passo la categoria e l'elenco dei posts\n return view('public.posts.posts-by-category', [\n 'category' => $category,\n 'posts' => $posts_by_category\n ]);\n } else {\n // ritorno la pagina di errore \"Page not found\" poichè lo slug ricevuto in ingresso\n // non corrisponde a nessuna categoria presente nel mio DB (tabella 'categories')\n return abort(404);\n }\n }", "function SELLMYHOME_add_category( $cat_name, $taxonomy ){\n //Check if term exists before attempting to create\n if( !term_exists( $cat_name, $taxonomy ) ){\n $my_cat = array('cat_name' => $cat_name, \n 'category_description' => 'Default, Permanent Category', \n 'category_nicename' => SELLMYHOME_clean($cat_name), \n 'category_parent' => '',\n 'taxonomy' => $taxonomy);\n\n // Create the category\n wp_insert_category($my_cat); \n } \n}", "public function buyCage() {\n $cage = new Cage;\n $cage->habitat = request('habitat');\n $cage->width = request('width');\n $cage->height = request('height');\n $cage->save();\n\n $zoo = Zoo::first();\n $zoo->purchaseCage($cage->width, $cage->height);\n\n return redirect('/');\n }", "public function run()\n {\n \\App\\Category::create(['name' => 'Root category']);\n }", "public function run()\n {\n $cat = new Category();\n $cat->name = 'phones';\n $cat->save();\n\n $cat = new Category();\n $cat->name = 'Labtop';\n $cat->save();\n\n $cat = new Category();\n $cat->name = 'Food';\n $cat->save();\n }", "function shopay_product_cat_sec( $shopay_product_cat_info ) {\n $cat_name = $shopay_product_cat_info->name;\n $cat_slug = $shopay_product_cat_info->slug;\n $cat_id = $shopay_product_cat_info->term_id;\n $thumbnail_id = get_term_meta( $cat_id, 'thumbnail_id', true );\n if ( empty( $thumbnail_id ) ) {\n return;\n }\n?>\n <div class=\"category-content wow fadeInUp\">\n <?php $cat_link = get_term_link( $cat_id, 'product_cat' ); ?>\n <figure class=\"category-thumb\">\n <a href=\"<?php echo esc_url( $cat_link ); ?>\">\n <?php \n echo'<div class=\"category-image\">';\n echo wp_get_attachment_image( $thumbnail_id , 'thumbnail' );\n echo'</div>';\n ?> \n </a>\n </figure>\n\n <h4 class=\"category-title small-font\">\n <a href=\"<?php echo esc_url( $cat_link ); ?>\"><?php echo esc_html( $cat_name ); ?></a>\n </h4>\n </div><!-- .category-content -->\n<?php\n }", "public function cut()\n {\n }", "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\n ]);\n }", "function setCategory($object) { \n /* you can itentify the item with $object->Item->ShopId */ \n}", "function alaya_cat_slug($cate_name){\n\t$cat_ID = get_cat_ID($cate_name); \n\t$thisCat = get_category($cat_ID);\n\t$cat_slug = $thisCat->slug;\n\t$cat_slug = apply_filters('alaya_cat_slug', $cat_slug);\n\treturn $cat_slug;\n}", "public function bake()\n {\n }", "function addanimals($newanimal){\r\n global $animals;\r\n $newlowerchar = strtolower($newanimal);\r\n for($x=0;$x<=count($animals);$x++){\r\n if(in_array($newlowerchar,$animals))\r\n {\r\n sort($animals);\r\n echo $animals[$x];\r\n echo \" \";\r\n }else{\r\n array_push($animals,$newlowerchar);\r\n sort($animals);\r\n echo $animals[$x];\r\n echo \" \";\r\n }\r\n }\r\n }", "public function run()\n {\n factory(Category::class,5)->create()->map(function ($cat,$i){\n// dump($cat);\n factory(Product::class,5)->create()->map(function ($product) use($cat,$i){\n dump($cat->id);\n $x = $cat->id;\n $product->category()->associate($x);\n });\n });\n }", "public function run_change_sub_cat($cat,$id){\n\n\n\t\t$sql = \"UPDATE `sub_categories` SET `sub_cat` = '$cat' WHERE `id` = $id\";\n\n\t\t\t$this->query($sql);\n\n\t}", "public function run()\n {\n $roots = [\n [\n 'title' => 'Food',\n 'depth' => 0,\n ],\n [\n 'title' => 'Non-food',\n 'depth' => 0,\n ],\n [\n 'title' => 'Onbekend',\n 'depth' => 0,\n ],\n ];\n Category::insert($roots);\n }", "function init_category($title) {\n $category = ORM::for_table('pw_category')->create();\n $category->cat_title = $title;\n $category->save();\n return $category;\n}", "public function category($slug = '')\r\n {\r\n \r\n }", "public function run()\n {\n $category = new Category ();\n $category->category_name = 'appetizer';\n $category->image = '/image/category/cuisine-1.jpg';\n $category->save();\n\n $category = new Category ();\n $category->category_name = 'salad';\n $category->image = '/image/category/cuisine-1.jpg';\n $category->save();\n\n $category = new Category ();\n $category->category_name = 'pizza';\n $category->image = '/image/category/cuisine-1.jpg';\n $category->save();\n\n $category = new Category ();\n $category->category_name = 'fast food';\n $category->image = '/image/category/cuisine-1.jpg';\n $category->save();\n\n $category = new Category ();\n $category->category_name = 'breakfast';\n $category->image = '/image/category/cuisine-1.jpg';\n $category->save();\n\n $category = new Category ();\n $category->category_name = 'lunch & dinner';\n $category->image = '/image/category/cuisine-1.jpg';\n $category->save();\n\n $category = new Category ();\n $category->category_name = 'bread';\n $category->image = '/image/category/cuisine-1.jpg';\n $category->save();\n\n $category = new Category ();\n $category->category_name = 'noodles';\n $category->image = '/image/category/cuisine-1.jpg';\n $category->save();\n }", "public function new_category() {\n\t\t$this->use_layout=false;\n\t\t$cat = new CmsCategory;\n\t\t$cat->name = Request::get(\"cat\");\n\t\t$cat->save();\n\t\tif(!$this->all_categories = $cat->clear()->all()) $this->all_categories=array();\t\t\n\t\t$this->cat_list = $this->render_partial(\"cat_list\");\t\n\t}", "function latest_comic_jump() {\n\twp_redirect( get_permalink( get_terminal_post_in_category(get_all_comic_categories_as_cat_string(), false) ) );\n\texit;\n}", "public static function formatCatName($catname) {\n $catname = str_replace(' ', '-', $catname); // Replaces all spaces with hyphens.\n $catname = preg_replace('/[^A-Za-z0-9\\-]/', '', $catname); // Removes special chars. \n return strtolower($catname);\n }", "function the_category($separator = '', $parents = '', $post_id = \\false)\n {\n }", "public function run()\n {\n $categories = [\n 'Informatica',\n 'Cucina',\n 'Cinema',\n 'Sport',\n 'Attualità',\n 'Business & Finanza'\n ];\n\n foreach($categories as $category){\n\n $newCategory = new Category();\n\n $newCategory->name = $category;\n $newCategory->slug = Str::slug($category,'-');\n\n $newCategory->save();\n }\n }", "public static function bespokeCategory($category, $categoryPlaceholder, $humanViewNameSingular, $prefix = null, $crud = null)\n\t{\n $class = Utility::getAttributeClass('category', $prefix, $crud);\n\n $html = '<div class=\"' . $class . '\">';\n $html .= '<h4>';\n $html .= '<label for=\"category\">';\n $html .= Text::sprintf('COM_CAJOBBOARD_CATEGORY_EDIT_LABEL', $humanViewNameSingular);\n $html .= '</label>';\n $html .= '</h4>';\n $html .= '<textarea name=\"category\" id=\"' . $prefix . '-category\" class=\"form-control\" rows=\"8\" placeholder=\"' . $categoryPlaceholder . '\">';\n $html .= $category;\n $html .= '</textarea>';\n $html .= '</div>';\n\n return $html;\n }", "public function run()\n {\n Storage::disk('public')->deleteDirectory('category-images');\n Storage::disk('public')->makeDirectory('category-images');\n\n\n $imageSeed = 'category.jpg';\n\n $categories = [\n [\n 'name' => 'Bouquet',\n 'parent_id' => null\n ],\n [\n 'name' => 'Gift',\n 'parent_id' => null\n ],\n [\n 'name' => 'Box',\n 'parent_id' => null\n ],\n [\n 'name' => 'Basket',\n 'parent_id' => null\n ],\n [\n 'name' => 'Limited',\n 'parent_id' => null\n ],\n [\n 'name' => 'Collection',\n 'parent_id' => null\n ],\n ];\n\n $children = [\n [\n 'name' => 'Sub Bouquet 1',\n ],\n [\n 'name' => 'Sub Bouquet 2',\n ],\n [\n 'name' => 'Sub Bouquet 3',\n ]\n ];\n\n foreach ($categories as $c) {\n $image = $this->saveThumbImages($imageSeed, 'category-images');\n\n Category::create([\n 'name' => $c['name'],\n 'parent_id' => $c['parent_id'],\n 'thumbnail_image' => $image\n ]);\n }\n\n $bouquet = Category::where('name', 'Bouquet')->first();\n\n foreach ($children as $child) {\n Category::create([\n 'name' => $child['name'],\n 'parent_id' => $bouquet->id,\n 'thumbnai_image' => null\n ]);\n }\n }", "public function run()\n {\n $categories = [\"html\",\"css\",\"js\",\"php\",\"laravel\",\"vuejs\",\"sql\",\"nosql\",\"git\"];\n \n foreach($categories as $category){\n $newCategory = new Category();\n $newCategory->name = $category;\n $newCategory->slug = Str::of(\"$category\")->slug(\"-\");\n $newCategory->save();\n }\n \n\n }", "public function _get_category($cat){\n\t\t$jumlah_category = substr_count($cat,\",\");\n\t\t$cat_a = explode(',',$cat);\n\t\t$j_cat = 0;\n\t\t$cat_result = \"\";\n\t\twhile ($j_cat <= $jumlah_category){\n\t\t$cat_me = $cat_a[\"$j_cat\"];\n\t\t$cat_link2 = strtolower($cat_me);\n\t\t$cat_link2 = str_replace(\" \", \"-\", $cat_link2);\n\t\t$cat_result .= \"<a href='\".APP_URL.\"/\".uri_category.\"/$cat_link2'> $cat_me</a> , \";\n\t\t$j_cat++;\n\t\t}\n\t\treturn $cat_result;\n\t}", "public function addCategoryToGroupByName($gorup_name, $category_name);", "public function run()\n {\n factory(Category::class,10)->create(\n [\n 'parent_id' => $this->getRandonParentId()\n ]);\n }", "public function run()\n {\n factory(App\\Category::class, 1)->states('blog')->create();\n factory(App\\Category::class, 1)->states('study')->create();\n }", "function aw_pp_register_post_type_cat() {\n /* Set up the arguments for the 'music_album' post type. */\n\n $cat_args = array( \t\n\t'public' => true,\n \t'capability_type' => 'post',\n \t'hierarchical' => false,\n \t'rewrite' => array( 'slug' => \"cat\", 'with_front' => false ),\n\t'capability_type' => 'post',\n\t'hierarchical' => false,\n\t'labels' => array(\n 'name' => 'Cats',\n 'singular_name' => 'Cat',\n 'add_new' => 'Add New Cat',\n 'add_new_item' => 'Add New Cat',\n 'edit_item' => 'Edit Cat',\n 'new_item' => 'New Cat',\n 'view_item' => 'View Cat',\n 'search_items' => 'Search Cats',\n 'not_found' => 'No Cats Found',\n 'not_found_in_trash' => 'No Cats Found In Trash'\n ),\n 'supports' => array(\n\t\t'title',\n\t\t'editor',\n\t\t'revisions',\n\t\t'thumbnail'\n )\n );\n /* Register the music album post type. */\n register_post_type( 'aw_pp_cats', $cat_args );\n}", "public function run() {\n AvailableRecipeCategory::create([\n 'category' => 'Supe si Ciorbe'\n ]);\n }", "function coffee_taxonomy(){\n $args = array(\n 'labels' => array (\n 'name' => 'Categories',\n 'singular_name' => 'Category',\n ),\n 'public' => true,\n 'hierarchical' => true, //true to make it behave like a category, false to make it behave like a tag\n\n );\n\n register_taxonomy( 'categories', array('coffees'), $args );\n}", "public function run()\n {\n $this->insertCategories('Fast Food', 'Brza Hrana');\n $this->insertCategories('Barbecue', 'Roštilj');\n $this->insertCategories('Dessert', 'Desert');\n $this->insertCategories('Icecream', 'Sladoled');\n $this->insertCategories('Soup', 'Juha');\n }", "function getCats(){\n global $con;\n\n $get_cats = \"select * from categories\";\n $run_cats = mysqli_query($con,$get_cats);\n\n while ($row_cats = mysqli_fetch_array($run_cats)){\n\n $cat_id = $row_cats['cat_id'];\n $cat_title = $row_cats['cat_title'];\n\n echo \"<div class='col-sm-6 text-center'>\";\n echo \"<div class='featured'>\";\n echo \"<div class='featured-img featured-img-2' style='background-image: url(images/ja/IMG-20190629-WA0053.jpg);'>\";\n echo \"<h2>$cat_title</h2>\";\n echo \"<p><a href='#' class='btn btn-primary btn-lg'>Shop now</a></p>\";\n echo \"</div>\";\n echo \"</div>\";\n echo \"</div>\";\n }\n}", "public function menu($cat, $subcat = null)\n {\n // verificamos que exista categoria\n if ($category = Category::find($cat)) {\n // cogemos los negocios de la redonda\n $business = Business::distance(auth()->user()->latitude, auth()->user()->longitude,2);\n $businessNear = $business->get()->where('distance','<=',6);\n // damos buen formato\n $busDef=[];\n foreach ($businessNear as $key => $value) {\n $busDef[]=$value;\n }\n // ya lo tenemos\n $busDef = collect($busDef);\n // ahora los productos de éstos negocios\n $products = Product::whereIn('business_id',$busDef->pluck('id'));\n // cogemos las subcategorias a partir de la categoria y que algun producto la contenga\n $category->sub_categories = $category->subCategories()\n ->whereIn('id',$products->pluck('category_id'))\n ->get();\n // si es subcategoria deberiamos verificar que es realmente subcat de la cat\n if ($subcat !== null) {\n // vemos si existe\n if (!$subcategory = $category->subCategories()->find($subcat)) {\n // no existe subcategoria\n return $this->incorrect(1001,null,\"existe categoria $category->name pero no ésta subcategoria con id $subcat en ella\");\n }\n }\n // en este punto ya tenemos la categoria y la subcategoria :D\n $cat = $subcat?? $cat;\n //\n $popular = $this->businessFromCategory($cat)->orderBy('distance','ASC');//->wherein('category_id',$busDef->pluck('id'))->get();//->where('distance','<=',env('MAX_DISTANCE_FILTER',6));\n // si es categoria principal devolvemos todos\n if($subcat == null) {\n $popular=$popular->get()->where('distance','<=',env('MAX_DISTANCE_FILTER',6));\n } else {\n // sino, lo mism\n $popular=$popular->get()->where('distance','<=',env('MAX_DISTANCE_FILTER',6));\n }\n // distancia\n $km = $this->roundKm($popular)?? 0 ;\n // listado de los mas cercanos\n $near = $this->businessFromCategory($cat)->orderBy('distance','ASC')->paginate(50);\n //\n $real = $near->where('distance','<=',env('MAX_DISTANCE_FILTER',6));\n $near = $near->toArray();\n $near['data'] = $real;\n // RETURN\n return $this->correct([\n \"populars\" => [\n \"km\" => $km,\n \"business\" => $popular\n ],\n\n \"near\" => $near,//->where('distance','<=',env('MAX_DISTANCE_FILTER',6)),\n \"category\" => $category\n ]);\n\n } else {\n // no existe categoria\n return $this->incorrect(1000);\n }\n return $this->incorrect();\n\n }", "function isOpen($cat) {\n global $GLOBAL;\n\tif($GLOBAL['category']==$cat) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function run()\n {\n $cat1 = [\n 'title' => 'Cusco',\n 'slug' => str_slug('cusco'),\n ];\n $cat2 = [\n 'title' => 'Arequipa',\n 'slug' => str_slug('arequipa'),\n ];\n $cat3 = [\n 'title' => 'Puno',\n 'slug' => str_slug('puno'),\n ];\n Category::create($cat1);\n Category::create($cat2);\n Category::create($cat3);\n }", "public function cry()\n {\n echo \"Cat cry\";\n }", "public function run()\n {\n $categories = collect(['Laptops', 'Desktops', 'Phones', 'Tablets', \n 'TVs', 'Cameras', 'Appliances']);\n\n factory(Category::class, 7)->make()->each(function($category) use($categories) {\n $category->name = $categories->shift();\n $category->slug = Str::slug($category->name);\n $category->save();\n });\n }", "function sos_chapter_change_cat_object() {\n global $wp_taxonomies;\n $labels = &$wp_taxonomies['product_cat']->labels;\n $labels->name = 'Topic';\n $labels->singular_name = 'Topic';\n $labels->add_new = 'Add Topic';\n $labels->add_new_item = 'Add Topic';\n $labels->edit_item = 'Edit Topic';\n $labels->new_item = 'Topic';\n $labels->view_item = 'View Topic';\n $labels->search_items = 'Search Topics';\n $labels->not_found = 'No Topics found';\n $labels->not_found_in_trash = 'No Topics found in Trash';\n $labels->all_items = 'All Topics';\n $labels->menu_name = 'Topic';\n $labels->name_admin_bar = 'Topic';\n}", "public function actAddCategory(Request $request)\n {\n if ($request->hasFile('image')) {\n $file = $request->file('image');\n $image = time() . \".\" . $file->getClientOriginalExtension();\n $file->move('admin/images/Category', $image);\n $category = Category::create([\n 'name' => $request->get('cname'),\n 'slug' => $request->get('slug'),\n 'is_active' => $request->get('isactive'),\n 'image' => $image,\n 'description' => $request->get('description')\n ]);\n $request->session()->flash('success-message', 'bakery added successfully');\n return redirect()->back();\n }\n }", "public function addCategory(HostCategory $category): void;", "function print_categories( $thisId ) { \n $thisCat = get_the_category( $thisId );\n foreach( $thisCat as $cat ) {\n echo $cat->slug . \" \";\n }\n}", "function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {\n\t\t\t$pad = str_repeat('&nbsp;', $depth * 1);\n\n\t\t\t/** This filter is documented in wp-includes/category-template.php */\n\t\t\t$cat_name \t\t= apply_filters( 'list_cats', $category->name, $category );\n\t\t\t$cat_permalink \t= get_term_link( $category );\n\t\t\t$random\t \t\t= 'term-'.rand();\n\n\t\t\t//get location flag\n\t\t\tif( function_exists('fw_get_db_term_option') ){\n\t\t\t\t$country \t= fw_get_db_term_option($category->term_id, 'locations', 'image');\n\t\t\t}\n\n\t\t\t$flag\t= '';\n\t\t\tif( !empty( $country['url'] ) ){\n\t\t\t\t$flag\t= '<img class=\"wt-checkflag\" alt=\"'.esc_attr__('location','workreap').'\" src=\"'.esc_url( $country['url'] ).'\">';\n\t\t\t}\n\n\t\t\t$output .= \"\\t<span class='wt-checkbox loclevel-$depth'><input name='location[]' type='checkbox' id=\".esc_attr( $random ).\" data-permalink=\\\"\".esc_url( $cat_permalink ).\"\\\" class=\\\"loclevel-$depth\\\" value=\\\"\".$category->slug.\"\\\"\";\n\n\n\t\t\tif ( !empty( $args['current_category'] ) && in_array($category->slug,$args['current_category']) )\n\t\t\t\t$output .= ' checked=\"checked\"';\n\t\t\t$output .= '>';\n\n\t\t\t$output .= '<label for=\"'.$random.'\">'.$flag.$cat_name.'</label>';\n\n\t\t\tif ( $args['show_count'] )\n\t\t\t\t$output .= '&nbsp;&nbsp;('. number_format_i18n( $category->count ) .')';\n\t\t\t$output .= \"</span>\\n\";\n\t\t}" ]
[ "0.5962898", "0.54485714", "0.52690226", "0.5206642", "0.5142565", "0.5142565", "0.5006432", "0.49256963", "0.49181968", "0.49175054", "0.4891032", "0.48711708", "0.48673785", "0.48070306", "0.48015162", "0.47801065", "0.47066224", "0.46975952", "0.4666195", "0.46628284", "0.46623418", "0.46615082", "0.465922", "0.46524045", "0.46338278", "0.4615723", "0.4611329", "0.45963874", "0.45752907", "0.45728737", "0.457263", "0.45724523", "0.4571039", "0.45648706", "0.45618373", "0.45618168", "0.45610213", "0.4546744", "0.45086664", "0.4504695", "0.44958308", "0.449256", "0.4489529", "0.44828635", "0.44795507", "0.44772905", "0.4472123", "0.44608417", "0.44489554", "0.44404736", "0.44320503", "0.4426083", "0.44176194", "0.4417443", "0.44140592", "0.44135192", "0.44109112", "0.4387231", "0.4385683", "0.438509", "0.43847883", "0.43828025", "0.438132", "0.43798882", "0.4378237", "0.43732682", "0.43701977", "0.43623802", "0.43620044", "0.43574053", "0.43571854", "0.4350211", "0.43422455", "0.43378186", "0.4337118", "0.43349457", "0.43337548", "0.43325418", "0.43208298", "0.43195182", "0.43188184", "0.43179166", "0.4317492", "0.4316158", "0.4316059", "0.4312472", "0.43113574", "0.43028262", "0.42970553", "0.42948854", "0.4288911", "0.42869288", "0.42814547", "0.42788005", "0.42770383", "0.42754152", "0.42750594", "0.42747244", "0.42719597", "0.4266602", "0.42637447" ]
0.0
-1
Make the cat go into a box
public function goInBox(Box $box) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function box()\n {\n echo \"<div style='height:54px;width:54px;background-color:{$this};color:{$this->black_or_white()};padding:3px;'>{$this}</div>\";\n }", "public function box()\n {\n }", "private function box( $title, $content ) {\n\t\t// @codingStandardsIgnoreLine\n\t\techo '<div class=\"yoast_box\"><h3>' . esc_html( $title ) . '</h3><div class=\"inside\">' . $content . '</div></div>';\n\t}", "function cpt_mycpt_box() {\n\tadd_meta_box(\n\t\t'cpt_mycpt_box',\n\t\t__( 'Mycpt', '' ),\n\t\t'cpt_mycpt_box_content',\n\t\t'mycpt',\n\t\t'side',\n\t\t'high'\n\t);\n}", "function setup_box() {\n\t\t$screens = apply_filters( 'cso_screens', array( 'post' ) );\n\t\tforeach( $screens as $s )\n\t\tadd_meta_box( 'color_options', __( 'Color Options', 'color-style-options' ), array( &$this, 'meta_box_contents' ), $s, 'normal' );\n\t}", "public function setBox($box){\n $this->box=$box;\n }", "public function box($tags)\n {\n if( isset( $this->box[$tags]) )\n $this->active_box=$tags;\n else $this->active_box='body';\n return $this;\n }", "public function show(Box $box)\n {\n //\n }", "function call_box() {\n new Box();\n}", "public function setBox(string $box)\n {\n switch (trim(strtolower($box))) {\n case self::BOX_CROP:\n case self::BOX_ART:\n case self::BOX_TRIM:\n case self::BOX_BLEED:\n $this->box = $box;\n break;\n case self::BOX_NONE:\n default:\n $this->box = null;\n break;\n }\n return $this;\n }", "public function box($value)\n {\n $this->setProperty('box', $value);\n return $this;\n }", "public static function menucat_metabox() {\n\t\t\t\n\t\t\t$position = \"side\";\n\t\t\t$priority = \"low\";\n\t\t\t\n\t\t\tadd_meta_box( 'custom-metabox', __( 'Dish Category' ), array( __CLASS__, 'category_box'), self::$post_type, $position, \"low\" );\n\t\t\tadd_meta_box( 'custom-metabox2', __( 'Dish Price' ), array( __CLASS__, 'price_box'), self::$post_type, $position, $priority );\n\t\t\tadd_meta_box( 'custom-metabox3', __( 'Special Information' ), array( __CLASS__, 'info_box'), self::$post_type, \"normal\", \"high\" );\n\t\t\tadd_meta_box( 'custom-metabox4', __( 'Dish Serving' ), array( __CLASS__, 'serve_box'), self::$post_type, \"normal\", \"high\" );\n\t\t\t\t\t\t\n\t\t}", "public function setBox($box)\n {\n switch (getType($box)) {\n case 'array':\n $count = count($box);\n if ($count == 4) {\n $this->top = $box[0];\n $this->right = $box[1];\n $this->bottom = $box[2];\n $this->left = $box[3];\n } elseif ($count == 3) {\n $this->top = $box[0];\n $this->right = $box[1];\n $this->bottom = $box[2];\n $this->left = $box[1];\n } elseif ($count == 2) {\n $this->top = $box[0];\n $this->right = $box[1];\n $this->bottom = $box[0];\n $this->left = $box[1];\n } elseif ($count == 1) {\n $this->top = $box[0];\n $this->right = $box[0];\n $this->bottom = $box[0];\n $this->left = $box[0];\n }\n break;\n\n case 'string':\n $box = explode(' ', $box);\n $this->setBox($box);\n break;\n }\n }", "public function letCatIn(Cat $cat) {\r\n\t\t$this->_cats[] = $cat;\r\n\t}", "public function page_add_edit_cat()\n\t{\n\t\t// Edition\n\t\t$cat_name = '';\n\t\tif ($this->mode == 'edit_cat')\n\t\t{\n\t\t\t$sql = 'SELECT cat_name\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat\n\t\t\t\t\tWHERE cat_id = ' . $this->id;\n\t\t\t$result = Fsb::$db->query($sql);\n\t\t\t$data = Fsb::$db->row($result);\n\t\t\tif (!$data)\n\t\t\t{\n\t\t\t\t$this->mode = 'add_cat';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tFsb::$db->free($result);\n\t\t\t\t$cat_name = $data['cat_name'];\n\t\t\t}\n\t\t}\n\n\t\tFsb::$tpl->set_switch('smileys_add_cat');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'L_ADD_EDIT' =>\t\t($this->mode == 'add_cat') ? Fsb::$session->lang('adm_smiley_add_cat') : Fsb::$session->lang('adm_smiley_edit_cat'),\n\t\t\t'CAT_NAME' =>\t\t$cat_name,\n\n\t\t\t'U_ACTION' =>\t\tsid('index.' . PHPEXT . '?p=posts_smiley&amp;mode=' . $this->mode . '&amp;id=' . $this->id),\n\t\t));\n\t}", "function setBox($height, $width){\n\t\t//Takes the height and width passed and\n\t\t//saves them to the 'ScaleTool' object.\n\n\t\t$this->box_height = $height;\n\t\t$this->box_width = $width;\n\t}", "function shortcode_content_box( $atts, $content = null ) {\n\t\t$variables = array( 'class' => '' );\n\t\textract( shortcode_atts( $variables, $atts ) );\n\t\t$class = empty( $class )?'':' ' . $class;\n\t\t$result = '<article class=\"box' . esc_attr( $class ) .'\">';\n\t\t$result .= do_shortcode( $content );\n\t\t$result .= '</article>';\n\t\treturn $result;\n\t}", "public function addBox(Box $box) {\r\n\t\t$this->_boxes[] = $box;\r\n\t}", "function createBlocks($attributes) {\n\n\t$a = shortcode_atts( array(\n\t\t'text-color' => '',\n\t), $attributes );\n\n\t$get_featured_cats = array(\n\t\t'taxonomy' => 'product_cat',\n\t\t'orderby' => 'name',\n\t\t'hide_empty' => '0',\n\t\t'include' => $cat_array\n\t);\n\t$all_categories = get_categories( $get_featured_cats );\n\t$j = 1;\n\n\techo '<div class=\"container\"><div class=\"row\">';\n\n\n\tforeach ( $all_categories as $cat ) {\n\n\t\t$cat_id = $cat->term_id;\n\t\t$cat_link = get_term_link( $cat_id, 'product_cat' );\n\n\n\t\t$thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true );\n\t\t$image = wp_get_attachment_url( $thumbnail_id );\n\n\n\t\techo '<div class=\"col-md-3\">';\n\t\techo '<a href=\"' . $cat_link .'\"><div class=\"category-card\">';\n\n if ($image){\n echo '<img src=\"' . $image . '\"/>';\n } else if(!$image){\n echo '<img src=\"http://placehold.it/400x275\"/>';\n }\n echo '<p style=\"color:' . $a['text-color'] . '\">' . $cat->name;\n echo '</p></div></a></div>';\n\n\t\t$j ++;\n\t}\n\n\techo '</div>';\n\n\twp_reset_query();\n\n}", "function box($title, $message)\r\n{\r\n\tglobal $style;\r\n\t$ta = new Template(\"styles/\".$style.\"/box_wide.php\");\r\n\t$ta->setVar(\"imagepath\", \"./styles/\".$style.'/images/');\r\n\t$ta->setVar(\"content_title\", $title);\r\n\t$ta->setVar(\"content\", $message.'<br><br><a href=\"\" onclick=\"history.back(1); return false\">&laquo; Go Back</a>');\r\n\tprint $ta->toString();\r\n}", "public function apply(){\n $base = $this->getBackground('base', $this->getParameter('base-color'));\n if(!$base) return;\n \n $x = $this->getFuncard()->xc($this->getParameter('base-x'));\n $y = $this->getFuncard()->yc($this->getParameter('base-y'));\n \n $this->getFuncard()->getCanvas()->compositeImage(\n $base, Imagick::COMPOSITE_OVER, $x, $y\n );\n \n // Etape 2 : le liseré !\n $edging = $this->getBackground('edging', $this->getParameter('edging-color'));\n if($edging){\n $x = $this->getFuncard()->xc($this->getParameter('edging-x'));\n $y = $this->getFuncard()->yc($this->getParameter('edging-y'));\n \n $this->getFuncard()->getCanvas()->compositeImage(\n $edging, Imagick::COMPOSITE_OVER, $x, $y\n );\n \n }\n \n // Etape 3 : Les box !\n $titlebox = $this->getBackground('titlebox', $this->getParameter('box-color'));\n if($titlebox){\n $x = $this->getFuncard()->xc($this->getParameter('titlebox-x'));\n $y = $this->getFuncard()->yc($this->getParameter('titlebox-y'));\n \n $this->getFuncard()->getCanvas()->compositeImage(\n $titlebox, Imagick::COMPOSITE_OVER, $x, $y\n );\n \n }\n \n $typebox = $this->getBackground('typebox', $this->getParameter('box-color'));\n if($typebox){\n \n $x = $this->getFuncard()->xc($this->getParameter('typebox-x'));\n $y = $this->getFuncard()->yc($this->getParameter('typebox-y'));\n \n $this->getFuncard()->getCanvas()->compositeImage(\n $typebox, Imagick::COMPOSITE_OVER, $x, $y\n );\n \n }\n \n // Dernière étape : il faut calculer la couleur la febox\n \n $ret = '';\n if($titlebox) $ret = substr($this->getParameter('box-color'), -1, 1);\n elseif($edging) $ret = substr($this->getParameter('edging-color'), -1, 1);\n else $ret = substr($this->getParameter('base-color'), -1, 1);\n \n $ret = [\n 'fe' => ['color' => $ret]\n ];\n \n // Re-dernière étape, il faut calculer la couleur de l'illustrateur\n \n $base_letter = $this->getParameter('base-color')[0];\n if($base_letter == 'b' || $base_letter == 'l'){\n $ret['illus'] = [\n 'color' => 'white',\n 'altcolor' => 'black'\n ];\n $ret['copyright'] = [\n 'color' => 'white',\n ];\n }\n \n return $ret;\n \n }", "public static function category_box() {\n\t\t\t\n\t\t\tglobal $post;\n\t\t\tglobal $wpdb;\n\t\n\t\t\t$cat_list = $wpdb->get_results( \"SELECT re_int, re_title FROM \".$wpdb->prefix.self::$table_name);?>\n\t\t\t\n\t\t\t<label for=\"siteurl\">Select the appropriate Menu Category for this current dish.<br /></label>\n\t\t\t<p>\n\t\t\t\n\t\t\t\t<?php\n\t\t\t\t\tif(!empty($cat_list)){\n\t\t\t\t\t\techo \"<select style='width:200px' name='cat_id'>\";\n\t\t\t\t\t\tforeach($cat_list as $list => $val){\n\t\t\t\t\t\t\t$sel = \"\";\n\t\t\t\t\t\t\tif(isset($_GET['menucat']) && ($_GET['menucat'] == $val->re_int )) { \n\t\t\t\t\t\t\t\t$sel = ' selected=\"selected\"'; \n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$menucat = get_post_meta($post->ID, \"meta_menucat\", true);\n\t\t\t\t\t\t\t\tif($menucat == $val->re_int ) { $sel = ' selected=\"selected\"';} \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo \"<option value='\".$val->re_int.\"' \".$sel.\">\".$val->re_title.\"</option>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"</select>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<a href='edit.php?post_type=menucategory-post&page=menu_listings'>Add Categories First.</a>\";\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t</p>\n\t\t\n\t\t\t<?php\n\t\t}", "function clix_uppe_add_meta_box() {\r\n\tif( function_exists('add_meta_box') ) {\r\n\t\tadd_meta_box( 'clix_uppe_meta_box', 'Clix Category Exclusion', 'clix_uppe_meta_box', post, 'side' );\r\n \t}\r\n}", "public function simpleDraw(){\n\t\t$pile = array();\n\t\t$root = array();\n\t\t$root['deep'] = 0;\n\t\t$root['cat'] = $this;\n\t\t$pile[] = $root;\n\n\t\twhile(count($pile)){\n\t\t\t$cat_array = array_pop($pile);\n\t\t\t$cat = $cat_array['cat'];\n\t\t\t$deep = $cat_array['deep'];\n\n\t\t\t\tfor($i =0; $i<$deep ; $i++){\n\t\t\t\techo '|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\n\t\t\t}\n\t\t\techo (($cat->hasSubCategories())?'|-':'&nbsp;&nbsp;');\n\t\t\techo '\t'.$cat->getLabel().'<br/>';\n\n\t\t\tforeach($cat->getSubCategories() as $c){\n\t\t\t\t$s = array();\n\t\t\t\t$s['deep'] = $deep + 1;\n\t\t\t\t$s['cat'] = $c;\n\t\t\t\t$pile[] = $s;\n\t\t\t}\n\t\t}\n\t}", "function createCat($name)\n\t{\n\t\tif(trim($name) == \"\")return $this->message(FORUM_URES_MEZO);\n\t\tif($this->isHavePriv(FORUM_PRIV_CAT_CREATE))\n\t\t\treturn mysql_query(\t\"INSERT INTO `\".$this->prefix.\"cat`(`cat_name`,`cat_parent`,`cat_created_by`,`cat_created_time`) \".\n\t\t\t\t\t\t\t\"VALUES('\".specChars($name,\"forum::createCat\").\"',\".$this->cat_id.\",\".$this->akt_user.\",\".time().\")\");\n\t\telse return $this->message(FORUM_MESSAGE_PRIV_ERROR);\n\t}", "function AsImgBox($strImg,$strClass,$strStyle,$oCaption,$strHref='')\n{\n if ( !is_string($strImg) ) die('AsImgBox: Missing image');\n if ( is_array($oCaption) )\n {\n $strCaption = QTconv($oCaption[0],'5');\n if ( !empty($strHref) ) $strCaption = '<a href=\"'.$strHref.'\">'.$strCaption.'</a>';\n if ( !empty($oCaption[1]) ) $strCaption .= '<br/>('.QTconv($oCaption[1],'5').')';\n if ( !empty($oCaption[2]) ) $strCaption .= '<br/>'.QTconv($oCaption[2],'5');\n }\n else\n {\n $strCaption = QTconv(strval($oCaption),'5');\n if ( !empty($strHref) ) $strCaption = '<a href=\"'.$strHref.'\">'.$strCaption.'</a>';\n }\n return '<div'.(isset($strClass) ? ' class=\"'.$strClass.'\"' : '').(isset($strStyle) ? ' style=\"'.$strStyle.'\"' : '').'>'.$strImg.(isset($strCaption) ? '<span class=\"small\"><br/>'.$strCaption.'</span>' : '').'</div>';\n}", "function add_cases_meta_box() {\n add_meta_box(\n 'cases_meta_box', // $id\n '事例', // $title\n 'show_your_fields_meta_box', // $callback\n 'cases', // $screen\n 'normal', // $context\n 'high' // $priority\n );\n remove_meta_box( 'slugdiv', 'cases', 'normal' );\n}", "function tideways_span_create($category)\n{\n}", "function action_custom_box()\n {\n add_meta_box(\n $this->plugin->config['meta']['box-name'],\n 'Protect Content',\n [$this, 'custom_box_html'],\n ['page', 'post'],\n 'normal',\n 'high'\n );\n }", "function postbox_classes($box_id, $screen_id)\n {\n }", "public function addBox() {\n $page = 'basket';\n $id = -1;\n $product = array(\"id\"=>$id, \"name\"=>'Box', \"price\"=>50, \"imgLink\"=>\"./View/img/box.png\");\n\n\n $productInBasket = $this->inBasket($id); //check if the product is in the basket\n\n if(!empty($product) && isset($_SESSION['user']['basket'])) {\n if ($productInBasket)\n $_SESSION['user']['basket'][$id]['quantity']++;\n else\n $_SESSION['user']['basket'][$id] = array(\"product\" => $product, \"quantity\" => 1);\n }\n\n header(\"Location: ./index.php?ctrl=basket&action=consult\");\n require('./View/default.php');\n }", "public function setArtBox($boundary) {}", "function writebox( $_POST, $boxnum, $cat_id = \"ID\" , $cat_descr = \"missing description\" ) {\n\tif ( $_POST[\"B2\"] ) {\n\t\tif ( $_POST[ $boxnum ] ) {\n\t\t\treturn \"<input type=\\\"checkbox\\\" name=\\\"$boxnum\\\" value=\\\"$cat_id\\\" checked>$cat_descr<br />\\n\" ;\n\t\t}\n\t\telse {\n\t\t\treturn \"<input type=\\\"checkbox\\\" name=\\\"$boxnum\\\" value=\\\"$cat_id\\\" >$cat_descr<br />\\n\" ;\n\t\t}\n\t}\n\telse{\n\t\treturn \"<input type=\\\"checkbox\\\" name=\\\"$boxnum\\\" value=\\\"$cat_id\\\" checked>$cat_descr<br />\\n\" ;\n\t}\n}", "public function box(string $string, int $angle = 0): Box;", "function alpha_meta_box_add()\n{\n add_meta_box('alpha-beer-list', 'Beer List Properties', 'alpha_beer_list', 'ptf_bars', 'side', 'low');\n}", "public function query_add_edit_cat()\n\t{\n\t\t$cat_name = trim(Http::request('cat_name', 'post'));\n\t\tif ($this->mode == 'add_cat')\n\t\t{\n\t\t\t$sql = 'SELECT MAX(cat_order) AS max_order\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat';\n\t\t\t$max_order = Fsb::$db->get($sql, 'max_order');\n\n\t\t\tFsb::$db->insert('smilies_cat', array(\n\t\t\t\t'cat_name' =>\t$cat_name,\n\t\t\t\t'cat_order' =>\t$max_order + 1,\n\t\t\t));\n\t\t\tFsb::$db->destroy_cache('smilies_');\n\n\t\t\tDisplay::message('adm_smiley_well_cat_add', 'index.' . PHPEXT . '?p=posts_smiley', 'posts_smiley');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFsb::$db->update('smilies_cat', array(\n\t\t\t\t'cat_name' =>\t$cat_name,\n\t\t\t), 'WHERE cat_id = ' . $this->id);\n\t\t\tFsb::$db->destroy_cache('smilies_');\n\n\t\t\tDisplay::message('adm_smiley_well_cat_edit', 'index.' . PHPEXT . '?p=posts_smiley', 'posts_smiley');\n\t\t}\n\t}", "function print_stylebox($value, $type){\n\t\t\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title;\n\t\t$input_value = $this->get_field_value($value['id']);\n\t\techo '<div class=\"styles-holder\">';\n\t\techo '<input name=\"'.$value['id'].'\" id=\"'.$value['id'].'\" type=\"hidden\" value=\"'.$input_value.'\" /><ul>';\n\t\t\n\t\t$counter=0;\n\t\tforeach ($value['options'] as $option) {\n\t\t\t//set a style the option if this is an option for selecting a color or pattern \n\t\t\tif($type=='pattern') {\n\t\t\t\t//this is a pattern, set a background image to it\n\t\t\t\t$style='background-image:url('.HANA_PATTERNS_URL.$option.');';\n\t\t\t}elseif($type=='color'){\n\t\t\t\t//this is a color, set background color to it\n\t\t\t\t$style='background-color:#'.$option.';';\n\t\t\t}\n\t\t\t$class=$option==$input_value?'selected-style':'';\n\t\t\t\n\t\t\techo '<li style=\"'.$style.'\" class=\"'.$class.'\"><a class=\"style-box\" title=\"'.$option.'\" href=\"\"></a></li>';\n\t\t} \n\t\techo '</ul></div>';\n\t\t$this->close_option($value);\n\t}", "function sb_slideshow_meta_box( $box ) {\n\tglobal $sb_slideshow_slides;\n?>\n\t<div class=\"scrollingContainer\">\n\t\t<div class=\"scrollingHotSpotLeft\"></div><div class=\"scrollingHotSpotRight\"></div>\n\t\t<ul class=\"connectedSortable\">\n<?php\n\t\tforeach( $sb_slideshow_slides as $index => $slide ) {\n\t\t\tif ($slide['box'] == $box) sb_slideshow_sortable_item( $index );\n\t\t}\n?>\n\t\t</ul>\n\t</div>\n<?php\n}", "public function say()\n {\n echo \"I'am cat ...<br>\";\n }", "public function getBox(){\n return $this->box;\n }", "function create_meta_portfolio_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-portfolio-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PORTFOLIO ITEM SETTINGS', 'new_meta_portfolio_boxes', PEXETO_PORTFOLIO_POST_TYPE, 'normal', 'high' );\n\t}\n}", "function shortcode_content_boxes( $atts, $content = null ) {\n\t\t$variables = array( 'class' => '', 'style' => 'style1' ); // hover values = (style1|style2|...|style12)\n\t\textract( shortcode_atts( $variables, $atts ) );\n\t\t$class = empty( $class )?'':' ' . $class;\n\t\t$result = '<div class=\"image-box ' . esc_attr( $style . $class ) .'\">';\n\t\t$result .= do_shortcode( $content );\n\t\t$result .= '</div>';\n\t\treturn $result;\n\t}", "private function _composite()\n\t{\n\t\t//composite the spartan profile image\n\t\t$this->bg->compositeImage( $this->profile, imagick::COMPOSITE_OVER, -10, -40 );\n\n\t\t//composite the emblem next to the spartans name\n\t\t$this->bg->compositeImage( $this->emblem, imagick::COMPOSITE_OVER, (250 - ($this->metrics['spartan']['textWidth'] / 2)) - 40, 10 );\n\n\t\tif ($this->metrics['weaponChoice']['textWidth'] <= $this->metrics['favoriteWeapon']['textWidth']) {\n\t\t\t//put the weapon image next to the weapon text\n\t\t\t$this->bg->compositeImage( $this->weapon, imagick::COMPOSITE_OVER, ( 500 - $this->metrics['favoriteWeapon']['textWidth'] - $this->weaponScale['w'] - 30 ), 60 );\n\t\t} else { \n\t\t\t//put the image to the left of the weapon choice text, if the favorite weapon text is less than the weapon choice text\n\t\t\t$this->bg->compositeImage( $this->weapon, imagick::COMPOSITE_OVER, ( 500 - $this->metrics['weaponChoice']['textWidth'] - $this->weaponScale['w'] - 30 ), 60 );\n\t\t}\n\t}", "function link_categories_meta_box($link)\n {\n }", "public function createBox($step,$tipo,$noticia)\n {\n \n \n switch($step)\n {\n case 1:\n echo \"<div id='mp-wrap'>\";\n echo \"<div class='gra_top1'>Criação de Box</div>\";\n echo \"<div class='info'>As \\\"Box\\\" são caixas onde as notícias são exibidas na página principal do portal.\";\n echo \"<p>Para inserir coloque o nome da notícia desejada e o tipo de box que você deseja (veja os tipos).</p>\";\n echo \"</div>\"; \n \n // Inicía formulário para adicionar as BOX\n echo \"<div id='bx-cr-left'>\";\n echo \"<div class='bx-cr-tip'>Escolha um tipo de caixa</div>\";\n \n // Mostramos os três tipos de \n echo \"<div class='box-choice' id='choicebx-1'><div id='box-mini1-cr' class='box-mini1-cr'>235px</div></div>\";\n echo \"<div class='box-choice' id='choicebx-2'><div id='box-mini2-cr' class='box-mini2-cr'>360px</div></div>\";\n echo \"<div class='box-choice' id='choicebx-3'><div id='box-mini3-cr' class='box-mini3-cr'>720px</div></div>\";\n echo \"<input type='hidden' id='bc-selected-box' value='' />\";\n \n echo \"</div>\";\n echo \"<div id='bx-cr-mid'>\";\n echo \"<div class='bx-cr-tip'>Escolha a notícia para a box</div>\";\n \n echo \"<div id='noticia-select-bx-wrap'>\";\n echo \"<div class='choice-tip'>Selecione a caixa antes de escolher a notícia.</div>\";\n echo \"</div>\";\n echo \"</div>\";\n echo \"<div id='bx-cr-right'>\";\n echo \"<div class='bx-cr-tip'>Visualize seu layout atual</div>\";\n echo \"<div id='noticia-layout-bx-wrap'>\";\n $this->loadLayout();\n echo \"</div>\";\n \n echo \"</div>\";\n //\n \n echo \"<div class='clear'></div>\";\n echo \"</div>\";\n break;\n case 2:\n $portal = new Portal();\n try\n {\n $portal->novaBox($tipo,$noticia);\n echo \"<div id='ajax-wrap'>\";\n echo \"<div id='response'>1</div>\";\n echo \"<div id='ajax-content'>\";\n $this->loadLayout();\n echo \"</div></div>\";\n }\n catch(Exception $ex)\n {\n echo \"<div id='ajax-wrap'>\";\n echo \"<div id='response'>0</div>\";\n echo \"<div id='ajax-content'>\".$ex->getMessage().\"</div>\";\n echo \"</div>\"; \n }\n break;\n }\n }", "function meta_box( $object, $box ) {\n\t\t\n\t\t\t$meta_box_options = self::meta_box_args( $object->post_type );\n\t\t\n\t\t\tforeach ( $meta_box_options as $option ) {\n if ( method_exists( 'YouTube_White_Label_Shortcode', \"meta_box_{$option['type']}\" ) )\n call_user_func( array( $this, \"meta_box_{$option['type']}\" ), $option, get_post_meta( $object->ID, $option['name'], true ) );\n } ?>\n\t\t\t\n\t\t\t<p class=\"youtube-advanced-wrap\" style=\"text-align:right\"><a class=\"youtube-advanced\" href=\"#\"><?php _e( 'Advanced options', self::DOMAIN ); ?></a></p>\n \n <div id=\"youtube-advanced\" class=\"hide-if-js\"></div>\n \n <p class=\"output\">\n\t\t\t\t<label for=\"_YouTube_output\"><?php _e( 'Output:', self::DOMAIN ); ?></label>\n\t\t\t\t<br />\n\t\t\t\t<span id=\"_YouTube_output\" class=\"postbox\" style=\"box-sizing: border-box; display:block; min-height: 50px; padding: 5px;\"></span>\n\t\t\t</p>\n \n\t\t\t<!--<a id=\"youtube-send-to-content\" href=\"#\"><?php _e( 'send to content', self::DOMAIN ); ?></a>-->\n \n <div id=\"youtube-colorpicker\"></div>\n \n <?php printf( __( 'Like this plugin? <a href=\"%s\" target=\"_blank\">Buy me a beer</a>!', self::DOMAIN ), 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XQRHECLPQ46TE' ); ?></p>\n\t\t\t<?php\n\t\t}", "public function run()\n {\n $this->renderContentEnd();\n echo CHtml::closeTag('div') . \"\\n\";\n\n $this->useViewTemplate(\"box\")->selfRender();\n }", "public function store(CreateBox $request)\n {\n $obj=$this-> boxRepository->create($request->only( [ \"name\",\"description\",\"clickable_radius\",]));\n \n\n return redirect()->route('admin.box.index')->withFlashSuccess(__('alerts.frontend.box.saved'));\n }", "public function box($content, $style = 'blue-box', $title = null, $moreLink = null, $moreTitle = null)\n {\n return $this->startBox($style, $title) . $content . $this->endBox($moreLink, $moreTitle);\n }", "function ev_gallery_add_box() {\n\tglobal $ev_gallery_metabox;\n\t\n\tadd_meta_box($ev_gallery_metabox['id'], $ev_gallery_metabox['title'], 'ev_gallery_show_box', $ev_gallery_metabox['page'], $ev_gallery_metabox['context'], $ev_gallery_metabox['priority']);\n}", "public function __construct()\n\t{\n\t\tparent::__construct(array(\n\t\t\t'name'\t\t\t\t\t=> __('Tagged Box', 'fl-builder'),\n\t\t\t'description'\t=> __('A box with a tag.', 'fl-builder'),\n\t\t\t'category'\t\t=> __('Advanced Modules', 'fl-builder'),\n\t\t\t'dir'\t\t\t\t\t=> TECHNOVATION_MODULES_DIR . 'tagged-boxes/',\n\t\t\t'url'\t\t\t\t\t=> TECHNOVATION_MODULES_URL . 'tagged-boxes/',\n\t\t));\n\t}", "function draw_boxes2 ($image, $colorid=0, $offset=0) {\r\n \r\n $color[0]= imagecolorallocate($image, 0, 0, 0);\r\n $color[1]= imagecolorallocate($image, 255, 0, 0);\r\n $color[2]= imagecolorallocate($image, 0, 255, 0);\r\n $color[3]= imagecolorallocate($image, 0, 0, 255);\r\n $color[4]= imagecolorallocate($image, 255, 255, 0);\r\n \r\n $linecolor=$color[$colorid];\r\n \r\n foreach($this->text_blocks as $text_block) {\r\n imageline ( $image , $text_block->ordered['x1'] -$offset, $text_block->ordered['y1'] -$offset, $text_block->ordered['x2'] +$offset, $text_block->ordered['y2'] -$offset, $linecolor);\r\n imageline ( $image , $text_block->ordered['x2'] +$offset, $text_block->ordered['y2'] -$offset, $text_block->ordered['x3'] +$offset, $text_block->ordered['y3']+$offset , $linecolor);\r\n imageline ( $image , $text_block->ordered['x3'] +$offset, $text_block->ordered['y3'] +$offset, $text_block->ordered['x4'] -$offset, $text_block->ordered['y4']+$offset , $linecolor);\r\n imageline ( $image , $text_block->ordered['x4'] -$offset, $text_block->ordered['y4'] +$offset, $text_block->ordered['x1'] -$offset, $text_block->ordered['y1']-$offset , $linecolor);\r\n }\r\n $this->image_drawn=$image;\r\n }", "function print_simple_box($message, $align='', $width='', $color='', $padding=5, $class='generalbox', $id='', $return=false) {\n $output = '';\n $output .= print_simple_box_start($align, $width, $color, $padding, $class, $id, true);\n $output .= stripslashes_safe($message);\n $output .= print_simple_box_end(true);\n\n if ($return) {\n return $output;\n } else {\n echo $output;\n }\n}", "public function addCustomBox() {\n add_meta_box( \n $this->post_type . '_meta',\n __( self::getLabel($this->post_type) . ' Meta', $this->post_type . '_meta' ),\n array($this, 'innerCustomBox'),\n $this->post_type,\n $this->fields_location, \n $this->fields_priority\n ); \n }", "function customBox($bar, $cont) { ?>\n\t\t<div class=\"panel panel-default\">\n\t\t\t<div class=\"panel-heading\">\n\t\t\t\t<h3 class=\"panel-title\"><?php $msg = wfMessage( $bar ); echo htmlspecialchars( $msg->exists() ? $msg->text() : $bar ); ?></h3>\n\t\t\t</div>\n\t\t\t<div class=\"panel-body\"><?php\n\t\t\t\tif ( is_array( $cont ) ) { ?>\n\t\t\t\t\t<ul class=\"nav nav-pills nav-stacked\"><?php\n\t\t\t\t\t\tforeach($cont as $key => $val) {\n\t\t\t\t\t\t\techo $this->makeListItem($key, $val);\n\t\t\t\t\t\t}; ?>\n\t\t\t\t\t</ul><?php\n\t\t\t\t} else {\n\t\t\t\t\tprint $cont;\n\t\t\t\t}; ?>\n\t\t\t</div>\n\t\t</div><?php\n\t}", "public function cat(){\n $cat_id = intval(I('get.cat_id'));\n if(!$cat_id){\n http_response_code(404);\n }\n\n $display = cookie('display');\n if($display) {\n if (!preg_match(\"/^list|grid$/\", $display)) {\n die('hack out');\n }else{\n if($display == 'list') {\n $this->assign('display', 1);\n }else{\n $this->assign('display', 0);\n }\n }\n }\n $this->assign('cat_id', $cat_id);\n $mbx = D('Admin/cat')->parentList($cat_id);\n if($mbx){\n $this->assign('mbx',$mbx);\n }\n\n $cat_in_nav = M('cat')->field('cat_id,cat_name')->where('show_in_nav=1')->select();\n $this->assign('cat_in_nav',$cat_in_nav);\n $his = array_reverse(session('history'),true);\n $this->assign('history',$his);\n $sale = M('goods')->field('goods_id,goods_name,thumb_img,shop_price,goods_number')->order('goods_number desc')->limit(10)->select();\n $this->assign('sale',$sale);\n $this->assign('cattree',D('Admin/Cat')->gettree());\n\n $this->assign('cat_name', M('cat')->field('cat_name')->find($cat_id)['cat_name']);\n\n $this->display();\n }", "function create_meta_post_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-post-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' POST SETTINGS', 'new_meta_post_boxes', 'post', 'normal', 'high' );\n\t}\n}", "function writeboxlist( $cat_array , $_POST ){\n\t$boxlist = \"\" ;\n\tforeach( $cat_array as $key => $value ){\n\t\t $boxlist .= writebox( $_POST , \"C\" . $value[ 0 ], $key , $value[ 1 ] ) ;\n\t}\n\treturn $boxlist ;\n}", "function coolRahulSoni_meta_box_add()\n{\n add_meta_box( 'my-meta-box-id', 'My First Meta Box', 'cd_meta_box_cb', 'post', 'normal', 'high' );\n}", "public function create()\n {\n $boxtag = Tag::doesntHave('box')->pluck('tag');\n $employeetags = Tag::doesntHave('employee')->pluck('tag');\n $tags = $boxtag->intersect($employeetags);\n $employeeTags = Tag::has('employee')->pluck('tag');\n $employees = Employee::pluck('employee_name','id');\n $warehouses = Warehouse::get();\n return view('box.createbox', compact('tags','warehouses','employees'));\n }", "public function metabox( $post, $box ) {\r\n\t\t$defaults = array('taxonomy' => 'category');\r\n\t\tif ( !isset($box['args']) || !is_array($box['args']) )\r\n\t\t\t$args = array();\r\n\t\telse\r\n\t\t\t$args = $box['args'];\r\n\t\textract( wp_parse_args($args, $defaults), EXTR_SKIP );\r\n\r\n\t\t$tax = get_taxonomy($taxonomy);\r\n\r\n\t\t//get current terms\r\n\t\t$checked_terms = $post->ID ? get_the_terms( $post->ID, $taxonomy) : array();\r\n\r\n\t\t//get first term object\r\n $current_term = ! empty( $checked_terms ) && ! is_wp_error( $checked_terms ) ? array_pop( $checked_terms ) : false;\r\n $current_id = ( $current_term ) ? $current_term->term_id : '';\r\n\r\n\t\t?>\r\n\t\t<div id=\"taxonomy-<?php echo $taxonomy; ?>\" class=\"radio-buttons-for-taxonomies\">\r\n\t\t\t<ul id=\"<?php echo $taxonomy; ?>-tabs\" class=\"category-tabs\">\r\n\t\t\t\t<li class=\"tabs\"><a href=\"#<?php echo $taxonomy; ?>-all\" tabindex=\"3\"><?php echo $tax->labels->all_items; ?></a></li>\r\n\t\t\t\t<li class=\"hide-if-no-js\"><a href=\"#<?php echo $taxonomy; ?>-pop\" tabindex=\"3\"><?php _e( 'Most Used' ); ?></a></li>\r\n\t\t\t</ul>\r\n\r\n\t\t\t<style>\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.categorychecklist, .radio-buttons-for-taxonomies ul.tagchecklist { margin: 0; }\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.children { margin-left: 18px; }\r\n\t\t\t</style>\r\n\r\n\t\t\t<?php wp_nonce_field( 'radio_nonce-' . $taxonomy, '_radio_nonce-' . $taxonomy ); ?>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-pop\" class=\"wp-tab-panel tabs-panel\" style=\"display: none;\">\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist-pop\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\" >\r\n\t\t\t\t\t<?php $popular = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) );\r\n\r\n\t\t\t\t\t\tif ( ! current_user_can($tax->cap->assign_terms) )\r\n\t\t\t\t\t\t\t$disabled = 'disabled=\"disabled\"';\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$disabled = '';\r\n\r\n\t\t\t\t\t\t$popular_ids = array(); ?>\r\n\r\n\t\t\t\t\t\t<?php foreach( $popular as $term ){\r\n\r\n\t\t\t\t\t\t\t$popular_ids[] = $term->term_id;\r\n\r\n\t\t\t\t\t $value = is_taxonomy_hierarchical( $taxonomy ) ? $term->term_id : $term->slug;\r\n\t\t\t\t\t $id = 'popular-'.$taxonomy.'-'.$term->term_id;\r\n\r\n\t\t\t\t\t echo \"<li id='$id'><label class='selectit'>\";\r\n\t\t\t\t\t echo \"<input type='radio' id='in-{$id}'\" . checked( $current_id, $term->term_id, false ) . \" value='{$value}' {$disabled} />&nbsp;{$term->name}<br />\";\r\n\r\n\t\t\t\t\t echo \"</label></li>\";\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-all\" class=\"wp-tab-panel tabs-panel\">\r\n\t\t\t\t<?php\r\n\t $name = 'radio_tax_input[' . $taxonomy . ']';\r\n\t echo \"<input type='hidden' name='{$name}[]' value='0' />\"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.\r\n\t ?>\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist\" data-wp-lists=\"list:<?php echo $taxonomy?>\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\">\r\n\t\t\t\t\t<?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t<?php if ( current_user_can( $tax->cap->edit_terms ) ) : ?>\r\n\t\t\t\t<div id=\"<?php echo $taxonomy; ?>-adder\" class=\"wp-hidden-children\">\r\n\t\t\t\t\t<h4>\r\n\t\t\t\t\t\t<a id=\"<?php echo $taxonomy; ?>-add-toggle\" href=\"#<?php echo $taxonomy; ?>-add\" class=\"hide-if-no-js\" tabindex=\"3\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t/* translators: %s: add new taxonomy label */\r\n\t\t\t\t\t\t\t\tprintf( __( '+ %s' ), $tax->labels->add_new_item );\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t</h4>\r\n\t\t\t\t\t<p id=\"<?php echo $taxonomy; ?>-add\" class=\"category-add wp-hidden-child\">\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>\"><?php echo $tax->labels->add_new_item; ?></label>\r\n\t\t\t\t\t\t<input type=\"text\" name=\"new<?php echo $taxonomy; ?>\" id=\"new<?php echo $taxonomy; ?>\" class=\"form-required form-input-tip\" value=\"<?php echo esc_attr( $tax->labels->new_item_name ); ?>\" aria-required=\"true\"/>\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>_parent\">\r\n\t\t\t\t\t\t\t<?php echo $tax->labels->parent_item_colon; ?>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t<?php if( is_taxonomy_hierarchical($taxonomy) ) {\r\n\t\t\t\t\t\t\twp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '&mdash; ' . $tax->labels->parent_item . ' &mdash;', 'tab_index' => 3 ) );\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t<input type=\"button\" id=\"<?php echo $taxonomy; ?>-add-submit\" data-wp-lists=\"add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add\" class=\"button <?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'category-add-submit'; } else { echo 'radio-add-submit';} ?>\" value=\"<?php echo esc_attr( $tax->labels->add_new_item ); ?>\" tabindex=\"3\" />\r\n\t\t\t\t\t\t<?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy ); ?>\r\n\t\t\t\t\t\t<span id=\"<?php echo $taxonomy; ?>-ajax-response\"></span>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</div>\r\n\t\t\t<?php endif; ?>\r\n\t\t</div>\r\n\t<?php\r\n\t}", "function box_widget(){\n\t$CI=& get_instance();\n\treturn $CI->parser->parse('layout/ddi/box_widget.html', $CI->data,true);\n}", "abstract function appliedOnClass(): ?Box;", "public function createAction() {\n $form = $this->view->form = new Whmedia_Form_Circle();\n\n // Check post\n if( $this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost()) )\n {\n // we will add the category\n $values = $form->getValues();\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try\n {\n // add category to the database\n // Transaction\n $table = Engine_Api::_()->getDbtable('circles', 'whmedia');\n\n $row = $table->createRow($values);\n $row->user_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n $box_id = $row->save();\n\n $db->commit();\n \n // ** auto add if the box id exist ** \n $addnew = (int) $this->_getParam('addnew' , false);\n $_subject = Engine_Api::_()->user()->getUser($addnew); \n if( $_subject->getIdentity() )\n {\n $viewer = Engine_Api::_()->user()->getViewer();\n $listsTable = Engine_Api::_()->getDbTable('circles', 'whmedia');\n $box = $listsTable->fetchRow(array('user_id = ?' => $viewer->getIdentity(),\n 'circle_id = ?' => $box_id ));\n\n $box->add($_subject);\n }\n // ** auto add if the box id exist ** \n }\n\n catch( Exception $e )\n {\n $db->rollBack(); \n throw $e;\n }\n\n return $this->_helper->Message(\"Box added.\");\n }\n\n // Output\n $this->renderScript('admin-settings/form.tpl');\n }", "function cdn_do_taxonomy_inside_loop_widget() {\n\tgenesis_widget_area( 'cdn-taxonomy-inside-loop-widget', array(\n\t\t\t'before' => '<aside class=\"widget-area inside-loop-widget\">' . genesis_sidebar_title( 'cdn-taxonomy-inside-loop-widget' ),\n\t\t\t'after' => '</aside>',\n\t) );\n}", "function blankMiddleBox($header,$subline,$body){\n\t\techo \"<div class='side-body-bg'>\\n\";\n\t\techo \"<span class='scapmain'>$header</span>\\n\";\n\t\techo \"<br />\\n\";\n\t\techo \"<span class='poster'>$subline</span>\\n\";\n\t\techo \"</div>\\n\";\n\t\techo \"<div class='tbl'>$body</div>\\n\";\n\t\techo \"<br />\\n\";\n\t}", "function top10_add_custom_box() {\r\n add_meta_box( \r\n 'top10_sectionid',\r\n __( 'Make your Top 10 Countdown', 'top10_textdomain' ),\r\n 'top10_inner_custom_box',\r\n 'charts' \r\n );\r\n}", "function add_custom_box() {\n $screens = [ 'post', 'packages', 'wporg_cpt' ];\n foreach ( $screens as $screen ) {\n add_meta_box(\n 'tour-package-info', // Unique ID\n 'Tour Package Info', // Box title\n 'custom_box_html', // Content callback, must be of type callable\n $screen // Post type\n );\n }\n}", "public function run_change_cat($cat,$id){\n\n\t\t$sql = \"UPDATE `categories` SET `cat` = '$cat' WHERE `id` = $id\";\n\n\t\t\t$this->query($sql);\n\t}", "function target_add_cat($cat)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $cat['name']);\n\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'cat (id, name, view_order, cat_opt) \n\t VALUES('. (int)$cat['id'] .','. _esc($cat['name']) .','. (int)$cat['view_order'] .', 3)');\n\t$GLOBALS['cat_map'][ $cat['id'] ] = $cat['id'];\n/*\nfud_use('cat.inc', true);\n$nc = new fud_cat;\n$nc->name = $c->name;\n$nc->description = $c->description;\n$nc->view_order = $c->disporder;\n$nc->cat_opt = 1|2;\t// This should be the default in cat.inc. Fix in next release and del this line.\n$GLOBALS['cat_map'][$c->fid] = $nc->add('LAST');\t// FIRST should also be defaulted.\n*/\n}", "public function run()\n {\n Box::create([\n \t'name'=>'Caja chica',\n \t'current_money'=>'320' \n ]);\n Box::create([\n \t'name'=>'Caja grande',\n \t'current_money'=>'1000'\n ]);\n }", "function dt_sc_icon_box_colored($attrs, $content = null, $shortcodename = \"\") {\n\t\textract ( shortcode_atts ( array (\n\t\t\t\t'type' => '',\n\t\t\t\t'fontawesome_icon' => '',\n\t\t\t\t'custom_icon' => '',\n\t\t\t\t'title' => '',\n\t\t\t\t'bgcolor' => ''\n\t\t), $attrs ) );\n\t\t\n\t\t$content = DTCoreShortcodesDefination::dtShortcodeHelper ( $content );\n\t\t\n\t\t$bgcolor = empty ( $bgcolor ) ? \"\" : \" style='background:{$bgcolor};' \";\n\t\t\n\t\t$type = ( trim($type) === 'type1' ) ? \"no-space\" : \"space\";\n\t\t\n\t\t$out = \"<div class='dt-sc-colored-box {$type}' {$bgcolor}>\";\n\t\t\n\t\t$icon = \"\";\n\t\tif( !empty($fontawesome_icon) ){\n\t\t\t$icon = \"<span class='fa fa-{$fontawesome_icon}'> </span>\";\n\t\t\n\t\t}elseif( !empty($custom_icon) ){\n\t\t\t$icon = \"\";\t\n\t\t}\n\t\t\n\t\t$out .= \"<h5>{$icon}{$title}</h5>\";\n\t\t$out .= $content;\n\t\t$out .= \"</div>\";\n\t\treturn $out;\n\t}", "function _make_cat_compat(&$category)\n {\n }", "function new_meta_portfolio_boxes() {\n\tglobal $post, $new_meta_portfolio_boxes;\n\n\tforeach($new_meta_portfolio_boxes as $meta_box) {\n\t\tprint_meta_box($meta_box, $post);\n\t}\n}", "function volpress_cpt_add_box() {\n\tadd_meta_box('volpress_section_1', 'Tasks', 'volpress_inner_custom_box', 'volpress', 'normal', 'default', array('section'=>1));\n\tadd_meta_box('volpress_section_2', 'Date', 'volpress_inner_custom_box', 'volpress', 'side', 'high', array('section'=>2));\n\t//add_meta_box('volpress_sectionid', 'My Post Section Title', 'volpress_inner_custom_box', 'volpress');\n}", "private function _getLolcat()\n {\n $query = 'select id, title from flickr.photos.search(50) where tags=\"lolcat\" or text=\"lolcat\"';\n\n $array = $this->grabData($query);\n $stuff = $array['query']['results']['photo'];\n \n $id = $stuff[array_rand($stuff)]['id'];\n $title = $stuff[array_rand($stuff)]['title'];\n \n $sizes = $this->grabData('select source from flickr.photos.sizes where photo_id = '. $id);\n \n $this->_message($this->_data->nick.': '. $title .' => '. $sizes['query']['results']['size'][3]['source']);\n \n }", "public function add_meta_box() {\r\n\r\n\t\tif( ! is_wp_error( $this->tax_obj ) && isset($this->tax_obj->object_type ) ) foreach ( $this->tax_obj->object_type as $post_type ):\r\n\t\t\t$label = $this->tax_obj->labels->name;\r\n\t\t\t$id = ! is_taxonomy_hierarchical( $this->taxonomy ) ? 'radio-tagsdiv-'.$this->taxonomy : 'radio-' .$this->taxonomy .'div' ;\r\n\t\t\tadd_meta_box( $id, $label ,array( $this,'metabox' ), $post_type ,'side','core', array( 'taxonomy'=>$this->taxonomy ) );\r\n\t\tendforeach;\r\n\t}", "function display_phases_box($icon_url, $title, $activity_count, $new_activity_count, $show_icon = false, $show_activities = false, $layout = 'list') {\n $output = '';\n\n\n if ($show_icon === true) {\n $output .= display_phases_icon_box($icon_url, $show_icon);\n }\n\n if ($show_icon !== true && $show_activities !== true) {\n $output .= '<div class=\"' . $layout . '-textcontnoicon\">\n\t\t\t\t\t\t<div class=\"titleboxnoiconnoact\">' . $title . '</div>\n\t\t\t\t\t</div>';\n } else if ($show_icon !== true && $show_activities === true) {\n $output .= '<div class=\"' . $layout . '-textcontnoicon\">\n\t\t\t\t\t\t<div class=\"titleboxnoicon\"><span style=\"padding: 0px 0px 0px 5px\">' . $title . '</span></div>\n\t\t\t\t\t</div>';\n } else if ($show_icon === true && $show_activities !== true) {\n $output .= '<div class=\"' . $layout . '-textcont\">\n\t\t\t\t\t\t<div class=\"titleboxnoact\"><span style=\"padding: 0px 0px 0px 5px\">' . $title . '</span></div>\n\t\t\t\t\t</div>';\n } else {\n $output .= '<div class=\"' . $layout . '-textcont\">\n\t\t\t\t\t\t<div class=\"titlebox\"><span style=\"padding: 0px 0px 0px 5px\">' . $title . '</span></div>\n\t\t\t\t\t</div>';\n }\n\n if ($show_activities === true) {\n $output .= display_phases_activity_box($activity_count, $new_activity_count, $show_activities);\n }\n\n return $output;\n}", "public function addTeaserContentBox() {\n add_meta_box('laterpay_teaser_content',\n __('Teaser Content', 'laterpay'),\n array($this->getPricingPostController(), 'teaserContentBox'),\n 'post',\n 'normal',\n 'high'\n );\n }", "function remove_default_categories_box() {\n remove_meta_box('categorydiv', 'post', 'side');\n}", "function print_simple_box_start($align='', $width='', $color='', $padding=5, $class='generalbox', $id='', $return=false) {\n\n $output = '';\n\n $divclasses = 'box '.$class.' '.$class.'content';\n $divstyles = '';\n\n if ($align) {\n $divclasses .= ' boxalign'.$align; // Implement alignment using a class\n }\n if ($width) { // Hopefully we can eliminate these in calls to this function (inline styles are bad)\n if (substr($width, -1, 1) == '%') { // Width is a % value\n $width = (int) substr($width, 0, -1); // Extract just the number\n if ($width < 40) {\n $divclasses .= ' boxwidthnarrow'; // Approx 30% depending on theme\n } else if ($width > 60) {\n $divclasses .= ' boxwidthwide'; // Approx 80% depending on theme\n } else {\n $divclasses .= ' boxwidthnormal'; // Approx 50% depending on theme\n }\n } else {\n $divstyles .= ' width:'.$width.';'; // Last resort\n }\n }\n if ($color) { // Hopefully we can eliminate these in calls to this function (inline styles are bad)\n $divstyles .= ' background:'.$color.';';\n }\n if ($divstyles) {\n $divstyles = ' style=\"'.$divstyles.'\"';\n }\n\n if ($id) {\n $id = ' id=\"'.$id.'\"';\n }\n\n $output .= '<div'.$id.$divstyles.' class=\"'.$divclasses.'\">';\n\n if ($return) {\n return $output;\n } else {\n echo $output;\n }\n}", "public function create()\n {\n echo 'create a banner juice';\n }", "function display_phases_icon_box($icon_url) {\n $output = '';\n\n $output .= '<div class=\"imgbox\">';\n\n if (!empty($icon_url)) {\n $output .= '<img height=\"40px\" width=\"40px\" src=\"' . $icon_url . '\" />';\n }\n\n $output .= '</div>';\n\n return $output;\n}", "public function register_meta_box() {\n\n\t\t\tadd_meta_box($this->slug, $this->options['title'], array($this, 'setup_meta_box'), $this->screen, $this->options['context'], $this->options['priority']);\n\t\t\tremove_meta_box('postcustom', $this->screen, 'normal');\n\t\t}", "static function add_custom_box() {\n\n // A meta box para os dados\n add_meta_box(\n 'agenda_data',\n 'Dados da Agenda',\n array( __CLASS__,'inner_custom_box_callback_function' ),\n 'agenda', // em que post type eles entram?\n 'side' // onde? side, normal, advanced\n //,'default' // 'high', 'core', 'default' or 'low'\n //,array('variáve' => 'valor') // variaveis que serão passadas para o callback\n );\n\n\n // A meta box que replica a taxonomia 'agenda_tipo', mas com radio buttons\n\t\tadd_meta_box(\n\t\t\t'agenda_tipo',\n\t\t\t_x( 'Tipo da Agenda', 'tipo do evento da agenda', 'panamazonica' ),\n\t\t\tarray( __CLASS__, 'agenda_tipo_callback_function' ),\n\t\t\t'agenda',\n\t\t\t'side',\n\t\t\t'core'\n\t\t);\n\n }", "public function move_meta_box() {\n\n\t\tglobal $wp_taxonomies;\n\n\t\t$post_types = $wp_taxonomies['cahnrs-category']->object_type;\n\n\t\tforeach( $post_types as $post_type ) {\n\t\t\t\\remove_meta_box( 'cahnrs-categorydiv', $post_type, 'side' );\n\t\t\t\\add_meta_box( 'cahnrs-categorydiv', 'Content Settings', array( $this, 'cahnrs_page_settings_interface' ), $post_type, 'normal', 'high' );\n\t\t}\n\n\t}", "public function putCatsOutside() {\r\n\t\t$cats_house = $this->getCatsInside();\r\n\t\t$cats_boxes = $this->getCatsInBoxes();\r\n\t\t$cats_remaining = [];\r\n\t\tforeach ($cats_house as $cat_in_house) {\r\n\t\t\tif(!in_array($cat_in_house,$cats_boxes)) {\r\n\t\t\t\t$cats_remaining[] = $cat_in_house;\r\n\t\t\t\t$key = array_search($cat_in_house,$this->_cats);\r\n\t\t\t\tunset($this->_cats[$key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count($cats_remaining);\r\n\t}", "function __construct() \n\t{\t\t\n\t\tparent::__construct(\n\t\t\t'widget-image-box', \n\t\t\t__('Image box'), \n\t\t\tarray( \n\t\t\t\t'description' => __('Add a promo image box to sidebar.'), \n\t\t\t\t'classname' => 'b-box-info_image'\n\t\t\t)\n\t\t);\n\t}", "public function setBoxType($value)\n {\n return $this->set(self::_BOX_TYPE, $value);\n }", "function normal_box_equal( $atts, $content = null ) {\n return '<div class=\"boxes normal_box small\">' . $content . '</p></div>';\n}", "function fzproject_meta_box()\n{\n add_meta_box('fzproject_meta_box', 'New portfolio item', 'display_fzproject_meta_box', 'fzproject_post', 'normal', 'high');\n}", "function scoreboard_widget() {\r\n\r\n\techo\"<div class='widget'><h2>Scoreboard</h2><img src='http://www.bollywoodjalwa.com/cricket-widget.php'></div>\";\r\n\r\n}", "function cmsmasters_post_category($cmsmasters_id, $taxonomy, $template_type = 'page', $show = true) {\n\t$out = '';\n\t\n\t\n\tif (get_the_terms($cmsmasters_id, $taxonomy)) {\n\t\tif ($template_type == 'page') {\n\t\t\t$out .= '<span class=\"cmsmasters_post_category\">' . \n\t\t\t\tesc_html__('In', 'mall') . ' ' . \n\t\t\t\tcmsmasters_get_the_category_list($cmsmasters_id, $taxonomy, ', ') . \n\t\t\t'</span>';\n\t\t} elseif ($template_type == 'post') {\n\t\t\t$cmsmasters_option = cmsmasters_get_global_options();\n\t\t\t\n\t\t\t\n\t\t\tif ($cmsmasters_option[CMSMASTERS_SHORTNAME . '_blog_post_cat']) {\n\t\t\t\t$out .= '<span class=\"cmsmasters_post_category\">' . \n\t\t\t\t\tesc_html__('In', 'mall') . ' ' . \n\t\t\t\t\tcmsmasters_get_the_category_list($cmsmasters_id, $taxonomy, ', ') . \n\t\t\t\t'</span>';\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\tif ($show) {\n\t\techo $out;\n\t} else {\n\t\treturn $out;\n\t}\n}", "function master_sidebar_category_posts_metabox() {\n\n\t$admin_page_name = 'appearance_page_custom_theme_sidebars';\n\n\tadd_meta_box( \n\t\t'master-add-category-posts-metabox', \n\t\t__( 'All Posts In Category', 'theme-translate' ), \n\t\t'master_sidebar_render_category_posts_metabox', \n\t\t$admin_page_name, \n\t\t'side', \n\t\t'default'\n\t);\n}", "public function addBox($box) {\n\t\t$box = array_merge($this->_defaultBox, $box);\n\n\t\t$elems = $this->_boxes;\n\n\t\tif (is_numeric($box['index'])) {\n\t\t\t$elems[$box['index']] = $box;\n\t\t} else {\n\t\t\t$elems[] = $box;\n\t\t}\n\n\t\t$this->_boxes = $elems;\n\t\treturn $this;\n\t}", "public function edit(Box $box)\n {\n //\n }", "function cinerama_edge_meta_box_add() {\n\t\tglobal $cinerama_edge_global_Framework;\n\n\t\tforeach ( $cinerama_edge_global_Framework->edgtMetaBoxes->metaBoxes as $key => $box ) {\n\t\t\t$hidden = false;\n\t\t\tif ( ! empty( $box->hidden_property ) ) {\n\t\t\t\tforeach ( $box->hidden_values as $value ) {\n\t\t\t\t\tif ( cinerama_edge_option_get_value( $box->hidden_property ) == $value ) {\n\t\t\t\t\t\t$hidden = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( is_string( $box->scope ) ) {\n\t\t\t\t$box->scope = array( $box->scope );\n\t\t\t}\n\n\t\t\tif ( is_array( $box->scope ) && count( $box->scope ) ) {\n\t\t\t\tforeach ( $box->scope as $screen ) {\n\t\t\t\t\tcinerama_edge_create_meta_box_handler( $box, $key, $screen );\n\n\t\t\t\t\tif ( $hidden ) {\n\t\t\t\t\t\tadd_filter( 'postbox_classes_' . $screen . '_edgtf-meta-box-' . $key, 'cinerama_edge_meta_box_add_hidden_class' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tadd_action( 'admin_enqueue_scripts', 'cinerama_edge_enqueue_meta_box_styles' );\n\t\tadd_action( 'admin_enqueue_scripts', 'cinerama_edge_enqueue_meta_box_scripts' );\n\t}", "public function getArtBox($fallback = true, $asRect = true) {}", "function create_meta_box() {\n\n\tglobal $postmetas;\n\t\n\tif(!isset($_GET['post_type']) OR empty($_GET['post_type']))\n\t{\n\t\tif(isset($_GET['post']) && !empty($_GET['post']))\n\t\t{\n\t\t\t$post_obj = get_post($_GET['post']);\n\t\t\t$_GET['post_type'] = $post_obj->post_type;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_GET['post_type'] = 'post';\n\t\t}\n\t}\n\t\n\tif ( function_exists('add_meta_box') && isset($postmetas) && count($postmetas) > 0 ) { \n\t\tforeach($postmetas as $key => $postmeta)\n\t\t{\n\t\t\tif($_GET['post_type']==$key)\n\t\t\t{\n\t\t\t\tadd_meta_box( 'metabox', ucfirst($key).' Options', 'new_meta_box', $key, 'side', 'high' ); \n\t\t\t}\n\t\t}\n\t}\n\n}", "public function apb_add_meta_boxes() {\r\n\t}" ]
[ "0.63974315", "0.60132164", "0.5789087", "0.56640995", "0.5491566", "0.5467979", "0.54352826", "0.53861284", "0.52841055", "0.52230656", "0.52068084", "0.5181955", "0.51817244", "0.5164691", "0.5144654", "0.5078062", "0.5067036", "0.50340796", "0.502842", "0.5026403", "0.5023838", "0.5007", "0.5003937", "0.50000477", "0.49865398", "0.49852994", "0.49674952", "0.4936089", "0.4925945", "0.49201643", "0.49109784", "0.4885719", "0.4874366", "0.4873158", "0.4859828", "0.48471928", "0.48397347", "0.48329714", "0.4810247", "0.48100802", "0.47758305", "0.4774594", "0.4768731", "0.4759698", "0.47481698", "0.47329837", "0.4731579", "0.4712103", "0.4708832", "0.47082037", "0.47066313", "0.47048676", "0.47039565", "0.4696209", "0.46842661", "0.4679835", "0.46643117", "0.46563506", "0.4656237", "0.46423486", "0.46208826", "0.4618974", "0.46144277", "0.46056715", "0.46048313", "0.46017423", "0.4599486", "0.4596601", "0.4590822", "0.458653", "0.4584628", "0.45793292", "0.4569888", "0.45678806", "0.456749", "0.45645773", "0.45618954", "0.45608988", "0.4555937", "0.4549303", "0.4536717", "0.45338914", "0.4529491", "0.4526953", "0.45260674", "0.45234233", "0.4522962", "0.4522032", "0.45203996", "0.45203122", "0.4519277", "0.45181635", "0.45143276", "0.4505723", "0.4501606", "0.44997472", "0.4498839", "0.44988072", "0.44964314", "0.44963384" ]
0.55986136
4
Uncomment the below to wipe the table clean before populating
public function run() { DB::table('colloques')->truncate(); $locations = [ [ 'name' => 'Aula des Jeunes-Rives', 'adresse' => 'Espace Louis-Agassiz 1, Neuchâtel', 'url' => '', 'map' => 'carte.jpg', ] ]; $comptes = [ [ 'motif' => '<p>U.01262<br>CEMAJ - 2015</p>', 'adresse' => '<p>Université de Neuchâtel <br /> Service des fonds de tiers <br /> 2000 Neuchâtel</p>', 'compte' => '20-5711-2' ] ]; $colloques = [ [ 'titre' => 'Nouveau colloque', 'soustitre' => 'Platea sociosqu potentié proîn', 'sujet' => 'Est-a-dire curabitur lorem fermentum potenti', 'remarques' => 'Frînglilia porttitor curabitur proin est èiam convallis léo tincidunt ût ac métus vestibulum elementum consequat pulvinar.', 'start_at' => \Carbon\Carbon::now()->addWeek(3), 'end_at' => \Carbon\Carbon::now()->addWeek(3), 'registration_at' => \Carbon\Carbon::now()->addWeek(2), 'active_at' => \Carbon\Carbon::now()->addMonth(1), 'organisateur_id' => '1', 'location_id' => '1', 'compte_id' => '1', 'visible' => '0', 'bon' => '1', 'facture' => '1', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now(), ] ]; DB::table('colloques')->insert($colloques); DB::table('locations')->insert($locations); DB::table('comptes')->insert($comptes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clean(): void\n {\n $this->truncateJournalTable();\n $this->output(\"<success>Table {$this->internalTable} truncated</success>\");\n }", "public function clean() {\n $this->data = \"\";\n $this->currentRow = 1;\n $this->curPosition = 0;\n }", "private function getCleanTables() {\n\t\tunset($this->_vm_product);\n\t\tunset($this->product_id);\n\t\tunset($this->product_sku);\n\t\tunset($this->product_in_stock);\n\t}", "public function resetTable();", "public function clear()\n {\n $this->sql = '';\n $this->columns = array();\n $this->values = array();\n }", "public function clean()\n {\n // Set to default values\n $this->sSql = '';\n $this->aValues = [];\n }", "function Clean()\n\t{\n\t\t$this->_arrRows\t\t\t\t= Array();\n\t\t$this->_arrHeader\t\t\t= Array();\n\t\t$this->_arrWidths\t\t\t= Array();\n\t\t$this->_arrAlignments\t\t= Array();\n\t\t$this->_arrLinkedTables\t\t= Array();\n\t\t$this->_bolRowHighlighting\t= FALSE;\n\t\t$this->_bolDetails\t\t\t= FALSE;\n\t\t$this->_bolToolTips\t\t\t= FALSE;\n\t\t$this->_bolLinked\t\t\t= FALSE;\n\t\t$this->_intCurrentRow\t\t= NULL;\n\t}", "public function clear()\r\n\t{\r\n\t\t$this->db->runQuery(\"TRUNCATE TABLE `\" . $this->name . \"`\");\r\n\t}", "private function truncate()\n {\n // Désactivation des contraintes FK\n $this->co->executeQuery('SET foreign_key_checks = 0');\n // On tronque\n $this->co->executeQuery('TRUNCATE TABLE casting');\n $this->co->executeQuery('TRUNCATE TABLE department');\n $this->co->executeQuery('TRUNCATE TABLE genre');\n $this->co->executeQuery('TRUNCATE TABLE job');\n $this->co->executeQuery('TRUNCATE TABLE movie');\n $this->co->executeQuery('TRUNCATE TABLE movie_genre');\n $this->co->executeQuery('TRUNCATE TABLE person');\n $this->co->executeQuery('TRUNCATE TABLE review');\n $this->co->executeQuery('TRUNCATE TABLE team');\n $this->co->executeQuery('TRUNCATE TABLE user');\n }", "private function clear_dummy_data()\n {\n $this->adapter->query('DELETE FROM ' . RUCKUSING_TS_SCHEMA_TBL_NAME);\n }", "function _reset()\n {\n foreach ($this->_cols as $col => $val) {\n if (isset($val['default'])) {\n $this->_data[$col] = $val['default'];\n } else {\n $this->_data[$col] = '';\n }\n }\n }", "public function uninitialize()\n {\n $table_name = $this->get_table_name();\n $sql = \"DROP TABLE IF EXISTS $table_name;\";\n\n if (!is_null($this->wpdb)) {\n $this->wpdb->query($sql);\n }\n }", "function doempty()\r\n\t{\r\n\t\t$model\t= &$this->getModel( 'table' );\r\n\t\t$model->truncate();\r\n\t\t$this->display();\r\n\t}", "private function reset(){\n\n\t\tforeach($this as $k=>$v) unset($this->$k);\n\n\t\t$this::$map = $this->maper();\n\n\t\t$this->name = \"\";\n\n\t\t$this->address = [];\n\n\t\t$this->tableclass();\n\n\t}", "function emptyIndexTable(){\n\t\t$this->ecmDBhandle->truncateTable($this->dfs_db-> table_name);\n\t}", "private function cleanDatabase()\n {\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n foreach($this->tables as $table)\n {\n\n DB::table($table)->truncate();\n\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n\n\n }", "private function populateDummyTable() {}", "protected function getCleanableTableList() {}", "public function truncateTable() {\n Schema::disableForeignKeyConstraints();\n DB::table('missed_calls')->truncate();\n Schema::enableForeignKeyConstraints();\n }", "private function purgeTables()\n\t{\t\n\t\t$this->db->query(\"DELETE FROM categories\");\n\t\t$this->db->query(\"DELETE FROM album_art\");\n\t\t$this->db->query(\"TRUNCATE TABLE albums\");\n\t\t\n\t}", "public function Clear() {\n $this->_row = '';\n $this->_table = '';\n $this->_itemcount = 0;\n $this->_rown = 0;\n }", "public function truncateTable() {\n Schema::disableForeignKeyConstraints();\n DB::table('questions')->truncate();\n DB::table('answers')->truncate();\n Schema::enableForeignKeyConstraints();\n }", "protected function cleanTableNames() {}", "protected function truncateTables()\n {\n \\DB::table('cities')->truncate();\n \\DB::table('states')->truncate();\n }", "function clearwatson(){\n\t\t$connection = Database::getConnection();\n\t\t//Empty watson table\n\t\t$query=\"TRUNCATE TABLE watson\";\n\t\tif (!$connection->query($query)){\n\t\t\techo \"Error :\" .$query . \"<br>\" . $connection->error;\n\t\t}\n\t\t//Empty watson_country table\n\t\t$query=\"TRUNCATE TABLE watson_country\";\n\t\tif (!$connection->query($query)){\n\t\t\techo \"Error :\" .$query . \"<br>\" . $connection->error;\n\t\t}\n\t}", "private function prepareTables() {}", "private function clear() {\n $this->select = null;\n $this->where = null;\n $this->order_by = array();\n $this->group_by = '';\n $this->join = array();\n $this->limit = '';\n $this->where_in = null;\n }", "function base_clear(){\n $tables = array(\n 'oc_product',\n 'oc_product_image',\n 'oc_manufacturer',\n 'oc_manufacturer_description',\n 'oc_product_description',\n 'oc_product_to_category',\n 'oc_product_attribute',\n 'oc_attribute',\n 'oc_attribute_description',\n // 'oc_attribute_value',\n // 'oc_category',\n // 'oc_category_description',\n 'oc_product_to_store',\n // 'oc_category_to_store',\n 'oc_manufacturer_to_store',\n 'oc_product_to_layout',\n // 'oc_category_to_layout',\n );\n foreach ($tables as $table)\n {\n sDb::query(\"TRUNCATE TABLE $table\");\n echo \"Таблица $table очищена\\n\";\n }\n}", "function reset(){\n\t\t$this->__columns = array();\n\t\t$this->__actions = array();\n\t}", "protected function resetTableInfo()\n {\n $this->constraintLoader = null;\n $this->columnLoader = null;\n $this->identityLoader = null;\n }", "public function reset()\n {\n $db = PDOController::getInstance();\n \n $req = $db->prepare(\"TRUNCATE TABLE `executedtask` \");\n $req->execute([]);\n }", "public function resetInitial()\n {\n // drop column\n DB::query()->selectRaw('SET SQL_SAFE_UPDATES = 0;');\n QueryProfile::query()->where('initial_avg_position', '!=', 0)->update(['initial_avg_position' => 0]);\n QueryProfile::query()->where('initial_ctr_value', '!=', 0)->update(['initial_ctr_value' => 0]);\n QueryProfile::query()->where('initial_impressions', '!=', 0)->update(['initial_impressions' => 0]);\n DB::query()->selectRaw('SET SQL_SAFE_UPDATES = 1;');\n }", "public function reset()\n {\n $this->_metaData = array();\n $this->_columnMap = array();\n }", "public function clear()\n {\n self::foreignChecks(false);\n $this->model->truncate();\n self::foreignChecks(true);\n }", "public function truncateTables()\n {\n $tables = [\n 'properties',\n 'users',\n ];\n\n DB::unprepared('TRUNCATE TABLE ' . implode(',', $tables) . ' RESTART IDENTITY CASCADE');\n }", "public function cleanRoleAndPermissionTables() : void\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('roles')->truncate();\n DB::table('permissions')->truncate();\n DB::table('role_has_permissions')->truncate();\n DB::table('model_has_roles')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function remove_all_data()\n\t{\n\t\t$this->_data = array();\n\t}", "function clearAllClicks()\n {\n global $wpdb;\n $query = \"TRUNCATE TABLE \" . $this->table_name;\n return $wpdb->query($query);\n }", "private function cleanCoreTables() {\n\n $core_tables = [\n 'glpi_datacenters',\n 'glpi_dcrooms',\n 'glpi_items_racks',\n 'glpi_pdus',\n 'glpi_racks',\n 'glpi_rackmodels',\n 'glpi_racktypes',\n 'glpi_passivedcequipments',\n 'glpi_passivedcequipmenttypes',\n 'glpi_passivedcequipmentmodels',\n ];\n\n foreach ($core_tables as $table) {\n $result = $this->db->query('TRUNCATE ' . DB::quoteName($table));\n\n if (!$result) {\n throw new RuntimeException(\n sprintf('Unable to truncate table \"%s\"', $table)\n );\n }\n }\n }", "public function cleanRecords(){\n\t\tOpendocs::model()->deleteAll(\" createTime<=(NOW()-1)\");//oracle\n\t}", "public function run()\n {\n DB::table('companies')->truncate();\n }", "public function reset() {\n\t\t\tforeach ( $this->dbFields as $property ) {\n\t\t\t\t$this->$property = '';\n\t\t\t}\n\t\t\t$this->pageData = null;\n\t\t\t$this->attributes = null;\n\t\t\t// TODO: set exdata to array()?\n\t\t}", "function truncateData(){\n\t\t$userid=$GLOBALS['username'];\n mysql_query(\"SET FOREIGN_KEY_CHECKS=0;\");\n\t\t$truncateSource = mysql_query(\"TRUNCATE TABLE \".$userid.\"nertag\") or die(mysql_error());\n\t\t$truncateTarget = mysql_query(\"TRUNCATE TABLE \".$userid.\"sentences\") or die(mysql_error());\n mysql_query(\"SET FOREIGN_KEY_CHECKS=1;\");\n}", "private function reset()\n\t{\t\t\n\t\t$this->limit = null;\n\t\t\n\t\t$this->table = null;\n\t\t\n\t\t$this->offset = null;\n\t\t\n\t\t$this->data = [];\n\t\t\n\t\t$this->joins = [];\n\t\t\n\t\t$this->wheres = [];\n\t\t\n\t\t$this->orderBy = [];\n\t\t\n\t\t$this->selects = [];\n\t\t\n\t\t$this->bindings = [];\n\t\t\t\n\t}", "protected function _prepareColumns()\n {\n \tparent::_prepareColumns();\n \tunset($this->_columns['actionColumn']);\n }", "protected function _clearSchema()\n {\n\n // Show all tables in the installation.\n foreach (get_db()->query('SHOW TABLES')->fetchAll() as $row) {\n\n // Extract the table name.\n $rv = array_values($row);\n $table = $rv[0];\n\n // If the table is a Neatline table, drop it.\n if (in_array('neatline', explode('_', $table))) {\n $this->db->query(\"DROP TABLE $table\");\n }\n\n }\n\n }", "public function clean()\n {\n\n $this->model = null;\n $this->value = null;\n $this->attribute = null;\n $this->data = [];\n\n $this->fkTable = null;\n\n $this->fkQuery = null;\n $this->fkAndQuery = null;\n $this->fkOrQuery = null;\n\n }", "public function refreshRows(){\n if (count($this->rows) > 0){\n foreach ($this->rows as $row){\n $this->removeRow($row);\n }\n }\n }", "public function clear_tables()\n\t{\n\t\tglobal $wpdb;\n\t\t$wpdb->query( 'DELETE FROM '.self::$site_table.';' );\n\t}", "protected function resetExistingTables()\n {\n $this->existingTables = null;\n }", "function revert_table() {\r\n $this->_table = $this->_table_org;\r\n $this->_table_org = NULL;\r\n }", "public function clean()\n\t{\n\t\tforeach ($this->dirtyFields AS $field)\n\t\t\t$this->cleanField($field);\n\t}", "public function purgeUndoTable()\n\t{\n\t\t$objDatabase = \\Database::getInstance();\n\n\t\t// Truncate the table\n\t\t$objDatabase->execute(\"TRUNCATE TABLE tl_undo\");\n\n\t\t// Add a log entry\n\t\t$this->log('Purged the undo table', __METHOD__, TL_CRON);\n\t}", "public function unpopulate();", "function ReInitTableColumns()\n {\n if ($this->debug_mode)\n echo $this->ClassName . \"::ReInitTableColumns();\" . \"<HR>\";\n foreach ($this->form_fields as $prefix => $form) {\n foreach ($form as $i => $field) {\n foreach ($field as $param => $value) {\n //if found database parameters\n if (strpos($param, \"dbfield_\") !== false) {\n $columnparam = substr($param, strlen(\"dbfield_\"), strlen($param));\n $this->Storage->setColumnParameter($field[\"field_name\"], trim($columnparam), $value);\n }\n }\n }\n }\n }", "public function wipeAll() {\n\t\tforeach($this->getTables() as $t) {\n\t\t\tforeach($this->getKeys($t) as $k) {\n\t\t\t\t$this->adapter->exec(\"ALTER TABLE \\\"{$k['FKTABLE_NAME']}\\\" DROP FOREIGN KEY \\\"{$k['FK_NAME']}\\\"\");\n\t\t\t}\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t\tforeach($this->getTables() as $t) {\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t}", "private function resetQuery()\n {\n $this->cols('*');\n }", "static function clearContact( $table='mapContact' ) {\n $sql = \"DROP TABLE IF EXISTS {$table}\";\n return $sql;\n }", "function clearSQL() {}", "public function clear() {\n\t\t$this->_where\t\t= array();\n\t\t$this->_order\t\t= array();\n\t\t$this->_isAddingNew\t= false;\n\t\t$this->_currentRow\t= 0;\n\t\t$this->_relationship\t= array();\n\t\t$this->_recordset\t= array();\n\t\t$this->_updateBuffer\t= array();\n\t\t$this->_limit\t\t= NULL;\n\t\t$this->_offset\t\t= NULL;\n\t\t$this->isDirty( false );\n\t}", "public function deleteAll()\n {\n $query = 'TRUNCATE TABLE `'. $this->getTableName() .'`';\n $this->db->sql_query($query);\n }", "public function deleteTable(){\n\t \n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('DELETE FROM wp_nouveautes_test WHERE datep_nouveaute > \"2014-04-13\"');\n\n\t\t$wpdb->query('DELETE FROM wp_custom_categories_test WHERE term_id > 247');\n\t\t\t\t \n\t\t$wpdb->query('TRUNCATE TABLE wp_subcategories_test');\n\t\t\n\t\t$wpdb->query('TRUNCATE TABLE wp_extracategories_test');\n\t\t\n\t\t$wpdb->query('TRUNCATE TABLE wp_updated');\n\t\t \t\t \n\t}", "function truncateTable() {\n\t\t$dbh=$this->getdbh();\n\t\treturn $dbh->query('TRUNCATE TABLE '.$this->enquote($this->tablename));\n\t\t\n\t}", "function clear() {\r\n /* clear datasource. you should call this before calling another populate() to avoid datasource gets appended\r\n */\r\n $this->ds = new DataSource;\r\n $this->db_count = 0;\r\n }", "public function dropAllData()\n {\n $database_name = $this->conn->getDatabase();\n\n $tables = $this->conn->query(\"SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = '$database_name';\")->fetchAll();\n\n $queries = \"SET FOREIGN_KEY_CHECKS=0;\\n\";\n\n foreach ($tables as $aTable){\n $queries .= reset($aTable);\n }\n\n $this->conn->executeQuery($queries);\n\n $editora_structure = file_get_contents(__DIR__ .'/../../../../data/editora.sql');\n\n $this->conn->executeQuery($editora_structure);\n }", "public function run()\n {\n DB::table('messages')->truncate();\n DB::table('medicinal_plants_history')->truncate();\n DB::table('medicinal_plants_reports')->truncate();\n DB::table('medicinal_plants_reviews')->truncate();\n DB::table('remedies_history')->truncate();\n DB::table('remedies_reports')->truncate();\n DB::table('remedies_reviews')->truncate();\n DB::table('store_prescriptions')->truncate();\n }", "public function clean(){\n\t\t$sql = 'DELETE FROM ano_letivo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function clean(){\n\t\t$sql = 'DELETE FROM compra_coletiva';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "protected function _resetData()\n\t{\n\n\t\t// clean data, total and pagination, as we need them rebuilt\n\t\t$this->_data = null;\n\t\t$this->_total = null;\n\t\t$this->_pagination = null;\n\t}", "function clear($table){\n\t\t$r=mysql_query(\"TRUNCATE `$table`\");\n\t}", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0;');\n DB::table('usuario')->truncate();\n DB::table('rol')->truncate();\n DB::table('rol_usuario')->truncate();\n DB::table('permiso')->truncate();\n DB::table('permiso_rol')->truncate();\n DB::table('permiso_usuario')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS = 1;');\n }", "public function clean() {\n \t$result = '';\n\n\t foreach($this->tables as $table) {\n\t\t $ret = $table->clean();\n\t\t if($ret !== null) {\n\t\t \t$result .= $ret;\n\t\t }\n\t }\n\n\t if(strlen($result) > 0) {\n\t \treturn $result;\n\t }\n\n \treturn \"No cleaning specified for this table type\\n\";\n }", "public function cleanRecordVersions()\n\t{\n \t\t$this -> db -> query(\"DELETE FROM `\".$this -> table.\"` \n \t\t\t\t\t\t\t WHERE `model`='\".$this -> model.\"' \n \t\t\t\t\t\t\t AND `row_id`='\".$this -> row_id.\"'\");\n \t\treturn $this;\n \t}", "public function run()\n {\n echo PHP_EOL , 'cleaning old data....', PHP_EOL;\n\n DB::statement(\"SET foreign_key_checks=0\");\n\n User::truncate();\n Role::truncate();\n UserRole::truncate();\n Permission::truncate();\n DB::table('roles_permissions')->truncate();\n DB::table('users_permissions')->truncate();\n\n DB::statement(\"SET foreign_key_checks=1\");\n\n $this->call(RolesTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n }", "public function clearTable()\r\n {\r\n $write = $this->getResource()->cleanTable();\r\n return $this;\r\n }", "protected function _after()\n {\n $this->_adapter->execute('drop table if exists comments;\n drop table if exists posts_tags;\n drop table if exists posts;\n drop table if exists tags;\n drop table if exists profiles;\n drop table if exists credentials;\n drop table if exists people;\n ');\n parent::_after();\n }", "public function Upkeep() {\n \n $this->_Upkeep_Entry_Notes_Table();\n }", "public static function clear_schema()\n {\n }", "protected function _prepareRowsAction() {\n \n }", "public function clean(){\n\t\t$sql = 'DELETE FROM aluno';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function clean(){\n\t\t$sql = 'DELETE FROM grupo_usuario_tabelas';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function clear()\n\t{\n\t\t$this->uniqid = '';\n\t\t$this->base_url = '';\n\t\t$this->no_result = '';\n\t\t$this->pagination_tmpl = '';\n\n\t\t$this->sort = array();\n\t\t$this->column_config = array();\n\n\t\t$this->jq_template = FALSE;\n\n\t\t$this->rows\t\t\t\t= array();\n\t\t$this->heading\t\t\t= array();\n\t\t$this->auto_heading\t\t= TRUE;\n\t}", "function reset_rows()\n{\n}", "function cleanVisitorTable($database = \"\"){\n\t\t\n\t\t$sql = \"TRUNCATE TABLE visitor\"; \n\t\t\n\t\ttry{\n\t\t\t\n\t\t\t$query = $database->exec($sql);\n\t\t\t\n\t\t\techo 'Succesfully ran rhe clean up operation.';\n\t\t\t\n\t\t} catch(PDOException $error){\n\t\t\n\t\t\techo 'Error with query. '.$error->getMessage();\n\t\t\n\t\t}\n\t\t\n\t}", "public function delete() {\n\t\tglobal $wpdb;\n\t\t$wpdb->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'woocommerce_tax_rates' );// phpcs:ignore\n\t\t$wpdb->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'wc_tax_rate_classes' );// phpcs:ignore\n\t\t$wpdb->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'woocommerce_order_items' );// phpcs:ignore\n\t\t$wpdb->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'woocommerce_order_itemmeta' );// phpcs:ignore\n\t\t$this->order = null;\n\t\t$this->product = null;\n\t\t$this->tax_rate_ids = array();\n\t}", "public function clean(){\n\t\t$sql = 'DELETE FROM conta_a_pagar';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function unsetProperty()\n\t{\n\t\t$this -> tableName = '';\n\t\t$this -> databaseName = '';\n\t\t$this -> arrNewData = array();\n\t\t$this -> arrOldData = array();\n\t}", "function cleanTables($test = false) {\n\n\t\t$this->cleanForeignKey('sotf_blobs', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_blobs', 'object_id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_nodes', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_user_permissions', 'permission_id', 'sotf_permissions', 'id');\n\n\t\t$this->cleanForeignKey('sotf_stations', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_contacts', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_contacts', 'station_id', 'sotf_stations', 'id');\n\n\t\t$this->cleanForeignKey('sotf_series', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_series', 'station_id', 'sotf_stations', 'id');\n\n\t\t$this->cleanForeignKey('sotf_object_roles', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_object_roles', 'contact_id', 'sotf_contacts', 'id');\n\n\t\t$this->cleanForeignKey('sotf_object_roles', 'object_id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_programmes', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_programmes', 'station_id', 'sotf_stations', 'id');\n\n\t\t//// series field is not compulsory! \n\t\t//// $this->cleanForeignKey('sotf_programmes', 'series_id', 'sotf_series', 'id');\n\n\t\t$this->cleanForeignKey('sotf_rights', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_rights', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_extradata', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_extradata', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_other_files', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_other_files', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_media_files', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_media_files', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_links', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_links', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_topic_tree_defs', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_topic_trees', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_topics', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_topics', 'topic_id', 'sotf_topic_tree_defs', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_topics', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_topics', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_genres', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_roles', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_role_names', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_role_names', 'role_id', 'sotf_roles', 'role_id');\n\n\t\t$this->cleanForeignKey('sotf_deletions', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_playlists', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_ratings', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_rating', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_rating', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_refs', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_refs', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_stats', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_prog_stats', 'prog_id', 'sotf_programmes', 'id');\n\t\t\n\t\t$this->cleanForeignKey('sotf_prog_stats', 'station_id', 'sotf_stations', 'id');\n\n\t\t$this->cleanForeignKey('sotf_stats', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_stats', 'station_id', 'sotf_stations', 'id');\n\n\t\t$this->cleanForeignKey('sotf_comments', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_to_forward', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_unique_access', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_user_progs', 'prog_id', 'sotf_programmes', 'id');\n\n\t\t$this->cleanForeignKey('sotf_portals', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_station_mappings', 'id_at_node', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanForeignKey('sotf_station_mappings', 'station', 'sotf_stations', 'id');\n\n\t\t// very important! for syncing!!\n\t\t$this->cleanForeignKey('sotf_object_status', 'id', 'sotf_node_objects', 'id');\n\n\t\t$this->cleanNodeObjects();\n\n\t}", "function purgeSeedings() {\n\n $this->db->empty_table( \"TournamentSeeds\" );\n \n/* ... time to go */\n return;\n }", "protected function prepareDetailsTables()\n\t{\n\t}", "public static function dbClear(){\n\t\tif (App::runningUnitTests()) {\n\t\t\tself::clearModelTables(TestSettings::$modelTables);\n\t\t\tself::clearTables(TestSettings::$pivotTables);\n\t\t}\n\t}", "public function Clear() {\n\t\t$this->sql = \"SELECT 1, 2, 3, 4, 5, 6, 7\";\n }", "public function reset() {\n $this->databasefieldcount = 0;\n $this->databaserecordcount = 0;\n\n parent::reset();\n }", "protected function _clear()\n\t{\n\t\t$this->_query = null;\n\t\t$this->_set = null;\n\t\t$this->_where = null;\n\t\t$this->_limit = null;\n\t}", "protected function reset() {\n //query builder reset\n $this->queryBuilder->reset();\n $this->numRows = 0;\n $this->insertId = null;\n $this->query = null;\n $this->result = array();\n $this->data = array();\n $this->queryCount = 0;\n }", "function flush() {\n\n\t\t\t// Get rid of these\n\t\t\t$this->last_result = null;\n\t\t\t$this->col_info = null;\n\n\t\t}", "public function clean();", "public function clean();", "public function clean();", "public function clean();", "public function clean();" ]
[ "0.72845", "0.7246547", "0.7113251", "0.70214254", "0.70022357", "0.69601506", "0.69232076", "0.68886465", "0.687494", "0.6865221", "0.67039084", "0.6687502", "0.66790766", "0.66769564", "0.6674517", "0.6666366", "0.66458136", "0.66273004", "0.6609333", "0.6593146", "0.6583523", "0.65831316", "0.65739596", "0.65692216", "0.65600634", "0.6525228", "0.6501476", "0.6487529", "0.6463049", "0.64295095", "0.64262146", "0.64184153", "0.64135337", "0.64023924", "0.6397063", "0.6359472", "0.6337076", "0.6319438", "0.6312397", "0.63080806", "0.63079107", "0.63065356", "0.62968844", "0.62859666", "0.6280056", "0.627935", "0.6255009", "0.6249112", "0.6245288", "0.6244537", "0.6238349", "0.623592", "0.6229931", "0.6227864", "0.62086034", "0.6204537", "0.62010604", "0.6190162", "0.6183847", "0.6177526", "0.61728764", "0.61363846", "0.61330706", "0.6132064", "0.61196524", "0.6118562", "0.611795", "0.6117731", "0.61144525", "0.61118686", "0.610812", "0.6105609", "0.60924304", "0.6091573", "0.60913974", "0.60898626", "0.60841554", "0.6084091", "0.60755426", "0.6069706", "0.6068874", "0.6048419", "0.60398966", "0.60309714", "0.60244685", "0.60234356", "0.60222554", "0.60174817", "0.6016821", "0.60147184", "0.60035634", "0.5995712", "0.59941024", "0.59937954", "0.5993049", "0.5985363", "0.59727633", "0.59727633", "0.59727633", "0.59727633", "0.59727633" ]
0.0
-1
Parses the received packet for problems and warnings.
abstract protected function ParsePacket( $packet );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function parse()\r\n\t{\r\n\t\t// Suppress annoying notices/warnings\r\n\t\tset_error_handler(function() { /* Nothing */ }, E_NOTICE|E_WARNING);\r\n\r\n\t\t$structure = mailparse_msg_get_structure($this->resource);\r\n\t\t$this->parts = array();\r\n\t\tforeach ($structure as $part_id) {\r\n\t\t\t$part = mailparse_msg_get_part($this->resource, $part_id);\r\n\t\t\t$this->parts[$part_id] = mailparse_msg_get_part_data($part);\r\n\t\t}\r\n\r\n\t\trestore_error_handler();\r\n\t}", "function process_packet($packet)\n{\n //IP Header\n $ip_header_fmt = 'Cip_ver_len/'\n .'Ctos/'\n .'ntot_len/'\n .'nidentification/'\n .'nfrag_off/'\n .'Cttl/'\n .'Cprotocol/nheader_checksum/Nsource_add/Ndest_add/';\n\n //Unpack the IP header\n $ip_header = unpack($ip_header_fmt , $packet);\n\n if($ip_header['protocol'] == '6')\n {\n print_tcp_packet($packet);\n }\n}", "protected function analyzeData($packetData)\n {\n // check validity of the XML\n if (Functions::isValidStanza($packetData)) {\n Logs::writeLog(Logs::DEBUG, \"Message is not fragmented.\");\n return $packetData;\n }\n\n // if XML is empty, then it's a message to keep alive the exchange\n if ($packetData == \"\") {\n Logs::writeLog(Logs::DEBUG, \"Keepalive exchange\");\n $this->write($this->remote, \" \");\n }\n\n // the message is not complete, we wait for the end of it\n if (Functions::isOnlyFooterIsMissing($packetData)) {\n Logs::writeLog(Logs::DEBUG, \"Message is fragmented because footer is missing.\");\n $this->parsedMessage = null;\n $this->isParsing = true;\n\n Logs::writeLog(Logs::DEBUG, \"Parsing message..\");\n $this->parsedMessage .= $packetData;\n\n } elseif ($this->isParsing) { // this is the next part of the previous message\n $this->parsedMessage .= $packetData;\n }\n\n if ($this->isParsing && Functions::isFooterMatch($packetData)) {\n Logs::writeLog(Logs::DEBUG, \"Message parsed succesfully.\");\n $this->isParsing = false;\n return $this->parsedMessage;\n }\n\n if (Functions::isXMLStreamError($packetData)) {\n Logs::writeLog(Logs::DEBUG, \"Stream Error: Invalid XML.\");\n Logs::writeLog(Logs::DEBUG, \"FCM Server is failed to parse the XML payload.\");\n // todo throw an error and reopen connection?\n $this->exit();\n }\n\n }", "function _PacketRead() {\n\t\t$retarray = array();\n\n\t\t//Fetch the packet size\n\t\twhile ($size = @fread($this->_Sock,4)) {\n\t\t\t$size = unpack('V1Size',$size);\n\t\t\t//Work around valve breaking the protocol\n\t\t\tif ($size[\"Size\"] > 4096) {\n\t\t\t\t//pad with 8 nulls\n\t\t\t\t$packet = \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\".fread($this->_Sock,4096);\n\t\t\t} else {\n\t\t\t\t//Read the packet back\n\t\t\t\t$packet = fread($this->_Sock, $size[\"Size\"]);\n\t\t\t}\n\n\t\t\tarray_push($retarray,unpack(\"V1ID/V1Response/a*S1/a*S2\",$packet));\n\t\t}\n\t\treturn $retarray;\n\t}", "protected function parseResponse() \n {\n if (($line=fgets($this->socket)) === false) {\n throw new Exception('Failed reading data from redis socket.'); \n }\n $type=$line[0];\n $line=substr($line, 1, -2);\n switch ($type) {\n case '+': // Status reply\n return true;\n case '-': // Error reply\n throw new Exception('Redis error: '.$line);\n case ':': // Integer reply\n // no cast to int as it is in the range of a signed 64 bit integer\n return $line;\n case '$': // Bulk replies\n if ($line=='-1') {\n return null; \n }\n $length=$line+2;\n $data='';\n while ($length>0) {\n if (($block=fread($this->socket, $length))===false) {\n throw new Exception(\n 'Failed reading data from redis connection socket.'\n ); \n }\n $data.=$block;\n $length-= function_exists('mb_strlen')\n ? mb_strlen($block, '8bit')\n : strlen($block);\n }\n return substr($data, 0, -2);\n case '*': // Multi-bulk replies\n $count=(int)$line;\n $data=array();\n for ($i=0;$i<$count;$i++) {\n $data[]=$this->parseResponse(); \n }\n return $data;\n default:\n throw new Exception('Unable to parse data received from redis.');\n }\n }", "protected function parseRipDetails() {\n\t}", "public function onRead() {\n\t\tstart:\n\t\tif ($this->type === 'udp') {\n\t\t\t$this->onUdpPacket($this->read($this->highMark));\n\t\t}\n\t\tif ($this->state === self::STATE_ROOT) {\n\t\t\tif (false === ($hdr = $this->readExact(2))) {\n\t\t\t\treturn; // not enough data\n\t\t\t}\n\t\t\t$this->pctSize = Binary::bytes2int($hdr, true);\n\t\t\t$this->setWatermark($this->pctSize);\n\t\t\t$this->state = self::STATE_PACKET;\n\t\t}\n\t\tif ($this->state === self::STATE_PACKET) {\n\t\t\tif (false === ($pct = $this->readExact($this->pctSize))) {\n\t\t\t\treturn; // not enough data\n\t\t\t}\n\t\t\t$this->state = self::STATE_ROOT;\n\t\t\t$this->setWatermark(2);\n\t\t\t$this->onUdpPacket($pct);\n\t\t}\n\t\tgoto start;\n\t}", "public function parse()\n\t{\n\t\t$this->parseGroups();\n\t\t$this->parseBadges();\n\t}", "function decode_packets($data)\n\t{\n\t\treturn $this->call('--list-packets', 'post', $data);\n\t}", "public function parseErrors(Response $response);", "public function parse($buffer)\n {\n $pos = 1; // The remain length is start from second byte.\n $remainLen = \\Mqtt\\Message\\Util::decodeRemainLength($buffer, $pos);\n $this->header->setRemainLen($remainLen);\n $this->header->parseVarHeader($buffer, $pos);\n $this->parseBody($buffer, $pos);\n }", "function parse_idle_response($response) {\n // check total length\n if (count($response)<16){\n return result_response_parse_error('response length != 16');\n }\n // check STX\n if ($response[0]!=STX) {\n return result_response_parse_error('response STX error');\n }\n // check command\n if ($response[1]!=CMD_IDLE && $response[1]!=CMD_SYNCHRONIZE_TIME) {\n return result_response_parse_error('response CMD error');\n }\n // check checksum\n $data = array_slice($response,2,12);\n $checksum = calc_checksum($response[1],$data);\n if ($checksum!=$response[14]) {\n return result_response_parse_error('response CHECKSUM error');\n }\n // check ETX\n if ($response[15]!=ETX) {\n return result_response_parse_error('response ETX error');\n }\n $rdata = array(\n 'cmd' => $response[1],\n 'value' => bytes_to_string($data),\n );\n return result_success_data($rdata);\n}", "protected function parse() {}", "function ParseMsg() \n\t{\n\t\t$this->log->WriteLog( INFO, \"Parse Msg Start\" );\n\t\t/****************************************************************************\n\t\t* ※ 결제 형태 변수의 값에 따른 결제 구분\n\t\t*\n\t\t* * AuthTy = \"card\"\t\t신용카드결제\n\t\t*\t - SubTy = \"isp\"\t\t안전결제ISP\n\t\t*\t - SubTy = \"visa3d\"\t\t안심클릭\n\t\t*\t - SubTy = \"normal\"\t\t일반결제\n\t\t*\n\t\t* * AuthTy = \"iche\"\t\t일반-계좌이체\n\t\t* \n\t\t* * AuthTy = \"virtual\"\t일반-가상계좌(무통장입금)\n\t\t* \n\t\t* * AuthTy = \"hp\"\t\t\t핸드폰결제\n\t\t*\n\t\t* * AuthTy = \"ars\"\t\tARS결제\n\t\t*\n\t\t****************************************************************************/\n\t\t\n\t\tif( strcmp( $this->REQUEST[\"AuthTy\"], \"card\" ) == 0 )\n\t\t{\n\t\t\tif( strcmp( $this->REQUEST[\"SubTy\"], \"isp\" ) == 0 )\n\t\t\t{\n\t\t\t\t/****************************************************************************\n\t\t\t\t*\n\t\t\t\t* [1-1] 신용카드 안전결제ISP 처리\n\t\t\t\t* \n\t\t\t\t* \n\t\t\t\t* -- 승인 응답 전문 포멧\n\t\t\t\t* + 데이터길이(6) + 데이터\n\t\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 한다.\n\t\t\t\t* 업체ID(20)\t\t| 전문코드(4)\t\t| 거래고유번호(6)\t\t| 승인번호(8)\t\t| \n\t\t\t\t* 거래금액(12)\t| 성공여부(1)\t \t| 실패사유(20)\t\t| 승인시각(14)\t| \n\t\t\t\t* 카드사코드(4)\t|\n\t\t\t\t* \n\t\t\t\t****************************************************************************/\n\t\t\t\t\t\t\t\t\n\t\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[0];\n\t\t\t\t$this->RESULT[\"rBusiCd\"] = $this->RecvValArray[1];\n\t\t\t\t$this->RESULT[\"rOrdNo\"] = $this->REQUEST[\"OrdNo\"];\n\t\t\t\t$this->RESULT[\"rDealNo\"] = $this->RecvValArray[2];\n\t\t\t\t$this->RESULT[\"rApprNo\"] = $this->RecvValArray[3];\n\t\t\t\t$this->RESULT[\"rProdNm\"] = $this->REQUEST[\"ProdNm\"];\n\t\t\t\t$this->RESULT[\"rAmt\"] = $this->RecvValArray[4];\n\t\t\t\t$this->RESULT[\"rInstmt\"] = $this->REQUEST[\"KVP_QUOTA\"];\n\t\t\t\t$this->RESULT[\"rSuccYn\"] = $this->RecvValArray[5];\n\t\t\t\t$this->RESULT[\"rResMsg\"] = $this->RecvValArray[6];\n\t\t\t\t$this->RESULT[\"rApprTm\"] = $this->RecvValArray[7];\n\t\t\t\t$this->RESULT[\"rCardCd\"] = $this->RecvValArray[8];\t\n\t\t\t\t\n\t\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\"-\".$this->REQUEST[\"SubTy\"].\" \".\"RECV MSG Parsing OK \" );\n\t\t\t}\n\t\t\telse if( ( strcmp( $this->REQUEST[\"SubTy\"], \"visa3d\" ) == 0 ) || ( strcmp( $this->REQUEST[\"SubTy\"], \"normal\" ) == 0 ) )\n\t\t\t{\n\t\t\t\t/****************************************************************************\n\t\t\t\t* \n\t\t\t\t* [1-2] 안심클릭 or 일반결제 처리 승인응답 전문포맷\n\t\t\t\t* + 데이터길이(6) + 데이터\n\t\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 하며 암호화Process에서 해독된후 실데이터를 수신하게 된다.\n\t\t\t\t* 업체ID(20)\t\t| 전문코드(4)\t\t | 주문번호(40)\t| 승인번호(8)\t\t| 거래금액(12) |\n\t\t\t\t* 성공여부(1)\t\t| 실패사유(20)\t | 카드사명(20) \t| 승인시각(14)\t| 카드사코드(4)\t|\n\t\t\t\t* 가맹점번호(15)\t| 매입사코드(4)\t | 매입사명(20)\t| 전표번호(6)\t\t|\n\t\t\t\t* \n\t\t\t\t****************************************************************************/\n\t\t\t\t\n\t\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[0];\n\t\t\t\t$this->RESULT[\"rBusiCd\"] = $this->RecvValArray[1];\n\t\t\t\t$this->RESULT[\"rOrdNo\"] = $this->RecvValArray[2];\n\t\t\t\t$this->RESULT[\"rApprNo\"] = $this->RecvValArray[3];\n\t\t\t\t$this->RESULT[\"rInstmt\"] = $this->REQUEST[\"Instmt\"];\n\t\t\t\t$this->RESULT[\"rAmt\"] = $this->RecvValArray[4];\n\t\t\t\t$this->RESULT[\"rSuccYn\"] = $this->RecvValArray[5];\n\t\t\t\t$this->RESULT[\"rResMsg\"] = $this->RecvValArray[6];\n\t\t\t\t$this->RESULT[\"rCardNm\"] = $this->RecvValArray[7];\n\t\t\t\t$this->RESULT[\"rApprTm\"] = $this->RecvValArray[8];\n\t\t\t\t$this->RESULT[\"rCardCd\"] = $this->RecvValArray[9];\n\t\t\t\t$this->RESULT[\"rMembNo\"] = $this->RecvValArray[10];\n\t\t\t\t$this->RESULT[\"rAquiCd\"] = $this->RecvValArray[11];\n\t\t\t\t$this->RESULT[\"rAquiNm\"] = $this->RecvValArray[12];\n\t\t\t\t$this->RESULT[\"rDealNo\"] = $this->RecvValArray[13];\n\t\t\t\t$this->RESULT[\"rProdNm\"] = $this->REQUEST[\"ProdNm\"];\n\t\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\"-\".$this->REQUEST[\"SubTy\"].\" \".\"RECV MSG Parsing OK \" );\n\t\t\t}\n\t\t}\n\t\telse if( strcmp( $this->REQUEST[\"AuthTy\"], \"iche\" ) == 0 && strcmp( $this->REQUEST[\"ICHE_SOCKETYN\"], \"Y\" ) == 0)\n\t\t{\n\t\t\t/****************************************************************************\n\t\t\t* \n\t\t\t* [2-1] 계좌이체 소켓방식(인터넷뱅킹) 결제 요청 응답 전문 포멧\n\t\t\t* + 데이터길이(6) + 데이터\n\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 하며 암호화Process에서 해독된후 실데이터를 수신하게 된다.\n\t\t\t* 결제종류(10)\t\t| 상점아이디(20)\t| 주문번호(40)\t| 이용기관주문번호(50)\t| 결과코드(4) | 결과메시지(300) |\n\t\t\t* \n\t\t\t****************************************************************************/\n\t\t\t\t\n\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[1];\n\t\t\t$this->RESULT[\"rOrdNo\"] = $this->RecvValArray[2];\n\t\t\t$this->RESULT[\"rMTid\"] = $this->RecvValArray[3];\n\t\t\t$this->RESULT[\"ES_SENDNO\"] = $this->RecvValArray[4];\n\t\t\t$this->RESULT[\"rSuccYn\"] = $this->RecvValArray[5];\n\t\t\t$this->RESULT[\"rResMsg\"] = $this->RecvValArray[6];\n\t\t\t$this->RESULT[\"rAmt\"] = $this->REQUEST[\"Amt\"];\n\t\t\t$this->RESULT[\"rProdNm\"] = $this->REQUEST[\"ProdNm\"];\n\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\" \".\"RECV MSG Parsing OK \" );\n\t\t}\n\t\telse if( strcmp( $this->REQUEST[\"AuthTy\"], \"iche\" ) == 0 && strcmp( $this->REQUEST[\"ICHEARS_SOCKETYN\"], \"Y\" ) == 0)\n\t\t{\n\t\t\t/****************************************************************************\n\t\t\t* \n\t\t\t* [2-2] 계좌이체 텔레뱅킹 처리\n\t\t\t*\n\t\t\t* -- 텔레뱅킹 결제 요청 응답 전문 포멧\n\t\t\t* + 데이터길이(6) + 데이터\n\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 하며 암호화Process에서 해독된후 실데이터를 수신하게 된다.\n\t\t\t* 결제종류(10)\t| 상점아이디(20)\t| 주문번호(40)\t| 이용기관주문번호(50)\t| 결과코드(4) | 결과메시지(300) |* \n\t\t\t*\n\t\t\t****************************************************************************/\n\t\t\t\n\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[1];\n\t\t\t$this->RESULT[\"rOrdNo\"] = $this->RecvValArray[2];\n\t\t\t$this->RESULT[\"rMTid\"] = $this->RecvValArray[3];\n\t\t\t$this->RESULT[\"rSuccYn\"] = $this->RecvValArray[4];\n\t\t\t$this->RESULT[\"rResMsg\"] = $this->RecvValArray[5];\n\t\t\t$this->RESULT[\"rAmt\"] = $this->REQUEST[\"Amt\"];\n\t\t\t$this->RESULT[\"rProdNm\"] = $this->REQUEST[\"ProdNm\"];\n\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\" \".\"Parse MSG Passed \" );\n\t\t\t\t\n\t\t\t$pos = strpos($this->RESULT[\"rResMsg\"],':');\n\t\t\tif( $pos !== false ) \n\t\t\t{\n\t\t\t\t$this->RESULT[\"ES_SENDNO\"] = substr($this->RESULT[\"rResMsg\"],$pos+1,6) ;\n\t\t\t\t$this->log->WriteLog( INFO, \"ES_SENDNO : [\".$this->RESULT[\"ES_SENDNO\"].\"] \");\n\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t}\n\t\telse if( strcmp( $this->REQUEST[\"AuthTy\"], \"virtual\" ) == 0 ) \n\t\t{\n\t\t\t/****************************************************************************\n\t\t\t*\n\t\t\t* [3] 가상계좌(무통장입금) 처리\n\t\t\t* \n\t\t\t* -- 승인 응답 전문 포멧\n\t\t\t* + 데이터길이(6) + 암호화 구분(1) + 데이터\n\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 한다.\n\t\t\t* 결제종류(10)\t| 업체ID(20)\t\t| 승인일자(14)\t| 가상계좌번호(20)\t| 결과코드(1)\t\t| 결과메시지(100)\t | \n\t\t\t*\n\t\t\t****************************************************************************/\n\t\t\t\n\t\t\t$this->RESULT[\"rAuthTy\"] = $this->RecvValArray[0];\n\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[1];\n\t\t\t$this->RESULT[\"rApprTm\"] = $this->RecvValArray[2];\n\t\t\t$this->RESULT[\"rVirNo\"] = $this->RecvValArray[3];\n\t\t\t$this->RESULT[\"rSuccYn\"] = $this->RecvValArray[4];\n\t\t\t$this->RESULT[\"rResMsg\"] = $this->RecvValArray[5];\n\t\t\t\n\t\t\t$this->RESULT[\"rOrdNo\"] = $this->REQUEST[\"OrdNo\"];\n\t\t\t$this->RESULT[\"rProdNm\"] = $this->REQUEST[\"ProdNm\"];\n\t\t\t$this->RESULT[\"rAmt\"] = $this->REQUEST[\"Amt\"];\n\t\t\t\n\t\t\t$pos = strpos($this->RESULT[\"rResMsg\"],':');\n\t\t\tif( $pos !== false ) \n\t\t\t{\n\t\t\t\t$this->RESULT[\"ES_SENDNO\"] = substr($this->RESULT[\"rResMsg\"],$pos+1,6) ;\n\t\t\t\t$this->log->WriteLog( INFO, \"ES_SENDNO : [\".$this->RESULT[\"ES_SENDNO\"].\"] \");\n\t\t\t}\n\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\" \".\"RECV MSG Parsing OK \" );\n\t\t\t\n\t\t}\n\t\telse if( strcmp( $this->REQUEST[\"AuthTy\"], \"hp\" ) == 0 )\n\t\t{\n\t\t\t/****************************************************************************\n\t\t\t* \n\t\t\t* [4] 핸드폰 결제\n\t\t\t*\n\t\t\t* -- 승인 응답 전문 포멧\n\t\t\t* + 데이터길이(6) + 데이터\n\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 한다.)\n\t\t\t* 업체ID(20)\t| 결과코드(1)\t| 결과메시지(100)\t | 핸드폰결제일(8)\t | 핸드폰결제 TID(12)\t | 거래금액(12)\t | 주문번호(40)\t |\n\t\t\t*\n\t\t\t****************************************************************************/\n\t\t\t\n\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[0];\t\n\t\t\t$this->RESULT[\"rSuccYn\"] = $this->RecvValArray[1];\n\t\t\t$this->RESULT[\"rResMsg\"] = $this->RecvValArray[2];\n\t\t\t$this->RESULT[\"rHP_DATE\"] = $this->RecvValArray[3];\n\t\t\t$this->RESULT[\"rHP_TID\"] = $this->RecvValArray[4];\n\t\t\t$this->RESULT[\"rAmt\"] = $this->REQUEST[\"Amt\"];\n\t\t\t$this->RESULT[\"rOrdNo\"] = $this->REQUEST[\"OrdNo\"];\n\t\t\t$this->RESULT[\"rProdNm\"] = $this->REQUEST[\"ProdNm\"];\n\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\" \".\"RECV MSG Parsing OK \" );\n\n\t\t}\n\t\telse if( strcmp( $this->REQUEST[\"AuthTy\"], \"ars\" ) == 0 )\n\t\t{\n\t\t\t/****************************************************************************\n\t\t\t* \n\t\t\t* [5] ARS 결제\n\t\t\t*\n\t\t\t* -- 승인 응답 전문 포멧\n\t\t\t* + 데이터길이(6) + 데이터\n\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 한다.)\n\t\t\t* 업체ID(20)\t| 결과코드(1)\t| 결과메시지(100)\t | ARS결제일(8)\t | ARS결제 TID(12)\t | 거래금액(12)\t | 주문번호(40)\t |\n\t\t\t*\n\t\t\t****************************************************************************/\n\t\t\t\n\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[0];\t\n\t\t\t$this->RESULT[\"rSuccYn\"] = $this->RecvValArray[1];\n\t\t\t$this->RESULT[\"rResMsg\"] = $this->RecvValArray[2];\n\t\t\t$this->RESULT[\"rHP_DATE\"] = $this->RecvValArray[3];\n\t\t\t$this->RESULT[\"rHP_TID\"] = $this->RecvValArray[4];\n\t\t\t$this->RESULT[\"rAmt\"] = $this->REQUEST[\"Amt\"];\n\t\t\t$this->RESULT[\"rOrdNo\"] = $this->REQUEST[\"OrdNo\"];\n\t\t\t$this->RESULT[\"rProdNm\"] = $this->REQUEST[\"ProdNm\"];\n\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\" \".\"RECV MSG Parsing OK \" );\n\t\t}else{\n\t\t\t$this->log->WriteLog( FATAL, \"Unknown AuthTy. AuthTy:[\".$this->REQUEST[\"AuthTy\"].\"],SubTy:[\".$this->REQUEST[\"SubTy\"].\"]\");\n\t\t\treturn false;\n\t\t}\n\t\t$this->log->WriteLog( INFO, \"Parse Msg End\" );\n\t\treturn true;\n\t\t\n\t}", "public function _parseResponce()\n\t\t{\n\t\t\t$pattern = \"/(link_cropped_no\\\" target=\\\"_blank\\\" href=\\\")(.{0,255})(\\\" )/i\";\n\t\t\tpreg_match_all($pattern, $this->responce, $out);\n\t\t\t$this->content = (!empty($out['2'])) ? array_splice($out['2'], false, AMOUNT_OF_RESULTS) : array();\n\t\t}", "protected function parse(): void {\n $header = $this->rfc822_parse_headers($this->raw);\n\n $this->extractAddresses($header);\n\n if (property_exists($header, 'subject')) {\n $this->set(\"subject\", $this->decode($header->subject));\n }\n if (property_exists($header, 'references')) {\n $this->set(\"references\", array_map(function ($item) {\n return str_replace(['<', '>'], '', $item);\n }, explode(\" \", $header->references)));\n }\n if (property_exists($header, 'message_id')) {\n $this->set(\"message_id\", str_replace(['<', '>'], '', $header->message_id));\n }\n if (property_exists($header, 'in_reply_to')) {\n $this->set(\"in_reply_to\", str_replace(['<', '>'], '', $header->in_reply_to));\n }\n\n $this->parseDate($header);\n foreach ($header as $key => $value) {\n $key = trim(rtrim(strtolower($key)));\n if (!isset($this->attributes[$key])) {\n $this->set($key, $value);\n }\n }\n\n $this->extractHeaderExtensions();\n $this->findPriority();\n }", "public function parse_call() {\r\n\t\t$this->spoof_check();\r\n\t\tif (count($this->request) == $this->max_requests\r\n\t\t\r\n\t\t)\r\n\t\t\texit();\r\n\t\tif (!$this->match_server($this->request['host'])) {\r\n\t\t\techo \"Fatal Error: Your address is unknown\";\r\n\t\t\texit();\r\n\t\t}\r\n\t\telse if (!$this->match_server($this->request['server'])) {\r\n\t\t\techo \"Fatal Error: Target address unknown\";\r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t$host = $this->request['host'];\r\n\t\t$this->disassemble_IP($host);\r\n\t\t$this->get_user_queue();\r\n\t\t$this->users[] = $this->request['session'];\r\n\t\t$this->patch_connection();\r\n\t}", "protected function parse()\n {\n if ($this->isParsed) {\n return;\n }\n\n if ($this->response->isServerError()) {\n throw new ResponseException(\"nic.ru server error\");\n }\n\n $contentType = $this->response->getHeader(\"Content-Type\");\n\n if (!preg_match(\"/^.*text\\/plain.*$/ui\", $contentType)) {\n throw new ResponseException(\"Incorrect Content-Type of response: {$contentType}\");\n }\n\n if (!$this->response->isOk()) {\n throw new ResponseException(\"Incorrect response code: {$this->response->getStatusCode()}\");\n }\n\n $content = $this->getRawContent();\n $contentParts = explode(\"\\r\\n\\r\\n\", $content);\n\n if (empty($contentParts)) {\n throw new ResponseException(\"Incorrect response: {$content}\");\n }\n\n if (count($contentParts) == 0) {\n throw new ResponseException(\"Response header is empty!\");\n }\n\n $this->parseHeader(trim($contentParts[0]));\n $this->parseBody(trim($contentParts[1]));\n\n $this->isParsed = true;\n }", "function server_parse($socket, $expected_response)\n{\n $server_response = '';\n $counter = 0;\n while (substr($server_response, 3, 1) != ' ') {\n if (!($server_response = fgets($socket, 256))) {\n $counter++;\n if ($counter % 100 == 0) {\n echo json_encode([\"message\" => \"Error fetching response from server $expected_response\"]);\n sleep(1);\n }\n }\n }\n if (!(substr($server_response, 0, 3) == $expected_response)) {\n echo json_encode([\"message\" => 'Unable to send e-mail.\"' . $server_response . '\"' . \" $expected_response\"]);\n }\n}", "public function testParseShouldReturnErrorResponseForTooShortPacket()\n {\n $payload = \"\\x01\\x38\" . // transaction id: 0138 (2 bytes)\n \"\\x00\\x00\" . // protocol id: 0000 (2 bytes)\n \"\\x00\\x07\" . // length: 0007 (2 bytes) (7 bytes after this field)\n \"\\x11\" . // unit id: 11 (1 byte)\n \"\\x16\" . // function code: 16 (1 byte)\n \"\\x04\\x10\" . // start address: 0410 (2 bytes)\n \"\\x00\\x01\" . // AND mask: 0x01 (2 bytes)\n \"\\x00\" . // OR mask: 0x02 (1 bytes) <-- should be 2 but is 1\n '';\n $packet = MaskWriteRegisterRequest::parse($payload);\n self::assertInstanceOf(ErrorResponse::class, $packet);\n $toString = $packet->__toString();\n // transaction id is random\n $toString[0] = \"\\x00\";\n $toString[1] = \"\\x00\";\n self::assertEquals(\"\\x00\\x00\\x00\\x00\\x00\\x03\\x00\\x96\\x04\", $toString);\n }", "public function parse(){\n try {\n $table = new HomeNet_Model_DbTable_Apikeys();\n $apikey = $table->fetchRowById($this->apikey);\n\n $table = new HomeNet_Model_DbTable_Devices();\n $device = $table->fetchRowByHouseNodeDevice($apikey->house, $this->_packet->fromNode, $this->_packet->fromDevice);\n\n if(!$device && (!$device->command == $this->_packet->command)){\n throw new Zend_Exception('Cannot find matching device');\n }\n $this->saveDatapoint();\n /*\n $table = new HomeNet_Model_DbTable_Components();\n $component = $table->fetchAllByDevice($this->fromDevice);*/\n\n } catch (Zend_Exception $e){\n return $e->message();\n }\n return 'true';\n }", "private function parseMessage(DOMElement $node)\n {\n if ($node->getAttribute('type') == 'error') {\n foreach ($node->childNodes as $_node)\n {\n if ($_node->localName == 'error')\n {\n // todo handle error response\n Log::info(\"===error===\");\n Log::error($_node->textContent);\n }\n }\n }elseif ($node->firstChild->localName == 'gcm' && ($json = $node->firstChild->textContent) && ($data = json_decode($json)) && @$data->message_type && @$data->message_id) {\n\n switch ($data->message_type)\n {\n case 'ack':\n // message acknowledgement received\n $this->events->fire(new MessageAcknowledged($data->message_id));\n break;\n case 'nack':\n switch (strtolower($data->error))\n {\n case 'bad_registration':\n // unregistered/uninstalled app\n $this->events->fire(new InvalidDeviceRegistration($data->from));\n break;\n case 'device_unregistered':\n // unregistered/uninstalled app\n $this->events->fire(new InvalidDeviceRegistration($data->from));\n break;\n case 'device_message_rate_exceeded':\n // device rate exceeded\n $this->events->fire(new DeviceMessageRateExceeded($data->from, null, $data->message_id));\n break;\n case 'invalid_json':\n // invalid json\n $this->events->fire(new InvalidJson($data->from, $data->description));\n break;\n default:\n // unknown error\n $this->events->fire(new AbstractError($data->error, $data->from, $data->description));\n break;\n }\n break;\n case 'control':\n if ($data->control_type == 'CONNECTION_DRAINING')\n {\n // connection server connection drainage\n $this->events->fire(new ConnectionDrainage());\n }\n break;\n case 'receipt':\n // ack for receipt of message receipt before processing receipt\n $this->sendAck($data->message_id, $data->data->device_registration_id);\n\n // message receipt\n $this->events->fire(new MessageReceiptReceived((array)$data));\n break;\n default:\n break;\n }\n\n if (@$data->registration_id) {\n // registration expired for token\n $this->events->fire(new RegistrationExpired($data->from, $data->registration_id));\n }\n\n } elseif (($json = $node->firstChild->textContent) && ($mData = json_decode($json)) && ($client_token = $mData->from) && ($client_message = $mData->data)) {\n // ack for receipt before processing message\n $this->sendAck($mData->message_id, $mData->from);\n\n // message received\n $this->events->fire(new MessageReceived((array)$mData, 'xmpp'));\n }\n }", "private function parse()\n {\n $lines = file($this->filename);\n\n // skip get worker info\n $offset = 0;\n while (isset($lines[$offset])) {\n $line = $lines[$offset];\n\n if (preg_match('/(?:\\[0m\\t)(\\[.*\\])\\s*({.*})(?:[\\r\\n]*)$/', $line, $matches)) {\n $ctx = json_decode($matches[2], true);\n if (isset($ctx['receive'])) {\n $this->in[] = [$matches[1], $matches[2]];\n $offset++;\n continue;\n }\n\n $this->out[] = [$matches[1], $matches[2]];\n }\n\n $offset++;\n }\n }", "protected function _parseHeader() {}", "protected static function processNCIPResponse()\n {\n $xmlElem = new QuiteSimpleXMLElement(self::getResponse());\n $xmlElem->registerXPathNamespace(self::XML_PREFIX, self::XML_NAMESPACE);\n\n if ($xmlElem->has(self::XML_PREFIX . ':' . self::XML_RESPONSE_NODE . '/co:Problem')) {\n $problemType = $xmlElem->text(self::XML_PREFIX . ':' . self::XML_RESPONSE_NODE . '/co:Problem/co:ProblemType');\n $problemDetail = $xmlElem->text(self::XML_PREFIX . ':' . self::XML_RESPONSE_NODE . '/co:Problem/co:ProblemDetail');\n\n // Log the problem.\n APILogger::addDebug('NCIP Error Message: ' . $problemDetail);\n\n $errorResponse = new CheckoutItemErrorResponse(self::getResponse());\n\n if (array_key_exists($problemType, self::$problemResponses)) {\n $errorResponse->setStatusCode(self::$problemResponses[$problemType]);\n }\n $errorResponse->setProblem($problemDetail);\n\n self::setNcipResponse($errorResponse);\n } else {\n self::setNcipResponse(new CheckoutItemResponse(self::getResponse()));\n }\n }", "private function parseResponse() {\n $headers = Strings::split(substr($this->response, 0, $this->info['header_size']), \"~[\\n\\r]+~\", PREG_SPLIT_NO_EMPTY);\n $this->headers = static::parseHeaders($headers);\n $this->body = substr($this->response, $this->info['header_size']);\n $this->response = NULL;\n }", "private function parseMessage() {\n\n\t\t# Regexp to parse a formatted message\n\t\t# The message should come in format of\n\t\t# :(.*)\\!(.*)\\@(.*) PRIVMSG #channelname \\:(.*) for regular chatter\n\t\t# thus returning nickname, realname, hostmask, (command, arguments) || (botname: command (arguments)) || (chatter)\n\t\t$matched = false;\n\n # Try to match against the bots name!\n # This could mean it is a direct message in chan followed by a command request\n if(!$matched) {\n $pattern = '/:(.*)\\!(.*)\\@(.*) PRIVMSG '.$this->config['destinationChannel'].' \\:('.$this->config['username'].')\\:(?: +)?([^\\s]*) (.*)/';\n preg_match($pattern, $this->inbound, $matches);\n if(count($matches) > 1) {\n $matched = true;\n $this->lastMessage = array(\n 'nickname' => $matches[1],\n 'realname' => $matches[2],\n 'hostname' => $matches[3],\n 'command' => $matches[5],\n 'args' => rtrim($matches[6],\"\\n\\r\"),\n 'chatter' => ''\n );\n # Have to match a case whereby a command of 'botname: command' with no args is provided (for help)\n # If this case occurs we have to do some arg movement otherwise the command parser won't get a hit\n if($this->lastMessage['args'] != \"\" && $this->lastMessage['command'] == '') {\n $this->lastMessage['command'] = $this->lastMessage['args'];\n $this->lastMessage['args'] = \"\";\n }\n }\n }\n\n\t\tif(!$matched) {\n\t\t\t$pattern = '/:(.*)\\!(.*)\\@(.*) PRIVMSG '.$this->config['destinationChannel'].' \\:(.*)/';\n\t\t\tpreg_match($pattern, $this->inbound, $matches);\n\t\t\tif(count($matches) > 1) {\n\t\t\t\t$this->lastMessage = array(\n\t\t\t\t\t'nickname' => $matches[1],\n\t\t\t\t\t'realname' => $matches[2],\n\t\t\t\t\t'hostname' => $matches[3],\n\t\t\t\t\t'command' => '',\n\t\t\t\t\t'args' => '',\n\t\t\t\t\t'chatter' => rtrim($matches[4],\"\\n\\r\")\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function readMsg()\n\t{\n\t\tglobal $_THRESH, $_LOCKTHRESH;\n\t\t\n\t\tif($this->_SERIAL->_ckOpened() == false) { return \"fail\";}\n\t\t$this->_SERIAL->serialflush();\n\t\t\n\t\t$result = -5;\n\t\t$data = \"\";\n\t\t$i = 0;\n\t\t\n\t\t//This regex looks for any whitespace characters (\\n, char(10), etc.)\n\t\twhile (!preg_match(\"/[\\s,]+/\", $data))\n\t\t{\n\t\t\tif($i >=75000) {\n\t\t\t\treturn \"failed to read data. Value of loop: \".$i;\n\t\t\t}\n\t\t\n\t\t\t$i++;\n\t\t\t$data .= $this->_SERIAL->readPort();\n\t\t}\n\n\t\t$arr = str_split($data);\n\n\t\t// First byte of incoming message determines what type it is.\n\t\t$resultID = $arr[0];\n\n\t\t// after type is determined these statements extract relevant data from rest of the message.\n\t\tif ($resultID == \"s\")\n\t\t{\n\t\t\t$value = (ord($arr[3])*256)+ord($arr[4]);\n\n\t\t\tif($value > $_THRESH)\n\t\t\t\t$result = 1; // Filled\n\t\t\telse \n\t\t\t\t$result = 0; // UnFilled\n\t\t}\n\t\telseif ($resultID == \"l\")\n\t\t{\n\t\t\t$value = (ord($arr[3])*256)+ord($arr[4]);\n\n\t\t\tif($value < $_LOCKTHRESH) \n\t\t\t\t$result = 1; // UnLocked\n\t\t\telse \n\t\t\t\t$result = 0; // locked\n\t\t}\n\t\telseif ($resultID == \"a\")\n\t\t{\n\t\t\t$result = 1; // message was confirmed\n\t\t}\n\t\telseif ($resultID == \"n\")\n\t\t{\n\t\t\t$iDplusCol = Array(0 => ord($arr[1]), 1 => ord($arr[2]));\n\t\t\treturn $iDplusCol; // new column was found return the number of boxes\n\t\t}\n\t\telseif ($resultID == \"t\")\n\t\t{\n\t\t\t$result= ord($arr[3]); // returns the size of queried box\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "private function parseResponses() \r\n {\r\n $validStates = array('Response', 'Response30');\r\n $messages = $this->MessageQueue->find('all', array(\r\n 'fields' => array('messageIdentity', 'message', 'processState', 'isCopied', 'sourceDeviceAlias'),\r\n 'conditions' => array(\r\n 'mailbox' => $this->CurrentDevice->deviceAlias,\r\n 'processState' => $validStates\r\n ),\r\n 'order' => 'createDate'\r\n ));\r\n \r\n // Start a transaction\r\n $this->MessageQueue->transaction(null, true);\r\n\r\n // Process all the messages. Any messages that fail will be placed into the $errors array.\r\n $errors = array();\r\n $processed = array();\r\n foreach($messages as $message)\r\n {\r\n $message = $message['MessageQueue'];\r\n\r\n try\r\n {\r\n libxml_use_internal_errors(true);\r\n $xml = Xml::build($message['message']);\r\n $namespaces = array_flip($xml->getNamespaces(true));\r\n\r\n // Convert the XML to an array and pass the resulting message to the correct processing function.\r\n $payload = Set::reverse($xml);\r\n // Set messageQuery to the payload array for message handling.\r\n $this->messageQuery[] = $payload['LawEnforcementTransaction']['Transaction']['Response'];\r\n\r\n if ($this->{\"handle{$message['processState']}\"}($message, $payload, $namespaces))\r\n $processed[] = $message['messageIdentity'];\r\n else\r\n $errors[] = array(\r\n 'message' => $message,\r\n 'error' => 'Message id ' . $message['messageIdentity'] . ' failed to process.'\r\n );\r\n }\r\n catch(Exception $e)\r\n {\r\n $errors[] = array(\r\n 'message' => $message,\r\n 'error' => 'Exception thrown while processing Message id ' . $message['messageIdentity'] . ': '\r\n . $e->getMessage()\r\n );\r\n }\r\n }\r\n \r\n // Just send the raw LawEnforcementTransaction to the user as is with a statement indicating the error.\r\n if (!empty($errors))\r\n {\r\n $copy = $errors;\r\n foreach($copy as $index => $error) {\r\n try\r\n {\r\n $this->queueErrorResponse($error['error'], $error['message']);\r\n $processed[] = $error['message']['messageIdentity'];\r\n unset($copy[$index]);\r\n }\r\n catch(Exception $e)\r\n {\r\n $errors[$index]['error'] = \"Failed to enqueue message that failed processing. \" \r\n . \"Original Error:\\n\\n\" . $error['error'];\r\n }\r\n }\r\n }\r\n\r\n // Dequeue all processed messages.\r\n if (!empty($processed))\r\n $this->MessageQueue->deleteAll(array('messageIdentity' => $processed));\r\n \r\n // Deal with any errors that failed to get directed towards the user. All we can do is change them in the queu\r\n // to a new state (so they're not lost) and log them in the CLIPS error log.\r\n //\r\n // This should almost never happen.\r\n if (!empty($errors)) {\r\n $ids = Set::extract($errors, '{n}.message.messageIdentity');\r\n \r\n // Log each of the messages that failed\r\n foreach($errors as $id => $error) {\r\n CakeLog::write('error', \"Message (id {$error['message']['messageIdentity']}) failed to process. \" \r\n . \"{$error['error']}\\n{$error['message']['message']}\");\r\n }\r\n \r\n // UpdateAll doesn't behave like other Cake model functions. We have to quote the param ourself.\r\n $this->MessageQueue->updateAll(\r\n array('processState' => '\\'CLIPS_Error\\''),\r\n array('messageIdentity' => $ids)\r\n );\r\n }\r\n\r\n return $this->MessageQueue->transaction(true, true);\r\n }", "private function parseStatistics(string $row): array\n {\n $ping_statistics = explode(', ', explode(':', $row)[1]);\n\n $transmitted = (int) explode(' = ', $ping_statistics[0])[1];\n\n $received = (int) explode(' = ', $ping_statistics[1])[1];\n\n $lost = (int) explode(' = ', $ping_statistics[2])[1];\n\n return [\n 'packets_transmitted' => $transmitted,\n 'packets_received' => $received,\n 'packets_lost' => $lost,\n 'packet_loss' => (int) (100 - (($received * 100) / $transmitted)),\n ];\n }", "public function parse()\n {\n }", "public function parse()\n {\n }", "public function parse()\n {\n }", "public function parse()\n {\n }", "public function parse(): array\n {\n // Text.\n if ($this->type === 'text') {\n return [\n 'text' => $this->message,\n ];\n }\n\n // Template.\n if ($this->type === 'template') {\n $payload = Arr::get($this->message, 'attachments.0.payload');\n\n // Generic template.\n if (Arr::get($payload, 'template_type') === 'generic') {\n return [\n 'generic' => $this->parseGenericTempalte($payload),\n ];\n }\n }\n\n // Image\n if ($this->type === 'image') {\n $payload = Arr::get($this->message, 'attachments.0.payload');\n return [\n 'image' => $this->parseImageAttachment($payload),\n ];\n }\n\n // This for unsupported messages.\n return [];\n }", "function ParseCancelMsg() \n\t{\n\t\t$this->log->WriteLog( INFO, \"Parse Cancel Msg Start\" );\n\t\tif( strcmp( $this->REQUEST[\"AuthTy\"], \"card\" ) == 0 )\n\t\t{\n\t\t\tif( strcmp( $this->REQUEST[\"SubTy\"], \"isp\" ) == 0 )\n\t\t\t{\n\t\t\t\t/* [1-1] 안전결제ISP 처리 */\t\t\t\t\t\n\n\t\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[0];\n\t\t\t\t$this->RESULT[\"rApprNo\"] = $this->RecvValArray[1];\n\t\t\t\t$this->RESULT[\"rApprTm\"] = $this->RecvValArray[2];\n\t\t\t\t$this->RESULT[\"rBusiCd\"] = $this->RecvValArray[3];\n\t\t\t\t$this->RESULT[\"rDealNo\"] = $this->RecvValArray[4];\n\t\t\t\t$this->RESULT[\"rCancelSuccYn\"] = $this->RecvValArray[5];\n\t\t\t\t$this->RESULT[\"rCancelResMsg\"] = $this->RecvValArray[6];\n\t\t\t\t\n\t\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\"-\".$this->REQUEST[\"SubTy\"].\" \".\"RECV MSG Parsing OK \" );\n\t\t\t}\n\t\t\telse if( ( strcmp( $this->REQUEST[\"SubTy\"], \"visa3d\" ) == 0 ) || ( strcmp( $this->REQUEST[\"SubTy\"], \"normal\" ) == 0 ) )\n\t\t\t{\n\t\t\t\t/* [1-2] 안심클릭 or 일반결제 처리 */\t\n\t\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[0];\n\t\t\t\t$this->RESULT[\"rApprNo\"] = $this->RecvValArray[1];\n\t\t\t\t$this->RESULT[\"rApprTm\"] = $this->RecvValArray[2];\n\t\t\t\t$this->RESULT[\"rBusiCd\"] = $this->RecvValArray[3];\n\t\t\t\t$this->RESULT[\"rCancelSuccYn\"] = $this->RecvValArray[4];\n\t\t\t\t$this->RESULT[\"rOrdNo\"] = $this->RecvValArray[5];\n\t\t\t\t$this->RESULT[\"rInstmt\"] = $this->RecvValArray[6];\n\t\t\t\t$this->RESULT[\"rAmt\"] = $this->RecvValArray[7];\n\t\t\t\t$this->RESULT[\"rCardNm\"] = $this->RecvValArray[8];\n\t\t\t\t$this->RESULT[\"rCardCd\"] = $this->RecvValArray[9];\n\t\t\t\t$this->RESULT[\"rMembNo\"] = $this->RecvValArray[10];\n\t\t\t\t$this->RESULT[\"rAquiCd\"] = $this->RecvValArray[11];\n\t\t\t\t$this->RESULT[\"rAquiNm\"] = $this->RecvValArray[12];\n\t\t\t\t$this->RESULT[\"rDealNo\"] = $this->RecvValArray[13];\n\n\t\t\t\tif($this->RESULT[\"rCancelSuccYn\"] == \"y\")\n\t\t\t\t{\n\t\t\t\t\t$this->RESULT[\"rCancelResMsg\"] = \"정상취소\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->RESULT[\"rCancelResMsg\"] = \"취소실패\";\n\t\t\t\t}\n\n\n\t\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\"-\".$this->REQUEST[\"SubTy\"].\" \".\"RECV MSG Parsing OK \" );\n\t\t\t}\n\t\t\n\t\t}\n\t\telse if( strcmp( $this->REQUEST[\"AuthTy\"], \"iche\" ) == 0 && strcmp( $this->REQUEST[\"ICHE_SOCKETYN\"], \"Y\" ) == 0)\n\t\t{\n\t\t\t/* [2-1] 계좌이체 인터넷뱅킹 취소*/\t\n\t\t\t/* \t[RB-CanRes|상점ID|posmTid|주문번호|y|취소성공|] */\n\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[1];\n\t\t\t$this->RESULT[\"ICHE_POSMTID\"] = $this->RecvValArray[2];\n\t\t\t$this->RESULT[\"rOrdNo\"] = $this->RecvValArray[3];\n\t\t\t$this->RESULT[\"rCancelSuccYn\"] = $this->RecvValArray[4];\n\t\t\t$this->RESULT[\"rCancelResMsg\"] = $this->RecvValArray[5];\t\t\t\t\n\n\t\t}\n\t\telse if( strcmp( $this->REQUEST[\"AuthTy\"], \"iche\" ) == 0 && strcmp( $this->REQUEST[\"ICHEARS_SOCKETYN\"], \"Y\" ) == 0)\n\t\t{\n\t\t\t/* [2-2] 계좌이체 텔레뱅킹 취소*/\t\n\t\t\t/* \t[TB-CanRes|상점ID|posmTid|주문번호|y|취소성공|] */\n\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[1];\n\t\t\t$this->RESULT[\"rMTid\"] = $this->RecvValArray[2];\n\t\t\t$this->RESULT[\"rCancelSuccYn\"] = $this->RecvValArray[3];\n\t\t\t$this->RESULT[\"rCancelResMsg\"] = $this->RecvValArray[4];\t\t\t\t\t\t\n\t\t\t\n\t\t}\n\t\telse if( strcmp( $this->REQUEST[\"AuthTy\"], \"hp\" ) == 0 )\n\t\t{\n\t\t\t/****************************************************************************\n\t\t\t*\n\t\t\t* [4] 핸드폰 결제 취소\n\t\t\t*\n\t\t\t* -- 취소 응답 전문 포멧\n\t\t\t* + 데이터길이(6) + 데이터\n\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 하며 암호화Process에서 해독된후 실데이터를 수신하게 된다.\n\t\t\t* |\tMobileCanRes\t|\t업체ID(20)\t| 성공여부(1)\t|\t결과메세지\t|\t취소처리일시\t|\t이용기관주문번호\t|\n\t\t\t*\t\t \n\t\t\t****************************************************************************/\n\t\t\t\n\t\t\t/* \t[MobileCanRes|상점ID|결과(y/n)|결과메세지|취소일시|이용기관주문번호|] */\n\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[1];\n\t\t\t$this->RESULT[\"rCancelSuccYn\"] = $this->RecvValArray[2];\n\t\t\t$this->RESULT[\"rCancelResMsg\"] = $this->RecvValArray[3];\n\t\t\t$this->RESULT[\"rCancelDate\"] = $this->RecvValArray[4];\n\t\t\t$this->RESULT[\"rTid\"] = $this->RecvValArray[5];\t\t\t\t\t\t\n\t\t\t\n\t\t}\n\t\telse if( strcmp( $this->REQUEST[\"AuthTy\"], \"ars\" ) == 0 )\n\t\t{\n\t\t\t/****************************************************************************\n\t\t\t*\n\t\t\t* [5] ARS 결제 취소\n\t\t\t*\n\t\t\t* -- 취소 응답 전문 포멧\n\t\t\t* + 데이터길이(6) + 데이터\n\t\t\t* + 데이터 포멧(데이터 구분은 \"|\"로 하며 암호화Process에서 해독된후 실데이터를 수신하게 된다.\n\t\t\t* |\tArsCanRes\t|\t업체ID(20)\t| 성공여부(1)\t|\t결과메세지\t|\t취소처리일시\t|\t이용기관주문번호\t|\n\t\t\t*\t\t \n\t\t\t****************************************************************************/\n\t\t\t\n\t\t\t/* \t[ArsCanRes|상점ID|결과(y/n)|결과메세지|취소일시|이용기관주문번호|] */\n\t\t\t$this->RESULT[\"rStoreId\"] = $this->RecvValArray[1];\n\t\t\t$this->RESULT[\"rCancelSuccYn\"] = $this->RecvValArray[2];\n\t\t\t$this->RESULT[\"rCancelResMsg\"] = $this->RecvValArray[3];\n\t\t\t$this->RESULT[\"rCancelDate\"] = $this->RecvValArray[4];\n\t\t\t$this->RESULT[\"rTid\"] = $this->RecvValArray[5];\t\t\t\t\t\t\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->log->WriteLog( INFO, $this->REQUEST[\"AuthTy\"].\" \".\"Parse CancelMSG Passed \" );\n\t\t\t$this->RESULT[\"rCancelSuccYn\"] = \"n\";\n\t\t\t$this->RESULT[\"rCancelResMsg\"] = \"Cannot Cancel AuthTy[\".$this->REQUEST[\"AuthTy\"].\"]\";\t\n\t\t\treturn false;\n\t\t}\n\t\t$this->log->WriteLog( INFO, \"Parse Cancel Msg End\" );\n\t\treturn true;\n\t}", "protected function readDevice()\n {\n $trame = '';\n $i=0;\n while (strlen($trame)==0 && $i < 3) {\n $trame = $this->readTrame();\n $i++;\n }\n\n echo date('Y-m-d H:i:s T').\" Read attempt : \".$i.\" for \".strlen($trame).\" octet(s)\\n\";\n\n $trame = chop(substr($trame, 1, -1)); // on supprime les caracteres de debut et fin de trame\n\n $messages = explode(chr(10), $trame); // on separe les messages de la trame\n $new = [];\n foreach ($messages as $msg) {\n $ligne = explode(' ', $msg, 3);\n if (count($ligne)<2) {\n continue;\n }\n $new[$ligne[0]] = $ligne[1];\n }\n return $new;\n }", "#[Pure]\nfunction http_parse_message($message) {}", "public function onUdpPacket($pct) {}", "public function validatePacket($packet) {\n\t\t$pattern = '/^([0-9a-fA-F]{1,2}(\\.|\\ )){1,64}[0-9a-fA-F]{1,2}(\\.|)$/';\n\t\treturn (bool) preg_match($pattern, $packet);\n\t}", "protected function split_packet($length,$packet, $user) {\n //add PartialPacket and calculate the new $length\n if ($user->handlingPartialPacket) {\n $packet = $user->partialBuffer . $packet;\n $user->handlingPartialPacket = false;\n $length=strlen($packet);\n }\n $fullpacket=$packet;\n $frame_pos=0;\n $frame_id=1;\n\n while($frame_pos<$length) {\n $headers = $this->extractHeaders($packet);\n $headers_size = $this->calcoffset($headers);\n $framesize=$headers['length']+$headers_size;\n \n //split frame from packet and process it\n $frame=substr($fullpacket,$frame_pos,$framesize);\n\n if (($message = $this->deframe($frame, $user,$headers)) !== FALSE) {\n if ($user->hasSentClose) {\n $this->disconnect($user->socket);\n } else {\n if ((preg_match('//u', $message)) || ($headers['opcode']==2)) {\n //$this->stdout(\"Text msg encoded UTF-8 or Binary msg\\n\".$message); \n $this->process($user, $message);\n } else {\n $this->stderr(\"not UTF-8\\n\");\n }\n }\n } \n //get the new position also modify packet data\n $frame_pos+=$framesize;\n $packet=substr($fullpacket,$frame_pos);\n $frame_id++;\n }\n }", "private function parseResult()\n {\n $code = $this->statusCode;\n\n if($code == \"01\")\n {\n $this->success = true;\n $this->message = \"Payment Successful\";\n }\n elseif($code == \"515\")\n {\n $this->success = false;\n $this->message = \"This number does not have a mobile money account\";\n }\n elseif($code == \"529\")\n {\n $this->success = false;\n $this->message = \"You don't have enough money in your account. Please Recharge\";\n }\n elseif($code == \"100\")\n {\n $this->success = false;\n $this->message = \"Transaction Failed. Declined by user.\";\n }\n else{\n $this->success = false;\n $this->message = \"Unknown Response\";\n }\n }", "protected function parseHeader($header)\n {\n if ($this->isParsed) {\n return;\n }\n\n $headerParts = explode(\"\\n\", $header);\n\n if (count($headerParts) != 2) {\n throw new ResponseException(\"Response header must contain 2 lines! Given: {$header}\");\n }\n\n // Parsing State\n $stateParts = $this->parseLine($headerParts[0]);\n\n if (!$stateParts || $stateParts[0] != \"State\") {\n throw new ResponseException(\"Cannot parse a State field in response header\");\n }\n\n $this->state = (int)substr($stateParts[1], 0, 3);\n $this->stateMessage = substr($stateParts[1], 4);\n\n // Parsing request-id\n $requestIdParts = $this->parseLine($headerParts[1]);\n\n if (!$requestIdParts || $requestIdParts[0] != \"request-id\") {\n throw new ResponseException(\"Cannot parse a reqeust-id field in response header\");\n }\n\n $this->requestId = $requestIdParts[1];\n }", "private function parse_status ($line, &$fatal, &$full_error) {\n\t\t$error = null;\n\t\t$full_error = null;\n\t\t\n\t\tforeach ($this->status as $key => $value) {\n\t\t\tif (eregi($key, $line, $captures)) {\n\t\t\t\t\n\t\t\t\tswitch ($value) {\n\t\t\t\t\tcase STATUS_ERROR_MAIN: {\n\t\t\t\t\t\t$file = null;\n\t\t\t\t\t\t$error = $this->convert_html_error($captures[1], $captures[2], &$file, null, null);\n\n\t\t\t\t\t\t$fatal = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn $error;\n\t\t\t\t\t}\n\t\t\t\t\tcase STATUS_ERROR: {\n\t\t\t\t\t\t$level = $captures[4];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$error = $this->convert_html_error($level, $captures[5], &$captures[1], $captures[2], $captures[3]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Return the full error\n\t\t\t\t\t\t$full_error = array();\n\t\t\t\t\t\t$full_error[\"path\"] = $captures[1];\n\t\t\t\t\t\t$full_error[\"line\"] = $captures[2];\n\t\t\t\t\t\t$full_error[\"column\"] = $captures[3];\n\t\t\t\t\t\t$full_error[\"message\"] = $captures[5];\n\n\t\t\t\t\t\t// Ignore errors\n\t\t\t\t\t\tif (($level == \"Note\") && ($this->ignore_notes)) $error = null;\n\t\t\t\t\t\tif (($level == \"Warning\") && ($this->ignore_warnings)) $error = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Fatal errors that stop compilation\n\t\t\t\t\t\tif (($level == \"Error\") || ($level == \"Fatal\")) $fatal = true;\n\n\t\t\t\t\t\treturn $error;\n\t\t\t\t\t}\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $error;\n\t}", "function _parse_message($message)\n{\n if (!$message) {\n throw new \\InvalidArgumentException('Invalid message');\n }\n\n $message = ltrim($message, \"\\r\\n\");\n\n $messageParts = preg_split(\"/\\r?\\n\\r?\\n/\", $message, 2);\n\n if ($messageParts === false || count($messageParts) !== 2) {\n throw new \\InvalidArgumentException('Invalid message: Missing header delimiter');\n }\n\n list($rawHeaders, $body) = $messageParts;\n $rawHeaders .= \"\\r\\n\"; // Put back the delimiter we split previously\n $headerParts = preg_split(\"/\\r?\\n/\", $rawHeaders, 2);\n\n if ($headerParts === false || count($headerParts) !== 2) {\n throw new \\InvalidArgumentException('Invalid message: Missing status line');\n }\n\n list($startLine, $rawHeaders) = $headerParts;\n\n if (preg_match(\"/(?:^HTTP\\/|^[A-Z]+ \\S+ HTTP\\/)(\\d+(?:\\.\\d+)?)/i\",\n $startLine, $matches) && $matches[1] === '1.0') {\n // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0\n $rawHeaders = preg_replace(HEADER_FOLD_REGEX, ' ',\n $rawHeaders);\n }\n\n /** @var array[] $headerLines */\n $count = preg_match_all(HEADER_REGEX, $rawHeaders, $headerLines,\n PREG_SET_ORDER);\n\n // If these aren't the same, then one line didn't match and there's an invalid header.\n if ($count !== substr_count($rawHeaders, \"\\n\")) {\n // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4\n if (preg_match(HEADER_FOLD_REGEX, $rawHeaders)) {\n throw new \\InvalidArgumentException('Invalid header syntax: Obsolete line folding');\n }\n\n throw new \\InvalidArgumentException('Invalid header syntax');\n }\n\n $headers = [];\n\n foreach ($headerLines as $headerLine) {\n $headers[$headerLine[1]][] = $headerLine[2];\n }\n\n return [\n 'start-line' => $startLine,\n 'headers' => $headers,\n 'body' => $body,\n ];\n}", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "function http_parse_response()\n\t{\n\t\tlist($headers, $body) = explode(\"\\r\\n\\r\\n\", $this->http_response, 2);\n\t\t$this->http_parse_headers($headers);\n\n\t\tif(isset($this->http_response_headers['Transfer-Encoding']) && 'chunked' == $this->http_response_headers['Transfer-Encoding']):\n \t\t$this->http_response_body = $this->http_chunked_decode($body);\n\t\telse:\n\t\t\t$this->http_response_body = $body;\n\t\tendif;\n\n\t\t$this->http_set_content_type($this->http_default_content_type);\n\t}", "private function parseIncomingRaw(string $header)\n {\n $parseRes = [];\n $content = '';\n $fields = explode(\"\\r\\n\", preg_replace('/\\x0D\\x0A[\\x09\\x20]+/', ' ', $header));\n foreach ($fields as $field) {\n if (preg_match('/([^:]+): (.+)/m', $field, $match)) {\n $match[1] = preg_replace_callback('/(?<=^|[\\x09\\x20\\x2D])./', function ($matches) {\n return strtoupper($matches[0]);\n }, strtolower(trim($match[1])));\n if (isset($parseRes[$match[1]])) {\n $parseRes[$match[1]] = [$parseRes[$match[1]], $match[2]];\n } else {\n $parseRes[$match[1]] = trim($match[2]);\n }\n } elseif (preg_match('!HTTP/1\\.\\d (\\d)* .!', $field)) {\n $parseRes['status'] = $field;\n } else {\n $content .= $field . \"\\r\\n\";\n }\n }\n $parseRes['content'] = $content;\n\n return $parseRes;\n }", "protected function split_packet($length, $packet, $user) \n\t{\n\t\t//add PartialPacket and calculate the new $length\n\t\tif ( $user->handlingPartialPacket ) \n\t\t{\n\t\t\t$packet = $user->partialBuffer . $packet;\n\t\t\t$user->handlingPartialPacket = false;\n\n\t\t\t$length = strlen($packet);\n\t\t}\n\n\t\t$fullpacket = $packet;\n\t\t$frame_pos = 0;\n\t\t$frame_id = 1;\n\n\t\twhile( $frame_pos < $length ) \n\t\t{\n\t\t\t$headers = $this->extractHeaders($packet);\n\t\t\t$headers_size = $this->calcoffset($headers);\n\n\t\t\t$framesize = $headers['length'] + $headers_size;\n\n\t\t\t//split frame from packet and process it\n\t\t\t$frame = substr($fullpacket, $frame_pos, $framesize);\n\n\t\t\tif ( ($message = $this->deframe($frame, $user,$headers)) !== FALSE ) \n\t\t\t{\n\t\t\t\tif ( $user->hasSentClose ) \n\t\t\t\t\t$this->disconnect($user->socket);\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tif ( preg_match('//u', $message) ) \n\t\t\t\t\t\t$this->process($user, $message);\n\t\t\t\t\telse \n\t\t\t\t\t\t$this->stderr(\"not UTF-8\");\n\t\t\t\t}\n\t\t\t} \n\n\t\t//get the new position also modify packet data\n\t\t\t$frame_pos += $framesize;\n\t\t\t$packet = substr($fullpacket,$frame_pos);\n\t\t\t$frame_id++;\n\t\t}\n\t}", "public function parse()\n {\n return $this->connection->protocol()->parse($this);\n }", "public function parsePayload()\n {\n $_MTI_url = 'http://ii.nlm.nih.gov/cgi-bin/II/Interactive/interactiveMTI.pl'; \n $dom = new DOMDocument;\n $fields = array('InputText' => urlencode($this->_payload));\n\n $curl_ressource = curl_init();\n \n curl_setopt($curl_ressource,CURLOPT_URL, $_MTI_url);\n curl_setopt($curl_ressource,CURLOPT_POST, count($fields));\n curl_setopt($curl_ressource,CURLOPT_POSTFIELDS, $fields);\n curl_setopt($curl_ressource, CURLOPT_RETURNTRANSFER, true); \n curl_setopt($curl_ressource, CURLOPT_TIMEOUT, 40);\n \n // Parses result html to extract MTI semantical parser results\n $dom->loadHTML(curl_exec($curl_ressource));\n $pres = $dom->getElementsByTagName('pre');\n \n foreach($pres as $pre)\n if(strstr($pre->nodeValue,\"Command: MTI\"))\n {\n $array = explode(\"\\n\", $pre->nodeValue);\n array_shift($array);\n array_shift($array);\n array_shift($array);\n array_shift($array);\n $result = implode(\"\\n\", $array); \n $this->_parsed_payload = $result; \n }\n \n curl_close($curl_ressource);\n \n return $result;\n }", "protected function _parse(){\n\t\tforeach ($this->dataArray['tables']['nat']['default-chains'] as $a => &$b){\n\t\t\t$b['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($b['rules'], $b['iptables-rules']);\n\t\t}\n\t\t\n\t\t// Now the IP chains...\n\t\tforeach ($this->dataArray['tables']['nat']['ip-chains'] as &$e){\n\t\t\t$e['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($e['rules'], $e['iptables-rules']);\n\t\t}\n\t\t\n\t\t// And finally, the others...\n\t\tforeach ($this->dataArray['tables']['nat']['other-chains'] as $h => &$i){\n\t\t\t$i['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($i['rules'], $i['iptables-rules']);\n\t\t}\n\t}", "public function parse();", "public function parse();", "public function parse();", "protected function parse_errors() {\n\t\tif ( count ( $this->_errors ) > 0 ) {\n\t\t\tforeach ( $this->_errors as $k => $v ) {\n\t\t\t\tadd_settings_error( $this->token . '-errors', $k, $v, 'error' );\n\t\t\t}\n\t\t} else {\n\t\t\t$message = sprintf( __( '%s settings updated', '{plugin_jump_starter_textdomain}' ), $this->name );\n\t\t\tadd_settings_error( $this->token . '-errors', $this->token, $message, 'updated' );\n\t\t}\n\t}", "private function readMessage()\n {\n $fromIp = \"\";\n $fromPort = 0;\n $msg = null;\n \n if (!@socket_recvfrom($this->socket, $msg, 65535, 0, $fromIp, $fromPort)) {\n $err_no = socket_last_error($this->socket);\n if ($err_no == 4) {\n \techo \"\\n\\nCaught SIGINT, quiting...\\n\";\n \t$this->keepRunning = false;\n }\n }\n\n if (!$msg) {\n \treturn false;\n }\n\n if ($this->fromIp === null && $this->fromPort === null) {\n \t$this->fromIp = $fromIp;\n \t$this->fromPort = $fromPort;\n } else if ($this->fromIp != $fromIp || $this->fromPort != $fromPort) {\n \tdie(sprintf(\"Error: sender changed from %s:%d to %s:%d, aborting...\\n\", $this->fromIp, $this->fromPort, $fromIp, $fromPort));\n }\n \n return [\n \t\"timestamp\"\t=> microtime(true),\n \t\"msg\" \t\t=> $msg,\n \t\"from_ip\" \t=> $fromIp,\n \t\"from_port\"\t=> $fromPort\n ];\n }", "protected function _parseHeader( $aHeader )\n\t\t{\n\t\t\tfor ( $i = 0; $i < count( $aHeader ); ++$i )\n\t\t\t\tif ( $i == 0 ) // the status reply (also starts a new array, which prevents mixing previous header info\n\t\t\t\t{\n\t\t\t\t\t$aHeaderPart = explode( \" \", $aHeader[ $i ], 3 );\n\t\t\t\t\t$this->_requestheader = Array(\n\t\t\t\t\t\t\"response\"=>$aHeader[ $i ],\n\t\t\t\t\t\t\"protocol\"=>$aHeaderPart[ 0 ],\n\t\t\t\t\t\t\"status\"=>$aHeaderPart[ 1 ],\n\t\t\t\t\t\t\"statusinfo\"=>$aHeaderPart[ 2 ]\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse // other headers\n\t\t\t\t{\n\t\t\t\t\t$aHeaderPart = explode( \":\", $aHeader[ $i ], 2 );\n\t\t\t\t\t$this->_requestheader[ $aHeaderPart[ 0 ] ] = trim( $aHeaderPart[ 1 ] );\n\t\t\t\t}\n\t\t}", "protected function tryParseCommands()\n {\n $result = [];\n\n for($dataLen = strlen($this->buffer); $dataLen >= 4;) {\n // reading length of received command\n $commandLenBytes = substr($this->buffer, 0, 4);\n $commandLen = intval(bin2hex($commandLenBytes), 16);\n if($dataLen < $commandLen+4) {\n // waiting more bytes to parse\n break;\n }\n $commandBytes = gzuncompress(substr($this->buffer, 4, $commandLen));\n $command = json_decode($commandBytes, true);\n $result[] = $command;\n // cut parsed bytes from buffer\n $this->buffer = substr($this->buffer, $commandLen + 4);\n $dataLen = strlen($this->buffer);\n }\n\n return $result;\n }", "function http_spreaker_parse($txt)\n{\n $needed_parts = array('nonce'=>1, 'username'=>1, 'timestamp'=>1, 'response'=>1);\n $data = array();\n $data = explode(\":\",$txt);\n $arrayReturn = array();\n if(count($needed_parts) != count($data)){\n \treturn false;\n }\n $i = 0;\n foreach($needed_parts as $key => $val){\n \t$arrayReturn[$key] = $data[$i];\n \t$i++;\n }\n return $arrayReturn;\n}", "public function parse($unparsedGame) {\r\n if (!is_string($unparsedGame)) {\r\n throw new InvalidGameFormatException(\"[\" . __CLASS__ . \"] invalid game format (it's not a valid string): \" . $unparsedGame);\r\n }\r\n \r\n $parsing = explode(\"]\", $unparsedGame);\r\n \r\n if(count($parsing) < 8) { // TODO: create a checkSTR method\r\n throw new InvalidGameFormatException(\"[\" . __CLASS__ . \"] invalid game format (it doesn't have correct fields): \" . $unparsedGame);\r\n }\r\n \r\n $uncheckedMoveText = array_pop($parsing);\r\n\r\n foreach ($parsing as $unparsedTag) {\r\n $tag = Tag::parse(trim($unparsedTag) . \"]\", $this->parseErrors);\r\n $this->addTag($tag);\r\n }\r\n \r\n if (!$this->checkSetUpAndFEN()) {\r\n throw new InvalidGameFormatException(\"[\" . __CLASS__ . \"] invalid game format (missing SetUp or FEN): \" . $unparsedGame);\r\n }\r\n \r\n if ($this->checkMoveText($uncheckedMoveText)) {\r\n $this->moveText = $uncheckedMoveText;\r\n } else {\r\n $this->parseErrors[] = \"[\" . __CLASS__ . \"] MoveText: \" . $uncheckedMoveText;\r\n }\r\n }", "public function process($data)\n {\n if (! $data) {\n throw new Exception(\"Error Processing Request: No data found\", 1);\n } else if (substr( $data, 0, 30 ) != '<?xml version=\"1.0\" encoding=\"' ) { // Else if old style text, process with old text based handler\n \n // Translate network strings to db fields\n $translate = array(\n ' agrCtlRSSI: ' => 'agrctlrssi',\n ' agrExtRSSI: ' => 'agrextrssi',\n ' agrCtlNoise: ' => 'agrctlnoise',\n ' agrExtNoise: ' => 'agrextnoise',\n ' state: ' => 'state',\n ' op mode: ' => 'op_mode',\n ' lastTxRate: ' => 'lasttxrate',\n ' maxRate: ' => 'maxrate',\n 'lastAssocStatus: ' => 'lastassocstatus',\n ' 802.11 auth: ' => 'x802_11_auth',\n ' link auth: ' => 'link_auth',\n ' BSSID: ' => 'bssid',\n ' SSID: ' => 'ssid',\n ' MCS: ' => 'mcs',\n ' channel: ' => 'channel');\n\n // Delete previous entries\n\n // Parse data\n foreach (explode(\"\\n\", $data) as $line) {\n // Translate standard entries\n foreach ($translate as $search => $field) {\n if (strpos($line, $search) === 0) {\n $value = substr($line, strlen($search));\n\n $this->$field = $value;\n break;\n }\n }\n } //end foreach explode lines\n $this->save();\n } else { // Else process with new XML handler\n\n // Process incoming wifi.plist\n $parser = new CFPropertyList();\n $parser->parse($data, CFPropertyList::FORMAT_XML);\n $plist = $parser->toArray();\n\n // Process each of the items\n foreach (array('agrctlrssi', 'agrextrssi', 'agrctlnoise', 'agrextnoise', 'state', 'op_mode', 'lasttxrate', 'lastassocstatus', 'maxrate', 'x802_11_auth', 'link_auth', 'bssid', 'ssid', 'mcs', 'channel', 'snr', 'known_networks') as $item) {\n\n // If key exists and is zero, set it to zero\n if ( array_key_exists($item, $plist) && $plist[$item] === 0) {\n $this->$item = 0;\n // Else if key does not exist in $plist, null it\n } else if (! array_key_exists($item, $plist) || $plist[$item] == '' || $plist[$item] == \"{}\" || $plist[$item] == \"[]\") {\n $this->$item = null;\n\n // Set the db fields to be the same as those in the preference file\n } else {\n $this->$item = $plist[$item];\n }\n }\n\n // Save the data because bumblebees are fuzzy\n $this->save();\n }\n }", "public function parseEmail($raw){\n\t\t\t$rawMessage = explode(\"\\n\\n\", $raw, 2);\n\t\t\t$header = trim($rawMessage[0]);\n\t\t\t$body = trim($rawMessage[1]);\n\n\t\t\tpreg_match(\"%Date: (.+?)\\n%\", $header, $date);\t\t\t\t\t\t//Parse date\n\t\t\t$receiveDate = strtotime($date[1]);\n\n\t\t\t//On Jan 24, 2011, at 8:00 PM, OhJournal wrote:\n\t\t\tpreg_match(\"%^([\\s\\S]+?)On (.+?), at (.+?), OhJournal%\", $body, $parts);\t//Parse send date & time from reply line\n\t\t\t$sendDate = strtotime($parts[2].\" \".$parts[3]);\n\t\t\t\n\t\t\t//should implement this as a config variable - this removes hard wrapping, but also removes a lot of newlines\n\t\t\t//$body = preg_replace('%(\\S)\\n(\\S)%', '\\1 \\2', trim(quoted_printable_decode(preg_replace(\"/=[\\n\\r]+/\", \"\", trim($parts[1])))));\n\t\t\t$body = trim(quoted_printable_decode(preg_replace(\"/=[\\n\\r]+/\", \"\", trim($parts[1]))));\n\n\t\t\treturn array($sendDate, $receiveDate, $header, $body);\n\t\t}", "public function parse(): object\n {\n $parsed = [\n 'host_status' => $this->host_status,\n 'raw' => $this->results,\n ];\n\n if (count($this->round_trip_time) > 0) {\n $parsed['latency'] = $this->round_trip_time['avg'];\n $parsed['rtt'] = (object) $this->round_trip_time;\n }\n\n if (count($this->sequence) > 0) {\n $parsed['sequence'] = (object) $this->sequence;\n }\n\n if (count($this->statistics) > 0) {\n $parsed['statistics'] = (object) $this->statistics;\n }\n\n return (object) $parsed;\n }", "protected function processChannelMessages()\n\t{\n\t\tif (preg_match(\n\t\t\t'/^(NEW|UPD|NUK): \\[DT: (?P<time>.+?)\\]\\s?\\[TT: (?P<title>.+?)\\]\\s?\\[SC: (?P<source>.+?)\\]\\s?\\[CT: (?P<category>.+?)\\]\\s?\\[RQ: (?P<req>.+?)\\]' .\n\t\t\t'\\s?\\[SZ: (?P<size>.+?)\\]\\s?\\[FL: (?P<files>.+?)\\]\\s?(\\[FN: (?P<filename>.+?)\\]\\s?)?(\\[(?P<nuked>(UN|MOD|RE|OLD)?NUKED?): (?P<reason>.+?)\\])?$/i',\n\t\t\t$this->_channelData['message'], $matches)) {\n\n\t\t\tif (isset($this->_ignoredChannels[$matches['source']]) && $this->_ignoredChannels[$matches['source']] === true) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ($this->_categoryIgnoreRegex !== false && preg_match((string)$this->_categoryIgnoreRegex, $matches['category'])) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ($this->_titleIgnoreRegex !== false && preg_match((string)$this->_titleIgnoreRegex, $matches['title'])) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->_curPre['predate'] = $this->_pdo->from_unixtime(strtotime($matches['time'] . ' UTC'));\n\t\t\t$this->_curPre['title'] = $matches['title'];\n\t\t\t$this->_curPre['source'] = $matches['source'];\n\t\t\tif ($matches['category'] !== 'N/A') {\n\t\t\t\t$this->_curPre['category'] = $matches['category'];\n\t\t\t}\n\t\t\tif ($matches['req'] !== 'N/A' && preg_match('/^(?P<req>\\d+):(?P<group>.+)$/i', $matches['req'], $matches2)) {\n\t\t\t\t$this->_curPre['reqid'] = $matches2['req'];\n\t\t\t\t$this->_curPre['group_id'] = $this->_getGroupID($matches2['group']);\n\t\t\t}\n\t\t\tif ($matches['size'] !== 'N/A') {\n\t\t\t\t$this->_curPre['size'] = $matches['size'];\n\t\t\t}\n\t\t\tif ($matches['files'] !== 'N/A') {\n\t\t\t\t$this->_curPre['files'] = substr($matches['files'], 0, 50);\n\t\t\t}\n\n\t\t\tif (isset($matches['filename']) && $matches['filename'] !== 'N/A') {\n\t\t\t\t$this->_curPre['filename'] = $matches['filename'];\n\t\t\t}\n\n\t\t\tif (isset($matches['nuked'])) {\n\t\t\t\tswitch ($matches['nuked']) {\n\t\t\t\t\tcase 'NUKED':\n\t\t\t\t\t\t$this->_curPre['nuked'] = \\PreDb::PRE_NUKED;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'UNNUKED':\n\t\t\t\t\t\t$this->_curPre['nuked'] = \\PreDb::PRE_UNNUKED;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'MODNUKED':\n\t\t\t\t\t\t$this->_curPre['nuked'] = \\PreDb::PRE_MODNUKE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'RENUKED':\n\t\t\t\t\t\t$this->_curPre['nuked'] = \\PreDb::PRE_RENUKED;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'OLDNUKE':\n\t\t\t\t\t\t$this->_curPre['nuked'] = \\PreDb::PRE_OLDNUKE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$this->_curPre['reason'] = (isset($matches['reason']) ? substr($matches['reason'], 0, 255) : '');\n\t\t\t}\n\t\t\t$this->_checkForDupe();\n\t\t}\n\t}", "function parseResponse($response){\n $res = array();\n $r = explode(':', $response);\n\n switch($r[0]){\n case 'd':\n if($r[1] == 'err') {\n $res['danger'] = 'Could not delete the desired element.';\n }\n elseif($r[1] == 'ok') {\n $res['success'] = 'Element permanently deleted.';\n }\n break;\n default:\n break;\n }\n return $res;\n }", "function parseMessage(string $message): array\n{\n $result = [\n 'code' => null,\n 'amount' => null,\n 'receiver' => null,\n ];\n\t\n\t\n\t// The first - check for yandex account number 41001XXXXX..XXX\n\t// Y.M. test accounts: 41003XXXXX..XXX\n preg_match_all('/(^(?:.*?\\D|))(4100[\\d\\-]{7,})((?:[\\s.,].*?|)$)/isu', $message, $matches, PREG_SET_ORDER);\n if (empty($matches)) {\n throw new \\Exception('Receiver not found');\n }\n if (count($matches) > 1) {\n throw new \\Exception('Multiple receivers found');\n }\n\t\n $result['receiver'] = preg_replace('/\\D+/', '', $matches[0][2]);\n\n\t// Exclude found entity from next searches\n $message = $matches[0][1] . $matches[0][count($matches[0]) - 1];\n\t\n\t\n\t// Detect amount of money transfered\n\t// It may have 1-2 fractional digits, and may not (integer amount)\n\t// Also fractional part may apeears in different formats - \".\", \",\" \n\t// or even smth like \"XXX р. YY к.\" (\"...YY коп\")\n\t$rurReg = 'р\\.|р\\b|руб|rub|rur|₽|&\\#8381;';\n\t$rurFracReg = 'к\\.|к\\b|коп|kop';\n preg_match_all(\n\t\t\"/(^(?:.*?\\\\s|))(\n\t\t\t(\\\\d+)((,|\\\\.|\\\\s*(?:{$rurReg})\\\\s*)(\\\\d{1,2})|)\\\\s*(?:{$rurReg}|{$rurFracReg})\n\t\t)((?:[\\\\s.,].*?|)$)/isux\", $message, $matches, PREG_SET_ORDER);\n if (empty($matches)) {\n throw new \\Exception('Amount not found');\n }\n if (count($matches) > 1) {\n throw new \\Exception('Multiple amounts found');\n }\n $result['amount'] = floatval($matches[0][3] . '.' . $matches[0][6]);\n\n $message = $matches[0][1] . $matches[0][count($matches[0]) - 1];\n\t\n\n\t// Detect verification code (verification password)\n\t// For now, we sincerelly believe it must be just set of 4-6 digits\n preg_match_all('/(^|\\D)(\\d{4,})(\\D|$)/isu', $message, $matches, PREG_SET_ORDER);\n if (empty($matches)) {\n throw new \\Exception('Code not found');\n }\n if (count($matches) > 1) {\n throw new \\Exception('Multiple codes found');\n }\n $result['code'] = $matches[0][2];\n\n return $result;\n}", "public function parseResponse($message);", "public function parseRequest($message);", "abstract public function parse ();", "public static function read($socket)\n {\n $header = '';\n do {\n $buf = socket_read($socket, 12 - self::stringLength($header));\n $header .= $buf;\n } while ($buf !== false &&\n $buf !== '' && self::stringLength($header) < 12);\n\n if ($buf === '') {\n throw new Exception('Connection was reset');\n }\n\n if (self::stringLength($header) == 0) {\n return array();\n }\n $resp = @unpack('a4magic/Ntype/Nlen', $header);\n\n if (!count($resp) == 3) {\n throw new Exception('Received an invalid response');\n }\n\n if (!isset(self::$magic[$resp['type']])) {\n throw new Exception(\n 'Invalid response magic returned: ' . $resp['type']\n );\n }\n\n $return = array();\n if ($resp['len'] > 0) {\n $data = '';\n while (self::stringLength($data) < $resp['len']) {\n $data .= socket_read($socket, $resp['len'] - self::stringLength($data));\n }\n\n $d = explode(\"\\x00\", $data);\n foreach (self::$magic[$resp['type']][1] as $i => $a) {\n $return[$a] = $d[$i];\n }\n }\n\n $function = self::$magic[$resp['type']][0];\n if ($function == 'error') {\n if (!self::stringLength($return['err_text'])) {\n $return['err_text'] = 'Unknown error; see error code.';\n }\n\n throw new Exception(\n $return['err_text'], $return['err_code']\n );\n }\n\n return array('function' => self::$magic[$resp['type']][0],\n 'type' => $resp['type'],\n 'data' => $return, );\n }", "function parse_response($response){ \r\n \r\n list($response_headers,$response_body) = explode(\"\\r\\n\\r\\n\",$response,2); \r\n $response_header_lines = explode(\"\\r\\n\",$response_headers); \r\n \r\n // first line of headers is the HTTP response code \r\n $http_response_line = array_shift($response_header_lines); \r\n if (preg_match('/^HTTP\\/[0-9]\\.[0-9a-z] ([0-9]{3})/i',$http_response_line,$matches)) { \r\n $response_code = $matches[1]; \r\n }\r\n // put the rest of the headers in an array \r\n $response_header_array = array(); \r\n foreach ($response_header_lines as $header_line) { \r\n list($header,$value) = explode(': ',$header_line,2); \r\n $response_header_array[$header] = $value; \r\n } \r\n \r\n return array($response_code,$response_header_array,$response_body); \r\n}", "final public function decode(& $packet_data, $remaining_length, & $payload_pos)\n {\n $cmd = Utility::ParseCommand(ord($packet_data[0]));\n $message_type = $cmd['message_type'];\n\n if ($this->message->getMessageType() != $message_type) {\n throw new Exception('Unexpected Control Packet Type');\n }\n\n $flags = $cmd['flags'];\n $this->setFlags($flags);\n\n $pos = 1;\n\n $rl_len = strlen(($this->remaining_length_bytes = Utility::EncodeLength($remaining_length)));\n\n if (strpos($packet_data, $this->remaining_length_bytes, 1) !== $pos) {\n throw new Exception('Remaining Length mismatch.');\n }\n $pos += $rl_len;\n\n $this->remaining_length = $remaining_length;\n\n $this->decodeVariableHeader($packet_data, $pos);\n\n $payload_pos = $pos;\n }", "public function parse()// : void\n\t{\n\t\tforeach( $this -> options[ 'command' ] as $command => $params )\n\t\t{\n\t\t\t//- Parsing -//\n\t\t\t$result = null;\n\t\t\tpreg_match_all(\n\t\t\t\t$params[ 'regex' ], \n\t\t\t\t$this -> text, \n\t\t\t\t$result, \n\t\t\t\tPREG_PATTERN_ORDER\n\t\t\t);\n\n\t\t\t//- Set result -//\n\t\t\t$this -> value[ $command ] = array();\n\t\t\t$this -> errors[ $command ] = array();\n\t\t\tforeach( $params[ 'value' ] as $key => $index )\n\t\t\t{\n\t\t\t\tif( !isset( $result[ $index ][ 0 ] ) )\n\t\t\t\t{\n\t\t\t\t\t$this -> errors[ $command ][ $key ] = \"Command not valid\";//TODO: change\n\t\t\t\t\t\n\t\t\t\t\t$this -> valid = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//- Set value -//\n\t\t\t\t$this -> value[ $command ][ $key ] = $result[ $index ][ 0 ];\n\t\t\t}\t\t\t\n\t\t}\n\t}", "function parse_dAmn_packet($data, $sep = '=') {\n\n\t$data = parse_tablumps($data);\n\n\t$packet = array(\n\t\t'cmd' => Null,\n\t\t'param' => Null,\n\t\t'args' => array(),\n\t\t'body' => Null,\n\t\t'raw' => $data\n\t);\n\tif(stristr($data, \"\\n\\n\")) {\n\t\t$packet['body'] = trim(stristr($data, \"\\n\\n\"));\n\t\t$data = substr($data, 0, strpos($data, \"\\n\\n\"));\n\t}\n\t$data = explode(\"\\n\", $data);\n\tforeach($data as $id => $str) {\n\t\tif(strpos($str, $sep) != 0) {\n\t\t\t$packet['args'][substr($str, 0, strpos($str, $sep))] = substr($str, strpos($str, $sep)+1);\n\t\t} elseif(strlen($str) >= 1) {\n\t\t\tif(!stristr($str, ' ')) { $packet['cmd'] = $str; } else {\n\t\t\t\t$packet['cmd'] = substr($str, 0, strpos($str, ' '));\n\t\t\t\t$packet['param'] = trim(stristr($str, ' '));\n\t\t\t}\n\t\t}\n\t}\n\treturn $packet;\n\n}", "private function parse()\n {\n // form was unsubscribed?\n if ($this->URL->getParameter('unsubscribed') === 'true') {\n // show message\n $this->tpl->assign('mailmotorUnsubscribeIsSuccess', true);\n\n // hide form\n $this->tpl->assign('mailmotorUnsubscribeHideForm', true);\n }\n }", "function parse_ch1_text($tlv) {\r\n $this->unpack_all_TLVs($tlv);\r\n if (isset($this->tbt[257])) {\r\n $arr = unpack('n1charset/n1subset', substr($this->tbt[257]['value'], 0, 4));\r\n $arr['text'] = $this->decode_text(substr($this->tbt[257]['value'], 4), $arr['charset'], $arr['subset']);\r\n return $arr;\r\n } else {\r\n $this->error('Unknown incoming message format', __FILE__, __LINE__);\r\n return array('text' => '');\r\n }\r\n }", "abstract function decode($socket, $data);", "protected function validate_data_fields(){\n\t\tif(empty($this->RESPONSE)){throw new Exception(\"Response field not found\", 5);}\n\t\t\n\t\t// The remote IP address is also required\n\t\tif($this->validate_ip($this->REMOTE_ADDRESS)){throw new Exception(\"Renote IP address not set correctly\", 6);}\n\t}", "function analyseMessage($message, $line) {\n global $results;\n $train_no_replace_pat = '/\\bT?([0-9]{3,4})/';\n $train_no_pat = '/(\\b[0-9]{3,4})/';\n $delay_replace_pat = '/\\b((([0-9]){1,3})-)?(([0-9]){1,3})(\\+)? ?min(ute)?s?/';\n $delay_pat = '/(((([0-9]){1,2})-)?(([0-9]){1,2})\\+? minutes)/';\n \n $count_cancel = preg_match_all(\"/\\bcancel/i\", $message);\n $count_delayed = preg_match_all(\"/\\bdelay/i\", $message);\n \n // First split message into sentences. This algorithm does per-sentence analysis.\n // Exclude \"Train no. 0628\" from being two different sentenes!\n $message = str_replace(\"no.\", \"no\", $message);\n \n foreach (explode(\".\", $message) as $sen) {\n $train_no_matches = array();\n $delay_matches = array();\n \n $sen = preg_replace(\"/(\\r|\\n|)\\s+/m\", \" \", $sen);\n // Normalise delays notices\n $sen = preg_replace($delay_replace_pat, \"$1$4$6 minutes\", $sen);\n // Normalise train no.s\n $sen = preg_replace($train_no_replace_pat, \"$1\", $sen);\n \n $score_cancel = $count_cancel + (preg_match_all(\"/\\bcancel/i\", $sen) * 100) + (preg_match_all(\"/\\bcancel/i\", $previous_sen) * 4);\n $score_delayed = $count_delayed + (preg_match_all(\"/\\bdelay/i\", $sen) * 100) + (preg_match_all(\"/\\bdelay/i\", $previous_sen) * 4);\n \n preg_match_all($train_no_pat, $sen, $train_no_matches);\n preg_match_all($delay_pat, $sen, $delay_matches);\n \n if (!empty($train_no_matches[0])) {\n // Specific trains are mentioned\n var_dump($train_no_matches[0]);\n echo \"TRAIN NO.S: $line\\n\\n\";\n }\n \n if (!empty($delay_matches[0])) {\n // There are delays\n var_dump($delay_matches[0]);\n echo \"DELAYS: $line\\n\\n\";\n }\n \n if (!empty($delay_matches[0]) && empty($train_no_matches[0])) {\n // There are delays but no specific trains are mentioned\n // Check if there are multiple mentioned delays: if there are,\n // the longer delay time prevails\n \n if (empty($results[$line][\"other_trains\"])) {\n $results[$line][\"other_trains\"] = $delay_matches[0][0] . \" late\";\n } else {\n $previous_delay_mins = array();\n $current_delay_mins = array();\n preg_match(\"/(([0-9]+)-)?([0-9]+)(\\+)?/\", $results[$line][\"other_trains\"], $previous_delay_mins); }\n preg_match(\"/(([0-9]+)-)?([0-9]+)(\\+)?/\", $sen, $current_delay_mins);\n \n if (intval($previous_delay_mins[3]) > intval($current_delay_mins[3])) {\n // Do nothing\n } else if (intval($previous_delay_mins[3]) < intval($current_delay_mins[3])) {\n $results[$line][\"other_trains\"] = $delay_matches[0][0] . \" late\";\n } else if (intval($previous_delay_mins[3]) == intval($current_delay_mins[3])) {\n if (!empty($previous_delay_mins[4])) {\n // Do nothing\n } else {\n $results[$line][\"other_trains\"] = $delay_matches[0][0] . \" late\";\n }\n }\n \n } else if (!empty($delay_matches[0]) && !empty($train_no_matches[0])) {\n // There are delays for specific, mentioned trains\n // For each in $train_no_matches, add an entry to affected trains\n // with the train no as the key and the delay time as the value\n \n foreach ($train_no_matches[0] as $train) {\n // set this train's status as the (first?) delay mentioned\n $results[$line][\"affected_trains\"][$train] = $delay_matches[0][0];\n } \n // TODO: make sure this still works if there are multiple mentioned delays in the delay_matches array\n } else if (empty($results[$line][\"other_trains\"]) && strpos($sen, \"Good Service\") !== false) {\n $results[$line][\"other_trains\"] = \"On time\";\n } else if (!empty($train_no_matches[0]) && empty($delay_matches[0])) {\n // Train numbers are found, but no delays are mentioned. These trains are probably cancelled.\n // Check the algorithmic score of \"cancel\" vs \"delay\".\n // Whichever scores higher is more likely to be correct and so prevails\n echo \"\\n$line score_delayed = $score_delayed; score_cancel = $score_cancel\\n\";\n if ($score_cancel > $score_delayed) {\n foreach ($train_no_matches[0] as $train) {\n // set this train's status as cancelled\n $results[$line][\"affected_trains\"][$train] = \"Cancelled\";\n }\n } else if ($score_delayed > $score_cancel) {\n foreach ($train_no_matches[0] as $train) {\n // set this train's status as delayed\n $results[$line][\"affected_trains\"][$train] = $delay_matches[0][0] . \" late\";\n // TODO: check that this ^^ does the right thing when (if?) $delay_matches has more than one delay time listed\n }\n } else {\n foreach ($train_no_matches[0] as $train) {\n // set this train's status as possibly delayed or cancelled (uncertain)\n $results[$line][\"affected_trains\"][$train] = \"Delayed\";\n }\n }\n }\n \n // Only update previous_sen if this sen has \"cancel\" or \"delay\"\n if (preg_match(\"/\\bcancel/i\", $sen) || preg_match(\"/\\bdelay/i\", $sen)) {\n $previous_sen = $sen;\n }\n }\n}", "public function parse()\n {\n }", "static function Parse ($data)\n\t{\n\t\t$irc = \"/^(?:\\:(\\S+)\\s+)(\\w+)(?:\\s+(?!:)(.*?))?(?:\\s+:(.+))?$/\";\n\t\tpreg_match($irc, $data, $matches);\n\t\t$return = array(\n\t\t\t'origin' => (isset($data[1])) ? $data[1] : \"\",\n\t\t\t'command' => $data[2],\n\t\t\t'params' => (isset($data[3])) ? explode(\" \",$data[3]) : array(),\n\t\t);\n\t\tif (isset($data[4]))\n\t\t{\n\t\t\t$return['params'][] = $data[4];\n\t\t\t$return['freeform'] = TRUE;\n\t\t}\n\t\treturn $return;\n\t}", "public function parse()\n {\n // TODO: Implement parse() method.\n }", "protected function parseErrors($xtpl) {\n\t\t$msg = $this->oPage->getMsgError();\n\t\t\n\t\tif( !empty($msg) ){\n\t\t\t\n\t\t\t$xtpl->assign(\"msg\", $msg);\n\t\t\t//$xtpl->assign(\"msg\", );\n\t\t\t$xtpl->parse(\"main.msg_error\" );\n\t\t}\t\t\t\n\t\t\n\n }", "abstract protected function getPacketType();", "public function parse()\n {\n $this->initProps();\n $this->initParams();\n $this->load();\n }", "private function parseError()\n {\n return $this->error(null, -32700, 'Parse error');\n }", "function print_tcp_packet($packet)\n{\n $ip_header_fmt = 'Cip_ver_len/'\n .'Ctos/'\n .'ntot_len/';\n\n $p = unpack($ip_header_fmt , $packet);\n $ip_len = ($p['ip_ver_len'] & 0x0F);\n\n if($ip_len == 5)\n {\n\n //IP Header format for unpack\n $ip_header_fmt = 'Cip_ver_len/'\n .'Ctos/'\n .'ntot_len/'\n .'nidentification/'\n .'nfrag_off/'\n .'Cttl/'\n .'Cprotocol/'\n .'nip_checksum/'\n .'Nsource_add/'\n .'Ndest_add/';\n }\n else if ($ip_len == 6)\n {\n //IP Header format for unpack\n $ip_header_fmt = 'Cip_ver_len/'\n .'Ctos/'\n .'ntot_len/'\n .'nidentification/'\n .'nfrag_off/'\n .'Cttl/'\n .'Cprotocol/'\n .'nip_checksum/'\n .'Nsource_add/'\n .'Ndest_add/'\n .'Noptions_padding/';\n }\n\n $tcp_header_fmt = 'nsource_port/'\n .'ndest_port/'\n .'Nsequence_number/'\n .'Nacknowledgement_number/'\n .'Coffset_reserved/';\n\n //total packet unpack format\n $total_packet = $ip_header_fmt.$tcp_header_fmt.'H*data';\n\n $p = unpack($total_packet , $packet);\n $tcp_header_len = ($p['offset_reserved'] >> 4);\n\n if($tcp_header_len == 5)\n {\n //TCP Header Format for unpack\n $tcp_header_fmt = 'nsource_port/'\n .'ndest_port/'\n .'Nsequence_number/'\n .'Nacknowledgement_number/'\n .'Coffset_reserved/'\n .'Ctcp_flags/'\n .'nwindow_size/'\n .'nchecksum/'\n .'nurgent_pointer/';\n }\n else if($tcp_header_len == 6)\n {\n //TCP Header Format for unpack\n $tcp_header_fmt = 'nsource_port/'\n .'ndest_port/'\n .'Nsequence_number/'\n .'Nacknowledgement_number/'\n .'Coffset_reserved/'\n .'Ctcp_flags/'\n .'nwindow_size/'\n .'nchecksum/'\n .'nurgent_pointer/'\n .'Ntcp_options_padding/';\n }\n\n //total packet unpack format\n $total_packet = $ip_header_fmt.$tcp_header_fmt.'H*data';\n\n //unpack the packet finally\n $packet = unpack($total_packet , $packet);\n\n //prepare the unpacked data\n $sniff = array(\n\n 'ip_header' => array(\n 'ip_ver' => ($packet['ip_ver_len'] >> 4) ,\n 'ip_len' => ($packet['ip_ver_len'] & 0x0F) ,\n 'tos' => $packet['tos'] ,\n 'tot_len' => $packet['tot_len'] ,\n 'identification' => $packet['identification'] ,\n 'frag_off' => $packet['frag_off'] ,\n 'ttl' => $packet['ttl'] ,\n 'protocol' => $packet['protocol'] ,\n 'checksum' => $packet['ip_checksum'] ,\n 'source_add' => long2ip($packet['source_add']) ,\n 'dest_add' => long2ip($packet['dest_add']) ,\n ) ,\n\n 'tcp_header' => array(\n 'source_port' => $packet['source_port'] ,\n 'dest_port' => $packet['dest_port'] ,\n 'sequence_number' => $packet['sequence_number'] ,\n 'acknowledgement_number' => $packet['acknowledgement_number'] ,\n 'tcp_header_length' => ($packet['offset_reserved'] >> 4) ,\n\n 'tcp_flags' => array(\n 'cwr' => (($packet['tcp_flags'] & 0x80) >> 7) ,\n 'ecn' => (($packet['tcp_flags'] & 0x40) >> 6) ,\n 'urgent' => (($packet['tcp_flags'] & 0x20) >> 5 ) ,\n 'ack' => (($packet['tcp_flags'] & 0x10) >>4) ,\n 'push' => (($packet['tcp_flags'] & 0x08)>>3) ,\n 'reset' => (($packet['tcp_flags'] & 0x04)>>2) ,\n 'syn' => (($packet['tcp_flags'] & 0x02)>>1) ,\n 'fin' => (($packet['tcp_flags'] & 0x01)) ,\n ) ,\n\n 'window_size' => $packet['window_size'] ,\n 'checksum' => $packet['checksum'] . ' [0x'.dechex($packet['checksum']).']',\n ) ,\n\n 'data' => hex_to_str($packet['data'])\n );\n\n //print the unpacked data\n print_r($sniff);\n}", "protected function parseResponse()\n {\n $data = simplexml_load_string($this->body);\n \n $this->data = $data;\n }", "private function read_reply() {\n\t\t\t$reply = fgets($this->connection);\n\t\t\t$status = substr($reply, 0, 1);\n\t\t\t$reply = trim(substr($reply, 1));\n\t\t\tswitch ($status) {\n\t\t\t\tcase '-': // error\n\t\t\t\t\tthrow new Exception($reply);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+': // single line\n\t\t\t\t\tif ($reply == 'OK') return true;\n\t\t\t\t\treturn $reply;\n\t\t\t\t\tbreak;\n\t\t\t\tcase ':': // integer\n\t\t\t\t\treturn (integer)$reply;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '$': // bulk\n\t\t\t\t\treturn $this->bulk_reply($reply);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\t$resp = array();\n\t\t\t\t\tfor ($i=0; $i < $reply; $i++) { \n\t\t\t\t\t\t$resp[$i] = $this->read_reply();\n\t\t\t\t\t}\n\t\t\t\t\treturn $resp;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Exception('Unexpected response');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "protected function parseResponse()\n {\n // get the status code from response.\n $statusCode = $this->httpResponse->getStatusCode();\n\n // set as error, if http status code is not between 200 and 299 (inclusive).\n $this->networkError = !($statusCode >= 200 && $statusCode <= 299);\n\n // decode the response body.\n $body = $this->decodeBody();\n\n // stop when no body is present.\n if ($body) {\n // parse the response id from the body.\n $this->id = (int) array_get($body, 'id', null);\n\n // set as error when there is a an error key and it's not null.\n $this->isError = array_get($body, 'error', null) !== null;\n\n // parse the response data, from result or error.\n $this->data = collect(array_get($body, $this->isError ? 'error' : 'result', []));\n }\n\n // just return the response body.\n return $this->body;\n }", "public function packet()\n {\n //\n // take a copy\n //\n $p = $this->_packet;\n\n //\n // check for an authentication method; either TSIG or SIG\n //\n if ( ($this->auth_signature instanceof Net_DNS2_RR_TSIG) \n || ($this->auth_signature instanceof Net_DNS2_RR_SIG)\n ) {\n $p->additional[] = $this->auth_signature;\n }\n\n //\n // update the counts\n //\n $p->header->qdcount = count($p->question);\n $p->header->ancount = count($p->answer);\n $p->header->nscount = count($p->authority);\n $p->header->arcount = count($p->additional);\n\n return $p;\n }", "public function Msghandle(){\n\n\t\t\t$this->message = $this->msglog = $this->asciilog = $this->status = NULL;\n\t\t\t$this->showclassnames = TRUE;\n\n\t\t\t$this->msgcode = array(\n\t\t\t\t\t\t\t\t\t\t\"000\" => array(\"message\" => \"Message code not found\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"001\" => array(\"message\" => \"Connection resource is not set\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"002\" => array(\"message\" => \"Missing parameters\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"003\" => array(\"message\" => \"Statement is not valid\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"004\" => array(\"message\" => \"Email address already taken\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"005\" => array(\"message\" => \"No row affected\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"006\" => array(\"message\" => \"Password not found\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"007\" => array(\"message\" => \"User data not found\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"008\" => array(\"message\" => \"Username doesn't exist\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"009\" => array(\"message\" => \"Wrong password\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"010\" => array(\"message\" => \"URL format is not valid\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"011\" => array(\"message\" => \"No URL specified\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"012\" => array(\"message\" => \"BabelNet connection failed\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"013\" => array(\"message\" => \"Method is not valid\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"014\" => array(\"message\" => \"Parameters are not valid\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"015\" => array(\"message\" => \"Conflictual settings\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"016\" => array(\"message\" => \"Required attribute not found\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"017\" => array(\"message\" => \"Microsoft Translator auth token not valid\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"018\" => array(\"message\" => \"A parameter is an array\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"019\" => array(\"message\" => \"A parameter is not an array\", \"status\" => \"Error\"),\n\n\t\t\t\t\t\t\t\t\t\t\"998\" => array(\"message\" => \"Operation successful\", \"status\" => \"Notice\"),\n\t\t\t\t\t\t\t\t\t\t\"999\" => array(\"message\" => \"Class instanced successfully\", \"status\" => \"Notice\"),\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t\t$this->log(\"999\", __METHOD__);\n\t\t}", "protected function parseMessage($messageText)\n {\n\n $lines = explode(PHP_EOL, $messageText);\n\n // [*17-Aug-2010 13:57:24*] PHP Notice: Undefined variable...\n $time = substr($lines[0], 1, 20);\n $data = array();\n\n // [17-Aug-2010 13:57:24] PHP Notice*:* Undefined variable...\n $typeEndPos = strpos($lines[0], ':', 27);\n // [17-Aug-2010 13:57:24] PHP *Notice*: Undefined variable...\n $type = substr($lines[0], 27, $typeEndPos - 27);\n // [17-Aug-2010 13:57:24] PHP Notice: *Undefined variable...*\n $text = substr($lines[0], $typeEndPos + 2);\n\n // $lines[1] == 'Stack trace:'\n $stackTrace = '';\n $i = 2;\n do {\n $stackTrace .= $lines[$i] . PHP_EOL;\n $i++;\n } while ( strncasecmp('Url:', $lines[$i], 4) !== 0 );\n\n // Url: http://localhost/tlumoceni-preklady.cz/portal/tlumoceni-preklady.cz/htdocs/\tReferer: unknown\n list($url, $referer, $ip) = explode(\"\\t\", $lines[$i]);\n $url = substr($url, 5);\n $referer = substr($referer, 9);\n $ip = substr($ip, 4);\n $key = md5($type . $text);\n\n return new Message(array(\n 'time' => $time,\n 'type' => $type,\n 'text' => $text,\n 'key' => $key,\n 'stackTrace' => $stackTrace,\n 'url' => $url,\n 'referer' => $referer,\n 'ip' => $ip\n ));\n }", "function parsescan($arLines)\n {\n #no data in first two lines.skip them.\n array_shift($arLines);\n array_shift($arLines);\n\n $result = array();\n foreach($arLines as $key=>$line)\n {\n if(trim($line) == '')\n {\n continue;\n }\n\n $arMatches = array();\n $temp = array();\n if (!preg_match($this->channelreg, $line, $arMatches))\n print \"channel not found\";\n\n $temp['channel']=$arMatches[0];\n\n $line = trim(substr($line,strlen($arMatches[0])));\n if (!preg_match($this->essidreg, $line, $arMatches))\n print \"essid not found\";\n\n $temp['essid']=trim($arMatches[0]);\n\n $line = trim(substr($line,strlen($arMatches[0])));\n if (!preg_match($this->macreg, $line, $arMatches))\n print \"mac not found\";\n\n $temp['mac']=$arMatches[0];\n\n $line = trim(substr($line,strlen($arMatches[0])));\n if (!preg_match($this->securityreg, $line, $arMatches))\n print \"security not found\";\n\n $temp['security']=$arMatches[0];\n\n $line = trim(substr($line,strlen($arMatches[0])));\n\n if (!preg_match($this->signalreg, $line, $arMatches))\n print \"signal not found\";\n\n $temp['signal']=$arMatches[0];\n\n array_push($result, $temp);\n\n print(\"\\n\");\n\n }\n return $result;\n }", "abstract protected function parse($data);", "protected function parseEvent($event)\n {\n list($pass, $severity) = $this->getStatus($event);\n\n $data = [\n 'pass' => $pass,\n 'severity' => $severity,\n 'message' => $this->buildMessage($event),\n 'trace' => $pass ? [] : $this->buildTrace($event),\n 'output' => $event['output'],\n ];\n\n if (!$pass) {\n $this->failures++;\n $this->addError($data, $event);\n }\n\n return $data;\n }" ]
[ "0.61026335", "0.56790835", "0.5665795", "0.5603168", "0.5578566", "0.55110675", "0.54981583", "0.5437744", "0.5359541", "0.5352917", "0.532419", "0.5294952", "0.5276526", "0.52681565", "0.5256551", "0.51810104", "0.51350474", "0.5113144", "0.5104576", "0.50874853", "0.5084613", "0.5082907", "0.50483406", "0.5038066", "0.50163317", "0.49945232", "0.49809566", "0.49763942", "0.4962471", "0.49618226", "0.4919023", "0.4918829", "0.49187785", "0.49187785", "0.49146503", "0.48887295", "0.48879474", "0.488406", "0.4870849", "0.48673195", "0.4834771", "0.48245984", "0.4808872", "0.48058102", "0.48019397", "0.48004097", "0.48004097", "0.48004097", "0.48004097", "0.475665", "0.47459394", "0.473946", "0.4733047", "0.4731539", "0.47228947", "0.47033566", "0.47033566", "0.47033566", "0.46992826", "0.46803015", "0.46706277", "0.4660435", "0.46576837", "0.4652952", "0.46449956", "0.4639783", "0.46394062", "0.46319962", "0.46291438", "0.46214142", "0.46178055", "0.46057808", "0.4600335", "0.458126", "0.4570623", "0.45700812", "0.45665634", "0.45506662", "0.4542631", "0.45385072", "0.45316136", "0.45296848", "0.4526878", "0.4526433", "0.45135328", "0.44996724", "0.44949922", "0.4493294", "0.44902396", "0.44851777", "0.44724634", "0.4471326", "0.4470512", "0.44633338", "0.4451475", "0.4450813", "0.44374245", "0.44293115", "0.4422804", "0.44212762" ]
0.6879847
0
Get the critical errors parsed from the packet
abstract public function GetProblems();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getError() {\n\t\t$error = array();\n\t\t$error['message'] = $this->err_message;\n\t\t$error['code'] = $this->err_code;\n\t\treturn $error;\n\t}", "public function getServerErrors()\r\n {\r\n $srvErrors = array();\r\n $errMessages = $this->getMessages();\r\n \r\n foreach ($errMessages as $name => $err) {\r\n if (is_array($err)) {\r\n foreach ($err as $errName => $errMessage) {\r\n $label = $this->getElement($name)->getLabel();\r\n $srvErrors[$label] = $errMessage;\r\n }\r\n }\r\n else {\r\n if (preg_match('/:/', $err) > 0) {\r\n $err = explode(':', $err);\r\n $srvErrors[$err[0]] = $err[1];\r\n } else {\r\n if (preg_match('/Date/', $err) > 0) {\r\n $srvErrors['Start/End Date'] = $err;\r\n }\r\n else {\r\n $srvErrors['Other'] = $err;\r\n }\r\n }\r\n }\r\n }\r\n \r\n return $srvErrors;\r\n }", "public function getError()\n\t{\n\t\t$arr = each($this->error);\n\t\treturn $arr['value'];\n\t}", "public function get_errors() {\n $res = array();\n foreach($this->errors as $error) {\n $res[] = $error->errormsg;\n }\n return $res;\n }", "public function Errors()\n {\n return $this->parseobject($this->error);\n }", "function getErrors()\n {\n ksort($this->errors);\n $e = array();\n foreach ($this->errors as $v) foreach ($v as $e[]) {}\n return $e;\n }", "public function getError(): array\n {\n return $this->errorMessages;\n }", "public function errorInfo() {\n\t\treturn array(\n\t\t\t0,\n\t\t\t0,\n\t\t\tmssql_get_last_message()\n\t\t);\n\t}", "public function getErrors()\n {\n if(curl_errno($this->ch))\n return curl_error($this->ch);\n return null;\n }", "public function errorInfo()\n {\n if ($this->error !== false) {\n return ['HY000', $this->error['code'], $this->error['message']];\n }\n\n return ['00000', null, null];\n }", "public function allError() {\n return $this->errorMsg;\n }", "protected final function requestErrors(): array\n {\n return $this->errors;\n }", "public function getErrorList() : array {\n\t\t$file = func_get_arg( 0 );\n\t\tswitch ( $file ) {\n\t\t\tcase 'SlowMetaQueryUnitTest.success.inc':\n\t\t\t\treturn [];\n\n\t\t\tcase 'SlowMetaQueryUnitTest.fail.inc':\n\t\t\t\treturn [\n\t\t\t\t\t7 => 1,\n\t\t\t\t\t14 => 1,\n\t\t\t\t\t27 => 1,\n\t\t\t\t\t37 => 1,\n\t\t\t\t\t47 => 1,\n\t\t\t\t\t59 => 1,\n\t\t\t\t\t78 => 1,\n\t\t\t\t\t94 => 1,\n\t\t\t\t\t98 => 1,\n\t\t\t\t\t105 => 1,\n\t\t\t\t];\n\t\t}\n\t\treturn [];\n\t}", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function errorInfo()\n {\n $e = oci_error($this->_dbh);\n\n if (is_array($e)) {\n return array(\n 'HY000',\n $e['code'],\n $e['message']\n );\n }\n\n return array('00000', null, null);\n }", "private function error(): array\n {\n $error = [];\n $pdoError = $this->statement->errorInfo();\n if (empty($pdoError[0]) || $pdoError[0] == '00000')\n return $error;\n\n $error['code'] = isset($pdoError[1]) ? $pdoError[0] . '/' . $pdoError[1] : $pdoError[0];\n if (isset($pdoError[2]))\n $error['message'] = $pdoError[2];\n\n return $error;\n }", "public function getErrorResponses();", "final public function getError():array\n {\n return $this->errors;\n }", "public function getErr()\n {\n return $this->get(self::ERR);\n }", "public function getErr()\n {\n return $this->get(self::ERR);\n }", "function getErrors();", "public function getErrors()\r\n\t\t{\r\n\t\t\treturn $this->_controlErrors;\r\n\t\t}", "public function getError()\n {\n if (empty($this->error) != true){\n end($this->error); //Pointer to the end\n $key = key($this->error); //Get the key of last element\n $ret = array( \"code\" => $key, \"description\" => $this->error[$key] );\n reset($this->error);\n }else{\n $ret = array( \"code\" => \"get_error\", \"description\" => \"No are errors to show\" );\n }\n \n return $ret;\n }", "public function getAllerrors() {\n return $this->errors;\n }", "public function getError()\n {\n $errors = self::$errors;\n self::$errors = array();\n return $errors;\n }", "public function getError()\r\n\t\t{\r\n\t\t\treturn $this->_errores;\r\n\t\t}", "public function errors() {\n\t\treturn $this->errs;\n\t}", "public function getErrorData() {\n\t\treturn $this->excuteHandle->getErrorData();\n\t}", "public function getErrorMessages() {}", "public function getErrorMessage()\n {\n return [\n 'error' => [\n 'message' => 'Nonce token is invalid or missing.',\n ],\n ];\n }", "public function getErrors(){\r\n return $this->_errors['error'];\r\n }", "public function getErrors()\n {\n $sErrMsg = '';\n if (count($this->aErrors) > 1) {\n foreach ($this->aErrors as $sError) {\n $sErrMsg .= $sError . \"\\r\\n\";\n }\n }\n\n return $sErrMsg;\n }", "protected function get_errors_description() {\n $errors = array();\n if ($this->options->is_check_errors == true) {\n\n $i = 0;\n $rules_names = $this->get_error_hints_names();\n\n foreach($rules_names as $rule_name) {\n $rule = new $rule_name($this->get_dst_root());\n $rhr = $rule->check_hint();\n\n if (count($rhr->problem_ids) > 0) {\n $errors[$i] = array();\n\n $errors[$i][\"problem\"] = $rhr->problem;\n $errors[$i][\"solve\"] = $rhr->solve;\n $errors[$i][\"problem_ids\"] = $rhr->problem_ids;\n $errors[$i][\"problem_type\"] = $rhr->problem_type;\n $errors[$i][\"problem_indfirst\"] = $rhr->problem_indfirst;\n $errors[$i][\"problem_indlast\"] = $rhr->problem_indlast;\n\n ++$i;\n }\n }\n }\n return $errors;\n }", "function getErrors() {\n\t\treturn $this->_arc2_RemoteStore->getErrors();\n\t}", "public function getErr() {}", "public function errors()\n\t{\n\t\treturn $this->_errors['errors'];\n\t}", "public function errors()\n\t{\n\t\treturn $this->_errors['errors'];\n\t}", "function requestErrors() {\n return $this->errors;\n }", "public function errorData()\n {\n $errorData = array(\n 'timestamp' => date('Y-m-d H:m:s'),\n 'request_page' => $_SERVER['REQUEST_URI'],\n 'user_language' => substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2),\n 'message' => $this->error\n );\n\n return $errorData;\n }", "protected function getErrorData()\n {\n $error = [\n 'message' => $this->getErrorMessage(),\n ];\n\n if ($this->debug && \\is_object($this->error)) {\n $error['exception'] = \\get_class($this->error);\n $error['file'] = $this->error->getFile();\n $error['line'] = $this->error->getLine();\n $error['trace'] = \\collect($this->error->getTrace())->map(function ($trace) {\n return Arr::except($trace, ['args']);\n })->all();\n }\n\n if ($this->error instanceof ValidationException && $this->error->validator) {\n if ($this->error->validator) {\n $error['errors'] = $this->error->validator->errors();\n } else {\n $error['errors'] = [];\n }\n } elseif ($this->error instanceof MessageBag) {\n $error['errors'] = $this->error->getMessages();\n }\n\n return $error;\n }", "public function getErrors(): array\n {\n return $this->errorBucket;\n }", "public function get_errors() { return $this->errortext; }", "public function get_errors($Light = false) {\n if ($Light) {\n foreach (self::$Errors as $Key => $Value) {\n self::$Errors[$Key][3] = '';\n }\n }\n return self::$Errors;\n }", "public function error(): array\n\t{\n\t\tif (! empty($this->connID->connect_errno))\n\t\t{\n\t\t\treturn [\n\t\t\t\t'code' => $this->connID->connect_errno,\n\t\t\t\t'message' => $this->connID->connect_error,\n\t\t\t];\n\t\t}\n\n\t\treturn [\n\t\t\t'code' => $this->connID->errno,\n\t\t\t'message' => $this->connID->error,\n\t\t];\n\t}", "function getErrors()\n\t{\n\t\treturn [];\n\t}", "public function getErrors()\n\t{\n\t\treturn $this->_errorMessage;\n\t}", "private function readErrors()\n {\n $fh = fopen($this->logdir.\"hermes.log\", \"r\");\n if($fh == FALSE)\n return;\n if(flock($fh, LOCK_EX))\n {\n $line = fgets($fh);\n while($line != FALSE)\n {\n $pair = split(' ', $line);\n $this->errors[$pair[0]] = $pair[1]; //undefined offset whatever lol\n $line = fgets($fh);\n }\n flock($fh, LOCK_UN);\n }\n fclose($fh);\n }", "public function get_errors($Light = false) {\n\t\tif ($Light) {\n\t\t\tforeach ($this->Errors as $Key => $Value) {\n\t\t\t\t$this->Errors[$Key][3] = '';\n\t\t\t}\n\t\t}\n\t\treturn $this->Errors;\n\t}", "private function getErrors() {\n \n $inError = $this->getInErrorWords();\n $errors = array();\n $length = count($inError);\n if ($length === 0) {\n return $errors;\n }\n $error = null;\n $currentErrorType = null;\n for ($i = 0; $i <= $length; $i++) {\n \n if ($i === $length) {\n $errors[] = $error;\n break;\n }\n \n if (!isset($currentErrorType) || $currentErrorType === $inError[$i]['error']) {\n $message = (isset($error) ? $error['message'] . ' ' : '') . $inError[$i]['word'];\n }\n else {\n $errors[] = $error;\n $message = $inError[$i]['word'];\n }\n \n $currentErrorType = $inError[$i]['error'];\n $error = array(\n 'error' => $currentErrorType,\n 'message' => (isset($error) ? $error['message'] . ' ' : '') . $inError[$i]['word']\n );\n }\n return $errors;\n }", "public function getError();", "public function getError();", "public function getError();", "function allError($groupid, $time){\n \t$con = new mysqli('localhost','heng','@powell135','200ok');\n \tif ($con -> connect_errno){\n \t\treturn CONNECTION_FAIL;\n \t}\n \t$query = \"select errorType, time, url, errorInfo, errorStatus, priority, username, rating, numofvote, line,id from jnjn_error where groupid = '$groupid' and time < '$time' order by time DESC limit 5\";\n \t$result = $con -> query($query);\n \t$errors = array();\n \t$i = 0;\n \twhile ($row = mysqli_fetch_array($result)) {\n \t\t$errors[] = new Error($row['errorType'],$row['time'],$row['url'],$row['errorInfo'],$row['errorStatus'],$row['priority'],$row['username'],$row['rating'],$row['numofvote'],$groupid,$row['line'],$row['id']);\n \t}\n \t$result -> close();\n \treturn $errors;\n }", "public function getErrors () : array {\n\t\treturn $this->errors;\n\t}", "public static function errorInfo(): array {\r\n return self::getConnection()->errorInfo();\r\n }", "public function getErrorList()\n {\n return [\n 13 => 1,\n 33 => 1,\n 83 => 1,\n 88 => 1,\n 92 => 1,\n ];\n\n }", "public function get_errors() {\n\t\treturn $this->errors->get_error_messages();\n\t}", "abstract public function getMsgError();", "public function getErrors()\n {\n return $this->_getChildrenByName('error');\n }", "public function getErrorLines()\n {\n return array('Something went wrong... ಠ_ಠ');\n }", "public function getLPFailed();", "public function errors()\n {\n return $this->getRules()->getMessageBag()->all();\n }", "public function getErrorMessagesList(){\n \t$errors = $this->getMessages();\n \tif(count($errors)){\n \t\t$result = [];\n \t\tforeach ($errors as $elementName => $elementErrors){\n \t\t\tforeach ($elementErrors as $errorMsg){\n \t\t\t\t$result[] = $errorMsg;\n \t\t\t}\n \t\t}\n \t\treturn $result;\n \t}\n \treturn null;\n }", "public function getErrors()\n {\n return $this->getProperty(OperationInterface::BPMN_PROPERTY_ERRORS, new Collection);\n }", "public function getErrors() { return $this->_traiat_errors; }", "public function get_errors() {\n\t\treturn $this->errors;\n\t}", "public function getErrors()\n {\n return $this->processerrors;\n }", "public function get_error();", "public function get_error();", "public function get_error_messages();", "public function getErrors()\n {\n return $this->getInputFilter()->getMessages();\n }", "public function get_errors()\n {\n\n $error_cookie = $_SESSION['errors'];\n $this->errors = json_decode($error_cookie);\n\n return $this->errors;\n\n }", "public function getAllMessage()\n {\n $messages = [];\n foreach (array_keys($this->errors) as $key) {\n $messages[$key] = $this->getMessage($key);\n }\n return $messages;\n }", "public function getError() {\n return $this->get(self::ERROR);\n }", "public function getError() {\n return $this->get(self::ERROR);\n }", "public function errors()\n {\n $errors = [];\n foreach($this->errors as $type => $error) {\n if (!empty($error)) {\n $errors[] = $error;\n }\n }\n return $errors;\n }", "public function getErrors(): array\n {\n return $this->getInputFilter()->getMessages();\n }", "public function get_errors(){\n\n\t\treturn $this->errors;\n\n\t}", "static public function getErrors()\n\t{\n\t\treturn static::$aErrors;\n\t}", "public function error()\n\t{\n\t\treturn [];\n\t}", "public static function getErrors(): array\n {\n return self::$errors;\n }", "public function getInnerErrors()\n {\n return [];\n }", "public function get_errors() {\n return $this->errors;\n }", "public function get_errors() {\n return $this->errors;\n }", "public function getError()\r\n\t{\r\n\t\treturn $this->root->getAttribute('liberr');\r\n\t}", "public function get_errors()\n {\n return $this->errors;\n }", "public function get_errors()\n {\n return $this->errors;\n }", "public function get_errors()\n {\n return $this->errors;\n }", "public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if (null !== ($v = $this->getAccident())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ACCIDENT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getAccidentType())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ACCIDENT_TYPE] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getAdditionalMaterials())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_ADDITIONAL_MATERIALS, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getCondition())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getCoverage())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_COVERAGE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getCreated())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CREATED] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getDiagnosis())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getEnterer())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ENTERER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getException())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_EXCEPTION, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getFacility())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_FACILITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getFundsReserve())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_FUNDS_RESERVE] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getInterventionException())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_INTERVENTION_EXCEPTION, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getItem())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getMissingTeeth())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_MISSING_TEETH, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getOrganization())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ORGANIZATION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOriginalPrescription())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOriginalRuleset())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPatient())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PATIENT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPayee())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PAYEE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPrescription())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PRESCRIPTION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPriority())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PRIORITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getProvider())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PROVIDER] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getReferral())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_REFERRAL] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getRuleset())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_RULESET] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSchool())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SCHOOL] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getTarget())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TARGET] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getType())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TYPE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getUse())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_USE] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_ACCIDENT])) {\n $v = $this->getAccident();\n foreach($validationRules[self::FIELD_ACCIDENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ACCIDENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ACCIDENT])) {\n $errs[self::FIELD_ACCIDENT] = [];\n }\n $errs[self::FIELD_ACCIDENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ACCIDENT_TYPE])) {\n $v = $this->getAccidentType();\n foreach($validationRules[self::FIELD_ACCIDENT_TYPE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ACCIDENT_TYPE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ACCIDENT_TYPE])) {\n $errs[self::FIELD_ACCIDENT_TYPE] = [];\n }\n $errs[self::FIELD_ACCIDENT_TYPE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ADDITIONAL_MATERIALS])) {\n $v = $this->getAdditionalMaterials();\n foreach($validationRules[self::FIELD_ADDITIONAL_MATERIALS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ADDITIONAL_MATERIALS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ADDITIONAL_MATERIALS])) {\n $errs[self::FIELD_ADDITIONAL_MATERIALS] = [];\n }\n $errs[self::FIELD_ADDITIONAL_MATERIALS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONDITION])) {\n $v = $this->getCondition();\n foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CONDITION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONDITION])) {\n $errs[self::FIELD_CONDITION] = [];\n }\n $errs[self::FIELD_CONDITION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_COVERAGE])) {\n $v = $this->getCoverage();\n foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_COVERAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_COVERAGE])) {\n $errs[self::FIELD_COVERAGE] = [];\n }\n $errs[self::FIELD_COVERAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CREATED])) {\n $v = $this->getCreated();\n foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CREATED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CREATED])) {\n $errs[self::FIELD_CREATED] = [];\n }\n $errs[self::FIELD_CREATED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DIAGNOSIS])) {\n $v = $this->getDiagnosis();\n foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_DIAGNOSIS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DIAGNOSIS])) {\n $errs[self::FIELD_DIAGNOSIS] = [];\n }\n $errs[self::FIELD_DIAGNOSIS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ENTERER])) {\n $v = $this->getEnterer();\n foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ENTERER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ENTERER])) {\n $errs[self::FIELD_ENTERER] = [];\n }\n $errs[self::FIELD_ENTERER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXCEPTION])) {\n $v = $this->getException();\n foreach($validationRules[self::FIELD_EXCEPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_EXCEPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXCEPTION])) {\n $errs[self::FIELD_EXCEPTION] = [];\n }\n $errs[self::FIELD_EXCEPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_FACILITY])) {\n $v = $this->getFacility();\n foreach($validationRules[self::FIELD_FACILITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FACILITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_FACILITY])) {\n $errs[self::FIELD_FACILITY] = [];\n }\n $errs[self::FIELD_FACILITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_FUNDS_RESERVE])) {\n $v = $this->getFundsReserve();\n foreach($validationRules[self::FIELD_FUNDS_RESERVE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FUNDS_RESERVE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_FUNDS_RESERVE])) {\n $errs[self::FIELD_FUNDS_RESERVE] = [];\n }\n $errs[self::FIELD_FUNDS_RESERVE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_INTERVENTION_EXCEPTION])) {\n $v = $this->getInterventionException();\n foreach($validationRules[self::FIELD_INTERVENTION_EXCEPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_INTERVENTION_EXCEPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_INTERVENTION_EXCEPTION])) {\n $errs[self::FIELD_INTERVENTION_EXCEPTION] = [];\n }\n $errs[self::FIELD_INTERVENTION_EXCEPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ITEM])) {\n $v = $this->getItem();\n foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ITEM, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ITEM])) {\n $errs[self::FIELD_ITEM] = [];\n }\n $errs[self::FIELD_ITEM][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MISSING_TEETH])) {\n $v = $this->getMissingTeeth();\n foreach($validationRules[self::FIELD_MISSING_TEETH] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_MISSING_TEETH, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MISSING_TEETH])) {\n $errs[self::FIELD_MISSING_TEETH] = [];\n }\n $errs[self::FIELD_MISSING_TEETH][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ORGANIZATION])) {\n $v = $this->getOrganization();\n foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORGANIZATION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ORGANIZATION])) {\n $errs[self::FIELD_ORGANIZATION] = [];\n }\n $errs[self::FIELD_ORGANIZATION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION])) {\n $v = $this->getOriginalPrescription();\n foreach($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORIGINAL_PRESCRIPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ORIGINAL_PRESCRIPTION])) {\n $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = [];\n }\n $errs[self::FIELD_ORIGINAL_PRESCRIPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) {\n $v = $this->getOriginalRuleset();\n foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) {\n $errs[self::FIELD_ORIGINAL_RULESET] = [];\n }\n $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PATIENT])) {\n $v = $this->getPatient();\n foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PATIENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PATIENT])) {\n $errs[self::FIELD_PATIENT] = [];\n }\n $errs[self::FIELD_PATIENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PAYEE])) {\n $v = $this->getPayee();\n foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PAYEE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PAYEE])) {\n $errs[self::FIELD_PAYEE] = [];\n }\n $errs[self::FIELD_PAYEE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PRESCRIPTION])) {\n $v = $this->getPrescription();\n foreach($validationRules[self::FIELD_PRESCRIPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRESCRIPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PRESCRIPTION])) {\n $errs[self::FIELD_PRESCRIPTION] = [];\n }\n $errs[self::FIELD_PRESCRIPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PRIORITY])) {\n $v = $this->getPriority();\n foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRIORITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PRIORITY])) {\n $errs[self::FIELD_PRIORITY] = [];\n }\n $errs[self::FIELD_PRIORITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PROVIDER])) {\n $v = $this->getProvider();\n foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PROVIDER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PROVIDER])) {\n $errs[self::FIELD_PROVIDER] = [];\n }\n $errs[self::FIELD_PROVIDER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REFERRAL])) {\n $v = $this->getReferral();\n foreach($validationRules[self::FIELD_REFERRAL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_REFERRAL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REFERRAL])) {\n $errs[self::FIELD_REFERRAL] = [];\n }\n $errs[self::FIELD_REFERRAL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RULESET])) {\n $v = $this->getRuleset();\n foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_RULESET, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RULESET])) {\n $errs[self::FIELD_RULESET] = [];\n }\n $errs[self::FIELD_RULESET][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SCHOOL])) {\n $v = $this->getSchool();\n foreach($validationRules[self::FIELD_SCHOOL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_SCHOOL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SCHOOL])) {\n $errs[self::FIELD_SCHOOL] = [];\n }\n $errs[self::FIELD_SCHOOL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TARGET])) {\n $v = $this->getTarget();\n foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TARGET, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TARGET])) {\n $errs[self::FIELD_TARGET] = [];\n }\n $errs[self::FIELD_TARGET][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TYPE])) {\n $v = $this->getType();\n foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TYPE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TYPE])) {\n $errs[self::FIELD_TYPE] = [];\n }\n $errs[self::FIELD_TYPE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_USE])) {\n $v = $this->getUse();\n foreach($validationRules[self::FIELD_USE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_USE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_USE])) {\n $errs[self::FIELD_USE] = [];\n }\n $errs[self::FIELD_USE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }", "public function getErrorMessages(){\n return $this->arr_msg; \n }", "public function errorInfo()\n {\n return $this->conn->errorInfo();\n }", "public function getErrors()\r\n\t{\r\n\t\treturn $this->errors;\r\n\t}", "public function errors()\n {\n // return new \\ArrayList($this->errorList.values());\n }", "public function errorInfo()\r\n\t{\r\n\t\treturn $this->errorInfo;\r\n\t}", "public function getErrors() {\r\n\t\treturn $this->errors;\r\n\t}", "public function getErrorMessages() {\n\t\t$errorMessages = '';\n\t\tforeach ($this->errorMessages as $index => $error) {\n\t\t\t$errorMessages .= \"[Error:\" . $index . '] ' . $error . \"\\n<br />\";\n\t\t}\n\t\treturn $errorMessages;\n\t}", "public function error()\n\t{\n\t\treturn reset($this->errors);\n\t}", "public function getErrors(): array\n {\n return $this->errors;\n }" ]
[ "0.60501224", "0.6004456", "0.59612775", "0.5926329", "0.590088", "0.58378977", "0.5830883", "0.5805109", "0.57875836", "0.5786439", "0.57352185", "0.57293755", "0.5719893", "0.5702673", "0.5702673", "0.5702673", "0.5702673", "0.5689944", "0.56764746", "0.5672565", "0.5658401", "0.5657858", "0.5657858", "0.5649732", "0.5647033", "0.56303716", "0.56241906", "0.56184995", "0.56125116", "0.5606677", "0.5603771", "0.55927473", "0.5591056", "0.5587809", "0.5569917", "0.55684435", "0.55677533", "0.55626523", "0.5550381", "0.5550381", "0.5541443", "0.552985", "0.5512853", "0.5506007", "0.5497904", "0.54956996", "0.54939955", "0.54838187", "0.5479276", "0.54780036", "0.54774487", "0.5467868", "0.54586124", "0.54586124", "0.54586124", "0.54438335", "0.54369146", "0.5426834", "0.5426252", "0.5424938", "0.5420762", "0.54205036", "0.5418791", "0.54143465", "0.541315", "0.54097337", "0.54090184", "0.5405553", "0.54047555", "0.5400742", "0.5392565", "0.5392565", "0.53870195", "0.5377231", "0.537004", "0.5358278", "0.535458", "0.535458", "0.5348158", "0.5347319", "0.53423685", "0.5341555", "0.53401846", "0.5328567", "0.5327014", "0.5320804", "0.5320804", "0.5319292", "0.5318645", "0.5318645", "0.5318645", "0.5315247", "0.53121245", "0.53110886", "0.5310536", "0.5310366", "0.53100705", "0.5308579", "0.5307601", "0.53005487", "0.5298499" ]
0.0
-1
Get the noncritical warnings parsed from the packet
abstract public function GetStatus();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWarnings(): array\n {\n return $this->warnings;\n }", "public function getWarnings(): array\n {\n return $this->warnings;\n }", "public function getWarnings()\n {\n return $this->_getChildrenByName('warning');\n }", "public function getWarnings() : array;", "public function allWarning() {\n return $this->warningMsg;\n }", "public function getWarnings(): array;", "public function getWarnings()\n {\n return self::$warnings;\n }", "public function getWarningList() : array {\n\t\t$file = func_get_arg( 0 );\n\t\tswitch ( $file ) {\n\t\t\tcase 'SlowMetaQueryUnitTest.success.inc':\n\t\t\t\treturn [];\n\n\t\t\tcase 'SlowMetaQueryUnitTest.fail.inc':\n\t\t\t\treturn [\n\t\t\t\t\t69 => 1,\n\t\t\t\t\t84 => 1,\n\t\t\t\t\t90 => 1,\n\t\t\t\t\t110 => 1,\n\t\t\t\t];\n\t\t}\n\t\treturn [];\n\t}", "public function getWarningList() {\n\t\treturn [\n\t\t\t110 => 1,\n\t\t\t111 => 1,\n\t\t\t114 => 1,\n\t\t\t118 => 1,\n\t\t\t119 => 1,\n\t\t\t122 => 1,\n\t\t\t125 => 1,\n\t\t\t130 => 1,\n\t\t\t131 => 1,\n\t\t\t132 => 1,\n\t\t\t137 => 1,\n\t\t\t138 => 1,\n\t\t\t139 => 1,\n\t\t\t208 => 1,\n\t\t];\n\t}", "public function getWarningList()\n {\n return [];\n }", "public function getWarningList()\n {\n return [];\n }", "public function getWarningList()\n {\n return [];\n }", "public function getWarningList()\n {\n return [];\n }", "public function getWarningList()\n {\n return [];\n }", "public function getIgnoreWarnings()\n {\n return $this->ignore_warnings;\n }", "public function getWarningList() {\n\t\treturn array();\n\t}", "public function getWarningList() {\n\t\treturn [];\n\t}", "public function getWarningList() {\n\t\treturn array(\n\t\t\t18 => 1,\n\t\t\t19 => 1,\n\t\t\t20 => ( version_compare( PHPCSHelper::get_version(), '3.4.0', '<' ) === true ? 0 : 1 ),\n\t\t\t21 => 1,\n\t\t\t34 => 1,\n\t\t\t35 => 1,\n\t\t\t48 => 1,\n\t\t\t49 => 1,\n\t\t\t64 => 1,\n\t\t\t65 => 1,\n\t\t);\n\t}", "public function getWarnings() : ?array\n {\n return $this->warnings;\n }", "public static function getWarnings($event) {\n $warnings = array(\n 'addMark' => array('WAverages'),\n 'addAbsence' => array('WAbsences'),\n );\n return isset($warnings[$event]) ? $warnings[$event] : array();\n }", "public function getWarning() {\n return $this->warning;\n }", "public function getWarning()\n {\n return $this->warning;\n }", "public function getWarning()\n {\n return $this->warning;\n }", "public function getWarningList() {\n\t\treturn array(\n\t\t\t88 => 1, // Whitelist comment deprecation warning.\n\t\t);\n\t}", "public function get_warnings() {\n\n\t\t$output = '';\n\t\t\n\t\t$warnings = $this->warnings;\n\t\t\n\t\tif ($warnings) {\n\t\t\t$items = '';\n\t\t\tforeach ($warnings as $w) {\n\t\t\t\t$items .= '<li>'.$w.'</li>' .\"\\n\";\n\t\t\t}\n\t\t\t$output = '<ul>'.\"\\n\".$items.'</ul>'.\"\\n\";\n\t\t}\n\t\telse {\n\t\t\t$output = __('There were no warnings.', CCTM_TXTDOMAIN);\n\t\t}\n\t\treturn sprintf('<h2>%s</h2><div class=\"summarize-posts-warnings\">%s</div>'\n\t\t\t, __('Warnings', CCTM_TXTDOMAIN)\n\t\t\t, $output);\n\t}", "public function getWarningList() {\n\t\treturn array(\n\t\t\t47 => 1,\n\t\t\t48 => 1,\n\t\t\t49 => 1,\n\t\t\t50 => 1,\n\t\t\t51 => 1,\n\t\t\t52 => 1,\n\t\t\t53 => 1,\n\t\t\t54 => 1,\n\t\t\t55 => 1,\n\t\t\t56 => 1,\n\t\t\t57 => 1,\n\t\t\t58 => 1,\n\t\t\t59 => 1,\n\t\t\t60 => 1,\n\t\t\t61 => 1,\n\t\t\t62 => 2,\n\t\t\t64 => 1,\n\t\t\t65 => 1,\n\t\t\t68 => 1,\n\t\t\t69 => 1,\n\t\t\t70 => 1,\n\t\t\t71 => 1,\n\t\t\t72 => 1,\n\t\t\t73 => 1,\n\t\t\t74 => 1,\n\t\t\t76 => 1,\n\t\t\t78 => 1,\n\t\t\t81 => 2,\n\t\t\t85 => 1,\n\t\t\t86 => 2,\n\t\t\t89 => 1,\n\t\t\t91 => 1,\n\t\t\t93 => 1,\n\t\t\t105 => 1,\n\t\t\t106 => 1,\n\t\t\t107 => 2,\n\t\t\t108 => 1,\n\t\t\t109 => 1,\n\t\t\t110 => 2,\n\t\t\t111 => 3,\n\t\t);\n\n\t}", "function warnings() {\n\t\t$Warnings = array();\n\t\tif (mysqli_warning_count($this->LinkID)) {\n\t\t\t$e = mysqli_get_warnings($this->LinkID);\n\t\t\tdo {\n\t\t\t\tif ($e->errno == 1592) {\n\t\t\t\t\t// 1592: Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$Warnings[] = 'Code ' . $e->errno . ': ' . display_str($e->message);\n\t\t\t} while ($e->next());\n\t\t}\n\t\t$this->Queries[count($this->Queries) - 1][2] = $Warnings;\n\t}", "function checkWarnings(){ \n $this->warnings = array();\n if ($this->feedwater->massFlow>0){\n if ($this->outletSteam->phase<>'Gas' and $this->outletSteam->quality<>1){\n $this->warnings[] = \"Outlet Steam Contains Condensate\";\n }\n if ($this->fuelEnergy<0){\n $this->warnings[] = \"Boiler Using Negative Energy\";\n }\n }\n if ($this->feedwater->massFlow<0){\n $this->warnings[] = \"Steam Flow Negative\";\n }\n return count($this->warnings);\n }", "function om_warnings_get_warning_levels()\n{\n\t// check if cache file exists, not - generate it\n\tif (!file_exists(FORUM_CACHE_DIR.'cache_om_warnings_levels.php'))\n\t\tom_warnings_generate_levels_cache();\n\n\trequire FORUM_CACHE_DIR.'cache_om_warnings_levels.php';\n\treturn $om_warnings_levels;\n}", "public function warning()\n {\n return $this->type('warning');\n }", "function getWarningMessages()\r\n {\r\n if(isset($_SESSION['warning_message']))\r\n {\r\n /**\r\n * This is for storing the session array\r\n * @var array\r\n */\r\n $warning_message_array = $_SESSION['warning_message'];\r\n\r\n /**\r\n * This is for creating the warning message\r\n * @var string\r\n */\r\n $response = \"<table>\";\r\n\r\n foreach ($warning_message_array as $array_key\t=>\t$array_value)\r\n {\r\n $response .= \"<tr><td class='warning_message'>\".$array_value.\"</td></tr><tr><td class='warning_message_seperator'></td></tr>\";\r\n }\r\n\r\n $response .= \"</table>\";\r\n\r\n unset ($_SESSION['warning_message']);\r\n\r\n return $response;\r\n }\r\n }", "public function warnings(array $filterData = [])\r\n {\r\n $filterData = array_merge($filterData, [ '_type' => AlertType::WARNING]);\r\n return $this->filter($filterData);\r\n }", "function GetCreditWarningsSettings()\n\t{\n\t\tif (is_null(self::$_creditWarningMessages)) {\n\t\t\t$db = IEM::getDatabase();\n\n\t\t\t$result = $db->Query(\"SELECT * FROM [|PREFIX|]settings_credit_warnings ORDER BY creditlevel ASC, aspercentage DESC\");\n\t\t\tif (!$result) {\n\t\t\t\ttrigger_error(__CLASS__ . '::' . __METHOD__ . ' -- Was not able to query database: ' . $db->Error(), E_USER_NOTICE);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$rows = array();\n\t\t\twhile ($row = $db->Fetch($result)) {\n\t\t\t\t$rows[] = $row;\n\t\t\t}\n\n\t\t\t$db->FreeResult($result);\n\n\t\t\tself::$_creditWarningMessages = $rows;\n\t\t}\n\n\t\treturn self::$_creditWarningMessages;\n\t}", "public function getWarna() {\r\n $sql = $this->db->query(\"SELECT * FROM ms_warna ORDER BY warna_deskripsi\");\r\n if ($sql->num_rows() > 0) {\r\n return $sql->result_array();\r\n }\r\n return null;\r\n }", "function om_warnings_get_warning_types()\n{\n\t// check if cache file exists, not - generate it\n\tif (!file_exists(FORUM_CACHE_DIR.'cache_om_warnings_types.php'))\n\t\tom_warnings_generate_types_cache();\n\n\trequire FORUM_CACHE_DIR.'cache_om_warnings_types.php';\n\treturn $om_warnings_types;\n}", "public function get_nonces()\n {\n }", "function detecterMessagesNonLus($messages){\n $messagesnonlus=array();\n foreach($messages as $message){\n if($message->Lu == 'non'){\n $temp = array($message);\n $messagesnonlus = array_merge($messagesnonlus,$temp);\n } \n }\n return $messagesnonlus;\n }", "protected function renderWarnings() {\n\t\trequire_once(SLS_DIR.\"lib/data/warning/WarningList.class.php\");\n\t\t$objWarningList = new WarningList();\n\t\t$objWarningList->readWarnings();\n\t\t$this->warnings = $objWarningList->warning;\n\t\t\n\t}", "function validate_presences_non_post($required_fields, $record,$warning_me=false) {\n global $errors;\n global $warnings;\n\n $msg_presence=array();\n foreach($required_fields as $field) {\n $value = trim($record[$field]);\n if (!has_presence($value)) {\n\n if ($warning_me) {\n $warnings[$field] = fieldname_as_text($field) . \" n'est pas rempli\";\n\n $msg_presence[$field]=$warnings[$field];\n // $msg_presence[$field]=get_warning_error($warnings[$field],$warning_me);\n\n // var_dump($warnings[$field]);\n }else{\n $errors[$field] = fieldname_as_text($field) . \" n'est pas rempli \";\n $msg_presence[$field]=$errors[$field];\n // $msg_presence[$field]=get_warning_error($errors[$field],$warning_me);;\n\n\n }\n // var_dump(debug_backtrace());\n\n }\n }\n\n return $msg_presence;\n}", "public function allErrorOrWarning() {\n\n return @array_merge($this->errorMsg,$this->warningMsg);\n }", "function get_notices() {\n\t\t\tif( empty($this->notices) ) return false; // bail early if no notices\n\t\t\treturn $this->notices;\n\t\t}", "public function get_security_nonces() {\r\n\t\treturn $this->security_nonces;\r\n\t}", "protected function _make_warning_block_ip()\n\t{\n\t\t$count_max = mod('deposit_card')->setting('fail_count_max');\n\n\t\tif (!$count_max) return;\n\n\t\t$max = mod('deposit_card')->setting('fail_count_max');\n\t\t$minute = mod('deposit_card')->setting('fail_block_timeout');\n\n\t\treturn lang('notice_warning_block_ip', compact('max', 'minute'));\n\t}", "public function getUnrecognizedComponents(): array\n {\n return \\array_slice($this->rule->getComponents(), $this->dotIndex + 1);\n }", "public function warnings($options = array()) {\n\t\tif(!is_array($options)) $options = explode(' ', strtolower($options));\n\t\t$options[] = 'warnings';\n\t\treturn $this->messages($options); \n\t}", "function get_notices() {\n\t\treturn !empty( $this->notices ) ? $this->notices : false;\n\t}", "public function debugWarnings()\n\t{\n\t\t$stmt = $this->_query('SHOW WARNINGS', true);\n\n\t\t$warnings = array();\n\t\twhile ($warning = $stmt->fetch_assoc())\n\t\t{\n\t\t\t$warnings[] = $warning;\n\t\t}\n\n\t\tforeach ($warnings as $warning)\n\t\t{\n\t\t\tatkwarning(\"MYSQL warning '{$warning['Level']}' (Code: {$warning['Code']}): {$warning['Message']}\");\n\t\t}\n\t}", "function om_warnings_get_restrictions($allow_none = false)\n{\n\tglobal $lang_om_warnings;\n\n\t$restrictions = array();\n\n\tif ($allow_none)\n\t\t$restrictions['none'] = $lang_om_warnings['No restriction'];\n\n\t$restrictions['om_post'] = $lang_om_warnings['Disallow to write posts'];\n\t$restrictions['om_edit'] = $lang_om_warnings['Disallow to edit posts'];\n\t$restrictions['om_topic'] = $lang_om_warnings['Disallow to create topics'];\n\t$restrictions['om_banned'] = $lang_om_warnings['Ban user'];\n\t$restrictions['om_signature'] = $lang_om_warnings['Block signature'];\n\t$restrictions['om_avatar'] = $lang_om_warnings['Block avatar'];\n\n\t($hook = get_hook('om_warnings_fn_get_restrictions_pre_return')) ? eval($hook) : null;\n\treturn $restrictions;\n}", "private function _preview_warning()\n\t{\n\t\tglobal $context;\n\n\t\tif (isset($this->_req->post->preview))\n\t\t{\n\t\t\t$warning_body = !empty($this->_req->post->warn_body) ? trim(censor($this->_req->post->warn_body)) : '';\n\n\t\t\tif (empty($this->_req->post->warn_sub) || empty($this->_req->post->warn_body))\n\t\t\t{\n\t\t\t\t$this->_issueErrors[] = 'warning_notify_blank';\n\t\t\t}\n\n\t\t\tif (!empty($this->_req->post->warn_body))\n\t\t\t{\n\t\t\t\trequire_once(SUBSDIR . '/Post.subs.php');\n\n\t\t\t\t$bbc_parser = ParserWrapper::instance();\n\t\t\t\tpreparsecode($warning_body);\n\t\t\t\t$warning_body = $bbc_parser->parseNotice($warning_body);\n\t\t\t}\n\n\t\t\t// Try to remember some bits.\n\t\t\t$context['preview_subject'] = $this->_req->getPost('warn_sub', 'trim|\\\\ElkArte\\\\Util::htmlspecialchars', '');\n\t\t\t$context['warning_data'] = array(\n\t\t\t\t'reason' => $this->_req->post->warn_reason,\n\t\t\t\t'notify' => !empty($this->_req->post->warn_notify),\n\t\t\t\t'notify_subject' => $this->_req->getPost('warn_sub', 'trim', ''),\n\t\t\t\t'notify_body' => $this->_req->getPost('warn_body', 'trim', ''),\n\t\t\t\t'body_preview' => $warning_body,\n\t\t\t);\n\t\t}\n\t}", "public function getLPFailed();", "function get_warning_message()\n {\n return trim($this->_warning_message);\n clear_warning_message();\n }", "public function getMessageables()\n {\n return array_filter($this->rules, function ($key) {\n return !is_numeric($key);\n }, ARRAY_FILTER_USE_KEY);\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getWarningTypeAllowableValues();\n if (!is_null($this->container['warning_type']) && !in_array($this->container['warning_type'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'warning_type', must be one of '%s'\",\n $this->container['warning_type'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "public function getWarningMessage() {\n\t\treturn $this->warningMessage;\n\t}", "function collectsuppression() {\n\tglobal $pfb;\n\t$dnssupp_ex = array();\n\n\t$custom_list = pfbng_text_area_decode($pfb['dnsblconfig']['suppression']);\n\tif (!empty($custom_list)) {\n\t\t$dnssupp_ex = array_filter( explode(\"\\n\", pfbng_text_area_decode($pfb['dnsblconfig']['suppression'])));\n\t}\n\treturn ($dnssupp_ex);\n}", "public static function reasons()\n {\n return [\n 'VIOLENCE' => static::VIOLENCE,\n 'CHILD_ABUSE' => static::CHILD_ABUSE,\n 'PROMOTES_TERRORISM' => static::PROMOTES_TERRORISM,\n 'COPYRIGHT' => static::COPYRIGHT,\n ];\n }", "public function testWarningsReturnsWarnings(): void\n {\n $value = $this->class->warnings();\n\n $this->assertPropertyEquals('warnings', $value);\n }", "public function get_coupon_notices() {\n\t\t\treturn apply_filters( 'wc_sc_coupon_notices', $this->coupon_notices );\n\t\t}", "function warning() {\n\t\t\n\t\t\tglobal $blog_id; //get the current blog id\n\t\t\t\n\t\t\tif ( ( is_multisite() && ( $blog_id != 1 || ! current_user_can( 'manage_network_options' ) ) ) || ! current_user_can( 'activate_plugins' ) ) { //only display to network admin if in multisite\n\t\t\t\treturn;\n\t\t\t}\n\t\t\n\t\t\t//if there is a warning to display\n\t\t\tif ( get_option( 'bwps_intrusion_warning' ) == 1 ) {\n\t\t\t\n\t\t\t\tif ( ! function_exists( 'bit51_filecheck_warning' ) ) {\n\t\t\t\n\t\t\t\t\tfunction bit51_filecheck_warning(){\n\t\t\t\t\n\t\t\t\t\t\tglobal $plugname;\n\t\t\t\t\t\tglobal $plughook;\n\t\t\t\t\t\tglobal $plugopts;\n\t\t\t\t\t\t$adminurl = is_multisite() ? admin_url() . 'network/' : admin_url();\n\t\t\t\t\t\n\t\t\t\t\t echo '<div class=\"error\">\n\t\t\t\t <p>' . __( 'Better WP Security has noticed a change to some files in your WordPress installation. Please review the logs to make sure your system has not been compromised.', $plughook ) . '</p> <p><input type=\"button\" class=\"button \" value=\"' . __( 'View Logs', $plughook ) . '\" onclick=\"document.location.href=\\'?bit51_view_logs=yes&_wpnonce=' . wp_create_nonce('bit51-nag') . '\\';\"> <input type=\"button\" class=\"button \" value=\"' . __('Dismiss Warning', $plughook) . '\" onclick=\"document.location.href=\\'' . $adminurl . 'admin.php?bit51_dismiss_warning=yes&_wpnonce=' . wp_create_nonce( 'bit51-nag' ) . '\\';\"></p>\n\t\t\t\t\t </div>';\n\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//put the warning in the right spot\n\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\tadd_action( 'network_admin_notices', 'bit51_filecheck_warning' ); //register notification\n\t\t\t\t} else {\n\t\t\t\t\tadd_action( 'admin_notices', 'bit51_filecheck_warning' ); //register notification\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//if they've clicked a button hide the notice\n\t\t\tif ( ( isset( $_GET['bit51_view_logs'] ) || isset( $_GET['bit51_dismiss_warning'] ) ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'bit51-nag' ) ) {\n\t\t\t\t\n\t\t\t\t//Get the options\n\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\t\n\t\t\t\t\tswitch_to_blog( 1 );\n\t\t\t\t\t\t\n\t\t\t\t\tdelete_option( 'bwps_intrusion_warning' );\n\t\t\t\t\t\t\n\t\t\t\t\trestore_current_blog();\n\t\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\tdelete_option( 'bwps_intrusion_warning' );\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//take them back to where they started\n\t\t\t\tif ( isset( $_GET['bit51_dismiss_warning'] ) ) {\t\t\t\t\n\t\t\t\t\twp_redirect( $_SERVER['HTTP_REFERER'], 302 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//take them to the correct logs page\n\t\t\t\tif ( isset( $_GET['bit51_view_logs'] ) ) {\n\t\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\twp_redirect( admin_url() . 'network/admin.php?page=better-wp-security-logs#file-change', 302 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twp_redirect( admin_url() . 'admin.php?page=better-wp-security-logs#file-change', 302 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}", "public function getCurrentWarning()\n {\n return $this->getCurrent(self::NAMESPACE_WARNING);\n }", "public function hasWarnings() {}", "abstract public function GetProblems();", "public static function warning()\n {\n static::returnCode(static::CODE_WARNING);\n }", "public function getNonComplianceReason()\n {\n return $this->non_compliance_reason;\n }", "public function get_unseen() {\n $this->authenticate();\n $result = $this->discussion->get_unseen_discussions();\n if (!is_null($result)) {\n exit(json_encode([\n 'flg' => TRUE,\n 'msg' => $result\n ]));\n } else {\n exit(json_encode([\n 'flg' => FALSE\n ]));\n }\n }", "function om_warnings_display_warning(&$forum_page, $cur_warning)\n{\n\tglobal $forum_url, $lang_om_warnings;\n\n\t\t// Prepare warning data\n\t\t$forum_page['warning_info'] = array();\n\t\t$forum_page['warning_info']['warn_name'] = '<span>'.sprintf($lang_om_warnings['Warning name'], forum_htmlencode($cur_warning['warn_name'])).'</span>';\n\t\t$forum_page['warning_info']['points'] = '<span>'.sprintf($lang_om_warnings['Warning points'], $cur_warning['points']).'</span>';\n\t\t$forum_page['warning_info']['reporter'] = '<span>'.sprintf($lang_om_warnings['Reported by'], (($cur_warning['reporter'] != '') ? '<a href=\"'.forum_link($forum_url['user'], $cur_warning['reporter_id']).'\">'.forum_htmlencode($cur_warning['reporter']).'</a>' : $lang_om_warnings['Deleted reporter'])).'</span>';\n\t\t$forum_page['warning_info']['created'] = '<span>'.sprintf($lang_om_warnings['Created'], format_time($cur_warning['created'])).'</span>';\n\t\t$forum_page['warning_info']['expire'] = '<span>'.sprintf($lang_om_warnings['Expire'], isset($cur_warning['expire_date']) ? format_time($cur_warning['expire_date']) : $lang_om_warnings['Never']).'</span>';\n\n\t\t$user = ($cur_warning['username'] != '') ? '<a href=\"'.forum_link($forum_url['user'], $cur_warning['user_id']).'\">'.forum_htmlencode($cur_warning['username']).'</a>' : $lang_om_warnings['Deleted reporter'];\n\t\t$forum = ($cur_warning['forum_name'] != '') ? '<a href=\"'.forum_link($forum_url['forum'], array($cur_warning['forum_id'], sef_friendly($cur_warning['forum_name']))).'\">'.forum_htmlencode($cur_warning['forum_name']).'</a>' : $lang_om_warnings['Deleted forum'];\n\t\t$topic = ($cur_warning['subject'] != '') ? '<a href=\"'.forum_link($forum_url['topic'], array($cur_warning['topic_id'], sef_friendly($cur_warning['subject']))).'\">'.forum_htmlencode($cur_warning['subject']).'</a>' : $lang_om_warnings['Deleted topic'];\n\t\t$post = ($cur_warning['pid'] != '') ? '<a href=\"'.forum_link($forum_url['post'], $cur_warning['pid']).'\">'.sprintf($lang_om_warnings['Post'], $cur_warning['pid']).'</a>' : $lang_om_warnings['Deleted post'];\n\t\t$message = str_replace(\"\\n\", '</p><p>', forum_htmlencode($cur_warning['message']));\n\t\t$is_expired = ($cur_warning['expire_date'] != null && $cur_warning['expire_date'] < $forum_page['now']);\n\n\t\t$post_path = sprintf('%s &rarr; %s &rarr; %s', $forum, $topic, $post);\n\t\tif ($cur_warning['forum_name'] == null && $cur_warning['topic_id'] == null && $cur_warning['pid'] == null) {\n\t\t\t$post_path = $lang_om_warnings['No post'];\n\t\t}\n\n\t\t// Setup output\n\t\t($hook = get_hook('om_warnings_fn_display_warning_pre_display')) ? eval($hook) : null;\n?>\n\t\t<div class=\"ct-set <?php echo $is_expired ? 'data-set' : 'warn-set' ?> report set<?php echo ++$forum_page['item_count'] ?>\">\n\t\t\t<div class=\"ct-box <?php echo $is_expired ? 'data-box' : 'warn-box' ?>\">\n\t\t\t\t<h3 class=\"ct-legend hn\"><strong><?php echo ++$forum_page['item_num'] ?></strong> <cite class=\"username\"><?php printf($lang_om_warnings['User'], $user) ?></cite>\n\t\t\t\t\t<?php echo implode(\"\\n\\t\\t\\t\\t\\t\", $forum_page['warning_info']).\"\\n\" ?>\n\t\t\t\t</h3>\n\t\t\t\t<h4 class=\"hn\"><?php echo $post_path ?></h4>\n\t\t\t\t<p><?php echo $message ?></p>\n<?php if ($forum_page['om_warnings_admin']) { ?>\n\t\t\t\t<p class=\"item-select\"><input type=\"checkbox\" id=\"fld<?php echo ++$forum_page['fld_count'] ?>\" name=\"warn[<?php echo $cur_warning['id'] ?>]\" value=\"<?php echo $cur_warning['id'] ?>\" /> <label for=\"fld<?php echo $forum_page['fld_count'] ?>\"><?php echo $lang_om_warnings['Select report'] ?></label></p>\n<?php } ?>\n<?php ($hook = get_hook('om_warnings_list_warning_block')) ? eval($hook) : null; ?>\n\t\t\t</div>\n\t\t</div>\n<?php\n}", "public function getViolations(): array\n {\n return $this->violations;\n }", "public function getViolations()\n {\n return $this->violations;\n }", "public function getViolations()\n {\n return $this->violations;\n }", "public function getWarnDisconnectDelay()\n {\n $result = $this->client->GetWarnDisconnectDelay();\n if ($this->errorHandling($result, 'Could not ... from/to FRITZ!Box')) {\n return;\n }\n\n return $result;\n }", "public function messages()\n {\n $illegalFields = [ 'email', 'type', 'status', 'branches', ];\n $messages = [];\n\n foreach ($illegalFields as $key => $attribute) {\n $messages[\"{$attribute}.not_present\"] = __('The field :attribute must not be present.');\n }\n\n return $messages;\n }", "public function displayWarningMessages_postProcess(array &$warnings) {\n $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['hwt_resubmission']);\n $openResubmissions = tx_hwtresubmission_sv1::getOpenResubmissions($GLOBALS[$BE_USER]->user['uid'], $extConf['resubmissionTime']);\n\n if($openResubmissions) {\n $warnings['hwtresubmission'] = '[EXT: hwt_resubmission] Open Resubmissions:<br />';\n foreach($openResubmissions as $value) {\n $warnings['hwtresubmission'] .= '- tt_content[' . $value['uid'] . '] ' . $value['header'] . '<br />';\n }\n $warnings['hwtresubmission'] .= '<a href=\"javascript:top.goToModule(\\'web_list\\',1)\">zum List-Modul</a>';\n }\n\t}", "public function getViolations(): array\n {\n $messages = [];\n foreach ($this->violations as $violation) {\n $param = preg_replace('/[^0-9a-zA-Z_\\-\\s]/', '', $violation->getPropertyPath());\n $messages[] = [$param => $violation->getMessage()];\n }\n\n return $messages;\n }", "public function list_getUserWarningCount()\n\t{\n\t\treturn list_getUserWarningCount($this->_memID);\n\t}", "public function get_error_messages();", "public function getNewsNotCheck()\n {\n $news = $this->_model->where('news_is_check', '=', '0')->get();\n\n return $news;\n }", "public function importXcapWarning()\n {\n $screen = get_current_screen();\n $filter = (isset($_GET['filter_action'])) ? $_GET['filter_action'] : false;\n\n $optionsChecked = (get_field('import_warning', 'option') == true && get_field('xcap_daily_cron', 'option') == true) ? true : false;\n if ($screen->post_type != 'event' || $optionsChecked != true || $filter || ! current_user_can('administrator')) {\n return;\n }\n\n $latestPost = get_posts(\"post_type=event&numberposts=1&meta_key=import_client&meta_value=xcap&post_status=any\");\n if (empty($latestPost[0]) || strtotime($latestPost[0]->post_date) > strtotime('-1 week')) {\n return;\n }\n\n echo '<div class=\"notice notice-warning is-dismissible\"><p>';\n _e('XCAP have not imported any events for atleast 7 days. Please control the importer.', 'event-manager');\n echo '</p></div>';\n }", "public function getMisses(): array\n {\n return $this->misses;\n }", "public function iN_CalculateAllUnReadReportedComments() {\n\t\t$query = mysqli_query($this->db, \"SELECT COUNT(*) AS psts FROM i_comment_reports WHERE report_status = '0' \") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn isset($row['psts']) ? $row['psts'] : '0';\n\t}", "private function get404s() {\n $data = array();\n $row = 0;\n\n if (\\Drupal::moduleHandler()->moduleExists('dblog')) {\n $result = db_select('watchdog', 'w')\n ->fields('w', array('message', 'hostname', 'referer', 'timestamp'))\n ->condition('w.type', 'page not found', '=')\n ->condition('w.timestamp', REQUEST_TIME - 3600, '>')\n ->condition('w.message', array(\n \"UPGRADE.txt\",\n \"MAINTAINERS.txt\",\n \"README.txt\",\n \"INSTALL.pgsql.txt\",\n \"INSTALL.txt\",\n \"LICENSE.txt\",\n \"INSTALL.mysql.txt\",\n \"COPYRIGHT.txt\",\n \"CHANGELOG.txt\",\n ), 'NOT IN')\n ->orderBy('w.timestamp', 'DESC')\n ->range(0, 10)\n ->execute();\n\n foreach ($result as $record) {\n $data[$row]['message'] = $record->message;\n $data[$row]['hostname'] = $record->hostname;\n $data[$row]['referer'] = $record->referer;\n $data[$row]['timestamp'] = $record->timestamp;\n $row++;\n }\n }\n\n return $data;\n }", "public function get_notices(){\r\n\t $inner = '';\r\n\t\tif(empty($_SESSION['wpforo_notices'])) return $inner;\r\n\r\n foreach($_SESSION['wpforo_notices'] as $type => $notice){\r\n $notice = (array) $notice;\r\n foreach ($notice as $msg){\r\n if( !is_array($msg) ){\r\n $msg = trim($msg);\r\n if($msg) $inner .= sprintf('<p class=\"%s\">%s</p>', sanitize_html_class($type), $msg);\r\n }\r\n }\r\n }\r\n\t\t\r\n\t\t$this->clear();\r\n\t\treturn $inner;\r\n\t}", "protected static function processNCIPResponse()\n {\n $xmlElem = new QuiteSimpleXMLElement(self::getResponse());\n $xmlElem->registerXPathNamespace(self::XML_PREFIX, self::XML_NAMESPACE);\n\n if ($xmlElem->has(self::XML_PREFIX . ':' . self::XML_RESPONSE_NODE . '/co:Problem')) {\n $problemType = $xmlElem->text(self::XML_PREFIX . ':' . self::XML_RESPONSE_NODE . '/co:Problem/co:ProblemType');\n $problemDetail = $xmlElem->text(self::XML_PREFIX . ':' . self::XML_RESPONSE_NODE . '/co:Problem/co:ProblemDetail');\n\n // Log the problem.\n APILogger::addDebug('NCIP Error Message: ' . $problemDetail);\n\n $errorResponse = new CheckoutItemErrorResponse(self::getResponse());\n\n if (array_key_exists($problemType, self::$problemResponses)) {\n $errorResponse->setStatusCode(self::$problemResponses[$problemType]);\n }\n $errorResponse->setProblem($problemDetail);\n\n self::setNcipResponse($errorResponse);\n } else {\n self::setNcipResponse(new CheckoutItemResponse(self::getResponse()));\n }\n }", "function hookNotices() {\r\n if (is_array(self::$errors))\r\n foreach (self::$errors as $error) {\r\n\r\n switch ($error['type']) {\r\n case 'fatal':\r\n self::showError(ucfirst(_CL_PLUGIN_NAME_ . \" \" . $error['type']) . ': ' . $error['text'], $error['id']);\r\n die();\r\n break;\r\n case 'settings':\r\n if (CL_Classes_Tools::getOption('ignore_warn') == 1)\r\n break;\r\n\r\n /* switch off option for notifications */\r\n self::$switch_off = \"<a href=\\\"javascript:void(0);\\\" onclick=\\\"jQuery.post( ajaxurl, {action: 'cl_warnings_off', nonce: '\" . wp_create_nonce('cl_none') . \"'}, function(data) { if (data) { jQuery('#cl_ignore_warn').attr('checked', true); jQuery('.cl_message').hide(); jQuery('#toplevel_page_cl .awaiting-mod').fadeOut('slow'); } });\\\" >\" . __(\"Turn off warnings!\", _CL_PLUGIN_NAME_) . \"</a>\";\r\n self::showError(ucfirst(_CL_PLUGIN_NAME_) . \" \" . __('Notice: ', _CL_PLUGIN_NAME_) . $error['text'] . \" \" . self::$switch_off, $error['id']);\r\n break;\r\n default:\r\n\r\n self::showError(ucfirst(_CL_PLUGIN_NAME_) . \" \" . __('Note: ', _CL_PLUGIN_NAME_) . $error['text'], $error['id']);\r\n }\r\n }\r\n self::$errors = array();\r\n }", "public function getProblems(): array;", "public function showWarning()\n {\n if ($this->warning === null) {\n $this->convertAdditionalInformation();\n }\n return $this->warning;\n }", "public static function createShipmentsValidationWarning(): array\n {\n $wsdl = __DIR__ . '/../../_files/bcs-3.3.2/geschaeftskundenversand-api-3.3.2.wsdl';\n $response = __DIR__ . '/../../_files/createshipment/multiShipmentValidationWarning.xml';\n\n $authStorage = AuthenticationStorageProvider::authSuccess();\n\n $labelRequest = ShipmentRequestProvider::createMultiShipmentPartialSuccess();\n $labelResponse = \\file_get_contents($response);\n\n return [\n 'multi label partial success' => [$wsdl, $authStorage, $labelRequest, $labelResponse],\n ];\n }", "public function violations(): array;", "function plugin_statssummary_bad_behavior2 ()\n{\n global $LANG_BAD_BEHAVIOR;\n\n if (SEC_inGroup ('Bad Behavior2 Admin') && function_exists('bb2_insert_head')) {\n $blocked_ips = BB_countBlockedIPs ();\n\n return array ($LANG_BAD_BEHAVIOR['blocked_ips'],\n COM_numberFormat ($blocked_ips));\n } else {\n return false;\n }\n}", "public static function warningHandler()\n {\n }", "function parseFeedbackDEPRECATED(&$stat,$aggregate=FALSE,$skip=FALSE){\n //`var_name`\n //`var_value`\n //`details`\n \n $stat->deprecated = TRUE;\n $stat->splain = null;\n switch ($stat->var_name){\n //Single string stats\n //These can just be reported. When aggregated, they need to be\n //concatenated carefully\n case 'chaplain_weapon': //Spaces\n case 'emergency_shuttle':\n case 'end_error': //Spaces\n case 'end_proper': //Spaces\n case 'game_mode': //Spaces\n case 'map_name':\n case 'megafauna_kills': //Spaces\n case 'religion_book': //Spaces\n case 'religion_deity': //Spaces\n case 'religion_name': //Spaces\n case 'revision':\n case 'round_end_result':\n case 'shuttle_fasttravel':\n case 'shuttle_manipulator':\n case 'shuttle_purchase':\n case 'station_renames':\n case 'shuttle_reason':\n if($aggregate){\n $stat->details = explode('#-#',$stat->details);\n $stat->details = array_count_values($stat->details);\n arsort($stat->details);\n }\n if(is_array($stat->details)) $stat->var_value = array_sum($stat->details);\n $stat->include = 'singleString';\n break;\n //Long string stats\n //Need to be exploded and grouped. This does NOT handle | value appended\n //stats\n case 'admin_secrets_fun_used':\n case 'admin_verb':\n case 'assembly_made':\n case 'cell_used':\n case 'changeling_powers':\n case 'changeling_power_purchase':\n case 'changeling_success':\n case 'circuit_printed':\n case 'clockcult_scripture_recited':\n case 'colonies_dropped':\n case 'cult_runes_scribed':\n case 'engine_started':\n case 'event_ran':\n case 'event_admin_cancelled':\n case 'food_made':\n case 'gun_fired':\n case 'handcuffs':\n case 'hivelord_core':\n case 'immortality_talisman':\n case 'item_deconstructed':\n case 'item_used_for_combat':\n case 'jaunter':\n case 'lazarus_injector':\n case 'mining_equipment_bought':\n case 'mining_voucher_redeemed':\n case 'mobs_killed_mining':\n case 'object_crafted':\n case 'pick_used_mining':\n case 'shuttle_gib':\n case 'shuttle_gib_unintelligent':\n case 'slime_babies_born':\n case 'slime_cores_used':\n case 'slime_core_harvested':\n case 'surgeries_completed':\n case 'traitor_success':\n case 'traitor_uplink_items_bought':\n case 'traitor_random_uplink_items_gott':\n case 'vending_machine_usage':\n case 'warp_cube':\n case 'wisp_lantern':\n case 'wizard_spell_learned':\n case 'wizard_success':\n case 'zone_targeted':\n if(!$skip){\n if($aggregate){\n $stat->details = str_replace('#-#', ' ', $stat->details);\n }\n $stat->details = str_replace(',', '', $stat->details);\n $stat->details = array_count_values(explode(' ',$stat->details));\n }\n $stat->var_value = array_sum($stat->details);\n arsort($stat->details);\n $stat->include = 'singleString';\n switch($stat->var_name){\n case 'item_used_for_combat':\n $stat->splain = \"Showing item name and damage after the | character.\";\n break;\n case 'traitor_uplink_items_bought':\n $stat->splain = \"Item cost after the | character\";\n break;\n case 'vending_machine_usage':\n $stat->splain = \"Machine used | item vended\";\n }\n break;\n //Long string stats with values\n //Strings that have a value piped (|) onto the end of the string.\n //We need to group and add these values\n case 'admin_toggle':\n case 'cargo_imports':\n case 'chemical_reaction':\n case 'export_sold_amount':\n case 'export_sold_cost':\n case 'food_harvested':\n case 'item_printed':\n case 'ore_mined':\n case 'preferences_verb':\n case 'wizard_spell_improved':\n if(!$skip){\n if($aggregate){\n $stat->details = str_replace('#-#', ' ', $stat->details);\n }\n $stat->details = array_count_values(explode(' ',$stat->details));\n $tmp = array();\n foreach ($stat->details as $k => $v){\n $a = explode('|',$k);\n $k = $a[0];\n @$a = $a[1];\n if(isset($tmp[$k])) {\n @$tmp[$k] += $v * $a;\n } else {\n @$tmp[$k] = $v * $a;\n }\n }\n $stat->details = $tmp;\n }\n $stat->var_value = array_sum($stat->details);\n arsort($stat->details);\n $stat->include = 'singleString';\n break;\n //Edge cases\n //Stats that have to be specially handled\n //Job bans\n case 'ban_job':\n case 'ban_job_tmp':\n case 'ban_job_unban':\n if($aggregate){\n $stat->details = str_replace('#-#', ' ', $stat->details);\n }\n $stat->details = trim(rtrim($stat->details));\n $stat->details = str_replace(' ', '', $stat->details);\n $stat->details = str_replace('-_', '##', $stat->details);\n $stat->details = str_replace('_', ' ', $stat->details);\n $stat->details = explode('##', $stat->details);\n array_filter($stat->details);\n $stat->details = array_count_values($stat->details);\n $stat->var_value = array_sum($stat->details);\n $stat->include = 'singleString';\n break;\n //Job preferences\n case 'job_preferences':\n if($aggregate){\n $stat->details = str_replace('#-#', '', $stat->details);\n // $stat->details = str_replace('', '', $stat->details);\n }\n if (!$skip){\n $stat->details = explode('|- ',$stat->details);\n $stat->details = array_filter($stat->details);\n $tmp = array();\n foreach ($stat->details as $s){\n $s = str_replace(' |', '', $s);\n $s = explode('|',$s);\n $s = array_filter($s);\n $job = str_replace('_',' ', $s[1]);\n unset($s[1]);\n foreach ($s as &$j){\n $j = explode('=',$j);\n }\n @$tmp[$job]['HIGH'] += (int) $s[2][1];\n @$tmp[$job]['MEDIUM'] += (int) $s[3][1];\n @$tmp[$job]['LOW'] += (int) $s[4][1];\n @$tmp[$job]['NEVER'] += (int) $s[5][1];\n @$tmp[$job]['BANNED'] += (int) $s[6][1];\n @$tmp[$job]['YOUNG'] += (int) $s[7][1];\n }\n $stat->details = $tmp;\n }\n $stat->include = 'jobPrefs';\n break;\n //Radio usage\n case 'radio_usage':\n if($aggregate){\n $stat->details = str_replace('#-#', ' ', $stat->details);\n }\n if (!$skip){\n $stat->details = explode(' ',$stat->details);\n $tmp = array();\n foreach ($stat->details as $s){\n $s = explode('-',$s);\n if($aggregate){\n @$tmp[$s[0]]+= (int) $s[1];\n } else {\n @$tmp[$s[0]] = (int) $s[1];\n }\n }\n $stat->details = $tmp;\n }\n arsort($stat->details);\n $stat->var_value = array_sum($stat->details);\n $stat->include = 'singleString';\n break;\n case 'changeling_objective':\n case 'traitor_objective':\n case 'wizard_objective':\n case 'cult_objective':\n if($aggregate){\n $stat->details = str_replace('#-#', ' ', $stat->details);\n }\n if(!is_array($stat->details)){\n $stat->details = array_count_values(explode(' ',$stat->details));\n $objs = array();\n foreach ($stat->details as $obj => $count){\n $obj = explode('|',$obj);\n $objective = str_replace('/datum/objective/', '',$obj[0]);\n $status = str_replace(',', '', $obj[1]);\n if (array_key_exists($objective, $objs)){\n @$objs[$objective][$status]+= $count;\n } else {\n @$objs[$objective][$status]+= $count;\n }\n }\n $stat->details = $objs;\n }\n $stat->splain = \"/datum/objective are custom objectives\";\n $stat->include = 'objs';\n break;\n case 'round_end':\n case 'round_start':\n if($aggregate){\n $stat->details = explode('#-#',$stat->details);\n $stat->details = array_count_values($stat->details);\n }\n if(!$skip){\n $stat->details = date('H',strtotime($stat->details));\n }\n $stat->include = 'bigNum';\n break;\n case 'server_ip':\n if($aggregate){\n $stat->details = explode('#-#',$stat->details);\n $stat->details = array_count_values($stat->details);\n arsort($stat->details);\n }\n if(is_array($stat->details)) $stat->var_value = array_sum($stat->details);\n $stat->include = 'singleString';\n break;\n case 'testmerged_prs':\n if($aggregate){\n $stat->details = str_replace('#-#',' ',$stat->details);\n }\n if(!$skip){\n $stat->details = explode(' ',$stat->details);\n $stat->details = array_count_values($stat->details);\n }\n if(is_array($stat->details)){\n $stat->var_value = array_sum($stat->details);\n arsort($stat->details);\n }\n $stat->include = 'PRs';\n break;\n\n case 'commendation':\n if($aggregate){\n $stat->details = str_replace('#-#',',',$stat->details);\n }\n if(!$skip){\n $stat->details = str_replace(\"_\", \" \", $stat->details);\n $stat->details = str_replace(\"} {\", \"},{\", $stat->details);\n $stat->details = json_decode(\"[$stat->details]\");\n }\n foreach ($stat->details as &$d){\n $d = (object) $d;\n switch ($d->medal){\n default: \n $d->graphic = 'bronze';\n break;\n case 'The robust security award': \n $d->graphic = 'silver';\n break;\n case 'The medal of valor': \n $d->graphic = 'gold';\n break;\n case 'The nobel sciences award': \n $d->graphic = 'plasma';\n break;\n }\n $d->id = substr(sha1(json_encode($d)), 0, 7);\n }\n $stat->include = \"commendation\";\n // var_dump($stat);\n break;\n //Value stats\n //Where the value just needs to be displayed\n //Or summed when aggregating\n case 'admin_cookies_spawned':\n case 'ahelp_close':\n case 'ahelp_icissue':\n case 'ahelp_reject':\n case 'ahelp_reopen':\n case 'ahelp_resolve':\n case 'ahelp_unresolved':\n case 'alert_comms_blue':\n case 'alert_comms_green':\n case 'alert_keycard_auth_maint':\n case 'alert_keycard_auth_red':\n case 'arcade_loss_hp_emagged':\n case 'arcade_loss_hp_normal':\n case 'arcade_loss_mana_emagged':\n case 'arcade_loss_mana_normal':\n case 'arcade_win_emagged':\n case 'arcade_win_normal':\n case 'ban_appearance':\n case 'ban_appearance_unban':\n case 'ban_edit':\n case 'ban_perma':\n case 'ban_tmp':\n case 'ban_tmp_mins':\n case 'ban_unban':\n case 'ban_warn':\n case 'benchmark':\n case 'comment':\n case 'cyborg_ais_created':\n case 'cyborg_birth':\n case 'cyborg_engineering':\n case 'cyborg_frames_built':\n case 'cyborg_janitor':\n case 'cyborg_medical':\n case 'cyborg_miner':\n case 'cyborg_mmis_filled':\n case 'cyborg_peacekeeper':\n case 'cyborg_security':\n case 'cyborg_service':\n case 'cyborg_standard':\n case 'disposal_auto_flush':\n case 'Engi_equipment_bought':\n case 'escaped_human':\n case 'escaped_on_pod_1':\n case 'escaped_on_pod_2':\n case 'escaped_on_pod_3':\n case 'escaped_on_pod_5':\n case 'escaped_on_shuttle':\n case 'escaped_total':\n case 'god_objective':\n case 'god_success':\n case 'high_research_level':\n case 'mecha_durand_created':\n case 'mecha_firefighter_created':\n case 'mecha_gygax_created':\n case 'mecha_honker_created':\n case 'mecha_odysseus_created':\n case 'mecha_phazon_created':\n case 'mecha_ripley_created':\n case 'mining_adamantine_produced':\n case 'mining_clown_produced':\n case 'mining_diamond_produced':\n case 'mining_glass_produced':\n case 'mining_gold_produced':\n case 'mining_iron_produced':\n case 'mining_plasma_produced':\n case 'mining_rglass_produced':\n case 'mining_silver_produced':\n case 'mining_steel_produced':\n case 'mining_uranium_produced':\n case 'newscaster_channels':\n case 'newscaster_newspapers_printed':\n case 'newscaster_stories':\n case 'nuclear_challenge_mode':\n case 'round_end_clients':\n case 'round_end_ghosts':\n case 'supply_mech_collection_redeemed':\n case 'surgery_initiated':\n case 'surgery_step_failed':\n case 'surgery_step_success':\n case 'survived_human':\n case 'survived_total':\n $stat->var_value = (int) $stat->var_value;\n $stat->include = 'bigNum';\n break;\n default:\n echo alert(\"<strong>ERROR 501:</strong> $stat->var_name is untracked. Tell Ned. TELL NED!!\",'danger');\n break;\n }\n if('' === $stat->details) $stat->details = null;\n if (!is_array($stat->details) && !$stat->var_value){\n $stat->include = 'bigText';\n }\n return $stat;\n }", "public function get_clear_error_msgs()\n {\n $msgs = array();\n foreach ($this->errors as $e) {\n $msgs[$e['field']][$e['rule']] = $this->get_validation_error_msg($e['field'], $e['rule'], $e['value']);\n\n }\n return $msgs;\n }", "private function _issue_warning_pm()\n\t{\n\t\tglobal $context;\n\n\t\t$id_notice = 0;\n\t\tif (!empty($this->_req->post->warn_notify) && empty($this->_issueErrors))\n\t\t{\n\t\t\t$warn_sub = $this->_req->getPost('warn_sub', 'trim', '');\n\t\t\t$warn_body = $this->_req->getPost('warn_body', 'trim', '');\n\n\t\t\tif (empty($warn_sub) || empty($warn_body))\n\t\t\t{\n\t\t\t\t$this->_issueErrors[] = 'warning_notify_blank';\n\t\t\t}\n\t\t\t// Send the PM?\n\t\t\telse\n\t\t\t{\n\t\t\t\trequire_once(SUBSDIR . '/PersonalMessage.subs.php');\n\t\t\t\t$from = array(\n\t\t\t\t\t'id' => 0,\n\t\t\t\t\t'name' => $context['forum_name'],\n\t\t\t\t\t'username' => $context['forum_name'],\n\t\t\t\t);\n\t\t\t\tsendpm(array('to' => array($this->_memID), 'bcc' => array()), $warn_sub, $warn_body, false, $from);\n\n\t\t\t\t// Log the notice.\n\t\t\t\t$id_notice = logWarningNotice($warn_sub, $warn_body);\n\t\t\t}\n\t\t}\n\n\t\treturn $id_notice;\n\t}", "public static function GenericWarning() :self{\n\t\treturn new Response('Generic Warning', -1, true);\n\t}", "public function dataStatusCodeMessages()\n {\n return array(\n array(100, 'Continue'),\n array(101, 'Switching Protocols'),\n array(200, 'OK'),\n array(201, 'Created'),\n array(202, 'Accepted'),\n array(203, 'Non-Authoritative Information'),\n array(204, 'No Content'),\n array(205, 'Reset Content'),\n array(206, 'Partial Content'),\n array(300, 'Multiple Choices'),\n array(301, 'Moved Permanently'),\n array(302, 'Found'),\n array(303, 'See Other'),\n array(304, 'Not Modified'),\n array(305, 'Use Proxy'),\n array(307, 'Temporary Redirect'),\n array(400, 'Bad Request'),\n array(401, 'Unauthorized'),\n array(402, 'Payment Required'),\n array(403, 'Forbidden'),\n array(404, 'Not Found'),\n array(405, 'Method Not Allowed'),\n array(406, 'Not Acceptable'),\n array(407, 'Proxy Authentication Required'),\n array(408, 'Request Timeout'),\n array(409, 'Conflict'),\n array(410, 'Gone'),\n array(411, 'Length Required'),\n array(412, 'Precondition Failed'),\n array(413, 'Request Entity Too Large'),\n array(414, 'Request-URI Too Long'),\n array(415, 'Unsupported Media Type'),\n array(416, 'Requested Range Not Satisfiable'),\n array(417, 'Expectation Failed'),\n array(500, 'Internal Server Error'),\n array(501, 'Not Implemented'),\n array(502, 'Bad Gateway'),\n array(503, 'Service Unavailable'),\n\n // Edge cases...\n array('foo', null),\n array(null, null),\n array(1, null),\n array(600, null),\n array(460, null),\n array(10, null),\n );\n }", "function admin_critical_warnings_present() {\n global $SESSION;\n\n if (!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {\n return 0;\n }\n\n if (!isset($SESSION->admin_critical_warning)) {\n $SESSION->admin_critical_warning = 0;\n if (ini_get_bool('register_globals')) {\n $SESSION->admin_critical_warning = 1;\n } else if (is_dataroot_insecure(true) === INSECURE_DATAROOT_ERROR) {\n $SESSION->admin_critical_warning = 1;\n }\n }\n\n return $SESSION->admin_critical_warning;\n}", "public function getLPNotAttempted();", "final public static function missingMandatoryData()\n {\n return self::get(2066);\n }", "public function getWarningEmailAddress() {\n return $this->warningEmailAddress;\n }", "public function isWarning() : self\n {\n $this->statusCodeEquals(StatusCodes::WARNING);\n\n return $this;\n }", "public function noWarningsTest( AcceptanceTester $I ) {\n\t\t$I->dontSeeInSource( 'Warning: ' );\n\t}", "function ExtractNotifications () {\n\t\trequire_once('xml-processing/gc_XmlParser.php');\n\t\t$GXmlParser = new gc_XmlParser($this->poll_result[1]);\n\t\t\t$data = $GXmlParser->GetData();\n\t\t\t//Get the actual notifications\n\t\t\tforeach($data['notification-data-response']['notifications'] as $notification) {\n\t\t\t\t$this->notifications[] = $notification;\n\t\t\t}\n\t\t\t//Get other useful info\n\t\t\t$this->has_more_notifications = $data['notification-data-response']['has-more-notifications']['VALUE'];\n\t\t\t$this->continue_token = $data['notification-data-response']['continue-token']['VALUE'];\n\t}" ]
[ "0.64089197", "0.64089197", "0.63970256", "0.63857704", "0.635125", "0.6252213", "0.62373614", "0.61978203", "0.60288775", "0.5987931", "0.5987931", "0.5987931", "0.5987931", "0.5987931", "0.5975825", "0.59542894", "0.59470135", "0.5942864", "0.5853626", "0.58166957", "0.58139116", "0.5811299", "0.5811299", "0.5795414", "0.5754097", "0.57081515", "0.5662102", "0.56391674", "0.56020194", "0.54832655", "0.54778355", "0.5477219", "0.5425941", "0.5390172", "0.53844035", "0.5331422", "0.5294197", "0.52834445", "0.52359444", "0.5221745", "0.5216835", "0.5186977", "0.5184865", "0.5176985", "0.51730114", "0.51537496", "0.51350754", "0.50971955", "0.50429565", "0.50390697", "0.5030869", "0.5014082", "0.49845996", "0.49843255", "0.4964142", "0.4957587", "0.49542907", "0.49239254", "0.49114147", "0.49098018", "0.49023777", "0.48957825", "0.48904634", "0.4879612", "0.4872831", "0.4858156", "0.4854249", "0.48410854", "0.48410854", "0.48397183", "0.48373038", "0.48348206", "0.48308292", "0.48235556", "0.48169065", "0.48138273", "0.48101708", "0.47930488", "0.4774584", "0.4769387", "0.47672328", "0.47606632", "0.4760171", "0.47556126", "0.47547653", "0.47537747", "0.4733714", "0.47293165", "0.47253466", "0.47225156", "0.4712077", "0.47112966", "0.47109956", "0.4702932", "0.4683481", "0.4675501", "0.46752006", "0.46751893", "0.4672494", "0.4669339", "0.46654132" ]
0.0
-1
Runs all the fancy actions and filters to create our meta box.
public static function init() { add_action( 'add_meta_boxes', array( __CLASS__, 'createMetaBox' ) ); add_actioN( 'save_post', array( __CLASS__, 'saveMetaData' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildCustomPostWidgets()\n {\n // add_meta_box( $id, $title, $callback, $screen, $context, $priority, $callback_args );\n add_meta_box( 'cover_image_meta_box', 'Add an Image', array($this,'selectImageMetaBox'), 'playscripts', 'normal', 'high' );\n add_meta_box( 'cover_sound_meta_box', 'Add a Sound', array($this,'selectSoundMetaBox'), 'playscripts', 'normal', 'high' );\n }", "public function meta_box_setup()\n {\n add_meta_box($this->token . '-data', __('Chiro Quiz Details', $this->token), [\n $this,\n 'meta_box_content'\n ], $this->token, 'normal', 'high');\n\n do_action($this->token . '_meta_boxes');\n }", "private function initMetaBox(){\n\t\t$path = get_template_directory() . '/sub/customfield/';\n\t\tif(function_exists('of_get_option')){\n\t\t\tif(of_get_option('is-seo',true)){\n\t\t\t\tnew WPO_MetaBox(array(\n\t\t\t\t 'id' => 'wpo_seo',\n\t\t\t\t 'title' => $this->l('SEO Fields'),\n\t\t\t\t 'types' => array('page','portfolio','post','video'),\n\t\t\t\t 'priority' => 'high',\n\t\t\t\t 'template' => $path . 'seo.php',\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_template',\n\t\t 'title' => $this->l('Advanced Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page-advanced.php'\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_pageconfig',\n\t\t 'title' => $this->l('Page Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page.php',\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_post',\n\t\t 'title' => $this->l('Embed Options'),\n\t\t 'types' => array('post','video'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'post.php',\n\t\t));\n\t}", "function bluewhale_meta_box_setup() {\n add_action('add_meta_boxes', 'bluewhale_meta_box');\n\n /* Adds Save meta box function to 'save post meta' hook */\n add_action('save_post', 'bluewhale_save_meta', 10, 2);\n}", "function AP_Meta_Box_Setup() {\n\tadd_action('add_meta_boxes','AP_Meta_Box_Add');\n\n\tadd_action( 'save_post', 'AP_Meta_Box_Save', 10, 2 );\n}", "function tower_register_meta_boxes() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n $meta = $custom_type['meta'];\n add_meta_box(\n $meta['handle'],\n $meta['title'],\n $meta['callback'],\n $key\n );\n }\n}", "public function add_meta_boxes() {\n\t\t// init tooltips here since at this time the meta-box pre-registration is done,\n\t\t// we already know the current screen and the 'condition()' has been checked\n\t\t$this->init_tooltips();\n\n\t\t// Avoid appearance own meta fields on the standard Custom Fields metabox.\n\t\tadd_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 2 );\n\t}", "public function registerMetaBoxes()\n\t {\n\t \t$dataMetas = self::getDataMetas();\n\n\t \tif ( !empty($dataMetas) ) {\n\t \t\tforeach ($dataMetas as $key => $meta) {\n\t \t\t\t/* CHECK IF HAS PAGES */\n\t \t\t\tif ( isset($meta[\"_pages\"]) && !empty($meta[\"_pages\"][0]) ) {\n\t \t\t\t\tself::createMetasPages($meta);\n\t \t\t\t}\n\n\t \t\t\t/* POSTS TYPES REGISTER METAS */\n\t \t\t\tif ( isset($meta[\"_posts_types\"]) && !empty($meta[\"_posts_types\"][0]) ) {\n\t \t\t\t\tself::createMetasPostTypes($meta);\n\t \t\t\t}\n\n\t \t\t\t/* CHECK IF ALL POSTS IS true */\n\t \t\t\tif ( isset($meta[\"_all_posts\"]) && $meta['_all_posts'] == 'yes' ) {\n\t \t\t\t\tself::createMetasPosts($meta);\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\n\t }", "function wck_settings_page_add_meta_boxes() {\r\n global $post;\r\n\t\tdo_action( 'add_meta_boxes', $this->hookname, $post );\r\n\t}", "function load_meta_box(){\n\t\tadd_action('add_meta_boxes', array($this, 'meta_box_hook'));\n\t}", "function agnosia_post_meta_boxes_setup() {\r\n\r\n\t\t/* Add meta boxes on the 'add_meta_boxes' hook. */\r\n\t\tadd_action( 'add_meta_boxes', 'agnosia_add_post_meta_boxes' );\r\n\r\n\t\t/* Save post meta on the 'save_post' hook. */\r\n\t\tadd_action( 'save_post', 'agnosia_save_post_meta', 10 , 2 );\r\n\r\n\t}", "function toolbox_portfolio_meta_boxes_setup() {\n /* Add meta boxes on the 'add_meta_boxes' hook. */\n add_action( 'add_meta_boxes', 'toolbox_add_portfolio_meta_box' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'toolbox_portfolio_save_info', 10, 2 );\n}", "function meta_box( $object, $box ) {\n\t\t\n\t\t\t$meta_box_options = self::meta_box_args( $object->post_type );\n\t\t\n\t\t\tforeach ( $meta_box_options as $option ) {\n if ( method_exists( 'YouTube_White_Label_Shortcode', \"meta_box_{$option['type']}\" ) )\n call_user_func( array( $this, \"meta_box_{$option['type']}\" ), $option, get_post_meta( $object->ID, $option['name'], true ) );\n } ?>\n\t\t\t\n\t\t\t<p class=\"youtube-advanced-wrap\" style=\"text-align:right\"><a class=\"youtube-advanced\" href=\"#\"><?php _e( 'Advanced options', self::DOMAIN ); ?></a></p>\n \n <div id=\"youtube-advanced\" class=\"hide-if-js\"></div>\n \n <p class=\"output\">\n\t\t\t\t<label for=\"_YouTube_output\"><?php _e( 'Output:', self::DOMAIN ); ?></label>\n\t\t\t\t<br />\n\t\t\t\t<span id=\"_YouTube_output\" class=\"postbox\" style=\"box-sizing: border-box; display:block; min-height: 50px; padding: 5px;\"></span>\n\t\t\t</p>\n \n\t\t\t<!--<a id=\"youtube-send-to-content\" href=\"#\"><?php _e( 'send to content', self::DOMAIN ); ?></a>-->\n \n <div id=\"youtube-colorpicker\"></div>\n \n <?php printf( __( 'Like this plugin? <a href=\"%s\" target=\"_blank\">Buy me a beer</a>!', self::DOMAIN ), 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XQRHECLPQ46TE' ); ?></p>\n\t\t\t<?php\n\t\t}", "public static function registerMetaBoxes() {}", "function add_meta_boxes()\n {\n }", "public function register_meta() {\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tadd_meta_box( 'ecf-'.$customField['name'], __( $customField['title'], 'exlist' ), $customField['callback'], $postTypes , 'advanced', 'high', $type = array($customField['name'], $customField['title'], $customField['type']) );\r\n\t\t\t}\r\n }", "function mobile_kiosk_post_meta_boxes_setup() {\n\t// hook adding the meta boxes \n\tadd_action( 'add_meta_boxes', 'mobile_kiosk_add_post_meta_boxes' );\n\t\n\t// Hook saving the meta boxes\n\tadd_action('save_post', 'mobile_kiosk_save_post_meta_boxes', 10, 2);\n}", "function meta_boxes() {\n\t\tadd_meta_box( 'event-details', 'Event Details', array( $this , 'details_box' ), 'event', 'normal', 'high' );\n\t}", "public function add_meta_boxes()\n {\n\n $this->_add_bitly_meta_box();\n\n }", "public function display_meta_box() {\n\t\t\n\t\tinclude_once( 'views/q-and-a-admin.php' );\n }", "public function run() {\n add_action( 'init', array( $this, 'create_post_types' ), 11 );\n add_action( 'init', array( $this, 'create_taxonomies' ), 12 );\n add_action( 'cmb2_init', array( $this, 'create_custom_fields' ), 10 );\n add_action( 'init', array( $this, 'create_shortcodes' ), 14 );\n add_action( 'save_post', array( $this, 'save_post' ) );\n }", "function create_meta_box() {\n\n\tglobal $postmetas;\n\t\n\tif(!isset($_GET['post_type']) OR empty($_GET['post_type']))\n\t{\n\t\tif(isset($_GET['post']) && !empty($_GET['post']))\n\t\t{\n\t\t\t$post_obj = get_post($_GET['post']);\n\t\t\t$_GET['post_type'] = $post_obj->post_type;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_GET['post_type'] = 'post';\n\t\t}\n\t}\n\t\n\tif ( function_exists('add_meta_box') && isset($postmetas) && count($postmetas) > 0 ) { \n\t\tforeach($postmetas as $key => $postmeta)\n\t\t{\n\t\t\tif($_GET['post_type']==$key)\n\t\t\t{\n\t\t\t\tadd_meta_box( 'metabox', ucfirst($key).' Options', 'new_meta_box', $key, 'side', 'high' ); \n\t\t\t}\n\t\t}\n\t}\n\n}", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "public function register_meta_boxes()\n {\n }", "public function add_meta_boxes()\n \t{\n\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('WP_Custom_Login_Profile_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray(&$this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\n\n \t}", "function rs_meta_box()\n{\n add_meta_box('rs_focus', 'Destaque na home', 'rs_focus', 'post', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'post', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'post_region', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'event', 'side');\n}", "function registry_post_meta_boxes_setup() {\n\n /* Add meta boxes on the 'add_meta_boxes' hook. */\n add_action( 'add_meta_boxes', 'registry_add_post_meta_boxes', 1 );\n\n /* Save post info meta on the 'save_post' hook. */\n add_action( 'save_post', 'registry_save_coz_info_meta', 10, 2 );\n \n /* Save post info meta on the 'save_post' hook. */\n add_action( 'save_post', 'registry_save_coz_num_meta', 10, 2 );\n \n}", "public function apb_add_meta_boxes() {\r\n\t}", "function __construct() {\n $this->add_meta_box();\n }", "public function create_meta_box() {\n\t\tadd_meta_box( 'slider_meta', 'Example metabox', array( $this, 'slider_meta_fields_callback' ), [ 'Page', 'post' ] );\n\n\t}", "public static function create_meta_box() {\n\t\t$content_types_array = self::_get_active_content_types();\n\t\tforeach ( $content_types_array as $content_type ) {\n\t\t\tadd_meta_box( 'custom-content-type-mgr-custom-fields'\n\t\t\t\t, __('Custom Fields', CCTM::txtdomain )\n\t\t\t\t, 'StandardizedCustomFields::print_custom_fields'\n\t\t\t\t, $content_type\n\t\t\t\t, 'normal'\n\t\t\t\t, 'high'\n\t\t\t\t, $content_type \n\t\t\t);\n\t\t}\n\t}", "function flowthemes_seo_meta_boxes(){\n\t\twp_nonce_field(basename(__FILE__), 'flow_seo_noncename');\n\t\t\n\t\t$opt_name = 'flow_seo_title';\n\t\t$opt_name2 = 'flow_seo_description';\n\t\t$opt_name3 = 'flow_post_header_code';\t\n\t\t\n\t\t$post_ID = get_the_ID();\n\t\t$opt_val = get_post_meta($post_ID, $opt_name, true);\n\t\t$opt_val2 = get_post_meta($post_ID, $opt_name2, true);\n\t\t$opt_val3 = get_post_meta($post_ID, $opt_name3, true);\n\n\t?>\n\t\t<table class=\"form-table flow_seo_meta_box\">\n\t\t\t<tr>\n\t\t\t\t<th style=\"width:20%;\">\n\t\t\t\t\t<label for=\"\"><?php _e('Snippet Preview', 'flowthemes'); ?></label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<div id=\"flow_seo_snippet\">\n\t\t\t\t\t\t<a class=\"default_title\" href=\"javascript:void(null);\"><?php the_title(); ?> - <?php bloginfo('name'); ?></a>\n\t\t\t\t\t\t<a class=\"title\" href=\"javascript:void(null);\"><?php the_title(); ?></a>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<cite href=\"javascript:void(null);\" class=\"url\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$domain = parse_url(get_permalink());\n\t\t\t\t\t\t\t\tif(!empty($domain[\"host\"])){ echo $domain[\"host\"]; }\n\t\t\t\t\t\t\t\tif(!empty($domain[\"path\"])){ echo $domain[\"path\"]; }\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</cite>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p class=\"desc\">\n\t\t\t\t\t\t\t<span class=\"content\"><?php echo get_the_excerpt(); ?></span>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t\t<th style=\"width:20%;\">\n\t\t\t\t\t<label for=\"<?php echo $opt_name; ?>\">SEO Title</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input type=\"text\" name=\"<?php echo $opt_name; ?>\" id=\"<?php echo $opt_name; ?>\" value=\"<?php echo $opt_val; ?>\" size=\"30\" tabindex=\"30\" style=\"width: 97%;\" />\n\t\t\t\t\t<p>\n\t\t\t\t\t\tIf you leave this empty it's going to display standard title. Limited to max. 70 characters in most of the search engines. Number of characters: <span id=\"flow_seo_title-count\"></span>\n\t\t\t\t\t</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<th style=\"width:20%;\">\n\t\t\t\t\t<label for=\"<?php echo $opt_name2; ?>\">SEO Description</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<textarea name=\"<?php echo $opt_name2; ?>\" id=\"<?php echo $opt_name2; ?>\" cols=\"60\" rows=\"4\" tabindex=\"30\" style=\"width: 97%;\"><?php echo $opt_val2; ?></textarea>\n\t\t\t\t\t<p>Limited to 156 characters in most of the search engines. Number of characters: <span id=\"flow_seo_description-count\"></span></p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<th style=\"width:20%;\">\n\t\t\t\t\t<label for=\"flow_seo_focuskw\">Test Keyword(s)</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input type=\"text\" name=\"flow_seo_focuskw\" id=\"flow_seo_focuskw\" value=\"\" size=\"30\" tabindex=\"30\" style=\"width: 97%;\" />\n\t\t\t\t\t<p>\n\t\t\t\t\t\tThis field is used only as testing tool. Put here keywords that you expect that user will look for to check how well this post is using them. Please test one keyword at a time. Phrases should be tested as separate keywords (because that's the way search engine works).\n\t\t\t\t\t\t<span id=\"focuskwresults\"></span>\n\t\t\t\t\t</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<th style=\"width:20%;\">\n\t\t\t\t\t<label for=\"<?php echo $opt_name3; ?>\">Custom Code</label>\n\t\t\t\t</th>\n\t\t\t\t<td>\n\t\t\t\t\t<textarea name=\"<?php echo $opt_name3; ?>\" id=\"<?php echo $opt_name3; ?>\" cols=\"60\" rows=\"4\" tabindex=\"30\" style=\"width: 97%;\"><?php echo $opt_val3; ?></textarea>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tA code that will be placed in <code>&lt;head&gt;</code> section of your website in place of <code>wp_head();</code> function (located in header.php). What you may want to put here is probably Facebook title, description and image that it should use:\n<pre><code>&lt;meta property=\"og:title\" content=\"The Daisho Project\" /&gt;\n&lt;meta property=\"og:type\" content=\"video.movie\" /&gt;\n&lt;meta property=\"og:url\" content=\"http://example.com/link-to-portfolio-project-with-movie/\" /&gt;\n&lt;meta property=\"og:image\" content=\"http://example.com/images/facebook-should-grab-this-image-as-thumbnail.jpg\" /&gt;</code></pre>\n\t\t\t\t\t\tMore: <a href=\"http://ogp.me/\" target=\"_blank\">The Open Graph protocol</a>\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t...or you can put here completely different code including <code>&lt;style&gt;</code> and <code>&lt;script&gt;</code> tags! There are lots of possibilities: <a href=\"http://en.wikipedia.org/wiki/Meta_element\" target=\"_blank\">Meta Element</a>.\n\t\t\t\t\t</p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t<?php }", "final public function add_meta_boxes()\n {\n foreach ((array)$this->GetHooks() as $hook) :\n if (!$hook['edit']) {\n continue;\n }\n foreach ((array)$hook['permalink'] as $post_type) :\n remove_meta_box('tagsdiv-' . $this->Archive, $post_type, 'side');\n remove_meta_box($this->Archive . 'div', $post_type, 'side');\n endforeach;\n endforeach;\n }", "function create_meta_box() {\r\r\n global $key;\r\r\n\r\r\n if( function_exists( 'add_meta_box' ) ) {\r\r\n add_meta_box( 'new-page-boxes', ' Page Options', 'page_meta_boxes', 'page', 'normal', 'high' );\r\r\n add_meta_box( 'new-portfolio-boxes', ' Portfolio Options', 'portfolio_meta_boxes', 'portfolio', 'normal', 'high' );\r\r\n add_meta_box( 'new-slideshow-boxes', ' Slideshow Options', 'slideshow_meta_boxes', 'slideshow', 'normal', 'high' );\r\r\n add_meta_box( 'new-post-boxes', ' Post Options', 'post_meta_boxes', 'post', 'normal', 'high' );\r\r\n }\r\r\n}", "public function add_meta_boxes()\n {\n /* Author Name */\n add_meta_box(\n 'testimonial_options',\n 'Testimonial Options',\n array ( $this , 'render_features_box'),\n 'testimonial',\n 'side',\n 'default'\n );\n /* Author email */\n /* approved [checkbox] */\n /* featured [checkbox] */\n }", "public function add_meta_boxes()\n \t{\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('wp_plugin_template_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray($this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\t\t\t\t\n \t}", "public function setup_meta_box() {\n\t\t\tadd_meta_box( 'add-shortcode-section', __( 'Shortcode', IFLANG ), array( $this, 'meta_box' ), 'nav-menus', 'side', 'high' );\n\t\t}", "function my_meta_init()\n{\n // http://codex.wordpress.org/Function_Reference/wp_enqueue_script\n // http://codex.wordpress.org/Function_Reference/wp_enqueue_style\n \n //wp_enqueue_script('my_meta_js', MY_THEME_PATH . '/custom/meta.js', array('jquery'));\n wp_enqueue_style('my_meta_css', MY_THEME_PATH . '/custom/shop-meta.css');\n \n // review the function reference for parameter details\n // http://codex.wordpress.org/Function_Reference/add_meta_box\n \n // add a meta box for each of the wordpress page types: posts and pages\n foreach (array('product') as $type) \n {\n add_meta_box('my_all_meta', 'Prezzo e Descrizione Prodotto', 'my_meta_setup', $type, 'normal', 'high');\n }\n \n // add a callback function to save any data a user enters in\n add_action('save_post','my_meta_save');\n}", "function post_meta_boxes_setup() {\n\n\t\tadd_action( 'add_meta_boxes', array($this, 'add_post_meta_boxes') );\n\t}", "function post_meta_boxes_setup() {\n\t\t\t/* Add meta boxes on the 'add_meta_boxes' hook. */\n\t\t\tadd_action( 'add_meta_boxes', array( 'VWvideoShare', 'add_post_meta_boxes' ) );\n\n\t\t\t/* Save post meta on the 'save_post' hook. */\n\t\t\tadd_action( 'save_post', array( 'VWvideoShare', 'save_post_meta'), 10, 2 );\n\t\t}", "function create_meta_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PAGE SETTINGS', 'new_meta_boxes', 'page', 'normal', 'high' );\n\t}\n}", "function new_meta_boxes() {\n\tglobal $post, $new_meta_boxes;\n\n\tforeach($new_meta_boxes as $meta_box) {\n\t\tprint_meta_box($meta_box, $post);\n\t}\n}", "function of_metabox_function(){\n require_once('of_meta_database.php');\n echo '<h2 class=\"text-left\">OF Metabox and Taxonomy Options<h2><br/>';\n of_settings_page();\n}", "public function setup()\r\n {\r\n /* Add meta boxes on the 'add_meta_boxes' hook. */\r\n add_action('add_meta_boxes', array(\r\n $this,\r\n 'addMetaBox'\r\n ));\r\n \r\n /* Save post meta on the 'save_post' hook. */\r\n add_action('save_post', array(\r\n $this,\r\n 'save'\r\n ), 10, 2);\r\n }", "function pvplugin_add_meta_box() {\n\t\n\t$screens = array( 'policy' );\n\t\n\tforeach ( $screens as $screen ) {\n\t\n\t\tadd_meta_box(\n\t\t\t'myplugin_sectionid',\n\t\t\t__( 'Custom Meta Box', 'policy_library_plugin' ),\n\t\t\t array( &$this, 'pvplugin_meta_box_callback' ),\n\t\t\t$screen\n\t\t);\n\t\t\n\t\tadd_meta_box(\n\t\t\t'myplugin_side_sectionid',\n\t\t\t__( 'Policy Expire', 'policy_library_plugin' ),\n\t\t\t array( &$this, 'pvplugin_side_meta_box_callback' ),\n\t\t\t$screen,'side','high'\n\t\t);\n\t\t\n\t}\n\t}", "function careers_metabox() {\n\t\t\tforeach (careers_fields() as $key => $value) {\n\t\t\t\t$id = 'careers_'.$value['slug'];\n\t\t\t\t$title = __( $value['name'], 'careers_textdomain' );\n\t\t\t\tadd_meta_box($id, $title, 'careers_callback', 'Careers', 'normal', 'low',$value);\n\t\t\t}\n\t\t}", "public static function init() {\n\t\tHeadway::load('admin/admin-meta-boxes');\n\t\t\t\t\n\t\tadd_action('delete_post', array(__CLASS__, 'delete_post'));\n\n\t\tadd_filter('get_sample_permalink_html', array(__CLASS__, 'open_in_visual_editor_button'), 10, 4);\n\t\t\n\t}", "function setup_box() {\n\t\t$screens = apply_filters( 'cso_screens', array( 'post' ) );\n\t\tforeach( $screens as $s )\n\t\tadd_meta_box( 'color_options', __( 'Color Options', 'color-style-options' ), array( &$this, 'meta_box_contents' ), $s, 'normal' );\n\t}", "private function factory_meta_loop($_metas = array(), $_ftype = \"text\", $_ptype = \"wccpf\") {\r\n \t$html = '';\r\n \t/* Iterate over all the meta for and construct the HTML */\r\n \tforeach ($_metas as $meta) {\r\n \t\t/* Special property used only on Textarea method */\r\n \t\t$meta[\"ftype\"] = $_ftype;\r\n \t\t/* Make sure this attribute is available for this field type */\r\n \t\tif (isset($meta[\"include_if_not\"]) && !empty($meta[\"include_if_not\"]) && in_array ($_ftype, $meta[\"include_if_not\"])) {\r\n \t\t\tcontinue;\r\n \t\t}\r\n \t\tif ($_ptype == \"wccaf\" && isset ($meta[\"param\"]) && $meta[\"param\"] == \"visibility\" && $_ftype != \"image\") {\r\n \t\t\t/*\r\n \t\t\t * This meta has to be inserted above the visibility config\r\n \t\t\t * Only for the Admin Fields, since the sequence is impossible with normal flow\r\n \t\t\t * we are forced to hard code it here\r\n \t\t\t */\r\n \t\t\t$html .= $this->build_factory_meta_wrapper(array (\r\n \t\t\t\t\"label\" => __ ( 'Show on Product Page', 'wc-fields-factory' ),\r\n \t\t\t\t\"desc\" => __ ( 'Whether to show this custom admin field on front end product page.', 'wc-fields-factory' ),\r\n \t\t\t\t\"type\" => \"radio\",\r\n \t\t\t\t\"param\" => \"show_on_product_page\",\r\n \t\t\t\t\"layout\" => \"vertical\",\r\n \t\t\t\t\"options\" => array (\r\n \t\t\t\t\tarray (\r\n \t\t\t\t\t\t\"value\" => \"yes\",\r\n \t\t\t\t\t\t\"label\" => __ ( 'Show in Product Page', 'wc-fields-factory' ),\r\n \t\t\t\t\t\t\"selected\" => false\r\n \t\t\t\t\t),\r\n \t\t\t\t\tarray (\r\n \t\t\t\t\t\t\"value\" => \"no\",\r\n \t\t\t\t\t\t\"label\" => __ ( 'Hide in Product Page', 'wc-fields-factory' ),\r\n \t\t\t\t\t\t\"selected\" => true\r\n \t\t\t\t\t)\r\n \t\t\t\t),\r\n \t\t\t\t\"include_if_not\" => array (\r\n \t\t\t\t\t\"image\"\r\n \t\t\t\t),\r\n \t\t\t\t\"at_startup\" => \"show\",\r\n \t\t\t\t\"translatable\" => \"no\"\r\n \t\t\t), $_ptype);\r\n \t\t}\r\n \t\t/* Well time to wrap it */\r\n \t\t$html .= $this->build_factory_meta_wrapper($meta, $_ptype);\r\n \t\t/*\r\n \t\t * Include the role list selector config\r\n \t\t * after the \"Logged in Users Only\" config\r\n \t\t */\r\n \t\tif (isset($meta[\"param\"]) && $meta[\"param\"] == \"login_user_field\") {\r\n \t\t\tglobal $wp_roles;\r\n \t\t\t$role_list = array();\r\n \t\t\tforeach ($wp_roles->roles as $handle => $role) {\r\n \t\t\t\t$role_list[] = array (\r\n \t\t\t\t\t\"value\" => $handle,\r\n \t\t\t\t\t\"label\" => $role[\"name\"]\r\n \t\t\t\t);\r\n \t\t\t}\r\n \t\t\t$html .= $this->build_factory_meta_wrapper(array (\r\n \t\t\t\t\"label\" => __ ( 'Target Roles', 'wc-fields-factory' ),\r\n \t\t\t\t\"desc\" => __ ( 'Show this field if only the logged in user has the following roles.', 'wc-fields-factory' ),\r\n \t\t\t\t\"type\" => \"checkbox\",\r\n \t\t\t\t\"param\" => \"show_for_roles\",\r\n \t\t\t\t\"layout\" => \"horizontal\",\r\n \t\t\t\t\"options\" => $role_list,\r\n \t\t\t\t\"include_if_not\" => array (\r\n \t\t\t\t\t\"image\"\r\n \t\t\t\t),\r\n \t\t\t\t\"at_startup\" => \"hide\",\r\n \t\t\t\t\"translatable\" => \"no\"\r\n \t\t\t), $_ptype);\r\n \t\t}\r\n \t\t\r\n \t\tif (isset($meta[\"param\"]) && $meta[\"param\"] == \"timepicker\") {\r\n \t\t\t$html .= $this->build_factory_meta_wrapper(array (\r\n \t\t\t\t\"label\" => __ ( 'Allowed Hours & Minutes', 'wc-fields-factory' ),\r\n \t\t\t\t\"desc\" => __ ( 'Specify minimum and maximum hours & minutes that user can select from.', 'wc-fields-factory' ),\r\n \t\t\t\t\"type\" => \"html\",\r\n \t\t\t\t\"param\" => \"min_max_hours_minutes\",\r\n \t\t\t\t\"html\" => '<div class=\"wccpf-datepicker-min-max-wrapper\"><input type=\"text\" id=\"wccpf-datepicker-min-max-hours\" placeholder=\"0:23\" value=\"\"/> <strong>:</strong> <input type=\"text\" id=\"wccpf-datepicker-min-max-minutes\" placeholder=\"0:59\" value=\"\"/></div>',\r\n \t\t\t\t\"include_if_not\" => array (),\r\n \t\t\t\t\"at_startup\" => \"hide\",\r\n \t\t\t\t\"translatable\" => \"no\"\r\n \t\t\t), $_ptype);\r\n \t\t}\r\n \t}\r\n \t\r\n \treturn $html;\r\n }", "public static function init() {\n\t\tadd_action( 'admin_menu', __CLASS__ . '::simple_social_meta_create_menu' );\n\n\t\t/* Add the post meta box on the 'add_meta_boxes' hook. */\n\t\tadd_action( 'add_meta_boxes', __CLASS__ . '::add_simple_social_meta_meta_box' );\n\n\t\t/* Save the post meta box data on the 'save_post' hook. */\n\t\tadd_action( 'save_post', __CLASS__ . '::save_simple_social_meta_meta_box', 10, 2 );\n\n\t}", "public function addMetaBox()\r\n {\r\n add_meta_box($this->id, esc_html__($this->title, 'firalabs-tv-show'), array(\r\n $this,\r\n 'render'\r\n ), 'firalabs_tv_show', $this->context, 'default');\r\n }", "protected function setup_hooks(){\n add_action('add_meta_boxes', [$this, 'add_custom_meta_box']);\n add_action('save_post', [$this, 'save_post_meta_data']);\n }", "function add() {\n\t\tforeach ($this->_meta_box['pages'] as $page) {\n\t\t\tadd_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n\t\t}\n\t}", "function add_meta_box() {\t\t\n\t\t\t/* Gets available public post types. */\n\t\t\t$post_types = get_post_types( array( 'public' => true ), 'objects' );\n\t\t\t\n\t\t\t$post_types = apply_filters( 'remove_youtube_white_label_meta_box', $post_types );\n\t\t\t\n\t\t\t/* For each available post type, create a meta box on its edit page if it supports '$prefix-post-settings'. */\n\t\t\tforeach ( $post_types as $type ) {\n\t\t\t\t/* Add the meta box. */\n\t\t\t\tadd_meta_box( self::DOMAIN . \"-{$type->name}-meta-box\", __( 'YouTube Embed Shortcode Creator (does not save meta)', self::DOMAIN ), array( $this, 'meta_box' ), $type->name, 'side', 'default' );\n\t\t\t}\n\t\t}", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "public function createMetasPages($meta)\n\t {\n\t \tif ( isset($_GET['post']) || isset($_POST['post_ID']) )\n\t\t \t$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'];\n\t\t else\n\t\t \t$post_id = null;\n\n\t\t $nameMetaBox = '';\n\t\t $titleMetaBox = '';\n\t\t $noInputs = '';\n\t\t $noEditors = '';\n\t\t $imgFeatured = '';\n\t\t $videoFeatured = '';\n\t\t $documentFeatured = '';\n\t\t $gallery = '';\n\n\t\t if (isset($meta['_title_meta_box'])) {\n\t\t \t$titleMetaBox = $meta['_title_meta_box'];\n\t\t }\n\n\t\t if (isset($meta['_no_inputs'])) {\n\t\t \t$noInputs = $meta['_no_inputs'];\n\t\t }\n\t\t \t\n\t\t if (isset($meta['_no_editors'])) {\n\t\t \t$noEditors = $meta['_no_editors'];\n\t\t }\n\n\t\t if (isset($meta['_name_meta_box'])) {\n\t\t \t$nameMetaBox = $meta['_name_meta_box']; \t\n\t\t }\n\n\t\t if ( isset($meta['_img_featured']) && $meta['_img_featured'] == 'yes' ) {\n\t\t \t$imgFeatured = $meta['_img_featured']; \t\n\t\t }\n\n\t\t if ( isset($meta['_video_featured']) && $meta['_video_featured'] == 'yes' ) {\n\t\t \t$videoFeatured = $meta['_video_featured']; \t\n\t\t }\n\n\t\t if ( isset($meta['_document_featured']) && $meta['_document_featured'] == 'yes' ) {\n\t\t \t$documentFeatured = $meta['_document_featured']; \t\n\t\t }\n\n\t\t if ( isset($meta['_gallery']) && $meta['_gallery'] == 'yes' ) {\n\t\t \t$gallery = $meta['_gallery']; \t\n\t\t }\n\n\t\t foreach ($meta['_pages'] as $key => $value) {\n\t\t \t$createMeta = false;\n\t\t \tif ($post_id == $value) {\n\t\t \t\t$createMeta = true;\n\t\t \t} else if( $value == 'all' ) {\n\t\t \t\t$createMeta = true;\n\t\t \t}\n\n\t\t \tif ($createMeta) {\n\t\t \t\tself::addMetaBox($nameMetaBox, $titleMetaBox, 'page' , $noInputs, $noEditors, $imgFeatured, $videoFeatured, $documentFeatured, $gallery);\n\t\t \t}\n\t\t }\n\t }", "public function add_meta_boxes() {\n\t\tglobal $current_screen;\n\n\t\t$page_main = $this->_admin_pages[ 'vfb-pro' ];\n\n\t\tif ( $current_screen->id == $page_main && isset( $_REQUEST['form'] ) ) {\n\t\t\tadd_meta_box( 'vfb_form_switcher', __( 'Quick Switch', 'visual-form-builder-pro' ), array( &$this, 'meta_box_switch_form' ), $page_main, 'side', 'high' );\n\t\t\tadd_meta_box( 'vfb_form_items_meta_box', __( 'Form Items', 'visual-form-builder-pro' ), array( &$this, 'meta_box_form_items' ), $page_main, 'side', 'high' );\n\t\t\tadd_meta_box( 'vfb_form_media_button_tip', __( 'Display Forms', 'visual-form-builder-pro' ), array( &$this, 'meta_box_display_forms' ), $page_main, 'side', 'low' );\n\t\t}\n\t}", "public static function register_meta_boxes() {\n\t\t// estimate specific\n\t\t$args = array(\n\t\t\t'pspsi' => array(\n\t\t\t\t'title' => __( 'Sprout Invoices Integration', 'sprout-invoices' ),\n\t\t\t\t'show_callback' => array( __CLASS__, 'show_pspsi_meta_box' ),\n\t\t\t\t'save_callback' => array( __CLASS__, 'save_meta_box_pspsi' ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'low',\n\t\t\t\t'weight' => 0,\n\t\t\t\t'save_priority' => 0,\n\t\t\t),\n\t\t);\n\t\tdo_action( 'sprout_meta_box', $args, 'psp_projects' );\n\t}", "public function meta_boxes() {\n\n\t\t// Add TEAM Assignemtns meta box into Team custom post type.\n\t\tadd_meta_box(\n\t\t\t'wpcd_team_detail',\n\t\t\t__( 'Team Assignments', 'wpcd' ),\n\t\t\tarray( $this, 'render_team_details_meta_box' ),\n\t\t\t'wpcd_team',\n\t\t\t'advanced',\n\t\t\t'low'\n\t\t);\n\n\t}", "function add() {\n foreach ($this->_meta_box['pages'] as $page) {\n add_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n }\n }", "function add() {\n foreach ($this->_meta_box['pages'] as $page) {\n add_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n }\n }", "function MetaBox()\n\t{\n\t\t\n\t\t// wordpress global\n\t\tglobal $post;\n\n\t\t// grab meta data, if it exists\n\t\t$tlsp_text = get_post_meta( $post->ID, 'tlsp_text', true );\n\n\t\t// use a nonce for verification\n\t\twp_nonce_field( plugin_basename(__FILE__), 'tlsp_noncename' );\n\t\t\n\t\t// this is the html for the metabox\n\t\t$security = 1;\n\t\tinclude( 'metabox-html.php' );\n\t\t$security = 0;\n\t\t\n\t}", "public function register_meta_box() {\n\n\t\t\tadd_meta_box($this->slug, $this->options['title'], array($this, 'setup_meta_box'), $this->screen, $this->options['context'], $this->options['priority']);\n\t\t\tremove_meta_box('postcustom', $this->screen, 'normal');\n\t\t}", "function wpdocs_register_meta_boxes() {\r\n\r\n\tif ( isset($_GET['action']) && $_GET['action'] === 'edit' )\r\n\t{\r\n\t\tadd_meta_box( 'acoes-acesso', __( 'Ações', 'textdomain' ), 'petty_render_box_acao_metabox', 'acesso_camera','side','high' );\r\n\t}\r\n \r\n}", "function hcfw_event_add_meta_boxes() {\n\tadd_meta_box(\n\t\t'hcfw_event_details', // Unique ID\n\t\t'Event Details', // Box title\n\t\t'hcfw_event_details_html', // Content callback, must be of type callable\n\t\t'hcfw_event', // Post type\n\t\t'normal' // context (normal, side, advanced)\n\t);\n\n\tadd_meta_box(\n\t\t'hcfw_event_day_time', // Unique ID\n\t\t'Day and Time', // Box title\n\t\t'hcfw_event_day_time_html', // Content callback, must be of type callable\n\t\t'hcfw_event', // Post type\n\t\t'normal' // context (normal, side, advanced)\n\t);\n\n\tadd_meta_box(\n\t\t'hcfw_event_links', // Unique ID\n\t\t'Event Links', // Box title\n\t\t'hcfw_event_links_html', // Content callback, must be of type callable\n\t\t'hcfw_event', // Post type\n\t\t'normal' // context (normal, side, advanced)\n\t);\n\n\tadd_meta_box(\n\t\t'hcfw_event_submitter', // Unique ID\n\t\t'Submitted By', // Box title\n\t\t'hcfw_event_submitter_html', // Content callback, must be of type callable\n\t\t'hcfw_event', // Post type\n\t\t'normal' // context (normal, side, advanced)\n\t);\n\n\tadd_meta_box(\n\t\t'hcfw_event_type', // Unique ID\n\t\t'Event Type', // Box title\n\t\t'hcfw_event_type_html', // Content callback, must be of type callable\n\t\t'hcfw_event', // Post type\n\t\t'side' // context (normal, side, advanced)\n\t);\n}", "public function add_meta_boxes() {\n\n global $post;\n\n // Check we're on an Envira Gallery\n if ( 'envira' != $post->post_type ) {\n return;\n }\n\n // Let's remove all of those dumb metaboxes from our post type screen to control the experience.\n $this->remove_all_the_metaboxes();\n \n // Add our metaboxes to Envira CPT.\n\n // Types Metabox\n // Allows the user to upload images or choose an External Gallery Type\n // We don't display this if the Gallery is a Dynamic or Default Gallery, as these settings don't apply\n $type = $this->get_config( 'type', $this->get_config_default( 'type' ) );\n if ( ! in_array( $type, array( 'defaults', 'dynamic' ) ) ) {\n add_meta_box( 'envira-gallery', __( 'Envira Gallery', 'envira-gallery' ), array( $this, 'meta_box_gallery_callback' ), 'envira', 'normal', 'high' );\n }\n\n // Settings Metabox\n add_meta_box( 'envira-gallery-settings', __( 'Envira Gallery Settings', 'envira-gallery' ), array( $this, 'meta_box_callback' ), 'envira', 'normal', 'high' );\n \n // Preview Metabox\n // Displays the images to be displayed when using an External Gallery Type\n // In the future, this could include a 'live' preview of the gallery theme options etc.\n add_meta_box( 'envira-gallery-preview', __( 'Envira Gallery Preview', 'envira-gallery' ), array( $this, 'meta_box_preview_callback' ), 'envira', 'normal', 'high' );\n \n // Display the Gallery Code metabox if we're editing an existing Gallery\n if ( $post->post_status != 'auto-draft' ) {\n add_meta_box( 'envira-gallery-code', __( 'Envira Gallery Code', 'envira-gallery' ), array( $this, 'meta_box_gallery_code_callback' ), 'envira', 'side', 'default' );\n }\n\n // Output 'Select Files from Other Sources' button on the media uploader form\n add_action( 'post-plupload-upload-ui', array( $this, 'append_media_upload_form' ), 1 );\n add_action( 'post-html-upload-ui', array( $this, 'append_media_upload_form' ), 1 );\n \n }", "public function custom_meta_add() {\n\t\tif( !$this->options->show_on || in_array(get_the_id(), $this->options->show_on ) ){\n\t\t\tforeach( $this->options->display_on as $post_type ){\n\t\t\t\tadd_meta_box(\n\t\t\t\t\t$this->unique_key, // Unique Key\n\t\t\t\t\t$this->options->title ? esc_html__( $this->options->title ) : 'Related Content', //Title\n\t\t\t\t\tarray(&$this, 'custom_meta_render' ), // Callback (builds html)\n\t\t\t\t\t$post_type, // Post type\n\t\t\t\t\t$this->options->context, // Context\n\t\t\t\t\t$this->options->priority, // Priority\n\t\t\t\t\t$callback_args = null\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t}", "function coolRahulSoni_meta_box_add()\n{\n add_meta_box( 'my-meta-box-id', 'My First Meta Box', 'cd_meta_box_cb', 'post', 'normal', 'high' );\n}", "public function add_meta_boxes() {\n\t\t// Create the Slide Meta Boxes\n\t\tadd_meta_box( 'justart-slider-slide-settings-group', 'Slides', array( $this, 'create_slide_settings_meta_box' ), 'justart-slider', 'normal', 'default' );\n\t\tadd_filter( 'postbox_classes_justart-slider-slide-settings-group', array( $this, 'add_metabox_classes' ) );\n\t\t\n\t\t// Create the Shortcode Meta Box\n\t\tadd_meta_box( 'justart-slider-shortcode-group', 'Shortcode', array( $this, 'create_shortcode_meta_box' ), 'justart-slider', 'side', 'high' );\n\t\t\n\t\t// Create the Global Settings Meta Box\n\t\tadd_meta_box( 'justart-slider-global-settings-group', 'Global settings', array( $this, 'create_global_settings_meta_box' ), 'justart-slider', 'side', 'default' );\n\t}", "function add_meta_boxes() {\n\t\tif( function_exists( 'add_meta_box' ) ) {\n\t\t\tadd_meta_box( 'unit-info', __('Unit Information'), array( $this, '_display_unitinfo_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta_box( 'maps', __('Maps'), array( $this, '_display_maps_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta_box( 'gallery', __('Gallery'), array( $this, '_display_gallery_meta'), 'units', 'normal', 'low');\n\t\t\tadd_meta_box( 'unit-status', __('Availability'), array( $this, '_display_status_meta'), 'units', 'side', 'high');\n\t\t}\n\t}", "function mytheme_show_box() {\n global $post;\n\n // Use nonce for verification\n echo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n \n \n\n $i=0;\n //print_r($this->meta_box['fields']);\n\n $meta_count = get_post_meta($post->ID, 'dbt_text', true);\n for ($i=0;$i<count($meta_count);$i++) {\n echo '<table class=\"form-table elearning_fieldset\">';\n foreach ($this->meta_box['fields'] as $field) {\n // get current post meta data\n // echo $field['id'];\n $meta = get_post_meta($post->ID, $field['id'], true);\n //$count = print_r($meta);\n \n\n \n \n\n echo '<tr>',\n '<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\n '<td>';\n switch ($field['type']) {\n case 'text':\n echo '<input class=\"elearning_field\" type=\"text\" name=\"', $field['id'], '[]\" id=\"', $field['id'], '\" value=\"', $meta[$i] ? $meta[$i] : $field['std'], '\" size=\"30\" style=\"width:97%\" />',\n '<br />', $field['desc'];\n break;\n case 'textarea':\n echo '<textarea class=\"elearning_field\" name=\"', $field['id'], '[]\" id=\"', $field['id'], '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta[$i] ? $meta[$i] : $field['std'], '</textarea>',\n '<br />', $field['desc'];\n break;\n case 'select':\n //print_r($field['options']);\n echo '<select class=\"elearning_field\" name=\"', $field['id'], '[]\" id=\"', $field['id'], '\">';\n foreach ($field['options'] as $option) {\n echo '<option', $meta[$i] == $option ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n }\n echo '</select>';\n break;\n case 'radio':\n foreach ($field['options'] as $option) {\n echo '<input class=\"elearning_field\" type=\"radio\" name=\"', $field['id'], '[]\" value=\"', $option['value'], '\"', $meta[$i] == $option['value'] ? ' checked=\"checked\"' : '', ' />', $option['name'];\n }\n break;\n case 'checkbox':\n echo '<input class=\"elearning_field\" type=\"checkbox\" name=\"', $field['id'], '[]\" id=\"', $field['id'], '\"', $meta[$i] ? ' checked=\"checked\"' : '', ' />';\n break;\n }\n echo \t'<td>',\n '</tr>\n';\n }\n echo '\n<tr>\n <td colspan=\"2\" align=\"right\"><a class=\"delete_elearning_item\" href=\"#\">Delete</a></td>\n</tr>\n</table>';\n }\n echo '<a href=\"#\" id=\"new_textbox\">New Textbox</a>';\n\n \n }", "public function setup_meta_box( $options ) {\n\t\t\n\t\t\t//add_meta_box\n\t\t\n\t\t}", "function axiom_init_pagebuilder_meta_box(){\n // add custom sidebar metabox to following types\n $types = array('page', 'axi_product', 'portfolio', 'service', 'staff');\n \n foreach ($types as $key => $value) {\n add_meta_box(\"axiom_pagebuilder_metabox\", \n __(\"Smart Page Builder\", 'default'), \n \"axiom_display_pagebuilder_meta\", \n $value, \n \"normal\", \n \"high\");\n }\n \n // Save custom sidebar meta\n add_action('save_post', 'axiom_save_pagebuilder_data');\n \n}", "function caviar_add_meta_box() {\n\n\t$screens = array('page' );\n\n\tforeach ( $screens as $screen ) {\n\n\t\tadd_meta_box(\n\t\t\t'caviar_sectionid',\n\t\t\tesc_html__( 'Caviar Metabox Field Example', 'caviar_textdomain' ),\n\t\t\t'caviar_meta_box_callback',\n\t\t\t$screen\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'caviar_2',\n\t\t\tesc_html__( 'Caviar Metabox 2', 'caviar_textdomain' ),\n\t\t\t'caviar_meta_box2_callback',\n\t\t\t$screen\n\t\t);\n\t}\n}", "public function register_meta_box() {\r\n add_meta_box( self::POST_TYPE . '-meta', 'Downloadable Resource URL', array ($this, 'meta_box_html'), self::POST_TYPE, 'side', 'default', '');\r\n }", "public function add_meta_boxes() {\r\n\t\tadd_meta_box( 'zakra-page-setting', esc_html__( 'Page Settings', 'zakra' ), 'Zakra_Meta_Box_Page_Settings::render', array(\r\n\t\t\t'post',\r\n\t\t\t'page',\r\n\t\t) );\r\n\t}", "function mf_SALF_artist_meta_show_box() {\n global $artist_meta_box, $post;\n \n // Use nonce for verification\n \n\techo '<input type=\"hidden\" name=\"artist_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n \n echo '<table class=\"form-table\">';\n\n foreach ($artist_meta_box['fields'] as $field) {\n // get current post meta data\n \n switch ($field['type']) {\n \n\t\t\t\tcase 'select2':\n\t\t\t\t$meta = get_post_meta($post->ID, $field['id'], true);\n\t\t\t\t\n\t\t\t\techo '<div style=\"margin: 12px 0; float: left;\">';\n\t\t echo '<h2><label for=\"', $field['id'], '\">', $field['name'], '</label></h2>';\n\t\t\t\techo '<select name=\"', $field['id'], '\" id=\"', $field['id'], '\">';\n foreach ($field['options'] as $ID => $option) {\n echo '<option value=\"'. $ID .'\" ', $meta == $ID ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n }\n echo '</select>';\n\t\t\t\techo '</div><h2 style=\"clear: both; margin: 12px 0;\">Additional Speakers</h2>';\t\n\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox';\n\t\t\t\t$meta = get_post_meta($post->ID, 'mf_SALF_artist_meta_checks', true);\n\t\t\t\tif (!$meta){\n\t\t\t\t\t$meta = array();\n\t\t\t\t}\n\t\techo '<div style=\"margin-right: 12px; float: left;\">';\n echo '<label for=\"', $field['id'], '\">', $field['name'], '</label>';\n\n \n\t\techo '<input type=\"checkbox\" name=\"mf_SALF_artist_meta_checks[]\"value=\"', $field['id'], '\" id=\"', $field['id'], '\"', in_array($field['id'],$meta) ? ' checked=\"checked\"' : '', ' />';\n\t\techo '</div>';\n\t\t\t break;\n\t\t}\t\t\t \n \n }\n \n echo '</table>';\n}", "function meta_box_contents() {\n\n\t\twp_nonce_field( __FILE__, 'cso_meta_save');\n\n\t\t$pairs = get_option( 'color_style_options', false );\n\t\tif ( ! $pairs ) return;\n\n\t\twp_enqueue_script('wp-color-picker');\n\t\twp_enqueue_style('wp-color-picker');\n\t\twp_enqueue_script( 'color-style-options', plugins_url( 'color-style-options.js', __FILE__ ), array('jquery','wp-color-picker'), 1, true );\n\n\t\tforeach( $pairs as $id => $pair ) {\n\t\t\tlist( $name ) = $pair;\n\t\t\t$saved_value = get_post_meta( get_the_ID(), 'cso_'.$id, true );\n\t\t\t?>\n\t\t\t<p><label style=\"line-height: \"><?php echo $name; ?></label><br />\n\t\t\t<input type=\"text\" class=\"cso_colorpick\" name=\"cso[<?php echo $id; ?>]\" value=\"<?php echo $saved_value; ?>\" />\n\t\t\t</p><?php\n\t\t}\n\n\t}", "function _sp_custom_meta_boxes() {\n\t$post_id = ( isset( $_GET['post'] ) ) ? $_GET['post'] : ( isset( $_POST['post_ID'] ) ? $_POST['post_ID'] : '');\n\n\t$template_file = get_post_meta( $post_id, '_wp_page_template', TRUE );\n\n\t/////////////////////////////////////////////////////\n\t// portfolio sort position\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'portfolio-sort-position',\n\t\t__( 'Sort Position', 'sp-theme' ),\n\t\t'_sp_custom_box_portfolio_sort_position',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// slider carousel shortcode\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'carousel-shortcode',\n\t\t__( 'Carousel Shortcode', 'sp-theme' ),\n\t\t'_sp_custom_box_carousel_shortcode',\n\t\t'sp-slider',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// wpautop post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_post',\n\t\t__( 'Auto Content Formating', 'sp-theme' ),\n\t\t'_sp_custom_box_wpautop',\n\t\t'post',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// wpautop page\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_page',\n\t\t__( 'Auto Content Formating', 'sp-theme' ), \n\t\t'_sp_custom_box_wpautop',\n\t\t'page',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// wpatup portfolio\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_portfolio',\n\t\t__( 'Auto Content Formating', 'sp-theme' ), \n\t\t'_sp_custom_box_wpautop',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout page\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\n\t\tadd_meta_box(\n\t\t\t'sp_page_layout',\n\t\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t\t'_sp_custom_box_layout',\n\t\t\t'page',\n\t\t\t'side',\n\t\t\t'low'\n\t\t);\t\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_post_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'post',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout portfolio\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_portfolio_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout product\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_product_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'product',\n\t\t'side',\n\t\t'low'\n\t);\n\n\t// check if SEO enabled\n\tif ( sp_get_option( 'seo_enable', 'is', 'on' ) || ! sp_get_option( 'seo_enable', 'isset' ) ) {\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo post\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'post'\n\t\t);\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo page\n\t\t/////////////////////////////////////////////////////\n\t\t// don't show on maintenance page\n\t\tif ( $template_file !== 'maintenance-page.php' ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'sp_seo_settings',\n\t\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t\t'page'\n\t\t\t);\n\t\t}\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo woo product\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'product'\n\t\t);\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo portfolio\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'sp-portfolio'\n\t\t);\n\t}\n\t\n\t/////////////////////////////////////////////////////\n\t// testimonial submitter\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_testimonial_submitter',\n\t\t__( 'Testimonial Submitter', 'sp-theme' ),\n\t\t'_sp_custom_box_testimonial_settings',\n\t\t'sp-testimonial',\n\t\t'side',\n\t\t'core'\n\t); \n\n\t/////////////////////////////////////////////////////\n\t// advanced page options\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\t\n\t\tadd_meta_box(\n\t\t\t'sp_advanced_page_options',\n\t\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t\t'_sp_custom_box_advanced_page_options',\n\t\t\t'page'\n\t\t);\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// advanced post options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_post_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'post'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// advanced portfolio options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_portfolio_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'sp-portfolio'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// advanced woo product options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_woo_product_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'product'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// contact form shortcode\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-shortcode',\n\t\t__( 'Contact Form Shortcode', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_shortcode',\n\t\t'sp-contact-form',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// contact form general settings\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-settings',\n\t\t__( 'Contact Form Settings', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_settings',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t);\n\t\n\t/////////////////////////////////////////////////////\n\t// contact form content\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-content',\n\t\t__( 'Contact Form Content', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_content',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t); \n\n\t/////////////////////////////////////////////////////\n\t// contact form messages\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-messages',\n\t\t__( 'Contact Form Messages', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_messages',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// page builder page\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\t\n\t\tadd_meta_box(\n\t\t\t'page-builder',\n\t\t\t__( 'Page Builder', 'sp-theme' ),\n\t\t\t'_sp_custom_box_page_builder',\n\t\t\t'page',\n\t\t\t'normal',\n\t\t\t'high'\n\t\t);\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// alternate product image on hover\n\t/////////////////////////////////////////////////////\n\t/*\n\tadd_meta_box(\n\t\t'sp_alternate_product_image',\n\t\t__( 'Alternate Product Image', 'sp-theme' ),\n\t\t'_sp_custom_box_alternate_product_image',\n\t\t'product',\n\t\t'side',\n\t\t'low' \n\t);\n\t*/\n\n\t/////////////////////////////////////////////////////\n\t// custom product tabs\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_custom_product_tabs',\n\t\t__( 'Product Tabs Option', 'sp-theme' ),\n\t\t'_sp_custom_product_tabs',\n\t\t'product',\n\t\t'normal',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// featured video post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_featured_video',\n\t\t__( 'Featured Video', 'sp-theme' ), \n\t\t'_sp_custom_box_featured_video',\n\t\t'post',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// faq sort order\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_faq_order',\n\t\t__( 'Sort Order', 'sp-theme' ), \n\t\t'_sp_custom_box_faq_order',\n\t\t'sp-faq',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\treturn true;\n}", "function plugin_add_custom_meta_boxes(){\n add_meta_box( \"vehicle_inspector\", __(\"Vehicle Inspector\", \"listings\"), \"vehicle_inspector_make_meta_box\", \"listings\", \"side\", \"core\", array(\"name\" => \"vehicle_inspector\"));\n\tadd_meta_box( \"vehicle_status\", __(\"Vehicle Status\", \"listings\"), \"vehicle_status_make_meta_box\", \"listings\", \"side\", \"core\", array(\"name\" => \"vehicle_status\"));\n add_meta_box( \"options\", __(\"Options\", \"listings\"), \"plugin_make_meta_box\", \"listings\", \"side\", \"core\", array(\"name\" => \"options\"));\n\t$listing_categories = get_listing_categories();\n\t\n\tforeach($listing_categories as $category){\t\n\t\t\t\n\t\t$sfield = str_replace(\" \", \"_\", strtolower($category['singular']));\n\t\t\t\t\n\t\t$field = $name = $category['singular'];\n\n\t\tif($category['filterable'] == 1){\n\t\t\t$field = $field . \" (\" . __(\"Filterable\", \"listings\") . \")\";\n\t\t}\n\t}\n}", "function addMeta() {\n\t\n\tif( class_exists('acf') ) {\n\n\t$meta_description = get_field('meta_description', 'option');\n\t$meta_keywords = get_field('meta_keywords', 'option');\n\t$meta_author = get_field('meta_author', 'option');\n\t$meta_og_image = get_field('meta_og_img', 'option');\n\t$meta_img_full = $meta_og_image['url'];\n\n\t}\n\n\tif ( $meta_description ) {\n\t\techo '<meta name=\"description\" content=\"'.$meta_description.'\">'; \n\t}\n\n\tif ( $meta_keywords ) {\n\t\techo '<meta name=\"keywords\" content=\"'.$meta_keywords.'\">'; \n\t}\n\n\tif ( $meta_author ) {\n\t\techo '<meta name=\"author\" content=\"'.$meta_author.'\">'; \n\t}\n\n\tif ( $meta_og_image ) {\n\t\techo '<meta name=\"twitter:card\" content=\"summary\" />';\n\t\techo '<meta property=\"og:image\" content=\"'.$meta_img_full.'\" />';\n\t}\n\n}", "function show() {\n global $post;\n \t\t/**\n\t\t * Use nonce for verification.\n\t\t */\n echo '<input type=\"hidden\" name=\"weddingvendor_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n echo '<table class=\"form-table\">';\n\t\t\n foreach ($this->_meta_box['fields'] as $field) { \n\t\t\t/**\n\t\t\t * get current post meta data.\n\t\t\t */\n $meta = get_post_meta($post->ID, $field['id'], true);\n\t\t\tif( isset( $field['desc'] ) ) {\n\t\t\t\t$meta_description = $field['desc'];\n\t\t\t}\n\t\t\t\n echo '<tr><th style=\"width:20%\"><label for=\"',esc_attr($field['id']), '\">', esc_html($field['name']), '</label></th><td>';\n\t\t\t\n switch ($field['type']) {\n\t\t\t /**\n\t\t\t\t * Meta-box Text Field.\n\t\t\t\t */\t\n case 'text':\n \t echo '<input type=\"text\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />',\n '<br /><small>', $meta_description.'</small>';\n break;\t\n\t\n\n\t\t\t /**\n\t\t\t\t * Meta-box date Field.\n\t\t\t\t */\t\n case 'date':\n \t echo '<input type=\"text\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" class=\"check_date date\" />',\n '<br /><small>', $meta_description.'</small>';\n break;\t\t\t\t\t \t\t\t\t\n\t\t\t /**\n\t\t\t\t * Meta-box Color Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'color':\n\t\t\t\t echo '<input class=\"color-field\" type=\"text\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" value=\"', $meta ? $meta : $field['std'], '\" />',\n '<br /><small>', $meta_description.'</small>';\n\t\t\t\tbreak;\n\t\t\t /**\n\t\t\t\t * Meta-box Textarea Field.\n\t\t\t\t */\t\n case 'textarea':\n echo '<textarea name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>',\n '<br /><small>', $meta_description.'</small>';\n break;\n\t\t\t /**\n\t\t\t\t * Meta-box Select Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'select':\t\t\t\t\t\n\t\t\t\t\t echo '<select name=\"'.esc_attr($field['id']).'\" id=\"'.esc_attr($field['id']).'\">';\n\t\t\t\t\t\t foreach ($field['options'] as $option) {\n\t\t\t\t\t\t \t echo '<option', $meta == $option['value'] ? ' selected=\"selected\"' : '', ' value=\"'.$option['value'].'\">'.$option['label'].'</option>';\n\t\t\t\t\t \t } \n\t\t\t\t\t echo '</select><br /><span class=\"description\">'.$meta_description.'</span>';\n break;\n\t\t\t /**\n\t\t\t\t * Meta-box Radio Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'radio':\n\t\t\t\t\t foreach ( $field['options'] as $option ) {\n\t\t\t\t\t\t echo '<input type=\"radio\" name=\"'.esc_attr($field['id']).'\" id=\"'.$option['value'].'\" \n\t\t\t\t\t\t\t value=\"'.$option['value'].'\" ',$meta == $option['value'] ? ' checked=\"checked\"' : '',' />\n\t\t\t\t\t\t\t <label for=\"'.$option['value'].'\">'.$option['name'].'</label><br />';\n\t\t\t\t\t }\n\t\t\t\t\t echo '<span class=\"description\">'.$meta_description.'</span>';\n\t\t\t\tbreak;\n\t\t\t /**\n\t\t\t\t * Meta-box Checkbox Field.\n\t\t\t\t */\t\n\t case 'checkbox':\n \t echo '<input type=\"checkbox\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\"', $meta ? ' checked=\"checked\"' : '', ' />';\n\t\t\t\t\t echo '<span class=\"description\">'.$meta_description.'</span>';\n break;\n\t\t\t /**\n\t\t\t\t * Meta-box Checkbox-group Field.\n\t\t\t\t */\t\n\t\t\t case 'checkbox_group':\n\t\t\t\t\t foreach ($field['options'] as $option) {\n\t\t\t\t\t echo '<input type=\"checkbox\" value=\"',$option['value'],'\" name=\"',esc_html($field['id']),'[]\" \n\t\t\t\t\t\t id=\"',$option['value'],'\"',$meta && in_array($option['value'], $meta) ? ' checked=\"checked\"' : '',' />\n\t\t\t\t\t\t <label for=\"'.$option['value'].'\">'.$option['name'].'</label><br />';\n\t\t\t\t\t }\n\t\t\t\t\t echo '<span class=\"description\">'.$meta_description.'</span>';\n\t\t\t\t\tbreak;\n\t\t\t /**\n\t\t\t\t * Meta-box Image Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'image':\n\t\t\t\t\t echo '<span class=\"upload\">';\n\t\t\t\t\t if( $meta ) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t echo '<input type=\"hidden\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" \n\t\t\t\t\t\t\t\t class=\"regular-text form-control text-upload\" value=\"',$meta,'\" />';\t\t\t\t\t\t\t\n\t\t\t\t\t\t echo '<img style=\"width:150px; display:block;\" src= \"'.$meta.'\" class=\"preview-upload\" />';\n\t\t\t\t\t\t echo '<input type=\"button\" class=\"button button-upload\" id=\"logo_upload\" value=\"'.esc_html__('Upload an image','weddingvendor').'\"/></br>';\t\t\n\t\t\t\t\t\t echo '<input type=\"button\" class=\"button-remove\" id=\"remove\" value=\"'.esc_html__('Remove','weddingvendor').'\" /> ';\n\t\t\t\t\t }else {\n\t\t\t\t\t\t echo '<input type=\"hidden\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" \n\t\t\t\t\t\t\t\t\tclass=\"regular-text form-control text-upload\" value=\"',$meta,'\" />';\t\t\t\t\t\t\t\n\t\t\t\t\t\t echo '<img style=\"\" src= \"'.$meta.'\" class=\"preview-upload\" />';\n\t\t\t\t\t\t echo '<input type=\"button\" class=\"button button-upload\" id=\"logo_upload\" value=\"'.esc_html__('Upload an image','weddingvendor').'\"/></br>';\t\t\n\t\t\t\t\t\t echo '<input type=\"button\" style=\"display:none;\" id=\"remove\" class=\"button-remove\" value=\"\" /> ';\n\t\t\t\t\t } echo '</span><span class=\"description\">'.$meta_description.'</span>';\t\t\n\t\t\t\tbreak;\n\t\t\t\t\t\n }\n echo '<td></tr>';\n }\n echo '</table>';\n }", "function add_meta_box() {\n global $post;\n\n $post_types = get_post_types( array( 'public' => true ) );\n\n if ( !empty( $post ) ) {\n if ( $this->check_user_analytics_exist( $post ) ) {\n foreach ( $post_types as $post_type ) {\n add_meta_box( 'show_user_analytics', __( 'Post Author Analytics Info', 'wpuf-pro' ), array( $this, 'render_meta_box_content' ), $post_type, 'advanced', 'high' );\n }\n }\n }\n }", "function rng_METANAME_metabox_init() {\n}", "public function register_metaboxes() {\n\n\t\t\twapu_core()->get_core()->init_module( 'cherry-post-meta', array(\n\t\t\t\t'id' => 'wapu_gallery',\n\t\t\t\t'title' => esc_html__( 'Gallery', 'wapu-core' ),\n\t\t\t\t'page' => array( $this->post_type ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'callback_args' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'_wapu_single_large_thumb' => array(\n\t\t\t\t\t\t'type' => 'media',\n\t\t\t\t\t\t'title' => esc_html__( 'Single Large Image', 'wapu-core' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t) );\n\n\t\t\twapu_core()->get_core()->init_module( 'cherry-post-meta', array(\n\t\t\t\t'id' => 'wapu_clear_caches',\n\t\t\t\t'title' => esc_html__( 'Clear Caches', 'wapu-core' ),\n\t\t\t\t'page' => array( $this->post_type ),\n\t\t\t\t'context' => 'side',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'callback_args' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'_wapu_clear_reviews_cache' => array(\n\t\t\t\t\t\t'type' => 'html',\n\t\t\t\t\t\t'title' => esc_html__( 'Clear Reviews Cache', 'wapu-core' ),\n\t\t\t\t\t\t'html' => sprintf(\n\t\t\t\t\t\t\t'<a href=\"%s\" class=\"button\">Clear Reviews Cache</a><br><br>',\n\t\t\t\t\t\t\tadd_query_arg( array( 'clear_meta_cache' => '_rating_cache' ) )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'_wapu_clear_terms_cache' => array(\n\t\t\t\t\t\t'type' => 'html',\n\t\t\t\t\t\t'title' => esc_html__( 'Clear Terms Cache', 'wapu-core' ),\n\t\t\t\t\t\t'html' => sprintf(\n\t\t\t\t\t\t\t'<a href=\"%s\" class=\"button\">Clear Terms Cache</a>',\n\t\t\t\t\t\t\tadd_query_arg( array( 'clear_meta_cache' => '_terms_cache' ) )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t) );\n\n\t\t\twapu_core()->get_core()->init_module( 'cherry-post-meta', array(\n\t\t\t\t'id' => 'wapu_misc',\n\t\t\t\t'title' => esc_html__( 'Misc Options', 'wapu-core' ),\n\t\t\t\t'page' => array( $this->post_type ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'callback_args' => false,\n\t\t\t\t'fields' => apply_filters(\n\t\t\t\t\t'wapu-core/edd/metabxes/misc',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'_wapu_ld_url' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Live Demo URL', 'wapu-core' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t) );\n\n\t\t\twapu_core()->get_core()->init_module( 'cherry-term-meta', array(\n\t\t\t\t'tax' => 'download_category',\n\t\t\t\t'priority' => 10,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'_wapu_category_home' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => 'Home URL for current category (for breadcrumbs)',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t) );\n\n\t\t}", "function pz_add_custom_meta_box()\n{\n add_meta_box(\n 'custom_meta_box',\n 'Custom Image Metabox',\n 'pz_custom_meta_box_callbacks',\n 'page', // page, post etc.\n 'normal',\n 'high');\n}", "public static function register_meta_boxes() {\n // Get meta boxes to register.\n $meta_boxes = apply_filters( 'rwmb_meta_boxes', array() );\n\n\n if ( is_array( $meta_boxes ) ) {\n // Load all custom fields.\n static $loaded;\n\n if ( ! isset( $loaded ) ) {\n foreach ( glob( implode( '/', array_slice( explode( '/', str_replace( '\\\\', '/', __FILE__ ) ), 0, -1 ) ) . '/fields/*.php' ) as $file ) {\n include_once $file;\n }\n\n $loaded = true;\n }\n\n // Instantiate all meta boxes.\n foreach ( $meta_boxes as $meta_box ) {\n $meta_box = new self( $meta_box );\n }\n }\n }", "function clix_uppe_add_meta_box() {\r\n\tif( function_exists('add_meta_box') ) {\r\n\t\tadd_meta_box( 'clix_uppe_meta_box', 'Clix Category Exclusion', 'clix_uppe_meta_box', post, 'side' );\r\n \t}\r\n}", "function register_and_do_post_meta_boxes($post)\n {\n }", "function praise_meta_init(){\n add_meta_box(\"praise_author_name\", \"Author\", \"praise_author_meta\", \"praise\", \"normal\", \"low\");\n}", "public function add_the_meta_boxes() {\n\t add_meta_box(\n\t 'spat_options_metabox'\t\t\t\t\t// ID\n\t , __( 'Subpages As Tabs Options' ) \t\t// Title\n\t , array( $this, 'plugin_options_form' ) // Render Code function\n\t , $this->pagehook\t\t\t\t\t\t\t// Page hook\n\t , 'normal'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\n\t add_meta_box(\n\t 'spat_demo_metabox'\t\t\t\t\t// ID\n\t , __( 'Preview' )\t\t\t\t\t\t\t// Title\n\t , array( $this, 'plugin_demo_page' ) \t// Render Code Function\n\t , $this->pagehook\t\t\t\t\t\t// Page hook\n\t , 'side'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\t }", "function add_metaboxes() \n {\n // add a metabox to the Event using the callback add_time_date_metabox \n add_meta_box( \n \"bbquotations-source\",\n __(\"Quote source url\", $this->localization_domain),\n array(&$this, \"add_source_metabox\"), $this->custom_post_type_name, \"normal\", \"high\"\n );\n\n add_meta_box( \n \"bbquotations-cheatsheet\",\n __(\"Quotes usage cheatsheet\", $this->localization_domain),\n array(&$this, \"add_cheatsheet_metabox\"), $this->custom_post_type_name, \"side\", \"high\"\n );\n }", "public function meta_box_form_items() {\n include_once (SWPM_FORM_BUILDER_PATH . 'views/button_palette_metabox.php');\n }", "function ilusix_my_custom_meta_box() {\n global $myMetaBoxPostTypes;\n\n foreach($myMetaBoxPostTypes as $postType) {\n add_meta_box(\n 'my_custom_meta_box_identifier' . '-' . $postType,\n 'Meta box title',\n 'ilusix_my_custom_meta_box_callback',\n $postType,\n 'normal',\n 'default'\n );\n }\n}", "function civ_meta_box() {\n\n\tadd_meta_box( 'my box', 'Civ Slider','show_my_meta_box', 'post' );\n\n\tfunction show_my_meta_box( $post ) {\n\t\t//\tThis will count the amount of slides total to insert for the slide order .\n\t\t\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . 'civ_slider';\n\t\t$row_count = $wpdb->get_var( 'select count(*) from $table_name' );\n\t\t$slide_count = $row_count + 1;\n\t\t$post_id_check = $post->ID;\n\n\t\t$box_check = $wpdb->get_row($wpdb->prepare(\"select * from $table_name where post_id=%d\", $post_id_check));\n?>\n\t<form method=\"post\" >\n\t\t<label>Check here to add post to homepage slider: </label>\n\t\t<input type=\"checkbox\" name=\"chkd\" <?php if($box_check != null ){echo \"checked\";} ?> />\n\t\t<input type=\"hidden\" value=\"<?php echo $post->ID; ?>\" name=\"post_id\" />\n\t\t<input type=\"hidden\" value=\"<?php echo $slide_count; ?>\" name=\"slide_order\" />\n\t</form>\n\t\t<?php\n\t}\n}", "function render_meta_box($post, $metabox)\n {\n }", "function page_attributes_meta_box($post)\n {\n }", "public function addMetaFields()\n\t{\n\t\tadd_action('slideshow_add_form_fields', [$this, 'addMetaFieldsToAddForm']);\n\t\tadd_action('slideshow_edit_form_fields', [$this, 'addMetaFieldsToEditForm']);\n\t}", "function registry_add_post_meta_boxes() {\n\n add_meta_box(\n 'registry-info', // Unique ID\n 'When did you complete the Cozmeena Shawl?', // Title\n 'registry_coz_info_meta_box', // Callback function\n 'coz_registry', // Admin page (or post type)\n 'side', // Context\n 'core' // Priority\n );\n\n global $current_user;\n if($current_user->roles[0] == 'administrator') {\n add_meta_box(\n\t\t'registry-num', // Unique ID\n\t\t'International Cozmeena Registration Number', // Title\n\t\t'registry_coz_num_meta_box', // Callback function\n\t\t'coz_registry', // Admin page (or post type)\n\t\t'normal', // Context\n\t\t'low' // Priority\n\t\t);\n }\n}", "function _custom_meta_boxes(){\r\n\r\n /**\r\n * Create a custom meta boxes array that we pass to\r\n * the OptionTree Meta Box API Class.\r\n */\r\n\r\n // $event_meta_box = array(\r\n // 'id' => 'event_meta_box',\r\n // 'title' => 'Event Option',\r\n // 'desc' => '',\r\n // 'pages' => array( 'event'),\r\n // 'context' => 'normal',\r\n // 'priority' => 'high',\r\n // 'fields' => array(\r\n // array(\r\n // 'label' => 'Background Image',\r\n // 'id' => 'background_image',\r\n // 'type' => 'upload',\r\n // 'desc' => '',\r\n // 'rows' => '',\r\n // 'post_type' => '',\r\n // 'taxonomy' => '',\r\n // 'class' => '',\r\n // ),\r\n //\r\n // array(\r\n // 'label' => 'Date Event',\r\n // 'id' => 'date_event',\r\n // 'type' => 'text',\r\n // 'desc' => '',\r\n // 'rows' => '',\r\n // 'post_type' => '',\r\n // 'taxonomy' => '',\r\n // 'class' => '',\r\n // ),\r\n //\r\n // )\r\n // );\r\n\r\n $post_meta_box = array(\r\n 'id' => 'post_meta_box',\r\n 'title' => 'Post Option',\r\n 'desc' => '',\r\n 'pages' => array( 'post'),\r\n 'context' => 'normal',\r\n 'priority' => 'high',\r\n 'fields' => array(\r\n\r\n array(\r\n 'label' => 'Display sidebar',\r\n 'id' => 'portfolio_sidebar',\r\n 'type' => 'select',\r\n 'desc' => '',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'choices' => array(\r\n array(\r\n 'value' => 'yes',\r\n 'label' => 'Yes',\r\n 'src' => ''\r\n ),\r\n array(\r\n 'value' => 'no',\r\n 'label' => 'No',\r\n 'src' => ''\r\n )\r\n ),\r\n ),\r\n array(\r\n 'label' => 'Is Featured ?',\r\n 'id' => 'portfolio_featured',\r\n 'type' => 'select',\r\n 'desc' => '',\r\n 'std' => 'no',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '',\r\n 'choices' => array(\r\n array(\r\n 'value' => 'yes',\r\n 'label' => 'Yes',\r\n 'src' => ''\r\n ),\r\n array(\r\n 'value' => 'no',\r\n 'label' => 'No',\r\n 'src' => ''\r\n )\r\n ),\r\n ),\r\n array(\r\n 'label' => 'Portfolio Type',\r\n 'id' => 'portfolio_type',\r\n 'type' => 'select',\r\n 'desc' => 'Option type potfolio',\r\n 'std' => 'none',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '',\r\n 'choices' => array(\r\n array(\r\n 'value' => 'none',\r\n 'label' => 'None'\r\n ),\r\n array(\r\n 'value' => 'images',\r\n 'label' => 'Images'\r\n ),\r\n array(\r\n 'value' => 'slideshows',\r\n 'label' => 'Slideshows'\r\n ),\r\n array(\r\n 'value' => 'video',\r\n 'label' => 'Video'\r\n ),\r\n array(\r\n 'value' => 'audio',\r\n 'label' => 'Audio'\r\n ),\r\n array(\r\n 'value' => 'quote',\r\n 'label' => 'Quote'\r\n ),\r\n array(\r\n 'value' => 'link',\r\n 'label' => 'Link'\r\n ),\r\n ),\r\n\r\n ),\r\n\r\n array(\r\n 'label' => 'Full Size Image',\r\n 'id' => 'portfolio_fullsize_image',\r\n 'type' => 'upload',\r\n 'desc' => 'This is the full size image.',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => 'portfolioImage'\r\n ),\r\n array(\r\n 'label' => 'Slideshow',\r\n 'id' => 'portfolio_slideshows',\r\n 'type' => 'list-item',\r\n 'desc' => '',\r\n 'class' => 'portfolio-slideshows',\r\n 'settings' => array(\r\n array(\r\n 'id' => 'portfolio_slideshow_item',\r\n 'label' => 'Image',\r\n 'type' => 'upload',\r\n 'class' => 'portfolio-slideshow-item',\r\n )\r\n )\r\n ),\r\n array(\r\n\r\n 'id' => 'portfolio_video_type',\r\n 'label' => 'Video Type',\r\n 'type' => 'select',\r\n 'desc' => '',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n\r\n 'choices' => array(\r\n array(\r\n 'value' => 'youtube',\r\n 'label' => 'Youtube',\r\n ),\r\n array(\r\n 'value' => 'vimeo',\r\n 'label' => 'vimeo',\r\n ),\r\n ),\r\n\r\n ),\r\n\r\n array(\r\n 'label' => 'Video ID',\r\n 'id' => 'portfolio_video',\r\n 'type' => 'textarea',\r\n 'desc' => '',\r\n 'std' => '',\r\n 'rows' => '4',\r\n ),\r\n\r\n array(\r\n 'label' => 'SoundCloud ID',\r\n 'id' => 'portfolio_soundCloud_id',\r\n 'type' => 'text',\r\n 'desc' => 'Only use for the SoundCloud',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => 'SoundCloudImage'\r\n ),\r\n\r\n array(\r\n 'label' => 'Quote Autor',\r\n 'id' => 'portfolio_Quote_Autor',\r\n 'type' => 'text',\r\n 'desc' => 'Only use for the SoundCloud',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => 'Quote_Autor'\r\n ),\r\n\r\n array(\r\n 'label' => 'Link Title',\r\n 'id' => 'portfolio_Link_Title',\r\n 'type' => 'text',\r\n 'desc' => 'Link title',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => 'Link_Title'\r\n ),\r\n array(\r\n 'label' => 'Link Url',\r\n 'id' => 'portfolio_Link_Url',\r\n 'type' => 'text',\r\n 'desc' => 'Link title',\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => 'Link_Url'\r\n ),\r\n )\r\n );\r\n\r\n $page_meta_box = array(\r\n 'id' => 'post_meta_box',\r\n 'title' => 'Page Option',\r\n 'desc' => '',\r\n 'pages' => array( 'page'),\r\n 'context' => 'normal',\r\n 'priority' => 'high',\r\n 'fields' => array(\r\n\r\n array(\r\n 'label' => 'Category ID show on page',\r\n 'id' => 'category_page',\r\n 'type' => 'text',\r\n 'desc' => '',\r\n 'std' => '',\r\n 'rows' => '',\r\n ),\r\n )\r\n );\r\n\r\n /**\r\n * Register our meta boxes using the\r\n * ot_register_meta_box() function.\r\n */\r\n ot_register_meta_box( $event_meta_box );\r\n// ot_register_meta_box( $post_meta_box );\r\n ot_register_meta_box( $page_meta_box );\r\n\r\n\r\n}" ]
[ "0.6836924", "0.6822224", "0.6764596", "0.67598534", "0.6733694", "0.6673264", "0.6665321", "0.66421163", "0.66403085", "0.6625783", "0.66044825", "0.6590086", "0.6584424", "0.65734494", "0.6556748", "0.6538292", "0.652184", "0.65149", "0.65079796", "0.64951104", "0.64833194", "0.6464222", "0.64542323", "0.64512515", "0.6443205", "0.64365613", "0.6430706", "0.6425612", "0.6421019", "0.6419878", "0.64191276", "0.63820016", "0.63810384", "0.63693386", "0.63686496", "0.6362522", "0.63615656", "0.63609004", "0.63608915", "0.6344887", "0.6344291", "0.6331986", "0.6330433", "0.6317016", "0.63153744", "0.6313632", "0.6304116", "0.63018966", "0.6299442", "0.6297563", "0.6295469", "0.6284319", "0.6284053", "0.6276833", "0.62756103", "0.6272056", "0.6269449", "0.62648904", "0.62642777", "0.6254869", "0.6254869", "0.6248801", "0.62456363", "0.6239157", "0.62340426", "0.6215881", "0.62120944", "0.6211676", "0.6207517", "0.62070787", "0.62010133", "0.619895", "0.61976105", "0.6180187", "0.6179313", "0.61783504", "0.6166242", "0.61597675", "0.6156668", "0.615285", "0.6151782", "0.6151604", "0.6149691", "0.6148669", "0.6141761", "0.6136008", "0.61346364", "0.6126991", "0.6124193", "0.61157024", "0.61156076", "0.6112126", "0.6107266", "0.6099279", "0.60943455", "0.6090203", "0.6085051", "0.60816455", "0.6080863", "0.6078131" ]
0.6571844
14
Create the post meta box for our fields.
public static function createMetaBox() { add_meta_box( \WPDisablePage\Setup::PLUGIN_ID, // Metabox ID \WPDisablePage\Setup::PLUGIN_NAME, // Metabox Name array( __CLASS__, 'createView' ), // Metabox Callback apply_filters( strtolower( \WPDisablePage\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types self::POSITION, // Metabox Position self::PRIORITY // Metabox Priority ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_meta_post_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-post-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' POST SETTINGS', 'new_meta_post_boxes', 'post', 'normal', 'high' );\n\t}\n}", "public function create_meta_box() {\n\t\tadd_meta_box( 'slider_meta', 'Example metabox', array( $this, 'slider_meta_fields_callback' ), [ 'Page', 'post' ] );\n\n\t}", "public function setup_meta_box($post) {\n\t\t\t\n\t\t\t$build = new Build($post->ID, $this->slug, $this->options);\n\t\t\t$build->build_meta_box();\n\t\t}", "function pavi_post_meta_boxes_setup() {\n add_action( 'add_meta_boxes', 'pavi_textarea_meta_boxes' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'pavi_save_post_class_meta', 10, 2 );\n}", "public static function create_meta_box() {\n\t\t$content_types_array = self::_get_active_content_types();\n\t\tforeach ( $content_types_array as $content_type ) {\n\t\t\tadd_meta_box( 'custom-content-type-mgr-custom-fields'\n\t\t\t\t, __('Custom Fields', CCTM::txtdomain )\n\t\t\t\t, 'StandardizedCustomFields::print_custom_fields'\n\t\t\t\t, $content_type\n\t\t\t\t, 'normal'\n\t\t\t\t, 'high'\n\t\t\t\t, $content_type \n\t\t\t);\n\t\t}\n\t}", "function add_post_meta_box( ) {\n\t\t\tadd_meta_box('Course-Information', __( 'Course Information', $this->plugin_domain), array($this, 'setup_meta_english'), 'public-courses', 'normal', 'high');\n\t\t\tadd_meta_box('Arabic-Translations', __( 'Arabic Translations', $this->plugin_domain), array($this, 'setup_meta_translation'), 'public-courses', 'normal', 'high');\n\t\t\tadd_meta_box('Course-Dates', __( 'Course Dates', $this->plugin_domain), array($this, 'setup_meta_dates'), 'public-courses', 'normal', 'high');\n\t\t}", "function create_custom_fields() {\n // Get all components to be listed\n $this->get_components();\n // Add components meta box\n if ( function_exists( 'add_meta_box' ) ) {\n foreach ( $this->postTypes as $postType ) {\n add_meta_box( 'wpnext', 'WPNext Builder', array( &$this, 'display_custom_fields' ), $postType, 'normal', 'high' );\n }\n }\n }", "function tower_build_meta_box($post, $fields) {\n // include nonce\n wp_nonce_field(basename(__FILE__), 'tower_nonce');\n\n if (! is_array($fields)) return;\n\n echo '<table style=\"width: 100%\">';\n foreach ($fields as $field) {\n // find value\n $field_value = esc_html(get_post_meta($post->ID, $field['name'], true));\n $html = '';\n switch ($field['type']) {\n case 'textarea':\n $html = \"<textarea name='{$field['name']}' \n id='{$field['name']}' \n rows='5' \n placeholder='{$field['description']}'\n style='width:100%;' \n maxlength='1500'\n >{$field_value}</textarea>\";\n break;\n\n default:\n $html = \"<input \n type='{$field['type']}' \n name='{$field['name']}' \n id='{$field['name']}' \n placeholder='{$field['description']}'\n maxlength='250'\n value='{$field_value}'\n required />\";\n }\n echo <<<EOL\n <tr>\n <td style=\"vertical-align: top; background: #FEFEFE; padding: 5px 10px;\">\n <label for=\"{$field['name']}\">{$field['title']}</label>\n </td>\n <td>{$html}</td>\n </tr>\n EOL;\n }\n echo '</table/>';\n}", "function create_meta_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PAGE SETTINGS', 'new_meta_boxes', 'page', 'normal', 'high' );\n\t}\n}", "function aerospace101_build_meta_box( $post ) {\n\twp_nonce_field( basename( __FILE__ ), 'aerospace101_meta_box_nonce' );\n\n\n // Retrieve current value of fields\n $current_sources = get_post_meta( $post->ID, '_post_sources', true );\n\t$current_is_featured = get_post_meta( $post->ID, '_post_is_featured', true );\n\n\n\t?>\n\n\t<div class='inside'>\n\t\t<h3><?php _e( 'Is Featured?', 'aerospace' ); ?></h3>\n\t\t<p>\n\t\t\t<input type=\"checkbox\" name=\"is_featured\" value=\"1\" <?php checked( $current_is_featured, '1' ); ?> /> Is Featured?\n\t\t</p>\n\n\t\t<h3><?php esc_html_e( 'Sources', 'aerospace' ); ?></h3>\n\t\t<p>\n\t\t\t<?php\n\t\t\t\twp_editor(\n\t\t\t\t\t$current_sources,\n\t\t\t\t\t'post_sources',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t\t'textarea_name' => 'sources',\n\t\t\t\t\t\t'teeny' => false,\n\t\t\t\t\t\t'tinymce' => array(\n\t\t\t\t\t\t\t'menubar' => false,\n\t\t\t\t\t\t\t'toolbar1' => 'bold,italic,underline,strikethrough,subscript,superscript,bullist,numlist,alignleft,aligncenter,alignright,undo,redo,link,unlink',\n\t\t\t\t\t\t\t'toolbar2' => false,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t?>\n\t\t</p>\n\n\n\t</div>\n\t<?php\n}", "function buildCustomPostWidgets()\n {\n // add_meta_box( $id, $title, $callback, $screen, $context, $priority, $callback_args );\n add_meta_box( 'cover_image_meta_box', 'Add an Image', array($this,'selectImageMetaBox'), 'playscripts', 'normal', 'high' );\n add_meta_box( 'cover_sound_meta_box', 'Add a Sound', array($this,'selectSoundMetaBox'), 'playscripts', 'normal', 'high' );\n }", "function register_and_do_post_meta_boxes($post)\n {\n }", "function tower_register_meta_boxes() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n $meta = $custom_type['meta'];\n add_meta_box(\n $meta['handle'],\n $meta['title'],\n $meta['callback'],\n $key\n );\n }\n}", "function agnosia_post_meta_boxes_setup() {\r\n\r\n\t\t/* Add meta boxes on the 'add_meta_boxes' hook. */\r\n\t\tadd_action( 'add_meta_boxes', 'agnosia_add_post_meta_boxes' );\r\n\r\n\t\t/* Save post meta on the 'save_post' hook. */\r\n\t\tadd_action( 'save_post', 'agnosia_save_post_meta', 10 , 2 );\r\n\r\n\t}", "public static function add_meta_box() {\n\t\tadd_meta_box( 'sponsor-meta', __( 'Sponsor Meta', self::$text_domain ), array( __CLASS__, 'do_meta_box' ), self::$post_type_name , 'normal', 'high' );\n\t}", "function AP_Meta_Box_Setup() {\n\tadd_action('add_meta_boxes','AP_Meta_Box_Add');\n\n\tadd_action( 'save_post', 'AP_Meta_Box_Save', 10, 2 );\n}", "public function meta_box_content()\n {\n global $post_id;\n $fields = get_post_custom($post_id);\n $field_data = $this->get_custom_fields_settings();\n\n $html = '';\n\n $html .= '<input type=\"hidden\" name=\"' . $this->token . '_nonce\" id=\"' . $this->token . '_nonce\" value=\"' . wp_create_nonce(plugin_basename($this->dir)) . '\" />';\n\n if (0 < count($field_data)) {\n $html .= '<table class=\"form-table\">' . \"\\n\";\n $html .= '<tbody>' . \"\\n\";\n\n $html .= '<input id=\"' . $this->token . '_post_id\" type=\"hidden\" value=\"' . $post_id . '\" />';\n\n foreach ($field_data as $k => $v) {\n $data = $v['default'];\n $placeholder = $v['placeholder'];\n $type = $v['type'];\n if (isset($fields[$k]) && isset($fields[$k][0])) {\n $data = $fields[$k][0];\n }\n\n if ($type == 'text') {\n $html .= '<tr valign=\"top\"><th scope=\"row\"><label for=\"' . esc_attr($k) . '\">' . $v['name'] . '</label></th><td>';\n $html .= '<input style=\"width:100%\" name=\"' . esc_attr($k) . '\" id=\"' . esc_attr($k) . '\" placeholder=\"' . esc_attr($placeholder) . '\" type=\"text\" value=\"' . esc_attr($data) . '\" />';\n $html .= '<p class=\"description\">' . $v['description'] . '</p>' . \"\\n\";\n $html .= '</td><tr/>' . \"\\n\";\n } elseif ($type == 'posts') {\n $html .= '<tr valign=\"top\"><th scope=\"row\"><label for=\"' . esc_attr($k) . '\">' . $v['name'] . '</label></th><td>';\n $html .= '<select style=\"width:100%\" name=\"' . esc_attr($k) . '\" id=\"' . esc_attr($k) . '\">';\n $html .= '<option value=\"\">Select a Page to Use</option>';\n\n // Query posts\n global $post;\n $args = [\n 'posts_per_page' => 20,\n 'post_type' => $v['default'],\n 'post_status' => 'publish'\n ];\n $custom_posts = get_posts($args);\n foreach ($custom_posts as $post) : setup_postdata($post);\n $link = str_replace(home_url(), '', get_permalink());\n $selected = '';\n if ($link == $data) {\n $selected = 'selected';\n }\n\n $html .= '<option value=\"' . $link . '\" ' . $selected . '>' . get_the_title() . '</option>';\n endforeach;\n wp_reset_postdata();\n\n $html .= '</select><p class=\"description\">' . $v['description'] . '</p>' . \"\\n\";\n $html .= '</td><tr/>' . \"\\n\";\n } elseif ($type == 'select') {\n $html .= '<tr valign=\"top\"><th scope=\"row\"><label for=\"' . esc_attr($k) . '\">' . $v['name'] . '</label></th><td>';\n $html .= '<select style=\"width:100%\" name=\"' . esc_attr($k) . '\" id=\"' . esc_attr($k) . '\">';\n foreach ($v['options'] as $option) {\n $selected = '';\n if ($option == $data) {\n $selected = 'selected';\n }\n\n $html .= '<option value=\"' . $option . '\" ' . $selected . '>' . ucfirst($option) . '</option>';\n }\n $html .= '</select>';\n if ($k == 'area') {\n $area_custom_val = '';\n if (isset($fields['area_custom'])) {\n $area_custom_val = 'value=\"' . esc_attr($fields['area_custom'][0]) . '\"';\n }\n $html .= '<input type=\"text\" name=\"area_custom\" id=\"area_custom\" ' . $area_custom_val . ' placeholder=\"Your Custom Area\" style=\"width:100%;display:none;\">';\n }\n $html .= '<p class=\"description\">' . $v['description'] . '</p>' . \"\\n\";\n $html .= '</td><tr/>' . \"\\n\";\n } elseif ($type == 'upload') {\n $html .= '<tr valign=\"top\"><th scope=\"row\"><label for=\"' . esc_attr($k) . '\">' . $v['name'] . '</label></th><td><input type=\"button\" class=\"button\" id=\"upload_media_file_button\" value=\"' . __('Upload Image', $this->token) . '\" data-uploader_title=\"Choose an image\" data-uploader_button_text=\"Insert image file\" /><input name=\"' . esc_attr($k) . '\" type=\"text\" id=\"upload_media_file\" class=\"regular-text\" value=\"' . esc_attr($data) . '\" />' . \"\\n\";\n $html .= '<p class=\"description\">' . $v['description'] . '</p>' . \"\\n\";\n $html .= '</td><tr/>' . \"\\n\";\n } elseif ($type == 'hidden') {\n $html .= '';\n } else {\n $default_color = '';\n $html .= '<tr valign=\"top\"><th scope=\"row\"><label for=\"' . esc_attr($k) . '\">' . $v['name'] . '</label></th><td>';\n $html .= '<input name=\"' . esc_attr($k) . '\" id=\"primary_color\" class=\"quiz-color\" type=\"text\" value=\"' . esc_attr($data) . '\"' . $default_color . ' />';\n $html .= '<p class=\"description\">' . $v['description'] . '</p>' . \"\\n\";\n $html .= '</td><tr/>' . \"\\n\";\n }\n\n $html .= '</td><tr/>' . \"\\n\";\n }\n\n $html .= '</tbody>' . \"\\n\";\n $html .= '</table>' . \"\\n\";\n }\n\n echo $html;\n }", "function mobile_kiosk_post_meta_boxes_setup() {\n\t// hook adding the meta boxes \n\tadd_action( 'add_meta_boxes', 'mobile_kiosk_add_post_meta_boxes' );\n\t\n\t// Hook saving the meta boxes\n\tadd_action('save_post', 'mobile_kiosk_save_post_meta_boxes', 10, 2);\n}", "function rs_meta_box()\n{\n add_meta_box('rs_focus', 'Destaque na home', 'rs_focus', 'post', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'post', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'post_region', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'event', 'side');\n}", "function add_your_fields_meta_box(){\r\nadd_meta_box(\r\n'your_fields_meta_box',// $id\r\n'Auteur',// $title\r\n'show_your_fields_meta_box',// $callback\r\n'Livre',// $screen\r\n'normal',// $context\r\n'high'// $priority\r\n);\r\n}", "public function registerMetaBox() {\n\n add_meta_box(\n 'post-clone',\n 'Clone',\n array($this, 'buildForm'),\n self::$post_types,\n 'side',\n 'low');\n }", "public function add_meta_boxes()\n \t{\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('wp_plugin_template_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray($this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\t\t\t\t\n \t}", "function post_custom_meta_box($post)\n {\n }", "function toolbox_portfolio_meta_boxes_setup() {\n /* Add meta boxes on the 'add_meta_boxes' hook. */\n add_action( 'add_meta_boxes', 'toolbox_add_portfolio_meta_box' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'toolbox_portfolio_save_info', 10, 2 );\n}", "function fzproject_meta_box()\n{\n add_meta_box('fzproject_meta_box', 'New portfolio item', 'display_fzproject_meta_box', 'fzproject_post', 'normal', 'high');\n}", "function create_meta_box() {\n\n\tglobal $postmetas;\n\t\n\tif(!isset($_GET['post_type']) OR empty($_GET['post_type']))\n\t{\n\t\tif(isset($_GET['post']) && !empty($_GET['post']))\n\t\t{\n\t\t\t$post_obj = get_post($_GET['post']);\n\t\t\t$_GET['post_type'] = $post_obj->post_type;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_GET['post_type'] = 'post';\n\t\t}\n\t}\n\t\n\tif ( function_exists('add_meta_box') && isset($postmetas) && count($postmetas) > 0 ) { \n\t\tforeach($postmetas as $key => $postmeta)\n\t\t{\n\t\t\tif($_GET['post_type']==$key)\n\t\t\t{\n\t\t\t\tadd_meta_box( 'metabox', ucfirst($key).' Options', 'new_meta_box', $key, 'side', 'high' ); \n\t\t\t}\n\t\t}\n\t}\n\n}", "function quiz_add_meta_boxes( $post ){\n\tadd_meta_box( 'quiz_meta_box', __( 'Quiz settings', 'random-timed-quiz' ), 'build_meta_box', 'random-timed-quiz', 'normal', 'high' );\t\n}", "public function sailthru_post_metabox() {\n\n\t\tadd_meta_box(\n\t\t\t'sailthru-post-data',\n\t\t\t__( 'Sailthru Post Data', 'sailthru' ),\n\t\t\tarray( $this, 'post_metabox_display' ),\n\t\t\t'post',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\n\t}", "private function initMetaBox(){\n\t\t$path = get_template_directory() . '/sub/customfield/';\n\t\tif(function_exists('of_get_option')){\n\t\t\tif(of_get_option('is-seo',true)){\n\t\t\t\tnew WPO_MetaBox(array(\n\t\t\t\t 'id' => 'wpo_seo',\n\t\t\t\t 'title' => $this->l('SEO Fields'),\n\t\t\t\t 'types' => array('page','portfolio','post','video'),\n\t\t\t\t 'priority' => 'high',\n\t\t\t\t 'template' => $path . 'seo.php',\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_template',\n\t\t 'title' => $this->l('Advanced Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page-advanced.php'\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_pageconfig',\n\t\t 'title' => $this->l('Page Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page.php',\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_post',\n\t\t 'title' => $this->l('Embed Options'),\n\t\t 'types' => array('post','video'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'post.php',\n\t\t));\n\t}", "function add_meta_boxes($post_type, $post)\n {\n }", "public function add_meta_boxes()\n \t{\n\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('WP_Custom_Login_Profile_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray(&$this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\n\n \t}", "public function register_meta() {\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tadd_meta_box( 'ecf-'.$customField['name'], __( $customField['title'], 'exlist' ), $customField['callback'], $postTypes , 'advanced', 'high', $type = array($customField['name'], $customField['title'], $customField['type']) );\r\n\t\t\t}\r\n }", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "function thd_re_post_meta_box_fields() {\n\t$prefix = 're_';\n\n\t$fields = array(\n\t\tarray( // Post ID select box\n\t\t\t'label'\t=> 'Associated Issue', // <label>\n\t\t\t'id'\t=> $prefix.'assoc_issue_id', // field id and name\n\t\t\t'type'\t=> 'post_list', // type of field\n\t\t\t'post_type' => array('issue') // post types to display, options are prefixed with their post type\n\t\t),\n\t\t\n\t\tarray( // Repeatable & Sortable Text inputs\n\t\t\t'label'\t=> 'References', // <label>\n\t\t\t'desc'\t=> 'Click + to add multiple references', // description\n\t\t\t'id'\t=> $prefix.'repeatable', // field id and name\n\t\t\t'type'\t=> 'repeatable' // type of field\n\t\t),\n\t\t\n\t\tarray( // Single checkbox\n\t\t\t'label'\t=> 'Show Author Bio', // <label>\n\t\t\t'desc'\t=> 'Tick to show author bio', // description\n\t\t\t'id'\t=> $prefix.'show_author', // field id and name\n\t\t\t'type'\t=> 'checkbox' // type of field\n\t\t),\n\t\t\n\t\tarray( // Image ID field\n\t\t\t'label'\t=> 'Author Thumbnail', // <label>\n\t\t\t'desc'\t=> 'Upload author thumbnail image, 100px x 100px', // description\n\t\t\t'id'\t=> $prefix.'author_thumb', // field id and name\n\t\t\t'type'\t=> 'image' // type of field\n\t\t),\n\t\t\n\t\tarray( // Text Input\n\t\t\t'label'\t=> 'Author Name', // <label>\n\t\t\t'desc'\t=> 'Insert author name here', // description\n\t\t\t'id'\t=> $prefix.'author_name', // field id and name\n\t\t\t'type'\t=> 'text' // type of field\n\t\t),\n\t\t\n\t\tarray( // Text Input\n\t\t\t'label'\t=> 'Author Url', // <label>\n\t\t\t'desc'\t=> 'Insert author url here', // description\n\t\t\t'id'\t=> $prefix.'author_url', // field id and name\n\t\t\t'type'\t=> 'text' // type of field\n\t\t),\n\t\t\n\t\tarray( // Textarea\n\t\t\t'label'\t=> 'Author Bio', // <label>\n\t\t\t'desc'\t=> 'A short bio for the author', // description\n\t\t\t'id'\t=> $prefix.'author_bio', // field id and name\n\t\t\t'type'\t=> 'textarea' // type of field\n\t\t)\n\t);\n\n\treturn $fields;\n}", "public function addCustomBox() {\n add_meta_box( \n $this->post_type . '_meta',\n __( self::getLabel($this->post_type) . ' Meta', $this->post_type . '_meta' ),\n array($this, 'innerCustomBox'),\n $this->post_type,\n $this->fields_location, \n $this->fields_priority\n ); \n }", "public function register_meta_box() {\n\n\t\t\tadd_meta_box($this->slug, $this->options['title'], array($this, 'setup_meta_box'), $this->screen, $this->options['context'], $this->options['priority']);\n\t\t\tremove_meta_box('postcustom', $this->screen, 'normal');\n\t\t}", "function ilusix_my_custom_meta_box() {\n global $myMetaBoxPostTypes;\n\n foreach($myMetaBoxPostTypes as $postType) {\n add_meta_box(\n 'my_custom_meta_box_identifier' . '-' . $postType,\n 'Meta box title',\n 'ilusix_my_custom_meta_box_callback',\n $postType,\n 'normal',\n 'default'\n );\n }\n}", "function create_meta_box() {\r\r\n global $key;\r\r\n\r\r\n if( function_exists( 'add_meta_box' ) ) {\r\r\n add_meta_box( 'new-page-boxes', ' Page Options', 'page_meta_boxes', 'page', 'normal', 'high' );\r\r\n add_meta_box( 'new-portfolio-boxes', ' Portfolio Options', 'portfolio_meta_boxes', 'portfolio', 'normal', 'high' );\r\r\n add_meta_box( 'new-slideshow-boxes', ' Slideshow Options', 'slideshow_meta_boxes', 'slideshow', 'normal', 'high' );\r\r\n add_meta_box( 'new-post-boxes', ' Post Options', 'post_meta_boxes', 'post', 'normal', 'high' );\r\r\n }\r\r\n}", "public function render_meta_box_content( $post ) {\n\n\t\t// Add an nonce field so we can check for it later.\n\t\twp_nonce_field( 'customify_page_settings', 'customify_page_settings_nonce' );\n\t\t$values = array();\n\t\tforeach ( $this->field_builder->get_all_fields() as $key => $f ) {\n\t\t\tif ( 'multiple_checkbox' == $f['type'] ) {\n\t\t\t\tforeach ( (array) $f['choices'] as $_key => $label ) {\n\t\t\t\t\t$value = get_post_meta( $post->ID, '_customify_' . $_key, true );\n\t\t\t\t\t$values[ $_key ] = $value;\n\t\t\t\t}\n\t\t\t} elseif ( $f['name'] ) {\n\t\t\t\t$values[ $f['name'] ] = get_post_meta( $post->ID, '_customify_' . $f['name'], true );\n\t\t\t}\n\t\t}\n\n\t\t$this->field_builder->set_values( $values );\n\t\t$this->field_builder->render();\n\n\t}", "function add_meta_box() {\t\t\n\t\t\t/* Gets available public post types. */\n\t\t\t$post_types = get_post_types( array( 'public' => true ), 'objects' );\n\t\t\t\n\t\t\t$post_types = apply_filters( 'remove_youtube_white_label_meta_box', $post_types );\n\t\t\t\n\t\t\t/* For each available post type, create a meta box on its edit page if it supports '$prefix-post-settings'. */\n\t\t\tforeach ( $post_types as $type ) {\n\t\t\t\t/* Add the meta box. */\n\t\t\t\tadd_meta_box( self::DOMAIN . \"-{$type->name}-meta-box\", __( 'YouTube Embed Shortcode Creator (does not save meta)', self::DOMAIN ), array( $this, 'meta_box' ), $type->name, 'side', 'default' );\n\t\t\t}\n\t\t}", "function bluewhale_meta_box_setup() {\n add_action('add_meta_boxes', 'bluewhale_meta_box');\n\n /* Adds Save meta box function to 'save post meta' hook */\n add_action('save_post', 'bluewhale_save_meta', 10, 2);\n}", "function bnk_build_slide_metabox() {\r\n\tglobal $slide_meta, $post;\r\n\r\n\t// Use nonce for verification\r\n\techo '<input type=\"hidden\" name=\"bnk_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\r\n \r\n\techo '<table class=\"form-table\">';\r\n \r\n\tforeach ($slide_meta['fields'] as $field) {\r\n\t\t// get current post meta data\r\n\t\t$meta = get_post_meta($post->ID, $field['id'], true);\r\n\t\tswitch ($field['type']) {\r\n\t\t\t\r\n\t\t\t//If Text\t\t\r\n\t\t\tcase 'text':\r\n\t\t\t\r\n\t\t\techo '<tr style=\"border-top:1px solid #eeeeee;\">',\r\n\t\t\t\t'<th style=\"width:38%\"><label for=\"', $field['id'], '\"><strong>', $field['name'], '</strong><span style=\" display:block; color:#666; line-height: 1.6; margin:4px 0;\">'. $field['desc'].'</span></label></th>',\r\n\t\t\t\t'<td>';\r\n\t\t\techo '<input type=\"text\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" value=\"', $meta ? $meta : stripslashes(htmlspecialchars(( $field['std']), ENT_QUOTES)), '\" size=\"30\" style=\"width:95%; margin-right: 20px; float:left;\" />';\r\n\t\t\tbreak;\r\n \r\n\t\t}\r\n\r\n\t}\r\n \r\n\techo '</table>';\r\n}", "public function kiwip_add_meta_box(){\t\t\t\n\t\tadd_meta_box(\n\t\t\t$this->id,\n\t\t\t$this->title,\n\t\t\tarray(&$this, 'kiwip_metabox_callback'),\n\t\t\t$this->cpt_name,\n\t\t\t$this->context,\n\t\t\t$this->priority\n\t\t);\n\t}", "function bnk_create_slide_metabox() {\r\n\tglobal $slide_meta;\r\n \r\n\tadd_meta_box($slide_meta['id'], $slide_meta['title'], 'bnk_build_slide_metabox', $slide_meta['page'], $slide_meta['context'], $slide_meta['priority']);\r\n}", "function wpbootstrap_post_meta_boxes_setup() {\r\n\t\r\n\t/* Add meta boxes on the 'add_meta_boxes' hook. */\r\n\tadd_action( 'add_meta_boxes', 'wpbootstrap_add_post_meta_boxes' );\r\n\r\n\t/* Save the wpbootstrap_components meta on 'save_post' hook. */\r\n\tadd_action( 'save_post', 'wpbootstrap_components_save_meta', 10, 2 );\r\n}", "public function add_meta_boxes() {\n\t\tadd_meta_box(\n\t\t\t$this->plugin_slug . '-post-metabox',\n\t\t\tesc_html__( 'Review Settings', $this->plugin_slug ),\n\t\t\tarray( $this, 'review_settings_view' ),\n\t\t\t'post',\n\t\t\t'normal',\n\t\t\t'core'\n \t \t);\n\t}", "function ncl_post_meta_boxes_setup() {\n\n\t/* Add meta boxes on the 'add_meta_boxes' hook. */\n\tadd_action( 'add_meta_boxes', 'ncl_add_post_meta_boxes' );\n\n\t/* Save post meta on the 'save_post' hook. */\n\tadd_action( 'save_post', 'ncl_save_current_location_meta', 10, 2 );\n}", "function wck_settings_page_add_meta_boxes() {\r\n global $post;\r\n\t\tdo_action( 'add_meta_boxes', $this->hookname, $post );\r\n\t}", "function sp_add_custom_box() {\n\tif( function_exists( 'add_meta_box' )) {\n\t\tadd_meta_box( 'sp_custom_box_1', __( 'General Property Info', 'sp' ), 'sp_inner_custom_box_1', 'post', 'normal', 'high' );\n\t\tadd_meta_box( 'sp_custom_box_2', __( 'Property Details', 'sp' ), 'sp_inner_custom_box_2', 'post', 'normal', 'high' );\n\t\tadd_meta_box( 'sp_custom_box_3', __( 'Property Photos', 'sp' ), 'sp_inner_custom_box_3', 'post', 'normal', 'high' );\n\t}\n}", "public function meta_boxes() {\n\n\t\t// Add TEAM Assignemtns meta box into Team custom post type.\n\t\tadd_meta_box(\n\t\t\t'wpcd_team_detail',\n\t\t\t__( 'Team Assignments', 'wpcd' ),\n\t\t\tarray( $this, 'render_team_details_meta_box' ),\n\t\t\t'wpcd_team',\n\t\t\t'advanced',\n\t\t\t'low'\n\t\t);\n\n\t}", "public function add_meta_box($title, $fields = array(), $context = 'normal', $priority = 'default'){\r\n if( ! empty( $title ) ){\r\n // We need to know the Post Type name again\r\n $post_type_name = $this->post_type_name;\r\n\r\n // Meta variables\r\n $box_id = strtolower( str_replace( ' ', '_', $title ) );\r\n $box_title = ucwords( str_replace( '_', ' ', $title ) );\r\n $box_context = $context;\r\n $box_priority = $priority;\r\n\r\n // Make the fields global\r\n global $custom_fields;\r\n $custom_fields[$title] = $fields;\r\n\r\n add_action( 'admin_init',\r\n function() use( $box_id, $box_title, $post_type_name, $box_context, $box_priority, $fields ){\r\n add_meta_box(\r\n $box_id,\r\n $box_title,\r\n function( $post, $data ){\r\n global $post;\r\n\r\n // Nonce field for some validation\r\n wp_nonce_field( plugin_basename( __FILE__ ), 'custom_post_type' );\r\n\r\n // Get all inputs from $data\r\n $custom_fields = $data['args'][0];\r\n\r\n // Get the saved values\r\n $meta = get_post_custom( $post->ID );\r\n\r\n // Check the array and loop through it\r\n if( ! empty( $custom_fields ) ){\r\n /* Loop through $custom_fields */\r\n\r\n echo '<table>';//start table before loop\r\n\r\n foreach( $custom_fields as $label => $type ){\r\n\r\n $field_id_name = strtolower( str_replace( ' ', '_', $data['id'] ) ) . '_' . strtolower( str_replace( ' ', '_', $label ) );\r\n echo '<tr><td><label for=\"' . $field_id_name . '\">' . $label . '</label></td><td><input type=\"text\" name=\"custom_meta[' . $field_id_name . ']\" id=\"' . $field_id_name . '\" value=\"' . $meta[$field_id_name][0] . '\" /></td>';\r\n }\r\n\r\n echo '</table>';//end table after loop\r\n }\r\n\r\n },\r\n $post_type_name,\r\n $box_context,\r\n $box_priority,\r\n array( $fields )\r\n );\r\n }\r\n );\r\n }\r\n }", "function registry_post_meta_boxes_setup() {\n\n /* Add meta boxes on the 'add_meta_boxes' hook. */\n add_action( 'add_meta_boxes', 'registry_add_post_meta_boxes', 1 );\n\n /* Save post info meta on the 'save_post' hook. */\n add_action( 'save_post', 'registry_save_coz_info_meta', 10, 2 );\n \n /* Save post info meta on the 'save_post' hook. */\n add_action( 'save_post', 'registry_save_coz_num_meta', 10, 2 );\n \n}", "function formulize_meta_box() {\n\t\tadd_meta_box('formulize_sectionid',\n\t __('Formulize', 'formulize_textlabel'),\n\t 'formulize_inner_custom_box',\n\t 'page'\n\t\t);\n}", "function myplugin_inner_custom_box( $post ) {\n\t\t\n\t\t // Use nonce for verification\n\t\t wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );\n\t\t\n\t\t // The actual fields for data entry\n\t\t // Use get_post_meta to retrieve an existing value from the database and use the value for the form\n\t\t $value = get_post_meta( $_POST['post_ID'], $key = '_my_meta_value_key', $single = true );\n\t\t echo '<label for=\"myplugin_new_field\">';\n\t\t _e(\"Description for this field\", 'myplugin_textdomain' );\n\t\t echo '</label> ';\n\t\t echo '<input type=\"text\" id=\"myplugin_new_field\" name=\"myplugin_new_field\" value=\"'.$value.'\" size=\"25\" />';\n\t\t}", "function coolRahulSoni_meta_box_add()\n{\n add_meta_box( 'my-meta-box-id', 'My First Meta Box', 'cd_meta_box_cb', 'post', 'normal', 'high' );\n}", "public function register_meta_box( $post ) {\n\t\tadd_meta_box(\n\t\t\t$this->meta_box['id'],\n\t\t\t$this->meta_box['title'],\n\t\t\t[$this, 'render_meta_box'],\n\t\t\t$this->post_type,\n\t\t\t$this->meta_box['context'],\n\t\t\t$this->meta_box['priority']\n\t\t);\n\t}", "function tabify_add_meta_boxes($post_type)\n {\n }", "public function setup_meta_box() {\n\t\t\tadd_meta_box( 'add-shortcode-section', __( 'Shortcode', IFLANG ), array( $this, 'meta_box' ), 'nav-menus', 'side', 'high' );\n\t\t}", "function scalia_slides_register_meta_box($post) {\r\r\n\tremove_meta_box('postimagediv', 'scalia_slide', 'side');\r\r\n\tadd_meta_box('postimagediv', __('Slide Image', 'scalia'), 'post_thumbnail_meta_box', 'scalia_slide', 'normal', 'high');\r\r\n\tadd_meta_box('scalia_slide_settings', __('Slide Settings', 'scalia'), 'scalia_slide_settings_box', 'scalia_slide', 'normal', 'high');\r\r\n}", "function civ_meta_box() {\n\n\tadd_meta_box( 'my box', 'Civ Slider','show_my_meta_box', 'post' );\n\n\tfunction show_my_meta_box( $post ) {\n\t\t//\tThis will count the amount of slides total to insert for the slide order .\n\t\t\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . 'civ_slider';\n\t\t$row_count = $wpdb->get_var( 'select count(*) from $table_name' );\n\t\t$slide_count = $row_count + 1;\n\t\t$post_id_check = $post->ID;\n\n\t\t$box_check = $wpdb->get_row($wpdb->prepare(\"select * from $table_name where post_id=%d\", $post_id_check));\n?>\n\t<form method=\"post\" >\n\t\t<label>Check here to add post to homepage slider: </label>\n\t\t<input type=\"checkbox\" name=\"chkd\" <?php if($box_check != null ){echo \"checked\";} ?> />\n\t\t<input type=\"hidden\" value=\"<?php echo $post->ID; ?>\" name=\"post_id\" />\n\t\t<input type=\"hidden\" value=\"<?php echo $slide_count; ?>\" name=\"slide_order\" />\n\t</form>\n\t\t<?php\n\t}\n}", "public function add_meta_box_callback( $post ) {\n\t\twp_nonce_field( $this->idMetaBox.'_data', $this->idMetaBox.'_nonce' );\n\t\t$this->generate_fields( $post );\n\t}", "public static function add_meta_box() {\n add_meta_box(\n 'link_meta', // Unique ID\n 'Properties', // Box title\n [self::class, 'meta_html'], // Content callback, must be of type callable\n \"link\" // Post type\n );\n }", "public function registerMetaBoxes()\n\t {\n\t \t$dataMetas = self::getDataMetas();\n\n\t \tif ( !empty($dataMetas) ) {\n\t \t\tforeach ($dataMetas as $key => $meta) {\n\t \t\t\t/* CHECK IF HAS PAGES */\n\t \t\t\tif ( isset($meta[\"_pages\"]) && !empty($meta[\"_pages\"][0]) ) {\n\t \t\t\t\tself::createMetasPages($meta);\n\t \t\t\t}\n\n\t \t\t\t/* POSTS TYPES REGISTER METAS */\n\t \t\t\tif ( isset($meta[\"_posts_types\"]) && !empty($meta[\"_posts_types\"][0]) ) {\n\t \t\t\t\tself::createMetasPostTypes($meta);\n\t \t\t\t}\n\n\t \t\t\t/* CHECK IF ALL POSTS IS true */\n\t \t\t\tif ( isset($meta[\"_all_posts\"]) && $meta['_all_posts'] == 'yes' ) {\n\t \t\t\t\tself::createMetasPosts($meta);\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\n\t }", "function df_meta_boxes( ) {\n\t\tglobal $post, $df_box_objects;\n\t\tforeach( $df_box_objects as $df_box ) {\n\t\t\t\n\t\t\t//Get current post type. If is a revision - get parent post type.\n\t\t\t$post_type = get_post_type( $post->ID );\n\t\t\tif( $post_type == 'revision' ) {\n\t\t\t\tglobal $post;\n\t\t\t\t$post_type = get_post_type( $post->post_parent );\n\t\t\t}\t\t\n\t\t\t\n\t\t\tif( in_array( $post_type, $df_box->post_types ) ) :\n\t\t\t\tforeach( $df_box->post_types as $post_type ) {\n\t\t\t\t\tadd_meta_box( $df_box->id . \"_box\", $df_box->title, 'df_meta_fields', $post_type, 'side', 'low', $df_box );\n\t\t\t\t}\n\t\t\tendif;\n\t\t}\n\t}", "public function add_meta_boxes() {\n\t\t// Create the Slide Meta Boxes\n\t\tadd_meta_box( 'justart-slider-slide-settings-group', 'Slides', array( $this, 'create_slide_settings_meta_box' ), 'justart-slider', 'normal', 'default' );\n\t\tadd_filter( 'postbox_classes_justart-slider-slide-settings-group', array( $this, 'add_metabox_classes' ) );\n\t\t\n\t\t// Create the Shortcode Meta Box\n\t\tadd_meta_box( 'justart-slider-shortcode-group', 'Shortcode', array( $this, 'create_shortcode_meta_box' ), 'justart-slider', 'side', 'high' );\n\t\t\n\t\t// Create the Global Settings Meta Box\n\t\tadd_meta_box( 'justart-slider-global-settings-group', 'Global settings', array( $this, 'create_global_settings_meta_box' ), 'justart-slider', 'side', 'default' );\n\t}", "public function apb_add_meta_boxes() {\r\n\t}", "function sm_custom_meta() {\n\tadd_meta_box('sm_meta', __( 'Post Destacado', 'sm-textdomain' ), 'sm_meta_callback', 'post' );\n}", "function add_post_meta_boxes() {\n\n\t\t\tadd_meta_box(\n\t\t\t\t'video-post', // Unique ID\n\t\t\t\tesc_html__( 'Video Post' ), // Title\n\t\t\t\tarray( 'VWvideoShare', 'post_meta_box'), // Callback function\n\t\t\t\t'video', // Admin page (or post type)\n\t\t\t\t'normal', // Context\n\t\t\t\t'high' // Priority\n\t\t\t);\n\t\t}", "function add_meta_boxes()\n {\n }", "function wp_create_initial_post_meta()\n {\n }", "function mytheme_show_box() {\n global $post;\n\n // Use nonce for verification\n echo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n \n \n\n $i=0;\n //print_r($this->meta_box['fields']);\n\n $meta_count = get_post_meta($post->ID, 'dbt_text', true);\n for ($i=0;$i<count($meta_count);$i++) {\n echo '<table class=\"form-table elearning_fieldset\">';\n foreach ($this->meta_box['fields'] as $field) {\n // get current post meta data\n // echo $field['id'];\n $meta = get_post_meta($post->ID, $field['id'], true);\n //$count = print_r($meta);\n \n\n \n \n\n echo '<tr>',\n '<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\n '<td>';\n switch ($field['type']) {\n case 'text':\n echo '<input class=\"elearning_field\" type=\"text\" name=\"', $field['id'], '[]\" id=\"', $field['id'], '\" value=\"', $meta[$i] ? $meta[$i] : $field['std'], '\" size=\"30\" style=\"width:97%\" />',\n '<br />', $field['desc'];\n break;\n case 'textarea':\n echo '<textarea class=\"elearning_field\" name=\"', $field['id'], '[]\" id=\"', $field['id'], '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta[$i] ? $meta[$i] : $field['std'], '</textarea>',\n '<br />', $field['desc'];\n break;\n case 'select':\n //print_r($field['options']);\n echo '<select class=\"elearning_field\" name=\"', $field['id'], '[]\" id=\"', $field['id'], '\">';\n foreach ($field['options'] as $option) {\n echo '<option', $meta[$i] == $option ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n }\n echo '</select>';\n break;\n case 'radio':\n foreach ($field['options'] as $option) {\n echo '<input class=\"elearning_field\" type=\"radio\" name=\"', $field['id'], '[]\" value=\"', $option['value'], '\"', $meta[$i] == $option['value'] ? ' checked=\"checked\"' : '', ' />', $option['name'];\n }\n break;\n case 'checkbox':\n echo '<input class=\"elearning_field\" type=\"checkbox\" name=\"', $field['id'], '[]\" id=\"', $field['id'], '\"', $meta[$i] ? ' checked=\"checked\"' : '', ' />';\n break;\n }\n echo \t'<td>',\n '</tr>\n';\n }\n echo '\n<tr>\n <td colspan=\"2\" align=\"right\"><a class=\"delete_elearning_item\" href=\"#\">Delete</a></td>\n</tr>\n</table>';\n }\n echo '<a href=\"#\" id=\"new_textbox\">New Textbox</a>';\n\n \n }", "public function register_meta_box() {\r\n add_meta_box( self::POST_TYPE . '-meta', 'Downloadable Resource URL', array ($this, 'meta_box_html'), self::POST_TYPE, 'side', 'default', '');\r\n }", "function mobile_kiosk_add_post_meta_boxes() {\n\t\n\t// Gallery Options\n\tadd_meta_box(\n\t\t'gallery-options',\n\t\tesc_html__( 'Gallery Options', 'gallery-options' ),\n\t\t'mobile_kiosk_gallery_options_meta_box', \n\t\t'kioskgallery', \n\t\t'normal', \n\t\t'high' \n\t);\n\t\n\t// Gallery Slides\n\tadd_meta_box(\n\t\t'gallery-slides',\n\t\tesc_html__( 'Gallery Slides', 'gallery-slides' ),\n\t\t'mobile_kiosk_gallery_slides_meta_box', \n\t\t'kioskgallery', \n\t\t'normal', \n\t\t'low' \n\t);\n\t\n}", "function mytheme_show_box() {\r\n global $meta_box, $post;\r\n \r\n // Use nonce for verification\r\n echo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\r\n \r\n echo '<table class=\"form-table\">';\r\n\r\n foreach ($meta_box['fields'] as $field) {\r\n // get current post meta data\r\n $meta = get_post_meta($post->ID, $field['id'], true);\r\n \r\n echo '<tr>',\r\n '<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\r\n '<td>';\r\n switch ($field['type']) {\r\n case 'textarea':\r\n echo '<textarea name=\"', $field['id'], '\" id=\"', $field['id'], '\" cols=\"60\" rows=\"8\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>', '<br />', $field['desc'];\r\n break;\r\n }\r\n echo '<td>',\r\n '</tr>';\r\n }\r\n \r\n echo '</table>';\r\n}", "public function meta_box() {\r\n\t\tglobal $post;\r\n\t\t\r\n\t\t// \r\n\t\tif ( isset( $_GET['post'] ) )\r\n\t\t\t$post_ID = (int) $_GET['post'];\r\n\t\telse\r\n\t\t\t$post_ID = '';\r\n\r\n\t\tforeach( $this->post_meta as $key => $value ) {\r\n\t\t\tif (\r\n\t\t\t\t'previous_start' == $key ||\r\n\t\t\t\t'previous_end' == $key ||\r\n\t\t\t\t'total_start' == $key ||\r\n\t\t\t\t'total_end' == $key\r\n\t\t\t) {\r\n\t\t\t\t$time_value = get_post_meta( $post_ID, '_' . $key, true );\r\n\t\t\t\t$time = date( 'h:m d M Y', $time_value );\r\n\t\t\t} else {\r\n\t\t\t\t$time = '';\r\n\t\t\t}\r\n\r\n\t\t\techo '\r\n\t\t\t<p>\r\n\t\t\t\t<label for=\"_' . $key . '\">' . $value . '</label>\r\n\t\t\t\t<br />\r\n\t\t\t\t<input type=\"text\" name=\"_' . $key . '\" id=\"_' . $key . '\" value=\"' . get_post_meta( $post_ID, '_' . $key, true ) . '\" />\r\n\t\t\t\t<br />\r\n\t\t\t\t<small>' . $time . '</small>\r\n\t\t\t</p>';\r\n\t\t\tunset( $time );\r\n\t\t}\r\n\t}", "function post_meta_boxes_setup() {\n\n\t\tadd_action( 'add_meta_boxes', array($this, 'add_post_meta_boxes') );\n\t}", "function myplugin_add_custom_box() {\n\t\t add_meta_box( \n\t\t 'myplugin_sectionid',\n\t\t __( 'My Post Section Title', 'myplugin_textdomain' ),\n\t\t 'myplugin_inner_custom_box',\n\t\t 'wpflexslider' \n\t\t );\n\t\t add_meta_box(\n\t\t 'myplugin_sectionid',\n\t\t __( 'My Post Section Title', 'myplugin_textdomain' ), \n\t\t 'myplugin_inner_custom_box',\n\t\t 'page'\n\t\t );\n\t\t add_meta_box('wpt_events_location', 'Event Location', 'wpt_events_location', 'events', 'side', 'default');\n\t\t}", "public function meta_box_form_items() {\n\t\t$vfb_post = '';\n\t\t// Run Create Post add-on\n\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) )\n\t\t\t$vfb_post = new VFB_Pro_Create_Post();\n\t?>\n\t\t<div class=\"taxonomydiv\">\n\t\t\t<p><strong><?php _e( 'Click or Drag' , 'visual-form-builder-pro'); ?></strong> <?php _e( 'to Add a Field' , 'visual-form-builder-pro'); ?> <img id=\"add-to-form\" alt=\"\" src=\"<?php echo admin_url( '/images/wpspin_light.gif' ); ?>\" class=\"waiting spinner\" /></p>\n\t\t\t<ul class=\"posttype-tabs add-menu-item-tabs\" id=\"vfb-field-tabs\">\n\t\t\t\t<li class=\"tabs\"><a href=\"#standard-fields\" class=\"nav-tab-link vfb-field-types\"><?php _e( 'Standard' , 'visual-form-builder-pro'); ?></a></li>\n\t\t\t\t<li><a href=\"#advanced-fields\" class=\"nav-tab-link vfb-field-types\"><?php _e( 'Advanced' , 'visual-form-builder-pro'); ?></a></li>\n\t\t\t\t<?php\n\t\t\t\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) && method_exists( $vfb_post, 'form_item_tab' ) )\n\t\t\t\t\t\t$vfb_post->form_item_tab();\n\t\t\t\t?>\n\t\t\t</ul>\n\t\t\t<div id=\"standard-fields\" class=\"tabs-panel tabs-panel-active\">\n\t\t\t\t<ul class=\"vfb-fields-col-1\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-fieldset\">Fieldset</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-text\"><b></b>Text</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-checkbox\"><b></b>Checkbox</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-select\"><b></b>Select</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-datepicker\"><b></b>Date</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-url\"><b></b>URL</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-digits\"><b></b>Number</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-phone\"><b></b>Phone</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-file\"><b></b>File Upload</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class=\"vfb-fields-col-2\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-section\">Section</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-textarea\"><b></b>Textarea</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-radio\"><b></b>Radio</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-address\"><b></b>Address</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-email\"><b></b>Email</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-currency\"><b></b>Currency</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-time\"><b></b>Time</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-html\"><b></b>HTML</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-instructions\"><b></b>Instructions</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div> <!-- #standard-fields -->\n\t\t\t<div id=\"advanced-fields\"class=\"tabs-panel tabs-panel-inactive\">\n\t\t\t\t<ul class=\"vfb-fields-col-1\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-username\"><b></b>Username</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-hidden\"><b></b>Hidden</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-autocomplete\"><b></b>Autocomplete</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-min\"><b></b>Min</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-range\"><b></b>Range</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-name\"><b></b>Name</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-likert\"><b></b>Likert</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class=\"vfb-fields-col-2\">\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-password\"><b></b>Password</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-color\"><b></b>Color Picker</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-ip\"><b></b>IP Address</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-max\"><b></b>Max</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-pagebreak\"><b></b>Page Break</a></li>\n\t\t\t\t\t<li><a href=\"#\" class=\"vfb-draggable-form-items\" id=\"form-element-rating\"><b></b>Rating</a></li>\n\t\t\t\t</ul>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div> <!-- #advanced-fields -->\n\t\t\t<?php\n\t\t\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) && method_exists( $vfb_post, 'form_items' ) )\n\t\t\t\t\t$vfb_post->form_items();\n\t\t\t?>\n\t\t</div> <!-- .taxonomydiv -->\n\t\t<div class=\"clear\"></div>\n\t<?php\n\t}", "public static function add_meta_boxes_post($post) {\n add_meta_box(\"medium\", \"Medium\", array(\"Medium_Admin\", \"meta_box_callback\"),\n null, \"side\", \"high\");\n }", "public function register_meta_boxes()\n {\n }", "function add_meta_box() {\n global $post;\n\n $post_types = get_post_types( array( 'public' => true ) );\n\n if ( !empty( $post ) ) {\n if ( $this->check_user_analytics_exist( $post ) ) {\n foreach ( $post_types as $post_type ) {\n add_meta_box( 'show_user_analytics', __( 'Post Author Analytics Info', 'wpuf-pro' ), array( $this, 'render_meta_box_content' ), $post_type, 'advanced', 'high' );\n }\n }\n }\n }", "function post_meta_boxes_setup() {\n\t\t\t/* Add meta boxes on the 'add_meta_boxes' hook. */\n\t\t\tadd_action( 'add_meta_boxes', array( 'VWvideoShare', 'add_post_meta_boxes' ) );\n\n\t\t\t/* Save post meta on the 'save_post' hook. */\n\t\t\tadd_action( 'save_post', array( 'VWvideoShare', 'save_post_meta'), 10, 2 );\n\t\t}", "function _sp_custom_meta_boxes() {\n\t$post_id = ( isset( $_GET['post'] ) ) ? $_GET['post'] : ( isset( $_POST['post_ID'] ) ? $_POST['post_ID'] : '');\n\n\t$template_file = get_post_meta( $post_id, '_wp_page_template', TRUE );\n\n\t/////////////////////////////////////////////////////\n\t// portfolio sort position\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'portfolio-sort-position',\n\t\t__( 'Sort Position', 'sp-theme' ),\n\t\t'_sp_custom_box_portfolio_sort_position',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// slider carousel shortcode\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'carousel-shortcode',\n\t\t__( 'Carousel Shortcode', 'sp-theme' ),\n\t\t'_sp_custom_box_carousel_shortcode',\n\t\t'sp-slider',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// wpautop post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_post',\n\t\t__( 'Auto Content Formating', 'sp-theme' ),\n\t\t'_sp_custom_box_wpautop',\n\t\t'post',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// wpautop page\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_page',\n\t\t__( 'Auto Content Formating', 'sp-theme' ), \n\t\t'_sp_custom_box_wpautop',\n\t\t'page',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// wpatup portfolio\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_portfolio',\n\t\t__( 'Auto Content Formating', 'sp-theme' ), \n\t\t'_sp_custom_box_wpautop',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout page\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\n\t\tadd_meta_box(\n\t\t\t'sp_page_layout',\n\t\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t\t'_sp_custom_box_layout',\n\t\t\t'page',\n\t\t\t'side',\n\t\t\t'low'\n\t\t);\t\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_post_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'post',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout portfolio\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_portfolio_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout product\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_product_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'product',\n\t\t'side',\n\t\t'low'\n\t);\n\n\t// check if SEO enabled\n\tif ( sp_get_option( 'seo_enable', 'is', 'on' ) || ! sp_get_option( 'seo_enable', 'isset' ) ) {\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo post\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'post'\n\t\t);\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo page\n\t\t/////////////////////////////////////////////////////\n\t\t// don't show on maintenance page\n\t\tif ( $template_file !== 'maintenance-page.php' ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'sp_seo_settings',\n\t\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t\t'page'\n\t\t\t);\n\t\t}\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo woo product\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'product'\n\t\t);\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo portfolio\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'sp-portfolio'\n\t\t);\n\t}\n\t\n\t/////////////////////////////////////////////////////\n\t// testimonial submitter\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_testimonial_submitter',\n\t\t__( 'Testimonial Submitter', 'sp-theme' ),\n\t\t'_sp_custom_box_testimonial_settings',\n\t\t'sp-testimonial',\n\t\t'side',\n\t\t'core'\n\t); \n\n\t/////////////////////////////////////////////////////\n\t// advanced page options\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\t\n\t\tadd_meta_box(\n\t\t\t'sp_advanced_page_options',\n\t\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t\t'_sp_custom_box_advanced_page_options',\n\t\t\t'page'\n\t\t);\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// advanced post options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_post_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'post'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// advanced portfolio options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_portfolio_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'sp-portfolio'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// advanced woo product options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_woo_product_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'product'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// contact form shortcode\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-shortcode',\n\t\t__( 'Contact Form Shortcode', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_shortcode',\n\t\t'sp-contact-form',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// contact form general settings\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-settings',\n\t\t__( 'Contact Form Settings', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_settings',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t);\n\t\n\t/////////////////////////////////////////////////////\n\t// contact form content\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-content',\n\t\t__( 'Contact Form Content', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_content',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t); \n\n\t/////////////////////////////////////////////////////\n\t// contact form messages\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-messages',\n\t\t__( 'Contact Form Messages', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_messages',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// page builder page\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\t\n\t\tadd_meta_box(\n\t\t\t'page-builder',\n\t\t\t__( 'Page Builder', 'sp-theme' ),\n\t\t\t'_sp_custom_box_page_builder',\n\t\t\t'page',\n\t\t\t'normal',\n\t\t\t'high'\n\t\t);\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// alternate product image on hover\n\t/////////////////////////////////////////////////////\n\t/*\n\tadd_meta_box(\n\t\t'sp_alternate_product_image',\n\t\t__( 'Alternate Product Image', 'sp-theme' ),\n\t\t'_sp_custom_box_alternate_product_image',\n\t\t'product',\n\t\t'side',\n\t\t'low' \n\t);\n\t*/\n\n\t/////////////////////////////////////////////////////\n\t// custom product tabs\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_custom_product_tabs',\n\t\t__( 'Product Tabs Option', 'sp-theme' ),\n\t\t'_sp_custom_product_tabs',\n\t\t'product',\n\t\t'normal',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// featured video post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_featured_video',\n\t\t__( 'Featured Video', 'sp-theme' ), \n\t\t'_sp_custom_box_featured_video',\n\t\t'post',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// faq sort order\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_faq_order',\n\t\t__( 'Sort Order', 'sp-theme' ), \n\t\t'_sp_custom_box_faq_order',\n\t\t'sp-faq',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\treturn true;\n}", "public function add_meta_box_callback( $post ) {\n\t\twp_nonce_field( 'event_settings_data', 'event_settings_nonce' );\n\t\t$this->generate_fields( $post );\n\t}", "function add_custom_fields_meta_box( $posttypes , $custom_field_set , $custom_field_item )\n\t{\n\t\tif( $custom_field_set == 'sliders' ) \n\t\t\t$this->slider_field_item = $custom_field_item != '' ? $custom_field_item : 'base';\n\t\t\t\n\t\t\tadd_action('add_meta_boxes', function() use( $posttypes, $custom_field_set , $custom_field_item ) {\n\t\t\t\t\t\n\t\t\t\t$custom_field_item_info = include( get_template_directory().'/module/'.$custom_field_set.'/'.$custom_field_item.'/config.details.php' );\n\n\t\t\t\tforeach ($posttypes as $key => $posttype_section ) {\n\t\t\t\t\t\n\t\t\t\t\tadd_meta_box('custom_post_type_section_'.$posttype_section . '-' . $custom_field_item , $custom_field_item_info['title'], function() use( $custom_field_set , $custom_field_item ){\n\n\t\t\t\t\t\t\t$custom_fields = $this->get_fields( $custom_field_set , $custom_field_item );\n\t\t\t\t\t\t\t$data['type'] = $custom_field_item;\n\t\t\t\t\t\t\t$data['dir'] = array('module',$custom_field_set , $custom_field_item , 'admin' ,'views');\n\t\t\t\t\t\t\t$data['view'] = $custom_field_item;\n\t\t\t\t\t\t\t$data['customfields'] = $custom_fields;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tload_view( $data );\n\n\t\t\t\t\t}, $posttype_section );\n\n\t\t\t\t}\n\t\t});\n\n\t\t$this->save_post( $custom_field_set , $custom_field_item );\n\t}", "public function add_meta_box() {\n\t\tadd_meta_box(\n\t\t\t 'related_posts_meta_box'\n\t\t\t,__( 'Related Posts', self::LANG )\n\t\t\t,array( &$this, 'render_meta_box_content' )\n\t\t\t,'post'\n\t\t\t,'advanced'\n\t\t\t,'high'\n\t\t);\n\t}", "function event_date_add_post_meta_boxes() {\n\n\tadd_meta_box(\n\t\t'event-date', // Unique ID\n\t\t'Event Date', // Title\n\t\t'event_date_render_metabox', // Callback function\n\t\t'flaxen_event', // post\n\t\t'normal', // Context\n\t\t'default' // Priority\n\t);\n}", "function weart_post_meta_boxes_setup() {\n add_action( 'add_meta_boxes', 'weart_add_post_meta_boxes' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'weart_save_video_audio_meta', 10, 2 );\n}", "static function metabox($post){\n\t\twp_nonce_field( 'flat-options', 'flat-options_nonce' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\techo '<style>';\n\t\techo '.admin-meta-input{display:block; margin-top: 10px;}';\n\t\techo 'div.field-holder{display: block;float: left; margin: 10px 20px; height: 80px;}';\n\t\techo '.field-block{display: inline-block;clear: both;float: none;}';\n\t\techo '.postbox .inside .field-block h2{padding: 8px 12px;font-weight: 600;font-size: 18px;margin: 0;line-height: 1.4}';\n\t\techo '</style>';\n\t\t\t\t\t\n\t\t$fieldblocks = self::get_fields();\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Licitálással kapcsolatos adatok</h2>';\n\t\tforeach ($fieldblocks['licit'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Hely adatok</h2>';\n\t\tforeach ($fieldblocks['location'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlan adatok és településrendezési előírások</h2>';\n\t\tforeach ($fieldblocks['parameters'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlanjogi jellemzők</h2>';\n\t\tforeach ($fieldblocks['info'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Közművek, energiaellátás, telekommunikáció</h2>';\n\t\tforeach ($fieldblocks['sources'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\n\t\t\t\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Építmény (épület) jellemzői</h2>';\n\t\tforeach ($fieldblocks['building'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\techo \"\n\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\tjQuery('.datepicker').datepicker();\t\n\t\t\t\t});\t\n\t\t\t</script>\t\n\t\t\";\n\t\t\n\t\techo '<br clear=\"all\">';\n\t\t\n }", "public function add_meta_box_callback( $post ) {\n\t\twp_nonce_field( 'scheduled_course_settings_data', 'scheduled_course_settings_nonce' );\n\t\t$this->generate_fields( $post );\n\t}", "function apprenants_build_meta_box($post)\r\n{\r\n wp_nonce_field(basename(__FILE__), 'apprenants_meta_box_nonce');\r\n\r\n // retrieve the _personnes_nom current value\r\n //$current_nom = get_post_meta($post->ID, '_personnes_nom', true);\r\n\r\n // retrieve the _personnes_age current value\r\n $nom = get_post_meta($post->ID, '_apprenants_nom', true);\r\n $prenom = get_post_meta($post->ID, '_apprenants_prenom', true);\r\n $github = get_post_meta($post->ID, '_apprenants_github', true);\r\n $linkedIn = get_post_meta($post->ID, '_apprenants_linkedIn', true);\r\n $portfolio = get_post_meta($post->ID, '_apprenants_portfolio', true);\r\n?>\r\n <div class='inside'>\r\n <h3><?php _e('nom', 'apprenants_example_plugin'); ?></h3>\r\n <p>\r\n <input type=\"text\" name=\"nom\" style=\"width: 30vw\" value=\"<?php echo $nom; ?>\" />\r\n </p>\r\n\r\n <h3><?php _e('prenom', 'apprenants_example_plugin'); ?></h3>\r\n <p>\r\n <input type=\"text\" name=\"prenom\" style=\"width: 30vw\" value=\"<?php echo $prenom; ?>\" />\r\n </p>\r\n\r\n <h3><?php _e('github', 'apprenants_example_plugin'); ?></h3>\r\n <p>\r\n <input type=\"text\" name=\"github\" style=\"width: 30vw\" value=\"<?php echo $github; ?>\" />\r\n </p>\r\n\r\n <h3><?php _e('linkedIn', 'apprenants_example_plugin'); ?></h3>\r\n <p>\r\n <input type=\"text\" name=\"linkedIn\" style=\"width: 30vw\" value=\"<?php echo $linkedIn; ?>\" />\r\n </p>\r\n\r\n <h3><?php _e('portfolio', 'apprenants_example_plugin'); ?></h3>\r\n <p>\r\n <input type=\"text\" name=\"portfolio\" style=\"width: 30vw\" value=\"<?php echo $portfolio; ?>\" />\r\n </p>\r\n </div>\r\n<?php\r\n}", "public static function action_add_meta_boxes( $post ) {\n remove_meta_box( 'wpseo_meta', 'th_domain', 'normal' );\n remove_meta_box( 'wordpress-https', 'th_domain', 'side' );\n add_meta_box( 'th-domain-info', __( 'Domain Information', 'th' ), array( __CLASS__, 'mb_info' ), 'th_domain', 'normal', 'core' );\n add_meta_box( 'th-domain-dns', __( 'DNS Records', 'th' ), array( __CLASS__, 'mb_dns' ), 'th_domain', 'normal', 'core' );\n }", "function page_attributes_meta_box($post)\n {\n }", "public function add_meta_boxes()\n {\n\n $this->_add_bitly_meta_box();\n\n }", "function meta_boxes() {\n\t\tadd_meta_box( 'event-details', 'Event Details', array( $this , 'details_box' ), 'event', 'normal', 'high' );\n\t}", "function create_meta_portfolio_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-portfolio-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PORTFOLIO ITEM SETTINGS', 'new_meta_portfolio_boxes', PEXETO_PORTFOLIO_POST_TYPE, 'normal', 'high' );\n\t}\n}", "function pg_add_custom_box() {\r\n\tif( function_exists( 'add_meta_box' )) {\r\n\t\tadd_meta_box( 'pg_custom_box_1', __( 'Edit Photocrati Galleries / Albums', 'photocrati' ), 'pg_inner_custom_box_1', 'page', 'normal', 'high' );\r\n\t\tadd_meta_box( 'pg_custom_box_2', __( 'Edit Photocrati Galleries / Albums', 'photocrati' ), 'pg_inner_custom_box_1', 'post', 'normal', 'high' );\r\n\t}\r\n}", "public static function register_meta_boxes() {\n // Get meta boxes to register.\n $meta_boxes = apply_filters( 'rwmb_meta_boxes', array() );\n\n\n if ( is_array( $meta_boxes ) ) {\n // Load all custom fields.\n static $loaded;\n\n if ( ! isset( $loaded ) ) {\n foreach ( glob( implode( '/', array_slice( explode( '/', str_replace( '\\\\', '/', __FILE__ ) ), 0, -1 ) ) . '/fields/*.php' ) as $file ) {\n include_once $file;\n }\n\n $loaded = true;\n }\n\n // Instantiate all meta boxes.\n foreach ( $meta_boxes as $meta_box ) {\n $meta_box = new self( $meta_box );\n }\n }\n }", "function s25_custom_meta_boxes( $meta_boxes ) {\n\tglobal $prefix;\n\t$meta_boxes[] = array();\n\t\n/*\n$meta_boxes[] = array(\n\t\t'id' => 'project_details',\n\t\t'title' => 'Project Details',\n\t\t'pages' => array('work'), // post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names left of input\n\t\t'fields' => array(\n\t\t\tarray(\n\t\t\t\t'name' => 'Client Name',\n\t\t\t\t'id' => $prefix.'client_name',\n\t\t\t\t'desc' => '',\n\t\t\t\t'type' => 'text',\n\t\t\t),\n\t\t array(\n\t\t\t\t'name' => 'Client URL',\n\t\t\t\t'id' => $prefix.'client_url',\n\t\t\t\t'desc' => '',\n\t\t\t\t'type' => 'text',\n\t\t\t),\n\t\t array(\n\t\t\t\t'name' => 'Framework Used',\n\t\t\t\t'id' => $prefix.'client_framework',\n\t\t\t\t'desc' => '',\n\t\t\t\t'type' => 'text',\n\t\t\t),\n\t\t array(\n\t\t\t\t'name' => 'Design Provided By',\n\t\t\t\t'id' => $prefix.'design_source',\n\t\t\t\t'desc' => '',\n\t\t\t\t'type' => 'text',\n\t\t\t),\n\t\t array(\n\t\t\t\t'name' => 'Estimated Cost',\n\t\t\t\t'id' => $prefix.'cost_estimate',\n\t\t\t\t'desc' => '',\n\t\t\t\t'type' => 'text_money',\n\t\t\t),\n\t\t array(\n\t\t\t\t'name' => 'Client Comments',\n\t\t\t\t'id' => $prefix.'client_comments',\n\t\t\t\t'desc' => '',\n\t\t\t\t'type' => 'text',\n\t\t\t),\n\t\t)\n\t);\n*/\t\n\n\t);\n\treturn $meta_boxes;\n\t\n}", "function agnosia_add_post_meta_boxes() {\r\n\r\n\t\tglobal $post;\r\n\r\n\t\t$meta_value = get_post_meta( $post->ID, 'agnosia_post_meta' , true ) ;\r\n\r\n\t\tadd_meta_box(\r\n\t\t\t'post-excerpt-settings',\t\t\t// Unique ID\r\n\t\t\tesc_html( __( 'Excerpt settings', 'agnosia' ) ),\t\t// Title\r\n\t\t\t'agnosia_post_excerpt_settings_meta_box',\t\t// Callback function\r\n\t\t\t'',\t\t\t\t\t// Admin page (or post type)\r\n\t\t\t'side',\t\t\t\t\t// Context\r\n\t\t\t'core'\t\t\t\t\t// Priority\r\n\t\t);\r\n\r\n\t\tif ( current_user_can( 'content_enable_custom_stylesheet' ) \r\n\t\t\tand ( !isset( $meta_value['block_custom_stylesheet'] ) \r\n\t\t\t\tor !$meta_value['block_custom_stylesheet'] \r\n\t\t\t) \r\n\t\t) :\r\n\r\n\t\t\tadd_meta_box(\r\n\t\t\t\t'post-custom-stylesheet',\t\t\t// Unique ID\r\n\t\t\t\tesc_html( __( 'Custom stylesheet', 'agnosia' ) ),\t\t// Title\r\n\t\t\t\t'agnosia_post_custom_stylesheet_meta_box',\t\t// Callback function\r\n\t\t\t\t'',\t\t\t\t\t// Admin page (or post type)\r\n\t\t\t\t'advanced',\t\t\t\t\t// Context\r\n\t\t\t\t'default'\t\t\t\t\t// Priority\r\n\t\t\t);\r\n\r\n\t\tendif;\r\n\r\n\t\tif ( current_user_can( 'content_enable_featured_image_position' ) \r\n\t\t\tand ( !isset( $meta_value['block_featured_image_position'] ) \r\n\t\t\t\tor !$meta_value['block_featured_image_position'] \r\n\t\t\t) \r\n\t\t) :\r\n\r\n\t\t\tadd_meta_box(\r\n\t\t\t\t'post-featured-image-settings',\t\t\t// Unique ID\r\n\t\t\t\tesc_html( __( 'Featured image position', 'agnosia' ) ),\t\t// Title\r\n\t\t\t\t'agnosia_post_featured_image_settings_meta_box',\t\t// Callback function\r\n\t\t\t\t'',\t\t\t\t\t// Admin page (or post type)\r\n\t\t\t\t'side',\t\t\t\t\t// Context\r\n\t\t\t\t'low'\t\t\t\t\t// Priority\r\n\t\t\t);\r\n\r\n\t\tendif;\r\n\r\n\t\tif ( current_user_can( 'content_enable_override_default_settings' ) \r\n\t\t\tand ( !isset( $meta_value['block_override_default_settings'] ) \r\n\t\t\t\tor !$meta_value['block_override_default_settings'] \r\n\t\t\t) \r\n\t\t) :\r\n\r\n\t\t\tadd_meta_box(\r\n\t\t\t\t'post-custom-settings',\t\t\t// Unique ID\r\n\t\t\t\tesc_html ( __( 'Override default settings', 'agnosia' ) ),\t\t// Title\r\n\t\t\t\t'agnosia_post_settings_meta_box',\t\t// Callback function\r\n\t\t\t\t'',\t\t\t\t\t// Admin page (or post type)\r\n\t\t\t\t'advanced',\t\t\t\t\t// Context\r\n\t\t\t\t'core'\t\t\t\t\t// Priority\r\n\t\t\t);\r\n\r\n\t\tendif;\r\n\r\n\t\tif ( current_user_can( 'manage_options' ) ) :\r\n\r\n\t\t\tadd_meta_box(\r\n\t\t\t\t'post-block-advanced-options',\t\t// Unique ID\r\n\t\t\t\tesc_html( __( 'Block advanced options', 'agnosia' ) ),\t\t// Title\r\n\t\t\t\t'agnosia_post_block_advanced_options',\t\t// Callback function\r\n\t\t\t\t'',\t\t\t\t\t// Admin page (or post type)\r\n\t\t\t\t'advanced',\t\t\t\t\t// Context\r\n\t\t\t\t'high'\t\t\t\t\t// Priority\r\n\t\t\t);\r\n\r\n\t\tendif;\r\n\r\n\t}" ]
[ "0.81735677", "0.81513596", "0.80397046", "0.78426355", "0.78294206", "0.77826995", "0.7720374", "0.75726646", "0.7528612", "0.752779", "0.7497234", "0.74915934", "0.7480013", "0.74760693", "0.7469503", "0.7462559", "0.7439277", "0.74222654", "0.74053377", "0.73991024", "0.7395492", "0.73859006", "0.7385633", "0.7383149", "0.7379024", "0.7373023", "0.73724365", "0.7371746", "0.73632914", "0.7353551", "0.7346889", "0.7341092", "0.7332798", "0.73289907", "0.7325892", "0.7324162", "0.73174447", "0.729891", "0.7270169", "0.7269632", "0.7268937", "0.7261734", "0.7261716", "0.7259123", "0.72312963", "0.72303647", "0.7226264", "0.7215309", "0.7196065", "0.7189945", "0.71891767", "0.718435", "0.71820855", "0.7177036", "0.71641827", "0.71548635", "0.71545035", "0.71477664", "0.71459144", "0.71450704", "0.71377987", "0.7132856", "0.71325433", "0.71303713", "0.7128856", "0.7127325", "0.71208346", "0.7114", "0.710908", "0.7105403", "0.7097234", "0.7090657", "0.70904684", "0.7084777", "0.7083734", "0.7077428", "0.7074524", "0.70611423", "0.7060831", "0.70585316", "0.7055892", "0.7055052", "0.7054465", "0.70489365", "0.70436037", "0.7037617", "0.7037217", "0.7028266", "0.7023299", "0.702286", "0.70212096", "0.70201373", "0.7011412", "0.700002", "0.6999548", "0.69988704", "0.6996184", "0.69960433", "0.6992374", "0.6991042" ]
0.7767739
6
Display's our meta box
public static function createView( \WP_Post $post ) { require( WPDisablePage_DIR . '/src/templates/admin/meta_box.phtml' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display_meta_box() {\n\t\t\n\t\tinclude_once( 'views/q-and-a-admin.php' );\n }", "function rs_meta_box()\n{\n add_meta_box('rs_focus', 'Destaque na home', 'rs_focus', 'post', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'post', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'post_region', 'side');\n add_meta_box('rs_author', 'Autor', 'rs_author', 'event', 'side');\n}", "public function addMetaBox()\r\n {\r\n add_meta_box($this->id, esc_html__($this->title, 'firalabs-tv-show'), array(\r\n $this,\r\n 'render'\r\n ), 'firalabs_tv_show', $this->context, 'default');\r\n }", "function thd_re_info_show_box() {\n\tthd_meta_box_callback(thd_re_meta_box_fields(), 'page');\n}", "public static function add_meta_box() {\n\t\tadd_meta_box( 'sponsor-meta', __( 'Sponsor Meta', self::$text_domain ), array( __CLASS__, 'do_meta_box' ), self::$post_type_name , 'normal', 'high' );\n\t}", "function thd_re_post_info_show_box() {\n\tthd_meta_box_callback(thd_re_post_meta_box_fields(), 'post');\n}", "public static function display_meta_box($post) {\r\n\t\t\t$force_hide = get_post_meta($post->ID, self::FORCE_HIDE_KEY, true);\r\n\t\t\t$moderation_url = self::_get_moderation_url($post->ID);\r\n\t\t\t$results_url = self::_get_results_url($post->ID);\r\n\r\n\t\t\tinclude('views/backend/meta-boxes/meta-box.php');\r\n\t\t}", "public function register_meta_box() {\r\n add_meta_box( self::POST_TYPE . '-meta', 'Downloadable Resource URL', array ($this, 'meta_box_html'), self::POST_TYPE, 'side', 'default', '');\r\n }", "public function render_screen_meta()\n {\n }", "function thmplt_carousel_slide_meta(){\r\n\tadd_meta_box(\"thmplt_carousel_meta_box1\", \"Slide Settings\", \"thmplt_carousel_slide_settings_html\", \"thmplt_carousel\", \"normal\", \"high\");\r\n\tadd_meta_box(\"thmplt_carousel_meta_box2\", \"Slide Images\", \"thmplt_carousel_slide_settings_html2\", \"thmplt_carousel\", \"normal\", \"high\");\r\n}", "function meta_boxes() {\n\t\tadd_meta_box( 'event-details', 'Event Details', array( $this , 'details_box' ), 'event', 'normal', 'high' );\n\t}", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "function education_information_meta_box() {\n\t// P1: CSS id\n\t// P2: mata box title\n\t// P3: callback function\n\t// P4: post type this meta box is associated with\n\t// P5: priority level (optional)\n\t// P6: callback function arguments (optional)\n add_meta_box( 'education-information-meta-box', 'Education Information', 'education_information_meta_box_callback', 'education' );\n}", "function formulize_meta_box() {\n\t\tadd_meta_box('formulize_sectionid',\n\t __('Formulize', 'formulize_textlabel'),\n\t 'formulize_inner_custom_box',\n\t 'page'\n\t\t);\n}", "public function setup_meta_box() {\n\t\t\tadd_meta_box( 'add-shortcode-section', __( 'Shortcode', IFLANG ), array( $this, 'meta_box' ), 'nav-menus', 'side', 'high' );\n\t\t}", "public static function add_meta_box() {\n add_meta_box(\n 'link_meta', // Unique ID\n 'Properties', // Box title\n [self::class, 'meta_html'], // Content callback, must be of type callable\n \"link\" // Post type\n );\n }", "function create_meta_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PAGE SETTINGS', 'new_meta_boxes', 'page', 'normal', 'high' );\n\t}\n}", "function kurama_custom_meta() {\n add_meta_box( 'kurama_meta', __( 'Display Options', 'kurama' ), 'kurama_meta_callback', 'page','side','high' );\n}", "function add_meta_box() {\n global $post;\n\n $post_types = get_post_types( array( 'public' => true ) );\n\n if ( !empty( $post ) ) {\n if ( $this->check_user_analytics_exist( $post ) ) {\n foreach ( $post_types as $post_type ) {\n add_meta_box( 'show_user_analytics', __( 'Post Author Analytics Info', 'wpuf-pro' ), array( $this, 'render_meta_box_content' ), $post_type, 'advanced', 'high' );\n }\n }\n }\n }", "function show() {\n global $post;\n \t\t/**\n\t\t * Use nonce for verification.\n\t\t */\n echo '<input type=\"hidden\" name=\"weddingvendor_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n echo '<table class=\"form-table\">';\n\t\t\n foreach ($this->_meta_box['fields'] as $field) { \n\t\t\t/**\n\t\t\t * get current post meta data.\n\t\t\t */\n $meta = get_post_meta($post->ID, $field['id'], true);\n\t\t\tif( isset( $field['desc'] ) ) {\n\t\t\t\t$meta_description = $field['desc'];\n\t\t\t}\n\t\t\t\n echo '<tr><th style=\"width:20%\"><label for=\"',esc_attr($field['id']), '\">', esc_html($field['name']), '</label></th><td>';\n\t\t\t\n switch ($field['type']) {\n\t\t\t /**\n\t\t\t\t * Meta-box Text Field.\n\t\t\t\t */\t\n case 'text':\n \t echo '<input type=\"text\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />',\n '<br /><small>', $meta_description.'</small>';\n break;\t\n\t\n\n\t\t\t /**\n\t\t\t\t * Meta-box date Field.\n\t\t\t\t */\t\n case 'date':\n \t echo '<input type=\"text\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" class=\"check_date date\" />',\n '<br /><small>', $meta_description.'</small>';\n break;\t\t\t\t\t \t\t\t\t\n\t\t\t /**\n\t\t\t\t * Meta-box Color Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'color':\n\t\t\t\t echo '<input class=\"color-field\" type=\"text\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" value=\"', $meta ? $meta : $field['std'], '\" />',\n '<br /><small>', $meta_description.'</small>';\n\t\t\t\tbreak;\n\t\t\t /**\n\t\t\t\t * Meta-box Textarea Field.\n\t\t\t\t */\t\n case 'textarea':\n echo '<textarea name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>',\n '<br /><small>', $meta_description.'</small>';\n break;\n\t\t\t /**\n\t\t\t\t * Meta-box Select Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'select':\t\t\t\t\t\n\t\t\t\t\t echo '<select name=\"'.esc_attr($field['id']).'\" id=\"'.esc_attr($field['id']).'\">';\n\t\t\t\t\t\t foreach ($field['options'] as $option) {\n\t\t\t\t\t\t \t echo '<option', $meta == $option['value'] ? ' selected=\"selected\"' : '', ' value=\"'.$option['value'].'\">'.$option['label'].'</option>';\n\t\t\t\t\t \t } \n\t\t\t\t\t echo '</select><br /><span class=\"description\">'.$meta_description.'</span>';\n break;\n\t\t\t /**\n\t\t\t\t * Meta-box Radio Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'radio':\n\t\t\t\t\t foreach ( $field['options'] as $option ) {\n\t\t\t\t\t\t echo '<input type=\"radio\" name=\"'.esc_attr($field['id']).'\" id=\"'.$option['value'].'\" \n\t\t\t\t\t\t\t value=\"'.$option['value'].'\" ',$meta == $option['value'] ? ' checked=\"checked\"' : '',' />\n\t\t\t\t\t\t\t <label for=\"'.$option['value'].'\">'.$option['name'].'</label><br />';\n\t\t\t\t\t }\n\t\t\t\t\t echo '<span class=\"description\">'.$meta_description.'</span>';\n\t\t\t\tbreak;\n\t\t\t /**\n\t\t\t\t * Meta-box Checkbox Field.\n\t\t\t\t */\t\n\t case 'checkbox':\n \t echo '<input type=\"checkbox\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\"', $meta ? ' checked=\"checked\"' : '', ' />';\n\t\t\t\t\t echo '<span class=\"description\">'.$meta_description.'</span>';\n break;\n\t\t\t /**\n\t\t\t\t * Meta-box Checkbox-group Field.\n\t\t\t\t */\t\n\t\t\t case 'checkbox_group':\n\t\t\t\t\t foreach ($field['options'] as $option) {\n\t\t\t\t\t echo '<input type=\"checkbox\" value=\"',$option['value'],'\" name=\"',esc_html($field['id']),'[]\" \n\t\t\t\t\t\t id=\"',$option['value'],'\"',$meta && in_array($option['value'], $meta) ? ' checked=\"checked\"' : '',' />\n\t\t\t\t\t\t <label for=\"'.$option['value'].'\">'.$option['name'].'</label><br />';\n\t\t\t\t\t }\n\t\t\t\t\t echo '<span class=\"description\">'.$meta_description.'</span>';\n\t\t\t\t\tbreak;\n\t\t\t /**\n\t\t\t\t * Meta-box Image Field.\n\t\t\t\t */\t\n\t\t\t\tcase 'image':\n\t\t\t\t\t echo '<span class=\"upload\">';\n\t\t\t\t\t if( $meta ) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t echo '<input type=\"hidden\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" \n\t\t\t\t\t\t\t\t class=\"regular-text form-control text-upload\" value=\"',$meta,'\" />';\t\t\t\t\t\t\t\n\t\t\t\t\t\t echo '<img style=\"width:150px; display:block;\" src= \"'.$meta.'\" class=\"preview-upload\" />';\n\t\t\t\t\t\t echo '<input type=\"button\" class=\"button button-upload\" id=\"logo_upload\" value=\"'.esc_html__('Upload an image','weddingvendor').'\"/></br>';\t\t\n\t\t\t\t\t\t echo '<input type=\"button\" class=\"button-remove\" id=\"remove\" value=\"'.esc_html__('Remove','weddingvendor').'\" /> ';\n\t\t\t\t\t }else {\n\t\t\t\t\t\t echo '<input type=\"hidden\" name=\"',esc_html($field['id']), '\" id=\"', esc_attr($field['id']), '\" \n\t\t\t\t\t\t\t\t\tclass=\"regular-text form-control text-upload\" value=\"',$meta,'\" />';\t\t\t\t\t\t\t\n\t\t\t\t\t\t echo '<img style=\"\" src= \"'.$meta.'\" class=\"preview-upload\" />';\n\t\t\t\t\t\t echo '<input type=\"button\" class=\"button button-upload\" id=\"logo_upload\" value=\"'.esc_html__('Upload an image','weddingvendor').'\"/></br>';\t\t\n\t\t\t\t\t\t echo '<input type=\"button\" style=\"display:none;\" id=\"remove\" class=\"button-remove\" value=\"\" /> ';\n\t\t\t\t\t } echo '</span><span class=\"description\">'.$meta_description.'</span>';\t\t\n\t\t\t\tbreak;\n\t\t\t\t\t\n }\n echo '<td></tr>';\n }\n echo '</table>';\n }", "function show() {\n global $post;\n\n $saved = $this->is_saved();\n\n // Container\n printf(\n '<div class=\"rwmb-meta-box\" data-autosave=\"%s\">',\n $this->meta_box['autosave'] ? 'true' : 'false'\n );\n\n wp_nonce_field( \"rwmb-save-{$this->meta_box['id']}\", \"nonce_{$this->meta_box['id']}\" );\n\n // Allow users to add custom code before meta box content\n // 1st action applies to all meta boxes\n // 2nd action applies to only current meta box\n do_action( 'rwmb_before', $this );\n do_action( \"rwmb_before_{$this->meta_box['id']}\", $this );\n\n // Print HTML code for all fields\n $current_tab = null;\n $tab_heading = $tab_body = '';\n\n foreach ( $this->fields as $field ) {\n if ( isset( $field['tab'] ) && $current_tab != $field['tab'] ) {\n $tab_id = sanitize_key( $field['tab'] );\n\n // Update tab heading.\n $tab_heading .= '\n\t\t\t\t\t<li class=\"meta-box-tab-' . $tab_id . ( empty( $current_tab ) ? ' active' : '' ) . '\">\n\t\t\t\t\t\t<a href=\"#' . $tab_id . '\">' . $field['tab'] . '</a>\n\t\t\t\t\t</li>';\n\n // Update tab body.\n $tab_body .= ( empty( $current_tab ) ? '' : '</div>' ) . '\n\t\t\t\t\t<div id=\"' . $tab_id . '\" class=\"meta-box-tabs-content ' . ( empty( $current_tab ) ? '' : 'hidden' ) . '\">';\n\n $current_tab = $field['tab'];\n }\n\n // Start output buffering to hold field output.\n ob_start();\n\n if ( method_exists( __CLASS__, 'get_class_name' ) ) {\n call_user_func( array( self::get_class_name( $field ), 'show' ), $field, $saved );\n } elseif ( class_exists( 'RWMB_Field' ) && method_exists( 'RWMB_Field', 'call' ) ) {\n RWMB_Field::call( 'show', $field, $saved );\n }\n\n $tab_body .= ob_get_contents();\n\n ob_end_clean();\n }\n\n if ( ! empty( $tab_heading ) ) {\n echo '\n\t\t\t\t<div class=\"meta-box-tabs\" id=\"' . $this->meta_box['id'] . '\">\n\t\t\t\t\t<ul class=\"meta-box-tabs-nav\">' . $tab_heading . '</ul>\n\t\t\t\t\t' . $tab_body . '</div>\n\t\t\t\t</div>\n\t\t\t\t<scr' . 'ipt>\n\t\t\t\t\t(function($) {\n\t\t\t\t\t\t$(\"#' . $this->meta_box['id'] . '\").on(\"click\", \".meta-box-tabs-nav a\", function(e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t$(\"#' . $this->meta_box['id'] . ' .meta-box-tabs-nav li\").removeClass(\"active\");\n\t\t\t\t\t\t\t$(this).parent().addClass(\"active\");\n\t\t\t\t\t\t\t$(\"#' . $this->meta_box['id'] . ' .meta-box-tabs-content\").addClass(\"hidden\").filter($(this).attr(\"href\")).removeClass(\"hidden\");\n\t\t\t\t\t\t});\n\t\t\t\t\t})(jQuery);\n\t\t\t\t</scr' . 'ipt>';\n } else {\n echo worldmart_output('' . $tab_body) ;\n }\n\n // Include validation settings for this meta-box\n if ( isset( $this->validation ) && $this->validation ) {\n echo '\n\t\t\t\t<scr' . 'ipt>\n\t\t\t\tif ( typeof rwmb == \"undefined\" )\n\t\t\t\t{\n\t\t\t\t\tvar rwmb = {\n\t\t\t\t\t\tvalidationOptions : jQuery.parseJSON( \\'' , json_encode( $this->validation ) , '\\' ),\n\t\t\t\t\t\tsummaryMessage : \"' , esc_js( esc_html__( 'Please correct the errors highlighted below and try again.', 'worldmart' ) ) , '\"\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar tempOptions = jQuery.parseJSON( \\'' , json_encode( $this->validation ) . '\\' );\n\t\t\t\t\tjQuery.extend( true, rwmb.validationOptions, tempOptions );\n\t\t\t\t}\n\t\t\t\t</scr' . 'ipt>\n\t\t\t';\n }\n\n // Allow users to add custom code after meta box content\n // 1st action applies to all meta boxes\n // 2nd action applies to only current meta box\n do_action( 'rwmb_after', $this );\n do_action( \"rwmb_after_{$this->meta_box['id']}\", $this );\n\n // End container\n echo '</div>';\n }", "public function linkages_meta_box() {\n\t\tglobal $post;\n\t\t\n\t\tif ( isset( $_GET['post'] ) )\n\t\t\t$post_ID = (int) $_GET['post'];\n\t\telse\n\t\t\t$post_ID = '';\n\t\t\n\t\techo '<input type=\"hidden\" name=\"_lingo_hidden\" id=\"_lingo_hidden\" value=\"1\" />';\n\t\t\n\t\tforeach( $this->post_meta as $key => $value ) {\n\t\t\techo '\n\t\t<p>\n\t\t\t<label for=\"' . $key . '\">' . $value . '</label>\n\t\t\t<br />\n\t\t\t<input type=\"text\" name=\"' . $key . '\" id=\"' . $key . '\" value=\"' . get_post_meta( $post_ID, $key, true ) . '\" />\n\t\t</p>';\n\t\t}\n\t\t?>\n\t\t<?php\n\t}", "function ahr_add_meta_box() {\r\n \r\n add_meta_box( 'ahr', 'Advaned https redirect', 'ahr_render_meta_box', null, 'normal', 'high', null );\r\n \r\n}", "public static function simple_social_meta_meta_box_display( $object, $box ) { ?>\n\t\n\t\t<?php $args = array (\n\t\t\t'echo' => false\n\t\t); ?>\n\n\t\t<input type=\"hidden\" name=\"simple-social-meta-meta-box-nonce\" value=\"<?php echo wp_create_nonce( basename( __FILE__ ) ); ?>\" />\n\n\t\t<div class=\"post-settings\">\n\n\t\t<p>\n\t\t\t<label for=\"ssm-title\"><?php _e( 'Title:', SIMPLE_SOCIAL_META::$text_domain ); ?></label>\n\t\t\t<br />\n\t\t\t<input type=\"text\" name=\"ssm-title\" id=\"ssm-title\" value=\"<?php echo esc_attr( get_post_meta( $object->ID, '_ssm-title', true ) ); ?>\" size=\"30\" tabindex=\"30\" style=\"width: 99%;\" />\n\t\t\t<br />\n\t\t\t<span style=\"color:#aaa;\">Default: <?php $default = SIMPLE_SOCIAL_META::ssm_title( $args ); echo $default['content']; ?></span>\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"ssm-site-name\"><?php _e( 'Site Name:', SIMPLE_SOCIAL_META::$text_domain ); ?></label>\n\t\t\t<br />\n\t\t\t<input type=\"text\" name=\"ssm-site-name\" id=\"ssm-site-name\" value=\"<?php echo esc_attr( get_post_meta( $object->ID, '_ssm-site-name', true ) ); ?>\" size=\"30\" tabindex=\"30\" style=\"width: 99%;\" />\n\t\t\t<br />\n\t\t\t<span style=\"color:#aaa;\">Default: <?php $default = SIMPLE_SOCIAL_META::ssm_site_name( $args ); echo $default['content']; ?></span>\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label for=\"ssm-description\"><?php _e( 'Description:', SIMPLE_SOCIAL_META::$text_domain ); ?></label>\n\t\t\t<br />\n\t\t\t<textarea name=\"ssm-description\" id=\"ssm-description\" cols=\"60\" rows=\"2\" tabindex=\"30\" style=\"width: 99%;\"><?php echo esc_textarea( get_post_meta( $object->ID, '_ssm-description', true ) ); ?></textarea>\n\t\t\t<br />\n\t\t\t<span style=\"color:#aaa;\">Default: <?php $default = SIMPLE_SOCIAL_META::ssm_description( $args ); echo $default['content']; ?></span>\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label for=\"ssm-url\"><?php _e( 'URL:', SIMPLE_SOCIAL_META::$text_domain ); ?></label>\n\t\t\t<br />\n\t\t\t<input type=\"text\" name=\"ssm-url\" id=\"ssm-url\" value=\"<?php echo esc_attr( get_post_meta( $object->ID, '_ssm-url', true ) ); ?>\" size=\"30\" tabindex=\"30\" style=\"width: 99%;\" />\n\t\t\t<br />\n\t\t\t<span style=\"color:#aaa;\">Default: <?php $default = SIMPLE_SOCIAL_META::ssm_url( $args ); echo $default['content']; ?></span>\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"ssm-image\"><?php _e( 'Image:', SIMPLE_SOCIAL_META::$text_domain ); ?></label>\n\t\t\t<br />\n\t\t\t<input type=\"text\" name=\"ssm-image\" id=\"ssm-image\" value=\"<?php echo esc_attr( get_post_meta( $object->ID, '_ssm-image', true ) ); ?>\" size=\"30\" tabindex=\"30\" style=\"width: 99%;\" />\n\t\t\t<br />\n\t\t\t<span style=\"color:#aaa;\">Default: <?php $default = SIMPLE_SOCIAL_META::ssm_image( $args ); echo $default['content']; ?></span>\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"ssm-type\"><?php _e( 'Type:', SIMPLE_SOCIAL_META::$text_domain ); ?></label>\n\t\t\t<br />\n\t\t\t<input type=\"text\" name=\"ssm-type\" id=\"ssm-type\" value=\"<?php echo esc_attr( get_post_meta( $object->ID, '_ssm-type', true ) ); ?>\" size=\"30\" tabindex=\"30\" style=\"width: 99%;\" />\n\t\t\t<br />\n\t\t\t<span style=\"color:#aaa;\">Default: <?php $default = SIMPLE_SOCIAL_META::ssm_type( $args ); echo $default['content']; ?></span>\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"ssm-locale\"><?php _e( 'Locale:', SIMPLE_SOCIAL_META::$text_domain ); ?></label>\n\t\t\t<br />\n\t\t\t<input type=\"text\" name=\"ssm-locale\" id=\"ssm-locale\" value=\"<?php echo esc_attr( get_post_meta( $object->ID, '_ssm-locale', true ) ); ?>\" size=\"30\" tabindex=\"30\" style=\"width: 99%;\" />\n\t\t\t<br />\n\t\t\t<span style=\"color:#aaa;\">Default: <?php $default = SIMPLE_SOCIAL_META::ssm_locale( $args ); echo $default['content']; ?></span>\n\t\t</p>\n\n\t\t</div><!-- .form-table --><?php\n\t}", "function fzproject_meta_box()\n{\n add_meta_box('fzproject_meta_box', 'New portfolio item', 'display_fzproject_meta_box', 'fzproject_post', 'normal', 'high');\n}", "function show() {\n global $post;\n\n // Use nonce for verification\n echo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n\n echo '<table class=\"form-table\">';\n\n foreach ($this->_meta_box['fields'] as $field) {\n // get current post meta data\n $meta = get_post_meta($post->ID, $field['id'], true);\n\n echo '<tr>',\n '<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\n '<td>';\n switch ($field['type']) {\n case 'text':\n echo '<input type=\"text\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />',\n '<br />', $field['desc'];\n break;\n case 'textarea':\n echo '<textarea name=\"', $field['id'], '\" id=\"', $field['id'], '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>',\n '<br />', $field['desc'];\n break;\n case 'select':\n echo '<select name=\"', $field['id'], '\" id=\"', $field['id'], '\">';\n foreach ($field['options'] as $option) {\n echo '<option', $meta == $option ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n }\n echo '</select>';\n break;\n case 'radio':\n foreach ($field['options'] as $option) {\n echo '<input type=\"radio\" name=\"', $field['id'], '\" value=\"', $option['value'], '\"', $meta == $option['value'] ? ' checked=\"checked\"' : '', ' />', $option['name'];\n }\n break;\n case 'checkbox':\n echo '<input type=\"checkbox\" name=\"', $field['id'], '\" id=\"', $field['id'], '\"', $meta ? ' checked=\"checked\"' : '', ' />';\n break;\n }\n echo '<td>',\n '</tr>';\n }\n\n echo '</table>';\n }", "public function add_meta() {\n\t\techo \"\\n<meta data-plugin='a04_vertical_button' name='description' content='a sample meta description for this website'/>\\n\\n\";\n\t}", "function MetaBox()\n\t{\n\t\t\n\t\t// wordpress global\n\t\tglobal $post;\n\n\t\t// grab meta data, if it exists\n\t\t$tlsp_text = get_post_meta( $post->ID, 'tlsp_text', true );\n\n\t\t// use a nonce for verification\n\t\twp_nonce_field( plugin_basename(__FILE__), 'tlsp_noncename' );\n\t\t\n\t\t// this is the html for the metabox\n\t\t$security = 1;\n\t\tinclude( 'metabox-html.php' );\n\t\t$security = 0;\n\t\t\n\t}", "function addMeta() {\n\t\n\tif( class_exists('acf') ) {\n\n\t$meta_description = get_field('meta_description', 'option');\n\t$meta_keywords = get_field('meta_keywords', 'option');\n\t$meta_author = get_field('meta_author', 'option');\n\t$meta_og_image = get_field('meta_og_img', 'option');\n\t$meta_img_full = $meta_og_image['url'];\n\n\t}\n\n\tif ( $meta_description ) {\n\t\techo '<meta name=\"description\" content=\"'.$meta_description.'\">'; \n\t}\n\n\tif ( $meta_keywords ) {\n\t\techo '<meta name=\"keywords\" content=\"'.$meta_keywords.'\">'; \n\t}\n\n\tif ( $meta_author ) {\n\t\techo '<meta name=\"author\" content=\"'.$meta_author.'\">'; \n\t}\n\n\tif ( $meta_og_image ) {\n\t\techo '<meta name=\"twitter:card\" content=\"summary\" />';\n\t\techo '<meta property=\"og:image\" content=\"'.$meta_img_full.'\" />';\n\t}\n\n}", "function logo_meta_box() {\n add_meta_box(\n 'logo_meta_box', // $id\n 'Extras', // $title\n 'show_logo_meta_box', // $callback\n 'logo', // $logo\n 'normal', // $context\n 'high'); // $priority\n}", "function add_actus_meta_box() {\n\tadd_meta_box(\n\t\t'fb_link', // $id\n\t\t'Lien Facebook', // $title\n\t\t'show_your_fields_meta_box', // $callback\n\t\t'actus', // $screen\n\t\t'normal', // $context\n\t\t'high' // $priority\n\t);\n}", "function meta_box($post) {\r\n\t\t$map = get_post_meta($post->ID, '_mapp_map', true);\r\n\t\t$pois = get_post_meta($post->ID, '_mapp_pois', true);\r\n\r\n\t\t// Load the edit map\r\n\t\t// Note that mapTypes is hardcoded = TRUE (so user can change type, even if not displayed in blog)\r\n\t\t$map['maptypes'] = 1;\r\n\t\t$this->map($map, $pois, true);\r\n\r\n\t\t// The <div> will be filled in with the list of POIs\r\n\t\t//echo \"<div id='admin_poi_div'></div>\";\r\n\t}", "function add_your_fields_meta_box(){\r\nadd_meta_box(\r\n'your_fields_meta_box',// $id\r\n'Auteur',// $title\r\n'show_your_fields_meta_box',// $callback\r\n'Livre',// $screen\r\n'normal',// $context\r\n'high'// $priority\r\n);\r\n}", "public function meta_box() {\r\n\t\tglobal $post;\r\n\t\t\r\n\t\t// \r\n\t\tif ( isset( $_GET['post'] ) )\r\n\t\t\t$post_ID = (int) $_GET['post'];\r\n\t\telse\r\n\t\t\t$post_ID = '';\r\n\r\n\t\tforeach( $this->post_meta as $key => $value ) {\r\n\t\t\tif (\r\n\t\t\t\t'previous_start' == $key ||\r\n\t\t\t\t'previous_end' == $key ||\r\n\t\t\t\t'total_start' == $key ||\r\n\t\t\t\t'total_end' == $key\r\n\t\t\t) {\r\n\t\t\t\t$time_value = get_post_meta( $post_ID, '_' . $key, true );\r\n\t\t\t\t$time = date( 'h:m d M Y', $time_value );\r\n\t\t\t} else {\r\n\t\t\t\t$time = '';\r\n\t\t\t}\r\n\r\n\t\t\techo '\r\n\t\t\t<p>\r\n\t\t\t\t<label for=\"_' . $key . '\">' . $value . '</label>\r\n\t\t\t\t<br />\r\n\t\t\t\t<input type=\"text\" name=\"_' . $key . '\" id=\"_' . $key . '\" value=\"' . get_post_meta( $post_ID, '_' . $key, true ) . '\" />\r\n\t\t\t\t<br />\r\n\t\t\t\t<small>' . $time . '</small>\r\n\t\t\t</p>';\r\n\t\t\tunset( $time );\r\n\t\t}\r\n\t}", "function add_meta_box() {\t\t\n\t\t\t/* Gets available public post types. */\n\t\t\t$post_types = get_post_types( array( 'public' => true ), 'objects' );\n\t\t\t\n\t\t\t$post_types = apply_filters( 'remove_youtube_white_label_meta_box', $post_types );\n\t\t\t\n\t\t\t/* For each available post type, create a meta box on its edit page if it supports '$prefix-post-settings'. */\n\t\t\tforeach ( $post_types as $type ) {\n\t\t\t\t/* Add the meta box. */\n\t\t\t\tadd_meta_box( self::DOMAIN . \"-{$type->name}-meta-box\", __( 'YouTube Embed Shortcode Creator (does not save meta)', self::DOMAIN ), array( $this, 'meta_box' ), $type->name, 'side', 'default' );\n\t\t\t}\n\t\t}", "function show() {\n\t\tglobal $post;\n\n\t\t// Use nonce for verification\n\t\techo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n\t\n\t\techo '<table class=\"form-table\">';\n\n\t\tforeach ($this->_meta_box['fields'] as $field) {\n\t\t\t// get current post meta data\n\t\t\t$meta = get_post_meta($post->ID, $field['id'], true);\n\t\t\n\t\t\techo '<tr>',\n\t\t\t\t\t'<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\n\t\t\t\t\t'<td>';\n\t\t\tswitch ($field['type']) {\n\t\t\t\tcase 'text':\n\t\t\t\t\techo '<input type=\"text\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" value=\"', $meta ? $meta : $field['std'], '\" size=\"30\" style=\"width:97%\" />',\n\t\t\t\t\t\t'<br />', $field['desc'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\techo '<textarea name=\"', $field['id'], '\" id=\"', $field['id'], '\" cols=\"60\" rows=\"4\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>',\n\t\t\t\t\t\t'<br />', $field['desc'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\techo '<select name=\"', $field['id'], '\" id=\"', $field['id'], '\">';\n\t\t\t\t\tforeach ($field['options'] as $option) {\n\t\t\t\t\t\techo '<option', $meta == $option ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n\t\t\t\t\t}\n\t\t\t\t\techo '</select>';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'radio':\n\t\t\t\t\tforeach ($field['options'] as $option) {\n\t\t\t\t\t\techo '<input type=\"radio\" name=\"', $field['id'], '\" value=\"', $option['value'], '\"', $meta == $option['value'] ? ' checked=\"checked\"' : '', ' />', $option['name'];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\techo '<input type=\"checkbox\" name=\"', $field['id'], '\" id=\"', $field['id'], '\"', $meta ? ' checked=\"checked\"' : '', ' />';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'file':\n\t\t\t\t\techo $meta ? \"$meta<br />\" : '', '<input type=\"file\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" />',\n\t\t\t\t\t\t'<br />', $field['desc'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'image':\n\t\t\t\t\techo $meta ? \"<img src=\\\"$meta\\\" width=\\\"150\\\" height=\\\"150\\\" /><br />$meta<br />\" : '', '<input type=\"file\" name=\"', $field['id'], '\" id=\"', $field['id'], '\" />',\n\t\t\t\t\t\t'<br />', $field['desc'];\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\techo \t'<td>',\n\t\t\t\t'</tr>';\n\t\t}\n\t\n\t\techo '</table>';\n\t}", "function praise_meta_init(){\n add_meta_box(\"praise_author_name\", \"Author\", \"praise_author_meta\", \"praise\", \"normal\", \"low\");\n}", "function idem_pop_up_add_meta_box()\n{\n add_meta_box(\n 'idem-pop-up-meta-box', // id, used as the html id att\n __( 'Idem Pop Up' ), // meta box title, like \"Page Attributes\"\n 'idem_pop_up_meta_box_cb', // callback function, spits out the content\n 'page', // post type or page. We'll add this to pages only\n 'side', // context (where on the screen)\n 'high' // priority, where should this go in the context?\n );\n}", "function vw_mobile_app_pro_posttype_bn_testimonial_meta_box() {\n\tadd_meta_box( 'vw-mobile-app-pro-posttype-testimonial-meta', __( 'Enter Details', 'vw-mobile-app-pro-posttype' ), 'vw_mobile_app_pro_posttype_bn_testimonial_meta_callback', 'testimonials', 'normal', 'high' );\n}", "function coolRahulSoni_meta_box_add()\n{\n add_meta_box( 'my-meta-box-id', 'My First Meta Box', 'cd_meta_box_cb', 'post', 'normal', 'high' );\n}", "private function do_meta_box( $title = '', $contents = '' ) {\n\t\t?>\n\t\t<div class=\"postbox\">\n\t\t\t<h3 class=\"hndle\"><?php echo $title ?></h3>\n\t\t\t<div class=\"inside\">\n\t\t\t\t<?php echo $contents; ?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "function show_my_meta_box( $post ) {\n\t\t\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . 'civ_slider';\n\t\t$row_count = $wpdb->get_var( 'select count(*) from $table_name' );\n\t\t$slide_count = $row_count + 1;\n\t\t$post_id_check = $post->ID;\n\n\t\t$box_check = $wpdb->get_row($wpdb->prepare(\"select * from $table_name where post_id=%d\", $post_id_check));\n?>\n\t<form method=\"post\" >\n\t\t<label>Check here to add post to homepage slider: </label>\n\t\t<input type=\"checkbox\" name=\"chkd\" <?php if($box_check != null ){echo \"checked\";} ?> />\n\t\t<input type=\"hidden\" value=\"<?php echo $post->ID; ?>\" name=\"post_id\" />\n\t\t<input type=\"hidden\" value=\"<?php echo $slide_count; ?>\" name=\"slide_order\" />\n\t</form>\n\t\t<?php\n\t}", "public function video_meta_boxes() {\n add_meta_box(\n 'metainfo',\n 'Meta Information',\n array($this, 'video_meta_information'),\n 'video',\n 'normal',\n 'high'\n );\n add_meta_box(\n 'featured_image_help',\n 'Note',\n array($this, 'video_featured_image_help'),\n 'video',\n 'side',\n 'low'\n );\n }", "public function meta_box() {\n\t\tglobal $post;\n\t\t\n\t\tif ( isset( $_GET['post'] ) )\n\t\t\t$post_ID = (int) $_GET['post'];\n\t\telse\n\t\t\t$post_ID = '';\n\n\t\techo '<input type=\"hidden\" name=\"_lingo_hidden\" id=\"_lingo_hidden\" value=\"1\" />\n\t\t<p>\n\t\t\t<label for=\"_translation\">' . __( 'Translation', 'lingo' ) . '</label>\n\t\t\t<br />';\n\n\t\t$_translation = get_post_meta( $post_ID, '_translation' );\n\t\tforeach( $_translation as $key => $trans ) {\n\t\t\techo '<input type=\"text\" name=\"_translation[' . $key . ']\" id=\"_translation' . $key . '\" value=\"' . $trans . '\" />';\n\t\t}\n\t\techo '<input type=\"text\" name=\"_translation[' . ( $key + 1 ) . ']\" id=\"_translation' . ( $key + 1 ) . '\" value=\"\" />';\n\t\t\n\t\techo '</p>';\n\t}", "public function create_meta_box() {\n\t\tadd_meta_box( 'slider_meta', 'Example metabox', array( $this, 'slider_meta_fields_callback' ), [ 'Page', 'post' ] );\n\n\t}", "public static function registerMetaBoxes() {}", "function meta_html($post)\n {\n $view = new Xby2BaseView(get_post_meta($post->ID));\n $view->addInput('text', 'link-label', 'Label: ', 'label', 'regular-text');\n $view->addInput('text', 'link-link', 'Link: ', 'link', 'large-text');\n $view->addInput('text', 'link-priority', 'Priority: ', 'priority', 'regular-text');\n $view->displayForm();\n }", "function show_your_fields_meta_box() {\n\tglobal $post;\n\t\t$meta = get_post_meta( $post->ID, 'actu_fields', true ); ?>\n\n\t<input type=\"hidden\" name=\"actu_fb_link\" value=\"<?php echo wp_create_nonce( basename(__FILE__) ); ?>\">\n\n <p>\n\t<input type=\"text\" name=\"actu_fields[text]\" id=\"actu_fields[text]\" class=\"regular-text\" value=\"<?php if (is_array($meta) && isset($meta['text'])){ echo $meta['text']; } ?>\">\n</p>\n\n\t<?php }", "public function register_meta_box() {\n\n\t\t\tadd_meta_box($this->slug, $this->options['title'], array($this, 'setup_meta_box'), $this->screen, $this->options['context'], $this->options['priority']);\n\t\t\tremove_meta_box('postcustom', $this->screen, 'normal');\n\t\t}", "function style_meta_boxes() {\n ?>\n <style>\n .theme-metafield {\n width: 100%;\n padding: 5px;\n box-sizing: border-box;\n }\n .theme-metafield label {\n display: block;\n }\n .theme-metafield textarea, .theme-metafield input {\n width: 100%;\n }\n </style>\n <?\n }", "public function meta_box_display_forms() {\n\t?>\n\t\t<p><?php _e( 'Add forms to your Posts or Pages by locating the <strong>Add Form</strong> button in the area above your post/page editor.', 'visual-form-builder-pro' ); ?></p>\n \t<p><?php _e( 'You may also manually insert the shortcode into a post/page or the template tag into a template file.', 'visual-form-builder-pro' ); ?></p>\n \t<p>\n \t\t<?php _e( 'Shortcode', 'visual-form-builder-pro' ); ?>\n \t\t<input value=\"[vfb id='<?php echo (int) $_REQUEST['form']; ?>']\" readonly=\"readonly\" />\n \t</p>\n \t<p>\n \t\t<?php _e( 'Template Tag', 'visual-form-builder-pro' ); ?>\n \t\t<input value=\"&lt;?php vfb_pro( 'id=<?php echo (int) $_REQUEST['form']; ?>' ); ?&gt;\" readonly=\"readonly\"/>\n \t</p>\n\t<?php\n\t}", "public function location_meta_box_display($post){\n\t\t\n\t\t//set nonce field\n\t\twp_nonce_field('wp_location_nonce', 'wp_location_nonce_field');\n\t\t\n\t\t//collect variables\n $wp_team = get_post_meta($post->ID , 'wp_team', true); \n $wp_team_size = get_post_meta($post->ID , 'wp_team_size', true); \n $wp_team_role = get_post_meta($post->ID , 'wp_team_role', true);\n\t\t$wp_used_tech = get_post_meta($post->ID , 'wp_used_tech', true); \n $wp_date = get_post_meta($post->ID , 'wp_date', true); \n $wp_project = get_post_meta($post->ID , 'wp_project', true);\n $wp_code = get_post_meta($post->ID , 'wp_code', true); \n $wp_github = get_post_meta($post->ID , 'wp_github', true);\n $wp_facebook = get_post_meta($post->ID , 'wp_facebook', true);\n $wp_linkedin = get_post_meta($post->ID , 'wp_linkedin', true);\n $wp_contact = get_post_meta($post->ID , 'wp_contact', true);\n \n\t\t?>\n\t\t<p>Meer informatie over uw project</p>\n\t\t<div class=\"field-container\">\n\t\t\t<?php \n\t\t\t//before main form elementst hook\n\t\t\tdo_action('wp_location_admin_form_start'); \n\t\t\t?>\n \n\t\t\t<div class=\"field\">\n\t\t\t\t<label for=\"wp_team\">Gewerkt in een team</label>\n\t\t\t\t<textarea name=\"wp_team\" id=\"wp_team\"><?php echo $wp_team;?></textarea>\n\t\t\t</div>\n \n <div class=\"field\">\n\t\t\t\t<label for=\"wp_team_size\">Teamgroote</label>\n\t\t\t\t<textarea type=\"number\" name=\"wp_team_size\" id=\"wp_team_size\"><?php echo $wp_team_size;?></textarea>\n\t\t\t</div>\n \n <div class=\"field\">\n\t\t\t\t<label for=\"wp_team_role\">Mijn rol binnen het team</label>\n\t\t\t\t<textarea name=\"wp_team_role\" id=\"wp_team_role\"><?php echo $wp_team_role;?></textarea>\n\t\t\t</div>\n \n <div class=\"field\">\n\t\t\t\t<label for=\"wp_used_tech\">Gebruikte technieken</label>\n\t\t\t\t<textarea name=\"wp_used_tech\" id=\"wp_used_tech\"><?php echo $wp_used_tech;?></textarea>\n\t\t\t</div>\n \n <div class=\"field\">\n\t\t\t\t<label for=\"wp_date\">Datum van realisatie</label>\n\t\t\t\t<textarea type=\"date\" name=\"wp_date\" id=\"wp_date\"><?php echo $wp_date;?></textarea>\n\t\t\t</div>\n \n <div class=\"field\">\n\t\t\t\t<label for=\"wp_project\">Link naar project/opdracht</label>\n\t\t\t\t<textarea name=\"wp_project\" id=\"wp_project\"><?php echo $wp_project;?></textarea>\n\t\t\t</div>\n \n <div class=\"field\">\n\t\t\t\t<label for=\"wp_code\">Link naar de code</label>\n\t\t\t\t<textarea name=\"wp_code\" id=\"wp_code\"><?php echo $wp_code;?></textarea>\n\t\t\t</div>\n \n <div class=\"field\">\n\t\t\t\t<label for=\"wp_github\"><i class=\"fab fa-github\"></i></label>\n\t\t\t\t<textarea type=\"text\" name=\"wp_github\" id=\"wp_github\"><?php echo $wp_github;?></textarea>\n\t\t\t</div>\n \n <div class=\"field\">\n\t\t\t\t<label for=\"wp_facebook\"><i class=\"fab fa-facebook-square\"></i></label>\n\t\t\t\t<textarea name=\"wp_facebook\" id=\"wp_facebook\"><?php echo $wp_facebook;?></textarea>\n\t\t\t</div>\n \n <div class=\"field\">\n\t\t\t\t<label for=\"wp_linkedin\"><i class=\"fab fa-linkedin\"></i></label>\n\t\t\t\t<textarea name=\"wp_linkedin\" id=\"wp_linkedin\"><?php echo $wp_linkedin;?></textarea>\n\t\t\t</div>\t\n \n <div class=\"field\">\n\t\t\t\t<label for=\"wp_contact\">Neem contact op met mij</label>\n <small>Link om contact op te nemen met u</small>\n\t\t\t\t<textarea name=\"wp_contact\" id=\"wp_contact\"><?php echo $wp_contact;?></textarea>\n\t\t\t</div>\n\t\t<?php \n\t\t//after main form elementst hook\n\t\tdo_action('wp_location_admin_form_end'); \n\t\t?>\n\t\t</div>\n\t\t<?php\n\t\t\n\t}", "function homepage_display() {\n add_meta_box('shiba2_homepage', 'オプション', 'func_ishomepage', 'page', 'normal', 'default');\n}", "function meta_box( $object, $box ) {\n\t\t\n\t\t\t$meta_box_options = self::meta_box_args( $object->post_type );\n\t\t\n\t\t\tforeach ( $meta_box_options as $option ) {\n if ( method_exists( 'YouTube_White_Label_Shortcode', \"meta_box_{$option['type']}\" ) )\n call_user_func( array( $this, \"meta_box_{$option['type']}\" ), $option, get_post_meta( $object->ID, $option['name'], true ) );\n } ?>\n\t\t\t\n\t\t\t<p class=\"youtube-advanced-wrap\" style=\"text-align:right\"><a class=\"youtube-advanced\" href=\"#\"><?php _e( 'Advanced options', self::DOMAIN ); ?></a></p>\n \n <div id=\"youtube-advanced\" class=\"hide-if-js\"></div>\n \n <p class=\"output\">\n\t\t\t\t<label for=\"_YouTube_output\"><?php _e( 'Output:', self::DOMAIN ); ?></label>\n\t\t\t\t<br />\n\t\t\t\t<span id=\"_YouTube_output\" class=\"postbox\" style=\"box-sizing: border-box; display:block; min-height: 50px; padding: 5px;\"></span>\n\t\t\t</p>\n \n\t\t\t<!--<a id=\"youtube-send-to-content\" href=\"#\"><?php _e( 'send to content', self::DOMAIN ); ?></a>-->\n \n <div id=\"youtube-colorpicker\"></div>\n \n <?php printf( __( 'Like this plugin? <a href=\"%s\" target=\"_blank\">Buy me a beer</a>!', self::DOMAIN ), 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XQRHECLPQ46TE' ); ?></p>\n\t\t\t<?php\n\t\t}", "function render_meta_box_content( $post ) {\n $form_id = get_post_meta( $post->ID, '_wpuf_form_id', true );\n $user_analytics_info = get_post_meta( $post->ID, 'user_analytics_info', true ) ? get_post_meta( $post->ID, 'user_analytics_info', true ) : array();\n ?>\n <table class=\"form-table wpuf-user-analytics-listing\">\n <thead>\n <tr>\n <th><?php _e( 'User info title', 'wpuf-pro' ); ?></th>\n <th><?php _e( 'Value', 'wpuf-pro' ); ?></th>\n </tr>\n </thead>\n <tbody>\n <?php foreach ( $user_analytics_info as $key => $value ): ?>\n <tr>\n <td><strong><?php echo ucfirst( str_replace( '_', ' ', $key ) ); ?></strong></td>\n <td><?php echo $value; ?></td>\n </tr>\n <?php endforeach; ?>\n </tbody>\n </table>\n <style>\n .wpuf-user-analytics-listing td {\n font-size: 13px;\n }\n .wpuf-user-analytics-listing td, .wpuf-user-analytics-listing th {\n padding: 5px 8px;\n }\n </style>\n <?php\n }", "public function add_meta_boxes() {\r\n\t\tadd_meta_box( 'zakra-page-setting', esc_html__( 'Page Settings', 'zakra' ), 'Zakra_Meta_Box_Page_Settings::render', array(\r\n\t\t\t'post',\r\n\t\t\t'page',\r\n\t\t) );\r\n\t}", "public function meta($name = \"\", $content =\"\") {\n echo \"<meta name='\" . $name . \"' content ='\" . $content . \"'>\";\n }", "function add_meta_boxes() {\n\t\tif( function_exists( 'add_meta_box' ) ) {\n\t\t\tadd_meta_box( 'unit-info', __('Unit Information'), array( $this, '_display_unitinfo_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta_box( 'maps', __('Maps'), array( $this, '_display_maps_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta_box( 'gallery', __('Gallery'), array( $this, '_display_gallery_meta'), 'units', 'normal', 'low');\n\t\t\tadd_meta_box( 'unit-status', __('Availability'), array( $this, '_display_status_meta'), 'units', 'side', 'high');\n\t\t}\n\t}", "public function print_metadata_box($post) {\n // presses save, the application will check that the nonce field is still declared and\n // that is the same that the one provided here. If they don't match, probably something\n // nasty happened (or maybe just there was a bug).\n wp_nonce_field('makigas_metabox_video', 'makigas_metabox_nonce');\n\n // Put the fields.\n $this->print_field( $post, '_video_id', __( 'Video ID', 'makigas-videoman' ) );\n $this->print_field( $post, '_episode', __( 'Episode Number', 'makigas-videoman' ) );\n $this->print_field( $post, '_length', __( 'Length', 'makigas-videoman' ) );\n }", "function pz_add_custom_meta_box()\n{\n add_meta_box(\n 'custom_meta_box',\n 'Custom Image Metabox',\n 'pz_custom_meta_box_callbacks',\n 'page', // page, post etc.\n 'normal',\n 'high');\n}", "function pvplugin_add_meta_box() {\n\t\n\t$screens = array( 'policy' );\n\t\n\tforeach ( $screens as $screen ) {\n\t\n\t\tadd_meta_box(\n\t\t\t'myplugin_sectionid',\n\t\t\t__( 'Custom Meta Box', 'policy_library_plugin' ),\n\t\t\t array( &$this, 'pvplugin_meta_box_callback' ),\n\t\t\t$screen\n\t\t);\n\t\t\n\t\tadd_meta_box(\n\t\t\t'myplugin_side_sectionid',\n\t\t\t__( 'Policy Expire', 'policy_library_plugin' ),\n\t\t\t array( &$this, 'pvplugin_side_meta_box_callback' ),\n\t\t\t$screen,'side','high'\n\t\t);\n\t\t\n\t}\n\t}", "function ilusix_my_custom_meta_box() {\n global $myMetaBoxPostTypes;\n\n foreach($myMetaBoxPostTypes as $postType) {\n add_meta_box(\n 'my_custom_meta_box_identifier' . '-' . $postType,\n 'Meta box title',\n 'ilusix_my_custom_meta_box_callback',\n $postType,\n 'normal',\n 'default'\n );\n }\n}", "function prfx_custom_meta() {\r\n add_meta_box( 'prfx_meta', __( 'SEO\\'s H1 Title', 'prfx-textdomain' ), 'prfx_meta_callback', 'page', $context = 'normal', $priority = 'high' );\r\n}", "function _display_unitinfo_meta( $post ) {\n\t\tinclude( 'includes/metaboxes/unit-info.php' );\n\t}", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "public function addCustomBox() {\n add_meta_box( \n $this->post_type . '_meta',\n __( self::getLabel($this->post_type) . ' Meta', $this->post_type . '_meta' ),\n array($this, 'innerCustomBox'),\n $this->post_type,\n $this->fields_location, \n $this->fields_priority\n ); \n }", "public static function info_box() {\n\t\tglobal $hook_suffix;\n\n\t\tif ( 'post.php' !== $hook_suffix ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_meta_box(\n\t\t\t'munim_estimate_info_box',\n\t\t\t'Quick Info',\n\t\t\t[ __CLASS__, 'render_info_box' ],\n\t\t\t'munim_estimate',\n\t\t\t'side'\n\t\t);\n\t}", "public function setup_meta_box( $options ) {\n\t\t\n\t\t\t//add_meta_box\n\t\t\n\t\t}", "function ipr_meta_box() {\n\tglobal $post_ID;\n\n\t$feedtitle = get_post_meta($post_ID, 'ipr_feedtitle', true);\n\t$feedurl = get_post_meta($post_ID, 'ipr_feedurl', true);\n\t$feednumitems = get_post_meta($post_ID, 'ipr_feednumitems', true);\n\n\techo \"<input type=\\\"hidden\\\" name=\\\"ipr_nonce\\\" id=\\\"ipr_nonce\\\" value=\\\"\" . wp_create_nonce(md5(plugin_basename(__FILE__))) . \"\\\" />\";\n?>\n\t\t<table id=\"newmeta1\">\n\t\t\t<tr><th>Feed Title</th><td><input type=\"text\" size=\"60\" tabindex=\"900\" id=\"ipr_feedtitle\" name=\"ipr_feedtitle\" value=\"<?php echo $feedtitle;?>\"></td></tr>\n\t\t\t<tr><th>Feed URL</th><td><input type=\"text\" size=\"60\" tabindex=\"901\" id=\"ipr_feedurl\" name=\"ipr_feedurl\" value=\"<?php echo $feedurl;?>\"></td></tr>\n\t\t</table>\n\n\t<?php\n\t}", "function idem_pop_up_inner_add_meta_box()\n{\n add_meta_box(\n 'idem-pop-up-inner-meta-box', // id, used as the html id att\n __( 'Idem Pop Up Inner Meta Box' ), // meta box title, like \"Page Attributes\"\n 'idem_pop_up_inner_meta_box_cb', // callback function, spits out the content\n 'idem_pop_up', // post type or page. We'll add this to pages only\n 'side', // context (where on the screen)\n 'low' // priority, where should this go in the context?\n );\n}", "function the_meta()\n {\n }", "function fumseck_pagemeta() {\n\t\n\t// Initialize\n\t\n\t$output = '';\n\tglobal $post;\n\t$post_id = $post->ID;\n\t\n\t\n\t// Get metadata for the page from WordPress\n\t\n\t$post_title = get_the_title($post_id);\n\t$post_permalink = get_permalink($post_id);\n\t\n\t$post_has_featured_image = has_post_thumbnail( $post_id );\n\t\n\tif( $post_has_featured_image ) {\n\t\t$post_featured_image_large = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large'); // [URL, w, h, resized?]\n\t};\n\t\n\t$post_summary = wp_strip_all_tags( get_field( '_summary', $post_id, true ));\n\t\n\t\n\tif ( ! $post_summary ) {\t\t// if no summary, try a manual excerpt\n\t\t$post_summary = $post->post_excerpt;\n\t};\t// TODO: do something if there's no manual excerpt either\n\n\t\n\t// Static metadata\n\t\n\t$output .= '<meta name=\"twitter:site\" content=\"@gpaumier\"><meta name=\"twitter:creator\" content=\"@gpaumier\">';\t\n\t$output .= '<meta name=\"twitter:domain\" content=\"guillaumepaumier.com\">';\t\n\t$output .= '<meta property=\"fb:admins\" content=\"710543474\" />';\n\t//$output .= '<meta property=\"fb:admins\" content=\"579323492087704\" />';\n\t$output .= '<meta property=\"article:author\" content=\"https://www.facebook.com/gllmpmr\" />';\n\t$output .= '<meta property=\"article:publisher\" content=\"https://www.facebook.com/gllmpmr\" />';\n\t\n\t$output .= '<meta property=\"og:type\" content=\"article\" />'; // TODO: be more specific\n\t\n\t// Common metadata\n\t\n\t$output .= '<meta property=\"og:site_name\" content=\"' . get_bloginfo( 'name' ) . '\"/>';\n\t\n\t$output .= '<meta name=\"twitter:title\" content=\"' . $post_title . '\">';\n\t$output .= '<meta property=\"og:title\" content=\"' . $post_title . '\"/>';\n\t\n\t\n\t$output .= '<meta property=\"og:url\" content=\"' . $post_permalink . '\" />';\n\t\n\t\n\t$output .= '<meta property=\"og:description\" content=\"' . $post_summary . '\" />';\n\t\n\t// TODO: add locale\n\t\n\tif ( get_post_format( $post_id ) === 'image' ) {\n\t\t\n\t\t$output .= '<meta name=\"twitter:card\" content=\"photo\">';\n\t\t$output .= '<meta name=\"twitter:image\" content=\"' . $post_featured_image_large[0] . '\">';\n\t\t$output .= '<meta name=\"twitter:image:width\" content=\"' . $post_featured_image_large[1] . '\">';\n\t\t$output .= '<meta name=\"twitter:image:height\" content=\"' . $post_featured_image_large[2] . '\">';\n\t\t$output .= '<meta property=\"og:image:width\" content=\"' . $post_featured_image_large[1] . '\" />';\n\t\t$output .= '<meta property=\"og:image:height\" content=\"' . $post_featured_image_large[2] . '\" />';\n\t\t\n\t} else {\t// Not a photo\n\t\t\n\t\t$output .= '<meta name=\"twitter:description\" content=\"' . $post_summary . '\">';\n\t\t\n\t\tif( $post_has_featured_image ) {\n\t\t\t\n\t\t\t$output .= '<meta name=\"twitter:card\" content=\"summary_large_image\">';\n\t\t\t$output .= '<meta name=\"twitter:image:src\" content=\"' . $post_featured_image_large[0] . '\">';\n\t\t\t$output .= '<meta property=\"og:image\" content=\"' . $post_featured_image_large[0] . '\" />';\n\t\t\t$output .= '<meta property=\"og:image:width\" content=\"' . $post_featured_image_large[1] . '\" />';\n\t\t\t$output .= '<meta property=\"og:image:height\" content=\"' . $post_featured_image_large[2] . '\" />';\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t$output .= '<meta name=\"twitter:card\" content=\"summary\">';\n\t\t}\n\t\t\n\t};\n\t\n\n\techo $output;\n}", "function load_meta_box(){\n\t\tadd_action('add_meta_boxes', array($this, 'meta_box_hook'));\n\t}", "function mytheme_show_box() {\r\n global $meta_box, $post;\r\n \r\n // Use nonce for verification\r\n echo '<input type=\"hidden\" name=\"mytheme_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\r\n \r\n echo '<table class=\"form-table\">';\r\n\r\n foreach ($meta_box['fields'] as $field) {\r\n // get current post meta data\r\n $meta = get_post_meta($post->ID, $field['id'], true);\r\n \r\n echo '<tr>',\r\n '<th style=\"width:20%\"><label for=\"', $field['id'], '\">', $field['name'], '</label></th>',\r\n '<td>';\r\n switch ($field['type']) {\r\n case 'textarea':\r\n echo '<textarea name=\"', $field['id'], '\" id=\"', $field['id'], '\" cols=\"60\" rows=\"8\" style=\"width:97%\">', $meta ? $meta : $field['std'], '</textarea>', '<br />', $field['desc'];\r\n break;\r\n }\r\n echo '<td>',\r\n '</tr>';\r\n }\r\n \r\n echo '</table>';\r\n}", "function m_custom_meta() {\r\n add_meta_box( 'sm_meta', __( 'Featured Posts', 'sm-textdomain' ), 'sm_meta_callback', 'post' );\r\n add_meta_box( 'mm_meta', __( 'Main Posts', 'sm-textdomain' ), 'mm_meta_callback', 'post' );\r\n\r\n}", "function testimonials_meta_boxes() {\n\tadd_meta_box( 'testimonials_form', 'testimonials', 'normal', 'high' );\n}", "public function kiwip_add_meta_box(){\t\t\t\n\t\tadd_meta_box(\n\t\t\t$this->id,\n\t\t\t$this->title,\n\t\t\tarray(&$this, 'kiwip_metabox_callback'),\n\t\t\t$this->cpt_name,\n\t\t\t$this->context,\n\t\t\t$this->priority\n\t\t);\n\t}", "function vw_hospital_cs_custom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'vw-hospital' ), 'vw_hospital_cs_meta_callback' , 'doctors','normal', 'high' ); \n\n}", "function sm_custom_meta() {\n\tadd_meta_box('sm_meta', __( 'Post Destacado', 'sm-textdomain' ), 'sm_meta_callback', 'post' );\n}", "public function render_meta_boxes_preferences()\n {\n }", "function widget_sandbox_meta($args) {\n\textract($args);\n\t$options = get_option('widget_meta');\n\t$title = empty($options['title']) ? __( 'Meta', 'sandbox' ) : $options['title'];\n?>\n\t\t\t<?php echo $before_widget; ?>\n\t\t\t\t<?php echo $before_title . $title . $after_title; ?>\n\t\t\t\t<ul>\n\t\t\t\t\t<?php wp_register() ?>\n\n\t\t\t\t\t<li><?php wp_loginout() ?></li>\n\t\t\t\t\t<?php wp_meta() ?>\n\n\t\t\t\t</ul>\n\t\t\t<?php echo $after_widget; ?>\n<?php\n}", "public function meta_box_setup()\n {\n add_meta_box($this->token . '-data', __('Chiro Quiz Details', $this->token), [\n $this,\n 'meta_box_content'\n ], $this->token, 'normal', 'high');\n\n do_action($this->token . '_meta_boxes');\n }", "function sp_add_custom_box() {\n\tif( function_exists( 'add_meta_box' )) {\n\t\tadd_meta_box( 'sp_custom_box_1', __( 'General Property Info', 'sp' ), 'sp_inner_custom_box_1', 'post', 'normal', 'high' );\n\t\tadd_meta_box( 'sp_custom_box_2', __( 'Property Details', 'sp' ), 'sp_inner_custom_box_2', 'post', 'normal', 'high' );\n\t\tadd_meta_box( 'sp_custom_box_3', __( 'Property Photos', 'sp' ), 'sp_inner_custom_box_3', 'post', 'normal', 'high' );\n\t}\n}", "public function register_meta() {\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tadd_meta_box( 'ecf-'.$customField['name'], __( $customField['title'], 'exlist' ), $customField['callback'], $postTypes , 'advanced', 'high', $type = array($customField['name'], $customField['title'], $customField['type']) );\r\n\t\t\t}\r\n }", "function calendar_meta_box() { ?>\n\n\t\t<div>\n\t\t\t<label for=\"is-group-calendar\"><input type=\"checkbox\" name=\"is-group-calendar\" value=\"true\"> This calendar is for a BuddyPress group.</label>\n\t\t\t<p class=\"description\">A calendar may be associated with a BuddyPress group by assigning it the same slug as the slug of the group.</p>\t\n\t\t</div><?php \n\t}", "public static function access_register_meta_boxes()\n\t{\n\t\t$self = new Access();\n\t\tadd_meta_box('access_data', __('Access data', SAPI_TEXT_DOMAIN), array(get_class($self), 'access_metabox_callback'), Access::$MACHINE_NAME);\n\n\t\tadd_action( 'edit_form_after_title', function($post) {\n\t\t\tif ($post->post_type == Access::$MACHINE_NAME) {\n\t\t\t\tprint '<div style=\"position: relative;top: 20px;z-index: 9999;padding: 5px 0;font-size: 20px;font-weight: 400\">Description:</div>';\n\t\t\t}\n\t\t} );\n\t}", "function add_post_meta_box( ) {\n\t\t\tadd_meta_box('Course-Information', __( 'Course Information', $this->plugin_domain), array($this, 'setup_meta_english'), 'public-courses', 'normal', 'high');\n\t\t\tadd_meta_box('Arabic-Translations', __( 'Arabic Translations', $this->plugin_domain), array($this, 'setup_meta_translation'), 'public-courses', 'normal', 'high');\n\t\t\tadd_meta_box('Course-Dates', __( 'Course Dates', $this->plugin_domain), array($this, 'setup_meta_dates'), 'public-courses', 'normal', 'high');\n\t\t}", "public function add_meta_boxes() {\n\t\t// init tooltips here since at this time the meta-box pre-registration is done,\n\t\t// we already know the current screen and the 'condition()' has been checked\n\t\t$this->init_tooltips();\n\n\t\t// Avoid appearance own meta fields on the standard Custom Fields metabox.\n\t\tadd_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 2 );\n\t}", "function tc_post_metas() {\r\n global $post;\r\n //when do we display the metas ?\r\n //1) we don't show metas on home page, 404, search page by default\r\n //2) +filter conditions\r\n $post_metas_bool = ( tc__f('__is_home') || is_404() || 'page' == $post -> post_type ) ? false : true ;\r\n $post_metas_bool = apply_filters('tc_show_post_metas', $post_metas_bool ); \r\n \r\n if ( ! $post_metas_bool )\r\n return;\r\n\r\n ob_start();\r\n ?>\r\n\r\n <div class=\"entry-meta\">\r\n <?php\r\n if ( 'attachment' == $post -> post_type ) {\r\n $metadata = wp_get_attachment_metadata();\r\n printf( '%1$s <span class=\"entry-date\"><time class=\"entry-date updated\" datetime=\"%2$s\">%3$s</time></span> %4$s %5$s',\r\n '<span class=\"meta-prep meta-prep-entry-date\">'.__('Published' , 'customizr').'</span>',\r\n apply_filters('tc_use_the_post_modified_date' , false ) ? esc_attr( get_the_date( 'c' ) ) : esc_attr( get_the_modified_date('c') ),\r\n esc_html( get_the_date() ),\r\n ( isset($metadata['width']) && isset($metadata['height']) ) ? __('at dimensions' , 'customizr').'<a href=\"'.esc_url( wp_get_attachment_url() ).'\" title=\"'.__('Link to full-size image' , 'customizr').'\"> '.$metadata['width'].' &times; '.$metadata['height'].'</a>' : '',\r\n __('in' , 'customizr').'<a href=\"'.esc_url( get_permalink( $post->post_parent ) ).'\" title=\"'.__('Return to ' , 'customizr').esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ).'\" rel=\"gallery\"> '.get_the_title( $post->post_parent ).'</a>.'\r\n );\r\n }\r\n\r\n else {\r\n\r\n $categories_list = $this -> tc_category_list();\r\n\r\n $tag_list = $this -> tc_tag_list();\r\n\r\n $date = apply_filters( 'tc_date_meta',\r\n sprintf( '<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date updated\" datetime=\"%3$s\">%4$s</time></a>' ,\r\n esc_url( get_day_link( get_the_time( 'Y' ), get_the_time( 'm' ), get_the_time( 'd' ) ) ),\r\n esc_attr( get_the_time() ),\r\n apply_filters('tc_use_the_post_modified_date' , false ) ? esc_attr( get_the_date( 'c' ) ) : esc_attr( get_the_modified_date('c') ),\r\n esc_html( get_the_date() )\r\n )\r\n );//end filter\r\n\r\n $author = apply_filters( 'tc_author_meta',\r\n sprintf( '<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>' ,\r\n esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\r\n esc_attr( sprintf( __( 'View all posts by %s' , 'customizr' ), get_the_author() ) ),\r\n get_the_author()\r\n )\r\n );//end filter\r\n\r\n // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.\r\n $utility_text = '';\r\n if ( $tag_list ) {\r\n $utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>.' , 'customizr' );\r\n } elseif ( $categories_list ) {\r\n $utility_text = __( 'This entry was posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>.' , 'customizr' );\r\n } else {\r\n $utility_text = __( 'This entry was posted on %3$s<span class=\"by-author\"> by %4$s</span>.' , 'customizr' );\r\n }\r\n $utility_text = apply_filters( 'tc_meta_utility_text', $utility_text );\r\n\r\n //echoes every metas components\r\n printf(\r\n $utility_text,\r\n $categories_list,\r\n $tag_list,\r\n $date,\r\n $author\r\n );\r\n }//endif attachment\r\n ?>\r\n\r\n </div><!-- .entry-meta -->\r\n\r\n <?php\r\n $html = ob_get_contents();\r\n if ($html) ob_end_clean();\r\n echo apply_filters( 'tc_post_metas', $html );\r\n }", "public static function add_simple_social_meta_meta_box() {\n\n\t\t/* Get all available public post types. */\n\t\t$post_types = get_post_types( array( 'public' => true ), 'objects' );\n\n\t\t/* Loop through each post type, adding the meta box for each type's post editor screen. */\n\t\tforeach ( $post_types as $type )\n\t\t\tadd_meta_box( 'simple-social-meta-data', sprintf( __( 'Social Meta', SIMPLE_SOCIAL_META::$text_domain ), $type->labels->singular_name ), __CLASS__ . '::simple_social_meta_meta_box_display', $type->name, 'normal', 'high' );\n\t}", "function caviar_add_meta_box() {\n\n\t$screens = array('page' );\n\n\tforeach ( $screens as $screen ) {\n\n\t\tadd_meta_box(\n\t\t\t'caviar_sectionid',\n\t\t\tesc_html__( 'Caviar Metabox Field Example', 'caviar_textdomain' ),\n\t\t\t'caviar_meta_box_callback',\n\t\t\t$screen\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'caviar_2',\n\t\t\tesc_html__( 'Caviar Metabox 2', 'caviar_textdomain' ),\n\t\t\t'caviar_meta_box2_callback',\n\t\t\t$screen\n\t\t);\n\t}\n}", "function xgb_submit_live_link_meta_box() {\n add_meta_box(\n 'xgb_live_link_id', \t\t\t// Unique ID\n esc_html__('Publishing Instructions','xgb'), // Box title\n 'xgb_submit_live_link_custom_box', \t// Content callback\n 'post',\t\t \t\t\t// Post type\n\t\t\t'side',\t\t\t\t\t\t\t\t\t// Context\n\t\t\t'high'\t\t\t\t\t\t\t\t\t// Priority\n );\n}", "function shortcode_reference_render_meta_box(){\n\t$ShortcodeReferenceUIManager = new ShortcodeReferenceUIManager();\n\tforeach (get_post_types( array('public' => true) ) as $posttype){\n\t\tadd_meta_box('shortcode_overview_container',__('Shortcode reference','ShortcodesAutoreference'), array(&$ShortcodeReferenceUIManager,'showReferencePanel'), $posttype, 'side');\n\t}\n}", "function add() {\n\t\tforeach ($this->_meta_box['pages'] as $page) {\n\t\t\tadd_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);\n\t\t}\n\t}", "public function add_meta_boxes()\n \t{\n\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('WP_Custom_Login_Profile_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray(&$this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\n\n \t}", "function _display_gallery_meta( $post ) {\n\t\tinclude( 'includes/metaboxes/gallery.php' );\n\t}", "function registry_add_post_meta_boxes() {\n\n add_meta_box(\n 'registry-info', // Unique ID\n 'When did you complete the Cozmeena Shawl?', // Title\n 'registry_coz_info_meta_box', // Callback function\n 'coz_registry', // Admin page (or post type)\n 'side', // Context\n 'core' // Priority\n );\n\n global $current_user;\n if($current_user->roles[0] == 'administrator') {\n add_meta_box(\n\t\t'registry-num', // Unique ID\n\t\t'International Cozmeena Registration Number', // Title\n\t\t'registry_coz_num_meta_box', // Callback function\n\t\t'coz_registry', // Admin page (or post type)\n\t\t'normal', // Context\n\t\t'low' // Priority\n\t\t);\n }\n}", "function add_custom_meta_for_asso_event()\n{\n add_meta_box('asso_event_meta_box',\n 'Asso. event',\n 'display_asso_event_meta_box',\n 'asso_event', 'normal', 'high'\n );\n}", "function et_divi_post_meta() {\n\t\t$pages = array(\n\t\t\tintval( \\SermonManager::getOption( 'smp_archive_page', 0 ) ),\n\t\t\tintval( \\SermonManager::getOption( 'smp_tax_page', 0 ) ),\n\t\t);\n\t\tif ( in_array( get_the_ID(), $pages ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$postinfo = is_single() ? et_get_option( 'divi_postinfo2' ) : et_get_option( 'divi_postinfo1' );\n\n\t\tif ( $postinfo ) :\n\t\t\techo '<p class=\"post-meta\">';\n\t\t\techo et_pb_postinfo_meta( $postinfo, et_get_option( 'divi_date_format', 'M j, Y' ), esc_html__( '0 comments', 'Divi' ), esc_html__( '1 comment', 'Divi' ), '% ' . esc_html__( 'comments', 'Divi' ) );\n\t\t\techo '</p>';\n\t\tendif;\n\t}", "private function initMetaBox(){\n\t\t$path = get_template_directory() . '/sub/customfield/';\n\t\tif(function_exists('of_get_option')){\n\t\t\tif(of_get_option('is-seo',true)){\n\t\t\t\tnew WPO_MetaBox(array(\n\t\t\t\t 'id' => 'wpo_seo',\n\t\t\t\t 'title' => $this->l('SEO Fields'),\n\t\t\t\t 'types' => array('page','portfolio','post','video'),\n\t\t\t\t 'priority' => 'high',\n\t\t\t\t 'template' => $path . 'seo.php',\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_template',\n\t\t 'title' => $this->l('Advanced Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page-advanced.php'\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_pageconfig',\n\t\t 'title' => $this->l('Page Configuration'),\n\t\t 'types' => array('page'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'page.php',\n\t\t));\n\n\t\tnew WPO_MetaBox(array(\n\t\t 'id' => 'wpo_post',\n\t\t 'title' => $this->l('Embed Options'),\n\t\t 'types' => array('post','video'),\n\t\t 'priority' => 'high',\n\t\t 'template' => $path . 'post.php',\n\t\t));\n\t}", "public function custom_meta_add() {\n\t\tif( !$this->options->show_on || in_array(get_the_id(), $this->options->show_on ) ){\n\t\t\tforeach( $this->options->display_on as $post_type ){\n\t\t\t\tadd_meta_box(\n\t\t\t\t\t$this->unique_key, // Unique Key\n\t\t\t\t\t$this->options->title ? esc_html__( $this->options->title ) : 'Related Content', //Title\n\t\t\t\t\tarray(&$this, 'custom_meta_render' ), // Callback (builds html)\n\t\t\t\t\t$post_type, // Post type\n\t\t\t\t\t$this->options->context, // Context\n\t\t\t\t\t$this->options->priority, // Priority\n\t\t\t\t\t$callback_args = null\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t}" ]
[ "0.85132086", "0.7931869", "0.79127264", "0.7732039", "0.7731091", "0.76135564", "0.76056254", "0.7532186", "0.7525913", "0.74966204", "0.7403616", "0.7395427", "0.7389931", "0.7383388", "0.7367782", "0.7366811", "0.73558015", "0.7329221", "0.7288091", "0.7282485", "0.72709256", "0.72619134", "0.7258869", "0.725028", "0.7246747", "0.72363114", "0.7230578", "0.7211391", "0.71693265", "0.71673155", "0.71560925", "0.71548516", "0.7118428", "0.7105765", "0.70990026", "0.70914096", "0.70910716", "0.70795995", "0.7068163", "0.70642436", "0.706006", "0.70504296", "0.7045783", "0.703762", "0.70006996", "0.69813544", "0.6964514", "0.69622403", "0.69559157", "0.69553894", "0.6943448", "0.6939027", "0.6932822", "0.6929406", "0.69231176", "0.6906758", "0.68962216", "0.68871367", "0.68856716", "0.6884967", "0.6874988", "0.68730044", "0.6866779", "0.68611646", "0.6860269", "0.6855069", "0.68545365", "0.6845731", "0.68226177", "0.681829", "0.6815665", "0.6812548", "0.68079245", "0.68079036", "0.6804073", "0.68020433", "0.6801295", "0.6799384", "0.67870116", "0.6786013", "0.6785418", "0.67797285", "0.6773539", "0.6773065", "0.6772385", "0.67705727", "0.67657596", "0.67653006", "0.67564166", "0.67448694", "0.674334", "0.6742834", "0.6742365", "0.67397755", "0.6733462", "0.67249376", "0.67202497", "0.671896", "0.6718532", "0.67173094", "0.6716447" ]
0.0
-1
Save the post meta data from our plugin
public static function saveMetaData( $post_id ) { // Check to see if multiple items should flag so the data isn't saved if( !wp_verify_nonce( $_POST[self::NONCE_NAME], self::NONCE_ACTION ) ) { return; } // Set the data we want to be saved $is_disabled = ( isset( $_POST['wp_disable_page__is_disabled'] ) && $_POST['wp_disable_page__is_disabled'] != '' ) ? $_POST['wp_disable_page__is_disabled'] : '0'; $url = ( isset( $_POST['wp_disable_page__url'] ) && $_POST['wp_disable_page__url'] != '' ) ? $_POST['wp_disable_page__url'] : ''; // Save the data update_post_meta( $post_id, 'wp_disable_page__is_disabled', $is_disabled ); update_post_meta( $post_id, 'wp_disable_page__url', $url ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function save_meta() {}", "protected function save_meta() {\n\n\t\t// save all data in array\n\t\tupdate_post_meta( $this->post_id, APP_REPORTS_P_DATA_KEY, $this->meta );\n\n\t\t// also save total reports in separate meta for sorting queries\n\t\tupdate_post_meta( $this->post_id, APP_REPORTS_P_TOTAL_KEY, $this->total_reports );\n\t}", "function savePostMeta($post_id)\n\t\t{\n\t\t\t$dataMetas = self::getDataMetas();\n\n\t\t\tforeach ($dataMetas as $key => $meta) {\n\t\t\t\t$nameMeta = $meta['_name_meta_box'];\n\t\t\t\tif ( isset($_POST[$nameMeta]) ) { \n\t\t\t\t\tupdate_post_meta( $post_id, $nameMeta, $_POST[$nameMeta] );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "public function save(){\r\n // Need the post type name again\r\n $post_type_name = $this->post_type_name;\r\n\r\n add_action( 'save_post',\r\n function() use( $post_type_name ){\r\n // Deny the WordPress autosave function\r\n if( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;\r\n\r\n if ( ! wp_verify_nonce( $_POST['custom_post_type'], plugin_basename(__FILE__) ) ) return;\r\n\r\n global $post;\r\n\r\n if( isset( $_POST ) && isset( $post->ID ) && get_post_type( $post->ID ) == $post_type_name ){\r\n global $custom_fields;\r\n\r\n // Loop through each meta box\r\n foreach( $custom_fields as $title => $fields ){\r\n // Loop through all fields\r\n foreach( $fields as $label => $type ){\r\n $field_id_name = strtolower( str_replace( ' ', '_', $title ) ) . '_' . strtolower( str_replace( ' ', '_', $label ) );\r\n if($_POST['custom_meta'][$field_id_name] != ''){//Check Entry is not empty\r\n update_post_meta( $post->ID, $field_id_name, $_POST['custom_meta'][$field_id_name] );\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n );\r\n }", "function archive_SaveMetaData( $post_id ) {\n\t\tglobal $archive_fields;\n\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {return;}\n\n\t\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\t\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {return;}\n\t\t}else {\n\t\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {return;}\n\t\t}\n\n\t\tforeach ($archive_fields as $key => $value) {\n\t\t\t$slug = $value['slug'];\n\t\t\t//print_r($value);\n\n\t\t\tif (isset( $_POST['archive_'.$value['slug'].'_nonce'] ) ) {\n\n\t\t\t\tforeach($value['fields'] as $key => $value){\n\t\t\t\t\t$name = 'archive_'.$slug.'_'.$value['name'];\n\t\t\t\t\tif($value['type'] == 'checkbox'){\n\t\t\t\t\t\tif(isset($_POST[$name])){\n\t\t\t\t\t\t\tupdate_post_meta($post_id, $name, 'true');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tupdate_post_meta($post_id, $name, 'false');\n\t\t\t\t\t\t}\n\t\t\t\t\t}elseif(isset($_POST[$name])){\n\t\t\t\t\t\t$value = esc_html($_POST[$name]);\n\t\t\t\t\t\tupdate_post_meta($post_id, $name, $value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static function save_meta_data($post_id)\n {\n $standardMetaValues = array(\"label\", \"link\", \"priority\");\n parent::save_standard_meta_values($standardMetaValues, $post_id);\n }", "function SavePost()\n\t{\n\t\n\t\t// wordpress global\n\t\tglobal $post;\n\t\t\n\t\t// this first check is, I feel, a hack: why should SavePost run on page load?\n\t\tif ( isset( $_POST['tlsp_noncename'] ) )\n\t\t{\n\t\t\n\t\t\t// run the following checks:\n\t\t\tif (\n\t\t\t\t// validate the nonce\n\t\t\t\t( wp_verify_nonce( $_POST['tlsp_noncename'], plugin_basename(__FILE__) ) )\n\t\t\t\t// make sure this is not an autosave\n\t\t\t\t&& ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) == false )\n\t\t\t\t// check user permissions\n\t\t\t\t&& ( current_user_can( 'edit_post', $post_id ) )\n\t\t\t\t// check that the element exists\n\t\t\t\t&& ( isset ( $_POST['tlsp_text'] ) )\n\t\t\t)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t// if there is data, update the meta field\n\t\t\t\tif ( $_POST['tlsp_text'] != '' )\n\t\t\t\t{\n\t\t\t\t\tupdate_post_meta( $post->ID, 'tlsp_text', $_POST['tlsp_text'] );\n\t\t\t\t}\n\t\t\t\t// otherwise delete the table row, for a cleaner database\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdelete_post_meta( $post->ID, 'tlsp_text' );\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t// if the checks fail, return an error\n\t\t\telse\n\t\t\t{\n\t\t\t\t// TODO: This error does not show up yet\n\t\t\t\techo '<div id=\"message\" class=\"error\">Error on saving meta data!</div>';\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "function wm_portfolio_cp_save_meta( $post_id ) {\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )\n\t\t\treturn $post_id;\n\t\t//If the nonce isn't there, or we can't verify it, return\n\t\tif ( ! isset( $_POST['wm_portfolio-metabox-nonce'] ) || ! wp_verify_nonce( $_POST['wm_portfolio-metabox-nonce'], 'wm_portfolio-metabox-nonce' ) )\n\t\t\treturn $post_id;\n\t\t//If current user can't edit this post, return\n\t\tif ( ! current_user_can( 'edit_post' ) )\n\t\t\treturn $post_id;\n\n\t\t//Save each meta field separately\n\t\t$metaFields = wm_portfolio_meta_fields();\n\n\t\twm_save_meta( $post_id, $metaFields );\n\t}", "function textbook_save_data() {\r\n global $post;\r\n update_post_meta($post->ID, 'textbook_pub',\r\n\t\t $_POST['textbook_pub']);\r\n update_post_meta($post->ID, 'textbook_author',\r\n\t\t $_POST['textbook_author']);\r\n update_post_meta($post->ID, 'textbook_date',\r\n\t\t $_POST['textbook_date']);\r\n}", "function save_meta_info( $post_id, $post ) {\n if($post->post_type != 'events')\n return $post_id;\n\n /* Verify the nonce before proceeding. */\n if ( !isset( $_POST['mindevents_event_meta_nonce'] ) || !wp_verify_nonce( $_POST['mindevents_event_meta_nonce'], basename( __FILE__ ) ) )\n return $post_id;\n\n\n\n $field_key = 'event_meta';\n /* Get the posted data and sanitize it for use as an HTML class. */\n $new_meta_values = (isset( $_POST[$field_key]) ? $_POST[$field_key] : '' );\n if($new_meta_values) :\n foreach ($new_meta_values as $key => $value) :\n update_post_meta( $post_id, $key, $value);\n endforeach;\n endif;\n\n return $post_id;\n }", "private function save_paypal_meta_data()\n {\n $postMeta = [\n 'payer_email' => 'Payer PayPal address',\n 'first_name' => 'Payer first name',\n 'last_name' => 'Payer last name',\n 'payment_type' => 'Payment type',\n ];\n\n foreach ($postMeta as $key => $name) {\n $value = wc_clean($this->request->get($key, FILTER_DEFAULT));\n $value and update_post_meta($this->order->get_id(), $name, $value);\n }\n }", "protected function save_meta() {\n\t\t// save report meta details\n\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_DATA_KEY, $this->get_meta() );\n\t}", "function foodpress_save_meta_data($post_id, $post){\n\t\t\tglobal $pagenow;\n\n\t\t\tif ( empty( $post_id ) || empty( $post ) ) return;\n\t\t\tif($post->post_type!='menu') return;\n\t\t\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return;\n\n\t\t\t// Prevent quick edit from clearing custom fields\n\t\t\tif (defined('DOING_AJAX') && DOING_AJAX) return;\n\t\t\tif ( is_int( wp_is_post_revision( $post ) ) ) return;\n\t\t\tif ( is_int( wp_is_post_autosave( $post ) ) ) return;\n\t\t\t\n\t\t\t// verify this came from the our screen and with proper authorization,\n\t\t\t// because save_post can be triggered at other times\n\t\t\tif( isset($_POST['fp_noncename']) ){\n\t\t\t\tif ( !wp_verify_nonce( $_POST['fp_noncename'], plugin_basename( __FILE__ ) ) ){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t$_allowed = array( 'post-new.php', 'post.php' );\n\t\t\tif(!in_array($pagenow, $_allowed)) return;\n\n\t\t\t/* Get the post type object. */\n\t\t\t$post_type = get_post_type_object( $post->post_type );\n\t\t\t\n\t\t\t\n\t\t\t// Check permissions\n\t\t\tif ( !current_user_can( $post_type->cap->edit_post, $post_id ) )\n\t\t\t\treturn;\t\n\n\t\t\t\n\t\t\t//save the post meta values\n\t\t\t//$fields_ar =apply_filters();\n\t\t\t\n\t\t\t$meta_fields = $this->foodpress_menu_metabox_array();\t\t\t\n\t\t\t\n\t\t\t// run through all the custom meta fields\n\t\t\tforeach($meta_fields as $mb=>$f_val){\n\t\t\t\t\n\t\t\t\tif(!empty($f_val)){\n\t\t\t\t\tif( $f_val['type']=='multiinput'){\n\t\t\t\t\t\tforeach($f_val['ids'] as $fvals){\n\t\t\t\t\t\t\t$this->fp_individual_post_values($fvals, $post_id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->fp_individual_post_values($f_val['id'], $post_id);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//update_post_meta($post_id, 'test', $_POST['fp_menuicons']);\n\t\t\t\n\t\t\t// save user closed meta field boxes\n\t\t\t$fp_closemeta_value = (isset($_POST['fp_collapse_meta_boxes']))? $_POST['fp_collapse_meta_boxes']: '';\n\t\t\t\n\t\t\tfoodpress_save_collapse_metaboxes($post_id, $fp_closemeta_value );\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// (---) hook for addons\n\t\t\tdo_action('foodpress_save_meta', $post_id);\t\n\t\t\t\t\n\t\t}", "function classiera_save_post_meta($post_id, $post) {\r\n\t\r\n\t// verify this came from the our screen and with proper authorization,\r\n\t// because save_post can be triggered at other times\r\n\tif ( !wp_verify_nonce( isset( $_POST['eventmeta_noncename'] ) ? $_POST['eventmeta_noncename'] : '', plugin_basename(__FILE__) )) {\r\n\treturn $post->ID;\r\n\t}\r\n\r\n\t// Is the user allowed to edit the post or page?\r\n\tif ( !current_user_can( 'edit_post', $post->ID ))\r\n\t\treturn $post->ID;\r\n\r\n\t// OK, we're authenticated: we need to find and save the data\r\n\t// We'll put it into an array to make it easier to loop though.\r\n\t\r\n\t$events_meta['featured_post'] = $_POST['featured_post'];\r\n\t\r\n\t$chk = ( isset( $_POST['featured_post'] ) && $_POST['featured_post'] ) ? '1' : '2';\r\n\tupdate_post_meta( $post_id, 'featured_post', $chk );\r\n\t\r\n\t// Add values of $events_meta as custom fields\r\n\tforeach ($events_meta as $key => $value) { // Cycle through the $events_meta array!\r\n\t\tif( $post->post_type == 'post' ) return; // Don't store custom data twice\r\n\t\t$value = implode(',', (array)$value); // If $value is an array, make it a CSV (unlikely)\r\n\t\tif(get_post_meta($post->ID, $key, FALSE)) { // If the custom field already has a value\r\n\t\t\tupdate_post_meta($post->ID, $key, $value);\r\n\t\t} else { // If the custom field doesn't have a value\r\n\t\t\tadd_post_meta($post->ID, $key, $value);\r\n\t\t}\r\n\t\tif(!$value) delete_post_meta($post->ID, $key); // Delete if blank\r\n\t}\r\n\r\n}", "function rps_save_custom_meta() {\n\tglobal $post;\n\n\t// Stops WP from clearing post meta when autosaving\n\tif( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) {\n\t return $post->ID;\n\t}\n\tif (isset($_POST['rps-url'])) {\n\t\t$clean = esc_url_raw($_POST['rps-url']);\n\t\tupdate_post_meta($post->ID, '_url' , $clean);\n\t}\n\tif (isset($_POST['rps-tagline'])) {\n\t\t$realclean = sanitize_text_field($_POST['rps-tagline']);\n\t\tupdate_post_meta($post->ID, '_tagline' , $realclean);\n\t}\n\n}", "function portfolioism_meta_save( $post_id ) {\n $is_autosave = wp_is_post_autosave( $post_id );\n $is_revision = wp_is_post_revision( $post_id );\n $is_valid_nonce = ( isset( $_POST[ 'portfolioism_valid_nonce' ]) && wp_verify_nonce( $_POST['poortfolioism_valid_nonce'], basename(__FILE__) ) ) ? 'true' : 'false';\n \n if ( $is_autosave || $is_revision || !$is_valid_nonce) {\n return;\n }\n\n if ( isset( $_POST['medium'] ) ) {\n update_post_meta($post_id, 'medium', sanitize_text_field($_POST['medium'] ) );\n }\n\n if ( isset ($_POST['height'] ) ) {\n update_post_meta($post_id, 'height', sanitize_text_field($_POST['height'] ) );\n }\n}", "function meta_boxes_save() {\r\n\t\t\r\n\t\t// Only process if the form has actually been submitted\r\n\t\tif (\r\n\t\t\tisset( $_POST['_wpnonce'] ) &&\r\n\t\t\tisset( $_POST['post_ID'] )\r\n\t\t) {\r\n\t\t\t\r\n\t\t\t// Do nonce security check\r\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\r\n\t\t\t\r\n\t\t\t// Grab post ID\r\n\t\t\t$post_ID = (int) $_POST['post_ID'];\r\n\t\t\t\r\n\t\t\t// Iterate through each possible piece of meta data\r\n\t\t\tforeach( $this->post_meta as $key => $value ) {\r\n\t\t\t\tif ( isset( $_POST['_' . $key] ) ) {\r\n\t\t\t\t\t$data = esc_html( $_POST['_' . $key] ); // Sanitise data input\r\n\t\t\t\t\tupdate_post_meta( $post_ID, '_' . $key, $data ); // Store the data\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "function vw_mobile_app_pro_posttype_ex_bn_metadesig_save( $post_id ) {\n if( isset( $_POST[ 'meta-desig' ] ) ) {\n update_post_meta( $post_id, 'meta-desig', esc_html($_POST[ 'meta-desig' ]) );\n }\n if( isset( $_POST[ 'meta-call' ] ) ) {\n update_post_meta( $post_id, 'meta-call', esc_html($_POST[ 'meta-call' ]) );\n }\n // Save facebookurl\n if( isset( $_POST[ 'meta-facebookurl' ] ) ) {\n update_post_meta( $post_id, 'meta-facebookurl', esc_url($_POST[ 'meta-facebookurl' ]) );\n }\n // Save linkdenurl\n if( isset( $_POST[ 'meta-linkdenurl' ] ) ) {\n update_post_meta( $post_id, 'meta-linkdenurl', esc_url($_POST[ 'meta-linkdenurl' ]) );\n }\n if( isset( $_POST[ 'meta-twitterurl' ] ) ) {\n update_post_meta( $post_id, 'meta-twitterurl', esc_url($_POST[ 'meta-twitterurl' ]) );\n }\n // Save googleplusurl\n if( isset( $_POST[ 'meta-googleplusurl' ] ) ) {\n update_post_meta( $post_id, 'meta-googleplusurl', esc_url($_POST[ 'meta-googleplusurl' ]) );\n }\n // Save designation\n if( isset( $_POST[ 'meta-designation' ] ) ) {\n update_post_meta( $post_id, 'meta-designation', esc_html($_POST[ 'meta-designation' ]) );\n }\n}", "public function save($post_data = array(), $meta_data = array())\n {\n if ( !$this->is_installed(array(self::STRUCTURE_MODULE, self::PAGES_MODULE)))\n {\n return;\n }\n\n if ($this->is_installed(self::STRUCTURE_MODULE))\n {\n $this->save_structure($this->get_core_pages(TRUE));\n }\n else if ($this->is_installed(self::PAGES_MODULE))\n {\n $this->save_pages($this->get(FALSE, FALSE, ee()->publisher_lib->publisher_save_status), $post_data);\n }\n }", "function construction_realestate_posttype_bn_metadesig_save( $post_id ) {\n if( isset( $_POST[ 'meta-desig' ] ) ) {\n update_post_meta( $post_id, 'meta-desig', esc_html($_POST[ 'meta-desig' ]) );\n }\n if( isset( $_POST[ 'meta-call' ] ) ) {\n update_post_meta( $post_id, 'meta-call', esc_html($_POST[ 'meta-call' ]) );\n }\n // Save facebookurl\n if( isset( $_POST[ 'meta-facebookurl' ] ) ) {\n update_post_meta( $post_id, 'meta-facebookurl', esc_url($_POST[ 'meta-facebookurl' ]) );\n }\n // Save linkdenurl\n if( isset( $_POST[ 'meta-linkdenurl' ] ) ) {\n update_post_meta( $post_id, 'meta-linkdenurl', esc_url($_POST[ 'meta-linkdenurl' ]) );\n }\n if( isset( $_POST[ 'meta-twitterurl' ] ) ) {\n update_post_meta( $post_id, 'meta-twitterurl', esc_url($_POST[ 'meta-twitterurl' ]) );\n }\n // Save googleplusurl\n if( isset( $_POST[ 'meta-googleplusurl' ] ) ) {\n update_post_meta( $post_id, 'meta-googleplusurl', esc_url($_POST[ 'meta-googleplusurl' ]) );\n }\n}", "private function PostSaver(){\n if ($this->updateMode){\n $post = Post::find($this->postId);\n } else {\n $post = new Post();\n }\n $post->user_id = Auth::user()->id;\n $post->title = $this->title;\n $post->category_id = (int)$this->categories;\n $post->caption = $this->caption;\n $post->url = $this->imagePath;\n $post->save();\n $post->Tag()->sync($this->tags);\n }", "function save_post_meta( $post_id, $post ) {\n\n\t\t\t/* Verify the nonce before proceeding. */\n\t\t\tif ( !isset( $_POST['video_post_nonce'] ) || !wp_verify_nonce( $_POST['video_post_nonce'], basename( __FILE__ ) ) )\n\t\t\t\treturn $post_id;\n\n\t\t\t/* Get the post type object. */\n\t\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t\t/* Check if the current user has permission to edit the post. */\n\t\t\tif ( !current_user_can( $post_type->cap->edit_post, $post_id ) )\n\t\t\t\treturn $post_id;\n\n\t\t\tforeach (array('video-source-file') as $meta_key)\n\t\t\t{\n\t\t\t\t/* Get the posted data and sanitize it for use as an HTML class. */\n\t\t\t\t$new_meta_value = ( isset( $_POST[$meta_key] ) ? $_POST[$meta_key] : '' );\n\n\t\t\t\t/* Get the meta value of the custom field key. */\n\t\t\t\t$meta_value = get_post_meta( $post_id, $meta_key, true );\n\n\t\t\t\t//first added: import\n\t\t\t\tif ($new_meta_value && !$meta_value && $meta_key = 'video-source-file')\n\t\t\t\t\timportFile($new_meta_value, $post->post_title, $post->post_author, $post->post_name);\n\n\t\t\t\t/* If a new meta value was added and there was no previous value, add it. */\n\t\t\t\tif ( $new_meta_value && '' == $meta_value )\n\t\t\t\t\tadd_post_meta( $post_id, $meta_key, $new_meta_value, true );\n\n\t\t\t\t/* If the new meta value does not match the old value, update it. */\n\t\t\t\telseif ( $new_meta_value && $new_meta_value != $meta_value )\n\t\t\t\t\tupdate_post_meta( $post_id, $meta_key, $new_meta_value );\n\n\t\t\t\t/* If there is no new meta value but an old value exists, delete it. */\n\t\t\t\telseif ( '' == $new_meta_value && $meta_value )\n\t\t\t\t\tdelete_post_meta( $post_id, $meta_key, $meta_value );\n\t\t\t}\n\n\t\t}", "static function save_metabox_data($post_id){\n\t\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$keywords = array();\t\t\t\n\t\t\t//now it's safe to save info\n\t\t\tif(isset($_POST['affiliate_keywords'])){\n\t\t\t\tforeach($_POST['affiliate_keywords'] as $key => $value){\n\t\t\t\t\t$keywords[$key] = trim($value);\n\t\t\t\t}\n\t\t\t\tself::save_keywords($post_id, $keywords);\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($_POST['local_position_enabled'])){\n\t\t\t\tupdate_post_meta($post_id, 'local_position_enabled', 'y');\n\t\t\t}\n\t\t\telse{\n\t\t\t\tupdate_post_meta($post_id, 'local_position_enabled', '');\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($_POST['position'])){\n\t\t\t\t$positions = array();\n\t\t\t\tforeach($_POST['position'] as $key => $value){\n\t\t\t\t\t$positions[$key] = $value;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tupdate_post_meta($post_id, 'local_positions', $positions);\n\t\t\t}\n\t\t\t\n\t\t\t//saving loal links\n\t\t\tif(isset($_POST['local_links'])){\n\t\t\t\tupdate_post_meta($post_id, 'local_links', $_POST['local_links']);\n\t\t\t}\n\t\t}", "function savePostMeta($post_id, $post = false) {\n\t\tif(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n \treturn $post_id;\n\t\t}\n\t\tif(isSet($_POST['lepress-assignment-meta'])) {\n\t\t\t$meta_data = (object) $_POST['lepress-assignment-meta'];\n\t\t\tupdate_post_meta($post_id, '_lepress-assignment-meta', $meta_data);\n\t\t\tif($post->post_status == \"publish\" || $post->post_status == \"private\" || $post->post_status == \"password\") {\n\t\t\t\t//Send feedback finally to teacher blog\n\t\t\t\t$this->subscriptions->sendAnswerURL($meta_data, $post);\n\t\t\t}\n\t\t}\n\t}", "public function kiwip_save_post(){\n\t\t// Load Helper class\n\t\t$Helper = new Kiwip_Helper;\n\t\t// Deny the wordpress autosave function\n\t\tif(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return;\n\n\t\tif($_POST && !wp_verify_nonce($_POST['kiwip_nonce'], plugin_basename(__FILE__))) return;\n\t\tif(!isset($_POST)) return;\n\t\t\n\t\tglobal $post;\n\t\tif(!isset($post->ID) && get_post_type($post->ID) !== $this->post_type_name) return;\n\t\t\n\t\t// Loop through each meta box\n\t\tif(!empty($this->meta_fields)){\n\t\t\tforeach($this->meta_fields as $field){\n\t\t\t\t$field_id_name = '_'.$this->slug.\"_\".$Helper->kiwip_make_slugable($field['name']);\n\n\t\t\t\t// validation rules here \n\n\t\t\t\tupdate_post_meta($post->ID, $field_id_name, $_POST['kiwip'][$field_id_name]);\n\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\t\t\n\t}", "function save_meta_box_custompost( $post_id ) {\n if ( defined( 'DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;\n if ( $parent_id = wp_is_post_revision( $post_id ) ) {\n $post_id = $parent_id;\n }\n $fields = ['published_date'];\n foreach ( $fields as $field ) {\n if ( array_key_exists( $field, $_POST ) ) {\n update_post_meta( $post_id, $field, sanitize_text_field( $_POST[$field] ) );\n }\n }\n }", "function prfx_meta_save( $post_id ) {\r\n \r\n // Checks save status\r\n $is_autosave = wp_is_post_autosave( $post_id );\r\n $is_revision = wp_is_post_revision( $post_id );\r\n $is_valid_nonce = ( isset( $_POST[ 'prfx_nonce' ] ) && wp_verify_nonce( $_POST[ 'prfx_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';\r\n \r\n // Exits script depending on save status\r\n if ( $is_autosave || $is_revision || !$is_valid_nonce ) {\r\n return;\r\n }\r\n \r\n // Checks for input and sanitizes/saves if needed\r\n if( isset( $_POST[ 'meta-text' ] ) ) {\r\n update_post_meta( $post_id, 'meta-text', sanitize_text_field( $_POST[ 'meta-text' ] ) );\r\n }\r\n \r\n}", "protected function save_meta() {\n\n\t\t// save all data in array\n\t\tupdate_user_meta( $this->user_id, APP_REPORTS_U_DATA_KEY, $this->meta );\n\n\t\t// also save total reports in separate meta for sorting queries\n\t\tupdate_user_meta( $this->user_id, APP_REPORTS_U_TOTAL_KEY, $this->total_reports );\n\t}", "function dp_template_save_meta_box_data($post_id)\r\n{\r\n\r\n /*\r\n * We need to verify this came from our screen and with proper authorization,\r\n * because the save_post action can be triggered at other times.\r\n */\r\n\r\n // Check if our nonce is set.\r\n if (!isset($_POST['myplugin_meta_box_nonce'])) {\r\n return;\r\n }\r\n // Verify that the nonce is valid.\r\n if (!wp_verify_nonce($_POST['myplugin_meta_box_nonce'], 'myplugin_meta_box')) {\r\n return;\r\n }\r\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\r\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\r\n return;\r\n }\r\n // Check the user's permissions.\r\n if (isset($_POST['post_type']) && 'page' == $_POST['post_type']) {\r\n if (!current_user_can('edit_page', $post_id)) {\r\n return;\r\n }\r\n } else {\r\n if (!current_user_can('edit_post', $post_id)) {\r\n return;\r\n }\r\n }\r\n\r\n /* OK, it's safe for us to save the data now. */\r\n\r\n // Make sure that it is set.\r\n// if (!isset($_POST['dp-sort-element'])) {\r\n// return;\r\n// }\r\n\r\n // Sanitize user input.\r\n $my_data = sanitize_text_field($_POST['dp_sort-element']);\r\n $dp_title_s = serialize($_POST['dp_title']);\r\n $dp_image_s = serialize($_POST['dp_image']);\r\n $dp_excerpt_s= serialize($_POST['dp_excerpt']);\r\n $dp_price_s=serialize($_POST['dp_price']);\r\n $dp_addtocartbutton_s=serialize($_POST['dp_addtocartbutton']);\r\n $dp_customfield_s=serialize($_POST['dp_customfield']);\r\n $dp_variable_s=serialize($_POST['dp_variable']);\r\n $dp_option_s=serialize($_POST['dp_option']);\r\n\r\n\r\n // Update the meta field in the database.\r\n update_post_meta($post_id, 'dp_sort-element', $my_data);\r\n update_post_meta($post_id, 'dp_select_template', $_POST['dp_select_template']);\r\n update_post_meta($post_id,'dp_title',$dp_title_s);\r\n update_post_meta($post_id,'dp_image',$dp_image_s);\r\n update_post_meta($post_id,'dp_excerpt',$dp_excerpt_s);\r\n update_post_meta($post_id,'dp_price',$dp_price_s);\r\n update_post_meta($post_id,'dp_addtocartbutton',$dp_addtocartbutton_s);\r\n update_post_meta($post_id,'dp_customfield',$dp_customfield_s);\r\n update_post_meta($post_id,'dp_variable',$dp_variable_s);\r\n update_post_meta($post_id,'dp_option',$dp_option_s);\r\n}", "public static function save_meta( $post_id ) {\n\n\t\t/* Verify the nonce before proceeding. */\n\t\tif ( !isset( $_POST['sponsor-meta'] ) || !wp_verify_nonce( $_POST['sponsor-meta'], basename( __FILE__ ) ) )\n\t\t\treturn $post_id;\n\n\t\t$meta = array(\n\t\t\t'sponsor-url'\n\t\t);\n\n\t\tforeach ( $meta as $meta_key ) {\n\t\t\t$new_meta_value = $_POST[$meta_key];\n\n\t\t\t/* Get the meta value of the custom field key. */\n\t\t\t$meta_value = get_post_meta( $post_id, '_' . $meta_key , true );\n\n\t\t\t/* If there is no new meta value but an old value exists, delete it. */\n\t\t\tif ( '' == $new_meta_value && $meta_value )\n\t\t\t\tdelete_post_meta( $post_id, '_' . $meta_key , $meta_value );\n\n\t\t\t/* If a new meta value was added and there was no previous value, add it. */\n\t\t\telseif ( $new_meta_value && '' == $meta_value )\n\t\t\t\tadd_post_meta( $post_id, '_' . $meta_key , $new_meta_value, true );\n\n\t\t\t/* If the new meta value does not match the old value, update it. */\n\t\t\telseif ( $new_meta_value && $new_meta_value != $meta_value )\n\t\t\t\tupdate_post_meta( $post_id, '_' . $meta_key , $new_meta_value );\n\t\t}\n\t}", "function save_meta_box( $post_id ) {\n if ( defined( 'DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;\n if ( $parent_id = wp_is_post_revision( $post_id ) ) {\n $post_id = $parent_id;\n }\n $fields = ['published_date'];\n foreach ( $fields as $field ) {\n if ( array_key_exists( $field, $_POST ) ) {\n update_post_meta( $post_id, $field, sanitize_text_field( $_POST[$field] ) );\n }\n }\n }", "public function save($post_id)\n\t{\n\t\t// just an auto-save\n\t\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n\t\t\treturn;\n\t\t}\n\t\n\t\t// security checks\n\t\tif ((isset($_POST['_nonce_' . $this->prefix . 'meta']) && !wp_verify_nonce($_POST['_nonce_' . $this->prefix . 'meta'], 'meta_save')) \n\t\t\tOR !current_user_can('edit_page', $post_id)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// save all meta data with the right prefix\n\t\tforeach ($_POST as $key => $value) {\n\t\t\t\n\t\t\t// our custom meta?\n\t\t\tif (strpos($key, $this->option_prefix) === 0) {\n\t\t\t\t$meta = get_post_meta($post_id, $key, true);\n\t\t\t\t\n\t\t\t\t// add or update metadata\n\t\t\t\tif ($value != '' && $meta != $value) {\n\t\t\t\t\tupdate_post_meta($post_id, $key, $value);\n\t\t\t\t}\n\t\t\t\telse if ($meta && $value == '') {\n\t\t\t\t\tdelete_post_meta($post_id, $key, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function save_meta_options( $postID ){\n\t\t$post = $_POST;\n\t\tif((isset($post['update']) || isset($post['save']) || isset($post['publish']))){\n\n\n\t\t\t$user_template = (isset($post['pagelines_template'])) ? $post['pagelines_template'] : '';\n\n\t\t\tif($user_template != ''){\n\n\t\t\t\t$set = pl_meta($postID, PL_SETTINGS);\n\t\t\t\t\n\t\t\t\t$set['draft']['page-template'] = $user_template; \n\t\t\t\t$set['live']['page-template'] = $user_template; \n\t\t\t\t\n\t\t\t\tpl_meta_update($postID, PL_SETTINGS, $set);\n\t\t\t}\n\n\n\t\t}\n\t}", "function save_postdata( $post_id ) {\n\tglobal $post, $new_meta_boxes;\n\n\tif(isset($post) && $post->post_type=='page'){\n\t\t$new_meta_boxes=$GLOBALS['new_meta_boxes'];\n\t\tpexeto_save_meta_data($new_meta_boxes, $post_id);\n\t}\n}", "public function save_meta( $post_id, $post ) {\n\n\t\t//Autosave or no past variable then kick out\n\t\tif (\n\t\t\tempty( $_POST ) ||\n\t\t\t(\n\t\t\t\tdefined( 'DOING_AUTOSAVE' ) &&\n\t\t\t\tDOING_AUTOSAVE\n\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If no nonce set, then return.\n\t\tif (\n\t\t\t! isset( $_POST['_inline_edit'] ) &&\n\t\t\t! isset( $_POST['pngx_nonce'] )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t//Check if on the right post type\n\t\tif (\n\t\t\tisset( $post->post_type ) &&\n\t\t\t! in_array( $post->post_type, $this->get_post_types() )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t//Check if the user can make edits\n\t\tif ( ! current_user_can( $this->get_user_capability(), $post->ID ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Verify Plugin Nonce.\n\t\tif (\n\t\t\t! isset( $_POST['_inline_edit'] ) &&\n\t\t\tisset( $_POST['pngx_nonce'] ) &&\n\t\t\t! wp_verify_nonce( $_POST['pngx_nonce'], 'pngx_save_fields' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Verify Inline Edit Nonce.\n\t\tif (\n\t\t\tisset( $_POST['_inline_edit'] ) &&\n\t\t\t! wp_verify_nonce( $_POST['_inline_edit'], 'inlineeditnonce' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Before Save Meta Fields\n\t\t *\n\t\t * @param array $_POST\n\t\t *\n\t\t */\n\t\tdo_action( 'pngx_before_save_meta_fields', $_POST );\n\n\t\t//Save Date for each file\n\t\tforeach ( $this->get_fields() as $option ) {\n\n\t\t\t/**\n\t\t\t * Save Meta Fields\n\t\t\t *\n\t\t\t *\n\t\t\t * @param int $post_id\n\t\t\t * @param array $option\n\t\t\t *\n\t\t\t */\n\t\t\tdo_action( 'pngx_save_meta_fields', $post_id, $option );\n\n\t\t\t//handle check box saving\n\t\t\tif ( $option['type'] == 'checkbox' ) {\n\n\t\t\t\t$checkbox = get_post_meta( $post_id, $option['id'], true );\n\n\t\t\t\tif ( $checkbox && ! isset( $_POST[ $option['id'] ] ) ) {\n\t\t\t\t\tdelete_post_meta( $post_id, $option['id'] );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Final Check if value should be saved then sanitize and save\n\t\t\tif ( isset( $_POST[ $option['id'] ] ) ) {\n\t\t\t\t//Send Input to Sanitize Class, will return sanitized input or no input if no sanitization method\n\t\t\t\t$sanitized = new Pngx__Sanitize( $option['type'], $_POST[ $option['id'] ], $option );\n\n\t\t\t\t$old = get_post_meta( $post_id, $option['id'], true );\n\n\t\t\t\t$new = $_POST[ $option['id'] ];\n\n\t\t\t\tif ( ! is_null( $new ) && $new != $old ) {\n\t\t\t\t\tupdate_post_meta( $post_id, $option['id'], $sanitized->result );\n\t\t\t\t} elseif ( '' == $new && $old ) {\n\t\t\t\t\tdelete_post_meta( $post_id, $option['id'], $old );\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * After Save Meta Fields\n\t\t *\n\t\t * @param array $_POST\n\t\t *\n\t\t */\n\t\tdo_action( 'pngx_after_save_meta_fields', $_POST );\n\n\t}", "public function custom_meta_save( $post_id, $post = false ){\n\t\tif( $this->options->show_on && !in_array( get_the_id(), $this->options->show_on ) ){\n\t\t\treturn false;\n\t\t}\n\n\t\t//Verify the nonce before proceeding.\n\t\tif ( !isset( $_POST[$this->unique_key.'_nonce'] ) || !wp_verify_nonce( $_POST[$this->unique_key.'_nonce'], basename( __FILE__ ) ) ){\n\t\t\treturn false;\n\t\t}\n\n\t\t//Meta Keys to Save\n\t\t$keys = array( $this->unique_key, $this->unique_key.\"_title\" );\n\n\t\tforeach( $keys as $key ){\n\n\t\t\t//Get the posted data and sanitize it for use as an HTML class.\n\t\t\tif( $key == $this->unique_key ){\n\t\t\t\t$new_meta_value = ( isset( $_POST[$key] ) ? sanitize_html_class( $_POST[$key] ) : '' );\n\t\t\t} else {\n\t\t\t\t$new_meta_value = isset( $_POST[$key] ) ? $_POST[$key] : '' ;\n\t\t\t}\n\n\t\t\t//Get the meta value of the custom field key.\n\t\t\t$meta_value = get_post_meta( $post_id, $key, true );\n\n\t\t\t//If a new meta value was added and there was no previous value, add it.\n\t\t\tif ( $new_meta_value && '' == $meta_value ){\n\t\t\t\tadd_post_meta( $post_id, $key, $new_meta_value, true );\n\t\t\t}\n\n\t\t\t//If the new meta value does not match the old value, update it.\n\t\t\telseif ( $new_meta_value && $new_meta_value != $meta_value ){\n\t\t\t\tupdate_post_meta( $post_id, $key, $new_meta_value );\n\t\t\t}\n\n\t\t\t//If there is no new meta value but an old value exists, delete it.\n\t\t\telseif ( '' == $new_meta_value && $meta_value ){\n\t\t\t\tdelete_post_meta( $post_id, $key, $meta_value );\n\t\t\t}\n\n\t\t}\n\n\t}", "function sample_save_metabox( $post_id, $post ) {\n\t// Add nonce for security and authentication.\n\t$nonce_name = isset( $_POST['custom_nonce'] ) ? $_POST['custom_nonce'] : '';\n\t$nonce_action = 'custom_nonce_action';\n\n\t// Check if nonce is set.\n\tif ( ! isset( $nonce_name ) ) {\n\t\treturn;\n\t}\n\n\t// Check if nonce is valid.\n\tif ( ! wp_verify_nonce( $nonce_name, $nonce_action ) ) {\n\t\treturn;\n\t}\n\n\t// Check if user has permissions to save data.\n\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\treturn;\n\t}\n\n\t// Check if not an autosave.\n\tif ( wp_is_post_autosave( $post_id ) ) {\n\t\treturn;\n\t}\n\n\t// Check if not a revision.\n\tif ( wp_is_post_revision( $post_id ) ) {\n\t\treturn;\n\t}\n\n\tif ( ! isset( $_POST['notes'] ) ) {\n\t\treturn;\n\t}\n\n\tupdate_post_meta( $post_id, 'notes', wp_unslash( sanitize_text_field( $_POST['notes'] ) ) );\n}", "function save_my_meta_box_data( $post_id ) {\n\n\t// Check if our nonce is set.\n\tif ( ! isset( $_POST['myplugin_meta_box_nonce'] ) ) {\n\t\treturn;\n\t}\n\n\t// Verify that the nonce is valid.\n\tif ( ! wp_verify_nonce( $_POST['myplugin_meta_box_nonce'], 'myplugin_meta_box' ) ) {\n\t\treturn;\n\t}\n\n\n\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn;\n\t}\n\n\t// Check the user's permissions.\n\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t} else {\n\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t/* OK, it's safe for us to save the data now. */\n\t\n\t// Make sure that it is set.\n\tif ( ! isset( $_POST['video_url'] ) ) {\n\t\treturn;\n\t}\n\n\n\t// Sanitize user input.\n\t$my_data = sanitize_text_field( $_POST['video_url'] );\n\t$my_sec_title = sanitize_text_field( $_POST['second_title'] );\n\n\t// Update the meta field in the database.\n\tupdate_post_meta( $post_id, 'video_url_key', $my_data );\n}", "function meta_boxes_save() {\n\n\t\t// Bail out now if something not set\n\t\tif (\n\t\t\tisset( $_POST['_wpnonce'] ) &&\n\t\t\tisset( $_POST['post_ID'] ) &&\n\t\t\tisset( $_POST['_lingo_hidden'] ) // This is required to ensure that auto-saves are not processed\n\t\t) {\n\t\t\t// Do nonce security check\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\n\n\t\t\t// Grab post ID\n\t\t\t$post_ID = (int) $_POST['post_ID'];\n\n//echo '<textarea style=\"width:800px;height:600px;\">';print_r( $_POST['_translation'] );echo '</textarea>';\n//die('dead');\n\n\t\t\t// Stash all the post meta\n\t\t\tif ( isset( $_POST['_translation'] ) ) {\n\t\t\t\t$_translation = $_POST['_translation'];\n\t\t\t\tdelete_post_meta( $post_ID, '_translation' );\n\t\t\t\tforeach( $_translation as $key => $trans ) {\n\t\t\t\t\t$trans = wp_kses( $trans, '', '' );\n\t\t\t\t\tif ( $trans != '' )\n\t\t\t\t\t\tadd_post_meta( $post_ID, '_translation', $trans );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function save()\n\t{\n\t\n\t\tif ($this->id == null) throw new Exception(\"Cannot save. id is null\");\n\t\t\n\t\t//store the data in the content column so that our worker will be searchable.\n\t\t$wp_content = \"\";\n\t\t\n\t\tforeach($this->values as $field=>$value)\n\t\t{\n\t\t\tupdate_post_meta($this->id, $field, $value);\n\t\t\t$wp_content .= \"<div>$value</div>\";\n\t\t}\n\t\t\n\t\t//wp_die($wp_content);\n\n\t\t//save the data entry in wp_posts\n\t\tglobal $wpdb;\n\t\t$wpdb->update(\n\t\t\t$wpdb->posts, \n\t\t\tarray(\n\t\t\t\t\"post_content\" => $wp_content,\n\t\t\t\t\"post_title\" => \"{$this->values['lastname']}, {$this->values['firstname']} {$this->values['middlename']}\" \n\t\t\t),\n\t\t\tarray(\"ID\" => $this->id),\n\t\t\tarray(\"%s\"),\n\t\t\tarray(\"%d\")\n\t\t);\n\t\t\n\t\t\n\t}", "public function save_meta_settings( $post_id ) {\n \n \n // Check if our nonce is set.\n if ( ! isset( $_POST['metabox_' . $this->id . '_nonce'] ) ) {\n\n return $post_id;\n }\n \n\n $nonce = $_POST['metabox_' . $this->id . '_nonce'];\n \n // Verify that the nonce is valid.\n if ( ! wp_verify_nonce( $nonce, 'metabox_' . $this->id ) ) {\n echo('passed validation');\n }\n \n /*\n * If this is an autosave, our form has not been submitted,\n * so we don't want to do anything.\n */\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return $post_id;\n }\n \n // Check the user's permissions.\n if ( 'page' == $_POST['post_type'] ) {\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n return $post_id;\n }\n } else {\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return $post_id;\n }\n }\n \n foreach ( $this->fields as $field ) {\n $field_type = $field['type'];\n $field_meta_key = $field['meta_key'];\n $field_meta_value = $_POST[$field['meta_key']];\n if( 'checkbox' === $field['type'] && !isset( $_POST[$field['meta_key']] ) ) {\n $field_meta_value = 0;\n }\n update_post_meta( $post_id, $field['meta_key'], sanitize_text_field( $field_meta_value ) );\n \n }\n\n }", "public function save_meta_data( $post_id ) {\n\t\t\t$result_of_permission_check = $this->have_permission( $post_id );\n\t\t\tif ( $this->autosave_check() || is_wp_error( $result_of_permission_check ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// there is no need to sanitize nonce data because nonce verification is simple a String comparison.\n\t\t\tif ( isset( $_POST[ CONTRIBUTORS_PLUGIN_FIELD ] ) ) {\n\t\t\t\t$contributors = sanitize_meta( CONTRIBUTORS_PLUGIN_META, $_POST[ CONTRIBUTORS_PLUGIN_FIELD ], 'post' );\n\t\t\t\tif ( isset( $contributors ) && '' !== $contributors ) {\n\t\t\t\t\tupdate_post_meta( $post_id, CONTRIBUTORS_PLUGIN_META, implode( ',', $contributors ) );\n\t\t\t\t} else {\n\t\t\t\t\tupdate_post_meta( $post_id, CONTRIBUTORS_PLUGIN_META, '' );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function metabox_save_portfolio_meta($post_id, $post)\n\n {\n\n if (!wp_verify_nonce($_POST['eventmeta_noncename'], plugin_basename(__FILE__))) {\n\n\n\n return $post->ID;\n\n }\n\n\n\n // Is the user allowed to edit the post or page?\n\n if (!current_user_can('edit_post', $post->ID))\n\n\n\n return $post->ID;\n\n\n\n $headquarters = sanitize_text_field($_POST['_headquarters']);\n\n update_post_meta($post->ID, '_headquarters', $headquarters);\n\n\n\n $website_url = sanitize_text_field($_POST['_website_url']);\n\n update_post_meta($post->ID, '_website_url', $website_url);\n\n\n\n $regions = $_POST['_regions'];\n\n update_post_meta($post->ID, '_regions', $regions);\n\n\n\n $sector = $_POST['_sector'];\n\n update_post_meta($post->ID, '_sector', $sector);\n\n\n\n }", "function ariana_save_services_metabox( $post_id ) {\n $nonce_name = isset( $_POST['_ariana_services_metabox_nonce'] ) ? $_POST['_ariana_services_metabox_nonce'] : '';\n $nonce_action = 'ariana_services_metabox_nonce';\n\n // Check if nonce is valid.\n if ( ! wp_verify_nonce( $nonce_name, $nonce_action ) ) {\n return;\n }\n\n // Check if user has permissions to save data.\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n\n // Check if not an autosave.\n if ( wp_is_post_autosave( $post_id ) ) {\n return;\n }\n\n // Check if not a revision.\n if ( wp_is_post_revision( $post_id ) ) {\n return;\n }\n\n $allowed_tags = array(\n 'a' => array(\n 'href' => array(),\n 'title' => array(),\n 'id' => array()\n )\n );\n\n\n if ( isset( $_POST['post-sec-title'] ) ){\n update_post_meta(\n $post_id,\n 'post_sec_title',\n wp_kses( $_POST['post-sec-title'], $allowed_tags )\n );\n }\n\n\t\tif ( isset( $_POST['post-home-subtitle'] ) ){\n update_post_meta(\n $post_id,\n 'post_home_subtitle',\n wp_kses( $_POST['post-home-subtitle'], $allowed_tags )\n );\n }\n\n if ( isset( $_POST['post-desc'] ) ){\n update_post_meta(\n $post_id,\n 'post_desc',\n wp_kses_post( $_POST['post-desc'] )\n );\n }\n\n}", "function projectpentagon_save_postdata($post_id) {\n // If it is our form has not been submitted, so we dont want to do anything\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n return;\n\n // verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times\n\n if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename( __FILE__ ) ) )\n return;\n\n // Check permissions\n\n if ( 'page' == $_POST['post_type'] ) \n {\n if ( !current_user_can( 'edit_page', $post_id ) )\n return;\n }\n else\n {\n if ( !current_user_can( 'edit_post', $post_id ) )\n return;\n }\n\n\t//update the tasting notes\n \t$outside_newvalue = $_POST['tasting-notes'];\n\tupdate_post_meta($post_id, 'tasting-notes', $outside_newvalue);\n\n // Do something with $mydata \n // probably using add_post_meta(), update_post_meta(), or \n // a custom table (see Further Reading section below)\n for($hh=1;$hh<6;$hh++)\n\n \t{\n \t//do an update for each of the potential 5 fields....\n\n \t$get_field_name\t\t\t\t\t=\t\"myplugin_new_field\" . $hh .\"\";\t\n \t$create_variable_name\t\t\t=\t\"pentagon-field-\". $hh .\"\";\t\n\t$create_name_of_field_to_update =\t\"mydata\" . $hh .\"\";\n\t$newvalue = $_POST[$get_field_name];\n\t//echo \"$newvalue is returning ---\". \t$newvalue\t.\"<br />\";//DEBUG\n\tupdate_post_meta($post_id, $create_variable_name, $newvalue);\t\n\n\t//echo \"get field name is returning --- \". $get_field_name\t.\"<br />\";//DEBUG\n\t//echo \"create variable name name is returning --- \". \t$create_variable_name\t\t.\"<br />\";//DEBUG\n\t//echo \"$create_name_of_field_to_update is returning --- \". \t$create_name_of_field_to_update\t.\"<br />\";//DEBUG\n\t}\n\n\n\n //echo \"$mydata is mydata....\";//debug\n\n}", "function cinerama_edge_meta_box_save( $post_id, $post ) {\n\t\tglobal $cinerama_edge_global_Framework;\n\n\t\t$nonces_array = array();\n\t\t$meta_boxes = cinerama_edge_framework()->edgtMetaBoxes->getMetaBoxesByScope( $post->post_type );\n\n\t\tif ( is_array( $meta_boxes ) && count( $meta_boxes ) ) {\n\t\t\tforeach ( $meta_boxes as $meta_box ) {\n\t\t\t\t$nonces_array[] = 'cinerama_edge_meta_box_' . $meta_box->name . '_save';\n\t\t\t}\n\t\t}\n\n\t\tif ( is_array( $nonces_array ) && count( $nonces_array ) ) {\n\t\t\tforeach ( $nonces_array as $nonce ) {\n\t\t\t\tif ( ! isset( $_POST[ $nonce ] ) || ! wp_verify_nonce( $_POST[ $nonce ], $nonce ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$postTypes = apply_filters( 'cinerama_edge_filter_meta_box_post_types_save', array( 'post', 'page' ) );\n\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! isset( $_POST['_wpnonce'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! in_array( $post->post_type, $postTypes ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $cinerama_edge_global_Framework->edgtMetaBoxes->options as $key => $box ) {\n\n\t\t\tif ( isset( $_POST[ $key ] ) && trim( $_POST[ $key ] !== '' ) ) {\n\n\t\t\t\t$value = $_POST[ $key ];\n\n\t\t\t\tupdate_post_meta( $post_id, $key, $value );\n\t\t\t} else {\n\t\t\t\tdelete_post_meta( $post_id, $key );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// save post link twitter content\n\t\t$is_twitter_post_format = false;\n\t\tif ( $post->post_type == 'post' && $_POST['post_format'] == 'link' && $_POST['edgtf_post_link_link_meta'] != '' ) {\n\t\t\t$link = $_POST['edgtf_post_link_link_meta'];\n\t\t\n\t\t\tif ( defined( 'CINERAMA_TWITTER_FEED_VERSION' ) && strpos( $link, 'twitter.com' ) !== false && strpos( $link, 'status' ) ) {\n\t\t\t\t$status_parts = explode( '/', $link );\n\t\t\t\t$status_id = $status_parts[5];\n\t\t\t\t$twitter_api = CineramaTwitterApi::getInstance();\n\t\t\t\t\n\t\t\t\tif ( $twitter_api->hasUserConnected() ) {\n\t\t\t\t\t$response = $twitter_api->getTweetById( $status_id, array() );\n\t\t\t\t\t$tweet_data = array();\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $response->data as $tweet ) {\n\t\t\t\t\t\t$tweet_data['text'] = $twitter_api->getHelper()->getTweetCleanText( $tweet );\n\t\t\t\t\t\t$tweet_data['author'] = $twitter_api->getHelper()->getTweetAuthor( $tweet );\n\t\t\t\t\t\t$tweet_data['time'] = $twitter_api->getHelper()->getTweetCreatedTime( $tweet );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ( count( $tweet_data ) > 0 ) {\n\t\t\t\t\t\tupdate_post_meta( $post_id, 'edgtf_post_link_twitter_data_meta', $tweet_data );\n\t\t\t\t\t\t$is_twitter_post_format = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$is_twitter_post_format) {\n\t\t\tdelete_post_meta( $post_id, 'edgtf_post_link_twitter_data_meta' );\n\t\t}\n\t}", "public function save()\n\t{\n\t\t$args = [\n\t\t\t'post_title' => $this->title,\n\t\t\t'post_content' => $this->desc,\n\t\t\t'post_date' => $this->create_date,\n\t\t];\n\n\t\tif (empty($this->id)) {\n\t\t\t$args['post_type'] = Access::$MACHINE_NAME;\n\t\t\t$args['post_status'] = 'publish';\n\t\t} else {\n\t\t\t$args['ID'] = $this->id;\n\t\t}\n\n\t\tremove_action('save_post', array(get_class($this), 'access_save_meta_box'));\n\t\t$this->id = wp_update_post($args);\n\t\tadd_action('save_post', array(get_class($this), 'access_save_meta_box'));\n\n\t\tupdate_post_meta($this->id,'user',$this->user);\n\t\tupdate_post_meta($this->id,'key',$this->key);\n\t\tupdate_post_meta($this->id,'ips',$this->ips);\n\n\t\treturn $this;\n\t}", "public function save_custom_meta_data( $post_id ) {\n\n\t\t$is_valid_nonce = ( isset( $_POST[ $this->nonce ] ) && wp_verify_nonce( sanitize_text_field( $_POST[ $this->nonce ] ), plugin_basename( __FILE__ ) ) );\n\t\t// First, make sure the user can save the post\n\t\tif ( $is_valid_nonce && $this->user_can_save( $post_id ) ) {\n\n\t\t\t// Did the user set an expiry date, or are they clearing an old one?\n\t\t\tif ( ! empty( $_POST['sailthru_post_expiration'] ) && isset( $_POST['sailthru_post_expiration'] ) \n\t\t\t\t|| get_post_meta( $post_id, 'sailthru_post_expiration', true ) ) {\n\n\t\t\t\t$expiry_time = strtotime( sanitize_text_field( $_POST['sailthru_post_expiration'] ) );\n\t\t\t\tif ( $expiry_time ) {\n\t\t\t\t\t$expiry_date = date( 'Y-m-d', $expiry_time );\n\n\t\t\t\t\t// Save the date. hehe.\n\t\t\t\t\tupdate_post_meta( $post_id, 'sailthru_post_expiration', $expiry_date );\n\t\t\t\t}\n\t\t\t} // end if\n\n\t\t\t// Did the user set some meta tags, or are they clearing out old tags?\n\t\t\tif ( ! empty( $_POST['sailthru_meta_tags'] ) && isset( $_POST['sailthru_meta_tags'] )\n\t\t\t\t|| get_post_meta( $post_id, 'sailthru_meta_tags', true ) ) {\n\n\t\t\t\t//remove trailing comma\n\t\t\t\t$meta_tags = rtrim( sanitize_text_field( $_POST['sailthru_meta_tags'] ), ',' );\n\t\t\t\tupdate_post_meta( $post_id, 'sailthru_meta_tags', $meta_tags );\n\n\t\t\t}\n\t\t} // end if\n\n\t}", "public static function save_meta_data($post_id)\n {\n // If it is the post has not been updated, so we don’t want to do anything\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post_id;\n }\n\n // verify this came from the screen and with proper authorization,\n // because save_post can be triggered at other times\n if (!isset($_POST['dxw_content_review_nonce']) || !wp_verify_nonce($_POST['dxw_content_review_nonce'], plugin_basename(__DIR__))) {\n return $post_id;\n }\n\n // Get the post type object.\n global $post;\n $post_type = get_post_type_object($post->post_type);\n\n // Check if the current user has permission to edit the post.\n if (!current_user_can($post_type->cap->edit_post, $post_id)) {\n return $post_id;\n }\n\n if (wp_is_post_revision($post_id)) {\n return $post_id;\n }\n\n $data = array();\n\n $data['_dxw_review_email'] = self::get_emails($_POST['dxw_review_email']);\n $data['_dxw_review_length'] = self::get_value_from_setting($_POST['dxw_review_length'], 'dxw_review_length');\n $data['_dxw_review_action'] = self::get_value_from_setting($_POST['dxw_review_action'], 'dxw_review_action');\n\n foreach ($data as $key => $value) {\n if (!is_wp_error($value)) {\n $current = get_post_meta($post_id, $key, true);\n\n // add/update record (both are taken care of by update_post_meta)\n if ($value && '' == $current) {\n add_post_meta($post_id, $key, $value, true);\n } elseif ($value && $value != $current) {\n update_post_meta($post_id, $key, $value);\n } elseif ('' == $value && $current) {\n delete_post_meta($post_id, $key, $current);\n }\n }\n }\n\n if (!is_wp_error($data['_dxw_review_length'])) {\n self::save_review_date($post_id, $data['_dxw_review_length']);\n }\n }", "function bn_meta_save( $post_id ) {\n\tif( isset( $_POST[ 'construction_realestate_posttype_agents_featured' ] )) {\n\t update_post_meta( $post_id, 'construction_realestate_posttype_agents_featured', esc_attr(1));\n\t}else{\n\t\tupdate_post_meta( $post_id, 'construction_realestate_posttype_agents_featured', esc_attr(0));\n\t}\n}", "public function save_meta($post_id, $post) {\r\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\r\n return;\r\n }\r\n\r\n\r\n // bomb out if the nonce didn't check out\r\n if (! (isset($_POST[self::NONCE_KEY]) && wp_verify_nonce($_POST[self::NONCE_KEY], plugin_basename(__FILE__)) ) ) {\r\n return $post_id;\r\n }\r\n\r\n // check roles/acls\r\n $post_type = get_post_type_object($post->post_type);\r\n if (!current_user_can($post_type->cap->edit_post, $post_id)) {\r\n return $post_id;\r\n }\r\n\r\n // add/update/delete meta\r\n if (isset($_POST[self::URL_META_KEY])) {\r\n $new_url_meta = esc_url_raw($_POST[self::URL_META_KEY]);\r\n $old_meta_value = get_post_meta( $post_id, self::URL_META_KEY, true );\r\n\r\n if ($old_meta_value && strlen($new_url_meta) == 0) {\r\n delete_post_meta($post_id, self::URL_META_KEY);\r\n }\r\n\r\n if ($new_url_meta && strlen($old_meta_value) == 0) {\r\n add_post_meta( $post_id, self::URL_META_KEY, $new_url_meta, true);\r\n }\r\n\r\n if (strlen($new_url_meta) > 0 && strlen($old_meta_value) > 0) {\r\n update_post_meta($post_id, self::URL_META_KEY, $new_url_meta);\r\n }\r\n\r\n }\r\n\r\n }", "function add_post_meta($post_id) {\n\t\t\tglobal $wpdb;\n\t\t\tif(isset($_POST['original_publish'])||isset($_POST['save'])){\n\t\t\t\tforeach($this->english_meta_keys as $key){\n\t\t\t\t\tupdate_post_meta($post_id, $key, $_POST[$key]);\n\t\t\t\t}\n\t\t\t\tforeach($this->arabic_meta_keys as $key2){\n\t\t\t\t\tupdate_post_meta($post_id, $key2, $_POST[$key2]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($_POST as $key => $value){\n\t\t\t\t\tif(preg_match('/_IPCDate.*/', $key) && $key != '_IPCDateCount'){\n\t\t\t\t\t\t$n = substr($key, strpos($key, \"Date\")+4);\n\t\t\t\t\t\n\t\t\t\t\t\tforeach($this->dates_meta_keys as $key3){\n\t\t\t\t\t\t\t$k = $key3.$n;\n\t\t\t\t\t\t\tupdate_post_meta($post_id, $k, $_POST[$k]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tupdate_post_meta($post_id, '_IPCDateCount', $_POST['_IPCDateCount']);\n\t\t\t}\n\t\t}", "function wm_team_cp_save_meta( $post_id ) {\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )\n\t\t\treturn $post_id;\n\t\t//If the nonce isn't there, or we can't verify it, return\n\t\tif ( ! isset( $_POST['wm_team-metabox-nonce'] ) || ! wp_verify_nonce( $_POST['wm_team-metabox-nonce'], 'wm_team-metabox-nonce' ) )\n\t\t\treturn $post_id;\n\t\t//If current user can't edit this post, return\n\t\tif ( ! current_user_can( 'edit_post' ) )\n\t\t\treturn $post_id;\n\n\t\t//Save each meta field separately\n\t\t$metaFields = wm_team_meta_fields();\n\n\t\twm_save_meta( $post_id, $metaFields );\n\t}", "function sm_meta_save( $post_id ) {\r\n \r\n // Checks save status\r\n $is_autosave = wp_is_post_autosave( $post_id );\r\n $is_revision = wp_is_post_revision( $post_id );\r\n $is_valid_nonce = ( isset( $_POST[ 'sm_nonce' ] ) && wp_verify_nonce( $_POST[ 'sm_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';\r\n \r\n // Exits script depending on save status\r\n if ( $is_autosave || $is_revision || !$is_valid_nonce ) {\r\n return;\r\n }\r\n \r\n // Checks for input and saves\r\nif( isset( $_POST[ 'meta-checkbox' ] ) ) {\r\n update_post_meta( $post_id, 'meta-checkbox', 'featured' );\r\n} else {\r\n update_post_meta( $post_id, 'meta-checkbox', '' );\r\n}\r\n \r\n}", "public function meta_box_save($post_id)\n {\n // Verify\n if ((get_post_type() != $this->token) || !wp_verify_nonce($_POST[$this->token . '_nonce'], plugin_basename($this->dir))) {\n return $post_id;\n }\n\n if ('page' == $_POST['post_type']) {\n if (!current_user_can('edit_page', $post_id)) {\n return $post_id;\n }\n } else {\n if (!current_user_can('edit_post', $post_id)) {\n return $post_id;\n }\n }\n\n $field_data = $this->get_custom_fields_settings();\n $fields = array_keys($field_data);\n\n foreach ($fields as $f) {\n\n if (isset($_POST[$f])) {\n ${$f} = strip_tags(trim($_POST[$f]));\n }\n\n // Escape the URLs.\n if ('url' == $field_data[$f]['type']) {\n ${$f} = esc_url(${$f});\n }\n\n if (${$f} == '') {\n delete_post_meta($post_id, $f, get_post_meta($post_id, $f, true));\n } else {\n update_post_meta($post_id, $f, ${$f});\n }\n }\n\n }", "public static function save_simple_social_meta_meta_box( $post_id, $post ) {\n\n\t\t/* Verify the nonce before proceeding. */\n\t\tif ( !isset( $_POST['simple-social-meta-meta-box-nonce'] ) || !wp_verify_nonce( $_POST['simple-social-meta-meta-box-nonce'], basename( __FILE__ ) ) )\n\t\t\treturn $post_id;\n\n\t\t/* Get the post type object. */\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Check if the current user has permission to edit the post. */\n\t\tif ( !current_user_can( $post_type->cap->edit_post, $post_id ) )\n\t\t\treturn $post_id;\n\n\t\t$meta = array(\n\t\t\t'ssm-title' => strip_tags( $_POST['ssm-title'] ),\n\t\t\t'ssm-site-name' => strip_tags( $_POST['ssm-site-name'] ),\n\t\t\t'ssm-description' => strip_tags( $_POST['ssm-description'] ),\n\t\t\t'ssm-url' => strip_tags( $_POST['ssm-url'] ),\n\t\t\t'ssm-image' => strip_tags( $_POST['ssm-image'] ),\n\t\t\t'ssm-type' => strip_tags( $_POST['ssm-type'] ),\n\t\t\t'ssm-locale' => strip_tags( $_POST['ssm-locale'] )\n\t\t);\n\n\t\tforeach ( $meta as $meta_key => $new_meta_value ) {\n\n\t\t\t/* Get the meta value of the custom field key. */\n\t\t\t$meta_value = get_post_meta( $post_id, '_' . $meta_key , true );\n\n\t\t\t/* If there is no new meta value but an old value exists, delete it. */\n\t\t\tif ( '' == $new_meta_value && $meta_value )\n\t\t\t\tdelete_post_meta( $post_id, '_' . $meta_key , $meta_value );\n\n\t\t\t/* If a new meta value was added and there was no previous value, add it. */\n\t\t\telseif ( $new_meta_value && '' == $meta_value )\n\t\t\t\tadd_post_meta( $post_id, '_' . $meta_key , $new_meta_value, true );\n\n\t\t\t/* If the new meta value does not match the old value, update it. */\n\t\t\telseif ( $new_meta_value && $new_meta_value != $meta_value )\n\t\t\t\tupdate_post_meta( $post_id, '_' . $meta_key , $new_meta_value );\n\t\t}\n\t}", "public function save_meta( $post_id ) {\n\t\tif ( ! isset( $_POST['simple_event_info_nonce'] ) ) {\n\t\t\treturn $post_id;\n\t\t}\n\n\t\t$nonce = $_POST['simple_event_info_nonce'];\n\n\t\t// Verify that the nonce is valid.\n\t\tif ( ! wp_verify_nonce( $nonce, 'simple_event_info' ) ) {\n\t\t\treturn $post_id;\n\t\t}\n\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) :\n\t\t\treturn $post_id;\n\t\tendif;\n\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) :\n\t\t\treturn $post_id;\n\t\tendif;\n\n\t\tforeach ( $this->fields as $field ) {\n\t\t\t$old_value = get_post_meta( $post_id, $field['id'], true );\n\t\t\t$new_value = sanitize_text_field( $_POST[ $field['id'] ] );\n\n\t\t\tif ( $new_value && $new_value != $old_value ) {\n\t\t\t\tupdate_post_meta( $post_id, $field['id'], $new_value );\n\t\t\t} elseif ( '' == $new_value && $old_value ) {\n\t\t\t\tdelete_post_meta( $post_id, $field['id'], $old_value );\n\t\t\t}\n\t\t}\n\t}", "public function save($extra_fields = [])\n\t{\n\t\t$args = [\n\t\t\t'post_title' => $this->title,\n\t\t\t'post_content' => $this->content,\n\t\t\t'post_date' => $this->create_date,\n\t\t\t'post_status' => $this->status,\n\t\t\t'post_name' => $this->slug,\n\t\t];\n\n\t\tremove_action('save_post', array(get_class($this), 'saveMetaBox'));\n\n\t\tif (empty($this->id)) {\n\t\t\t$args['post_type'] = $this::$MACHINE_NAME;\n\t\t\t$this->id = wp_insert_post($args);\n\t\t} else {\n\t\t\t$args['ID'] = $this->id;\n\t\t\t$this->id = wp_update_post($args);\n\t\t}\n\n\t\tadd_action('save_post', array(get_class($this), 'saveMetaBox'));\n\n\t\t$metafields = $this->getMetaFields();\n\n\t\tif (!empty($metafields)) {\n\t\t\tforeach ($metafields as $field) {\n\t\t\t\tif (property_exists($this,$field)) {\n\t\t\t\t\t$this->saveField($field);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($extra_fields) && is_array($extra_fields)) {\n\t\t\tforeach ($extra_fields as $field=>$value) {\n\t\t\t\tupdate_post_meta($this->id, $field, $value);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "function flow_seo_save_postdata($post_id){\n\t\t// verify if this is an auto save routine. \n\t\t// If it is our form has not been submitted, so we dont want to do anything\n\t\tif(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// verify this came from the our screen and with proper authorization,\n\t\t// because save_post can be triggered at other times\n\t\tif (!wp_verify_nonce($_POST['flow_seo_noncename'], basename( __FILE__ ))){\n\t\t\treturn;\n\t\t}\n\n\t\t// Check permissions\n\t\tif('page' == $_POST['post_type']){\n\t\t\tif(!current_user_can('edit_page', $post_id)){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}else{\n\t\t\tif(!current_user_can('edit_post', $post_id)){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t//if saving in a custom table, get post_ID\n\t\t$post_ID = $_POST['post_ID'];\n\t\t$flow_seo_data['flow_seo_title'] = $_POST['flow_seo_title'];\n\t\t$flow_seo_data['flow_seo_description'] = $_POST['flow_seo_description'];\n\t\t$flow_seo_data['flow_post_header_code'] = $_POST['flow_post_header_code'];\n\n\t\t// Do something with $flow_seo_data \n\t\t// probably using add_post_meta(), update_post_meta(), or \n\t\t// a custom table (see Further Reading section below)\n\t\tforeach($flow_seo_data as $key => $value){\n\t\t\t$old = get_post_meta($post_ID, $key, true);\n\t\t\t$new = $value;\n\t\t \n\t\t\tif($new && $new != $old){\n\t\t\t\tupdate_post_meta($post_ID, $key, $new);\n\t\t\t}else if($new == '' && $old){\n\t\t\t\t//delete_post_meta($post_ID, $key, $old); //Old will not work for complex fields for some reason...\n\t\t\t\tdelete_post_meta($post_ID, $key);\n\t\t\t}\n\t\t}\n\t}", "function foool_partner_infos_save_postdata($post_id){\n \n // Check Autosave\n\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return $post_id;\n\n if (!wp_verify_nonce($_POST['partner_metabox_nonce'], basename(__FILE__))) return $post_id;\n\n // Update Temoignage Author\n $temoignage_author = sanitize_text_field($_POST['partner_url']);\n if (!empty($temoignage_author)) update_post_meta ($post_id, 'partner_url', $temoignage_author);\n else update_post_meta ($post_id, 'partner_url', '');\n\n}", "function save($post_id) {\n\t \t/**\n\t\t * Verify Nonce.\n\t\t */\n if ( !isset( $_POST['weddingvendor_meta_box_nonce'] ) || !wp_verify_nonce($_POST['weddingvendor_meta_box_nonce'] , basename(__FILE__))) {\n return $post_id;\n }\n\t\t/**\n\t\t * Check Autosave.\n\t\t */\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post_id;\n }\n /**\n\t\t * Check Permissions.\n\t\t */\n if ('page' == $_POST['post_type']) {\n if (!current_user_can('edit_page', $post_id)) {\n return $post_id;\n }\n } elseif (!current_user_can('edit_post', $post_id)) {\n return $post_id;\n }\n /**\n\t * Set Field & Update meta.\n\t\t */\n foreach ($this->_meta_box['fields'] as $field) {\t\t\t\n $old = get_post_meta($post_id, $field['id'], true);\n $new = isset( $_POST[$field['id']] ) ? $_POST[$field['id']] : '' ;\n \n if ( $new && $new != $old) {\n update_post_meta($post_id, $field['id'], $new);\n } elseif ('' == $new && $old) {\n delete_post_meta($post_id, $field['id'], $old);\n }\n }\n }", "function travel_meta_save( $post_id ) {\n \n // Checks save status\n $is_autosave = wp_is_post_autosave( $post_id );\n $is_revision = wp_is_post_revision( $post_id );\n $is_valid_nonce = ( isset( $_POST[ 'travel_nonce' ] ) && wp_verify_nonce( $_POST[ 'travel_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';\n \n // Exits script depending on save status\n if ( $is_autosave || $is_revision || !$is_valid_nonce ) {\n return;\n }\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'travel-logo' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'travel-logo', $_POST[ 'travel-logo' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'travel-image' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'travel-image', $_POST[ 'travel-image' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'feature-1-image' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-1-image', $_POST[ 'feature-1-image' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'feature-2-image' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-2-image', $_POST[ 'feature-2-image' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'feature-3-gettingto-image' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-3-gettingto-image', $_POST[ 'feature-3-gettingto-image' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'feature-4-lodging-image' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-4-lodging-image', $_POST[ 'feature-4-lodging-image' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'feature-5-angling-image' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-5-angling-image', $_POST[ 'feature-5-angling-image' ] );\n\t\t}\n \n // Checks for input and saves\n\t\tif( isset( $_POST[ 'setthehook-option-checkbox' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'setthehook-option-checkbox', 'yes' );\n\t\t} else {\n\t\t\t\tupdate_post_meta( $post_id, 'setthehook-option-checkbox', '' );\n\t\t}\n \n // Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'sth-textarea-1' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'sth-textarea-1', $_POST[ 'sth-textarea-1' ] );\n\t\t}\n\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image1' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image1', $_POST[ 'additional-info-image1' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image1-link' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image1-link', $_POST[ 'additional-info-image1-link' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image2' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image2', $_POST[ 'additional-info-image2' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image2-link' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image2-link', $_POST[ 'additional-info-image2-link' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image3' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image3', $_POST[ 'additional-info-image3' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image3-link' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image3-link', $_POST[ 'additional-info-image3-link' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image4' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image4', $_POST[ 'additional-info-image4' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image4-link' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image4-link', $_POST[ 'additional-info-image4-link' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image5' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image5', $_POST[ 'additional-info-image5' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image5-link' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image5-link', $_POST[ 'additional-info-image5-link' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image6' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image6', $_POST[ 'additional-info-image6' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image6-link' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image6-link', $_POST[ 'additional-info-image6-link' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image7' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image7', $_POST[ 'additional-info-image7' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image7-link' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image7-link', $_POST[ 'additional-info-image7-link' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image8' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image8', $_POST[ 'additional-info-image8' ] );\n\t\t}\n\t\n\t// Checks for input and saves if needed \n\t\tif( isset( $_POST[ 'additional-info-image8-link' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'additional-info-image8-link', $_POST[ 'additional-info-image8-link' ] );\n\t\t}\n\t\n\t// Checks for input and sanitizes/saves if needed\n\t\tif( isset( $_POST[ 'feature-1-video' ] ) ) {\n\t\tupdate_post_meta( $post_id, 'feature-1-video', esc_url( $_POST[ 'feature-1-video' ] ) );\n\t\t}\n\t\n\t// Checks for input and saves\n\t\tif( isset( $_POST[ 'feature-1-checkbox' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-1-checkbox', 'yes' );\n\t\t} else {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-1-checkbox', '' );\n\t\t}\n\t\n\t// Checks for input and sanitizes/saves if needed\n\t\tif( isset( $_POST[ 'feature-2-video' ] ) ) {\n\t\tupdate_post_meta( $post_id, 'feature-2-video', esc_url( $_POST[ 'feature-2-video' ] ) );\n\t\t}\n\t\n\t// Checks for input and saves\n\t\tif( isset( $_POST[ 'feature-2-checkbox' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-2-checkbox', 'yes' );\n\t\t} else {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-2-checkbox', '' );\n\t\t}\n\t\n\t// Checks for input and sanitizes/saves if needed\n\t\tif( isset( $_POST[ 'feature-3-video' ] ) ) {\n\t\tupdate_post_meta( $post_id, 'feature-3-video', esc_url( $_POST[ 'feature-3-video' ] ) );\n\t\t}\n\t\n\t// Checks for input and saves\n\t\tif( isset( $_POST[ 'feature-3-checkbox' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-3-checkbox', 'yes' );\n\t\t} else {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-3-checkbox', '' );\n\t\t}\n\t\n\t// Checks for input and sanitizes/saves if needed\n\t\tif( isset( $_POST[ 'feature-4-video' ] ) ) {\n\t\tupdate_post_meta( $post_id, 'feature-4-video', esc_url( $_POST[ 'feature-4-video' ] ) );\n\t\t}\n\t\n\t// Checks for input and saves\n\t\tif( isset( $_POST[ 'feature-4-checkbox' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-4-checkbox', 'yes' );\n\t\t} else {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-4-checkbox', '' );\n\t\t}\n\t\n\t// Checks for input and sanitizes/saves if needed\n\t\tif( isset( $_POST[ 'feature-5-video' ] ) ) {\n\t\tupdate_post_meta( $post_id, 'feature-5-video', esc_url( $_POST[ 'feature-5-video' ] ) );\n\t\t}\n\t\n\t// Checks for input and saves\n\t\tif( isset( $_POST[ 'feature-5-checkbox' ] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-5-checkbox', 'yes' );\n\t\t} else {\n\t\t\t\tupdate_post_meta( $post_id, 'feature-5-checkbox', '' );\n\t\t}\n}", "public function savePostData( $post_id ) {\n global $post;\n // verify if this is an auto save routine. \n // If it is our form has not been submitted, so we dont want to do anything\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n return;\n \n // verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times\n \n // Check permissions\n \n if ( !current_user_can( 'edit_post', $post->ID) )\n return;\n \n // OK, we're authenticated: we need to find and save the data\n if(!empty($this->meta_box_fields_formats) && is_array($this->meta_box_fields_formats)):\n foreach($this->meta_box_fields_formats as $field => $format):\n if($_POST[$field]):\n switch( $format ):\n case \"datetime\":\n update_post_meta($post->ID, $field, date(\"Y-m-d H:i:s\", strtotime( $_POST[$field] ) ) );\n break;\n case \"date\":\n update_post_meta($post->ID, $field, date(\"Y-m-d\", strtotime( $_POST[$field] ) ) );\n break;\n case \"section\":\n break;\n default:\n update_post_meta($post->ID, $field, $_POST[$field]);\n break;\n endswitch;\n else:\n if( get_post_meta($post->ID, $field, true) ):\n delete_post_meta($post->ID, $field); // Useful for Checkboxes. Delete completely.\n endif;\n endif;\n endforeach;\n endif;\n // Do something with $mydata \n // probably using add_post_meta(), update_post_meta(), or \n // a custom table (see Further Reading section below)\n }", "public function saving(Post $post)\n {\n $post->content_type = 'post';\n \n cache_delete('content');\n }", "function save_meta ( $post_id )\n\t{\n\n // Check if nonce is set.\n if ( ! isset( $_POST['metabox_lh_quote'] ) ) {\n return;\n }\n\n // Verify that the nonce is valid.\n if ( ! wp_verify_nonce( $_POST['metabox_lh_quote'], 'save_metabox_lh_quote' ) ) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n\n // Check the user's permissions.\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n\n // If the post key contains the quote_element add it to the array to save\n $quote_breakdown = array();\n foreach ($_POST as $KEY => $VALUE)\n {\n if(strpos($KEY, \"quote_element\") !== false){\n $quote_breakdown[$KEY] = $VALUE;\n }\n }\n\n update_post_meta( $post_id, 'quote_breakdown', $quote_breakdown );\n\n $quote_total = $_POST['quote_total'];\n update_post_meta( $post_id, 'quote_total', $quote_total );\n\n // Save the client ID\n $client_id = $_POST['client_id'];\n update_post_meta( $post_id, 'client_id', $client_id );\n\n // Update quote status\n $quote_status = $_POST['quote_status'];\n update_post_meta( $post_id, 'quote_status', $quote_status );\n\n // Update deposit status\n $deposit_status = $_POST['deposit_status'];\n // check current deposit status. If it's not paid and its being changed add to timeline\n $current_deposit_status = get_post_meta($post_id,'deposit_status',true);\n if($current_deposit_status<>\"paid\" && $deposit_status==\"paid\")\n {\n\n // Update the client timeline\n $args = array(\n \"client_id\" => $client_id,\n \"project_id\" => $post_id,\n \"activity_title\" => 'Deposit Paid',\n \"activity_content\" => '',\n );\n lh_actions::activity_item_add($args);\n }\n update_post_meta( $post_id, 'deposit_status', $deposit_status );\n\n // Update materials status\n $materials_status = $_POST['materials_status'];\n // check current status and add to timeline if required\n $current_materials_status = get_post_meta($post_id,'materials_status',true);\n if($current_materials_status<>\"ordered\" && $materials_status==\"ordered\")\n {\n\n // Update the client timeline\n $args = array(\n \"client_id\" => $client_id,\n \"project_id\" => $post_id,\n \"activity_title\" => 'Materials Ordered',\n \"activity_content\" => '',\n );\n lh_actions::activity_item_add($args);\n }\n update_post_meta( $post_id, 'materials_status', $materials_status );\n\n // Update accessories status\n $accessories_status = $_POST['accessories_status'];\n // check current status and add to timeline if required\n $current_accessories_status = get_post_meta($post_id,'accessories_status',true);\n if($current_accessories_status<>\"arrived\" && $accessories_status==\"arrived\")\n {\n // Update the client timeline\n $args = array(\n \"client_id\" => $client_id,\n \"project_id\" => $post_id,\n \"activity_title\" => 'Critical Accessories Arrived',\n \"activity_content\" => '',\n );\n lh_actions::activity_item_add($args);\n }\n update_post_meta( $post_id, 'accessories_status', $accessories_status );\n\n // Update invouce status\n $invoice_sent = $_POST['invoice_sent'];\n update_post_meta( $post_id, 'invoice_sent', $invoice_sent );\n\n // Update invouce paid\n $invoice_paid = $_POST['invoice_paid'];\n update_post_meta( $post_id, 'invoice_paid', $invoice_paid );\n\n // Add Project start Date\n $project_start_date = $_POST['project_start_date'];\n update_post_meta( $post_id, 'project_start_date', $project_start_date );\n\n // Finally see if there is a descret key - if not create one\n $secret = get_post_meta($post_id,'secret',true);\n\n if($secret==\"\")\n {\n $new_secret = lh_crm_utils::generate_secret();\n update_post_meta( $post_id, 'secret', $new_secret );\n }\n\n\t}", "function erdp_save_book_metadata( $post_id ) {\n\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t// Comprobamos el valor nonce creado en twp_mi_display_callback()\n\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'books_meta_box_nonce' ) ) return;\n\t// Comprobamos si el usuario actual no puede editar el post\n\tif( !current_user_can( 'edit_post' ) ) return;\n \n\tif(get_post_type($post_id)==='books') {\n // Guardamos... \n if( isset( $_POST['idioma'] ) ) update_post_meta( $post_id, 'idioma', $_POST['idioma'] );\n if( isset( $_POST['isbn'] ) ) update_post_meta( $post_id, 'isbn', $_POST['isbn'] );\n if( isset( $_POST['book_publication_date'] ) ) update_post_meta( $post_id, 'book_publication_date', $_POST['book_publication_date'] );\n if( isset( $_POST['reading_start_date'] ) ) update_post_meta( $post_id, 'reading_start_date', $_POST['reading_start_date'] );\n if( isset( $_POST['reading_end_date'] ) ) update_post_meta( $post_id, 'reading_end_date', $_POST['reading_end_date'] );\n if( isset( $_POST['book_author_name'] ) ) update_post_meta( $post_id, 'book_author_name', $_POST['book_author_name'] );\n if( isset( $_POST['purchase_link'] ) ) update_post_meta( $post_id, 'purchase_link', $_POST['purchase_link'] );\n }\n}", "function prosody_poem_resources_save_meta_box_data ($post_id=null)\n{\n $post_id = (is_null($post_id)) ? get_post()->ID : $post_id;\n\n /*\n * We need to verify this came from our screen and with proper\n * authorization, because the save_post action can be triggered at other\n * times.\n */\n\n // Check if our nonce is set.\n if ( ! isset( $_POST['prosody_poem_resources_meta_box_nonce'] ) ) {\n return;\n }\n\n // Verify that the nonce is valid.\n $nonce = $_POST['prosody_poem_resources_meta_box_nonce'];\n if ( ! wp_verify_nonce( $nonce, 'prosody_poem_resources_meta_box' ) ) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't\n // want to do anything.\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n\n // Check the user's permissions.\n if ( isset( $_POST['post_type'] ) &&\n 'prosody_poem' == $_POST['post_type'] ) {\n\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n return;\n }\n\n } else {\n\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n }\n\n /* OK, its safe for us to save the data now. */\n\n // Make sure that it is set.\n if ( ! isset( $_POST['prosody_poem_resources_editor'] ) ) {\n return;\n }\n\n // Sanitize user input. In this case we don't so the html will work.\n $my_data = $_POST['prosody_poem_resources_editor'];\n\n // Update the meta field in the database.\n update_post_meta( $post_id, 'Resources', $my_data );\n}", "function italystrap_meta_box_save( $post_id ){\n\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t\n\t// if our nonce isn't there, or we can't verify it, bail\n\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n\t\n\t// if our current user can't edit this post, bail\n\t//http://code.tutsplus.com/tutorials/how-to-create-custom-wordpress-writemeta-boxes--wp-20336#comment-802227555\n\t//prevents undefined offset notice and cannot modify header warning - add second parameters $post_id\n\tif( !current_user_can( 'edit_post' , $post_id ) ) return;\n\t\n\t// now we can actually save the data\t\n\t// Probably a good idea to make sure your data is set\n\t// This is purely my personal preference for saving checkboxes\n\t$chk = ( isset( $_POST['slide'] ) && $_POST['slide'] ) ? 'on' : 'off';\n\tupdate_post_meta( $post_id, 'slide', $chk );\n}", "function liblynx_save_meta_box_data($post_id)\n{\n\n /*\n * We need to verify this came from our screen and with proper authorization,\n * because the save_post action can be triggered at other times.\n */\n\n // Check if our nonce is set.\n if (!isset($_POST['liblynx_meta_box_nonce'])) {\n return;\n }\n\n\n\n // Verify that the nonce is valid.\n if (!wp_verify_nonce($_POST['liblynx_meta_box_nonce'], 'liblynx_save_meta_box_data')) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return;\n }\n\n // Check the user's permissions.\n if (isset($_POST['post_type']) && 'page'==$_POST['post_type']) {\n if (!current_user_can('edit_page', $post_id)) {\n return;\n }\n } else {\n if (!current_user_can('edit_post', $post_id)) {\n return;\n }\n }\n\n /* OK, it's safe for us to save the data now. */\n\n //is our metabox is being submitted?\n if (!isset($_POST['liblynx_metabox'])) {\n return;\n }\n\n //determine new state\n $protect=isset($_POST['liblynx_protect'])?true:false;\n $unit=trim($_POST['liblynx_custom_unit']);\n\n // Update the meta field in the database.\n update_post_meta($post_id, '_liblynx_protect', $protect);\n update_post_meta($post_id, '_liblynx_unit', $unit);\n}", "public function save_post_meta( $post_id ) {\n\t\t\n\t\t// Validate request\n\t\t$nonce_action = $this->nonce['action'].$post_id;\n\t\tif(\n\t\t\tget_post_type( $post_id ) !== $this->post_type\n\t\t\t|| !isset( $_POST[ $this->nonce['name'] ] )\n\t\t\t|| !wp_verify_nonce( $_POST[ $this->nonce['name'] ], $nonce_action )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Loop meta values\n\t\tforeach( $this->fields as $field_name => $field_data ) {\n\t\t\t\n\t\t\t// Get new value and sanitize it\n\t\t\t$new_value = isset( $_POST[ $field_name ] ) ? $_POST[ $field_name ] : '';\n\t\t\t$sanitize_func = is_callable( $field_data['sanitize'] ) ? $field_data['sanitize'] : 'sanitize_text_field';\n\t\t\tif( $field_name == 'opening_hours' ) {\n\t\t\t\tif( !is_array( $new_value ) ) {\n\t\t\t\t\t$new_value = false;\n\t\t\t\t} else {\n\t\t\t\t\tarray_walk_recursive( $new_value, 'sanitize_text_field' );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$new_value = call_user_func( $sanitize_func, $new_value );\n\t\t\t}\n\t\t\t\n\t\t\t// Update database\n\t\t\tif( empty( $new_value ) ) {\n\t\t\t\tdelete_post_meta( $post_id, $field_name );\n\t\t\t} else {\n\t\t\t\tupdate_post_meta( $post_id, $field_name, $new_value );\n\t\t\t}\n\t\t}\n\t}", "function save_my_meta_box_data2( $post_id ) {\n\n\n // Check if our nonce is set.\n if ( ! isset( $_POST['post_meta_box_nonce'] ) ) {\n return;\n }\n\n // Verify that the nonce is valid.\n if ( ! wp_verify_nonce( $_POST['post_meta_box_nonce'], 'post_meta_box' ) ) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n\n // Check the user's permissions.\n if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n return;\n }\n\n } else {\n\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n }\n\n /* OK, it's safe for us to save the data now. */\n\n // Make sure that it is set.\n if ( ! isset( $_POST['second_title'] ) ) {\n return;\n }\n // Make sure that it is set.\n if ( ! isset( $_POST['fexid'] ) ) {\n return;\n }\n // Make sure that it is set.\n if ( ! isset( $_POST['po_sources'] ) ) {\n return;\n }\n\n // Sanitize user input.\n $my_sec_title = sanitize_text_field( $_POST['second_title'] );\n $my_post_sources = sanitize_text_field( $_POST['po_sources'] );\n $my_fexid = sanitize_text_field( $_POST['fexid'] );\n\n // Update the meta field in the database.\n update_post_meta( $post_id, 'post_second_title', $my_sec_title );\n update_post_meta( $post_id, 'post_sources', $my_post_sources );\n update_post_meta( $post_id, 'post_fexid', $my_fexid );\n}", "function mytheme_save_data($post_id) {\r\n global $meta_box;\r\n\r\n // verify nonce\r\n if (!wp_verify_nonce($_POST['mytheme_meta_box_nonce'], basename(__FILE__))) {\r\n return $post_id;\r\n }\r\n\r\n // check autosave\r\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\r\n return $post_id;\r\n }\r\n\r\n // check permissions\r\n if ('page' == $_POST['post_type']) {\r\n if (!current_user_can('edit_page', $post_id)) {\r\n return $post_id;\r\n }\r\n } elseif (!current_user_can('edit_post', $post_id)) {\r\n return $post_id;\r\n }\r\n\r\n foreach ($meta_box['fields'] as $field) {\r\n $old = get_post_meta($post_id, $field['id'], true);\r\n $new = $_POST[$field['id']];\r\n\r\n if ($new && $new != $old) {\r\n update_post_meta($post_id, $field['id'], $new);\r\n } elseif ('' == $new && $old) {\r\n delete_post_meta($post_id, $field['id'], $old);\r\n }\r\n }\r\n}", "public function ecf_save_meta_box( $post_id ) {\r\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\r\n\t\t\tif ( $parent_id = wp_is_post_revision( $post_id ) ) {\r\n\t\t\t\t$post_id = $parent_id;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$fields = array();\r\n\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tarray_push( $fields, $customField['name'] );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tforeach ( $fields as $field ) {\r\n\t\t\t\tif ( array_key_exists( $field, $_POST ) ) {\r\n\t\t\t\t\tupdate_post_meta( $post_id, $field, sanitize_text_field( $_POST[$field] ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "function mytheme_save_data($post_id) {\r\n global $meta_box;\r\n \r\n // verify nonce\r\n if (!wp_verify_nonce($_POST['mytheme_meta_box_nonce'], basename(__FILE__))) {\r\n return $post_id;\r\n }\r\n\r\n // check autosave\r\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\r\n return $post_id;\r\n }\r\n\r\n // check permissions\r\n if ('page' == $_POST['post_type']) {\r\n if (!current_user_can('edit_page', $post_id)) {\r\n return $post_id;\r\n }\r\n } elseif (!current_user_can('edit_post', $post_id)) {\r\n return $post_id;\r\n }\r\n \r\n foreach ($meta_box['fields'] as $field) {\r\n $old = get_post_meta($post_id, $field['id'], true);\r\n $new = $_POST[$field['id']];\r\n \r\n if ($new && $new != $old) {\r\n update_post_meta($post_id, $field['id'], $new);\r\n } elseif ('' == $new && $old) {\r\n delete_post_meta($post_id, $field['id'], $old);\r\n }\r\n }\r\n}", "public function save( $post_id ) {\n\t\t\tglobal $post, $post_type;\n\t\t\tif ( ! $post_id ) {\n\t\t\t\t$post_id = $post->ID;\n\t\t\t}\n\n\t\t\t$post_type_object = get_post_type_object( $post_type );\n\n\t\t\tif (\n\t\t\t\tempty( $_POST )\n\t\t\t\t|| ! is_object( $post )\n\t\t\t\t|| ( ! in_array( $post_type, $this->_meta_box['pages'] ) ) //check post type\n\t\t\t\t|| ( ! isset( $_POST['post_ID'] ) || $post_id != $_POST['post_ID'] ) //check revision\n\t\t\t\t|| ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) //check autosave\n\t\t\t\t|| ( ! check_admin_referer( 'wm-' . $post_type . '-metabox-nonce', $post_type . '-metabox-nonce' ) ) //check nonce - security\n\t\t\t\t|| ( ! current_user_can( $post_type_object->cap->edit_post, $post_id ) ) //check permission\n\t\t\t\t)\n\t\t\t\treturn $post_id;\n\n\t\t\t//save each meta field separately\n\t\t\t$fields = $this->_fields;\n\t\t\tif ( isset( $this->_meta_box['visual-wrapper-add'] ) && ! empty( $this->_meta_box['visual-wrapper-add'] ) ) {\n\t\t\t\t$fields = array_merge( $this->_meta_box['visual-wrapper-add'], $fields );\n\t\t\t}\n\t\t\twm_save_meta( $post_id, $fields );\n\t\t}", "public static function saveMetaBox($post_id)\n\t{\n\n\t\t// Check if our nonce is set.\n\t\t// Verify that the nonce is valid.\n\t\tif (!isset($_POST[static::$MACHINE_NAME . '_meta_box_nonce']) || !wp_verify_nonce($_POST[static::$MACHINE_NAME . '_meta_box_nonce'], static::$MACHINE_NAME . '_meta_box')) {\n//\t\t\treturn;\n\t\t}\n\n\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\t\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check the user's permissions.\n\t\tif (isset($_POST['post_type']) && 'page' == $_POST['post_type']) {\n\t\t\tif (!current_user_can('edit_page', $post_id)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tif (!current_user_can('edit_post', $post_id)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\n\t\tif (!isset($_POST['post_type']) || static::$MACHINE_NAME != $_POST['post_type']) {\n\t\t\treturn;\n\t\t}\n\n\t\t$self = new static($post_id);\n\n\t\tif (!empty($self->id)) {\n\n\t\t\tif( ! empty($_POST[ static::$MACHINE_NAME . '_fields']) ) {\n\t\t\t\t$self->updateFromArray($_POST[ static::$MACHINE_NAME . '_fields']);\n\t\t\t}\n\n\t\t\t$self->save();\n\t\t}\n\n\t}", "function plugin_save_post_meta( $post_id ) {\r\n\t\tglobal $post, $new_meta_boxes;\r\n\t\t// print var_export($_POST,true);\r\n\t\t// only save if we have something to save\r\n\t\tif (isset($_POST['post_type']) && $_POST['post_type'] && $this->postmeta[$_POST['post_type']] ) {\r\n\t\t\t// print var_export($_POST,true);\r\n\t\t\t// go through each of the registered post metaboxes\r\n\t\t\tforeach ($this->postmeta[$_POST['post_type']] as $cur) {\r\n\t\t\t\r\n\t\t\t\t// save fields only for the current custom post type.\t\r\n\t\t\t\tforeach($cur as $meta_box) {\r\n\t\t\t\t// Verify\r\n\t\t\t\tif ( !wp_verify_nonce( $_POST[$meta_box['id'].'_noncename'], plugin_basename($this->filename) )) {\r\n\t\t\t\t\treturn $post_id;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// Check some permissions\r\n\t\t\t\tif ( 'page' == $_POST['post_type'] ) {\r\n\t\t\t\t\tif ( !current_user_can( 'edit_page', $post_id ))\r\n\t\t\t\t\treturn $post_id;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif ( !current_user_can( 'edit_post', $post_id ))\r\n\t\t\t\t\treturn $post_id;\r\n\t\t\t\t}\r\n\t\t \r\n\t\t\t\t$data = $_POST[$meta_box['id'].'_value'];\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t// Convert autosuggest value to a post id\r\n\t\t\t\t$data= $this->suggest_to_id($data);\r\n\t\t\t\t\r\n\t\t\t\t// if no post id is found then kill the autocomplete thinger\r\n\t\t \r\n\t\t\t\tif(get_post_meta($post_id, $meta_box['id'].'_value') == \"\")\r\n\t\t\t\t\tadd_post_meta($post_id, $meta_box['id'].'_value', $data, true);\r\n\t\t\t\telseif($data != get_post_meta($post_id, $meta_box['id'].'_value', true))\r\n\t\t\t\t\tupdate_post_meta($post_id, $meta_box['id'].'_value', $data);\r\n\t\t\t\telseif($data == \"\")\r\n\t\t\t\t\tdelete_post_meta($post_id, $meta_box['id'].'_value', get_post_meta($post_id, $meta_box['id'].'_value', true));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} //end if isset\r\n\t}", "function mytheme_save_data($post_id) {\n global $meta_box;\n\n // verify nonce\n if (!isset($_POST['mytheme_meta_box_nonce']) || !wp_verify_nonce($_POST['mytheme_meta_box_nonce'], basename(__FILE__))) {\n return $post_id;\n }\n\n // check autosave\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post_id;\n }\n\n // check permissions\n if ('page' == $_POST['post_type']) {\n if (!current_user_can('edit_page', $post_id)) {\n return $post_id;\n }\n } elseif (!current_user_can('edit_post', $post_id)) {\n return $post_id;\n }\n\n foreach ($meta_box['fields'] as $field) {\n $old = get_post_meta($post_id, $field['id'], true);\n $new = $_POST[$field['id']];\n\n if ($new && $new != $old) {\n update_post_meta($post_id, $field['id'], $new);\n } elseif ('' == $new && $old) {\n delete_post_meta($post_id, $field['id'], $old);\n }\n }\n\n}", "public function add_meta_save( $post_id ) {\n\n\t\t// Saving Author\n\t\t$author = $_POST['author'];\n\t\tupdate_post_meta( $post_id, 'author', esc_attr( $author ) );\n\t\t$release_date = $_POST['release_date'];\n\t\tupdate_post_meta( $post_id, 'release_date', esc_attr( $release_date ) );\n\t\t$preview_file = $_POST['preview_file'];\n\t\tupdate_post_meta( $post_id, 'preview_file', esc_attr( $preview_file ) );\n\t\t$local_product = isset( $_POST['local_product'] );\n\t\tif ( $local_product ) {\n\t\t\tupdate_post_meta( $post_id, 'local_product', true );\n\t\t} else {\n\t\t\tdelete_post_meta( $post_id, 'local_product' );\n\t\t}\n\t}", "function save_post()\n \t{\n \t\treturn $this->class_post->save_post();\n \t}", "function pvplugin_save_meta_box_data( $post_id ) {\n\n\t/*\n\t * We need to verify this came from our screen and with proper authorization,\n\t * because the save_post action can be triggered at other times.\n\t */\n\n\t// Check if our nonce is set.\n\tif ( ! isset( $_POST['pvplugin_meta_box_nonce'] ) ) {\n\t\treturn;\n\t}\n\n\t// Verify that the nonce is valid.\n\tif ( ! wp_verify_nonce( $_POST['pvplugin_meta_box_nonce'], 'pvplugin_save_meta_box_data' ) ) {\n\t\treturn;\n\t}\n\n\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn;\n\t}\n\n\t// Check the user's permissions.\n\tif ( isset( $_POST['post_type'] ) && 'policy' == $_POST['post_type'] ) {\n\n\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t} else {\n\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t/* OK, it's safe for us to save the data now. */\n\t\n\n\t$next_update = $_POST['next_update_month'].'/'.$_POST['next_update_year'];\n\t$date_adopted = $_POST['date_adopted_month'].'/'.$_POST['date_adopted_year'];\n\n\t// Sanitize user input.\n\t$approvers = sanitize_text_field( $_POST['approvers'] );\n\t$next_update = sanitize_text_field( $next_update );\n\t$division = sanitize_text_field( $_POST['division'] );\n\t$responsible_office = sanitize_text_field( $_POST['responsible_office'] );\n\t$date_adopted = sanitize_text_field( $_POST['date_adopted'] );\n\t$additional_refrence = sanitize_text_field( $_POST['additional_refrence'] );\n\n\t// Update the meta field in the database.\n\tupdate_post_meta( $post_id, 'approvers', $approvers );\n\tupdate_post_meta( $post_id, 'next_update', $next_update );\n\tupdate_post_meta( $post_id, 'next_update_month', $_POST['next_update_month'] );\n\tupdate_post_meta( $post_id, 'next_update_year', $_POST['next_update_year'] );\n\tupdate_post_meta( $post_id, 'division', $division );\n\tupdate_post_meta( $post_id, 'responsible_office', $responsible_office );\n\tupdate_post_meta( $post_id, 'date_adopted', $date_adopted );\n\tupdate_post_meta( $post_id, 'date_adopted_month', $_POST['date_adopted_month'] );\n\tupdate_post_meta( $post_id, 'date_adopted_year', $_POST['date_adopted_year'] );\n\tupdate_post_meta( $post_id, 'additional_refrence', $additional_refrence );\n\tupdate_post_meta( $post_id, '_expiration-date', strtotime('+ 1 year') );\n\t\n}", "function experiences_save_postdata($post_id) {\n if (array_key_exists('exp-link-url', $_POST)) {\n update_post_meta($post_id, 'experiences_link', $_POST['exp-link-url']);\n }\n\n if (array_key_exists('exp-image-size', $_POST)) {\n update_post_meta($post_id, 'experiences_size', $_POST['exp-image-size']);\n }\n}", "function mredir_save_meta_box_data( $post_id ){\n\t\t\tif ( !isset( $_POST['mredir_metabox_nonce'] ) || !wp_verify_nonce( $_POST['mredir_metabox_nonce'], basename( __FILE__ ) ) ){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// return if autosave\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ){\n\t\t\t\treturn;\n\t\t\t}\n\t\t // Check the user's permissions.\n\t\t\tif ( ! current_user_can( 'edit_post', $post_id ) ){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isset( $_REQUEST['country_id'] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'country_id', sanitize_text_field( $_POST['country_id'] ) );\n\t\t\t}\n\t\t\tif ( isset( $_REQUEST['target_url'] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'target_url', sanitize_text_field( $_POST['target_url'] ) );\n\t\t\t}\n\t\t}", "public function meta_box_save_postdata( $post_id ) \n\t\t{\n\t\t\tglobal $post;\n\t\t\t\n\t\t\tif( isset($post) ) {\n\t\t\t\t// do not save if this is an auto save routine\n\t\t\t\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)\n\t\t\t\t\treturn $post_id;\n\t\t\t\t\t\n\t\t\t\tif($post->post_type == 'partners'){\n\t\t\t\t\t\n\t\t\t\t\t$partner_url = isset($_POST[\"partner_url\"]) ? $_POST[\"partner_url\"] : '';\n\t\t\t\t\tupdate_post_meta( $post_id, '_partner_url', $partner_url ); \n\t\t\t\t\t\n\t\t\t\t\t$partner_image = isset($_POST[\"partner_image\"]) ? $_POST[\"partner_image\"] : '';\n\t\t\t\t\tupdate_post_meta( $post_id, '_partner_image', $partner_image ); \n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static function save_metabox($post_id, $post){\n\t \n\t $nonce_name = isset( $_POST['custom_nonce'] ) ? $_POST['custom_nonce'] : '';\n\t $nonce_action = 'custom_nonce_action';\n\t \n \n\n\t \n\t if ( ! isset( $nonce_name ) ) {\n\t \treturn;\n }\n \n // Check if nonce is valid.\n if ( ! wp_verify_nonce( $nonce_name, $nonce_action ) ) {\n return;\n }\n \n // Check if user has permissions to save data.\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n \n // Check if not an autosave.\n if ( wp_is_post_autosave( $post_id ) ) {\n return;\n }\n // Check if not a revision.\n if ( wp_is_post_revision( $post_id ) ) {\n return;\n }\n \n global $wpdb;\n $pivot_table= $wpdb->prefix.'filter_post';\n $wpdb->query( 'DELETE FROM '.$pivot_table.' WHERE post_id = '.$post_id.'');\n\t \t if(isset($_POST['tag_names']) && !empty($_POST['tag_names'])){\n\t\t \t\n\t\t \n\t \t foreach($_POST['tag_names'] as $value){\n\t\t \t\n\t\t \n\t\t\t\n\t\t \n $data = array(\n 'post_id' => $post_id,\n 'filter_id' =>$value, \n ); \n $format = array(\n '%d',\n '%d',\n );\n \n\t $success=$wpdb->insert( $pivot_table, $data, $format );\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t }", "function vw_hospital_bn_metadesig_saveDoc( $post_id ) {\n\tif( isset( $_POST[ 'meta-Day' ] ) ) {\n\t update_post_meta( $post_id, 'meta-Day', $_POST[ 'meta-Day' ] );\n\t}\n\tif( isset( $_POST[ 'meta-Time' ] ) ) {\n\t update_post_meta( $post_id, 'meta-Time', $_POST[ 'meta-Time' ] );\n\t}\n}", "function rosemary_meta_save( $post_id ) {\r\n \r\n // Checks save status\r\n $is_autosave = wp_is_post_autosave( $post_id );\r\n $is_revision = wp_is_post_revision( $post_id );\r\n $is_valid_nonce = ( isset( $_POST[ 'rosemary_nonce' ] ) && wp_verify_nonce( $_POST[ 'rosemary_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';\r\n \r\n // Exits script depending on save status\r\n if ( $is_autosave || $is_revision || !$is_valid_nonce ) {\r\n return;\r\n }\r\n\t\r\n\t// Checks for input and saves\r\n\tif( isset( $_POST[ 'meta-checkbox-fullwidth' ] ) ) {\r\n\t\tupdate_post_meta( $post_id, 'meta-checkbox-fullwidth', 'yes' );\r\n\t} else {\r\n\t\tupdate_post_meta( $post_id, 'meta-checkbox-fullwidth', '' );\r\n\t}\r\n\tif( isset( $_POST[ 'meta-checkbox-page-content' ] ) ) {\r\n\t\tupdate_post_meta( $post_id, 'meta-checkbox-page-content', 'yes' );\r\n\t} else {\r\n\t\tupdate_post_meta( $post_id, 'meta-checkbox-page-content', '' );\r\n\t}\r\n\tif( isset( $_POST[ 'meta-checkbox-blog-slider' ] ) ) {\r\n\t\tupdate_post_meta( $post_id, 'meta-checkbox-blog-slider', 'yes' );\r\n\t} else {\r\n\t\tupdate_post_meta( $post_id, 'meta-checkbox-blog-slider', '' );\r\n\t}\r\n\tif( isset( $_POST[ 'meta-checkbox-blog-promo' ] ) ) {\r\n\t\tupdate_post_meta( $post_id, 'meta-checkbox-blog-promo', 'yes' );\r\n\t} else {\r\n\t\tupdate_post_meta( $post_id, 'meta-checkbox-blog-promo', '' );\r\n\t}\r\n\t\r\n if( isset( $_POST[ 'meta-text-blog-heading' ] ) ) {\r\n update_post_meta( $post_id, 'meta-text-blog-heading', sanitize_text_field( $_POST[ 'meta-text-blog-heading' ] ) );\r\n }\r\n\tif( isset( $_POST[ 'meta-select-blog-layout' ] ) ) {\r\n\t\tupdate_post_meta( $post_id, 'meta-select-blog-layout', $_POST[ 'meta-select-blog-layout' ] );\r\n\t}\r\n\tif( isset( $_POST[ 'meta-number-posts' ] ) ) {\r\n update_post_meta( $post_id, 'meta-number-posts', sanitize_text_field( $_POST[ 'meta-number-posts' ] ) );\r\n }\r\n\tif( isset( $_POST[ 'meta-blog-category' ] ) ) {\r\n update_post_meta( $post_id, 'meta-blog-category', sanitize_text_field( $_POST[ 'meta-blog-category' ] ) );\r\n }\r\n \r\n}", "protected function save_paypal_meta_data( $order, $posted ) {\n }", "static function save($post_id, $post)\n {\n $class_name = get_called_class();\n\n // Return if the user doesn't have edit permissions.\n if (!current_user_can('edit_post', $post_id)) {\n return $post_id;\n }\n\n // Verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times.\n //if (!isset($_POST['cat_fields']) || !wp_verify_nonce($_POST['cat_fields'], basename(__FILE__))) {\n // return $post_id;\n //}\n\n $meta = [];\n\n // Now that we're authenticated, time to save the data.\n // This sanitizes the data from the field and saves it into an array $meta.\n foreach ($class_name::META as $key){\n if (isset($_POST[$key]))\n $meta[$key] = esc_textarea($_POST[$key]);\n }\n\n // Cycle through the $meta array.\n // Note, in this example we just have one item, but this is helpful if you have multiple.\n foreach ($meta as $key => $value) :\n\n // Don't store custom data twice\n if ('revision' === $post->post_type) {\n return;\n }\n\n if (get_post_meta($post_id, $key, false)) {\n // If the custom field already has a value, update it.\n update_post_meta($post_id, $key, $value);\n } else {\n // If the custom field doesn't have a value, add it.\n add_post_meta($post_id, $key, $value);\n }\n\n if (!$value) {\n // Delete the meta key if there's no value\n delete_post_meta($post_id, $key);\n }\n\n endforeach;\n\n }", "function notes_save_meta_box_data( $post_id ) {\n\n\t/*\n\t * We need to verify this came from our screen and with proper authorization,\n\t * because the save_post action can be triggered at other times.\n\t */\n\n\t// Check if our nonce is set.\n\tif ( ! isset( $_POST['notes_meta_box_nonce'] ) ) {\n\t\treturn;\n\t}\n\n\t// Verify that the nonce is valid.\n\tif ( ! wp_verify_nonce( $_POST['notes_meta_box_nonce'], 'notes_meta_box' ) ) {\n\t\treturn;\n\t}\n\n\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn;\n\t}\n\n\t// Check the user's permissions.\n\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t} else {\n\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t/* OK, it's safe for us to save the data now. */\n\t\n\t// Make sure that it is set.\n\tif ( ! isset( $_POST['notes_new_field'] ) ) {\n\t\treturn;\n\t}\n\n\t// Sanitize user input.\n\t$my_data = sanitize_text_field( $_POST['notes_new_field'] );\n\n\t// Update the meta field in the database.\n\tupdate_post_meta( $post_id, '_my_meta_value_key', $my_data );\n}", "function edd_incentives_save_meta( $post_id ) {\n global $post;\n \n // Don't process if nonce can't be validated\n if( ! isset( $_POST['edd_incentives_nonce'] ) || ! wp_verify_nonce( $_POST['edd_incentives_nonce'], basename( __FILE__ ) ) ) return $post_id;\n\n // Don't process if this is an autosave\n if( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || isset( $_REQUEST['bulk_edit'] ) ) return $post_id;\n\n // Don't process if this is a revision\n if( $post->post_type == 'revision' ) return $post_id;\n\n // Don't process if the current user shouldn't be editing this\n if( ! current_user_can( 'edit_post', $post_id ) ) return $post_id;\n\n // Whitelisted fields\n $fields = apply_filters( 'edd_incentives_fields_save', array(\n '_edd_incentive_meta'\n ) );\n\n if( ! empty( $_FILES ) && isset( $_FILES['_edd_incentive_button_image'] ) ) {\n $image = wp_upload_bits( $_FILES['_edd_incentive_button_image']['name'], null, file_get_contents( $_FILES['_edd_incentive_button_image']['tmp_name'] ) );\n\n if( $image['error'] == false ) {\n $_POST['_edd_incentive_meta']['button_image'] = $image['url'];\n }\n }\n\n foreach( $fields as $field ) {\n if( isset( $_POST[$field] ) ) {\n if( is_array( $_POST[$field] ) ) {\n foreach( $_POST[$field] as $field_key => $field_value ) {\n if( is_string( $field_value ) ) {\n $_POST[$field][$field_key] = esc_attr( $field_value );\n }\n }\n\n $new = $_POST[$field];\n } else {\n if( is_string( $_POST[$field] ) ) {\n $new = esc_attr( $_POST[$field] );\n } elseif( is_int( $_POST[$field] ) ) {\n $new = absint( $_POST[$field] );\n } else {\n $new = $_POST[$field];\n }\n }\n \n $new = apply_filters( 'edd_incentives_save_' . $field, $new );\n update_post_meta( $post_id, $field, $new );\n } else {\n delete_post_meta( $post_id, $field );\n }\n }\n}", "function update_post( $post, $plugin_name, $plugin_info ) {\n echo \"Updating post: \" . $post->ID;\n echo PHP_EOL;\n //echo \"New slug:\" . $plugin_info->\n $parts = explode( '/', $plugin_name );\n $slug = $parts[0];\n echo \"New slug: \" . $slug;\n echo PHP_EOL;\n echo \"New plugin name: \" . $plugin_name;\n echo PHP_EOL;\n echo \"Name: \" . $plugin_info['Name'];\n echo PHP_EOL;\n //echo \"Title: \" . $plugin_info['Title'];\n //echo PHP_EOL;\n //echo \"Desc: \" . $plugin_info['Description'];\n if ( $plugin_info['Name'] !== $plugin_info['Title']) { gob(); }\n\n\n //print_r( $plugin_info );\n\n if ( true ) {\n update_post_meta($post->ID, '_oikp_slug', $slug);\n update_post_meta($post->ID, '_oikp_name', $plugin_name);\n update_post_meta($post->ID, '_oikp_desc', $plugin_info['Name']);\n $plugin_uri = isset( $plugin_info['PluginURI']) ? $plugin_info['PluginURI'] : '';\n update_post_meta($post->ID, '_oikp_uri', $plugin_uri );\n }\n //$_POST['_oikp_slug'] = $this->component;\n //$_POST['_oikp_name'] = $this->get_plugin_file_name();\n // $_POST['_oikp_desc'] = $this->get_plugin_name();\n //$_POST['_oikp_uri'] = $this->get_plugin_uri();\n\n}", "public function save_widget_post_meta( $post_id ) {\n\t\tif ( empty( $_POST['_widget_post_meta_nonce'] ) || !wp_verify_nonce( $_POST['_widget_post_meta_nonce'], 'widget_post_meta_save' ) ) return;\n\t\tif ( !current_user_can( 'edit_post', $post_id ) ) return;\n\n\t\t$widget_post_meta = isset( $_POST['widget_post_meta'] ) ? stripslashes_deep( $_POST['widget_post_meta'] ) : '';\n\t\t$widget_post_meta = json_decode( $widget_post_meta, true);\n\n\t\tupdate_post_meta( $post_id, self::POST_META_KEY, $widget_post_meta );\n\n\t}", "function meta_boxes_save() {\n\n\t\t// Bail out now if something not set\n\t\tif (\n\t\t\tisset( $_POST['_wpnonce'] ) &&\n\t\t\tisset( $_POST['post_ID'] ) &&\n\t\t\tisset( $_POST['_lingo_hidden'] ) // This is required to ensure that auto-saves are not processed\n\t\t) {\n\n\t\t\t// Do nonce security check\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\n\n\t\t\t// Grab post ID\n\t\t\t$post_ID = (int) $_POST['post_ID'];\n\t\t\t\n\t\t\t// Set wrong answers\n\t\t\tdelete_post_meta( $post_ID, '_wrong_answers' );\n\t\t\tforeach( $_POST['_wrong_answers'] as $key => $value ) {\n\t\t\t\tif ( $value != '' && $value != 0 ) {\n\t\t\t\t\t$value = (int) $value;\n\t\t\t\t\tadd_post_meta( $post_ID, '_wrong_answers', $value );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Stash all the post meta\n\t\t\tforeach( $this->post_meta as $key => $x ) {\n\t\t\t\tif ( isset( $_POST[$key] ) ) {\n\t\t\t\t\t$value = (int) $_POST[$key];\n\t\t\t\t\tif ( $value != 0 )\n\t\t\t\t\t\tupdate_post_meta( $post_ID, $key, $value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function meta_box_save_func_store($post_id){\n\n\t# Doing autosave then return.\n\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)\n\t\treturn;\n\n\t# If the nonce is not present there or we can not versify it.\n\tif ( !isset($_POST['product_nonce_name']) || !wp_verify_nonce($_POST['product_nonce_name'], 'product_nonce_action' ))\n\t\treturn;\n\n\t# Save Author Name \n\tif (isset($_POST['author_name']) && ($_POST['author_name'] != '') ) {\n\t \tupdate_post_meta($post_id, 'author_name', esc_html($_POST['author_name']));\n\t } \n\n\t# Save data Product name.\n\tif (isset($_POST['product_name']) && ($_POST['product_name'] != '')) {\n\t\tupdate_post_meta($post_id, 'product_name', esc_html($_POST['product_name']));\n\t}\n\n\t# Save data Product Description.\n\tif (isset($_POST['product_description']) && ($_POST['product_description'] != '')) {\n\t\tupdate_post_meta($post_id, 'product_description', esc_html($_POST['product_description']));\n\t}\n\n\n}", "function vw_mobile_app_pro_posttype_bn_metadesig_save( $post_id ) {\n\tif (!isset($_POST['vw_mobile_app_pro_posttype_posttype_testimonial_meta_nonce']) || !wp_verify_nonce($_POST['vw_mobile_app_pro_posttype_posttype_testimonial_meta_nonce'], basename(__FILE__))) {\n\t\treturn;\n\t}\n\n\tif (!current_user_can('edit_post', $post_id)) {\n\t\treturn;\n\t}\n\n\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n\t\treturn;\n\t}\n\n\t// Save desig.\n\tif( isset( $_POST[ 'vw_mobile_app_pro_posttype_testimonial_desigstory' ] ) ) {\n\t\tupdate_post_meta( $post_id, 'vw_mobile_app_pro_posttype_testimonial_desigstory', sanitize_text_field($_POST[ 'vw_mobile_app_pro_posttype_testimonial_desigstory']) );\n\t}\n}", "function pavi_post_meta_boxes_setup() {\n add_action( 'add_meta_boxes', 'pavi_textarea_meta_boxes' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'pavi_save_post_class_meta', 10, 2 );\n}", "public function save()\n {\n remove_action('save_post', array($this, 'save'), 999);\n add_filter('wp_save_post_revision_post_has_changed', function () {\n return false;\n }, 99999);\n global $post;\n if (is_a($post, '\\WP_Post')) {\n $postArgs = array(\n 'ID' => $post->ID,\n 'post_content' => $this->content\n );\n wp_update_post($postArgs);\n\n $rev = wp_get_post_revisions($post);\n if (!empty($rev)) {\n $last = current($rev);\n $postArgs = array(\n 'ID' => $last->ID,\n 'post_content' => $this->content\n );\n wp_update_post($postArgs);\n }\n\n do_action('kb.concat.save', $postArgs);\n }\n\n }", "public final function save() {\n\t\t\treturn SERIA_Meta::save($this);\n\t\t}", "static function save_metabox($post_id){\n\t\tif ( ! isset( $_POST['flat-options_nonce'] ) )\n\t\t\treturn $post_id;\n\n\t\t$nonce = $_POST['flat-options_nonce'];\n\n\n\t\t// Verify that the nonce is valid.\n\t\tif ( ! wp_verify_nonce( $nonce, 'flat-options' ) )\n\t\t\treturn $post_id;\n\n\t\t// If this is an autosave, our form has not been submitted,\n // so we don't want to do anything.\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n\t\t\treturn $post_id;\n\n\t\t// Check the user's permissions.\n\t\tif ( 'page' == $_POST['post_type'] ) {\n\n\t\t\tif ( ! current_user_can( 'edit_page', $post_id ) )\n\t\t\t\treturn $post_id;\n\t\n\t\t} else {\n\n\t\t\tif ( ! current_user_can( 'edit_post', $post_id ) )\n\t\t\t\treturn $post_id;\n\t\t}\n\n\t\t/* OK, its safe for us to save the data now. */\n\t\t\n\t\t$fieldblocks = self::get_fields();\n\t\t\n\t\tforeach ($fieldblocks as $key => $fields){\n\t\t\tforeach ($fields as $key => $field){\t\t\t\n\t\t\t\tif ($field['type'] == \"text\") $value = sanitize_text_field($_POST[$key]);\n\t\t\t\tif ($field['type'] == \"number\") $value = (int) $_POST[$key];\n\t\t\t\t\n\t\t\t\tupdate_post_meta( $post_id, $key, $value );\n\t\t\t}\n\t\t}\t\n\t \n }" ]
[ "0.809808", "0.7833368", "0.75237334", "0.74616605", "0.7355808", "0.72855973", "0.72277004", "0.72026795", "0.71884656", "0.7168112", "0.7140496", "0.71065354", "0.7099175", "0.70936835", "0.7083562", "0.7074082", "0.7069365", "0.70217687", "0.70125234", "0.6995267", "0.6983067", "0.69632083", "0.6955582", "0.69531894", "0.69330263", "0.6929057", "0.6923552", "0.6923348", "0.69167155", "0.69066375", "0.6900778", "0.68975353", "0.6897215", "0.68954617", "0.6873555", "0.6859892", "0.685841", "0.6858348", "0.68444484", "0.6841558", "0.682532", "0.6820496", "0.681894", "0.6815223", "0.68132067", "0.67947364", "0.6792616", "0.67911947", "0.6784912", "0.6780511", "0.6777137", "0.6773138", "0.67571366", "0.6756984", "0.6750329", "0.6748721", "0.6747001", "0.6739612", "0.6736687", "0.6731132", "0.6720371", "0.6717796", "0.67176867", "0.67123336", "0.67097557", "0.67063206", "0.66997784", "0.669715", "0.66942674", "0.6691358", "0.66888046", "0.66865194", "0.6678639", "0.6673684", "0.6668178", "0.6668172", "0.66666746", "0.66626143", "0.6641709", "0.6636457", "0.66364026", "0.6634876", "0.6632467", "0.6629958", "0.6622636", "0.6620808", "0.6615192", "0.66146046", "0.66128635", "0.66118264", "0.6606943", "0.660651", "0.66046345", "0.6600788", "0.65998405", "0.65965766", "0.65941525", "0.6592099", "0.6589915", "0.6583295" ]
0.6798596
45
Obtiene los registro de la tabla de modas
function obtenerTemporal() { $sqlstr = "select `tmp_prod`.`id_product`, `tmp_prod`.`nombre`, `tmp_prod`.`cantidad`, `tmp_prod`.`price`, `tmp_prod`.`pricetot` from `tmp_prod`"; $tmp = array(); $tmp = obtenerRegistros($sqlstr); return $tmp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function tbl_permisos_modulos() {\r\n\t\t\t$this->permisos_modulo = $this->esquema->createTable('PERMISOS_MODULOS');\r\n\t\t\t$this->permisos_modulo->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Modulo'\r\n\t\t\t));\r\n\t\t\t$this->permisos_modulo->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombre del Modulo'\r\n\t\t\t));\r\n\t\t\t$this->permisos_modulo->addColumn('ESTADO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Estado del Modulo [ID de la tabla ESTADOS]'\r\n\t\t\t));\r\n\t\t\t$this->permisos_modulo->setPrimaryKey(array('ID'));\r\n\t\t\t$this->permisos_modulo->addForeignKeyConstraint($this->estados, array('ESTADO'), array('ID'), $this->opcForeign);\r\n\t\t}", "function getModos() {\r\n // arreglo para la determinacion del tipo de la tabla\r\n // 1 si se les puede agregar registros 0 si no se puede\r\n $modos['inventario_equipo']=1;\r\n $modos['inventario_estado']=1;\r\n $modos['inventario_grupo']=1;\r\n $modos['inventario_marca']=1;\r\n $modos['obligacion_clausula']=1;\r\n $modos['obligacion_componente']=1;\r\n $modos['documento_tipo']=1;\r\n $modos['documento_tema']=1;\r\n $modos['documento_subtema']=1;\r\n $modos['documento_estado']=1;\r\n $modos['documento_estado_respuesta']=1;\r\n $modos['documento_actor']=1;\r\n $modos['documento_tipo_actor']=1;\r\n $modos['riesgo_probabilidad']=1;\r\n $modos['riesgo_categoria']=1;\r\n $modos['riesgo_impacto']=1;\r\n $modos['compromiso_estado']=1;\r\n $modos['departamento']=0;\r\n $modos['departamento_region']=0;\r\n $modos['municipio']=0;\r\n $modos['operador']=0;\r\n return $modos;\r\n }", "function getModos() {\n // arreglo para la determinacion del tipo de la tabla \n // 1 si se les puede agregar registros 0 si no se puede\n $modos['departamento'] = 1;\n $modos['departamento_region'] = 1;\n $modos['municipio'] = 1;\n $modos['operador'] = 1;\n $modos['pais'] = 1;\n $modos['ciudad'] = 1;\n $modos['familias'] = 1;\n $modos['monedas'] = 1;\n $modos['cuenta'] = 1;\n $modos['cuentas_financiero'] = 1;\n $modos['cuentas_financiero_ut'] = 1;\n $modos['cuentas_financiero_tipo'] = 1;\n $modos['extracto_movimiento'] = 1;\n $modos['centropoblado'] = 1;\n $modos['encuesta_tipo'] = 1;\n $modos['actividades_tipo'] = 1;\n $modos['tipohallazgo'] = 1;\n return $modos;\n }", "public static function get():array{\n $consulta=\"SELECT a.id AS idAccion, a.codigo AS codigoAcc, a.nombre AS nombreAcc,m.* \n\t\t\t\t\tFROM acciones a \n\t\t\t\t\t\tINNER JOIN modulos_acciones md ON a.id=md.idAccion\n\t\t\t\t\t RIGHT JOIN modulos m ON idModulo= m.id\"; //preparar la consulta\n return DB::selectAll($consulta,'Modulo');\n }", "function tablaDatos(){\n\n $editar = $this->Imagenes($this->PrimaryKey,0);\n $eliminar = $this->Imagenes($this->PrimaryKey,1);\n $sql = 'SELECT\n C.id_componentes,\n P.descripcion planta,\n S.descripcion secciones,\n E.descripcion Equipo,\n C.`descripcion` Componente\n ,'.$editar.','.$eliminar.' \nFROM\n `componentes` C\nINNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\nINNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\nINNER JOIN\n plantas P ON P.id_planta = S.id_planta\nWHERE\n \n C.`activo` = 1';\n \n $datos = $this->Consulta($sql,1); \n if(count($datos)){\n $_array_formu = array();\n $_array_formu = $this->generateHead($datos);\n $this->CamposHead = ( isset($_array_formu[0]) && is_array($_array_formu[0]) )? $_array_formu[0]: array();\n \n $tablaHtml = '<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-body recargaDatos\" style=\"page-break-after: always;\">\n <div class=\"table-responsive\">';\n $tablaHtml .='';\n \t\t$tablaHtml .= $this->print_table($_array_formu, 7, true, 'table table-striped table-bordered',\"id='tablaDatos'\");\n \t\t$tablaHtml .=' </div>\n </div>\n </div>\n </div>\n </div>\n ';\n }else{\n $tablaHtml = '<div class=\"col-md-8\">\n <div class=\"alert alert-info alert-dismissable\">\n <button class=\"close\" aria-hidden=\"true\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Atenci&oacute;n</strong>\n No se encontraron registros.\n </div>\n </div>';\n }\n \n if($this->_datos=='r') echo $tablaHtml;\n else return $tablaHtml;\n \n }", "function fmodulo(){\n\t\t$this->sentencia=\"SELECT modulo_id,modulo_nombre FROM modulo ORDER BY modulo_orden ASC\";\n\t\t$this->fsentencia();\n\t\t$this->modulo=$this->resultado;\n\t}", "public function getModulo()\n {\n $sql = \"select * from tb_modulo\";\n $stmt = self::prepare($sql);\n if ($stmt->execute()) {\n return $stmt->fetchAll();\n }\n }", "function modificarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_ime';\n\t\t$this->transaccion='WF_tabla_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_tabla','id_tabla','int4');\n\t\t$this->setParametro('id_tipo_proceso','id_tipo_proceso','int4');\n\t\t$this->setParametro('vista_id_tabla_maestro','vista_id_tabla_maestro','int4');\n\t\t$this->setParametro('bd_scripts_extras','bd_scripts_extras','text');\n\t\t$this->setParametro('vista_campo_maestro','vista_campo_maestro','varchar');\n\t\t$this->setParametro('vista_scripts_extras','vista_scripts_extras','text');\n\t\t$this->setParametro('bd_descripcion','bd_descripcion','text');\n\t\t$this->setParametro('vista_tipo','vista_tipo','varchar');\n\t\t$this->setParametro('menu_icono','menu_icono','varchar');\n\t\t$this->setParametro('menu_nombre','menu_nombre','varchar');\n\t\t$this->setParametro('vista_campo_ordenacion','vista_campo_ordenacion','varchar');\n\t\t$this->setParametro('vista_posicion','vista_posicion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('menu_codigo','menu_codigo','varchar');\n\t\t$this->setParametro('bd_nombre_tabla','bd_nombre_tabla','varchar');\n\t\t$this->setParametro('bd_codigo_tabla','bd_codigo_tabla','varchar');\n\t\t$this->setParametro('vista_dir_ordenacion','vista_dir_ordenacion','varchar');\n\t\t$this->setParametro('vista_estados_new','vista_estados_new','varchar');\n\t\t$this->setParametro('vista_estados_delete','vista_estados_delete','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "private function tbl_guiones_registro() {\r\n\t\t\t$this->guiones_registro = $this->esquema->createTable('GUIONES_REGISTRO');\r\n\t\t\t$this->guiones_registro->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del registro del guion'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('FECHA', 'datetime', array(\r\n\t\t\t\t'notnull' => false,\r\n\t\t\t\t'comment' => 'Fecha de ingreso del registro'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('USUARIO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del usuario del registro [ID de la tabla USUARIOS]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('TIPO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del tipo de registro [ID de la tabla GUIONES_REGISTRO_TIPO]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('AFECTACION', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de la afectacion del registro [ID de la tabla GUIONES_REGISTRO_AFECTACION]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('AVISO', 'bigint', array(\r\n\t\t\t\t'notnull' => false,\r\n\t\t\t\t'default' => 0,\r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'Numero del aviso del registro'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->addColumn('UBICACION', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de la UBICACION del registro [ID de la tabla GUIONES_REGISTRO_UBICACION]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro->setPrimaryKey(array('ID'));\r\n\t\t\t$this->guiones_registro->addForeignKeyConstraint($this->usuarios, array('USUARIO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->guiones_registro->addForeignKeyConstraint($this->guiones_registro_tipo, array('TIPO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->guiones_registro->addForeignKeyConstraint($this->guiones_registro_afectacion, array('AFECTACION'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->guiones_registro->addForeignKeyConstraint($this->guiones_registro_ubicacion, array('UBICACION'), array('ID'), $this->opcForeign);\r\n\t\t}", "public static function modulos()\n {\n\t //return Sistema::hasMany(Sistema::class);\n\n\t return (new Sistema())->hasManyThrough(\n\t\t\tnew Modulos(), //modelo final\n\t\t\tnew SistemaModulos(), //modelo intermedio\n\t\t\t'IDSISTEMA', // Foreign key on users table... . El tercer argumento es el nombre de la clave externa en el modelo intermedio\n\t\t\t'IDMODULO', // Foreign key on posts table...\n\t\t\t'IDSISTEMA', // Local key on countries table...\n\t\t\t'IDMODULO' // Local key on users table...\n\t\t)->with('objacceso');\n\n\n\n\t}", "function listado() {\r\n return self::consulta('SELECT * FROM \".self::$nTabla.\"');\r\n }", "function ListarModuloOpcion() {\n\t\n\t\t\t$sql = \"SELECT * FROM modulo\";\n\t\t\t$db = new conexion();\n\t\t\t$result = $db->consulta($sql);\n\t\t\t$num = $db->encontradas($result);\n\t\t\t$respuesta->datos_modulo = [];\n\t\t\t$respuesta->datos_opcion = [];\n\t\t\t$respuesta->mensaje = \"\";\n\t\t\t$respuesta->codigo = \"\";\n\t\t\tif ($num != 0) {\n\t\t\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t\t\t$respuesta->datos_modulo[] = mysql_fetch_array($result);\n\t\t\t\t}\n\t\t\n\t\t\t\t$sql = \"SELECT * FROM opcion\";\n\t\t\t\t$db = new conexion();\n\t\t\t\t$result = $db->consulta($sql);\n\t\t\t\t$num = $db->encontradas($result);\n\t\t\n\t\t\t\tif ($num != 0) {\n\t\t\t\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t\t\t\t$respuesta->datos_opcion[] = mysql_fetch_array($result);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\t$respuesta->mensaje = \"Ok\";\n\t\t\t\t$respuesta->codigo = 1;\n\t\t\t} else {\n\t\t\t\t$respuesta->mensaje = \"No existen modulos.\";\n\t\t\t\t$respuesta->codigo = 0;\n\t\t\t}\n\t\t\treturn json_encode($respuesta);\n\t\t}", "function listarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_sel';\n\t\t$this->transaccion='WF_tabla_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tabla','int4');\n\t\t$this->captura('id_tipo_proceso','int4');\n\t\t$this->captura('vista_id_tabla_maestro','int4');\n\t\t$this->captura('bd_scripts_extras','text');\n\t\t$this->captura('vista_campo_maestro','varchar');\n\t\t$this->captura('vista_scripts_extras','text');\n\t\t$this->captura('bd_descripcion','text');\n\t\t$this->captura('vista_tipo','varchar');\n\t\t$this->captura('menu_icono','varchar');\n\t\t$this->captura('menu_nombre','varchar');\n\t\t$this->captura('vista_campo_ordenacion','varchar');\n\t\t$this->captura('vista_posicion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('menu_codigo','varchar');\n\t\t$this->captura('bd_nombre_tabla','varchar');\n\t\t$this->captura('bd_codigo_tabla','varchar');\n\t\t$this->captura('vista_dir_ordenacion','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('nombre_tabla_maestro','varchar');\n\t\t$this->captura('vista_estados_new','text');\n\t\t$this->captura('vista_estados_delete','text');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function listar_modulos()\n {\n //--Modificacion con Mongo db\n //---------------------------------------------------------------------------\n $resultados = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array('eliminado'=>false))->get($this->nombre_tabla);\n foreach ($resultados as $clave => $valor) {\n $auditoria = $valor[\"auditoria\"][0];\n //var_dump($auditoria->cod_user);die('');\n //--usuario en cuestion\n $id = new MongoDB\\BSON\\ObjectId($valor[\"auditoria\"][0]->cod_user);\n $res_us = $this->mongo_db->where(array('_id'=>$id))->get('usuario');\n //var_dump($res_us[0][\"auditoria\"]->status);die('');\n //var_dump(end($res_us[0][\"auditoria\"]));die('');\n $vector_auditoria = reset($valor[\"auditoria\"]);\n $valor[\"fec_regins\"] = $vector_auditoria->fecha->toDateTime();\n //$valor[\"fec_regins\"] = $res_us[0][\"auditoria\"][0]->fecha->toDateTime();\n $valor[\"correo_usuario\"] = $res_us[0][\"correo_usuario\"];\n $valor[\"status\"] = $valor[\"status\"];\n $valor[\"id_modulo_vista\"] = $valor[\"_id\"]->{'$id'};\n $listado[] = $valor;\n } \n //--\n $listado2 = $listado;\n return $listado2;\n //---------------------------------------------------------------------------\n\n }", "private function _agregarComponenteTabuladores() {\n $componente_carga = new Acciones_ComponenteAltaInsercion();\n\n $this->_id_componente = $componente_carga->crearComponente($_POST['id_tb_rel'], 'PaginaTabuladores', '');\n\n // crear componente y obtener id de insercion\n $componente_carga->consultaParametro($this->_id_componente, 'id_tabla', $_GET['id_tabla']);\n $componente_carga->consultaParametro($this->_id_componente, 'intermedia_tb_id', $_GET['intermedia_tb_id']);\n $componente_carga->consultaParametro($this->_id_componente, 'id_tabla_trd', $_GET['id_tabla_trd']);\n if (isset($_POST['id_cp_rel']) && ($_POST['id_cp_rel'] != '')) {\n $componente_carga->consultaParametro($this->_id_componente, 'id_cp_rel', $_POST['id_cp_rel']);\n }\n $componente_carga->consultaParametro($this->_id_componente, 'tabla_relacionada', $_POST['id_tb_rel']);\n }", "function getTablas() {\r\n $tablas['inventario_equipo']['id']='inventario_equipo';\r\n $tablas['inventario_equipo']['nombre']='Inventario (equipo)';\r\n\r\n $tablas['inventario_grupo']['id']='inventario_grupo';\r\n $tablas['inventario_grupo']['nombre']='Inventario (grupo)';\r\n\r\n $tablas['inventario_estado']['id']='inventario_estado';\r\n $tablas['inventario_estado']['nombre']='Inventario (estado)';\r\n\r\n $tablas['inventario_marca']['id']='inventario_marca';\r\n $tablas['inventario_marca']['nombre']='Inventario (marca)';\r\n\r\n $tablas['obligacion_clausula']['id']='obligacion_clausula';\r\n $tablas['obligacion_clausula']['nombre']='Obligacion (clausula)';\r\n\r\n $tablas['obligacion_componente']['id']='obligacion_componente';\r\n $tablas['obligacion_componente']['nombre']='Obligacion (componente)';\r\n\r\n $tablas['documento_tipo']['id']='documento_tipo';\r\n $tablas['documento_tipo']['nombre']='Documento (Tipo)';\r\n\r\n \t\t$tablas['documento_tema']['id']='documento_tema';\r\n \t\t$tablas['documento_tema']['nombre']='Documento (Tema)';\r\n\r\n \t\t$tablas['documento_subtema']['id']='documento_subtema';\r\n \t\t$tablas['documento_subtema']['nombre']='Documento (Subtema)';\r\n\r\n \t\t$tablas['documento_estado']['id']='documento_estado';\r\n \t\t$tablas['documento_estado']['nombre']='Documento (Estado)';\r\n\r\n \t\t$tablas['documento_estado_respuesta']['id']='documento_estado_respuesta';\r\n \t\t$tablas['documento_estado_respuesta']['nombre']='Documento (Estado Respuesta)';\r\n\r\n \t\t$tablas['documento_actor']['id']='documento_actor';\r\n \t\t$tablas['documento_actor']['nombre']='Documento (Responsables)';\r\n\r\n \t\t$tablas['documento_tipo_actor']['id']='documento_tipo_actor';\r\n \t\t$tablas['documento_tipo_actor']['nombre']='Documento (Tipo de Responsable)';\r\n\r\n \t\t$tablas['riesgo_probabilidad']['id']='riesgo_probabilidad';\r\n \t\t$tablas['riesgo_probabilidad']['nombre']='Riesgo (Probabilidad)';\r\n\r\n \t\t$tablas['riesgo_categoria']['id']='riesgo_categoria';\r\n \t\t$tablas['riesgo_categoria']['nombre']='Riesgo (Categoria)';\r\n\r\n \t\t$tablas['riesgo_impacto']['id']='riesgo_impacto';\r\n \t\t$tablas['riesgo_impacto']['nombre']='Riesgo (Impacto)';\r\n\r\n \t\t$tablas['compromiso_estado']['id']='compromiso_estado';\r\n \t\t$tablas['compromiso_estado']['nombre']='Compromisos (Estado)';\r\n\r\n \t\t$tablas['departamento']['id']='departamento';\r\n \t\t$tablas['departamento']['nombre']='Departamentos';\r\n\r\n \t\t$tablas['departamento_region']['id']='departamento_region';\r\n \t\t$tablas['departamento_region']['nombre']='Departamentos (Region)';\r\n\r\n \t\t$tablas['municipio']['id']='municipio';\r\n \t\t$tablas['municipio']['nombre']='Municipios';\r\n\r\n $tablas['operador']['id']='operador';\r\n\t $tablas['operador']['nombre']='Operador';\r\n\r\n asort($tablas);\r\n return $tablas;\r\n }", "public function allTutorModel($tabla){\n \t\t$stmt = Conexion::conector()->prepare(\"SELECT * FROM $tabla\");\n \t\t$stmt->execute();\n \t\treturn $stmt->fetchAll();\n \t\t$stmt->close();\n \t}", "function listarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_sel';\n\t\t$this->transaccion='WF_TABLAINS_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('historico','historico','varchar');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_' . $_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['bd_nombre_tabla'],'int4');\n\t\t\n\t\tif ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['vista_tipo'] == 'maestro') {\n\t\t\t\t\n\t\t\t$this->captura('estado','varchar');\n\t\t\t$this->captura('id_estado_wf','int4');\n\t\t\t$this->captura('id_proceso_wf','int4');\n\t\t\t$this->captura('obs','text');\n\t\t\t$this->captura('nro_tramite','varchar');\n\t\t}\n\t\t\n\t\tforeach ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['columnas'] as $value) {\n\t\t\t\n\t\t\t$this->captura($value['bd_nombre_columna'],$value['bd_tipo_columna']);\t\t\n\t\t\t//campos adicionales\n\t\t\tif ($value['bd_campos_adicionales'] != '' && $value['bd_campos_adicionales'] != null) {\n\t\t\t\t$campos_adicionales = explode(',', $value['bd_campos_adicionales']);\n\t\t\t\t\n\t\t\t\tforeach ($campos_adicionales as $campo_adicional) {\n\t\t\t\t\t\n\t\t\t\t\t$valores = explode(' ', $campo_adicional);\n\t\t\t\t\t$this->captura($valores[1],$valores[2]);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t$this->captura('estado_reg','varchar');\t\t\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function traerModulos()\n {\n $modeloPermisos = new \\App\\Models\\ModeloPermisos();\n $permisos = $modeloPermisos->traerDePerfil($_SESSION[\"id_perfil\"], $_SESSION[\"id_cliente\"]);\n\n // Modulos a lo que tiene acceso el usuario\n $modeloModulos = new \\App\\Models\\ModeloModulos();\n $i = 0;\n $modulos = []; // Modulos en general al que tiene acceso\n $hijos = []; // SubModulos de '$modulos' al que tiene acceso\n foreach ($permisos as $permiso)\n {\n // Obtenemos un modulo padre\n $modulosHijos = $modeloModulos->traerHijos($permiso[\"id_modulo\"], $permiso[\"id_cliente\"]);\n $j = 0;\n // Obtenemos los hijos del modulo padre\n foreach ($modulosHijos as $nhijos)\n {\n // Guardamos hijos\n $hijos[$j++] = [\"modulo\" => $nhijos[\"modulo\"], \"url\" => $nhijos[\"url\"]];\n }\n // Guardamos padres\n $modulos[$i++] = [\"modulo\" => $permiso[\"modulo\"], \"hijos\" => $hijos];\n $j = 0;\n $hijos = [];\n }\n // Limpiar aquellos modulos sin hijos\n $nmodulos = []; // Datos para el menu\n $i = 0;\n foreach ($modulos as $modulo)\n {\n if (empty($modulo[\"hijos\"]))\n continue;\n $nmodulos[$i++] = [\"modulo\" => $modulo[\"modulo\"], \"hijos\" => $modulo[\"hijos\"]];\n }\n\n return $nmodulos;\n }", "public function getModulos() {\n $iduser = Yii::$app->session->get('PB_iduser', FALSE);\n \n $sql = \"SELECT \n DISTINCT(modu.mod_id),modu.*\n FROM \n grupo_rol as grol \n JOIN usuario as usu on grol.usu_id=usu.usu_id \n JOIN grup_obmo_grup_rol as gogr on grol.grol_id=gogr.grol_id \n JOIN grup_obmo as gob on gogr.gmod_id=gob.gmod_id \n JOIN objeto_modulo as omod on gob.omod_id=omod.omod_id \n JOIN modulo as modu on omod.mod_id=modu.mod_id \n WHERE \n usu.usu_id=$iduser AND \n usu.usu_estado_logico=1 AND \n usu.usu_estado_activo=1 AND \n grol.grol_estado_logico=1 AND \n grol.grol_estado_activo=1 AND \n gogr.gogr_estado_logico=1 AND \n gogr.gogr_estado_activo=1 AND \n gob.gmod_estado_logico=1 AND \n gob.gmod_estado_activo=1 AND \n omod.omod_estado_logico=1 AND \n omod.omod_estado_activo=1 AND \n modu.mod_estado_logico=1 AND \n modu.mod_estado_activo=1 \n ORDER BY modu.mod_orden;\";\n $res = Yii::$app->db->createCommand($sql)->queryAll();\n return $res;\n }", "public function readTabla() {\r\n $query = 'SELECT * FROM ' . $this->tabla;\r\n\r\n\r\n \r\n\r\n $sentencia = $this->con->prepare($query);\r\n\r\n $sentencia->execute();\r\n\r\n return $sentencia;\r\n }", "protected function alterar(){\n header(\"Content-type: text/html;charset=utf-8\");\n $sql = \"SHOW FULL FIELDS FROM \" . $this->table;\n $execute = conexao::toConnect()->executeS($sql);\n $sets = \"\";\n $id_registro = '';\n $contador = \"\";\n $count = 1;\n foreach ($execute as $contar) {\n if ($contar->Key != 'PRI') {\n $atributos_field = $contar->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($this->$get() != null) {\n $contador = $contador + 1;\n }\n }\n }\n foreach ($execute as $key => $attr){\n if ($attr->Key != 'PRI') {\n $atributos_field = $attr->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($this->$get() != null) {\n if ($count != $contador) {\n $sets .= $attr->Field . \" = '\" . $this->$get() . \"',\";\n } else {\n $sets .= $attr->Field . \" = '\" . $this->$get().\"'\";\n }\n $count = $count + 1;\n }\n }else{\n $id_registro = $attr->Field;\n }\n }\n $update = \"UPDATE \".$this->table.\" SET \".$sets.\" WHERE \".$id_registro.\" = \".$this->getIdTable();\n\n $execute_into = conexao::toConnect()->executeQuery($update);\n if (count($execute_into) > 0) {\n return $execute_into;\n }else{\n return false;\n }\n }", "function modeloUserGetAll (){\n // Genero lo datos para la vista que no muestra la contraseña ni los códigos de estado o plan\n // sino su traducción a texto\n $db = AccesoDatos::getModelo();\n $tusuarios = $db->getUsuarios();\n foreach ($tusuarios as $clave=>$user){\n \n $tabla[$user->id]= ['nombre'=>$user->nombre,\n 'correo'=>$user->correo,\n 'plan'=>PLANES[$user->plan],\n 'estado'=>ESTADOS[$user->estado],\n ];\n }\n return $tabla;\n}", "public function selectAllRegiuniData(){\n $sql = \"SELECT * FROM regiune ORDER BY id DESC\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "public function vistaMateriaModel($tabla){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT id, id_maestro, nombre, horas, creditos, id_grupo FROM $tabla\");\t\r\n\t\t$stmt->execute();\r\n\r\n\t\t#fetchAll(): Obtiene todas las filas de un conjunto de resultados asociado al objeto PDOStatement. \r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "public static function getAll2(){\n\t\t$sql = \"select * from prueba\";\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new TemparioData());\n\t}", "function datos_tablas(){\n\t\t$this->db->SELECT('*');\n\t\t$this->db->SELECT('persona.id as id_persona');\n\t\t$this->db->SELECT('mantenciones.estado as estado_mantencion');\n\t\t$this->db->SELECT('mantenciones.id as id_mantencion');\n\t\t$this->db->FROM('mantenciones');\n\t\t$this->db->join('codigos_ccu','mantenciones.id_cod_ccu = codigos_ccu.idcodigos_ccu','inner');\n\t\t$this->db->join('persona','mantenciones.id_chofer = persona.id','inner');\n\t\t$this->db->join('camiones','mantenciones.id_camion = camiones.id','inner');\n\t\t$this->db->where('mantenciones.eliminado', 0);\n\t\t$this->db->order_by('mantenciones.id', 'desc');\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}", "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new TemparioData());\n\t}", "public function mostrarTodosTrabajos(){\n return Trabajo::all();\n }", "public function run()\n {\n \tModulo::create([\n \t'name' => 'administracion',\n \t'display_name' => 'Administracion',\n \t'nivel1' => 1\n \t]);\n\n Modulo::create([\n 'name' => 'cartera',\n 'display_name' => 'Cartera',\n 'nivel1' => 2\n ]);\n\n \tModulo::create([\n \t'name' => 'contabilidad',\n \t'display_name' => 'Contabilidad',\n \t'nivel1' => 3\n \t]);\n\n \tModulo::create([\n \t'name' => 'inventario',\n \t'display_name' => 'Inventario',\n \t'nivel1' => 4\n \t]);\n\n // Administracion\n Modulo::create([\n 'display_name' => 'Modulos',\n 'nivel1' => 1,\n 'nivel2' => 1\n ]);\n\n Modulo::create([\n 'display_name' => 'Referencias',\n 'nivel1' => 1,\n 'nivel2' => 2\n ]);\n\n //Modulos\n Modulo::create([\n 'name' => 'tercerosinterno',\n 'display_name' => 'Terceros internos',\n 'nivel1' => 1,\n 'nivel2' => 1,\n 'nivel3' => 1\n ]);\n\n Modulo::create([\n 'name' => 'roles',\n 'display_name' => 'Roles',\n 'nivel1' => 1,\n 'nivel2' => 1,\n 'nivel3' => 2\n ]);\n\n //Referencias\n Modulo::create([\n 'name' => 'permisos',\n 'display_name' => 'Permisos',\n 'nivel1' => 1,\n 'nivel2' => 2,\n 'nivel3' => 1\n ]);\n\n Modulo::create([\n 'name' => 'modulos',\n 'display_name' => 'Modulos',\n 'nivel1' => 1,\n 'nivel2' => 2,\n 'nivel3' => 2\n ]);\n\n // Cartera\n Modulo::create([\n 'display_name' => 'Modulos',\n 'nivel1' => 2,\n 'nivel2' => 1\n ]);\n\n Modulo::create([\n 'display_name' => 'Reportes',\n 'nivel1' => 2,\n 'nivel2' => 2\n ]);\n\n Modulo::create([\n 'display_name' => 'Documentación',\n 'nivel1' => 2,\n 'nivel2' => 3\n ]);\n\n //Modulos\n Modulo::create([\n 'name' => 'amortizaciones',\n 'display_name' => 'Amortizaciones',\n 'nivel1' => 2,\n 'nivel2' => 1,\n 'nivel3' => 1\n ]);\n\n Modulo::create([\n 'name' => 'generarintereses',\n 'display_name' => 'Generar intereses',\n 'nivel1' => 2,\n 'nivel2' => 1,\n 'nivel3' => 2\n ]);\n\n Modulo::create([\n 'name' => 'enviarintereses',\n 'display_name' => 'Enviar intereses',\n 'nivel1' => 2,\n 'nivel2' => 1,\n 'nivel3' => 3\n ]);\n\n // Reportes\n Modulo::create([\n 'name' => 'reporteedades',\n 'display_name' => 'Edades de cartera',\n 'nivel1' => 2,\n 'nivel2' => 2,\n 'nivel3' => 1\n ]);\n\n Modulo::create([\n 'name' => 'reporteposfechados',\n 'display_name' => 'Cheques posfechados',\n 'nivel1' => 2,\n 'nivel2' => 2,\n 'nivel3' => 2\n ]);\n\n Modulo::create([\n 'name' => 'rintereses',\n 'display_name' => 'Intereses generados',\n 'nivel1' => 2,\n 'nivel2' => 2,\n 'nivel3' => 3\n ]);\n\n Modulo::create([\n 'name' => 'reporterecibos',\n 'display_name' => 'Recibos de caja',\n 'nivel1' => 2,\n 'nivel2' => 2,\n 'nivel3' => 4\n ]);\n\n Modulo::create([\n 'name' => 'reporteresumencobro',\n 'display_name' => 'Resumen de cobro',\n 'nivel1' => 2,\n 'nivel2' => 2,\n 'nivel3' => 5\n ]);\n\n // Documentacion\n Modulo::create([\n 'name' => 'reporteverextractos',\n 'display_name' => 'Ver extractos',\n 'nivel1' => 2,\n 'nivel2' => 3,\n 'nivel3' => 1\n ]);\n\n // Contabilidad\n Modulo::create([\n 'display_name' => 'Reportes',\n 'nivel1' => 3,\n 'nivel2' => 1\n ]);\n\n // Reportes\n Modulo::create([\n 'name' => 'reportearp',\n 'display_name' => 'Gastos ARP',\n 'nivel1' => 3,\n 'nivel2' => 1,\n 'nivel3' => 1\n ]);\n\n // Inventario\n Modulo::create([\n 'display_name' => 'Reportes',\n 'nivel1' => 4,\n 'nivel2' => 1\n ]);\n\n // Reportes\n Modulo::create([\n 'name' => 'reporteanalisisinventario',\n 'display_name' => 'Análisis inventario',\n 'nivel1' => 4,\n 'nivel2' => 1,\n 'nivel3' => 1\n ]);\n\n Modulo::create([\n 'name' => 'reporteentradassalidas',\n 'display_name' => 'Entradas y salidas',\n 'nivel1' => 4,\n 'nivel2' => 1,\n 'nivel3' => 2\n ]);\n }", "public function selectAllMod():array{\r\n\r\n $sql=\"SELECT * FROM module\";\r\n return $this->dataBase->executeSelect($sql); \r\n }", "public function vistaTutoriasModel($tabla){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla\");\t\r\n\t\t$stmt->execute();\r\n\r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "public function crearTablas(){\r\n\t\t\t$this->crearTablaUsuario();\r\n\t\t\t$this->crearTablaDeporte();\r\n\t\t\t$this->crearTablaUsuarioDeporte();\r\n\t\t\t$this->crearTablaPassw();\r\n\t\t}", "private function tbl_permisos_seleccion() {\r\n\t\t\t$this->permisos_seleccion = $this->esquema->createTable('PERMISOS_SELECCION');\r\n\t\t\t$this->permisos_seleccion->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Permiso Seleccion'\r\n\t\t\t));\r\n\t\t\t$this->permisos_seleccion->addColumn('PERMISO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Permiso del Usuario [ID de la tabla PERMISOS]'\r\n\t\t\t));\r\n\t\t\t$this->permisos_seleccion->addColumn('MODULO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Permiso del Modulo [ID de la tabla PERMISOS_MODULOS]'\r\n\t\t\t));\r\n\t\t\t$this->permisos_seleccion->addColumn('ACCESO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Permiso del Permiso Acceso [ID de la tabla PERMISOS_ACCESO]'\r\n\t\t\t));\r\n\t\t\t$this->permisos_seleccion->setPrimaryKey(array('ID'));\r\n\t\t\t$this->permisos_seleccion->addForeignKeyConstraint($this->permisos, array('PERMISO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->permisos_seleccion->addForeignKeyConstraint($this->permisos_modulo, array('MODULO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->permisos_seleccion->addForeignKeyConstraint($this->permisos_acceso, array('ACCESO'), array('ID'), $this->opcForeign);\r\n\t\t}", "public function getAll(){\n \n // 1. Establece la conexion con la base de datos y trae todos los generos\n $query = $this->getDb()->prepare(\" SELECT * FROM genero\");\n $query-> execute(); \n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "private function tbl_permisos_acceso() {\r\n\t\t\t$this->permisos_acceso = $this->esquema->createTable('PERMISOS_ACCESO');\r\n\t\t\t$this->permisos_acceso->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Permiso Acceso'\r\n\t\t\t));\r\n\t\t\t$this->permisos_acceso->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombre de los permisos del Acceso'\r\n\t\t\t));\r\n\t\t\t$this->permisos_acceso->addColumn('LECTURA', 'boolean', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'default' => 0,\r\n\t\t\t\t'comment' => 'Permiso de Lectura'\r\n\t\t\t));\r\n\t\t\t$this->permisos_acceso->addColumn('ESCRITURA', 'boolean', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'default' => 0,\r\n\t\t\t\t'comment' => 'Permiso de Escritura'\r\n\t\t\t));\r\n\t\t\t$this->permisos_acceso->addColumn('ACTUALIZAR', 'boolean', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'default' => 0,\r\n\t\t\t\t'comment' => 'Permiso de Actualizar'\r\n\t\t\t));\r\n\t\t\t$this->permisos_acceso->addColumn('ELIMINAR', 'boolean', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'default' => 0,\r\n\t\t\t\t'comment' => 'Permiso de Eliminar'\r\n\t\t\t));\r\n\t\t\t$this->permisos_acceso->setPrimaryKey(array('ID'));\r\n\t\t}", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "function modalidades_juegos_admin_listar ( ) {\t\n\t$result_set_Modalidad_Juego = db_query( \"SELECT * FROM {eSM_Modalidad_Juego} ORDER BY id_Modalidad_Juego ASC\" );\n\t\t\n\t$output = '<div class=\"form_item\">Lista de modalidades dadas de alta en la base de datos.</div>';\n\t$header = array (t('Name'), t('Plataforma'), t('Game'), t('Min Jugadores'), t('Max Jugadores'), '');\n\t\n\t//Pondremos un listado de modalidads disponibles\n\twhile( $Modalidad_Juego = db_fetch_object( $result_set_Modalidad_Juego ) ) {\n\t\t$result_set_Plataforma = db_query( \"SELECT * from {eSM_Plataforma} WHERE id_Plataforma = %d \", $Modalidad_Juego->id_Plataforma );\n\t\t\n\t\t$Plataforma = db_fetch_object( $result_set_Plataforma );\n\t\t\n\t\t$row = array();\n\t\t$row[] = $Modalidad_Juego->Nombre;\t\t\t\n\t\t$row[] = $Plataforma->Nombre;\n\t\t$row[] = $Modalidad_Juego->Nombre_Juego;\n\t\t$row[] = $Modalidad_Juego->Minimo_Jugadores;\n\t\t$row[] = $Modalidad_Juego->Maximo_Jugadores;\n\t\t$row[] = l( t( 'Editar' ), 'admin/base_datos_externa/modalidades/'.$Modalidad_Juego->id_Modalidad_Juego.'/editar' );\n\t\t\n\t\t$rows[] = $row;\n\t}\n\t$output .= theme('table', $header, $rows);\n\t\n\t$output .= l(t('Agregar modalidad'), 'admin/base_datos_externa/modalidades/insertar');\n\treturn $output;\n}", "function relatorioDeCelulaPart1Dao(){\r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetocelula.php\");\r\n \r\n $objDao = Connection::getInstance(); \r\n $resultado = mysql_query(\"Select c.Codigo,m.Matricula,NomeCelula,c.Rua,c.Casa,c.Bairro,c.DiadaCelula,c.Status,m.Nome as Lider from celulas c join membros m on c.codLider = m.Matricula order by c.NomeCelula\") or die (\"Nao foi possivel realizar a busca 1\".mysql_error());\r\n \r\n $listaCelula = array();\r\n \r\n $i=0;\r\n// Select m.Nome from celulas c join celulamembro e on e.CodCelula = c.Codigo join membros m on e.CodMembro = m.Matricula where e.CodCelula = 7\r\n if($resultado){\r\n \r\n while ($registro = mysql_fetch_assoc($resultado)){ \r\n\t $celula = new objetocelula();\r\n $celula->setId($registro['Codigo']);\r\n $celula->setIdMembro($registro['Matricula']);\r\n $celula->setNome($registro['NomeCelula']); $celula->setRua($registro['Rua']);\r\n $celula->setCasa($registro['Casa']); $celula->setBairro($registro['Bairro']);\r\n $celula->setDia($registro['DiadaCelula']); $celula->setStatus($registro['Status']);\r\n $celula->setNomeMembro($registro['Lider']);\r\n \r\n\t $listaCelula[$i] = $celula;\r\n\t $i++;\r\n\t}\r\n }\r\n return $listaCelula; \r\n\tmysql_free_result($resultado);\r\n $objDao->freebanco(); \r\n \r\n }", "static public function getAll()\n {\n $db = DataBase::getInstance();\n $query = \"SELECT * FROM Modulo\";\n return $db->query($query);\n }", "private function tbl_permisos() {\r\n\t\t\t$this->permisos = $this->esquema->createTable('PERMISOS');\r\n\t\t\t$this->permisos->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Permiso'\r\n\t\t\t));\r\n\t\t\t$this->permisos->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombre del Permiso'\r\n\t\t\t));\r\n\t\t\t$this->permisos->addColumn('ESTADO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Estado del Permiso [ID de la tabla ESTADOS]'\r\n\t\t\t));\r\n\t\t\t$this->permisos->setPrimaryKey(array('ID'));\r\n\t\t\t$this->permisos->addForeignKeyConstraint($this->estados, array('ESTADO'), array('ID'), $this->opcForeign);\r\n\t\t}", "static public function mdlMostraPedidosTablas($valor){\n\n\t\tif($valor != null){\n\n\t\t\t$sql=\"SELECT\n\t\t\t\t\t\tt.id,\n\t\t\t\t\t\tt.codigo,\n\t\t\t\t\t\tc.codigo AS cod_cli,\n\t\t\t\t\t\tc.nombre,\n\t\t\t\t\t\tc.tipo_documento,\n\t\t\t\t\t\tc.documento,\n\t\t\t\t\t\tt.lista,\n\t\t\t\t\t\tt.vendedor,\n\t\t\t\t\t\tt.op_gravada,\n\t\t\t\t\t\tt.descuento_total,\n\t\t\t\t\t\tt.sub_total,\n\t\t\t\t\t\tt.igv,\n\t\t\t\t\t\tt.total,\n\t\t\t\t\t\tROUND(\n\t\t\t\t\t\tt.descuento_total / t.op_gravada * 100,\n\t\t\t\t\t\t2\n\t\t\t\t\t\t) AS dscto,\n\t\t\t\t\t\tt.condicion_venta,\n\t\t\t\t\t\tcv.descripcion,\n\t\t\t\t\t\tt.estado,\n\t\t\t\t\t\tt.usuario,\n\t\t\t\t\t\tt.agencia,\n\t\t\t\t\t\tu.nombre AS nom_usu,\n\t\t\t\t\t\tDATE(t.fecha) AS fecha,\n\t\t\t\t\t\tcv.dias,\n\t\t\t\t\t\tDATE_ADD(DATE(t.fecha), INTERVAL cv.dias DAY) AS fecha_ven\n\t\t\t\t\tFROM\n\t\t\t\t\t\ting_sal t\n\t\t\t\t\t\tLEFT JOIN clientesjf c\n\t\t\t\t\t\tON t.cliente = c.codigo\n\t\t\t\t\t\tLEFT JOIN condiciones_ventajf cv\n\t\t\t\t\t\tON t.condicion_venta = cv.id\n\t\t\t\t\t\tLEFT JOIN usuariosjf u\n\t\t\t\t\t\tON t.usuario = u.id\n\t\t\t\t\tWHERE t.estado = '$valor'\n\t\t\t\t\tORDER BY fecha DESC\";\n\n\t\t$stmt=Conexion::conectar()->prepare($sql);\n\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetchAll();\n\n\t\t}else{\n\n\t\t\t$sql=\"SELECT\n\t\t\t\t\tt.id,\n\t\t\t\t\tt.codigo,\n\t\t\t\t\tc.codigo AS cod_cli,\n\t\t\t\t\tc.nombre,\n\t\t\t\t\tc.tipo_documento,\n\t\t\t\t\tc.documento,\n\t\t\t\t\tt.lista,\n\t\t\t\t\tt.vendedor,\n\t\t\t\t\tt.op_gravada,\n\t\t\t\t\tt.descuento_total,\n\t\t\t\t\tt.sub_total,\n\t\t\t\t\tt.igv,\n\t\t\t\t\tt.total,\n\t\t\t\t\tROUND(\n\t\t\t\t\tt.descuento_total / t.op_gravada * 100,\n\t\t\t\t\t2\n\t\t\t\t\t) AS dscto,\n\t\t\t\t\tt.condicion_venta,\n\t\t\t\t\tcv.descripcion,\n\t\t\t\t\tt.estado,\n\t\t\t\t\tt.usuario,\n\t\t\t\t\tt.agencia,\n\t\t\t\t\tu.nombre AS nom_usu,\n\t\t\t\t\tDATE(t.fecha) AS fecha,\n\t\t\t\t\tcv.dias,\n\t\t\t\t\tDATE_ADD(DATE(t.fecha), INTERVAL cv.dias DAY) AS fecha_ven\n\t\t\t\tFROM\n\t\t\t\t\ting_sal t\n\t\t\t\t\tLEFT JOIN clientesjf c\n\t\t\t\t\tON t.cliente = c.codigo\n\t\t\t\t\tLEFT JOIN condiciones_ventajf cv\n\t\t\t\t\tON t.condicion_venta = cv.id\n\t\t\t\t\tLEFT JOIN usuariosjf u\n\t\t\t\t\tON t.usuario = u.id\n\t\t\t\tWHERE t.codigo = $valor\";\n\n\t\t$stmt=Conexion::conectar()->prepare($sql);\n\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetch();\n\n\t\t}\n\n\t\t$stmt=null;\n\n\t}", "public static function recuperartodo(){\r\n\t\t\r\n\t\t\t$consulta = \"SELECT * FROM usuaris;\";\r\n\t\t\t$datos = Database::get()->query($consulta);//ejecutar la consulta\r\n\t\t\t$usuaris = array();\r\n\t\t\r\n\t\t\twhile($usuari = $datos->fetch_object('UsuarioModel'))\r\n\t\t\t\t$usuaris[] = $usuari;\r\n\t\t\t\t$datos->free();\t\t\t//liberar memoria\r\n\t\t\t\treturn $usuaris;\r\n\t\t}", "public function listForTable (){\r\n //generamo la query final que precisamos\r\n $queryResult= \"SELECT id,dni,nombre,apellido,mail FROM usuario.usuario ORDER BY id;\";\r\n\r\n //Ejecutamos la query\r\n $this->stmt=pg_query($this->link,$queryResult) or die(\"Error en la consulta,function listForTable :\".preg_last_error());\r\n\r\n return $this->stmt;\r\n }", "function insertarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_ime';\n\t\t$this->transaccion='WF_tabla_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_tipo_proceso','id_tipo_proceso','int4');\n\t\t$this->setParametro('vista_id_tabla_maestro','vista_id_tabla_maestro','int4');\n\t\t$this->setParametro('bd_scripts_extras','bd_scripts_extras','text');\n\t\t$this->setParametro('vista_campo_maestro','vista_campo_maestro','varchar');\n\t\t$this->setParametro('vista_scripts_extras','vista_scripts_extras','text');\n\t\t$this->setParametro('bd_descripcion','bd_descripcion','text');\n\t\t$this->setParametro('vista_tipo','vista_tipo','varchar');\n\t\t$this->setParametro('menu_icono','menu_icono','varchar');\n\t\t$this->setParametro('menu_nombre','menu_nombre','varchar');\n\t\t$this->setParametro('vista_campo_ordenacion','vista_campo_ordenacion','varchar');\n\t\t$this->setParametro('vista_posicion','vista_posicion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('menu_codigo','menu_codigo','varchar');\n\t\t$this->setParametro('bd_nombre_tabla','bd_nombre_tabla','varchar');\n\t\t$this->setParametro('bd_codigo_tabla','bd_codigo_tabla','varchar');\n\t\t$this->setParametro('vista_dir_ordenacion','vista_dir_ordenacion','varchar');\n\t\t$this->setParametro('vista_estados_new','vista_estados_new','varchar');\n\t\t$this->setParametro('vista_estados_delete','vista_estados_delete','varchar');\t\t\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function vistaMaestroModel($tabla){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT id, noempleado, nombre, apellido, email, id_carrera FROM $tabla\");\t\r\n\t\t$stmt->execute();\r\n\r\n\t\t#fetchAll(): Obtiene todas las filas de un conjunto de resultados asociado al objeto PDOStatement. \r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "public static function modulos()\n {\n\t\t\treturn DB::table('claves')\n\t\t\t\t\t\t\t\t\t\t\t->join('modulos', 'modulos.id', '=', 'claves.modulo_id')\n\t\t\t\t\t\t\t\t\t\t\t->select('claves.*', 'modulos.modulo')\n ->orderBy('modulos.modulo', 'asc')\n ->orderBy('claves.nombre', 'asc')\n\t\t\t\t\t\t\t\t\t\t\t->paginate(10);\n\t\t}", "private function tbl_guiones_registro_nodos() {\r\n\t\t\t$this->guiones_registro_nodos = $this->esquema->createTable('GUIONES_REGISTRO_NODOS');\r\n\t\t\t$this->guiones_registro_nodos->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Nodo en el registro'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_nodos->addColumn('REGISTRO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del registro [ID de la tabla GUIONES_REGISTRO]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_nodos->addColumn('CANTIDAD', 'integer', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'default' => '0',\r\n\t\t\t\t'length' => 10,\r\n\t\t\t\t'comment' => 'Cantidad de Nodos ingresados'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_nodos->setPrimaryKey(array('ID'));\r\n\t\t\t$this->guiones_registro_nodos->addForeignKeyConstraint($this->guiones_registro, array('REGISTRO'), array('ID'), $this->opcForeign);\r\n\t\t}", "public function readTable()\n {\n $sql = \"SELECT Cubans.Id, FirstName, LastName, Gender, YearOfBirth, \n `Name`, IsInGroup FROM Cubans\n JOIN Genre ON Cubans.IdGenre=Genre.id\";\n $statement = $this->connect->prepare($sql);\n $statement->execute();\n return $statement->fetchAll();\n }", "function getTablaInformeAjuntament($desde,$hasta){\n \n // $this->ponerHorasTaller();\n // $this->ponerNumRegistro();\n \n \n $letra=getLetraCasal();\n $numeroRegistroCasalIngresos=getNumeroRegistroCasalIngresos();\n $numeroRegistroCasalDevoluciones=getNumeroRegistroCasalDevoluciones();\n \n $sql=\"SELECT id FROM casal_recibos WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY id ASC LIMIT 1\";\n if($this->db->query($sql)->num_rows()==0){\n $primero=0;\n }\n else {\n $primero=$this->db->query($sql)->row()->id;\n }\n \n $sql=\"SELECT id FROM casal_recibos WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY id DESC LIMIT 1\";\n if($this->db->query($sql)->num_rows()==0){\n $ultimo=0;\n }\n else {\n $ultimo=$this->db->query($sql)->row()->id;\n }\n \n $sql=\"SELECT r.id as id, r.fecha as fecha , r.id_socio as id_socio , r.importe as importe , r.recibo as recibo, s.nombre as nombre,s.apellidos as apellidos \n FROM casal_recibos r\n LEFT JOIN casal_socios_nuevo s ON s.num_socio=r.id_socio\n WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY r.id\";\n \n $sql=\"SELECT r.fecha as fecha,\"\n . \" lr.id_recibo as recibo,\"\n . \" lr.importe as importe, \"\n . \" t.nombre_corto as nombre,\"\n . \" t.horas_taller_T1 as horas_taller_T1,\"\n . \" t.horas_taller_T2 as horas_taller_T2,\"\n . \" t.horas_taller_T3 as horas_taller_T3,\"\n . \" s.dni as dni,\"\n . \" lr.tarjeta as tarjeta,\"\n . \" lr.periodos as periodos,\"\n . \" lr.id_taller as id_taller,\"\n . \" lr.id_socio as id_socio,\"\n . \" lr.id as id,\"\n . \" lr.num_registro as num_registro,\"\n . \" lr.num_registro_posicion as num_registro_posicion,\"\n . \" s.num_socio as num_socio\"\n . \" FROM casal_lineas_recibos lr\"\n . \" LEFT JOIN casal_recibos r ON lr.id_recibo=r.id\"\n . \" LEFT JOIN casal_talleres t ON t.id=lr.id_taller\"\n . \" LEFT JOIN casal_socios_nuevo s ON s.num_socio=lr.id_socio\"\n . \" WHERE lr.importe>0 AND lr.id_recibo>='$primero' AND lr.id_recibo<='$ultimo' ORDER BY lr.num_registro_posicion\";\n \n //log_message('INFO',$sql);\n \n $recibos=array(); \n if($this->db->query($sql)->num_rows()>0) \n $recibos=$this->db->query($sql)->result();\n \n \n $cabeceraTabla='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\">Data</th>\n <th class=\"col-sm-1 text-center\">Num Registre</th>\n <th class=\"col-sm-1 text-center\">DNI Usuari</th>\n <th class=\"col-sm-1 text-center\">Nom Actividad</th>\n <th class=\"col-sm-1 text-center\">Num Registre Ingrés</th>\n <th class=\"col-sm-1 text-center\" >Preu/hora</th>\n <th class=\"col-sm-1 text-center\">Import Base</th>\n <th class=\"col-sm-1 text-center\">% IVA (exempt)</th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\">TIPOLOGIA INGRES</th>\n \n </tr>';\n \n \n \n $tabla=$cabeceraTabla;\n \n $importeTotal=0;\n foreach ($recibos as $k=>$v) {\n $fecha=$v->fecha;\n $fecha=substr($fecha,8,2).'/'.substr($fecha,5,2).'/'.substr($fecha,0,4);\n $tabla.='<tr>';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $fecha;\n $tabla.='</td>';\n \n $num=strval($v->num_registro_posicion);\n while(strlen($num)<5) {\n $num='0'.$num;\n }\n $tabla.='<td class=\"text-center\">';\n $tabla.= $v->num_registro.$num;\n $tabla.='</td>';\n \n \n $dni=$v->dni;\n if($this->socios_model->validar_dni($dni)){\n $tabla.='<td class=\"text-center\">';\n $tabla.= strtoupper($dni);\n $tabla.='</td>';\n }\n else{\n $tabla.='<td class=\"text-center\" style=\"color:red\">';\n $tabla.= strtoupper($dni).\"(\".$v->num_socio.\")\";\n $tabla.='</td>';\n }\n \n $nombre=$v->nombre;\n $tabla.='<td class=\"text-center\">';\n $tabla.= $nombre;\n $tabla.='</td>';\n \n $recibo=$letra.' '.$v->recibo; \n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n \n if($v->periodos==4) $horas=floatval($v->horas_taller_T1);\n if($v->periodos==2) $horas=floatval($v->horas_taller_T2);\n if($v->periodos==1) $horas=floatval($v->horas_taller_T3); \n //log_message('INFO', '===================='.$v->nombre.' '.$horas);\n \n if($horas>0)\n $preu_hora=number_format($v->importe/$horas*100,2); \n else \n $preu_hora=0;\n\n $tabla.='<td class=\"text-center\">';\n $tabla.= $preu_hora;\n $tabla.='</td>';\n \n \n \n $importe=$v->importe;\n $tabla.='<td class=\"text-center\" >';\n $tabla.= number_format($importe,2);\n $tabla.='</td>';\n \n $importe=$v->importe;\n $tabla.='<td class=\"text-center\">';\n $tabla.= '0.00';\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" style=\"border-right:2px solid black;border-left:2px solid black;\">';\n $tabla.= number_format($importe,2);\n $tabla.='</td>';\n $importeTotal+=number_format($importe,2);\n \n $tarjeta=number_format($v->tarjeta,2);\n if($tarjeta==0) $pago=\"Efectiu\"; else $pago=\"TPV fisic\";\n $tabla.='<td class=\"text-center\">';\n $tabla.= $pago;\n $tabla.='</td>';\n \n $tabla.='</tr>';\n }\n \n \n $pieTabla='</tr></thead><thead><tr>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:0px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\">T O T A L S</th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:2px solid black;border-right:2px solid black;border-left:2px solid black;\">';\n $pieTabla.=number_format($importeTotal,2);\n $pieTabla.='</th>';\n $pieTabla.='</tr></thead></tody></table>';\n \n $tabla.=$pieTabla;\n \n \n $cabeceraTablaDevoluciones='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\">Data</th>\n <th class=\"col-sm-1 text-center\">Num Registre</th>\n <th class=\"col-sm-1 text-center\">DNI Usuari</th>\n <th class=\"col-sm-1 text-center\">Nom Actividad</th>\n <th class=\"col-sm-1 text-center\">Num Registre Devolució</th>\n <th class=\"col-sm-1 text-rigcenterht\" >Preu/hora</th>\n <th class=\"col-sm-1 text-center\">Import Base</th>\n <th class=\"col-sm-1 text-center\">% IVA (exempt)</th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\">TIPOLOGIA DEVOLUCIÓ</th>\n \n </tr>';\n \n $tituloCasal=strtoupper(getTituloCasal());\n $salida='<h4>INFORME DETALLAT INGRESSOS</h4>'\n . ''\n . 'EQUIPAMENT MUNICIPA: <STRONG>'.$tituloCasal.'</STRONG>'\n . '<BR>'\n . 'ADJUDICATARI: <STRONG>'.'SERVEIS A LES PERSONES INCOOP, SCCL</STRONG>'\n . '<BR>'\n . 'NIF ADJUDICATARI: <STRONG>F60137411</STRONG>'\n . '<BR>'\n . 'NÚM CONTRACTE: <STRONG>18001022</STRONG>'\n . '<BR>'\n . 'Periode: <STRONG>'.substr($desde,8,2).'/'.substr($desde,5,2).'/'.substr($desde,0,4).' - '.substr($hasta,8,2).'/'.substr($hasta,5,2).'/'.substr($hasta,0,4).'</STRONG>'\n . '<BR>'\n . '<BR>'\n \n .$tabla.'<br>';\n \n $sql=\"SELECT r.fecha as fecha,\"\n . \" lr.id_recibo as recibo,\"\n . \" lr.importe as importe, \"\n . \" t.nombre_corto as nombre,\"\n . \" t.horas_taller_T1 as horas_taller_T1,\"\n . \" t.horas_taller_T2 as horas_taller_T2,\"\n . \" t.horas_taller_T3 as horas_taller_T3,\"\n . \" s.dni as dni,\"\n . \" lr.tarjeta as tarjeta,\"\n . \" lr.periodos as periodos,\"\n . \" lr.id_taller as id_taller,\"\n . \" lr.id_socio as id_socio,\"\n . \" lr.id as id,\"\n . \" lr.num_registro as num_registro,\"\n . \" lr.num_registro_posicion as num_registro_posicion,\"\n . \" s.num_socio\"\n . \" FROM casal_lineas_recibos lr\"\n . \" LEFT JOIN casal_recibos r ON lr.id_recibo=r.id\"\n . \" LEFT JOIN casal_talleres t ON t.id=lr.id_taller\"\n . \" LEFT JOIN casal_socios_nuevo s ON s.num_socio=lr.id_socio\"\n . \" WHERE lr.importe<0 AND lr.id_recibo>='$primero' AND lr.id_recibo<='$ultimo' ORDER BY lr.num_registro_posicion\";\n \n \n \n $recibos=array(); \n if($this->db->query($sql)->num_rows()>0) \n $recibos=$this->db->query($sql)->result();\n \n $tabla=$cabeceraTablaDevoluciones;\n $importeTotalDevoluciones=0;\n foreach ($recibos as $k=>$v) {\n $fecha=$v->fecha;\n $fecha=substr($fecha,8,2).'/'.substr($fecha,5,2).'/'.substr($fecha,0,4);\n $tabla.='<tr>';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $fecha;\n $tabla.='</td>';\n \n $num=strval($v->num_registro_posicion);\n while(strlen($num)<5) {\n $num='0'.$num;\n } \n $tabla.='<td class=\"text-center\">';\n $tabla.= $v->num_registro.$num;;\n $tabla.='</td>';\n \n $dni=$v->dni;\n if($this->socios_model->validar_dni($dni)){\n $tabla.='<td class=\"text-center\">';\n $tabla.= strtoupper($dni);\n $tabla.='</td>';\n }\n else{\n $tabla.='<td class=\"text-center\" style=\"color:red\">';\n $tabla.= strtoupper($dni).\"(\".$v->num_socio.\")\";\n $tabla.='</td>';\n }\n \n $nombre=$v->nombre;\n $tabla.='<td class=\"text-center\">';\n $tabla.= $nombre;\n $tabla.='</td>';\n \n $recibo=$letra.' '.$v->recibo; \n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n \n \n \n /*\n $id_taller=$v->id_taller;\n $periodos=$v->periodos;\n $id_socio=$v->id_socio;\n $importe=-$v->importe;\n $id=$v->id;\n $sql=\"SELECT * FROM casal_lineas_recibos WHERE id<'$id' AND id_taller='$id_taller' AND id_socio='$id_socio' AND periodos='$periodos' AND importe='$importe' ORDER BY id DESC LIMIT 1\";\n //log_message('INFO',$sql);\n if($this->db->query($sql)->num_rows()==1) {\n $recibo=$letra.' '.$this->db->query($sql)->row()->id_recibo;\n }\n else $recibo='';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n */\n \n \n if($v->periodos==4) $horas=$v->horas_taller_T1;\n if($v->periodos==2) $horas=$v->horas_taller_T2;\n if($v->periodos==1) $horas=$v->horas_taller_T3; \n \n //log_message('INFO', '++=================='.$v->nombre.' '.$horas);\n \n $preu_hora=number_format($v->importe/$horas*100,2); \n $tabla.='<td class=\"text-center\">';\n $tabla.= -$preu_hora;\n $tabla.='</td>';\n \n \n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" >';\n $tabla.= -$importe;\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\">';\n $tabla.= '0.00';\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" style=\"border-right:2px solid black;border-left:2px solid black;\">';\n $tabla.= -$importe;\n $tabla.='</td>';\n $importeTotalDevoluciones+=$importe;\n \n $tarjeta=number_format($v->tarjeta,2);\n if($tarjeta==0) $pago=\"Efectiu\"; else $pago=\"TPV fisic\";\n $tabla.='<td class=\"text-center\">';\n $tabla.= $pago;\n $tabla.='</td>';\n \n $tabla.='</tr>';\n }\n \n \n \n \n $pieTablaDevoluciones='</tr></thead><thead><tr>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:0px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\">T O T A L S</th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:2px solid black;border-right:2px solid black;border-left:2px solid black;\">';\n $pieTablaDevoluciones.=-number_format($importeTotalDevoluciones,2);\n $pieTablaDevoluciones.='</th>';\n $pieTablaDevoluciones.='</tr></thead></tody></table>';\n \n \n \n \n \n $salida.='<h4>INFORME DETALLAT DEVOLUCIONS</h4>'\n . ''\n . 'EQUIPAMENT MUNICIPA: <STRONG>'.$tituloCasal.'</STRONG>'\n . '<BR>'\n . 'ADJUDICATARI: <STRONG>'.'SERVEIS A LES PERSONES INCOOP, SCCL</STRONG>'\n . '<BR>'\n . 'NIF ADJUDICATARI: <STRONG>F60137411</STRONG>'\n . '<BR>'\n . 'NÚM CONTRACTE: <STRONG>18001022</STRONG>'\n . '<BR>'\n . 'Periode: <STRONG>'.substr($desde,8,2).'/'.substr($desde,5,2).'/'.substr($desde,0,4).' - '.substr($hasta,8,2).'/'.substr($hasta,5,2).'/'.substr($hasta,0,4).'</STRONG>'\n . '<BR>'\n . '<BR>';\n \n \n \n \n \n \n $salida.=$tabla;\n $salida.=$pieTablaDevoluciones;\n $salida.='<br><h4>RESUM TOTAL</h4>';\n \n $importeResumen=number_format($importeTotal,2)+number_format($importeTotalDevoluciones,2);\n $resumenTotal='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n \n </tr>\n <tr >\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:2px solid #DDDDDD;border-top:2px solid #DDDDDD;border-left:1px solid #DDDDDD;\">T O T A L S</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:2px solid black;border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">'.number_format($importeResumen,2).'</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n \n </tr>\n\n\n\n </thead></tbody></table>';\n \n $salida.=$resumenTotal;\n \n \n \n \n return $salida;\n \n }", "public function incluir(){\n header(\"Content-type: text/html;charset=utf-8\");\n $sql = \"SHOW FULL FIELDS FROM \" . $this->table;\n $execute = conexao::toConnect()->executeS($sql);\n $atributos = \"\";\n $values = \"\";\n $id_registro = \"\";\n $contador = count($execute) - 1;\n foreach ($execute as $key => $attr){\n if ($attr->Key != 'PRI') {\n $atributos_field = $attr->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($contador != $key) {\n $atributos .= $attr->Field . ',';\n $values .= \"'\".$this->$get() .\"',\";\n } else {\n $atributos .= $attr->Field;\n $values .= \"'\".$this->$get() .\"'\";\n }\n }else{\n $id_registro = $attr->Field;\n }\n }\n $insert = \"INSERT INTO \".$this->table.\" (\".$atributos.\") VALUES($values)\";\n $execute_into = conexao::toConnect()->executeQuery($insert);\n if (count($execute_into) > 0) {\n $sql = \"SELECT \".$id_registro.\" FROM \".$this->table.\" ORDER BY \".$id_registro.\" DESC LIMIT 1\";\n $id_r = conexao::toConnect()->executeS($sql);\n return $id_r[0]->$id_registro;\n }else{\n return false;\n }\n\n }", "public static function TraerTodoLosAlumnos()\n {\n $objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso(); \n $consulta =$objetoAccesoDato->RetornarConsulta(\"select * from alumno\");\n $consulta->execute();\t\t\t\n return $consulta->fetchAll(PDO::FETCH_CLASS, \"alumno\");\t\t\n }", "public function findAll() {\r\n$sql = \"SELECT * FROM $this->tabela\";\r\n$stm = DB::prepare($sql);\r\n$stm->execute();\r\nreturn $stm->fetchAll();\r\n}", "function listaRuta()\r\n\t{\t\r\n\t\t$query = \"SELECT * FROM \" . self::TABLA . \";\";\r\n\t\treturn parent::listaRegistros( $query );\r\n\t}", "public function imprimirTabla()\r\n {\r\n try\r\n {\r\n $consulta = \"SELECT * FROM xxnombretabla\";//el nombre de la tabla\r\n $objeto = $this->PDO->prepare($consulata);\r\n $objeto->execute();\r\n $tabla = $objeto->fetchAll(PDO::FETCH_OBJ);\r\n\r\n foreach ($tabla as $fila )\r\n {\r\n $xxnombreclase = new xxnombreclase();//se instancia la clase que se esta haciendo\r\n $xxnombreclase->__SET('xid:clase', $fila->xxcampoTabla);//se llama el campo de la tabla que corresponda con el atributo de la clase\r\n $xxnombreclase->__SET('xatributo:clase',$fila->xxcampoTabla);//se repite segun los campos que hayan en la tabla\r\n\r\n $result[] = $xxnombreclase;//se mete en el arreglo result[] la varible con la clase\r\n }\r\n\r\n } catch (Exception $e) {\r\n die($e->getMessage());\r\n }\r\n\r\n return $result;//se devuelve el arreglo result\r\n }", "public function obtenerTabla() {\n $builder = $this->db->table($this->table);\n $data = $builder->get()->getResult();\n $tabla = '';\n foreach($data as $item):\n $accion = '<div class=\\\"custom-control custom-radio\\\">';\n $accion .= '<input type=\\\"radio\\\" id=\\\"row-'.$item->tipoTelefonoId.'\\\" name=\\\"id\\\" class=\\\"custom-control-input radio-edit\\\" value=\\\"'.$item->tipoTelefonoId.'\\\">';\n $accion .= '<label class=\\\"custom-control-label\\\" for=\\\"row-'.$item->tipoTelefonoId.'\\\"> </label> </div>';\n $tabla .= '{\n \"concepto\" : \"'.$item->tipoTelefonoTipo.'\",\n \"acciones\" : \"'.$accion.'\"\n },';\n endforeach;\n $tabla = substr($tabla, 0, strlen($tabla) - 1);\n $result = '{\"data\" : ['. $tabla .']}';\n return $this->response->setStatusCode(200)->setBody($result);\n }", "public function vistaAlumnoModel($tabla){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT id, matricula, nombre, apellido, email, id_carrera, id_grupo FROM $tabla\");\t\r\n\t\t$stmt->execute();\r\n\r\n\t\t#fetchAll(): Obtiene todas las filas de un conjunto de resultados asociado al objeto PDOStatement. \r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "public function modificar($datosCampos) {\n $guardar = new SqlQuery(); //instancio objeto de la clase sqlQuery\n (string) $tabla = get_class($this); //obtengo el nombre de la clase para poder realizar la consulta\n $id = $datosCampos[\"id\"];\n switch ($datosCampos[\"acceso\"]) //cambio los dato que vienen de la vista\n {\n case \"total\":\n $datosCampos[\"acceso\"] = 1;\n break;\n case \"restringido\":\n $datosCampos[\"acceso\"] = 2;\n break;\n default:\n $datosCampos[\"acceso\"] = 0;\n break;\n }\n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción \n $arrayCabecera = $guardar->meta($tabla);//armo el array con la cabecera de los datos\n $sentencia = $guardar->armarSentenciaModificar($arrayCabecera, $tabla);//genero sentencia\n $array = $guardar->armarArray($arrayCabecera, $datosCampos);//Armo el array con los datos que vienen de la vista y la cabecera de la BD\n array_shift($array);//elimino primer elemento del array que es el id\n array_push($array, $id);//agrego el id al final del array para realizar la consulta\n $this->refControladorPersistencia->ejecutarSentencia($sentencia, $array);//genero la consulta a la BD \n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit \n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si hay algún error hace rollback\n }\n $respuesta = $this->getUsuario($id);\n return $respuesta;\n }", "function modificarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_ime';\n\t\t$this->transaccion='WF_TABLAINS_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t$this->setParametro('tipo_proceso','tipo_proceso','varchar');\n\t\t$bd_nombre_tabla = $_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['bd_nombre_tabla'];\n\t\t$this->setParametro('id_'.$bd_nombre_tabla,'id_'.$bd_nombre_tabla,'integer');\n\t\t//Define los parametros para la funcion\t\t\n\t\tforeach ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['columnas'] as $value) {\n\t\t\t$this->setParametro($value['bd_nombre_columna'],$value['bd_nombre_columna'],$value['bd_tipo_columna']);\t\t\t\n\t\t}\t\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function tabla()\n {\n\n \treturn Datatables::eloquent(Encargos::query())->make(true);\n }", "public function mostrarTablasMaestras(){\n\t\tif($_GET[\"bd\"] == \"vtama_tipo_producto\"){\n\t\t\trequire_once \"../core.php\";\n\t\t\trequire_once \"../funciones.php\";\n\t\t\trequire_once \"../controllers/tipoProducto.controlador.php\";\n\t\t\trequire_once \"../models/tipoProducto.modelo.php\";\n\t\t\t$item = null;\n\t\t\t$valor = null;\n\t\t\t$entrada = \"tablaMaestra\";\n\t\t\t$tipoProductos = ControladorTipoProducto::ctrMostrarTipoProducto($item,$valor,$entrada);\n\t\t\tif(count($tipoProductos) > 0){\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": [';\n\t\t\t\t\t\tfor ($i=0; $i < count($tipoProductos); $i++) {\n\t\t\t\t\t\t\t$botones = \"<div class='btn-group'><button class='btn btn-sm btn-warning btnEditarTipoProducto' codTipoProducto='\".$tipoProductos[$i][\"cod_tipo_producto\"].\"' data-toggle='modal' data-target='#modalTipoProducto' title='Editar'><i class='fa fa-pencil'></i></button><button class='btn btn-sm btn-danger btnEliminarTipoProducto' codTipoProducto='\".$tipoProductos[$i][\"cod_tipo_producto\"].\"' title='Eliminar'><i class='fa fa-trash'></i></button></div>\";\n\t\t\t\t\t\t\t$datosJson .= '[ \n\t\t\t\t\t\t\t\t\"'.($i+1).'\",\n\t\t\t\t\t\t\t\t\"'.escapeComillasJson($tipoProductos[$i][\"dsc_tipo_producto\"]).'\",\n\t\t\t\t\t\t\t\t\"'.$botones.'\"\n\t\t\t\t\t\t\t],';\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t\t$datosJson .= ']\n\t\t\t\t}';\n\t\t\t}else{\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": []\n\t\t\t\t}';\n\t\t\t}\n\t\t}else if($_GET[\"bd\"] == \"vtama_tipo_documento\"){\n\t\t\trequire_once \"../core.php\";\n\t\t\trequire_once \"../funciones.php\";\n\t\t\trequire_once \"../controllers/tipoDocumento.controlador.php\";\n\t\t\trequire_once \"../models/tipoDocumento.modelo.php\";\n\t\t\t$item = null;\n\t\t\t$valor = null;\n\t\t\t$tipoDocumentos = ControladorTipoDocumento::ctrMostrarTipoDocumento($item,$valor);\n\t\t\tif(count($tipoDocumentos) > 0){\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": [';\n\t\t\t\t\t\tfor ($i=0; $i < count($tipoDocumentos); $i++) {\n\t\t\t\t\t\t\t$botones = \"<div class='btn-group'><button class='btn btn-sm btn-warning btnEditarTipoDocumento' codTipoDocumento='\".$tipoDocumentos[$i][\"cod_tipo_documento\"].\"' data-toggle='modal' data-target='#modalTipoDocumento' title='Editar'><i class='fa fa-pencil'></i></button><button class='btn btn-sm btn-danger btnEliminarTipoDocumento' codTipoDocumento='\".$tipoDocumentos[$i][\"cod_tipo_documento\"].\"' title='Eliminar'><i class='fa fa-trash'></i></button></div>\";\n\t\t\t\t\t\t\t$datosJson .= '[ \n\t\t\t\t\t\t\t\t\"'.($i+1).'\",\n\t\t\t\t\t\t\t\t\"'.escapeComillasJson($tipoDocumentos[$i][\"dsc_tipo_documento\"]).'\",\n\t\t\t\t\t\t\t\t\"'.$botones.'\"\n\t\t\t\t\t\t\t],';\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t\t$datosJson .= ']\n\t\t\t\t}';\n\t\t\t}else{\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": []\n\t\t\t\t}';\n\t\t\t}\n\t\t}else if($_GET[\"bd\"] == \"vtama_categoria_cliente\"){\n\t\t\trequire_once \"../core.php\";\n\t\t\trequire_once \"../funciones.php\";\n\t\t\trequire_once \"../controllers/categoriaCliente.controlador.php\";\n\t\t\trequire_once \"../models/categoriaCliente.modelo.php\";\n\t\t\t$item = null;\n\t\t\t$valor = null;\n\t\t\t$categoriaClientes = ControladorCategoriaCliente::ctrMostrarCategoriaClientes($item,$valor);\n\t\t\tif(count($categoriaClientes) > 0){\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": [';\n\t\t\t\t\t\tfor ($i=0; $i < count($categoriaClientes); $i++) {\n\t\t\t\t\t\t\t$botones = \"<div class='btn-group'><button class='btn btn-sm btn-warning btnEditarCategoriaCliente' codCategoriaCliente='\".$categoriaClientes[$i][\"cod_categoria_cliente\"].\"' data-toggle='modal' data-target='#modalCategoriaCliente' title='Editar'><i class='fa fa-pencil'></i></button><button class='btn btn-sm btn-danger btnEliminarCategoriaCliente' codCategoriaCliente='\".$categoriaClientes[$i][\"cod_categoria_cliente\"].\"' title='Eliminar'><i class='fa fa-trash'></i></button></div>\";\n\t\t\t\t\t\t\t$datosJson .= '[ \n\t\t\t\t\t\t\t\t\"'.($i+1).'\",\n\t\t\t\t\t\t\t\t\"'.escapeComillasJson($categoriaClientes[$i][\"dsc_categoria_cliente\"]).'\",\n\t\t\t\t\t\t\t\t\"'.$botones.'\"\n\t\t\t\t\t\t\t],';\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t\t$datosJson .= ']\n\t\t\t\t}';\n\t\t\t}else{\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": []\n\t\t\t\t}';\n\t\t\t}\n\t\t}else if($_GET[\"bd\"] == \"vtama_pais\"){\n\t\t\trequire_once \"../core.php\";\n\t\t\trequire_once \"../funciones.php\";\n\t\t\trequire_once \"../controllers/pais.controlador.php\";\n\t\t\trequire_once \"../models/pais.modelo.php\";\n\t\t\t$item = null;\n\t\t\t$valor = null;\n\t\t\t$paises = ControladorPais::ctrMostrarPaises($item,$valor);\n\t\t\tif(count($paises) > 0){\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": [';\n\t\t\t\t\t\tfor ($i=0; $i < count($paises); $i++) {\n\t\t\t\t\t\t\t$botones = \"<div class='btn-group'><button class='btn btn-sm btn-warning btnEditarPais' codPais='\".$paises[$i][\"cod_pais\"].\"' data-toggle='modal' data-target='#modalPais' title='Editar'><i class='fa fa-pencil'></i></button><button class='btn btn-sm btn-danger btnEliminarPais' codPais='\".$paises[$i][\"cod_pais\"].\"' title='Eliminar'><i class='fa fa-trash'></i></button></div>\";\n\t\t\t\t\t\t\t$datosJson .= '[\n\t\t\t\t\t\t\t\t\"'.($i+1).'\",\n\t\t\t\t\t\t\t\t\"'.escapeComillasJson($paises[$i][\"dsc_pais\"]).'\",\n\t\t\t\t\t\t\t\t\"'.$botones.'\"\n\t\t\t\t\t\t\t],';\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t\t$datosJson .= ']\n\t\t\t\t}';\n\t\t\t}else{\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": []\n\t\t\t\t}';\n\t\t\t}\n\t\t}else if($_GET[\"bd\"] == \"vtama_estado_cotizacion\"){\n\t\t\trequire_once \"../core.php\";\n\t\t\trequire_once \"../funciones.php\";\n\t\t\trequire_once \"../controllers/estadoCotizacion.controlador.php\";\n\t\t\trequire_once \"../models/estadoCotizacion.modelo.php\";\n\t\t\t$item = $valor = $entrada = null;\n\t\t\t$estadoCotizacion = ControladorEstadoCotizacion::ctrMostrarEstadoCotizacion($item,$valor,$entrada);\n\t\t\tif(count($estadoCotizacion) > 0){\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": [';\n\t\t\t\t\t\tfor ($i=0; $i < count($estadoCotizacion); $i++) {\n\t\t\t\t\t\t\t$botones = \"<div class='btn-group'><button class='btn btn-sm btn-warning btnEditarEstadoCotizacion' codEstadoCotizacion='\".$estadoCotizacion[$i][\"cod_estado_cotizacion\"].\"' data-toggle='modal' data-target='#modalEstadoCotizacion' title='Editar'><i class='fa fa-pencil'></i></button></div>\";\n\t\t\t\t\t\t\t$datosJson .= '[\n\t\t\t\t\t\t\t\t\"'.($i+1).'\",\n\t\t\t\t\t\t\t\t\"'.escapeComillasJson($estadoCotizacion[$i][\"dsc_estado_cotizacion\"]).'\",\n\t\t\t\t\t\t\t\t\"'.$botones.'\"\n\t\t\t\t\t\t\t],';\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t\t$datosJson .= '] \n\t\t\t\t}';\n\t\t\t}else{\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": []\n\t\t\t\t}';\n\t\t\t}\n\t\t}else if($_GET[\"bd\"] == \"vtama_perfil\"){\n\t\t\trequire_once \"../core.php\";\n\t\t\trequire_once \"../funciones.php\";\n\t\t\trequire_once \"../controllers/perfil.controlador.php\";\n\t\t\trequire_once \"../models/perfil.modelo.php\";\n\t\t\t$item = null;\n\t\t\t$valor = null;\n\t\t\t$perfil = ControladorPerfil::ctrMostrarPerfil($item,$valor);\n\t\t\tif(count($perfil) > 0){\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": [';\n\t\t\t\t\t\tfor ($i=0; $i < count($perfil); $i++) {\n\t\t\t\t\t\t\t$botones = \"<div class='btn-group'><button class='btn btn-sm btn-warning btnEditarPerfil' codPerfil='\".$perfil[$i][\"cod_perfil\"].\"' data-toggle='modal' data-target='#modalPerfil' title='Editar'><i class='fa fa-pencil'></i></button></div>\";\n\t\t\t\t\t\t\t$datosJson .= '[\n\t\t\t\t\t\t\t\t\"'.($i+1).'\",\n\t\t\t\t\t\t\t\t\"'.escapeComillasJson($perfil[$i][\"dsc_perfil\"]).'\",\n\t\t\t\t\t\t\t\t\"'.$botones.'\"\n\t\t\t\t\t\t\t],';\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t\t$datosJson .= ']\n\t\t\t\t}';\n\t\t\t}else{\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": []\n\t\t\t\t}';\n\t\t\t}\n\t\t}else if($_GET[\"bd\"] == \"vtama_moneda\"){\n\t\t\trequire_once \"../core.php\";\n\t\t\trequire_once \"../funciones.php\";\n\t\t\trequire_once \"../controllers/moneda.controlador.php\";\n\t\t\trequire_once \"../models/moneda.modelo.php\";\n\t\t\t$item = null;\n\t\t\t$valor = null;\n\t\t\t$moneda = ControladorMoneda::ctrMostrarMoneda($item,$valor);\n\t\t\tif(count($moneda) > 0){\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": [';\n\t\t\t\t\t\tfor ($i=0; $i < count($moneda); $i++) {\n\t\t\t\t\t\t\t$botones = \"<div class='btn-group'><button class='btn btn-sm btn-warning btnEditarMoneda' codMoneda='\".$moneda[$i][\"cod_moneda\"].\"' data-toggle='modal' data-target='#modalMoneda' title='Editar'><i class='fa fa-pencil'></i></button><button class='btn btn-sm btn-danger btnEliminarMoneda' codMoneda='\".$moneda[$i][\"cod_moneda\"].\"' title='Eliminar'><i class='fa fa-trash'></i></button></div>\";\n\t\t\t\t\t\t\t$datosJson .= '[\n\t\t\t\t\t\t\t\t\"'.($i+1).'\",\n\t\t\t\t\t\t\t\t\"'.escapeComillasJson($moneda[$i][\"dsc_moneda\"]).'\",\n\t\t\t\t\t\t\t\t\"'.$botones.'\"\n\t\t\t\t\t\t\t],';\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t\t$datosJson .= ']\n\t\t\t\t}';\n\t\t\t}else{\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": []\n\t\t\t\t}';\n\t\t\t}\n\t\t}else if($_GET[\"bd\"] == \"vtama_forma_pago\"){\n\t\t\trequire_once \"../core.php\";\n\t\t\trequire_once \"../funciones.php\";\n\t\t\trequire_once \"../controllers/formaPago.controlador.php\";\n\t\t\trequire_once \"../models/formaPago.modelo.php\";\n\t\t\t$item = null;\n\t\t\t$valor = null;\n\t\t\t$formaPago = ControladorFormaPago::ctrMostrarFormaPago($item,$valor);\n\t\t\tif(count($formaPago) > 0){\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": [';\n\t\t\t\t\t\tfor ($i=0; $i < count($formaPago); $i++) {\n\t\t\t\t\t\t\t$botones = \"<div class='btn-group'><button class='btn btn-sm btn-warning btnEditarFormaPago' codFormaPago='\".$formaPago[$i][\"cod_forma_pago\"].\"' data-toggle='modal' data-target='#modalFormaPago' title='Editar'><i class='fa fa-pencil'></i></button><button class='btn btn-sm btn-danger btnEliminarFormaPago' codFormaPago='\".$formaPago[$i][\"cod_forma_pago\"].\"' title='Eliminar'><i class='fa fa-trash'></i></button></div>\";\n\t\t\t\t\t\t\t$datosJson .= '[\n\t\t\t\t\t\t\t\t\"'.($i+1).'\",\n\t\t\t\t\t\t\t\t\"'.escapeComillasJson($formaPago[$i][\"dsc_forma_pago\"]).'\",\n\t\t\t\t\t\t\t\t\"'.$botones.'\"\n\t\t\t\t\t\t\t],';\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t\t$datosJson .= ']\n\t\t\t\t}';\n\t\t\t}else{\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": []\n\t\t\t\t}';\n\t\t\t}\n\t\t}else if($_GET[\"bd\"] == \"vtama_canal_contacto\"){\n\t\t\trequire_once \"../core.php\";\n\t\t\trequire_once \"../funciones.php\";\n\t\t\trequire_once \"../controllers/canalContacto.controlador.php\";\n\t\t\trequire_once \"../models/canalContacto.modelo.php\";\n\t\t\t$item = null;\n\t\t\t$valor = null;\n\t\t\t$canalContacto = ControladorCanalContacto::ctrMostrarCanalContacto($item,$valor);\n\t\t\tif(count($canalContacto) > 0){\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": [';\n\t\t\t\t\t\tfor ($i=0; $i < count($canalContacto); $i++) {\n\t\t\t\t\t\t\t$botones = \"<div class='btn-group'><button class='btn btn-sm btn-warning btnEditarCanalContacto' codCanalContacto='\".$canalContacto[$i][\"cod_canal_contacto\"].\"' data-toggle='modal' data-target='#modalCanalContacto' title='Editar'><i class='fa fa-pencil'></i></button><button class='btn btn-sm btn-danger btnEliminarCanalContacto' codCanalContacto='\".$canalContacto[$i][\"cod_canal_contacto\"].\"' title='Eliminar'><i class='fa fa-trash'></i></button></div></div>\";\n\t\t\t\t\t\t\t$datosJson .= '[\n\t\t\t\t\t\t\t\t\"'.($i+1).'\",\n\t\t\t\t\t\t\t\t\"'.escapeComillasJson($canalContacto[$i][\"dsc_canal_contacto\"]).'\",\n\t\t\t\t\t\t\t\t\"'.$botones.'\"\n\t\t\t\t\t\t\t],';\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t\t$datosJson .= ']\n\t\t\t\t}';\n\t\t\t}else{\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": []\n\t\t\t\t}';\n\t\t\t}\n\t\t}else if($_GET[\"bd\"] == \"vtama_estado_contacto\"){\n\t\t\trequire_once \"../core.php\";\n\t\t\trequire_once \"../funciones.php\";\n\t\t\trequire_once \"../controllers/estadoContacto.controlador.php\";\n\t\t\trequire_once \"../models/estadoContacto.modelo.php\";\n\t\t\t$item = null;\n\t\t\t$valor = null;\n\t\t\t$estadoContacto = ControladorEstadoContacto::ctrMostrarEstadoContacto($item,$valor);\n\t\t\tif(count($estadoContacto) > 0){\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": [';\n\t\t\t\t\t\tfor ($i=0; $i < count($estadoContacto); $i++) {\n\t\t\t\t\t\t\t$botones = \"<div class='btn-group'><button class='btn btn-sm btn-warning btnEditarEstadoContacto' codEstadoContacto='\".$estadoContacto[$i][\"cod_estado_contacto\"].\"' data-toggle='modal' data-target='#modalEstadoContacto' title='Editar'><i class='fa fa-pencil'></i></button><button class='btn btn-sm btn-danger btnEliminarEstadoContacto' codEstadoContacto='\".$estadoContacto[$i][\"cod_estado_contacto\"].\"' title='Eliminar'><i class='fa fa-trash'></i></button></div></div>\";\n\t\t\t\t\t\t\t$datosJson .= '[\n\t\t\t\t\t\t\t\t\"'.($i+1).'\",\n\t\t\t\t\t\t\t\t\"'.escapeComillasJson($estadoContacto[$i][\"dsc_estado_contacto\"]).'\",\n\t\t\t\t\t\t\t\t\"'.$botones.'\"\n\t\t\t\t\t\t\t],';\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t\t$datosJson .= ']\n\t\t\t\t}';\n\t\t\t}else{\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": []\n\t\t\t\t}';\n\t\t\t}\n\t\t}else if($_GET[\"bd\"] == \"vtama_tipo_contacto\"){\n\t\t\trequire_once \"../core.php\";\n\t\t\trequire_once \"../funciones.php\";\n\t\t\trequire_once \"../controllers/tipoContacto.controlador.php\";\n\t\t\trequire_once \"../models/tipoContacto.modelo.php\";\n\t\t\t$item = null;\n\t\t\t$valor = null;\n\t\t\t$tipoContacto = ControladorTipoContacto::ctrMostrarTipoContacto($item,$valor);\n\t\t\tif(count($tipoContacto) > 0){\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": [';\n\t\t\t\t\t\tfor ($i=0; $i < count($tipoContacto); $i++) {\n\t\t\t\t\t\t\t$botones = \"<div class='btn-group'><button class='btn btn-sm btn-warning btnEditarTipoContacto' codTipoContacto='\".$tipoContacto[$i][\"cod_tipo_contacto\"].\"' data-toggle='modal' data-target='#modalTipoContacto' title='Editar'><i class='fa fa-pencil'></i></button><button class='btn btn-sm btn-danger btnEliminarTipoContacto' codTipoContacto='\".$tipoContacto[$i][\"cod_tipo_contacto\"].\"' title='Eliminar'><i class='fa fa-trash'></i></button></div></div>\";\n\t\t\t\t\t\t\t$datosJson .= '[\n\t\t\t\t\t\t\t\t\"'.($i+1).'\",\n\t\t\t\t\t\t\t\t\"'.escapeComillasJson($tipoContacto[$i][\"dsc_tipo_contacto\"]).'\",\n\t\t\t\t\t\t\t\t\"'.$botones.'\"\n\t\t\t\t\t\t\t],';\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t\t$datosJson .= ']\n\t\t\t\t}';\n\t\t\t}else{\n\t\t\t\t$datosJson = '{\n\t\t\t\t\t\"data\": []\n\t\t\t\t}';\n\t\t\t}\n\t\t}\n\t\techo $datosJson;\n\t}", "public function leerDatos($tabla){\r\n\t\t\t$sql = '';\r\n\t\t\tswitch($tabla){\r\n\t\t\t\tcase \"Usuario\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT id, nombre, nacido, sexo, foto from usuario;\r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"UsuarioDeporte\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT id_usuario, id_deporte from usuario_deporte;\r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"Deporte\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT id, nombre from deporte;\r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"Passwd\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT usuario, clave from passwd; \r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$arrayFilas=$this->conn->query($sql);\r\n\t\t\treturn $arrayFilas;\r\n\t\t}", "public function modulos()\n {\n return $this->hasMany('App\\Models\\glb\\Modulo');\n }", "function tampil_data($tabel)\n {\n $row = $this->db->prepare(\"SELECT * FROM sms\");\n $row->execute();\n return $hasil = $row->fetchAll();\n }", "public function recuperar(): array {\r\n \r\n $autorDao = new AutorDao();\r\n \r\n $livros = [];\r\n $query = \"SELECT livro.*, editora.nome \"\r\n . \"FROM livro \"\r\n . \"INNER JOIN editora ON \"\r\n . \"editora.id = livro.editora_id\";\r\n \r\n $statement = $this->pdo->prepare($query);\r\n $statement->execute();\r\n while($registro = $statement->fetch(\\PDO::FETCH_LAZY)){\r\n $livro = $this->hydrate((array) $registro);\r\n $livro->autores = $autorDao->recuperarPorLivro($livro->id);\r\n $livros[] = $livro;\r\n }\r\n return $livros;\r\n }", "public function read(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "public function modulos()\n {\n return $this->hasMany('App\\Modulo');\n }", "public function listarUsuarios(){\r\n $sql = \"SELECT U.IdUsuario, U.NombreCompleto, U.Usuario, U.Correo, U.Estado, U.IdRol, R.Rol\r\n FROM usuarios AS U\r\n INNER JOIN roles AS R ON U.IdRol = R.IdRol;\";\r\n $tabla = $this->conexion->getTable($sql);\r\n return $tabla;\r\n}", "function findAll() {\n\t\t$query = \"SELECT id, nameEN, nameES FROM saga\";\n\t\t$res = array();\n\t\t\n\t\tforeach(DB::ejecutarConsulta($query) as $row) {\n\t\t\t// Añadimos un objeto por cada elemento obtenido\n\t\t\t$res[] = new SagaDAO($row);\n\t\t}\n\t\treturn $res;\n\t}", "public function datos_carros() \n {\n $registros = DB::table('carros')\n ->where ('carros.Estado', '=', '1')\n ->select('carros.id', 'carros.Marca', 'carros.Modelo')\n ->get();\n return $registros;\n }", "function fill_modules_table($db){\n $query=\"SELECT m.*, u.usi from Modulo m join usi_moduli u on m.nome=u.modulo;\";\n $result = mysqli_query($db,$query);\n while($row=mysqli_fetch_assoc($result)){\n ?>\n <tr>\n <td><b class=\"text-primary\"><?php echo $row['nome']; ?></b></td>\n <td><?php echo $row['funzionalita']; ?></td>\n <td><?php echo $row['costo']; ?></td>\n <td><?php echo $row['usi'];?> </td>\n </tr>\n<?php\n }\n}", "public function run()\n {\n\n DB::table('module_values')->insert([\n\n //MÓDULO DE GERENCIA\n [ 'id' => 1, 'module_id' => 1, 'name' => 'Estoques', 'icon' => 'fas fa-cubes', 'link' => '/painel/stocks', 'created_at' => Carbon\\Carbon::now() ],\n [ 'id' => 2, 'module_id' => 1, 'name' => 'Fornecedores', 'icon' => 'fas fa-industry', 'link' => '/painel/factories', 'created_at' => Carbon\\Carbon::now() ],\n [ 'id' => 3, 'module_id' => 1, 'name' => 'Compras', 'icon' => 'fas fa-file-invoice-dollar', 'link' => '/painel/purchases', 'created_at' => Carbon\\Carbon::now() ],\n [ 'id' => 4, 'module_id' => 1, 'name' => 'Usuários', 'icon' => 'fas fa-users', 'link' => '/painel/users', 'created_at' => Carbon\\Carbon::now() ],\n [ 'id' => 5, 'module_id' => 1, 'name' => 'Tipo de usuários', 'icon' => 'fas fa-user', 'link' => '/painel/user_type', 'created_at' => Carbon\\Carbon::now() ],\n\n //MÓDULO DE PRODUTOS\n [ 'id' => 6, 'module_id' => 2, 'name' => 'Central de Opções', 'icon' => 'fas fa-cogs', 'link' => '/painel/options', 'created_at' => Carbon\\Carbon::now() ],\n [ 'id' => 7, 'module_id' => 2, 'name' => 'Categorias', 'icon' => 'fas fa-tags', 'link' => '/painel/categories', 'created_at' => Carbon\\Carbon::now() ],\n [ 'id' => 8, 'module_id' => 2, 'name' => 'Produtos', 'icon' => 'fas fa-chess-rook', 'link' => '/painel/products', 'created_at' => Carbon\\Carbon::now() ],\n [ 'id' => 9, 'module_id' => 2, 'name' => 'Embalagens', 'icon' => 'fas fa-box-open', 'link' => '/painel/boxes', 'created_at' => Carbon\\Carbon::now() ],\n [ 'id' => 10, 'module_id' => 2, 'name' => 'Cupons de Desconto', 'icon' => 'fas fa-ticket-alt', 'link' => '/painel/coupons', 'created_at' => Carbon\\Carbon::now() ],\n \n //MÓDULO DE VENDAS\n [ 'id' => 11, 'module_id' => 3, 'name' => 'Clientes', 'icon' => 'fas fa-users', 'link' => '/painel/clients', 'created_at' => Carbon\\Carbon::now() ],\n [ 'id' => 12, 'module_id' => 3, 'name' => 'Pedidos', 'icon' => 'fas fa-wallet', 'link' => '/painel/orders', 'created_at' => Carbon\\Carbon::now() ],\n ]);\n }", "private function rowDataTable($seccion, $tabla, $id) {\n $data = '';\n switch ($tabla) {\n case 'usuario':\n $sql = $this->db->select(\"SELECT wa.nombre, wa.email, wr.descripcion as rol, wa.estado\n FROM usuario wa\n LEFT JOIN usuario_rol wr on wr.id = wa.id_usuario_rol WHERE wa.id = $id;\");\n break;\n case 'meta_tags':\n $sql = $this->db->select(\"SELECT\n m.es_texto,\n en_texto\n FROM\n meta_tags mt\n LEFT JOIN menu m ON m.id = mt.id_menu WHERE mt.id = $id;\");\n break;\n default :\n $sql = $this->db->select(\"SELECT * FROM $tabla WHERE id = $id;\");\n break;\n }\n\n switch ($seccion) {\n case 'redes':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"redes\" data-rowid=\"redes_\" data-tabla=\"redes\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"redes\" data-rowid=\"redes_\" data-tabla=\"redes\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarRedes\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"redes_\" data-id=\"' . $id . '\" data-tabla=\"redes\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['descripcion']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['url']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'usuarios':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"usuarios\" data-rowid=\"usuarios_\" data-tabla=\"usuario\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"usuarios\" data-rowid=\"usuarios_\" data-tabla=\"usuario\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTUsuario\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"usuarios_\" data-id=\"' . $id . '\" data-tabla=\"usuario\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n $data = '<td>' . utf8_encode($sql[0]['nombre']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['email']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['rol']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'blog':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"blog\" data-rowid=\"blog_\" data-tabla=\"blog\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"blog\" data-rowid=\"blog_\" data-tabla=\"blog\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarBlogPost\" data-pagina=\"blog\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"redes_\" data-id=\"' . $id . '\" data-tabla=\"redes\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n if (empty($sql[0]['youtube_id'])) {\n $imagen = '<img class=\"img-responsive imgBlogTable\" src=\"' . URL . 'public/images/blog/thumb/' . $sql[0]['imagen_thumb'] . '\">';\n } else {\n $imagen = '<iframe class=\"scale-with-grid\" src=\"http://www.youtube.com/embed/' . $sql[0]['youtube_id'] . '?wmode=opaque\" allowfullscreen></iframe>';\n }\n $data = '<td>' . $sql[0]['id'] . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_titulo']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_titulo']) . '</td>'\n . '<td>' . $imagen . '</td>'\n . '<td>' . date('d-m-Y', strtotime($sql[0]['fecha_blog'])) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'slider':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"slider\" data-rowid=\"slider_\" data-tabla=\"slider\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"slider\" data-rowid=\"slider_\" data-tabla=\"slider\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTSlider\" data-pagina=\"slider\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"slider_\" data-id=\"' . $id . '\" data-tabla=\"slider\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n if (!empty($sql[0]['imagen'])) {\n $img = '<img src=\"' . URL . 'public/images/slider/' . $sql[0]['imagen'] . '\" style=\"width: 160px;\">';\n } else {\n $img = '-';\n }\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . $img . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_titulo']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_titulo']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_titulo_principal']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_titulo_principal']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'certificaciones':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"certificaciones\" data-rowid=\"certificaciones_\" data-tabla=\"certificaciones\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"certificaciones\" data-rowid=\"certificaciones_\" data-tabla=\"certificaciones\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTCertificaciones\" data-pagina=\"certificaciones\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"certificaciones_\" data-id=\"' . $id . '\" data-tabla=\"certificaciones\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n if (!empty($sql[0]['imagen_certificacion'])) {\n $img = '<img src=\"' . URL . 'public/images/certificaciones/' . $sql[0]['imagen_certificacion'] . '\" style=\"width: 160px;\">';\n } else {\n $img = '-';\n }\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . $img . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_nombre']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_nombre']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'fraseNosotros':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"fraseNosotros\" data-rowid=\"fraseNosotros_\" data-tabla=\"aboutus_seccion2\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"fraseNosotros\" data-rowid=\"fraseNosotros_\" data-tabla=\"aboutus_seccion2\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTFraseNosotros\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"fraseNosotros_\" data-id=\"' . $id . '\" data-tabla=\"aboutus_seccion2\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_frase']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_frase']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'fraseRetail':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"fraseRetail\" data-rowid=\"fraseRetail_\" data-tabla=\"privatelabel_seccion2\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"fraseRetail\" data-rowid=\"fraseRetail_\" data-tabla=\"privatelabel_seccion2\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTFraseRetail\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"fraseRetail_\" data-id=\"' . $id . '\" data-tabla=\"privatelabel_seccion2\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_frase']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_frase']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'nosotrosSeccion3':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"nosotrosSeccion3\" data-rowid=\"nosotrosSeccion3_\" data-tabla=\"aboutus_seccion3\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"nosotrosSeccion3\" data-rowid=\"nosotrosSeccion3_\" data-tabla=\"aboutus_seccion3\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTNosotrosSeccion3\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"nosotrosSeccion3_\" data-id=\"' . $id . '\" data-tabla=\"aboutus_seccion3\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_titulo']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_titulo']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'itemProductos':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"itemProductos\" data-rowid=\"itemProductos_\" data-tabla=\"productos_items\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"itemProductos\" data-rowid=\"itemProductos_\" data-tabla=\"productos_items\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTItemProducto\" data-pagina=\"itemProductos\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"itemProductos_\" data-id=\"' . $id . '\" data-tabla=\"productos_items\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n if (!empty($sql[0]['imagen'])) {\n $img = '<img src=\"' . URL . 'public/images/productos/items/' . $sql[0]['imagen'] . '\" style=\"width: 160px;\">';\n } else {\n $img = '-';\n }\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . $img . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_nombre']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_nombre']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'productos':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"productos\" data-rowid=\"productos_\" data-tabla=\"productos\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"productos\" data-rowid=\"productos_\" data-tabla=\"productos\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnListado = '<a class=\"mostrarListadoProductos pointer btn-xs\" data-id=\"' . $id . '\"><i class=\"fa fa-list\"></i> Listado </a>';\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTProducto\" data-pagina=\"productos\"><i class=\"fa fa-edit\"></i> Editar </a>';\n //$btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"productos_\" data-id=\"' . $id . '\" data-tabla=\"productos\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n if (!empty($sql[0]['imagen'])) {\n $img = '<img src=\"' . URL . 'public/images/productos/' . $sql[0]['imagen'] . '\" style=\"width: 160px;\">';\n } else {\n $img = '-';\n }\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . $img . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_producto']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_producto']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnListado . ' ' . $btnEditar . '</td>';\n break;\n case 'servicios':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"servicios\" data-rowid=\"servicios_\" data-tabla=\"servicios\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"servicios\" data-rowid=\"servicios_\" data-tabla=\"servicios\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarDTServicios\" data-pagina=\"servicios\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $btnBorrar = '<a class=\"deletDTContenido pointer btn-xs txt-red\" data-rowid=\"servicios_\" data-id=\"' . $id . '\" data-tabla=\"servicios\"><i class=\"fa fa-trash-o\"></i> Eliminar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_servicio']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_servicio']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . ' ' . $btnBorrar . '</td>';\n break;\n case 'verContacto':\n if ($sql[0]['leido'] == 1) {\n $estado = '<span class=\"label label-primary\">Leído</span>';\n } else {\n $estado = '<span class=\"label label-danger\">No Leído</span>';\n }\n $btnEditar = '<a class=\"btnVerContacto pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalVerContacto\"><i class=\"fa fa-edit\"></i> Ver Datos </a>';\n $data = '<td class=\"sorting_1\">' . $id . '</td>'\n . '<td>' . utf8_encode($sql[0]['nombre']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['email']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['asunto']) . '</td>'\n . '<td>' . date('d-m-Y H:i:s', strtotime($sql[0]['fecha'])) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'meta_tags':\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarMetaTag\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $data = '<td>' . $id . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_texto']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_texto']) . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n case 'menu':\n if ($sql[0]['estado'] == 1) {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"menu\" data-rowid=\"menu_\" data-tabla=\"menu\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"1\"><span class=\"label label-primary\">Activo</span></a>';\n } else {\n $estado = '<a class=\"pointer btnCambiarEstado\" data-seccion=\"menu\" data-rowid=\"menu_\" data-tabla=\"menu\" data-campo=\"estado\" data-id=\"' . $id . '\" data-estado=\"0\"><span class=\"label label-danger\">Inactivo</span></a>';\n }\n $btnEditar = '<a class=\"editDTContenido pointer btn-xs\" data-id=\"' . $id . '\" data-url=\"modalEditarMenu\"><i class=\"fa fa-edit\"></i> Editar </a>';\n $data = '<td>' . utf8_encode($sql[0]['orden']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['es_texto']) . '</td>'\n . '<td>' . utf8_encode($sql[0]['en_texto']) . '</td>'\n . '<td>' . $estado . '</td>'\n . '<td>' . $btnEditar . '</td>';\n break;\n }\n return $data;\n }", "public function permisos()\n {\n\n $conectar = parent::conexion();\n\n $sql = \"select * from permisos;\";\n\n $sql = $conectar->prepare($sql);\n $sql->execute();\n return $resultado = $sql->fetchAll();\n }", "public function DAOModulosxRol() {\n }", "public function ConsultarCuentaTabla(){\n $conn = new conexion();\n $cuenta = null;\n try {\n if($conn->conectar()){\n $str_sql = \"SELECT usuarios.nom_usu,usuarios.id_usu,usuarios.telefono,usuarios.usuario,usuarios.email,usuarios.foto,\"\n . \"tp_usuarios.nom_tp as tipo,usuarios.id_usu from usuarios INNER JOIN tp_usuarios \"\n . \"where usuarios.id_tp_usu = tp_usuarios.id_tp and usuarios.id_tp_usu <> 1 \"\n . \"and estado = 'Activo' and usuarios.id_tp_usu <> 7\";\n \n $sql = $conn->getConn()->prepare($str_sql);\n $sql->execute();\n $resultado = $sql->fetchAll();\n foreach ($resultado as $row){\n $user = new Usuario();\n $user->mapear1($row);\n $cuenta[] = array(\n \"Nom_usu\" => $user->getNom_usu(),\n \"Usuario\" => $user->getUsuario(),\n \"Email\" => $user->getEmail(),\n \"Telefono\" => $user->getTelefono(),\n \"Foto\" => $user->getFoto(),\n \"Cedula\" => $row['id_usu'],\n \"Tipo\" => $row['tipo'],\n \"Idusu\" => $row['id_usu'] \n );\n }\n }\n } catch (Exception $exc) {\n $cuenta = null;\n echo $exc->getMessage();\n }\n $conn->desconectar();\n return $cuenta;\n }", "public function registroMateriaModel($datosModel, $tabla){\r\n\r\n\t\t#prepare() Prepara una sentencia SQL para ser ejecutada por el método PDOStatement::execute(). La sentencia SQL puede contener cero o más marcadores de parámetros con nombre (:name) o signos de interrogación (?) por los cuales los valores reales serán sustituidos cuando la sentencia sea ejecutada. Ayuda a prevenir inyecciones SQL eliminando la necesidad de entrecomillar manualmente los parámetros.\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla ( id_maestro, nombre, horas, creditos,id_grupo) VALUES ( :id_maestro ,:nombre ,:horas ,:creditos,:id_grupo)\");\t\r\n\r\n\t\t#bindParam() Vincula una variable de PHP a un parámetro de sustitución con nombre o de signo de interrogación correspondiente de la sentencia SQL que fue usada para preparar la sentencia.\r\n\r\n\t\t$stmt->bindParam(\":id_maestro\", $datosModel[\"id_maestro\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":nombre\", $datosModel[\"nombre\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":horas\", $datosModel[\"horas\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":creditos\", $datosModel[\"creditos\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":id_grupo\", $datosModel[\"id_grupo\"], PDO::PARAM_STR);\r\n\r\n\r\n\r\n\t\tif($stmt->execute()){\r\n\r\n\t\t\treturn \"success\";\r\n\r\n\t\t}\r\n\r\n\t\telse{\r\n\r\n\t\t\treturn \"error\";\r\n\r\n\t\t}\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "public function vistaCarreraModel($tabla){\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT id, nombre FROM $tabla\");\t\r\n\t\t$stmt->execute();\r\n\t\t#fetchAll(): Obtiene todas las filas de un conjunto de resultados asociado al objeto PDOStatement. \r\n\t\treturn $stmt->fetchAll();\r\n\t\t$stmt->close();\r\n\r\n\t}", "function relatorioDeCelulaPart2Dao($idCelula,$idMembro){\r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetocelula.php\");\r\n \r\n $objDao = Connection::getInstance();\r\n $resultado = mysql_query(\"Select c.NomeCelula, m.Nome from celulas c join celulamembro e on e.CodCelula = c.Codigo join membros m on e.CodMembro = m.Matricula order by c.NomeCelula\") or die (\"Nao foi possivel realizar a busca 2\".mysql_error());\r\n \r\n $listaMembro = array();\r\n \r\n $i=0;\r\n\r\n if($resultado){\r\n \r\n while ($registro = mysql_fetch_assoc($resultado)){ \r\n\t $celula = new objetocelula();\r\n $celula->setNome($registro['NomeCelula']);\r\n $celula->setNomeMembro($registro['Nome']);\r\n\t $listaMembro[$i] = $celula;\r\n\t $i++;\r\n\t}\r\n }\r\n \r\n\tmysql_free_result($resultado);\r\n $objDao->freebanco(); \r\n return $listaMembro;\r\n }", "function generar()\r\n\t{\r\n\t\tforeach($this->columnas as $ef) {\r\n\t\t \t$this->datos->tabla('columnas')->nueva_fila($ef->get_datos());\r\n\t\t}\r\n\t\tparent::generar();\r\n\t}", "function listaTodasCelulasDao(){\r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetocelula.php\");\r\n \r\n $objDao = Connection::getInstance();\r\n \r\n $resultado = mysql_query(\"Select c.Codigo,c.CodLider,m.Nome,c.NomeCelula,c.Estilo from celulas c join membros m on c.CodLider = m.Matricula\") or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n $listaCelula = array();\r\n \r\n $i=0;\r\n \r\n while ($registro = mysql_fetch_assoc($resultado)){\r\n \r\n\t $celula = new objetocelula();\r\n \r\n $celula->setId($registro['Codigo']);\r\n $celula->setLider($registro['CodLider']);\r\n $celula->setNomeMembro($registro['Nome']);\r\n $celula->setNome($registro['NomeCelula']);\r\n $celula->setEstilo($registro['Estilo']);\r\n \r\n\t $listaCelula[$i] = $celula;\r\n \r\n\t $i++;\r\n\t}\r\n\r\n\t\treturn $listaCelula;\r\n\t\tmysql_free_result($resultado);\r\n $objDao->freebanco();\r\n \r\n }", "function tablaRuta($Nombre){\r\n\t\t$query = \"SELECT * FROM \" . self::TABLA . \";\";\r\n\t\treturn parent::tablaRegistro($Nombre, $query);\r\n\t\r\n }", "public function lista() {\n $sql = \"SELECT * FROM cliente\";\n $qry = $this->db->query($sql); // query do pdo com acesso ao bd\n\n //return $qry->fetchAll(); // retorna todos os registros\n return $qry->fetchAll(\\PDO::FETCH_OBJ); // retorna todos os registros a nível de objeto\n }", "function getDatatables()\r\n {\r\n $this->db->from(\"v_registro\");\r\n $query = $this->db->get();\r\n return $query->result();\r\n }", "public function readAll(){\r\n $query = \"SELECT * FROM docente;\";\r\n $statement = $this->cdb->prepare($query);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(\\PDO::FETCH_OBJ);\r\n return $rows; \r\n }", "function SHOWALL(){\r\n\r\n $stmt = $this->db->prepare(\"SELECT * FROM edificio\");\r\n $stmt->execute();\r\n $edificios_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n $alledificios = array(); //array para almacenar los datos de todos los edificios\r\n\r\n //Recorremos todos las filas de edificios devueltas por la sentencia sql\r\n foreach ($edificios_db as $edificio){\r\n //Introducimos uno a uno los edificios recuperados de la BD\r\n array_push($alledificios,\r\n new EDIFICIO_Model(\r\n $edificio['edificio_id'],$edificio['nombre_edif'],$edificio['direccion_edif']\r\n ,$edificio['telef_edif'],$edificio['num_plantas'],$edificio['agrup_edificio']\r\n )\r\n );\r\n }\r\n return $alledificios;\r\n }", "public function getAll(){\n try{\n $sql = \"SELECT * FROM {$this->tabela}\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $dados = $stm->fetchAll(PDO::FETCH_OBJ);\n return $dados;\n }catch(PDOException $erro){\n echo \"<script>alert('Erro na linha: {$erro->getLine()}')</script>\";\n }\n }", "public function limparTabela(){\r\n\t\t$sql = 'DELETE FROM oficina';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->execute();\r\n\t}", "function usuarios_estados_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_estados\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Estado\",2);\n$this->agregarVariable2($v);\n\n\t}", "public function datos() {\n $this->load->model('acceso_model');\n $permisos_db = $this->acceso_model->get_permisosUsuario($this->session->userdata('user_id' . $this->clv_sess), $this->clave_modulo);\n $permisos = $this->ci_acl_framew->get_parse_array_permisos($permisos_db);\n if (array_key_exists($this->clave_modulo, $permisos)) {\n $permisos_modulo = $permisos[$this->clave_modulo];\n } else {\n redirect('acceso/acceso_denegado');\n }\n $this->load->model('generico_model');\n $sIndexColumn = \"rol_id\";\n $aColumns = array($sIndexColumn, 'rol_clave', 'rol_nombre', 'rol_descripcion');\n $sTable = \"acl_rol\";\n\n /* Generar limits con paginacion */\n $sLimit = \"\";\n $iDisplayStart = $this->input->post('iDisplayStart');\n $iDisplayLength = $this->input->post('iDisplayLength');\n if (isset($iDisplayStart) && $iDisplayLength != '-1') {\n $sLimit = \"LIMIT \" . $this->input->post('iDisplayStart') . \", \" .\n $this->input->post('iDisplayLength');\n }\n /* order */\n $iSortCol_0 = $this->input->post('iSortCol_0');\n if (isset($iSortCol_0)) {\n $sOrder = \"ORDER BY \";\n for ($i = 0; $i < intval($this->input->post('iSortingCols')); $i++) {\n if ($this->input->post('bSortable_' . intval($this->input->post('iSortCol_' . $i))) == \"true\") {\n $sOrder .= $aColumns[intval($this->input->post('iSortCol_' . $i))] . \"\n\t\t\t\t \t\" . $this->input->post('sSortDir_' . $i) . \", \";\n }\n }\n $sOrder = substr_replace($sOrder, \"\", -2);\n if ($sOrder == \"ORDER BY\") {\n $sOrder = \"\";\n }\n }\n /* Generar limits con paginacion */\n $sWhere = \"\";\n if ($this->input->post('sSearch') != \"\") {\n $sWhere = \"WHERE (\";\n for ($i = 0; $i < count($aColumns); $i++) {\n $sWhere .= $aColumns[$i] . \" LIKE '%\" . $this->input->post('sSearch') . \"%' OR \";\n }\n $sWhere = substr_replace($sWhere, \"\", -3);\n $sWhere .= ')';\n }\n for ($i = 0; $i < count($aColumns); $i++) {\n if ($this->input->post('bSearchable_' . $i) == \"true\" && $this->input->post('sSearch_' . $i) != '') {\n if ($sWhere == \"\") {\n $sWhere = \"WHERE \";\n } else {\n $sWhere .= \" AND \";\n }\n $sWhere .= $aColumns[$i] . \" LIKE '%\" . $this->input->post('sSearch_' . $i) . \"%' \";\n }\n }\n $rResult = $this->generico_model->datosDataTable($aColumns, $sTable, $sWhere, $sOrder, $sLimit);\n $aResultFilterTotal = $this->generico_model->numFilasSQL()->row_array();\n $iFilteredTotal = $aResultFilterTotal['filas'];\n $aResultTotal = $this->generico_model->countResults($sIndexColumn, $sTable)->row_array();\n $iTotal = $aResultTotal['numreg'];\n $sOutput = '{';\n $sOutput .= '\"sEcho\": ' . intval($this->input->post('sEcho')) . ', ';\n $sOutput .= '\"iTotalRecords\": ' . $iTotal . ', ';\n $sOutput .= '\"iTotalDisplayRecords\": ' . $iFilteredTotal . ', ';\n $sOutput .= '\"aaData\": [ ';\n for ($x = 0; $x < $rResult->num_rows(); $x++) {\n $aRow = $rResult->row_array($x);\n $row = array();\n $row['DT_RowId'] = 'row_' . $aRow[$sIndexColumn];\n $row['DT_RowClass'] = 'class';\n $sOutput .= \"[\";\n for ($i = 0; $i < count($aColumns); $i++) {\n if ($aColumns[$i] == \"\") {\n $sOutput .= '\"' . str_replace('\"', '\\\"', $aRow[$aColumns[$i]]) . '\",';\n } else if ($aColumns[$i] != ' ') {\n $sOutput .= '\"' . str_replace('\"', '\\\"', $aRow[$aColumns[$i]]) . '\",';\n }\n }\n $upd = $del = $per = '';\n if (isset($permisos_modulo) && in_array('per', $permisos_modulo)) {\n $per = \"<button class='btn btn-info opcdt' title='Ver permisos' onclick='ver_permisos(\" . $aRow[$sIndexColumn] . \")'><i class=' fa fa-lock'></i></button>\";\n }\n if (isset($permisos_modulo) && in_array('upd', $permisos_modulo)) {\n $upd = \"<button class='btn btn-warning opcdt' title='Modificar rol' onclick='modifica(\" . $aRow[$sIndexColumn] . \")'><i class=' fa fa-edit'></i></button>\";\n }\n if (isset($permisos_modulo) && in_array('del', $permisos_modulo)) {\n $del = \"<button class='btn btn-danger opcdt' title='Eliminar rol' onclick='elimina(\" . $aRow[$sIndexColumn] . \")'><i class=' fa fa-remove'></i></button>\";\n }\n $sOutput .= '\"' . str_replace('\"', '\\\"', $upd . $del . $per) . '\",';\n $sOutput = substr_replace($sOutput, \"\", -1);\n $sOutput .= \"],\";\n }//forn for\n $sOutput = substr_replace($sOutput, \"\", -1);\n $sOutput .= '] }';\n\n echo $sOutput;\n }", "public function Crud(){\n $pvd = new alumno();\n\n //Se obtienen los datos del alumno a editar.\n if(isset($_REQUEST['persona_id'])){\n $pvd = $this->model->Obtener($_REQUEST['persona_id']);\n }\n\n //Llamado de las vistas.\n require_once '../Vista/Alumno/editar-alumnos.php';\n\t}", "function getallrecord()\n\t{\n\t\treturn $this->db->get(\"tblteman\");\n\t\t// fungsi get(\"namatable\") adalah active record ci\n\t}", "public static function agregarDetallesModel($id, $tabla, $datos){\n\t\t\t$sql = Conexion::conectar()->prepare(\"INSERT INTO $tabla(id, id_producto, id_venta, nombre, cantidad, precio) VALUES (NULL,:producto, :venta, :nombre, :cantidad, :precio)\");\n\n\t\t\t$sql2 = Conexion::conectar()->prepare(\"UPDATE productos SET stock = stock-:stock WHERE id_producto=:producto\");\n\n\n\t\t\t$sql3 = Conexion::conectar()->prepare(\"INSERT INTO historial(id_historial, id_producto, id_usuario, id_tienda, fecha, nota, referencia, cantidad) VALUES(NULL, :producto, :usuario, :tienda, :fecha, :nota, :referencia, :cantidad)\");\n\n\t\t\tforeach ($_SESSION[\"carrito\"] as $producto) {\n\t\t\t\t$sql->bindParam(\":producto\", $producto->id_producto, PDO::PARAM_INT);\n\t\t\t\t$sql->bindParam(\":venta\", $id, PDO::PARAM_INT);\n\t\t\t\t$sql->bindParam(\":nombre\", $producto->nombre, PDO::PARAM_STR);\t\n\t\t\t\t$sql->bindParam(\":cantidad\", $producto->cantidad, PDO::PARAM_INT);\n\t\t\t\t$sql->bindParam(\":precio\", $producto->precio, PDO::PARAM_STR);\t\n\n\t\t\t\t$sql->execute();\n\n\t\t\t\t$sql2->bindParam(\":stock\", $producto->cantidad, PDO::PARAM_INT);\n\t\t\t\t$sql2->bindParam(\":producto\", $producto->id_producto, PDO::PARAM_INT);\n\t\t\t\t$sql2->execute();\n\n\t\t\t\t$nota = \"Venta del producto\";\n\t\t\t\t$referencia = \"000$datos[usuario]$producto->cantidad$producto->id_producto\";\n\t\t\t\t\n\t\t\t\t$sql3->bindParam(\":producto\", $producto->id_producto, PDO::PARAM_INT);\n\t\t\t\t$sql3->bindParam(\":usuario\", $datos[\"usuario\"], PDO::PARAM_INT);\n\t\t\t\t$sql3->bindParam(\":tienda\", $datos[\"tienda\"], PDO::PARAM_INT);\t\n\t\t\t\t$sql3->bindParam(\":fecha\", $datos[\"fecha\"], PDO::PARAM_INT);\n\t\t\t\t$sql3->bindParam(\":nota\", $nota, PDO::PARAM_STR);\t\n\t\t\t\t$sql3->bindParam(\":referencia\", $referencia, PDO::PARAM_STR);\n\t\t\t\t$sql3->bindParam(\":cantidad\", $producto->cantidad, PDO::PARAM_STR);\n\t\t\t\t$sql3->execute();\n\t\t\t}\n\n\t\t\treturn \"success\";\n\t\t}", "public function findAll(){\n //recupere le nom de la classe et le formate\n $table = strtolower(get_class($this));\n\n //Prepare la requete\n $query = \"SELECT * FROM $table\";\n $results = $this->conn->prepare($query);\n\n //Execution requete et stockage resultats dans une variable\n $results->execute();\n $resultats = $results->fetchAll(PDO::FETCH_ASSOC);\n return $resultats;\n }", "private function tbl_usuarios() {\r\n\t\t\t$this->usuarios = $this->esquema->createTable('USUARIOS');\r\n\t\t\t$this->usuarios->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('USUARIO', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Usuario de Ingreso'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('PASSWORD', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Contraseña de Ingreso'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombres del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('APELLIDO', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Apellidos del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('CEDULA', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'Cedula del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('USUARIO_RR', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Usuario de RR'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('CORREO', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Correo electronico del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('ESTADO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Estado del Usuario [ID de la tabla ESTADOS]'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('EMPRESA', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de la Empresa del Usuario [ID de la tabla USUARIOS_EMPRESA]'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('CARGO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Cargo del Usuario [ID de la tabla USUARIOS_CARGO]'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('PERMISO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Permiso del Usuario [ID de la tabla PERMISOS]'\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\t$this->usuarios->setPrimaryKey(array('ID'));\r\n\t\t\t$this->usuarios->addForeignKeyConstraint($this->estados, array('ESTADO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->usuarios->addForeignKeyConstraint($this->usuarios_empresa, array('EMPRESA'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->usuarios->addForeignKeyConstraint($this->usuarios_cargo, array('CARGO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->usuarios->addForeignKeyConstraint($this->permisos, array('PERMISO'), array('ID'), $this->opcForeign);\r\n\t\t}", "static public function mdlSelecMembresias($tabla,$empresa){\n\n\t\tif($empresa == \"0\"){\n\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT m.*,t.nombre_membresia,mb.nombre_completo,e.nombre,mb.celular FROM $tabla m LEFT JOIN tipo_membresia t ON t.id_tipo_membresia=m.id_tipo_membresia LEFT JOIN miembros mb ON mb.id_miembro=m.id_miembro LEFT JOIN empresa e ON e.id_empresa=t.id_empresa \");\n\n\n\t\t\t$stmt -> execute();\n\n\t\t\treturn $stmt -> fetchAll();\n\n\t\t}else{\n\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT m.*,t.nombre_membresia,mb.nombre_completo,e.nombre,mb.celular FROM $tabla m LEFT JOIN tipo_membresia t ON t.id_tipo_membresia=m.id_tipo_membresia LEFT JOIN miembros mb ON mb.id_miembro=m.id_miembro LEFT JOIN empresa e ON e.id_empresa=t.id_empresa WHERE t.id_empresa = '\".$empresa.\"' \");\n\n\t\t\t$stmt -> execute();\n\n\t\t\treturn $stmt -> fetchAll();\n\n\t\t}\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n }", "public function pegaTodos(){\n\t\treturn $this->resultado->fetchAll();\n\t}", "static public function mdlSelecMembresiasRenovadas($tabla,$empresa){\n\n\t\tif($empresa == \"0\"){\n\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT m.*,t.nombre_membresia,mb.nombre_completo,e.nombre,mb.celular FROM $tabla m LEFT JOIN tipo_membresia t ON t.id_tipo_membresia=m.id_tipo_membresia LEFT JOIN miembros mb ON mb.id_miembro=m.id_miembro LEFT JOIN empresa e ON e.id_empresa=t.id_empresa WHERE m.estado = '1' \");\n\n\n\t\t\t$stmt -> execute();\n\n\t\t\treturn $stmt -> fetchAll();\n\n\t\t}else{\n\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT m.*,t.nombre_membresia,mb.nombre_completo,e.nombre,mb.celular FROM $tabla m LEFT JOIN tipo_membresia t ON t.id_tipo_membresia=m.id_tipo_membresia LEFT JOIN miembros mb ON mb.id_miembro=m.id_miembro LEFT JOIN empresa e ON e.id_empresa=t.id_empresa WHERE t.id_empresa = '\".$empresa.\"' AND m.estado = '1' \");\n\n\t\t\t$stmt -> execute();\n\n\t\t\treturn $stmt -> fetchAll();\n\n\t\t}\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n }", "static public function mdlIngresaritems($tabla, $datos){\n\t\t\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid_programacion_anual\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_proyecto\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_accion_centra\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_entes\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_partida_presupuestaria\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_fuente_financiamiento\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_actvcomercial\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_municipio\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_estado\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_ccnu\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,especificacion\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,cantidad\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,i\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,ii\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,iii\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,iv\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,und\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,costo_unitario\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,precio_total\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,alicuota_iva\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,monto_iva\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,monto_total\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,ano\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,tipo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,id_usuario\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,fecha\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,codigo ) \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tVALUES (:id_programacion_anual\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_proyecto\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_accion_centra\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_entes\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_partida_presupuestaria\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_fuente_financiamiento\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_actvcomercial\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_municipio\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_estado\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_ccnu\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:especificacion\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:cantidad\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:i\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:ii\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:iii\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:iv\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:und\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:costo_unitario\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:precio_total\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:alicuota_iva\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:monto_iva\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:monto_total\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:ano\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:tipo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:id_usuario\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:fecha \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t,:codigo)\");\n\n$stmt->bindParam(\":id_programacion_anual\", $datos[\"id_programacion_anual\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_proyecto\", $datos[\"id_proyecto\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_accion_centra\", $datos[\"id_accion_centra\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_entes\", $datos[\"id_entes\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_partida_presupuestaria\", $datos[\"id_partida_presupuestaria\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_fuente_financiamiento\", $datos[\"id_fuente_financiamiento\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_actvcomercial\", $datos[\"id_actvcomercial\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_municipio\", $datos[\"id_municipio\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_estado\", $datos[\"id_estado\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_ccnu\", $datos[\"id_ccnu\"], PDO::PARAM_STR);\n$stmt->bindParam(\":especificacion\", $datos[\"especificacion\"], PDO::PARAM_STR);\n$stmt->bindParam(\":cantidad\", $datos[\"cantidad\"], PDO::PARAM_STR);\n$stmt->bindParam(\":i\", $datos[\"i\"], PDO::PARAM_STR);\n$stmt->bindParam(\":ii\", $datos[\"ii\"], PDO::PARAM_STR);\n$stmt->bindParam(\":iii\", $datos[\"iii\"], PDO::PARAM_STR);\n$stmt->bindParam(\":iv\", $datos[\"iv\"], PDO::PARAM_STR);\n$stmt->bindParam(\":und\", $datos[\"und\"], PDO::PARAM_STR);\n$stmt->bindParam(\":costo_unitario\", $datos[\"costo_unitario\"], PDO::PARAM_STR);\n$stmt->bindParam(\":precio_total\", $datos[\"precio_total\"], PDO::PARAM_STR);\n$stmt->bindParam(\":alicuota_iva\", $datos[\"alicuota_iva\"], PDO::PARAM_STR);\n$stmt->bindParam(\":monto_iva\", $datos[\"monto_iva\"], PDO::PARAM_STR);\n$stmt->bindParam(\":monto_total\", $datos[\"monto_total\"], PDO::PARAM_STR);\n$stmt->bindParam(\":ano\", $datos[\"ano\"], PDO::PARAM_STR);\n$stmt->bindParam(\":tipo\", $datos[\"tipo\"], PDO::PARAM_STR);\n$stmt->bindParam(\":id_usuario\", $datos[\"id_usuario\"], PDO::PARAM_STR);\n$stmt->bindParam(\":fecha\", $datos[\"fecha\"], PDO::PARAM_STR);\n$stmt->bindParam(\":codigo\", $datos[\"codigo\"], PDO::PARAM_STR);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n//var_dump($datos);\n//exit($datos);\nif($stmt->execute()){\n\n\treturn \"ok\";\n\n}else{\n\n\t$arr=$stmt->errorInfo();\n\treturn $arr[2];\n\n}\n\n$stmt->close();\n$stmt = null;\n\n}", "function insertarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_ime';\n\t\t$this->transaccion='WF_TABLAINS_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t$this->setParametro('tipo_proceso','tipo_proceso','varchar');\n\t\t//si es detalle se añade un parametro para el id del maestro\n\t\tif ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['vista_tipo'] != 'maestro') {\n\t\t\t\n\t\t\t$this->setParametro($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['vista_campo_maestro'],\n\t\t\t\t\t\t\t\t$_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['vista_campo_maestro'],'integer');\n\t\t}\n\t\t//Define los parametros para la funcion\t\t\n\t\tforeach ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['columnas'] as $value) {\n\t\t\t$this->setParametro($value['bd_nombre_columna'],$value['bd_nombre_columna'],$value['bd_tipo_columna']);\t\t\t\n\t\t}\t\t\t\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function getT_Comentario() {\n $t_comentarios = [];\n $c = new Conexion();\n $resultado = $c->query(\"SELECT * FROM tcomentarios\");\n\n while ($objeto = $resultado->fetch(PDO::FETCH_OBJ)) {\n $t_comentarios[] = $objeto;\n }\n return $t_comentarios;\n}" ]
[ "0.7261502", "0.6815053", "0.67108047", "0.6636938", "0.66349256", "0.6580516", "0.6559903", "0.6435983", "0.64160293", "0.6367389", "0.6354693", "0.63404673", "0.629774", "0.6297591", "0.62668806", "0.6246525", "0.62382317", "0.6236082", "0.62318665", "0.6219244", "0.6190334", "0.6169486", "0.61636", "0.615931", "0.61501706", "0.61472934", "0.6140871", "0.6128647", "0.61223406", "0.6119816", "0.6118989", "0.6113338", "0.61008847", "0.6093415", "0.6088645", "0.6075955", "0.60746914", "0.60593164", "0.6057979", "0.6052585", "0.6043037", "0.60356385", "0.6034859", "0.60238326", "0.6023675", "0.6018225", "0.60176307", "0.6014663", "0.6011165", "0.6007706", "0.60056186", "0.60048944", "0.6002133", "0.59935415", "0.5978833", "0.5978139", "0.59744704", "0.5972119", "0.5966657", "0.59618264", "0.594881", "0.5945756", "0.593669", "0.59242254", "0.5921173", "0.5918225", "0.5915696", "0.59129715", "0.5910493", "0.5899446", "0.5897675", "0.58946246", "0.58905786", "0.58860767", "0.58825535", "0.58792466", "0.58774585", "0.5871845", "0.58715475", "0.58704275", "0.5868614", "0.5866721", "0.5866066", "0.5865973", "0.58643955", "0.58613896", "0.58608943", "0.5860706", "0.58581", "0.58534974", "0.58510375", "0.58497226", "0.5849022", "0.5847895", "0.58470917", "0.5845892", "0.5844675", "0.5843905", "0.5838828", "0.58346033", "0.58309716" ]
0.0
-1
Seed the application's database.
public function run() { // $this->call(UsersTableSeeder::class); factory(App\User::class, 5)->create(); factory(App\Profile::class, 5)->create(); factory(App\Tweet::class, 5)->create(); factory(App\Reply::class, 5)->create(); DB::table('followers')->insert([ 'user_id' => 5, 'follow_id' => App\User::inRandomOrder()->first()->id, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function dbSeed(){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Turn foreign key checks off\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');// <- USE WITH CAUTION!\n\t\t\t//Seed tables\n\t\t\tArtisan::call('db:seed');\n\t\t\t//Turn foreign key checks on\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');// <- SHOULD RESET ANYWAY BUT JUST TO MAKE SURE!\n\t\t}\n\t}", "protected function seedDB()\n {\n $ans = $this->ask('Seed your database?: ', 'y');\n\n // Check if the answer is true\n if (preg_match('/^y/', $ans))\n {\n $this->call('db:seed');\n $this->comment('');\n $this->comment('Database successfully seeded.');\n $this->comment('=====================================');\n echo \"Your app is now ready!\";\n }\n }", "protected function seedDatabase(): void\n {\n $this->seedProductCategories();\n $this->seedProducts();\n }", "public function setupDatabase()\n {\n Artisan::call('migrate:refresh');\n Artisan::call('db:seed');\n\n self::$setupDatabase = false;\n }", "public function run()\n {\n $this->seed('FormsMenuItemsTableSeeder');\n $this->seed('FormsDataTypesTableSeeder');\n $this->seed('FormsDataRowsTableSeeder');\n $this->seed('FormsPermissionsTableSeeder');\n $this->seed('FormsSettingsTableSeeder');\n $this->seed('FormsTableSeeder');\n }", "public function run()\n {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"\\n--- Seeding ---\\n\", TRUE));\n\n if (App::environment('production')) {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- ERROR: Seeding in Production is prohibited ---\\n\", TRUE));\n return;\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(ConfigsTableSeeder::class);\n $this->call(ConfigContentsTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n if (defined('STDERR')) fwrite(STDERR, print_r(\"Set FOREIGN_KEY_CHECKS=1 --- DONE\\n\", TRUE));\n\n // \\Artisan::call('command:regenerate-user-feeds');\n\n \\Cache::flush();\n\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- End Seeding ---\\n\\n\", TRUE));\n }", "protected function setupDatabase()\n {\n $this->call('migrate');\n $this->call('db:seed');\n\n $this->info('Database migrated and seeded.');\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function seedDatabase(): void\n {\n echo \"Running seeds\";\n\n // Folder where all the seeds are.\n $folder = __DIR__ . '/../seeds/';\n\n // Scan all files/folders inside database.\n $files = \\scandir($folder);\n\n $seeders = [];\n foreach ($files as $key => $file) {\n\n // All files that don't start with a dot.\n if ($file[0] !== '.') {\n\n // Load the file.\n require_once $folder . $file;\n\n // We have to call the migrations after because\n // some seeds are dependant from other seeds.\n $seeders[] = explode('.', $file)[0];\n }\n }\n\n // Run all seeds.\n foreach ($seeders as $seeder) {\n (new $seeder)->run();\n }\n }", "protected function seedDatabase()\n {\n //$this->app->make('db')->table(static::TABLE_NAME)->delete();\n\n TestExtendedModel::create([\n 'unique_field' => '999',\n 'second_field' => null,\n 'name' => 'unchanged',\n 'active' => true,\n 'hidden' => 'invisible',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1234567',\n 'second_field' => '434',\n 'name' => 'random name',\n 'active' => false,\n 'hidden' => 'cannot see me',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1337',\n 'second_field' => '12345',\n 'name' => 'special name',\n 'active' => true,\n 'hidden' => 'where has it gone?',\n ]);\n }", "public function initDatabase()\n {\n $this->call('migrate');\n\n $userModel = config('admin.database.users_model');\n\n if ($userModel::count() == 0) {\n $this->call('db:seed', ['--class' => AdminSeeder::class]);\n }\n }", "public function run ()\n {\n if (App::environment() === 'production') {\n exit('Seed should be run only in development/debug environment.');\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('role_user')->truncate();\n\n // Root user\n $user = User::find(1);\n $user->assignRole('owner');\n\n $user = User::find(2);\n $user->assignRole('admin');\n\n $user = User::find(3);\n $user->assignRole('admin');\n\n $user = User::find(4);\n $user->assignRole('moderator');\n\n $user = User::find(5);\n $user->assignRole('moderator');\n \n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n Model::unguard();\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(EntrustTableSeeder::class);\n\n $this->call(AccounttypeSeeder::class);\n $this->call(AppUserTableSeeder::class);\n $this->call(AppEmailUserTableSeeder::class);\n\n\n $this->call(CountryTableSeeder::class);\n $this->call(CityTableSeeder::class);\n\n\n $this->call(PostTypeTableSeeder::class);\n $this->call(PostSubTypeTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(AppPostSolvedTableSeeder::class);\n\n\n $this->call(AppCommentTypeTableSeeder::class);\n // $this->call(AppCommentTableSeeder::class);\n // $this->call(AppSubCommentTableSeeder::class);\n\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }\n\n Model::reguard();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::table('password_resets')->truncate();\n DB::table('domains')->truncate();\n DB::table('folders')->truncate();\n DB::table('bookmarks')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->seedUserAccount('[email protected]');\n $this->seedUserAccount('[email protected]');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n // $this->call(UsersTableSeeder::class);\n /* Schema::dropIfExists('employees');\n Schema::dropIfExists('users');\n Schema::dropIfExists('requests');\n Schema::dropIfExists('requeststatus');*/\n User::truncate();\n InstallRequest::truncate();\n RequestStatus::truncate();\n\n $cantidadEmployyes = 20;\n $cantidadUsers = 20;\n $cantidadRequestStatus = 3;\n $cantidadRequests = 200;\n\n factory(User::class, $cantidadUsers)->create();\n factory(RequestStatus::class, $cantidadRequestStatus)->create();\n factory(InstallRequest::class, $cantidadRequests)->create();\n }", "public function run()\n {\n Model::unguard();\n foreach (glob(__DIR__ . '/seeds/*.php') as $filename) {\n require_once($filename);\n }\n // $this->call(UserTableSeeder::class);\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n// $this->call('CustomerTableSeeder');\n $this->call('PhotoTableSeeder');\n// $this->call('ProductTableSeeder');\n// $this->call('StaffTableSeeder');\n// $this->call('PasswordResetsTableSeeder');\n// $this->call('UsersTableSeeder');\n $this->call('CustomersTableSeeder');\n $this->call('EmployeesTableSeeder');\n $this->call('InventoryTransactionTypesTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrderDetailsStatusTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('InvoicesTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrdersStatusTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n\n $this->call('OrdersTaxStatusTableSeeder');\n $this->call('PrivilegesTableSeeder');\n $this->call('EmployeePrivilegesTableSeeder');\n $this->call('ProductsTableSeeder');\n $this->call('InventoryTransactionsTableSeeder');\n $this->call('PurchaseOrderDetailsTableSeeder');\n\n $this->call('PurchaseOrderStatusTableSeeder');\n $this->call('PurchaseOrdersTableSeeder');\n $this->call('SalesReportsTableSeeder');\n $this->call('ShippersTableSeeder');\n $this->call('StringsTableSeeder');\n $this->call('SuppliersTableSeeder');\n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Model::reguard();\n }", "public function run()\n\t{\n $this->cleanDatabase();\n\n Eloquent::unguard();\n\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('CartsTableSeeder');\n $this->call('StoreTableSeeder');\n $this->call('AdvertisementsTableSeeder');\n \n\t}", "public function run()\n {\n \tDB::table('seeds')->truncate();\n\n $seeds = array(\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_18_2013',\n ),\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_20_2013',\n ),\n );\n\n // Uncomment the below to run the seeder\n DB::table('seeds')->insert($seeds);\n }", "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "protected function setUp(): void\n {\n $db = new DB;\n\n $db->addConnection([\n 'driver' => 'sqlite',\n 'database' => ':memory:',\n ]);\n\n $db->bootEloquent();\n $db->setAsGlobal();\n\n $this->createSchema();\n }", "public function run()\n {\n //$this->call('UserTableSeeder');\n //$this->call('ProjectTableSeeder');\n //$this->call('TaskTableSeeder');\n\n /**\n * Prepare seeding\n */\n $faker = Faker::create();\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Model::unguard();\n\n /**\n * Seeding user table\n */\n App\\User::truncate();\n factory(App\\User::class)->create([\n 'name' => 'KCK',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n\n /*factory(App\\User::class, 9)->create();\n $this->command->info('users table seeded');*/\n\n /**\n * Seeding roles table\n */\n Spatie\\Permission\\Models\\Role::truncate();\n DB::table('model_has_roles')->truncate();\n $superAdminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '최고 관리자'\n ]);\n $adminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '관리자'\n ]);\n $regularRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '정회원'\n ]);\n $associateRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '준회원'\n ]);\n\n App\\User::where('email', '!=', '[email protected]')->get()->map(function ($user) use ($regularRole) {\n $user->assignRole($regularRole);\n });\n\n App\\User::whereEmail('[email protected]')->get()->map(function ($user) use ($superAdminRole) {\n $user->assignRole($superAdminRole);\n });\n $this->command->info('roles table seeded');\n\n /**\n * Seeding articles table\n */\n App\\Article::truncate();\n $users = App\\User::all();\n\n $users->each(function ($user) use ($faker) {\n $user->articles()->save(\n factory(App\\Article::class)->make()\n );\n });\n $this->command->info('articles table seeded');\n\n /**\n * Seeding comments table\n */\n App\\Comment::truncate();\n $articles = App\\Article::all();\n\n $articles->each(function ($article) use ($faker, $users) {\n for ($i = 0; $i < 10; $i++) {\n $article->comments()->save(\n factory(App\\Comment::class)->make([\n 'author_id' => $faker->randomElement($users->pluck('id')->toArray()),\n //'parent_id' => $article->id\n ])\n );\n };\n });\n $this->command->info('comments table seeded');\n\n /**\n * Seeding tags table\n */\n App\\Tag::truncate();\n DB::table('article_tag')->truncate();\n $articles->each(function ($article) use ($faker) {\n $article->tags()->save(\n factory(App\\Tag::class)->make()\n );\n });\n $this->command->info('tags table seeded');\n\n /**\n * Seeding attachments table\n */\n App\\Attachment::truncate();\n if (!File::isDirectory(attachment_path())) {\n File::deleteDirectory(attachment_path(), true);\n }\n\n $articles->each(function ($article) use ($faker) {\n $article->attachments()->save(\n factory(App\\Attachment::class)->make()\n );\n });\n\n //$files = App\\Attachment::pluck('name');\n\n if (!File::isDirectory(attachment_path())) {\n File::makeDirectory(attachment_path(), 777, true);\n }\n\n /*\n foreach ($files as $file) {\n File::put(attachment_path($file), '');\n }\n */\n\n $this->command->info('attachments table seeded');\n\n /**\n * Close seeding\n */\n Model::reguard();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(CountriesTableSeeder::class);\n $this->call(StatesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n\n factory(Group::class)->create();\n factory(Contact::class, 5000)->create();\n }", "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('AdminTableSeeder');\n\t\t// $this->call('UserTableSeeder');\n\t\t// $this->call('MenuTableSeeder');\n\t\t// $this->call('ProductTableSeeder');\n\t\t// $this->call('CategoryTableSeeder');\n\t\t// $this->call('OptionTableSeeder');\n\t\t// $this->call('OptionGroupTableSeeder');\n\t\t// $this->call('TypeTableSeeder');\n\t\t// $this->call('LayoutTableSeeder');\n\t\t// $this->call('LayoutDetailTableSeeder');\n\t\t// $this->call('BannerTableSeeder');\n\t\t// $this->call('ConfigureTableSeeder');\n\t\t// $this->call('PageTableSeeder');\n\t\t// $this->call('ImageTableSeeder');\n\t\t// $this->call('ImageableTableSeeder');\n\t\t// ======== new Seed =======\n\t\t$this->call('AdminsTableSeeder');\n\t\t$this->call('BannersTableSeeder');\n\t\t$this->call('CategoriesTableSeeder');\n\t\t$this->call('ConfiguresTableSeeder');\n\t\t$this->call('ImageablesTableSeeder');\n\t\t$this->call('ImagesTableSeeder');\n\t\t$this->call('LayoutsTableSeeder');\n\t\t$this->call('LayoutDetailsTableSeeder');\n\t\t$this->call('MenusTableSeeder');\n\t\t$this->call('OptionablesTableSeeder');\n\t\t$this->call('OptionsTableSeeder');\n\t\t$this->call('OptionGroupsTableSeeder');\n\t\t$this->call('PagesTableSeeder');\n\t\t$this->call('PriceBreaksTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('ProductsCategoriesTableSeeder');\n\t\t$this->call('SizeListsTableSeeder');\n\t\t$this->call('TypesTableSeeder');\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ContactsTableSeeder');\n\t\t$this->call('RolesTableSeeder');\n\t\t$this->call('PermissionsTableSeeder');\n\t\t$this->call('PermissionRoleTableSeeder');\n\t\t$this->call('AssignedRolesTableSeeder');\n\t\t$this->call('OrdersTableSeeder');\n\t\t$this->call('OrderDetailsTableSeeder');\n\t\tCache::flush();\n\t\t// BackgroundProcess::copyFromVI();\n\t}", "public function run()\n {\n Model::unguard();\n\n User::create([\n 'email' => '[email protected]',\n 'name' => 'admin',\n 'password' => Hash::make('1234'),\n 'email_verified_at' => Carbon::now()\n ]);\n\n factory(User::class, 200)->create();\n\n // $this->call(\"OthersTableSeeder\");\n }", "public function run()\n {\n $this->seedRegularUsers();\n $this->seedAdminUser();\n }", "public function run()\n {\n if (\\App::environment() === 'local') {\n\n // Delete existing data\n\n\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // Truncate all tables, except migrations\n $tables = array_except(DB::select('SHOW TABLES'), ['migrations']);\n foreach ($tables as $table) {\n $tables_in_database = \"Tables_in_\" . Config::get('database.connections.mysql.database');\n DB::table($table->$tables_in_database)->truncate();\n }\n\n // supposed to only apply to a single connection and reset it's self\n // but I like to explicitly undo what I've done for clarity\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n //get roles\n $this->call('AccountSeeder');\n $this->call('CountrySeeder');\n $this->call('StateSeeder');\n $this->call('CitySeeder');\n $this->call('OptionSeeder');\n $this->call('TagSeeder');\n $this->call('PrintTemplateSeeder');\n $this->call('SettingsSeeder');\n\n\n\n if(empty($web_installer)) {\n $admin = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"admin\",\n 'first_name' => 'Admin',\n 'last_name' => 'Doe',\n ));\n $admin->user_id = $admin->id;\n $admin->save();\n\n $adminRole = Sentinel::findRoleById(1);\n $adminRole->users()->attach($admin);\n }\n else {\n $admin = Sentinel::findById(1);\n }\n\n //add dummy staff and customer\n $staff = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"staff\",\n 'first_name' => 'Staff',\n 'last_name' => 'Doe',\n ));\n $admin->users()->save($staff);\n\n foreach ($this->getPermissions() as $permission) {\n $staff->addPermission($permission);\n }\n $staff->save();\n\n $customer = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"customer\",\n 'first_name' => 'Customer',\n 'last_name' => 'Doe',\n ));\n Customer::create(array('user_id' => $customer->id, 'belong_user_id' => $staff->id));\n $staff->users()->save($customer);\n\n //add respective roles\n\n $staffRole = Sentinel::findRoleById(2);\n $staffRole->users()->attach($staff);\n $customerRole = Sentinel::findRoleById(3);\n $customerRole->users()->attach($customer);\n\n\n\n DB::table('sales_teams')->truncate();\n DB::table('opportunities')->truncate();\n\n //Delete existing seeded users except the first 4 users\n User::where('id', '>', 3)->get()->each(function ($user) {\n $user->forceDelete();\n });\n\n //Get the default ADMIN\n $user = User::find(1);\n $staffRole = Sentinel::getRoleRepository()->findByName('staff');\n $customerRole = Sentinel::getRoleRepository()->findByName('customer');\n\n //Seed Sales teams for default ADMIN\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($user->id, $j, $user);\n $this->createOpportunity($user, $user->id, $j);\n }\n\n\n //Get the default STAFF\n $staff = User::find(2);\n $this->createSalesTeam($staff->id, 1, $staff);\n $this->createSalesTeam($staff->id, 2, $staff);\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $staff->id, $j);\n }\n\n foreach (range(1, 3) as $i) {\n $staff = $this->createStaff($i);\n $user->users()->save($staff);\n $staffRole->users()->attach($staff);\n\n $customer = $this->createCustomer($i);\n $staff->users()->save($customer);\n $customerRole->users()->attach($customer);\n $customer->customer()->save(factory(\\App\\Models\\Customer::class)->make());\n\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 5) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $i, $j);\n }\n\n }\n\n //finally call it installation is finished\n file_put_contents(storage_path('installed'), 'Welcome to LCRM');\n }\n }", "public function run()\n {\n if (env('DB_DATABASE') == 'connection') {\n Connection::create([\n \"ruc\" => \"12312312312\",\n \"basedata\" => \"nbdata2018_1\",\n ]);\n \n Connection::create([\n \"ruc\" => \"12312312315\",\n \"basedata\" => \"nbdata2018_2\",\n ]);\n \n $this->call(ConnectionTableSeeder::class);\n } else {\n $this->call(AppSeeder::class);\n }\n }", "public function setupDatabase()\n {\n exec('rm ' . storage_path() . '/testdb.sqlite');\n exec('cp ' . 'database/database.sqlite ' . storage_path() . '/testdb.sqlite');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n # truncates tables before seeding\n foreach ($this->toTruncate as $table) {\n DB::table($table)->delete();\n }\n\n factory(App\\Models\\Product::class, 25)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Post::truncate();\n Comment::truncate();\n // CommentReply::truncate();\n \n\n\n factory(User::class,10)->create();\n factory(Post::class,20)->create();\n factory(Comment::class,30)->create();\n // factory(CommentReply::class,30)->create();\n }", "public function run()\n\t{\n \n Eloquent::unguard();\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\t$this->call('UserTableSeeder');\n\t $this->call('LayerTableSeeder');\n $this->call('UserLevelTableSeeder');\n $this->call('RoleUserTableSeeder');\n $this->call('RoleLayerTableSeeder');\n $this->call('BookmarkTableSeeder');\n \n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n DB::statement('SET foreign_key_checks = 0');\n DB::table('topics')->truncate();\n\n factory(\\App\\Topic::class, 100)->create();\n // ->each(function($topic) {\n\n // // Seed para a relação com group\n // $topic->group()->save(factory(App\\Group::class)->make());\n\n // // Seed para a relação com topicMessages\n // $topic->topicMessages()->save(factory(App\\TopicMessage::class)->make());\n\n // // Seed para a relação com user\n // $topic->user()->save(factory(App\\User::class)->make());\n // });\n \n DB::statement('SET foreign_key_checks = 1');\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n Categoria::truncate();\n Atractivo::truncate();\n Galeria::truncate();\n User::truncate();\n\n $this->call(CategoriasTableSeeder::class);\n $this->call(AtractivosTableSeeder::class);\n $this->call(GaleriasTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n }", "public function run(Faker $faker)\n {\n Schema::disableForeignKeyConstraints();\n DB::table('users')->insert([\n 'name' => $faker->name(),\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n\t $this->call(CategoryTableSeed::class);\n\t $this->call(ProductTableSeed::class);\n\t $this->call(UserTableSeed::class);\n }", "public function run()\n {\n $this->cleanDatabase();\n\n factory(User::class, 50)->create();\n factory(Document::class, 30)->create();\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n \t// DB::table('webapps')->delete();\n\n $webapps = array(\n\n );\n\n // Uncomment the below to run the seeder\n // DB::table('webapps')->insert($webapps);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $tables = array(\n 'users',\n 'companies',\n 'stands',\n 'events',\n 'visitors',\n 'api_keys'\n );\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n }\n\n foreach ($tables as $table) {\n DB::table($table)->truncate();\n }\n\n $this->call(UsersTableSeeder::class);\n $this->call(EventsTableSeeder::class);\n $this->call(CompaniesTableSeeder::class);\n $this->call(StandsTableSeeder::class);\n $this->call(VisitorsTableSeeder::class);\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n $clear = $this->command->confirm('Wil je de database leegmaken? (Dit haalt alle DATA weg)');\n\n if ($clear):\n $this->command->callSilent('migrate:refresh');\n $this->command->info('Database Cleared, starting seeding');\n endif;\n\n $this->call([\n SeedSeeder::class,\n RoleSeeder::class,\n UserSeeder::class,\n // BoardgameSeeder::class,\n BoardgamesTableSeeder::class,\n StatusSeeder::class,\n TournamentSeeder::class,\n AchievementsSeeder::class,\n TournamentUsersSeeder::class,\n ]);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n $this->call(PaisSeeder::class);\n $this->call(DepartamentoSeeder::class);\n $this->call(MunicipioSeeder::class);\n $this->call(PersonaSeeder::class);\n }", "public function run()\n {\n //\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n\n DB::table('events')->truncate();\n \n Event::create([\n 'id' => 1,\n 'name' => 'Spot Registration For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n Event::create([\n 'id' => 2,\n 'name' => 'Spot Screening For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'screen',\n 'formId'\t\t=> 1,\n ]);\n \n Event::create([\n 'id' => 3,\n 'name' => 'Spot Registration For Skin Cancer',\n 'cancerId' => 2,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n\n Event::create([\n 'id' => 3,\n 'name' => 'Registration cum Screening camp for Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addWeeks(1),\n 'eventType'\t\t=> 'register_screen',\n 'formId'\t\t=> 1,\n ]);\n \n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Para que no verifique el control de claves foráneas al hacer el truncate haremos:\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n\t\t// Primero hacemos un truncate de las tablas para que no se estén agregando datos\n\t\t// cada vez que ejecutamos el seeder.\n\t\t//Foto::truncate();\n\t\t//Album::truncate();\n\t\t//Usuario::truncate();\n DB::table('users')->delete();\n DB::table('ciudades')->delete();\n DB::table('tiendas')->delete();\n DB::table('ofertas')->delete();\n DB::table('ventas')->delete();\n\n\n\t\t// Es importante el orden de llamada.\n\t\t$this->call('UserSeeder');\n $this->call('CiudadSeeder');\n\t\t$this->call('TiendaSeeder');\n $this->call('OfertaSeeder');\n $this->call('VentaSeeder');\n }", "public function run()\n {\n $this->call(\\Database\\Seeders\\GroupByRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\SingleIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\MultiIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\JoinFiveTablesSeeder::class);\n\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// // 試しに一回流す\n// $data = $this->makeData(0, 'userFactory', 1);\n// DB::table('users')->insert($data);\n// $data = $this->makeData(0, 'userDetailFactory', 1);\n// DB::table('user_details')->insert($data);\n//\n// // $this->call(UsersTableSeeder::class);\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userFactory', 2500);\n// DB::table('users')->insert($data);\n// }\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userDetailFactory', 2500);\n// DB::table('user_details')->insert($data);\n// }\n }", "public function run()\n {\n $this->truncateTables([\n 'users',\n 'categories',\n 'types',\n 'courses',\n 'classrooms',\n 'contents',\n 'companies',\n ]);\n\n $this->call(CompanyTableSeeder::class);\n $this->call(TypeTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(CoursesTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(ContentTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(ClassroomTableSeeder::class);\n $this->call(TestTableSeeder::class);\n $this->call(BankTableSeeder::class);\n\n\n // factory(\\App\\User::class, 50)\n // ->create()\n // ->each(function ($user) {\n // // $user->companies()->save();\n // $company = \\App\\Company::inRandomOrder()->first();\n // $user->companies()->attach($company->id);\n // $user->assignRole(['participante']);\n // });\n /*\n factory(\\App\\User::class, 50)\n ->create()\n ->each(function ($user) {\n $user->assignRole(['participante']);\n });*/\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Question::truncate();\n Option::truncate();\n// Answer::truncate();\n Quiz::truncate();\n QuizQuestion::truncate();\n\n //for admin\n $admin = factory(User::class)->create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'is_admin' => 1,\n ]);\n\n //for user\n $user = factory(User::class)->create([\n 'name' => 'User',\n 'email' => '[email protected]',\n ]);\n\n factory(Question::class, 100)->create()->each(function ($question) {\n factory(Option::class, mt_rand(2, 4))->create([\n 'question_id' => $question->id,\n ]);\n });\n\n factory(Quiz::class, 10)->create()->each(function ($quiz) {\n\n factory(QuizQuestion::class, mt_rand(5, 10))->create();\n });\n\n\n }", "public function run()\n {\n $this->call([\n SiteSettingsSeeder::class,\n LaratrustSeeder::class,\n CountrySeeder::class,\n GovernorateSeeder::class,\n FaqSeeder::class,\n SitePageSeeder::class,\n UsersSeeder::class,\n ]);\n\n Country::whereiso(\"EG\")->update(['enable_shipping' => true]);\n\n factory(User::class, 400)->create();\n\n Category::create([\n 'en' => [\n 'name' => \"cake tools\"\n ]\n ]);\n\n Category::create([\n 'en' => [\n 'name' => \"Party Supplies\"\n ]\n ]);\n\n $this->call([\n ProductCategorySeeder::class,\n ProductSeeder::class\n ]);\n }", "public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n\n if (App::environment('local')) {\n $this->call(FakeUsersTableSeeder::class);\n $this->call(FakeArticlesTableSeeder::class);\n $this->call(FakeEventsTableSeeder::class);\n }\n }", "public function run()\n {\n Model::unguard();\n\n $this->call(CategoryTypesTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(AccountTypesTableSeeder::class);\n $this->call(TransactionTypesTableSeeder::class);\n\n if (App::environment() !== 'production') {\n $this->call(UserTableSeeder::class);\n $this->call(AccountBudgetTableSeeder::class);\n $this->call(TransactionTableSeeder::class);\n }\n\n Model::reguard();\n }", "public function run()\n {\n User::truncate();\n Product::truncate();\n User::forceCreate([\n 'name' => 'foo',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n factory(User::class, 5)->create();\n factory(Product::class, 5)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n {\n $this->call([UsersTableSeeder::class]);\n $this->call([ContratosTableSeeder::class]);\n $this->call([UsuariosTableSeeder::class]);\n $this->call([UnidadesTableSeeder::class]);\n $this->call([AtestadosTableSeeder::class]);\n }", "public function run()\n {\n Model::unguard();\n\n // $this->call(\"OthersTableSeeder\");\n\n // DB::table('locations')->insert([\n // 'id' => 1,\n // 'name' => 'Default',\n // 'name' => 'district',\n // 'district_id' => 1,\n // 'province_id' => 1,\n // ]);\n }", "public function run()\n {\n $data = include env('DATA_SEED');\n\n \\Illuminate\\Support\\Facades\\DB::table('endpoints')->insert((array)$data);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('admins')->truncate();\n\n for ($i = 0; $i < 10; $i++)\n {\n $faker = Factory::create('en_US');\n $values = [\n 'name' => $faker->userName,\n 'email' => $faker->freeEmail,\n 'password' => bcrypt($faker->password),\n 'phone' => $faker->phoneNumber,\n 'status' => random_int(0,1)\n ];\n admin::create($values);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n DB::beginTransaction();\n// $this->seed();\n DB::commit();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n \\DB::table('provinces')->delete();\n \\DB::table('cities')->delete();\n \\DB::table('districts')->delete();\n // import provinces and cities from sql file\n $sqlFile = app_path() . '/../database/raw/administrative_indonesia_without_districts.sql';\n DB::unprepared(file_get_contents($sqlFile));\n $this->command->info('Successfully seed Provinces and Cities!');\n\n // import districts with latitude and longitude from csv file\n $csvFile = app_path() . '/../database/raw/administrative_indonesia_districts_with_lat_lng.csv';\n $districts = $this->csvToArray($csvFile);\n // check if lat lng exists\n foreach ($districts as $i => $d) {\n if ($d['latitude'] == '') $districts[$i]['latitude'] = 0;\n if ($d['longitude'] == '') $districts[$i]['longitude'] = 0;\n }\n // insert it\n $insert = District::insert($districts);\n if ($insert) $this->command->info('Successfully seed Districts!');\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RegionsTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(SubDistrictsTableSeeder::class);\n $this->call(PostcodesTableSeeder::class);\n\n if (env('APP_ENV') !== 'production') {\n // Wipe up 5 churches, and each church has 5 cells, and each cell has 20 members associated with.\n // In other word, we wipe up 500 church members.\n for ($i = 0; $i < 2; $i++) {\n $church = factory(\\App\\Models\\Church::class)->create();\n\n $church->areas()->saveMany(factory(\\App\\Models\\Area::class, 2)->create([\n 'church_id' => $church->id\n ])->each(function($area) {\n $area->cells()->saveMany(factory(\\App\\Models\\Cell::class, 2)->create([\n 'area_id' => $area->id\n ])->each(function($cell) {\n $cell->members()->saveMany(factory(App\\Models\\Member::class, 10)->create([\n 'cell_id' => $cell\n ]));\n }));\n }));\n }\n }\n }", "public function run()\n {\n User::create([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n ]);\n\n User::create([\n 'name' => 'Leonardo',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789')\n ]);\n\n // seed sin model\n /* DB::table('users')->insert([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]); */\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->environmentPath = env('APP_ENV') === 'production' ||\n env('APP_ENV') === 'qa' ||\n env('APP_ENV') === 'integration' ?\n 'Production':\n 'local';\n //disable FK\n Model::unguard();\n DB::statement(\"SET session_replication_role = 'replica';\");\n\n // $this->call(HrEmployeeTableSeeder::class);\n $this->call(\"Modules\\HR\\Database\\Seeders\\\\$this->environmentPath\\HrEmployeePosTableSeeder\");\n // $this->call(HrEmployeePresetsDiscountTableSeeder::class);\n\n // Enable FK\n DB::statement(\"SET session_replication_role = 'origin';\");\n Model::reguard();\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "protected static function seed()\n {\n foreach (self::fetch('database/seeds', false) as $file) {\n Bus::need($file);\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n $faker = F::create('App\\Proovedores');\n for($i=0; $i < 10; $i++){\n DB::table('users')->insert([\n 'usuario' => $i,\n 'password' => $i,\n 'email' => $faker->email,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Delete all records.\n DB::table('users')->delete();\n // Reset AUTO_INCREMENT.\n DB::table('users')->truncate();\n\n // Dev user.\n App\\Models\\User::create([\n 'email' => '[email protected]',\n 'password' => '$2y$10$t6q81nz.XrMrh20NHDvxUu/szwHBwgzPd.01e8uuP0qVy0mPa6H/e',\n 'first_name' => 'L5',\n 'last_name' => 'App',\n 'username' => 'l5-app',\n 'is_email_verified' => 1,\n ]);\n\n // Dummy users.\n TestDummy::times(10)->create('App\\Models\\User');\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // We did this for test purposes. Shouldn't be doing this for production\n $password = Hash::make('123456');\n\n User::create([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n }", "public function run()\n {\n Model::unguard();\n \n factory('App\\User','admin')->create();\n factory('App\\Evento',100)->create();\n //factory('App\\User','miembro',10)->create();\n factory('App\\Telefono',13)->create();\n factory('App\\Notificacion',10)->create();\n factory('App\\Rubro',10)->create();\n factory('App\\Tecnologia',10)->create();\n factory('App\\Cultivo',10)->create();\n factory('App\\Etapa',10)->create();\n factory('App\\Variedad',10)->create();\n factory('App\\Caracteristica',10)->create();\n factory('App\\Practica',30)->create();\n factory('App\\Tag',15)->create();\n // $this->call(PracticaTableSeeder::class);\n $this->call(TrTableSeeder::class);\n $this->call(MesTableSeeder::class);\n $this->call(SemanasTableSeeder::class);\n $this->call(PsTableSeeder::class);\n $this->call(MsTableSeeder::class);\n $this->call(CeTableSeeder::class);\n $this->call(CvTableSeeder::class);\n $this->call(PtSeeder::class);\n \n\n Model::unguard();\n }", "public function run() {\n $this->call(UserSeeder::class);\n $this->call(PermissionSeeder::class);\n $this->call(CreateAdminUserSeeder::class);\n // $this->call(PhoneSeeder::class);\n // $this->call(AddressSeeder::class);\n\n $this->call(ContactFormSeeder::class);\n //$this->call(ContactSeeder::class);\n\n User::factory()->count(20)->create()->each(function ($user) {\n // Seed the relation with one address\n $address = Address::factory()->make();\n $user->address()->save($address);\n\n // Seed the relation with one phone\n $phone = Phone::factory()->make();\n $user->phone()->save($phone);\n\n // Seed the relation with 15 contacts\n $contact = Contact::factory()->count(25)->make();\n $user->contacts()->saveMany($contact);\n });\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Activity::truncate();\n User::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n $this->call(UserTableSeeder::class);\n $this->call(ActivityTableSeeder::class);\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n \\App\\User::truncate();\n \\App\\Category::truncate();\n \\App\\Product::truncate();\n \\App\\Transaction::truncate();\n DB::table('category_product')->truncate();\n\n \\App\\User::flushEventListeners();\n \\App\\Category::flushEventListeners();\n \\App\\Product::flushEventListeners();\n \\App\\Transaction::flushEventListeners();\n\n\n $usersQuentity = 1000;\n $categoriesQuentity = 30;\n $productsQuentity = 1000;\n $transactionsQuentity = 1000;\n\n factory(\\App\\User::class, $usersQuentity)->create();\n factory(\\App\\Category::class, $categoriesQuentity)->create();\n factory(\\App\\Product::class, $productsQuentity)->create()->each(\n function ($product){\n $categories = \\App\\Category::all()->random(mt_rand(1, 5))->pluck('id');\n\n $product->categories()->attach($categories);\n }\n );\n factory(\\App\\Transaction::class, $transactionsQuentity)->create();\n\n }", "public function run()\n {\n Eloquent::unguard();\n \n $this->call('AdminMemberTableSeeder');\n $this->call('BankInfoTableSeeder');\n $this->call('LocationLookUpTableSeeder');\n $this->call('OrderStatusTableSeeder');\n $this->call('AdminRoleTableSeeder');\n\n }", "public static function setUpBeforeClass()\n {\n parent::setUpBeforeClass();\n $app = require __DIR__ . '/../../bootstrap/app.php';\n /** @var \\Pterodactyl\\Console\\Kernel $kernel */\n $kernel = $app->make(Kernel::class);\n $kernel->bootstrap();\n $kernel->call('migrate:fresh');\n\n \\Artisan::call('db:seed');\n }", "public function run()\n {\n Model::unguard();\n\n if( !User::where('email', '[email protected]')->count() ) {\n User::create([\n 'nombre'=>'Nick'\n ,'apellidos'=>'Palomino'\n ,'email'=>'[email protected]'\n ,'password'=> Hash::make('1234567u')\n ,'celular'=>'966463589'\n ]);\n }\n\n $this->call('CategoriaTableSeeder');\n $this->call('WhateverSeeder');\n $this->call('ProductTableSeeder');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n Model::unguard();\n\n $this->command->info('seed start!');\n\n // 省市县\n $this->call('RegionTableSeeder');\n // 用户、角色\n $this->call('UserTableSeeder');\n // 权限\n $this->call('PurviewTableSeeder');\n // 博文分类\n $this->call('CategoryTableSeeder');\n // 博文、评论、标签\n $this->call('ArticleTableSeeder');\n // 心情\n $this->call('MoodTableSeeder');\n // 留言\n $this->call('MessageTableSeeder');\n // 文件\n $this->call('StorageTableSeeder');\n\n $this->command->info('seed end!');\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n {\n $this->call(RolesDatabaseSeeder::class);\n $this->call(UsersDatabaseSeeder::class);\n $this->call(LocalesDatabaseSeeder::class);\n $this->call(MainDatabaseSeeder::class);\n }", "public function run()\n {\n\n Schema::disableForeignKeyConstraints(); //in order to execute truncate before seeding\n\n $this->call(UsersTableSeeder::class);\n $this->call(PostCategoriesSeeder::class);\n $this->call(TagsSeeder::class);\n $this->call(PostsSeeder::class);\n\n Schema::enableForeignKeyConstraints();\n\n\n }", "public function run()\n {\n // DB::table('users')->insert([\n // ['id'=>1, 'email'=>'nhat','password'=>bcrypt(1234), 'lever'=>0]\n // ]);\n // $this->call(UsersTableSeeder::class);\n // $this->call(CatTableSeeder::class);\n // $this->call(TypeTableSeeder::class);\n // $this->call(AppTableSeeder::class);\n // $this->call(GameTableSeeder::class);\n \n \n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n $this->seedUsers();\n $this->seedAdmins();\n $this->seedMeals();\n\n $this->seedOrder();\n $this->seedOrderlist();\n\n $this->seedReload();\n }", "public function run()\n\t{\n\t\t//composer require fzaninotto/faker\n\t\t\n\t\t$this->call(populateAllSeeder::class);\n\t\t\n\t}", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n Model::unguard();\n\n $faker =Faker\\Factory::create();\n\n // $this->call(UserTableSeeder::class);\n\n $this->seedTasks($faker);\n $this->seedTags($faker);\n\n Model::reguard($faker);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n $this->call([\n CountriesSeeder::class,\n ProvincesSeeder::class,\n SettingsSeeder::class,\n AdminsTableSeeder::class,\n ]);\n }" ]
[ "0.8064933", "0.7848158", "0.7674873", "0.724396", "0.7216743", "0.7132209", "0.70970356", "0.70752203", "0.704928", "0.699208", "0.6987078", "0.69839287", "0.6966499", "0.68990964", "0.6868679", "0.68468624", "0.68307716", "0.68206114", "0.6803113", "0.6803113", "0.6801801", "0.6789746", "0.6788733", "0.6788008", "0.6786291", "0.67765796", "0.67742485", "0.677106", "0.67651874", "0.6761959", "0.675823", "0.67337847", "0.6733437", "0.67295784", "0.67290515", "0.6724652", "0.67226326", "0.6722267", "0.6721339", "0.6715842", "0.67070943", "0.67060536", "0.67031103", "0.6702514", "0.6702361", "0.67017967", "0.6695973", "0.6693496", "0.66868156", "0.66837406", "0.6678434", "0.66755766", "0.66726524", "0.666599", "0.664943", "0.6640641", "0.663921", "0.66387916", "0.6636016", "0.6633116", "0.6629787", "0.6627134", "0.6625862", "0.661699", "0.66093796", "0.6602538", "0.65996546", "0.659914", "0.6596484", "0.6596383", "0.65922767", "0.65922284", "0.65913564", "0.65889347", "0.65812707", "0.65811145", "0.6579546", "0.6578819", "0.6575912", "0.65749073", "0.6574314", "0.657148", "0.65696406", "0.6568972", "0.65624833", "0.6560332", "0.6559092", "0.6557491", "0.65555155", "0.6554255", "0.65509576", "0.6548099", "0.65479296", "0.6545845", "0.65443295", "0.65434265", "0.65432936", "0.654295", "0.65426385", "0.6541781", "0.6539325" ]
0.0
-1
Run the database seeds.
public function run() { // Vaciamos la tabla chat Chat::truncate(); // Obtenemos todos los usuarios $users = User::all(); $var = 5; foreach ($users as $user) { // iniciamos sesión con cada uno JWTAuth::attempt(['email' => $user->email, 'password' => '123123']); // Creamos un chat para cada negocio con este usuario Chat::create([ 'user_id1' => $user->id, 'user_id2' => $var, ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }", "public function run()\n {\n \t$roles = DB::table('roles')->pluck('id');\n \t$sexes = DB::table('sexes')->pluck('id');\n \t$faker = \\Faker\\Factory::create();\n\n \tforeach (range(1,20) as $item) {\n \t\tDB::table('users')->insert([\n \t\t\t'role_id' => $faker->randomElement($roles),\n \t\t\t'sex_id' => $faker->randomElement($sexes),\n \t\t\t'name' => $faker->firstName . ' ' . $faker->lastName,\n \t\t\t'dob' => $faker->date,\n \t\t\t'bio' => $faker->text,\n \t\t\t'created_at' => now(),\n \t\t\t'updated_at' => now()\n \t\t]);\n \t} \n }" ]
[ "0.80130625", "0.79795986", "0.79764974", "0.79524934", "0.7950615", "0.79505694", "0.7944086", "0.7941758", "0.7938509", "0.79364634", "0.79335415", "0.7891555", "0.78802574", "0.78790486", "0.7878107", "0.7875447", "0.78703815", "0.7869534", "0.7851931", "0.7850407", "0.7840015", "0.78331256", "0.7826906", "0.78172284", "0.7807776", "0.78024083", "0.78023773", "0.7799859", "0.77994525", "0.77955437", "0.7790015", "0.77884936", "0.7786196", "0.77790534", "0.7776279", "0.7765613", "0.7761798", "0.7760838", "0.7760613", "0.7760611", "0.7759328", "0.7757682", "0.775591", "0.7752759", "0.774942", "0.7748997", "0.7745014", "0.7728245", "0.7727775", "0.77277344", "0.7716621", "0.77139914", "0.7713781", "0.77135956", "0.7713254", "0.7711222", "0.7710622", "0.7710614", "0.77104497", "0.77100515", "0.770471", "0.77039754", "0.7703702", "0.770327", "0.7702392", "0.7700962", "0.7700507", "0.7698413", "0.76974845", "0.7697178", "0.7696662", "0.76933604", "0.76916313", "0.76898587", "0.7689098", "0.76864886", "0.76862013", "0.76860833", "0.7685714", "0.7683389", "0.76831365", "0.7679125", "0.76774627", "0.767677", "0.7676274", "0.76719916", "0.76704824", "0.76679665", "0.7667335", "0.7667264", "0.76645994", "0.7662546", "0.76618296", "0.7660438", "0.76583356", "0.76564723", "0.76530147", "0.7651929", "0.7651548", "0.7651444", "0.76511025" ]
0.0
-1
Run the database seeds.
public function run() { $this->avatars = json_decode(file_get_contents(__DIR__ . '/avatars.json'), true); Model::unguard(); $this->faker = Faker\Factory::create(); DB::table('organisations')->delete(); DB::table('teams')->delete(); DB::table('users')->delete(); DB::table('team_users')->delete(); DB::table('votes')->delete(); DB::table('criteria')->delete(); $this->call('CriteriaTableSeeder'); for($orgCounter=1;$orgCounter <= 5;$orgCounter++) { DB::table('organisations')->insert(['org_name' => $this->faker->company, 'created_at' => new DateTime, 'updated_at' => new DateTime]); for($teamCounter=1;$teamCounter <= 2; $teamCounter++) { $teamID = DB::table('teams')->insertGetId(['team_name' => ucwords(implode(' ', $this->faker->words($this->getRandNum(1, 3)))), 'org_id' => $orgCounter, 'created_at' => new DateTime, 'updated_at' => new DateTime]); $teamSize = $this->getRandNum(3, 20); $isManager = 1; for($userCounter=1;$userCounter <= $teamSize;$userCounter++) { $avatar = $this->getAvatar(); $userID = DB::table('users')->insertGetId(['email' => $this->faker->email, 'password' => '$2y$10$mxVi9r10MRaUD66RlMqmvug4WZD3ingN5RIDvQZI6AYqS37AABYWG', 'first_name' => $this->faker->firstName, 'last_name' => $this->faker->lastName, 'created_at' => new DateTime, 'updated_at' => new DateTime, 'avatar' => $avatar]); DB::table('team_users')->insert(['team_id' => $teamID, 'user_id' => $userID, 'is_manager' => $isManager, 'created_at' => new DateTime, 'updated_at' => new DateTime]); // do the voting if not a manager for the team if(!$isManager) { $this->insertVotes($userID, $teamID); } $isManager = 0; } } } //Create organisation $orgID = DB::table('organisations')->insertGetId(['org_name' => 'Hack24', 'created_at' => new DateTime, 'updated_at' => new DateTime]); $teamID = DB::table('teams')->insertGetId(['team_name' => 'Team NFC', 'org_id' => $orgID, 'created_at' => new DateTime, 'updated_at' => new DateTime]); $userID = DB::table('users')->insertGetId(['email' => '[email protected]', 'password' => '$2y$10$mxVi9r10MRaUD66RlMqmvug4WZD3ingN5RIDvQZI6AYqS37AABYWG', 'first_name' => 'Bob', 'last_name' => 'Builder', 'created_at' => new DateTime, 'updated_at' => new DateTime, 'avatar' => $this->getAvatar()]); DB::table('team_users')->insert(['team_id' => $teamID, 'user_id' => $userID, 'is_manager' => 1, 'created_at' => new DateTime, 'updated_at' => new DateTime]); $userID = DB::table('users')->insertGetId(['email' => '[email protected]', 'password' => '$2y$10$mxVi9r10MRaUD66RlMqmvug4WZD3ingN5RIDvQZI6AYqS37AABYWG', 'first_name' => 'Matt', 'last_name' => 'Brunt', 'created_at' => new DateTime, 'updated_at' => new DateTime, 'avatar' => $this->getAvatar()]); DB::table('team_users')->insert(['team_id' => $teamID, 'user_id' => $userID, 'is_manager' => 0, 'created_at' => new DateTime, 'updated_at' => new DateTime]); $this->insertVotes($userID, $teamID); $userID = DB::table('users')->insertGetId(['email' => '[email protected]', 'password' => '$2y$10$mxVi9r10MRaUD66RlMqmvug4WZD3ingN5RIDvQZI6AYqS37AABYWG', 'first_name' => 'James', 'last_name' => 'Hodgson', 'created_at' => new DateTime, 'updated_at' => new DateTime, 'avatar' => $this->getAvatar()]); DB::table('team_users')->insert(['team_id' => $teamID, 'user_id' => $userID, 'is_manager' => 0, 'created_at' => new DateTime, 'updated_at' => new DateTime]); $this->insertVotes($userID, $teamID); $userID = DB::table('users')->insertGetId(['email' => '[email protected]', 'password' => '$2y$10$mxVi9r10MRaUD66RlMqmvug4WZD3ingN5RIDvQZI6AYqS37AABYWG', 'first_name' => 'Gaz', 'last_name' => 'Jones', 'created_at' => new DateTime, 'updated_at' => new DateTime, 'avatar' => $this->getAvatar()]); DB::table('team_users')->insert(['team_id' => $teamID, 'user_id' => $userID, 'is_manager' => 0, 'created_at' => new DateTime, 'updated_at' => new DateTime]); $this->insertVotes($userID, $teamID); $userID = DB::table('users')->insertGetId(['email' => '[email protected]', 'password' => '$2y$10$mxVi9r10MRaUD66RlMqmvug4WZD3ingN5RIDvQZI6AYqS37AABYWG', 'first_name' => 'Adoni', 'last_name' => 'Pavlakis', 'created_at' => new DateTime, 'updated_at' => new DateTime, 'avatar' => $this->getAvatar()]); DB::table('team_users')->insert(['team_id' => $teamID, 'user_id' => $userID, 'is_manager' => 0, 'created_at' => new DateTime, 'updated_at' => new DateTime]); $this->insertVotes($userID, $teamID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Define the model's default state.
public function definition() { return [ 'department' => $this->faker->word, 'sector' => $this->faker->word, 'service' => $this->faker->jobTitle, 'person' => $this->faker->name, 'company' => $this->faker->company, 'final' => 0, 'budget' => 100, 'tax_rate' => 0, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDefaultState()\r\n\t{\r\n\t}", "static function get_default_state();", "public function getDefaultUserState();", "private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamName, 0);\n }\n }", "abstract protected function getDefaultModel();", "public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }", "protected function getDefaultModelObject() : void\n {\n return;\n }", "public function applyDefaultValues()\n {\n $this->active = false;\n }", "protected function makeDefault()\n {\n $this->options = [];\n $this->menuSource = MenuSource::STATIC_SOURCE;\n $this->action = new Action(ActionType::MENU(), 'Default menu name', 'Default menu text');\n }", "public function set()\n {\n\t\tif ($this->model->state())\n $this->model->set();\n }", "public function __default()\n\t{\n\n\t}", "protected function initial_set_default() {\n\t\tif ( isset( $this->field[ 'config' ][ 'default' ] ) ) {\n\t\t\t$this->default = $this->field[ 'config' ][ 'default' ];\n\t\t} else {\n\t\t\t$this->default = '';\n\t\t}\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->type = 1;\n\t\t$this->total_index = 0;\n\t\t$this->is_published = true;\n\t\t$this->is_featured = false;\n\t\t$this->comments_count = 0;\n\t}", "public function setModelDefaults() \n {\n if (!empty($this->model->defaultFieldValues())) {\n \n foreach($this->model->defaultFieldValues() as $field => $defaultValue) {\n\n $this->model->$field = $defaultValue;\n }\n } \n }", "function getDefaultState(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_default'=>true));\r\n\t\t$recordSet = $this->db->get(TBL_MST_STATES);\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data[0]->id;\r\n\t}", "public function setValueDefault()\n {\n $this->isActive = true;\n $this->createdAt = new \\DateTime();\n }", "public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->amount = 1;\n $this->amountevaluation = 0;\n $this->defaultstatus = 0;\n $this->defaultdirectiondate = 0;\n $this->defaultenddate = 0;\n $this->defaultpersoninevent = 0;\n $this->defaultpersonineditor = 0;\n $this->maxoccursinevent = 0;\n $this->showtime = false;\n $this->ispreferable = true;\n $this->isrequiredcoordination = false;\n $this->isrequiredtissue = false;\n $this->mnem = '';\n }", "public function getDefaultStateName() {\n return $this->values->get('DefaultStateName');\n }", "public function default() {\n \n $this->data = ModuleConfig::settings();\n // [Module_Data]\n }", "public static function bootStateMachine()\n {\n static::creating(function ($model) {\n $fieldState = $model->getFieldState();\n if (empty($model->$fieldState)) {\n $model->$fieldState = $model->getInitialState();\n }\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::created(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n static::saving(function ($model) {\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::saved(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n }", "function _setModelState()\r\n {\r\n $state = parent::_setModelState(); \r\n $app = JFactory::getApplication();\r\n $model = $this->getModel( $this->get('suffix') );\r\n $ns = $this->getNamespace();\r\n\r\n $state['filter_id_from'] = $app->getUserStateFromRequest($ns.'id_from', 'filter_id_from', '', '');\r\n $state['filter_id_to'] = $app->getUserStateFromRequest($ns.'id_to', 'filter_id_to', '', '');\r\n $state['filter_name'] = $app->getUserStateFromRequest($ns.'name', 'filter_name', '', '');\r\n $state['filter_enabled'] = $app->getUserStateFromRequest($ns.'enabled', 'filter_enabled', '', '');\r\n $state['filter_taxclass'] = $app->getUserStateFromRequest($ns.'taxclass', 'filter_taxclass', '', '');\r\n $state['filter_shippingtype'] = $app->getUserStateFromRequest($ns.'shippingtype', 'filter_shippingtype', '', '');\r\n \r\n foreach (@$state as $key=>$value)\r\n {\r\n $model->setState( $key, $value ); \r\n }\r\n return $state;\r\n }", "public function getInitialState(): StateContract\n {\n return $this->newState(['value' => 1]);\n }", "public function state();", "public function setUserDefaultStatus($userDefaultStatus);", "public function setStateModel($stateModel) {}", "public function getBaseState() {}", "public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('DefaultMetadataValue');\r\n }", "public function set_to_default()\n\t{\n\t\t// SimpleDB requires a value for every attribue...\n\t\t$this->_name = NULL;\n\t\t$this->_contextid = NULL;\n\t\t$this->_userid = NULL;\n $this->_deleted = 0;\n\t\t$this->_lastmodified = 0;\t\n\t}", "public function create_default() {\n if (!$this->model->has_default()) {\n $default_data = [\n 'id' => 1,\n 'name' => 'Beregu',\n 'desc' => 'team vs team',\n ];\n $this->model->create_default($default_data);\n\n $default_data = [\n 'id' => 2,\n 'name' => 'Individu',\n 'desc' => 'individu vs individu',\n ];\n $this->model->create_default($default_data);\n }\n }", "public function __construct(State $model)\n\t{\n\t\t$this->model = $model;\n\t}", "public function getStateModel() {}", "public function set_default_data() {\n\t\t$this->button_text_color = '#FFFFFF';\n\t\t$this->button_background_color = '#6699CC';\n\n\t\t$this->header_text_color = '#FFFFFF';\n\t\t$this->header_background_color = '#6699CC';\n\n\t\t$this->button_text = 'Do Not Sell My Data';\n\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\n\t\t$this->ot_logo = '';\n\t\t$this->display_position = 'right';\n\t\t$this->floating_button\t= '';\n\t\t$this->isLinkEnabled \t= 'textlink';\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->points = '0';\n\t\t$this->type = 0;\n\t\t$this->hidden = 0;\n\t\t$this->relationship_status = 0;\n\t\t$this->show_email = 1;\n\t\t$this->show_gender = 1;\n\t\t$this->show_hometown = 1;\n\t\t$this->show_home_phone = 1;\n\t\t$this->show_mobile_phone = 1;\n\t\t$this->show_birthdate = 1;\n\t\t$this->show_address = 1;\n\t\t$this->show_relationship_status = 1;\n\t\t$this->credit = 0;\n\t\t$this->login = 0;\n\t}", "public function initializeDefaults()\n {\n }", "public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}", "public function setDefaultAttribute($value){\n $this->attributes['default'] = ($value === 'true' || $value ? true : false);\n}", "private function _set_default()\r\n\t{\r\n\t\tif($this->input->post('default'))\r\n\t\t{\r\n\t\t\t$this->db->update('showcases',array('default' => 0));\r\n\t\t\t$this->db->where('id', $this->input->post('default'));\r\n\t\t\t$this->db->update('showcases',array('default' => 1));\r\n\t\t\t\r\n\t\t\t$this->set_message('success', 'Vetrina predefinita aggiornata con successo!');\r\n\t\t\tredirect($this->list);\r\n\t\t}\r\n\t}", "public function applyDefaultValues()\n {\n $this->is_not = false;\n $this->rank = 0;\n }", "public function __default()\r\n \t{\r\n \t if( self::isArg( 'notifwindow') )\r\n \t {\r\n $this->view = \"common_notifwindow\";\r\n \t $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n \t }\r\n \t else\r\n \t {\r\n $this->view = \"dummygame_dummygame\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n \t}", "private function _load_default_model(){\n\n\t\t$default_model_name = strtolower(get_class($this)) . '_model';\n\n\t\tif(file_exists(APPPATH . 'models/' . $default_model_name . '.php')){\n\n\t\t\t$this->load->model($default_model_name, strtolower(get_class($this)));\n\t\t\t$this->_default_model = strtolower(get_class($this));\n\t\t}\n\n\t}", "public function model()\n {\n return State::class;\n }", "public function model()\n {\n return State::class;\n }", "public function getDefault();", "public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}", "protected function initialiseModel()\n {\n parent::initialiseModel();\n\n $this->SelectedTab = 0;\n }", "final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }", "public function useDefaults()\n\t{\n\t\t$this->use_defaults = true;\n\t}", "public function set_behaviors_default_data() {\n\n\t\t$this->is_google_personalize_enabled = 'checked';\n\t\t$this->google_confirmation_title = 'Personalized advertisements';\n\t\t$this->google_confirmation_message = 'Turning this off will opt you out of personalized advertisements delivered from Google on this website.';\n\t\t$this->confirmbutton = 'Confirm';\n\t\t$this->is_email_enabled = 'checked';\n\t\t$this->email_address = '';\n\t\t$this->popup_main_title = 'Do Not Sell My Personal Information';\n\t\t$this->link_text = 'Privacy Policy';\n\t\t$this->link_url = '';\n\t\t$this->privacy_policy_message = 'Exercise your consumer rights by contacting us below';\n\t\t$this->is_phone_enabled = 'checked';\n\t\t$this->phone_number = '';\n\t\t$this->form_link_text = 'Exercise Your Rights';\n\t\t$this->form_link_url = '';\n\t\t$this->form_enable = 'checked';\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\t\t$this->selectuseroption\t\t\t\t = 'All';\n\t\t$this->isIABEnabled \t\t\t\t = 'checked';\n\t\t$this->isLSPAenable \t\t\t\t = '';\n\t}", "public function makeDefault() {\n $this->update([\n 'color' => null,\n 'size' => null\n ]);\n }", "public function applyDefaultData()\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $config = $objectManager->get('\\Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n\n $this->setsup_is_active(1);\n $this->setsup_locale($config->getValue('general/locale/code'));\n $this->setsup_currency($config->getValue('currency/options/base'));\n $this->setsup_country($config->getValue('general/country/default'));\n\n return $this;\n }", "protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\t}", "public function setDefaultStateName($stateName) {\n $this->values->put('DefaultStateName', $stateName);\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "function init() {\n $this->options['selected'] = isset($this->options['value']) ?\n true : @(bool)$this->options['default'];\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function init() {\n\t\t// use this method to initialize default values.\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "protected function cliModelInit()\n {\n }", "function getDefaultValue() \n {\n return $this->getValueByFieldName( 'statevar_default' );\n }", "public function __default()\r\n {\r\n if( self::isArg( 'notifwindow') ) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n } else {\r\n $this->view = \"thecrew_thecrew\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n }", "public function toggleDefault()\n {\n $this->language->default = ! $this->language->default;\n }", "public static function set_default_values() {\n\t\t?>\n\t\tcase \"nu_phone\" :\n\t\t\tfield.label = \"Phone\";\n\t\t\tfield.isRequired = true;\n\t\t\tfield.description = \"Numbers only. e.g. 8885551212\";\n\t\t\tbreak;\n\t\t<?php\n\t}", "function post_model_init($from_cache = FALSE)\n {\n }", "public static function preModel(){\n\t\t\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "protected function get_default() {\n\t\treturn false;\n\t}", "protected function setDefaultTemplate(): void\n {\n $this->setDefaultData(function(Generator $faker) {\n return [\n 'password' => 'xx',\n 'username' => $faker->email,\n 'modified' => time(),\n // set the model's default values\n // For example:\n // 'name' => $faker->lastName\n ];\n });\n }", "function setDefault($value)\n {\n $this->_defValue = $value;\n }", "public function __default()\r\n {\r\n if (self::isArg('notifwindow')) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg(\"table\", AT_posint, true);\r\n } else {\r\n $this->view = \"lettertycoon_lettertycoon\";\r\n self::trace(\"Complete reinitialization of board game\");\r\n }\r\n }", "protected function setDefaults()\n {\n return;\n }", "public function defaultData();", "public function getStatesModel()\n\t{\n\t\treturn $this->statesModel = new StatesModel();\n\t}", "public function getDefaultValue();", "public function getDefaultValue();", "public function applyDefaultValues()\n\t{\n\t\t$this->closed = 0;\n\t\t$this->lastfmid = 0;\n\t\t$this->hasphotos = 0;\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->platform = 'pc';\n\t\t$this->experience_score = 0;\n\t\t$this->up_votes = 0;\n\t\t$this->down_votes = 0;\n\t\t$this->is_guest = 0;\n\t\t$this->is_admin = 0;\n\t\t$this->today_votes = 0;\n\t\t$this->email_on = 1;\n\t}", "private function getStateDefaultStatus($state)\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$status = false;\n $stateNode = $this->_getState($state);\n if ($stateNode) {\n $status = $this->quoteStatusFactory->create()->loadDefaultByState($state);\n $status = $status->getStatus();\n }\n return $status;\n\t\t}\n\t}" ]
[ "0.77757794", "0.72255844", "0.6857964", "0.67950636", "0.67661", "0.6433752", "0.64074224", "0.63712305", "0.61876214", "0.61864567", "0.6159088", "0.61543477", "0.6153316", "0.61428887", "0.6116904", "0.61084956", "0.6106097", "0.60391295", "0.60389197", "0.6019848", "0.5986674", "0.59860927", "0.5976762", "0.59668744", "0.59477085", "0.5901205", "0.58822954", "0.5878731", "0.5871747", "0.5848243", "0.58415335", "0.58413815", "0.5833248", "0.5825086", "0.58250594", "0.5806455", "0.58058864", "0.58041453", "0.58029646", "0.57660234", "0.57429475", "0.57429475", "0.57427984", "0.57279396", "0.5711024", "0.5692638", "0.5673827", "0.566948", "0.5664214", "0.5660662", "0.56602883", "0.5649529", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.56371003", "0.5635351", "0.5633597", "0.5625998", "0.5625998", "0.5625998", "0.5625998", "0.5625998", "0.56185526", "0.5617039", "0.5617039", "0.5617039", "0.559846", "0.5595863", "0.5588903", "0.5571013", "0.5570181", "0.55631495", "0.55542296", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.5544705", "0.55306304", "0.5529163", "0.55278975", "0.5527834", "0.55129236", "0.55105746", "0.5509279", "0.5508973", "0.5508973", "0.5507722", "0.55054384", "0.5486495" ]
0.0
-1
Search the max Id
public static function AddNew($oFacturacion){ $query = " SELECT MAX(facturacionID) FROM crm_facturacion"; $result = parent::GetResult($query); $oFacturacion->facturacionID = parent::fetchScalar($result)+1; //$oFacturacion->varName = $oFacturacion->oFacturacion; //Insert data to table $query = " INSERT INTO crm_facturacion(facturacionID, fechaRegistro, fechaInicio, fechaFin, tallerID) VALUES('$oFacturacion->facturacionID','$oFacturacion->fechaRegistro','$oFacturacion->fechaInicio','$oFacturacion->fechaFin','$oFacturacion->tallerID')"; return parent::Execute($query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function getMaxId () {\n return Dao::queryValue(\"select max(id) from medicines where id < 10000000\");\n }", "private function queryMaxId(){\r\n $this->conexion->conectar();\r\n $consultaMaxId =\"SELECT (max(id_perfil)+1) AS id FROM perfil\";\r\n $queryId = $this->conexion->ejecutar($consultaMaxId);\r\n while(OCIFetch($queryId)){\r\n $id = ociresult($queryId, \"ID\");\r\n }\r\n $this->conexion->desconectar();\r\n return $id;\r\n }", "function getMaxID()\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n\r\n $stmt = \"SELECT\r\n COUNT(sek_id)\r\n FROM\r\n \" . APP_TABLE_PREFIX . \"search_key\";\r\n try {\r\n $res = $db->fetchOne($stmt);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return '';\r\n }\r\n return $res;\r\n }", "function recupererid(){\n\t\t$sql=\"select max(idres) maximum from reservation \";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\t foreach($liste as $row){$id=$row['maximum'] ;}\n\t\t return $id;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function max_id()\n\t{\n\t\t$this->db->select_max('id');\n\t\t$query = $this->db->get($this->_tables['fuel_navigation']);\n\t\t$data = $query->row_array();\n\t\treturn $data['id'];\n\t}", "public function idMax ()\n {\n $db = $this->dbConnect ();\n $req = $db->query ('SELECT id_chapter,number_chapter FROM chapter ORDER BY id_chapter DESC LIMIT 0,1');\n $resultat = $req->fetch ();\n return $resultat;\n }", "function getLastID (){\n\n $connetion = $this->conexionMongoDB();\n\n // Si se dio la conexion\n if ($connetion!=null){\n\n $filter = array();\n // Estableciendo las opciones apra que solo se traiga el id mas alto en la base de datos\n $options = ['sort' => ['id' => -1],'limit'=> 1];\n $cursor = array();\n try{\n\n $query = new MongoDB\\Driver\\Query($filter,$options);\n $cursor = $connetion->executeQuery($this->credentials->getNameMongoDB().\".\".$this->credentials->getCollection(),$query);\n\n }catch (MongoDB\\Driver\\Exception $e){\n\n $_SESSION['title'] = TITLE_FAIL_CONNECTION;\n $_SESSION['message'] = MESSAGE_MONGO_EXCEPTION;\n header(\"Location: ../php/mensaje.php\");\n\n }\n catch (Exception $e){\n echo $e->getMessage();\n die();\n }\n\n $id_max = 0;\n\n foreach ($cursor as $element){\n $id_max = $element->id;\n }\n\n return $id_max;\n\n }\n\n }", "public function poslednji_vestackiId() \n {\n $ocene=$this->findAll();\n $maxId=-1;\n foreach ($ocene as $ocena)\n {\n if ($ocena->VestackiId>$maxId)\n {\n $maxId=$ocena->VestackiId; \n }\n }\n return $maxId;\n }", "public static function getMaxNumId()\n {\n $db = JFactory::getDbo();\n\n $query = $db->getQuery(true);\n\n $query = \"SELECT num_id\n FROM #__papiersdefamilles_documents AS a \n WHERE a.id =\n (SELECT MAX(id) FROM #__papiersdefamilles_documents WHERE num_id != '')\";\n\n $result = $db->setQuery($query)->loadResult();\n\n return $result;\n }", "function getIdMaxNouvelle($idRSS) {\n /*$sql = \"SELECT MAX(id) as max FROM Nouvelle WHERE idRSS = ?\";\n $req = $this->db->prepare($sql);\n $params = array($idRSS);\n $res = $req->execute($params);\n debug($this->db,$sql,$params);\n if ($res === FALSE) {\n die(\"getIdMaxNouvelle error: Requête impossible !\\n\");\n }\n $res = $req->fetchAll();\n if (isset($res[0]))\n return $res[0]['max'];\n else\n return 0;*/\n die(\"Fonction getIdMaxNouvelle utilisée ! Faut me garder !\");\n }", "function get_max_id($mdb,$coll,$field){\n $prevmdb = $this->mdb;\n $prevcollection = $this->collection;\n\n $max_log = new thelog();\n \n \t$this->setMdb($mdb);\t\t//set db\n \t$this->setDbcoll($coll); //set collection\n \n $check = $this->query();\t//run query\n\t\t$size = sizeof($check) + 1;\n\t\t$doc['_id'] = $size;\n\t\t\n\t\t$check = $this->query([$doc]);\t\n\t\twhile(sizeof($check) > 0)\n\t\t{\n\t\t\t$size++;\n\t\t\t$doc['_id'] = $size;\n\t\t\t$check = $this->query($doc);\n\t\t}\n //total hack !!!!!\n\n return $size;\n\n // need to rewrite / test below\n if(sizeof($check) > 0){\n if(array_key_exists($check[0],$field)){\n $options = [\t\t\t\t//sort descending so largest val at index 0\n 'sort' => [\n $field => -1\n ],\n ];\n $max = $this->query([],$options);\t//run query\n $max = (array)$max[0];\t\t\t\t//convert to array so I can index\n $max = $max[$field];\n }\n }else{\n $max = 0;\n }\n \t\t\t\t\t\t\t\t\t\t\t\n \t$this->setMdb($prevmdb);\t\t\t //re-set db\n \t$this->setDbcoll($prevcollection); //re-set collection\n\t\t\t\t\t\t\t\t\t\t\t\n\t\treturn \t$max;\n }", "public function getIdMax() {\n $sql = \"select ItemID from Mst_ItemList\";\n $query = $this->db->query($sql);\n $jml = $query->num_rows();\n if ($jml == 0) {\n $ItemID = \"001\";\n return $ItemID;\n } else {\n $sql = \"select max(ItemID) as ItemID from Mst_ItemList\";\n $query = $this->db->query($sql);\n $hasil = $query->result();\n $ItemID = $hasil[0]->ItemID;\n $ItemID = sprintf('%06u', $ItemID + 1);\n return $ItemID;\n }\n }", "public function getMaxId()\n {\n $query = \"SELECT MAX(id) FROM \".$this->table.\" WHERE ticket<>''\";\n \n $this->db->query($query);\n\n return $this->db->single();\n }", "public function log_fetch_highest_id () {\n\t\t# fetch\n\t try { $id = $this->Database->getObjectQuery(\"select id from logs order by id desc limit 1;\"); }\n\t\tcatch (Exception $e) { $this->Result->show(\"danger\", $e->getMessage(), false);\treturn false; }\n\t\t# return result\n\t\treturn $id->id;\n\t}", "function getMaxId($db)\n{\n $info['table'] = \"account\";\n $info['fields'] = array(\n \"max(id) as maxid\"\n );\n $info['where'] = \"1=1\";\n\n $resmax = $db->select($info);\n if (count($resmax) > 0) {\n $max = $resmax[0]['maxid'] + 1;\n } else {\n $max = 0;\n }\n return $max;\n}", "public function selectMaxKey(): ?int;", "function getMaxId($table,$kolom) \n\t{\n\t\t$maxid = $this->db->query('SELECT MAX('.$kolom.') AS maxid FROM '.$table.'')->row()->maxid;\n\t\treturn $maxid;\n \t}", "function do_get_max_s_id() {\n\t# Dim some Vars\n\t\tglobal $_CCFG, $_DBCFG, $db_coin;\n\t\t$max_s_id = $_CCFG['BASE_SUPPLIER_ID'];\n\n\t# Set Query and select for max field value.\n\t\t$query\t= 'SELECT max(s_id) FROM '.$_DBCFG['suppliers'];\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\tIF ($db_coin->db_query_numrows($result) ) {\n\n\t\t# Get Max Value\n\t\t\twhile(list($_max_id) = $db_coin->db_fetch_row($result)) {$max_s_id = $_max_id;}\n\t\t}\n\n\t# Check / Set Value for return\n\t\treturn $max_s_id;\n}", "protected static function max_id(){\n\n\t\t$rows = static::_scandir(static::path());\n\n\t\tif($rows){\n\n\t\t\tforeach ($rows as &$value) {\n\n\t\t\t\t$row[] = str_replace(EXT, '', $value);\n\n\t\t\t\tunset($value);\n\t\t\t}\n\n\t\t}else{\n\n\t\t\t$row = array(0);\n\t\t}\n\n\t\treturn intval(max($row));\n\t}", "public function recupereMaxId()\n {\n return $this->getGreaterId('membre_jury');\n }", "public static function getIdMax($table){\n\t\t\t$lesValeurs = BDDJSON::lireAll($table);\n\t\t\t$id = 0;\n\t\t\tforeach($lesValeurs as $val){\n\t\t\t\tif($val[\"id\"]>$id){\n\t\t\t\t\t$id = $val[\"id\"];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn ($id+1);\n\t\t}", "function get_max_id($table_name) {\n\tglobal $db, $dbname;\n $stmt = $db->prepare(\"SELECT MAX(id) AS max_id FROM `$dbname`.`$table_name`\");\n $stmt->execute();\n $invNum = $stmt->fetch(PDO::FETCH_ASSOC);\n return $invNum['max_id'];\n}", "function max_id($table, $id=\"id\")\n {\n $sth = $this->dbh->prepare($sql=\"SELECT MAX($id) FROM $table\");\n if ($sth == false) {\n $this->err(\"max_id: $sql\");\n return -1;\n }\n\n $sth->execute();\n $val = $sth->fetch(PDO::FETCH_NUM);\n\n return $val[0];\n }", "protected function getMaxId($table,$primary_key){\n $con = $this->connect();\n $sql = \"SELECT MAX($primary_key) AS max_id FROM $table \";\n $query_sql = mysqli_query($con, $sql);\n $result = NULL;\n while ($data = mysqli_fetch_object($query_sql)) {\n $result = $data->max_id;\n }\n return $result;\n }", "public function LastID()\r\r\n {\r\r\n $query=\"SELECT MAX(id) as Max FROM DevisVente WHERE 1\";\r\r\n $req = $this->connexion->getConnexion()->query($query);\r\r\n\r\r\n $dv = $req->fetchAll(PDO::FETCH_OBJ);\r\r\n\r\r\n return $dv;\r\r\n }", "public function getIdMax() {\n $maxId = myPDO()->query('SELECT MAX(member_id) FROM members');\n return $maxId->fetch()[0];\n }", "public function obterIdReserva() {\n \n $sql = \"SELECT MAX(idReserva) AS idReserva FROM reservas\";\n $query = $this->query->setQuery($sql);\n return $query;\n }", "function get_max_id($table_name,$col_name=\"id\") {\n\tglobal $db, $dbname;\n //$stmt = $db->prepare(\"SELECT MAX($col_name) AS max_id FROM `$dbname`.`$table_name`\");\n $stmt->execute();\n $invNum = $stmt->fetch(PDO::FETCH_ASSOC); //echo \"Max:\".$invNum['max_id'];\n return $invNum['max_id'];\n}", "public function VerUltimoID()\r\n {\r\n\t\r\n\t$reg=mysql_query(\"select max($this->ID) as maxID from $this->tabla\", $this->con) or die('no se pudo encontrar el ultimo ID en VerUltimoID: ' . mysql_error());\r\n\t$reg=mysql_fetch_array($reg);\t\r\n\t\r\n\treturn($reg[\"maxID\"]);\r\n\t\r\n\t}", "function getLastPofId()\n\t {\n\t\t \n\t\t $query = $this->db->query('SELECT max(pof_id) as maxid FROM pof');\n $row = $query->row();\n $max_id = $row->maxid; \n\t\t\t return $max_id; \n\t\t }", "public function get_max_invoice_id()\n {\n $data = $this->db->query(\"SELECT MAX(id) AS id FROM invoices\");\n\n return $data->result();\n }", "function get_id_max_ins()\n\t{\n\t\t$kode = 'INS';\n\t\t$sql = \"SELECT MAX(id_instansi) as max_id FROM tb_instansi\";\n\t\t$row = $this->db->query($sql)->row_array();\n\t\t$max_id = $row['max_id'];\n\t\t$max_no = (int) substr($max_id,4,8);\n\t\t$new_no = $max_no + 1;\n\t\t$new_id_instansi = $kode.sprintf(\"%05s\",$new_no);\n\t\treturn $new_id_instansi;\n\t}", "public function getMaxId()\n {\n return base64_encode($this->maxId);\n }", "public function getMaximumId($restaurant){\r\n $stmt = $this->db->prepare(\"SELECT MAX(id_event) as max_id FROM event WHERE restaurant = ?\");\r\n $stmt->execute(array($restaurant));\r\n $max = $stmt->fetch(PDO::FETCH_ASSOC);\r\n $aux = $max['max_id'];\r\n return $aux;\r\n }", "public function getMaxId(){\n\t\t$result = mysql_query(\"Select MAX(cust_id) from customer\");\n\t\tif($row = mysql_fetch_array($result)){\n\t\t\treturn $row[0];\n\t\t}\n\t\treturn NULL;\n\t}", "function findMaxMboxID() {\n global $db;\n\n $dbq = $db->execute(\"select mbox_id from tblMailBoxes\");\n $dbq->lastrow();\n $this->mbox_id = $dbq->fields['mbox_id'];\n $dbq->close();\n\n return $this->mbox_id;\n }", "public function getMaxId($table)\n {\n try{\n $this->stmt = $this->db->prepare(\"SELECT MAX(id) FROM `{$table}`\");\n $this->stmt->execute();\n $result = $this->stmt->fetch(PDO::FETCH_ASSOC);\n if(empty($result['MAX(id)'])){\n $result = 0;\n }\n return $result['MAX(id)'];\n } \n \n catch (PDOException $e)\n {\n $this->error = $e->getMessage(); \n return false;\n }\n }", "public function getMaxID(){\n\t\t try{\n\t\t\t$conn = DBConnection::GetConnection();\t\n\t\t\t$queryForGetMaxId=\"SELECT MAX(video_id) AS max_value FROM video\";\n\t\t\t$max_result=$conn->prepare($queryForGetMaxId);\n\t\t\t$max_result->execute();\n\t\t\t$maxId = $max_result->fetch(PDO::FETCH_ASSOC); \n\t\t\t$pId=$maxId['max_value']; \n\t\t\t$incrementPid=$pId+1;\n\t\t\treturn $incrementPid;\n\t\t}catch(PDOException $e){\n\t\t\techo 'Fail to connect';\n\t\t\techo $e->getMessage();\n\t\t}\t\n }", "public static function getMaximumId()\n\t{\n\t\treturn (int) BackendModel::getDB()->getVar('SELECT MAX(i.id) FROM content_blocks AS i LIMIT 1');\n\t}", "public static function getParameterKeyMaxId()\n {\n return config('consts.ParameterMaxId');\n }", "function max_post_id(){\n $query = \"SELECT MAX(ID) AS max\n FROM \".PREFIX.\"entries\";\n $result = mysql_query($query) or die(\"max_id: Anfrage fehlgeschlagen: \" . mysql_error());\n $row = mysql_fetch_array($result);\n mysql_free_result($result);\n return intval($row['max']);\n}", "public function calcularId(){\n\n $registros = PorcentajeBecaArancel::All();\n\n $max_valor = count($registros);\n\n\n if($max_valor > 0){\n\n $max_valor++;\n\n } else {\n\n $max_valor = 1;\n }\n\n return $max_valor;\n\n }", "public static function get_max_order_detail_id(){\r\t\t$qry = \"SELECT MAX(`ord_dtl_id`) as last_detail FROM \".TBL_ORDER_DETAILS.RET;\r\t\t$res = mysql_query($qry);\r\t\tif($res && is_gt_zero_num(mysql_num_rows($res))){\r\t\t\treturn mysql_result($res,0); \t\t\r\t\t}\t\t\r\t\treturn 0;\r\t}", "public static function get_max_id($table_name, $user_id = null){\n\t\t/*\n\t\t * If the soft delete is enabled, it will get the max for non-soft-deleted rows. \n\t\t * We need to turn off the soft_delete option before getting the max value, and the rest it to previous value. \n\t\t */\n\t\t$tmp_disable_mysql_delete = static::$disable_mysql_delete;\n\t\tstatic::$disable_mysql_delete = false;\n\t\t\t\n\t\t$model_name = Model_Kiwi::model_name($table_name);\n\t\t$id_column = Model_Kiwi::singularize($table_name) . '_id';\n\n\t\tif($user_id != null)\n\t\t\t$query_statement = \"select max(\" . $id_column . \") as max_id1 from \" . $table_name. \" where user_id = \" . $user_id;\n\t\telse\n\t\t\t$query_statement = \"select max(\" . $id_column . \") as max_id1 from \" . $table_name;\n\n\t\t$max_ids = $model_name::find_by_sql($query_statement);\n\n\t\t$max_id_value = (sizeof($max_ids) > 0)? $max_ids[0]->max_id1 : 0;\n\t\tstatic::$disable_mysql_delete = $tmp_disable_mysql_delete;\n\t\treturn $max_id_value;\n\t}", "function getMaxId($table)\n {\n $sql = \"select MAX(product_code) as max_code from $table\";\n $result = $this->conn->prepare($sql);\n $result->execute();\n if ($result->rowCount() > 0) {\n return $result->fetch(PDO::FETCH_ASSOC);\n }\n $this->conn = null;\n }", "public function setMaxId($maxId)\n {\n $this->max_id = (int)$maxId;\n return $this;\n }", "public function getdernierid(){ \n $req=\"SELECT id FROM contrat WHERE id = (SELECT MAX(id) FROM contrat)\";\n //print_r($req);\n $resultat = $this->pdo->query($req);\n $ligne = $resultat->fetch();\n $donnees = $ligne['id'];\n return intval($donnees);\n }", "public function getLastId()\n {\n return $this->galleryMapper->getMaxId();\n }", "public function getMaxResults();", "public function getMaxID(){\n\t\t try{\n\t\t\t$conn = DBConnection::GetConnection();\t\n\t\t\t$queryForGetMaxId=\"SELECT MAX(product_id) AS max_value FROM product\";\n\t\t\t$max_result=$conn->prepare($queryForGetMaxId);\n\t\t\t$max_result->execute();\n\t\t\t$maxId = $max_result->fetch(PDO::FETCH_ASSOC); \n\t\t\t$pId=$maxId['max_value']; \n\t\t\t$incrementPid=$pId+1;\n\t\t\treturn $incrementPid;\n\t\t}catch(PDOException $e){\n\t\t\techo 'Fail to connect';\n\t\t\techo $e->getMessage();\n\t\t}\t\n }", "function getMaxID() {\n $con = getConnection();\n $sql = \"SELECT MAX(ID) FROM members_tab;\";\n \n if ($stmt = mysqli_prepare($con, $sql)) {\n mysqli_stmt_execute($stmt);\n mysqli_stmt_bind_result($stmt, $data); \n while (mysqli_stmt_fetch($stmt)) {\n return $data;\n } \n mysqli_stmt_close($stmt);\n }\n closeConnection($con);\n }", "function minusOneFromMaxID($maxID) {\n\t//Tweet ID is stored a string. We need to subtract 1 from tweet ID in order to get all tweets lower than the last tweet. Because of the\n\t//length of the tweetID, this causes maths problems. I used this string function to subtract 1.\n\t for ($i=strlen($maxID)-1;$i>=0;$i--) {\n\t\t $currentNum=substr($maxID,$i,1) ;\n\t\t if($currentNum==0) {\n\t \t\t$maxID=substr_replace($maxID,9,$i,1);\n\t \t} else {\n\t\t \t$maxID=substr_replace($maxID,$currentNum-1,$i,1) ;\n\t\t \tbreak ;\n\t \t}\n \t}\n\treturn $maxID ;\n}", "public function maxIdNoticia()\n\t{\n\t\t$data_table = $this->data_source->ejecutarConsulta(\"SELECT MAX(id_noticia) as maxid FROM noticias \");\n\t\treturn $data_table;\n\t}", "public function get_last_personnel_id(){\n\t$query = $this->db->query(\"SELECT SUBSTR(MAX(personnel_id),-8) AS id FROM human_pa_md_emp_personal\");\n\n\treturn $query;\n\t}", "public function get_last_personnel_id(){\n\t$query = $this->db->query(\"SELECT SUBSTR(MAX(personnel_id),-8) AS id FROM human_pa_md_emp_personal\");\n\n\treturn $query;\n\t}", "function Atv_getLastIdPresensi(): int\n{\n return PresensiGroup::orderByDesc('id')->first('id')->id;\n}", "public function getLastId();", "public function getLastId();", "public static function getMaxId($sender, $receiver)\n{\n $maxid = DB::select('select MAX(global_id) as max from messages where sender IN (\"'.$sender.'\", \"'.$receiver.'\") AND receiver IN (\"'.$sender.'\", \"'.$receiver.'\")')[0]->max;\n return $maxid; \n}", "protected function getLastId(){\n $student_current_id = \"SELECT students.id FROM `students` ORDER BY id DESC LIMIT 1\";\n $sql = $this->conn->prepare($student_current_id);\n $sql->execute();\n\n $result = $sql->setFetchMode(PDO::FETCH_ASSOC);\n $student_id = $sql->fetchAll();\n echo \"<br><br><br><br>\";\n foreach ($student_id as $id){\n $my_id = $id['id'];\n }\n return $my_id;\n }", "function seuraavaID(){\n $kysely = haeYhteys()->prepare(\"SELECT MAX(sanaid) as suurin FROM sana\");\n $kysely->execute();\n $suurin = $kysely->fetchObject()->suurin;\n return $suurin + 1 ;\n }", "function getIDTabelRiwayatPangkat(){\n\t$query = mysql_query(\"SELECT MAX(id_data) as 'Max' FROM tbl_riwayat_pangkat\") or die(mysql_error());\n\t$row = mysql_fetch_array($query);\n\t$maks = $row['Max'];\n\t$ID = \"\";\n\t\n\tif($maks > 0){\n\t\t$ID = $maks + 1;\n\t}else{\n\t\t$ID = 1;\n\t}\n\t\n\treturn $ID;\n}", "public function getLastId() \n {\n if(!Patient::all() -> isEmpty()){\n $recentId = Patient::orderBy('patient_id', 'desc')->first()->patient_id;\n return $recentId;\n }\n }", "private function maxOrderListOfRoot($id_root)\n {\n return post_data()->result(\"MAX(order_list)\", \"id_root=$id_root\");\n }", "public function id_sub_kriteria()\n {\n $q = $this->db->query(\"select MAX(RIGHT(id_sub_kriteria,5)) as id_max from tbl_sub_kriteria\");\n $id = \"\";\n if ($q->num_rows() > 0) {\n foreach ($q->result() as $k) {\n $tmp = ((int) $k->id_max) + 1;\n $id = sprintf(\"%05s\", $tmp);\n }\n } else {\n $id = \"00001\";\n }\n return \"SKR-\" . $id;\n }", "function _getMaxNr($a_item_id)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$q = \"SELECT max(nr) AS max_nr FROM map_area WHERE item_id = \".\n\t\t\t$ilDB->quote($a_item_id, \"integer\");\n\t\t$max_set = $ilDB->query($q);\n\t\t$max_rec = $ilDB->fetchAssoc($max_set);\n\n\t\treturn $max_rec[\"max_nr\"];\n\t}", "public static function max_photo_id() {\n\t\t$sql = \"SELECT MAX(photo_id) AS photo_id FROM photo_directory;\";\n\t\t$sql_dbo = mysql_query($sql);\n\t\t$sql_row = mysql_fetch_assoc($sql_dbo);\n\t\t$max_photo_id = $sql_row['photo_id'];\n\t\treturn $max_photo_id;\n\t}", "public static function BuscarUltimaID() {\n try {\n $sql = \"SELECT max(id) as id FROM tb_consultorio\";\n $op = Conexao::getInstance()->prepare($sql);\n $op->execute();\n return (object) $op->fetch(PDO::FETCH_ASSOC);\n } catch (Exception $e) {\n print \"Ocorreu um erro ao tentar executar esta ação, tente novamente mais tarde.\";\n print_r ($e);\n }\n }", "static function getLastID()\r\n {\r\n $tableUser = DatabaseManager::getNameTable('TABLE_USER');\r\n\r\n $query = \"SELECT MAX(id) AS Max FROM $tableUser\";\r\n\r\n return DatabaseManager::singleFetchAssoc($query)[\"Max\"];\r\n }", "public function getMax(): int;", "public static function generateMaxPartyOrderNo(){\n $maxPartyOrderId = 0;\n try{\n $connection = Yii::App()->db;\n $sql= \" SELECT COALESCE(MAX(por.id), 0) partyOrderId\n FROM DK_PARTYORDERS_REQUEST por\n WHERE 1\";\n $command = $connection->createCommand($sql);\n $partyOrderDetailsArr = $command->queryAll();\n if(count($partyOrderDetailsArr)==1 && $partyOrderDetailsArr!=false){\n $maxPartyOrderId = $partyOrderDetailsArr[0]['partyOrderId']; \n }\n }catch(Exception $ex){}\n return $maxPartyOrderId;\n }", "function getMaxBatch(){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"SELECT MAX(batch_no) from breeding_tbl\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['MAX(batch_no)'];\n\n\t}\n\n\t$crud->disconnect();\n}", "public function max($field = 'id'){\n return $this->model->max($field);\n }", "public function setMaxId($sMaxId)\n\t{\n\t\t$this->aParameters['max_id'] = $sMaxId;\n\t}", "static public function mdlObtenerUltimoId() {\r\n\r\n $sql = \"SELECT * FROM compras ORDER BY id DESC Limit 1\";\r\n\r\n $stmt = Conexion::conectar()->prepare($sql);\r\n\r\n $stmt -> execute();\r\n\r\n return $stmt -> fetch();\r\n\r\n }", "public function returnMoreFindByPK($id);", "public function getMax();", "function get_last_id()\n {\n // TODO: Implement get_last_id() method.\n }", "function new_main_user_id() {\n global $db;\n global $config;\n\n // sprawdz ilosc produktow w bazie\n\t$maxid=1;\n\n\t$query=\"SELECT max(id) AS maxid FROM main\";\n\t$result=$db->Query($query);\n\tif ($result!=0) {\n\t $num_rows=$db->NumberOfRows($result);\n\t if ($num_rows>0) {\t\t\n\t\t$maxid=$db->FetchResult($result,0,\"maxid\");\n\t\t$maxid++;\n\t }\n\t} else die ($db->Error());\n \n\treturn $maxid;\n }", "public function lastId();", "public function getMaxFuelId($conditions='') {\n\n $query = \"SELECT\n IFNULL(MAX(fuelId),0) AS fuelId\n FROM\n fuel\n $conditions\";\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "function getRecentPurchaseId(){\n global $db;\n \n $stmt=$db->prepare(\"SELECT MAX(idPurchase)AS idPurchase from purchases\");\n \n $results=[];\n if($stmt->execute() && $stmt->rowCount()>0){\n $results = $stmt->fetch(PDO::FETCH_ASSOC);\n }\n else{\n $results = false;\n }\n return $results;\n }", "function getMaxPmid() {\r\n\t$url = 'http://chemotext.mml.unc.edu:7474/db/data/transaction/commit';\r\n\r\n\t$payload = array(\r\n\t\t\"statements\" => array(\r\n\t\t\tarray(\r\n\t\t\t\t\"statement\" => \"MATCH (n:Art) RETURN max(n.pmid)\"\r\n\t\t\t)\r\n\t\t)\r\n\t);\r\n\t\r\n\t$options = array(\r\n\t\t'http' => array(\r\n\t\t\t'header' => \"Content-type: application/json\\r\\n\",\r\n\t\t\t'method' => 'POST',\r\n\t\t\t'content' => json_encode($payload)\r\n\t\t)\r\n\t);\r\n\t\r\n\t$context = stream_context_create($options);\r\n\t$result = file_get_contents($url, false, $context);\r\n\tif ($result === FALSE) { \r\n\t\treturn;\r\n\t}\r\n\t$max = json_decode($result, true);\r\n\treturn $max[\"results\"][0][\"data\"][0][\"row\"][0];\t\r\n}", "public static function get_max_order_id()\n\t{\n\t\t$database\t= new database();\n\t\t$sql\t\t= \"SELECT MAX(order_id) AS order_id FROM planning_gallery\";\n\t\t$result\t\t= $database->query($sql);\n\t\t\n\t\tif ($result->num_rows > 0)\n\t\t{\n\t\t\t$data\t= $result->fetch_object();\n\t\t\treturn $data->order_id > 0 ? $data->order_id : 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}", "public static function getMax($model)\n { \n $sql=\"SELECT hasil,by_user from $model ORDER BY CONVERT(hasil, UNSIGNED INTEGER) DESC LIMIT 1\";\n $connection=Yii::app()->db; \n $command=$connection->createCommand($sql);\n $dataReader=$command->query(); // execute a query SQL\n $rows=$dataReader->readAll();\n return $rows; \n }", "private function get_last_id($id){\n return DB::select('select max(hours_id) as last_id from hours where user_id = :id', ['id' => $id]);\n }", "function idUltimaEstructura()\r\n {\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $q = Doctrine_Query::create($conn);\r\n\r\n ///$resultTotal \t= $this->conn->getTable ('DatEstructura')->findAll ();\r\n $result = $q->select(\"max(idestructuraop)\")->from('DatEstructuraop ')->execute();\r\n $arrelo = $result->toArray();\r\n return $arrelo[0]['max'];\r\n //$solve \t\t\t= array ('cant' => $resultTotal->count (), 'datos' => $resultado);\r\n\r\n }", "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n // eliminar el campo\r\n $result = $query->select('max(a.idcampo) as maximo')\r\n ->from('NomCampoestruc a')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n }", "function lastid(){\n\t\t$query = 'SELECT idVideo FROM video Order By idVideo Desc Limit 1';\n\t\t$link = createConection();\n\t\tif($row = pg_fetch_array(pg_exec($link,$query))){\n\t\t\tcloseConection($link);\n\t\t\treturn $row['idvideo'];\n\t\t}else{\n\t\t\tcloseConection($link);\n\t\t\treturn 0;\n\t\t}\n\t}", "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n\r\n // eliminar el campo\r\n $result = $query->select('max(a.idagrupacion) as maximo')\r\n ->from('NomAgrupacion a')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n\r\n }", "public function getLastId2()\r\n\t{\r\n\t\tif (Conexion::getEstatusConexion()) {\r\n\t\t\t$strSql = 'SELECT id_investigacion FROM investigaciones ORDER BY id_investigacion DESC LIMIT 1;';\r\n\t\t\t$respuestaArreglo = [];\r\n\t\t\t$id = 0;\r\n\t\t\ttry {\r\n\t\t\t\t$strExec = Conexion::prepare($strSql);\r\n\t\t\t\t$strExec->execute();\r\n\t\t\t\t$respuestaArreglo = $strExec->fetchAll();\r\n\t\t\t\tforeach ($respuestaArreglo as $valor) {\r\n\t\t\t\t\t$id = $valor['id_investigacion'];\r\n\t\t\t\t}\r\n\t\t\t} catch (PDOException $e) {\r\n\t\t\t\t\r\n\t\t\t\treturn $id;\r\n\t\t\t}\r\n\r\n\t\t\treturn $id;\r\n\t\t} else {\r\n\t\t\treturn $id;\r\n\t\t}\r\n\t}", "public function getLast()\n {\n // inicia transao\n if ($conn = TTransaction::get()) {\n // instancia instruo de SELECT\n $sql = new TSqlSelect;\n $sql->addColumn('max(ID) as ID');\n $sql->setEntity($this->getEntity());\n\n\n // cria log e executa instruo SQL\n TTransaction::log($sql->getInstruction());\n $result = $conn->Query($sql->getInstruction());\n // retorna os dados do banco\n $row = $result->fetch();\n\n return $row[0];\n } else {\n // se no tiver transao, retorna uma exceo\n throw new Exception('No h transao ativa !!');\n }\n }", "function lastId()\n {\n return isset($this->_query) ? $this->_query->lastId() : $this->_lastid;\n }", "function lastIdProduit() {\n $sql = \"SELECT MAX(idProduit)\n FROM PRODUIT\";\n $req_prep = Model::$pdo->prepare($sql); \n $req_prep->execute();\n $req_prep->setFetchMode(PDO::FETCH_CLASS, 'ModelProduit');\n return $req_prep->fetchColumn();\n }", "function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'country'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }", "function find_allusersearch_desclimit($user) {\n global $db;\n {\n return find_by_sql(\"SELECT * FROM search WHERE user='{$db->escape($user)}' ORDER BY id DESC LIMIT 1\");\n }\n}", "public function getMaxId($table, $column_name) {\n return $this->db->select_max($column_name)->get($table)->row();\n }", "public function lastID(): int;", "function findId() {\n\n $query = 'SELECT '\n .'MAX(trafficjam.id) AS id, '\n .'COUNT(trafficjam.id) AS segments '\n .'FROM trafficjam '\n .'WHERE trafficjam.from = ? AND trafficjam.to = ? AND trafficjam.start = ?';\n \n // Prepare statement.\n $stmt = $this->conn->prepare($query);\n \n // Bind search parameters.\n $stmt->bindParam(1, $this->from);\n $stmt->bindParam(2, $this->to);\n $stmt->bindParam(3, $this->start);\n \n // Execute query.\n $stmt->execute();\n \n return $stmt;\n }", "public function maxId($maxdigits=8){\n return pow($this->n, $maxdigits);\n }", "function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'leadtransaction'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }" ]
[ "0.76988757", "0.7142699", "0.7117519", "0.67650896", "0.67588836", "0.67364836", "0.6734832", "0.66911215", "0.6688182", "0.6679954", "0.6633593", "0.65968275", "0.65738654", "0.655123", "0.6540852", "0.6527021", "0.6495591", "0.645384", "0.64463323", "0.6407183", "0.6398577", "0.6384018", "0.6368299", "0.6349699", "0.63391244", "0.63106114", "0.6281538", "0.62746423", "0.62515295", "0.6221639", "0.621415", "0.61890686", "0.6177271", "0.6162364", "0.6141018", "0.6126413", "0.61081254", "0.61051804", "0.6103406", "0.6089011", "0.608853", "0.60837716", "0.60745746", "0.6058391", "0.6040787", "0.6035081", "0.60332394", "0.6024776", "0.6012501", "0.601106", "0.600769", "0.60053706", "0.5973847", "0.595871", "0.595871", "0.59498864", "0.5948592", "0.5948592", "0.5941707", "0.5932854", "0.5918953", "0.5889554", "0.58877844", "0.5874545", "0.587322", "0.58706576", "0.58658785", "0.5865645", "0.5864558", "0.5860569", "0.5842685", "0.58404076", "0.5829649", "0.58204854", "0.58138573", "0.5813372", "0.57956266", "0.5795436", "0.5790602", "0.5786418", "0.57811826", "0.5773579", "0.5758475", "0.5736891", "0.5733307", "0.57304794", "0.57298845", "0.5717138", "0.5713805", "0.5713639", "0.57119215", "0.57106966", "0.5703332", "0.5696931", "0.5695574", "0.5685313", "0.5667804", "0.56676286", "0.56671363", "0.5664532", "0.56633615" ]
0.0
-1
Update data to table
public static function UpdateCosto($Codigo,$costoTotal){ $query = "UPDATE crm_facturacion SET costoTotal = '$costoTotal' WHERE facturacionID=$Codigo"; return parent::Execute($query); //echo $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function update()\n {\n $queryString = 'UPDATE ' . $this->table . ' SET ';\n foreach ($this->data as $column => $value) {\n if ($column != self::ID) {\n $queryString .= $column . ' =:' . $column . ',';\n }\n }\n $queryString .= ' updated_at = sysdate() WHERE 1 = 1 AND ' . self::ID . ' =:' . self::ID;\n $this->query = $this->pdo->prepare($queryString);\n }", "function updateData($table,$data,$id){\n\t\treturn $this->db->update($table,$data,$id);\n\t}", "public function updateData()\n {\n try {\n// echo \"<pre>\";\n// print_r($this->where);\n// print_r($this->insertUpdateArray);\n// exit;\n DB::table($this->dbTable)\n ->where($this->where)\n ->update($this->insertUpdateArray);\n } catch (Exception $ex) {\n throw new Exception($ex->getMessage(), 10024, $ex);\n }\n }", "function update() {\n\t\t\t$updateQuery = \"UPDATE \".$this->table.\" SET \";\n\n\t\t\t$keysAR = array_keys($this->activeRecord);\n\n\t\t\tfor ($loopUp = 0; $loopUp < count($this->activeRecord); $loopUp++) {\n\n $updateQuery .= $keysAR[$loopUp] . \" = ?, \";\n $paramArray[] = $this->activeRecord[$keysAR[$loopUp]];\n\n\t\t\t}\n\n\t\t\t$updateQuery = substr($updateQuery, 0, -2); // Haal de laatste komma weg.\n\n\t\t\t$updateQuery .= \" WHERE \";\n\n\t\t\t// Fetch de primary key van de tabel.\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n $updateQuery .= $kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\n\t\t\t$this->lastQuery = $updateQuery;\n\n $updateTable = $this->mysqlConnection->prepare($this->lastQuery);\n $updateTable->execute($paramArray);\n\n\t\t}", "function update_data($where,$data,$table){\n\t\t$this->db->where($where);\n\t\t$this->db->update($table,$data);\n\t}", "public function atualizando($data){\n $this->db->where('coluna_id', $data['dados_id']);\n //vai na coluna tal e atualiza pra tal\n $this->db->set('coluna', $data['dados']);\n //nome da tabela\n $this->db->update('tabela'); \n //echo $this->db->last_query();\n }", "function update_data($table,$col,$id,$data,$cn){\n $str=\"update `$table` set \";\n $cnt=1;\n foreach($data as $key=>$value){\n $str.=\"`$key`='\".addslashes($value).\"'\";\n if($cnt++<count($data))\n $str.=\",\";\n }\n $str.=\" where {$col}=$id\";\n $cn->query($str);\n\n }", "function update_data($where,$data,$table){\n $this->db->where($where);\n $this->db->update($table,$data);\n }", "function adv_update($table, array $data, array $where);", "public function update_data($where,$data,$table){\r\n $this->db->where($where);\r\n $this->db->update($table,$data);\r\n }", "abstract public function updateData();", "public function update($table, array $data, array $identifier);", "public function update($table, $data, $id) {\n ksort($data);\n\n $fieldDetails = null;\n foreach($data as $key => $value) {\n $fieldDetails .= \"`$key` = :$key,\";\n }\n\n $fieldDetails = rtrim($fieldDetails, ',');\n\n $sth = $this->prepare(\"UPDATE $table SET $fieldDetails WHERE id = $id\");\n\n foreach($data as $key => $value) {\n $sth->bindValue(\":$key\", $value);\n }\n\n $sth->execute();\n }", "public function update($table);", "public function update($table);", "public function update($table, $data) \n {\n // Empty out the old junk\n $this->clear();\n \n // Make sure our data is in an array format\n if(!is_array($data))\n {\n show_error(2, 'non_array', array('data', 'Querybuilder::update'));\n $data = array();\n }\n \n // Define our table and Init the SQL statement\n $this->table = $this->clean($table);\n $this->sql = \"UPDATE \". $this->table .\" SET \";\n\n // Start the loop of $keys = $values\n $count = count($data);\n $i = 1;\n \n // Add the column and values to 2 seperate arrays\n foreach($data as $key => $value)\n {\n $key = $this->clean($key);\n $value = $this->clean($value);\n \n // If the number is numeric, we do not add single quotes to the value\n if(is_numeric($value))\n {\n $this->sql .= \"`\".$key .\"` = \". $value;\n }\n else\n {\n $this->sql .= \"`\".$key .\"` = '\". $value .\"'\";\n }\n \n // If we have more to go, add a \",\"\n if($i < $count) \n {\n $this->sql .= \", \";\n }\n ++$i;\n }\n\n return $this;\n }", "public function updateData(array $data);", "public function update($data, $table, $where) {\n $link = mysqli_connect($this->db_host, $this->db_user, $this->db_pass,$this->db_name);\n foreach ($data as $column => $value) {\n $sql = \"UPDATE $table SET $column = $value WHERE $where\";\n mysqli_query($link, $sql) or die(mysqli_error($link));\n }\n return true;\n }", "public function update($tblUpdate);", "function update($table, $data)\n {\n $fields = '';\n\n foreach ($data as $key => $value) {\n\n $fields .= $key . \"=:\" . $key . \",\";\n }\n\n $fields = rtrim($fields, ',');\n\n $sql = \"UPDATE $table SET $fields WHERE id=:id\";\n\n $statement = $this->pdo->prepare($sql);\n $statement->execute($data);\n\n return true;\n }", "public function updateRow($row);", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",email1=\\\"$this->email1\\\",address1=\\\"$this->address1\\\",lastname=\\\"$this->lastname\\\",phone1=\\\"$this->phone1\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "function update($table, $data, $idField, $idValue) {\n $this->connect();\n $sql = '';\n foreach ($data as $key => $value) {\n $sql .= \"$key = '\" . $value . \"',\";\n }\n $sql = 'UPDATE ' . $table . ' SET ' . trim($sql, ',') . ' WHERE ' . $idField . ' = ' . $idValue . ';';\n return mysqli_query($this->_conn, $sql);\n }", "function update_data($data,$where,$table)\n {\n $this->db->where('id_pertanyaan',$where);\n $this->db->update($table,$data);\n }", "public function updateData($table, $where, $data){\n\t\t$this->db->where($where);\n\t\t$this->db->update($table, $data);\n\t}", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "public function update(array $data);", "public function update(array $data);", "public function update(array $data);", "private function updateTable($table, $data) {\n\t\t$stmt = $this->pdo->prepare('DESCRIBE '. $table);\n\t\t$stmt->execute();\n\t\t$columns = $stmt->fetchAll(PDO::FETCH_COLUMN);\n\t\t$cols_backticked = array();\n\t\t$placeholders_insert = array();\n\t\t$placeholders_update = array();\n\t\t$total_cnt = 0;\n\t\t$success_cnt = 0;\n\n\t\tforeach($columns as $col) {\n\t\t\t$cols_backticked[] = '`'.$col.'`';\n\t\t\t$placeholders_insert[] = ':'. $col;\n\t\t\t$placeholders_update[] = $col .'=:'. $col;\n\t\t}\n\n\t\t$sql = 'INSERT INTO '. $table .' ('. implode(', ', $cols_backticked) .')';\n\t\t$sql .= ' VALUES ('. implode(', ', $placeholders_insert) .')';\n\t\t$sql .= ' ON DUPLICATE KEY UPDATE '. implode(', ', $placeholders_update) .';';\n\t\t$stmt = $this->pdo->prepare($sql);\n\t\t\n\t\t$this->pdo->beginTransaction();\n\n\t\tforeach($data as $row) {\n\t\t\t$total_cnt++;\n\t\t\t$input = array();\n\n\t\t\tforeach($columns as $col) {\n\t\t\t\t$input[$col] = $row[$col];\n\t\t\t}\n\t\t\t\n\t\t\tif($stmt->execute($input)) {\n\t\t\t\t$success_cnt++;\n\t\t\t} else {\n\t\t\t\techo $table .' row '. $input['id'] .' failed'.\"\\n\";\n\t\t\t\t/*** use these to debug your sql errors\n\t\t\t\tvar_dump($stmt->errorInfo());\n\t\t\t\techo $stmt->queryString;\n\t\t\t\tprint_r($input);\n\t\t\t\tdie();\n\t\t\t\t***/\n\t\t\t}\n\t\t}\n\n\t\t$this->pdo->commit();\n\n\t\t$this->time_end = microtime(true); // measuring execution time\n\t\t$time = ($this->time_end - $this->time_start) * 1000;\n\t\techo $success_cnt .' of '. $total_cnt .' '. $table .' added/updated in '. round($time) .'ms'.\"\\n\";\n\t}", "public function update($data) {}", "public function update($data) {}", "public function updateRecord() \n {\n $str = \"Id = :Id\";\n array_walk($this->arrayKeysValues(), function ($value, $key) use (&$str) {\n $str .= \", $key = :$key\";\n });\n $sql = sprintf(\"UPDATE Cubans SET %s WHERE Id = :Id\", $str);\n $statement = $this->connect->prepare($sql);\n $statement->execute(array_merge([\":Id\" => $this->id], $this->arrayKeysValues()));\n }", "protected function _update() {\n $this->_getDef();\n \n //prepare\n foreach ($this->_tableData as $field) {\n if($field['primary']) {\n $primaryKey = $field['field_name'];\n $primaryValue = $this->$primaryKey;\n continue;\n }\n \n $sql_fields[] = '`' . $field['field_name'] . '` =?';\n \n $field_name = $field['field_name'];\n \n if(false !== ($overrideKey = $this->_getOverrideKey($field_name))){\n $field_name = $overrideKey;\n }\n \n if($this->$field_name instanceof \\DateTime){\n $$field_name = $this->$field_name->format('Y-m-d H:i:s');\n } elseif(is_array($$field_name)){\n $$field_name = json_encode($$field_name);\n } else {\n $$field_name = $this->$field_name;\n }\n \n $values[] = $$field_name;\n }\n \n $values[] = $primaryValue;\n \n $sql = \"UPDATE `{$this->_table}` SET \" . implode(',', $sql_fields) . \" WHERE `{$primaryKey}` =?\";\n $stmt = Database::connection($this->_connection)->prepare($sql, $values);\n $stmt->execute();\n $this->setLastError(NULL);\n if($stmt->error !== ''){\n $this->setLastError($stmt->error);\n }\n \n $stmt->close();\n \n return $this->getLastError() === NULL ? true : false;\n }", "function update_data($where,$data,$table){\n $this->db->where($where);\n $this->db->update($table,$data);\n }", "function update($table,$data,$where){\n\t\t$j=0;\n\t\t$c=count($data);\n\t\tforeach($data as $key=>$value){\n\t\t\t$j++;\n\t\t\tif($c==$j){\n\t\t\t\t$list.=\"`$key`='\".$value.\"'\";\n\t\t\t} else {\n\t\t\t\t$list.=\"`$key`='\".$value.\"', \";\n\t\t\t}\n\t\t}\n\t\t$r=mysql_query(\"\n\t\t\tUPDATE `$table` SET\n\t\t\t$list \n\t\t\tWHERE $where\n\t\t\tLIMIT 1\n\t\t\");\n\t\treturn $r;\n\t}", "public function updateData($table, $data, $condition=1){\r\n\t\t$i = 0;\r\n\t\t$columnValueSet = \"\";\r\n\t\tforeach($data as $key=>$value){\r\n\t\t\t$comma = ($i<count($data)-1 ? \", \" : \"\");\r\n\t\t\t$columnValueSet .= $key. \"='\".$value.\"'\".$comma;\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t$sql = \"update $table set $columnValueSet where $condition\";\r\n\t\t// echo $sql;\r\n\t\t$this->execteQuery($sql);\r\n\t}", "public function update($table, $data = array(), $where = \"\") {\r\n\t\t$statements = array ();\r\n\t\tforeach ( $data as $key => $value ) {\r\n\t\t\t$statements [] = '`' . $key . '` = ' . $this->get_field_value ( $value );\r\n\t\t}\r\n\t\t$statements_str = implode ( \",\", $statements );\r\n\t\tif ($where != \"\") {\r\n\t\t\t$where = \" WHERE \" . $where;\r\n\t\t}\r\n\t\t$query = \"UPDATE `$table` SET $statements_str $where\";\r\n\t\t$this->query ( $query );\r\n\t}", "public function updateRow($data)\r\n\t{\r\n\t\t$data = (array)$data;\r\n\t\t$data = $this->cleanupFieldNames($data);\r\n\t\t\r\n\t\t// Build SQL\r\n\t\t$sql = 'UPDATE `'.$this->name.'` SET ';\r\n\t\t$values = array();\r\n\t\t$pkFound = false;\r\n\t\tforeach($data as $key => $val)\r\n\t\t{\r\n\t\t\t// Ignore if field is not in table\r\n\t\t\tif (!$this->hasField($key))\r\n\t\t\t{\r\n\t\t\t\tunset($data[$key]);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// Include value, but not if primary key and table has auto-incr PK\r\n\t\t\t$include = true;\r\n\t\t\tif ($key == $this->primaryKey)\r\n\t\t\t{\r\n\t\t\t\tif ($this->primaryKeyIsAutoIncrement)\r\n\t\t\t\t{\r\n\t\t\t\t\t$include = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Found non-empty primary key\r\n\t\t\t\tif (!empty($val))\r\n\t\t\t\t{\r\n\t\t\t\t\t$pkFound = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Include and process special value\r\n\t\t\tif ($include)\r\n\t\t\t{\r\n\t\t\t\tif ($val === 'NULL')\r\n\t\t\t\t{\r\n\t\t\t\t\t$values[] = \"`$key` = NULL\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$values[] = \"`$key` = :$key\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// Quit if has no primary key\r\n\t\tif (!$pkFound)\r\n\t\t{\r\n\t\t\tthrow new \\Exception('Cannot update: The supplied data does not contain a primary key');\r\n\t\t}\r\n\t\r\n\t\t// No fields were found - update makes no sense\r\n\t\tif (count($values) == 0)\r\n\t\t{\r\n\t\t\tthrow new \\Exception('No fields were added to the UPDATE query');\r\n\t\t}\r\n\t\t\t\r\n\t\t// Add values to query\r\n\t\t$sql .= implode(', ', $values);\r\n\t\r\n\t\t// Add where\r\n\t\t$sql .= ' WHERE `'.$this->primaryKey.'` = :' . $this->primaryKey;\r\n\r\n\t\t// Execute\r\n\t\t$result = $this->db->runQuery($sql, $data);\r\n\t\t\r\n\t\treturn $this->db->getAffectedRows();\r\n\t}", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "private static function updateTransaction($data)\n {\n global $db;\n\n try {\n $fields = implode(', ', array_map(\n function ($v, $k) {\n return sprintf(\"`%s` = '%s'\", $k, $v);\n },\n $data,\n array_keys(\n $data\n )\n ));\n\n $db->Execute(\"\n\t\t\t\tUPDATE\n\t\t\t\t\t`\" . static::$table_name . \"`\n\t\t\t\tSET\n\t\t\t\t\t\" . $fields . \"\n\t\t\t\tWHERE\n\t\t\t\t `unique_id` = '\" . $data['unique_id'] . \"'\n\t\t\t\");\n } catch (\\Exception $exception) {\n //$this->logEx($exception);\n }\n }", "public function update(){\n static::setConnection();\n $table = static::$table;\n $keyColumn = static::$keyColumn;\n $sql = \"UPDATE \".$table.\" SET \";\n foreach($this as $k=>$v){\n $sql .= $k.\" = '\".$v.\"',\";\n }\n $sql = trim($sql, ',');\n $sql .= \" WHERE \".$keyColumn.\" = \".$this->keyColumn;\n mysqli_query(static::$conn, $sql);\n }", "public function update(array $data){\n //dynamically query generate\n $query = \"UPDATE \".$this->table[0].\" SET\";\n $comma = \" \";\n foreach ($data as $key => $value) {\n if( ! empty($value)) {\n $query .= $comma . $key . \" = '\" .trim($value) . \"'\";\n $comma = \", \";\n }\n }\n //finaly query generated as per your form fields name and value\n \n $sql= $query. \" WHERE sid = '\".$data[\"sid\"].\"'\";\n //run the query\n return mysqli_query($this->conn,$sql);\n }", "public function update($data, $table, $where) {\n\t\tforeach ($data as $column => $value) {\n\t\t\t$sql = \"UPDATE $table SET $column = $value WHERE $where\";\n\t\t\t$this->_connection->query($sql) ;\n\t\t}\n\t\treturn true;\n\t}", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",lastname=\\\"$this->lastname\\\",username=\\\"$this->username\\\",email=\\\"$this->email\\\",kind=\\\"$this->kind\\\",status=\\\"$this->status\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "function update($table, $id, $data){\n global $conn;\n$sql = \"UPDATE $table SET \";\n\n$i = 0;\n foreach ($data as $key => $value){\n if($i === 0){\n $sql = $sql . \" $key=?\"; \n } else{\n $sql = $sql . \", $key=?\";\n }\n$i++;\n}\n\n$sql = $sql . \" WHERE id=?\";\n$data['id'] = $id;\n$stmt = executeQuery($sql, $data);\nreturn $stmt->affected_rows;\n}", "function dbUpdate($table, array $data, $where = null, $insertId = false){\n foreach ($data as $key => $value){ //Percorre os campos lendo o índice e o valor do array data\n $fields[] = \"{$key} = '{$value}'\"; //Atribui os índices e seus respectivos valor para um array\n }\n $fields = implode(', ', $fields); //Separa cada campo com vírgula\n //$table = DB_PREFIX.'_'.$table; //para pegar o prefixo da tabela caso use \n $where = ($where) ? \" WHERE {$where}\" : null; //Serve apenas para definir se haverá espaço entre fields e where\n $query = \"UPDATE $table SET {$fields}{$where}\"; //por isso, aqui não vai espaço\n return qExecute($query, $insertId);\n }", "public function update($table, array $data, $where = '')\n {\n ksort($data);\n $fieldDetails = NULL;\n foreach ($data as $key => $value)\n {\n $fieldDetails .=\"$key = '$value',\";\n }\n $fieldDetails = rtrim($fieldDetails, ',');\n $query = \"UPDATE $table SET $fieldDetails \".($where ? 'WHERE '.$where : '');\n $this->prepareQuery($query);\n foreach ($data as $key => $value)\n {\n //$this->bind(\":$key\", $value);;\n ;\n }\n\n $this->executeQuery($this->statement);\n }", "public function update_data($where, $data, $table)\n\t{\n\t\t$this->db->where($where);\n\t\t$this->db->update($table, $data);\n\t}", "public function update($table, $data){//,$id\n $q=\"UPDATE `$table` SET \";\n\n $r=\"\";\n foreach($data as $key=>$val){\n $r.=\"`\".$key.\"`\".\"='$val',\";\n }\n $r=rtrim($r,\", \");\n //echo $r;\n $q1 = $q .$r. ' WHERE '.\"1\";\n\n \n if($q1)\n {\n $this->database_query($q1);\n }\n}", "public function update() {\n\t\t$dbh = App::getDatabase()->connect();\n\n\t\t$query = \"UPDATE \".$this->getTableName().\"\n\t\t\t\t SET \";\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(!in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= (($fl) ? \"\" : \", \").$column.\" = \".((is_bool($val)) ? (($val) ? \"TRUE\" : \"FALSE\") : ((is_null($val)||($val === \"\")) ? \"null\" : \"'\".$val.\"'\"));\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= \"\\n\".(($fl) ? \"WHERE\" : \"AND\").\" \".$column.\" = '\".$val.\"'\";\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$res = $dbh->exec($query);\n\t\t$dbh = null;\n\t\treturn $res;\n\t}", "public function update() {\n $Sql = \"UPDATE \" . $this->tableName[0] . \" SET \";\n foreach ($this->fieldListArray as $Key_ => $Value_) {\n $Sql = $Sql . \"$Key_='$Value_', \";\n }\n $Sql = substr($Sql, 0, strlen($Sql) - 2);\n $Sql = $Sql . \" WHERE \";\n foreach ($this->conditionArray as $Key_ => $Value_) {\n $Sql = $Sql . \"$Key_='$Value_' AND \";\n }\n $Sql = substr($Sql, 0, strlen($Sql) - 4);\n //echo $Sql;\n return mysqli_query($this->dataBaseConnect->getConnection(), $Sql);\n }", "public function queryUpdate($table, $data, $where) : int;", "public function updateData(){\n //buatlah query, cobalah untuk vertical\n $sqlQuery = \"UPDATE\n \". $this->t_name .\"\n SET\n name = :name, \n email = :email, \n age = :age, \n designation = :designation, \n created = :created\n WHERE \n id = :id\";\n //persiapkan statement\n $stmt = $this->conn->prepare($sqlQuery);\n\n //convert string\n $this->name=htmlspecialchars(strip_tags($this->name));\n $this->email=htmlspecialchars(strip_tags($this->email));\n $this->age=htmlspecialchars(strip_tags($this->age));\n $this->designation=htmlspecialchars(strip_tags($this->designation));\n $this->created=htmlspecialchars(strip_tags($this->created));\n //id karena ini update pada satu row\n $this->id=htmlspecialchars(strip_tags($this->id));\n\n //bind\n $stmt->bindParam(\":name\",$this->name);\n $stmt->bindParam(\":email\",$this->email);\n $stmt->bindParam(\":age\",$this->age);\n $stmt->bindParam(\":designation\",$this->designation);\n $stmt->bindParam(\":created\",$this->created);\n //id\n $stmt->bindParam(\":id\",$this->id);\n\n //eksekusi\n if($stmt->execute()){\n return true;\n }\n return false;\n }", "public function UpdateData($tabelName, $data, $where){\n $res = $this->db->update($tabelName, $data, $where);\n return $res;\n }", "public function UpdateData($tabelName, $data, $where){\n $res = $this->db->update($tabelName, $data, $where);\n return $res;\n }", "public function update($table, $data)\n {\n // Make table name safe\n $table = $this->san($table);\n \n // 'UPDATE .. SET' query stub\n $updateQuery = \"UPDATE {$table} SET \";\n \n // Add the column/value updates\n foreach($data as $field => $value)\n\t\t{\n\t\t\t$updateQuery .= '`' . $this->san($field) . \"` = '\" . $this->san($value) . \"', \";\n\t\t}\n\t\t\n\t\t// Remove comma\n\t\t$this->query = substr($updateQuery, 0, -2) . ' ';\n \n // Return a ref. to this object for chainability\n return $this;\n }", "public function updateTable()\n\t{\n\t\t$response = file_get_contents('https://umbrella.jlparry.com/work/buybox?key=' . $this->Manage_model->getApiKey());\n\t\t$str = json_decode($response);\n\t\tvar_dump($this->Manage_model->getApiKey());\n\t\tif(!empty($str)){\n\t\t\tforeach($str as $row){\t\n\t\t\t\t//echo $row->id .\"</br>\";\t\t\t\t\t\n\t\t\t\t$insert_row = array(\n\t\t\t\t\t'id' => $row->id,\n\t\t\t\t\t'model' => $row->model,\n\t\t\t\t\t'piece' => $row->piece,\n\t\t\t\t\t'plant' => $row->plant,\n\t\t\t\t\t'stamp' => $row->stamp\n\t\t\t\t);\t\t\t\t\n\t\t\t\t$this->Parts_model->insertRow(\"parts\", $row);\t\t\t\t\n\t\t\t\tredirect(\"parts\");\n\t\t\t}\t\n\t\t}\n\t}", "function updateGenericData($table,$paramList,$data){\n $this->db->where($paramList);\n $this->db->update($table, $data);\n return true;\n }", "public function update(){\n $sql = \"update \".self::$tablename.\" set correlativo=\\\"$this->correlativo\\\",nombre_instalador=\\\"$this->nombre_instalador\\\",nombre_proyecto=\\\"$this->nombre_proyecto\\\",localizacion=\\\"$this->localizacion\\\",contrato_orden_trabajo=\\\"$this->contrato_orden_trabajo\\\",sector_trabajo=\\\"$this->sector_trabajo\\\",area_aceptada=\\\"$this->area_aceptada\\\",fecha_proyecto=\\\"$this->fecha_proyecto\\\" where id_usuario=$this->id_usuario\";\n Executor::doit($sql);\n }", "public function updateData($data){\n\t\t// $this->db->query($query);\n\t\t// $this->db->bind('deptId',$data['deptId']);\n\t\t// $this->db->bind('deptName',$data['deptName']);\n\t\t// $this->db->execute();\n\n\t\t// return $this->db->rowCount();\n\t}", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function update(){\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $fieldsList = \" SET \";\n foreach ($this->attributes as $column => $value) {\n $fieldsList.=$column.\"=\".'\\''.$value.'\\''.\", \";\n }\n $fieldsList = str_last_replace(\", \", \"\", $fieldsList);\n $sqlQuery = \"UPDATE \".$this->table.$fieldsList.\" WHERE \".$this->idName.\"=\".$this->attributes[$this->idName];\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n }\n }", "protected function update() {\n $this->db->updateRows($this->table_name, $this->update, $this->filter);\n storeDbMsg($this->db,ucwords($this->form_ID) . \" successfully updated!\");\n }", "function Update($data, $table, $conditions = false)\n {\n\n $query = \"UPDATE `$table` SET \";\n foreach ($data as $name => $value) {\n if (strtoupper($value) != \"NULL\")\n $query .= \"`$name` = '\" . addslashes($value) . \"', \";\n else\n $query .= \"`$name` = \" . addslashes($value) . \", \";\n\n }\n $query = substr($query, 0, strlen($query) - 2);\n if ($conditions) $query .= \" WHERE $conditions\";\n //print $query.\"<br>\";die;\n return $this->Query($query);\n }", "function updateData($table, $where, $fields)\n {\n $sql = \"\";\n $condition = \"\";\n $val = \"\";\n foreach ($where as $key => $value) {\n $condition .= \"$key = ?\";\n }\n foreach ($fields as $key => $value) {\n $val .= \"$key = ? , \";\n }\n $val = substr($val, 0, -2);\n $sql .= \"update $table set $val where $condition\";\n // print_r($sql);\n // exit;\n $result = $this->conn->prepare($sql);\n $temp = array_merge(array_values($fields), array_values($where));\n if ($result->execute($temp)) {\n return true;\n } else {\n return false;\n }\n $this->conn = null;\n }", "function update($tab, $data, $cond)\n{\n\t$fields = '';\n\tif (is_array($data)) {\n\t\t$sep = '';\n\t\tforeach($data as $k => $v) {\n\t\t\t//if ($k == '' or $v == '') continue;\n\t\t\tif (is_null($v)) $v = 'NULL'; else $v = \"'\".$this->escape($v).\"'\";\n\t\t\t$fields .= $sep.$this->drv->quote($k).\"=$v\";\n\t\t\t$sep = ',';\n\t\t}\n\t}\n\telse $fields = $data;\n\t\n\t$args = (func_num_args() > 3)? array_slice(func_get_args(),3) : null;\n\t$where = $this->getWhereSql($cond, $args);\n\t$sql = \"UPDATE $tab set $fields WHERE $where\";\n\t$res = $this->query($sql);\n\treturn $res;\n}", "public function update(array $data, array $where);", "public function update($where, $data, $table){\n\t\t$this->db->where($where);\n\t\t$this->db->update($table, $data);\n\t}", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",comments=\\\"$this->comments\\\",price=\\\"$this->price\\\",brand=\\\"$this->brand\\\",model=\\\"$this->model\\\",y=\\\"$this->y\\\",link=\\\"$this->link\\\",in_existence=\\\"$this->in_existence\\\",is_public=\\\"$this->is_public\\\",is_featured=\\\"$this->is_featured\\\",category_id=\\\"$this->category_id\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function refreshTable();", "public function Save()\r\n\t\t{\r\n\t\t\tif ($this->id == -1) {\r\n\t\t\t\tunset($this->columns[\"id\"]);\r\n\t\t\t\t$sqlCol = null;\r\n\t\t\t\t$sqlKey = null;\r\n\t\t\t\tforeach ($this->columns as $column => $value) {\r\n\t\t\t\t\t$data[$column] = $this->$column;\r\n\t\t\t\t\t$sqlCol .= \",\" . $column;\r\n\t\t\t\t\t$sqlKey .= \",:\" . $column;\r\n\t\t\t\t}\r\n\t\t\t\t$sqlCol = ltrim($sqlCol, \",\");\r\n\t\t\t\t$sqlKey = ltrim($sqlKey, \",\");\r\n\t\t\t\t$query = $this->db->prepare(\r\n\t\t\t\t\t\"INSERT INTO \" . $this->table . \" (\" . $sqlCol . \")\r\n\t\t\t\t\t\tVALUES (\" . $sqlKey . \") ;\"\r\n\t\t\t\t);\r\n\t\t\t\t$query->execute($data);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t// Sinon faire un update dynamique\r\n\t\t\t\t$sqlSet = null;\r\n\t\t\t\tforeach ($this->columns as $column => $value) {\r\n\t\t\t\t\t$data[$column] = $this->$column;\r\n\t\t\t\t\t$sqlSet[] .= $column . \"=:\" . $column;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Suppression de la mise à jour de la date d'update \r\n\t\t\t\t// la mise à jour des dates est maintenant faites en BDD.\r\n\t\t\t\t$query = $this->db->prepare(\r\n\t\t\t\t\t\"UPDATE \" . $this->table . \" SET \r\n\t\t\t\t\t\t\" . implode(\",\", $sqlSet) . \"\r\n\t\t\t\t\t\tWHERE id=:id;\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$query->execute($data);\r\n\t\t\t}\r\n\t\t}", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set Origen='$this->Origen',Fechap='$this->Fechap',Horap='$this->Horap',Cod_Referencia='$this->Referencia',Nombre_Referencia='$this->Nombre',Ref_Tela='$this->Reftela',Pinta='$this->Pinta',Color='$this->Color',Proceso='$this->Proceso',Ubicacion='$this->Ubicacion',SKU='$this->Sku',Maquina='$this->Maquina',Longitud_Inicial='$this->Longitudini',Longitud_Final='$this->Longitudfin',Peso='$this->Peso',Grados_PFoAT800K='$this->Plancha',Grados_Plato='$this->Plato',Grados_Pie='$this->Pie',Grados_Aire_S='$this->Airesup',Grados_Aire_I='$this->Aireinf',Caudal_Sup='$this->Caudalsup',Caudal_Inf='$this->Caudalinf',Presion='$this->Presion',Velocidad='$this->Velocidad',Velocidad_Sup='$this->Velocidad_Sup',Velocidad_Inf='$this->Velocidad_Inf',Intensidad='$this->Intensidad',Tiempo_Exp='$this->Tiempo',Resultado='$this->Resultado',Dinamometro='$this->Dinamometro',Observaciones1='$this->Observaciones' where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "function update($tbl_name, $data, $where) {\n if (empty($data))\n throw new Exception('Update data should not be empty!');\n else if (empty($tbl_name))\n throw new Exception('Table name should not be empty!');\n \n $update_str = $this->get_update_str($data);\n $where_str = $this->get_where_str($where);\n $query = 'UPDATE ' . $tbl_name . ' SET ' . $update_str . ' WHERE ' . $where_str;\n $resource = $this->query($query);\n return $this->affected_rows($resource);\n }", "public function update($data, $table = null)\n {\n $GLOBALS['rlDb']->rlAllowHTML = $this->rlAllowHTML;\n return $GLOBALS['rlDb']->update($data, $table);\n }", "public function updateRecords($data)\n {\n\n $this->dataStore->setData($data);\n }", "public function update(string $table, $data=[]): PDOStatement\n\t{\n\t\tif ( ! empty($data))\n\t\t{\n\t\t\t$this->set($data);\n\t\t}\n\n\t\treturn $this->_run('update', $table);\n\t}", "public function update($id, $data)\n\t{\n $this->db->where('id', $id);\n $this->db->update('alumns', $data);\n\t}", "public function db_update() {}", "function update($id, $data)\n {\n $this->db->where($this->id,$id);\n $this->db->update($this->table, $data);\n }", "public function update($table, array $data)\n {\n return $this->updateBatch($table, [$data]);\n }", "public function updateMultiple_data()\n {\n \n }", "public function updateSapi($data,$where,$table)\n {\n $this->db->where($where);\n return $this->db->update($table,$data);\n }", "function my_update_record( $table_name , $primary_key , $data_id , $datas ){\r\n\r\n\tglobal $connection;\r\n\r\n\t$build_query = \" UPDATE `\".$table_name .\"` SET \" ;\r\n\tforeach( $datas as $field => $value ){\r\n\t\r\n\t\t$build_query .= \"`\".$field .\"` = \". $value . \", \";\r\n\t\r\n\t}\r\n\t\r\n\t$query = rtrim( trim($build_query) , \",\" );\r\n\t\r\n\t$update_query = $query .\" WHERE `\".$primary_key.\"` = \". $data_id ; \r\n \r\n\t$result = my_query( $update_query );\r\n\t \r\n\treturn $connection->affected_rows ; \r\n\r\n}", "public function update(array $data) {\n return $this->_dataHandler->update($this->_table, $data, $this->getPrimaryKeyCondition($data[$this->_primaryKeyElement]));\n }", "public static function update($data , $id)\n {\n self::_update(self::tableName(), $data, 'id = '. $id);\n }", "public function update($table, $data, $where, $format = \\null, $where_format = \\null)\n {\n }", "public function update($table, array $data, $where = '')\n {\n $set = array();\n foreach ($data as $field => $value) {\n $set[] = $field . '=' . $this->quoteValue($value);\n //echo $value;\n }\n $set = implode(',', $set);\n $query = 'UPDATE ' . $table . ' SET ' . $set\n . (($where) ? ' WHERE ' . $where : '');\n //echo \"<br />\".$query;\n $this->query($query);\n return $this->getAffectedRows();\n }", "public function update_details($table='',$data='',$condition=''){\n\t\t$this->db->where($condition);\n\t\t$this->db->update($table,$data);\n\t}", "public function updateData($sql, $params=[]){\n $this->create($sql,$params);\n\n }", "public function update($table = '', $data = array(),$campo = '', $id = 0)\n {\n $this->db->where($campo, $id);\n return $this->db->update($table, $data);\n }", "public function update_data($tbl_name, $data, $where)\n\t\t{\n\t\t\t$query = \"UPDATE $tbl_name SET $data WHERE $where\";\n\t\t\treturn $query;\n\t\t}", "function util_updateTableFromArray($tableName, $fieldList, $data, $whereClause)\n{\n\t$updFields = array();\n\t$updValues = array();\n\tforeach ($fieldList as $field) {\n\t\tif (property_exists($data, $field)) {\n\t\t\tarray_push($updFields, $field);\n\t\t\tarray_push($updValues, $data->$field);\n\t\t}\n\t}\n\t\n\tif (count($updFields) > 0) {\n\t\t$db = Master::getDBConnectionManager();\n\t\treturn $db->updateTable($tableName, $updFields, $updValues, $whereClause);\n\t} else {\n\t\treturn -1;\n\t}\n}", "private function update($table, $id, array $data) {\r\n\t\t/* connect to mysql database */\r\n\t\t$this->connect();\r\n\r\n\t\t/* make sure that id is an integer */\r\n\t\tif(!settype($id, \"int\")) {\r\n\t\t\tthrow new Exception(\"Entry id is no integer.\");\r\n\t\t}\r\n\r\n\t\t/* escape special chars in parameters */\r\n\t\t$escapedTable = mysql_real_escape_string($table);\r\n\t\t$escapedData = $this->mysqlRealEscapeArray($data);\r\n\r\n\t\t/* reformat the input array */\r\n\t\t$tmpArray = array();\r\n\t\tforeach($escapedData as $col => $value) {\r\n\t\t\t$tmpArray[] = $col.\"=\".$value;\r\n\t\t}\r\n\t\t/* mysql query to update entry */\r\n\t\t$query = \"UPDATE \".$escapedTable.\" SET \".implode(\", \", $tmpArray).\" WHERE id = '\".$id.\"'\";\r\n\r\n\t\t/* send mysql query to database */\r\n\t\t$result = mysql_query($query);\r\n\t\r\n\t\t/* disconnect from mysql database */\r\n\t\t$this->disconnect();\r\n\t}", "function update($data){\n $this->deleteKritByUser($data['user_id']); //reset seluruh nilai kriteria berpasangan untuk pakar tertentu\n $this->getKriteria();\n /*foreach($this->getKriteria() as $kr){\n $this->kriteriaLabel[] = $kr->id_kriteria;\n }*/\n \n for($i=0;$i<count($data['kritEigen']);$i++){\n // update nilai eigen di table eigen_kriteria\n $this->db->set(array(\n 'value_eigen' => $data['kritEigen'][$i],\n $this->id => $this->kriteriaLabel[$i],\n 'id_user' => $data['user_id']\n )\n );\n $this->db->insert(\"eigen_kriteria\");\n \n // memasukkan nilai kriteria berpasangan ke pair_kriteria\n for($j=0;$j<count($data['kritMatriks']);$j++){\n $this->db->set(array(\n 'id_kriteria' => $this->kriteriaLabel[$i],\n 'id_kriteria_pair' => $this->kriteriaLabel[$j],\n 'id_user' => $data['user_id'], // pakai id_user\n 'value' => $data['kritMatriks'][$i][$j]\n ));\n $this->db->replace($this->pairwise);\n }\n } \n }" ]
[ "0.7605804", "0.71007603", "0.7092073", "0.70888436", "0.7073323", "0.70580107", "0.70255905", "0.70205086", "0.7001686", "0.69665486", "0.69631714", "0.69492435", "0.69434565", "0.6877409", "0.6877409", "0.6876313", "0.6844399", "0.6838165", "0.68311304", "0.68266356", "0.68068147", "0.68015796", "0.67910916", "0.67841065", "0.67760634", "0.67631775", "0.67534757", "0.67534757", "0.67534757", "0.67437434", "0.67386454", "0.67386454", "0.6729349", "0.67251545", "0.67073315", "0.6692569", "0.6689017", "0.6672252", "0.66708827", "0.66436285", "0.66436285", "0.66436285", "0.6641063", "0.6638691", "0.6618635", "0.66131216", "0.66050154", "0.6591958", "0.6583565", "0.658266", "0.658102", "0.65752584", "0.65741754", "0.65648985", "0.6562603", "0.6547274", "0.6537958", "0.6537958", "0.65344435", "0.65246683", "0.6521909", "0.6520913", "0.65148115", "0.6487704", "0.6474451", "0.64737445", "0.64626616", "0.64599127", "0.6448336", "0.643479", "0.64308214", "0.64240074", "0.64240074", "0.64240074", "0.64240074", "0.6422977", "0.64215195", "0.64189273", "0.6416937", "0.6404928", "0.6404331", "0.64037526", "0.6398757", "0.6397103", "0.6396797", "0.6394859", "0.6392948", "0.6388015", "0.6350339", "0.63497764", "0.63480735", "0.6346482", "0.63441354", "0.63395786", "0.6336811", "0.6335197", "0.6329711", "0.63289255", "0.6324863", "0.6324341", "0.6318465" ]
0.0
-1
Display a listing of the resource.
public function index() { try { $usuarioLogado = UsuarioController::retornaUsuarioLogado(); if(!$usuarioLogado->perfil->super_user) throw new \Exception('Você não possui permissão para acessar este recurso.'); $empresasCadastradas = self::listaTodasAsEmpresasCadastradas()->get(); return view('configuracao.empresas.index', compact('empresasCadastradas')); }catch (\Exception $ex){ return redirect()->back()->with('info', $ex->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Store a newly created resource in storage.
public function store(EmpresaPostOrUpdateRequestValidation $request) { DB::beginTransaction(); try{ $usuarioLogado = UsuarioController::retornaUsuarioLogado(); if(!$usuarioLogado->perfil->super_user) throw new \Exception('Você não possui permissão para acessar este recurso.'); $empresa = new Empresa(); $empresa->nome_fantasia = $request->nome_fantasia; $empresa->cpf_cnpj = $request->cpf_cnpj; $empresa->razao_social = $request->razao_social; $empresa->quantidade_licencas = $request->quantidade_licencas; $empresa->save(); DB::commit(); return response()->json([ 'status_resposta' => 'success', 'msg' => 'Empresa cadastrada com sucesso.', ], 201); }catch (\Exception $e){ DB::rollBack(); return response()->json([ 'status_resposta' => 'error', 'msg' => $e->getMessage(), ], 422); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Update the specified resource in storage.
public function update(EmpresaPostOrUpdateRequestValidation $request, $id) { DB::beginTransaction(); try{ $usuarioLogado = UsuarioController::retornaUsuarioLogado(); if(!$usuarioLogado->perfil->super_user) throw new \Exception('Você não possui permissão para acessar este recurso.'); $empresa = Empresa::findOrFail($id); $empresa->nome_fantasia = $request->nome_fantasia; $empresa->cpf_cnpj = $request->cpf_cnpj; $empresa->razao_social = $request->razao_social; $empresa->quantidade_licencas = $request->quantidade_licencas; $empresa->save(); DB::commit(); return response()->json([ 'status_resposta' => 'success', 'msg' => 'Empresa alterada com sucesso.', ], 201); }catch (\Exception $e){ DB::rollBack(); return response()->json([ 'status_resposta' => 'error', 'msg' => $e->getMessage(), ], 422); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id){ try { $usuarioLogado = UsuarioController::retornaUsuarioLogado(); if(!$usuarioLogado->perfil->super_user) throw new \Exception('Você não possui permissão para acessar este recurso.'); $empresa = Empresa::findOrFail($id); if($empresa) $empresa->delete(); else throw new \Exception('Essa empresa já tinha sido excluída!'); return response()->json([ 'status_resposta' => 'success', 'msg' => 'Empresa excluída com sucesso! Foram excluídos também os departamentos, cargos, equipes e funcionários associados a essa empresa.', ], 201); }catch (\Exception $ex){ return response()->json([ 'status_resposta' => 'error', 'msg' => $ex->getMessage(), ], 422); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "public function remove($id);", "public function remove($id);", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6671365", "0.6660839", "0.66361386", "0.6632988", "0.6624729", "0.6542195", "0.6541645", "0.6466739", "0.6288393", "0.61767083", "0.6129533", "0.608954", "0.6054169", "0.60443425", "0.60073143", "0.59338665", "0.59317696", "0.592145", "0.5920155", "0.59065086", "0.5897853", "0.58968836", "0.58958197", "0.58958197", "0.58958197", "0.58958197", "0.58800334", "0.5869308", "0.5861188", "0.5811069", "0.5774596", "0.5763277", "0.5755447", "0.5747713", "0.5742094", "0.573578", "0.5727048", "0.57164854", "0.5712422", "0.57092893", "0.57080173", "0.5707143", "0.5704078", "0.5696418", "0.5684556", "0.5684556", "0.56790006", "0.5678463", "0.5658492", "0.564975", "0.5648406", "0.56480885", "0.5641393", "0.5638992", "0.56302536", "0.56228197", "0.5616424", "0.5607389", "0.56033397", "0.5602035", "0.55991143", "0.55988586", "0.5590501", "0.5581284", "0.55681103", "0.5566215", "0.55644745", "0.5563726", "0.55593926", "0.55583876", "0.5548547", "0.5542015", "0.5541403", "0.5541403", "0.55397224", "0.55390894", "0.55376494", "0.5531044", "0.5529739", "0.55279493", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527892", "0.5527671", "0.5527155", "0.5526666", "0.55245256", "0.552101", "0.55183184" ]
0.0
-1
Restore the specified resource to storage
public function restore($id){ try { $usuarioLogado = UsuarioController::retornaUsuarioLogado(); if(!$usuarioLogado->perfil->super_user) throw new \Exception('Você não possui permissão para acessar este recurso.'); $empresa = Empresa::withTrashed()->findOrFail($id); if($empresa) $empresa->restore(); else throw new \Exception('Essa empresa não existe na base de dados!'); return response()->json([ 'status_resposta' => 'success', 'msg' => 'Empresa reativada com sucesso! Esse processo não reativa automaticamente os cadastros associados a empresa, como (departamentos, equipes, cargos e funcionários). Se fazendo necessário reativar cada cadastro um por um. ', ], 201); }catch (\Exception $ex){ return response()->json([ 'status_resposta' => 'error', 'msg' => $ex->getMessage(), ], 422); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restore();", "public function restore() {}", "public function restore($id);", "public function restore($id);", "public function restore($id);", "public function restore($id);", "public function restore()\n {\n }", "public function restore()\n {\n //\n }", "public function restored(Storage $storage)\n {\n //\n }", "protected static function restore() {}", "function restore()\n {\n }", "public function restored(Remission $remission)\n {\n //\n }", "public function restore(string $id)\n {\n // TODO: ...\n }", "public function restore()\n {\n $this->restoreEntrustUserTrait();\n $this->restoreSoftDeletes();\n }", "public function restored(Stock $stock)\n {\n //\n }", "public function restore(int $id)\n {\n //\n }", "public function restore($id){\n $book_to_restore = \\App\\Book::withTrashed()->findOrFail($id);\n\n // jika ada, lakukan restore\n if($book_to_restore){\n $book_to_restore->restore();\n return redirect()->route(\"books.index\")->with(\"status\", \"Book successfully restored\");\n } else {\n return redirect()->route(\"books.index\")->with(\"status\", \"Book is not in trash\");\n }\n }", "public function restore(string $state);", "public function restore(EntityInterface $entity) {\n $entity = $this->load($entity->id());\n }", "public function restore($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::withTrashed()->findOrFail($id);\n\n /* Restore the specified resource */\n $resource->restore();\n\n /* Redirect to controller index */\n return redirect()\n ->route($this->name . '.index')\n ->with(\n 'success',\n Lang::has($this->name . '.resource-restored') ?\n $this->name . '.resource-restored' :\n 'messages.alert.resource-restored'\n );\n }", "public function restore($id){\n \\App\\Models\\Sucursal::withTrashed()->find($id)->restore();\n Flash::success('Sucursal restaurada.');\n\n return redirect(route('sucursales.deleted'));\n }", "public function restored(Student $student)\n {\n //\n }", "public function restore(User $user, Storage $storage)\n {\n //\n }", "public function restore($id)\n {\n //\n $result = ScanResults::find($id);\n\n $result->resote();\n }", "public function restored(Product $producto)\n {\n //\n }", "public function restored(Credit $credit)\n {\n //\n }", "public function restore(int $id)\n {\n ImagingExam::withTrashed()->where('id', $id)->restore();\n return redirect()->route('admin.imagingExam.index');\n }", "public function restored(Article $article)\n {\n //\n }", "public function restored(Patient $patient)\n {\n //\n }", "public function restore(): void\n\t{\n\t\t$this->processor->restore();\n\t}", "public function restored(Food $food)\n {\n //\n }", "public function restored(Saida $saida)\n {\n //\n }", "public function restore(){\n $this->update(['deleted_by', NULL]);\n return $this->baseRestore();\n }", "public function restore()\n\t{\n\t\t$this->files = array();\n\t}", "public function restore($id)\n {\n PurchaseRequest::withTrashed()->where('id', $id)->restore();\n }", "public function restoring($model)\n\t{\n\t}", "public function restored(Job $job)\n {\n //\n }", "public function restored(Role $role)\n {\n }", "public function restore($id)\n {\n $comic=Comic::withTrashed()->find($id);\n $comic->restore();\n return redirect()->route('comics.index')->with('success',$comic->title);\n \n }", "public function restoring(assignment $assignment)\n {\n //code...\n }", "public function restored(Transaction $transaction)\n {\n //\n }", "public function restored(Transaction $transaction)\n {\n //\n }", "public function restored(Transaction $transaction)\n {\n //\n }", "public function restored(Transaction $transaction)\n {\n //\n }", "public function restored(Contribute $contribute)\n {\n //\n }", "public function restored(assignment $assignment)\n {\n //code...\n }", "public function restoring(User $user)\n {\n //\n }", "protected function performRestore(Model $entity): void\n {\n $entity->restore();\n }", "public function restore(User $user, Image $image)\n {\n //\n }", "public function restore(User $user, Image $image)\n {\n //\n }", "public function restored(Media $media)\n {\n //\n }", "public function restored(PersonalAssignment $personalAssignment)\n {\n //\n }", "public function restored(Region $region)\n {\n //\n }", "public function restored(Document $document)\n {\n //\n }", "public function restoreOriginalService(): void;", "public function undoRestore ()\n {\n if (file_exists ( $this->_previewFilename ))\n {\n unlink($this->_previewFilename);\n }\n }", "public function restored(QuizRegister $quizRegister)\n {\n //\n }", "public function restored(Historia $historia)\n {\n //\n }", "public function restored(RideShareTransaction $rideShareTransaction)\n {\n //\n }", "public function restoring(Wallet $wallet)\n {\n //\n }", "public function restore(User $user, Load $load)\n {\n //\n }", "public function restore(Product $product)\n {\n $this->products->restore($product);\n return redirect()->route(env('APP_BACKEND_PREFIX').'.products.index')->withFlashSuccess('产品恢复成功');\n }", "public function restored(Edit $edit)\n {\n //\n }", "public function restored(Subscription $subscription)\n {\n //\n }", "public function restored(Expense $expense)\n {\n //\n }", "public function restored(Candidate $candidate)\n {\n //\n }", "public function restored(Installment $installment)\n {\n //\n }", "public function restore() {\n self::restoreAll($this->chapterID);\n }", "public function restored(Investor $investor)\n {\n //\n }", "public function restore(User $user, Carrito $carrito)\n {\n //\n }", "public function restore($taskId){\n\n $task = Task::withTrashed()->findOrFail($taskId);\n\n if(Auth::id() != $task->user_id){\n return response()->json(['message'=>'You Don\\'n own this task!'], '401');\n }\n\n if ($task->restore()){\n return response()->json(['message'=>'Resource restored successfully!']);\n }\n\n return response()->json(['message'=>'Please Try later!'], 500);\n }", "public function restored(Item $item)\n {\n //\n }", "public function restored(Item $item)\n {\n //\n }", "public function restore($ref_id, $version = NULL)\n\t{\n\t\t$archive = $this->get_archive($ref_id, $version);\n\t\treturn $this->save($archive);\n\t}", "public function restore($template);", "public function restore($id) {\n $socios = socio::withTrashed()->where('id', '=', $id)->first();\n //Restauramos el registro\n $socios->restore();\n $message='El Socio '.$socios->name.' fue RESTAURADO ';\n $title =\"\";\n Toastr::success($message, $title);\n return redirect()->route(\"listasocios\");\n }", "public function restore($id)\n {\n $restore_deleted=Service::withTrashed()->find($id)->restore();\n\n $notification=array(\n 'message'=>'Service Restored',\n 'alert_type'=>'info',\n );\n return redirect()->back()->with($notification);\n }", "public function restored(Asistencia $asistencia)\n {\n //\n }", "public function restored(Siswa $siswa)\n {\n //\n }", "public function restored(Brand $brand)\n {\n //\n }", "public function restored(Reports $report)\n {\n //\n }", "public function restored(File $file)\n {\n //\n }", "public function restoreAction()\n {\n $id = $this->params()->fromRoute('id');\n\n try {\n\n $list = ItemQuery::create()->findPk($id);\n\n if (!$list) throw new RuntimeException(\n \"Item does not exist.\"\n );\n\n $list->setRemoved(false)->save();\n\n $this->flashMessenger()->addSuccessMessage(\n \"Item Restored.\"\n );\n\n } catch (Exception $e) {\n $this->flashMessenger()->addErrorMessage($e->getMessage());\n }\n\n return $this->redirect()->toRoute('item');\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restored(User $user)\n {\n //\n }", "public function restore(Request $request)\n {\n $supplier = Supplier::withTrashed()->find($request->id);\n\n $this->authorize('restore', $supplier);\n\n $supplier->restore();\n\n return redirect()->route('dashboard.suppliers.index');\n }", "public function restore($id){\n //get() returns a collection so we use first() to get the project model\n $project = Project::withTrashed()->where('id', $id)->first();\n\n $project->restore();\n\n Session::flash('success', 'Project Restored');\n\n return redirect()->route('projects');\n }" ]
[ "0.70306885", "0.7020332", "0.69441843", "0.69441843", "0.69441843", "0.69441843", "0.6861517", "0.68065375", "0.67169356", "0.6540009", "0.64836925", "0.6456305", "0.63944286", "0.6291426", "0.6185406", "0.61730397", "0.6169024", "0.61667275", "0.615217", "0.61463046", "0.6124676", "0.6100778", "0.6096883", "0.6070248", "0.60696113", "0.6063466", "0.6036475", "0.60352844", "0.6028811", "0.6016268", "0.6003353", "0.5994614", "0.5984546", "0.5975694", "0.5967241", "0.59631157", "0.5961628", "0.5953335", "0.5917858", "0.5911248", "0.58989376", "0.58989376", "0.58989376", "0.58989376", "0.5888569", "0.58768946", "0.58764017", "0.5871616", "0.58647996", "0.58647996", "0.58638054", "0.5862617", "0.5857427", "0.5853534", "0.583829", "0.58346516", "0.5832025", "0.583096", "0.5828769", "0.5814865", "0.5814436", "0.5814396", "0.58134294", "0.5805133", "0.57995516", "0.5776108", "0.57756096", "0.57689106", "0.5758047", "0.57534784", "0.57353234", "0.5730772", "0.5730772", "0.5728429", "0.5723111", "0.57162625", "0.56966275", "0.5689194", "0.56704974", "0.5664311", "0.56585073", "0.5658255", "0.56551194", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.56528574", "0.5650578", "0.56497014" ]
0.0
-1
get total count of patents
public function getTotal() { $response = $this->client->post( 'https://idf.intven.com/public_patent_listing.json', [ 'verify' => false, 'json' => [ "report_type" => "public_patent_listing", "queryFields" => new \stdClass(), "filters" => new \stdClass(), "per_page" => 0, "from" => 0, "sort" => "issued_on", "sort_order" => "desc" ], ]); $data = json_decode($response->getBody()->getContents()); return $data->meta_data->total_count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countMatches($pat) {\r\n $num = preg_match_all($pat, $this->contents, $matches);\r\n //var_dump($matches); // debug patterns\r\n return $num;\r\n }", "function count()\n {\n return $this->_matchesNum;\n }", "public function GetPatientsCount();", "public function countMatches() : int\n {\n return sizeof($this->getMatches());\n }", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function totalCount();", "public function totalCount();", "private function count()\n\t\t{\n\t\t\t$query = \"\tSELECT count(1) AS 'total'\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t`\".$this->tree_node.\"` `MTN`\n\t\t\t\t\t\tWHERE 1 = 1\n\t\t\t\t\t\t\tAND `MTN`.`application_release`\t= '\".$this->application_release.\"'\n\t\t\t\t\t\";\n\t\t\t$result = $this->link_mt->query($query);\n\n\t\t\t$row = $result->fetch_array(MYSQLI_ASSOC);\t\n\t\t\treturn $row['total'];\t\t\n\t\t}", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public static function count();", "abstract public function count();", "abstract public function count();", "abstract public function count();", "abstract public function count();", "public function _count();", "public function count()\n {\n return count($this->tokens);\n }", "function count(){}", "function count() ;", "public abstract function count();", "public abstract function count();", "public function count() {\n\t\treturn count($this->_permutations) * $this->test->count();\n\t}", "public function total_notes()\n {\n $count = 0;\n\n foreach($this->sites as $site)\n $count = $count + $site->notes->count();\n\n return $count;\n }", "function panier_get_count() {\n global $panier;\n $resultat = 0;\n foreach ($panier as $item) {\n $resultat+= $item[PS_PANIER_ITEM_QTY];\n }\n return $resultat;\n}", "static public function getTotalCount()\n\t{\n\t\treturn self::$count;\n\t}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function getTotalLength();", "public function getTotalLength();", "public function countTotalUrls()\n {\n return $this->createQueryBuilder('t')\n ->select('COUNT(1)')\n ->getQuery()\n ->getSingleScalarResult();\n }", "public function count()\r\n {\n return $this->fm->count();\n }", "public function getTotalNumberOfResults();", "function get_a_href_count($file){\r\n $h1count = preg_match_all('/<(a.*) href=\\\"(.*?)\\\"(.*)<\\/a>/',$file,$patterns);\r\n return count($patterns[0]);\r\n}", "public function getNumPaths() {\r\n return count($this->paths);\r\n }", "public function getNumberOfRequests()\n {\n return array_sum($this->numberOfRequestsByPattern);\n }", "public function count()\n {\n return $this->client->count($this->compile())['count'];\n }", "function GetNumberOfAllMatches()\n {\n return sizeof($this->all_matches);\n }", "public function count()\n {\n return count($this->routes);\n }", "public function count()\n {\n return count($this->steps);\n }", "public function count() {\n\t\treturn $this->length();\n\t}", "public abstract function get_counts();", "public function count() {\n \n return $this->getLength();\n }", "public function getTotal() {\n\t\treturn $this->find('count', array(\n\t\t\t'contain' => false,\n\t\t\t'recursive' => false,\n\t\t\t'cache' => $this->alias . '::' . __FUNCTION__,\n\t\t\t'cacheExpires' => '+24 hours'\n\t\t));\n\t}", "function count() {\n\t\treturn count($this->variable);\n\t}", "public function count()\n {\n return count($this->group);\n }", "public function count()\n {\n return count($this->getResults());\n }", "protected function get_descendents_count()\n\t{\n\t\t$n = 0;\n\n\t\tforeach ($this->children as $child)\n\t\t{\n\t\t\t$n += 1 + $child->descendents_count;\n\t\t}\n\n\t\treturn $n;\n\t}", "abstract public function countTotal();", "public function getOpposCount()\n {\n return $this->count(self::_OPPOS);\n }", "public function getOpposCount()\n {\n return $this->count(self::_OPPOS);\n }", "public function getOpposCount()\n {\n return $this->count(self::_OPPOS);\n }", "public function countLines();", "public function GetNumberOfResults()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $ret = 0;\n \n if (!$this->_my_root && $this->_search_results instanceof c_comdef_meetings) {\n $ret = $this->_search_results->GetNumMeetings();\n } elseif ($this->_my_root instanceof c_comdef_meeting_search_manager) {\n $ret = $this->_my_root->GetNumberOfResults();\n }\n \n return $ret;\n }", "public function countAll(): int;", "public function getTotalLength() {}", "public function getTotalLength() {}", "public function count()\n {\n return count($this->rules);\n }", "public function computeCount() {\n $count = 0;\n foreach ($this->sourceUrls as $url) {\n $reader = new $this->readerClass($url, $this->idField);\n foreach ($reader as $element) {\n $count++;\n }\n }\n\n return $count;\n }", "public function count()\n {\n return $this->length();\n }", "public function count()\n {\n return $this->getNumParts();\n }", "public function countRespondents()\n {\n $result = $this->client->run('MATCH (n:Person) RETURN COUNT(n) AS respondents;');\n\n return (int) $result->getRecord()->get('respondents');\n }", "public function count()\n {\n return $this->length();\n }", "public function getTotal(): int\n {\n if (isset($this->contents)) {\n return count($this->contents);\n }\n\n return 0;\n }", "public function getFoundCount()\n {\n return $this->provider->foundCount;\n }", "public function getPatientCnt() {\n $sql = \"select count(*)\n from patients\n where patientgroupid = :patientgroupid \";\n $bind = [\n ':patientgroupid' => $this->id];\n\n return Dao::queryValue($sql, $bind);\n }", "public function numLinks();", "public function searchCount(string $searchText): int;" ]
[ "0.7061345", "0.6556615", "0.6509231", "0.64331996", "0.6413745", "0.6413745", "0.6413745", "0.6399894", "0.6399894", "0.62185603", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.6178579", "0.61588836", "0.6140486", "0.6140486", "0.6140486", "0.6140486", "0.6133133", "0.6110267", "0.6087559", "0.60783255", "0.60775733", "0.60775733", "0.6064873", "0.60639566", "0.5984112", "0.5942301", "0.59309405", "0.59309405", "0.5930284", "0.5930284", "0.5930284", "0.5930284", "0.5930284", "0.5930284", "0.5930284", "0.5930284", "0.5930284", "0.5930284", "0.5930284", "0.59285796", "0.59285796", "0.59279615", "0.59232235", "0.59145546", "0.5901204", "0.59006196", "0.58945674", "0.5886231", "0.58805513", "0.58621675", "0.585585", "0.5841564", "0.5841258", "0.58307076", "0.5828247", "0.58254033", "0.582015", "0.58154064", "0.5815307", "0.5802693", "0.58018076", "0.58018076", "0.58018076", "0.57971436", "0.57939625", "0.5793047", "0.57919943", "0.5791027", "0.5782221", "0.57802474", "0.57801735", "0.5773857", "0.5764473", "0.5762327", "0.57534087", "0.57432634", "0.5742251", "0.57321084", "0.57315856" ]
0.63939893
9
get all the patents
public function getAll() { $response = $this->client->post( 'https://idf.intven.com/public_patent_listing.json', [ 'verify' => false, 'json' => [ "report_type" => "public_patent_listing", "queryFields" => new \stdClass(), "filters" => new \stdClass(), "per_page" => $this->getTotal(), "from" => 0, "sort" => "issued_on", "sort_order" => "desc" ], ]); $data = json_decode($response->getBody()->getContents()); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find_all() {\n $this->ensure_path_exists();\n $files = glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT);\n $return = array();\n if ($files === false) {\n return $return;\n }\n foreach ($files as $file) {\n $return[] = substr(basename($file), 0, -6);\n }\n return $return;\n }", "public function extractAll($pat) {\r\n preg_match_all($pat, $this->contents, $matches);\r\n return $matches;\r\n }", "public function get_patterns()\n {\n }", "public function listPath($pat='*')\n {\n $ret = array();\n $list = imap_getmailboxes($this->_c, $this->_c_host,$pat);\n foreach ($list as $x) {\n if (preg_match('/}(.+)$/', $x->name, $m)) {\n $tgt_path = imap_utf7_decode($m[1]);\n } else {\n $tgt_path = imap_utf7_decode($x->name);\n }\n $ret[] = array(\n 'name' => $tgt_path,\n 'attribute' => $x->attributes,\n 'delimiter' => $x->delimiter,\n );\n }\n return $ret;\n }", "public function extract()\n {\n $this->_strings = array();\n \n $skip_tokens = array('*');\n \n foreach ($this->_routes as $route)\n {\n /* @var $route sfRoute */\n $pattern = $route->getPattern();\n foreach ($route->getTokens() as $token)\n {\n if ($token[0] == 'text' && !in_array($token[2], $skip_tokens))\n {\n $this->_strings[] = $token[2];\n }\n }\n }\n \n return $this->_strings;\n }", "private function getPatterns()\n {\n return array_keys($this->responsesByPattern);\n }", "public function getPatterns()\n {\n return $this->patterns;\n }", "public function getPatterns()\n {\n return $this->patterns;\n }", "function patties()\n {\n $patties = [];\n\n foreach( $this->xml->patties->patty as $patty )\n {\n $patties[] = (string) $patty;\n }\n\n return $patties;\n }", "private function extractors(): array\n {\n return [\n new PathExtractor($this->url, $this->accepted_short_codes)\n ];\n }", "public function getMatches() : array\n {\n return $this->getFilesystemLoader()->getMatches();\n }", "public static function get_all_route()\n {\n return include BASE_PATH . 'routes'. DIRECTORY_SEPARATOR . 'web.php';\n }", "public function getPattern();", "public function getPattern();", "public function getPaths();", "protected function pathExtract(): array\n {\n $regExp = [];\n $path = $this->path;\n\n if (\\is_array($this->path)) {\n $regExp = \\array_pop($this->path);\n $path = \\array_pop($this->path);\n }\n\n return [$path, $regExp];\n }", "public function getSearchPattern();", "public function getSearchPattern();", "protected function getCatchablePatterns()\n {\n return array(\n '[a-zA-Z][a-zA-Z0-9_\\.]*[a-zA-Z0-9\\_\\*]*'\n );\n }", "abstract protected function getPatternsAndCallbacks(): array;", "public static function all()\n\t{\n\t\treturn Route::$_routes + Kohana::$tree['routes']['external'];\n\t}", "public function getHandledPaths();", "public function getWildcardPrefixes() {}", "public function listAll()\n {\n return array_merge(\n $this->discovery()->findAllGroupAliasFiles(),\n $this->discovery()->findAllSingleAliasFiles()\n );\n }", "public function getPattern() {}", "public function all(string $path): array;", "function getPaths()\n {\n $paths = array();\n foreach ($this->names as $name) {\n $paths[] = $this->dir.$name.$this->ext;\n }\n return $paths;\n }", "public function entries(){\n return $this->routes;\n }", "function ju_explode_path(string $p):array {return ju_explode_xpath(ju_path_n($p));}", "public function getUriList();", "protected function getSearchPaths() {}", "public static function all(): array\n {\n $paths = array_map(function (string $path): string {\n return normalize_path($path);\n }, apply_filters(self::HOOK, []));\n\n return array_values(\n array_filter($paths, function (string $path): bool {\n return is_readable($path);\n })\n );\n }", "function system_glob_rec($directory='',$pattern='*.*')\n{\n\tsystem_ensure_path_ending($directory);\n\t$paths = system_glob($directory.'*', GLOB_MARK|GLOB_ONLYDIR|GLOB_NOSORT);\n\tif( $pattern )\n\t{\n\t\t$files = system_glob($directory.$pattern);\n\t\tforeach($paths as $path) { $files = array_merge($files,system_glob_rec($path,$pattern)); }\n\t}\n\telse\n\t{\n\t\t$files = $paths;\n\t\tforeach($paths as $path) { $files = array_merge($files,system_glob_rec($path,$pattern)); }\n\t}\n\treturn $files;\n}", "public static final function paths()\n {\n\treturn self::$_paths;\n }", "public function all() {\n return $this->provider->getRoutesByNames(NULL);\n }", "public static function getPatterns(): array\n {\n return ['/The world \\'([^\\']+)\\' could NOT be loaded because it contains errors and is probably corrupt\\!/'];\n }", "public function all()\n\t{\n\t\treturn $this->parts;\n\t}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/trickstr.php',\n 'sources_custom/programe/.htaccess',\n 'sources_custom/programe/aiml/.htaccess',\n 'sources_custom/programe/aiml/index.html',\n 'sources_custom/programe/index.html',\n 'sources_custom/hooks/modules/chat_bots/knowledge.txt',\n 'sources_custom/hooks/modules/chat_bots/trickstr.php',\n 'sources_custom/programe/aiml/readme.txt',\n 'sources_custom/programe/aiml/startup.xml',\n 'sources_custom/programe/aiml/std-65percent.aiml',\n 'sources_custom/programe/aiml/std-pickup.aiml',\n 'sources_custom/programe/botloaderfuncs.php',\n 'sources_custom/programe/customtags.php',\n 'sources_custom/programe/db.sql',\n 'sources_custom/programe/graphnew.php',\n 'sources_custom/programe/respond.php',\n 'sources_custom/programe/util.php',\n );\n }", "public function getArrPatternPath() : array {\n $url = [];\n \n if ($this->hasParent()) {\n $parent = $this->getParent();\n $url = \\array_merge($url, $parent->getArrPatternPath());\n }\n $url[] = $this->getPattern();\n return $url;\n }", "function _get_svn_paths( $def, $base = '' ) {\n\t\t$depth = substr_count( $def, '*' ) - 1;\n\n\t\t$path_rels = array( $base );\n\n\t\t$i = 0;\n\t\tdo {\n\t\t\t$at_depth_paths = array();\n\t\t\tforeach ( $path_rels as $base ) {\n\t\t\t\tif ( !$these_paths = $this->svn->ls( $this->svn_url . $base, 'type=dir' ) )\n\t\t\t\t\tcontinue;\n\t\t\t\tforeach ( $these_paths as $this_path )\n\t\t\t\t\t$at_depth_paths[] = $base . $this_path;\n\t\t\t}\n\n\t\t\t$path_rels = $at_depth_paths;\n\n\t\t\t$i++;\n\t\t} while ( $i <= $depth );\n\n\t\t$return = Automattic_Paths::group( $path_rels, $def );\n\n\t\treturn $return;\n\t}", "public function all(): array\n {\n return $this->routes;\n }", "function rglob($pattern='*', $flags = 0, $path='')\r\r\n\r\r\n{\r\r\n\r\r\n $paths=glob($path.'*', GLOB_MARK|GLOB_ONLYDIR|GLOB_NOSORT);\r\r\n\r\r\n $files=glob($path.$pattern, $flags);\r\r\n\r\r\n foreach ($paths as $path) { $files=array_merge($files,rglob($pattern, $flags, $path)); }\r\r\n\r\r\n return $files;\r\r\n\r\r\n}", "final public function get_paths() {\n return array();\n }", "public function listAll()\n {\n $files = \\Core\\File\\System::listFiles($this->_getPath(), \\Core\\File\\System::EXCLUDE_DIRS);\n $result = [];\n foreach (array_keys($files) as $file) {\n $result[] = pathinfo($file, PATHINFO_FILENAME);\n }\n return $result;\n }", "public function getExtensionPathesFromExtensionList($pathesList) {\n\t\t$pathesList = explode(',', $pathesList);\n\t\t$files = array();\n\t\tforeach($pathesList as $file) {\n\t\t\t$files[] = realpath(trim($file));\n\t\t}\n\t\treturn $files;\t\n\t}", "abstract protected function yieldSearchPaths(): Generator;", "static private function parse(string $pattern): array\n\t{\n\t\t$catchall = false;\n\n\t\tif ($pattern[-1] == '*')\n\t\t{\n\t\t\t$catchall = true;\n\t\t\t$pattern = substr($pattern, 0, -1);\n\t\t}\n\n\t\t$pattern = strtr($pattern, self::EXTENDED_CHARACTER_CLASSES);\n\t\t$parts = preg_split('#(:\\w+|<(\\w+:)?([^>]+)>)#', $pattern, -1, PREG_SPLIT_DELIM_CAPTURE);\n\n\t\t[ $interleaved, $params, $regex ] = self::parse_parts($parts);\n\n\t\tif ($catchall)\n\t\t{\n\t\t\t$regex .= '(.*)';\n\t\t\t$params[] = 'all';\n\t\t}\n\n\t\t$regex .= '$#';\n\n\t\treturn [ $interleaved, $params, $regex ];\n\t}", "public function all()\n\t{\n\t\t$extensions = array();\n\n\t\t// Loop through extensions directories\n\t\tforeach ($this->extensions_directories() as $directory)\n\t\t{\n\t\t\t// Get our extension slug - always\n\t\t\t// matches the folder name.\n\t\t\t$slug = basename($directory);\n\n\t\t\t// Read extension info. Always do this even\n\t\t\t// if no details are required as this will\n\t\t\t// validate the extension.\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$extensions[$slug] = $this->get($slug);\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tksort($extensions);\n\t\treturn array_values($extensions);\n\t}", "protected function _scan_files()\n\t{\n\t\t$terms = array();\n\n\t\t$parser = new PHPParser_Parser(new PHPParser_Lexer);\n\n\t\tforeach ($this->_list_files(array('views', 'classes')) as $file)\n\t\t{\n\t\t\t$statements = $parser->parse(file_get_contents($file));\n\n\t\t\t$terms = Arr::merge($terms, $this->_get_terms_from_statements($statements));\n\t\t}\n\n\t\treturn $terms;\n\t}", "public static function find_all()\n\t{\n\t\t# TODO: return WikirPage instances\n\t\treturn file_list_dir(option('pages_dir'));\n\t}", "public function getPatterns()\n {\n if (!isset($this->_params['html'])) {\n $linebreak = '\\n|<br(?:\\s*/)?>';\n $whitespace = '\\s|&nbsp;';\n } elseif ($this->_params['html']) {\n $linebreak = '<br(?:\\s*/)?>';\n $whitespace = '&nbsp;';\n } else {\n $linebreak = '\\n';\n $whitespace = '\\s';\n }\n $startOfLine = '((?:^|' . $linebreak . ')(?:' . $whitespace . ')*)';\n $endOfLine = '(?=(?:' . $whitespace . ')*(?:$|\\.|' . $linebreak . '))';\n $startOfWord = '(^|' . $whitespace . '|' . $linebreak . ')';\n $endOfWord = '(?=$|\\.|' . $whitespace . '|' . $linebreak . ')';\n\n return array('regexp' => array(\n // Bold.\n '#' . $startOfLine . '(\\*(?:[^*](?!$|' . $linebreak . '))+\\*)' . $endOfLine .\n '|' . $startOfWord . '(\\*[^*\\s]+\\*)' . $endOfWord . '#i'\n => '$1$3<strong>$2$4</strong>',\n\n // Underline.\n '#' . $startOfLine . '(_(?:[^*](?!$|' . $linebreak . '))+_)' . $endOfLine .\n '|' . $startOfWord . '(_[^_\\s]+_)' . $endOfWord . '#i'\n => '$1$3<u>$2$4</u>',\n\n // Italic.\n '#' . $startOfLine . '(/(?:[^*](?!$|' . $linebreak . '))+/)' . $endOfLine .\n '|' . $startOfWord . '(/[^/\\s]+/)' . $endOfWord . '#i'\n => '$1$3<em>$2$4</em>',\n ));\n }", "private function visitRulesetPaths($rulesetNode){\n\n $paths = array();\n foreach($rulesetNode->paths as $p){\n if( $p[0]->elements[0]->combinator === ' ' ){\n $p[0]->elements[0]->combinator = '';\n }\n\n foreach($p as $pi){\n if( $pi->getIsReferenced() && $pi->getIsOutput() ){\n $paths[] = $p;\n break;\n }\n }\n }\n\n return $paths;\n }", "protected function patternFromGlob($line)\n {\n $pattern = '#'.substr(Finder\\Glob::toRegex($line), 2, -1).'#';\n $pattern = str_replace('[^/]*', '.*', $pattern);\n\n return array($pattern, false, true);\n }", "public function routes(): array\n {\n $language = $this->language;\n $kirby = $language->kirby();\n $routes = $kirby->routes();\n\n // only keep the scoped language routes\n $routes = array_values(array_filter($routes, function ($route) use ($language) {\n\n // no language scope\n if (empty($route['language']) === true) {\n return false;\n }\n\n // wildcard\n if ($route['language'] === '*') {\n return true;\n }\n\n // get all applicable languages\n $languages = Str::split(strtolower($route['language']), '|');\n\n // validate the language\n return in_array($language->code(), $languages) === true;\n }));\n\n // add the page-scope if necessary\n foreach ($routes as $index => $route) {\n if ($pageId = ($route['page'] ?? null)) {\n if ($page = $kirby->page($pageId)) {\n\n // convert string patterns to arrays\n $patterns = A::wrap($route['pattern']);\n\n // prefix all patterns with the page slug\n $patterns = array_map(function ($pattern) use ($page, $language) {\n return $page->uri($language) . '/' . $pattern;\n }, $patterns);\n\n // reinject the pattern and the full page object\n $routes[$index]['pattern'] = $patterns;\n $routes[$index]['page'] = $page;\n } else {\n throw new NotFoundException('The page \"' . $pageId . '\" does not exist');\n }\n }\n }\n\n return $routes;\n }", "function media_theplatform_mpx_extract_all_js_links($text) {\n $pattern = '/\\<script type\\=\\\"text\\/javascript\\\" src\\=\\\"(.*?)\\\"/';\n preg_match_all($pattern, $text, $results);\n $js_files = $results[1];\n return $js_files;\n}", "public static function getRoutes()\n {\n $a = array();\n $router = ROUTER::init();\n foreach ($router->assigns as $ass)\n {\n if (isset($ass['module']) and isset($ass['action']))\n {\n $a[] = array('route' => $ass['route'], 'execute' => $router->current_dir . '/' . $ass['module'] . '/' . $ass['action'] . '.action.php');\n }\n elseif (isset($ass['function']))\n {\n $a[] = array('route' => $ass['route'], 'function' => $ass['function']);\n }\n else\n {\n /*do nothing*/;\n }\n }\n return $a;\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/google_search.php',\n 'lang_custom/EN/google_search.ini',\n 'sources_custom/blocks/side_google_search.php',\n 'sources_custom/blocks/main_google_results.php',\n 'themes/default/templates_custom/BLOCK_SIDE_GOOGLE_SEARCH.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_GOOGLE_SEARCH_RESULTS.tpl',\n 'themes/default/css_custom/google_search.css',\n 'pages/comcode_custom/EN/_google_search.txt',\n );\n }", "public function find () {\n\t\t$results = array();\n\n\t\t// Iterate all paths in target\n\t\tforeach ($this->target->get_resolved_paths() as $path) {\n\t\t\t\n\t\t\t// Iterate all files in paths\n\t\t\t$files = directory_contents($path);\n\t\t\tforeach ($files as $file) {\n\t\t\t\t$lines = file($file);\n\t\t\t\t\n\t\t\t\t// Iterate all lines in file\n\t\t\t\tfor ($i=0; $i < count($lines); $i++) { \n\t\t\t\t\tif (preg_match(self::BREAKPOINT, $lines[$i])) {\n\t\t\t\t\t\t$results[$file][] = $i + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (count($results) == 0) $results = null;\n\t\t\n\t\treturn $results;\n\t}", "function preg_wildcard($pat) {\n return str_replace(array('*', '?', '/'),array('.*', '.', '\\/'), $pat);\n}", "public function allNamed(): array;", "public function getPatterns()\n {\n $regexp = $words = array();\n\n if (isset($this->_params['words_file']) &&\n is_readable($this->_params['words_file'])) {\n /* Read the file and iterate through the lines. */\n $lines = file($this->_params['words_file']);\n foreach ($lines as $line) {\n /* Strip whitespace and comments. */\n $words[] = preg_replace('|#.*$|', '', trim($line));\n }\n }\n\n if (isset($this->_params['words'])) {\n $words = array_merge(\n $words,\n array_map('trim', $this->_params['words'])\n );\n }\n\n foreach ($words as $val) {\n if (strlen($val)) {\n $regexp[\"/(\\b(\\w*)$val\\b|\\b$val(\\w*)\\b)/i\"] = $this->_getReplacement($val);\n }\n }\n\n return array('regexp' => $regexp);\n }", "public function getAllPaths($page) {\n return $this->get('get_all_paths', ['page' => $page]);\n }", "public function getAliasList();", "public static function getAll() {}", "public function getParameters() {\n $matches = array();\n $regexp = '/:[a-zA-Z_][a-zA-Z0-9_]*/';\n $count = preg_match_all($regexp, $this->path, $matches);\n \n return $matches[0];\n }", "abstract protected function paths();", "function GetAllMatches()\n {\n return $this->all_matches;\n }", "public function pathProvider() {\n\t\treturn [\n\t\t\t['dir/sub/foo.txt'],\n\t\t\t['bar.txt'],\n\t\t\t[\"single'quote'/sub/foo.txt\"],\n\t\t\t['日本語/url %2F +encode/asd.txt'],\n\t\t\t[\n\t\t\t\t'a somewhat longer folder than the other with more charaters as the all the other filenames/' .\n\t\t\t\t'followed by a somewhat long file name after that.txt'\n\t\t\t]\n\t\t];\n\t}", "public function getPaths()\n {\n return array_map(function (ScriptBranch $branch) {\n return $branch->getPath();\n }, $this->descriptorMap);\n }", "public function getTemplatesByPattern($pattern)\n {\n File::resolveFilepath($pattern);\n\n $templates = array();\n foreach ($this->_scriptdir as $dir) {\n if (true === is_array(glob($dir . DIRECTORY_SEPARATOR . $pattern))) {\n $templates = array_merge($templates, glob($dir . DIRECTORY_SEPARATOR . $pattern));\n }\n }\n\n return $templates;\n }", "function get_urls(){\n\tglobal $urllist;\n\t$list = file($urllist);\n\t//print_r($list);\n\treturn $list;\n}", "public function getRouteFiles(): array;", "public static function getAllExtensions():array;", "public static function getPatternUrl()\n {\n return handles('antares::automation');\n }", "public function matchAll(string $pattern): array\n {\n preg_match_all($pattern, $this->string, $matches);\n\n return array_map(function (string $match) {\n return new static($match, $this->encoding);\n }, $matches[0]);\n }", "protected function getPackageSegments()\n {\n $package = (string) $this->argument('package');\n\n return array_map('studly_case', explode('/', $package, 2));\n }", "protected function getURLs($path)\n {\n // Add path to each urls\n return array_map(create_function('$elm', 'return $elm . \"' . $path . '\";'), $this->urls);\n }", "function find_all_files($dir) \n{ \n $files = array();\n foreach (glob($dir) as $file) {\n $files[] = $file;\n }\n return $files;\n}", "public function getPathParts()\n\t{\n\t\t$parts = \\explode('.', $this->path);\n\t\treturn Container::filterValues($parts, '\\strlen');\n\t}", "function pewc_get_matches() {\n\t$matches = array(\n\t\t'all'\t\t=> __( 'All rules match', 'pewc' ),\n\t\t'any'\t\t=> __( 'Any rule matches', 'pewc' )\n\t);\n\treturn $matches;\n}", "public function all()\n {\n return self::$allRoutes;\n }", "public function getPaths()\n {\n return $this->_paths;\n }", "private function resources($dir) {\n\t\treturn array_map(function($file) {\n\t\t\t$parts=explode(DS,$file);\n\t\t\treturn str_replace('.md','',end($parts));\n\t\t},@glob(str_replace('/',DS,$dir).'*.md'));\n\t}", "public function getRoutes() : array;", "public function getRoutes() : array;", "public static function getPluginList () {\n\t\treturn self::$pInfo[1];\n\t\t$glob = glob(TH_ROOT.TH_PLUGINS.'*/plugin.php');\n\t\tforeach($glob as $plugin) {\n\t\t\t// $plugin is a full path, we don't want that.\n\t\t\t$plugin = explode(TH_ROOT.TH_PLUGINS, $plugin, 2);\n\t\t\t$plugin = explode('/plugin.php', $plugin[1]);\n\t\t\t$r[] = $plugin[0];\n\t\t}\n\t\treturn $r;\n\t}", "static function getPaths()\n {\n return self::$paths;\n }", "private function get_locations( string $path ): array {\n\t\treturn array_map( function ( string $location ) use ( $path ): string {\n\t\t\treturn \"{$location}{$path}\";\n\t\t}, $this->locations );\n\t}", "public static function getPlugins()\n\t{\n\t\treturn $plugins = glob(__DIR__.'/../../content/plugins/*/index.php');\n\t}", "public function paths(){\n\t\treturn array_map(function($item){ return $item[0];}, $this->added);\n\t}", "public function getPaths(): array\n {\n return $this->paths;\n }", "public function getPaths(): array\n {\n return $this->paths;\n }", "public function getPaths()\n {\n return $this->paths;\n }", "public function getList($path);", "public function getPath() {\n\t\tforeach ($this->aPoints as $intPoint) {\n\t\t\t$this->fillFullPath($intPoint, $intPoint);\n\t\t}\n\t\treturn $this->aFullPathes;\n\t}", "public function install_get_path_search_list()\n {\n return array(\n 0 => '/',\n 1 => 'mybb',\n 2 => 'forum',\n 3 => 'forums',\n 4 => 'board',\n 5 => 'boards',\n 6 => 'upload',\n 7 => 'uploads',\n 8 => '../forums',\n 9 => '../forum',\n 10 => '../boards',\n 11 => '../board',\n 12 => '../mybb',\n 13 => '../upload',\n 14 => '../uploads',\n 15 => '../themes',\n 16 => '../theme',\n 17 => '../main'\n );\n }", "function ju_explode_xpath($p):array {return jua_flatten(array_map(function($s) {return explode('/', $s);}, ju_array($p)));}", "public static function getAllURLParams()\n\t{\n\t\treturn explode('/', $_SERVER['REQUEST_URI']);\n\t}", "public static function allCTL(){\n $names = array();\n foreach (self::glob_recursive(dirname(__FILE__).'/CTL/*.php') as $filename)\n {\n $name = \"Main\\\\\".str_replace(dirname(__FILE__).'/', \"\", $filename);\n $name = str_replace(\"/\", \"\\\\\", $name);\n $name = str_replace(\".php\", \"\", $name);\n $names[] = $name;\n }\n\n return $names;\n }", "public function getUrls(): array;", "public function getUrls(): array;" ]
[ "0.6249042", "0.61362493", "0.6082216", "0.6031204", "0.57674956", "0.56607276", "0.5582528", "0.5582528", "0.55787194", "0.55692744", "0.5541438", "0.552661", "0.5483616", "0.5483616", "0.5480713", "0.54735243", "0.5457536", "0.5457536", "0.5456774", "0.5447329", "0.5446411", "0.5445613", "0.54191685", "0.54092556", "0.54056245", "0.540171", "0.5388127", "0.5292716", "0.52745914", "0.5257779", "0.5229932", "0.5229864", "0.52090544", "0.52024734", "0.5202289", "0.51877075", "0.51793575", "0.5174205", "0.51724976", "0.51710784", "0.5164544", "0.5149921", "0.5140911", "0.5136001", "0.51351786", "0.5130052", "0.51290387", "0.51256984", "0.5100899", "0.5095191", "0.50888073", "0.5061565", "0.5048208", "0.50333154", "0.50287634", "0.5025253", "0.5019872", "0.50157374", "0.50078964", "0.4999916", "0.49987194", "0.49956718", "0.49948707", "0.49930018", "0.4988557", "0.4983794", "0.49814278", "0.49621597", "0.4962128", "0.49596223", "0.49589062", "0.49560374", "0.49526063", "0.4941122", "0.49369845", "0.49328187", "0.49322137", "0.49245533", "0.4920742", "0.49190584", "0.49186838", "0.4916782", "0.49064535", "0.4906368", "0.4906368", "0.4902305", "0.49005613", "0.48966947", "0.48953685", "0.48941085", "0.4893618", "0.4893618", "0.48915645", "0.48913854", "0.48820588", "0.48797342", "0.48615035", "0.48603147", "0.48589736", "0.4858941", "0.4858941" ]
0.0
-1
Specify Model class name
public function model() { return Company::class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getModelName()\n {\n if (isset($this->options[\"type\"])) {\n $type = ucfirst($this->options[\"type\"]);\n $class = \"\\\\app\\\\models\\\\feeds\\\\\" . $type;\n if (class_exists($class)) {\n return $class;\n }\n }\n \n return \"\\\\app\\\\models\\\\\" . $this->objectName;\n }", "public function getModelNameBasedOnClassName(): string\n {\n $fqn = explode(\"\\\\\", get_class($this));\n\n return strtolower(end($fqn));\n }", "public static function model($className=__CLASS__)\r\n\t{\r\n return parent::className();\r\n\t}", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n \treturn parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) \n { \n return parent::model($className); \n }", "public static function model($className=__CLASS__) \n { \n return parent::model($className); \n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model ($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n\treturn parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) \n\t{\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public function getModelClass(): string\n {\n return static::${'modelClass'};\n }", "public static function model($className=__CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model ($className = __CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className = __CLASS__){\n return parent::model($className);\n }", "public static function model($className = __CLASS__){\n return parent::model($className);\n }", "public function getModelClass();", "public function getModelClass();", "public function getModelClass();", "public static function model($className = __CLASS__) {\n return parent::model( $className );\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }" ]
[ "0.768929", "0.76618075", "0.7585344", "0.7583571", "0.7583571", "0.7542252", "0.75075734", "0.74778146", "0.74702877", "0.74578375", "0.74578375", "0.7453601", "0.7453601", "0.7447208", "0.7444998", "0.7435527", "0.74304074", "0.7416409", "0.74128395", "0.74125767", "0.74125767", "0.74125767", "0.741222", "0.7407984", "0.7407984", "0.7407984", "0.7407984", "0.7407984", "0.7407984", "0.7407984", "0.7407984", "0.7407984", "0.7407984", "0.7407984", "0.740793", "0.74018055", "0.7400949", "0.739494", "0.73907846", "0.73907846", "0.73907846", "0.73907846", "0.73907846", "0.73907846", "0.73907846", "0.73907846", "0.73907846", "0.73907846", "0.7390499", "0.7390499", "0.7384692", "0.7384692", "0.7384692", "0.7384692", "0.7384692", "0.7384692", "0.7383603", "0.7379902", "0.7379902", "0.73766464", "0.73766464", "0.73766464", "0.73750174", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766", "0.7373766" ]
0.0
-1
Boot up the repository, pushing criteria
public function boot() { $this->pushCriteria(app(RequestCriteria::class)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initRepository(): void;", "public function init_repo() {\n\n\t\t\t// include the repository configuration\n\t\t\t$repos = include_once(CONFIGPATH . 'repositories.php' );\n\n\t\t\t// the $_GET['deploy'] parameter from request\n\t\t\t$requested_deploy = filter_input( \\INPUT_GET, 'deploy', \\FILTER_SANITIZE_STRING );\n\n\t\t\t// assume that no repository is selected for deployment\n\t\t\t$selected = false;\n\n\t\t\t// if no deploy param was found, maybe pick up the first (and often, only) repository config\n\t\t\tif ( empty( $requested_deploy ) ) {\n\n\t\t\t\t$selected = $this->maybe_select_deploy( $repos[ 0 ], $requested_deploy );\n\n\t\t\t// otherwise, loop through repositories to select the requested one\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tforeach ( $repos as $deploy_config ) {\n\n\t\t\t\t\t$selected = $this->maybe_select_deploy( $deploy_config, $requested_deploy );\n\n\t\t\t\t\t// if we found one, break the loop\n\t\t\t\t\tif ( $selected === true ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// we didn't find any, throw an error\n\t\t\tif ( $selected === false ) {\n\t\t\t\terror(\n\t\t\t\t\t'501 Not Implemented', 'Configuration not found for the requested deploy'\n\t\t\t\t);\n\t\t\t}\n\t\t}", "private function initRepositories(): void {\n $this->usersRepository = new UsersRepository();\n }", "public function prepare(): void\n {\n $this->processRunner->runAndReport(\n sprintf(\n 'git clone %s --depth 1 --single-branch --branch %s project/sylius',\n $this->getGitRepository(),\n $this->getVersion()\n )\n );\n $this->processRunner->runAndReport('composer install --working-dir project/sylius --no-dev --no-interaction');\n }", "public function init() {\n $git_wrapper = new \\GitWrapper\\GitWrapper();\n if (file_exists($this->directory)) {\n $this->git = $git_wrapper->workingCopy($this->directory);\n $this->git->checkout($this->branch);\n }\n else {\n $this->git = $git_wrapper->cloneRepository($this->getRepositoryURL(), $this->directory, ['branch' => $this->branch]);\n }\n }", "public function set_needed_repos(): void {}", "public function set_needed_repos(): void {}", "protected function initRepository()\n {\n $this->repository = new Repository([\n 'name' => 'vendor/name',\n 'description' => '✈️The package is a ThinkSNS+ package.',\n 'type' => 'library',\n 'license' => 'MIT',\n 'require' => [\n 'php' => '>=7.1.3',\n ],\n 'autoload' => [],\n 'config' => [\n 'sort-packages' => true,\n ],\n ]);\n }", "public function deploy(){\n\t\t\t// load all configuration, payload, etc\n\t\t\t$this->load();\n\n\t\t\t// setup directories\n\t\t\t$this->setup_dirs();\n\n\t\t\t// initialise local git repositories\n\t\t\t$this->init_repo();\n\n\t\t\t// run the deployment\n\t\t\t$this->_deploy();\n\t\t}", "public function run()\n {\n $repo1 = Repo::create([\n 'name' => 'johnbolton/exercitationem',\n 'url' => 'https://github.com/johnbolton/exercitationem',\n 'event_id' => 1,\n ]);\n\n $repo2 = Repo::create([\n 'name' => 'pestrada/voluptatem',\n 'url' => 'https://github.com/pestrada/voluptatem',\n 'event_id' => 2,\n ]);\n }", "protected function prepareDatabase()\n {\n $this->stateSaver->setConnection($this->input->getOption('database'));\n\n if (!$this->stateSaver->repositoryExists()) {\n $options = ['--database' => $this->input->getOption('database')];\n $this->call('migrate:install', $options);\n }\n }", "protected function initializeAction() {\t\n\t\t$this->persdataRepository = t3lib_div::makeInstance('Tx_PtConference_Domain_Repository_persdataRepository');\n\t}", "public function setUp() {\n\n $connection = new \\Redis();\n $connection->connect('127.0.0.1', 6379);\n $connection->select(11);\n $adapter = new Rstore\\ConnectionAdapter\\Phpredis($connection);\n\n $this->connection = $connection;\n $this->repo = new Repository(\n $adapter,\n yaml_parse_file(__DIR__.'/../../config/models.yaml')\n );\n }", "public function setUp()\n {\n $this->config = new Repository();\n }", "public function main() {\n $this->retrieveUsers();\n\n // Adds genome configurations to user\n // Adds genome uploads and genome updates to genome configurations\n foreach($this->users as &$user) {\n $this->retrieveUserConfigs($user);\n foreach($user['configs'] as &$config) {\n $this->retrieveConfigUploads($config);\n $this->retrieveConfigUpdates($config);\n }\n }\n\n // Removes not used databases\n $this->dropUnusedDatabases();\n }", "public function init_repo() {\n\n\t\t\t// we don't need to maintain local repos for slim deploys\n\t\t\tif ( SLIM ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// if the repo is already initialised, we don't need to\n\t\t\tif ( is_dir( \"wpd-repos/{$this->config->repo[ 'name' ]}/.git\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// store the directory we're in right now, so we can come back\n\t\t\t$original_dir = getcwd();\n\n\t\t\t// switch the repo's directory\n\t\t\tchdir( \"wpd-repos/{$this->config->repo[ 'name' ]}\" );\n\n\t\t\t// initialise git\n\t\t\texec( 'git init' );\n\n\t\t\t// add the remote repo as a remote called origin\n\t\t\texec( \"git remote add origin \" . $this->config->repo[ 'git_url' ] );\n\n\t\t\t// switch back to the original directory\n\t\t\tchdir( $original_dir );\n\t\t}", "public function __construct()\n {\n $testConfig = array(\n 'database' => array(\n 'in_memory' => true,\n 'driver' => 'pdo_sqlite',\n )\n );\n\n $this->application = new BacklogApplication();\n $this->application->registerPlugin($plugin = DoctrinePlugin::bootstrap($testConfig, 'test'));\n $this->application->setAutoExit(false);\n $this->repositoryManager = $plugin->getRepositoryManager();\n $this->persons = $this->repositoryManager->getPersonRepository();\n }", "protected function initial()\n {\n $adapter = new Local('/', LOCK_SH, Local::SKIP_LINKS);\n $local = new Filesystem($adapter);\n foreach ($this->config->returnActions() as $key => $elem) {\n $ctype = (strtolower($elem['typebackup']) !== 'mysql' ? ucfirst(strtolower($elem['type'])) : 'Time').ucfirst(strtolower($elem['typebackup']));\n $dst = $this->distination($this->config->returnConfig($elem['dst']), $key, $elem['dst']);\n $class = '\\backup\\Actions\\\\'.$ctype;\n $this->run[] = new $class($elem, $dst, $local, $this->config->returnMysqlConfig($elem['mysqlconfig']));\n MyLog::info('Initialization backup process - '.$ctype.' with config', $elem, 'main');\n $this->initial = $this->initial === false ? true : true;\n }\n }", "public function run()\n {\n if (!Repository::find(6)) {\n Repository::create([\n 'id' => 6,\n 'type' => 'model',\n 'name' => '2020 A3 Sedan'\n ]);\n }\n\n if (!Repository::find(7)) {\n Repository::create([\n 'id' => 7,\n 'type' => 'model',\n 'name' => 'BMW Wagon'\n ]);\n }\n\n if (!Repository::find(8)) {\n Repository::create([\n 'id' => 8,\n 'type' => 'model',\n 'name' => 'Ford EcoSport'\n ]);\n }\n\n if (!Repository::find(9)) {\n Repository::create([\n 'id' => 9,\n 'type' => 'model',\n 'name' => 'Honda Amaze'\n ]);\n }\n\n if (!Repository::find(10)) {\n Repository::create([\n 'id' => 10,\n 'type' => 'model',\n 'name' => 'NX 300 F SPORT'\n ]);\n }\n }", "protected function prepareDatabase()\n {\n if (!$this->repositoryExists()) {\n $this->components->info('Preparing database.');\n\n $this->components->task('Creating package migration table', function () {\n return $this->callSilent('package:migrate:install', array_filter([\n '--database' => $this->option('database'),\n ])) == 0;\n });\n\n $this->newLine();\n }\n\n }", "public function collect() {\n // register installed projects\n foreach ($this->drush->getExtensions() as $extension) {\n if ($extension->type == 'theme') {\n continue;\n }\n\n $projectName = $this->projectFactory->getProjectName($extension);\n if ($this->projectRegistry->hasProject($projectName)) {\n $project = $this->projectRegistry->getProject($projectName);\n }\n else {\n $project = $this->projectFactory->createProjectFromExtension($extension);\n $this->projectRegistry->addProject($project);\n }\n\n $module = $this->projectFactory->createModuleFromExtension($extension);\n $module->setProject($project);\n $project->addModule($module);\n\n $this->projectRegistry->addModule($module);\n }\n\n // populate module dependencies\n foreach ($this->drush->getExtensions() as $extension) {\n if ($extension->type == 'theme') {\n continue;\n }\n\n $module = $this->projectRegistry->getModule($extension->name);\n foreach (array_keys($extension->requires) as $name) {\n if ($this->projectRegistry->hasModule($name)) {\n $module->addDependency($this->projectRegistry->getModule($name));\n }\n }\n foreach (array_keys($extension->required_by) as $name) {\n if ($this->projectRegistry->hasModule($name)) {\n $module->addRequiredByModule($this->projectRegistry->getModule($name));\n }\n }\n }\n }", "public function __construct()\n {\n $this->kitchenRecipeRepository = app(KitchenRecipeRepository::class);\n $this->kitchenIngredientRepository = app(KitchenIngredientRepository::class);\n $this->kitchenIngredientKitchenRecipeRepository = app(KitchenIngredientKitchenRecipeRepository::class);\n }", "public function init()\n {\n\n // initialize the prepared statements\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::PRODUCT_MEDIA_GALLERIES));\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::PRODUCT_MEDIA_GALLERY));\n $this->addFinder($this->finderFactory->createFinder($this, SqlStatementKeys::PRODUCT_MEDIA_GALLERIES_BY_SKU));\n }", "function boot()\n {\n parent::boot();\n $this->pushCriteria(app(RequestCriteria::class));\n if ($_FILES) {\n config(['repository.cache.enabled' => false]);\n }\n }", "private function registerRepository(){\n $this->dataSources = array(\n 1=>new DataSourceIRC61647(),\n );\n }", "public function __construct(UserRepository $repository)\n {\n parent::__construct();\n $this->repository = $repository;\n\t $this->repository->pushCriteria(new HasReadyStartupsCriteria());\n }", "function repositoryCustom()\n {\n }", "public final function prep(){\n\n //disable apache from append session ids to requests\n ini_set('session.use_trans_sid',0);\n //only allow sessions to be used with cookies\n ini_set('session.use_only_cookies',1);\n\n //base directory of application\n //$this->path = dirname($_SERVER['DOCUMENT_ROOT']);\n $this->path = dirname(dirname(dirname(dirname(dirname(__DIR__)))));\n \n //load the appropriate application production configuration \n //and override with any dev config.\n if(is_file($this->path.'/.config.php')){\n $this->config = require($this->path.'/.config.php');\n if($this->config['APP_MODE']!='PROD' && is_file($this->path.'/.dev.config.php')){\n $this->config = array_merge($this->config,require($this->path.'/.dev.config.php'));\n }//if\n }//if\n \n //if the COMPOSER PATH isn't set then resort to the default installer path \"vendor/\"\n if(!isset($this->config['COMPOSER_PATH'])){\n $this->config['COMPOSER_PATH'] = 'vendor';\n }//if\n\n }", "public function run()\n {\n return $this->repoClass->init();\n }", "public function main()\n\t{\n\t\t$this->loadConfig();\n\t\t$this->validateProject();\n\t\t$this->cleanConfig();\n\t\t$this->installDependencies();\n\t\t$this->createAutoload();\n\t\t$this->finish();\n\t}", "protected function setupDBData()\n {\n /**\n * IMPORTANT NOTE : these functions must be executed sequentially in order for the command to work.\n */\n $this->setupProducts();\n $this->setupServerTypes();\n $this->setupServers();\n $this->setupUsers();\n }", "public function __construct()\n {\n $this->bigStatisticsRepo = new BigStatisticsRepository();\n }", "function plugin_initconfig_repository()\n{\n global $_CONF;\n\n $c = config::get_instance();\n if (!$c->group_exists('repository')) {\n $c->add('sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, 'repository');\n $c->add('fs_main', NULL, 'fieldset', 0, 0, NULL, 0, true, 'repository');\n $c->add('repository_moderated', 1,\n 'select', 0, 0, 0, 10, true, 'repository');\n $c->add('max_pluginpatch_upload', 2000000, \n 'text', 0, 0, 0, 60, true, 'repository'); // 2 MB\n }\n\n return true;\n}", "public function run()\n {\n passthru('cd ' . realpath($this->basedir) . ' && git pull origin master && curl -sS https://getcomposer.org/installer | php && php composer.phar install && git remote update && cd -');\n }", "function install(){}", "public function __construct()\n {\n $this->postRepository = new PostRepository();\n $this->userRepository = new UserRepository();\n $this->commentRepository = new CommentRepository();\n $this->replyRepository = new ReplyRepository();\n }", "protected function init()\n {\n if (in_array('users', Mongez::getStored('modules'))) {\n $this->isUserModuleExits = true;\n }\n\n $this->info('Preparing data...');\n $this->initController();\n $this->initModel();\n $this->initResource();\n $this->initRepository();\n $this->initData();\n }", "function rinstall() {\n\t\t$versionPath = $this->getVersionPath();\n//\t\tdebug($versionPath);\n\t\t/** @var Repo $repo */\n\t\tforeach ($this->repos as $repo) {\n\t\t\techo BR, '## ', $repo->path(), BR;\n\t\t\tif ($this->rexists($repo->path())) {\n\t\t\t\t$deployPath = $versionPath . '/' . $repo->path();\n\t\t\t\t$cmd = 'cd ' . $deployPath . ' && hg update -r ' . $repo->getHash();\n\t\t\t\t$this->ssh_exec($cmd);\n\t\t\t} else {\n\t\t\t\techo 'Error: '.$repo->path.' is not on the server. Maybe do rdeploy?', BR;\n\t\t\t}\n\t\t}\n\t}", "public function setup (){\n\t\techo \"\\n\";\n\t\techo \"Setting up: `\".$this->installedComponents[0]->name.\"`\\n\";\n\t\techo \"version: `\".$this->installedComponents[0]->version.\"`\\n\";\n\t\t//$installed[0]->version_normalized;\n\t\t\n\t\t\n\t\t#var_dump(\"xyz\");\n\t\techo \"-----------------------------------------\\n\";\n\t\t\n\t\t$searchDir = realpath($this->vendorDir . '/../..');\n\t\tif( file_exists($searchDir.\"/configuration.ini\") ){\n\t\t\techo \"found a previous `configuration.ini` ( \".$searchDir.\"/configuration.ini\".\" ) \\n\";\t\n\t\t\t\n\t\t\t$app = $this->readConfiguration($searchDir.\"/configuration.ini\" );\n\t\t\t$coreComponent = $this->getComponentVersion($this->installedComponents);\n\t\t\t\n\t\t\techo \"\\nsettings\\n\";\n\t\t\t//print_r($app->settings['conn']);\n\t\t\t\n\t\t\t//print_r();\n\t\t\t\n\t\t\t/* create the $this->pdo instance */\n\t\t\t$this->createPDO($app->configuration->role->conn);\n\t\t\t\n\t\t\t\n\t\t\t#echo \"\\npaths\\n\";\n\t\t\t#print_r($app->paths);\n\t\t\t#echo \"\\ncoreComponent\\n\";\n\t\t\t#print_r($coreComponent);\n\t\t\t\n\t\t\t#echo \"need to add config-parse code here..\\n\";\n\t\t\t////////////////////////////////////////////////////\n\t\t\t$this->createdb($this->pdo);\n\t\t\t\n\t\t\t//echo \"\\n\\nFINISHED!!\\n\\n\";\n\t\t\t\n\t\t}else{\n\t\t\techo \"\\n No configuration found, starting setup.\\n\";\n\t\t\t$public_html = $this->public_html();\n\t\t\t$tempFolder = $this->tempFolder();\n\t\t\t\n\t\t\t/* create the $this->pdo instance from requested credentials */\n\t\t\t$dbCredentials = $this->dbCredentials();\n\t\t\t\n\t\t\t////////////////////////////////////////////////////\n\t\t\t$this->pdo;\n\t\t\techo \"\\n\\nUNFINISHED!!\\n\\n\";\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\techo \"\\n\";\n\t}", "abstract protected function bootstrap();", "public function init() {\n\t\trequire(__DIR__ . '/../setup-scripts/createExplicitUsers.php');\n\t\trequire(__DIR__ . '/../setup-scripts/createExplicitGroups.php');\n\t\trequire(__DIR__ . '/../setup-scripts/createExplicitGroupsDifferentOU.php');\n\t\tparent::init();\n\t}", "private function initProjects()\n\t{\n\t\t$this->priorities = Dao::readAll(Priority::class, [Dao::key('redmine_id')]);\n\t\t$this->projects = Dao::readAll(Project::class, [Dao::key('redmine_id')]);\n\t\t$this->statuses = Dao::readAll(Status::class, [Dao::key('redmine_id')]);\n\t}", "abstract public function boot();", "abstract public function boot();", "abstract public function boot();", "abstract public function boot();", "public function __construct()\n {\n $this->typeRepo = new TypesRepository();\n }", "public function install(){\r\n\t\t\r\n\t}", "public function sync()\n {\n $sql = null;\n $module = new \\ZPM\\Core\\Setup\\Schema();\n $modData = new \\ZPM\\Core\\Setup\\Info();\n\n $module->install();\n }", "public function run()\n {\n user_type_repository()->create([\n 'code' => 'admin',\n 'caption' => 'Admin',\n 'is_staff' => true,\n 'is_admin' => true,\n 'is_designer' => false,\n 'is_support' => true,\n 'is_director' => true,\n 'is_decorator' => false,\n 'can_see_full_names' => true,\n 'can_see_all_campaigns' => true,\n 'can_access_admin' => true,\n 'sees_customer_quick_quote' => false,\n 'sees_support_quick_quote' => true,\n ]);\n user_type_repository()->create([\n 'code' => 'product_manager',\n 'caption' => 'Product Manager',\n 'is_staff' => true,\n 'is_admin' => false,\n 'is_designer' => false,\n 'is_support' => false,\n 'is_director' => false,\n 'is_decorator' => false,\n 'can_see_full_names' => true,\n 'can_see_all_campaigns' => true,\n 'can_access_admin' => true,\n 'sees_customer_quick_quote' => false,\n 'sees_support_quick_quote' => false,\n ]);\n user_type_repository()->create([\n 'code' => 'product_qa',\n 'caption' => 'Product QA',\n 'is_staff' => true,\n 'is_admin' => false,\n 'is_designer' => false,\n 'is_support' => false,\n 'is_director' => false,\n 'is_decorator' => false,\n 'can_see_full_names' => true,\n 'can_see_all_campaigns' => true,\n 'can_access_admin' => true,\n 'sees_customer_quick_quote' => false,\n 'sees_support_quick_quote' => false,\n ]);\n user_type_repository()->create([\n 'code' => 'support',\n 'caption' => 'Support',\n 'is_staff' => true,\n 'is_admin' => false,\n 'is_designer' => false,\n 'is_support' => true,\n 'is_director' => false,\n 'is_decorator' => false,\n 'can_see_full_names' => true,\n 'can_see_all_campaigns' => true,\n 'can_access_admin' => true,\n 'sees_customer_quick_quote' => false,\n 'sees_support_quick_quote' => true,\n ]);\n user_type_repository()->create([\n 'code' => 'art_director',\n 'caption' => 'Art Director ',\n 'is_staff' => true,\n 'is_admin' => false,\n 'is_designer' => true,\n 'is_support' => false,\n 'is_director' => true,\n 'is_decorator' => false,\n 'can_see_full_names' => true,\n 'can_see_all_campaigns' => true,\n 'can_access_admin' => false,\n 'sees_customer_quick_quote' => false,\n 'sees_support_quick_quote' => true,\n ]);\n user_type_repository()->create([\n 'code' => 'designer',\n 'caption' => 'Designer',\n 'is_staff' => true,\n 'is_admin' => false,\n 'is_designer' => true,\n 'is_support' => false,\n 'is_director' => false,\n 'is_decorator' => false,\n 'can_see_full_names' => true,\n 'can_see_all_campaigns' => false,\n 'can_access_admin' => false,\n 'sees_customer_quick_quote' => true,\n 'sees_support_quick_quote' => false,\n ]);\n user_type_repository()->create([\n 'code' => 'junior_designer',\n 'caption' => 'Junior Designer',\n 'is_staff' => true,\n 'is_admin' => false,\n 'is_designer' => true,\n 'is_support' => false,\n 'is_director' => false,\n 'is_decorator' => false,\n 'can_see_full_names' => true,\n 'can_see_all_campaigns' => false,\n 'can_access_admin' => false,\n 'sees_customer_quick_quote' => true,\n 'sees_support_quick_quote' => false,\n ]);\n user_type_repository()->create([\n 'code' => 'decorator',\n 'caption' => 'Decorator',\n 'is_staff' => false,\n 'is_admin' => false,\n 'is_designer' => false,\n 'is_support' => false,\n 'is_director' => false,\n 'is_decorator' => true,\n 'can_see_full_names' => false,\n 'can_see_all_campaigns' => false,\n 'can_access_admin' => false,\n 'sees_customer_quick_quote' => false,\n 'sees_support_quick_quote' => false,\n ]);\n user_type_repository()->create([\n 'code' => 'sales_rep',\n 'caption' => 'Campus Ambassador',\n 'is_staff' => false,\n 'is_admin' => false,\n 'is_designer' => false,\n 'is_support' => false,\n 'is_director' => false,\n 'is_decorator' => false,\n 'can_see_full_names' => false,\n 'can_see_all_campaigns' => false,\n 'can_access_admin' => false,\n 'sees_customer_quick_quote' => false,\n 'sees_support_quick_quote' => false,\n ]);\n user_type_repository()->create([\n 'code' => 'account_manager',\n 'caption' => 'Campus Manager',\n 'is_staff' => false,\n 'is_admin' => false,\n 'is_designer' => false,\n 'is_support' => false,\n 'is_director' => false,\n 'is_decorator' => false,\n 'can_see_full_names' => false,\n 'can_see_all_campaigns' => false,\n 'can_access_admin' => false,\n 'sees_customer_quick_quote' => false,\n 'sees_support_quick_quote' => false,\n ]);\n user_type_repository()->create([\n 'code' => 'customer',\n 'caption' => 'Customer',\n 'is_staff' => false,\n 'is_admin' => false,\n 'is_designer' => false,\n 'is_support' => false,\n 'is_director' => false,\n 'is_decorator' => false,\n 'can_see_full_names' => false,\n 'can_see_all_campaigns' => false,\n 'can_access_admin' => false,\n 'sees_customer_quick_quote' => false,\n 'sees_support_quick_quote' => false,\n ]);\n user_type_repository()->create([\n 'code' => 'placeholder',\n 'caption' => 'Placeholder',\n 'is_staff' => false,\n 'is_admin' => false,\n 'is_designer' => false,\n 'is_support' => false,\n 'is_director' => false,\n 'is_decorator' => false,\n 'can_see_full_names' => false,\n 'can_see_all_campaigns' => false,\n 'can_access_admin' => false,\n 'sees_customer_quick_quote' => false,\n 'sees_support_quick_quote' => false,\n ]);\n }", "public function prepare_db_for_extensions()\n\t{\n\t\t/**\n\t\t * @todo remove when my pull request gets accepted\n\t\t */\n\t\tob_start();\n\n\t\t// Resolves core tasks.\n\t\trequire_once path('sys').'cli/dependencies'.EXT;\n\n\t\t// Check for the migrations table\n\t\ttry\n\t\t{\n\t\t\tDB::table('laravel_migrations')->count();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tCommand::run(array('migrate:install'));\n\t\t}\n\n\t\t// Check for the extensions table. The reason\n\t\t// this isn't in a migration is simply\n\t\ttry\n\t\t{\n\t\t\tDB::table('extensions')->count();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tSchema::create('extensions', function($table)\n\t\t\t{\n\t\t\t\t$table->increments('id')->unsigned();\n\t\t\t\t$table->string('slug', 50)->unique();\n\t\t\t\t$table->text('version', 25);\n\t\t\t\t$table->boolean('enabled');\n\t\t\t});\n\t\t}\n\n\t\t// Just incase the install process got interrupted, start\n\t\t// extensions\n\t\t$this->start_extensions();\n\n\t\t/**\n\t\t * @todo remove when my pull request gets accepted\n\t\t */\n\t\tob_end_clean();\n\t}", "public function install(){\n // Create plugin tables\n Project::createTable();\n\n Repo::createTable();\n\n CommitCache::createTable();\n\n MergeRequest::createTable();\n\n MergeRequestComment::createTable();\n\n $htracker = PLugin::get('h-tracker');\n if($htracker && !$htracker->isInstalled()) {\n $htracker->install();\n }\n\n // Create permissions\n Permission::add($this->_plugin . '.access-plugin', 1, 0);\n Permission::add($this->_plugin . '.create-projects', 0, 0);\n }", "public function run() {\n $this->base_data();\n $this->minimal_data();\n $project = Project::first();\n\n // Create a bunch more stuff, just for testin'.\n for ($i = 0; $i < 5; $i++) Factory::project($project->id);\n for ($i = 0; $i < 15; $i++) Factory::bid();\n for ($i = 0; $i < 15; $i++) Factory::question();\n for ($i = 0; $i < 10; $i++) Factory::vendor();\n for ($i = 0; $i < 40; $i++) Factory::section();\n\n for ($i = 0; $i < 20; $i++) Factory::project($project->id);\n for ($i = 0; $i < 40; $i++) Factory::bid(array(), $project->id);\n\n }", "function startup() {\n\t\t$this->_welcome();\n\t\tif (isset($this->params['datasource'])) {\n\t\t\t$this->dataSource = $this->params['datasource'];\n\t\t}\n\n\t\tif ($this->command && !in_array($this->command, array('help'))) {\n\t\t\tif (!config('database')) {\n\t\t\t\t$this->out(__('Your database configuration was not found. Take a moment to create one.', true), true);\n\t\t\t\treturn $this->DbConfig->execute();\n\t\t\t}\n\t\t}\n\t}", "public function setup() {\n // get files content\n $this->getFileContent();\n\n $this->filterMatches();\n \n // insert the document in db\n $this->insert();\n\n // init terms list\n $this->termsList = new TermsList();\n\n // save terms and relations\n $this->manageMatches();\n }", "function run()\n\t{\n\t\t//-----------------------------------------\n\t\t// Any \"extra\" configs required for this driver?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( is_array( $this->install->saved_data ) and count( $this->install->saved_data ) )\n\t\t{\n\t\t\tforeach( $this->install->saved_data as $k => $v )\n\t\t\t{\n\t\t\t\tif ( preg_match( \"#^__sql__#\", $k ) )\n\t\t\t\t{\n\t\t\t\t\t$k = str_replace( \"__sql__\", \"\", $k );\n\t\t\t\t\n\t\t\t\t\t$this->install->ipsclass->vars[ $k ] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Switch */\n\t\tswitch( $this->install->ipsclass->input['sub'] )\n\t\t{\n\t\t\tcase 'sql':\n\t\t\t\t$this->install_sql();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'settings':\n\t\t\t\t$this->install_settings();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'acpperms':\n\t\t\t\t$this->install_acpperms();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'templates':\n\t\t\t\t$this->install_templates();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'other':\n\t\t\t\t$this->install_other();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'caches':\n\t\t\t\t$this->install_caches();\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t/* Output */\n\t\t\t\t$this->install->template->append( $this->install->template->install_page() );\t\t\n\t\t\t\t$this->install->template->next_action = '?p=install&sub=sql';\n\t\t\t\t$this->install->template->hide_next = 1;\n\t\t\tbreak;\t\n\t\t}\n\t}", "public static function install(){\n\t}", "public function initializeAction() {\t\t\n\t\t$this->contactRepository = t3lib_div::makeInstance('Tx_Addresses_Domain_Repository_ContactRepository');\t\n\t}", "function pf_setup($argv) {\n if (!has_bin('git')) {\n failure(\"You need to install git before continuing!\");\n failure(\"After installing git run this setup in a new terminal window.\");\n\n return true;\n }\n\n # Check if ssh-kegen is installed\n if (!has_bin('ssh-keygen')) {\n failure(\"You need to install ssh before continuing!\");\n\n return true;\n }\n\n # Test Connection to PHPFog API\n $phpfog = new PHPFog();\n try {\n $has_api = $phpfog->login();\n } catch (PestJSON_Unauthorized $e) {\n failure(\"Invalid username or password. Please try again.\");\n exit(1);\n } catch (Exception $e) {\n failure(\"Error: {$e->getMessage()}\");\n exit(1);\n }\n if (!isset($has_api) || !$has_api) {\n die(failure('Failed to log in.'));\n }\n\n $ssh_identifier = preg_replace(\"/[^A-Za-z0-9-]/\", '-', $phpfog->username());\n\n # Create an ssh key\n $ssh_real_path = HOME.\"/.ssh/\".$ssh_identifier;\n if (!file_exists($ssh_real_path)) {\n $exit_code = execute(\"ssh-keygen -q -t rsa -b 2048 -f \".$ssh_real_path);\n if (0 != $exit_code) {\n die(failure('Failed to generate ssh key'));\n }\n }\n\n # Add ssh to config\n $ssh_config_path = HOME.\"/.ssh/config\";\n $config_host_line = \"Host \".$ssh_identifier;\n if (strpos(@file_get_contents($ssh_config_path), $config_host_line) === false) {\n $fh = @fopen($ssh_config_path, 'a') or die(failure(\"Can't open file: \".$ssh_config_path));\n fwrite($fh, PHP_EOL.wrap($config_host_line));\n fwrite($fh, wrap(\" HostName git01.phpfog.com\"));\n fwrite($fh, wrap(\" User git\"));\n fwrite($fh, wrap(\" IdentityFile \".HOME.\"/.ssh/\".$ssh_identifier).PHP_EOL);\n fclose($fh);\n } else {\n info(\"Config is already set up.\");\n }\n\n $pubkey = file_get_contents($ssh_real_path.\".pub\");\n\n try {\n $phpfog->new_sshkey('', $pubkey);\n success(\"Successfully installed ssh key.\");\n } catch (PestJSON_ClientError $e) {\n $resp = $phpfog->last_response();\n $body = json_decode($resp['body']);\n $message = $body->message;\n failure(\"Error: \".$message);\n }\n\n ewrap(bwhite(\"To clone an app use the following steps:\"));\n ewrap(\"1. List your apps: \".bwhite(\"pf list apps\"));\n ewrap(\"2. To fetch your application code: \".bwhite(\"pf clone <app_id>\"));\n ewrap(\"3. Make your changes\");\n ewrap(\"4. Stage changes in your local repo: \".bwhite(\"git add -A\"));\n ewrap(\"5. Commit changes: \".bwhite(\"git commit -m 'My first commit'\"));\n ewrap(\"6. Deploy to PHP Fog: \".bwhite(\"pf push\"));\n ewrap(\"For more information visit: \".bwhite(\"http://dev.appfog.com/features/article/pf_command_line_tool\"));\n\n return true;\n}", "public function setUp() {\n static::$kernel = static::createKernel();\n static::$kernel->boot();\n $this->em = static::$kernel->getContainer()\n ->get('doctrine')\n ->getManager();\n\n /** @var EntityManager $em */\n $em = $this->em;\n\n $this->blogEntryRepository = $em->getRepository('AnticomShowcaseBundle:BlogEntry');\n }", "function install() {}", "public function setUp() {\n\t\t$this->setUpDatabase();\n\t\t$this->match = new Match;\n\t}", "function __construct()\n\t{\n\t\t// Check repo for any new revisions\n\t\t$this->updateApp();\t\t\n\n\t\t// Create a new amazon connection\t\t\n\t\t$this->amazon();\n\t\t\n\t\t// Configure this server\n\t\t$this->bootstrap();\t\t\n\t}", "protected static function boot() {\n parent::boot();\n static::addGlobalScope(new ActiveProjectScope);\n }", "public function initialized(){\n if( $this->get_git() ){\n // Add query vars\n add_filter('query_vars', function($vars){\n $vars[] = 'giploy';\n return $vars;\n });\n // Add rewrite rule\n add_action('generate_rewrite_rules', array($this, 'generate_rewrite_rules'));\n // Flush rules if rewrite does not exits\n add_action('admin_init', array($this, 'flush_rules'));\n // Get hook\n add_action('pre_get_posts', array($this, 'pre_get_posts'));\n }\n }", "public function boot()\n {\n $this->makeRepositories();\n }", "public function install() {\n\n\n }", "public function __construct()\n {\n $this->metadatas = app(MetadataRepository::class);\n $this->fileRepository = app(FileRepository::class);\n if(method_exists($this, 'init')){\n $this->init();\n }\n }", "protected function setUp() {\n $this->basePath = $basePath = realpath(__DIR__ . '/../../../../../');\n $appPath = $basePath . '/app';\n $this->confPath = $confPath = $appPath . '/boxdata/conf';\n $this->etcPath = $etcPath = $appPath . '/boxdata/etc/local';\n $this->object = new BoxRepository($confPath,null);\n }", "protected function setUp()\n { \n $settings = require __DIR__ . '/../../../config/settings.php';\n $container = new \\Slim\\Container($settings);\n $container['stockconfig'] = function ($config) {\n $stockconfig =$config['settings']['stockconfig']; \n return $stockconfig;\n };\n $dependencies = new Dependencies($container);\n $dependencies->registerLogger();\n $dependencies->registerDatabase();\n $this->object = new StockResource($container);\n \n }", "function _drush_build() {\n drush_invoke('updatedb');\n drush_invoke('features-revert-all', array('force' => TRUE));\n drush_invoke('cc', array('type' => 'all'));\n drush_log(dt('Built!'), 'success');\n}", "protected function setupGitRepo()\n {\n $td = $this->getTestDir();\n\n $this->fs->removeDirectory($td);\n $this->fs->ensureDirectoryExists($td);\n\n $currentWorkDir = getcwd();\n chdir($td);\n\n $result = $this->process->execute(\"git init -q\");\n if ($result > 0) {\n throw new \\RuntimeException(\n \"Could not init: \" . $this->process->getErrorOutput());\n }\n $result = file_put_contents('b', 'a');\n if (false === $result) {\n throw new \\RuntimeException(\"Could not save file.\");\n }\n $result = $this->process->execute(\"git add b && git commit -m 'commit b' -q\");\n if ($result > 0) {\n throw new \\RuntimeException(\n \"Could not init: \" . $this->process->getErrorOutput());\n }\n chdir($currentWorkDir);\n }", "public function prepareDeployment() {\n\t\t$bean = $this->unbox();\n\t\tif ($bean->id === 0) {\n\t\t\tR::store($this);\n\t\t}\n\t\t$config = Zend_Registry::get('config');\n\t\t$workdir = $config->directories->deployment;\n\t\t$oldumask = umask(0); \n\t\tif (!is_dir($workdir)) {\n\t\t\tmkdir($workdir, 0777, true);\n\t\t}\n\t\t$this->deploymentDir = $workdir . $this->id;\n\t\tif ($bean->type === 'rollback') {\n\t\t\t$this->queueTarget('RollbackPilot');\n\t\t\t$this->queueTarget('Rollback');\n\n\t\t\t$bean->rollback = false;\n\t\t} elseif ($bean->type === 'upgrade') {\n\t\t\t$this->queueTarget('UpgradePilot');\n\t\t\t$this->queueTarget('Upgrade');\n\n\t\t\t$bean->rollback = true;\n\t\t} else {\n\t\t\t$this->queueTarget('Deploy');\n\n\t\t\t$bean->rollback = true;\n\t\t}\n\t\t\n\t\tif (!is_dir($workdir . $bean->id)) {\n\t\t\tmkdir($workdir . $bean->id, 0777, true);\n\t\t}\n\t\tumask($oldumask);\n\t\t$this->writePropertiesFile($workdir . $bean->id . '/build.properties');\n\t\tR::store($this);\n\t}", "private function initAsyncRepositories(): void {\n $this->messagesRepository = new MessagesRepository();\n }", "protected function setUp() {\n\t\t$this->object = new QueryAggregateCondition();\n\t}", "private function init() {\n\t\t$GLOBALS[\"mlauto_db_version\"] = 1.0;\n\n\t\t//If SQL Table isn't initiated, initiate it\n\t\tClassificationModel::intializeTable();\n\t\tTermModel::intializeTable();\n\n\t\t$this->buildConfig();\n\n\t\tupdate_option(\"MLAuto_version\", $GLOBALS[\"mlauto_db_version\"]);\n\t}", "protected static function booted()\n {\n static::saved(function (RepositoryTag $repositoryTag) {\n Cache::tags(['repositories', 'tags'])->flush();\n });\n }", "public function run()\n {\n $branches = [\n [\n 'name' => 'Mbeya Branch',\n 'email' => '[email protected]',\n 'address' => 'Ikuti, Mbeya (M), Mbeya',\n 'phone' => '+255 755 456 529',\n 'type' => 1,\n ]\n ];\n\n foreach ($branches as $branch) {\n Branch::firstOrCreate([\n 'name' => $branch['name'],\n 'email' => $branch['email'],\n 'address' => $branch['address'],\n 'phone' => $branch['phone'],\n 'type' => $branch['type']\n ]);\n }\n }", "private function setCustomRepositories()\n {\n $em = $this->getDoctrine()->getManager();\n $this->frontRepository = new FrontRepository($em);\n }", "public function install() {\n //Check if the bot is already installed\n if ($this->checkInstalled()) {\n echo 'It seems like the request bot is already installed. If this\n is not the case then you have tables in the database you\n specified that have the same name as the tables that the\n Pull Request Bot is going to use in its installation. Please\n either delete them or choose different table names in the\n config.inc.php file. Thank you.';\n } else {\n $install_queries = $this->installQueries();\n \n //bool variable to check whether or not to commit the transaction.\n $commit = true;\n\n try {\n //start transactional query\n $this->db->beginTransaction();\n\n //execute queries one by one\n foreach ($install_queries as $key=>$install_query) {\n if ($install_query->execute()) {\n echo $key.': executed successfully.<br />';\n } else {\n $commit = false;\n echo $key.': failed.<br />';\n echo '<pre>';\n print_r($install_query->errorInfo());\n echo '</pre>';\n break;\n }\n }\n\n //Check to see that we can connect to external URLs\n if (WebPage::checkWorks()) {\n echo 'Check to connect to external websites passed.<br />';\n } else {\n //Don't commit.\n $commit = false;\n echo 'Check to connect to external websites failed.<br />';\n }\n\n if (function_exists('json_decode')) {\n echo 'JSON support enabled.<br />';\n } else {\n $commit = false;\n echo 'No JSON support.<br />';\n }\n\n //commit the transaction and display success message.\n if($commit == true) {\n $this->db->commit();\n echo 'Pull Request Bot has been successfully installed.\n Please use the run.php on a Cron job to use it.';\n } else {\n $this->db->rollBack();\n echo 'Install failed. Please see above messages for details.';\n }\n }\n catch (PDOException $e) {\n $this->db->rollBack();\n echo $e->getMessage();\n }\n }\n }", "public function setup()\n {\n $this->createCategories();\n $this->createProducts();\n }", "public function setUp() {\n $app = require __DIR__.'/../../bootstrap/app.php';\n $app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap();\n\n $this->consumables=new Consumables();\n }", "public function run()\n {\n factory( App\\Project::class )->create( [\n 'name' => 'rbc',\n 'description' => 'sistema resto bar' \n ] ) ;\n\n factory( App\\Project::class )->create( [\n 'name' => 'pm',\n 'description' => 'project manager' \n ] ) ;\n\n factory( App\\Project::class, 20 )->create() ;\n }", "protected function setUp()\n { \n $settings = require __DIR__ . '/../../../config/settings.php';\n $container = new \\Slim\\Container($settings);\n $container['stockconfig'] = function ($config) {\n $stockconfig =$config['settings']['stockconfig']; \n return $stockconfig;\n };\n $dependencies = new Dependencies($container);\n $dependencies->registerLogger();\n $dependencies->registerDatabase();\n $this->object = new ScoringResource($container);\n \n }", "public function run()\n {\n $provinces = $this->getProvincesFromFile();\n\n foreach ($provinces as $provinceName => $cities) {\n $province = $this->provincesRepository->create([\n 'name' => $provinceName\n ]);\n\n foreach ($cities as $cityName) {\n $this->citiesRepository->create([\n 'name' => $cityName,\n 'province_id' => $province->id\n ]);\n }\n }\n }", "public function writeAndPush()\n {\n $this->gitConfig();\n $this->writeFullConfFile();\n $this->writeUsers();\n if($this->commitConfig()) $this->pushConfig();\n }", "abstract public function repository();", "private function syncRepository()\n {\n $cwd = '/tmp/'.$this->migrationId;\n (new ProcessBuilder(['mkdir']))->add('-p')->add($cwd)->getProcess()->mustRun();\n\n $cloneSourceCommandBuilder = new ProcessBuilder(['git', 'clone', $this->sourceProject->getSshUrlToRepo(), '.']);\n $cloneSourceCommandBuilder\n ->setWorkingDirectory($cwd)\n ->setTimeout(self::TIMEOUT)\n ->getProcess()\n ->mustRun();\n\n $addNewRemoteBuilder = new ProcessBuilder(['git', 'remote', 'add', 'new']);\n $addNewRemoteBuilder\n ->setWorkingDirectory($cwd)\n ->add($this->targetProject->getSshUrlToRepo())\n ->getProcess()\n ->mustRun();\n\n $pushToRemoteBuilder = new ProcessBuilder(['git', 'push', 'new', '--all']);\n $pushToRemoteBuilder\n ->setWorkingDirectory($cwd)\n ->setTimeout(self::TIMEOUT)\n ->getProcess()\n ->mustRun();\n\n $pushTagsToRemoteBuilder = new ProcessBuilder(['git', 'push', 'new', '--tags']);\n $pushTagsToRemoteBuilder\n ->setWorkingDirectory($cwd)\n ->setTimeout(self::TIMEOUT)\n ->getProcess()\n ->mustRun();\n }", "public function install() {\n\t\t\\GO\\Projects2\\Projects2Module::createDefaultIncomeContractNotificationCron();\n\t\t\n//\t\tif(!GO::modules()->isInstalled('projects')){\n\t\tGO::getDbConnection()->query(\"SET sql_mode=''\");\n\t\t\n\t\tif(!Utils::tableExists(\"pm_projects\")){\n\t\t\tparent::install();\n\t\t\t\n\t\t\t$defaultType = new Type();\n\t\t\t$defaultType->name = GO::t(\"Default\");\n\t\t\t$defaultType->save();\n\n\t\t\t$defaultStatus = new Status();\n\t\t\t$defaultStatus->name = GO::t(\"Ongoing\", \"projects2\");\n\t\t\t$defaultStatus->show_in_tree=true;\n\t\t\t$defaultStatus->save();\n\t\t\t\n\t\t\t$noneStatus = new Status();\n\t\t\t$noneStatus->name = GO::t(\"None\", \"projects2\");\n\t\t\t$noneStatus->show_in_tree=true;\n\t\t\t$noneStatus->filterable=true;\n\t\t\t$noneStatus->save();\n\n\t\t\t$status = new Status();\n\t\t\t$status->name = GO::t(\"Complete\", \"projects2\");\n\t\t\t$status->complete=true;\n\t\t\t$status->show_in_tree=false;\n\t\t\t$status->save();\n\t\t\t\n\t\t\t\n\t\t\t$folder = new \\GO\\Base\\Fs\\Folder(GO::config()->file_storage_path.'projects2/template-icons');\n\t\t\t$folder->create();\t\t\t\n\t\t\t\n\t\t\tif(!$folder->child('folder.png')){\n\t\t\t\t$file = new \\GO\\Base\\Fs\\File(GO::modules()->projects2->path . 'install/images/folder.png');\n\t\t\t\t$file->copy($folder);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(!$folder->child('project.png')){\n\t\t\t\t$file = new \\GO\\Base\\Fs\\File(GO::modules()->projects2->path . 'install/images/project.png');\n\t\t\t\t$file->copy($folder);\t\t\t\n\t\t\t}\n\n\t\t\t$template = new Template();\n\t\t\t$template->name = GO::t(\"Projects folder\", \"projects2\");\n\t\t\t$template->default_status_id = $noneStatus->id;\n\t\t\t$template->default_type_id = $defaultType->id;\n\t\t\t$template->icon=$folder->stripFileStoragePath().'/folder.png';\n\t\t\t$template->project_type=Template::PROJECT_TYPE_CONTAINER;\n\t\t\t$template->save();\n\t\t\t\n\t\t\t$template->acl->addGroup(GO::config()->group_everyone);\n\n\n\t\t\t$template = new Template();\n\t\t\t$template->name = GO::t(\"Standard project\", \"projects2\");\n\t\t\t$template->default_status_id = $defaultStatus->id;\n\t\t\t$template->default_type_id = $defaultType->id;\n\t\t\t$template->project_type=Template::PROJECT_TYPE_PROJECT;\n\t\t\t$template->fields = 'responsible_user_id,status_date,customer,budget_fees,contact,expenses';\n\t\t\t$template->icon=$folder->stripFileStoragePath().'/project.png';\n\t\t\t$template->save();\n\t\t\t\n\t\t\t$template->acl->addGroup(GO::config()->group_everyone);\n\t\t\t\n\t\t}else\n\t\t{\n\t\t\tGO::setMaxExecutionTime(0);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$oldModelTypeId = \\GO\\Base\\Model\\ModelType::model()->findByModelName(\"GO\\Projects\\Model\\Project\");\n\t\t\t$modelTypeId = \\GO\\Base\\Model\\ModelType::model()->findByModelName(\"GO\\Projects2\\Model\\Project\");\n\t\t\t\n\t\t\t//copy old projects module tables\n\t\t\t$stmt = GO::getDbConnection()->query('SHOW TABLES');\n\t\t\twhile ($r = $stmt->fetch()) {\n\t\t\t\t$tableName = $r[0];\n\n\n\t\t\t\tif (substr($tableName, 0, 9) == 'go_links_' && !is_numeric(substr($tableName, 9, 1))) {\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\t$sql = \"ALTER TABLE `$tableName` ADD `ctime` INT NOT NULL DEFAULT '0';\";\n\t\t\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception $e){}\n\t\t\t\t\t\n\t\t\t\t\t$sql = \"DELETE FROM `$tableName` WHERE model_type_id=\".intval($modelTypeId);\n\t\t\t\t\tGO::debug($sql);\n\t\t\t\t\tGO::getDbConnection()->query($sql);\n\n\t\t\t\t\t$sql = \"INSERT IGNORE INTO `$tableName` SELECT id,folder_id, model_id,'$modelTypeId', description, ctime FROM `$tableName` WHERE model_type_id=$oldModelTypeId\";\n\t\t\t\t\tGO::debug($sql);\n\t\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (strpos($tableName, 'pm_') !== false) {\n\t\t\t\t\t\n\t\t\t\t\t//some GLOBAL2000 tables we do not want to copy\n\t\t\t\t\tif(!in_array($tableName,array('pm_employees','pm_resources','pm_employment_agreements'))){\n\t\t\t\t\t\n\t\t\t\t\t\t$newTable = str_replace('pm_', \"pr2_\", $tableName);\n\n\t\t\t\t\t\t$sql = \"DROP TABLE IF EXISTS `$newTable`\";\n\t\t\t\t\t\tGO::getDbConnection()->query($sql);\n\n\t\t\t\t\t\t$sql = \"CREATE TABLE `$newTable` LIKE `$tableName`\";\n\t\t\t\t\t\tGO::getDbConnection()->query($sql);\n\n\t\t\t\t\t\t$sql = \"INSERT INTO `$newTable` SELECT * FROM `$tableName`\";\n\t\t\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$sql = \"update pr2_projects set name = replace(name, '/','-')\";\n\t\t\tGO::getDbConnection()->query($sql);\n\n\t\t\t\n//\t\t\t$sql = \"update pr2_projects set files_folder_id=0\";\n//\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\n\t\t\t$sql = \"select version from go_modules where id='projects'\";\t\t\t\n\t\t\t$stmt = GO::getDbConnection()->query($sql);\n\t\t\t\n\t\t\t$record = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t\tGO::modules()->projects2->version = $record['version'];\n\t\t\tGO::modules()->projects2->save();\t\t\t\n//\t\t\tGO::modules()->projects->acl->copyPermissions(GO::modules()->projects2->acl);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//start files\n//\t\t\t$sql = \"UPDATE pr2_projects SET files_folder_id=(SELECT files_folder_id FROM pm_projects WHERE pm_projects.id=pr2_projects.id);\";\n//\t\t\tGO::getDbConnection()->query($sql);\n\n\t\t\t$fsFolder = new GO\\Base\\Fs\\Folder(GO::config()->file_storage_path.'projects2');\n\t\t\tif($fsFolder->exists()){\n\t\t\t\t$fsFolder->rename('projects2-'.date('c'));\n\t\t\t}\n\n\t\t\t$folder = \\GO\\Files\\Model\\Folder::model()->findByPath('projects');\n\t\t\t$folder->name='projects2';\n\t\t\t$folder->acl_id=GO::modules()->projects2->acl_id;\n\t\t\t$folder->save();\n\n\n//\t\t\t$sql = \"UPDATE pm_projects SET files_folder_id=0;\";\n//\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\n\t\t\t$sql = \"update `pr2_templates` set icon = replace(icon, 'projects/', 'projects2/');\";\n\t\t\tGO::getDbConnection()->query($sql);\t\t\t\n\t\t\t\n\t\t\t//end files\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t//upgrade database\n\t\t\tob_start();\n\t\t\t$mc = new \\GO\\Core\\Controller\\MaintenanceController();\n\t\t\t$mc->run(\"upgrade\", array(), false);\n\t\t\tob_end_clean();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//create new acl's\n\t\t\t\n//\t\t\t$types = \\GO\\Projects\\Model\\Type::model()->find();\t\t\t\n//\t\t\tforeach($types as $type){\t\t\t\t\n//\t\t\t\t$type2 = Model\\Type::model()->findByPk($type->id);\t\t\t\t\n//\t\t\t\t$type2->setNewAcl($type->user_id);\t\t\t\t\n//\t\t\t\t$type->acl->copyPermissions($type2->acl);\t\t\t\n//\t\t\t\t$type2->save();\n//\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$sql=\"ALTER TABLE `pr2_hours` CHANGE `income_id` `old_income_id` INT( 11 ) NULL DEFAULT NULL ;\";\n\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t$sql=\"ALTER TABLE `pr2_hours` ADD `income_id` INT( 11 ) NULL AFTER `old_income_id` ;\";\n\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t$sql=\"UPDATE `pr2_hours` SET old_income_id=-1*old_income_id;\";\n\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\n\t\t\t\n\t\t\tif(\\GO\\Base\\Db\\Utils::tableExists(\"pm_employment_agreements\")){\n\t\t\t\t\n\t\t\t\t//GLOBAL 2000 version\n\t\t\t\t\n\t\t\t\t$sql = \"replace into pr2_employees (user_id, external_fee, internal_fee) select employee_id, max(external_fee),max(internal_fee) from pm_employment_agreements group by employee_id\";\n\t\t\t\tGO::getDbConnection()->query($sql);\n\n\n\t\t\t\t$sql = \"replace into pr2_resources (user_id,project_id, external_fee, internal_fee) select user_id,project_id, external_fee, internal_fee from pm_resources\";\n\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\t\n//\t\t\tNo longer necessary because of $updates['201310041023'] in updates.inc.php :\t\n//\t\t\t\t//untested\n//\t\t\t\t$sql = \"ALTER TABLE `pr2_hours` CHANGE `external_value` `external_fee` DOUBLE NOT NULL DEFAULT '0'\";\n//\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$sql = \"insert ignore into pr2_employees (user_id, external_fee, internal_fee) select user_id, max(ext_fee_value), max(int_fee_value) from pm_hours group by user_id\";\n\t\t\t\tGO::getDbConnection()->query($sql);\n\n\n\t\t\t\t$sql = \"insert ignore into pr2_resources (user_id,project_id, external_fee, internal_fee) select user_id,project_id, max(ext_fee_value), max(int_fee_value) from pm_hours group by user_id, project_id\";\n\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$sql = \"update pr2_templates set project_type=1\";\n\t\t\tGO::getDbConnection()->query($sql);\n\n\n\t\t\tif (GO::modules()->customfields) {\n\t\t\t\t\n//\t\t\t\trequire(dirname(__FILE__).'/install/migrate/models.php');\n\t\t\t\t\n//\t\t\t\t\\GO\\Customfields\\CustomfieldsModule::replaceRecords(\"GO\\Projects\\Model\\Project\", \"GO\\Projects2\\Model\\Project\");\n\t\t\t\t\n//\t\t\t\t\\GO\\Customfields\\CustomfieldsModule::replaceRecords(\"GO\\Projects\\Model\\Hour\", \"GO\\Projects2\\Model\\TimeEntry\");\n\t\t\t\t\n\t\t\t\t//$sql = \"RENAME TABLE `cf_pm_projects` TO `cf_pr2_projects` \";\n\t\t\t\t//GO::getDbConnection()->query($sql);\n\t\t\t\t\n\t\t\t\t//$sql = \"RENAME TABLE `cf_pm_hours` TO `cf_pr2_hours` \";\n\t\t\t\t//GO::getDbConnection()->query($sql);\n\t\t\t\t\n\t\t\t\t$sql = \"update `cf_categories` set extends_model = 'GO\\\\\\\\Projects2\\\\\\\\Model\\\\\\\\Project' where extends_model = 'GO\\\\\\\\Projects\\\\\\\\Model\\\\\\\\Project';\";\n\t\t\t\tGO::getDbConnection()->query($sql);\n\t\t\t\t\n\t\t\t\t$sql = \"update `cf_categories` set extends_model = 'GO\\\\\\\\Projects2\\\\\\\\Model\\\\\\\\Hour' where extends_model = 'GO\\\\\\\\Projects\\\\\\\\Model\\\\\\\\Hour';\";\n\t\t\t\tGO::getDbConnection()->query($sql);\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tGO::getDbConnection()->query(\"UPDATE go_search_cache set model_type_id=$modelTypeId where model_type_id=$oldModelTypeId\");\n\t\t\t\n\t\t\n\t\t\t\n\n\t\t\t// Now, let's make sure that all the projects have a template.\n\t\t\t\n\t\t\t$folder = new Folder(GO::config()->file_storage_path.'projects2/template-icons');\n\t\t\t$folder->create();\t\t\t\n\t\t\t\n\t\t\tif(!$folder->child('folder.png')){\n\t\t\t\t$file = new File(GO::modules()->projects2->path . 'install/images/folder.png');\n\t\t\t\t$file->copy($folder);\n\t\t\t}\n\t\t\t\n\t\t\tif(!$folder->child('project.png')){\n\t\t\t\t$file = new File(GO::modules()->projects2->path . 'install/images/project.png');\n\t\t\t\t$file->copy($folder);\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (\\GO::modules()->files) {\n\t\n\t\t\t\t$fileFolder = \\GO\\Files\\Model\\Folder::model()->findByPath('projects2/template-icons',true);\n\t\t\t\tif(!$fileFolder->acl_id!=\\GO::modules()->projects2->acl_id){\n\t\t\t\t\t$oldIgnore = \\GO::$ignoreAclPermissions;\n\t\t\t\t\t\\GO::$ignoreAclPermissions=true;\n\t\t\t\t\t$fileFolder->acl_id=\\GO::modules()->projects2->acl_id;\n\t\t\t\t\t$fileFolder->save();\t\t\n\t\t\t\t\t\\GO::$ignoreAclPermissions=$oldIgnore;\n\t\t\t\t}\n\t\t\t\t//for icons added after install\n\t\t\t\t$fileFolder->syncFilesystem();\n\t\t\t}\n\t\t\t\n\t\t\t$normalTemplate = new Template();\n\t\t\t$normalTemplate->name = GO::t(\"Normal project\", \"projects2\");\n\t\t\t$normalTemplate->project_type=Template::PROJECT_TYPE_PROJECT;\n\t\t\t$normalTemplate->fields = 'responsible_user_id,status_date,customer,budget_fees,contact,expenses';\n\t\t\t$normalTemplate->icon=$folder->stripFileStoragePath().'/project.png';\n\t\t\t$normalTemplate->save();\n\t\t\t\n\t\t\tGO\\Base\\Db\\Columns::$forceLoad = true;\n\t\t\t\n\t\t\t$noTemplateProjectsStmt = Project::model()->find(\n\t\t\t\tFindParams::newInstance()\n\t\t\t\t\t->criteria(\n\t\t\t\t\t\tFindCriteria::newInstance()\n\t\t\t\t\t\t\t->addCondition('template_id',0)\n\t\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\tGO\\Base\\Db\\Columns::$forceLoad = false;\n\t\t\t\n\t\t\tforeach ($noTemplateProjectsStmt as $noTemplateProjectModel) {\n\t\t\t\t$noTemplateProjectModel->template_id = $normalTemplate->id;\n\t\t\t\t$noTemplateProjectModel->save();\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\t// Upgrade closed weeks\n\t\t\tob_start();\n\t\t\t$pc = new \\GO\\Projects2\\Controller\\ProjectController();\n\t\t\t$pc->run(\"v1toV2Upgrade\", array(), false);\n\t\t\tob_end_clean();\n\t\t\t\n\t\t}\n\n\t\t\n\t}", "protected function createPreCommit() :void\n {\n $this->preCommitConfig();\n $this->preCommitSetup();\n }", "protected static function booted()\n {\n static::addGlobalScope(new NotArchivedScope);\n }", "public function install() {\r\n \r\n }", "protected static function boot()\n {\n parent::boot();\n static::addGlobalScope(new ProjectScope);\n }", "public function install()\n {\n }", "public function install()\n {\n }", "private function startup()\n\t{\n\t\t$this->registerSigHandlers();\n\t\t$this->pruneDeadWorkers();\n\t\tEvent::trigger('beforeFirstFork', $this);\n\t\t$this->registerWorker();\n\t}", "protected function initializeAction() {\n\t\t$this->frontendUserRepository = t3lib_div::makeInstance('Tx_GrbFeusermanager_Domain_Repository_FrontendUserRepository');\n\t}", "protected function setUp(){\n $this->poneys = new Poneys;\n $this->poneys->setCount(8);\n }", "public function booted()\n {\n Spark::useStripe()->noCardUpFront()->trialDays(10000);\n\n Spark::freePlan()\n ->features([\n 'First', 'Second', 'Third'\n ]);\n\n // Spark::identifyTeamsByPath();\n }", "public function setup() {}", "protected static function boot()\n {\n parent::boot();\n\n //add the scope wen querying db for students\n static::addGlobalScope(new StudentScope);\n }" ]
[ "0.6122", "0.5905346", "0.57614845", "0.570109", "0.5699119", "0.56443775", "0.56443775", "0.5574267", "0.55617315", "0.5430829", "0.5423134", "0.5403888", "0.5380596", "0.53699553", "0.5349921", "0.5336064", "0.5313255", "0.52767074", "0.5240257", "0.5222584", "0.5185739", "0.5181599", "0.51590645", "0.514927", "0.51490515", "0.5148221", "0.5133578", "0.513201", "0.51144034", "0.5105822", "0.50861776", "0.5084853", "0.5082524", "0.5065214", "0.50584614", "0.50569576", "0.5055607", "0.5053863", "0.50474507", "0.50451845", "0.5017394", "0.5008898", "0.50031096", "0.50031096", "0.50031096", "0.50031096", "0.500079", "0.4995967", "0.49878323", "0.4979738", "0.49657363", "0.49621388", "0.49617592", "0.49601912", "0.49570784", "0.49534532", "0.49527615", "0.4940722", "0.4939175", "0.49192536", "0.49146912", "0.49143556", "0.4912418", "0.49103475", "0.49056205", "0.49055693", "0.49047896", "0.48938712", "0.4892662", "0.48869488", "0.48844084", "0.48802766", "0.48795736", "0.48738965", "0.4866781", "0.48667425", "0.485717", "0.48534992", "0.4852126", "0.4849939", "0.48408517", "0.48403746", "0.4838411", "0.48364884", "0.4833309", "0.4832715", "0.48260063", "0.4825601", "0.4820068", "0.48200205", "0.48173508", "0.4816201", "0.48136625", "0.48113143", "0.48113143", "0.4807552", "0.48050925", "0.4801639", "0.48005968", "0.4799435", "0.47979626" ]
0.0
-1
Returns routes to connect to the given application.
public function connect(Application $app) { $controllers = $app['controllers_factory']; $controllers->get('/autoEntree','App\Controller\EntreeController::autoCompleteEntree')->bind('entree.autoComplete'); $controllers->get('/getId','App\Controller\EntreeController::getId')->bind('entree.getId'); $controllers->get('/add', 'App\Controller\EntreeController::addEntree')->bind('entree.add'); $controllers->post('/add', 'App\Controller\EntreeController::validFormAddEntree')->bind('entree.validFormAddEntree'); $controllers->get('/delete{id}', 'App\Controller\EntreeController::deleteEntree')->bind('entree.delete'); $controllers->delete('/delete', 'App\Controller\EntreeController::validFormDeleteEntree')->bind('entree.validFormDeleteEntree'); $controllers->get('/edit{id}', 'App\Controller\EntreeController::editEntree')->bind('entree.edit'); $controllers->put('/edit', 'App\Controller\EntreeController::validFormEditEntree')->bind('entree.validFormEditEntree'); return $controllers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function connect(Application $app)\n {\n /** @var \\Silex\\ControllerCollection $route */\n $route = $app['controllers_factory'];\n\n $route->get('/info', HelloController::class . '::getInfo');\n $route->get('/{name}', HelloController::class . '::getName');\n\n return $route;\n\n }", "public function connect(Application $app)\n {\n $controllers = $app['controllers_factory'];\n $routes = $app['app.routes'];\n\n foreach ($routes as $bind => $options) {\n $methods = isset($options['methods']) ? $options['methods'] : ['GET', 'POST'];\n $controllers\n ->match($options['path'], $options['defaults']['_controller'])\n ->method(implode('|', $methods))\n ->bind($bind);\n }\n\n return $controllers;\n }", "public function connect(Application $app)\n {\n $match = $app['controllers_factory'];\n //D�finition des routes\n $match->match(\"/\", __CLASS__.'::matchsDay');\n $match->match(\"/matchs_day\", __CLASS__.'::matchsDay');// Code �quivalent ==> $index->match(\"/\", 'App\\Controller\\IndexController::index');\n $match->match(\"/matchs_period\", __CLASS__.'::matchsWeek');\n\n return $match;\n }", "public function initRoutes(App $app);", "public function connect(Application $app)\n {\n $controllers = $app['controllers_factory'];\n\n $controllers->get('/', function (Request $request) use ($app)\n {\n\t\t\t$users = $app['users'];\n list($conversations, $totalCount) = ApoioClient::getConversations(ApoioClient::ACCESS_POINT_ARCHIVE, $users);\n\n $pageCount = ceil($totalCount/30);\n\n return $app['twig']->render('list.page.html.twig', [\"items\" => $conversations, \"users\" => $users, \"type\" => \"archive\", \"totalCount\" => $totalCount, \"pageCount\" => $pageCount]);\n });\n\n return $controllers;\n }", "public function getAppRoutes()\n\t{\n\t\t$key = __METHOD__;\n\t\t$cache = Configs::instance()->cache;\n\t\tif ($cache === null || ($result = $cache->get($key)) === false) {\n\t\t\t$result = [];\n\t\t\t$this->getRouteRecrusive(Yii::$app, $result);\n\t\t\tif ($cache !== null) {\n\t\t\t\t$cache->set($key, $result, Configs::instance()->cacheDuration, new TagDependency([\n\t\t\t\t\t'tags' => self::CACHE_TAG\n\t\t\t\t]));\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function connect(Application $app) {\n\n\t\t//@note $app['controllers_factory'] is a factory that returns a new instance of ControllerCollection when used.\n\t\t//@see http://silex.sensiolabs.org/doc/organizing_controllers.html\n\t\t$controllers = $app['controllers_factory'];\n\n\t\t// Bind sub-routes\n $controllers->get('/klanten/{customerId}/bmi', array($this, 'customerBmi'))->assert('customerId', '\\d+');\n $controllers->get('/klanten/{customerId}/gewicht', array($this, 'customerWeight'))->assert('customerId', '\\d+');\n $controllers->get('/food/{categoryId}', array($this, 'foodByCategory'))->assert('categoryId', '\\d+');\n $controllers->post('/klanten/{customerId}/maaltijden', array($this, 'customerMeals'))->assert('customerId', '\\d+');\n $controllers->post('/dietist/klanten/{customerId}/maaltijden', array($this, 'dieticianCustomerMeals'))->assert('customerId', '\\d+');\n $controllers->get('/dietist/klanten/{customerId}/maaltijden/nieuw', array($this, 'getUnseenDatesOfDietician'))->assert('customerId', '\\d+');\n $controllers->post('/dietist/klanten/{customerId}/bericht', array($this, 'makeNewMessageFromDietician'))->assert('customerId', '\\d+');\n $controllers->post('/klanten/bericht', array($this, 'makeNewMessageFromCustomer'));\n $controllers->get('/dietist/klanten/{customerId}/bericht/nieuw', array($this, 'checkIfDieticianHasUnseenMessages'))->assert('customerId', '\\d+');\n $controllers->post('/dietist/klanten/{customerId}/bericht/update', array($this, 'updateDieticianUnseenMessages'))->assert('customerId', '\\d+');\n\n\t\treturn $controllers;\n\n\t}", "public function connect(Application $app)\n {\n /** @var ControllerCollection $controllers */\n $controllers = $app['controllers_factory'];\n\n // Drupal front controller.\n $controllers\n ->match('/{q}', 'drupal.controller:deliverAction')\n ->assert('q', '[^_].+$')\n ->value('_legacy', 'drupal')\n ->convert('q', function ($q) {\n return drupal_get_normal_path($q);\n })\n ->convert('router_item', function ($router_item = array(), Request $request) {\n $q = $request->get('q');\n\n return menu_get_item($q);\n })\n ;\n\n return $controllers;\n }", "public function connect(Application $app)\n {\n $controllers = $app['controllers_factory'];\n\n $controllers->get('/', function () use ($app) {\n return $app['twig']->render('index.html');\n });\n\n return $controllers;\n }", "public function getRoutes()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('routes');\n }", "public function connect(Application $app)\n\t {\n\t\t /**\n\t\t * @var \\Silex\\ControllerCollection $factory\n\t\t */\n\t\t $factory = $app['controllers_factory'];\n\n\t\t $factory->get(\n\t\t\t'/',\n\t\t\t 'Echyzen\\IndexController::indexAction'\n\t\t ); \n\n\t\t return $factory;\n\t }", "public function connect(Application $app)\n {\n $controllers = $app['controllers_factory'];\n\n $controllers\n ->get('/', \"\\\\pygillier\\\\Chert\\\\Provider\\\\ControllerProvider::indexAction\")\n ->bind('home');\n $controllers\n ->post('/min', \"\\\\pygillier\\\\Chert\\\\Provider\\\\ControllerProvider::minifyAction\")\n ->bind('send_url');\n $controllers\n ->get('/status/{key}', \"\\\\pygillier\\\\Chert\\\\Provider\\\\ControllerProvider::statusAction\")\n ->bind('status');\n\t\t$controllers\n ->get('/done/{hash}', \"\\\\pygillier\\\\Chert\\\\Provider\\\\ControllerProvider::doneAction\")\n ->bind('done');\n $controllers\n ->get('/{hash}', \"\\\\pygillier\\\\Chert\\\\Provider\\\\ControllerProvider::showAction\")\n ->bind('show');\n\n\t\treturn $controllers;\n }", "private function getAppRoutes()\n {\n $result = [];\n foreach (app()->getModules() as $id => $child) {\n if (($child = app()->getModule($id)) !== null) {\n if (!\\in_array($child->getUniqueId(), static::GESHOP_MODULES, true)) {\n continue;\n }\n foreach ($child->controllerMap as $k => $type) {\n $this->getControllerActions($type, $k, $child, $result);\n }\n $namespace = trim($child->controllerNamespace, '\\\\') . '\\\\';\n $this->getControllerFiles($child, $namespace, '', $result);\n }\n }\n\n return $result;\n }", "public static function getRoutes();", "public static function getRoutes();", "public function loadRoutes(Application $app)\n {\n $directory = $app->getContainer()[\"settings\"][\"route_config_dir\"];\n foreach (array_diff(scandir($directory), ['..', '.']) as $filename) {\n $path = $directory . '/' . $filename;\n if (!is_dir($path)) {\n require $path;\n }\n }\n return $app;\n }", "public function connect(Application $app)\n {\n $prono = $app['controllers_factory'];\n $prono->match(\"/\", __CLASS__.'::pronostic');\n $prono->match(\"/pronostic\", __CLASS__.'::pronostic');\n $prono->match(\"/validerPronos\", __CLASS__.'::validerPronos');\n $prono->match(\"/resultat\", __CLASS__.'::dashboardResult');\n return $prono;\n }", "public function connect(\\Silex\\Application $app)\n {\n $controller = $app['controllers_factory'];\n $controller->get('/{id}', __CLASS__.'::detailAction')\n ->assert('id', '\\d+')\n ->bind('book_detail');\n\n $controller->get('/download/{id}/{format}', __CLASS__.'::downloadAction')\n ->assert('id', '\\d+')\n ->bind('book_download');\n\n return $controller;\n }", "public function getRoutes();", "public function getRoutes();", "public function connect(Application $app)\n {\n $controllers = $app['controllers_factory'];\n\n $controllers->get('/{id}', Http\\Photo::class . '::photo');\n $controllers->get('/{id}/archive', Http\\Photo::class . '::archive');\n\n $controllers\n ->post('/', Http\\Photo::class . '::create')\n ->before(new Auth\\Middleware\\Auth());\n $controllers\n ->delete('/{id}', Http\\Photo::class . '::remove')\n ->before(new Auth\\Middleware\\Auth());\n $controllers\n ->post('/{id}/duplicate', Http\\Photo::class . '::duplicate')\n ->before(new Auth\\Middleware\\Auth());\n $controllers\n ->patch('/{id}', Http\\Photo::class . '::change')\n ->before(new Auth\\Middleware\\Auth());\n\n return $controllers;\n }", "public function getAppRoutes(){\n $cache=Yii::$app->cache;\n $key = [__METHOD__, Yii::$app->getUniqueId()];\n if(($result = $cache->get($key)) === false){\n $result=$this->getRouteRecrusive('frontend');\n $cache->set($key, $result, \"3600\", new TagDependency([\n 'tags' => self::CACHE_TAG,\n ]));\n }\n return $result;\n }", "public function connect(Application $app)\n { \n /**\n * Here we may add a middleware to Authorize API clients\n **/\n $app->before(function (Request $request, Application $app) {\n /**\n * import middleware\n * return 401 if unauthorized\n **/\n });\n\n /**\n * Standardization of Request format (Form vs JSON)\n **/\n $app->before(function (Request $request, Application $app) {\n if (0 === strpos($request->headers->get('Content-Type'), 'application/json')) {\n $data = json_decode($request->getContent(), true);\n $request->request->replace(is_array($data) ? $data : array());\n }\n });\n\n /**\n * @var \\Silex\\ControllerCollection $controllers\n */\n $controllers = $app['controllers_factory'];\n /**\n * Listing my API routes\n **/\n $controllers->get('/','App\\AdControllerProvider::index');\n $controllers->post('/','App\\AdControllerProvider::create');\n\n return $controllers;\n }", "public static function routes()\r\n {\r\n return [\r\n [\"uri\" => \"/\", \"action\" => \"get\", \"uses\" => \"IndexController@index\"],\r\n [\"uri\" => \"/\", \"action\" => \"post\", \"uses\" => \"IndexController@handle\"],\r\n [\"uri\" => \"/api\", \"action\" => \"get\", \"uses\" => \"APIController@handle\"],\r\n ];\r\n }", "public function connect()\n {\n // create the oauth2 server object\n $this->setup();\n\n // creates a new controller based on the default route\n $routing = $app['controllers_factory'];\n\n /* Set corresponding endpoints on the controller classes */\n Controllers\\Authorize::addRoutes($routing);\n Controllers\\Token::addRoutes($routing);\n Controllers\\Resource::addRoutes($routing);\n\n return $routing;\n }", "public function connect(Application $app)\n {\n\n $app['api.circular.controller'] = function ($app) {\n return new CircularController($app['command.bus']);\n };\n\n $app['api.article.controller'] = function () use ($app) {\n return new ArticleController($app['command.bus'], $app['article.request.builder'], $app['article.service']);\n };\n\n $app['api.event.controller'] = function () use ($app) {\n return new EventController($app['command.bus']);\n };\n\n $app['api.blog.controller'] = function () use ($app) {\n return new BlogController($app['command.bus']);\n };\n\n $app['api.upload.controller'] = function () use ($app) {\n return new UploadController($app['command.bus']);\n };\n\n $app['api.images.controller'] = function () use ($app) {\n return new ImageController($app['command.bus']);\n };\n\n $api = $app['controllers_factory'];\n\n $api->get('/articles', \"api.article.controller:feed\")->when(\n \"request.headers.get('Accept') matches '/application\\\\\\\\/json/'\"\n )\n ;\n $api->get('/events', \"api.event.controller:last\")->when(\n \"request.headers.get('Accept') matches '/application\\\\\\\\/json/'\"\n )\n ;\n $api->get('/circulars', \"api.circular.controller:last\");\n $api->get('/blogs', 'api.blog.controller:public');\n $api->get('/getDownloads', 'api.upload.controller:getDownloads');\n $api->get('/images', 'api.images.controller:getImages');\n return $api;\n }", "public function getRoutes()\n\t{\n\t\t$routes = array();\n\t\tarray_push($routes, CoreControllerObject::buildAction('/login', __CLASS__, CoreControllerObject::MATCH_TYPE_STRING));\n\t\treturn $routes;\n\t}", "public function getRoutes() {}", "public function connect(Application $app)\n {\n $users = $app[\"controllers_factory\"];\n\n $users->get(\"/\", \"App\\\\Controller\\\\UserController::index\");\n\n $users->post(\"/\", \"App\\\\Controller\\\\UserController::store\");\n\n $users->get(\"/{id}\", \"App\\\\Controller\\\\UserController::show\")\n ->assert('id', '\\d+');\n\n $users->get(\"/edit/{id}\", \"App\\\\Controller\\\\UserController::edit\")\n ->assert('id', '\\d+');\n\n $users->put(\"/{id}\", \"App\\\\Controller\\\\UserController::update\")\n ->assert('id', '\\d+');\n\n $users->delete(\"/{id}\", \"App\\\\Controller\\\\UserController::destroy\")\n ->assert('id', '\\d+');\n\n return $users;\n }", "public function connect(Application $app){\n\n $controllers = $app['controllers_factory'];\n\n $controllers->get('/', 'App\\Controller\\JoueurController::show')->bind('joueur.show');\n\n $controllers->get('/add', 'App\\Controller\\JoueurController::addJoueur')->bind('joueur.addJoueur');\n $controllers->post('/add', 'App\\Controller\\JoueurController::confirmAddJoueur')->bind('joueur.confirmAddJoueur');\n\n $controllers->get('/delete/{id}', 'App\\Controller\\JoueurController::deleteJoueur')->bind('joueur.deleteJoueur');\n $controllers->delete('/deleteConfirm', 'App\\Controller\\JoueurController::confirmDeleteJoueur')->bind('joueur.confirmDeleteJoueur');\n\n $controllers->get('/update/{id}', 'App\\Controller\\JoueurController::updateJoueur')->bind('joueur.updateJoueur');\n $controllers->put('/updateConfirm', 'App\\Controller\\JoueurController::confirmUpdateJoueur')->bind('joueur.confirmUpdateJoueur');\n\n return $controllers;\n\n }", "public function getSystemRoutes();", "public function getRoutes() {\n\n\t\t// Hydrate or generate application routes.\n\t\t$routesCacheKey = \"__routes__\";\n\t\t$routes = Celsus_Cache_Manager::cache($this->_bootstrapCacheName)->shared()->load($routesCacheKey);\n\t\tif (!$routes) {\n\n\t\t\t// Create a new route config object\n\t\t\t$routes = new Zend_Config(array(), true);\n\n\t\t\t// Load routes\n\t\t\t$routesPath = CONFIG_PATH . '/routes';\r\n\t\t\t$files = scandir($routesPath);\r\n\n\t\t\t// Iterate all the YAML files in the directory and merge the configs.\r\n\t\t\tforeach ($files as $file) {\r\n\t\t\t\t$routes->merge(new Zend_Config_Yaml($routesPath . \"/$file\"));\r\n\t\t\t}\r\n\r\n\t\t\t$routes->setReadOnly();\n\r\n\t\t\tCelsus_Cache_Manager::cache($this->_bootstrapCacheName)->shared()->save($routes, $routesCacheKey, array('routes'));\n\t\t}\n\n\t\treturn $routes;\n\t}", "public function connect(Application $app)\n {\n $controller = $app['controllers_factory'];\n\n $controller->get('/{id}/download/{format}', __CLASS__.'::downloadAction')\n ->assert('id', '\\d+')\n ->bind('author_download');\n\n $controller->get('/list/{letter}/{page}', __CLASS__.'::listAction')\n ->assert('letter', '\\w+|0')\n ->value('page', 1)\n ->bind('author_list');\n\n $controller->get('/{id}', __CLASS__.'::detailAction')\n ->assert('id', '\\d+')\n ->bind('author_detail');\n\n return $controller;\n }", "public function connect(Application $app)\n {\n $controllers = $app['controllers_factory'];\n\n $controller = new \\Acme\\PetitionController($app['twig'], $app['db']);\n\n $controllers->get('/', array($controller, 'indexAction'));\n $controllers->post(\n '/sign',\n function(Request $request) use ($controller) {\n return $controller->signAction($request->get('name'));\n }\n );\n $controllers->get('/thankyou', array($controller, 'thankyouAction'));\n $controllers->get('/error', array($controller, 'errorAction'));\n\n return $controllers;\n }", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n\n /**\n * Porteiro; Routes\n */\n $this->loadRoutesForRiCa(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'routes');\n }", "public function connect(Application $app)\n {\n $controllers = $app['controllers_factory'];\n\n // $controllers->get('/', function (Application $app) {\n // // return $app->redirect('/hello');\n // return $app->redirect('/punchview');\n // });\n\n $controllers->post('/uploadBookcoverAction', function (Application $app) {\n // return $app->redirect('/hello');\n\n $c = new BookController();\n return $c->uploadBookcoverAction($app);\n });\n\n $controllers->post('/saveNewBookAction', function (Application $app) {\n // return $app->redirect('/hello');\n\n $c = new SaveNewBookController();\n return $c->saveNewBookAction($app);\n });\n $controllers->post('/saveNewActivityAction', function (Application $app) {\n // return $app->redirect('/hello');\n\n $c = new SaveNewActivityController();\n return $c->saveNewActivityAction($app);\n });\n $controllers->post('/updateActivityAction', function (Application $app) {\n // return $app->redirect('/hello');\n\n\t\t $c = new UpdateActivityAction();\n\t\t return $c->updateActivityAction($app);\n });\n\n return $controllers;\n }", "public function connect(Application $app)\n {\n $controllers = $app['controllers_factory'];\n\n\n $controllers->get('/affiche','App\\Controller\\CommentController::afficherComment')->bind('comment.afficherComment');\n $controllers->get('/add', 'App\\Controller\\CommentController::ajouterComment')->bind('comment.addComment');\n $controllers->post('/add', 'App\\Controller\\CommentController::validFormAddComment')->bind('comment.validFormAddComment');\n\n\n\n\n\n return $controllers;\n\n\n }", "private function registerRoutes(){\n $appRouter = require_once __DIR__.'/../../routes/app.php';\n $this->registerApplicationRoutes($appRouter);\n $this->registerApplicationRoutes($appRouter, false);\n $this->registerAuthenticationRoutes();\n }", "static public function routes()\n\t{\n\t\tglobal $core;\n\t\tstatic $constructed;\n\n\t\tif (!$constructed)\n\t\t{\n\t\t\t$constructed = true;\n\n\t\t\tself::$routes += $core->configs->fuse('routes', array(__CLASS__, 'routes_constructor'));\n\t\t}\n\n\t\treturn self::$routes;\n\t}", "protected function getRoutes($app, $accessToken)\n\t{\n\t\t// exists in cache?\n\t\t$memcached = $app['memcached'];\n\t\t$routes = $memcached->get('myroutes_routes');\n\n\t\t// not a cache hit, fetch live data\n\t\tif($routes === false)\n\t\t{\n\t\t\t$endpoint = $app['url_generator']->generate('routes_index', array('access_token' => $accessToken), true);\n\n\t\t\t$response = $app['http_client']->get($endpoint, null)->send();\n\t\t\t$json = json_decode((string) $response->getBody(), true);\n\n\t\t\tif(array_key_exists('routes', $json))\n\t\t\t{\n\t\t\t\t$routes = $json['routes'];\n\t\t\t\t$memcached->set('myroutes_routes', $routes);\n\t\t\t}\n\t\t}\n\n\t\treturn $routes;\n\t}", "public function registerRoutes()\n\t{\n\t\t$this->app->booted(function ($app) {\n\n\t\t\t# Manager\n\t\t\t$app['router']->get(\n\t\t\t\t'/',\n\t\t\t\t[\n\t\t\t\t\t'as' => 'manager.index',\n\t\t\t\t\t'uses' => 'ManagerController@index'\n\t\t\t\t]\n\t\t\t);\n\n\t\t});\n\t}", "public function __invoke(\\Slim\\App $app): void\n {\n foreach ($this->config('routes') as $group_name => $routes) {\n $app->group($group_name, function () use ($group_name, $routes): void {\n $controller = ('/' === $group_name || !$group_name) ? 'index' : \\trim($group_name, '/');\n\n foreach ($routes as $name => $route) {\n $methods = $route['methods'] ?? ['GET'];\n $pattern = $route['pattern'] ?? '';\n $callable = function (Request $request, Response $response, array $args = []) use ($controller, $name) {\n $args['action'] = $name;\n\n return $this['controller']($controller)->__invoke($request, $response, $args);\n };\n $this->map($methods, $pattern, $callable)->setName(('index' === $controller ? '' : $controller).'-'.$name);\n }\n });\n }\n }", "public function generateRoutes()\n {\n $routes = property_exists(app(), 'router')? app()->router->getRoutes() : app()->getRoutes();\n foreach ($routes as $route) {\n array_push($this->routes, [\n 'method' => $route['method'],\n 'uri' => $route['uri'],\n 'name' => $this->getRouteName($route),\n 'action' => $this->getRouteAction($route),\n 'middleware' => $this->getRouteMiddleware($route),\n 'map' => $this->getRouteMapTo($route)\n ]);\n }\n }", "function add_custom_admin_routes($app) {\n\n}", "public static function all()\n\t{\n\t\treturn Route::$_routes + Kohana::$tree['routes']['external'];\n\t}", "protected function routes()\n {\n Nova::routes()\n ->withAuthenticationRoutes()\n ->withPasswordResetRoutes()\n ->register();\n }", "protected function routes()\n {\n Nova::routes()\n ->withAuthenticationRoutes()\n ->withPasswordResetRoutes()\n ->register();\n }", "public static function get_all_route()\n {\n return include BASE_PATH . 'routes'. DIRECTORY_SEPARATOR . 'web.php';\n }", "public function connect(App $app)\n {\n /* @var ControllerCollection $controllers */\n $controllers = $app['controllers_factory'];\n $mainController = new MainController();\n $samlController = new SAMLController();\n\n $controllers\n ->get('/login-end-point', [$mainController, 'loginEndPointAction'])\n ->bind('loginEndPoint');\n\n $controllers\n ->get('/', [$mainController, 'renderFormAction'])\n ->bind('loginRender');\n $controllers\n ->post('/', [$mainController, 'postFormAction'])\n ->bind('loginProcess');\n\n $controllers\n ->get('saml/logout-end-point', [$samlController, 'logoutEndPointAction'])\n ->bind('samlLogoutEndPoint');\n $controllers\n ->get('saml/login-end-point', [$samlController, 'loginEndPointAction'])\n ->bind('samlLoginEndPoint');\n $controllers\n ->get('/saml', [$samlController, 'renderFormAction'])\n ->bind('samlRender');\n $controllers\n ->get('/saml/init', [$samlController, 'initAction'])\n ->bind('samlInit');\n $controllers\n ->post('/saml/acs', [$samlController, 'acsAction'])\n ->bind('samlAcs');\n $controllers\n ->match('/saml/logout', [$samlController, 'logoutAction'])\n ->bind('samlLogout');\n $controllers\n ->get('/saml/logout/init', [$samlController, 'logoutInitAction'])\n ->bind('samlLogoutInit');\n $controllers\n ->get('/saml/metadata', [$samlController, 'metadataAction'])\n ->bind('samlMetaData');\n\n return $controllers;\n }", "public function routes()\n {\n return [\n 'admin' => dirname(__DIR__, 3) . '/routes/admin.php',\n ];\n }", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n Route::middleware(['nova', Authorize::class])\n ->prefix('nova-vendor/media-library')\n ->group(__DIR__.'/../routes/api.php');\n }", "public function routes() {\n $storage = $this->entityTypeManager->getStorage('graphql_server');\n /** @var \\Drupal\\graphql\\Entity\\ServerInterface[] $servers */\n $servers = $storage->loadMultiple();\n $routes = [];\n\n // Allow all authentication providers by default.\n $auth = array_keys($this->authenticationCollector->getSortedProviders());\n\n foreach ($servers as $id => $server) {\n $path = $server->get('endpoint');\n\n $routes[\"graphql.query.$id\"] = (new Route($path))\n ->addDefaults([\n 'graphql_server' => $id,\n '_graphql' => TRUE,\n '_controller' => '\\Drupal\\graphql\\Controller\\RequestController::handleRequest',\n '_disable_route_normalizer' => TRUE,\n ])\n ->addRequirements([\n '_graphql_query_access' => 'graphql_server:{graphql_server}',\n '_format' => 'json',\n ])\n ->addOptions([\n '_auth' => $auth,\n 'no_cache' => TRUE,\n 'default_url_options' => ['path_processing' => FALSE],\n 'parameters' => ['graphql_server' => ['type' => 'entity:graphql_server']]\n ]);\n }\n\n return $routes;\n }", "public function connect(Application $app)\n {\n /** @var $controllers Application */\n $controllers = $app['controllers_factory'];\n\n $controllers->get('{userId}{json}', function ($userId) {\n return [\n '_template' => 'examples/user/view',\n 'id' => $userId,\n 'name' => 'test user',\n ];\n })\n ->assert('userId', '\\d+')\n ->assert('json', '.*')\n ->value('json', '');\n\n return $controllers;\n }", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n Route::middleware(['nova', Authorize::class])\n ->prefix('nova-vendor/surveyor-nova')\n ->group(__DIR__.'/../routes/api.php');\n }", "public function getRoutes() {\n return array();\n }", "private function getRoutes()\r\n\t{\r\n\t\t$this->info('Loading Api routes...');\r\n\r\n\t\tif (config('openapischemas.router') === 'laravel') {\r\n\t\t\treturn Route::getRoutes();\r\n\t\t} else {\r\n\t\t\treturn app('Dingo\\Api\\Routing\\Router')->getRoutes()[config('openapischemas.routes_prefix')];\r\n\t\t}\r\n\t}", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n Route::middleware(['nova', Authorize::class])\n ->namespace(\"KosmosKosmos\\Rating\\Controllers\")\n ->prefix('nova-vendor/kosmoskosmos')\n ->group(__DIR__ . '/../routes/api.php');\n }", "public function getRouteCollection()\n {\n\n // retrieve the registered handlers\n $handlers = $this->handlerManager->getHandler();\n\n // prepare the collection with the available routes and initialize the route counter\n $routes = new RouteCollection();\n $counter = 0;\n\n // iterate over the available handlers and prepare the routes\n foreach ($handlers as $urlPattern => $handler) {\n $pattern = str_replace('/*', \"/{placeholder_$counter}\", $urlPattern);\n $route = new Route($pattern, array(\n $handler\n ), array(\n \"{placeholder_$counter}\" => '.*'\n ));\n $routes->add($counter ++, $route);\n }\n\n // return the collection with the routes\n return $routes;\n }", "public function bindRoutesToControllers()\n {\n $api = $this->app[\"controllers_factory\"];\n\n $api->get('/tests/{name}/{data_array}', \"schema.controller:getTests\");\n\n $this->app->mount('/', $api);\n }", "protected function routes()\n\t{\n\t\tif ($this->app->routesAreCached()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tRoute::middleware(['nova', Authorize::class])\n\t\t\t->prefix('nova-vendor/nova-permissions')\n\t\t\t->group(__DIR__ . '/../routes/api.php');\n\t}", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n if (config('admin-impersonate.enable_routes', true)) {\n Route::middleware(Arr::wrap(config('admin-impersonate.middleware.base')))\n ->prefix('admin-impersonate')\n ->name('nova.impersonate.')\n ->group(__DIR__.'/../routes/api.php');\n }\n }", "public function getAllRoutes(): array\n {\n $all = [];\n foreach (self::$dispatchApplications as $applicationId => $path) {\n if ($applicationId == Yii::$app->id) {\n $application = Yii::$app;\n } else {\n $application = $this->getApplicationInstance($applicationId, $path);\n }\n\n $key = [__METHOD__, $application->id];\n $result = (($this->cache !== null) ? $this->cache->get($key) : false);\n\n if ($result === false) {\n $this->getRouteRecursive($application, $result);\n if ($this->cache !== null) {\n $this->cache->set($key, $result, $this->cacheDuration, new TagDependency([\n 'tags' => self::CACHE_TAG,\n ]));\n }\n }\n foreach ($result as $key => $value) {\n $result[\"#{$applicationId}$key\"] = \"#{$applicationId}$value\";\n unset($result[$key]);\n }\n ksort($result);\n $all = array_merge($all, $result);\n }\n\n return $all;\n }", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n Route::namespace('Day4\\NovaForms\\Http\\Controllers')\n ->prefix('day4/nova-forms')\n ->group(__DIR__.'/../routes/api.php');\n }", "function add_listing_routes()\n {\n $this->add_route('GET', '/routes', function(){\n print \"<h1>Routes</h1>\";\n foreach($this->routes as $method => $routes) {\n print \"<h3>\".$method.\"</h3>\";\n print \"<ul>\";\n foreach ($routes as $route) {\n print \"<li>\".$route->path.\"</li>\";\n }\n print \"</ul>\";\n }\n });\n }", "function app_debug_routes()\n{\n echo \"<pre>\";\n print_r(APP_ROUTES);\n echo \"</pre>\";\n}", "static function addRoutes($app, $authenticateForRole) {\n \n $app->group('/config', $authenticateForRole('admin'), function () use ($app) {\n \n /*\n * id\n */\n $app->map(\"/get/:variableId/\", function ($variableId) use ($app) {\n ConfigController::getVariable($app, $variableId);\n })->via(['GET', 'POST']);\n \n /*\n * name\n */\n $app->post(\"/get/\", function () use ($app) {\n ConfigController::getVariableByName($app);\n });\n \n /*\n * name, value\n */\n $app->post(\"/insert/\", function () use ($app) {\n ConfigController::addVariable($app);\n });\n\n /*\n * id, indestructible, locked\n */\n $app->post(\"/update/permissions/:variableId/\", function ($variableId) use ($app) {\n ConfigController::saveVariablePermissions($app, $variableId);\n });\n\n /*\n * id, name, value, disabled\n */\n $app->post(\"/update/:variableId/\", function ($variableId) use ($app) {\n ConfigController::saveVariable($app, $variableId);\n });\n\n /*\n * id\n */\n $app->map(\"/delete/:variableId/\", function ($variableId) use ($app) {\n ConfigController::deleteVariable($app, $variableId);\n })->via(['DELETE', 'POST']);\n \n });\n \n }", "public function getRoutes(){\n return CoreArrayUtils::asArray(CoreControllerObject::buildAction('/^\\/email\\/activate\\/([^\\/]+)\\/?$/i', __CLASS__, CoreControllerObject::MATCH_TYPE_REGEX, CoreControllerObject::REQUEST_GET));\n }", "public static function routes()\n {\n if (!static::$initialized) {\n static::_loadRoutes();\n }\n\n return static::$_collection->routes();\n }", "public function connect(Application $app)\n {\n $interfaceController = $app['controllers_factory'];\n $interfaceController->get('/', array($this, 'interfaceLoader'))->bind('/');\n return $interfaceController;\n }", "public function getRoutes()\n {\n return Controllers\\RoutesController::getInstance();\n }", "protected function loadExternalRoutes(Klein $app_context = null)\n {\n // Did we not pass an instance?\n if (is_null($app_context)) {\n $app_context = $this->klein_app ?: new Klein();\n }\n\n $route_directory = __DIR__ . '/routes/';\n $route_files = scandir($route_directory);\n $route_namespaces = array();\n\n foreach ($route_files as $file) {\n if (is_file($route_directory . $file)) {\n $route_namespace = '/' . basename($file, '.php');\n $route_namespaces[] = $route_namespace;\n\n $app_context->with($route_namespace, $route_directory . $file);\n }\n }\n\n return $route_namespaces;\n }", "protected function initUrlRoutes(WebApplication $app)\n {\n /** @var $module Module */\n $module = $app->getModule('notificator');\n $config = [\n 'class' => 'yii\\web\\GroupUrlRule',\n 'prefix' => 'notifications',\n 'routePrefix' => 'notificator',\n 'rules' => $module->routes,\n ];\n\n $rule = \\Yii::createObject($config);\n\n $app->getUrlManager()->addRules([$rule], false);\n }", "public static function routes()\n {\n return self::$routes;\n }", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n Route::middleware(['nova', Authorize::class])\n ->namespace('Energon7\\MenuBuilder\\Http\\Controllers')\n ->prefix('nova-vendor/menu-builder')\n ->group(__DIR__.'/../routes/api.php');\n }", "protected function initRoutes() {\n\t\t$routes['index'] = array(\n\t\t\t'route' => '/',\n\t\t\t'controller' => 'IndexController',\n\t\t\t'action' => 'index'\n\t\t);\n\n\t\t$routes['home'] = array(\n\t\t\t'route' => '/home',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'home'\n\t\t);\n\n\t\t$routes['autenticar'] = array(\n\t\t\t'route' => '/autenticar',\n\t\t\t'controller' => 'AuthController',\n\t\t\t'action' => 'autenticar'\n\t\t);\n\n\t\t$routes['editar'] = array(\n\t\t\t'route' => '/editar',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'editar'\n\t\t);\n\n\t\t$routes['sair'] = array(\n\t\t\t'route' => '/sair',\n\t\t\t'controller' => 'AuthController',\n\t\t\t'action' => 'sair'\n\t\t);\n\t\t##### Fim rotas principais #####\n\n\t\t// ***** Inicio usuario ***** //\n\t\t$routes['usuario'] = array(\n\t\t\t'route' => '/usuario',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'usuario'\n\t\t);\n\n\t\t$routes['cadastrar'] = array(\n\t\t\t'route' => '/cadastrar',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'cadastrar'\n\t\t);\n\n\t\t$routes['registrar'] = array(\n\t\t\t'route' => '/registrar',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'registrar'\n\t\t);\n\n\t\t$routes['acaousuario'] = array(\n\t\t\t'route' => '/acaousuario',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'botoesUsuario'\n\t\t);\n\n\t\t$routes['editaruser'] = array(\n\t\t\t'route' => '/editaruser',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'editarUser'\n\t\t);\n\t\t##### Fim usuario #####\n\n\t\t// ***** Inicio Produto ***** //\n\t\t$routes['produto'] = array(\n\t\t\t'route' => '/produto',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'produto'\n\t\t);\n\n\t\t$routes['cadastrarprod'] = array(\n\t\t\t'route' => '/cadastrarprod',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'cadastrarProd'\n\t\t);\n\n\t\t$routes['registrarprod'] = array(\n\t\t\t'route' => '/registrarprod',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'registrarProd'\n\t\t);\n\n\t\t$routes['acaoproduto'] = array(\n\t\t\t'route' => '/acaoproduto',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'botoesProduto'\n\t\t);\n\n\t\t$routes['editarprod'] = array(\n\t\t\t'route' => '/editarprod',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'editarProd'\n\t\t);\n\t\t##### Fim Produtos #####\n\t\t\n\t\t// ***** Inicio carrinho ***** //\n\t\t$routes['carrinho'] = array(\n\t\t\t'route' => '/carrinho',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'carrinho'\n\t\t);\n\n\t\t$routes['finalizar'] = array(\n\t\t\t'route' => '/finalizar',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'finalizar'\n\t\t);\n\t\t##### Fim carrinho #####\n\t\t\n\t\t// ***** Inicio pedido ***** //\n\t\t$routes['pedido'] = array(\n\t\t\t'route' => '/pedido',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'pedido'\n\t\t);\n\t\t##### Fim pedido #####\n\n\t\t// ***** Inicio Relatorio ***** //\n\t\t$routes['relatorio'] = array(\n\t\t\t'route' => '/relatorio',\n\t\t\t'controller' => 'AppController',\n\t\t\t'action' => 'relatorio'\n\t\t);\n\t\t##### Fim Relatorio #####\n\t\t$this->setRoutes($routes);\n\t}", "public function getRoutes()\n {\n if ($this->_routes === null) {\n $filename = 'routes.' . (!$this->_subdomain ? 'php' : $this->_subdomain . '.php');\n $path = App::getInstance()->getPath('configs') . '/' . $filename;\n include $path;\n $this->_routes = $routes;\n }\n\n return $this->_routes;\n }", "public function getRoutes()\n {\n $routes = array();\n array_push($routes, CoreControllerObject::buildAction('/admin/performanceutils', __CLASS__, CoreControllerObject::MATCH_TYPE_STRING));\n return $routes;\n }", "protected function loadRemoteRoutes()\n {\n Route::as('larapush.')\n ->middleware('same-token', 'client')\n //->namespace('Brunocfalcao\\Larapush\\Http\\Controllers')\n ->prefix(app('config')->get('larapush.remote.suffix'))\n ->group(__DIR__.'/../routes/api.php');\n\n // Load Laravel Passport routes.\n Passport::routes();\n }", "public function getRoutes(): array\r\n {\r\n return [\r\n [\r\n 'name' => 'admin/post/admin',\r\n 'path' => '/admin',\r\n 'middleware' => 'Admin\\Action\\Post\\Admin',\r\n 'allowed_methods' => ['POST']\r\n ],\r\n [\r\n 'name' => 'admin/form/admin',\r\n 'path' => '/admin/form[/{id:\\d+}]',\r\n 'middleware' => 'Admin\\Action\\Form\\Admin',\r\n 'allowed_methods' => ['GET']\r\n ],\r\n [\r\n 'name' => 'admin/user/view/resultset',\r\n 'path' => '/admin/user/resultset',\r\n 'middleware' => 'Admin\\User\\Action\\View\\ResultSet',\r\n 'allowed_methods' => ['GET']\r\n ]\r\n ];\r\n }", "public function connect(Application $app) {\n $controller = $app['controllers_factory'];\n\n // la ruta \"/aptos/list\"\n $controller->get('/list', function() use($app) {\n\n // obtiene el nombre de apartamento de la sesión\n $user = $app['session']->get('user');\n $apartamentos = ApartamentosQuery::create()->find();\n\n if (!isset($aptos)) {\n $apto = array();\n }\n foreach ($apartamentos as $apartamento) {\n $ide = $apartamento->getId();\n $n = $apartamento->getNombre();\n $d = $apartamento->getDescripcion();\n $p = $apartamento->getPrecio();\n $la = $apartamento->getLatitud();\n $lo = $apartamento->getLongitud();\n $ti = $apartamento->getTipos();\n $aptos[] = array(\n 'id' => $ide,\n 'nombre' => $n,\n 'descripcion' => $d,\n 'precio' => $p,\n 'latitud' => $la,\n 'longitud' => $lo,\n 'tipo' => $ti\n );\n }\n\n\n // ya ingreso un apartamento ?\n if (isset($user) && $user != '') {\n // muestra la plantilla\n return $app['twig']->render('Apartamentos/apartamentos.list.html.twig', array(\n 'user' => $user,\n 'aptos' => $aptos\n ));\n } else {\n // redirige el navegador a \"/login\"\n return $app->redirect($app['url_generator']->generate('login'));\n }\n\n // hace un bind\n })->bind('aptos-list');\n\n // la ruta \"/aptos/new\"\n $controller->get('/new', function() use($app) {\n // obtiene el nombre de apartamento de la sesión\n $user = $app['session']->get('user');\n // ya ingreso un apartamento ?\n if ( isset( $user ) && $user != '' ) {\n \n // muestra la plantilla\n return $app['twig']->render('Apartamentos/apartamentos.edit.html.twig', array(\n 'user' => $user,\n 'index' => '',\n 'apto_to_edit' => array(\n 'id' => '',\n 'nombre' => '',\n 'descripcion' => '',\n 'precio' => '',\n 'latitud' => '',\n 'longitud' => '',\n 'tipo' => ''\n )\n ));\n } else {\n // redirige el navegador a \"/login\"\n return $app->redirect( $app['url_generator']->generate('login'));\n }\n // hace un bind\n })->bind('aptos-new');\n\n // la ruta \"/aptos/edit\"\n $controller->get('/edit/{index}', function($index) use($app) {\n\n // obtiene el nombre de apartamento de la sesión\n $user = $app['session']->get('user');\n\n // obtiene los apartamentos de la sesión\n $aptos = $app['session']->get('aptos');\n if (!isset($aptos)) {\n $aptos = array();\n }\n $apto = ApartamentosQuery::create()->findPK($index);\n // no ha ingresado el apartamento (no ha hecho login) ?\n if (!isset($user) || $user == '') {\n // redirige el navegador a \"/login\"\n return $app->redirect($app['url_generator']->generate('login'));\n\n // no existe un apartamento en esa posición ?\n } else if ($apto == NULL) {\n // muestra el formulario de nuevo apartamento\n return $app->redirect($app['url_generator']->generate('aptos-new'));\n } else {\n // muestra la plantilla\n return $app['twig']->render('Apartamentos/apartamentos.edit.html.twig', array(\n 'user' => $user,\n 'index' => $index,\n 'apto_to_edit' => $apto\n ));\n }\n\n // hace un bind\n })->bind('aptos-edit');\n\n $controller->post('/save', function( Request $request ) use ( $app ) {\n\n $aptos = $app['session']->get('aptos');\n if (!isset($aptos)) {\n $aptos = array();\n }\n\n // index no está incluido en la petición\n $index = $request->get('index');\n if (!isset($index) || $index == '') {\n // agrega el nuevo apartamento\n $aptos2 = array(\n id => $request->get('id'),\n nombre => $request->get('nombre'),\n descripcion => $request->get('descripcion'),\n precio => $request->get('precio'),\n latitud => $request->get('latitud'),\n longitud => $request->get('longitud'),\n tipo => $request->get('tipo')\n );\n $tip = new Tipos();\n $tip->setNombre($aptos2['tipo']);\n\n $apto = new Apartamentos();\n $apto->setNombre($aptos2['nombre']);\n $apto->setDescripcion($aptos2['descripcion']);\n $apto->setPrecio($aptos2['precio']);\n $apto->setLatitud($aptos2['latitud']);\n $apto->setLongitud($aptos2['longitud']);\n $apto->setTipos($tip);\n $apto->save();\n } else {\n // modifica el apartamento en la posición $index\n $aptos[$index] = array(\n id => $request->get('id'),\n nombre => $request->get('nombre'),\n descripcion => $request->get('descripcion'),\n precio => $request->get('precio'),\n latitud => $request->get('latitud'),\n longitud => $request->get('longitud'),\n tipo => $request->get('tipo')\n );\n $apto = ApartamentosQuery::create()->findOneById($index);\n $apto->setNombre($aptos2['nombre']);\n $apto->setDescripcion($aptos2['descripcion']);\n $apto->setPrecio($aptos2['precio']);\n $apto->setLatitud($aptos2['latitud']);\n $apto->setLongitud($aptos2['longitud']);\n $apto->save();\n }\n\n\n // actualiza los datos en sesión\n $app['session']->set('aptos', $aptos);\n\n // muestra la lista de apartamentos\n return $app->redirect($app['url_generator']->generate('aptos-list'));\n })->bind('aptos-save');\n\n $controller->get('/delete/{index}', function($index) use ($app) {\n\n // obtiene el apartamento\n $apto = ApartamentosQuery::create()->findPK($index);\n $apto->delete();\n\n // muestra la lista de apartamentos\n return $app->redirect($app['url_generator']->generate('aptos-list'));\n })->bind('aptos-delete');\n\n return $controller;\n }", "protected function loadRoutes()\n {\n $this->app->call([$this, 'map']);\n }", "public function getRouter();", "public function routes()\n {\n register_rest_route('can', '/donation-forms', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'fundraisingPages'\n ],\n ]);\n\n register_rest_route('can', '/forms', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'forms'\n ],\n ]);\n\n register_rest_route('can', '/petitions', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'petitions'\n ],\n ]);\n\n register_rest_route('can', '/person/add', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'addPerson'\n ],\n ]);\n }", "public function routes()\r\n {\r\n return $this->routes;\r\n }", "function defineRoutes() {\n Router::map('homepage', '', array('controller' => DEFAULT_CONTROLLER, 'action' => DEFAULT_ACTION, 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('admin', 'admin', array('controller' => 'admin', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('public', 'public', array('controller' => 'public', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('wireframe_updates', 'wireframe-updates', array('controller' => 'backend', 'action' => 'wireframe_updates', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('menu_refresh_url', 'refresh-menu', array('controller' => 'backend', 'action' => 'refresh_menu', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('quick_add', 'quick-add', array('controller' => 'backend', 'action' => 'quick_add', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // API\n Router::map('info', 'info', array('controller' => 'api', 'action' => 'info', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Disk Space\n Router::map('disk_space_admin', 'admin/disk-space', array('controller' => 'disk_space_admin', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_usage', 'admin/disk-space/usage', array('controller' => 'disk_space_admin', 'action' => 'usage', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_admin_settings', 'admin/disk-space/settings', array('controller' => 'disk_space_admin', 'action' => 'settings', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_remove_application_cache', 'admin/disk-space/tools/remove-application-cache', array('controller' => 'disk_space_admin', 'action' => 'remove_application_cache', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_remove_logs', 'admin/disk-space/tools/remove-logs', array('controller' => 'disk_space_admin', 'action' => 'remove_logs', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_remove_old_application_versions', 'admin/disk-space/tools/remove-old-application-versions', array('controller' => 'disk_space_admin', 'action' => 'remove_old_application_versions', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Appearance\n Router::map('appearance_admin', 'admin/appearance', array('controller' => 'appearance', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_add_scheme', 'admin/appearance/add-scheme', array('controller' => 'appearance', 'action' => 'add', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_edit_scheme', 'admin/appearance/:scheme_id/edit', array('controller' => 'appearance', 'action' => 'edit', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_rename_scheme', 'admin/appearance/:scheme_id/rename', array('controller' => 'appearance', 'action' => 'rename', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_delete_scheme', 'admin/appearance/:scheme_id/delete', array('controller' => 'appearance', 'action' => 'delete', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_set_as_default_scheme', 'admin/appearance/:scheme_id/set-as-default', array('controller' => 'appearance', 'action' => 'set_as_default', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Scheduled Tasks Admin\n Router::map('scheduled_tasks_admin', 'admin/scheduled-tasks', array('controller' => 'scheduled_tasks_admin', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Network settings\n Router::map('network_settings', 'admin/network', array('controller' => 'network_admin', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // Indices admin\n Router::map('indices_admin', 'admin/indices', array('controller' => 'indices_admin', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('indices_admin_rebuild', 'admin/indices/rebuild', array('controller' => 'indices_admin', 'action' => 'rebuild', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('indices_admin_rebuild_finish', 'admin/indices/rebuild/finish', array('controller' => 'indices_admin', 'action' => 'rebuild_finish', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n Router::map('object_contexts_admin_rebuild', 'admin/indices/object-contexts/rebuild', array('controller' => 'object_contexts_admin', 'action' => 'rebuild', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('object_contexts_admin_clean', 'admin/indices/object-contexts/clean', array('controller' => 'object_contexts_admin', 'action' => 'clean', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // Scheduled tasks\n Router::map('frequently', 'frequently', array('controller' => 'scheduled_tasks', 'action' => 'frequently', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('hourly', 'hourly', array('controller' => 'scheduled_tasks', 'action' => 'hourly', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('daily', 'daily', array('controller' => 'scheduled_tasks', 'action' => 'daily', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // trash related\n Router::map('trash', 'trash', array('controller' => 'trash', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('trash_section', 'trash/:section_name', array('controller' => 'trash', 'action' => 'section', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('trash_empty', 'trash/empty', array('controller' => 'trash', 'action' => 'empty_trash', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('object_untrash', 'trash/untrash-object', array('controller' => 'trash', 'action' => 'untrash_object', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO), array('object_id' => Router::MATCH_ID));\n Router::map('object_delete', 'trash/delete-object', array('controller' => 'trash', 'action' => 'delete_object', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO), array('object_id' => Router::MATCH_ID));\n\n // Control Tower\n Router::map('control_tower', 'control-tower', array('controller' => 'control_tower', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_empty_cache', 'control-tower/empty-cache', array('controller' => 'control_tower', 'action' => 'empty_cache', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_delete_compiled_templates', 'control-tower/delete-compiled-templates', array('controller' => 'control_tower', 'action' => 'delete_compiled_templates', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_rebuild_images', 'control-tower/rebuild-images', array('controller' => 'control_tower', 'action' => 'rebuild_images', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_rebuild_localization', 'control-tower/rebuild-localization', array('controller' => 'control_tower', 'action' => 'rebuild_localization', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('control_tower_settings', 'admin/control-tower', array('controller' => 'control_tower', 'action' => 'settings', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n\t // Firewall\n\t Router::map('firewall', 'admin/firewall', array('controller' => 'firewall', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n }", "public static function getRoutes()\n {\n return self::$routes;\n }", "public static function getRoutes()\n {\n return self::$routes;\n }", "public function get_routes($route_namespace = '')\n {\n }", "static function routes() {\n return self::$_routes;\n }", "public function connect(Application $app)\n {\n $controllers = $app['controllers_factory'];\n $controllers->before(function (Request $request) use ($app) {\n if (null === $this->auth = $app['session']->get('auth')) {\n return $app->redirect('/login');\n }\n });\n\n $controllers->get('/', function (Application $app) {\n $mapper = new \\LVAC\\Member\\Mapper($app['db']);\n $member = $mapper->getMemberById($this->auth['userid']);\n return $app['twig']->render('members/index.html', array('nickname' => $member->getNickname()));\n });\n\n $controllers->get('/profile', function (Application $app) {\n $mapper = new \\LVAC\\Member\\Mapper($app['db']);\n $member = $mapper->getMemberById($this->auth['userid']);\n return $app['twig']->render('members/profile.html', array(\n 'email' => $member->getEmail(),\n 'name' => $member->getName(),\n 'nickname' => $member->getNickname()\n ));\n });\n\n $controllers->post('/profile', function (Request $request) use ($app) {\n $name = $request->get('name');\n $nickname = $request->get('nickname');\n\n $member = new \\LVAC\\Member\\Member();\n $member->setId($this->auth['userid']);\n $member->setName($name);\n $member->setNickname($nickname);\n\n $mapper = new \\LVAC\\Member\\Mapper($app['db']);\n if (false === $mapper->saveMember($member)) {\n $error = \"There was a problem saving your details\";\n return $app['twig']->render('/profile.html', array('error' => $error));\n }\n return $app->redirect('/members/profile');\n });\n\n $controllers->get('/training', function (Application $app) {\n $mapper = new \\LVAC\\TrainingMapper($app['db']);\n $logs = $mapper->getTrainingById($this->auth['userid']);\n\n return $app['twig']->render('members/training.html', array('logs' => $logs));\n });\n\n return $controllers;\n }", "public function getRoutes ()\n {\n return $this->routes;\n }", "public static function getRoutes(): array\n {\n require(root_path('routes.php'));\n return self::$called;\n }", "public static function getRoutes()\n {\n $routes = new \\FreeFW\\Router\\RouteCollection();\n $paths = [];\n $paths[] = __DIR__ . '/../resource/routes/restful/routes.php';\n foreach ($paths as $onePath) {\n $apiRoutes = @include($onePath);\n if (is_array($apiRoutes)) {\n foreach ($apiRoutes as $routeId => $apiRoute) {\n $myRoute = new \\FreeFW\\Router\\Route();\n $myRoute\n ->setId($routeId)\n ->setMethod($apiRoute[\\FreeFW\\Router\\Route::ROUTE_METHOD])\n ->setUrl($apiRoute[\\FreeFW\\Router\\Route::ROUTE_URL])\n ->setController($apiRoute[\\FreeFW\\Router\\Route::ROUTE_CONTROLLER])\n ->setFunction($apiRoute[\\FreeFW\\Router\\Route::ROUTE_FUNCTION])\n ;\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_ROLE, $apiRoute)) {\n $myRoute->setRole($apiRoute[\\FreeFW\\Router\\Route::ROUTE_ROLE]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_AUTH, $apiRoute)) {\n $myRoute->setAuth($apiRoute[\\FreeFW\\Router\\Route::ROUTE_AUTH]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_INCLUDE, $apiRoute)) {\n $myRoute->setInclude($apiRoute[\\FreeFW\\Router\\Route::ROUTE_INCLUDE]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_MODEL, $apiRoute)) {\n $myRoute->setDefaultModel($apiRoute[\\FreeFW\\Router\\Route::ROUTE_MODEL]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_COLLECTION, $apiRoute)) {\n $myRoute->setCollection($apiRoute[\\FreeFW\\Router\\Route::ROUTE_COLLECTION]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_COMMENT, $apiRoute)) {\n $myRoute->setComment($apiRoute[\\FreeFW\\Router\\Route::ROUTE_COMMENT]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_PARAMETERS, $apiRoute)) {\n $myRoute->setParameters($apiRoute[\\FreeFW\\Router\\Route::ROUTE_PARAMETERS]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_RESULTS, $apiRoute)) {\n $myRoute->setResponses($apiRoute[\\FreeFW\\Router\\Route::ROUTE_RESULTS]);\n }\n if (array_key_exists(\\FreeFW\\Router\\Route::ROUTE_SCOPE, $apiRoute)) {\n $myRoute->setScope($apiRoute[\\FreeFW\\Router\\Route::ROUTE_SCOPE]);\n }\n $routes->addRoute($myRoute);\n }\n }\n }\n return $routes;\n }", "public function getRoutes() {\r\n\t\treturn array_merge($this->getFunctionRoutes(), $this->getClassRoutes());\r\n\t}", "public function getRoutes() : array;", "public function getRoutes() : array;", "protected function authRoutes()\n {\n $this->router->group(['as' => 'auth.', 'namespace' => 'Auth'], function () {\n $this->router->get('login', [\n 'uses' => 'LoginController@showLoginForm',\n 'as' => 'getLogin',\n ]);\n $this->router->post('login', [\n 'uses' => 'LoginController@login',\n 'as' => 'postLogin',\n ]);\n $this->router->get('logout', [\n 'uses' => 'LoginController@logout',\n 'as' => 'logout',\n ]);\n\n $this->router->get('esqueci-senha', [\n 'uses' => 'ForgotPasswordController@showLinkRequestForm',\n 'as' => 'getForgotPassword',\n ]);\n $this->router->post('esqueci-senha', [\n 'uses' => 'ForgotPasswordController@sendResetLinkEmail',\n 'as' => 'postForgotPassword',\n ]);\n\n $this->router->get('resetar-senha/{token}', [\n 'uses' => 'ResetPasswordController@showResetForm',\n 'as' => 'getResetPassword',\n ]);\n $this->router->post('resetar-senha', [\n 'uses' => 'ResetPasswordController@reset',\n 'as' => 'postResetPassword',\n ]);\n\n //Laravel Socialite\n /*$this->router->get('auth/{driver}', [\n 'uses' => 'LoginController@redirectToProvider',\n 'as' => 'socialOAuth',\n ]);\n $this->router->get('auth/{driver}/callback', [\n 'uses' => 'LoginController@handleProviderCallback',\n 'as' => 'socialOAuth.callback',\n ]);*/\n });\n }", "public static function routes()\n {\n $route = app()->make('router');\n return [\n $route->namespace('Access')->group(function() use ($route){\n $route->resource('/roles', 'RolesController', [\n 'except' => ['show']\n ])->middleware(['auth', \\App\\Models\\Permission::getPermission('roles')]);\n $route->delete('/roles', [\n 'as' => 'roles.destroyMany',\n 'uses' => 'RolesController@destroyMany'\n ])->middleware(['auth']);\n }),\n ];\n }", "public function initializeRoutes()\n {\n $this->get(\"/\", \"index\");\n }", "public function get_routes() {\n\t\t$endpoints = array(\n\t\t\t// Meta endpoints\n\t\t\t'/' => array( array( $this, 'get_index' ), self::READABLE ),\n\t\t);\n\n\t\t$endpoints = apply_filters( 'json_endpoints', $endpoints );\n\n\t\t// Normalise the endpoints\n\t\tforeach ( $endpoints as $route => &$handlers ) {\n\t\t\tif ( count( $handlers ) <= 2 && isset( $handlers[1] ) && ! is_array( $handlers[1] ) ) {\n\t\t\t\t$handlers = array( $handlers );\n\t\t\t}\n\t\t}\n\t\treturn $endpoints;\n\t}" ]
[ "0.6998856", "0.6915073", "0.6760365", "0.66096467", "0.64436364", "0.64282656", "0.6402604", "0.6392953", "0.6384791", "0.63411754", "0.6331039", "0.6327682", "0.6310386", "0.62962806", "0.62962806", "0.6250972", "0.6215056", "0.61082816", "0.60995054", "0.60995054", "0.6099333", "0.6090438", "0.6028759", "0.60244215", "0.6019187", "0.60135204", "0.5984326", "0.5976758", "0.5960638", "0.5931418", "0.59160185", "0.58188593", "0.5800689", "0.57886654", "0.57873565", "0.57647306", "0.57468545", "0.57444155", "0.5727742", "0.5714533", "0.57010365", "0.5688973", "0.5670935", "0.5670869", "0.56608903", "0.56606364", "0.56606364", "0.564992", "0.56483126", "0.56434625", "0.56258166", "0.56066567", "0.5599359", "0.55986285", "0.5573411", "0.5571004", "0.5554793", "0.55537057", "0.5552804", "0.5552449", "0.5550504", "0.5547736", "0.5544143", "0.5528251", "0.55217427", "0.55208254", "0.5491795", "0.548618", "0.54828835", "0.5482228", "0.5480175", "0.5471009", "0.5469566", "0.5463639", "0.5444551", "0.54370594", "0.54366595", "0.5429586", "0.5424709", "0.53921914", "0.53906375", "0.53774405", "0.5376181", "0.53743047", "0.5348171", "0.5336632", "0.5336632", "0.53323764", "0.5310023", "0.52964616", "0.5294372", "0.52917796", "0.5267462", "0.52656525", "0.52650434", "0.52650434", "0.52643996", "0.5258748", "0.5255237", "0.52473426" ]
0.57897943
33
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
function __construct(){ parent::__construct(); $this->load->library('session'); $this->load->database(); $this->load->helper('url'); $this->load->library('form_validation'); $this->load->helper('security'); $this->load->model('All_page'); $this->load->library('email'); $this->load->library('details'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [\n\t\t// \t\"name\" => \"Laura\",\n\t\t// \t\"colours\" => [\"red\", \"green\", \"blue\"]\n // ]);\n \n\t\t$this->showRouteParams();\n\t\t// echo \"Hello, World!\";\n }", "public function index()\n\t{\n\t\t//Default view\n\t\t$this->load->view('index.html');\n\t}", "function index() {\n\n // This page cannot be accessed without providing a page\n // the routes.php file will not allow the page to be accessed\n // $route['pages/(:any)'] = 'pages/view/$';\n redirect('/', 'refresh');\n\n }", "public function Index()\n\t{\n\t\t$this->views->SetTitle('Index Controller');\n\t\t$this->views->AddView('index/index.tpl.php', array(),'primary');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('default/index');\n\t}", "public function index() {\n\t\t$this->display('index');\n\t}", "public function index()\n\t{\t\n\n\t\t$this->load->view('welcome_message');\n\t}", "public function indexAction()\n {\n $arr = [\n 'title' => 'Welcome',\n 'data' => [\n 'name' => 'PHP FRAMEWORK',\n ]\n ];\n View::renderTemplate('Welcome/index.html', $arr);\n }", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n }", "public function show_index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function Index()\n {\n $this->standardView('Index');\n }", "public function index()\n {\n return view('main.welcome');\n }", "public function index()\n {\n // return view('welcome');\n }", "public function index()\n {\n $this->load->view('index');\n }", "public function index()\n {\n // return view('welcome');\n \n }", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function index()\n\t{\n\t\techo \"Nothing !\";\n\t}", "public function index() {\n \n return view('welcome');\n }", "public function index()\n {\n return view('pages.welcome');\n }", "public function Index()\n {\n \treturn view(\"index\");\n\t}", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n\t\t/*$this->layout->setTitle('Welcome to our Blog');\n\t\t$this->layout->showView('welcome/about.php');*/\n\t\techo 'hello I\\'m using codeigniter';\n }", "public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\treturn view('pages/home');\n\t}", "public function index()\n {\n return \"INDEX PAGE\";\n }", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "function index() {\n \n parent::index();\n\n\t\t$data['user_id'] = $this->tank_auth->get_user_id();\n\t\t$data['username'] = $this->tank_auth->get_username();\n\t\t$data['main_content_view'] = $this->load->view('welcome', $data, true);\n $this->render_template($data);\n\t}", "public function index()\n {\n SEOMeta::setTitle('Trusted Mortgage & Remortgage Solutions In UK - SmartMortgages UK');\n SEOMeta::setDescription('Home Page Description: For competitive mortgage and remortgage quotes around the UK at affordable rates, speak to one of our expert credit consultants and get a mortgage. For more visit us today.');\n\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->title = 'My Index Action';\n\n\t\treturn new View('basic/index');\n\t}", "public function index()\n\t{\n\t\t$data['title'] = 'Home | Welcome to AEY';\n\t\t$data ['view_page'] = 'homepage';\n\n\t\t$this->load->view('site', $data);\n\t}", "public function index()\n {\n\n return view('welcome');\n\n }", "public function actionIndex(){ \n $this->view(\"index.php\");\n }", "public function index() {\n $this->registry->template->module = 'welcome';\n \n /*** load the index template ***/\n $this->registry->template->show('index');\n }", "public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}", "public function index()\n {\n return view('front.welcome');\n }", "public function index()\n\t{\n\t\treturn $this->traces();\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\t$this->loadViews(\"index\");\n\t}", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('home/home');\n\t}", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index()\r\n\t{\r\n\t\techo \"index\";\r\n\t}", "public function index()\n\t{\n\t\t$this->twig->display('welcome/index.html', []);\n\t}", "public function Index() {\n $this->Display();\n }", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function index()\n {\n $title = 'Welcome Page';\n return view($this->view . '.home', compact('title'));\n }", "public function index()\n\t{\n\t\t//\n\t\techo'index';\n\t}", "public function index() {\n $this->getView('navigation', array('pagename' => 'Welcome'));\n $this->getView('welcome');\n $this->getView('footer');\n }", "public function index()\n {\n return view(\"home\");\n }", "public function home()\n\t{\n\t\t$this->load->view('index_view');\n\t}", "function index() {\n $this->renderView(\"index\");\n }", "function index()\r\n\t{\r\n\t\t$this->view(); \r\n\t}", "public function index()\n\t{\n\t\treturn view('index');\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n\n\n\n return view('welcome');\n }", "public function index() {\n\t\t$page = Page::getInstance();\n\t\t$session = Session::getInstance();\n\t\t$page->setPageTitle('Method index notfound');\n\t\t$session->setFlash('Chaque controller doit avoir une m&eacute;thode index', 'error');\n\t}", "public function index()\r\n\t{\r\n\t\t//\r\n\t}", "public function index() {\n\t\t// render the view (/view/main/index.php)\n\t\t$this->view->render(\"main\", \"index\");\n\t}", "public function index()\n {\n return View(\"pages.home\");\n }", "public function index()\n {\n // Nothing to do\n }", "public function index(){\n return view('welcome');\n }", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}" ]
[ "0.7654226", "0.74120015", "0.73941106", "0.731618", "0.7225734", "0.7225734", "0.71892303", "0.71651614", "0.71515816", "0.71449816", "0.7107295", "0.7076961", "0.70735484", "0.70390433", "0.7028994", "0.7028994", "0.7028994", "0.7028994", "0.7028994", "0.6972685", "0.6966502", "0.69458175", "0.69458175", "0.69458175", "0.69458175", "0.69458175", "0.69458175", "0.69458175", "0.69458175", "0.69458175", "0.69458175", "0.69458175", "0.69458175", "0.69458175", "0.6931115", "0.69237715", "0.6909754", "0.69002444", "0.6892469", "0.68740654", "0.6856824", "0.685447", "0.68367773", "0.6802268", "0.68009436", "0.68009436", "0.67941576", "0.67897063", "0.6765238", "0.6765238", "0.6765238", "0.6765238", "0.6765238", "0.6765238", "0.6765238", "0.6765238", "0.6765238", "0.6765238", "0.6765238", "0.67641693", "0.6762739", "0.675961", "0.675961", "0.6750375", "0.67492497", "0.6746904", "0.6740853", "0.67362094", "0.67285895", "0.6715751", "0.67131466", "0.67093956", "0.6703179", "0.669952", "0.66913503", "0.66737175", "0.6661388", "0.6659626", "0.66492915", "0.6629806", "0.66201687", "0.66113573", "0.66033775", "0.6597271", "0.6592685", "0.6592362", "0.65850896", "0.6575033", "0.6574869", "0.65715355", "0.6552081", "0.65469116", "0.654429", "0.6543424", "0.65411824", "0.65409356", "0.6515197", "0.6514655", "0.6514655", "0.6514655", "0.6514655" ]
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82678324", "0.8173564", "0.78118384", "0.7706353", "0.76816905", "0.7659159", "0.74858105", "0.7406485", "0.7298472", "0.7253435", "0.7196091", "0.7174443", "0.7016074", "0.6989523", "0.69837826", "0.69728553", "0.69640046", "0.69357765", "0.6897687", "0.689282", "0.68775725", "0.6868809", "0.68633306", "0.6839021", "0.6779905", "0.6705274", "0.6670987", "0.66623807", "0.6652613", "0.6643801", "0.6616729", "0.66143125", "0.65891534", "0.6449129", "0.64461046", "0.6429425", "0.6426337", "0.63015336", "0.6298573", "0.6294075", "0.62801653", "0.6259914", "0.62554234", "0.6167662", "0.61630553", "0.61601174", "0.6141946", "0.6137726", "0.6134302", "0.6133732", "0.61287725", "0.6110795", "0.60950965", "0.6089703", "0.60768735", "0.6066286", "0.60595477", "0.6055387", "0.60451794", "0.6028352", "0.60246956", "0.60228956", "0.6019088", "0.6012698", "0.6011448", "0.60113615", "0.60076576", "0.6004189", "0.5998927", "0.5997798", "0.5993557", "0.59863526", "0.59863526", "0.59863526", "0.59706056", "0.59546155", "0.59493065", "0.5940633", "0.59251904", "0.59143347", "0.5913916", "0.59121555", "0.59111917", "0.5909761", "0.59026676", "0.59009403", "0.5899209", "0.58973104", "0.58964044", "0.58933777", "0.5888429", "0.58760023", "0.5869122", "0.5863149", "0.58622074", "0.5849116", "0.5838678", "0.5831741", "0.5824525", "0.58167094", "0.58122987" ]
0.0
-1
Show the application dashboard.
public function index() { //recupero o id do usuario logado $id_user = Auth::user()->id; //select * from users where id= id_passado $user = User::find($id_user); //busco os dados pela chave estrangeira $contact = Contatos::where('id_user',$id_user)->get(); $address = Enderecos::where('id_user',$id_user)->get(); //dd($contact,$address); return view('home', compact('user','contact','address')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
fonction getIdTitulaire(num_complet_cpte) returns id_titulaire,id_cpte,num_complete_cpte t361
function getIdtitulaire($num_complete_cpte) { global $dbHandler,$global_id_agence; $db = $dbHandler->openConnection(); $sql = " SELECT id_cpte,id_titulaire,num_complet_cpte from ad_cpt where num_complet_cpte = '$num_complete_cpte' ; "; $result = $db->query($sql); if (DB::isError($result)) { $dbHandler->closeConnection(false); signalErreur(__FILE__,__LINE__,__FUNCTION__); // "DB: ".$result->getMessage() } $dbHandler->closeConnection(true); if ($result->numRows() == 0) return NULL; $tmpRow = $result->fetchrow(); return $tmpRow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function cargaIdUbicacion() {\n $dao = new PGDAO();\n $strSql = $this->COLECCIONMAPEOUBICA . $this->propiedad->getId_ubica();\n $arrayDatos = $this->leeDBArray($dao->execSql($strSql));\n $id = $arrayDatos[0]['zpubica'];\n return $id;\n }", "public static function ConsultarTemporalCid() {\r\n $db = new Conexion();\r\n\t\t$sql = $db->query(\"select MAX(idcompra) as id from compra;\");\r\n\t\t$dato3 = $db->recorrer($sql);\r\n return $dato3[0];\r\n }", "function getId_situacion()\n {\n if (!isset($this->iid_situacion) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_situacion;\n }", "function getId_situacion()\n {\n if (!isset($this->iid_situacion) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_situacion;\n }", "public function getMvtsCpteClientParNumero($id_cpte, $numero){\n\n global $global_remote_id_agence;\n $sql = \"SELECT \tA.id_his,A.infos,A.type_fonction,A.date,b.libel_ecriture,T .traduction AS libel_operation, b.type_operation, b.info_ecriture, C.sens, C.montant\n FROM\tad_his A INNER JOIN ad_ecriture b USING (id_ag, id_his) INNER JOIN ad_mouvement C USING (id_ag, id_ecriture)\n INNER JOIN ad_traductions T ON T .id_str = b.libel_ecriture\n INNER JOIN ad_agc ag on ag.id_ag = a.id_ag and ag.langue_systeme_dft = T.langue \";\n $sql .= \"WHERE (a.id_ag = $global_remote_id_agence) AND c.cpte_interne_cli = $id_cpte \";\n\n $sql .= \" ORDER BY b.id_ecriture DESC LIMIT $numero\";\n\n $result = $this->getDbConn()-> prepareFetchAll ($sql);\n\n if ($result === FALSE || count($result) == 0) {\n return new ErrorObj(ERR_DB_SQL, $result);\n }\n\n return $result;\n }", "public function getUltimoId() { \n return $this->ultimoId;\n }", "function getId_situacion(): int\n {\n if (!isset($this->iid_situacion) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_situacion;\n }", "public function ultimoID()\n {\n $sentencia = \"SELECT id, clNumReporte FROM tsreportebocadetubo ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n\n return $registros;\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "function getDatosId_situacion()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_situacion'));\n $oDatosCampo->setEtiqueta(_(\"id_situacion\"));\n return $oDatosCampo;\n }", "function getDatosId_situacion()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_situacion'));\n $oDatosCampo->setEtiqueta(_(\"id_situacion\"));\n return $oDatosCampo;\n }", "public function id_tarjeta();", "function getId_carrera(){\n\t\treturn $this->id_carrera;\n\t}", "public function buscarID()\n {\n $sentencia = \"SELECT id, cl FROM tsreportebocadetubo ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n foreach ($registros as $r) {\n $id = $r->id;\n }\n return $id;\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "public function getIdcotizacion(){\n return $this->idcotizacion;\n }", "public function getIdCompra()\r\n {\r\n return $this->idCompra;\r\n }", "public function getIdOrdenCompra() {\n return $this->id_orden_compra;\n }", "public function getIdMotCle()\n {\n return $this->idMotCle;\n }", "function generarNumOC(){\n\t\t$this->procedimiento='adq.f_cotizacion_ime';\n\t\t$this->transaccion='ADQ_GENOCDE_IME';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getCod_entidad_tuicion()\n {\n return $this->cod_entidad_tuicion;\n }", "public function getIdPartita() {\n \tif (isset($_REQUEST['id_partita'])) {\n \t\treturn $_REQUEST['id_partita'];\n \t} else\n \t\treturn false;\n }", "function getLoteIdGenerado($prov_id, $arti_id, $depo_id, $cod_lote){\n\n\t\t$empr_id = empresa();\n\t\t$url = AJST.'/services/asp/ALMDataService/lote/id/prov_id/'.$prov_id.'/arti_id/'.$arti_id.'/depo_id/'.$depo_id.'/empr_id/'.$empr_id.'/cod_lote/'.$cod_lote;\n\t\t$aux = $this->rest->callAPI(\"GET\",$url);\n\t\t$aux =json_decode($aux[\"data\"]);\n\t\treturn $aux->lote->lote_id;\n\t}", "public function getIdre()\n {\n return $this->idre;\n }", "function getTitulos() {\n //arreglo para remplazar los titulos de las columnas \n $titulos_campos['dep_id'] = COD_DEPARTAMENTO;\n $titulos_campos['dep_nombre'] = NOMBRE_DEPARTAMENTO;\n\n $titulos_campos['der_id'] = COD_DEPARTAMENTO_REGION;\n $titulos_campos['der_nombre'] = NOMBRE_DEPARTAMENTO_REGION;\n\n $titulos_campos['mun_id'] = COD_MUNICIPIO;\n $titulos_campos['mun_nombre'] = NOMBRE_MUNICIPIO;\n $titulos_campos['mun_poblacion'] = POB_MUNICIPIO;\n\n $titulos_campos['ope_id'] = OPERADOR;\n $titulos_campos['ope_nombre'] = OPERADOR_NOMBRE;\n $titulos_campos['ope_sigla'] = OPERADOR_SIGLA;\n $titulos_campos['ope_contrato_no'] = OPERADOR_CONTRATO_NRO;\n $titulos_campos['ope_contrato_valor'] = OPERADOR_CONTRATO_VALOR;\n\n $titulos_campos['Id_Ciudad'] = TITULO_CIUDAD;\n $titulos_campos['Id_Pais'] = NOMBRE_PAIS;\n $titulos_campos['Nombre_Ciudad'] = NOMBRE_CIUDAD;\n\n $titulos_campos['Nombre_Pais'] = NOMBRE_PAIS;\n\n $titulos_campos['Id_Familia'] = TITULO_FAMILIAS;\n $titulos_campos['Descripcion_Familia'] = DESCRIPCION_FAMILIA;\n\n $titulos_campos['Id_Moneda'] = TITULO_MONEDA;\n $titulos_campos['Descripcion_Moneda'] = DESCRIPCION_MONEDA;\n\n $titulos_campos['cfi_numero'] = CUENTA_NUMERO;\n $titulos_campos['cfi_nombre'] = CUENTA_NOMBRE;\n\n $titulos_campos['cft_id'] = CUENTA_TIPO;\n $titulos_campos['cft_nombre'] = CUENTA_TIPO;\n\n $titulos_campos['mov_descripcion'] = MOVIMIENTO_DESCRIPCION;\n $titulos_campos['mov_tipo'] = MOVIMIENTO_TIPO;\n\n $titulos_campos['idCentroPoblado'] = TITULO_CENTRO_POBLADO;\n $titulos_campos['codigoDane'] = CODIGO_DANE_CENTRO_POBLADO;\n $titulos_campos['nombre'] = NOMBRE_CENTRO_POBLADO;\n $titulos_campos['mun_id'] = MUNICIPIO_CENTRO_POBLADO;\n\n $titulos_campos['enc_tipo_nombre'] = TIPO_INSTRUMENTO;\n $titulos_campos['enc_tipo_desc'] = DESCRIPCION_ACTIVIDAD;\n\n $titulos_campos['Descripcion_Tipo'] = \"Plan\";\n \n $titulos_campos['descripcionTipoHallazgo'] = DESCRIPCION_TIPO_HALLAZGO;\n $titulos_campos['descripcion'] = AREA_TIPO_HALLAZGO;\n\n return $titulos_campos;\n }", "public function getIdContratoFinanceiroNota()\n {\n return $this->id_contrato_financeiro_nota;\n }", "function getSolicitud_id ($id_solicitud) {\n $db = new MySQL();\n $sql = \"SELECT \n t01.id as id_solicitud,\n date_format(t01.fecha_solicitud,'%d-%m-%Y') fecha_solicitud, \n t01.id_paciente, \n t01.id_medico,\n t03.nombre as medico,\n t01.id_lugarentrega,\n t01.id_servicio,\n concat(t02.nombres,' ', t02.apellidos) paciente,\n t02.edad,\n t02.id_sexo,\n t02.id_empresa,\n t04.nombre as empresa,\n t01.sumas,\n t01.descuento,\n t01.venta_total\n FROM lab_solicitud t01\n LEFT JOIN mnt_paciente t02 ON t02.id = t01.id_paciente\n LEFT JOIN ctl_medico t03 ON t03.id = t01.id_medico\n LEFT JOIN ctl_empresa t04 ON t04.id = t01.id_empresa\n WHERE t01.id=$id_solicitud\";\n return $db->fetch_array($db->consulta($sql));\n }", "function getDatosId_preceptor()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_preceptor'));\n $oDatosCampo->setEtiqueta(_(\"id_preceptor\"));\n return $oDatosCampo;\n }", "public function getId_carte_bleu()\n {\n return $this->id_carte_bleu;\n }", "function obtenirIdEtablissementsOffrantChambres ($connexion) {\r\n\r\n $req = \"SELECT DISTINCT id FROM Etablissement e \r\n INNER JOIN Offre o ON e.id = o.idEtab \r\n ORDER BY id\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> execute ();\r\n return $stmt;\r\n\r\n }", "public function getId_cuisinier() {\r\n\t\treturn $this->id_cuisinier;\r\n\t}", "static public function get_id_partida($id_ronda){\n\n $query = \"SELECT par_ron.id_partida AS 'id_partida' FROM partida_ronda_usupreg AS par_ron WHERE par_ron.id_partida_ronda_usupreg = \".self::$conexion->safeText(utf8_encode($id_ronda)).\" LIMIT 1\";\n\n $result = self::$conexion->query_db($query);\n\n if(!empty(isset($result[0])))\n return $result[0]['id_partida'];\n else\n return false;\n }", "static public function get_id_partida($id_ronda){\n\n $query = \"SELECT par_ron.id_partida AS 'id_partida' FROM partida_ronda_usupreg AS par_ron WHERE par_ron.id_partida_ronda_usupreg = \".self::$conexion->safeText(utf8_encode($id_ronda)).\" LIMIT 1\";\n\n $result = self::$conexion->query_db($query);\n\n if(!empty(isset($result[0])))\n return $result[0]['id_partida'];\n else\n return false;\n }", "public function obtenerUltimoCodigoTipoResiduo(){\n //Insertar provincia se invoca al metodo en datos\n $this->tipoResiduoAccesoDatos->conectar();\n $resultado = $this->tipoResiduoAccesoDatos->obtenerUltimoCodigoTipoResiduo();\n $this->tipoResiduoAccesoDatos->cerrarConexion();\n return $resultado;\n }", "function getId_asignatura()\n {\n if (!isset($this->iid_asignatura) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_asignatura;\n }", "function cuponyaobtenido($idreg,$idcupon,$link) {\n $obten=0;\n $consulta = \"select * from bdlt_participacion a inner join bdlt_codigos b on a.id_codigo=b.id where a.id_registro=\".$idreg.\" and b.id_cupon=\".$idcupon.\" LIMIT 1;\";\n if ($resultado = mysqli_query($link, $consulta)) {\n while ($fila = mysqli_fetch_row($resultado)) {\n $obten=1;\n }\n /* liberar el conjunto de resultados */\n mysqli_free_result($resultado);\n }\n return $obten;\n}", "function getId_tarifa()\n {\n if (!isset($this->iid_tarifa) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_tarifa;\n }", "public function cirugias_tatalCirugias(){ \t\n\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"Select count(idCirugia) as cantidadCirugias from tb_cirugias \";\n\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado['cantidadCirugias'];\t\t\t\n\t\t\t\n\t\t\t\n }", "public function getNumIdccEmployeur() {\n return $this->numIdccEmployeur;\n }", "function getDatosId_activ()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_activ'));\n $oDatosCampo->setEtiqueta(_(\"id_activ\"));\n return $oDatosCampo;\n }", "function get_entrada_lote_id($id,$auth){\n\t\tif($auth==0){\n\t\t\t$validacion=\"and prf.usuario_validador_id=0 \";\n\t\t} else {\n\t\t\t$validacion=\" and prf.usuario_validador_id>0 \";\n\t\t}\n\t\t\t\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct on (e.pr_facturas_id) e.pr_facturas_id, e.id as id1, date(e.fecha) fecha, ( prf.monto_total - prf.descuento ) as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatuse, e.lote_id, cel.tag as estatus_traspaso \".\n\t\t\t\t\"from entradas as e \".\n\t\t\t\t\"left join cproveedores as pr on pr.id=e.cproveedores_id \".\n\t\t\t\t\"left join pr_facturas as prf on prf.id=e.pr_facturas_id \".\n\t\t\t\t\"left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id \".\n\t\t\t\t\"left join estatus_general as eg on eg.id=e.estatus_general_id \".\n\t\t\t\t\"left join lotes_pr_facturas as lf on lf.pr_factura_id=prf.id \".\n\t\t\t\t\"left join cestatus_lotes as cel on cel.id=lf.cestatus_lote_id \".\n\t\t\t\t\"where e.estatus_general_id=1 and ctipo_entrada=1 and lf.lote_id='$id' $validacion\".\n\t\t\t\t\"group by e.pr_facturas_id, e.id, e.fecha, importe_factura, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id,e.lote_id, prf.descuento, cel.tag \".\n\t\t\t\t\"order by e.pr_facturas_id desc,e.fecha desc \";\n\t\t$u->query($sql);\n\t\tif($u->c_rows > 0){\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function getTitulos() {\r\n //arreglo para remplazar los titulos de las columnas\r\n $titulos_campos['ivg_id'] = INVENTARIO_GRUPO;\r\n $tirulos_campos['ivg_nombre'] = INVENTARIO_GRUPO;\r\n\r\n $titulos_campos['ine_id'] = INVENTARIO_EQUIPO;\r\n $titulos_campos['ine_nombre'] = INVENTARIO_NOMBRE_EQUIPO;\r\n $titulos_campos['ine_reposicion'] = INVENTARIO_EQUIPO_REPOSICION;\r\n\r\n $titulos_campos['ies_id'] = INVENTARIO_ESTADO;\r\n $titulos_campos['ies_nombre'] = INVENTARIO_NOMBRE_ESTADO;\r\n\r\n $titulos_campos['inm_id'] = INVENTARIO_MARCA;\r\n $titulos_campos['inm_nombre'] = INVENTARIO_MARCA;\r\n\r\n $tirulos_campos['obc_id'] = OBLIGACION_CLAUSULA;\r\n $tirulos_campos['obc_nombre'] = OBLIGACION_CLAUSULA;\r\n\r\n $tirulos_campos['oco_id'] = OBLIGACION_COMPONENTE;\r\n $tirulos_campos['oco_nombre'] = OBLIGACION_COMPONENTE;\r\n\r\n $titulos_campos['dti_id'] = DOCUMENTO_TIPO;\r\n\t $titulos_campos['dti_nombre'] = DOCUMENTO_TIPO;\r\n \t\t$titulos_campos['dti_estado'] = DOCUMENTO_ESTADO_CONTROL;\r\n \t\t$titulos_campos['dti_responsable'] = DOCUMENTO_RESPONSABLE_CONTROL;\r\n\r\n \t\t$titulos_campos['dot_id'] = DOCUMENTO_TEMA;\r\n \t\t$titulos_campos['dot_nombre'] = DOCUMENTO_TEMA;\r\n\r\n \t\t$titulos_campos['dos_id'] = DOCUMENTO_SUBTEMA;\r\n \t\t$titulos_campos['dos_nombre'] = DOCUMENTO_SUBTEMA;\r\n\r\n \t\t$titulos_campos['doa_id'] = DOCUMENTO_RESPONSABLE;\r\n \t\t$titulos_campos['doa_nombre'] = DOCUMENTO_RESPONSABLE;\r\n \t\t$titulos_campos['doa_sigla'] = DOCUMENTO_SIGLA;\r\n\r\n \t\t$titulos_campos['tib_nombre'] = DOCUMENTO_BUSQUEDA;\r\n\r\n \t\t$titulos_campos['doe_nombre'] = DOCUMENTO_ESTADOS;\r\n \t\t$titulos_campos['der_nombre'] = DOCUMENTO_ESTADO_RESPUESTA;\r\n \t\t$titulos_campos['see_nombre'] = SEGUIMIENTO_ESTADOS;\r\n \t\t$titulos_campos['ces_nombre'] = COMPROMISO_ESTADOS;\r\n\r\n \t\t$titulos_campos['dta_id'] = DOCUMENTO_TIPO_ACTOR;\r\n \t\t$titulos_campos['dta_nombre'] = DOCUMENTO_TIPO_ACTOR;\r\n\r\n \t\t$titulos_campos['rpr_nombre'] = PROBABILIDAD;\r\n \t\t$titulos_campos['rpr_valor'] = PROBABILIDAD_VALOR;\r\n\r\n \t\t$titulos_campos['rca_nombre'] = CATEGORIA;\r\n \t\t$titulos_campos['rca_minimo'] = CATEGORIA_MINIMO;\r\n \t\t$titulos_campos['rca_maximo'] = CATEGORIA_MAXIMO;\r\n\r\n \t\t$titulos_campos['rim_nombre'] = IMPACTO;\r\n \t\t$titulos_campos['rim_valor'] = IMPACTO_VALOR;\r\n\r\n \t\t$titulos_campos['rer_id'] = COD_ROL;\r\n \t\t$titulos_campos['rer_nombre'] = COD_ROL;\r\n\r\n\t $titulos_campos['dep_id'] = COD_DEPARTAMENTO;\r\n\t $titulos_campos['dep_nombre'] = NOMBRE_DEPARTAMENTO;\r\n\r\n\t $titulos_campos['dpr_id'] = COD_DEPARTAMENTO_REGION;\r\n\t $titulos_campos['dpr_nombre'] = NOMBRE_DEPARTAMENTO_REGION;\r\n\r\n \t\t$titulos_campos['mun_id'] = COD_MUNICIPIO;\r\n \t\t$titulos_campos['mun_nombre'] = NOMBRE_MUNICIPIO;\r\n \t\t$titulos_campos['mun_poblacion'] = POB_MUNICIPIO;\r\n\r\n $titulos_campos['tia_nombre'] = TIPO_ACTOR;\r\n\r\n $titulos_campos['ope_id'] = OPERADOR;\r\n $titulos_campos['ope_nombre'] = OPERADOR_NOMBRE;\r\n $titulos_campos['ope_sigla'] = OPERADOR_SIGLA;\r\n \t\t$titulos_campos['ope_contrato_no'] = OPERADOR_CONTRATO_NRO;\r\n \t\t$titulos_campos['ope_contrato_valor'] = OPERADOR_CONTRATO_VALOR;\r\n\r\n return $titulos_campos;\r\n }", "function obtenirNbEtabOffrantChambres ($connexion) {\r\n\r\n $req = \"SELECT COUNT(DISTINCT idEtab) FROM Offre\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> execute ();\r\n return $stmt -> fetchColumn ();\r\n\r\n }", "public function getIdLieuTravail() {\n return $this->idLieuTravail;\n }", "public function getIdEdificio()\n {\n return $this->c_id_edificio;\n }", "function get_entrada_pr_pedido_id($id){\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct on (e.pr_facturas_id) e.pr_facturas_id, e.id as id1, date(e.fecha) fecha, prf.monto_total as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatuse, e.lote_id, cel.tag as estatus_traspaso \".\n\t\t\t\t\"from entradas as e \".\n\t\t\t\t\"left join cproveedores as pr on pr.id=e.cproveedores_id \".\n\t\t\t\t\"left join pr_facturas as prf on prf.id=e.pr_facturas_id \".\n\t\t\t\t\"left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id \".\n\t\t\t\t\"left join estatus_general as eg on eg.id=e.estatus_general_id \".\n\t\t\t\t\"left join lotes_pr_facturas as lf on lf.pr_factura_id=prf.id \".\n\t\t\t\t\"left join cestatus_lotes as cel on cel.id=lf.cestatus_lote_id \".\n\t\t\t\t\"where e.estatus_general_id=1 and ctipo_entrada=1 and prf.pr_pedido_id='$id'\".\n\t\t\t\t\"group by e.pr_facturas_id, e.id, e.fecha, importe_factura, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id,e.lote_id, cel.tag \".\n\t\t\t\t\"order by e.pr_facturas_id desc,e.fecha desc\";\n\t\t$u->query($sql);\n\t\tif($u->c_rows > 0){\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function verRespuestaDetallePersonal($idEstudiante, $idPregunta) {\n global $ruta, $db;\n $query_buscarespuesta = \"SELECT EstudianteDetallesPersonalesId \n FROM EstudianteDetallesPersonales \n WHERE idestudiantegeneral='\" . $idEstudiante . \"' AND idobs_admitidos_contexto='\" . $idPregunta . \"'\";\n\n $respuestaestu = $db->Execute($query_buscarespuesta);\n $totalRows = $respuestaestu->RecordCount();\n\n if ($totalRows == 0) {\n return \"null\";\n } else {\n $rowrespuesta = $respuestaestu->FetchRow();\n return $rowrespuesta[\"EstudianteDetallesPersonalesId\"];\n }\n }", "public function getdernierid(){ \n $req=\"SELECT id FROM contrat WHERE id = (SELECT MAX(id) FROM contrat)\";\n //print_r($req);\n $resultat = $this->pdo->query($req);\n $ligne = $resultat->fetch();\n $donnees = $ligne['id'];\n return intval($donnees);\n }", "private function _vtc_get_tran_id($result)\n\t{\n\t if(!isset($result['data'])) return false;\n\t $data = $result[\"data\"];\n\t $string = explode('|',$data);\n\t $tran_id = isset($string[0]) ? $string[0] : 0;\n\t return $tran_id;\n\t}", "function get_id_periodo ($cuatrimestre, $anio_lectivo){\n $sql=\"SELECT t_p.id_periodo\n FROM periodo t_p \n JOIN cuatrimestre t_c ON (t_p.id_periodo=t_c.id_periodo)\n WHERE t_c.numero=$cuatrimestre AND t_p.anio_lectivo=$anio_lectivo \";\n \n $periodo=toba::db('gestion_aulas')->consultar($sql);\n \n return ($periodo[0]);\n }", "function get_control_salida_extra_id_sucursal_new($id_sucursal=''){\n\t\n\t\t$sQuery=\"SELECT * FROM control_salida_extra WHERE 1 = 1\";\n\t\tif($id_sucursal) {\t$sQuery.=\" AND id_sucursal = '$id_sucursal' \";\t}\n\t\t$sQuery.=\" ORDER BY id_por_sucursal_new DESC \";\n\t\t$result=mssql_query($sQuery) or die(mssql_min_error_severity());\n\t\t$i=0;\n\t\twhile($row=mssql_fetch_array($result)){\n\t\t\tforeach($row as $key=>$value){\n\t\t\t\t$res_array[$i][$key]=$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\tif($res_array[0]['id_por_sucursal_new'])\t\n\t\t{\t\n\t\t\t$new_id_por_sucursal_new=$res_array[0]['id_por_sucursal_new'];\n\t\t\t$new_id_por_sucursal_new++;\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\n\t\t\t$new_id_por_sucursal_new=1;\n\t\t}\n\t\t\n\t\treturn($new_id_por_sucursal_new);\n\t\t\t\n\t}", "public function idinformacion(){\n\t\treturn $this->_idinformacion;\n\t}", "function getDatosId_asignatura()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_asignatura'));\n $oDatosCampo->setEtiqueta(_(\"id_asignatura\"));\n return $oDatosCampo;\n }", "public function getCod_entidad_relacionada()\n {\n return $this->cod_entidad_relacionada;\n }", "public function idDefinitivo($tipo,$id){\n $iddef=0;\n $objA=new admonDAO(); //direcionador =1 mandar a admon\n $objM=new medicoDAO(); //direcionar=2 mandar a medico\n $objP=new pacienteDAO(); //direccionar=3 mandar a paciente\n $resul1=$objA->readOneById($id); //error en datos\n $resul2=$objM->readOneById($id);\n $resul3=$objP->readOneById($id);\n \n if($tipo==1){\n for($i=0;$i<count($resul1);$i++){\n $iddef=$resul1[$i]['id_admon'];\n }\n }\n if($tipo==2){\n for($i=0;$i<count($resul2);$i++){\n $iddef=$resul2[$i]['id_medico'];\n }\n }\n if($tipo==3){\n for($i=0;$i<count($resul3);$i++){\n $iddef=$resul3[$i]['id_paciente'];\n }\n }\n \n return $iddef;\n }", "public function getidinscripcion()\n {\n return $this->idinscripcion;\n }", "public function getIdFamilleproduit()\n {\n return $this->Id_familleproduit;\n }", "public function getIdComentario()\n {\n return $this->id_comentario;\n }", "public function getIdTanah()\n {\n return $this->id_tanah;\n }", "public function generarCodigoTipoUsuario() {\n $pdo = Database::connect();\n $sql = \"select max(ID_TIPO_USU) as cod from INV_TAB_TIPO_USUARIO\";\n $consulta = $pdo->prepare($sql);\n $consulta->execute();\n $res = $consulta->fetch(PDO::FETCH_ASSOC);\n $nuevoCod = '';\n if ($res['cod'] == NULL) {\n $nuevoCod = 'TUSU-0001';\n } else { \n $rest= ((substr($res['cod'], -4))+1).''; // Separacion de la parte numerica TUSU-0023 --> 23\n // Ciclo que completa el codigo segun lo retornado para completar los 9 caracteres \n // TUSU-00 --> 67, TUSU-0 --> 786\n if($rest >1 && $rest <=9){\n $nuevoCod = 'TUSU-000'.$rest;\n }else{\n if($rest >=10 && $rest <=99){\n $nuevoCod = 'TUSU-00'.$rest;\n }else{\n if($rest >=100 && $rest <=999){\n $nuevoCod = 'TUSU-0'.$rest;\n }else{\n $nuevoCod = 'TUSU-'.$rest; \n } \n } \n }\n }\n Database::disconnect();\n return $nuevoCod; // RETORNO DEL NUEVO CODIGO DE TIPO USUARIO\n }", "function getId_asignatura(): int\n {\n if (!isset($this->iid_asignatura) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_asignatura;\n }", "public function getIdfa();", "public function idPenjualan()\n {\n $get_id = $this->penjualan->get_idmax();\n\n return $get_id; //TRX00001\n }", "function getDatosId_preceptor()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_preceptor'));\n $oDatosCampo->setEtiqueta(_(\"nombre preceptor\"));\n return $oDatosCampo;\n }", "function getCarteCommisssion()\n {\n $query_rq_service = \"SELECT numero_carte FROM carte_parametrable WHERE idcarte=1\";\n $service = $this->getConnexion()->prepare($query_rq_service);\n $service->execute();\n $row_rq_service= $service->fetchObject();\n return $row_rq_service->numero_carte;\n }", "function comprobanteEstaRepetido($cuie, $periodo, $prestacionid, $idprestacion, $idrecepcion, $datosnomenclador, $elcomprobante, $fechaprestacion, $beneficiario, $idfactura, $idvacuna) {\r\n // repitiendo el id de prestacion interno, cosa que no sucede casi nunca\r\n $query = \"SELECT fc.cuie as cuie, ff.recepcion_id AS idrecepcion, id_debito,fp.id_prestacion\r\n FROM facturacion.factura ff \r\n INNER JOIN facturacion.comprobante fc ON (ff.id_factura = fc.id_factura) \r\n INNER JOIN facturacion.prestacion fp ON (fc.id_comprobante = fp.id_comprobante) \r\n LEFT JOIN facturacion.debito d ON (fc.id_comprobante=d.id_comprobante)\r\n WHERE fc.cuie='$cuie' \r\n AND ff.periodo='$periodo' \r\n AND fc.idprestacion='$prestacionid'\r\n AND fp.id_prestacion<>$idprestacion\";\r\n $resultado = sql($query, \"Error al buscar comprobante repetido\", 0) or excepcion(\"Error al buscar comprobante repetido\");\r\n $ctrl_repetido['debito'] = false;\r\n $yadebitado = $resultado->fields['id_debito'];\r\n $recibidodespues = $resultado->fields['id_prestacion'] < $prestacionid;\r\n if (($resultado->RecordCount() > 0) && !($yadebitado) && $recibidodespues) {\r\n //$var['existe_id'] = 'si';\r\n $idrecepcion_idb = $resultado->fields['idrecepcion'];\r\n if ($idrecepcion_idb != $idrecepcion) {\r\n $ctrl_repetido['msj_error'] = 'ID Prestacion ya existente en el sistema';\r\n $ctrl_repetido['id_error'] = 73;\r\n }\r\n if ($idrecepcion_idb == $idrecepcion) {\r\n $ctrl_repetido['msj_error'] = 'ID Prestacion ya existente en el archivo';\r\n $ctrl_repetido['id_error'] = 74;\r\n }\r\n $ctrl_repetido['debito'] = true;\r\n } else {\r\n if (esNomencladorVacuna($datosnomenclador)) {\r\n\r\n //Controles para los nomencladores que son vacuna\r\n $query = \"SELECT fc.id_comprobante, nro_exp\r\n FROM facturacion.prestacion fp\r\n INNER JOIN facturacion.comprobante fc ON (fc.id_comprobante = fp.id_comprobante)\r\n INNER JOIN facturacion.factura f ON (fc.id_factura=f.id_factura)\r\n WHERE id_prestacion<>$idprestacion\r\n\t\tAND fc.fecha_comprobante=to_date('$fechaprestacion','DD-MM-YYYY')\r\n AND fp.id_nomenclador='\" . $datosnomenclador[0] . \"'\r\n\t\tAND fc.clavebeneficiario='$beneficiario'\r\n AND fc.id_comprobante<>'$elcomprobante'\r\n AND fc.idvacuna='$idvacuna'\r\n\t\tAND fc.id_comprobante NOT IN(\r\n SELECT id_comprobante \r\n FROM facturacion.debito \r\n WHERE id_factura='$idfactura')\";\r\n $resultado = sql($query, \"Error al buscar comprobante repetido\", 0) or excepcion(\"Error al buscar comprobante repetido\");\r\n $recibidodespues = $resultado->fields['id_comprobante'] < $idcomprobante;\r\n if (($resultado->RecordCount() > 0) && ($recibidodespues)) {\r\n $ctrl_repetido['msj_error'] = 'Prestacion liquidada en Expediente: ' . $resultado->fields['nro_exp'];\r\n $ctrl_repetido['id_error'] = 74;\r\n $ctrl_repetido['debito'] = true;\r\n }\r\n } else {\r\n\r\n //Controles para los nomencladores que no son de vacu\r\n $query = \"SELECT fc.id_comprobante, nro_exp\r\n FROM facturacion.prestacion fp\r\n INNER JOIN facturacion.comprobante fc ON (fc.id_comprobante = fp.id_comprobante)\r\n INNER JOIN facturacion.factura f ON (fc.id_factura=f.id_factura)\r\n WHERE id_prestacion<>$idprestacion\r\n\t\tAND fc.fecha_comprobante=to_date('$fechaprestacion','DD-MM-YYYY')\r\n\t\tAND fp.id_nomenclador='\" . $datosnomenclador[0] . \"'\r\n\t\tAND fc.clavebeneficiario='$beneficiario'\r\n AND fc.id_comprobante<>'$elcomprobante'\r\n\t\tAND fc.id_comprobante NOT IN(\r\n SELECT id_comprobante \r\n FROM facturacion.debito \r\n WHERE id_factura='$idfactura')\";\r\n $resultado = sql($query, \"Error al buscar comprobante repetido\", 0) or excepcion(\"Error al buscar comprobante repetido\");\r\n $recibidodespues = $resultado->fields['id_comprobante'] < $idcomprobante;\r\n if (($resultado->RecordCount() > 0) && ($recibidodespues)) {\r\n $ctrl_repetido['msj_error'] = 'Prestacion liquidada en Expediente: ' . $resultado->fields['nro_exp'];\r\n $ctrl_repetido['id_error'] = 74;\r\n $ctrl_repetido['debito'] = true;\r\n }\r\n }\r\n }\r\n return $ctrl_repetido;\r\n}", "public function generar_codigo($basedatos,$cantidad) {\n\t\t\t$tabla = DB::table($basedatos)\n ->select(DB::raw('max(codigo) as codigo'))\n ->get();\n\n //conversion a string y suma uno para el siguiente id\n $idsuma = (int)$tabla[0]->codigo + 1;\n\n\t\t \t//concatenar con ceros\n\t\t \t$correlativocompleta = str_pad($idsuma, $cantidad, \"0\", STR_PAD_LEFT); \n\n\t \t\treturn $correlativocompleta;\n\n\t}", "public function getIdreferencia() {\n return $this->idreferencia;\n }", "public function getNominaEtau4($id,$idg)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then b.idCcos End as idCcos, \n case a.horasCal when 0 then 0 \n when 1 then (c.dias*'.$this->horasDias.') End as horas, 1, \n case when g.valor=2 then \n case when g.tipo = 1 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n End as dev, \n case when g.valor=2 then \n case when g.tipo = 2 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n\t\tEnd as ded, h.formula, c.dias, g.tipo , b.id as idEmp , g.idFor , a.diasLab, c.diasVac, a.vaca,\n case when ii.codigo is null then \"\" else ii.codigo end as nitTer \n from n_tip_auto_i a inner join a_empleados b on a.idTauto=b.idTau4 \n inner join n_nomina_e c on b.id=c.idEmp \n inner join n_nomina d on d.id=c.idNom\n inner join n_tip_auto_tn e on e.idTnom=d.idTnom \n inner join n_tip_calendario f on f.id=d.idCal\n inner join n_conceptos g on g.id=a.idCon\n inner join n_formulas h on h.id=g.idFor\n left join n_terceros_s i on i.id = g.idTer \n left join n_terceros ii on ii.id = i.idTer \n WHERE not exists (SELECT null from n_nomina_e_d \n where c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=1 ) \n and d.estado=0 and b.idGrup='.$idg.' and c.idNom='.$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "public function calcularId(){\n\n $registros = PorcentajeBecaArancel::All();\n\n $max_valor = count($registros);\n\n\n if($max_valor > 0){\n\n $max_valor++;\n\n } else {\n\n $max_valor = 1;\n }\n\n return $max_valor;\n\n }", "function emetteur_account_id() {\n global $account_type;\n foreach ($account_type as $key => $accounts) {\n foreach ($accounts as $key => $account) {\n if ($account == test_input($_POST[\"compte_emetteur\"])) {\n return $accounts[\"id\"];\n }\n }\n }\n }", "function formulaires_editer_encart_identifier_dist($id_encart='new', $retour='', $lier_trad=0, $config_fonc='', $row=array(), $hidden=''){\n\treturn serialize(array(intval($id_encart)));\n}", "public function getIdTarif()\n {\n return $this->idTarif;\n }", "public function getIdsucursal()\n {\n\n return $this->idsucursal;\n }", "function get_convocatoria_actual($tipo){\n $actual=date('Y-m-d');\n $anio_actual= date(\"Y\", strtotime($actual));\n switch ($tipo) {\n case 3:$id_tipo=1;//3 es reco\n break;\n default:$id_tipo=2;\n break;\n }\n $sql=\"select id_conv from convocatoria_proyectos \"\n //. \" where anio=$anio_actual and id_tipo=$id_tipo\";\n .\" where fec_inicio<='\".$actual.\"' and fec_fin >='\".$actual.\"'\"\n . \" and id_tipo=$id_tipo\";\n $resul=toba::db('designa')->consultar($sql);\n if(count($resul)>0){\n return $resul[0]['id_conv'];\n }else \n return null;\n }", "function buatID($tabel, $inisial){ \n $struktur = mysql_query(\"select * from $tabel\") or die(\"query tidak dapat dijalankan!\"); \n $field = mysql_field_name($struktur,0); \n $panjang = mysql_field_len($struktur,0); \n $row = mysql_num_rows($struktur); \n \n $panjanginisial = strlen($inisial); \n $awal = $panjanginisial + 1; \n $bnyk = $panjang-$panjanginisial; \n \n if ($row >= 1){ \n $query = mysql_query(\"select max(substring($field,$awal,$bnyk)) as max from $tabel\") or die(\"query tidak dapat dijalankan!\"); \n $hasil = mysql_fetch_assoc($query); \n $angka = intval($hasil['max']); \n } \n else{ \n $angka = 0; \n } \n \n $angka++; \n $tmp= \"\"; \n for ($i=0; $i < ($panjang-$panjanginisial-strlen($angka)) ; $i++){ \n $tmp = $tmp.\"0\"; \n } \n //return hasil generate ID \n return strval($inisial.$tmp.$angka); \n }", "function buatID($tabel, $inisial){ \n $struktur = mysql_query(\"select * from $tabel\") or die(\"query tidak dapat dijalankan!\"); \n $field = mysql_field_name($struktur,0); \n $panjang = mysql_field_len($struktur,0); \n $row = mysql_num_rows($struktur); \n \n $panjanginisial = strlen($inisial); \n $awal = $panjanginisial + 1; \n $bnyk = $panjang-$panjanginisial; \n \n if ($row >= 1){ \n $query = mysql_query(\"select max(substring($field,$awal,$bnyk)) as max from $tabel\") or die(\"query tidak dapat dijalankan!\"); \n $hasil = mysql_fetch_assoc($query); \n $angka = intval($hasil['max']); \n } \n else{ \n $angka = 0; \n } \n \n $angka++; \n $tmp= \"\"; \n for ($i=0; $i < ($panjang-$panjanginisial-strlen($angka)) ; $i++){ \n $tmp = $tmp.\"0\"; \n } \n //return hasil generate ID \n return strval($inisial.$tmp.$angka); \n }", "public function id_nilai_alternatif()\n {\n $q = $this->db->query(\"select MAX(RIGHT(id_nilai_alternatif,5)) as id_max from tbl_nilai_alternatif\");\n $id = \"\";\n if ($q->num_rows() > 0) {\n foreach ($q->result() as $k) {\n $tmp = ((int) $k->id_max) + 1;\n $id = sprintf(\"%05s\", $tmp);\n }\n } else {\n $id = \"00001\";\n }\n return \"NAL-\" . $id;\n }", "public function getIdunidadbase()\n {\n return $this->idunidadbase;\n }", "public function obttacce($id_biopsia){\n $stmt=$this->objPDO->prepare(\"SELECT num_tacos from sisanatom.detalle_bioce where id_biopsia=:id_biopsia\");\n $stmt->execute(array('id_biopsia'=>$id_biopsia));\n $tacospq=$stmt->fetchAll(PDO::FETCH_OBJ);\n return $tacospq[0]->num_tacos;\n }", "public function getId_produit()\n {\n return $this->id_produit;\n }", "public function getIdTipobeneficio()\n {\n return $this->id_tipobeneficio;\n }", "function getLastMvtCpt($id_cpte) {\n global $dbHandler, $global_id_agence;\n $db = $dbHandler->openConnection();\n $sql = \"SELECT MAX(date_comptable) FROM ad_mouvement m,ad_ecriture e WHERE e.id_ag = m.id_ag AND m.id_ag = $global_id_agence AND cpte_interne_cli='$id_cpte' AND m.id_ecriture=e.id_ecriture\";\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n }\n $dbHandler->closeConnection(true);\n $retour = $result->fetchrow();\n return $retour[0];\n}", "function add_traduccion_temp($id_palabra, $id_idioma, $traduccion,$explicacion,$pronunciacion,$id_colaborador,$estado) {\n\t\t$timestamp=time();\n\t\t$fecha=date(\"Y-m-d H:i:s\",$timestamp);\n\t\t$fecha_modificacion=date(\"Y-m-d H:i:s\",$timestamp);\n\t\t\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$ssql = \"INSERT INTO traducciones_temp (id_palabra, traduccion, explicacion,pronunciacion, id_idioma, id_colaborador, estado, fecha_alta, fecha_modificacion) \n\t\t\tVALUES ('$id_palabra', '$traduccion', '$explicacion', '$pronunciacion','$id_idioma', '$id_colaborador', '$estado', '$fecha', '$fecha')\";\n\t\t\t\n\t\t\t//lo inserto en la base de datos\n\t\t\tif (mysql_query($ssql,$connection)){\n\t\t\t\t//recibo el último id\n\t\t\t\t$ultimo_id = mysql_insert_id($connection);\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn $ultimo_id;\n\t\t\t}else{\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn false;\n\t\t\t} \t\t\n\t}", "public function getIdmontacargas()\n {\n\n return $this->idmontacargas;\n }", "function getSituationCoffr($id_ag, $date) {\n global $dbHandler, $global_id_agence, $global_multidevise;\n $db = $dbHandler->openConnection();\n\n $sql = \"SELECT m.devise, m.sens, m.montant, cpte_cpta_coffre from ad_agc a, ad_mouvement m \";\n if ($global_multidevise)\n \t$sql .= \" where m.compte = a.cpte_cpta_coffre||'.'||m.devise and date(m.date_valeur) = '$date' and m.id_ag = a.id_ag and a.id_ag = $id_ag \";\n else\n \t$sql .= \" where m.compte = a.cpte_cpta_coffre and date(m.date_valeur) = '$date' and m.id_ag = a.id_ag and a.id_ag = $id_ag \";\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n }\n $newSitCoff = array ();\n while ($tmprow = $result->fetchrow()){\n \t if ($global_multidevise)\n\t\t\t$compte = $tmprow[3].\".\".$tmprow[0];\n\t\telse\n\t\t\t$compte = $tmprow[3];\n if($tmprow[1] == 'c')\n \t$newSitCoff[$compte][\"montant_cred\"] += $tmprow[2];\n else\n \t$newSitCoff[$compte][\"montant_deb\"] += $tmprow[2];\n\t\t$newSitCoff[$compte][\"compte\"] = $compte;\n $newSitCoff[$compte][\"devise\"] = $tmprow[0];\n }\n\t foreach($newSitCoff as $key_compte => $value){\n\t\t//récupérer le solde du coffre-fort dans chaque devise à la date donnée\n\n\t\t//récupérer le montant inscrit au crédit depuis la date donnée à la date d'aujourd'hui\n\t\t$sql = \"SELECT sum(m.montant) from ad_mouvement m where sens= 'c' and compte = '$key_compte' and date(m.date_valeur) > '$date' and date(m.date_valeur) <= date(now())\";\n\t\t$result1 = $db->query($sql);\n\t if (DB :: isError($result1)) {\n\t $dbHandler->closeConnection(false);\n\t signalErreur(__FILE__, __LINE__, __FUNCTION__, $result1->getMessage());\n\t }\n\t $row = $result1->fetchrow();\n \t$mnt_credit = $row[0];\n \t//récupérer le montant inscrit au débit depuis la date donnée à la date d'aujourd'hui\n\t\t$sql = \"SELECT sum(m.montant) from ad_mouvement m where sens= 'd' and compte = '$key_compte' and date(m.date_valeur) > '$date' and date(m.date_valeur) <= date(now())\";\n\t\t$result1 = $db->query($sql);\n\t if (DB :: isError($result1)) {\n\t $dbHandler->closeConnection(false);\n\t signalErreur(__FILE__, __LINE__, __FUNCTION__, $result1->getMessage());\n\t }\n\t $row = $result1->fetchrow();\n \t$mnt_debit = $row[0];\n\n \t//récupérer le solde du compte\n\t\t$sql = \"SELECT solde from ad_cpt_comptable m where num_cpte_comptable= '$key_compte'\";\n\t\t$result1 = $db->query($sql);\n\t if (DB :: isError($result1)) {\n\t $dbHandler->closeConnection(false);\n\t signalErreur(__FILE__, __LINE__, __FUNCTION__, $result1->getMessage());\n\t }\n\t $row = $result1->fetchrow();\n \t$solde = (-1)*$row[0];\n\t\t$solde = $solde - $mnt_debit;\n\t\t$solde = $solde + $mnt_credit;\n $newSitCoff[$key_compte][\"solde\"] = $solde;\n }\n\t$dbHandler->closeConnection(true);\n return $newSitCoff;\n\n}", "public function getNominaEtau3($id,$idg)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then b.idCcos End as idCcos, \n case a.horasCal when 0 then 0 \n when 1 then (c.dias*'.$this->horasDias.') End as horas, 1, \n case when g.valor=2 then \n case when g.tipo = 1 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n End as dev, \n case when g.valor=2 then \n case when g.tipo = 2 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n\t\tEnd as ded, h.formula, c.dias, g.tipo , b.id as idEmp , g.idFor , a.diasLab, c.diasVac, a.vaca, \n case when ii.codigo is null then \"\" else ii.codigo end as nitTer \n from n_tip_auto_i a inner join a_empleados b on a.idTauto=b.idTau3\n inner join n_nomina_e c on b.id=c.idEmp \n inner join n_nomina d on d.id=c.idNom\n inner join n_tip_auto_tn e on e.idTnom=d.idTnom \n inner join n_tip_calendario f on f.id=d.idCal\n inner join n_conceptos g on g.id=a.idCon\n inner join n_formulas h on h.id=g.idFor\n left join n_terceros_s i on i.id = g.idTer \n left join n_terceros ii on ii.id = i.idTer \n WHERE not exists (SELECT null from n_nomina_e_d \n where c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=1 ) \n and d.estado=0 and b.idGrup='.$idg.' and c.idNom='.$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "public function get_reg_id($character, $id_type) {\n\n $fields = array(\"*\");\n $whereArr = array(\"id_type\" => $id_type);\n $id_number = $this->db_model->getData($fields, 'id_numbers_m_tbl', $whereArr);\n\n $int = intval(preg_replace('/[^0-9]+/', '', $id_number[0]->id_number), 10);\n $id = \"$character\" . ($int + 1);\n return $id;\n\n}", "public function punti_utilizzari($conto_id, $prodotto_id = 222) {\n $sql = \"\n SELECT\n `conti`.`conto_id`,\n `conti`.`hotel_id`,\n `conti`.`foglio_id`,\n `conti`.`in_conto`,\n `conti`.`in_conto_time`,\n `conti`.`out_preno`,\n `conti`.`out_conto`,\n `conti`.`preno_id`,\n `conti`.`camera_id`,\n `conti`.`numero_camera`,\n `conti`.`trattamento_sog`,\n `conti`.`tipo_camera`,\n `conti`.`tipologia_id`,\n `conti`.`prezzo`,\n `conti`.`nome_cliente`,\n `conti`.`cognome_cliente`,\n `conti`.`preno_agenzia`,\n `conti`.`mercato`,\n `conti`.`conti_stato_camere`,\n `adebiti`.`adebito_id`,\n `adebiti`.`prodotto_id`,\n `adebiti`.`descrizione`,\n `adebiti`.`prezzo`,\n `adebiti`.`quantita`,\n `refer_clienti`.`clienti_id`,\n `refer_clienti`.`hotel_id`,\n `refer_clienti`.`ps_valore`,\n `refer_clienti`.`ref_clinti_data_record`,\n `refer_clienti`.`refer_clienti_utente_id`\n FROM\n `conti`\n INNER JOIN .`adebiti`\n ON `conti`.`conto_id` = .`adebiti`.`conto_id`\n INNER JOIN .`refer_clienti`\n ON `conti`.`conto_id` = .`refer_clienti`.`conto_id`\n WHERE\n `refer_clienti`.`clienti_id` = $clienti_id\n AND `adebiti`.`prodotto_id` = '$prodotto_id'\n \";\n $query = $this->db->query($sql);\n $return = $query->result();\n return $return;\n }", "public function getLesIdFrais(){\r\n\t\t$req = \"select fraisforfait.id as idfrais from fraisforfait order by fraisforfait.id\";\r\n\t\t$res = PdoGsb::$monPdo->query($req);\r\n\t\t$lesLignes = $res->fetchAll();\r\n\t\treturn $lesLignes;\r\n\t}", "public function getIdentificacao();", "function beneficiaire_account_id() {\n global $account_type;\n foreach ($account_type as $key => $accounts) {\n foreach ($accounts as $key => $account) {\n if ($account == test_input($_POST[\"compte_beneficiaire\"])) {\n return $accounts[\"id\"];\n }\n }\n }\n }", "public function getIdpersona()\n {\n return $this->idpersona;\n }", "public function getNit_empresa(){\n return $this->nit_empresa;\n }", "public function citas_tatalCitas(){ \t\n\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"Select count(idAgendaCita) as cantidadCitas from tb_agendaCitas \";\n\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado['cantidadCitas'];\t\t\t\n\t\t\t\n\t\t\t\n }", "public function getNominaEtau($id,$idg)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then b.idCcos End as idCcos, \n case a.horasCal when 0 then 0 \n when 1 then (c.dias*'.$this->horasDias.') End as horas, 1, \n case when g.valor=2 then \n case when g.tipo = 1 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n End as dev, \n case when g.valor=2 then \n case when g.tipo = 2 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n\t\tEnd as ded, h.formula, c.dias, g.tipo\n , b.id as idEmp , g.idFor , a.diasLab, c.diasVac, a.vaca,\n case when ii.codigo is null then \"\" else ii.codigo end as nitTer \n from n_tip_auto_i a inner join a_empleados b on a.idTauto=b.idTau\n inner join n_nomina_e c on b.id=c.idEmp \n inner join n_nomina d on d.id=c.idNom\n inner join n_tip_auto_tn e on e.idTnom=d.idTnom \n inner join n_tip_calendario f on f.id=d.idCal\n inner join n_conceptos g on g.id=a.idCon \n inner join n_formulas h on h.id=g.idFor \n left join n_terceros_s i on i.id = g.idTer \n left join n_terceros ii on ii.id = i.idTer \n WHERE not exists (SELECT null from n_nomina_e_d \n where c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=1 ) \n and d.estado=0 and b.idGrup='.$idg.' and c.idNom='.$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "public function getidEstudiante()\n {\n return $this->id_est;\n }", "public function get_compte(){retrun($id_local_compte); }", "public function getNominaEtau2($id,$idg)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then b.idCcos End as idCcos, \n case a.horasCal when 0 then 0 \n when 1 then (c.dias*'.$this->horasDias.') End as horas, 1, \n case when g.valor=2 then \n case when g.tipo = 1 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n End as dev, \n case when g.valor=2 then \n case when g.tipo = 2 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n\t\tEnd as ded, h.formula, c.dias, g.tipo , b.id as idEmp , g.idFor , a.diasLab, c.diasVac, a.vaca, \n case when ii.codigo is null then \"\" else ii.codigo end as nitTer \n from n_tip_auto_i a inner join a_empleados b on a.idTauto=b.idTau2\n inner join n_nomina_e c on b.id=c.idEmp \n inner join n_nomina d on d.id=c.idNom\n inner join n_tip_auto_tn e on e.idTnom=d.idTnom \n inner join n_tip_calendario f on f.id=d.idCal\n inner join n_conceptos g on g.id=a.idCon\n inner join n_formulas h on h.id=g.idFor\n left join n_terceros_s i on i.id = g.idTer \n left join n_terceros ii on ii.id = i.idTer \n WHERE not exists (SELECT null from n_nomina_e_d \n where c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=1 ) \n and d.estado=0 and b.idGrup='.$idg.' and c.idNom='.$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "public function getIdNiche()\n {\n return $this->idNiche;\n }", "public static function mdlRecuperarIDVehiculo($tabla, $Matricula){\n $stmt = Conexion::conectar()->prepare(\"SELECT id_v FROM $tabla WHERE Matricula = '$Matricula'\");\n $stmt->execute();\n $respuesta = $stmt->fetch();\n //echo 'Respuesta: ',$respuesta[0];\n if ($respuesta!=null)\n return $respuesta[0];\n return null;\n // Array = {115}\n //Respuesta= 115\n }", "public function getIdUbicacion()\n {\n return $this->idUbicacion;\n }" ]
[ "0.63185626", "0.6189492", "0.6114586", "0.6114586", "0.61027193", "0.60682213", "0.6022981", "0.601698", "0.6016647", "0.6016647", "0.5983273", "0.5980345", "0.59797245", "0.59534144", "0.59474593", "0.59263945", "0.59200686", "0.5853078", "0.5848615", "0.5802443", "0.5786161", "0.5775896", "0.5760767", "0.57556915", "0.57482505", "0.57427424", "0.57345426", "0.57234824", "0.57161915", "0.5714869", "0.5714869", "0.5711663", "0.57094836", "0.57065713", "0.56920034", "0.5676978", "0.5673898", "0.5668912", "0.56677926", "0.5659205", "0.56337786", "0.563029", "0.56296563", "0.5619975", "0.5618458", "0.5606429", "0.5591162", "0.5584896", "0.55814314", "0.5574372", "0.55732065", "0.55682874", "0.5567839", "0.5567057", "0.5560427", "0.5558735", "0.5553637", "0.5549295", "0.55420506", "0.55354136", "0.55310374", "0.55257475", "0.55214065", "0.5517736", "0.5513123", "0.5511323", "0.5498269", "0.5496907", "0.549041", "0.548011", "0.5474785", "0.54737216", "0.5469618", "0.5467694", "0.5467694", "0.5464627", "0.54645807", "0.54628986", "0.54604644", "0.54593074", "0.54525673", "0.54522187", "0.5449441", "0.54489076", "0.54462856", "0.5445089", "0.544095", "0.54333335", "0.5432377", "0.5431673", "0.5429456", "0.54279065", "0.542236", "0.5419786", "0.5418692", "0.5418655", "0.5413557", "0.5406691", "0.5402716", "0.539812" ]
0.7821603
0
/ Cette PS bloque le compte $id_cpte
function blocageCompteInconditionnel ($id_cpte) { global $dbHandler,$global_id_agence; $db = $dbHandler->openConnection(); $sql = "SELECT etat_cpte FROM ad_cpt WHERE id_ag = $global_id_agence AND id_cpte = $id_cpte;"; $result=$db->query($sql); if (DB::isError($result)){ $dbHandler->closeConnection(false); signalErreur(__FILE__,__LINE__,__FUNCTION__); } $tmprow = $result->fetchrow(); $etat = $tmprow[0]; if ($etat == 2){ // Le compte est fermé $dbHandler->closeConnection(false); signalErreur(__FILE__,__LINE__,__FUNCTION__); // "Impossible de bloquer le compte $id_cpte qui est fermé" } //on change l'état du compte à  bloqué $sql = "UPDATE ad_cpt SET etat_cpte = 3 WHERE id_ag=$global_id_agence AND id_cpte = $id_cpte;"; $result=$db->query($sql); if (DB::isError($result)){ $dbHandler->closeConnection(false); signalErreur(__FILE__,__LINE__,__FUNCTION__); } $dbHandler->closeConnection(true); return new ErrorObj(NO_ERR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBlockForEdit($id)\n {\t\n \t$DB\t\t\t= Zend_Registry::get('front_db');\n\t\t$this->view->assign('form_action', '/skiner/block/edit/id/'.$id);\n\t\t//$sql\t= \"select * from `wbs_skin_block` where \".Application_Model_Pubcon::get(1000). \" and `id`='\".$id.\"'\";\n\t\t$sql\t= \"SELECT * FROM `wbs_skin_block` AS bc LEFT JOIN `wbs_skin_block_meta` AS bm ON `bm`.`bm_bc_id`=`bc`.`id` WHERE \"\n\t\t\t\t. Application_Model_Pubcon::get(1000). \" AND `bc`.`id`=\".addslashes($id);\n\t\t$result\t= $DB->fetchAll($sql);\n\t\tif (count($result)==1)\n\t\t{\n\t\t\t$this->view->assign('data', $this->arrayParams($result[0]) );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg[]= $this->translate->_('j');\n\t\t\t$this->_helper->FlashMessenger($msg);\n\t\t\t$this->_redirect('/skiner/block/frmlist#fragment-4');\n\t\t}\n\t\t\t\n }", "function iptsr_internal_deb($debata_id) {\n\t$rocnik = cpdb_fetch_one_value(\"select rocnik from debata left join soutez using (soutez_ID) where debata_ID = :debata_id\", array(\":debata_id\"=>$debata_id));\n\t\n\t$status = true;\n\tcpdb_transaction();\n\t\n\t// vycistit\n\t$status &= cpdb_exec(\"delete from clovek_debata_ibody where debata_ID = :debata_id\", array(\":debata_id\"=>$debata_id));\n\t\n\t// --- debateri\n\t// (podle poharovych bodu)\n\t$status &= cpdb_exec(\"insert into clovek_debata_ibody (clovek_ID, debata_ID, rocnik, role, ibody) select clovek_debata.clovek_ID, clovek_debata.debata_ID, :rocnik, 'debater', debata_tym.body * 0.1 from clovek_debata left join debata_tym on clovek_debata.debata_ID = debata_tym.debata_ID and substring(clovek_debata.role,1,1) = elt(debata_tym.pozice + 1,'n','a') where clovek_debata.debata_ID = :debata_id and find_in_set(clovek_debata.role,'a1,a2,a3,n1,n2,n3')\", array(\":debata_id\"=>$debata_id, \":rocnik\"=>$rocnik));\n\t\t\n\t// --- rozhodci\n\t$status &= cpdb_exec(\"insert into clovek_debata_ibody (clovek_ID, debata_ID, rocnik, role, ibody) select clovek_ID, debata_ID, :rocnik, 'rozhodci', 1 from clovek_debata where debata_ID = :debata_id and role = 'r'\", array(\":debata_id\"=>$debata_id, \":rocnik\"=>$rocnik));\n\t\n\t// --- treneri\n\t$treneri_dostanou = array();\n\t\n\tif (cpdb_fetch_all(\"select clovek_ID, ibody from clovek_debata_ibody where debata_ID = :debata_id and role = 'debater'\", array(\":debata_id\"=>$debata_id), $debateri)) {\n\t\tforeach ($debateri as $debater) {\n\t\t\t$pocet_treneru = cpdb_fetch_all(\"\n\t\t\t\tselect\n\t\t\t\t\tdk.clovek_ID as clovek_ID\n\t\t\t\tfrom\n\t\t\t\t\tclovek d, clovek_klub dk\n\t\t\t\twhere\n\t\t\t\t\td.clovek_ID = :clovek_ID\n\t\t\t\t\tand d.klub_ID = dk.klub_ID\n\t\t\t\t\tand dk.role = 't'\n\t\t\t\t\tand dk.rocnik = :rocnik\n\t\t\t\t\", array(\":clovek_ID\"=>$debater[\"clovek_ID\"], \":rocnik\"=>$rocnik), $treneri);\n\t\t\t\n\t\t\tforeach ($treneri as $trener) {\n\t\t\t\t$treneri_dostanou[$trener[\"clovek_ID\"]] += 0.1 * $debater[\"ibody\"] / $pocet_treneru;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tforeach ($treneri_dostanou as $trener_cid => $trener_ib) {\n\t\t$status &= cpdb_exec(\"insert into clovek_debata_ibody (clovek_ID, debata_ID, rocnik, role, ibody) values (:clovek_id, :debata_id, :rocnik, 'trener', :ibody)\", array(\":clovek_id\"=>$trener_cid, \":debata_id\"=>$debata_id, \":rocnik\"=>$rocnik, \":ibody\"=>$trener_ib));\n\t}\n\t\n\t// --- organizatori\n\t$dostanou = 0.15; // kolik IB je z debaty\n\t$zasluhy_primych = 1; // defaultni zasluhy u primych ogranizatoru\n\t$celkem_zasluhy = 0;\n\t$zasluhy = array();\n\t\n\t// primi\n\tcpdb_fetch_all(\n\t\t\"select clovek_ID from clovek_debata where clovek_debata.role = 'o' and debata_ID = :debata_id\", array(\":debata_id\"=>$debata_id), $res_primi);\n\t\n\tforeach ($res_primi as $org) {\n\t\t$celkem_zasluhy += $zasluhy_primych;\n\t\t$zasluhy[$org[\"clovek_ID\"]] += $zasluhy_primych;\n\t}\n\t\n\t// neprimi\n\tcpdb_fetch_all(\"\n\t\tselect\n\t\t\tclovek_turnaj.clovek_ID,\n\t\t\tclovek_turnaj.mocnost\n\t\tfrom\n\t\t\tdebata, clovek_turnaj\n\t\twhere\n\t\t\tdebata.debata_ID = :debata_id\n\t\t\tand clovek_turnaj.turnaj_ID = debata.turnaj_ID\n\t\t\tand clovek_turnaj.role = 'o'\n\t\", array(\":debata_id\"=>$debata_id), $res_neprimi);\n\t\n\tforeach($res_neprimi as $org) {\n\t\t$celkem_zasluhy += $org[\"mocnost\"];\n\t\t$zasluhy[$org[\"clovek_ID\"]] += $org[\"mocnost\"];\n\t}\n\t\n\tforeach($zasluhy as $org_cid => $org_zasluhy) {\n\t\t$status &= cpdb_exec(\n\t\t\t\"insert into clovek_debata_ibody (clovek_ID, debata_ID, rocnik, role, ibody) values (:clovek_id, :debata_id, :rocnik, 'organizator', :ibody)\",\n\t\t\tarray(\n\t\t\t\t\":clovek_id\" => $org_cid,\n\t\t\t\t\":debata_id\" => $debata_id,\n\t\t\t\t\":rocnik\" => $rocnik,\n\t\t\t\t\":ibody\" => $dostanou * $org_zasluhy / $celkem_zasluhy\n\t\t\t)\n\t\t);\n\t}\n\t\n\t// zaver\n\tif ($status) {\n\t\tcpdb_commit();\n\t} else {\n\t\tcpdb_rollback();\n\t}\n}", "public function getbateauCordonner($id)\r\n {\r\n $idbateau = $this->_bdd->query(\"SELECT gps.`id`, gps.id_bateau, gps.latitude, gps.longitude, bateau.nom FROM gps, bateau WHERE gps.id_bateau = bateau.id AND gps.id = '$id'\");\r\n $data = $idbateau->fetch();\r\n $this->_idBateau = $data[\"id\"];\r\n $this->_nomBateau = $data[\"nom\"];\r\n $this->_latitude = $data[\"latitude\"];\r\n $this->_longitude = $data[\"longitude\"];\r\n $this->_id = $data['id'];\r\n }", "public function bloquear($id)\n {\n $unidad = Propiedad::find($id);\n $unidad->editable = 0;\n $unidad->save();\n return redirect('unidad/'.$unidad->id_des.'/edit');\n\n\n }", "public function action_reportePlantelCE($id) {\n $this->renderPartial('_reportePlantelCE', array('model' => $this->loadModel($id)));\n }", "public function setIdcotizacion($idcotizacion){\n $this->idcotizacion = $idcotizacion;\n }", "function aff_comm_post($id_post) {\n\n\t\t$req = $GLOBALS['bdd']->prepare('SELECT b.*, d.*\n\t\t\t\t\t\t\t\tFROM badin b\n\t\t\t\t\t\t\t\tINNER JOIN dactyle d\n\t\t\t\t\t\t\t\tON b.bigarade = d.dazibao\n\t\t\t\t\t\t\t\tWHERE b.balsamine = ? \n\t\t\t\t\t\t\t\tAND b.bouquetin = 2\n\t\t\t\t\t\t\t\tORDER BY b.brimade DESC');\n\t\t$req->execute(array($_POST['post_id']));\n\t\t\t\t\t\t\t\t\t\n\t\twhile ($donnees = $req->fetch())\n\t\t{\n\t\t?>\n\t\t\t<div id=\"<?php echo $donnees['baliverne'];?>\" >\n\t\t\t\t<div class=\"zone_comment\" id=\"zone_comment\">\n\t\t\t\t\t<div class=\"mini_profil_comment\">\n\t\t\t\t\t\t<img class=\"mini_profil_img\" src=\"/ressources/images/profil/<?php echo $donnees['dazibao'];?>/profil_<?php echo $donnees['dessication'];?>\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"auteur_et_date_comment\" >\n\t\t\t\t\t\t<a class=\"lien_nom_comment\" href=\"/<?php echo $donnees['diatribe'].'/'.$donnees['decapode'].'-'.$donnees['dazibao'].'/';?>\">\n\t\t\t\t\t\t\t<?php echo $donnees['decapode'];?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<div class=\"date_post\" >\n\t\t\t\t\t\t\tLe <?php echo $donnees['brimade'];?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"contenu_comment\">\n\t\t\t\t\t\t<?php echo $donnees['bryophite']; ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t<?php\n\t\t}\n\t\t$req->closeCursor();\n\n\t}", "public function cloture()\n {\n // On prépare la modification pour enregistrer la fermeture de la mission\n $sql = 'UPDATE `mission`\n SET `mission_statut` = 0\n WHERE `mission_id` = :mission';\n $query = $this->_link->prepare($sql);\n $query->bindParam(':mission', $this->_data['mission_id'], PDO::PARAM_INT);\n\n // On effectue la modification\n $query->execute();\n }", "function Cuerpo($acceso,$desde,$hasta,$id_f)\n\t{\n\t\t\n\t\t$tipo=utf8_decode($tipo);\n\t\t$this->SetFont('Arial','B',9);\n\t\t\n\t\t$acceso1=conexion();\n\t\t\n\t\t\n\t\t//$acceso->objeto->ejecutarSql(\"SELECT *FROM parametros where id_param='2'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$por_iva=trim($row['valor_param']);\n\t\t}\n\t\t\n\t\t$this->SetDrawColor(0,0,0);\n\t\t$this->SetLineWidth(.2);\n\t\t$this->SetFillColor(249,249,249);\n\t\t$this->SetTextColor(0);\n\t\t\n\t$w=array(20,20,25);\t\n\t$col=5;\n\t$right=10;\n\t$alto=49;\t\n\t\t$this->SetX($right);\n\t\t\t\n\t\t$this->SetX($right);\n\t\t\t$this->SetFont('Arial','BIU',8);\n\t\t\t$this->Cell($right,6,strtoupper(_('ingresos cobrados por franquicia')),\"0\",0,\"L\");\n\t\t\t\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t\t$this->Ln(12);\n\t\t\t\t$this->SetX($right);\n\t\t\t\t$this->SetFont('Arial','B',7);\n\t\t\t\t$this->Cell($w[0],7,\"\",\"LRB\",0,\"L\");\n\t\t\t\t$der=15;\n\t\t\t\t$this->RotatedText($der, $alto, \"FECHA\", 25);\n\t\t\t\t$der=$der+$w[1];\n\t\t\t\t$dato=lectura($acceso,\"SELECT *FROM franquicia order by nombre_franq\");\n\t\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t\t$nombre_franq=trim($dato[$j][\"nombre_franq\"]);\n\t\t\t\t\t$this->RotatedText($der, $alto, $nombre_franq, 25);\n\t\t\t\t\t$der=$der+$w[1];\n\t\t\t\t\t$this->Cell($w[1],7,\"\",\"LRB\",0,\"C\");\n\t\t\t\t}\n\t\t\t\t$der=$der+5;\n\t\t\t\t$this->RotatedText($der, $alto, \"TOTAL\", 25);\n\t\t\t\t$this->Cell($w[2],7,\"\".\" \",\"LRB\",0,\"C\");\n\t\t\n\t\t\t$this->Ln(7);\n\t\t\n\t\t\t$sum_total=array();\n\t\t\t$sum_t=0;\n\twhile(comparaFecha($desde,$hasta)<=0){\n\t\t//ECHO \"SELECT sum(monto_pago) as monto FROM pagos where fecha_pago='$desde' \";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT monto_pago as monto FROM pagos where fecha_pago='$desde' and pagos.id_caja_cob<>'EA00000001' limit 1 \");\n\t\t$row=row($acceso);\n\t\t$monto=trim($row[\"monto\"])+0;\n\t\t$cant=trim($row[\"cant\"])+0;\n\t\t\n\t\t\n\t if($monto>0){\n\t\t$wi=0;\n\t\t$j=0;\n\t\t$suma=0;\n\t\t$suma_m=0;\n\t\t$this->SetX(10);\n\t\t//list($ano,$mes,$dia)=explode(\"-\",$desde);\n\t\t$fecha=$desde;\n\t\t$dia=formatofecha($desde);\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->Cell($w[$wi],$col,$dia,\"LR\",0,\"C\",$fill);\n\t\t$wi++;\n\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$sum_t=0;\n\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t$id_franq=trim($dato[$j][\"id_franq\"]);\n\t\t\t\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago FROM pagos ,caja_cobrador,caja where pagos.id_caja_cob=caja_cobrador.id_caja_cob and caja_cobrador.id_caja=caja.id_caja and fecha_pago='$fecha' and status_pago='PAGADO' and id_franq='$id_franq' and pagos.id_caja_cob<>'EA00000001' \");\n\t\t\t\t$row=row($acceso);\n\t\t\t\t$monto_pago=trim($row[\"monto_pago\"])+0;\n\t\t\t\t$sum_total[$j]+=$monto_pago;\n\t\t\t\t$sum_t+=$monto_pago;\n\t\t\t\t$this->Cell($w[$wi],$col,number_format($monto_pago+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t\t\n\t\t\t}\n\t\t\t\t$sum_total[$j]+=$sum_t;\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t$this->Cell($w[2],$col,number_format($sum_t+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t\t$fill=!$fill;\n\t\t\t\n\t\t$this->Ln();\n\t\t\t\n\t\t}//if monto\t\n\t\t$desde=sumadia($desde);\n\t\t\t\n\t}\n\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->Cell($w[0],7,\"TOTAL\",\"1\",0,\"R\",$fill);\n\t\t\t$sum_to=0;\n\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t$id_franq=trim($dato[$j][\"id_franq\"]);\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t//$sum_to+=$sum_total[$j];\n\t\t\t\t$this->Cell($w[1],7,number_format($sum_total[$j]+0, 2, ',', '.'),\"1\",0,\"R\",$fill);\n\t\t\t\t\n\t\t\t}\n\t\t\t$this->SetFont('Arial','B',10);\n\t\t\t$this->Cell($w[2],7,number_format($sum_total[$j]+0, 2, ',', '.'),\"1\",0,\"R\",$fill);\n\t\t\n\t}", "public function doComplaint($id)\n {\n return $this->where([\n \"id_pengaduan\" => $id,\n \"tipe\" => $this->type\n ])->update([\n \"dikerjakan_teknisi\" => 1\n ]);\n }", "function print_cbasis($id,$ID)\n//==========================================================================\n// Function : print_basis\n//--------------------------------------------------------------------------\n// Beschreibun : erezugt eine Tabelle mit den DAten der Char_basis\n// als Anzeige modul ohne Eingabe wie eine KOPf_Zeile\n//\n// Dateiname : char_basis (local)\n//\n//\n// Argumente : $ID = charakter_id\n//\n// Returns : --\n//==========================================================================\n{\n\tglobal $DB_HOST, $DB_USER, $DB_PASS, $DB_NAME;\n\tglobal $PHP_SELF;\n\tglobal $nsc_char;\n\n\t$TABLE = 'char_basis';\n\n\t$db = mysql_connect($DB_HOST,$DB_USER,$DB_PASS) or die(\"Fehler beim verbinden!\");\n\n\tmysql_select_db($DB_NAME);\n\n\t$q = \"select * from $TABLE where id=\\\"$id\\\"\";\n\t$result = mysql_query($q) or die(\"Query Fehler...\");\n\tmysql_close($db);\n\n\t$row = mysql_fetch_row($result);\n\t//Liste der Datensätze\n\tif ($row[9]<=' ') {\n\t\t$row[9] = 'feminist.gif';\n\t};\n\tif ($row[8]<=' ') {\n\t\t$row[8] = 'default.gif';\n\t};\n\n\tif ($row[7]=='J')\n\t{\n\t\t$isnsc='true';\n\t\t$row[9] = \"ork2.gif\";\n\t} else\n\t{\n\t\t$isnsc='false';\n\t};\n\n\t$style = $GLOBALS[\"style_header_1\"];\n\techo \" <div $style >\\n\";\n\t\n\techo \"<table border=1 width=950 BGCOLOR=\\\"\\\" bordercolor=\\\"silver\\\">\\n\";\n\techo \"<tr>\";\n\techo \"<td rowspan=2 width=90 >\";\n\techo \"\\t<IMG SRC=\\\"chars/thumb/$row[9]\\\" BORDER=\\\"0\\\" HEIGHT=\\\"100\\\" ALT=\\\"Bild des Charakters\\\" title=\\\"Bild $row[9]\\\" HSPACE=\\\"0\\\" VSPACE=\\\"0\\\" ALIGN=ABSMIDDLE>\\n\";\n\techo \"</td>\";\n\techo \"<td width=150 style=\\\"font-size:75%\\\"> \";\n\techo \"<b>Charakterame</b>\";\n\techo \"</td>\";\n\techo \"<td width=150 style=\\\"font-size:75%\\\">\";\n\techo \"<b>Beruf</b>\";\n\techo \"</td>\";\n\techo \"<td width=150 style=\\\"font-size:75%\\\">\";\n\techo \"<b>Rasse</b>\";\n\techo \"</td>\";\n\techo \"<td width=150 style=\\\"font-size:75%\\\">\";\n\techo \"<b>Gilde</b>\";\n\techo \"</td>\";\n\techo \"<td rowspan=2 width=90>\";\n\techo \"\\t<IMG SRC=\\\"chars/thumb/$row[8]\\\" BORDER=\\\"0\\\" HEIGHT=\\\"100\\\" ALT=\\\"Wappen des Charakters\\\" title=\\\"Wappen $row[8]\\\" HSPACE=\\\"0\\\" VSPACE=\\\"0\\\" ALIGN=ABSMIDDLE>\\n\";\n\techo \"</td>\";\n// \techo \"<td >\";\n// \techo \"</td>\";\n\techo \"</tr>\";\n\n\techo \"<tr>\";\n\techo \"<td style=\\\"font-size:105%\\\">\";\n\techo \"$row[2]\";\n\techo \"</td>\";\n\techo \"<td style=\\\"font-size:105%\\\" >\";\n\techo \"$row[3]\";\n\techo \"</td>\";\n\techo \"<td style=\\\"font-size:105%\\\" >\";\n\techo \"$row[4]\";\n\techo \"</td>\";\n\techo \"<td style=\\\"font-size:105%\\\" >\";\n\techo \"$row[5]<BR>\";\n\tif ($row[7]=='J')\n\t{\n\t\techo \"<B>NSC\";\n\t};\n\techo \"</td>\";\n\techo \"</tr>\";\n\techo \"</table>\";\n\techo \"</div>\\n\";\n\t\n\treturn $isnsc;\n}", "public function etatModifierUn($id,$etat)\n\t{\n\t\tGestion::modifier($etat);// votre code ici\n\t}", "function Cuerpo($acceso,$id_contrato)\n\t{\n\t\t//echo \"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT tarifa_ser FROM vista_tarifa where id_serv='BM00001'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$costo_inst=utf8_decode(trim($row['tarifa_ser']));\n\t\t}\n\t\t//echo \"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\");\n\t\t$acceso->objeto->ejecutarSql(\"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\");\n\t\tif($row=row($acceso)){\n\t\t\n\t\t\t$observacion=utf8_decode(trim($row['observacion']));\n\t\t\t$costo_contrato=utf8_decode(trim($row['costo_contrato']));\n\t\t\t$tipo_cliente=utf8_decode(trim($row['tipo_cliente']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombrecli']));\n\t\t\t$apellidocli=utf8_decode(trim($row['apellido']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombre']));\n\t\t\t$etiqueta=utf8_decode(trim($row['etiqueta']));\n\t\t\t$cedulacli=utf8_decode(trim($row['cedula']));\n\t\t\t\n\t\t\t$fecha=formatofecha(trim($row[\"fecha_contrato\"]));\n\t\t\t$fecha_nac=formatofecha(trim($row[\"fecha_nac\"]));\n\t\t\t\n\t\t\t\n\t\t\t$nro_contrato=trim($row['nro_contrato']);\n\t\t\t$id_contrato=trim($row['id_contrato']);\n\t\t\n\t\t\n\t\t\t$puntos=utf8_decode(trim($row['puntos']));\n\t\t\t$deuda=utf8_decode(trim($row['deuda']));\n\t\t\tif($deuda==\"\"){\n\t\t\t\t$deuda=0;\n\t\t\t}\n\t\t\t\n\t\t\t$deuda=number_format($deuda, 2, ',', '.');\n\t\t\t$nombre_zona=utf8_decode(trim($row['nombre_zona']));\n\t\t\t$nombre_sector=utf8_decode(trim($row['nombre_sector']));\n\t\t\t$nombre_calle=utf8_decode(trim($row['nombre_calle']));\n\t\t\t$numero_casa=utf8_decode(trim($row['numero_casa']));\n\t\t\t$telefono=utf8_decode(trim($row['telefono']));\n\t\t\t$telf_casa=utf8_decode(trim($row['telf_casa']));\n\t\t\t$telf_adic=utf8_decode(trim($row['telf_adic']));\n\t\t\t$email=utf8_decode(trim($row['email']));\n\t\t\t$direc_adicional=utf8_decode(trim($row['direc_adicional']));\n\t\t\t$id_persona=utf8_decode(trim($row['id_persona']));\n\t\t\t$postel=utf8_decode(trim($row['postel']));\n\t\t\t$taps=utf8_decode(trim($row['taps']));\n\t\t\t$pto=utf8_decode(trim($row['pto']));\n\t\t\t$edificio=utf8_decode(trim($row['edificio']));\n\t\t\t$numero_piso=utf8_decode(trim($row['numero_piso']));\n\t\t}\n\t\t$acceso->objeto->ejecutarSql(\"SELECT nombre,apellido FROM persona where id_persona='$id_persona' LIMIT 1 offset 0 \");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$vendedor=utf8_decode(trim($row['nombre'])).\" \".utf8_decode(trim($row['apellido']));\n\t\t\t\n\t\t}\n\n\t\tif($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}\n\t\t\n\t\t\n\t\t$this->Ln();\t\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetXY(10,35);\t\t\n\t\t$this->Cell(195,10,\"Abonado: $nro_contrato\",\"0\",0,\"R\");\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t$this->SetXY(40,50);\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA JURIDICA.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Razón Social.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Actividad.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Telef.\",\"1\",0,\"J\");\n\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Representante Legal\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cargo en la Empresa.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA NATURAL.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: $nombrecli $apellidocli\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: $fecha_nac\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ingreso Mensual: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Deposito en Garantia: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Tipo Vivienda: Propia ___ Alquilado ___ Canon Mensual: ____\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(65,6,\"Vencimiento del Contrato: / / \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DATOS DEL CONYUGUE.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Ingreso Mensual.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DOMICILIO DEL SERVICIO\",\"1\",0,\"C\");\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Apellidos: $apellidocli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Vendedor: $vendedor\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Suscriptor Nº: $nro_contrato\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha: $fecha\",\"1\",0,\"J\");*/\n\t\t\t\t\n\t\n\t\t/*if($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}*/\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I. $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Ocupación: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Grupo Familiar Nº:\",\"1\",0,\"J\");\n\t\tif($fecha_nac=='11/11/1111'){\n\t\t\t$fecha_nac='';\n\t\t}\n\t\t$this->Cell(65,6,\"Fecha de Nacimiento : $fecha_nac\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"DOMICILIO DE SERVICIO\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb o Sector: $nombre_sector\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Calle n°: \",\"1\",0,\"J\");\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Avenida o Calle: $nombre_calle\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Vereda : \",\"1\",0,\"J\");\t\t\n\t\t\n\t\tif($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Piso:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"N° de Casa o Apto: $numero_casa $apto\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Referencia o Zona: $nombre_zona N°Poste:$postel\",\"1\",0,\"J\");\n\t\t//$this->Cell(65,6,\"N° de Poste: $postel\",\"0\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ruta Cuenta: \",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Zona: $nombre_zona\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Manzana: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb.: $nombre_sector\",\"1\",0,\"J\");*/\n\t\t\n\t\t/*if($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Cell(97,6,\"Apto.: $apto\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cod. Postal: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t//Rect( float x, float y, float w, float h [, string style])\n\t\t$this->Cell(98,6,\"Vivienda Alquilada: SI ____ NO ____\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha de Vencimineto de Alquiler: \",\"1\",0,\"J\");\n\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Proveedor de Internet: \",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\");\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"SERVICIOS \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,6,\"CANT.\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"P. UNITARIO \",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"P. TOTAL \",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Instalación Principal\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"1\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Tomas Adicionales\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Cable Coaxial\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Conectores\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Espliter\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\" \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(60,5,\"TOTAL A PAGAR BS\",\"1\",0,\"R\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"FECHA ESTIMADA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"HORA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"TOTAL A\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"$costo_contrato\",\"LRT\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"DE INSTALACION\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"SUGERIDA\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"PAGAR Bs.\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"\",\"LRB\",0,\"C\");*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PROGRAMACIÓN\",\"1\",0,\"C\");\t\t\t\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Descripción.\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Descripción\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Familiar Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Extendido Bs \",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Adulto Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Comercial I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Monto de Contrato: Bs. $costo_inst\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Firma del Abonado:_________________________ \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Puntos Adicionales:_________________________\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Costo Punto Adicional:_______________________\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Tiempo de Instalación:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Total a Cancelar Mensual:\",\"1\",0,\"J\");\n\t\t$this->Cell(30,6,\"Total:\",\"1\",0,\"J\");\n\t\t$this->Cell(35,6,\"Contrato:\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Observaciones.\",\"1\",0,\"J\");\n\t\t\t\t\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"$observacion\",\"1\",0,\"J\");*/\n\t\t\n\t/*\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"RECIBO DE PAGO\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"*EL PRECIO INCLUYE EL IMPUESTO DE LEY\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Efectivo\",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"Cheque\",\"1\",0,\"C\");\n\t\t$this->Cell(65,6,\"Cargo Cta. Cte.\",\"1\",0,\"C\");\n\t\t$this->Cell(60,6,\"Tarjeta de Credito:\",\"1\",0,\"C\");\n\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Bs. $costo_contrato\",\"1\",0,\"L\");\n\t\t$this->Cell(35,6,\"Nº.\",\"1\",0,\"L\");\n\t\t$this->Cell(65,6,\"Cta. Nº Bco.\",\"1\",0,\"L\");\n\t\t$this->Cell(60,6,\"Nombre:\",\"1\",0,\"L\");\n\t\t\n\t\n\t\t\n\t\t\n\t\t$this->Ln(15);\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Nota:\",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"En caso de que el televisor no acepte la señal de todos los canales del cable, es posible que amerite la instalación de un amplificador de sintonia, el cual deberá ser adquirido por el SUSCRIPTOR\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Atención: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"La Empresa. No autoriza el retiro de televisores y/o VHS por el personal de la empresa. El SUSCRIPTOR conoce y acepta las condiciones del contrato del servicio que apacen al dorso del presente\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Aviso: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"Se le informa a todos los suscriptores y publico en general de acuerdo a la Ley Orgánica de Telecomunicaciones, en el Artículo 189, Literal 2: será penado con prisión de uno (1) a cuatro (4) años, el que utilizando equipos o tecnologías de cualquier tipo, proporciones a un tercero el acceso o disfrute en forma fraudulenta o indebida de un serbicio o facilidad de telecomunicaciones \",\"0\",\"J\");\n\t\t\n\t\t\n\t\t\n\t\t$this->Ln(10);\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,5,\"________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"_________________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"__________________________\",\"0\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Firma del Vendedor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Nombre y Apellido del Suscriptor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Firma del Suscriptor\",\"0\",0,\"C\");*/\n\t\t\n\t\t/*$this->Ln(4);\n\t\t\n\t\t$this->SetDrawColor(76,136,206);\n\t\t$this->SetLineWidth(.4);\n\t\t$this->SetFont('times','I',12);\n\t\t$this->SetX(10);\n\t\t$this->MultiCell(195,5,'Av. Perimetral, Centro Comercial Residencial Central. P.B. Local Nº 07. Cúa, Edo. Miranda.\[email protected] / [email protected]',\"TB\",\"C\");*/\n\t\t\n\t\t//$this->clausulas();\n\t\t\n\t\treturn $cad;\n\t}", "function Alterar($id) {\n if($this->GetClienteCPF($this->getCli_cpf())>0 && $this->getCli_cpf() <> $_SESSION['CLI']['cli_cpf']):\n echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este CPF já esta cadastrado ';\n Sistema::VoltarPagina();\n echo '</div>';\n exit();\n endif;\n \n //se o email for diferente da sessao----------------------\n if($this->GetClienteEmail($this->getCli_email())>0 && $this->getCli_email() <> $_SESSION['CLI']['cli_email']):\n echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este Email já esta cadastrado ';\n Sistema::VoltarPagina();\n echo '</div>';\n exit();\n endif;\n \n \n \n //Caso passou na verificação os dados serão gravados no banco-------------------------\n $query = \"UPDATE \".$this->prefix.\"clientes SET cli_nome=:cli_nome,\n cli_sobrenome=:cli_sobrenome,\n cli_data_nasc=:cli_data_nasc,\n cli_rg=:cli_rg,\n cli_cpf=:cli_cpf,\n cli_ddd=:cli_ddd,\n cli_fone=:cli_fone,\n cli_celular=:cli_celular,\n cli_endereco=:cli_endereco,\n cli_numero=:cli_numero,\n cli_bairro=:cli_bairro,\n cli_cidade=:cli_cidade,\n cli_uf=:cli_uf,\n cli_cep=:cli_cep,\n cli_email=:cli_email,\n cli_data_cad=:cli_data_cad,\n cli_hora_cad=:cli_hora_cad,\n cli_pass=:cli_senha \n WHERE cli_id =:cli_id\";\n \n \n $params = array(\n ':cli_nome'=> $this->getCli_nome(),\n ':cli_sobrenome'=> $this->getCli_sobrenome(),\n ':cli_data_nasc'=> $this->getCli_data_nasc(),\n ':cli_rg'=> $this->getCli_rg(),\n ':cli_cpf'=> $this->getCli_cpf(),\n ':cli_ddd'=> $this->getCli_ddd(),\n ':cli_fone'=> $this->getCli_fone(),\n ':cli_celular'=> $this->getCli_celular(),\n ':cli_endereco'=> $this->getCli_endereco(),\n ':cli_numero'=> $this->getCli_numero(),\n ':cli_bairro'=> $this->getCli_bairro(),\n ':cli_cidade'=> $this->getCli_cidade(),\n ':cli_uf'=> $this->getCli_uf(),\n ':cli_cep'=> $this->getCli_cep(),\n ':cli_email'=> $this->getCli_email(),\n ':cli_data_cad'=> $this->getCli_data_cad(),\n ':cli_hora_cad'=> $this->getCli_hora_cad(),\n ':cli_senha'=> $this->getCli_senha(),\n ':cli_id' => (int)$id\n \n \n );\n \n //echo $query;\n \n \n if($this->ExecuteSQL($query, $params)):\n return true;\n else:\n return false;\n endif;\n \n \n }", "public function responsablesCda($id_cda_solicitud){\n \n }", "public function getMvtsCpteClientParNumero($id_cpte, $numero){\n\n global $global_remote_id_agence;\n $sql = \"SELECT \tA.id_his,A.infos,A.type_fonction,A.date,b.libel_ecriture,T .traduction AS libel_operation, b.type_operation, b.info_ecriture, C.sens, C.montant\n FROM\tad_his A INNER JOIN ad_ecriture b USING (id_ag, id_his) INNER JOIN ad_mouvement C USING (id_ag, id_ecriture)\n INNER JOIN ad_traductions T ON T .id_str = b.libel_ecriture\n INNER JOIN ad_agc ag on ag.id_ag = a.id_ag and ag.langue_systeme_dft = T.langue \";\n $sql .= \"WHERE (a.id_ag = $global_remote_id_agence) AND c.cpte_interne_cli = $id_cpte \";\n\n $sql .= \" ORDER BY b.id_ecriture DESC LIMIT $numero\";\n\n $result = $this->getDbConn()-> prepareFetchAll ($sql);\n\n if ($result === FALSE || count($result) == 0) {\n return new ErrorObj(ERR_DB_SQL, $result);\n }\n\n return $result;\n }", "public function block($id)\n {\n $block = $this->selectuser($id,'block');\n if($block[0]['block'] == 1)\n {\n $this->updateuser($id,'block',0);\n }\n else\n {\n $this->updateuser($id,'block',1);\n }\n }", "public function secteurModifierUn($id,$secteur)\n\t{\n\t\tGestion::modifier($secteur);// votre code ici\n\t}", "public function putCabecera($id,$idfiltro){ \n /* $hijos= registros que deen pintarse en la cabcera del reporte */\n $hijosCabecera=$this->getReportedetalle()->where(['and', \"esdetalle='0'\", ['or', \"visiblelabel='1'\", \"visiblecampo='1'\"]])->all();\n\t\t//var_dump($hijosCabecera);die();\n $HTML_cabecera=\"\";\n //var_dump($hijosCabecera);die();\n foreach( $hijosCabecera as $record) {\n // var_dump($this->modelToRepor($idfiltro));die();\n\t\t $HTML_cabecera.=$record->putStyleField($record->nombre_campo,$this->modelToRepor($idfiltro)->{$record->nombre_campo}); \n }\n unset($modeloToReport);unset($hijosCabecera);unset($clase);\n return $HTML_cabecera;\n }", "public function societeModifierUn($id,$societe)\n\t{\n\t\tGestion::modifier($societe);// votre code ici\n\t}", "function executeAttack_ctc($status){\n\tglobal $db;\n\n//\tsetStatus($status->id, 0);\n\t\n\t//lay danh sach thap canh cua chien truong nay:\n\t$sql = \"SELECT * FROM wg_ctc_diem_tap_ket WHERE cung!=0 AND cung!=6 AND ct_id=$status->object_id\";\n\t$db->setQuery($sql);\n\t$dtks = $db->loadObjectList();\n\tif($dtks){\n\t\tforeach($dtks as $dtk){\n\t\t\tattack_ctc($dtk, $status->order_);\n\t\t}\n\t}\n\t\n\t//Kiem tra va ket thuc cong thanh chien:\n\tif(checkEnd_ctc()){\n\t\t//end_ctc();\n\t}\n}", "public function view_com_rpt($id) {\n //permittedArea();\n $data['Dashbord'] = $this->db->get_where('commissions', ['id' => $id]);\n theme('view_com_rpt', $data);\n }", "function gera_pdf($id){\n\t\t$briefing= $this->getBriefing($id);\n\t\t$cronograma=$this->get_cronograma($id);\n\t\t$referencias = $this->get_referencias($id);\n\t\t$id_formated = str_pad($id, 4, \"0\", STR_PAD_LEFT);\n\t\t//var_dump($briefing); exit(0);\n\t\t$info_cliente = nl2br( $briefing['info_cliente']);\n\t\t//var_dump($id_formated , $briefing['titulo']); exit(0);\n\t\t$publico = nl2br($briefing['publico']);\n\t\t$demanda = nl2br($briefing['demanda']);\n\t\t$demanda_pecas=$briefing['demanda_pecas'];\n\t\t$demanda_formato=$briefing['demanda_formato'];\n\t\t$demanda_materiais=$briefing['demanda_materiais'];\n\t\t$demanda_finalizacao=$briefing['demanda_finalizacao'];\n\t\t$demanda_local=$briefing['demanda_local'];\n\t\t$objetivo = nl2br($briefing['objetivo']);\n\t\t$recomendacoes_ideia = nl2br($briefing['recomendacoes_ideia']);\n\t\t$recomendacoes_referencias = nl2br($briefing['recomendacoes_referencias']);\n\t\t$recomendacoes_objecoes = nl2br($briefing['recomendacoes_objecoes']);\n\t\t\n\t\t\n\t\t\n\t\trequire_once(\"../tcpdf/tcpdf.php\"); \n\t\t$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n\t\t// set document information\n\t\t$pdf->SetCreator(PDF_CREATOR);\n\t\t$pdf->SetAuthor('Daniel');\n\t\t$pdf->SetTitle('Teste');\n\t\t$pdf->SetSubject('Teste');\n\t\t$pdf->SetFont('helvetica', '', 14);\n\t\t$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\t\t\n\t\t$pdf->setPrintHeader(false);\n\t\t$pdf->setPrintFooter(false);\n\t\t// add a page\n\t\t$pdf->AddPage();\n\t\t$pdf->Image('../img/logoVENTO.png', 10, 10, 50, 43, 'PNG', '#', '', true, 150, '', false, false, 0, false, false, false);\n\n\t\t$txt='<strong>Razão Social: Vento Comunicação Ltda.</strong>\n\t\t\t\t<br>\n\t\t\t\tCNPJ: 08.633.990/0001-07\n\t\t\t\t<br>\n\t\t\t\tInscrição Municipal: 50963627\n\t\t\t\t<br>\n\t\t\t\tEndereço: Rua Independência 1159/303\n\t\t\t\t<br>\n\t\t\t\tPorto Alegre/RS\n\t\t\t\t<br>\n\t\t\t\tCEP: 90035-073\n\t\t\t\t<br>\n\t\t\t\tFone: (51) 3013.3833';\n\t\t$txt= utf8_encode($txt);\n\t\t//var_dump($txt); exit(0);\n\t\t// MultiCell($w, $h, $txt, $border=0, $align='L', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0)\n\t\t$pdf->SetTextColor(0, 170, 201);\n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t$pdf->MultiCell(60, 45, '', 0, 'C', 1, 0, '', '', true, 0, false, true, '12', 'M');\n\t\t\n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->MultiCell(130, 45, $txt, 0, 'L', 1, 1, '', '', true, 0, true, true, '12', 'M');\t\t\n\t\t$pdf->Ln(4);\n\t\t\t\t\n\t\t$txt=utf8_encode('BRIEFING Nº ').$id_formated.' - '.utf8_encode($briefing['titulo']);\n\t\t\n\t\t//var_dump($txt); exit(0);\n\t\t// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0)\n\t\t$pdf->SetTextColor(255, 255, 255);\n\t\t$pdf->SetFillColor(0, 170, 201);\n\t\t$pdf->SetFont('helvetica', 'b', 12);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'C', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\n\t\t$txt='CLIENTE';\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetTextColor(0, 170, 201);\n\t\t$pdf->SetFillColor(249,207 , 69);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'C', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t$pdf->Ln(2);\n\t\t$txt='Nome do cliente: ';\n\t\t//$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\n\t\t$txt = $briefing['nome_cliente'];\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t\t\n\t\t$txt = utf8_encode('Informações do cliente:');\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\n\t\t$txt = $info_cliente;\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, 'J', 1, 1, '', '', true, 0, true, true, '', 'M');\n\t\t$pdf->Ln(10);\n\t\t\n\t\t$txt = 'DEMANDA ';\n\t\t$txt= utf8_encode($txt);\n\t\t//var_dump($txt); exit(0);\n\t\t// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0)\n\t\t$pdf->SetFont('helvetica', 'b', 12);\n\t\t$pdf->SetTextColor(0, 170, 201);\n\t\t$pdf->SetFillColor(249,207 , 69);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'C', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t\t\n\t\t$txt='Descrição e conceito:';\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\n\t\t$txt = $demanda;\n\t\t//$txt = str_replace(array(\"<br/>\",\"<br>\") , \"\\n\" , $demanda );\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,3, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, '', 1, 1, '', '', true, 0, true, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t\t\n\t\t$txt='Objetivo de comunicação:';\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\n\t\t$txt = $objetivo;\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,3, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, '', 1, 1, '', '', true, 0, true, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t\t\n\t\t\n\t\t\n\t\t$txt='Público-alvo:';\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\t\n\t\t$txt = $publico;\n\t/*\t$txt = str_replace(array(\"<br/>\",\"<br />\", \"<br>\") , \"\\r\" , $publico ); */\n\t\t\n\t\t//$txt = str_replace(array(\"<br/>\",\"<br>\") , \"\\n\" , $demanda );\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,3, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, '', 1, 1, '', '', true, 0, true, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t\t\n\t\t\n\t\t$txt = 'DADOS TÉCNICOS DA DEMANDA';\n\t\t$txt= utf8_encode($txt);\n\t\t//var_dump($txt); exit(0);\n\t\t// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0)\n\t\t$pdf->SetFont('helvetica', 'b', 12);\n\t\t$pdf->SetTextColor(0, 170, 201);\n\t\t$pdf->SetFillColor(249,207 , 69);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'C', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t\t\n\t\t$pecas = $this->get_peca($id);\n\t\t\n\t\t\n\t\t /*\n\t\t$txt='Peças (Quais/quantas): ';\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\n\t\t$txt = $demanda_pecas;\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t$pdf->Ln(3);\n\t\t\n\t\t$txt='Formatos/tamanhos:';\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\n\t\t$txt = $demanda_formato;\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t*/\t\n\t\tif($pecas){\n\t\t\t$txt='Peças:';\n\t\t\t$txt= utf8_encode($txt);\n\t\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\n\t\t\tforeach($pecas as $pc){\n\t\t\t\t$txt =\t'Descrição';\n\t\t\t\t$txt= utf8_encode($txt);\n\t\t\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t\t$pdf->SetFillColor(128, 191, 255);\n\t\t\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t\t\t// set cell margins\n\t\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t\t$pdf->MultiCell(25, 12, $txt, 1, 'L', 1, 0, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$txt = $pc['peca_descricao'];\n\t\t\t\t$txt= utf8_encode($txt);\n\t\t\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t\t\t// set cell margins\n\t\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t\t$pdf->MultiCell(165, 12, $txt, 1, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$txt = 'Qtd';\n\t\t\t\t$txt= utf8_encode($txt);\n\t\t\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t\t$pdf->SetFillColor(128, 191, 255);\n\t\t\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t\t\t// set cell margins\n\t\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t\t$pdf->MultiCell(15, 12, $txt, 1, 'L', 1, 0, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\t\t\t\t\t\n\t\t\t\t$txt = $pc['peca_qtd' ];\n\t\t\t\t$txt= utf8_encode($txt);\n\t\t\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t\t$pdf->SetFillColor(255,255 , 255);\n\t\t\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t\t\t// set cell margins\n\t\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t\t$pdf->MultiCell(20, 12, $txt, 1, 'L', 1, 0, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\t\n\t\t\t\t$txt = 'Formato';\n\t\t\t\t$txt= utf8_encode($txt);\n\t\t\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t\t$pdf->SetFillColor(128, 191, 255);\n\t\t\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t\t\t// set cell margins\n\t\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t\t$pdf->MultiCell(20, 12, $txt, 1, 'L', 1,0, '', '', true, 0, false, true, '12', 'M');\n\t\t\n\t\t\t\t\n\t\t\t\t$txt = $pc['peca_formato'];\n\t\t\t\t$txt= utf8_encode($txt);\n\t\t\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t\t\t// set cell margins\n\t\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t\t$pdf->MultiCell(55, 12, $txt, 1, 'L', 1, 0, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\t\n\t\t\t\t$txt = 'Data entrega:';\n\t\t\t\t$txt= utf8_encode($txt);\n\t\t\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t\t$pdf->SetFillColor(128, 191, 255);\n\t\t\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t\t\t// set cell margins\n\t\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t\t$pdf->MultiCell(30, 12, $txt, 1, 'L', 1, 0, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\t\t\t\t\t\n\t\t\t\t$txt = $pc['peca_data_entrega'];\n\t\t\t\t$txt= utf8_encode($txt);\n\t\t\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t\t\t// set cell margins\n\t\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t\t$pdf->MultiCell(50, 12, $txt, 1, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\t$pdf->Ln(5);\n\t\t\t/*\t\n\t\t\t\t$txt = 'Prioridade';\n\t\t\t\t$txt= utf8_encode($txt);\n\t\t\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t\t\t\n\t\t\t\t$pdf->MultiCell(190, 12, $txt, 1, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\t$pdf->Ln(5);\n\t\t\t\t\n\t\t\t\t$txt = $pc['peca_prioridade'];\n\t\t\t\t$txt= utf8_encode($txt);\n\t\t\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t\t\t// set cell margins\n\t\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t\t$pdf->MultiCell(190, 12, $txt, 1, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\t$pdf->Ln(5); \n\t\t*/\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$txt='Materiais e acabamentos:';\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\n\t\t$txt = $demanda_materiais;\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t\n\t\t$txt='Modo de finalização:';\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\n\t\t$txt = $demanda_finalizacao;\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t\t\n\t\t$txt='Local do arquivo:';\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\n\t\t$txt = $demanda_local;\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,0, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t\t\n\t\t$txt = 'RECOMENDAÇÕES ';\n\t\t$txt= utf8_encode($txt);\n\t\n\t\t//var_dump($txt); exit(0);\n\t\t// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0)\n\t\t$pdf->SetFont('helvetica', 'b', 12);\n\t\t$pdf->SetTextColor(0, 170, 201);\n\t\t$pdf->SetFillColor(249,207 , 69);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'C', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t\t \n\t\t \n\t\t/* \n\t\t$txt='Ideia inicial:';\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t//$pdf->Ln(5);\n\t\t\n\t\t$txt = $recomendacoes_ideia;\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0);\n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,3, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, '', 1, 1, '', '', true, 0, true, true, '12', 'M');\n\t\t//$pdf->Ln(5);\n\t\t\n\t\t*/\n\t\t$pdf->Ln(5);\n\t\t\n\t\t\n\t\t/*\t\t\n\t\t$txt = $recomendacoes_referencias;\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0);\n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,3, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, '', 1, 1, '', '', true, 0, true, true, '12', 'M');\n\t\t*/\n\t\t\n\t\t$txt='Referências:';\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\n\t\tif($referencias){\n\t\t\t$txt = '';\n\t\t\t$cont=0;\n\t\t\tforeach($referencias as $ref){\n\t\t\t\t$cont++;\n\t\t\t\t$txt =$ref['caminho'];\n\t\t\t\t$pdf->SetFont('helvetica', '', 10);\n\t\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t\tif($cont%2==0){\n\t\t\t\t\t$pdf->SetFillColor(223, 239, 255);\n\t\t\t\t}\n\t\t\t\telse{\t\t\t\t\t\n\t\t\t\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t\t\t}\n\t\t\t\t$pdf->setCellPaddings(3,3, 0, 1);\n\t\t\t\t// set cell margins\n\t\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$pdf->Ln(5);\n\t\t\n\t\t$txt='Objeçoes:';\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(0,0, 0, 0);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'L', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t\t\t\n\t\t$txt = $recomendacoes_objecoes;\n\t\t$txt= utf8_encode($txt);\n\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t$pdf->SetTextColor(0, 0, 0);\n\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t$pdf->setCellPaddings(3,3, 0, 1);\n\t\t// set cell margins\n\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t$pdf->MultiCell(190, 12, $txt, 1, '', 1, 1, '', '', true, 0, true, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t\t\n\t\t\n\t\t\n\t\t$txt = 'CRONOGRAMA ';\n\t\t$txt= utf8_encode($txt);\n\t\t//var_dump($txt); exit(0);\n\t\t// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0)\n\t\t$pdf->SetFont('helvetica', 'b', 12);\n\t\t$pdf->SetTextColor(0, 170, 201);\n\t\t$pdf->SetFillColor(249,207 , 69);\n\t\t$pdf->MultiCell(190, 12, $txt, 0, 'C', 1, 1, '', '', true, 0, false, true, '12', 'M');\n\t\t$pdf->Ln(5);\n\t\t\n\t\t$txt ='';\n\t\tif($cronograma){\n\t\t\t$txt ='Atividade';\n\t\t\t$pdf->SetFont('helvetica', 'b', 12);\n\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t$pdf->SetFillColor(128, 191, 255);\n\t\t\t$pdf->setCellPaddings(3,3, 0, 1);\n\t\t\t// set cell margins\n\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t$pdf->MultiCell(130, 10, $txt, 0, 'L', 1, 0, '', '', true, 0, true, true, '12', 'M');\n\t\t\t$txt ='Início';\n\t\t\t$txt= utf8_encode($txt);\n\t\t\t$pdf->MultiCell(30, 10, $txt, 0, 'L', 1, 0, '', '', true, 0, true, true, '12', 'M');\n\t\t\t$txt ='Fim';\n\t\t\t$pdf->MultiCell(30, 10, $txt, 0, 'L', 1, 1, '', '', true, 0, true, true, '12', 'M');\n\t\t\t//$pdf->Ln(5);\n\t\t\t$cont=0;\n\t\t\tforeach($cronograma as $etapa){\n\t\t\t\t$cont++;\n\t\t\t\t$txt =$etapa['atividade'];\n\t\t\t\t$pdf->SetFont('helvetica', '', 10);\n\t\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t\tif($cont%2==0){\n\t\t\t\t\t$pdf->SetFillColor(223, 239, 255);\n\t\t\t\t}\n\t\t\t\telse{\t\t\t\t\t\n\t\t\t\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t\t\t}\n\t\t\t\t$pdf->setCellPaddings(3,3, 0, 1);\n\t\t\t\t// set cell margins\n\t\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t\t$pdf->MultiCell(130, 8, $txt, 0, '', 1, 0, '', '', true, 0, true, true, '12', 'M');\n\t\t\t\t$txt =$this->convert_data_bd_to_human($etapa['inicio']);\n\t\t\t\t$pdf->MultiCell(30, 8, $txt, 0, '', 1, 0, '', '', true, 0, true, true, '12', 'M');\n\t\t\t\t$txt =$this->convert_data_bd_to_human($etapa['fim']);\n\t\t\t\t$pdf->MultiCell(30, 8, $txt, 0, '', 1, 1, '', '', true, 0, true, true, '12', 'M');\n\t\t\t}\n\t\t\t//$txt .= \"</table>\";\n\t\t} \n\t\telse{\n\t\t\n\t\t\t//$txt= utf8_encode($txt);\n\t\t\t//var_dump($txt); exit(0);\n\t\t\t$pdf->SetFont('helvetica', '', 12);\n\t\t\t$pdf->SetTextColor(0, 0, 0); \n\t\t\t$pdf->SetFillColor(255, 255, 255);\n\t\t\t$pdf->setCellPaddings(3,3, 0, 1);\n\t\t\t// set cell margins\n\t\t\t//$pdf->setCellMargins(1, 1, 1, 1);\n\t\t\t$pdf->MultiCell(190, 12, $txt, 1, '', 1, 1, '', '', true, 0, true, true, '12', 'M');\n\t\t\t$pdf->Ln(5);\n\t\t}\n\n\t\t$pdf->lastPage();\n\t\t$pdf->Output('teste.pdf', 'I');\n\t}", "public function prijmoutClanek($id){\n try {\n $sql = \"UPDATE PRISPEVKY \n SET stav='schváleno'\n WHERE \n id_prispevku=:id;\";\n $sth = $this->db->prepare($sql);\n $sth->bindParam(':id', $id);\n $sth->execute();\n return \"ok\";\n\n } catch (Exception $e) {\n return \"Chyba při práci s databází.\"; //. $e->getMessage(); //chyba v pozadavku\n }\n }", "public static function cogeCajaChica($id){\n if(is_null(self::model()->find(\"hidcaja=:vhidcaja\",array(\":vhidcaja\"=>$id)))){\n $dcaja= Dcajachica::model()->findByPk($id);\n if(!is_null($dcaja)){\n $regcompra=New Registrocompras('ins_compralocal'); \n $regcompra->setAttributes(\n array(\n 'socio'=>$dcaja->cabecera->fondo->socio,\n 'femision'=>$dcaja->fecha,\n 'numerocomprobante'=>$dcaja->referencia,\n 'razpronombre'=>$dcaja->razon,\n 'hidperiodo'=>yii::app()->periodo->getperiodo(),\n 'tipodocid'=>$dcaja->tipodocid,\n 'numerodocid'=>$dcaja->numdocid,\n 'glosa'=>$dcaja->glosa,\n 'codmon'=>$dcaja->monedahaber,\n 'importe'=>$dcaja->haber,\n 'serie'=>$dcaja->serie,\n 'esservicio'=>$dcaja->esservicio,\n 'tipo'=>$dcaja->codocu,\n 'tipgrabado'=>'1',\n 'hidcaja'=>$dcaja->id,\n )\n );\n $grabo=$regcompra->save();\n //if(!$grabo)\n //print_r(yii::app()->mensajes->getErroresItem($regcompra->geterrors()));\n //die();\n return ($grabo)?$regcompra:null;\n }else{\n return null;\n }\n } \n }", "function commandes_trig_bank_reglement_en_echec($flux){\r\n\t// Si on est dans le bon cas d'un paiement de commande et qu'il y a un id_commande et que la commande existe toujours\r\n\tif ($id_transaction = $flux['args']['id_transaction']\r\n\t AND $transaction = sql_fetsel(\"*\",\"spip_transactions\",\"id_transaction=\".intval($id_transaction))\r\n\t\tAND $id_commande = $transaction['id_commande']\r\n\t\tAND $commande = sql_fetsel('id_commande, statut, id_auteur', 'spip_commandes', 'id_commande='.intval($id_commande))){\r\n\r\n\t\t$statut_commande = $commande['statut'];\r\n\t\t$transaction_mode = $transaction['mode'];\r\n\t\t$statut_nouveau = $statut_commande;\r\n\r\n\t\t// on ne passe la commande en erreur que si le reglement a effectivement echoue,\r\n\t\t// pas si c'est une simple annulation (retour en arriere depuis la page de paiement bancaire)\r\n\t\tif (strncmp($transaction['statut'],\"echec\",5)==0){\r\n\t\t\t$statut_nouveau = 'erreur';\r\n\t\t}\r\n\t\tif ($statut_nouveau !== $statut_commande){\r\n\t\t\tspip_log(\"commandes_trig_bank_reglement_en_attente marquer la commande #$id_commande statut=$statut_nouveau\",'commandes');\r\n\t\t\t//on met a jour la commande\r\n\t\t\tinclude_spip(\"action/editer_commande\");\r\n\t\t\tcommande_modifier($id_commande,array('statut'=>$statut_nouveau,'mode'=>$transaction_mode));\r\n\t\t}\r\n\t}\r\n\r\n\treturn $flux;\r\n}", "public function get_compte(){retrun($id_local_compte); }", "function getLongFormatCongressBlockWithEditLink($congress)\n{\n $html = \"\n <div class='longCongressBlockDIV'\";\n \n if ($congress[\"imageURL\"] != \"\")\n {\n $html .= \" style='background-image: linear-gradient(to right, rgba(70, 99, 32, 0.7), rgba(60, 101, 124, 0.7)), url(\\\"\" . CONGRESS_IMAGES_PATH . $congress['imageURL'] . \"\\\");opacity:1;'\";\n }\n \n $html .= \">\n <div class='edit congressEdit fa'><a href='\" .HOME . \"?action=\" . POST_MODIFY_CONGRESS_DETAIL . \"&congress=\" . $congress['id'] . \"'>&#xf044;</a></div>\n <div class='longCongressShortName'>\" . $congress[\"shortName\"] . \"</div>\n <div class='longCongressName'>\" . $congress[\"name\"] . \"</div>\n <div class='longCongressShortDates'>\" . congressDatesForHtmlShortFormat($congress) . \"</div>\n <div class='caret congressCaret fa'>&#xf105;</div>\n <div class='longCongressVenueDetail' style='display:none;'>\n <div class='longCongressVenue'>Conference Venue :</div>\n <div>\" . $congress[\"venueName\"] . \"</div>\n <div>\" . $congress[\"venueAddress1\"] . \" \" . $congress[\"venueAddress2\"] . \"</div>\n <div>\" . $congress[\"venueCity\"] . \", \" . $congress['venueState'] . \" \" . $congress['venueZip'] . \"</div>\n <div>\" . $congress['venueCountry'] . \"</div>\n </div>\n </div>\n <script>\n $('.congressCaret').click(function()\n {\n if($('.longCongressVenueDetail').is(':visible'))\n {\n $('.longCongressVenueDetail').hide();\n $('.congressCaret').html('&#xf105;');\n }\n else\n {\n $('.longCongressVenueDetail').show();\n $('.congressCaret').html('&#xf107;');\n }\n });\n </script>\";\n return $html;\n}", "public function chapitre(int $idChapitre) : void\n { \n $episode = $this->chapitreManager->findChapitre($idChapitre);\n $chapitrePrecedent = $this->getMaxId->getMaxId($episode['numchapitre']);\n $chapitreSuivant = $this->getMinId->getMinId($episode['numchapitre']);\n $commentaires = $this->commentaireManager->findComments($idChapitre);\n $token = new Token($this->session);\n \n $this->view->render('chapitre', [\n 'episode'=>$episode, \n 'commentaires'=>$commentaires, \n 'session'=> $this->session,\n 'chapitreSuivant'=>$chapitreSuivant,\n 'chapitrePrecedent'=>$chapitrePrecedent,\n 'token'=>$token->genererToken()\n ]);\n }", "public function odmitnoutClanek($id){\n try {\n $sql = \"UPDATE PRISPEVKY \n SET stav='odmítnuto'\n WHERE \n id_prispevku=:id;\";\n $sth = $this->db->prepare($sql);\n $sth->bindParam(':id', $id);\n $sth->execute();\n return \"ok\";\n\n } catch (Exception $e) {\n return \"Chyba při práci s databází.\"; //. $e->getMessage(); //chyba v pozadavku\n }\n }", "function formulaires_editer_composition_objet_charger($type,$id){\n\t$valeurs = array();\n\t$table_objet_sql = table_objet_sql($type);\n\t$id_table_objet = id_table_objet($type);\n\t$valeurs[$id_table_objet] = intval($id);\n\n\t$row = sql_fetsel('composition,composition_lock',$table_objet_sql,\"$id_table_objet=\".intval($id));\n\tif (!autoriser('styliser',$type,$id,NULL,array('row'=>$row))){\n\t\t$valeurs['editable'] = false;\n\t}\n\telse {\n\n\t\tif ($type=='rubrique'){\n\t\t\t$config_accueil = true;\n\t\t\tif (isset($GLOBALS['meta']['compositions'])){\n\t\t\t\t$config = unserialize($GLOBALS['meta']['compositions']);\n\t\t\t\t$config_accueil = $config['utiliser_article_accueil'] != 'non';\n\t\t\t}\n\t\t\tif ($config_accueil){\n\t\t\t\t$valeurs['id_article_accueil'] = sql_getfetsel('id_article_accueil',$table_objet_sql,\"$id_table_objet=\".intval($id));\n\t\t\t\t$valeurs['id_article_accueil'] = $valeurs['id_article_accueil'] ? $valeurs['id_article_accueil'] : '0';\n\t\t\t}\n\t\t}\n\t\t$valeurs['composition'] = $row['composition'];\n\t\t$valeurs['composition_lock'] = $row['composition_lock'];\n\n\t\t$valeurs['compositions'] = compositions_lister_disponibles($type);\n\t\t$valeurs['compositions'] = reset($valeurs['compositions']); // on ne regarde qu'un seul type\n\t\tif (is_array($valeurs['compositions']) AND !isset($valeurs['compositions'][''])){\n\t\t\t$valeurs['compositions'] = array_merge(\n\t\t\t\tarray(''=>array('nom'=>_T('compositions:label_pas_de_composition'),'description'=>'','icon'=>'','configuration'=>'')),\n\t\t\t\t$valeurs['compositions']\n\t\t\t);\n\t\t}\n\t\t$valeurs['_hidden'] = \"<input type='hidden' name='$id_table_objet' value='$id' />\";\n\n\t\tif (!is_array($valeurs['compositions']) AND !isset($valeurs['id_article_accueil']))\n\t\t\t$valeurs['editable'] = false;\n\t}\n\n\treturn $valeurs;\n}", "protected function fermeBloc($html)\n\t{\n\t\t// Diminution du niveau d'indentation courant\n\t\t$this->niveauCourant = $this->niveauCourant - 1;\n\t\t// Ajout de l'indentation\n\t\t$this->contenuHTML .= $this->indente();\n\t\t// Affichage de la balise HTML\n\t\t$this->contenuHTML .= $html;\n\t\t// Ajout d'un saut de ligne\n\t\t$this->contenuHTML .= \"\\n\";\t\n\t}", "function proforma_cotizacion($id){\n\t$reg=imp_proforma::edit('S',$id);\n\t$comision=5;\n $utilidad=6;\n\t$cad='<table width=\"100%\">';\n $cad.='<tr><td>Nro. Cot.</td><td><input type=\"text\" name=\"cot_nro\" id=\"cot_nro\" value=\"'.$reg['imp_prof_nro'].'\" ></td></tr>';\n $cad.='<tr><td>Utilidad (%)</td><td><input type=\"text\" name=\"cot_utilidad\" id=\"cot_utilidad\" value=\"'.$utilidad.'\" ></td></tr>';\n $cad.='<tr><td>Comis. Vent (%)</td><td><input type=\"text\" name=\"cot_comision\" id=\"cot_comision\" value=\"'.$comision.'\" ></td></tr>';\n $cad.='</table>';\t\t\t\n\treturn $cad;\n}", "function track_cpost($id = null){\n\t\tApp::import('Helper', 'Session');\n\t\t$this->Session = new SessionHelper;\n\t\t\n\t\t// nactu si objednavku, protoze potrebuju vedet\n\t\t// cislo baliku v kterem byla objednavka expedovana\n\t\t$this->recursive = -1;\n\t\t$order = $this->read(null, $id);\n\t\t\n\t\t$this->Shipping->id = $order['Order']['shipping_id'];\n\t\t$this->Shipping->recursive = -1;\n\t\t$shipping = $this->Shipping->read();\n\t\t\n\t\t$tracker_url = $shipping['Shipping']['tracker_prefix'] . trim($order['Order']['shipping_number']) . $shipping['Shipping']['tracker_postfix'];\n\t\t// nactu si obsah trackovaci stranky\n\t\t$contents = download_url($tracker_url);\n\t\tif ($contents !== false){\n\t\t\t$contents = eregi_replace(\"\\r\\n\", \"\", $contents);\n\t\t\t$contents = eregi_replace(\"\\t\", \"\", $contents);\n\t\t\t\n\t\t\t// z obsahu vyseknu usek, ktery zminuje jednotlive stavy objednavky\n\t\t\t$pattern = '|<table class=\"datatable2\"> <tr> <th>Datum</th>.*</tr>(.*)</table>|U';\n\t\t\tpreg_match_all($pattern, $contents, $table_contents);\n\n\t\t\tif (!isset($table_contents[1][0])) {\n\t\t\t\t$pattern = '/<div class=\"infobox\">(.*)<\\/div>/';\n\t\t\t\tif (preg_match($pattern, $contents, $messages)) {\n\t\t\t\t\t$message = strip_tags($messages[1]);\n\t\t\t\t\treturn $id;\n\t\t\t\t}\n\t\t\t\treturn $id;\n\t\t\t\tdie('nesedi pattern pri zjisteni dorucenosti baliku u CP - tabulka');\n\t\t\t}\n\n\t\t\t// stavy si rozhodim do jednotlivych prvku pole\n\t\t\t$pattern = '|<tr>(.*)</tr>|U';\n\t\t\tpreg_match_all($pattern, $table_contents[1][0], $rows);\n\t\t\tif (!isset($rows[1])) {\n\t\t\t\treturn $id;\n\t\t\t\tdie('nesedi pattern pri zjisteni dorucenosti baliku u CP - radek tabulky');\n\t\t\t}\n\n\t\t\t// priznak, zda jsem narazil na status ktery meni objednavku\n\t\t\t// na dorucenou, ulozenou na poste apod.\n\t\t\t$found = false;\n\t\t\t\n\t\t\tforeach ($rows[1] as $os){\n\t\t\t\tif ( eregi('Dodání zásilky.', $os) ){\n\t\t\t\t\t// mam dorucenou objednavku, dal neprochazim\n\t\t\t\t\t$found = true;\n\n\t\t\t\t\t// pokud byla dorucena, najdu si datum doruceni\n\t\t\t\t\t$date = '';\n\t\t\t\t\t\n\t\t\t\t\t$pattern = '|([0-9]{1,2}\\.[0-9]{1,2}\\.[0-9]{4})|';\n\t\t\t\t\tpreg_match_all($pattern, $os, $date);\n\t\t\t\t\tif (!isset($date[1][0])) {\n\t\t\t\t\t\treturn $id;\n\t\t\t\t\t\tdie('nesedi pattern pri zjisteni dorucenosti baliku u CP - datum');\n\t\t\t\t\t}\n\t\t\t\t\t$date = date('d.m.Y', strtotime($date[1][0]));\n\t\t\t\t\t// musim zmenit objednavku na doruceno a zapsat poznamku o tom, kdy byla dorucena\n\t\t\t\t\t$this->id = $id;\n\t\t\t\t\t$this->save(array('status_id' => '4'), false, array('status_id', 'modified'));\n\t\t\t\t\t\n\t\t\t\t\t// zapisu poznamku o tom, kdy byla dorucena\n\t\t\t\t\t$note = array('order_id' => $id,\n\t\t\t\t\t\t'status_id' => '4',\n\t\t\t\t\t\t'administrator_id' => $this->Session->read('Administrator.id'),\n\t\t\t\t\t\t'note' => 'Zásilka byla automaticky identifikována jako doručená zákazníkovi. Datum doručení: ' . $date\n\t\t\t\t\t);\n\t\t\t\t\tunset($this->Ordernote->id);\n\t\t\t\t\t$this->Ordernote->save($note);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// doruceno nemam, hledam, jestli se zasilka nevratila zpet odesilateli\n\t\t\tif ( !$found ){\n\t\t\t\tforeach ($rows[1] as $os){\n\t\t\t\t\tif ( eregi('Vrácení zásilky odesílateli', $os) ){\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// pokud byla vracena, najdu si datum vraceni\n\t\t\t\t\t\t$date = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$pattern = '|([0-9]{2}\\.[0-9]{2}\\.[0-9]{4})|';\n\t\t\t\t\t\tpreg_match_all($pattern, $os, $date);\n\t\t\t\t\t\tif (!isset($date[1][0])) {\n\t\t\t\t\t\t\treturn $id;\n\t\t\t\t\t\t\tdie('nesedi pattern pri zjisteni dorucenosti baliku u CP - datum');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$date = date('d.m.Y', strtotime($date[1][0]));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// musim zmenit objednavku na vraceno a zapsat poznamku o tom, kdy byla vracena\n\t\t\t\t\t\t$this->id = $id;\n\t\t\t\t\t\t$this->save(array('status_id' => '8'), false, array('status_id', 'modified'));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// zapisu poznamku o tom, kdy byla vracena\n\t\t\t\t\t\t$note = array('order_id' => $id,\n\t\t\t\t\t\t\t'status_id' => '8',\n\t\t\t\t\t\t\t'administrator_id' => $this->Session->read('Administrator.id'),\n\t\t\t\t\t\t\t'note' => 'Zásilka byla automaticky identifikována jako vrácená zpět. Datum návratu: ' . $date\n\t\t\t\t\t\t);\n\t\t\t\t\t\tunset($this->Ordernote->id);\n\t\t\t\t\t\t$this->Ordernote->save($note);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// stav doruceno ani vraceno nemam, hledam ulozeni na poste\n\t\t\tif ( !$found ){\n\t\t\t\tforeach ($rows[1] as $os){\n\t\t\t\t\t// objednavka je ulozena na poste a ceka na vyzvednuti\n\t\t\t\t\t// zaroven ale kontroluju, jestli uz clovek nebyl upozornen,\n\t\t\t\t\t// tzn ze objednavka uz ma status cislo 9\n\t\t\t\t\tif ( eregi('After unsuccessful attempt of delivery', $os) && $order['Order']['status_id'] != 9 ){\n\t\t\t\t\t\t// pokud byla ulozena, najdu si datum ulozeni\n\t\t\t\t\t\t$date = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$pattern = '|([0-9]{2}\\.[0-9]{2}\\.[0-9]{4})|';\n\t\t\t\t\t\tpreg_match_all($pattern, $os, $date);\n\t\t\t\t\t\tif (!isset($date[1][0])) {\n\t\t\t\t\t\t\treturn $id;\n\t\t\t\t\t\t\tdie('nesedi pattern pri zjisteni dorucenosti baliku u CP - datum');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$date = date('d.m.Y', strtotime($date[1][0]));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// musim zmenit objednavku na ulozeno a zapsat poznamku o tom, kdy byla ulozena\n\t\t\t\t\t\t$this->id = $id;\n\t\t\t\t\t\t$this->save(array('status_id' => '9'), false, array('status_id', 'modified'));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// zapisu poznamku o tom, kdy byla ulozena\n\t\t\t\t\t\t$note = array('order_id' => $id,\n\t\t\t\t\t\t\t'status_id' => '9',\n\t\t\t\t\t\t\t'administrator_id' => $this->Session->read('Administrator.id'),\n\t\t\t\t\t\t\t'note' => 'Zásilka byla automaticky identifikována jako uložená na poště. Zákazníkovi byl odeslan email o uložení. Datum uložení: ' . $date\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( !$this->Status->change_notification($id, 9) ){\n\t\t\t\t\t\t\t$note['note'] = 'Zásilka byla automaticky identifikována jako uložená na poště. ZÁKAZNÍKOVI NEBYL ODESLÁN MAIL! Datum uložení: ' . $date; \n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tunset($this->Ordernote->id);\n\t\t\t\t\t\t$this->Ordernote->save($note);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn $id;\n\t}", "public function editRegularContentFromId() {}", "function category_edit($id)\n\t{\n\t\tglobal $db;\n\t\t$ccnoprice = $_POST['ccnoprice'];\n\t\t$sSQL = \"UPDATE \".PREFIX.\"categories SET ccnoprice='\".$ccnoprice.\"', ccTemplate='\".mysql_real_escape_string($_POST['ccTemplate']).\"' WHERE id=\".$id;\n\t\t$db->query($sSQL);\n\t}", "function AfficherEDT($tab_data, $entetes, $creneaux, $type_edt, $login_edt, $period) \r\n{\r\n\tglobal $icone_deposer_alerte;\r\n\t$peut_poster_message=peut_poster_message($_SESSION['statut']);\r\n echo (\"<div class=\\\"fenetre\\\">\\n\");\r\n\r\n echo(\"<div class=\\\"contenu\\\">\r\n\r\n\t\t<div class=\\\"coingh\\\"></div>\r\n <div class=\\\"coindh\\\"></div>\r\n <div class=\\\"partiecentralehaut\\\"></div>\r\n <div class=\\\"droite\\\"></div>\r\n <div class=\\\"gauche\\\"></div>\r\n\t\t<div class=\\\"coingb\\\"></div>\r\n\t\t<div class=\\\"coindb\\\"></div>\r\n\t\t<div class=\\\"partiecentralebas\\\"></div>\r\n\r\n <div class=\\\"tableau\\\">\\n\");\r\n\r\n\r\n// ===== affichage des colonnes\r\n// ===== Les \"display:none\" sont utilisés pour l'accessibilité\r\n $jour = 0;\r\n $isIconeAddUsable = true;\r\n while (isset($entetes['entete'][$jour])) {\r\n\r\n echo(\"<div class=\\\"colonne\".$creneaux['nb_creneaux'].\"\\\">\\n\");\r\n $jour_sem = $entetes['entete'][$jour];\r\n echo(\"<h2 class=\\\"entete\\\"><div class=\\\"cadre\\\"><strong>\".$jour_sem.\"</strong></div></h2>\\n\");\r\n $index_box = 0;\r\n while (isset($tab_data[$jour]['type'][$index_box]))\r\n {\r\n if ($tab_data[$jour]['type'][$index_box] == \"vide\") {\r\n \r\n echo(\"<div class=\\\"\".$tab_data[$jour]['duree'][$index_box].\"\\\">\");\r\n echo(\"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\");\r\n echo (\"<div class=\\\"\".$tab_data[$jour]['couleur'][$index_box].\"\\\">\\n\");\r\n echo (\"<div class=\\\"ButtonBar\\\">\");\r\n AfficheIconePlusNew($type_edt,$tab_data[$jour]['heuredeb_dec'][$index_box],$login_edt,$jour_sem,$tab_data[$jour]['id_creneau'][$index_box], $period);\r\n echo (\"</div>\\n\");\r\n echo (\"</div></div>\\n\"); \r\n \r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"erreur\")\r\n {\r\n \r\n echo(\"<div class=\\\"\".$tab_data[$jour]['duree'][$index_box].\"\\\">\");\r\n echo(\"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\");\r\n echo(\"<div class=\\\"cadreRouge\\\">\\n\");\r\n echo $tab_data[$jour]['contenu'][$index_box];\r\n echo (\"<div class=\\\"ButtonBar\\\">\");\r\n echo (\"</div>\\n\");\r\n echo (\"</div></div>\\n\"); \r\n \r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"conteneur\")\r\n {\r\n echo(\"<div class=\\\"\".$tab_data[$jour]['duree'][$index_box].\"\\\">\\n\");\r\n $isIconeAddUsable = false;\r\n \r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"cours\")\r\n {\r\n echo(\"<div class=\\\"\".$tab_data[$jour]['duree'][$index_box].\"\\\">\");\r\n echo(\"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\");\r\n echo (\"<div class=\\\"\".$tab_data[$jour]['couleur'][$index_box].\"\\\">\");\r\n echo $tab_data[$jour]['contenu'][$index_box];\r\n echo (\"<div class=\\\"ButtonBar\\\">\");\r\n AfficheEffacerIcone($type_edt,$login_edt,$tab_data[$jour]['id_cours'][$index_box], $period);\r\n AfficheModifierIcone($type_edt,$login_edt,$tab_data[$jour]['id_cours'][$index_box], $period);\r\n if ($isIconeAddUsable)\r\n {\r\n AfficheIconePlusAdd($type_edt,0,$login_edt,$jour_sem,$tab_data[$jour]['id_creneau'][$index_box], $period);\r\n }\r\n\r\n\t\t\t\tif($peut_poster_message) {\r\n\t\t\t\t\tif((isset($_GET['appel_depuis_form_message']))&&($_GET['appel_depuis_form_message']==\"y\")) {\r\n\t\t\t\t\t\t$tmp_jour_suivant=get_next_tel_jour($jour+1);\r\n\t\t\t\t\t\tif(($tmp_jour_suivant!=\"\")&&(is_numeric($tmp_jour_suivant))) {\r\n\t\t\t\t\t\t\t$tmp_chaine_date=strftime(\"%d/%m/%Y\", time()+24*3600*$tmp_jour_suivant);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t$tmp_chaine_date=strftime(\"%d/%m/%Y\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$chaine_heure_visibilite=\"\";\r\n\t\t\t\t\t\tif((isset($tab_data[$jour]['heuredebut'][$index_box]))&&($tab_data[$jour]['heuredebut'][$index_box]!='')) {\r\n\t\t\t\t\t\t\t$chaine_heure_visibilite=\"document.getElementById('heure_visibilite').value='\".$tab_data[$jour]['heuredebut'][$index_box].\"';\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\techo \"<div style='float:right;width:10px'><a href='#' onclick=\\\"document.getElementById('date_visibilite').value='$tmp_chaine_date';\".$chaine_heure_visibilite.\"return false;\\\" target='_blank' title=\\\"Fixer la date et l'heure du message\\ndans le module Alertes/Informations de Gepi\\\"><img src='../images/icons/sound.png' width='10' height='10' /></a></div>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif(isset($tab_data[$jour]['login_prof'][$index_box])) {\r\n\t\t\t\t\t\t// Récupérer le jour suivant\r\n\t\t\t\t\t\techo \"<div style='float:right;width:10px'><a href='../mod_alerte/form_message.php?message_envoye=y&amp;login_dest=\".$tab_data[$jour]['login_prof'][$index_box];\r\n\t\t\t\t\t\t$tmp_jour_suivant=get_next_tel_jour($jour+1);\r\n\t\t\t\t\t\tif(($tmp_jour_suivant!=\"\")&&(is_numeric($tmp_jour_suivant))) {\r\n\t\t\t\t\t\t\techo \"&date_visibilite=\".strftime(\"%d/%m/%Y\", time()+24*3600*$tmp_jour_suivant);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\techo \"&date_visibilite=\".strftime(\"%d/%m/%Y\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif((isset($tab_data[$jour]['heuredebut'][$index_box]))&&($tab_data[$jour]['heuredebut'][$index_box]!='')) {\r\n\t\t\t\t\t\t\techo \"&amp;heure_visibilite=\".$tab_data[$jour]['heuredebut'][$index_box];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\techo add_token_in_url().\"' target='_blank' title=\\\"Déposer pour ce professeur un message\\ndans le module Alertes/Informations de Gepi\\\"><img src='../images/icons/$icone_deposer_alerte' width='10' height='10' /></a></div>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n echo (\"</div>\\n\");\r\n echo (\"</div></div>\\n\"); \r\n \r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"fin_conteneur\")\r\n {\r\n echo(\"</div>\\n\");\r\n $isIconeAddUsable = true;\r\n }\r\n else \r\n {\r\n // ========= type de box non implémentée\r\n \r\n }\r\n\r\n $index_box++;\r\n }\r\n\r\n echo(\"</div>\\n\");\r\n\t\t/*\r\n\t\techo \"<hr /><pre>\";\r\n\t\tprint_r($tab_data[$jour]);\r\n\t\techo \"<pre>\";\r\n\t\t*/\r\n $jour++;\r\n }\r\n\r\n// ===== affichage de la colonne créneaux\r\n\r\n echo (\"<div class=\\\"creneaux\".$creneaux['nb_creneaux'].\"\\\">\\n\");\r\n echo (\"<div class=\\\"entete_creneaux\\\"></div>\\n\");\r\n for ($i = 0; $i < $creneaux['nb_creneaux']; $i++)\r\n {\r\n/*\r\n if(in_array($creneaux['creneaux'][$i], array('R0', 'R1', 'R2'))) {\r\n echo(\"<div class=\\\"demihoraires\\\"><div class=\\\"cadre\\\"><strong>\".$creneaux['creneaux'][$i].\"</strong></div></div>\\n\");\r\n }\r\n else {\r\n*/\r\n echo(\"<div class=\\\"horaires\\\"><div class=\\\"cadre\\\"><strong>\".$creneaux['creneaux'][$i].\"</strong></div></div>\\n\");\r\n// }\r\n }\r\n\r\n echo(\"</div></div><div class=\\\"spacer\\\"></div></div></div>\");\r\n\r\n/*\r\n//20141007\r\necho \"Tableau des créneaux<pre>\";\r\nprint_r($creneaux);\r\necho \"</pre>\";\r\n*/\r\n}", "public function regenerate_box($id_cierre, $id_venta) {\n \n $sql_venta = \"select * from venta where id = \".$id_venta;\n\n $result_venta = $this->connection->query($sql_venta)->result();\n\n $almacen_id = $result_venta[0]->almacen_id;\n $factura = $result_venta[0]->factura;\n $total_valor = $result_venta[0]->total_venta;\n\n // Movimiento cierre factura\n $sql_cierre = \"select * from movimientos_cierre_caja where numero = '\".$factura.\"'\";\n $result_cierre = $this->connection->query($sql_cierre)->result();\n $id_cierre_mov_anterior = $result_cierre[0]->Id_cierre;\n\n // Actualizamos el movimiento del cierre \n $this->connection->where('numero', $factura);\n $update = $this->connection->update('movimientos_cierre_caja', ['Id_cierre' => $id_cierre]);\n\n \n \n $this->connection->where('id', $id_cierre_mov_anterior);\n\n $cierre_anterior = $this->connection->get('cierres_caja')->row();\n\n if($cierre_anterior->fecha_fin_cierre != '') {\n $total_cierre_anterior = $cierre_anterior->total_cierre - $total_valor;\n $this->connection->where('id', $id_cierre_mov_anterior);\n $update = $this->connection->update('cierres_caja', ['total_cierre' => $total_cierre_anterior]);\n }\n\n // Actualizamos el nuevo cierre\n\n $this->connection->where('id', $id_cierre);\n\n $cierre_nuevo = $this->connection->get('cierres_caja')->row();\n\n $totoal_cierre_nuevo = $cierre_nuevo->total_cierre + $total_valor;\n\n $this->connection->where('id', $id_cierre);\n $update = $this->connection->update('cierres_caja', ['total_cierre' => $totoal_cierre_nuevo]);\n\n\n return true;\n\n\n\n \n\n\n\n\n }", "function getIdtitulaire($num_complete_cpte) {\n\n\tglobal $dbHandler,$global_id_agence;\n\t$db = $dbHandler->openConnection();\n\t$sql = \" SELECT id_cpte,id_titulaire,num_complet_cpte from ad_cpt where num_complet_cpte = '$num_complete_cpte' ; \";\n\t$result = $db->query($sql);\n\tif (DB::isError($result)) {\n\t\t$dbHandler->closeConnection(false);\n\t\tsignalErreur(__FILE__,__LINE__,__FUNCTION__); // \"DB: \".$result->getMessage()\n\t}\n\t$dbHandler->closeConnection(true);\n\tif ($result->numRows() == 0)\n\t\treturn NULL;\n\t$tmpRow = $result->fetchrow();\n\n\treturn $tmpRow;\n}", "public static function createBlockOfButtons($table='no_table_provided',$id=0){\n\t\tif(empty($id)) return \"<span>xBlocKx</span>\";\n\t\t\n\t\t$edSpan = \"<span class='btnEditBl'>\".self::createEdTablebutton($table,$id).\"</span>\";\n\t\t\n\t$btnDel = self::createDELTablebutton($table,$id);\n\t$btnSave = \"<button type='button' class='btn_save' onclick='btnSaveTableItem(\\\"{$table}\\\",{$id});'>save</button>\";\n\t$btnCancel = \"<button type='button' class='btn_cancel' onclick='btnCancelTableItem(\\\"{$table}\\\",{$id});'>cancel</button>\";\n\t\t$dscSpan = \"<span class='btnDSCBl hided'>{$btnDel}{$btnSave}{$btnCancel}</span>\";\n\t\treturn $edSpan.$dscSpan;\n\t}", "private function cancelaOtros($id,$lote){\n $cotizacion = Cotizacion_lotes::select('id')\n ->where('lotes_id','=',$lote)\n ->where('id','!=',$id)\n ->get();\n\n foreach ($cotizacion as $key => $cot) {\n $c = Cotizacion_lotes::findOrFail($cot->id);\n $c->estatus = 2;\n $c->save();\n }\n\n $lote = Lote::findOrFail($lote);\n $lote->contrato = 1;\n $lote->save();\n }", "function Cuerpo($acceso,$where)\n\t{\n\t\t$acceso->objeto->ejecutarSql(\"select id_persona from vista_orden order By id_orden desc LIMIT 1 offset 0\");\n\t\tif($row=row($acceso))\n\t\t{\n\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t}\n\t\telse{\n\t\t\t$acceso->objeto->ejecutarSql(\"select *from vista_tecnico LIMIT 1 offset 0\");\n\t\t\tif($row=row($acceso))\n\t\t\t{\n\t\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t\n\t\n\t\t$w=$this->TituloCampos();\n\t\t\n\t\t$dato=lectura($acceso,$where);\n\t\n\t\t$this->SetFont('Arial','',8);\n\t\t$cont=1;\n\t\t\n\t\t\n\t\t$salto=0;\n\t\t$f_act=date(\"d/m/Y\");\n\t\t$h_act=date(\"h:i:s A\");\n\t\t$nombre_zona=utf8_decode(trim($dato[0][\"nombre_zona\"]));\n\t\t$nombre_sector=utf8_decode(trim($dato[0][\"nombre_sector\"]));\n\t\t\n\t\t$cad=\"{\\\\rtf1\\\\ansi\\\\ansicpg1252\\\\deff0\\\\deflang11274{\\\\fonttbl{\\\\f0\\\\fswiss\\\\fcharset0 Arial;}}\n{\\\\*\\\\generator Msftedit 5.41.15.1512;}\\\\viewkind4\\\\uc1\\\\pard\\\\tx1988\\\\f0\\\\fs32 hola\\\\par\n\";\n\t\tfor($i=0;$i<count($dato);$i++){\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->SetFillColor(249,249,249);\n\t\t\t\n\t\t\t$id_contrato=trim($dato[$i][\"id_contrato\"]);\n\t\t//\tordenDeCorte($acceso,$id_contrato,$tecnico);\n\t\t\t\n\t\t\t$this->SetX(10);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell($w[0],5,$cont,\"1\",0,\"C\",$fill);\n\t\t\t$nro_contrato=trim($dato[$i][\"nro_contrato\"]);\n\t\t\t$cedula=trim($dato[$i][\"cedula\"]);\n\t\t\t$nombre=utf8_decode(trim($dato[$i][\"nombre\"]).\" \".trim($dato[$i][\"apellido\"]));\n\t\t\t$etiqueta=utf8_decode(trim($dato[$i][\"etiqueta\"]));\n\t\t\t$telefono=utf8_decode(trim($dato[$i][\"telefono\"]));\n\t\t\t$deuda=number_format(trim($dato[$i][\"deuda\"])+0, 2, ',', '.');\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"zona\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(40,5,utf8_decode(trim($dato[$i][\"nombre_zona\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t$nombre_zona=utf8_decode(trim($dato[$i][\"nombre_zona\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(14,5,strtoupper(_(\"sector\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_sector=utf8_decode(trim($dato[$i][\"nombre_sector\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"calle\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_calle=utf8_decode(trim($dato[$i][\"nombre_calle\"]));\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(17,5,strtoupper(_(\"nro casa\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$num_casa=utf8_decode(trim($dato[$i][\"numero_casa\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"edif\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$edificio=utf8_decode(trim($dato[$i][\"edificio\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"piso\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$n_p=utf8_decode(trim($dato[$i][\"numero_piso\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(8,5,strtoupper(_(\"ref\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$direc_adicional=utf8_decode(trim($dato[$i][\"direc_adicional\"]));\n\t\t\t//$this->MultiCell(81,5,utf8_decode(trim($dato[$i][\"direc_adicional\"])),'TR','J');\n\t\t\t$this->SetFont('Arial','',2);\n\t\t\t$this->Ln();\n\t\t\t$this->SetX(114);\n\t\t//\t$this->Cell(89,3,'',\"LR\",0,\"C\",$fill);\n\t\t\t//$this->Cell(array_sum($w),3,'',\"RL\",0,\"C\",$fill);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$fill=!$fill;\n\t\t\t\n\t\t\t$salto++;\n\t\t\tif($salto==11 && $salto!=count($dato)){\n\t\t\t\t$this->AddPage();\n\t\t\t\t\n\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t$salto=0;\n\t\t\t}\n\t\t\t\n\t\t\t$cad.=\"$nro_contrato \\\\tab $nro_contrato \\\\tab\n\";\n\t\t$cont++;\n\t\t}\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(array_sum($w),5,'','T');\n\t\t$cad.=\"}\n\";\n\t\treturn $cad;\n\t}", "function bank_transaction_echec($id_transaction, $args = array()){\n\n\t$default = array(\n\t\t'mode' => 'defaut',\n\t\t'date_paiement' => date('Y-m-d H:i:s'),\n\t\t'code_erreur' => '',\n\t\t'erreur' => '',\n\t\t'log' => '',\n\t\t'send_mail' => false,\n\t\t'reglee' => 'non',\n\t\t'where' => 'call_response',\n\t);\n\t$args = array_merge($default, $args);\n\t$logname = str_replace(array('1', '2', '3', '4', '5', '6', '7', '8', '9'), array('un', 'deux', 'trois', 'quatre', 'cinq', 'six', 'sept', 'huit', 'neuf'), $args['mode']);\n\n\tspip_log($t = $args['where'] . \" : transaction $id_transaction refusee ou annulee pour : \" . $args['code_erreur'] . \" (\" . $args['erreur'] . \") \" . $args['log'], $logname . _LOG_ERREUR);\n\t$set = array(\n\t\t\"mode\" => $args['mode'] . (isset($args['config_id']) ? '/' . $args['config_id'] : ''),\n\t\t\"statut\" => 'echec' . ($args['code_erreur'] ? '[' . $args['code_erreur'] . ']' : ''),\n\t\t\"date_paiement\" => $args['date_paiement'],\n\t\t\"erreur\" => $args['erreur'],\n\t\t\"message\" => _T(\"bank:erreur_transaction_echec\", array(\"ref\" => \"#$id_transaction\")),\n\t);\n\n\tif (!empty($args['set'])) {\n\t\t$set = array_merge($args['set'], $set);\n\t}\n\n\t// verifier que le champ erreur existe pour ne pas risquer de planter l'enregistrement si l'up de base n'a pas encore ete fait\n\tif ($row = sql_fetsel(\"*\", \"spip_transactions\", \"id_transaction=\" . intval($id_transaction))\n\t\tAND !isset($row['erreur'])){\n\t\tunset($set['erreur']);\n\t}\n\n\tsql_updateq(\"spip_transactions\", $set, \"id_transaction=\" . intval($id_transaction));\n\n\tif ($args['send_mail']){\n\t\t// avertir le webmestre\n\t\t$envoyer_mail = charger_fonction('envoyer_mail', 'inc');\n\t\t$envoyer_mail($GLOBALS['meta']['email_webmaster'], \"[\" . $args['mode'] . \"] Transaction Impossible\", $t);\n\t}\n\treturn array($id_transaction, false);\n}", "public function hook_after_edit($id) {\n\t\t\t//Your code here \n\t\t\t$cek = DB::table('purchase_invoices')->where('id',$id)->first(['status']);\n\t\t\tif($cek->status == 'submited'){\n\t\t\t\t$this->sendEmail();\n\t\t\t}\n\t\t\t// pr($id);\n\t\t\t// pr('hook_after_edit',1);\n\n\t }", "public function achatModifierUn($id,$achat)\n\t{\n\t\tGestion::modifier($achat);// votre code ici\n\t}", "function template_bits_bit_overview( $group, $content, $add_button ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tablerow3'>\n <div style='float:right;padding-top:3px'><strong>{$group['easy_name']}</strong></div>\n <div>\n <a href='#' onclick=\"parent.template_close_bits(); return false;\" title='Закрыть блок'><img src='{$this->ipsclass->skin_acp_url}/images/skineditor_close.gif' border='0' alt='Закрыть' /></a>&nbsp;\n <!--<a href='#' onclick=\"toggleselectall(); return false;\" title='Пометить все/Снять отметку со всех'><img src='{$this->ipsclass->skin_acp_url}/images/skineditor_tick.gif' border='0' alt='Отметить/снять отметку' /></a>-->\n </div>\n</div>\n<div id='template-bits-container'>\n{$content}\n</div>\n <div style='background:#CCC'>\n <div align='left' style='padding:5px;margin-left:25px'>\n <div style='float:right'>$add_button</div>\n <div><input type='button' onclick='parent.template_load_bits_to_edit(\"{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=template-edit-bit&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}&group_name={$group['group_name']}&type=multiple\")' class='realbutton' value='Изменить выбранное' /></div>\n </div>\n</div>\n<script type=\"text/javascript\">\n//<![CDATA[\nparent.template_bits_onload();\n//]]>\n</script>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function ler_id($id) {\n $x = (int)$id;\n if($x >= $this->bd[0][0] || $x <= 0) {return false;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\n return true;\n }", "function modifyComentario($id_evento,$id_comentario,$contenido){\n $mysqli = Conectar();\n strip_tags($contenido);\n $mysqli -> query(\"Update comentarios Set comentario='$contenido' Where id_evento=$id_evento and id_comentario=$id_comentario\");\n }", "function edit_content($r){\n global $arResult;\n global $Pages; //echo '<pre>';print_r($Pages);echo '</pre>';\n global $smarty;\n access();\n access_rights($r);\n $tab = NAVIGATOR;\n $GoTo = ADMIN_PANEL.'/pages';\n $pos1 = $row = '';\n if($arResult->POS1 !=''){\n $pos1 = $arResult->POS1;\n }\n else{\n header(\"Location: \".$GoTo);\n }\n\n foreach($Pages as $key => $arr){\n if($arr[\"link\"] == '') $arr['link'] = 'MainPage';\n if($arr[\"link\"] == $pos1){\n $row = $arr;\n }\n }\n /*....................................table_redact............................................*/\n $name_content = 'content';\n $helpbox = 'helpbox';\n $i = '1';\n $addbbcode20 = '<select name=\"addbbcode20\" onChange=\"bbfontstyle(\\'[color=\\' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + \\']\\', \\'[/color]\\', \\''.$i.'\\'); this.selectedIndex=0;\" onMouseOver=\"helpline(\\'s\\', \\''.$i.'\\')\" onMouseOut=\"helpline(\\'h\\', \\''.$i.'\\')\">';\n $smarty->assign('content', $row[\"content\"]);\n $smarty->assign('name_content', $name_content);\n $smarty->assign('helpbox', $helpbox);\n $smarty->assign('i', $i);\n $smarty->assign('addbbcode20', $addbbcode20);\n $table_redact = $smarty->fetch('inner-tpl/edit-product/tableRedact.tpl');\n ////.......................................................\n $zagolovok = htmlspecialchars ($row['zagolovok']);\n $title = '<a href=\"/'.$row['link'].'\">'.$row['title'].'</a>';\n $back = '<a href=\"'.ADMIN_PANEL.'/pages\" '.STYLE12.'>'.BACK_IMG.' назад</a>';\n\n $smarty->assign('back', $back);\n $smarty->assign('title', $title);\n $smarty->assign('zagolovok', $zagolovok);\n $smarty->assign('id', $row['id']);\n $smarty->assign('table_redact', $table_redact);\n $smarty->assign('table', $tab);\n $smarty->assign('link', $_SERVER['REQUEST_URI']);\n $html = $smarty->fetch('inner-tpl/content/editContent.tpl');\n\n return $html;\n}", "public function beheerderWijzigen($id) {\n if (!$this->authex->loggedIn()) {\n redirect('home/login');\n }\n\n $data['title'] = 'Hondenschool Bollie';\n $data['nobox'] = true; // geen extra rand rond hoofdmenu\n $data['user'] = $this->authex->getUserInfo();\n $data['auteur'] = 'Jarne Peeters, Bart Buyens';\n\n $this->load->model('persoon_model');\n $data['beheerder'] = $this->persoon_model->get($id);\n\n $partials = array('header' => 'main_header', 'content' => 'beheerderAanpassen', 'menu' => 'main_menu');\n $this->template->load('main_master', $partials, $data);\n }", "public function set_pengiriman($id){ // untuk membuat database langkah pengiriman\n\t\t$cek = $this->M_biodata->get_biodata($id)->result();\n\t\t$this->load->model('M_transaksi');\n\t\tif (count($cek)>0){\n\t\t\tforeach ($cek as $c){\n\t\t\t\t\n\t\t\t};\n\t\t\t$data = array(\n\t\t\t'nama' => $c->namaAlumni,\n\t\t\t'alamat' => $c->alamat,\n\t\t\t'noHp' => $c->noHp,\n\t\t\t'id_pemesan' => $c->id_alumni\n\t\t\t);\t\n\t\t\t$this->M_transaksi->set_pengiriman($data,'pengiriman');\n\t\t$this->set_pembayaran($id);\n\t\t}\n\t}", "public function Afficher_Panier($id_commande) {\n \n // requete sur la base de donnée\n $sql = \"SELECT tb_article.id_article,a_designation,a_pht,qte_cmde,url_image,t_taux, tb_ligne_commande.id_commande, a_pht*(1+tb_tva.t_taux) AS PRIX\n FROM tb_article,tb_commande,tb_ligne_commande, tb_tva \n WHERE tb_article.id_article = tb_ligne_commande.id_article \n AND tb_ligne_commande.id_commande = tb_commande.id_commande \n AND tb_article.id_tva = tb_tva.id_tva \n AND tb_commande.id_commande =$id_commande\";\n \n $req = $this->db->query($sql);\n\n $enteteTableau = '<table class=\"tableauPanier\">\n <caption>Contenu du panier</caption>\n <tr>\n <th>image</th>\n <th>Désignation</th>\n <th>Prix</th>\n <th>Quantité</th>\n <th></th>\n <th>modification</th>\n <th></th>\n </tr>';\n $contenuTableau =\"\"; \n while ($resultat =$req->fetch(PDO::FETCH_OBJ)) {\n\n $contenuTableau .= \"\n\n <tr>\n <td><img src= \\\"$resultat->url_image\\\"/> </td>\n <td>$resultat->a_designation</td>\n <td>$resultat->PRIX €</td>\n <td>$resultat->qte_cmde</td>\n <td><a href=\\\"?id_article=$resultat->id_article&action=add\\\"> Ajouter</a></td>\n// <td><a href=\\\"?id_article=$resultat->id_article&action=substract\\\">RETIRER</a> </td>\n <td><a href=\\\"?id_article=$resultat->id_article&action=del\\\"> Supprimer</a></td>\n </tr>\n \";\n }\n $finTableau = '</table>';\n \n $tableau = $enteteTableau\n .$contenuTableau\n .$finTableau;\n \n return $tableau;\n \n }", "public function iloscMinus($id)\n\t\t{\n\t\t\t$data = array();\n\t\t\t\tif($id === NULL || $id === \"\")\n\t\t\t\t\t$data['error'] = 'Nieokreślone ID!';\n\t\t\t\telse\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$stmt2 = $this->pdo->prepare('SELECT IdTowar, ilosc FROM `koszyk` where IdTowar=:id');\n\t\t\t\t\t\t$stmt2 -> bindValue(':id',$id,PDO::PARAM_INT);\n\t\t\t\t\t\t$ilosc = $stmt2 -> execute();\n\t\t\t\t\t\t$data = $stmt2 -> fetchAll();\n\t\t\t\t\t\tforeach($data as $result)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ilosc = $result['ilosc'];\n\t\t\t\t\t\t\t$idt = $result['IdTowar'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($ilosc>1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo $id.'<br>towary: ';\n\t\t\t\t\t\t\tvar_dump($_COOKIE['idtowary']);\n\t\t\t\t\t\t\t$stmt = $this->pdo->prepare('UPDATE koszyk SET ilosc=ilosc-1 WHERE IdTowar=:id');\n\t\t\t\t\t\t\t$stmt -> bindValue(':id',$id,PDO::PARAM_INT);\n\t\t\t\t\t\t\t$wynik_zapytania = $stmt -> execute();\n\n\t\t\t\t\t\t\t$stmt2 = $this->pdo->prepare(\"update towar set towar.StanMagazynowyDysponowany = towar.StanMagazynowyDysponowany+1 where IdTowar = $idt\");\n\t\t\t\t\t\t\t$stmt2 -> execute();\n\n\t\t\t\t\t\t\t$cookie2 = $_COOKIE['idtowary'];\n\t\t\t\t\t\t\t$cookie2 = stripslashes($cookie2);\n\t\t\t\t\t\t\t$ids = json_decode($cookie2, true);\n\n\t\t\t\t\t\t\tif(($k = array_search($idt, $ids)) === false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// echo 'nie ma';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t //echo 'jest';\n\t\t\t\t\t\t\t $indeks = array_search($idt, $ids);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$cookie = $_COOKIE['ilosci'];\n\t\t\t\t\t\t\t$cookie = stripslashes($cookie);\n\t\t\t\t\t\t\t$quantity = json_decode($cookie, true);\n\t\t\t\t\t\t\techo '<br>';\n\t\t\t\t\t\t\tif(($k = array_search($idt, $ids)) === false){}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo '<br>ilosci ';\n\t\t\t\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\t\t\t\t$ilosc=$ilosc-1;\n\t\t\t\t\t\t\t $quantity[$indeks]=$ilosc;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$dane = json_encode($quantity);\n\t\t\t\t\t\t\tsetcookie('ilosci', $dane,time()+60*60*24*30,'/');\n\t\t\t\t\t\t\t$_COOKIE['ilosci'] = $dane;\n\t\t\t\t\t\t\techo '<br>';\n\t\t\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(\\PDOException $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t$data['error'] =$data['error'].'<br> Błąd wykonywania operacji usunięcia';\n\t\t\t\t\t}\n\t\t\t\t\t/*var_dump($_COOKIE['idtowary']);\n\t\t\t\t\techo '<br>';\n\t\t\t\t\tvar_dump($_COOKIE['ilosci']);\n\t\t\t\t\techo '<br>';*/\n\t\t\t\treturn $data;\n\n\t\t}", "function buscar_cuenta_por_id($id) {\n $sql = \"SELECT cuenta_plan_contable,descripcion_plan_contable FROM prosic_plan_contable WHERE id_plan_contable = \" . $id;\n $result = $this->Consulta_Mysql($sql);\n $row = mysql_fetch_array($result);\n return $row;\n }", "function erstelleSeite($charid, $pdf)\n{\n\t$sql = 'SELECT node_id FROM drowcon_nodedata WHERE name=\\'Charakter_id\\' AND value=\\''.$charid.'\\'';\n\t$query = mysql_query($sql);\n\tif ( $row = mysql_fetch_row($query))\n\t{\n\t\t$id = $row[0];\n\t}\n\telse\n\t{\n\t\tthrow new error(\"Keine Charakterseite für diesen Charakter gefunden!\");\n\t}\n\tmysql_free_result($query);\n\t$charakter = get_charakter($charid);\n\t$pdf->AddPage();\n\t$pdf->SetFont('Arial', 'B', 16);\n\t$pdf->Cell(100, 7, $charakter['Name']);\n\t$pdf->Cell(80, 7, $charakter['Hausname'],0,0,'R');\n\t$bbasedir = get_dir_name('files',$id).'/published/';\n\tif ( file_exists($bbasedir.'Spielerbild.jpg') ) {\n\t\t$pdf->Image($bbasedir.'Spielerbild.jpg', 180, 38, 20, 30, 'JPG');\n\t}\n\t// Rahmen für das Bild\n\t$pdf->Rect(180, 38, 20, 30);\n\t$pdf->SetFont('Arial', '', 10);\n\t$pdf->Ln();\n\tif ( $charakter['Charstatus'] != '') \n\t{\n\t\t$pdf->Write(10, $charakter['Charstatus']);\n\t\t$pdf->Ln();\n\t}\n\t$pdf->Cell(25, 5, 'Realname:');\n\t$pdf->Cell(60, 5, $charakter['Spielername']);\n\t$pdf->Cell(35, 5, 'EP aus Contagen:');\n\t$pdf->Cell(40, 5, $charakter['Contage'].' ('.number_format($charakter['Contage']/30,1).' Spieltage)');\n\t$pdf->Ln();\n\t$pdf->Cell(25, 5, 'Position:');\n\t$pdf->Cell(60, 5, $charakter['Position']);\n\t$pdf->Cell(35, 5, 'EP gesamt:');\n\t$pdf->Cell(10, 5, bestimmeEP($charakter['Charakter_id']));\n\t$pdf->Ln();\n\t$pdf->Cell(25, 5, 'Klasse:');\n\t$pdf->Cell(60, 5, $charakter['Klasse']);\n\t$pdf->Cell(35, 5, 'EP frei:');\n\t$pdf->Cell(10, 5, $charakter['EP']);\n\t$pdf->Ln();\n\t$pdf->Cell(25, 5, 'Gunststufe:');\n\t$pdf->Cell(60, 5, $charakter['Gunststufe']);\n\t$pdf->Cell(35, 5, 'Gunstpunkte:');\n\t$s = $charakter['Gunstpunkte'];\n\tif ( $charakter['Gunstpunkte_Temp'] != 0)\n\t{\n\t\t$s .= ' (zzgl.'.$charakter['Gunstpunkte_Temp'].' tmp)';\n\t}\n\t$pdf->Cell(10, 5, $s);\n\t$pdf->Ln();\n\t$pdf->Cell(25, 5, 'Rasse:');\n\t$pdf->Cell(60, 5, $charakter['Rasse']);\n\t$pdf->Cell(35, 5, 'Gunstpunkte Status:');\n\t$Gunst = bestimmeCharGunst($charakter['Charakter_id']);\n\t$pdf->Cell(10, 5, abs($Gunst-$charakter['Gunstpunkte']-$charakter['Gunstpunkte_Temp']));\n\t$pdf->Ln();\n\t$pdf->Cell(25, 5, 'Adlig/Gemein:');\n\tif ( $charakter['Adlig'])\n\t{\n\t\t$pdf->Cell(60, 5, 'Adlig');\n\t}\n\telse\n\t{\n\t\t$pdf->Cell(60, 5, 'Gemein');\n\t}\n\t$pdf->Cell(35, 5, 'Gunstpunkte Gesamt:');\n\t$pdf->Cell(10, 5, $Gunst);\n\t$pdf->Ln();\n\t$sql = 'SELECT * FROM T_Eigenschaften INNER JOIN T_Charakter_Eigenschaften ON F_Eigenschaft_id=Eigenschaft_id '.\n\t'WHERE F_Charakter_id='.$charakter['Charakter_id'].' ORDER BY Art, Eigenschaftsname';\n\t$query = mysql_query($sql);\n\t$summe = 0;\n\t$Art = '';\n\t$Nr = 0;\n\t$Anz = 0;\n\t$Punkte = 0;\n\t$Eigenschaft = '';\n\twhile ( $row = mysql_fetch_array($query))\n\t{\n\t\tif ( $Art != $row['Art'])\n\t\t{\n\t\t\t// prüfen ob stapel \n\t\t\tif ( $Eigenschaft != '' )\n\t\t\t{\n\t\t\t\t$pdf->Cell(10, 5, $Anz,1 );\n\t\t\t\t$pdf->Cell(70, 5, $Eigenschaft,1);\n\t\t\t\t$pdf->Cell(10, 5, $Punkte,1);\n\t\t\t\t$Nr++;\n\t\t\t\tif ( $Nr % 2 == 0)\n\t\t\t\t{\n\t\t\t\t\t$pdf->Ln();\n\t\t\t\t}\n\t\t\t\t$Eigenschaft = '';\n\t\t\t}\t\n\t\t\t$Art = $row['Art'];\n\t\t\tif ( $Nr % 2 != 0)\n\t\t\t{\n\t\t\t\t$pdf->Ln();\n\t\t\t}\n\t\t\t$Nr = 0;\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial', 'B', 10);\n\t\t\t$pdf->Cell(60,5, $Art);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial', '', 10);\n\t\t}\n\t\tif ( $Eigenschaft != $row['Eigenschaftsname'] && $row['Stapelbar'] == 1)\n\t\t{\n\t\t\tif ( $Eigenschaft != '' )\n\t\t\t{\n\t\t\t\t$pdf->Cell(10, 5, $Anz,1);\n\t\t\t\t$pdf->Cell(70, 5, $Eigenschaft,1);\n\t\t\t\t$pdf->Cell(10, 5, $Punkte,1);\n\t\t\t\t$Nr++;\n\t\t\t\tif ( $Nr % 2 == 0)\n\t\t\t\t{\n\t\t\t\t\t$pdf->Ln();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$Eigenschaft = $row['Eigenschaftsname'];\n\t\t\t$Anz = 1;\n\t\t\tif ( $row['Erfahungspunkte'] != 0)\n\t\t\t{\n\t\t\t\t$Punkte = $row['Erfahrungspunkte'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Punkte = '';\n\t\t\t}\n\t\t}\n\t\telseif ( $row['Stapelbar'] == 1 )\n\t\t{\n\t\t\t$Anz++;\n\t\t\tif ( $Punkte != '' ) $Punkte += $row['Erfahrungspunkte'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// prüfen Stapel \n\t\t\tif ( $Eigenschaft != '' )\n\t\t\t{\n\t\t\t\t$pdf->Cell(10, 5, $Anz,1);\n\t\t\t\t$pdf->Cell(70, 5, $Eigenschaft,1);\n\t\t\t\t$pdf->Cell(10, 5, $Punkte,1);\n\t\t\t\t$Nr++;\n\t\t\t\tif ( $Nr % 2 == 0)\n\t\t\t\t{\n\t\t\t\t\t$pdf->Ln();\n\t\t\t\t}\n\t\t\t\t$Eigenschaft = '';\n\t\t\t}\n\t\t\tif ( $row['Erfahrungspunkte'] != 0 )\n\t\t\t{\n\t\t\t\t$pdf->Cell(10, 5, '',1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pdf->Cell(10, 5, date('m/y',strtotime($row['Erstellt'])),1);\n\t\t\t}\n\t\t\t$pdf->Cell(70, 5, $row['Eigenschaftsname'],1);\n\t\t\t$pdf->Cell(10, 5, $row['Erfahrungspunkte'],1);\n\t\t\t$Nr++;\n\t\t\tif ( $Nr % 2 == 0)\n\t\t\t{\n\t\t\t\t$pdf->Ln();\n\t\t\t}\n\t\t}\n\t}\n\tif ( $Eigenschaft != '' )\n\t{\n\t\t$pdf->Cell(10, 5, $Anz,1);\n\t\t$pdf->Cell(70, 5, $Eigenschaft,1);\n\t\t$pdf->Cell(10, 5, $Punkte,1);\n\t\t$Nr++;\n\t\tif ( $Nr % 2 == 0)\n\t\t{\n\t\t\t$pdf->Ln();\n\t\t}\n\t}\n\tmysql_free_result($query);\n\t\n\t// Con-Teilnahmen\n\t$pdf->Ln();\n\t$pdf->Ln();\n\t$pdf->SetFont('Arial', 'B', 10);\n\t$pdf->Cell(60,5, 'Kampagnenteilnahmen');\n\t$pdf->SetFont('Arial', '', 10);\n\t$pdf->Ln();\n\t$daten = get_profile($charakter['F_Spieler_id'], false);\n\tforeach ( $daten as $key => $value)\n\t{\n\t\tif ( $value == $id )\n\t\t{\n\t\t\t$veranstaltung = substr($key, 4);\n\t\t\tif ( is_numeric($veranstaltung))\n\t\t\t{\n\t\t\t\t// Achtung: Flavour = 1 - > Standardsprache, ggf. ändern wenn andere genutzt\n\t\t\t\t$node = get_nodedata($veranstaltung, 1);\n\t\t\t\t$pdf->Cell(80, 5, $node['title']);\n\t\t\t\t$pdf->Ln();\n\t\t\t}\n\t\t}\n\t}\n\treturn $pdf;\n}", "function getSoldeCpte($id_cpte)\n{\n global $dbHandler;\n global $global_id_agence;\n\n $db = $dbHandler->openConnection();\n\n $sql = \"SELECT solde \";\n $sql .= \"FROM ad_cpt \";\n $sql .= \"WHERE id_ag = $global_id_agence AND id_cpte = $id_cpte \";\n\n $result=$db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__,__LINE__,__FUNCTION__);\n }\n\n $row = $result->fetchrow();\n\n $solde = $row[0];\n\n $dbHandler->closeConnection(true);\n return $solde;\n}", "public function edit( $dossierpcg66_id ) {\n\t\t\t// Initialisation\n\t\t\t$foyer_id = $this->Dossierpcg66->field( 'foyer_id', array( 'id' => $dossierpcg66_id ) );\n\t\t\t$this->_init_add_edit($foyer_id);\n\n\t\t\t// Récupération de données\n\t\t\t$dossierpcg66 = $this->WebrsaDossierpcg66->findDossierpcg($dossierpcg66_id);\n\t\t\t$this->assert( !empty( $dossierpcg66 ), 'invalidParameter' );\n\t\t\t$personnespcgs66 = $this->WebrsaDossierpcg66->findPersonnepcg($dossierpcg66_id);\n\n\t\t\t$paramsAccess = $this->WebrsaDecisiondossierpcg66->getParamsForAccess(\n\t\t\t\t$dossierpcg66_id, WebrsaAccessDecisionsdossierspcgs66::getParamsList()\n\t\t\t);\n\t\t\t$this->set('ajoutDecisionPossible', Hash::get($paramsAccess, 'ajoutPossible') !== false);\n\n\t\t\t$query = $this->WebrsaDecisiondossierpcg66->completeVirtualFieldsForAccess(\n\t\t\t\t$this->WebrsaDecisiondossierpcg66->queryIndex($dossierpcg66_id)\n\t\t\t);\n\n\t\t\t$decisionsdossierspcgs66 = WebrsaAccessDecisionsdossierspcgs66::accesses(\n\t\t\t\t$this->Dossierpcg66->Decisiondossierpcg66->find('all', $query)\n\t\t\t);\n\n\t\t\t$fichiersEnBase = Hash::extract( $this->WebrsaDossierpcg66->findFichiers($dossierpcg66_id), '{n}.Fichiermodule' );\n\n\t\t\t// Variables pour la vue\n\t\t\t$etatdossierpcg = Hash::get($dossierpcg66, 'Dossierpcg66.etatdossierpcg');\n\t\t\t$lastDecisionId = Hash::get($decisionsdossierspcgs66, '0.Decisiondossierpcg66.id');\n\t\t\t$ajoutDecision = Hash::get($decisionsdossierspcgs66, '0.Decisiondossierpcg66.validationproposition') !== null;\n\t\t\t$this->set(\n\t\t\t\tcompact(\n\t\t\t\t\t'ajoutDecision',\n\t\t\t\t\t'lastDecisionId',\n\t\t\t\t\t'decisionsdossierspcgs66',\n\t\t\t\t\t'personnespcgs66',\n\t\t\t\t\t'dossierpcg66_id',\n\t\t\t\t\t'etatdossierpcg',\n\t\t\t\t\t'fichiersEnBase',\n\t\t\t\t\t'dossierpcg66'\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Sauvegarde du formulaire\n\t\t\tif( !empty( $this->request->data ) ) {\n\t\t\t\t$this->_save_add_edit();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->request->data = $dossierpcg66;\n\t\t\t}\n\n\t\t\t// Modification du request data uniquement à la fin\n\t\t\t$this->set( 'personnedecisionmodifiable', $this->_isDecisionModifiable( $foyer_id, $etatdossierpcg ) );\n\t\t\t$this->request->data['Dossierpcg66']['user_id'] = $dossierpcg66['Dossierpcg66']['poledossierpcg66_id'].'_'.$dossierpcg66['Dossierpcg66']['user_id'];\n\t\t}", "private function _getContentBlockById($id, $wantContent)\r\n {\r\n foreach ($this->_bagBody->objects as $obj)\r\n if ($obj['key'] == $id)\r\n if ($wantContent)\r\n return $obj['contents'];\r\n else\r\n return $obj['dictionary'];\r\n return \"\";\r\n }", "function buscarPorId($id) {\r\n \r\n }", "public function actionCertificadoVarios($id) {\n $idTmp = explode(',', $id);\n $recordBeneTemp = BeneficiarioTemporal::model()->findAllByAttributes(array('id_beneficiario_temporal' => $idTmp));\n\n $this->render('certificadoVarios', array('recordBeneTemp' => $recordBeneTemp));\n }", "private function lstComChap($idchap){\n\t\t\t$commentaires = $this->com->getLastCom($idchap);\n\t\t\t\t\n\t\t\techo $commentaires;\n\t\t}", "public function edit($id)\n\t{\n\t/*$data['bmt'] = $this->m_bmt->jenisBmt('bmt')->result();*/\n\t$data['bahan']=$this->m_bahan->getBmtWhereId($id);\n\t$data['jenisbmt']=$this->m_bahan->jenisBmt();\n\t$this->load->view('admin/bahan/edit_bahan',$data);\n\t}", "public function cash($id) {\n// $cash = array_shift($cash);\n $this->checked = 0;\n $this->dispatchBrowserEvent('cash-detail', $id);\n }", "public function criarBloco_1_Vazio()\n {\n $this->Sped->criarLinha('1', '1001', \"|1001|0|\");\n $this->Sped->criarLinha('1', '1010', \"|1010|N|N|N|N|N|N|N|N|N|N|N|N|N|\");\n $this->Sped->criarEncerramentoBloco('1', '1990', \"1990\");\n }", "public function commissionPartenaire()\n {\n $data['liste_part'] = $this->partenaireModels->getPartenaire();\n $this->views->setData($data);\n\n $this->views->getTemplate('reporting/commissionPartenaire');\n }", "function CK12()\n {\n global $template;\n global $id,$top_url;\n\n $val_item = array ( \"supply_code\"=>\"공급처 코드\" );\n $this->validate ( $val_item );\n\n // 상세 정보 가져온다\n $data = $this->get_detail( $id );\n\n $master_code = substr( $template, 0,1);\n include \"template/\" . $master_code .\"/\" . $template . \".htm\";\n }", "public function bikecateditAction(){\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/system/db_selVCat.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/bike/db_selBikeCat.php');\n\t\t\n\t\t$lang = $this -> lang;\n\t\t$p = $this -> getRequest() -> getParams();\n\t\t\n\t\t//determine bike vehicle cat id\n\t\t$bikeVcatID = null;\n\t\tif (isset($p['bcid'])){\n\t\t\t$bikeVcatID = $p['bcid'];\n\t\t}\n\t\t\n\t\tif ($bikeVcatID != null){\n\t\t\t$bikeVcat = db_selBikeCat(array('bikeCatID' => $bikeVcatID));\n\t\t\tif (($bikeVcat != false) && is_array($bikeVcat)){\n\t\t\t\t\t$bikeVcat = $bikeVcat[0];\n\t\t\t\n\t\t\t\t\t//Edit bike category\n\t\t\t\t\tif (isset($p['bikeCatEdit'])){\n\t\t\t\t\t\t$p['bikeCatID'] = $bikeVcatID;\n\t\t\t\t\t\t$p['bikeCat'] = $bikeVcat;\n\t\t\t\t\t\t$this ->editbikecatAction($p);\n\t\t\t\t\t\t$bikeVcatH = db_selBikeCat(array('bikeCatID' => $bikeVcatID));\n\t\t\t\t\t\tif (($bikeVcatH != false) && is_array($bikeVcatH) && (count($bikeVcatH) > 0)){\n\t\t\t\t\t\t\t$bikeVcat = $bikeVcatH[0];\n\t\t\t\t\t\t\t$this -> view -> info = $lang['AINFO_15'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this -> view -> bikeVcat = $bikeVcat;\n\t\t\t\t\tif ($bikeVcat['level']-1 > 0){\n\t\t\t\t\t\t$bikeVcatParent = db_selBikeCat(array('level' => ($bikeVcat['level']-1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t, 'lftLEq' => $bikeVcat['lft']\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t, 'rgtBEq' => $bikeVcat['rgt']\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\tif (($bikeVcatParent != false) && is_array($bikeVcatParent) && (count($bikeVcatParent) > 0)){\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this -> view -> bikeVcatParent = $bikeVcatParent[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$bikeVcatAll = db_selBikeCat();\n\t\t\t\t\t$this -> view -> bikeVcatAll = $bikeVcatAll;\n\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$this -> view -> error = $lang['AERR_36'];\n\t\t\t\t$this -> _forward('bikecat');\n\t\t\t}\n\t\t}else{\n\t\t\t$this -> view -> error = $lang['AERR_36'];\n\t\t\t$this -> _forward('bikecat');\n\t\t}\n\t}", "function setIdComentaire($idCommentaire) {\n $this->idCommentaire = $idCommentaire;\n }", "function TablaTicketCreditos()\n {\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$ve = new Login();\n $ve = $ve->CreditosPorId();\n\t\n\t$this->SetFont('courier','B',14);\n\t$this->SetFillColor(2,157,116);\n\t$this->SetXY(13, 6);\n $this->Cell(13, 5, \"TICKET DE ABONO\", 0 , 0);\n\t$this->Ln(5);\n\t\n\t$this->SetFont('courier','B',6);\n\t$this->SetFillColor(2,157,116);\n\t$this->SetXY(4, 13);\n\t$this->CellFitSpace(65,3,utf8_decode($con[0]['direcempresa']),0,1,'C');\n\t$this->SetXY(4, 15);\n\t$this->CellFitSpace(65,3,\"RIF:\".utf8_decode($con[0]['rifempresa']),0,1,'C');\n\t$this->SetXY(4, 17);\n\t$this->CellFitSpace(65,3,utf8_decode($con[0]['nomempresa']),0,1,'C');\n\t$this->SetXY(4, 19);\n\t$this->CellFitSpace(65,3,\"TLF:\".utf8_decode($con[0]['tlfempresa']),0,1,'C');\n\t\t\n\t$this->SetFont('courier','B',7);\n\t$this->SetFillColor(2,157,116);\n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n\t$this->SetXY(3, 25);\n $this->Cell(3, 5, \"N° VENTA: \".utf8_decode($ve[0]['codventa']), 0 , 0);\n\t$this->SetXY(3, 28);\n $this->Cell(3, 5, \"N° SERIE: \".utf8_decode($ve[0]['codserieve']), 0 , 0);\n\t$this->SetXY(3, 31);\n $this->Cell(3, 5, \"N° AUTORIZACIÓN: \".utf8_decode($ve[0]['codautorizacionve']), 0 , 0);\n\t$this->SetXY(3, 34);\n $this->Cell(3, 5, \"FECHA VENTA: \".utf8_decode($ve[0]['fechaventa']), 0 , 0);\n\t$this->SetXY(3, 37);\n $this->Cell(3, 5, \"FECHA IMPRESIÓN: \".date(\"Y-m-d h:i:s A \",time()+1800), 0 , 0);\n\t\n\t$this->Ln(6);\n\t$this->SetXY(3, 44);\n $tra = new Login();\n $reg = $tra->VerDetallesVentas();\n\t$cantidad=0;\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t\n\t $this->SetX(3);\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.2);\n\t $this->SetFont('courier','',6); \n\t $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n\t $this->CellFitSpace(5,3,utf8_decode($reg[$i][\"cantventa\"]),0,0,'C');\n $this->CellFitSpace(45,3,utf8_decode($reg[$i][\"producto\"]),0,0,'L');\n\t $this->CellFitSpace(17,3,utf8_decode(number_format($reg[$i][\"precioventa\"], 2, '.', ',')),0,0,'R');\n $this->Ln();\t \n }\n \n $this->Ln();\n\t$this->SetFont('courier','',6);\n\t$this->SetFillColor(2,157,116);\n\t$this->SetX(4);\n\t$this->CellFitSpace(60,3,\"SUBTOTAL IVA \".$ve[0][\"ivave\"].'% : '.utf8_decode(number_format($ve[0][\"subtotalivasive\"], 2, '.', ',')),0,1,'L');\n\t$this->SetX(4);\n\t$this->CellFitSpace(60,3,\"SUBTOTAL IVA 0%: \".utf8_decode(number_format($ve[0][\"subtotalivanove\"], 2, '.', ',')),0,1,'L');\n\t$this->SetX(4);\n\t$this->CellFitSpace(60,3,\"IVA \".$ve[0][\"ivave\"].'% : '.utf8_decode(number_format($ve[0][\"totalivave\"], 2, '.', ',')),0,1,'L');\n\t$this->SetX(4);\n\t$this->SetFont('courier','',6);\n\t$this->CellFitSpace(60,3,\"DESCUENTO \".$ve[0][\"descuentove\"].'% : '.utf8_decode(number_format($ve[0][\"totaldescuentove\"], 2, '.', ',')),0,1,'L');\n\t$this->SetX(4);\n\t$this->SetFont('courier','B',6);\n\t$this->CellFitSpace(60,3,\"PRECIO FINAL: \".utf8_decode(number_format($ve[0][\"totalpago\"], 2, '.', ',')),0,1,'L');\n\t$this->SetX(4);\n\t$this->CellFitSpace(60,3,\"TIPO PAGO: \".utf8_decode($ve[0]['tipopagove'].\" - \".$ve[0]['formapagove']),0,1,'L');\n\t\n\tif($ve[0]['fechavencecredito']== '0000-00-00') { \n\t$this->SetX(4);\n\t$this->CellFitSpace(60, 3,\"VENTA \".utf8_decode($ve[0]['statusventa']),0,1,'L');\n\t} elseif($ve[0]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->SetX(4);\n\t$this->CellFitSpace(60, 3,\"VENTA \".utf8_decode($ve[0]['statusventa']),0,1,'L');\n\t} elseif($ve[0]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->SetX(4);\n\t$this->CellFitSpace(60, 3,\"VENTA \".utf8_decode(\"VENCIDA\"),0,1,'L');\n\t}\t\n\t\n\t$this->SetX(4);\n\t$this->CellFitSpace(60,3,\"FECHA DE VENCIMIENTO \".utf8_decode($vence = ( $ve[0]['fechavencecredito'] == '0000-00-00' ? \"0\" : date(\"d-m-Y\",strtotime($ve[0]['fechavencecredito'])))),0,1,'L');\n\t\n\tif($ve[0]['fechavencecredito']== '0000-00-00') { \n\t$this->SetX(4);\n\t$this->CellFitSpace(60, 3,\"DIAS VENCIDOS \".utf8_decode($ve[0]['statusventa']),0,1,'L');\n\t} elseif($ve[0]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->SetX(4);\n\t$this->CellFitSpace(60, 3,\"DIAS VENCIDOS \".utf8_decode($ve[0]['statusventa']),0,1,'L');\n\t} elseif($ve[0]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->SetX(4);\n\t$this->CellFitSpace(60, 3,\"DIAS VENCIDOS \".utf8_decode(Dias_Transcurridos(date(\"Y-m-d\"),$ve[0]['fechavencecredito'])),0,1,'L');\n\t}\n\n\t\n\tif($ve[0]['tipopagove']==\"CREDITO\"){\n\t$this->SetX(4);\n\t$this->CellFitSpace(60,3,\"TOTAL ABONO: \".utf8_decode(number_format($ve[0][\"abonototal\"], 2, '.', ',')),0,1,'L');\n\t$this->SetX(4);\n\t$this->CellFitSpace(60,3,\"TOTAL DEBE: \".utf8_decode(number_format($ve[0][\"totalpago\"]-$ve[0][\"abonototal\"], 2, '.', ',')),0,1,'L');\n\t}\n\t$this->SetX(4);\n $this->CellFitSpace(60, 3, \"C.I/DNI CLIENTE: \".utf8_decode($ve[0]['cedcliente']),0,1,'L');\n\t$this->SetX(4);\n $this->CellFitSpace(60, 3, \"NOMBRE DE CLIENTE: \".utf8_decode($ve[0]['nomcliente']),0,1,'L');\n\t$this->SetX(4);\n\t$this->CellFitSpace(60,3,\"EMPLEADO: \".utf8_decode($ve[0]['nombres']),0,1,'L');\t\n\t\n\t$this->Ln(12);\n\t$logo = \"./assets/img/barcode.png\";\n\t$this->Cell(4,10,$this->Image($logo, $this->GetX()-4, $this->GetY()-7, 62),5,0,'C');\n\t\n\t$this->Ln(5);\n\t$this->SetFont('courier','B',5);\n\t$this->SetFillColor(2,157,116);\n\t$this->SetX(4);\n\t$this->CellFitSpace(65,2,\"NOTA: DEBERÁ DE PRESENTAR ESTE TOCKET EN CASO \",0,1,'C');\n\t$this->SetX(4);\n\t$this->CellFitSpace(65,2,\"DE RECLAMO SOBRE ALGÚN PRODUCTO DEFECTUOSO \",0,1,'C');\n\t\n\t\n\t$this->SetX(4);\n\t$this->Cell(60,3,\"\",0,1,'C');\n\t$this->SetX(4);\n\t$this->CellFitSpace(60,3,\"CONFORME EL CLIENTE ______________________________________\",0,1,'C');\n $this->Ln(8);\n\t\n\t$this->SetFont('Arial','B',14);\n\t$this->SetFillColor(2,157,116);\n\t$this->SetX(4);\n\t$this->CellFitSpace(65,3,\"GRACIAS POR SU COMPRA\",0,1,'C');\n\t\n\t//$this->SetXY(4, 94);\n\t$this->Codabar(6,-90,utf8_decode(\"111111222222333333444444555555666666777777888888999999\"));\n\n }", "function suppr_tache($id_tache)\r\n{\r\n\tglobal $objet;\r\n\tif(droit_acces($objet[\"tache\"],$id_tache)>=2){\r\n\t\tsuppr_objet($objet[\"tache\"],$id_tache);\r\n\t\tdb_query(\"DELETE FROM gt_tache_responsable WHERE id_tache=\".db_format($id_tache));\r\n\t}\r\n}", "public function UpdateCOCs($eid){\n\t\t$result=$this->MySQLi->sqlQuery(\"SELECT * FROM `tblempcocs` WHERE `tblempcocs`.`EmpID` = '$eid' AND `COCStatus`='4' AND `tblempcocs`.`COCExpireDate` < NOW();\");\n\t\twhile($records=mysqli_fetch_array($result, MYSQLI_BOTH)){\n\t\t\t$this->MySQLi->sqlQuery(\"UPDATE `tblempcocs` SET `COCStatus`='-2', `COCApprovedRemarks`='System Auto-update.', `RECORD_TIME` = NOW() WHERE `COCID` = '\".$records['COCID'].\"';\");\n\t\t\t$LivCredID=LeaveFunctions::GetNewLivCredID($eid);\n\t\t\t$AvailableCOCs=$this->AvailableCOCs($eid);\n\t\t\t$this->MySQLi->sqlQuery(\"INSERT INTO `tblempleavecredits` (`LivCredID`, `EmpID`, `LeaveTypeID`, `LivCredDateFrom`, `LivCredDateTo`, `LivCredAddTo`, `LivCredDeductTo`, `LivCredBalance`, `LivCredReference`, `LivCredRemarks`, `RECORD_TIME`) VALUES ('\".$LivCredID.\"', '\".$eid.\"', 'LT08', '\".$records['COCExpireDate'].\"', '\".$records['COCExpireDate'].\"', '0', '\".$records['COCRemainingHours'].\"', '\".$AvailableCOCs.\"', '\".$records['COCID'].\"', 'Expired COC', NOW());\");\n\t\t}\n\t}", "public function lancer($id) {\n\n // récupération du devis associé à la commande\n $q = $this->db->where('cmd_id',$id)\n ->get('t_commandes');\n if ($q->num_rows() > 0) {\n $devis = $q->row()->cmd_devis;\n\n // récupération des articles du devis\n $q = $this->db->select(\"ard_id,art_code,art_prod,art_data,cat_famille,vfm_production,ard_description,ard_prix,ard_quantite\")\n ->join('t_articles','art_id=ard_article','left')\n ->join('t_catalogues','cat_id=art_catalogue','left')\n ->join('v_familles','vfm_id=cat_famille','left')\n ->where('ard_devis',$devis)\n ->where('ard_inactif is null')\n ->get('t_articles_devis');\n if ($q->num_rows() > 0) {\n\n // création des tâches à partir des articles du devis\n foreach ($q->result() as $article) {\n if ($article->vfm_production == 0) continue;\n if ($article->art_prod == '') continue;\n $data = array(\n 'opr_code_article' => $article->art_code,\n 'opr_code_prod' => $article->art_prod,\n 'opr_description' => $article->ard_description,\n 'opr_prix' => $article->ard_prix,\n 'opr_quantite' => $article->ard_quantite,\n 'opr_famille' => $article->cat_famille,\n 'opr_commande' => $id,\n 'opr_article_devis' => $article->ard_id,\n 'opr_data' => $article->art_data,\n 'opr_etat' => 1\n );\n $this->_insert('t_ordres_production',$data);\n }\n }\n\n // marquage de la commande à l'état lancée\n $data = array('cmd_etat'=>2);\n return $this->_update('t_commandes',$data,$id,'cmd_id');\n }\n return false;\n }", "function afficherRecette($_idRecette){\n $connexion= my_connect();\n // Récupération des recettes \n $requette_recette=\"SELECT Idrecette,Nomrecette,Imagepath,Etapes,Nombrepersonne,Cout,Nomcategorie FROM Recettes where Idrecette = $_idRecette\"; \n $table_recette_resultat = mysqli_query($connexion,$requette_recette);\n // affichage chaque recettes\n if($table_recette_resultat){\n $ligne_recette=mysqli_fetch_object($table_recette_resultat);\n echo (\"<div class=\\\"recette\\\" id=\\\"\".$_idRecette.\"\\\">\");\n afficherControlRecetteAdmin($_idRecette);\n echo(\"<h1>\".$ligne_recette->Nomcategorie.\":\".$ligne_recette->Nomrecette.\"</h1><img class =\\\"center\\\" src=\".$ligne_recette->Imagepath.\"><br><h4> pour \".$ligne_recette->Nombrepersonne.\" Personne, Coût:\".$ligne_recette->Cout.\"€</h4>\");\n // affichage chaque Ingrediens \n afficherIngredients($_idRecette); \n // affichage des Etapes recettes \n echo \"<p>\".$ligne_recette->Etapes.\"</p>\";\n //affichage chaque Commentaires \n afficherCommentaires($_idRecette); \n afficherAjoutCommentaire($_idRecette);\n echo \"</div>\"; \n }\n else{\n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo\"message de mysqli:\".mysqli_error($connexion);\n }\n mysqli_close($connexion);\n }", "public function edit($id)\n\t{\n\t\t$comunicaciones = Comunicaciones::find($id);\n\t\t$tc = TipoComunicacion::all();\n $this->layout->nest(\n 'content',\n 'comunicaciones.edit',\n array(\n \t'tc' => $tc,\n 'comunicaciones' => $comunicaciones\n )\n );\n\t}", "public function possederModifierUn($id,$posseder)\n\t{\n\t\tGestion::modifier($posseder);// votre code ici\n\t}", "function fProcesaBanco(){\n global $db, $cla, $agPar, $igNumChq, $igSecue, $ogDet;\n $alDet = fIniDetalle();\n $alDet[\"det_codcuenta\"]\t= $cla->cla_ctaorigen; \n $alDet[\"det_glosa\"] \t= substr($agPar[\"com_Concepto\"],0, 50) . ' ' . substr($agPar[\"slBenef\"],0,20);\n $alDet['det_idauxiliar']= $agPar[\"com_Emisor\"];\n $alDet[\"det_numcheque\"]\t= $igNumChq;\t\t\t// es el numero de cheque\n $alDet[\"det_feccheque\"]\t= $agPar[\"com_FechCheq\"];\n $alDet['det_valdebito']\t= $agPar[\"flValor\"] * $cla->cla_indicador; // segun el signo del indicador, se aplica como DB/CR al grabar;\n $alDet['det_valcredito']\t= 0;\n $alDet['det_secuencia']\t= $igSecue;\n\tif(fGetParam(\"pAppDbg\",0)){\n\t\tprint_r($alDet);\n\t}\n\tfInsdetalleCont($db, $alDet);\n}", "function aff_cont_post($id_post, $texte_post, $image_post, $id_post_relai, $id_auteur, $cas){\n ?>\n <div class=\"contenu_post_<?php echo $id_post; ?>\">\n <?php\n\t\tif($cas == 2) {\n\t\t\tif(strlen($texte_post) > 600) {\n\t\t\t\t$texte_post = substr($texte_post, 0, 600).' ...';\n\t\t\t}\n\t\t}\n\t\techo $texte_post;\n\t\t\t\n\t\tif( !empty($image_post)) {\n\t\t?>\n\t\t\t<div class=\"cadre_image_post\" >\n\t\t\t\t<img class=\"image_posts\" width=\"100%\" src=\"/ressources/images/posts/<?php echo $id_auteur.'/'.$image_post; ?>\" />\n\t\t\t</div>\n\t\t<?php\n\t\t}\n\t\telse {\n\t\t}\n\t\t?>\n\t\t</div>\n <?php \n\t\tif(!empty($id_post_relai))\n\t\t{\n\t\t\t//$include('controleur-relai.php');\n\t\t}\n\t\telse\n\t\t{\n\t\t}\n }", "public function blockStart() {\n\n $this->outputEditmode('<div class=\"pimcore_block_entry ' . $this->getName() . '\" key=\"' . $this->indices[$this->current] . '\">');\n $this->outputEditmode('<div class=\"pimcore_block_buttons_' . $this->getName() . ' pimcore_block_buttons\">');\n $this->outputEditmode('<div class=\"pimcore_block_amount_' . $this->getName() . ' pimcore_block_amount\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_plus_' . $this->getName() . ' pimcore_block_plus\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_minus_' . $this->getName() . ' pimcore_block_minus\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_up_' . $this->getName() . ' pimcore_block_up\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_down_' . $this->getName() . ' pimcore_block_down\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_clear\"></div>');\n $this->outputEditmode('</div>');\n\n $this->current++;\n }", "function getId_carrera(){\n\t\treturn $this->id_carrera;\n\t}", "function ciniki_web_processBlockPriceTable(&$ciniki, $settings, $tnid, $block) {\n\n $content = '';\n\n //\n // Get tenant/user settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'intlSettings');\n $rc = ciniki_tenants_intlSettings($ciniki, $tnid);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $intl_timezone = $rc['settings']['intl-default-timezone'];\n $intl_currency_fmt = numfmt_create($rc['settings']['intl-default-locale'], NumberFormatter::CURRENCY);\n $intl_currency = $rc['settings']['intl-default-currency'];\n\n //\n // Make sure there is content to edit\n //\n if( $block['prices'] != '' ) {\n //\n // Process the price list\n //\n if( isset($block['title']) && $block['title'] != '' ) {\n $content .= \"<h2 class='wide'>\" . $block['title'] . \"</h2>\";\n }\n $content .= \"<div class='cart-pricetable\" . ((isset($block['size'])&&$block['size']!='')?' cart-pricetable-'.$block['size']:'') . \"'>\";\n $content .= \"<table class='cart-pricetable'>\";\n if( isset($block['headers']) && count($block['headers']) > 0 ) {\n $content .= \"<thead><tr>\";\n foreach($block['headers'] as $header) {\n $content .= \"<th>\" . $header . \"</th>\";\n }\n $content .= \"</tr></thead>\";\n }\n $content .= \"<body>\"; \n foreach($block['prices'] as $rid => $row) {\n //\n // Calculate final price\n //\n $final_price = $row['unit_amount'];\n $discount = '';\n if( isset($row['unit_discount_amount']) && $row['unit_discount_amount'] > 0 ) {\n $discount .= \" - \" . numfmt_format_currency($intl_currency_fmt,\n $row['unit_discount_amount'], $intl_currency);\n $final_price = bcsub($row['unit_amount'], $row['unit_discount_amount'], 4);\n }\n if( isset($row['unit_discount_percentage']) && $row['unit_discount_percentage'] > 0 ) {\n $percentage = bcdiv($row['unit_discount_percentage'], 100, 4);\n $discount .= \" - \" . $row['unit_discount_amount'] . \"%\";\n $final_price = bcsub($final_price, bcmul($final_price, $percentage, 4), 4);\n }\n\n $content .= \"<tr>\";\n foreach($block['fields'] as $field) {\n if( $field == 'price' ) {\n $content .= \"<td>\"\n . numfmt_format_currency($intl_currency_fmt, $final_price, $intl_currency)\n . (isset($block['price_info']) && $block['price_info'] != '' ? $block['price_info'] : '')\n . \"</td>\";\n } else {\n $content .= \"<td>\"\n . $row[$field]\n . \"</td>\";\n }\n }\n $content .= \"</tr>\";\n }\n $content .= \"</tbody>\";\n $content .= \"</table>\";\n $content .= \"</div>\";\n }\n \n return array('stat'=>'ok', 'content'=>$content);\n}", "public function getCicloCotable(){\n\t\t\t// creamos el array $retorna con los datos de la tabla lcompras\n\t\t\t$result = $this->_db->query(\"SELECT * FROM ciclocontable WHERE show_by = '1' ORDER BY idCicloContable DESC\");\n\t\t\t$retorna = $result->fetch_all(MYSQL_ASSOC);\n\n\t\t\treturn $retorna;\n\t\t}", "public function getCicloCotable(){\n\t\t\t// creamos el array $retorna con los datos de la tabla lcompras\n\t\t\t$result = $this->_db->query(\"SELECT * FROM ciclocontable WHERE show_by = '1' ORDER BY idCicloContable DESC\");\n\t\t\t$retorna = $result->fetch_all(MYSQL_ASSOC);\n\n\t\t\treturn $retorna;\n\t\t}", "public function edit($id)\n {\n echo \"Day la trang edit co id = \".$id;\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_historico_atleta_cameponato\n\t\t$fbf_historico_atleta_cameponato = FbfHistoricoAtletaCameponato::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_historico_atleta_cameponato\n\t\t$this->layout->content = View::make('fbf_historico_atleta_cameponato.edit')\n->with('fbf_historico_atleta_cameponato', $fbf_historico_atleta_cameponato);\n\t}", "public function commissions_view($id){\n\t\t//restricted this area, only for admin\n\t\tpermittedArea();\n\t\t$data['commissions'] = singleDbTableRow($id,'commissions');\n\t\n\t\ttheme('commissions_view', $data);\n\t}", "public function equipementachatModifierUn($id,$equipementachat)\n\t{\n\t\tGestion::modifier($equipementachat);// votre code ici\n\t}", "public function getRecenzeClanku($id){\n $sth = $this->db->prepare(\"SELECT * FROM RECENZE\n WHERE PRISPEVKY_id_prispevku = :id\");\n $sth->bindParam(':id', $id);\n $sth->execute();\n $data = $sth->fetchAll();\n return $data;\n }", "public function actionCskh($id = 0) {\n $theTour = Product::find()\n ->where(['id'=>$id, 'op_status'=>'op', 'op_finish'=>''])\n ->one();\n\n if (!$theTour) {\n throw new HttpException(404, 'Tour not found.');\n }\n\n if (!in_array(USER_ID, [1, 27388, 29296])) {\n throw new HttpException(403, 'Access denied.');\n }\n\n $theTourOld = Tour::find()\n ->where(['ct_id'=>$id, 'status'=>'on'])\n ->asArray()\n ->one();\n\n if (!$theTourOld) {\n throw new HttpException(404, 'Tour not found.');\n }\n\n $sql = 'select u.id, u.fname, u.lname, u.email, CONCAT(u.name, \" \", u.email) AS name from contacts u WHERE id IN (1351, 12952, 29296, 30554, 33415) AND u.status=\"on\" AND u.is_member=\"yes\" ORDER BY lname, fname';\n $cssList = Yii::$app->db->createCommand($sql)->queryAll();\n\n $theForm = new TourAssignCsForm;\n\n $sql = 'select user_id FROM at_tour_user WHERE tour_id=:tour_id AND role=\"cservice\"';\n $oldCssList = Yii::$app->db->createCommand($sql, [':tour_id'=>$theTourOld['id']])->queryAll();\n \n $oldCssIdList = [];\n foreach ($oldCssList as $cs) {\n $oldCssIdList[] = $cs['user_id'];\n }\n $theForm['css'] = $oldCssIdList;\n\n if ($theForm->load(Yii::$app->request->post()) && $theForm->validate()) {\n // Remove old\n foreach ($oldCssIdList as $oldId) {\n if (!in_array($oldId, $theForm['css'])) {\n Yii::$app->db->createCommand()->delete('at_tour_user', ['tour_id'=>$theTourOld['id'], 'user_id'=>$oldId, 'role'=>'cservice'])->execute();\n }\n }\n // Email new\n foreach ($theForm['css'] as $newId) {\n if (!in_array($newId, $oldCssIdList)) {\n // Save tour op\n Yii::$app->db->createCommand()->insert('at_tour_user', [\n 'tour_id'=>$theTourOld['id'],\n 'user_id'=>$newId,\n 'role'=>'cservice',\n ])->execute();\n // Email\n foreach ($cssList as $user) {\n if ($user['id'] == $newId && $newId != USER_ID) {\n $this->mgIt(\n 'ims | Tour \"'.$theTour['op_code'].' - '.$theTour['op_name'].'\" has been assigned to you',\n '//mg/tour_assign',\n [\n 'theTour'=>$theTour,\n 'theTourOld'=>$theTourOld,\n ],\n [\n ['from', '[email protected]', 'Amica Travel', 'IMS'],\n ['to', $user['email'], $user['lname'], $user['fname']],\n ['bcc', '[email protected]', 'Huân', 'H.'],\n ]\n );\n }\n }\n }\n }\n // Redir\n return $this->redirect('@web/tours/r/'.$theTourOld['id']);\n }\n\n return $this->render('tours_cskh', [\n 'theTour'=>$theTour,\n 'theTourOld'=>$theTourOld,\n 'theForm'=>$theForm,\n 'cssList'=>$cssList,\n ]);\n }", "function cinotif_trouver_objet_courrier_et_destinataire($id_courrier, $id_auteur=0, $id_abonne=0) {\n\t$return = array('objet'=>'','id_objet'=>0);\n\t$id_courrier = intval($id_courrier);\n\t$id_auteur = intval($id_auteur);\n\t$id_abonne = intval($id_abonne);\n\t$evenement_recherche = 0;\n\n\tif ($id_courrier>0 AND ($id_auteur OR $id_abonne)) {\n\t\t\n\t\t// contenu notifie\n\t\t$quoi = '';\n\t\t$objet = '';\n\t\t$id_objet = 0;\n\t\t$row = sql_fetsel('*', 'spip_cinotif_courriers', 'id_courrier='.$id_courrier);\n\t\tif ($row) {\n\t\t\t$quoi = $row['quoi'];\n\t\t\t$objet = $row['objet'];\n\t\t\t$id_objet = intval($row['id_objet']);\n\t\t\t$parent = $row['parent'];\n\t\t\t$id_parent = intval($row['id_parent']);\n\t\t}\n\n\t\t// article\n\t\tif ($parent=='article'){\n\t\t\t$evenement_recherche = cinotif_evenement_recherche($id_auteur,$id_abonne,$quoi,$parent,array($id_parent));\n\t\t\t\n\t\t\tif (!$evenement_recherche) {\n\t\t\t\t$t = sql_fetsel(\"id_rubrique\", \"spip_articles\", \"id_article=\".$id_parent);\n\t\t\t\t$id_parent = $t['id_rubrique'];\n\t\t\t\t$parent = 'rubrique';\n\t\t\t}\n\t\t}\t\t\t\n\n\t\t// rubrique\n\t\tif ($parent=='rubrique'){\n\t\t\t$ascendance = cinotif_ascendance($id_parent);\n\t\t\t$evenement_recherche = cinotif_evenement_recherche($id_auteur,$id_abonne,$quoi,$parent,$ascendance);\n\t\t\t\n\t\t\t// cas particulier ou on s'abonne a un article a l'evenement modification d'article\n\t\t\tif (!$evenement_recherche AND $quoi=='articlemodifie')\n\t\t\t\t$evenement_recherche = cinotif_evenement_recherche($id_auteur,$id_abonne,$quoi,$objet,array($id_objet));\n\t\t}\n\t\t\n\t\t// site\n\t\tif (!$evenement_recherche) {\n\t\t\t$evenement_recherche = cinotif_evenement_recherche($id_auteur,$id_abonne,$quoi,'site',array());\n\t\t}\n\t\tif ($evenement_recherche) {\n\t\t\t$row = sql_fetsel('*', 'spip_cinotif_evenements', \"id_evenement=\".$evenement_recherche);\n\t\t\t$return = array('objet'=>$row['objet'],'id_objet'=>$row['id_objet']);\n\t\t}\n\t}\n\t\n\treturn $return;\n}", "public function signalerCom($idCom, $idBillet)\n {\n $this->commentaire->updateCommentaire('FALSE', $idCom);\n $_SESSION['info'] = 'Le commentaire a été signalé à l\\'auteur, merci. ';\n header('Location: index.php?action=billet&id='.$idBillet.'&page=1#postCom');\n }", "function imprimir_cabecera_comprobante($id) {\n $sql = \"SELECT\n\t\t\t\t prosic_comprobante.id_comprobante\n\t\t\t\t , prosic_comprobante.codigo_comprobante\n\t\t\t\t , prosic_comprobante.emision_comprobante\n\t\t\t\t , prosic_comprobante.serie_comprobante\n\t\t\t\t , prosic_comprobante.nro_comprobante\n\t\t\t\t , prosic_comprobante.total_comprobante\n\t\t\t\t , prosic_comprobante.glosa_comprobante\n\t\t\t\t\t, prosic_comprobante.tipo_cambio_comprobante\n\t\t\t\t , prosic_anexo.descripcion_anexo\n\t\t\t\t , prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_comprobante.id_moneda\n\t\t\t\t , prosic_moneda.nombre_moneda\n\t\t\t\t , prosic_tipo_comprobante.nombre_tipo_comprobante\n\t\t\t\t\t, prosic_tipo_comprobante.codigo_tipo_comprobante\n\t\t\t\t , prosic_local.id_empresa\n\t\t\t\t , prosic_empresa.nombre_empresa\n\t\t\t\t , prosic_empresa.ruc_empresa\n\t\t\t\t , prosic_local.direccion_local\n\t\t\t\t\t, prosic_comprobante.id_subdiario\n\t\t\t\t\t, prosic_subdiario.nombre_subdiario\n\t\t\t\t\t, prosic_banco.nombre_banco\n\t\t\t\t\t, prosic_banco.nro_cuenta_banco\n\t\t\tFROM prosic_comprobante\n\t\t\tINNER JOIN prosic_anexo \t\t\tON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n\t\t\tINNER JOIN prosic_moneda \t\t\tON (prosic_comprobante.id_moneda = prosic_moneda.id_moneda)\n\t\t\tINNER JOIN prosic_tipo_comprobante \tON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n\t\t\tINNER JOIN prosic_local \t\t\tON (prosic_comprobante.id_local = prosic_local.id_local)\n\t\t\tINNER JOIN prosic_empresa \t\t\tON (prosic_local.id_empresa = prosic_empresa.id_empresa)\n\t\t\tINNER JOIN prosic_subdiario\t\t\tON (prosic_comprobante.id_subdiario = prosic_subdiario.id_subdiario)\n\t\t\tLEFT JOIN prosic_banco ON (prosic_comprobante.cuenta_banco = prosic_banco.id_plan_contable)\n\t\t\tWHERE prosic_comprobante.id_comprobante=\" . $id;\n $result = $this->Consulta_Mysql($sql);\n $row = mysql_fetch_assoc($result);\n return $row;\n }", "public function demandeModifierUn($id,$demande)\n\t{\n\t\tGestion::modifier($demande);// votre code ici\n\t}", "public function renderContent( $data, $block, $edit ){\n\t\t\n\t\t$providers\t\t\t= ZbrochureContentContacts::getProviders();\n\t\t$contacts\t\t\t= ZbrochureContentContacts::getContacts();\n\t\n\t\t$randomid\t\t\t= rand();\n\t\n\t\t$this->_output\t\t= '';\n\t\t$this->_edit_output\t= '';\n\t\t\n\t\t$selected\t\t\t= json_decode( $data->data );\n\t\t\n\t\t$this->_output .= '<div id=\"textblock-'.$randomid.'\" class=\"editable-content\">'.PHP_EOL;\n\t\t\n\t\t$this->_output .= '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"package-table\">'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_output .= '<thead>'.PHP_EOL;\n\t\t\t$this->_output .= '<tr class=\"package-header\">'.PHP_EOL;\n\t\t\t\t$this->_output .= '<th>'.JText::_( 'CONTACTS_ADMINISTRATOR' ).'</th>'.PHP_EOL;\n\t\t\t\t$this->_output .= '<th>'.JText::_( 'CONTACTS_BENEFIT' ).'</th>'.PHP_EOL;\n\t\t\t\t$this->_output .= '<th>'.JText::_( 'CONTACTS_PHONE' ).'</th>'.PHP_EOL;\n\t\t\t\t$this->_output .= '<th>'.JText::_( 'CONTACTS_WEBSITE' ).'</th>'.PHP_EOL;\n\t\t\t$this->_output .= '</tr>'.PHP_EOL;\n\t\t\t$this->_output .= '</thead>'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_output .= '<tbody>'.PHP_EOL;\n\t\t\t\n\t\t\tforeach( $selected as $c ){\n\t\t\t\n\t\t\t\t$i = 0;\n\t\t\t\n\t\t\t\tforeach( $contacts as $active ){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif( $active->contact_id === $c ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$alt = ($i % 2) ? 'alternative-row-0' : 'alternative-row-1';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->_output .= '<tr class=\"package-plan-row '.$alt.'\">'.PHP_EOL;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->_output .= '<td>'.$active->provider_name.'</td>'.PHP_EOL;\n\t\t\t\t\t\t\t$this->_output .= '<td>'.$active->contact_name.'</td>'.PHP_EOL;\n\t\t\t\t\t\t\t$this->_output .= '<td>'.$active->contact_phone.'</td>'.PHP_EOL;\n\t\t\t\t\t\t\t$this->_output .= '<td>'.$active->contact_email.'</td>'.PHP_EOL;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->_output .= '</tr>'.PHP_EOL;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t$this->_output .= '</tbody>'.PHP_EOL;\t\n\t\t\n\t\t$this->_output .= '</table>'.PHP_EOL;\n\t\t\n\t\t$this->_output .= '</div>'.PHP_EOL;\n\t\t\n\t\tif( $edit == 1 ){\n\t\t\n\t\t\t//**************** Start Dialog\t****************//\n\t\t\t$this->_edit_output .= '<div id=\"edittext-'.$randomid.'\" title=\"Edit Contact Block\">'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<form action=\"index.php?option=com_zbrochure&task=saveBlock\" method=\"post\">'.PHP_EOL;\n\t\t\t\n\t\t\t$alphabet = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"letter-picker-container\"><div class=\"letter-picker\"><ul>'.PHP_EOL;\n\t\t\t\n\t\t\tforeach( $alphabet as $letter ){\n\t\t\t\t\n\t\t\t\t$this->_edit_output .= '<li><a onclick=\"$(\\'.auto-scroll\\').scrollTo($(\\'#'.$letter.'\\'), 400);\" id=\"letter-'.$letter.'\" href=\"javascript:void(0);\">'.$letter.'</a></li>'.PHP_EOL;\n\t\t\t\t\n\t\t\t}\n\t\t\t$this->_edit_output .= '</ul></div></div>'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"auto-scroll\">'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"form-row text-container\">'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"form-row package-container-header\">'.PHP_EOL;\n\t\t\t\n\t\t\t\n\t\t\t//$this->_edit_output .= '<input type=\"text\" name=\"data['.$block->content_type_folder.']['.$data->id.']\" class=\"inputbox\" value=\"'.$data->data.'\" style=\"width:97%\" />';\n\t\t\t\n\t\t\t$lettersort = '';\n\t\t\t$lettersused = array();\n\t\t\t\n\t\t\tforeach( $providers as $provider ){\n\t\t\t\t\n\t\t\t\t//Give the containing div of a provider an ID if it's the first with this letter\n\t\t\t\tif( !$lettersort ){\n\t\t\t\t\t$lettersort = substr($provider->provider_name, 0,1);\n\t\t\t\t\t$lettersused[] = $lettersort;\n\t\t\t\t\t$this->_edit_output .= '<div id=\"'.$lettersort.'\" class=\"contact-item\">'.PHP_EOL;\n\t\t\t\t}else{\n\t\t\t\t\t$newletter = substr($provider->provider_name, 0,1);\n\t\t\t\t\tif( ucfirst($lettersort) != ucfirst($newletter) ){\n\t\t\t\t\t\t$lettersort = ucfirst($newletter);\n\t\t\t\t\t\t$lettersused[] = $lettersort;\n\t\t\t\t\t\t$this->_edit_output .= '<div id=\"'.$lettersort.'\" class=\"contact-item\">';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_edit_output .= '<div class=\"contact-item\">'.PHP_EOL;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t$this->_edit_output .= '<h3>'.$provider->provider_name.'</h3>'.PHP_EOL;\n\t\t\t\t\n\t\t\t\tif( !empty($contacts) ){\n\t\t\t\t\n\t\t\t\t\tforeach( $contacts as $contact ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $provider->provider_id === $contact->provider_id ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach( $selected as $nd ){\n\t\t\t\t\t\t\t\tif( $nd === $contact->contact_id ){\n\t\t\t\t\t\t\t\t\t$checked = 'checked';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( $checked ){\n\t\t\t\t\t\t\t\t$this->_edit_output .= '<label><input checked=\"'.$checked.'\" type=\"checkbox\" name=\"content[data][]\" value=\"'.$contact->contact_id.'\" /> '.$contact->contact_name.'</label><br />'.PHP_EOL;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->_edit_output .= '<label><input type=\"checkbox\" name=\"content[data][]\" value=\"'.$contact->contact_id.'\" /> '.$contact->contact_name.'</label><br />'.PHP_EOL;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tunset($checked);\n\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$this->_edit_output .= 'There are no contacts for this provider.'.PHP_EOL;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_edit_output .= '</div>'.PHP_EOL;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->_edit_output .= '</div>'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '</div>'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '</div>'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"form-row btn-container add-padding\" style=\"margin:10px 0\">\n\t\t\t\t\t\t\t\t\t\t<button class=\"btn save-btn fr\" type=\"submit\"><span>Save</span></button>\n\t\t\t\t\t\t\t\t\t\t<button class=\"btn cancel-btn fr\" onclick=\"location.reload(); return false;\"><span>Cancel</span></button>\n\t\t\t\t\t\t\t\t\t</div>'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output\t.= '<input type=\"hidden\" name=\"content[id]\" value=\"'.$data->id.'\" />'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<input name=\"content_block_id\" value=\"'.$block->content_block_id.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"content_block_type\" value=\"'.$block->content_block_type.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"content_bro_id\" value=\"'.$block->content_bro_id.'\" type=\"hidden\" />'.PHP_EOL;\t\t\n\t\t\t$this->_edit_output .= '<input name=\"view\" value=\"'.JRequest::getVar('view').'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"bro_id\" value=\"'.$block->bro_id.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"bro_page_id\" value=\"'.$block->bro_page_id.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"bro_page_order\" value=\"'.$block->bro_page_order.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t\n\t\t\t\n\t\t\t$this->_edit_output .= '</form>'.PHP_EOL;\n\t\t\t$this->_edit_output .= '</div>'.PHP_EOL;\n\t\t\t//**************** End Dialog ****************//\n\t\t\t\n\t\t\t\n\t\t\t$this->_edit_output .= '<script type=\"text/javascript\">\n\t\t\t\n\t\t\t\t\t\t\t\t\t$(document).ready(function(){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$( \"#textblock-'.$randomid.'\" ).click(function(){\n\t\t\t\t\t\t\t\t\t\t\t$(\"#edittext-'.$randomid.'\").dialog(\\'open\\');\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$( \"#edittext-'.$randomid.'\" ).dialog({\n\t\t\t\t\t\t\t\t\t\t\tautoOpen: false,\n\t\t\t\t\t\t\t\t\t\t\tresizable: true,\n\t\t\t\t\t\t\t\t\t\t\theight:420,\n\t\t\t\t\t\t\t\t\t\t\twidth:700,\n\t\t\t\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\t\t\t\tclose: function(){}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</script>'.PHP_EOL;\n\t\t\t\t\n\t\t\t\t$this->_edit_output .= '<script type=\"text/javascript\">'.PHP_EOL;\n\t\t\t\t\n\t\t\t\tforeach( $lettersused as $letterused ){\n\t\t\t\t\n\t\t\t\t\t$this->_edit_output .= '$(document).ready(function(){$(\"#letter-'.$letterused.'\").addClass(\"available\")});'.PHP_EOL;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_edit_output .= '</script>'.PHP_EOL;\n\n\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t$output->render = $this->_output;\n\t\t$output->edit\t= $this->_edit_output;\n\t\t\t\t\n\t\treturn $output;\n\t\n\t}", "function gestiondegats($idvaisseauquisefaittirerdessus, $pvvaisseau, $degatdutir, $idarme, $idvaisseauquitire, $idflotteattaquant, $idflottedefenseur, $sensbataille)\r\n {\r\n require __DIR__ . '/../include/bddconnection.php';\r\n $reqdiminuernbtir = $bd->prepare(\"UPDATE c_composantvaisseau SET tirrestant = tirrestant-1 WHERE idtable = ?\");\r\n $reqdiminuernbtir->execute(array($idarme));\r\n\r\n $nvpv = $pvvaisseau - $degatdutir;\r\n $Commentairestour = 'Le vaisseau '.$idvaisseauquisefaittirerdessus.' se fait tirer dessus par le vaisesau '.$idvaisseauquitire.', il perd '.$degatdutir.' PV.<br>';\r\n \r\n $texte1 = '<br>Votre vaisseau ('.$idvaisseauquitire.') vient de tirer sur un vaisseau ennemi ('.$idvaisseauquisefaittirerdessus.'). '.$degatdutir.' dégâts infligés.';\r\n $texte2 = '<br>Votre vaisseau ('.$idvaisseauquisefaittirerdessus.') se fait tirer dessus par un vaisseau ennemi ('.$idvaisseauquitire.'). '.$degatdutir.' dégâts recus.';\r\n\r\n if ($nvpv < 0)\r\n {\r\n $texte1 .= ' Vaisseau détruit.';\r\n $texte2 .= ' Vaisseau détruit.';\r\n\r\n $Commentairestour .= 'Le vaisseau '.$idvaisseauquisefaittirerdessus.' vient de se faire détruire.<br>';\r\n $reqinfopvvaisseau = $bd->prepare(' SELECT p.idjoueurplanete, v.nomvaisseau, f.xflotte, f.yflotte, f.universflotte, v.biensvaisseau, v.titanevaisseau, f.idplaneteflotte\r\n FROM c_vaisseau v\r\n INNER JOIN c_flotte f ON f.idflotte = v.idflottevaisseau\r\n LEFT JOIN c_planete p ON p.idplanete = f.idplaneteflotte\r\n WHERE v.idvaisseau = ?');\r\n $reqinfopvvaisseau->execute(array($idvaisseauquisefaittirerdessus));\r\n $repinfopvvaisseau = $reqinfopvvaisseau->fetch();\r\n\r\n $reqcreerasteroides = $bd->prepare('INSERT INTO c_champsasteroides (xaste , yaste , uniaste, typeitemsaste, quantite) VALUES (?, ?, ?, ?, ?)');\r\n\r\n if ($repinfopvvaisseau['idjoueurplanete'] != 0)\r\n { // On envoit ce message uniquement aux joueurs.\r\n $textemessage = 'Nous avons perdu le vaisseau ' . $repinfopvvaisseau['nomvaisseau'] . ' en ' . $repinfopvvaisseau['xflotte'] . '-' . $repinfopvvaisseau['yflotte'] . ' lors d\\'une bataille spatiale.' ; \r\n $reqmessageinterne = $bd->prepare('INSERT INTO c_messagerieinterne (expediteur , destinataire , lu , titre , texte) VALUES (?, ?, ?, ?, ?)');\r\n $reqmessageinterne->execute(array('Amirauté', $repinfopvvaisseau['idjoueurplanete'], 0, 'Perte d\\'un vaisseau', $textemessage));\r\n }\r\n \r\n // Créer champs d'astéroides : Reprendre le prix du vaisseau\r\n $nbchampsastebien = floor(($repinfopvvaisseau['biensvaisseau'] / 150));\r\n $nbchampsastetitane = floor(($repinfopvvaisseau['titanevaisseau'] / 30));\r\n\r\n if ($nbchampsastebien > 0)\r\n {\r\n $reqcreerasteroides->execute(array($repinfopvvaisseau['xflotte'], $repinfopvvaisseau['yflotte'], $repinfopvvaisseau['universflotte'], 6, $nbchampsastebien));\r\n }\r\n if ($nbchampsastetitane > 0)\r\n {\r\n $reqcreerasteroides->execute(array($repinfopvvaisseau['xflotte'], $repinfopvvaisseau['yflotte'], $repinfopvvaisseau['universflotte'], 8, $nbchampsastetitane));\r\n }\r\n\r\n $reqinfocargo = $bd->prepare(\"SELECT typeitems, quantiteitems FROM c_cargovaisseau WHERE idvaisseaucargo = ?\");\r\n $reqinfocargo->execute(array($idvaisseauquisefaittirerdessus));\r\n while ($repinfocargo = $reqinfocargo->fetch())\r\n { // Cas d'un vaisseau trouvé dans le 1er univers\r\n $reqcreerasteroides->execute(array($repinfopvvaisseau['xflotte'], $repinfopvvaisseau['yflotte'], $repinfopvvaisseau['universflotte'], $repinfocargo['typeitems'], $repinfocargo['quantiteitems']));\r\n }\r\n\r\n // cargovaisseau\r\n $reqdeletecargo = $bd->prepare(\"DELETE FROM c_cargovaisseau WHERE idvaisseaucargo = ?\");\r\n $reqdeletecargo->execute(array($idvaisseauquisefaittirerdessus));\r\n\r\n // composantvaisseau\r\n $reqdeletecomposant = $bd->prepare(\"DELETE FROM c_composantvaisseau WHERE idvaisseaucompo = ?\");\r\n $reqdeletecomposant->execute(array($idvaisseauquisefaittirerdessus));\r\n\r\n // vaisseau\r\n $reqdeletevaisseau = $bd->prepare(\"DELETE FROM c_vaisseau WHERE idvaisseau = ?\");\r\n $reqdeletevaisseau->execute(array($idvaisseauquisefaittirerdessus));\r\n }\r\n else\r\n {\r\n $reqdiminuerpvvaisseau = $bd->prepare('UPDATE c_vaisseau SET HPvaisseau = ? WHERE idvaisseau = ?');\r\n $reqdiminuerpvvaisseau->execute(array($nvpv, $idvaisseauquisefaittirerdessus));\r\n }\r\n\r\n $reqtrouverrapportdecombat = $bd->prepare('SELECT idrapportcombat FROM c_rapportcombat WHERE idflotteattaquant = ? AND idflottedefenseur = ?');\r\n $reqtrouverrapportdecombat->execute(array($idflotteattaquant, $idflottedefenseur));\r\n $reptrouverrapportdecombat = $reqtrouverrapportdecombat->fetch();\r\n\r\n // Vérifier si le rapport existe. Si ce n'est pas le cas, le créer.\r\n if (!isset($reptrouverrapportdecombat['idrapportcombat']))\r\n {\r\n $reqcreerrapportcombat = $bd->prepare('INSERT INTO c_rapportcombat(idflotteattaquant, idflottedefenseur, texteattaquant, textedefenseur) VALUES(?, ?, ?, ?)');\r\n $texteattaquant = 'Début du rapport de combat. Vous attaquez une flotte ('.$idflottedefenseur.').';\r\n $textedefenseur = 'Début du rapport de combat. Vous êtes attaqués par une flotte ('.$idflotteattaquant.').';\r\n $reqcreerrapportcombat->execute(array($idflotteattaquant, $idflottedefenseur, $texteattaquant, $textedefenseur));\r\n }\r\n\r\n if($sensbataille == 1)\r\n {\r\n $textesupplementaireattaquant = $texte1;\r\n $textesupplementairedefenseur = $texte2;\r\n }\r\n elseif($sensbataille == 2)\r\n {\r\n $textesupplementaireattaquant = $texte2;\r\n $textesupplementairedefenseur = $texte1;\r\n }\r\n\r\n // Le compléter.\r\n $requpdaterapportcombat = $bd->prepare('UPDATE c_rapportcombat\r\n SET texteattaquant = concat(texteattaquant, ?), textedefenseur = concat(textedefenseur, ?)\r\n WHERE idflotteattaquant = ? AND idflottedefenseur = ?');\r\n $requpdaterapportcombat->execute(array($textesupplementaireattaquant, $textesupplementairedefenseur, $idflotteattaquant, $idflottedefenseur));\r\n\r\n return $Commentairestour;\r\n }", "function obtenirPeriodeEnCours($id_periode)\n\t{\n\t\tif ($id_periode != \"\")\n\t\t{\n\t\t\treturn $id_periode;\n\t\t}\n\n\t\t// Sinon definir la periode en cours\n\t\t$date_debut=$this->periodeDebutFin ('debut');\n\t\t$date_fin=$this->periodeDebutFin ('fin');\n\t\t$result=$this->obtenirListPeriode($date_debut,$date_fin);\n\n\t\tif ($result)\n\t\t{\n\t\t\treturn $result[0]['id'];\n\t\t}\n\t\telse\t\t\t\t// ajout d'une nouvelle periode\n\t\t{\n\t\t\t$result=$this->ajouterListPeriode();\n\t\t\treturn $result[0]['id'];\n\t\t}\n\t}", "public function renderContent( $data, $block, $edit ){\n\t\n\t\t$randomid = rand();\n\t\t\n\t\t$toc_object = json_decode( $data->data );\n\t\t$toc_title \t= $toc_object->toc_title;\n\t\tunset($toc_object->toc_title);\n\t\t\n\t\t$this->_output = '';\n\t\n\t\t$this->_output .= '<div id=\"tocblock-'.$randomid.'\" class=\"editable-content\">';\n\t\t\n\t\tif( !empty($toc_title) ){\n\t\t\t$this->_output .= '<div class=\"toc-title\">'.$toc_title.'</div>';\n\t\t}\n\t\t\n\t\t$this->_output .= '<table class=\"toc-table\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">';\n\t\tforeach( $toc_object as $entry){\n\t\t\t\n\t\t\t$this->_output .= '<tr><td align=\"middle\" class=\"toc-page\" nowrap=\"nowrap\">'.$entry->toc_page.'</td><td>'.$entry->toc_text.'</td></tr>';\n\t\t\n\t\t}\n\t\t$this->_output .= '</table>';\n\t\t\n\t\t$this->_output .= '</div>';\n\t\t\n\t\tif( $edit == 1 ){\n\t\t\n\t\t\t//**************** Start Dialog\t****************//\n\t\t\t$this->_edit_output = '<div id=\"edittoc-'.$randomid.'\" title=\"Edit Table of Contents Block\">';\n\t\t\t$this->_edit_output .= '<form action=\"index.php?option=com_zbrochure&task=saveBlock\" method=\"post\">';\n\t\t\t\n\t\t\t$this->_edit_output .= '';\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"form-row text-container\">';\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"form-row add-padding package-container-header\">';\n\t\t\t\n\t\t\t$this->_edit_output .= '<label>Table of Contents Title:</label>';\n\t\t\t$this->_edit_output .= '<input type=\"text\" name=\"content[data][toc_title]\" class=\"inputbox\" value=\"'.$toc_title.'\" style=\"width:350px\" />';\n\t\t\t\n\t\t\t$this->_edit_output .= '</div>';\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"form-row add-padding\" style=\"max-height:200px\">';\n\t\t\t\n\t\t\t$this->_edit_output .= '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">';\n\t\t\t\n\t\t\t$this->_edit_output .= '<thead><th>&nbsp;</th><th>Page</th><th>Title</th><th>&nbsp;</th><th>&nbsp;</th></thead>';\n\t\t\t\n\t\t\t$this->_edit_output .= '<tbody id=\"sortable-'.$randomid.'\" class=\"ui-sortable\">';\n\t\t\t\n\t\t\t$i = 0;\n\t\t\tforeach( $toc_object as $entry){\n\t\t\t\t\n\t\t\t\t$this->_edit_output .= '<tr id=\"row-'.$i.'\" class=\"package-row toc-row\"><td style=\"padding:3px 0\" class=\"handle-td\"><span class=\"handle\">drag</span></td>';\n\t\t\t\t$this->_edit_output .= '<td style=\"padding:3px 0\"><input type=\"text\" name=\"content[data]['.$i.'][toc_page]\" class=\"inputbox toc_page\" value=\"'.$entry->toc_page.'\" style=\"width:50px\" /></td>';\n\t\t\t\t$this->_edit_output .= '<td style=\"padding:3px 0\"><input type=\"text\" name=\"content[data]['.$i.'][toc_text]\" class=\"inputbox toc_text\" value=\"'.$entry->toc_text.'\" style=\"width:280px\" /></td>';\n\t\t\t\t$this->_edit_output .= '<td style=\"padding:3px 0\" align=\"middle\"><button class=\"btn plus-icon-btn icon-only-btn\" onclick=\"duplicateRow(this); return false;\"><span>+</span></button></td>';\n\t\t\t\t$this->_edit_output .= '<td style=\"padding:3px 0\" align=\"middle\"><button class=\"btn minus-icon-btn icon-only-btn remove-toc-row\" onclick=\"deleteRow(this, \\''.$randomid.'\\'); return false;\"><span>-</span></button></td>';\n\t\t\t\t$this->_edit_output .= '</tr>';\n\t\t\t\t$i++;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->_edit_output .= '</tbody></table>';\n\t\t\t\n\t\t\t$this->_edit_output .= '</div>';\n\t\t\t\n\t\t\t$this->_edit_output .= '</div>';\n\t\t\t\n\t\t\t$this->_edit_output .= '<div class=\"form-row btn-container add-padding\">\n\t\t\t\t\t\t\t\t\t<button class=\"btn save-btn fr\" type=\"submit\"><span>Save</span></button>\n\t\t\t\t\t\t\t\t\t<button class=\"btn cancel-btn fr\" onclick=\"location.reload(); return false;\"><span>Cancel</span></button>\n\t\t\t\t\t\t\t\t</div>';\n\t\t\t\n\t\t\t\n\t\t\t$this->_edit_output .= '<input name=\"content[id]\" value=\"'.$data->id.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<input name=\"content_block_id\" value=\"'.$block->content_block_id.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"content_block_type\" value=\"'.$block->content_block_type.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"content_bro_id\" value=\"'.$block->content_bro_id.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<input name=\"view\" value=\"'.JRequest::getVar('view').'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"bro_id\" value=\"'.$block->bro_id.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t\n\t\t\t$this->_edit_output .= '<input name=\"bro_page_id\" value=\"'.$block->bro_page_id.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t$this->_edit_output .= '<input name=\"bro_page_order\" value=\"'.$block->bro_page_order.'\" type=\"hidden\" />'.PHP_EOL;\n\t\t\t\n\t\t\t\n\t\t\t$this->_edit_output .= '</form>';\n\t\t\t$this->_edit_output .= '</div>';\n\t\t\t//**************** End Dialog ****************//\n\t\t\t\n\t\t\t\n\t\t\t$this->_edit_output .= '\t\t<script type=\"text/javascript\">\n\t\t\t\n\t\t\t\t\t\t\t\t\t$(document).ready(function(){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$( \"#tocblock-'.$randomid.'\" ).click(function(){\n\t\t\t\t\t\t\t\t\t\t\t$(\"#edittoc-'.$randomid.'\").dialog(\\'open\\');\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$( \"#edittoc-'.$randomid.'\" ).dialog({\n\t\t\t\t\t\t\t\t\t\t\tautoOpen: false,\n\t\t\t\t\t\t\t\t\t\t\tresizable: true,\n\t\t\t\t\t\t\t\t\t\t\theight:400,\n\t\t\t\t\t\t\t\t\t\t\twidth:570,\n\t\t\t\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\t\t\t\tclose: function(){\n\t\t\t\t\t\t\t\t\t\t\t\t$( \\'#vars-dialog\\' ).dialog(\\'close\\');\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$( \"#sortable-'.$randomid.'\" ).sortable({\n\t\t\t\t\t\t\t\t\t\t\tplaceholder: \"ui-state-highlight\",\n\t\t\t\t\t\t\t\t\t\t\tcancel: \"nosort\",\n\t\t\t\t\t\t\t\t\t\t\thelper: fixHelper,\n\t\t\t\t\t\t\t\t\t\t\thandle: \\'.handle\\',\n\t\t\t\t\t\t\t\t\t\t\t\\'start\\': function (event, ui) {\n\t\t\t\t\t\t\t\t\t \tui.placeholder.html(\\'<td colspan=\"4\">&nbsp;</td>\\');\n\t\t\t\t\t\t\t\t\t \t},\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Return a helper with preserved width of cells\n\t\t\t\t\t\t\t\t\tvar fixHelper = function(e, ui) {\n\t\t\t\t\t\t\t\t\t ui.children().each(function() {\n\t\t\t\t\t\t\t\t\t $(this).width($(this).width());\n\t\t\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t\t\t return ui;\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfunction duplicateRow( elem ){\n\t\t\t\t\t\t\t\t\t\tvar myrow = $(elem).parent().parent();\n\t\t\t\t\t\t\t\t\t\tvar count = $(\".toc-row\").length;\n\t\t\t\t\t\t\t\t\t\t$(\".remove-toc-row\").css(\"opacity\",\"1\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$(elem).parent().parent().clone(true).addClass(\"added\").insertAfter(myrow);\n\t\t\t\t\t\t\t\t\t\t$(\".added .inputbox\").val(\"\");\n\t\t\t\t\t\t\t\t\t\t$(\".added\").attr(\"id\", \"row-\"+(count+1) );\n\t\t\t\t\t\t\t\t\t\t$(\".added .toc_page\").attr(\"name\", \"content[data][\"+(count+1)+\"][toc_page]\");\n\t\t\t\t\t\t\t\t\t\t$(\".added .toc_text\").attr(\"name\", \"content[data][\"+(count+1)+\"][toc_text]\");\n\t\t\t\t\t\t\t\t\t\t$(\".added\").removeClass(\"added\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfunction deleteRow( elem, id ){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tvar myrow = $(elem).parent().parent();\n\t\t\t\t\t\t\t\t\t\tvar count = $( \"#sortable-\"+id+\" .toc-row\" ).length;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif( count > 1 ){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$(elem).parent().parent().remove();\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tvar newcount = $( \"#sortable-\"+id+\" .toc-row\").length;\n\t\t\t\t\t\t\t\t\t\t\tif( newcount == 1 ){\n\t\t\t\t\t\t\t\t\t\t\t\t$( \"#sortable-\"+id+\" .remove-toc-row\").css(\"opacity\",\".3\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\talert(\"You must have at least one row.\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\t$output->render = $this->_output;\n\t\t$output->edit\t= $this->_edit_output;\n\t\t\t\t\n\t\treturn $output;\n\t\n\t}", "function print_ckopf($id,$ID)\n//==========================================================================\n// Function : print_ckopf\n//--------------------------------------------------------------------------\n// Beschreibun : erezugt eine Tabelle mit den DAten der Char_basis\n// als Anzeige modul ohne Eingabe wie eine KOPf_Zeile\n//\n// Dateiname : char_basis (local)\n//\n//\n// Argumente : $ID = charakter_id\n//\n// Returns : --\n//==========================================================================\n{\n\tglobal $DB_HOST, $DB_USER, $DB_PASS, $DB_NAME;\n\tglobal $PHP_SELF;\n\n\t$TABLE = 'char_kopf';\n\t$TABLE1 = 'char_basis';\n\n\t$db = mysql_connect($DB_HOST,$DB_USER,$DB_PASS) or die(\"Fehler beim verbinden!\");\n\n\tmysql_select_db($DB_NAME);\n\n\t$q = \"select * from $TABLE where char_id=\\\"$id\\\"\";\n\t$result = mysql_query($q) or die(\"Query Fehler...\");\n\n\t$q1 = \"select * from $TABLE1 where id=\\\"$id\\\"\";\n\t$result1 = mysql_query($q1) or die(\"Query Fehler...\");\n\n\tmysql_close($db);\n\n\t//Liste der Datensätze\n\t$row = mysql_fetch_row($result);\n\t$row1 = mysql_fetch_row($result1);\n\n\t$style = $GLOBALS[\"style_header_1\"];\n\techo \" <div $style >\\n\";\n\t\n\techo \"<table width=950 border=1 BGCOLOR=\\\"\\\">\\n\";\n\techo \"<tr>\";\n\techo \"<td rowspan=2 Width=90>\";\n\tif ($row[3]==\"MUK\")\n\t{\n\t\techo \"\\t<IMG SRC=\\\"images/muk.gif\\\" BORDER=\\\"0\\\" HEIGHT=\\\"80\\\" ALT=\\\"MUK Wappen\\\" TITLE=\\\"MUK Wappen\\\" HSPACE=\\\"0\\\" VSPACE=\\\"0\\\" ALIGN=ABSMIDDLE>\\n\";\n\t} else\n\t{\n\t\techo \"\\t<IMG SRC=\\\"images/mk.gif\\\" BORDER=\\\"0\\\" HEIGHT=\\\"80\\\" ALT=\\\"MK Wappen\\\" TITLE=\\\"MK Wappen\\\" HSPACE=\\\"0\\\" VSPACE=\\\"0\\\" ALIGN=ABSMIDDLE>\\n\";\n\t};\n\techo \"</td>\";\n\techo \"<td width=20>\";\n\techo \" \";\n\techo \"</td>\";\n\techo \"<td width=20>\";\n\techo \"<B>Notority\";\n\techo \"</td>\";\n\techo \"<td width=20>\";\n\techo \"<B>Klasse\";\n\techo \"</td>\";\n\techo \"<td width=50>\";\n\techo \"<B>LP\";\n\techo \"</td>\";\n\techo \"<td width=50>\";\n\techo \"<B>KS\";\n\techo \"</td>\";\n\techo \"<td width=50>\";\n\techo \"<B>MP\";\n\techo \"</td>\";\n\techo \"<td width=50>\";\n\techo \"<B>AP\";\n\techo \"</td>\";\n\techo \"<td width=50>\";\n\techo \" \";\n\techo \"</td>\";\n\techo \"<td width=50>\";\n\techo \"EP Start\";\n\techo \"</td>\";\n\techo \"<td width=50>\";\n\techo \"EP Con \";\n\techo \"</td>\";\n\techo \"<td width=40>\";\n\techo \"EP Vorteil\";\n\techo \"</td>\";\n\techo \"<td width=50>\";\n\techo \"EP Nachteil\";\n\techo \"</td>\";\n\techo \"<td width=50>\";\n\techo \"EP Fert\";\n\techo \"</td>\";\n\techo \"<td width=50>\";\n\techo \"EP Waf\";\n\techo \"</td>\";\n\techo \"<td width=40>\";\n\techo \"EP Mag\";\n\techo \"</td>\";\n\techo \"<td width=40>\";\n\techo \"EP Alch\";\n\techo \"</td>\";\n\techo \"<td width=40>\";\n\techo \"EP Rest\";\n\techo \"</td>\";\n// \techo \"<td width=\\\"10%\\\" >\";\n// \techo \"</td>\";\n\techo \"</tr>\";\n\n\techo \"<tr>\";\n\techo \"<td width=20>\";\n\techo \" \";\n\techo \"</td>\";\n\techo \"<td >\";\n\techo \"$row[2]\";\n\techo \"</td>\";\n\techo \"<td >\";\n\techo \"<B>$row[3]\";\n\techo \"</td>\";\n\techo \"<td >\";\n\techo \"$row[4]\";\n\techo \"</td>\";\n\techo \"<td >\";\n\techo \"$row[8]\";\n\techo \"</td>\";\n\techo \"<td >\";\n\techo \"$row[5]\";\n\techo \" / $row[6]\";\n\techo \"</td> \";\n\techo \"<td>\";\n\techo \"$row[7]\";\n\techo \"</td>\";\n\techo \"<td> \";\n\techo \"</td>\";\n\techo \"<td >\";\n\techo \" $row[9]\";\n\techo \"</td>\";\n\techo \"<td>\";\n\techo \" $row[10]\";\n\techo \"</td>\";\n\techo \"<td >\";\n\techo \" $row[11]\";\n\techo \"</td>\";\n\techo \"<td >\";\n\techo \" $row[12]\";\n\techo \"</td> \";\n\techo \"<td > \";\n\techo \" $row[13]\";\n\techo \"</td>\";\n\techo \"<td >\";\n\techo \" $row[14]\";\n\techo \"</td>\";\n\techo \"<td >\";\n\techo \" $row[15]\";\n\techo \"</td>\";\n\techo \"<td >\";\n\techo \" $row[16]\";\n\techo \"</td>\";\n\techo \"<td >\";\n\techo \" $row[17]\";\n\techo \"</td>\";\n\techo \"</tr>\";\n\techo \"</table>\";\n\n\techo \"</div>\\n\";\n\t\n}", "function cinotif_creer_cle() {\n\t$form = 'cinotif';\n\t$time = date('Y-m-d-H');\n\tif (isset($GLOBALS['visiteur_session']['id_auteur']) AND intval($GLOBALS['visiteur_session']['id_auteur']))\n\t\t$qui = \":\".$GLOBALS['visiteur_session']['id_auteur'].\":\".$GLOBALS['visiteur_session']['nom'];\n\telse {\n\t\tinclude_spip('inc/session');\n\t\t$qui = cinotif_hash_env();\n\t}\n\t\t\n\tinclude_spip('inc/securiser_action');\n\t// la cle prend en compte l'heure et l'identite de l'internaute\n\treturn calculer_cle_action(\"cle$form$time$qui\");\n}", "function consultarCitas($idEspecie) { // consulta la lista de citas bibliográficas por $idEspecie\n\t// se busca en la tabla principal referencias\n\t$listaCitas = \"\";\n\t$query = \"SELECT citas_bibliograficas \n\t\t\t\t\t FROM especies \n\t\t\t\t\t WHERE id= $idEspecie\"; \n\t$res = ejecutarQuerySQL($query);\t\n\t$total = getNumFilas($res);\n\t\t\n\tif ($total == 0)\n\t $citas = \"No hay referencias registradas para esta especie.\";\n\telse {\t\t\t\t\n\t\t\t$actual = getFila($res);\n\t\t\t$listaCitas = $actual['citas_bibliograficas'];\n\t}\t\t\n\treturn $listaCitas;\n}", "function verifica_caja_virtual($acceso,$id_pd=''){\n\t$ini_u = 'AA';\n\t$fecha= date(\"Y-m-d\");\n\t$id_caja='BB001';\n\t$id_persona='BB00000001';\n\t$id_est='BB001';\n\t$apertura_caja=date(\"H:i:s\");\n\t$status_caja='ABIRTA';\n\t$acceso->objeto->ejecutarSql(\" select id_caja_cob from caja_cobrador where fecha_caja='$fecha' and id_caja='$id_caja' and id_persona='$id_persona' and id_est='$id_est'\");\n\tif($row=row($acceso)){\n\t\t$id_caja_cob=trim($row[\"id_caja_cob\"]);\n\t}else{\n\t\t$acceso->objeto->ejecutarSql(\"select * from caja_cobrador where (id_caja_cob ILIKE '$ini_u%') ORDER BY id_caja_cob desc\"); \n\t\t$id_caja_cob = $ini_u.verCodLong($acceso,\"id_caja_cob\");\n\n\t\t$acceso->objeto->ejecutarSql(\"insert into caja_cobrador(id_caja_cob,id_caja,id_persona,fecha_caja,apertura_caja,status_caja,id_est,fecha_sugerida) values ('$id_caja_cob','$id_caja','$id_persona','$fecha','$apertura_caja','$status_caja','$id_est','$fecha')\");\n\t\t$acceso->objeto->ejecutarSql(\"Update caja Set status_caja='Abierta' Where id_caja='$id_caja'\");\n\t}\n\treturn $id_caja_cob;\n}" ]
[ "0.6159074", "0.5798624", "0.57816863", "0.5773856", "0.5746534", "0.5709933", "0.5669744", "0.5667635", "0.56286716", "0.5545264", "0.55301195", "0.5518028", "0.5515942", "0.5489696", "0.5471519", "0.54623055", "0.545624", "0.54374224", "0.54228544", "0.5398787", "0.53611594", "0.5348866", "0.5343304", "0.5337201", "0.53291845", "0.53287864", "0.5313547", "0.53041804", "0.5299648", "0.52917236", "0.5288248", "0.52810746", "0.52802217", "0.526912", "0.5262114", "0.5249608", "0.5243054", "0.52134836", "0.5210019", "0.52039117", "0.518238", "0.5179561", "0.5173382", "0.5173308", "0.51674503", "0.5163637", "0.51553047", "0.5151387", "0.5145252", "0.51451695", "0.51426136", "0.5135417", "0.51300055", "0.5129603", "0.51271677", "0.512455", "0.5119035", "0.5104092", "0.50985706", "0.50980335", "0.509259", "0.5091273", "0.50716233", "0.50689", "0.50675166", "0.506486", "0.5062472", "0.50618744", "0.5060747", "0.50551504", "0.50546336", "0.5054331", "0.50537837", "0.5051122", "0.5037604", "0.50371", "0.50350934", "0.5033019", "0.5026041", "0.50256145", "0.50250304", "0.50250304", "0.5021998", "0.5020166", "0.5011812", "0.50109607", "0.5006001", "0.5001646", "0.4998453", "0.49971887", "0.49952623", "0.4989096", "0.49890086", "0.4984762", "0.498263", "0.49824217", "0.49804768", "0.49781787", "0.49769607", "0.4975456" ]
0.72676164
0
/ Renvoie les infos sur une banque. S'il n'y a rien on renvoie NULL
function getInfosBanque($id_bqe=NULL,$id_ag=NULL) { global $dbHandler; $db = $dbHandler->openConnection(); $sql = "SELECT * FROM adsys_banque"; if ($id_bqe != NULL) { if ($id_ag == NULL) $sql .=" WHERE id_banque = $id_bqe"; else $sql .=" WHERE id_banque = $id_bqe and id_ag = $id_ag "; } elseif ($id_ag != NULL) $sql .=" WHERE id_ag = $id_ag"; $sql.= ";"; $result=$db->query($sql); if (DB::isError($result)) { $dbHandler->closeConnection(false); signalErreur(__FILE__,__LINE__,__FUNCTION__); } $dbHandler->closeConnection(true); if ($result->numRows() == 0) return NULL; while ( $row = $result->fetchRow(DB_FETCHMODE_ASSOC) ) $DATAS[$row["id_banque"]] = $row; return $DATAS; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculer_boucle($id_boucle, &$boucles) {\n\n\t// gerer les statuts si declares pour cette table\n\t/*\n\t$table_statut[nom_table][] = array(\n\t\t'champ'=>'statut', // champ de la table sur lequel porte le filtrage par le statut\n\t\t'publie'=>'publie', // valeur ou liste de valeurs, qui definissent l'objet comme publie.\n\t\t'previsu'=>'publie,prop', // valeur ou liste de valeurs qui sont visibles en previsu\n\t\t'post_date'=>'date', // un champ de date pour la prise en compte des post_dates, ou rien sinon\n\t 'exception'=>'statut', // liste des modificateurs qui annulent le filtrage par statut\n\t // si plusieurs valeurs : array('statut','tout','lien')\n\t);\n\n\tPour 'publier' ou 'previsu', si la chaine commence par un \"!\" on exclu au lieu de filtrer sur les valeurs donnees\n\tsi la chaine est vide, on ne garde rien si elle est seulement \"!\" on n'exclu rien\n\n\tSi le statut repose sur une jointure, 'champ' est alors un tableau du format suivant :\n\t'champ'=>array(\n\t array(table1, cle1),\n\t ...\n\t array(tablen, clen),\n\t champstatut\n\t )\n\n\tchampstatut est alors le champ statut sur la tablen\n\tdans les jointures, clen peut etre un tableau pour une jointure complexe : array('id_objet','id_article','objet','article')\t \n\t*/\n\n\t$boucle = &$boucles[$id_boucle];\n\t$id_table = $boucle->id_table;\n\t$table_sql = $boucle->from[$id_table];\n\tif (isset($GLOBALS['table_statut'][$table_sql])){\n\t\tforeach($GLOBALS['table_statut'][$table_sql] as $s){\n\t\t\t// Restreindre aux elements publies si pas de {statut} ou autre dans les criteres\n\t\t\t$filtrer = true;\n\t\t\tif (isset($s['exception'])) {\n\t\t\t\tforeach(is_array($s['exception'])?$s['exception']:array($s['exception']) as $m) {\n\t\t\t\t\tif (isset($boucle->modificateur[$m]) OR isset($boucle->modificateur['criteres'][$m])) {\n\t\t\t\t\t\t$filtrer = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($filtrer) {\n\t\t\t\tif (is_array($s['champ'])){\n\t\t\t\t\t$statut = preg_replace(',\\W,','',array_pop($s['champ'])); // securite\n\t\t\t\t\t$jointures = array();\n\t\t\t\t\tforeach($s['champ'] as $j) {\n\t\t\t\t\t\t$jointures[] = array('',array($id=reset($j)),end($j));\n\t\t\t\t\t}\n\t\t\t\t\t$jointures[0][0] = $id_table;\n\t\t\t\t\tif (!array_search($id, $boucle->from)){\n\t\t\t\t\t\tfabrique_jointures($boucle, $jointures, true, $boucle->show, $id_table);\n\t\t\t\t\t}\n\t\t\t\t\t// trouver l'alias de la table d'arrivee qui porte le statut\n\t\t\t\t\t$id = array_search($id, $boucle->from);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$id = $id_table;\n\t\t\t\t\t$statut = preg_replace(',\\W,','',$s['champ']); // securite\n\t\t\t\t}\n\t\t\t\t$mstatut = $id .'.'.$statut;\n\n\t\t\t\tif (!$GLOBALS['var_preview']) {\n\t\t\t\t\tif (isset($s['post_date']) AND $s['post_date']\n\t\t\t\t\t\tAND $GLOBALS['meta'][\"post_dates\"] == 'non'){\n\t\t\t\t\t\t$date = $id.'.'.preg_replace(',\\W,','',$s['post_date']); // securite\n\t\t\t\t\t\tarray_unshift($boucle->where,\"quete_condition_postdates('$date')\");\n\t\t\t\t\t}\n\t\t\t\t\tarray_unshift($boucle->where,calculer_where_statut($mstatut,$s['publie']));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tarray_unshift($boucle->where,calculer_where_statut($mstatut,$s['previsu']));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\n\t$boucles[$id_boucle] = pipeline('post_boucle', $boucles[$id_boucle]);\n\n\t// en mode debug memoriser les premiers passages dans la boucle,\n\t// mais pas tous, sinon ca pete.\n\tif (_request('var_mode_affiche') != 'resultat') \n\t\t$trace = '';\n\telse {\n\t\t$trace = $boucles[$id_boucle]->descr['nom'] . $id_boucle;\n\t\t$trace = \"if (count(@\\$GLOBALS['debug_objets']['resultat']['$trace'])<3)\n\t \\$GLOBALS['debug_objets']['resultat']['$trace'][] = \\$t0;\";\n\t}\n\treturn ($boucles[$id_boucle]->type_requete == 'boucle')\n\t? calculer_boucle_rec($id_boucle, $boucles, $trace) \n\t: calculer_boucle_nonrec($id_boucle, $boucles, $trace);\n}", "function fProcesaBanco(){\n global $db, $cla, $agPar, $igNumChq, $igSecue, $ogDet;\n $alDet = fIniDetalle();\n $alDet[\"det_codcuenta\"]\t= $cla->cla_ctaorigen; \n $alDet[\"det_glosa\"] \t= substr($agPar[\"com_Concepto\"],0, 50) . ' ' . substr($agPar[\"slBenef\"],0,20);\n $alDet['det_idauxiliar']= $agPar[\"com_Emisor\"];\n $alDet[\"det_numcheque\"]\t= $igNumChq;\t\t\t// es el numero de cheque\n $alDet[\"det_feccheque\"]\t= $agPar[\"com_FechCheq\"];\n $alDet['det_valdebito']\t= $agPar[\"flValor\"] * $cla->cla_indicador; // segun el signo del indicador, se aplica como DB/CR al grabar;\n $alDet['det_valcredito']\t= 0;\n $alDet['det_secuencia']\t= $igSecue;\n\tif(fGetParam(\"pAppDbg\",0)){\n\t\tprint_r($alDet);\n\t}\n\tfInsdetalleCont($db, $alDet);\n}", "function cargar_data_libro_banco($c_a_cuenta_banco, $limit, $nombre_mes='' , $cc='') {\n\t//$nombre_mes='DICIEMBRE';\n $sql = \"SELECT\n prosic_comprobante.id_comprobante\n , prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.status_comprobante\n , prosic_anexo.codigo_anexo\n , prosic_subdiario.id_subdiario\n , prosic_subdiario.codigo_subdiario\n , prosic_subdiario.nombre_subdiario\n , prosic_anio.nombre_anio\n , prosic_mes.nombre_mes\n , prosic_tipo_comprobante.codigo_tipo_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n ,prosic_comprobante.nro_comprobante\n ,prosic_moneda.codigo_moneda\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo \tON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_mes \tON (prosic_comprobante.id_mes = prosic_mes.id_mes)\n INNER JOIN prosic_anio \tON (prosic_comprobante.id_anio = prosic_anio.id_anio)\n INNER JOIN prosic_subdiario \tON (prosic_comprobante.id_subdiario = prosic_subdiario.id_subdiario)\n INNER JOIN prosic_tipo_comprobante\tON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_plan_contable ON (prosic_comprobante.cuenta_banco = prosic_plan_contable.id_plan_contable)\n INNER JOIN prosic_moneda\t ON (prosic_comprobante.id_moneda= prosic_moneda.id_moneda)\n WHERE prosic_comprobante.id_subdiario=8 AND prosic_comprobante.c_a_cuenta_banco='\" . $c_a_cuenta_banco . \"' \";\t\n\tif ($nombre_mes != '') $sql.= \" AND prosic_mes.nombre_mes = '\" . $nombre_mes . \"' \";\n\tif ($cc != '') $sql.=\" AND prosic_comprobante.codigo_comprobante = '\" . $cc . \"' \";\n\t$sql.=\" ORDER BY MONTH(prosic_comprobante.emision_comprobante) DESC , prosic_comprobante.codigo_comprobante*10000 DESC\";\n\t//$sql.=\" ORDER BY prosic_comprobante.status_comprobante DESC, MONTH(prosic_comprobante.emision_comprobante), prosic_comprobante.emision_comprobante\";\n\tif ($limit != '')$sql.=\" \" . $limit . \" \";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function emptyInfo() {\n\n $this->setCodigoestudiante(\"\");\n $this->setIdestudiantegeneral(\"\");\n $this->setCodigocarrera(\"\");\n $this->setSemestre(\"\");\n $this->setNumerocohorte(\"\");\n $this->setCodigotipoestudiante(\"\");\n $this->setCodigosituacioncarreraestudiante(\"\");\n $this->setCodigoperiodo(\"\");\n $this->setCodigojornada(\"\");\n }", "function requeteur_data_dist(&$boucles, &$boucle, &$id) {\n\tinclude_spip('iterateur/data');\n\tif ($h = charger_fonction($boucle->type_requete . '_to_array' , 'inc', true)) {\n\t\t$g = charger_fonction('data', 'iterateur');\n\t\t$boucles[$id] = $g($boucle);\n\t\t// from[0] stocke le type de data (rss, yql, ...)\n\t\t$boucles[$id]->from[] = $boucle->type_requete;\n\t\t\n\t} else {\n\t\t$x = $boucle->type_requete;\n\t\t$boucle->type_requete = false;\n\t\t$msg = array('zbug_requeteur_inconnu',\n\t\t\t\tarray(\n\t\t\t\t'requeteur' => 'data',\n\t\t\t\t'type' => $x\n\t\t));\n\t\terreur_squelette($msg, $boucle);\n\t}\n}", "function stocks_pre_boucle($boucle) {\n $id_table = $boucle->id_table;\n\n //Savoir si on consulté la table organisations_liens\n if ($jointure = array_keys($boucle->from, 'spip_stocks')) {\n //Vérifier qu'on est bien dans le cas d'une jointure automatique\n if (isset($boucle->join[$jointure[0]])\n and isset($boucle->join[$jointure[0]][3])\n and $boucle->join[$jointure[0]]\n and $boucle->join[$jointure[0]][3]\n ) {\n //Le critere ON de la jointure (index 3 dans le tableau de jointure) est incompléte\n //on fait en sorte de retomber sur ses pattes, en indiquant l'objet à joindre\n $boucle->join[$jointure[0]][3] = \"'L1.objet='.sql_quote('\".objet_type($id_table).\"')\";\n\t\t}\n }\n\n return $boucle;\n}", "public function readAllInfo()\n {\n //recupération des données en post\n $data = $this->request->data;\n try\n {\n //selection d'une UE en foction de l'identifiant\n if (!empty($data['id_matiere'])) {\n $results = $this->model->read_all_info_id((int)$data['id_matiere']);\n\n if (empty($results)) {\n $this->_return('la matière demandée n\\'existe pas dans la base de donnée', false);\n }\n $this->_return('Informations sur la matière '.$results->nom_matiere.' ', true, $results);\n }\n //selection de toutes les UE d'enseignement\n $results = $this->model->read_all_info_matiere();\n if (empty($results)) {\n $this->_return('Vous n\\'avez pas encore de matière en base de données', false);\n }\n $this->_return('liste des matières disponibles dans la base de données', true, $results);\n }\n catch(Exception $e)\n {\n $this->_exception($e);\n }\n }", "public function rechercherUn() {\n\n // query to read single record\n $query = \"SELECT * FROM \" . $this->sNomTable . \"\n LEFT JOIN panier ON idPanier = iNoPanier\n LEFT JOIN produit ON idProduit = iNoProduit\n WHERE iNoPanier = :iNoPanier\";\n\n // prepare query statement\n $stmt = $this->oConnexion->prepare($query);\n\n // bind id of product to be updated\n $stmt->bindParam(\":iNoPanier\", $this->iNoPanier);\n\n // execute query\n $stmt->execute();\n\n // get retrieved row\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // set values to object properties\n $this->idContenuPanier = $row['idContenuPanier'];\n $this->iQteProduit = $row['iQteProduit'];\n\n // Produit\n $this->iNoProduit = $row['iNoProduit'];\n $this->sSKUProduit = $row['sSKUProduit'];\n $this->sNomProduit = $row['sNomProduit'];\n $this->sMarque = $row['sMarque'];\n $this->fPrixProduit = $row['fPrixProduit'];\n $this->fPrixSolde = $row['fPrixSolde'];\n $this->sDescCourteProduit = $row['sDescCourteProduit'];\n $this->sDescLongProduit = $row['sDescLongProduit'];\n $this->sCouleur = $row['sCouleur'];\n $this->sCapacite = $row['sCapacite'];\n $this->sDateAjout = $row['sDateAjout'];\n $this->bAfficheProduit = $row['bAfficheProduit'];\n $this->iNoCategorie = $row['iNoCategorie'];\n $this->sNomCategorie = $row['sNomCategorie'];\n $this->sUrlCategorie = $row['sUrlCategorie'];\n\n // Panier\n $this->iNoPanier = $row['iNoPanier'];\n $this->sNumPanier = $row['sNumPanier'];\n $this->sDateModification = $row['sDateModification'];\n }", "public function recupereDonnees (){\n\t\t$req = $this->bdd->prepare('SELECT gratuit, image, invisibleAuteur, idModerateur, moderation, affiche , titre, idAuteur, idCategorie, corps, DATE_FORMAT(date_creation, \\'%d/%m/%Y à %Hh%i\\') AS date_creation_fr FROM `Article` WHERE id = ?');\n\t\t$req->execute(array($this->id));\n\t\t$donnees = $req->fetch();\n\t\t$req->closeCursor(); \n\n\t\t$this->titre = $donnees['titre'];\n\t\t$this->idAuteur = $donnees['idAuteur'];\n\t\t$this->idModerateur = $donnees['idModerateur'];\n\t\t$this->idCategorie = $donnees['idCategorie'];\n\t\t$this->corps = $donnees['corps'];\n\t\t$this->extrait = $this->creationExtrait($this->corps,15); // Fixé arbitrairement à 15 mots dans l'extrait pour le moment.\n\t\t$this->extraitLong = $this->creationExtrait($this->corps,35); // Fixé arbitrairement à 35 mots dans l'extrait pour le moment.\n\n\t\t$this->image = $donnees['image'];\n\t\t/*\n\t\tif (isset($donnees['image'])) {\n\t\t\t$this->image = $donnees['image'];\n\t\t}else{\n\t\t\t$this->image = \"default.jpg\";\n\t\t}\n\t\t*/\n\n\t\t$this->date_creation_fr = $donnees['date_creation_fr'];\n\t\tif ($donnees['moderation'] == 0){\n\t\t\t$this->moderation = false;\n\t\t} else {\n\t\t\t$this->moderation = true;\n\t\t}\n\n\t\tif ($donnees['affiche'] == 0){\n\t\t\t$this->affiche = false;\n\t\t} else {\n\t\t\t$this->affiche = true;\n\t\t}\n\t\tif ($donnees['invisibleAuteur'] == 0){\n\t\t\t//echo \"false\";\n\t\t\t$this->invisibleAuteur = false;\n\t\t} else {\n\t\t\t//echo \"true\";\n\t\t\t$this->invisibleAuteur = true;\n\t\t}\n\t\tif ($donnees['gratuit'] == 0){\n\t\t\t$this->gratuit = false;\n\t\t} else {\n\t\t\t$this->gratuit = true;\n\t\t}\n\n\t\t// Recuperer le nombre de commentaire liés à cet article\n\t\t$req = $this->bdd->prepare('SELECT COUNT(id) FROM `Commentaire` WHERE idArticle = ? AND affiche = ?');\n\t\t$req->execute(array($this->id, \"1\"));\n\t\t$donnees = $req->fetch();\n\t\t$req->closeCursor();\n\t\t$this->nbCommentaire = $donnees[0];\n\t}", "public function rechercherUn() {\n\n // query to read single record\n $query = \"SELECT * FROM \" . $this->sNomTable . \"\n LEFT JOIN produit ON idProduit = iNoProduit\n WHERE idContenuCommande = :idContenuCommande\";\n\n // prepare query statement\n $stmt = $this->oConnexion->prepare($query);\n\n // bind id of product to be updated\n $stmt->bindParam(\":idContenuCommande\", $this->idContenuCommande);\n\n // execute query\n $stmt->execute();\n\n // get retrieved row\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // set values to object properties\n $this->idContenuCommande = $row['idContenuCommande'];\n $this->iQteProduitCommande = $row['iQteProduitCommande'];\n $this->fPrixCommande = $row['fPrixCommande'];\n $this->iNoCommande = $row['iNoCommande'];\n\n // Produit\n $this->iNoProduit = $row['iNoProduit'];\n $this->sSKUProduit = $row['sSKUProduit'];\n $this->sNomProduit = $row['sNomProduit'];\n $this->sMarque = $row['sMarque'];\n $this->fPrixProduit = $row['fPrixProduit'];\n $this->fPrixSolde = $row['fPrixSolde'];\n $this->sDescCourteProduit = $row['sDescCourteProduit'];\n $this->sCouleur = $row['sCouleur'];\n $this->sCapacite = $row['sCapacite'];\n }", "function absender_bestimmen($absender,$db){\n$query1=\"select * from user\";\n\t$antwort1=$db->query($query1);\n\t$antwort1=array_bildung($antwort1);\n\t\n\t$i=0;\n\tforeach($absender[Absender] as $name => $inhalt){\n\tif($inhalt==0){\n\t\t$absender[Absender][$i]=\"Information an Alle !\";\n\t}\n\t\n\t\t$k=0;\n\t\tforeach($antwort1[id] as $name1 => $inhalt1){\n\t\t\tif($inhalt==$inhalt1){\n\t\t\t\t$absender[Absender][$i]=$antwort1[Name][$k].\"&nbsp;&nbsp;\".$antwort1[Vorname][$k].\"&nbsp;&nbsp;- \".$antwort1[Bemerkung][$k].\" -\";\n\t\t\t}\n\t\t$k++;\n\t\t}\n\t$i++;\n\t}\n\treturn $absender;\n}", "public function listarbiofinCE(){\n $stmt = $this->objPDO->prepare(\"SELECT b.id_biopsia,b.num_biopsia,b.fecha_ingreso,db.fecha_informe,(e.emp_nombres||' '||e.emp_appaterno||' '||e.emp_apmaterno) as medico,\n list(m.descr_muestra)as muestras from sisanatom.biopsia b \n inner join sisanatom.detalle_bioce db on b.id_biopsia=db.id_biopsia\n inner join sisanatom.muestras_biopsia mb on b.id_biopsia=mb.id_biopsia inner join empleados e on b.patologo_responsable=e.emp_id\n inner join sisanatom.muestra m on m.id_muestra=mb.id_muestrarem\n where b.estado_biopsia=3 and b.condicion_biopsia='A'\n group by b.id_biopsia,b.num_biopsia,b.fecha_ingreso,db.fecha_informe,medico\");\n $stmt->execute();\n $pacientes = $stmt->fetchAll(PDO::FETCH_OBJ);\n return $pacientes;\n }", "function emptyInfo() {\n\n $this->setIdestudiantegeneral(\"\");\n $this->setIdtrato(\"\");\n $this->setIdestadocivil(\"\");\n $this->setTipodocumento(\"\");\n $this->setNumerodocumento(\"\");\n $this->setExpedidodocumento(\"\");\n $this->setNumerolibretamilitar(\"\");\n $this->setNumerodistritolibretamilitar(\"\");\n $this->setExpedidalibretamilitar(\"\");\n $this->setNombrecortoestudiantegeneral(\"\");\n $this->setNombresestudiantegeneral(\"\");\n $this->setApellidosestudiantegeneral(\"\");\n $this->setFechanacimientoestudiantegeneral(\"\");\n $this->setIdciudadnacimiento(\"\");\n $this->setCodigogenero(\"\");\n $this->setDireccionresidenciaestudiantegeneral(\"\");\n $this->setDireccioncortaresidenciaestudiantegeneral(\"\");\n $this->setCiudadresidenciaestudiantegeneral(\"\");\n $this->setTelefonoresidenciaestudiantegeneral(\"\");\n $this->setTelefono2estudiantegeneral(\"\");\n $this->setCelularestudiantegeneral(\"\");\n $this->setDireccioncorrespondenciaestudiantegeneral(\"\");\n $this->setDireccioncortacorrespondenciaestudiantegeneral(\"\");\n $this->setCiudadcorrespondenciaestudiantegeneral(\"\");\n $this->setTelefonocorrespondenciaestudiantegeneral(\"\");\n $this->setEmailestudiantegeneral(\"\");\n $this->setEmail2estudiantegeneral(\"\");\n $this->setFechacreacionestudiantegeneral(\"\");\n $this->setFechaactualizaciondatosestudiantegeneral(\"\");\n $this->setCodigotipocliente(\"\");\n $this->setCasoemergenciallamarestudiantegeneral(\"\");\n $this->setTelefono1casoemergenciallamarestudiantegeneral(\"\");\n $this->setTelefono2casoemergenciallamarestudiantegeneral(\"\");\n $this->setIdtipoestudiantefamilia(\"\");\n }", "public function getRefBancaria(){\n return $this->ref_bancaria->toArray();\n }", "function listarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_sel';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('id_cuenta_bancaria_boa','int4');\n\t\t$this->captura('banco','int4');\n\t\t$this->captura('cuenta','varchar');\n\t\t$this->captura('desc_cuenta','varchar');\n\t\t$this->captura('moneda','int4');\n\t\t$this->captura('tipo_cuenta','bpchar');\n\t\t$this->captura('estado_cuenta','bpchar');\n\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('desc_cuenta_banco','varchar');\n\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function Cargar($recuperanombre,$recuperacif,$recuperavisible,$recuperacic,$recuperatipo,$recuperagrupo_gestion,$recuperadireccion,$recuperalocalidad,$recuperacodigo_postal,$recuperaprovincia,$recuperapais, $recuperatelefono,$recuperafax,$recuperamail,$recuperaresponsable,\r\n\t$recuperacargo_responsable,$recuperagrupo_comision,$recuperasituacion,$recuperaobservaciones,$recuperanombre_fiscal,$recuperadireccion_fiscal,$recuperalocalidad_fiscal,$recuperacodigo_postal_fiscal,\r\n\t$recuperapais_fiscal,$recuperaswift,$recuperacc_iban,$recuperanombre_banco,$recuperadireccion_banco,$recuperamail_contabilidad){\r\n\r\n\t\t$conexion = $this ->Conexion;\r\n\r\n\t\t//Consulta\r\n\t\t$Filadesde = $this ->Filadesde;\r\n\t\t$Usuario = $this ->Usuario;\r\n\r\n\t\t//ESPECIFICO: Cargamos las lineas solicitadas para esta pantalla\r\n\t\t$buscar_codigo = $this ->Buscar_codigo;\r\n\t\t$buscar_nombre = $this ->Buscar_nombre;\r\n\t\t$buscar_grupo_gestion = $this ->Buscar_grupo_gestion;\t\r\n\r\n\r\n\r\n\t\tif($buscar_codigo != null){\r\n\t\t\t$CADENA_BUSCAR = \" WHERE ID = '\".$buscar_codigo.\"'\";\r\n\t\t}elseif($buscar_nombre != null){\r\n\t\t\t$CADENA_BUSCAR = \" WHERE NOMBRE LIKE '%\".$buscar_nombre.\"%'\";\r\n\t\t}elseif($buscar_grupo_gestion != null){\r\n\t\t\t$CADENA_BUSCAR = \" WHERE GRUPO_GESTION = '\".$buscar_grupo_gestion.\"'\";\r\n\t\t}else{\r\n\t\t\t$CADENA_BUSCAR = \" WHERE NOMBRE = 'XX' \";\r\n\t\t\t//$CADENA_BUSCAR = \"\";\r\n\t\t}\r\n\r\n\t\t$resultado =$conexion->query(\"SELECT id,nombre,cif,visible,cic,tipo,grupo_gestion,direccion,localidad,codigo_postal,provincia,pais,telefono,fax,mail,responsable,\r\n\tcargo_responsable,grupo_comision,situacion,observaciones,nombre_fiscal,direccion_fiscal,localidad_fiscal,codigo_postal_fiscal,provincia_fiscal,pais_fiscal,swift,cc_iban,nombre_banco,direccion_banco,mail_contabilidad FROM hit_minoristas \".$CADENA_BUSCAR.\" ORDER BY NOMBRE\");\r\n\r\n\t\t/*if ($resultado == FALSE){\r\n\t\t\techo('Error en la consulta');\r\n\t\t\t$resultado->close();\r\n\t\t\t$conexion->close();\r\n\t\t\texit;\r\n\t\t}*/\r\n\t\t//----------------------------------------------------------------\r\n\r\n\t\t//Guardamos el resultado en una matriz con un numero fijo de registros\r\n\t\t//que controlaremos por una tabla de configuracion de pantallas de usuarios. ESPECIFICO: Solo el nombre del formulario en la query\r\n\t\t$numero_filas =$conexion->query(\"SELECT LINEAS_MODIFICACION FROM hit_usuarios_formularios WHERE FORMULARIO = 'MINORISTAS' AND USUARIO = '\".$Usuario.\"'\");\r\n\t\t$Nfilas\t = $numero_filas->fetch_assoc();\t\t\t\t\t\t\t\t\t\t\t //------\r\n\r\n\t\t$minoristas = array();\r\n\t\tif($recuperanombre != null){\r\n\t\t\t$minoristas[0] = array (\"id\" => null, \"nombre\" => $recuperanombre, \"cif\" => $recuperacif, \"visible\" => $recuperavisible, \"cic\" => $recuperacic, \"tipo\" => $recuperatipo, \"grupo_gestion\" => $recuperagrupo_gestion, \"direccion\" => $recuperadireccion, \"localidad\" => $recuperalocalidad, \"codigo_postal\" => $recuperacodigo_postal, \"provincia\" => $recuperaprovincia, \"pais\" => $recuperapais, \"telefono\" => $recuperatelefono, \"fax\" => $recuperafax, \"mail\" => $recuperamail, \"responsable\" => $recuperaresponsable, \"cargo_responsable\" => $recuperacargo_responsable, \"grupo_comision\" => $recuperagrupo_comision, \"situacion\" => $recuperasituacion, \"observaciones\" => $recuperaobservaciones, \"v\" => $recuperanombre_fiscal, \"direccion_fiscal\" => $recuperadireccion_fiscal, \"localidad_fiscal\" => $recuperalocalidad_fiscal, \"codigo_postal_fiscal\" => $recuperacodigo_postal_fiscal, \"provincia_fiscal\" => $recuperaprovincia_fiscal, \"pais_fiscal\" => $recuperapais_fiscal, \"swift\" => $recuperaswift, \"cc_iban\" => $recuperacc_iban, \"nombre_banco\" => $recuperanombre_banco, \"direccion_banco\" => $recuperadireccion_banco, \"mail_contabilidad\" => $recuperamail_contabilidad);\r\n\t\t}else{\r\n\t\t\tfor ($num_fila = $Filadesde-1; $num_fila <= $Filadesde + $Nfilas['LINEAS_MODIFICACION']-2; $num_fila++) {\r\n\t\t\t\t$resultado->data_seek($num_fila);\r\n\t\t\t\t$fila = $resultado->fetch_assoc();\r\n\t\t\t\tarray_push($minoristas,$fila);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Liberar Memoria usada por la consulta\r\n\t\t$resultado->close();\r\n\t\t$numero_filas->close();\r\n\r\n\t\treturn $minoristas;\t\t\t\t\t\t\t\t\t\t\t\r\n\t}", "function getListeChamps()\n{\n\t// ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp\n\t$laListeChamps[]=new dbChamp(\"Cms_id\", \"entier\", \"get_id\", \"set_id\");\n\t$laListeChamps[]=new dbChamp(\"Cms_type\", \"entier\", \"get_type\", \"set_type\");\n\t$laListeChamps[]=new dbChamp(\"Cms_title\", \"text\", \"get_title\", \"set_title\");\n\t$laListeChamps[]=new dbChamp(\"Cms_description\", \"text\", \"get_description\", \"set_description\");\n\t$laListeChamps[]=new dbChamp(\"Cms_thumbnail_loc\", \"text\", \"get_thumbnail_loc\", \"set_thumbnail_loc\");\n\t$laListeChamps[]=new dbChamp(\"Cms_file\", \"text\", \"get_file\", \"set_file\");\n\t$laListeChamps[]=new dbChamp(\"Cms_youtube\", \"text\", \"get_youtube\", \"set_youtube\");\n\t$laListeChamps[]=new dbChamp(\"Cms_content_loc\", \"text\", \"get_content_loc\", \"set_content_loc\");\n\t$laListeChamps[]=new dbChamp(\"Cms_player_loc\", \"text\", \"get_player_loc\", \"set_player_loc\");\n\t$laListeChamps[]=new dbChamp(\"Cms_duration\", \"text\", \"get_duration\", \"set_duration\");\n\t$laListeChamps[]=new dbChamp(\"Cms_tag\", \"text\", \"get_tag\", \"set_tag\");\n\t$laListeChamps[]=new dbChamp(\"Cms_category\", \"text\", \"get_category\", \"set_category\");\n\t$laListeChamps[]=new dbChamp(\"Cms_family_friendly\", \"entier\", \"get_family_friendly\", \"set_family_friendly\");\n\t$laListeChamps[]=new dbChamp(\"Cms_cms_site\", \"entier\", \"get_cms_site\", \"set_cms_site\");\n\t$laListeChamps[]=new dbChamp(\"Cms_statut\", \"entier\", \"get_statut\", \"set_statut\");\n\treturn($laListeChamps);\n}", "public function get_Banco(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from banco;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }", "function voirDerniereCommandeAvecFacture(){\n\t$conditions = array();\n\t$order = array();\n\tarray_push($order, array('nameChamps'=>'idFacture','sens'=>'desc'));\n\tarray_push($conditions, array('nameChamps'=>'idFacture','type'=>'is not null','name'=>'','value'=>''));\n\t$req = new myQueryClass('commande',$conditions,$order,'','limit 1');\n\t$r = $req->myQuerySelect();\n\treturn $r[0];\n}", "public function getCalculos() {\n\n if (count($this->aCalculos) == 0 && !empty($this->iPlanilha)) {\n\n $oDaoBensCalculo = new cl_benshistoricocalculobem();\n $sWhereCalculos = \"t58_benshistoricocalculo = {$this->iPlanilha}\";\n $sSqlBensCalculo = $oDaoBensCalculo->sql_query(null, \"benshistoricocalculobem.*, bens.*, bensdepreciacao.*\", \"t58_sequencial\", $sWhereCalculos);\n $rsBensCaculo = $oDaoBensCalculo->sql_record($sSqlBensCalculo);\n\n if ($oDaoBensCalculo->numrows > 0) {\n\n for ($iCalculo = 0; $iCalculo < $oDaoBensCalculo->numrows; $iCalculo++) {\n\n $oDadosCalculo = db_utils::fieldsMemory($rsBensCaculo, $iCalculo);\n\n $oCalculo = new CalculoBem();\n $oCalculo->setHistoricoCalculo($oDadosCalculo->t58_benshistoricocalculo);\n $oCalculo->setPercentualDepreciado($oDadosCalculo->t58_percentualdepreciado);\n $oCalculo->setSequencial($oDadosCalculo->t58_sequencial);\n $oCalculo->setTipoDepreciacao($oDadosCalculo->t58_benstipodepreciacao);\n $oCalculo->setValorAnterior($oDadosCalculo->t58_valoranterior);\n $oCalculo->setValorAtual($oDadosCalculo->t58_valoratual);\n $oCalculo->setValorCalculado($oDadosCalculo->t58_valorcalculado);\n $oCalculo->setValorResidual($oDadosCalculo->t58_valorresidual);\n $oCalculo->setValorResidualAnterior($oDadosCalculo->t58_valorresidualanterior);\n\n $oBem = new Bem();\n $oBem->setCodigoBem($oDadosCalculo->t52_bem);\n $oBem->setCodigoBemDepreciacao($oDadosCalculo->t44_sequencial);\n $oBem->setTipoDepreciacao( BemTipoDepreciacaoRepository::getPorCodigo($oDadosCalculo->t44_benstipodepreciacao) );\n $oBem->setTipoAquisicao( BemTipoAquisicaoRepository::getPorCodigo($oDadosCalculo->t44_benstipoaquisicao) );\n $oBem->setClassificacao(BemClassificacaoRepository::getPorCodigo($oDadosCalculo->t52_codcla));\n $oBem->setVidaUtil($oDadosCalculo->t44_vidautil);\n $oBem->setValorAquisicao($oDadosCalculo->t52_valaqu);\n $oBem->setValorResidual($oDadosCalculo->t44_valorresidual);\n $oBem->setValorDepreciavel($oDadosCalculo->t44_valoratual);\n $oBem->setVidaUtil($oDadosCalculo->t44_vidautil);\n $oBem->setDescricao($oDadosCalculo->t52_descr);\n\n $oCalculo->setBem($oBem);\n\n array_push($this->aCalculos, $oCalculo);\n }\n }\n\n unset($oDaoBensCalculo);\n unset($rsBensCaculo);\n }\n return $this->aCalculos;\n }", "function set_detail(){\r\n\t\t\t\r\n\t\t$sql=\"SELECT civilite, nom, prenom, adresse, tel_fixe ,tel_mobile ,email,\r\n\t\t url_site,profil, date_creation, date_derniere_connexion, \r\n\t\t\t\t\t nombre_connexions, mode_acces, date_debut_acces, \r\n\t\t\t\t\t date_fin_acces,login, mdp\r\n\t\t\t FROM les_usagers \r\n\t\t\t WHERE id_usager='$this->id_usager'\";\t \t\t \r\n\r\n\t\t$result = $this->bdd->executer($sql);\r\n\t\t\t\r\n\t\twhile ($ligne = mysql_fetch_assoc($result)) {\r\n\r\n\t\t\t$this->civilite=$ligne['civilite'];\r\n\t\t\t$this->nom=$ligne['nom'];\r\n\t\t\t$this->prenom=$ligne['prenom'];\r\n\t\t\t$this->adresse=$ligne['adresse'];\r\n\t\t\t$this->tel_fixe=$ligne['tel_fixe'];\r\n\t\t\t$this->tel_mobile=$ligne['tel_mobile'];\r\n\t\t\t$this->email=$ligne['email'];\r\n\t\t\t$this->url_site=$ligne['url_site'];\r\n\t\t\t$this->profil=$ligne['profil'];\r\n\t\t\t$this->date_creation = trans_date($ligne['date_creation']);\r\n\t\t\t$this->date_derniere_connexion = trans_date_time($ligne['date_derniere_connexion']);\r\n\t\t\t$this->nombre_connexions = $ligne['nombre_connexions'];\r\n\t\t\t$this->mode_acces = $ligne['mode_acces'];\r\n\t\t\t$this->date_debut_acces = $ligne['date_debut_acces'];\r\n\t\t\t$this->date_fin_acces = $ligne['date_fin_acces'];\r\n\t\t\t$this->login = $ligne['login'];\r\n\t\t\t$this->mdp = $ligne['mdp'];\r\n\r\n\t\t}\r\n\t}", "function prepare_remito($id_remito,&$filas)\r\n{\r\n while ($filas['cantidad']--)\r\n {\r\n\t$filas[$filas['cantidad']]['id_remito']=$id_remito;\r\n \t$filas[$filas['cantidad']]['descripcion']=\"'\".$filas[$filas['cantidad']]['descripcion'].\"'\";\r\n \tunset($filas[$filas['cantidad']]['subtotal']);\r\n }\r\n unset($filas['cantidad']);\r\n}", "private function requete_deja_choisi()\r\n\t{\r\n\t\t$liste_eleves = array();\r\n\t\t$req = mysql_query(\"SELECT * FROM binome WHERE nom2 = '\" . $this->login . \"'\");\r\n\t\twhile($data = mysql_fetch_array($req)) {\r\n\t\t\tarray_push($liste_eleves, $data['nom1']);\r\n\t\t}\r\n\t\treturn $liste_eleves;\r\n\t}", "private function iniciarRecolectarData()\r\n\t\t{\r\n\t\t\tself::findPagoDetalleActividadEconomica();\r\n\t\t\tself::findPagoDetalleInmuebleUrbano();\r\n\t\t\tself::findPagoDetalleVehiculo();\r\n\t\t\tself::findPagoDetalleAseo();\r\n\t\t\tself::findPagoDetallePropaganda();\r\n\t\t\tself::findPagoDetalleEspectaculo();\r\n\t\t\tself::findPagoDetalleApuesta();\r\n\t\t\tself::findPagoDetalleVario();\r\n\t\t\tself::findPagoDetalleMontoNegativo();\r\n\t\t\tself::ajustarDataReporte();\r\n\t\t}", "function prepareData(){\n $this->ref = array();\n foreach($this->getIterator() as $junk=>$item){\n // current values\n $id = $item[$this->id_field];\n \n // save item\n $this->items[$id] = $item;\n \n // save relation\n if(isset($item[$this->parent_id_field])) {\n $this->ref[$item[$this->parent_id_field]][] = $id;\n } else {\n $this->ref[undefined][] = $id;\n }\n }\n }", "function describir_campos($tabla_x,$bd_x=\"\"){\r\n\t\tif($bd_x!=\"\"){\r\n\t\t\t$bd = $bd_x.\".\";\r\n\t\t}#end if\r\n\t\t$query_x = \"SHOW FIELDS FROM \".$bd.$tabla_x;\r\n\t\t$result = mysqli_query($this->conexion,$query_x);\r\n\t\tif($result){\r\n\t\t\t$n_filas = mysqli_num_rows($result);\r\n\t\t\t$this->serial[$tabla_x] = \"\";\r\n\t\t\tfor ($i=0;$i<$n_filas;$i++){\r\n\t\t\t\t$row_x = mysqli_fetch_array($result);\r\n\t\t\t\tif($i==0){\r\n\t\t\t\t\t$this->campo_clave = $row_x[0];\r\n\t\t\t\t}#end if\r\n\t\t\t\t$this->nombre[$i] = $row_x[0];\r\n\t\t\t\t$this->tipo[$i] = $row_x[1];\r\n\t\t\t\tif($row_x[\"Key\"] == \"PRI\"){\r\n\t\t\t\t\t$this->campo_clave = $row_x[0];\r\n\t\t\t\t}#end if\r\n\t\t\t}#end next i\r\n\t\t}#end if result\r\n\t}", "function GetInfogrupos(){\n\t\t\t$sql =\"SELECT G.grupo, G.salon, G.horario, C.descripcion AS carrera \n\t\t\t\tFROM grupos G INNER JOIN carreras C ON G.carrera = C.codigo;\";\n\t\t\t$this->bd->selectSQL($sql);\n\t\t\tif(!empty($this->bd->rowresult)){\n\t\t\t\treturn $this->bd->rowresult;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "function queryRicercaAvanzata ($info_utente, $hobby){\r\n \r\n // condizione dell'info utente\r\n $cond_info_utente = '';\r\n $cond_hobby = '';\r\n \r\n foreach ($info_utente as $key => $value) {\r\n if($value != 'NULL'){\r\n $cond_info_utente .= $key . '=' . $value . ' AND ';\r\n } \r\n }\r\n \r\n //considero il caso cui siano stati inseriti hobby nella ricerca\r\n //in caso affermativo viene aggiunta la condizione per gli hobby\r\n if(!empty($hobby)){\r\n foreach ($hobby as $key => $value) {\r\n $cond_hobby .= 'tipo_hobby' . '=' . $value . ' OR '; \r\n } \r\n $condizione = (trim($cond_info_utente . '(' . $cond_hobby , 'OR ')) . ')'; \r\n }\r\n // nel caso gli hobby non siano stati inseriti ripulisco la condizione togliendo and finali e \r\n // considero solo come condizione le info utente\r\n else{\r\n $condizione = trim($cond_info_utente , 'AND ');\r\n }\r\n \r\n $sql = 'SELECT email_utente, nickname, utente_esperto, utente_seguito, utente_seguace, path_img_profilo, data_ora_richiesta, ' .\r\n 'richiesta_accettata, data_ora_risposta ' . \r\n 'FROM (utente NATURAL JOIN info_utente ) LEFT OUTER JOIN seguaci_seguiti ' . \r\n 'ON email_utente = utente_seguito AND utente_seguace =' . \r\n \"'\" . $_SESSION['email_utente'] . \"' \" .\r\n 'WHERE email_utente IN (' .\r\n 'SELECT email_utente ' .\r\n 'FROM info_utente NATURAL LEFT OUTER JOIN hobby ' .\r\n 'WHERE ' . $condizione . ')'; \r\n\r\n return $sql;\r\n}", "public function get_recibo($num, $ser, $carga = '', $referencia = '', $cli = '', $alumno = '', $suc = '', $fecha = '', $sit = '', $fini = '', $ffin = ''){\n $pensum = $this->pensum;\n\n $sql= \"SELECT *, \";\n $sql.= \" (SELECT CONCAT(alu_nombre,' ',alu_apellido) FROM app_alumnos WHERE alu_cui = rec_alumno) as alu_nombre_completo,\";\n //-- subquery grado\n $sql.= \" (SELECT TRIM(gra_descripcion) FROM academ_grado, academ_grado_alumno\";\n $sql.= \" WHERE gra_pensum = $pensum\";\n $sql.= \" AND graa_pensum = gra_pensum\";\n $sql.= \" AND graa_nivel = gra_nivel\";\n $sql.= \" AND graa_grado = gra_codigo\";\n $sql.= \" AND graa_alumno = rec_alumno ORDER BY graa_grado DESC LIMIT 0 , 1) AS alu_grado_descripcion,\";\n //-- subquery seccion\n $sql.= \" (SELECT TRIM(sec_descripcion) FROM academ_secciones,academ_seccion_alumno\";\n $sql.= \" WHERE seca_pensum = $pensum\";\n $sql.= \" AND seca_pensum = sec_pensum\";\n $sql.= \" AND seca_nivel = sec_nivel\";\n $sql.= \" AND seca_grado = sec_grado\";\n $sql.= \" AND seca_seccion = sec_codigo\";\n $sql.= \" AND seca_alumno = rec_alumno ORDER BY seca_seccion LIMIT 0 , 1) AS alu_seccion_descripcion\";\n //--\n $sql.= \" FROM boletas_recibo_boleta,vnt_serie_recibo,fin_cliente,mast_sucursal,fin_moneda\";\n $sql.= \" WHERE rec_serie = ser_codigo\";\n $sql.= \" AND cli_nit = rec_cliente\";\n $sql.= \" AND rec_sucursal = suc_id\";\n $sql.= \" AND mon_id = rec_moneda\"; \n if (strlen($num)>0) {\n $sql.= \" AND rec_numero = $num\";\n }\n if (strlen($ser)>0) {\n $sql.= \" AND rec_serie = $ser\";\n }\n if (strlen($carga)>0) {\n $sql.= \" AND rec_carga = '$carga'\";\n }\n if (strlen($referencia)>0) {\n $sql.= \" AND rec_referencia = '$referencia'\";\n }\n if (strlen($cli)>0) {\n $sql.= \" AND ven_cliente = $cli\";\n }\n if (strlen($alumno)>0) {\n $sql.= \" AND rec_alumno = '$alumno'\";\n }\n if (strlen($suc)>0) {\n $sql.= \" AND rec_sucursal = $suc\";\n }\n if (strlen($fecha)>0) {\n $fecha = $this->regresa_fecha($fecha);\n $sql.= \" AND rec_fecha BETWEEN '$fecha' AND '$fecha'\";\n }\n if ($fini != \"\" && $ffin != \"\") {\n $fini = $this->regresa_fecha($fini);\n $ffin = $this->regresa_fecha($ffin);\n $sql.= \" AND rec_fecha BETWEEN '$fini' AND '$ffin'\";\n }\n if (strlen($sit)>0) {\n $sql.= \" AND rec_situacion = $sit\";\n }\n $sql.= \" ORDER BY rec_sucursal ASC, rec_carga ASC, rec_serie ASC, rec_numero ASC, rec_fecha ASC\";\n\n $result = $this->exec_query($sql);\n //echo $sql;\n return $result;\n }", "function getNombres() {\n $this->db->beginTransaction();\n $sentencia = $this->db->prepare(\"select id, nombre from carrera\");\n $sentencia->execute();\n $this->db->commit();\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n $sentencia->closeCursor();\n return $resultado;\n }", "public function __reFill(){\n foreach ($this->data as $key=>$datum) {\n $name = @$this->struct['fieldsDB'][$key];\n if ($name!==null) $this->filled[$name] = true;\n }\n }", "public static function getInfo(){ //функция для получения массива общей информации из бд\n \n $db = Db::getConnection(); //инициализируем подключение к бд\n \n $info = array(); //инициализируем переменную \n \n $result = $db->query('SELECT * FROM info'); // получаем из базы список\n \n $result->setFetchMode(PDO::FETCH_ASSOC);\n \n $row = $result->fetch();\n foreach ($row as $key => $value) { //перебираем массив полученный из бд и формируем массив для вывода на страницу сайта\n $info[$key] = $value;\n }\n \n return $info; //возвращаем массив\n }", "function getBloqueado() {\n return $this->bloqueado;\n }", "function fnEnqueteInfo($intEnquete,&$smarty) {\n\tglobal $conexao;\n\t\n\t$query = \"\tSELECT\n\t\t\t\t\tbn_id AS indice,\n\t\t\t\t\tbn_id,\n\t\t\t\t\tbt_nome,\n\t\t\t\t\tbt_texto,\n\t\t\t\t\tbn_template_home,\n\t\t\t\t\tbn_template_lista,\n\t\t\t\t\tbn_template_conteudo,\n\t\t\t\t\tbn_template_resultado\n\t\t\t\tFROM\n\t\t\t\t\ttb_enquete\n\t\t\t\tWHERE\n\t\t\t\t\t\".($intEnquete != '' ? \" bn_id = '\".$intEnquete.\"' \tAND \" : \"\").\"\n\t\t\t\t\tbn_template_conteudo \tIS NOT NULL \t\t\t\tAND\n\t\t\t\t\tbb_ativo\t\t\t\t= 1\n\t\t\t\tORDER BY\n\t\t\t\t\tbn_id DESC\n\t\t\t\tLIMIT 0,1;\";\n\t$arr\t\t= $conexao->getAssoc($query,false,NULL,DB_FETCHMODE_ASSOC,false);\n\t$arr\t\t= reset($arr);\n\tif(is_array($arr)) {\n\t\treturn $arr;\n\t} else {\n\t\treturn false;\n\t}\n}", "function listarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_sel';\n\t\t$this->transaccion='TES_CTABAN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_baja','date');\n\t\t$this->captura('nro_cuenta','varchar');\n\t\t$this->captura('fecha_alta','date');\n\t\t$this->captura('id_institucion','int4');\n\t\t$this->captura('nombre_institucion','varchar');\n\t\t$this->captura('doc_id','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_moneda','integer');\n\t\t$this->captura('codigo_moneda','varchar');\n\t\t$this->captura('denominacion','varchar');\n\t\t$this->captura('centro','varchar');\n\t\t\n\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function dadosCadastros(){//função geral que será chamada na index\n pegaCadastrosJson();//pega os valores dos cadastros do arquivo JSON e salva em um array\n contaNumeroCadastros();//conta Quantos cadastros existem\n }", "public function getInfo($comref, $moreinfo = null){\n $commande = $this->bdd->select('commande', '*', 'COMRef='.tostring($comref));\n if($moreinfo!=null){\n $ligne = new LigneCommande;\n $lignescommande = $ligne->getAll($comref);\n //var_dump($lignescommande);\n $commande['Products'] = $lignescommande;\n $produit = new Produit;\n foreach($lignescommande as $index => $product){\n $productinfo = $produit->getProduitById($product['LIGNProdCode']);\n $commande['Products'][$index][0] = $productinfo[0];\n }\n }\n return $commande;\n }", "function AfficheBatiment(batiment &$batiment, personnage &$oJoueur = NULL, maison &$oMaison = NULL){\r\n\t$ImgSize = 'height';\r\n\t$txt = NULL;\r\n\r\n\t$contenu = 'Ne peut rien contenir';\r\n\t\r\n\t$chkPositionJoueur = false;\r\n\t$nbLigne = 3;\r\n\t\r\n\tif(!is_null($oJoueur)){\t\r\n\t\t$chkPositionJoueur\t\t= $oJoueur->GetCoordonnee() == $batiment->GetCoordonnee();\r\n\t}\r\n\t\r\n\t$chkMarche = false;\r\n\t\r\n\t$lstBatimentAvecEsclaves = array(ferme::ID_BATIMENT, potager::ID_BATIMENT, mine::ID_BATIMENT, carriere::ID_BATIMENT, scierie::ID_BATIMENT);\r\n\r\n\tswitch($batiment->GetIDType()){\r\n\t\tcase maison::ID_BATIMENT:\r\n\t\t\t$ImgSize = 'width';\r\n\t\t\tif($chkPositionJoueur){\r\n\t\t\t\t$contenu = '<p>Ne peut rien contenir.</p>';\r\n\t\t\t\t$chkOptions = false;\r\n\t\t\t}else{\r\n\t\t\t\t$contenu = '<p>Si ici que vous devez vous placer pour vous inscrire ou valider une quête.</p>';\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t/* case 'bank':\r\n\t\t\t$contenu = $batiment->AfficheContenu($oJoueur);\r\n\t\t\tbreak; */\r\n\t\tcase scierie::ID_BATIMENT:\r\n\t\tcase ferme::ID_BATIMENT:\r\n\t\tcase mine::ID_BATIMENT :\r\n\t\tcase potager::ID_BATIMENT:\r\n\t\tcase carriere::ID_BATIMENT:\r\n\t\t\t$ImgSize = 'width';\r\n\t\t\tif(!is_null($oJoueur)){\t$contenu = $batiment->AfficheContenu($oJoueur);}\r\n\t\t\tbreak;\r\n\t\tcase marche::ID_BATIMENT:\r\n\t\t\tif($chkPositionJoueur){\r\n\t\t\t\t$chkMarche = true;\r\n\t\t\t}else{\r\n\t\t\t\t$contenu = '<p>Vous devez vous placez sur son emplacement pour afficher les transactions disponibles.</p>';\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n\tif(in_array($batiment->GetIDType(), $lstBatimentAvecEsclaves))\r\n\t{\r\n\t\t$arLignes[3] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>'\r\n\t\t.(!is_null($oJoueur)?\r\n\t\t$batiment->AfficheAchatEsclave($oJoueur)\r\n\t\t:'Possibilité d\\'acheter des esclaves pour augmenter sa production')\r\n\t\t.'</td>\r\n\t\t\t</tr>';\r\n\t\t$nbLigne++;\r\n\t}\r\n\t\r\n\tif(!is_null($oJoueur))\r\n\t{\r\n\t\t$arLignes[2] = '\r\n\t\t\t<tr><td>'.$batiment->AfficheOptionAmeliorer($oJoueur, $oMaison).'</td></tr>';\r\n\t\t$arLignes[4] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>'\r\n\t\t\t\t\t.'<img alt=\"Barre status\" src=\"./fct/fct_image.php?type=statusetat&amp;value='.$batiment->GetEtat().'&amp;max='.$batiment->GetEtatMax().'\" />'\r\n\t\t\t\t\t.'<br />'\r\n\t\t\t\t\t.$batiment->AfficheOptionReparer($oJoueur)\r\n\t\t\t\t.'</td>\r\n\t\t\t</tr>';\r\n\t\t$arLignes[7] = '\r\n\t\t\t<tr><td>'.$contenu.'</td></tr>';\r\n\t\r\n\t\t$nbLigne+=3;\r\n\t\t\r\n\t\tif($batiment->GetIDType() == marche::ID_BATIMENT)\r\n\t\t{\r\n\t\t\t$arLignes[8] = '\r\n\t\t\t<tr><td>'.$batiment->AfficheTransactions($oJoueur).'</td></tr>';\r\n\t\t\t\r\n\t\t\t$nbLigne++;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$arLignes[5] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<ul style=\"list-style-type:none; padding:0px; text-align:center; margin:0px;\">\r\n\t\t\t\t\t\t<li style=\"display:inline;\">'.AfficheIcone(objArmement::TYPE_ATTAQUE).' : '.(is_null($batiment->GetAttaque())?'0':$batiment->GetAttaque()).'</li>\r\n\t\t\t\t\t\t<li style=\"display:inline; margin-left:40px;\">'.AfficheIcone(objArmement::TYPE_DISTANCE).' : '.(is_null($batiment->GetDistance())?'0':$batiment->GetDistance())\t.'</li>\r\n\t\t\t\t\t\t<li style=\"display:inline; margin-left:40px;\">'.AfficheIcone(objArmement::TYPE_DEFENSE).' : '.(is_null($batiment->GetDefense())?'0':$batiment->GetDefense()).'</li>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>';\r\n\t$arLignes[6] = '\r\n\t\t\t<tr><td>'.$batiment->GetDescription().'</td></tr>';\r\n\t$arLignes[1] = '\r\n\t\t\t<tr>\r\n\t\t\t\t<td rowspan=\"'.$nbLigne.'\" style=\"width:400px;\">\r\n\t\t\t\t\t<img alt=\"'.$batiment->GetType().'\" src=\"./img/batiments/'.$batiment->GetType().'.png\" width=\"400px\" onmouseover=\"montre(\\''.CorrectDataInfoBulle($batiment->GetDescription()).'\\');\" onmouseout=\"cache();\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<th>'\r\n\t\t\t\t\t.(!is_null($oJoueur)?\r\n\t\t\t\t\t\t'<a name=\"'.str_replace(',', '_', $batiment->GetCoordonnee()).'\">'\r\n\t\t\t\t\t\t:NULL)\r\n\t\t\t\t\t.$batiment->GetNom((!is_null($oJoueur)?$oJoueur->GetCivilisation():personnage::CIVILISATION_GAULOIS)).(!is_null($oJoueur)?' ('.$batiment->GetNiveau().' / '.$batiment->GetNiveauMax().')':NULL)\r\n\t\t\t\t\t.(!is_null($oJoueur)?\r\n\t\t\t\t\t\t'</a>'\r\n\t\t\t\t\t\t:NULL)\r\n\t\t\t\t.'</th>\r\n\t\t\t</tr>';\r\n\t\r\n\t//on trie par keys\r\n\tksort($arLignes);\r\n\t\r\n\treturn implode('', $arLignes);\r\n}", "function ventasBrutas($fi, $ff){\n $data2=array();\n $this->query= \"SELECT * FROM CLIE03 WHERE TIPO_EMPRESA = 'M'\";\n $rs=$this->EjecutaQuerySimple();\n while($tsarray=ibase_fetch_object($rs)){\n $data[]=$tsarray;\n }\n $facutras = 0;\n foreach ($data as $clie) {\n $cliente = $clie->CLAVE;\n\n $this->query=\"SELECT CLAVE, nombre,\n (select iif( (sum(importe)is null or sum(importe) = 0), 0 , sum(importe) / 1.16) as fact from cuen_m03 where fecha_apli between '$fi' and '$ff' and tipo_mov = 'C' and num_cpto = 1 and trim(cve_clie) = trim('$cliente') ) as Facturas,\n (select iif( (sum(importe)is null or sum(importe) = 0), 0 , sum(importe) / 1.16) as ncs from cuen_det03 where fecha_apli between '$fi' and '$ff' and tipo_mov = 'C' and num_cpto =16 and trim(cve_clie) = trim('$cliente') ) as imptNC, \n (select iif( (sum(importe)is null or sum(importe) = 0), 0 , sum(importe) / 1.16) as cnp from cuen_det03 where fecha_apli between '$fi' and '$ff' and tipo_mov = 'A' and num_cpto >= 23 and trim(cve_clie) = trim('$cliente')) as AbonosNoPagos\n from Clie03\n where trim(clave) = trim('$cliente')\";\n //echo $this->query.'<p>';\n\n \n $rs2=$this->EjecutaQuerySimple();\n while($tsarray= ibase_fetch_object($rs2)){\n $data2[]=$tsarray;\n }\n }\n\n\n\n return $data2;\n }", "function cargar_data_registro_compra($nombre_anio='', $nombre_mes='', $nrocomprobante='', $limit='') {\n $ord = \" ORDER BY prosic_comprobante.id_anio , prosic_comprobante.id_mes DESC,prosic_comprobante.codigo_comprobante*1000 desc\";\n $sql = \"SELECT\n prosic_comprobante.id_comprobante\n , prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.status_comprobante\n , prosic_anexo.codigo_anexo\n , prosic_anexo.descripcion_anexo\n , prosic_subdiario.id_subdiario\n , prosic_subdiario.codigo_subdiario\n , prosic_subdiario.nombre_subdiario\n , prosic_anio.nombre_anio\n , prosic_mes.nombre_mes\n , prosic_tipo_comprobante.codigo_tipo_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n ,prosic_comprobante.nro_comprobante\n ,prosic_comprobante.serie_comprobante\n ,prosic_moneda.codigo_moneda\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo\n ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_mes\n ON (prosic_comprobante.id_mes = prosic_mes.id_mes)\n INNER JOIN prosic_anio\n ON (prosic_comprobante.id_anio = prosic_anio.id_anio)\n INNER JOIN prosic_subdiario\n ON (prosic_comprobante.id_subdiario = prosic_subdiario.id_subdiario)\n INNER JOIN prosic_tipo_comprobante\n ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_plan_contable\n ON (prosic_comprobante.id_plan_contable = prosic_plan_contable.id_plan_contable)\n INNER JOIN prosic_moneda\n ON (prosic_comprobante.id_moneda= prosic_moneda.id_moneda)\n WHERE prosic_comprobante.id_subdiario=3 \";\n if ($nombre_anio != '')$sql.=\" AND prosic_anio.nombre_anio='\" . $nombre_anio . \"'\";\n if ($nombre_mes != '')$sql.=\" AND prosic_mes.nombre_mes='\" . $nombre_mes . \"'\";\n if ($nrocomprobante != '')$sql.=\" AND prosic_comprobante.nro_comprobante like'%\" . $nrocomprobante . \"%' \";\n if ($ord != '')$sql.=$ord;\n if ($limit != '')$sql.=$limit;\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function afficherachats(){\n\t\t$sql=\"SElECT * From achat order by ref\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n\t catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function\tgetReferidoInfo(){\r\t\t\r\t\t$model_ref = $this->getModel( 'referido' );\r\t\t$idref = JRequest::getInt( 'idref' );\r\t\t\r\t\t$model_ref->instance( $idref );\r\t\t$inf_ref = $model_ref->getReferidoInf();\r\t\t\r\t\tif( !empty($inf_ref) ){\r\t\t\t\r\t\t\t$model_ref\r\t\t}\r\t\t\r\t}", "public function BuscaAbonosCreditos() \n{\n\tself::SetNames();\n $sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, ventas.idventa, ventas.codventa, ventas.totalpago, ventas.statusventa, abonoscreditos.codventa as codigo, abonoscreditos.fechaabono, SUM(montoabono) AS abonototal FROM (clientes INNER JOIN ventas ON clientes.codcliente = ventas.codcliente) LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa WHERE clientes.cedcliente = ? AND ventas.codventa = ? AND ventas.tipopagove ='CREDITO'\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET['cedcliente'])));\n\t$stmt->bindValue(2, trim(base64_decode($_GET['codventa'])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function renvoi_infos() {\n\t\t$info = @stream_get_meta_data ( $this->connexion );\n\t\t\n\t\treturn $info;\n\t}", "function Bloquer($bloqueur,$bloque){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"INSERT INTO blocage VALUES(NULL,'$bloqueur','$bloque')\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\r\n\t\tmysqli_close($conn);\r\n\t\t}", "function obtenirJournalBanque($compte=1,\n $periode_debut= '',\n $periode_fin=''\n )\n {\n\n $periode_debut=$this->periodeDebutFin ($debutFin='debut',$periode_debut);\n $periode_fin=$this->periodeDebutFin ($debutFin='fin',$periode_fin);\n\t\t$requete = 'SELECT ';\n\t\t$requete .= 'compta.date_regl, compta.description, compta.montant, compta.idoperation, ';\n\t\t$requete .= 'MONTH(compta.date_regl) as mois, compta.id as idtmp, ';\n $requete .= 'compta_reglement.reglement, ';\n $requete .= 'compta_evenement.evenement, compta.idevenement, ';\n $requete .= 'compta_categorie.categorie, compta.idcategorie ';\n\t\t$requete .= 'FROM ';\n\t\t$requete .= 'compta ';\n $requete .= 'LEFT JOIN ';\n $requete .= 'compta_categorie on compta_categorie.id=compta.idcategorie ';\n $requete .= 'LEFT JOIN ';\n $requete .= 'compta_reglement on compta_reglement.id=compta.idmode_regl ';\n $requete .= 'LEFT JOIN ';\n $requete .= 'compta_evenement on compta_evenement.id=compta.idevenement ';\n\t\t$requete .= 'WHERE ';\n\t\t$requete .= 'compta.date_regl >= \\''.$periode_debut.'\\' ';\n\t\t$requete .= 'AND compta.date_regl <= \\''.$periode_fin.'\\' ';\n\t\t$requete .= 'AND compta.montant != \\'0.00\\' ';\n\t\t$requete .= 'AND compta.idmode_regl = compta_reglement.id ';\n\t\t$requete .= 'AND idcompte = '.(int) $compte. ' ';\n\t\t$requete .= 'ORDER BY ';\n\t\t$requete .= 'compta.date_regl ';\n\t\treturn $this->_bdd->obtenirTous($requete);\n }", "public function BuscarComprasFechas() \n\t{\n\t\tself::SetNames();\n\t\t$sql = \" SELECT compras.codcompra, compras.subtotalivasic, compras.subtotalivanoc, compras.ivac, compras.totalivac, compras.descuentoc, compras.totaldescuentoc, compras.totalc, compras.statuscompra, compras.fechavencecredito, compras.fechacompra, proveedores.ritproveedor, proveedores.nomproveedor, SUM(detallecompras.cantcompra) AS articulos FROM (compras INNER JOIN proveedores ON compras.codproveedor = proveedores.codproveedor) INNER JOIN usuarios ON compras.codigo = usuarios.codigo LEFT JOIN detallecompras ON detallecompras.codcompra = compras.codcompra WHERE DATE_FORMAT(compras.fechacompra,'%Y-%m-%d') >= ? AND DATE_FORMAT(compras.fechacompra,'%Y-%m-%d') <= ? GROUP BY compras.codcompra\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"<div class='alert alert-danger'>\";\n\t\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN COMPRAS DE PRODUCTOS PARA EL RANGO DE FECHA INGRESADO</center>\";\n\t\t\techo \"</div>\";\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[]=$row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "function RecuperarInfoOrg($orgReportadas, $infoSolicitada)\n{\n\t$infoRecuperada = array();\n\t//peticion de la provincia de la organizacion\n\tif($infoSolicitada == \"provincia\")\n\t{\n\t\tforeach ($orgReportadas as $valor) \n\t\t{\n\t\t\t$sqlZonaOrg = \"select p.provincia from u_organizaciones u inner join u_provincia p on (u.cod_provincia = p.cod_provincia) where cod_u_organizaciones = \" . $valor;\n\t\t\t//echo $sqlZonaOrg . \"<br>\";\n\t\t\t$resSqlZonaOrg = query($sqlZonaOrg);\n\t\t\t$numRow = mysql_num_rows($resSqlZonaOrg);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlZonaOrg))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['provincia']);\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t}\n\t// peticion del canton de la organizacion\n\tif($infoSolicitada == \"canton\")\n\t{\n\t\tforeach ($orgReportadas as $valor) \n\t\t{\n\t\t\t$sqlZonaOrg = \"select c.canton from u_organizaciones u inner join u_provincia p on (u.cod_provincia = p.cod_provincia) inner join u_canton c on (u.cod_canton = c.cod_canton and p.cod_provincia = c.cod_provincia) where cod_u_organizaciones = \" . $valor;\n\t\t\t$resSqlZonaOrg = query($sqlZonaOrg);\n\t\t\t$numRow = mysql_num_rows($resSqlZonaOrg);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlZonaOrg))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['canton']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t\t\n\t\t}\n\t}\n\t//peticion de la parroquia de la organizacion\n\tif($infoSolicitada == \"parroquia\")\n\t{\n\t\tforeach ($orgReportadas as $valor) \n\t\t{\n\t\t\t$sqlZonaOrg = \"select pa.parroquia from u_organizaciones u inner join u_provincia p on (u.cod_provincia = p.cod_provincia) inner join u_canton c on (u.cod_canton = c.cod_canton and p.cod_provincia = c.cod_provincia) inner join u_parroquia pa on (pa.cod_canton = c.cod_canton and pa.cod_parroquia = u.cod_parroquia) where cod_u_organizaciones = \" . $valor;\n\t\t\t$resSqlZonaOrg = query($sqlZonaOrg);\n\t\t\t$numRow = mysql_num_rows($resSqlZonaOrg);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlZonaOrg))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['parroquia']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\t\t\t\n\t\t}\n\t}\n\t//peticion de los nombres de las organizaciones\n\tif($infoSolicitada == \"nombresOrg\")\n\t{\n\t\tforeach($orgReportadas as $valor)\n\t\t{\n\t\t\t$sqlNombreOrg = \"select organizacion from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\t$resSqlNombreOrg = query($sqlNombreOrg);\n\t\t\t$numRow = mysql_num_rows($resSqlNombreOrg);\n\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlNombreOrg))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['organizacion']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t}\n\t}\n\t//se devuelve el ruc dependiendo de cual (provisional/definitivo) se solicite\n\tif($infoSolicitada == \"rucProvisionalOrg\" or $infoSolicitada == \"rucDefinitivoOrg\")\n\t{\n\t\t$opcion = 0;\n\t\tswitch ($infoSolicitada) \n\t\t{\n\t\t\tcase \"rucProvisionalOrg\":\n\t\t\t\t# code...\n\t\t\t\t$opcion = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"rucDefinitivoOrg\":\n\t\t\t\t$opcion = 2;\n\t\t\t\tbreak;\t\t\t\n\t\t\tdefault:\n\t\t\t\t$opcion = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tforeach($orgReportadas as $valor)\n\t\t{\n\t\t\t$sqlRucOrg = \"\";\n\t\t\tif($opcion == 1) $sqlRucOrg = \"select ruc_provisional from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\tif($opcion == 2) $sqlRucOrg = \"select ruc_definitivo from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\n\t\t\tif($opcion != 0)\n\t\t\t{\n\t\t\t\t$resSqlRucOrg = query($sqlRucOrg);\n\t\t\t\t$numRow = mysql_num_rows($resSqlRucOrg);\n\t\t\t\tif($numRow > 0)\n\t\t\t\t{\n\t\t\t\t\twhile($fila = mysql_fetch_array($resSqlRucOrg))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($opcion == 1) array_push($infoRecuperada, $fila['ruc_provisional']);\n\t\t\t\t\t\tif($opcion == 2) array_push($infoRecuperada, $fila['ruc_definitivo']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t\t\n\t\t}\n\t}\n\t//peticion de fecha de registro de la organizacion\n\tif($infoSolicitada == \"fechaRegistro\")\n\t{\n\t\tforeach($orgReportadas as $valor)\n\t\t{\n\t\t\t$sqlFechaRegistro = \"select fecha_registro from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\t$resSqlFechaRegistro = query($sqlFechaRegistro);\n\t\t\t$numRow = mysql_num_rows($resSqlFechaRegistro);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlFechaRegistro))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['fecha_registro']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t}\n\t}\n\t//peticion del circuito economico de la organizacion\n\tif($infoSolicitada == \"circuito\")\n\t{\n\t\tforeach($orgReportadas as $valor)\n\t\t{\n\t\t\t$sqlCircuitoEconomico = \"select circuito_economico from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\t$resSqlCircuitoEconomico = query($sqlCircuitoEconomico);\n\t\t\t$numRow = mysql_num_rows($resSqlCircuitoEconomico);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlCircuitoEconomico))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['circuito_economico']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t}\n\t}\n\t//peticion de la actividad de la matriz productiva\n\tif($infoSolicitada == \"identificacionMatriz\")\n\t{\n\t\tforeach($orgReportadas as $valor)\n\t\t{\n\t\t\t$sqlActividadMatriz = \"select identificacion_actividad_mp from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\t//echo $sqlActividadMatriz . \"<br>\";\n\t\t\t$resSqlActividadMatriz = query($sqlActividadMatriz);\n\t\t\t$numRow = mysql_num_rows($resSqlActividadMatriz);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlActividadMatriz))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['identificacion_actividad_mp']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t}\n\t}\n\t//peticion de la actividad de la matriz productiva\n\tif($infoSolicitada == \"categoriaMatriz\")\n\t{\n\t\tforeach($orgReportadas as $valor)\n\t\t{\n\t\t\t$sqlCategoriaMatriz = \"select categoria_actividad_mp from u_organizaciones where cod_u_organizaciones = \" . $valor;\n\t\t\t//echo $sqlCategoriaMatriz . \"<br>\";\n\t\t\t$resSqlCategoriaMatriz = query($sqlCategoriaMatriz);\n\t\t\t$numRow = mysql_num_rows($resSqlCategoriaMatriz);\n\t\t\tif($numRow > 0)\n\t\t\t{\n\t\t\t\twhile($fila = mysql_fetch_array($resSqlCategoriaMatriz))\n\t\t\t\t{\n\t\t\t\t\tarray_push($infoRecuperada, $fila['categoria_actividad_mp']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tarray_push($infoRecuperada, \"Dato faltante\");\n\t\t}\n\t}\n\treturn $infoRecuperada;\n\t\n\n}", "public function gett($info)\r\n {$trajet=array();\r\n\t try \r\n {\r\n $stmt = $this->_db->prepare(\"SELECT Num_Trajet,Type,Num_Ville1,Num_Ville2,Date_aller,Date_retour,Heure_aller\r\n\t\t ,Heure_retour,Nombre_place,Prix,ID_conducteur,Description FROM Trajet where ID_conducteur=:num\");\r\n\t\t $stmt->bindValue(\":num\",$info);\r\n\t\t $stmt->execute();\r\n\t\t \r\n\t\t \r\n\t\t while ($donnees = $stmt->fetch(PDO::FETCH_ASSOC))\r\n\t\t\t{\r\n\t\t\t\t$trajet[] = new Trajet(array('num_trajet'=>$donnees['Num_Trajet'],'type'=>$donnees['Type'],\r\n\t\t\t\t'num_ville1'=>$donnees['Num_Ville1'],'num_ville2'=>$donnees['Num_Ville2'],'date_aller'=>$donnees['Date_aller'],\r\n\t\t\t\t'date_retour'=>$donnees['Date_retour'],'heure_aller'=>$donnees['Heure_aller'],'heure_retour'=>$donnees['Heure_retour'],\r\n\t\t\t\t'prix'=>$donnees['Prix'],'nombre_place'=>$donnees['Nombre_place'],'id_conducteur'=>$donnees['ID_conducteur']\r\n\t\t\t\t,'description'=>$donnees['Description']));\r\n\t\t\t}\r\n\t\treturn $trajet;\r\n }\r\n catch(PDOException $e)\r\n {\r\n echo $e->getMessage();\r\n } \r\n\t }", "function tache_synthese_dossier($dossier_tmp)\r\n{\r\n\t// Init\r\n\tglobal $objet;\r\n\t$tache_synthese_dossier = $sql_selection_dossiers = \"\";\r\n\t$arborescence = arborescence($objet[\"tache_dossier\"], $dossier_tmp[\"id_dossier\"]);\r\n\tforeach($arborescence as $dossier_tmp2)\t\t{ $sql_selection_dossiers .= $dossier_tmp2[\"id_dossier\"].\",\"; }\r\n\t$sql_selection_dossiers = \"FROM gt_tache WHERE id_dossier in (\".substr($sql_selection_dossiers,0,-1).\")\";\r\n\t// Recup des infos\r\n\tif(db_valeur(\"SELECT count(*) \".$sql_selection_dossiers)>0)\r\n\t{\r\n\t\t$tache_tmp1 = db_ligne(\"SELECT SUM(budget_disponible) as budget_disponible, SUM(budget_engage) as budget_engage, SUM(charge_jour_homme) as charge_jour_homme \".$sql_selection_dossiers);\r\n\t\t$tache_tmp2 = db_ligne(\"SELECT MIN(date_debut) as date_debut, MAX(date_fin) as date_fin \".$sql_selection_dossiers);\r\n\t\t$tache_tmp = array_merge($tache_tmp1, $tache_tmp2);\r\n\t\t$tache_tmp[\"devise\"]\t\t\t\t\t= db_valeur(\"SELECT devise \".$sql_selection_dossiers);\r\n\t\t$tache_tmp[\"avancement\"]\t\t\t\t= db_valeur(\"SELECT ROUND(AVG(avancement)) as avancement \".$sql_selection_dossiers.\" and avancement > 0 \");\r\n\t\t$tache_tmp[\"avancement_moyen_pondere\"]\t= db_valeur(\"SELECT ROUND(SUM(charge_jour_homme*avancement)/SUM(charge_jour_homme)) as avancement \".$sql_selection_dossiers.\" and avancement > 0 and charge_jour_homme > 0 \");\r\n\t\t$tache_synthese_dossier .= tache_budget($tache_tmp, \"dossier\");\r\n\t\t$tache_synthese_dossier .= tache_barre_avancement_charge($tache_tmp, \"dossier\");\r\n\t\t$tache_synthese_dossier .= tache_debut_fin($tache_tmp);\r\n\t\treturn $tache_synthese_dossier;\r\n\t}\r\n}", "function sevenconcepts_formulaire_charger($flux){\n $form=$flux['args']['form'];\n if($form=='inscription'){\n include_spip('cextras_pipelines');\n $champs_extras=champs_extras_objet(table_objet_sql('auteur'));\n foreach($champs_extras as $value){\n $flux['data'][$value['options']['nom']]=''; \n if(isset($value['options']['obligatoire']))$flux['data']['obligatoire'][$value['options']['nom']]='on';\n }\n $flux['data']['nom_inscription']='';\n $flux['data']['mail_inscription']='';\n }\n \n return $flux;\n}", "function Consulta_Informacion_Metas()\n {\n $sql=\"SELECT b.id,b.uid,year(b.fecha_inicio) AS ano, month(b.fecha_inicio) AS mes,b.no_dias,count(substr(b.fecha_inicio,1,7)) AS no_regs,\n sum(b.cantidad) AS total,a.name\n FROM crm_proyeccion as b LEFT JOIN users as a ON b.uid = a.uid\n WHERE b.active = 1 AND year(b.fecha_inicio) ='\".$this->ano_id.\"' AND b.gid='\".$this->gid.\"' \".$this->filtro.\"\n GROUP BY substr(b.fecha_inicio,1,7)\n ORDER BY substr(b.fecha_inicio,1,7)\";\n $res=$this->db->sql_query($sql) or die (\"Error en la consulta: \".$sql);\n if($this->db->sql_numrows($res) > 0)\n {\n while(list($id,$_uid,$ano,$mes,$no_dias,$no_reg,$cantidad,$name) = $this->db->sql_fetchrow($res))\n {\n $this->array_metas[$mes]= $cantidad;\n }\n }\n }", "function graficaIncidenciasMesActual($conexion){\n\t$sql = \"SELECT a.nombre as 'NOMBRE', count(m.id) AS'NUMERO' from mes_area m INNER JOIN area a ON a.id = m.id_area where '2020-10-01' > m.fecha_entrada and '2020-10-01' < m.fecha_salida OR m.fecha_salida is null GROUP BY m.id_AREA\";\n\n\t$resultados = mysqli_query($conexion, $sql);\n\t//$labels = mysqli_fetch_array($resultados);\n \t$i=0;\n\t$data=\"\";\n\twhile ($row = mysqli_fetch_assoc($resultados)) {\n\t\tif ($i==0) {\n\t\t\t$data .= $row['NOMBRE'] .'||'.$row['NUMERO'].'||'; \n\t\t}\n\t}\n\t\treturn $data;\n}", "function Consulta_Informacion_Metas()\n {\n $sql=\"SELECT b.id,b.uid,year(b.fecha_inicio) AS ano, sum(b.no_dias) as no_dias,count(substr(b.fecha_inicio,1,4)) AS no_regs,\n sum(b.cantidad) AS total,a.name\n FROM crm_proyeccion as b LEFT JOIN users as a ON b.uid = a.uid\n WHERE b.active = 1 AND b.gid='\".$this->gid.\"' \".$this->filtro.\"\n GROUP BY substr(b.fecha_inicio,1,4)\n ORDER BY substr(b.fecha_inicio,1,4)\";\n $res=$this->db->sql_query($sql) or die (\"Error en la consulta: \".$sql);\n if($this->db->sql_numrows($res) > 0)\n {\n while(list($id,$_uid,$ano,$no_dias,$no_reg,$cantidad,$name) = $this->db->sql_fetchrow($res))\n {\n $this->array_metas[$ano]= $cantidad;\n }\n }\n }", "public function NombresColumnasEsp($tabla)\r\n {\r\n\t//echo \"Entrando a nombres \";\r\n\t$Columnas1=mysql_query(\"select * from $tabla\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n$reg=mysql_fetch_array($Columnas1);\t\r\n$numCols=count($reg);\r\n\r\nfor ($i=0; $i<=$numCols; $i++){\r\n\t\r\n\t\t$this->NombreCol[$i]=mysql_field_name($Columnas1,$i);\t\r\n\t\tif ($this->NombreCol[$i]==\"\"){\r\n\t\t\tunset($this->NombreCol[$i]); \r\n\t\t\t$this->NombreCol = array_values($this->NombreCol);//quito el espacio que ha quedado despues de eliminarse \r\n\t\t}else{\r\n\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n}\r\n\r\n$this->ID=$this->NombreCol[0];\r\n\r\n$numCols=count($this->NombreCol);\r\n$this->NumCols=$numCols;\r\n//return()\r\n//echo \"Saliendo de nombres \";\r\n//print($this->NumCols);\r\n//print_r($this->NombreCol);\r\n\r\n\t\t\r\n\t}", "function cargar_cuenta_de_ingreso() {\n $sql = \"SELECT id_plan_contable,cuenta_plan_contable,descripcion_plan_contable,cargar_plan_contable,abonar_plan_contable,transferencia_plan_contable FROM prosic_plan_contable WHERE cuenta_plan_contable LIKE '7%' ORDER BY cuenta_plan_contable\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function obtiene_bebidas_menu($valor=1){\n /**\n * guardamos la consulta en $sql obtiene todos las tuplas de la tabla\n * ejecutamos la consulta en php obtenemos una tabla con los resultados\n * en el for convertimos a cada tupla en un objeto y añadimos al array $objetos uno a uno\n * retornamos un array con todas las tuplas como objetos\n */\n try {\n $sql=\"SELECT * FROM \".Bebidas::TABLA[0].\" WHERE tipo = 'zumo' and estado = $valor or tipo = 'refresco_con_gas' and estado = $valor or tipo = 'refresco_sin_gas' and estado = $valor\";\n $resultado=$this->conexion->query($sql);\n $objetos=array();\n\n while ($fila=$resultado->fetch_object()){\n $objetos[]=$fila;\n //echo 'fila = '. var_dump($fila);\n }\n\n /*\n for($x=0;$x<$resultado->field_count;$x++){\n $objetos[$x]=$resultado[$x]->fetch_object();\n }*/\n return $objetos;\n } catch (Exception $ex) {\n echo 'error '.$ex;\n }\n \n \n }", "function listadeMembrodaDao($nome){\r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetoMembro.php\");\r\n \r\n $objDao = Connection::getInstance();\r\n \r\n $resultado = mysql_query(\"Select * from membros where Nome LIKE '%$nome%'\") or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n $listaMembro = array();\r\n \r\n $i=0;\r\n $achou=FALSE;\r\n \r\n if($resultado != \"\"){\r\n \r\n while ($registro = mysql_fetch_assoc($resultado)){\r\n \r\n\t $membro = new objetoMembro();\r\n \r\n $membro->setMatricula($registro['Matricula']);\r\n $membro->setNome($registro['Nome']);\r\n $membro->setSexo($registro['Sexo']); \r\n $membro->setData($registro['DataNascimento1']); \r\n $membro->setRg($registro['Rg']);\r\n $membro->setCpf($registro['Cpf']); \r\n $membro->setEstadocivil($registro['EstadoCivil']);\r\n $membro->setNatural($registro['Naturalidade']); \r\n $membro->setProfissao($registro['Profissao']); \r\n $membro->setEscola($registro['Escolaridade']); \r\n $membro->setPai($registro['Pai']); \r\n $membro->setMae($registro['Mae']); \r\n $membro->setNecessidade($registro['NecessidadeEspeciais']);\r\n\t $membro->setFone($registro['Fone']); \r\n $membro->setFilho($registro['Filho']); \r\n $membro->setFormacao($registro['FormacaoEclesiatica']);\r\n $membro->setMembrasia($registro['IntegracaoMembrasia']); \r\n $membro->setFuncao($registro['Funcao']); \r\n $membro->setParticipou($registro['JaParticipou']);\r\n\t $membro->setTrabalhando($registro['Trabalhando']); \r\n $membro->setViajando($registro['EstadoAtual']); \r\n $membro->setCongrega($registro['Congrega']); \r\n $membro->setRua($registro['Rua']); \r\n $membro->setBairro($registro['Bairro']); \r\n $membro->setCasa($registro['Casa']); \r\n $membro->setStatus($registro['Status']);\r\n \r\n\t $listaMembro[$i] = $membro;\r\n \r\n\t $i++;\r\n $achou = true;\r\n\t}\r\n \r\n }\r\n\t\treturn $listaMembro;\r\n if($achou){\r\n mysql_free_result($registro);\r\n }\r\n\t\tmysql_free_result($resultado);\r\n $objDao->freebanco(); \r\n }", "public function getBoletoInformation()\n {\n return array(\n '341' => 'Itau',\n '033' => 'Santander',\n '237' => 'Bradesco',\n '001' => 'Banco do Brasil',\n '399' => 'HSBC ',\n '104' => 'Caixa',\n '745' => 'CitiBank'\n );\n }", "function afficherCommentaires($_idRecette){\n $connexion= my_connect();\n $requette_commentaire=\"SELECT Commentaire,Idrecette,Datecommentaire FROM Commentaires where Idrecette = $_idRecette\";\n $table_commentaire_resultat = mysqli_query($connexion,$requette_commentaire); \n if($table_commentaire_resultat){\n echo (\"Commentaires:<ul> \");\n \n while($ligne_commentaire=mysqli_fetch_object($table_commentaire_resultat)){\n echo (\"<li>\".$ligne_commentaire->Datecommentaire.\": \".$ligne_commentaire->Commentaire.\"</li>\");\n }\n echo \"</ul>\";\n }else{\n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo\"message de mysqli:\".mysqli_error($connexion);\n }\n mysqli_close($connexion);\n }", "public function buscarDatosDeCodigo($lote, $suc){\n $db = new My();\n $my = new My();\n $datos = array();\n $query = \"SELECT a.codigo AS Codigo,l.lote,CONCAT( a.descrip, '-', p.nombre_color) AS Descrip , s.suc, s.cantidad AS Stock, s.estado_venta,a.um AS UM,l.ancho AS Ancho,l.gramaje AS Gramaje,l.tara AS Tara,l.padre AS Padre,s.ubicacion AS U_ubic,\n l.img AS Img, l.kg_desc AS U_kg_desc,h.fecha_hora AS entDate\n\n FROM articulos a INNER JOIN lotes l ON a.codigo = l.codigo INNER JOIN stock s ON l.codigo = s.codigo AND l.lote = s.lote \n INNER JOIN pantone p ON l.pantone = p.pantone INNER JOIN historial h ON l.codigo = h.codigo AND l.lote = h.lote\n WHERE s.cantidad > 0 AND s.suc = '$suc' AND l.lote ='$lote' GROUP BY lote ORDER BY h.fecha_hora ASC LIMIT 1\";\n \n $my->Query($query);\n if($my->NextRecord()){\n $datos = $my->Record;\n if(count($datos)){\n $datos = array_map(\"utf8_encode\",$datos);\n // print_r($datos);\n \n $rem = \"SELECT CONCAT(fecha_cierre,' ',hora_cierre) AS fecha_ingreso FROM nota_remision n, nota_rem_det d WHERE n.n_nro = d.n_nro AND lote = '$lote' AND n.estado = 'Cerrada' AND n.suc_d = '$suc'\";\n \n $db->Query($rem);\n if($db->NumRows() > 0){ \n $db->NextRecord();\n $fecha_ingreso = $db->Record['fecha_ingreso'];\n $datos['entDate'] = $fecha_ingreso;\n }\n // Buscar si esta en una Remision Abierta o En Proceso\n $rem2 = \"SELECT n.n_nro, n.suc_d FROM nota_remision n, nota_rem_det d WHERE n.n_nro = d.n_nro AND lote = '$lote' AND n.estado != 'Cerrada' AND n.suc = '$suc'\";\n \n $db->Query($rem2);\n if($db->NumRows() > 0){ \n $db->NextRecord();\n $n_nro = $db->Record['n_nro'];\n $destino = $db->Record['suc_d'];\n $datos['NroRemision'] = $n_nro;\n $datos['Destino'] = $destino;\n $datos['Mensaje']=\"En Remision\";\n }else{\n $datos['Mensaje']=\"Ok\"; \n }\n \n }\n echo json_encode($datos);\n }else{\n echo '{\"Mensaje\":\"Error: Codigo no encontrado!\"}';\n } \n $my->Close();\n }", "function revisaNuevo($data2, $compra, $inve){\n foreach ($data2 as $min1) {\n $art=$min1->CVE_ART;\n $mov=$min1->NUM_MOV;\n $this->query=\"SELECT count(num_mov) as movimientos FROM MINVE06 WHERE CVE_ART = '$art' and num_mov < $mov \";\n $res=$this->EjecutaQuerySimple();\n $rowM=ibase_fetch_object($res);\n $movs=$rowM->MOVIMIENTOS;\n if($movs == 0){\n $this->query=\"UPDATE MINVE06 SET COSTO_PROM_INI = 0, COSTO_PROM_fin = 0 WHERE NUM_MOV = $mov\";\n $this->queryActualiza();\n }\n\n $this->query=\"SELECT first 1 * FROM MINVE06 WHERE REFER = '$compra' \n AND CVE_ART = '$inve' \n and costeado_ff is null \n ORDER BY NUM_MOV ASC \";\n $res=$this->EjecutaQuerySimple();\n while ($tsarray=ibase_fetch_object($res)){\n $data3[]=$tsarray;\n }\n }\n return $data3;\n }", "public function getEntradas(){\n\n $oDaoMatOrdemItem = db_utils::getDao('matordemitem');\n $sWhereOrdemCompra = \"m81_codtipo in (19, 12) and m52_codordem = {$this->iCodigoOrdem}\";\n $sSqlMatOrdemItem = $oDaoMatOrdemItem->sql_query_entradas( null, \"*\", null, $sWhereOrdemCompra);\n $rsMatOrdemItem = $oDaoMatOrdemItem->sql_record($sSqlMatOrdemItem);\n\n $aItensEntrada = array();\n if ($oDaoMatOrdemItem->numrows > 0) {\n\n $iTotalItens = $oDaoMatOrdemItem->numrows;\n for ($iRowItem = 0; $iRowItem < $iTotalItens; $iRowItem++) {\n\n $oDadosMatOrdemItem = db_utils::fieldsMemory($rsMatOrdemItem, $iRowItem);\n $oItem = new Item($oDadosMatOrdemItem->m70_codmatmater);\n $oAlmoxarifado = new Almoxarifado($oDadosMatOrdemItem->m80_coddepto);\n $oTipoMovimentacao = TipoMovimentacaoEstoqueRepository::getTipoMovimentaoPorCodigo($oDadosMatOrdemItem->m81_codtipo);\n\n $oMovimentacaoItem = new MovimentacaoItem($oItem);\n $oMovimentacaoItem->setQuantidade($oDadosMatOrdemItem->m52_quant);\n $oMovimentacaoItem->setQuantidadeEntrada($oDadosMatOrdemItem->m71_quant);\n $oMovimentacaoItem->setValor($oDadosMatOrdemItem->m71_valor);\n $oMovimentacaoItem->setAlmoxarifado($oAlmoxarifado);\n $oMovimentacaoItem->setTipoMovimentacao($oTipoMovimentacao);\n\n $aItensEntrada[] = $oMovimentacaoItem;\n\n }\n }\n return $aItensEntrada;\n }", "public function NombresColumnas($tabla)\r\n {\r\n\t$this->tabla=$tabla;\r\n\t$Columnas1=mysql_query(\"select * from $this->tabla\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n$reg=mysql_fetch_array($Columnas1);\t\r\n$numCols=count($reg);\r\n\r\nfor ($i=0; $i<=$numCols; $i++){\r\n\t\r\n\t\t$this->NombreCol[$i]=mysql_field_name($Columnas1,$i);\t\r\n\t\tif ($this->NombreCol[$i]==\"\"){\r\n\t\t\tunset($this->NombreCol[$i]); \r\n\t\t\t$this->NombreCol = array_values($this->NombreCol);//quito el espacio que ha quedado despues de eliminarse \r\n\t\t}else{\r\n\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n}\r\n\r\n$this->ID=$this->NombreCol[0];\r\n\r\n$numCols=count($this->NombreCol);\r\n$this->NumCols=$numCols;\r\n//print($this->NumCols);\r\n//print_r($this->NombreCol);\r\n\r\n\t\t\r\n\t}", "function Listeconsommation()\n\t{\n\t\t$cnn = getConnexion('tpi-fictif');\n\t\t$i = 0;\n\t\t//Permet de savoir plus facilement si login correct ou pas\n\t\t$consom = [];\n\t\t$stmt = $cnn -> prepare('SELECT `ID`, `Nom`, `Prix` FROM `consommation`');\n\t\t$stmt -> execute();\n\t\t//Remplissange tab 2 dimensions pour avoir les infos qu'on souhaite\n\t\t//Passage en param plus facile\n\t\twhile ($row = $stmt->fetch(PDO::FETCH_OBJ)) {\n\t\t\t$consom[$i][0] = $row->ID;\n\t\t\t$consom[$i][1] = $row->Nom;\n\t\t\t$consom[$i][2] = $row->Prix;\n\t\t\t$i++;\n\t\t}\n\t\tif(!empty($consom))\n\t\t{\n\t\t\treturn $consom;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function restablecer()\n {\n $this->_datos = null;\n $this->_errores = array();\n }", "function select() {\n\t\tglobal $reference, $numeroCompteur;\n\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"radeeta\");\n\t\t\t\t\t\t\t\n\t\t// Check connection\n\t\tif($mysqli === false){\n\t\t die(\"ERROR: Could not connect. \" . mysqli_connect_error());\n\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\tmysqli_set_charset($mysqli,\"utf8\");\n\t\t\t\t\t\t\t\t\t\n\t\t$sql = \"select categorieAbonnement, secteur , tourne, ordre,numeroCompteur from releve where HeureReleve is NULL\";\n\t\t\t\t\t\t\t\t\t\n\t\tif ($result = mysqli_query($mysqli, $sql)) {\n\t\t\t\t\t\t\t\t\t\n\t\t\tif($row1 = mysqli_fetch_array($result)){\n\t\t\t\t$reference=(String)\"'\".$row1['categorieAbonnement'].\"-\".(String)$row1['secteur'].\"-\".(String)$row1['tourne'].\"-\".(String)$row1['ordre'].\"'\";\n\n\t\t\t\t$numeroCompteur = (String)\"'\".$row1['numeroCompteur'].\"'\";\n\t\t\t}\n\t\t}\n\t\tmysqli_close($mysqli);\t\t\t\t\t\n\t}", "public function resumenNuevas($changuitas, $usuario, $frecuencia) {\n if (count($changuitas) == 0)\n return;\n $ch = array();\n $cats = array();\n $subcats = array();\n foreach ($changuitas as $v) {\n $sql = \"select ch.titulo, cat.categoria, sc.subcategoria, ch.categoria as cId, ch.subcategoria as sId from changuitas as ch left join categorias as cat on ch.categoria = cat.id left join subcategorias as sc on ch.subcategoria = sc.id where ch.id = $v\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n $ch[$fila[\"cId\"]][$fila[\"sId\"]][] = \"<p style='padding:5px;margin:0;font-family:Helvetica, Arial, sans-serif;font-weight:normal;font-size:18px;'><a href='\" . Sitio . \"/#/changuita|$v'>\" . $fila[\"titulo\"] . \"</a></p>\";\n $cats[$fila[\"cId\"]] = $fila[\"categoria\"];\n $subcats[$fila[\"sId\"]] = $fila[\"subcategoria\"];\n }\n $sql = \"select nombre, mail from usuarios where id = $usuario and activo = '2'\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n $this->mailer->Subject = $fila[\"nombre\"] . \", hay nuevas changuitas\";\n $this->mailer->Body = $this->bodyIni;\n $this->mailer->Body .= \"Estimado/a \" . $fila[\"nombre\"] . \":<br/><br/>\";\n if ($frecuencia == \"diario\")\n $this->mailer->Body .= \"En las últimas 24 horas\";\n else\n $this->mailer->Body .= \"En la última semana\";\n $this->mailer->Body .= \" se publicaron las siguientes changuitas en las categorías que elegiste:\";\n foreach ($ch as $k => $v) {\n $this->mailer->Body .= \"<h4 style='padding:5px 5px 0;margin:5px 0 0;text-transform:uppercase;border-top:1px solid #999;'>\" . $cats[$k] . \"</h4>\";\n foreach ($v as $kk => $vv) {\n $this->mailer->Body .= \"<h4 style='padding:0 5px;margin:0;text-transform:uppercase;font-weight:normal;'> > \" . $subcats[$kk] . \"</h4>\";\n foreach ($vv as $vvv)\n $this->mailer->Body .= $vvv;\n }\n }\n $this->mailer->Body .= \"<br/>\" . $this->bodyFin;\n $this->mailer->ClearAddresses();\n $this->mailer->AddAddress($fila[\"mail\"]);\n $this->mailer->Send();\n }", "function comprobar($nombretabla, $BDImportRecambios, $BDRecambios,$id,$l,$f) {\n // Inicializamos variables\n $consfinal = 0;\n $existente = 0;\n $nuevo = 0;\n $consul = \"SELECT * FROM referenciascruzadas where RefFabricanteCru ='\" . $id . \"'\";\n $consultaReca = mysqli_query($BDRecambios, $consul);\n if ($consultaReca == true) {\n // Controlamos que la consulta sea correcta, ya que sino lo es genera un error la funcion fetch\n $consfinal = $consultaReca->fetch_assoc();\n }\n if ($consfinal['RefFabricanteCru'] == $id && $consfinal['IdFabricanteCru'] == $f) {\n $actu = \"UPDATE `listaprecios` SET `Estado`='existe',`RecambioID`=\" . $consfinal['RecambioID'] . \" WHERE `linea` ='\" . $l . \"'\";\n mysqli_query($BDImportRecambios, $actu);\n $existente = 1;\n } else {\n $actu = \"UPDATE `listaprecios` SET `Estado`='nuevo' WHERE `linea` ='\" . $l . \"'\";\n mysqli_query($BDImportRecambios, $actu);\n $nuevo = 1;\n }\n\n\n $datos[0]['n'] = $nuevo;\n $datos[0]['e'] = $existente;\n $datos[0]['t'] = $l;\n return $datos;\n}", "function loadComments($_idRecette){\n $connexion= my_connect();\n $requette_commentaire=\"SELECT Idcommentaire, Commentaire, Idrecette, Datecommentaire FROM Commentaires where Idrecette = $_idRecette\";\n $table_commentaire_resultat = mysqli_query($connexion,$requette_commentaire); \n $commentaires = array();\n if($table_commentaire_resultat){ \n while($ligne_commentaire=mysqli_fetch_object($table_commentaire_resultat)){\n $commentaires += array($ligne_commentaire->Idcommentaire => array('textCommentaire' => $ligne_commentaire->Commentaire,'dateCommentaire' => $ligne_commentaire->Datecommentaire)); \n } \n }else{\n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo\"message de mysqli:\".mysqli_error($connexion);\n }\n mysqli_close($connexion); \n return $commentaires;\n}", "function contador($nombretabla, $BDImportRecambios,$ConsultaImp) {\n\t// Inicializamos array\n $Tresumen['n'] = 0; //nuevo\n $Tresumen['t'] = 0; //total\n $Tresumen['e'] = 0; //existe\n\t$Tresumen['v'] = 0; //existe\n\t\n\t// Contamos los registros que tiene la tabla\n \t$total = 0;\n $whereC = '';\n $total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC);\n $Tresumen['t'] = $total; // total registros\n\t\t\n // Obtenemos lineas de registro en blanco y contamos cuantas\n\t$whereC = \" WHERE trim(Estado) = ''\";\n\t$campo[1]= 'RefFabPrin';\n\t$campo[2]= 'linea';\n\t$RegistrosBlanco = $ConsultaImp->registroLineas($BDImportRecambios,$nombretabla,$campo,$whereC);\n\t// Como queremos devolver javascript los creamos\n\t$Tresumen['v'] = $RegistrosBlanco['NItems'];\n\t$Tresumen['LineasRegistro'] = $RegistrosBlanco; //Registros en blanco\n \n \n\t// Contamos los registros que tiene la tabla nuevo\n\t$total = 0;\n\t$whereC = \" WHERE Estado = 'nuevo'\";\n $total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC);\n $Tresumen['n'] = $total; //nuevo\n\t\n\t\n\t\n\t\n\t\n\t\n\t// Contamos los registros que tiene la tabla existente\n\t$total = 0;\n\t$whereC = \" WHERE Estado = 'existe'\";\n $total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC);\n\t$Tresumen['e'] = $total; //existe\n return $Tresumen;\n}", "function relatorioDeCelulaPart2Dao($idCelula,$idMembro){\r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetocelula.php\");\r\n \r\n $objDao = Connection::getInstance();\r\n $resultado = mysql_query(\"Select c.NomeCelula, m.Nome from celulas c join celulamembro e on e.CodCelula = c.Codigo join membros m on e.CodMembro = m.Matricula order by c.NomeCelula\") or die (\"Nao foi possivel realizar a busca 2\".mysql_error());\r\n \r\n $listaMembro = array();\r\n \r\n $i=0;\r\n\r\n if($resultado){\r\n \r\n while ($registro = mysql_fetch_assoc($resultado)){ \r\n\t $celula = new objetocelula();\r\n $celula->setNome($registro['NomeCelula']);\r\n $celula->setNomeMembro($registro['Nome']);\r\n\t $listaMembro[$i] = $celula;\r\n\t $i++;\r\n\t}\r\n }\r\n \r\n\tmysql_free_result($resultado);\r\n $objDao->freebanco(); \r\n return $listaMembro;\r\n }", "function Clean() // libera la consulta\n {mysql_free_result($this->consulta);}", "function afficherIngredients($_idRecette){\n $connexion= my_connect();\n $requette_composant=\"SELECT Nomingredient,Quantitee,Unite FROM Compositions join Ingredients USING(Idingredient) JOIN Recettes USING(Idrecette) where Idrecette = $_idRecette \";\n $table_composant_resultat = mysqli_query($connexion,$requette_composant); \n if($table_composant_resultat){\n echo (\"Ingredients: <ul> \");\n while($ligne_composant=mysqli_fetch_object($table_composant_resultat)){\n if ($ligne_composant->Unite === \"unite\") {\n echo (\"<li>\".$ligne_composant->Quantitee.\" \".$ligne_composant->Nomingredient.\".</li>\");\n }\n else { \n echo (\"<li>\".$ligne_composant->Quantitee.\"<strong> \".$ligne_composant->Unite.\"</strong> de \".$ligne_composant->Nomingredient.\".</li>\");\n } \n }\n echo \"</ul>\";\n }else{\n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo\"message de mysqli:\".mysqli_error($connexion);\n }\n mysqli_close($connexion);\n }", "function tampil_data($tabel)\n {\n $row = $this->db->prepare(\"SELECT * FROM sms\");\n $row->execute();\n return $hasil = $row->fetchAll();\n }", "public function setForAuteur()\n {\n //met à jour les proposition qui n'ont pas de base contrat et qui ne sont pas null\n /*PLUS BESOIN DE BASE CONTRAT\n \t\t$dbP = new Model_DbTable_Iste_proposition();\n \t\t$dbP->update(array(\"base_contrat\"=>null), \"base_contrat=''\");\n */\n\t \t//récupère les vente qui n'ont pas de royalty\n\t \t$sql = \"SELECT \n ac.id_auteurxcontrat, ac.id_livre\n , ac.id_isbn, ac.pc_papier, ac.pc_ebook\n , a.prenom, a.nom, c.type, IFNULL(a.taxe_uk,'oui') taxe_uk\n ,i.num\n , v.id_vente, v.date_vente, v.montant_livre, v.id_boutique, v.type typeVente\n , i.id_editeur, i.type typeISBN\n , impF.conversion_livre_euro\n FROM iste_vente v\n INNER JOIN iste_isbn i ON v.id_isbn = i.id_isbn \n INNER JOIN iste_importdata impD ON impD.id_importdata = v.id_importdata\n INNER JOIN iste_importfic impF ON impF.id_importfic = impD.id_importfic\n INNER JOIN iste_auteurxcontrat ac ON ac.id_isbn = v.id_isbn\n INNER JOIN iste_contrat c ON c.id_contrat = ac.id_contrat\n INNER JOIN iste_auteur a ON a.id_auteur = ac.id_auteur\n INNER JOIN iste_livre l ON l.id_livre = i.id_livre \n LEFT JOIN iste_royalty r ON r.id_vente = v.id_vente AND r.id_auteurxcontrat = ac.id_auteurxcontrat\n WHERE pc_papier is not null AND pc_ebook is not null AND pc_papier != 0 AND pc_ebook != 0\n AND r.id_royalty is null \";\n\n $stmt = $this->_db->query($sql);\n \n \t\t$rs = $stmt->fetchAll(); \n \t\t$arrResult = array();\n \t\tforeach ($rs as $r) {\n\t\t\t//calcule les royalties\n \t\t\t//$mtE = floatval($r[\"montant_euro\"]) / intval($r[\"nbA\"]);\n \t\t\t//$mtE *= floatval($r[\"pc_papier\"])/100;\n \t\t\tif($r[\"typeVente\"]==\"ebook\")$pc = $r[\"pc_ebook\"];\n \t\t\telse $pc = $r[\"pc_papier\"];\n $mtL = floatval($r[\"montant_livre\"])*floatval($pc)/100;\n //ATTENTION le taux de conversion est passé en paramètre à l'import et le montant des ventes est calculé à ce moment\n \t\t\t//$mtD = $mtL*floatval($r[\"taux_livre_dollar\"]);\n \t\t\t$mtE = $mtL*floatval($r['conversion_livre_euro']);\n //ajoute les royalties pour l'auteur et la vente\n //ATTENTION les taxes de déduction sont calculer lors de l'édition avec le taux de l'année en cours\n $dt = array(\"pourcentage\"=>$pc,\"id_vente\"=>$r[\"id_vente\"]\n ,\"id_auteurxcontrat\"=>$r[\"id_auteurxcontrat\"],\"montant_euro\"=>$mtE,\"montant_livre\"=>$mtL\n ,\"conversion_livre_euro\"=>$r['conversion_livre_euro']);\n\t \t\t$arrResult[]= $this->ajouter($dt\n ,true,true);\n //print_r($dt);\n \t\t}\n \t\t\n \t\treturn $arrResult;\n }", "public function liste__() {\n\n // lecture des informations\n $this->db->select(\"rgl_id,rgl_reference,rgl_date,rgl_montant,rgl_type,vtr_type,rgl_cheque,rgl_banque,rgl_client,ctc_nom\",false);\n $this->db->join('v_types_reglements','vtr_id=rgl_type','left');\n $this->db->join('t_contacts','ctc_id=rgl_client','left');\n $this->db->where('rgl_inactif is null');\n $this->db->order_by(\"rgl_date desc\");\n $this->db->order_by(\"rgl_id desc\");\n $query = $this->db->get_compiled_select('t_reglements');\n //log_message('DEBUG', 'M_reglements '.$query);\n $q = $this->db->query($query);\n if ($q->num_rows() > 0) {\n $result = $q->result();\n foreach($result as $r) {\n $query = $this->db->where('ipu_reglement',$r->rgl_id)\n ->where('ipu_inactif is null')\n ->select('ipu_facture,fac_reference,ipu_avoir,avr_reference')\n ->join('t_factures','fac_id=ipu_facture','left')\n ->join('t_avoirs','avr_id=ipu_avoir','left')\n ->get_compiled_select('t_imputations');\n //log_message('DEBUG', 'M_reglements '.$query);\n $q = $this->db->query($query);\n $pieces = '';\n $sep = '';\n foreach ($q->result() as $p) {\n $pieces .= $sep;\n if ($p->fac_reference != '') {\n $pieces .= anchor_popup('factures/detail2/'.$p->ipu_facture,$p->fac_reference);\n }\n else if ($p->avr_reference != '') {\n $pieces .= anchor_popup('avoirs/detail2/'.$p->ipu_avoir,$p->avr_reference);\n }\n $sep = '<br />';\n }\n $r->pieces = $pieces;\n if ( $pieces!='' )\n log_message('DEBUG', 'M_reglements ipu_reglement:'.$r->rgl_id.' pieces:'.$pieces);\n }\n return $result;\n }\n else {\n return array();\n }\n }", "function historial(){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT tipo_denuncia.*,denuncia.* FROM denuncia INNER JOIN tipo_denuncia ON denuncia.td_cod_tipo_denuncia=tipo_denuncia.td_cod_tipo_denuncia WHERE denuncia.de_estado='tomado'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute();\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n\t}", "function obtener_Nombres_Cercas($usuario,$connection){\n\t$query_cercas = \"SELECT name FROM id_cercas WHERE user='$usuario'\";\n\t$resultado1 = $connection->query($query_cercas);\n\t$devuelto = array();\n\twhile ($row1 = $resultado1->fetch_assoc()){\n\t\tforeach($row1 as $row){\n\t\tarray_push($devuelto,$row);\n\t}\n\t}\n\n\treturn($devuelto);\n}", "function informationsMonCompte() {\n $this->vue = new V_Vue(\"../vues/templates/template.inc.php\");\n $this->vue->ecrireDonnee(\"titreVue\",\"Margo : Mon Compte\");\n $this->vue->ecrireDonnee('centre',\"../vues/includes/gestionDeCompte/centreMonCompte.inc.php\");\n \n $this->vue->ecrireDonnee(\"titreSection\",\"Mon Compte: Informations\");\n // Centre : formulaire de connexion\n $this->vue->ecrireDonnee('loginAuthentification',MaSession::get('login')); \n \n // ... depuis la BDD \n $daoPers = new M_DaoPersonne();\n $daoPers->connecter();\n $perso = $daoPers->getOneByLogin(MaSession::get('login'));\n \n $this->vue->ecrireDonnee(\"infoPerso\",$perso);\n \n $this->vue->afficher();\n }", "public function getCabang() {\r\n $sql = $this->db->query(\"SELECT * FROM ms_cabang WHERE cb_status = 0 ORDER BY cb_nama\");\r\n if ($sql->num_rows() > 0) {\r\n return $sql->result_array();\r\n }\r\n return null;\r\n }", "function cextras_objets_valides(){\r\n\t$objets = array();\r\n\tforeach (array('article','auteur','breve','groupes_mot','mot','rubrique','site') as $objet) {\r\n\t\t$objets[$objet] = array(\r\n\t\t\t'table' => table_objet_sql($objet), \r\n\t\t\t'nom' => _T('cextras:table_'.$objet),\r\n\t\t);\r\n\t}\r\n\treturn $objets;\r\n}", "function Cargar_hoteles($id, $filadesde_hoteles, $buscar_hotel, $buscar_ciudad){\r\n\r\n\t\t$conexion = $this ->Conexion;\r\n\t\t$Usuario = $this ->Usuario;\r\n\r\n\t\tif($buscar_hotel != 0){\r\n\t\t\t$ciud = \" AND CIUDAD = '\".$buscar_ciudad.\"'\";\r\n\t\t\t$CADENA_BUSCAR = \" WHERE ID = '\".$id.\"' AND HOTEL = '\".$buscar_hotel.\"'\";\r\n\t\t\tif($buscar_ciudad != null){\r\n\t\t\t\t$CADENA_BUSCAR .= $ciud;\t\r\n\t\t\t}\r\n\t\t}elseif($buscar_ciudad != null){\r\n\t\t\t$CADENA_BUSCAR = \" WHERE ID = '\".$id.\"' AND CIUDAD = '\".$buscar_ciudad.\"'\";\r\n \t\t}else{\r\n\t\t\t$CADENA_BUSCAR = \" WHERE ID = '\".$id.\"'\"; \r\n\t\t}\r\n\r\n\t\t\r\n\t\t$resultado =$conexion->query(\"SELECT orden, ciudad, hotel, regimen, precio, precio_2, precio_3, logo_1, logo_2, logo_3 FROM hit_teletipos_hoteles \".$CADENA_BUSCAR.\" ORDER BY ciudad, orden, precio\");\r\n\r\n\t\t/*if ($resultado == FALSE){\r\n\t\t\techo('Error en la consulta: '.$CADENA_BUSCAR);\r\n\t\t\t$resultado->close();\r\n\t\t\t$conexion->close();\r\n\t\t\texit;\r\n\t\t}*/\r\n\t\t//echo($id.\"-\".$filadesde_hoteles.\"-\".$buscar_hotel);\r\n\t\t\r\n\t\t//echo($CADENA_BUSCAR);\r\n\t\t//Guardamos el resultado en una matriz con un numero fijo de registros\r\n\t\t//que controlaremos por una tabla de configuracion de pantallas de usuarios. ESPECIFICO: Solo el nombre del formulario en la query\r\n\t\t$numero_filas =$conexion->query(\"SELECT LINEAS_MODIFICACION FROM hit_usuarios_formularios WHERE FORMULARIO = 'TELETIPOS_HOTELES' AND USUARIO = '\".$Usuario.\"'\");\r\n\t\t$Nfilas\t = $numero_filas->fetch_assoc();\t\t\t\t\t\t\t\t\t\t\t //------\r\n\r\n\t\t$hoteles = array();\r\n\t\tfor ($num_fila = $filadesde_hoteles-1; $num_fila <= $filadesde_hoteles + $Nfilas['LINEAS_MODIFICACION']-2; $num_fila++) {\r\n\t\t\t$resultado->data_seek($num_fila);\r\n\t\t\t$fila = $resultado->fetch_assoc();\r\n\t\t\tif($fila['hotel'] == ''){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tarray_push($hoteles,$fila);\r\n\t\t}\r\n\r\n\t\t\r\n\t\t//Liberar Memoria usada por la consulta\r\n\t\t$resultado->close();\r\n\t\t$numero_filas->close();\r\n\r\n\t\treturn $hoteles;\t\t\t\t\t\t\t\t\t\t\t\r\n\t}", "public function TemparioData(){\n\t\t$this->id = \"\"; \n\t\t$this->id_tempario = \"\";\n\t\t$this->descripcion = \"\";\n\t\t$this->tiempo = \"\";\n\t\n\t\t\n\t}", "function pengguna_rinci($nama_pengguna) {\n $re = array(); //set nilai awal array kosong\n global $conn; //memanggil koneksi\n //melakukan select berdasarkan nama pengguna dan dijoin dengan tabel jenis pengguna sebagai kerangan apakah admin/customer\n $q = $conn->prepare(\"SELECT * FROM pengguna JOIN jenis_pengguna ON jenis_pengguna.id=pengguna.jenis_pengguna WHERE nama_pengguna='$nama_pengguna' AND aktif='1'\");\n $q->execute();\n //mengeset array kosong tadi dengan index 'pengguna', dan diisi data yang telah diselect tadi, tentunya index ke 0 karena tidak mungkin ada data yang sama\n $re['pengguna'] = @$q->fetchAll()[0];\n //select rekening juga berdasarkan nama pengguna dan yang aktif\n $q = $conn->prepare(\"SELECT * FROM rekening WHERE nama_pengguna='$nama_pengguna' AND aktif='1'\");\n $q->execute();\n //menyimpan data rekening dalam array dengan index 'rekening' dan tidak index 0 saja, karena bisa jadi punya lebih dari 1 rekening\n $re['rekening'] = @$q->fetchAll();\n return $re; //mereturn data\n}", "function tabledata_Fiche($table, $serveur, $field, $key , $idLigne, $modeFiche =\"voir\")\r\n{\r\n\r\n $nombre_Enregistrements = 0;\r\n\r\n // $mode : possible ajout, modif, voir , effacer\r\n switch ($modeFiche)\r\n {\r\n case \"ajout\" :\r\n $boolSQL = false;\r\n $txtReadonly = \"\";\r\n $nombre_Enregistrements = 1; // pour forcer passage car pas de requete\r\n break;\r\n case \"effacer\" :\r\n $boolSQL = true;\r\n $txtReadonly = \" READONLY \";\r\n break;\r\n case \"modif\" :\r\n $boolSQL = true;\r\n $txtReadonly = \"\";\r\n break;\r\n case \"voir\" :\r\n $boolSQL = true;\r\n $txtReadonly = \" READONLY \";\r\n break;\r\n default :\r\n $boolSQL = false;\r\n $txtReadonly = \" READONLY \";\r\n }\r\n\r\n if ($boolSQL)\r\n {\r\n $sqlResult = tabledata_Cde_select($table , $field,\"\",\"\", $key, $idLigne);\r\n $nombre_Enregistrements = sql_count($sqlResult); //2.0\r\n }\r\n\r\n if ($nombre_Enregistrements>0)\r\n {\r\n $total = '';\r\n $hiddens = '';\r\n\r\n if ($boolSQL)\r\n {\r\n $tabUnEnregistrement = sql_fetch($sqlResult);\r\n }\r\n else\r\n {\r\n foreach ($field as $k => $v)\r\n {\r\n $tabUnEnregistrement[$k] = \"\";\r\n }\r\n }\r\n\r\n foreach ($field as $k => $v)\r\n {\r\n if (array_search($k, $key) == \"PRIMARY KEY\")\r\n {\r\n if ($boolSQL)\r\n {\r\n $strDebut = \"Enregistrement ayant comme cl&#233; primaire :<br/><i><b>\"\r\n .$k.\"='\".$tabUnEnregistrement[$k].\"'</b></i><br/>\";\r\n }\r\n }\r\n else\r\n {\r\n preg_match(\"/^ *([A-Za-z]+) *(\\(([^)]+)\\))?(.*DEFAULT *'(.*)')?/\", $v, $m);\r\n $type = $m[1];\r\n $s = ($m[5] ? \" value='$m[5]' \" : '');\r\n $t = $m[3];\r\n if ($m[2])\r\n {\r\n if (is_numeric($t))\r\n {\r\n if ($t <= 32)\r\n {\r\n $s .= \" sizemax='$t' size='\" . ($t * 2) . \"'\";\r\n }\r\n else\r\n {\r\n $type = 'BLOB';\r\n }\r\n }\r\n else\r\n {\r\n preg_match(\"/^ *'?(.*[^'])'? *$/\", $t, $m2); $t = $m2[1];\r\n }\r\n }\r\n\r\n switch (strtoupper($type))\r\n {\r\n case TINYINT:\r\n if ($t==1)\r\n {\r\n $checked = \"\";\r\n if ($tabUnEnregistrement[$k] == 1)\r\n {\r\n $checked = \" checked\";\r\n }\r\n $s = \"<td>\"\r\n .\"<input type='checkbox' name='\".$k.\"'\"\r\n .\" value='1'\".$checked.$txtReadonly.\"/>\"\r\n .\"</td>\\n\";\r\n break;\r\n }\r\n case INT:\r\n case INTEGER:\r\n case BIGINT:\r\n case TINYINT:\r\n case CHAR:\r\n case VARCHAR:\r\n case TEXT:\r\n case TINYTEXT:\r\n case TINYBLOB:\r\n case YEAR:\r\n case DATETIME:\r\n case DATE:\r\n case TIME:\r\n $s = \"<td>\"\r\n .\"<input type='text'\".$s.\" name='\".$k.\"'\"\r\n .\" value='\".htmlentities(utf8_decode($tabUnEnregistrement[$k]), ENT_QUOTES)\r\n .\"'\".$txtReadonly.\"/>\"\r\n .\"</td>\\n\";\r\n break;\r\n case ENUM:\r\n case SET: //ajout JFM\r\n $s = \"<td><select name='\".$k.\"'\".$txtReadonly.\">\\n\";\r\n foreach (preg_split(\"/'? *, *'?/\",$t) as $v)\r\n {\r\n if ($tabUnEnregistrement[$k]==$v)\r\n {\r\n $s .= \"<option selected>\".$v.\"</option>\\n\";\r\n }\r\n else\r\n {\r\n $s .= \"<option>\".$v.\"</option>\\n\";\r\n }\r\n } //foreach (preg_split(\"/'? *, *'?/\",$t) as $v)\r\n $s .= \"</select></td>\\n\";\r\n break;\r\n case TIMESTAMP:\r\n $s = '';\r\n if ($mode==\"ajout\")\r\n {\r\n $hiddens .= \"<input type='hidden' name='\".$k.\"' value='NOW()'/>\\n\";\r\n }\r\n else\r\n {\r\n $hiddens .= \"<input type='hidden' name='\".$k.\"' value='\".$v.\"'/>\\n\";\r\n }\r\n break;\r\n case LONGBLOB:\r\n $s = \"<td><textarea name='$k' cols='45' rows='20'\".$txtReadonly.\">\".htmlentities(utf8_decode($tabUnEnregistrement[$k]), ENT_QUOTES ).\"</textarea></td>\\n\"; //modif. JFM\r\n break;\r\n default:\r\n $t = floor($t / 45)+1;\r\n $s = \"<td><textarea name='$k' cols='45' rows='$t'\".$txtReadonly.\">\".htmlentities(utf8_decode($tabUnEnregistrement[$k]), ENT_QUOTES ).\"</textarea></td>\\n\";\r\n break;\r\n } //switch (strtoupper($type))\r\n if ($s)\r\n $total .= \"<tr><td>$k</td>\\n$s</tr>\\n\";\r\n }\r\n }\r\n $hiddens .= \"<input type='hidden' name='serveur' value='\".$serveur.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='table' value='\".$table.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='mode' value='\".$mode.\"'/>\\n\";\r\n\r\n\r\n // $idLigne = htmlentities(stripcslashes($idLigne), ENT_QUOTES );\r\n $idLigne = htmlentities($idLigne, ENT_QUOTES );\r\n\r\n switch ($modeFiche)\r\n {\r\n case \"ajout\" :\r\n $txtbouton =\"Ajouter\";\r\n break;\r\n case \"effacer\" :\r\n $hiddens .= \"<input type='hidden' name='id_ligne' value='\".$idLigne.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='tdaction' value='ordresuplig'/>\\n\";\r\n $txtbouton =\"Effacer d&#233;finitivement\";\r\n break;\r\n case \"modif\" :\r\n $hiddens .= \"<input type='hidden' name='id_ligne' value='\".$idLigne.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='tdaction' value='maj'/>\\n\";\r\n $txtbouton =\"Modifier\";\r\n break;\r\n case \"voir\" :\r\n $hiddens .= \"<input type='hidden' name='id_ligne' value='\".$idLigne.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='tdaction' value='AUCUN'/>\\n\";\r\n $txtbouton =\"--\";\r\n break;\r\n default:\r\n $hiddens .= \"<input type='hidden' name='tdaction' value='AUCUN'/>\\n\";\r\n $txtbouton =\"AUCUN\";\r\n }\r\n\r\n return \"\\n\\n\\n\".tabledata_url_generer_post_ecrire(\r\n 'tabledata'\r\n , \"<table>\\n\".$strDebut.$total\r\n .\"</table>\".$hiddens,$txtbouton);\r\n } // if ($nombre_Enregistrements>0)\r\n\r\n}", "public function todaInfoProductos(){\n\n for($i = 0; $i < count($this -> listProducto); $i++){\n $this -> listProducto[$i][0] -> getInfoBasic();\n }\n }", "public function semuaData(){ \n return Mata_Kuliah::find(3)->Mahasiswa()->detach(); //gausah diisi arraynya\n }", "public function getAllClientsInfo() {\n //Nom de famille :\n //Prénom :\n //Date de naissance :\n //Carte de fidélité :\n //Si oui, N° de carte:\n $queryResult = $this->database->query('SELECT lastName, firstName, birthDate, card, cardNumber, \n CASE card\n\tWHEN 1 THEN \"Oui\"\n\tWHEN 0 THEN \"Non\"\n END AS \"etat\"\n FROM clients'); \n $allClientsInfoData = $queryResult->fetchAll(PDO::FETCH_OBJ);\n return $allClientsInfoData;\n }", "public function clear()\n {\n $this->id_bangunan = null;\n $this->jenis_prasarana_id = null;\n $this->sekolah_id = null;\n $this->id_tanah = null;\n $this->ptk_id = null;\n $this->id_hapus_buku = null;\n $this->kepemilikan_sarpras_id = null;\n $this->kd_kl = null;\n $this->kd_satker = null;\n $this->kd_brg = null;\n $this->nup = null;\n $this->kode_eselon1 = null;\n $this->nama_eselon1 = null;\n $this->kode_sub_satker = null;\n $this->nama_sub_satker = null;\n $this->nama = null;\n $this->panjang = null;\n $this->lebar = null;\n $this->nilai_perolehan_aset = null;\n $this->jml_lantai = null;\n $this->thn_dibangun = null;\n $this->luas_tapak_bangunan = null;\n $this->vol_pondasi_m3 = null;\n $this->vol_sloop_kolom_balok_m3 = null;\n $this->panj_kudakuda_m = null;\n $this->vol_kudakuda_m3 = null;\n $this->panj_kaso_m = null;\n $this->panj_reng_m = null;\n $this->luas_tutup_atap_m2 = null;\n $this->kd_satker_tanah = null;\n $this->nm_satker_tanah = null;\n $this->kd_brg_tanah = null;\n $this->nm_brg_tanah = null;\n $this->nup_brg_tanah = null;\n $this->tgl_sk_pemakai = null;\n $this->tgl_hapus_buku = null;\n $this->ket_bangunan = null;\n $this->asal_data = null;\n $this->create_date = null;\n $this->last_update = null;\n $this->soft_delete = null;\n $this->last_sync = null;\n $this->updater_id = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "function FicheMemos_chercher($args)\n{\n\t$tab_result = array();\n\n\t$sql = \" SELECT * \n\t\t\t\tFROM \".$GLOBALS['prefix'].\"fiche_memos\n\t\t\t\tWHERE 1\";\n\n\tif (!isset($args['id_memo']) && !isset($args['id_fiche'])\n\t\t && !isset($args['order_by']) && !isset($args['tab_ids_memos']) \n\t\t && !isset($args['tab_ids_fiches']))\n\t\treturn $tab_result;\n\n\t$condition=\"\";\n\n\tif (isset($args['id_memo']) && $args['id_memo'] != \"*\")\n\t\t$condition .= \" AND id_memo = \".$args['id_memo'].\" \";\n\tif (isset($args['id_fiche']) && $args['id_fiche'] != \"*\")\n\t\t$condition .= \" AND id_fiche = \".$args['id_fiche'].\" \";\n\tif (isset($args['date_memo_min']))\n\t\t$condition .= \" AND date_memo >= \".$args['date_memo_min'].\" \";\n\tif (isset($args['date_memo_max']))\n\t\t$condition .= \" AND date_memo <= \".$args['date_memo_max'].\" \";\n\n\tif (isset($args['tab_ids_memos']) && $args['tab_ids_memos'] != \"*\") {\n\t\t$ids = implode(\",\", $args['tab_ids_memos']);\n\t\t$condition .= \" AND id_memo IN (0\".$ids.\") \";\n\t}\n\tif (isset($args['tab_ids_fiches']) && $args['tab_ids_fiches'] != \"*\") {\n\t\t$ids = implode(\",\", $args['tab_ids_fiches']);\n\t\t$condition .= \" AND id_fiche IN (0\".$ids.\") \";\n\t}\n\n\t$sql .= $condition;\n\n\tif (isset($args['order_by']) && !isset($args['asc_desc']))\n\t\t$sql .= \" ORDER BY \".$args['order_by'].\" ASC\";\n\tif (isset($args['order_by']) && isset($args['asc_desc']))\n\t\t$sql .= \" ORDER BY \".$args['order_by'].\" \".$args['asc_desc'];\n\n\tif (isset($args['limit']) && !isset($args['start']))\n\t\t$sql .= \" LIMIT \".$args['limit'];\n\n\tif (isset($args['limit']) && isset($args['start']))\n\t\t$sql .= \" LIMIT \".$args['start'].\",\".$args['limit'];\n\n\t/*=============*/ Lib_myLog(\"SQL: $sql\");\n\t$result = Sql_query($sql);\n\n\tif ($result && Sql_errorCode($result) === \"00000\") {\n\t\twhile($row = Sql_fetch($result)) {\n\t\t\t$id = $row['id_memo'];\n\t\t\t$tab_result[$id][\"id_memo\"]\t\t\t\t= $id;\n\t\t\t$tab_result[$id][\"id_fiche\"]\t\t\t\t= $row['id_fiche'];\n\t\t\t$tab_result[$id][\"date_memo\"]\t\t\t\t= $row['date_memo'];\n\t\t\t$tab_result[$id][\"memo\"]\t\t\t\t\t= Sql_prepareTexteAffichage($row['memo']);\n\t\t\t$tab_result[$id][\"date_add\"]\t\t\t\t= $row['date_add'];\n\t\t\t$tab_result[$id][\"date_upd\"]\t\t\t\t= $row['date_upd'];\n\t\t\t$tab_result[$id][\"info_memo\"]\t= Sql_prepareTexteAffichage($row['info_memo']);\n\t\t}\n\t}\n\n\tif (count($tab_result) == 1 && ($args['id_memo'] != '' && $args['id_memo'] != '*'))\n\t\t$tab_result = array_pop($tab_result);\n\n\treturn $tab_result;\n}", "function cita_biblica($objeto)\n{\n return $objeto->libro->nombre . ' ' . $objeto->numero_capitulo . ': ' . $objeto->numero_versiculo;\n}", "private function Insertion($stats=\"N\")\n {\n if ($this->mode != \"M\") {\n $requete = \"INSERT INTO tbl_Banniere (nomBanniere,codeBanniere, T_actif, plage_min, \";\n $requete .= \"plage_max, nb_affichages_site, nb_affichages_forum, nb_affichages_jeu, \";\n $requete .= \"type_affichage, T_Stat_Clic, commentaire, nb_clics, url_redirect, format) \";\n $requete .= \"VALUES ('$this->nomBanniere','$this->codeBanniere', '$this->T_actif', \";\n $requete .= \"'$this->plage_min', '$this->plage_max', '$this->nb_affichages_site', \";\n $requete .= \"'$this->nb_affichages_forum', '$this->nb_affichages_jeu', '$this->type_affichage', \";\n $requete .= \"'$this->T_Stat_Clic' , '$this->commentaire', '$this->nb_clics', \";\n $requete .= \"'$this->url_redirect', '$this->format')\";\n }\n elseif ($stats == \"O\") {\n $requete = \"UPDATE tbl_Banniere set \";\n $requete .= \"nb_affichages_site = \".$this->nb_affichages_site.\", \";\n $requete .= \"nb_affichages_forum = \".$this->nb_affichages_forum.\", \";\n //$requete .= \"nb_affichages_jeu = \".$this->nb_affichages_jeu.\", \";\n $requete .= \"type_affichage = '\".$this->type_affichage.\"', \";\n $requete .= \"T_Stat_Clic = '\".$this->T_Stat_Clic.\"', \";\n $requete .= \"nb_clics = \".$this->nb_clics.\", \";\n $requete .= \"WHERE nomBanniere = '\".$this->nomBanniere.\"'\";\n \n\n }\n else {\n $requete = \"UPDATE tbl_Banniere set \";\n $requete .= \"codeBanniere = '\".addslashes(stripslashes($this->codeBanniere)).\"', \";\n $requete .= \"T_actif = '\".$this->T_actif.\"', \";\n $requete .= \"plage_min = \".$this->plage_min.\", \";\n $requete .= \"plage_max = \".$this->plage_max.\", \";\n $requete .= \"nb_affichages_site = \".$this->nb_affichages_site.\", \";\n $requete .= \"nb_affichages_forum = \".$this->nb_affichages_forum.\", \";\n //$requete .= \"nb_affichages_jeu = \".$this->nb_affichages_jeu.\", \";\n $requete .= \"type_affichage = '\".$this->type_affichage.\"', \";\n $requete .= \"T_Stat_Clic = '\".$this->T_Stat_Clic.\"', \";\n $requete .= \"commentaire = '\".addslashes(stripslashes($this->commentaire)).\"', \";\n $requete .= \"nb_clics = \".$this->nb_clics.\", \";\n $requete .= \"url_redirect = '\".$this->url_redirect.\"', \";\n $requete .= \"format = \".$this->format.\" \";\n $requete .= \"WHERE nomBanniere = '\".$this->nomBanniere.\"'\";\n }\n\n echo $requete ;\n # $result = $this->getDb()->exec($requete);\n\n # return $result;\n }", "function getListeChamps()\n{\n\t// ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp\n\t$laListeChamps[]=new dbChamp(\"Xdc_id\", \"entier\", \"get_id\", \"set_id\");\n\t$laListeChamps[]=new dbChamp(\"Xdc_cms_description\", \"entier\", \"get_cms_description\", \"set_cms_description\");\n\t$laListeChamps[]=new dbChamp(\"Xdc_classe\", \"entier\", \"get_classe\", \"set_classe\");\n\t$laListeChamps[]=new dbChamp(\"Xdc_classeid\", \"entier\", \"get_classeid\", \"set_classeid\");\n\treturn($laListeChamps);\n}", "function camposBD(){\n//\t\tSELECT idFactura, nombreTienda AS tienda, fecha, numfactura AS Factura FROM tblfacturas \n//\t\tINNER JOIN tbltiendas ON tbltiendas.idtblTienda = tblfacturas.idtblTienda\n\t\t$fields = array();\n\t\t$fields[] = 'idFactura';\t\n\t\t$fields[] = 'fecha';\t\n\t\t$fields[] = 'tienda';\t\n\t\t$fields[] = 'numFactura';\t\n\t\t/*$fields[] = 'opcion';\t*/\n\t\t/*$fields[] = 'comentario';*/\t\n\t\treturn $fields;\n\t}", "function boucle_DOCUMENTS($id_boucle, &$boucles) {\r\n\t$boucle = &$boucles[$id_boucle];\r\n\t$id_table = $boucle->id_table;\r\n\r\n\t// on ne veut pas des fichiers de taille nulle,\r\n\t// sauf s'ils sont distants (taille inconnue)\r\n\tarray_unshift($boucle->where,array(\"'($id_table.taille > 0 OR $id_table.distant=\\\\'oui\\\\')'\"));\r\n\r\n\t// Supprimer les vignettes\r\n\tif (!isset($boucle->modificateur['criteres']['mode'])\r\n\tAND !isset($boucle->modificateur['criteres']['tout'])) {\r\n\t\tarray_unshift($boucle->where,array(\"'!='\", \"'$id_table.mode'\", \"'\\\\'vignette\\\\''\"));\r\n\t}\r\n\r\n\t// Pour une boucle generique (DOCUMENTS) sans critere de lien, verifier\r\n\t// qu notre document est lie a un element publie\r\n\t// (le critere {tout} permet de les afficher tous quand meme)\r\n\t// S'il y a un critere de lien {id_article} par exemple, on zappe\r\n\t// ces complications (et tant pis si la boucle n'a pas prevu de\r\n\t// verification du statut de l'article)\r\n\tif ((!isset($boucle->modificateur['tout']) OR !$boucle->modificateur['tout'])\r\n\tAND (!isset($boucle->modificateur['criteres']['id_objet']) OR !$boucle->modificateur['criteres']['id_objet'])\r\n\t) {\r\n\t\t# Espace avant LEFT JOIN indispensable pour insertion de AS\r\n\t\t# a refaire plus proprement\r\n\r\n\t\t## la boucle par defaut ignore les documents de forum\r\n\t\t$boucle->from[$id_table] = \"spip_documents LEFT JOIN spip_documents_liens AS l\r\n\t\t\tON $id_table.id_document=l.id_document\r\n\t\t\tLEFT JOIN spip_articles AS aa\r\n\t\t\t\tON (l.id_objet=aa.id_article AND l.objet=\\'article\\')\r\n\t\t\tLEFT JOIN spip_breves AS bb\r\n\t\t\t\tON (l.id_objet=bb.id_breve AND l.objet=\\'breve\\')\r\n\t\t\tLEFT JOIN spip_rubriques AS rr\r\n\t\t\t\tON (l.id_objet=rr.id_rubrique AND l.objet=\\'rubrique\\')\r\n\t\t\tLEFT JOIN spip_forum AS ff\r\n\t\t\t\tON (l.id_objet=ff.id_forum AND l.objet=\\'forum\\')\r\n\t\t\tLEFT JOIN spip_evenements AS ee\r\n\t\t\t\tON (l.id_objet=ee.id_evenement AND l.objet=\\'evenement\\')\r\n\t\t\";\r\n\t\t$boucle->group[] = \"$id_table.id_document\";\r\n\r\n\t\tif ($GLOBALS['var_preview']) {\r\n\t\t\tarray_unshift($boucle->where,\"'(aa.statut IN (\\'publie\\',\\'prop\\') OR bb.statut IN (\\'publie\\',\\'prop\\') OR rr.statut IN (\\'publie\\',\\'prive\\') OR ff.statut IN (\\'publie\\',\\'prop\\') OR ee.statut IN (\\'publie\\',\\'prop\\'))'\");\r\n\t\t} else {\r\n\t\t\t$postdates = ($GLOBALS['meta']['post_dates'] == 'non')\r\n\t\t\t\t? ' AND aa.date<=\\'.sql_quote(quete_date_postdates()).\\''\r\n\t\t\t\t: '';\r\n\t\t\tarray_unshift($boucle->where,\"'((aa.statut = \\'publie\\'$postdates) OR bb.statut = \\'publie\\' OR rr.statut = \\'publie\\' OR ff.statut=\\'publie\\' OR ee.statut=\\'publie\\')'\");\r\n\t\t}\r\n\t}\r\n\r\n\r\n\treturn calculer_boucle($id_boucle, $boucles);\r\n}", "private function fillInfo()\n\t{\n\t\t$database = new db_Database();\n\n\t\t$database->query(\"select * from users where id=:id\");\n\t\t$database->bind(\":id\",$this->id);\n\t\t$set=$database->resultset();\n\t\t\n\t\t$this->password=$set[0]['pass'];\n\t\t$this->userName=$set[0]['userName'];\t\t\n\t\t$this->email=$set[0]['email'];\t\t\n\t\t$this->session=$set[0]['session'];\n\t\t$this->avatar=$set[0]['avatar'];\n\t\t\n\t}", "public function VerDetallesCompras()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM detallecompras LEFT JOIN categorias ON detallecompras.categoria = categorias.codcategoria WHERE detallecompras.codcompra = ?\";\t\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET[\"codcompra\"])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\n\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t{\n\t\t$this->p[]=$row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "function get_control_salida_extra_mov(){\n\t\t$sQuery=\"SELECT id, id_sucursal, placa FROM control_salida_extra WHERE placa > 'NULL' \";\n\t\n\t\t//die($sQuery);\n\t\t$result=mssql_query($sQuery) or die(mssql_min_error_severity());\n\t\t$i=0;\n\t\twhile($row=mssql_fetch_array($result)){\n\t\t\tforeach($row as $key=>$value){\n\t\t\t\t$res_array[$i][$key]=$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn($res_array);\n\t\t\t\n\t}", "public function ajoutBureau(int $bureau)\n {\n // On effectue une recherche de tous les immeubles contenus\n // dans le buerau demandée\n $sql = 'SELECT DISTINCT `id`\n FROM `people`\n WHERE `bureau` = :bureau';\n $query = $this->_link->prepare($sql);\n $query->bindParam(':bureau', $bureau, PDO::PARAM_INT);\n $query->execute();\n\n // S'il y a des immeubles\n if ($query->rowCount()) {\n // On récupère la liste des identifiants\n $immeubles = $query->fetchAll(PDO::FETCH_NUM);\n\n // Si la mission est un porte à porte,\n // on cherche les électeurs concernés\n if ($this->_data['mission_type'] == 'porte') {\n // Pour chaque immeuble, on récupère les infos et\n // on créé une porte à boîter\n foreach ($immeubles as $immeuble) {\n $sql = 'SELECT `street`\n FROM `building`\n WHERE `id` = :id';\n $query = $this->_link->prepare($sql);\n $query->bindParam(':id', $immeuble[0]);\n $query->execute();\n $info = $query->fetch(PDO::FETCH_NUM);\n\n $sql = 'SELECT `people` AS `id`\n FROM `address`\n WHERE `building` = :immeuble';\n $query = $this->_link->prepare($sql);\n $query->bindParam(':immeuble', $immeuble[0], PDO::PARAM_INT);\n $query->execute();\n $contacts = $query->fetchAll(PDO::FETCH_NUM);\n\n // Pour chaque électeur, on créé une porte à frapper\n foreach ($contacts as $contact) {\n $sql = 'INSERT INTO `items` (`mission_id`,\n `rue_id`,\n `immeuble_id`,\n `contact_id`)\n VALUES (:mission,\n :rue,\n :immeuble,\n :contact)';\n $query = $this->_link->prepare($sql);\n $query->bindParam(\n ':mission',\n $this->_data['mission_id'],\n PDO::PARAM_INT\n );\n $query->bindParam(':rue', $info[0], PDO::PARAM_INT);\n $query->bindParam(\n ':immeuble',\n $immeuble[0],\n PDO::PARAM_INT\n );\n $query->bindParam(\n ':contact',\n $contact[0],\n PDO::PARAM_INT\n );\n $query->execute();\n }\n }\n } else {\n foreach ($immeubles as $immeuble) {\n $sql = 'SELECT `street`\n FROM `building`\n WHERE `id` = :id';\n $query = $this->_link->prepare($sql);\n $query->bindParam(':id', $immeuble[0]);\n $query->execute();\n $info = $query->fetch(PDO::FETCH_NUM);\n\n $query = $this->_link->prepare($sql);\n $sql = 'INSERT INTO `items` (`mission_id`,\n `rue_id`,\n `immeuble_id`)\n VALUES (:mission,\n :rue,\n :immeuble)';\n $query->bindParam(\n ':mission',\n $this->_data['mission_id'],\n PDO::PARAM_INT\n );\n $query->bindParam(':rue', $info[0], PDO::PARAM_INT);\n $query->bindParam(':immeuble', $immeuble[0], PDO::PARAM_INT);\n $query->execute();\n }\n }\n } else {\n return false;\n }\n }" ]
[ "0.5836682", "0.57544816", "0.5717129", "0.56742936", "0.5671754", "0.5653974", "0.56488687", "0.56320333", "0.5631857", "0.5611364", "0.55320394", "0.5529355", "0.5501364", "0.5494666", "0.54777265", "0.54676735", "0.54242706", "0.5420637", "0.5415435", "0.540274", "0.53966314", "0.53945154", "0.53882384", "0.53795546", "0.5370838", "0.53621775", "0.53506476", "0.5333749", "0.5324157", "0.5319519", "0.5318725", "0.5318121", "0.53164136", "0.5308485", "0.53049964", "0.5304414", "0.5289816", "0.5282463", "0.5279573", "0.52783245", "0.5270101", "0.52684784", "0.52628934", "0.525977", "0.52568907", "0.5248719", "0.5245332", "0.52421993", "0.52350205", "0.52338845", "0.52333504", "0.5232508", "0.5228017", "0.5226689", "0.5217102", "0.5214126", "0.5212849", "0.5207713", "0.51863486", "0.5178314", "0.5170104", "0.51692176", "0.5163733", "0.51617163", "0.5160894", "0.51566064", "0.515313", "0.5152447", "0.51516724", "0.5143652", "0.51396495", "0.5139562", "0.513931", "0.51377016", "0.51335555", "0.5129728", "0.51177347", "0.51169723", "0.5111761", "0.5110516", "0.51078737", "0.51074165", "0.51048934", "0.5104365", "0.5102154", "0.5100421", "0.5095083", "0.5093822", "0.50935906", "0.509214", "0.5086306", "0.5085098", "0.5084997", "0.50840575", "0.508279", "0.50823045", "0.5081695", "0.5080684", "0.50793344", "0.5073794" ]
0.67104536
0
Fonction pour verifier si un montant est des decimaux ex. 100.15 ... PARAM : mnt RETURN : BOOLEAN $hasDecimal
function hasDecimalMontant($mnt) { $hasDecimal = false; $mntIAP_Arrondie = ROUND($mnt); $diff = abs($mnt - $mntIAP_Arrondie); if ($diff > 0){ $hasDecimal = true; } return $hasDecimal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_decimal( $val )\n {\n return is_numeric( $val ) && floor( $val ) != $val;\n }", "public static function _decimal($value, $field, $min_decimal = 1, $max_decimal=null) {\n\t\t$regex = '/^-?[0-9]+\\.[0-9]{' . $min_decimal . ',' . $max_decimal . '}$/';\n\t\treturn (bool)preg_match($regex, $value);\n\t}", "public function getIsDecimal()\n {\n return $this->isDecimal;\n }", "function _fourD_analysis_validate_decimal( $d ) {\n \n if( is_numeric($d) ){\n \n $rounded = _fourD_analysis_round_decimal($d);\n\n $min = 0.0;\n $max = 1.0;\n $epsilon = 1e-11; // extra bit to satisfy validation check at a 1e-10 decimal precision\n \n // fourD_analysis_debug('_fourD_analysis_validate_decimal('.$d.'); $rounded: '.$rounded.'; $min: '.$min.'; $max: '.$max.'; $epsilon: '.$epsilon );\n\n if( $rounded <= $min + $epsilon ){\n return $min;\n }\n elseif( $rounded >= $max - $epsilon ){\n return $max;\n }\n \n if( $rounded > $min + $epsilon && $rounded < $max - $epsilon ){\n return $rounded;\n }\n }\n return false;\n}", "function _fourD_analysis_validate_decimal_old( $d ) {\n \n if( is_numeric($d) ){\n \n $min = 0.0;\n $max = 1.0;\n $epsilon = 1e-11; // extra bit to satisfy equality check of a 1e-10 decimal precision\n \n if( $d > $min + $epsilon && $d < $max - $epsilon ){\n return true;\n }\n }\n return false;\n}", "public function decimalNumber($decimal) {\n\t\t$error = 'The %s is not a valid price.';\n\t\t// check if there is a period\n\t\tif(!strstr($decimal, '.')) {$error .= 1;\n\t\t\t$this->form_validation->set_message('decimalNumber', $error);\n\t\t\treturn false;\n\t\t}\n\t\t// split apart the price by decimal\n\t\t$parts = explode('.', $decimal);\n\t\t// check that there is only one decimal\n\t\tif(count($parts) != 2) {$error .= 2;\n\t\t\t$this->form_validation->set_message('decimalNumber', $error);\n\t\t\treturn false;\n\t\t}\n\t\t// check that before and after the decimal is numeric\n\t\tfor($i = 0; $i < count($parts); $i++) {\n\t\t\tif(!is_numeric($parts[$i])) {$error .= 3;\n\t\t\t\t$this->form_validation->set_message('decimalNumber', $error);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// check that there are two digits after the decimal\n\t\t\tif($i == 1 && strlen($parts[$i]) != 2) {$error .= 4;\n\t\t\t\t$this->form_validation->set_message('decimalNumber', $error);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// make it here, the value is fine\n\t\treturn true;\n\t}", "public static function decimal() {}", "public function hasAmountsDec()\n {\n return $this->AmountsDec !== null;\n }", "static function decimal($value){\n\t\t$v = strpos($value, \",\");\n\t\t$p = strpos($value, \".\");\n\t\tif($v === false && $p === false){ // Valor inteiro sem separador de decimal e milhar (nao precisa de tratamento)\n\t\t}elseif($v !== false && $p === false){ // Virgula no separador decimal e sem separador de milhar\n\t\t\t$value = str_replace(\",\", \".\", $value);\n\t\t}elseif($v === false && $p !== false){ // Ponto no separador de decimal e sem separador de milhar (nao precisa de tratamento)\n\t\t}elseif($v > $p){ // Virgula no separador de decimal e ponto no separador de milhar\n\t\t\t$value = str_replace(\".\", \"\", $value);\n\t\t\t$value = str_replace(\",\", \".\", $value);\n\t\t}elseif($p > $v){ // Ponto no separador de decimal e virgula no separador de milhar\n\t\t\t$value = str_replace(\",\", \"\", $value);\n\t\t}\n\t\tif(is_numeric($value)){\n\t\t\treturn $value;\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}", "private function isDecimalCast($cast)\n {\n return 0 === strncmp($cast, 'decimal:', 8);\n }", "public function testGetDataTableDecimalDataType() {\r\n\t\t// Insert border values into database\r\n\t\t$minvalue = '-9999999999999999999.9999999999';\r\n\t\t$maxvalue = '9999999999999999999.9999999999';\r\n\t\t$this->executeQuery('insert into POTEST (UUID, DECIMAL_VALUE) values (\\'testuuid0\\','.$minvalue.')');\r\n\t\t$this->executeQuery('insert into POTEST (UUID, DECIMAL_VALUE) values (\\'testuuid1\\','.$maxvalue.')');\r\n\t\t// Extract datatable\r\n\t\t$datatable = $this->getPersistenceAdapter()->getDataTable('select DECIMAL_VALUE from POTEST order by UUID');\r\n\t\t$datamatrix = $datatable->getDataMatrix();\r\n\t\t// Check strings for correct conversion\r\n\t\t$this->assertEquals($minvalue, $datamatrix[0][0], 'Minimum decimal value is not converted to string as expected.');\r\n\t\t$this->assertEquals($maxvalue, $datamatrix[1][0], 'Maximum decimal value is not converted to string as expected.');\r\n\t}", "public function buyDecimalAmount()\n\t{\n\t\treturn false;\n\t}", "protected function isDecimalCast($cast)\n {\n return strncmp($cast, 'decimal:', 8) === 0;\n }", "private function hasNumFormat() {\n\t\treturn isset($this->options['num_decimals']);\n\t}", "protected function validateFloat($value) {\n if (preg_match(\"/^\\-?[0-9]+\\.?[0-9]*$/\", $value))\n return true;\n $this->setError(t(\"Invalid decimal number\"));\n return false;\n }", "function decimal($number) : float\n{\n\n // return $tmp->trim();\n\n if (0 < \\strlen((string) $number)) {\n $parts = \\explode('.', $number);\n $result = $parts[0];\n\n if (true === isset($parts[1])) {\n if ($r = \\rtrim($parts[1], '0')) {\n $result .= '.' . $r;\n }\n }\n\n return (float) $result;\n }\n\n return 0;\n}", "public function isAmount($data) {\n\t\t$values = array_values($data);\n\t\tif (!isset($values)) {\n\t\t\treturn false;\n\t\t}\n\t\t$value = $values[0];\n\t\tif (preg_match('/^[0-9]{0,23}+(\\.[0-9]{0,' . Configure::read('Account.decimal_places') . '})?$/', $value)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isAmount($data) {\n\t\t$values = array_values($data);\n\t\tif (!isset($values)) {\n\t\t\treturn false;\n\t\t}\n\t\t$value = $values[0];\n\t\tif (preg_match('/^[0-9]{0,23}+(\\.[0-9]{0,' . Configure::read('Account.decimal_places') . '})?$/', $value)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static function decimal($str, $format = NULL)\r\n {\r\n // Create the pattern\r\n $pattern = '/^[0-9]%s\\.[0-9]%s$/';\r\n\r\n if ( ! empty($format))\r\n {\r\n if (count($format) > 1)\r\n {\r\n // Use the format for number and decimal length\r\n $pattern = sprintf($pattern, '{'.$format[0].'}', '{'.$format[1].'}');\r\n }\r\n elseif (count($format) > 0)\r\n {\r\n // Use the format as decimal length\r\n $pattern = sprintf($pattern, '+', '{'.$format[0].'}');\r\n }\r\n }\r\n else\r\n {\r\n // No format\r\n $pattern = sprintf($pattern, '+', '+');\r\n }\r\n\r\n return (bool) preg_match($pattern, (string) $str);\r\n }", "public function hasDecSpeeddf(){\r\n return $this->_has(28);\r\n }", "public function hasDecSpeeddf(){\r\n return $this->_has(25);\r\n }", "public function validFloats() {}", "public function testShouldReturnAmountDecimal(): void\n {\n $transaction = new Transaction(['amount' => '0000000050028']);\n\n self::assertSame('500.28', $transaction->getAmountDecimal());\n }", "function getDecimals(): ?int;", "public function testSaveDataTableDecimalDataType() {\r\n\t\t$minvalue = '-9999999999999999999.9999999999';\r\n\t\t$maxvalue = '9999999999999999999.9999999999';\r\n\t\t// Store datatable\r\n\t\t$datatable = new avorium_core_data_DataTable(2, 2);\r\n\t\t$datatable->setHeader(0, 'UUID');\r\n\t\t$datatable->setHeader(1, 'DECIMAL_VALUE');\r\n\t\t$datatable->setCellValue(0, 0, 'testuuid0');\r\n\t\t$datatable->setCellValue(0, 1, $minvalue);\r\n\t\t$datatable->setCellValue(1, 0, 'testuuid1');\r\n\t\t$datatable->setCellValue(1, 1, $maxvalue);\r\n\t\t$this->getPersistenceAdapter()->saveDataTable('POTEST', $datatable);\r\n\t\t// Read database via SQL\r\n\t\t$results = $this->executeQuery('select DECIMAL_VALUE from POTEST order by UUID');\r\n\t\t// Compare values\r\n\t\t$this->assertEquals($minvalue, $results[0][0], 'Minimum decimal value is not converted from string as expected.');\r\n\t\t$this->assertEquals($maxvalue, $results[1][0], 'Maximum decimal value is not converted from string as expected.');\r\n\t}", "public function is_money($price) {\n return preg_match('/^[0-9]+(\\.[0-9]{0,2})?$/', $price);\n }", "public static function validate_numeric_integer_or_decimal_values($val) { // {{{SYNC-DETECT-PURE-NUMERIC-INT-OR-DECIMAL-VALUES}}}\n\t//--\n\t$val = (string) $val; // do not use TRIM as it may strip out null or weird characters that may inject security issues if not trimmed outside (MUST VALIDATE THE REAL STRING !!!)\n\t//--\n\t$regex_decimal = (string) self::regex_stringvalidation_expression('number-decimal', 'full');\n\t//--\n\tif(((string)$val != '') AND (is_numeric($val)) AND (preg_match((string)$regex_decimal, (string)$val))) { // detect numbers: 0..9 - .\n\t\treturn true; // VALID\n\t} else {\n\t\treturn false; // NOT VALID\n\t} //end if else\n\t//--\n}", "function validarFlotante ($Cad) {\n// prueba si la entrada es un numero de punto flotante, con un signo opcional\nreturn preg_match(\"/^-?([0-9])+([\\.|,]([0-9])*)?$/\", $Cad );\n}", "protected function validateUfloat($value) {\n if (preg_match(\"/^[0-9]+\\.?[0-9]*$/\", $value))\n return true;\n $this->setError(t(\"Invalid positive decimal number\"));\n return false;\n }", "function check_approx_equal_to($num1, $num2, $tolerance=0.1){\r\n //Wide default tolerance due to possible user-side rounding choices\r\n \r\n \r\n $equal = FALSE;\r\n \r\n //echo \"check_approx_equal_to values: $num1 and $num2 <br />\";\r\n \r\n //Ensure that we have floating point numbers\r\n $float1 = floatval($num1);\r\n $float2 = floatval($num2);\r\n \r\n $diff = abs($float1 - $float2);\r\n $avg_mag = abs(($float1 + $float2) / 2.0);\r\n \r\n \r\n \r\n if($diff > (.1 * $avg_mag)){\r\n $equal = FALSE;\r\n }\r\n else{\r\n $equal = TRUE;\r\n }\r\n \r\n return $equal;\r\n }", "function decimales($str, $parms)\n\t{\t\t\n\t\tlist($enteros, $decimales) = explode(\".\", $parms, 2);\n\t\t$this->CI->form_validation->set_message('decimales', \"El campo %s debe contener un valor num&eacute;rico con un m&aacute;ximo de {$enteros} enteros y {$decimales} decimales.\");\n\t\treturn (bool) preg_match( \"/(^\\d{1,$enteros}(\\.\\d{1,$decimales})?$)|^$/\", $str);\n\t}", "public static function validarFlotante($flotante){\n \n $separador = array('options' => array('decimal' => ','));\n \n // si se quiere usar un numero con miles y punto flotante (1.238,32) se usa esta condicion\n // (!filter_var($flotante, FILTER_VALIDATE_FLOAT, array('options' => array('decimal' => ','), 'flags' => FILTER_FLAG_ALLOW_THOUSAND)))\n filter_var($flotante, FILTER_VALIDATE_FLOAT, $separador) ? $resultado = TRUE : $resultado = FALSE;\n return $resultado;\n }", "function is_currency( $v,$round=0 )\r\n{\r\n$v = preg_replace(\"/[^0-9.]+/\",\"\",$v);\r\nreturn round($v,$round);\r\n}", "public function decimalsNotSet()\n {\n $floatFilter = new stubFloatFilter();\n $this->assertEquals(1.564, $floatFilter->execute('1.564'));\n }", "function is_money($field){\n\t\tif(preg_match('/valor/',$field)){\n\t\t\treturn(true);\n\t\t}else{\n\t\t\treturn(false);\n\t\t}\n\t}", "private function numberOfDecimals($value)\n {\n if (!is_string($value)) {\n $value = (string)$value;\n }\n if ((int)$value === $value) {\n return 0;\n } else if (!is_numeric($value)) {\n return false;\n }\n\n if (strrpos($value, '.') === false) {\n return 0;\n }\n return strlen($value) - strrpos($value, '.') - 1;\n }", "public function testGettingCurrencyAsDecimalWithVariousMinorUnits(): void\n {\n self::assertSame('12345', (new Formatter('12345.062', 'JPY'))->decimal());\n self::assertSame('12345.07', (new Formatter('12345.0686', 'AUD'))->decimal());\n self::assertSame('12345.01234569', (new Formatter('12345.012345686', 'XBT'))->decimal());\n\n self::assertSame('-12345.07', (new Formatter('-12345.0686', 'AUD'))->decimal());\n }", "public function hasMoneytype(){\n return $this->_has(15);\n }", "public static function isValueValid($value) : bool\n {\n if (! is_float($value)) {\n return false;\n }\n \n if ($value < -90. || $value > 90.) {\n return false;\n }\n \n // $digits = explode(\".\", (string)(float)$value);\n // var_dump($digits[1] ?? '');\n \n return true;\n }", "function decimal($value) {\n return preg_replace('/\\.0+$/', '', $value);\n }", "function forDecimal($num){\n global $ones,$tens;\n $str=\"\";\n $len = strlen($num);\n if($len==1){\n $num=$num*10;\n }\n $x= $num%100;\n if($x>0){\n if($x<20){\n $str = $ones[$x].' Paise';\n }else{\n $str = $ones[$x/10].$ones[$x%10].' Paise';\n }\n }\n return $str;\n }", "function isNumber ($value)\r\n{\r\n\treturn is_double ($value);\r\n}", "public function hasFixedValue();", "protected function typeDecimal(Magic $column)\n {\n return 'FLOAT';\n }", "public function getIsQtyDecimal() {\n return $this->item->getIsQtyDecimal();\n }", "function est_entier($valeur): bool {\n return is_numeric($valeur);\n}", "public function validarSoloNumeroFloat($var){\n return (preg_match('/^-?(?:\\d+|\\d*\\.\\d+)$/', $var) xor preg_match('/^[0-9]+$', $var));\n }", "static public function is_num($value) {\n\t\treturn preg_match(\"/^-?[0-9]+\\.?[0-9]*$/\",$value);\n\t}", "static public function Decimal($var, $flags = null) {\r\n\t\t\r\n\t\t$cleaned = filter_var($var, FILTER_SANITIZE_NUMBER_FLOAT, $flags | FILTER_FLAG_ALLOW_FRACTION);\r\n\t\treturn $cleaned == \"\" ? false : (float)$cleaned;\r\n\t\t\r\n\t}", "private function test_number($value)\r\n {\r\n $value = str_replace(',', '.', $value);\r\n return is_numeric($value);\r\n }", "protected function type_decimal(Magic $column)\n {\n return 'FLOAT';\n }", "function mDECIMAL_POSITIVE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DECIMAL_POSITIVE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n $n=null;\n\n // Tokenizer11.g:376:3: ( PLUS n= DECIMAL ) \n // Tokenizer11.g:377:3: PLUS n= DECIMAL \n {\n $this->mPLUS(); \n $nStart1303 = $this->getCharIndex();\n $this->mDECIMAL(); \n $n = new CommonToken($this->input, TokenConst::$INVALID_TOKEN_TYPE, TokenConst::$DEFAULT_CHANNEL, $nStart1303, $this->getCharIndex()-1);\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function setIsDecimal($isDecimal)\n {\n $this->isDecimal = $isDecimal;\n return $this;\n }", "protected function type_decimal(Magic $column)\n {\n return 'DECIMAL(' . $column->precision . ', ' . $column->scale . ')';\n }", "public function precio_valido($precio, $precio_minimo) {\n $mensajeAlerta = \"- El precio minimo es \" . $precio_minimo . \".\";\n return $precio < $precio_minimo ? $mensajeAlerta : '';\n }", "public static function validateFloat(TextBase $control)\r\n\t{\r\n\t\tforeach ($control->getValue() as $tag) {\r\n\t\t\tif (!Strings::match($tag, '/^-?[0-9]*[.,]?[0-9]+$/')) {\r\n\t\t\t\treturn FALSE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn TRUE;\r\n\t}", "function is_float_problem() {\n $num1 = 2009010200.01;\n $num2 = 2009010200.02;\n\n return ((string)$num1 === (string)$num2 or $num1 === $num2 or $num2 <= (string)$num1);\n}", "protected function valueContainsPercentage()\n {\n return (preg_match('/%/', $this->condition->value) == 1);\n }", "public static function isFloatingPoint($type) {\n\t\treturn ($type == 'float' || $type == 'double' || $type == 'decimal');\n\t}", "function calc_incentivo($pl, $pma, $pmi, $pj, $pv){\n $pt = $_POST[$pl] + $_POST[$pma] + $_POST[$pmi] + $_POST[$pj] + $_POST[$pv];\n $pp = $pt / 5;\n if($pp >= 100){\n $msg = \"Recibir&aacute; incentivos\";\n }else{\n $msg = \"No recibir&aacute; incentivos\";\n }\n echo $msg;\n }", "private function assertIsValidAmount(float $value)\n {\n return 0 <= $value;\n }", "public function testAmountValidator()\n {\n $this->assertTrue(Validators\\AmountValidator::validateAmount(452.36));\n $this->assertTrue(Validators\\AmountValidator::validateAmount(0.36, 0.1));\n $this->assertFalse(Validators\\AmountValidator::validateAmount(-23.5));\n }", "public function isNum(): bool\n {\n return \\wasm_valtype_is_num($this->inner);\n }", "public function isCatalogBackendIsQtyDecimalVisible()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_CATALOG_DISPLAY_BACKEND_IS_QTY_DECIMAL);\n }", "function mDECIMAL(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DECIMAL;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:352:3: ( ( '0' .. '9' )+ DOT ( '0' .. '9' )* | DOT ( '0' .. '9' )+ ) \n $alt10=2;\n $LA10_0 = $this->input->LA(1);\n\n if ( (($LA10_0>=$this->getToken('48') && $LA10_0<=$this->getToken('57'))) ) {\n $alt10=1;\n }\n else if ( ($LA10_0==$this->getToken('46')) ) {\n $alt10=2;\n }\n else {\n $nvae = new NoViableAltException(\"\", 10, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt10) {\n case 1 :\n // Tokenizer11.g:353:3: ( '0' .. '9' )+ DOT ( '0' .. '9' )* \n {\n // Tokenizer11.g:353:3: ( '0' .. '9' )+ \n $cnt7=0;\n //loop7:\n do {\n $alt7=2;\n $LA7_0 = $this->input->LA(1);\n\n if ( (($LA7_0>=$this->getToken('48') && $LA7_0<=$this->getToken('57'))) ) {\n $alt7=1;\n }\n\n\n switch ($alt7) {\n \tcase 1 :\n \t // Tokenizer11.g:353:4: '0' .. '9' \n \t {\n \t $this->matchRange(48,57); \n\n \t }\n \t break;\n\n \tdefault :\n \t if ( $cnt7 >= 1 ) break 2;//loop7;\n $eee =\n new EarlyExitException(7, $this->input);\n throw $eee;\n }\n $cnt7++;\n } while (true);\n\n $this->mDOT(); \n // Tokenizer11.g:353:19: ( '0' .. '9' )* \n //loop8:\n do {\n $alt8=2;\n $LA8_0 = $this->input->LA(1);\n\n if ( (($LA8_0>=$this->getToken('48') && $LA8_0<=$this->getToken('57'))) ) {\n $alt8=1;\n }\n\n\n switch ($alt8) {\n \tcase 1 :\n \t // Tokenizer11.g:353:20: '0' .. '9' \n \t {\n \t $this->matchRange(48,57); \n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop8;\n }\n } while (true);\n\n\n }\n break;\n case 2 :\n // Tokenizer11.g:354:5: DOT ( '0' .. '9' )+ \n {\n $this->mDOT(); \n // Tokenizer11.g:354:9: ( '0' .. '9' )+ \n $cnt9=0;\n //loop9:\n do {\n $alt9=2;\n $LA9_0 = $this->input->LA(1);\n\n if ( (($LA9_0>=$this->getToken('48') && $LA9_0<=$this->getToken('57'))) ) {\n $alt9=1;\n }\n\n\n switch ($alt9) {\n \tcase 1 :\n \t // Tokenizer11.g:354:10: '0' .. '9' \n \t {\n \t $this->matchRange(48,57); \n\n \t }\n \t break;\n\n \tdefault :\n \t if ( $cnt9 >= 1 ) break 2;//loop9;\n $eee =\n new EarlyExitException(9, $this->input);\n throw $eee;\n }\n $cnt9++;\n } while (true);\n\n\n }\n break;\n\n }\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "function store_parse_decimal($value)\n {\n $point = config_item('store_currency_dec_point');\n $cleaned_value = preg_replace('/[^0-9\\-'.preg_quote($point, '/').']+/', '', $value);\n\n return str_replace($point, '.', $cleaned_value);\n }", "public function testPrecioSmsPorMes() {\n $this->assertEqual( $this->ConteoSms->buscarPrecioSms( 0 ), 0.0, \"No corresponde la cantida devuelta cuando el mes es incorrecto\" );\n $this->assertEqual( $this->ConteoSms->buscarPrecioSms(), 0.0, \"No corresponde la cantida devuelta cuando el mes es nulo\" );\n $this->assertLessThanOrEqual( 1.4, $this->ConteoSms->buscarPrecioSms( date( 'n' ) ), \"No corresponde el precio pasado en este mes\" );\n $this->assertLessThanOrEqual( 10.1, $this->ConteoSms->buscarPrecioSms( date( 'n' )-1 ), \"No corresponde el precio respecto al mes anterior\" );\n $this->assertLessThanOrEqual( 0.0, $this->ConteoSms->buscarPrecioSms( date( 'n' )-2 ), \"No corresponde el precio respecto al 2 meses antes\" );\n }", "public static function numeric($str)\r\n {\r\n // Use localeconv to set the decimal_point value: Usually a comma or period.\r\n $locale = localeconv();\r\n return (bool) preg_match('/^-?[0-9'.$locale['decimal_point'].']++$/D', (string) $str);\r\n }", "public function showPricePerMonth() {\n $prijsPerMaand = Mage::getStoreConfig('santander/general/prijs_maand');\n if($prijsPerMaand) {\n return true;\n } else {\n return false;\n }\n }", "function isValidMachineUsePrice($machineUsePrice) {\n\tif(is_numeric($machineUsePrice) && $machineUsePrice > 0)\n\t\treturn true;\n\treturn false;\n}", "public function hasPrice(){\n return $this->_has(12);\n }", "public function hasPrice()\n {\n return $this->amount_month || $this->amount_year;\n }", "function convertir($devisefrom, $montant)\n\n//verifie sie le montant est numerique sinon il me faut un nombre\n\n{\n\n if(!is_numeric(($montant))) return 'il me faut un nombre';\n if($devisefrom = \"EUR\"){\n $total=$montant*1.15023; //1 EUR =1,15023USD\n }\n else {\n $total=$montant*0.869310; //1 USD = 0,869310 EUR\n }\n return ($total);\n}", "protected static function isValidValue($value, $decimal_separator = NULL) {\n if (!empty($value) && is_numeric($value)) {\n return TRUE;\n }\n\n return FALSE;\n }", "protected function hasExponent() {}", "function value_numeric($value){\r\n\t$value = trim($value);\r\n\t$v = strpos($value, \",\");\r\n\t$p = strpos($value, \".\");\r\n\tif($v === FALSE && $p === FALSE){ // Valor inteiro sem separador de decimal e milhar (nao precisa de tratamento)\r\n\t}elseif($v !== FALSE && $p === FALSE){ // Virgula no separador decimal e sem separador de milhar\r\n\t\t$value = str_replace(\",\", \".\", $value);\r\n\t}elseif($v === FALSE && $p !== FALSE){ // Ponto no separador de decimal e sem separador de milhar (nao precisa de tratamento)\r\n\t}elseif($v > $p){ // Virgula no separador de decimal e ponto no separador de milhar\r\n\t\t$value = str_replace(\".\", \"\", $value);\r\n\t\t$value = str_replace(\",\", \".\", $value);\r\n\t}elseif($p > $v){ // Ponto no separador de decimal e virgula no separador de milhar\r\n\t\t$value = str_replace(\",\", \"\", $value);\r\n\t}\r\n//\tif((string)(float) $value == $value){\r\n\tif(is_numeric($value)){\r\n\t\tif(strcmp($value, round($value)) == 0 && $value < 2147483647){\r\n\t\t\t$value = (int) $value;\r\n\t\t}else{\r\n\t\t\t$value = (float) $value;\r\n\t\t}\r\n\t\treturn $value;\r\n\t}else{\r\n\t\treturn NULL;\r\n\t}\r\n}", "public function testLinearInterpolation1DecimalPoint()\n {\n $calculator = new FeeCalculator();\n\n $application = new LoanApplication(24, 2750.4);\n\n $fee = $calculator->calculate($application);\n\n // Fee = 119.6, Amount = 2750.4, Total = 2870\n $this->assertEquals(119.6, $fee);\n }", "public function invalidFloats() {}", "public function hasRealPrice(){\n return $this->_has(21);\n }", "public function testCustomPrecision()\n {\n $cases = [\n '0.01' => '1%',\n '0.1' => '10%',\n '1' => '100%',\n '1.5' => '150%',\n '1.05' => '105%',\n '1.0500' => '105%'\n ];\n\n foreach ($cases as $original => $expected) {\n $percentage = new DBPercentage('Probability', 2);\n $percentage->setValue($original);\n $this->assertEquals($expected, $percentage->Nice());\n }\n }", "function numdecim($stringa) {\n$arr_stringa = explode(\".\",$stringa);\n$parte_int = $arr_stringa[0];\n$parte_decim = $arr_stringa[1];\n$num_fin = $parte_int.\",\".$parte_decim;\nreturn $num_fin;\n}", "function covertirNumLetras()\r\n{\r\n\r\n\t$number = $this->monto;\r\n\r\n\t//number = number_format (number, 2);\r\n $number1=$number;\r\n\r\n\r\n //settype (number, \"integer\");\r\n $cent = strpos($number1,\".\");\r\n\r\n if($cent > 0){\r\n\t\r\n\t$centavos = substr($number1,$cent+1,2);\r\n\t\r\n }else{\r\n\r\n \t$centavos = \"00\";\r\n\t\r\n\t}\r\n\t/* \r\n\t $cent = split(\".\",$number1,7); \r\n\r\n\t\techo $cent[4];\r\n\t\texit();\r\n\r\n\t $centavos = $cent[1];\r\n\r\n\t if ($centavos == 0 || empty($centavos)){\r\n\t \t$centavos = \"00\";\r\n\t }\r\n\t*/\r\n\t/*\r\n\t \r\n\t if (number == 0 || number == \"\") \r\n\t { // if amount = 0, then forget all about conversions, \r\n\t centenas_final_string=\" cero \"; // amount is zero (cero). handle it externally, to \r\n\t // function breakdown \r\n\t } \r\n\t else \r\n\t { \r\n \r\n \r\n\r\n\t \r\n millions = ObtenerParteEntDiv(number, 1000000); // first, send the millions to the string \r\n number = mod(number, 1000000); // conversion function \r\n \r\n\t alert(millions);\r\n\t \r\n if (millions != 0)\r\n { \r\n // This condition handles the plural case \r\n if (millions == 1) \r\n { // if only 1, use 'millon' (million). if \r\n descriptor= \" millon \"; // > than 1, use 'millones' (millions) as \r\n } \r\n else \r\n { // a descriptor for this triad. \r\n descriptor = \" millones \"; \r\n } \r\n } \r\n else \r\n { \r\n descriptor = \" \"; // if 0 million then use no descriptor. \r\n } \r\n millions_final_string = string_literal_conversion(millions)+descriptor; \r\n */ \r\n\r\n\r\n $thousands = $this->ObtenerParteEntDiv($number, 1000); // now, send the thousands to the string \r\n $number = fmod($number, 1000); // conversion function. \r\n //print \"Th:\".thousands;\r\n if ($thousands != 1) \r\n { // This condition eliminates the descriptor \r\n $thousands_final_string = $this->string_literal_conversion($thousands) . \" mil \"; \r\n // descriptor = \" mil \"; // if there are no thousands on the amount \r\n } \r\n if ($thousands == 1)\r\n {\r\n $thousands_final_string = \" mil \"; \r\n }\r\n if ($thousands < 1) \r\n { \r\n $thousands_final_string = \" \"; \r\n } \r\n \r\n // this will handle numbers between 1 and 999 which \r\n // need no descriptor whatsoever. \r\n\r\n\r\n $centenas = $number; \r\n $centenas_final_string = $this->string_literal_conversion($centenas) ; \r\n \r\n\t// } //end if (number ==0) \r\n\r\n /*if (ereg(\"un\",centenas_final_string))\r\n {\r\n centenas_final_string = ereg_replace(\"\",\"o\",centenas_final_string); \r\n }*/\r\n //finally, print the output. \r\n\r\n /* Concatena los millones, miles y cientos*/\r\n\r\n\r\n $cad = $thousands_final_string.$centenas_final_string; \r\n \r\n /* Convierte la cadena a Mayúsculas*/\r\n $cad = strtoupper($cad); \r\n\r\n\r\n\r\n\t/*\r\n\t if (strlen($centavos) > 2)\r\n\t { \r\n\t if(substr($centavos.substring,2,3) >= 5){\r\n\t $centavos = substr($centavos,0,1).(parseInt(centavos.substring(1,2)).1).toString();\r\n\t }else{\r\n\t centavos = centavos.substring(0,2);\r\n\t }\r\n\t }\r\n\r\n\t*/\r\n\r\n\r\n if (strlen($centavos) == 1)\r\n {\r\n $centavos = $centavos.\"0\";\r\n }\r\n $centavos = $centavos. \"/100\"; \r\n\r\n\r\n if ($number == 1)\r\n {\r\n $moneda = \" PESO \"; \r\n }\r\n else\r\n {\r\n $moneda = \" PESOS \"; \r\n }\r\n \r\n /* Regresa el número en cadena entre paréntesis y con tipo de moneda y la fase M.N.*/\r\n\r\n return $cad.$moneda.\" \".$centavos.\" M.N.\";\r\n \r\n}", "function valor_extenso($valor=0, $maiusculas=false)\n{\n if (strpos($valor,\",\") > 0)\n {\n // retira o ponto de milhar, se tiver\n $valor = str_replace(\".\",\"\",$valor);\n \n // troca a virgula decimal por ponto decimal\n $valor = str_replace(\",\",\".\",$valor);\n }\n$singular = array(\"centavo\", \"real\", \"mil\", \"milhao\", \"bilhao\", \"trilhao\", \"quatrilhao\");\n$plural = array(\"centavos\", \"reais\", \"mil\", \"milhoes\", \"bilhoes\", \"trilhoes\",\n\"quatrilhões\");\n \n$c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\n\"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n$d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\n\"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n$d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\n\"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n$u = array(\"\", \"um\", \"dois\", \"tres\", \"quatro\", \"cinco\", \"seis\",\n\"sete\", \"oito\", \"nove\");\n \n $z=0;\n \n $valor = number_format($valor, 2, \".\", \".\");\n $inteiro = explode(\".\", $valor);\n\t\t$cont=count($inteiro);\n\t\t for($i=0;$i<$cont;$i++)\n for($ii=strlen($inteiro[$i]);$ii<3;$ii++)\n $inteiro[$i] = \"0\".$inteiro[$i];\n \n $fim = $cont - ($inteiro[$cont-1] > 0 ? 1 : 2);\n for ($i=0;$i<$cont;$i++) {\n $valor = $inteiro[$i];\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n \n $r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd &&\n$ru) ? \" e \" : \"\").$ru;\n $t = $cont-1-$i;\n $r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n if ($valor == \"000\")$z++; elseif ($z > 0) $z--;\n if (($t==1) && ($z>0) && ($inteiro[0] > 0)) $r .= (($z>1) ? \" de \" : \"\").$plural[$t];\n if ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) &&\n($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n }\n \n if(!$maiusculas)\n\t\t {\n return($rt ? $rt : \"zero\");\n } elseif($maiusculas == \"2\") {\n return (strtoupper($rt) ? strtoupper($rt) : \"Zero\");\n } else {\n return (ucwords($rt) ? ucwords($rt) : \"Zero\");\n }\n \n}", "public function validarSumaPorcentajes($dataEspacios)\n {\n $suma = 0;\n foreach ($dataEspacios as $key => $value) {\n $suma += $value['valor'];\n }\n\n if ($suma === 100) {\n return true;\n }else{\n return false;\n }\n }", "function real($num, $ponto = null) {\n\t\t\t\tif ($ponto) {\n\t\t\t\t\t$ponto = \".\";\n\t\t\t\t\t$ponto2 = \",\";\n\t\t\t\t} else {\n\t\t\t\t\t$ponto = \",\";\n\t\t\t\t\t$ponto2 = \".\";\n\t\t\t\t}\n\t\t\t\t$stringAtnes = explode($ponto2, $num);\n\t\t\t\t$stringAntes = strlen($stringAtnes[0]);\n\t\t\t\t$num = substr($num, 0, $stringAntes + 3);\n\t\t\t\t//$num= round($num,2);\n\t\t\t\tif ($num) {\n\t\t\t\t\t$num = str_replace(\".\", $ponto, $num);\n\t\t\t\t\tif (strstr($num, $ponto) == false) {\n\t\t\t\t\t\t$num .= $ponto . \"00\";\n\t\t\t\t\t}\n\t\t\t\t\t$check = explode($ponto, $num);\n\t\t\t\t\tif (strstr($num, $ponto) == true and strlen($check[1]) < 2) {\n\t\t\t\t\t\t$num .= \"0\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$num = \"00\" . $ponto . \"00\";\n\t\t\t\t}\n\n\t\t\t\treturn $num;\n\t\t\t}", "private static function validateAmount($amount): bool\n {\n $floatAmount = (float) $amount;\n\n return $floatAmount > 0;\n }", "public function isFixedPointNumber(): bool;", "private function to_zruth_decimal($dec) {\n return str_replace('.', ',', $dec);\n }", "protected function isValidDotNotation($value) {\n\t\treturn preg_match('/^-?(\\.\\d+|\\d+\\.)$/', $value);\n\t}", "private function assertIsValidPercentage(float $value)\n {\n return 0 <= $value && Reduction::MAX_ALLOWED_PERCENTAGE >= $value;\n }", "function Cantidades_sd($valor){\t\n\n return number_format($valor,0,',','.');\n\n}", "public function setPrecioCompra ($precio_compra)\n\t{\n\t\tif (is_numeric($precio_compra))\n\t\t{\n\t\t\t$this->precio_compra = $precio_compra;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function _checkCDV($number) \n {\n $cdv = intval(substr($number, -1));\n $digits = strlen($number)-1;\n $weights = array(9, 7, 3, 1);\n $sum = 0;\n for ($i = 0; $i < $digits; $i++) {\n $sum += $weights[$i % 4] * intval(substr($number, $i, 1));\n }\n return (((10 - ($sum % 10)) % 10) == $cdv); \n }", "public function isFree()\n {\n return ((float) $this->price <= 0.00);\n }", "public function calculateValuation(): bool\n {\n return 0;\n }", "public function testDecimalPort()\n {\n $this->client->configure(array(\n 'port' => 1.24,\n ));\n }", "function test_entier($valeur){\r\n return ($valeur>0 || $valeur==\"0\");\r\n}", "public function checkFloat($value)\n {\n return $this->checkHasType($value, 'double');\n }", "public function test_validate_deposit()\n {\n $amount = 5000;\n $deposit = $this->obj->validate_deposit($amount);\n $this->assertLessThanOrEqual(40000,$amount);\n $this->assertTrue($deposit);\n }", "function isFloat($field, $msg, $inner=FALSE){\n\t\t$value = $this->_getValue($field);\n\t\tif(!is_float($value)){\n\t\tif($inner==FALSE){\n $this->_errorList[] = array(\"field\" => $field,\n\t\t\"value\" => $value, \"msg\" => $msg);\n\t\treturn false;\n }else{\n return false;\n }\n\t\t\n\t\t}else{\n\t\treturn true;\n\t\t}\n\t}" ]
[ "0.72571033", "0.66567105", "0.66440564", "0.65958655", "0.65188366", "0.64843667", "0.6460818", "0.6015678", "0.6007987", "0.59609187", "0.59336364", "0.586818", "0.5811101", "0.58083457", "0.57474077", "0.5738632", "0.56050223", "0.56050223", "0.5595157", "0.5590398", "0.5576523", "0.5563798", "0.55434716", "0.5524178", "0.55012745", "0.5489579", "0.546808", "0.54596937", "0.54541796", "0.539793", "0.53927046", "0.5382101", "0.53446", "0.5344315", "0.53127915", "0.5309388", "0.5249137", "0.5232855", "0.5230049", "0.52105224", "0.5184415", "0.5176339", "0.5170496", "0.51670045", "0.5161633", "0.5160435", "0.5152807", "0.51396537", "0.513921", "0.5138481", "0.5138097", "0.51363605", "0.51247144", "0.50914246", "0.50912297", "0.5077872", "0.5037897", "0.5008245", "0.5003806", "0.49775422", "0.49700618", "0.49696237", "0.49470666", "0.4935817", "0.49328575", "0.4911214", "0.49105445", "0.49105442", "0.49100888", "0.49042708", "0.48923823", "0.48746347", "0.4863383", "0.4861567", "0.48555058", "0.48465624", "0.4845916", "0.48283225", "0.4819839", "0.48194164", "0.48153916", "0.48096153", "0.48011196", "0.47985473", "0.4796902", "0.4796655", "0.4791658", "0.47873", "0.47792634", "0.47698116", "0.476562", "0.4761295", "0.47602874", "0.4756869", "0.47565886", "0.47562093", "0.47561827", "0.4755438", "0.47543418", "0.47528547" ]
0.83072335
0
Retourner le solde du compte client
function getSoldeCpte($id_cpte) { global $dbHandler; global $global_id_agence; $db = $dbHandler->openConnection(); $sql = "SELECT solde "; $sql .= "FROM ad_cpt "; $sql .= "WHERE id_ag = $global_id_agence AND id_cpte = $id_cpte "; $result=$db->query($sql); if (DB::isError($result)) { $dbHandler->closeConnection(false); signalErreur(__FILE__,__LINE__,__FUNCTION__); } $row = $result->fetchrow(); $solde = $row[0]; $dbHandler->closeConnection(true); return $solde; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCliente();", "public function getSoldeClient($idClient) {\n return $this->clientManager->getSolde($idClient);\n }", "public function getClient() {}", "function afficherclient()\r\n\t{\r\n\t\t$sql=\"SElECT * From user\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry\r\n\t\t{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e)\r\n {\r\n die('Erreur: '.$e->getMessage());\r\n }\r\n\t}", "public function getClient();", "public function getClient();", "public function getClient()\r\n {\r\n \t$this->db->from('vclient');\r\n \t$query = $this->db->get();\r\n \treturn $query->result();\r\n\r\n }", "private function get_client() {\n\t\treturn $this->client;\n\t}", "private function get_client() {\n\t\treturn $this->client;\n\t}", "private function get_client() {\n\t\treturn $this->client;\n\t}", "public function clientDetailByName() {\n\t\ttry {\n\n\t\t\t$name = Request::input('client_name');\n\n\t\t\t$client = ConnectContentClient::clientExists(\\Auth::User()->station->id, $name);\n\n\t\t\tif (!$client) {\n\t\t\t\tthrow new \\Exception('Client not found.');\n\t\t\t}\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => $client->getJSONArrayListForClientDetail()));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "public function client()\n {\n return $this->client;\n }", "public function getClient(){ return UserData::getById($this->client_id); }", "function afficherclientfideless(){\n\t\t$sql=\"SElECT * From clientfideles\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function List_client_Physique(){\n $req = self::list(\"SELECT * FROM client_physique\");\n return $req;\n }", "public function getClient()\n {\n return $this->neo;\n }", "public function TresorieClient() {\n \n $em = $this->getDoctrine()->getManager();\n $entityClient = $em->getRepository('RuffeCardUserGestionBundle:Client')->findClientNoPaiment();\n return $this->render ( \"RuffeCardTresorieBundle:Default:clientPaiement.html.twig\", array ('Client'=>$entityClient));\n \n }", "function getClient() {\n return $this -> _client;\n }", "public function get_client()\n\t{\n\t\t$return = $this->client;\n\n\t\tif (count($args = func_get_args()) >= 1) \n\t\t{\n\t\t\tisset($args[0]) && is_array($args[0]) && $args = $args[0];\n\t\t\t$_return = array();\n\t\t\tforeach ($args as $arg)\n\t\t\t{\n\t\t\t\tif (isset($return[$arg]))\n\t\t\t\t{\n\t\t\t\t\t$_return[$arg] = $return[$arg];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tempty($_return) OR $return = $_return;\n\t\t\tunset($_return);\n\t\t}\n\t\treturn $return;\n\t}", "function PKG_getClientbyPackageID($id)\n{\n\treturn(PKG_getInfoFromPackageID($id,\"client\"));\n}", "public function getCodigoClient()\n {\n return $this->codigo_client;\n }", "public function cliente_get(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t//validar el cliente id\n\t\tif (!isset($cliente_id)) {\n\t\t\t$respuesta = array(\n\t\t\t\t'err'=>TRUE,\n\t\t\t\t'mensaje'=>'Es necesario el id del cliente'\n\t\t\t);\n\n\t\t\t$this->response($respuesta, REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\n\t\t//lo paso al modelo\n\t\t$cliente = $this->Cliente_model->get_cliente($cliente_id);\n\n\t\t//cargo, valido y lo devuelto para que se muestre\n\t\tif(isset($cliente)){\n\t\t\t$respuesta=array(\n\t\t\t\t'err'=>FALSE,\n\t\t\t\t'mensaje'=>'Registro cargado correctamente',\n\t\t\t\t'cliente'=>$cliente\n\t\t\t);\n\n\t\t\t$this->response($respuesta);\n\t\t}else{\n\t\t\t$respuesta=array(\n\t\t\t\t'err'=>TRUE,\n\t\t\t\t'mensaje'=>'El registro con el id '.$cliente_id.', no exste',\n\t\t\t\t'cliente'=>null\n\t\t\t);\n\t\t\t$this->response($respuesta, REST_Controller::HTTP_NOT_FOUND);\n\t\t}\n\t}", "public function getcliente() {\n \n $procedure = \"call sp_appweb_pt_getclienteinterno()\";\n\t\t$query = $this->db-> query($procedure);\n \n if ($query->num_rows() > 0) {\n\n $listas = '<option value=\"0\" selected=\"selected\"></option>';\n \n foreach ($query->result() as $row)\n {\n $listas .= '<option value=\"'.$row->CCLIENTE.'\">'.$row->RAZONSOCIAL.'</option>'; \n }\n return $listas;\n }{\n return false;\n }\t\n }", "public function getClient() {\n\t\treturn $this->service; \n\t}", "public function getCliente()\n {\n return $this->cliente;\n }", "public function getClient() {\n return $this->_get( 'client' );\n }", "function Listar_Clientes()\n\t {\n\t\tlog_message('INFO','#TRAZA| CLIENTES | Listar_Clientes() >> ');\n\t\t$data['list'] = $this->Clientes->Listar_Clientes();\n return $data;\n\t }", "public function client()\n {\n return $this->client;\n }", "public function getClient(): string\n {\n return $this->client;\n }", "function afficherU(){\n $sql=\"SElECT * From client\";\n $db = config::getConnexion();\n try{\n $liste=$db->query($sql);\n return $liste;\n }\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n } \n }", "public function getNomClient() {\n return $this->nomClient;\n }", "public function get_compte(){retrun($id_local_compte); }", "public function getcliente()\r\n {\r\n return $this->cliente;\r\n }", "abstract public function getClientInformation();", "public function setCompte() {\n $id = Session::get('id');\n $identite = Request::input('identite');\n $adresse = Request::input('adresse');\n $login = Request::input('login');\n $pwd = Request::input('pwd');\n $id_categorie = Request::input('cbCategorie');\n\n\n $client = new Client();\n try{\n $client->updateClient($id, $identite, $adresse, $login, $pwd, $id_categorie);\n\n } catch (Exception $ex) {\n return $this->getCompte($erreur = '');\n }\n return redirect('/');\n\n }", "public static function getClient($id){\r\n if(!empty($_GET['id'])){\r\n $id = $_GET['id'];\r\n }\r\n $dados = Client::select()->where('id', $id)->one();\r\n // print_r($dadosFun);exit;\r\n \r\n // transformar o resultado em objetos dos models\r\n if(count($dados) > 0){\r\n $viewClient = new Client();\r\n $viewClient->id = $dados['id'];\r\n $viewClient->email = $dados['email'];\r\n $viewClient->name = $dados['name'];\r\n $viewClient->service = $dados['service'];\r\n $viewClient->phone = $dados['phone'];\r\n $viewClient->comment = $dados['comment'];\r\n $viewClient->rg = $dados['rg'];\r\n $viewClient->cpf = $dados['cpf'];\r\n $viewClient->photo_client = $dados['photo_client'];\r\n $viewClient->extract = $dados['extract'];\r\n $viewClient->residence = $dados['residence'];\r\n $viewClient->mirror = $dados['mirror'];\r\n $viewClient->printzap = $dados['printzap'];\r\n $viewClient->id_user = $dados['id_user'];\r\n $viewClient->name_user = $dados['name_user'];\r\n\r\n return $viewClient;\r\n }\r\n }", "public function client()\n {\n $data= Client::get();\n $services= Service::get();\n return view('admin/client',compact('data','services'));\n }", "public function getClientes_idclient(){\n return $this->clientes_idclient;\n }", "public function &getClient()\n\t{\n\t\treturn $this->_client;\n\t}", "function listarClienteLibro()\n {\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='REC_RELIBRO_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setParametro('id_oficina_registro_incidente','id_oficina_registro_incidente','integer');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\n $this->setCount(false);\n\n $this->captura('id_reclamo','int4');\n $this->captura('nro_frd','varchar');\n $this->captura('correlativo_preimpreso_frd','int4');\n $this->captura('fecha_hora_incidente','timestamp');\n $this->captura('fecha_hora_recepcion','timestamp');\n $this->captura('fecha_hora_recepcion_sac','date');\n $this->captura('detalle_incidente','text');\n $this->captura('nombre','text');\n $this->captura('celular','varchar');\n $this->captura('telefono','varchar');\n $this->captura('nombre_incidente','varchar');\n $this->captura('sub_incidente','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\t\t//var_dump($this->respuesta); exit;\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n\n }", "public static function getClient() {\n return self::$client;\n }", "function _ConsultarClientes()\n\t\t{\n\t\t\t$query='\n\t\t\t\tSELECT\n\t\t\t\tclientes.id,\n\t\t\t\tclientes.nb_cliente,\n\t\t\t\tclientes.nb_apellidos,\n\t\t\t\tclientes.de_email,\n\t\t\t\tclientes.num_celular,\n\t\t\t\tusuarios.nb_nombre as \"Ins_nombre\", \n\t\t\t\tusuarios.nb_apellidos as \"Ins_apellido\" \n\t\t\t\tFROM sgclientes clientes\n\t\t\t\tleft join sgusuarios usuarios on clientes.id_usuario_registro=usuarios.id\n\t\t\t\twhere clientes.sn_activo=1\n\t\t\t\tORDER BY clientes.id ASC\n\t\t\t\n\t\t\t';\n\t\t\t$clientes = $this->EjecutarTransaccionAllNoParams($query);\n\t\t\treturn $clientes;\n\t\t}", "public function getAplicarDescontoCliente()\n {\n return $this->aplicar_desconto_cliente;\n }", "function afficherclients(){\r\n\t\t$sql=\"SElECT * From clients\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "public function getNom_client()\n {\n return $this->nom_client;\n }", "public function getBtcPayClient();", "function getClient()\n {\n ini_set(\"soap.wsdl_cache_enabled\", \"0\");\n $client = new SoapClient(\"http://smeapps.mobitel.lk:8585/EnterpriseSMSV3/EnterpriseSMSWS?wsdl\");\n return $client;\n }", "public function client()\n {\n if ( ! $this->bean->fetchAs('person')->client) $this->bean->client = R::dispense('person');\n return $this->bean->fetchAs('person')->client;\n }", "public function getClient()\n\t{\n\t\treturn $this->_client;\n\t}", "public function getClient() {\n return $this->client;\n }", "public function getClient() {\n return $this->client;\n }", "public function getClient() {\n return $this->client;\n }", "function getNomClient($id_client) {\n global $dbHandler, $global_id_agence;\n $db = $dbHandler->openConnection();\n \n $sql = \"SELECT statut_juridique, pp_nom, pp_prenom, pm_raison_sociale, gi_nom FROM ad_cli WHERE id_client=$id_client and id_ag = $global_id_agence\";\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n }\n if ($result->numrows() != 1) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, _(\"Nombre d'occurences différent de 1 !\"));\n }\n $row = $result->fetchrow(DB_FETCHMODE_ASSOC);\n switch ($row['statut_juridique']) {\n case 1 : //PP\n $nom = $row['pp_prenom'] . \" \" . $row['pp_nom'];\n break;\n case 2 : //PM\n $nom = $row['pm_raison_sociale'];\n break;\n case 3 : //GI\n $nom = $row['gi_nom'];\n case 4 : //GS\n $nom = $row['gi_nom'];\n break;\n default : //Autre\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, _(\"Statut juridique inconnu !\"));\n break;\n }\n $dbHandler->closeConnection(true);\n return $nom;\n}", "function obtenidcliente($rfc){\n\t$funcbase = new dbutils;\n/*** conexion a bd ***/\n $mysqli = $funcbase->conecta();\n if (is_object($mysqli)) {\n\t\t$req = \"SELECT idclientes FROM clientes WHERE rfc = '\" \n \t.$rfc.\"'\"; \n \n \t\t$idcliente = $mysqli->query($req)->fetch_object()->idclientes;\n } else {\n die (\"<h1>'No se establecio la conexion a bd'</h1>\");\n }\n\t\t\n /* liberar la serie de resultados */\n /* cerrar la conexion */\n\t mysqli_close($mysqli);\n\t\t\n\treturn $idcliente;\n}", "public function get_clients(){\n\t\treturn $this->clients;\n\t}", "public function CarregaClientes() {\n\t\t$clientes = new Model_Wpr_Clientes_ClientesIntegracao ();\n\t\t\n\t\treturn $clientes->carregaClientes ();\n\t}", "function return_oneClientByName($mel)\n{\n if (strlen($mel) > 0) {\n return getOne(utf8_encode($mel), \"bav_client\", \"cli_nom\");\n }\n}", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getClient($id) {\n $objClient = new Base_Model_Lib_Client_Entity_Client ( );\n $objCurrencyService = new Base_Model_Lib_Catelog_Service_Currency();\n $objPaymentMethodService = new Base_Model_Lib_Catelog_Service_PaymentMethod();\n $objCountryService = new Base_Model_Lib_Catelog_Service_Country();\n try {\n\n $id = (int) $id;\n $row = $this->fetchRow('id = ' . $id);\n\n if ($row != \"\") {\n $result = $row->toArray();\n $objClient->setId($result['id']);\n $objClient->setFirstname($result['firstname']);\n $objClient->setLastname($result['lastname']);\n $objClient->setCompanyname($result['companyname']);\n $objClient->setEmail($result['email']);\n $objClient->setAddress1($result['address1']);\n $objClient->setAddress2($result['address2']);\n $objClient->setCity($result['city']);\n $objClient->setState($result['state']);\n $objClient->setPostcode($result['postcode']);\n $objClient->setCountry($objCountryService->getItem($result['country']));\n $objClient->setPhonenumber($result['phonenumber']);\n $objClient->setPassword($result['password']);\n $objClient->setCurrency($objCurrencyService->getItem($result['currency']));\n $objClient->setDefaultgateway($objPaymentMethodService->getItem($result['defaultgateway']));\n $objClient->setCredit($result['credit']);\n $objClient->setTaxexempt($result['taxexempt']);\n $objClient->setLatefeeoveride($result['latefeeoveride']);\n $objClient->setOverideduenotices($result['overideduenotices']);\n $objClient->setSeparateinvoices($result['separateinvoices']);\n $objClient->setDisableautocc($result['disableautocc']);\n $objClient->setDatecreated($result['datecreated']);\n $objClient->setNotes($result['notes']);\n $objClient->setBillingcid($result['billingcid']);\n $objClient->setSecurityqid($result['securityqid']);\n $objClient->setSecurityqans($result['securityqans']);\n $objClient->setGroupid($result['groupid']);\n $objClient->setCardtype($result['cardtype']);\n $objClient->setCardlastfour($result['cardlastfour']);\n $objClient->setCardnum($result['cardnum']);\n $objClient->setStartdate($result['startdate']);\n $objClient->setExpdate($result['expdate']);\n $objClient->setIssuenumber($result['issuenumber']);\n $objClient->setBankname($result['bankname']);\n $objClient->setBanktype($result['banktype']);\n $objClient->setBankcode($result['bankcode']);\n $objClient->setBankacct($result['bankacct']);\n $objClient->setGatewayid($result['gatewayid']);\n $objClient->setLastlogin($result['lastlogin']);\n $objClient->setIp($result['ip']);\n $objClient->setHost($result['host']);\n $objClient->setStatus($result['status']);\n $objClient->setLanguage($result['language']);\n $objClient->setPwresetkey($result['pwresetkey']);\n $objClient->setPwresetexpiry($result['pwresetexpiry']);\n }\n } catch (Exception $e) {\n throw new Base_Model_Lib_Eav_Exception_Sql(\"<strong>Oops !, Error Class name -</strong> <em>Base_Model_Lib_Client_Dao_Client</em>, <strong>Function -</strong> <em>getClient()</em>, <strong>Exception -</strong> <em>\" . $e->getMessage() . \"</em>\");\n }\n return $objClient;\n }", "public function client( $key = null ) {\n\n\t\t// check if we already set the client object\n\t\tif ( is_null( $this->client ) ) \n\t\t{\n\t\t\t// make client \n\t\t\t$this->client = new \\stdClass;\n\n\t\t\t/*\n\t\t\t * get clients ip address\n\t\t\t */\n\t\t\t// Cloudlfare fix \n\t\t\tif ( $this->has_server( 'HTTP_CF_CONNECTING_IP' ) ) \n\t\t\t{\n\t\t\t\t$this->client->ip = $this->server( 'HTTP_CF_CONNECTING_IP' );\n\t\t\t}\n\t\t\t// proxy?\n\t\t\telseif ( $this->has_server( 'HTTP_X_FORWARDED_FOR' ) ) \n\t\t\t{\n\t\t\t\t$this->client->ip = $this->server( 'HTTP_X_FORWARDED_FOR' );\n\t\t\t} \n\t\t\t// another proxy?\n\t\t\telseif ( $this->has_server( 'HTTP_CLIENT_IP' ) )\n\t\t\t{\n\t\t\t\t$this->client->ip = $this->server( 'HTTP_CLIENT_IP' );\n\t\t\t}\n\t\t\t// or default\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->client->ip = $this->server( 'REMOTE_ADDR', '127.0.0.1' );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * set clients user agent\n\t\t\t */\n\t\t\t$this->client->agent = $this->server( 'HTTP_USER_AGENT', '' );\n\n\t\t\t/*\n\t\t\t * set clients port\n\t\t\t */\n\t\t\t$this->client->port = $this->server( 'REMOTE_PORT', '' );\n\n\t\t\t/*\n\t\t\t * set clients fingerprint based on host and agent\n\t\t\t */\n\t\t\t$this->client->fingerprint = CCStr::hash( $this->client('agent').$this->client('ip') );\n\n\t\t\t/*\n\t\t\t * set clients language\n\t\t\t */\n\t\t\t$this->client->language = CCLang::set_current( $this->server( 'HTTP_ACCEPT_LANGUAGE' ) );\n\t\t}\n\n\t\t// return the object\n\t\tif ( is_null( $key ) ) \n\t\t{\n\t\t\treturn $this->client;\n\t\t}\n\n\t\t// return a special key\n\t\treturn $this->client->{$key};\n\t}", "protected function getClient()\n {\n return $this->minionClient;\n }", "public function getConnection(): Client;", "public static function client(){\n\t\tif(!self::$client){\n\t\t\tself::$client = new self();\n\t\t}\n\t\treturn self::$client;\n\t}", "public function getClient()\n {\n return $this->ossClient;\n }", "static public function ctrRutaServidor(){\n\n\t\treturn \"https://backend.teamblack4ever.com/\";\n\t\n\t}", "public function getClient()\n\t{\n\t\tif (!isset($this->_r_client)) {\n\t\t\t$filters = [];\n\t\t\tif(!is_null($v = $this->getUserId())){\n\t\t\t\t$filters['user_id'] = $v;\n\t\t\t}\n\t\t\tif (empty($filters)){\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$m = new OZUsersControllerRealR();\n\t\t\t$this->_r_client = $m->getItem($filters);\n\t\t}\n\n\t\treturn $this->_r_client;\n\t}", "public function get_commande_client($id)\n {\n \n if ($id > 0) {\n $this->db->select('commande.*, client.clientId, client.nomClient');\n $this->db->from('commande');\n $this->db->join('client', 'client.clientId = commande.fk_clientId');\n $this->db->where('client.clientId', $id);\n $query = $this->db->get();\n return $query->result_array();\n }\n }", "public static function getClient($id){\n return (new Database('cliente'))->select('id = '.$id)->fetchObject(self::class);\n }", "function getComienzaCon(){\n\t\treturn $this->comienza_con;\n\t}", "function getClient() {\r\n require_once JPSPAN . 'CodeWriter.php';\r\n $Code = & new JPSpan_CodeWriter();\r\n $this->ClientGenerator->generate($Code);\r\n return $Code->toString();\r\n }", "public function getClient(string $name = 'default');", "public static function get_client() {\r\n\t\t$url = get_option(\"eswp_server\");\r\n\t\treturn new \\Elastica\\Client(array(\r\n\t\t \"url\" => $url\r\n\t\t));\r\n\t}", "public function getCertainClient()\n {\n return $this->certainClient;\n }", "public function getClient()\n {\n return $this->kms;\n }", "function leerClientes(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idClienteTg, c.NombreCte,c.RFCCte, c.direccion, c.ciudad,c.estado, c.email, c.telefono, c.numTg,r.nombreReferencia FROM referencias r join tarjetas_clientes c on r.idreferencia=c.referenciaId where c.status=1\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }", "public function verRedThinkClientEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"THINK_CLIENT\");\n\n }", "private static function getClient()\n\t{\n\t\tif (!self::$ipClient instanceof IpClient){\n\t\t\tself::$ipClient = new IpClient();\n\t\t};\n\t\treturn self::$ipClient;\n\t}", "public function client()\n {\n return $this->connection;\n }", "public function ConsultarClientes() {\n if ($this->ValidarConexionALaBaseDeDatos()){\n $response = $this->HacerConsultaALaBaseDeDatos();\n } else {\n $response[\"respuesta\"] = \"error\";\n $response[\"mensaje\"] = \"Falló la conexión con la base de datos\";\n }\n return $response;\n }", "public function getCommune()\n {\n return $this->commune;\n }", "protected function client()\n\t{\n\t\treturn Passport::client();\n\t}", "public function clientDetailByTradingName() {\n\t\ttry {\n\n\t\t\t$name = Request::input('who');\n\n\t\t\t$client = ConnectContentClient::clientTradingNameExists(\\Auth::User()->station->id, $name);\n\n\t\t\tif (!$client) {\n\t\t\t\tthrow new \\Exception('Client not found.');\n\t\t\t}\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => $client->getJSONArrayListForClientDetail()));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "function obtenerClientes(){\n $query = $this->connect()->query('SELECT * FROM cliente');\n return $query;\n }", "public function createClient(): Client;", "public function getIdCliente(){\r\n return $this->idCliente;\r\n }", "function getIdCliente()\r\n\t {\r\n\t\t return $this->id_cliente;\r\n\t }", "public function getClient(): Client\n {\n return $this->flow_client->getClient();\n }", "function modificarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\t\t$this->setParametro('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function addTbhotelCliente()\n { \n $str=\"\";\n $cnx= dbcon();\n $str = \"Call spnew_tbhotelCliente('$this->nitHotel', $this->idCiudad, '$this->nomHotel', '$this->dirHotel', '$this->telHotel1', '$this->telHotel2', '$this->correoHotel', $this->tipoHotel, '$this->Administrador', $this->idRedes, $this->aforo, $this->tipoHabitaciones, $this->status);\";\n $rr =mysqli_query($cnx,$str); \n $row=mysqli_fetch_array($rr); \n return $row['rta'];\n }", "public function getClient(): Client\n {\n return $this->client;\n }", "public function getClient(): Client\n {\n return $this->client;\n }", "public function clientGetname() {\n return $this->returnCommand(['CLIENT', 'GETNAME']);\n }", "public function compte_client()\n\t{\n\t\t$this->load->view('app/page-compte-client');\n\t}", "public function getClient()\n {\n $options = array(\n 'hostname' => 'login.unl.edu',\n 'port' => 443,\n 'uri' => 'cas'\n );\n \n $protocol = new \\SimpleCAS_Protocol_Version2($options);\n\n /**\n * We need to customize the request to use CURL because \n * php5.4 and ubuntu systems can't verify ssl connections \n * without specifying a CApath. CURL does this automatically\n * based on the system, but openssl does not.\n * \n * It looks like this will be fixed in php 5.6\n * https://wiki.php.net/rfc/tls-peer-verification\n */\n $request = new \\HTTP_Request2();\n $request->setConfig('adapter', 'HTTP_Request2_Adapter_Curl');\n $protocol->setRequest($request);\n\n return \\SimpleCAS::client($protocol);\n }", "public function listaCliente() {\n\n return $clientes; // array de clientes\n }", "public function getClient()\n {\n return $this->hasOne(Partenaire::class, ['id' => 'client_id']);\n }", "private function client()\n {\n if (null === $this->client) {\n // https://github.com/deskpro/deskpro-api-client-php\n $client = new Client(['connect_timeout' => 2]);\n $this->client = new DeskproClient($this->config['deskpro_url'], $client);\n $authKey = explode(':', $this->config['deskpro_api_code_key']);\n $this->client->setAuthKey(...$authKey);\n }\n\n return $this->client;\n }", "public function getClient() {\n return $this->client;\n }", "public function getClient() {\n return $this->client;\n }", "public function getClient() {\n return $this->client;\n }" ]
[ "0.7216472", "0.692574", "0.6618754", "0.6503531", "0.6469285", "0.6469285", "0.64450175", "0.64238214", "0.64238214", "0.64238214", "0.63995165", "0.6317794", "0.6317053", "0.629139", "0.6279561", "0.62789464", "0.62676346", "0.6229504", "0.62244767", "0.6222611", "0.6189082", "0.6157873", "0.61544126", "0.6150545", "0.6132133", "0.6130434", "0.61272", "0.6114763", "0.6086526", "0.60848254", "0.60825807", "0.60816664", "0.6058672", "0.6054273", "0.60366297", "0.60285723", "0.602369", "0.60234183", "0.60208416", "0.6014107", "0.60093224", "0.60049576", "0.5999013", "0.5994964", "0.5989934", "0.59734374", "0.5972739", "0.59597486", "0.5959626", "0.59467196", "0.59467196", "0.59467196", "0.5943055", "0.59371656", "0.59337", "0.593233", "0.5927782", "0.5922923", "0.5922923", "0.5915536", "0.591145", "0.59063977", "0.59051234", "0.590053", "0.58968514", "0.5887105", "0.5866025", "0.5853469", "0.5848893", "0.58432674", "0.5836368", "0.58327496", "0.5818359", "0.5816962", "0.5799802", "0.5788184", "0.5775291", "0.57631934", "0.57494664", "0.5748382", "0.57438314", "0.5740021", "0.5739593", "0.57383144", "0.5736937", "0.57349396", "0.57245636", "0.57164073", "0.5702232", "0.5701359", "0.56937176", "0.56937176", "0.56917626", "0.5688121", "0.56871974", "0.56858027", "0.56852144", "0.5685027", "0.5674677", "0.5674677", "0.5674463" ]
0.0
-1
Send POST Request To Send New Message In Thread
function sendMessage() { $url = './sendMessages.php'; $data = array( 'session_id' => $_SESSION[ 'code' ], 'email' => $_POST[ 'email' ], 'message_text' => $_POST[ 'message' ], 'thread_id' => $_POST[ 'id' ] ); $options = array( 'http' => array( 'method' => 'POST', 'content' => http_build_query($data) ) ); $context = stream_context_create($options); $result = json_decode(file_get_contents($url, false, $context), true); if ( $result[ "error" ] ) return("ERROR: " . $result[ "message" ]); else { return(true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postAction() {\n\t\t$this->sendMessage();\n\t}", "function sendRequest()\n\t\t{\n\t\t\t$stream = $this->getRequestStream();\n\t\t\t$stream->write( $this->getRequestString() );\n\t\t\t$stream->close();\n\t\t}", "public function postSend()\n {\n }", "public function sendPost(){\n\t\t\t// record the post in the database\n\t\t\t\n\t\t}", "public function handleSendMessage() {\n\t\t$json = file_get_contents(\"php://input\"); //vytánutí všech dat z POST požadavku - data ve formátu JSON\n\t\t$data = Json::decode($json); //prijata zprava dekodovana z JSONu\n\t\t$user = $this->getPresenter()->getUser();\n\t\t$addMessage = $this->addMessage($data, $user);\n\t\tif (!empty($addMessage)) {\n\t\t\t$this->sendRefreshResponse($data->lastid);\n\t\t}\n\t}", "abstract public function post();", "public function reply_post() {\n\t\t$data['uid'] = $this->input->get('uid');\n\t\t$data['_id'] = $this->input->get('_id');\n\t\t$data['text'] = $this->input->get('text');\n\t\t$data['ts'] = now();\n\t\t\n\t\t$this->Messages_model->reply($data);\n\t}", "public function processMsg()\n {\n\t\t$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n \t//extract post data\n \t$logfile = fopen(\"./log/request_log\", \"a\");\n \tfwrite($logfile, $postStr);\n \tfclose($logfile);\n\t\tif (!empty($postStr)){\n /* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n the best way is to check the validity of xml by yourself */\n libxml_disable_entity_loader(true);\n $parseObj = new RequestParse();\n $requestData = $parseObj->parse($postStr);\n $processObj = new RequestProcess();\n $responseData = $processObj->process($requestData);\n $responseObj = new RequestResponse();\n //echo $responseObj->response($responseData);\n\t\t $response = $responseObj->response($responseData);\n\t\t echo $response;\n\t\t $logfile = fopen(\"./log/response_log\", \"a\");\n\t\t fwrite($logfile, $response);\n\t\t fclose($logfile);\n }else {\n \techo \"\";\n \texit;\n }\n }", "public function sendRequest()\n {\n }", "public function request()\n {\n $this->setParams();\n\n $jsondata = json_encode($this->getData(), JSON_UNESCAPED_SLASHES);\n\n if(!$this->is_JSON($jsondata)){\n $this->log(\"Sending parameters must be JSON.\",'Exiting process.');\n $this->error_message('Sending parameters must be JSON.');\n }\n $lenght = strlen($jsondata);\n if($lenght<=0){\n $this->log(\"Length must be more than zero.\",'Exiting process.');\n $this->error_message(\"Length must be more than zero.\");\n }else{\n $lenght = $lenght <= 999 ? \"0\" . $lenght : $lenght;\n }\n\n $this->response_json = $this->oxd_socket_request(utf8_encode($lenght . $jsondata));\n\n $this->response_json = str_replace(substr($this->response_json, 0, 4), \"\", $this->response_json);\n if ($this->response_json) {\n $object = json_decode($this->response_json);\n if ($object->status == 'error') {\n $this->error_message($object->data->error . ' : ' . $object->data->error_description);\n } elseif ($object->status == 'ok') {\n $this->response_object = json_decode($this->response_json);\n }\n } else {\n $this->log(\"Response is empty...\",'Exiting process.');\n $this->error_message('Response is empty...');\n }\n }", "public function testMessageThreadsV2Post()\n {\n }", "public function post();", "public function post();", "public function post();", "function send_post()\n { \n $send = new send();\n\n $send->date_created = date('Y-m-d H:i:s');\n $send->createdbypk = $this->get_user()->user_id;\n $send->date_modified = date('Y-m-d H:i:s');\n $send->modifiedbypk = $this->get_user()->user_id;\n\n $this->response($this->_send_save($send, 'post'));\n }", "public function sendRequest( ) {\n\n }", "private function POST() {\n global $_POST;\n $postData = array();\n foreach($_POST as $key => $value) {\n $postData[$key] = $value;\n }\n $this -> response[\"response\"] = $postData;\n return;\n }", "function post() \n {\n \n }", "public function serveRequest()\n {\n $msg = $this->connection->read();\n if (!$msg) return;\n $this->connection->acknowledge($msg);\n \n $replyMsg = $this->act($msg);\n\n // write correlation id\n $replyMsg->setHeader(\"correlation-id\", $msg->getId());\n\n $this->connection->send($msg->getReplyTo(), $replyMsg);\t\t\n }", "public function sendRequest()\n {\n $url = \"http://66.45.237.70/api.php\";\n $number = $this->senderObject->getMobile();\n $text = $this->senderObject->getMessage();\n\n try {\n $this->errorException();\n\n } catch (XenonException $exception) {\n $exception->showException($this->senderObject);\n }\n $config = $this->senderObject->getConfig();\n\n $data = array(\n 'username' => $config['username'],\n 'password' => $config['password'],\n 'number' => $number,\n 'message' => $text\n );\n try {\n $ch = curl_init(); // Initialize cURL\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $smsResult = curl_exec($ch);\n $status = $this->generateReport($smsResult, $data);\n\n } catch (XenonException $exception) {\n $exception->showException();\n }\n }", "function post(Request &$request, Response &$response);", "function push_curl_post($msg_body, $address) {\n\t$now = date(\"Y-m-d H:i:s\");\n\techo \"[$now] get the msg [$msg_body]. \\n\";\n\t$now = date(\"Y-m-d H:i:s\");\n\techo \"[$now] trying to push msg [$msg_body] to [$address]. \\n\";\n//\tsleep(3);\n\t$url = 'http://dl.gipsa.name/receive_push.php';\n\t$data = array(\n\t\t'msg' => $msg_body,\n\t\t'time' => time(),\n\t);\n\t// $post_string = http_build_query($data, '', '&amp;');\n\t// http_post_data($url, $post_string);\n\tcurl_single_post($url, $data);\n\t// todo wait for client's ack\n\t$now = date(\"Y-m-d H:i:s\");\n\techo \"[$now] write the message [$msg_body] into DB after 3 trail of push for [$address]. \\n\";\n\treturn 0;\n}", "public function send()\n {\n // Stream post the data\n $this->evaluateResponse($this->httpPost($this->str_endpoint . '/event', $this->compile()));\n }", "private function postHop () {\n\t\t$this->result = curl_exec ( $this->ch );\n\t\tcurl_close ( $this->ch );\n\t}", "final public function execute() {\r\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\r\n Trace::debug('post: '.serialize($postStr));\r\n\r\n $echostr = MRequest::get('echostr');\r\n if (!empty($echostr)) {\r\n Trace::debug('echostr '.$echostr);\r\n echo $echostr;\r\n return;\r\n }\r\n//*\r\n if (!$this->checkSignature()) {\r\n $this->signatureFailed();\r\n return;\r\n }\r\n//*/\r\n //extract post data\r\n if (empty($postStr)){\r\n Trace::debug('empty poststr');\r\n $this->errorOccured();\r\n return;\r\n }\r\n\r\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\r\n\r\n $this->fromUser = $postObj->FromUserName;\r\n $this->toUser = $postObj->ToUserName;\r\n\r\n $this->xmlObj = $postObj;\r\n\r\n $msgtype = strval($postObj->MsgType);\r\n\r\n if ('text' === $msgtype) {\r\n $text = strval($postObj->Content);\r\n $this->receivedText($postObj, $text);\r\n } elseif ('event' === $msgtype) {\r\n $event = strval($postObj->Event);\r\n $eventKey = strval($postObj->EventKey);\r\n $this->receivedEvent($postObj, $event, $eventKey);\r\n } else {\r\n $this->receivedUnknown($postObj);\r\n }\r\n\r\n }", "abstract public function post($data);", "private function send(): void\n {\n $data = [\n 'code' => $this->status,\n 'message' => $this->message,\n 'datetime' => Carbon::now()\n ];\n\n $config = config(\"tebot.$this->channelConfig\");\n\n $data['title'] = $this->title . ' ' . $config['name'];\n\n if (!empty($this->detail)) $data['detail'] = json_encode($this->detail);\n\n Http::withHeaders(['x-api-key' => $config['key']])->post($config['url'] . '/api/message', $data);\n }", "public function post($msg) {\r\n\t\tif (isset ( $_GET ['oauth_token'] )) {\r\n\t\t\t/* exchange the request token for access token */\r\n\t\t\t$key = $_COOKIE ['key'];\r\n\t\t\t$secret = $_COOKIE ['secret'];\r\n\t\t\t$result = $this->client->getAccessToken ( $key, $secret );\r\n\t\t\t$key = $result [\"oauth_token\"];\r\n\t\t\t$secret = $result [\"oauth_token_secret\"];\r\n\t\t\tif ($key) {\r\n\t\t\t\t\r\n\t\t\t\t/* access success, let's say something. */\r\n\t\t\t\t$this->client->programmaticLogin ( $key, $secret );\r\n\t\t\t\t//echo 'logged in.';\r\n\t\t\t\t$entry = new Zend_Gdata_Douban_BroadcastingEntry();\r\n\t\t\t\t$content = new Zend_Gdata_App_Extension_Content($msg);\r\n\t\t\t\t$entry->setContent ( $content );\r\n\t\t\t\t$entry = $this->client->addBroadcasting ( \"saying\", $entry );\r\n\t\t\t\t//echo '<br/>you just posted: ' . $entry->getContent ()->getText ();\r\n\t\t\t} else {\r\n\t\t\t\techo 'Oops, get access token failed';\r\n\t\t\t}\r\n\t\t} \r\n\r\n\t}", "public function postMessage(Request $request)\n {\n info($request->all());\n if(!empty($request->post('event')) && !empty($request->post('event')['text']) && empty($request->post('event')['bot_id'])) {\n\t $event = $request->post('event');\t\n\t $channel = $event['channel'];\n\t $question = $event['text'];\n\t $user = $event['user'];\n dispatch(new PostMessageJob($this->botService, $question, $channel, $user));\n die(json_encode(array('status' => 200, 'message' => 'OK')));\n }\n\n return null;\n }", "function post();", "public function request() {\n //sent to poster \n }", "function _post()\r\n\t\t{\r\n\t\t}", "public function runRequest() {\n }", "public function send($request);", "function sendPost($arrayRestInputs){\n if((file_exists($arrayRestInputs['enginebasedir'] . '/lib/Send.php')) && (file_exists($arrayRestInputs['enginebasedir'] . '/lib/NodeToken.php')) ){\n require_once($arrayRestInputs['enginebasedir'] . '/lib/Send.php');\n require_once($arrayRestInputs['enginebasedir'] . '/lib/NodeToken.php');\n $objectToken = new NodeToken ();\n if(($objectToken->retrieveToken($arrayRestInputs['token'])) && (count($arrayRestInputs['arguments']) > 0) && (!(empty($arrayRestInputs['post'])))){\n $arguments = $arrayRestInputs['arguments'];\n $fromUserId = $objectToken->uid;\n $fromUserObject = new User($fromUserId);\n $toUserObject = new User($arguments[0]);\n if(!$fromUserObject->doesBlockRelationshipExist($toUserObject->getUserID())){\n $objectSend = new Send();\n $sendReturn = $objectSend->sendMessage($fromUserId, $toUserObject->getUserID(), $arrayRestInputs['post']);\n return $sendReturn;\n\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n}", "function send($number, $message = 'This is a test message', $test = 0){\n\t\t\n\t\t$message = urlencode($message);\n\t\t\n\t\t// Prepare data for POST request\n\t\t$data = \"uname=\".$this->username.\"&pword=\".$this->password.\"&message=\".$message.\"&from=\".$this->from.\"&selectednums=\".$number.\"&info=1&test=\".$test;\n\t\t\n\t\t// Send the POST request with cURL\n\t\t$ch = curl_init($this->apiUrl);\n\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tif(curl_exec($ch)){ //This is the result from Txtlocal\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\t\t\n\t\t}\n\t}", "public function receive(Request $input, ThreadService $threadService)\n {\n // if not create thread, create users\n // if yes pull thread\n // if does exist, parse stripped html and create message\n // if does not exist, parse body-html and create messages\n // send email with thread\n /*Log::info(\"Success\");\n die();*/\n $threadService->handle($input);\n\n }", "public function post(&$input)\n\t{\n\t\t// DevUtils::cl($input, 'input', __METHOD__, __LINE__);\n\t\tif(count($input) < 2)\n\t\t{\n\t\t\treturn HtmlResponse::returnArray(HtmlResponse::NO_CONTENT);\n\t\t}\n\n\t\t//call to main \n\t\t//call to main with the new sms.\n\t\t$response = $this->_receiveNewMessage($input);\n\t\t\n\t\treturn HtmlResponse::returnArray($response['code']);\n\t}", "public function showRequestPost();", "function postNewMessage($user_id, $thread_id, $message)\n\t\t{\n\t\t\t$query=sqlite_exec($this->connection, \"INSERT INTO message(thread_id, user_id, message, date) VALUES($thread_id, $user_id, $message, NOW())\");\n\t\t}", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "public function send();", "protected function postRequest($data) {\n $ch = curl_init($this->post_url);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type:application/xml',\n 'Gepg-Com:default.sp.in',\n 'Gepg-Code:' . $this->sp_code,\n 'Content-Length:' . strlen($data))\n );\n curl_setopt($ch, CURLOPT_TIMEOUT, 5);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n $resultCurlPost = curl_exec($ch);\n curl_close($ch);\n\t\t\n\t\t//to be separated\n\t\t$date_createdsc=date(\"Y-m-d H:i:s\");\n\t\t\tYii::$app->db->createCommand()\n ->insert('gepg_bill7', [\n 'response_message' =>$data,\n 'date_created' =>$date_createdsc, \n ])->execute();\n\t\t//end to be separate\t\t\n return $resultCurlPost;\n }", "private function sendMessage()\n {\n try\n {\n $request = $_POST;\n\n $uid = userid();\n\n if (!$uid)\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n if( !isset($request['username']) || $request['username']==\"\" )\n throw_error_msg(\"username not provided\");\n\n if( !isset($request['subject']) || $request['subject']==\"\" )\n throw_error_msg(\"subject not provided\");\n\n if( !isset($request['content']) || $request['content']==\"\" )\n throw_error_msg(\"content not provided\");\n\n $array['is_pm'] = true;\n $array['from'] = $uid;\n $array['to'] = $request['username'];\n $array['subj'] = mysql_clean($request['subject']);\n $array['content'] = mysql_clean($request['content']);\n\n global $cbpm;\n $rs = $cbpm->send_pm($array);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"message sent successfully\", \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n } \n\n }", "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "public function twSendMsg(Request $re)\n {\n $username = $re->username;\n $text = $re->text;\n $consumerKey = FollowersController::get_value('twConKey');\n $consumerSecret = FollowersController::get_value('twConSec');\n $accessToken = FollowersController::get_value('twToken');\n $tokenSecret = FollowersController::get_value('twTokenSec');\n\n $twitter = new \\Twitter($consumerKey, $consumerSecret, $accessToken, $tokenSecret);\n try {\n $data = $twitter->request('direct_messages/new', 'POST', array('screen_name' => $username, 'text' => $text));\n return \"success\";\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n }", "function send($data);", "function send($data);", "public function execute()\n\t{\t\n\t\t$msgObj \t= &parent::getCurrentMessage();\n\t\t$http \t\t= $msgObj::getData('currentHttp');\n\t\t$arguments \t= $msgObj::getData('currentArguments');\n\t\t$settings\t= array();\n\t\t\n\t\t//if the first parameter is an array, they might be defining lots of things - parse!\n\t\tif(is_array($arguments[0])){\n\t\t\t// be sure that at least the location and host are set\n\t\t\tif(!isset($arguments[0]['host']) || !isset($arguments[0]['location']) ){\n\t\t\t\tthrow new Exception('Missing required arguments!');\n\t\t\t}\n\t\t\t$settings = $arguments[0];\n\t\t}else{\n\t\t\t// if we're just using the normal arguments - map them\n\t\t\t$settingKeys = array('location','host','requestData','outputFormat');\n\t\t\tforeach($arguments as $argumentIndex => $argument){\n\t\t\t\t$argumentKey = $settingKeys[$argumentIndex];\n\t\t\t\t$settings[$argumentKey]=($arguments[$argumentIndex]) ? $arguments[$argumentIndex] : null;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Be sure we at least have the location\n\t\tif(!$settings['location'] || gettype($settings['location'])!='string'){\n\t\t\tthrow new Exception(get_class().' Invalid post location!');\n\t\t}\n\t\tif(!isset($settings['host']) || gettype($settings['host'])!='string'){\n\t\t\tthrow new Exception('Action Post: Invalid hostname!');\n\t\t}\n\t\t$this->postHost\t\t= $settings['host'];\n\n\t\t$this->postLocation\t= (strpos($settings['location'],'http://')===false) ? 'http://'.$this->postHost.$settings['location'] : $settings['location'];\n\t\t\n\t\t$this->postData\t\t= (isset($settings['requestData'])) ? $settings['requestData'] : '';\n\t\t\n\t\t$msgObj=&parent::getCurrentMessage();\n\t\t$msgObj::setData('postLocation',$this->postLocation);\n\t\t$msgObj::setData('postHost',$this->postHost);\n\t\t$msgObj::setData('outputFormat',(isset($settings['outputFormat'])) ? $settings['outputFormat'] : 'txt');\n\t\t\n\t\t$http = new HttpRequest($this->postLocation,HttpRequest::METH_POST);\n\t\tif(is_array($this->postData)){\n\t\t\t$http->setPostFields($this->postData);\n\t\t}elseif($this->postData instanceof SimpleXMLElement){\n\t\t\t// we're going to convert this to a literal XML string\n\t\t\t$this->postData = $this->postData->asXML();\n\t\t\t$http->setBody($this->postData);\n\t\t}else{\n\t\t\t$http->setBody($this->postData);\n\t\t}\n\t\t\n\t\tif(isset($settings['headers']) && count($settings['headers'])>0){\n\t\t\t$http->setHeaders($settings['headers']);\n\t\t}\n\t\t\n\t\tif($additionalHeaders=$msgObj::getData('httpHeaders')){\n\t\t\t$http->setHeaders($additionalHeaders['httpHeaders']);\n\t\t}\n\t\t\n\t\ttry {\n\t\t\ttry {\n\t\t\t\t$httpReturn = $http->send();\n\t\t\t\t\n\t\t\t\t// Check for a redirect so we can follow...\n\t\t\t\t$responseCode = $http->getResponseCode();\n\t\t\t\tif($responseCode==301 && isset($arguments[0]['followRedirects']) && $arguments[0]['followRedirects']==true){\n\t\t\t\t\t$header \t\t\t\t\t= $httpReturn->getHeaders();\n\t\t\t\t\t$arguments[0]['location']\t= $header['Location'];\n\t\t\t\t\t$msgObj::setData('currentArguments',$arguments);\n\t\t\t\t\treturn ActionPost::execute();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}catch(Exception $e){\n\t\t\t\tthrow new Exception($e->getMessage());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tHelperSession::execute($httpReturn->getHeaders());\n\n\t\t\t$msgObj::setData('__lastRequest',$http->getRawRequestMessage());\n $msgObj::setData('__lastResponse',$http->getRawResponseMessage());\n\n\t\t\t$msgObj::setData('currentHttp',$httpReturn);\n\t\t\treturn $httpReturn;\n\t\t}catch(HttpException $e){\n\t\t\tthrow new Exception(get_class().' '.$e->getMessage());\n\t\t}\n\t}", "public function post($t);", "public function send_post_request(){\n $url = \\Request::get('url');\n $post_array = \\Request::all();\n\n//\t\t$url = 'http://localhost/_websites/ahmed-badawy.com/site/json-test';\n//\t\t$post_array = array('type' => 'scss', 'source' => '.pre{color:red;background-color:green;}', 'compress'=>true);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $query = curl_exec($ch);\n curl_close($ch);\n\n return $query;\n }", "function Send($url, $POST){ //работа с CURL'ом\n\t$ch = curl_init();// Устанавливаем соединение\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $POST);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 10);\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\n\t$result = curl_exec($ch);\n\n\tif($result === false) print $err = curl_error($ch);\n\n\treturn $result;\n}", "public function click_notification_post()\n\t{ \n\t\tif($_SERVER['REQUEST_METHOD'] == \"POST\"){\n \t// Get data\n\t\t\tif(isset($_POST)){\n\t\t\t\t$permission=false;\n\t\t\t\t$token= isset($_POST['token']) ?($_POST['token']) : \"\";\n\t\t\t\t$permission=$this->matchAppToken($token);\n\t\t\t\tif($permission==true){\n\t\t\t\t\t$notification_id= isset($_POST['notification_id']) ?($_POST['notification_id']) : \"\";\n\t\t\t\t\tif($notification_id!=''){\n\t\t\t\t\t\t$response=$this->advance_notification_model->click_notification($notification_id);\t\n\t\t\t\t\t\tif($response){\n\t\t\t\t\t\t\t$json = array(\"status\" => 1, \"message\" => \"Ok\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Somthing went wrong. Please try again later\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Notification ID has been empty.\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Token has been not matched\");\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request has been uncompleted\");\n\t\t\t}\n\t\t}else{\n\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request method not accepted\");\n\t\t}\n\t\t$this->response($json, REST_Controller::HTTP_OK);\n\t}", "public function send(){\n\n\n\n $id = $_GET['id'];\n $msg = $_GET['msg'];\n $response = $this->sendMessage($id,$msg);\n $return[\"allresponses\"] = $response;\n $return = json_encode($return);\n $data = json_decode($response, true);\n\n echo $response;\n\n }", "public function postExecution($request){}", "public function createPost(ThreadRepositoryInterface $parentThread, array $data = []): PodiumResponse;", "public function reply()\n\t{\n\n\t\t$reply = $this->store('reply', '/threads?id=_id_#form-reply');\n\n\t\t(new Thread)->updateTotalReplies($reply->parent_id);\n\n\t\tredirect('/threads?id=' . $reply->parent_id . '#reply-id' . $reply->id);\n\t\n\t}", "public function send()\n {\n $this->jsonManager->domain = $this->uri;\n $this->jsonManager->port = $this->port;\n $this->jsonManager->online = $this->isOnline();\n $this->jsonManager->send();\n }", "function post_new_reply() {\n\tglobal $core, $document, $user, $boards, $threads, $posts, $db;\n\n\tif (!isset($_POST['thread_id']) || !isset($_POST['board_id']) || !isset($_POST['post_name']) || !isset($_POST['post_message'])) {\n\t\tfatal_error(\"Some or all of the information needed to post a new message are missing. Please try again\");\n\t}\n\n\t//Make fields safe\n\t$boardid = make_safe(\"int\",$_POST['board_id']);\n\t$threadid = make_safe(\"int\",$_POST['thread_id']);\n\t$postname = make_safe(\"text\",$_POST['post_name']);\n\t$postmessage = make_safe(\"text\",$_POST['post_message']);\n\n\t//Sanity check fields\n\tif (strlen($postname) < 2 || strlen($postmessage) < 10) { \n\t\tfatal_error(\"Your message title or message text is too short. Please try again\");\n\t}\n\tif (!$boards->get_board($boardid)) {\n\t\tfatal_error(\"Invalid board specified. Please try again\");\n\t} \n\tif (!$threads->get_thread($threadid)) {\n\t\tfatal_error(\"Invalid thread specified. Please try again\");\n\t}\n\n\t//Now post the message\n\t$posts->new_post($user->get(\"user_id\"),$boardid,$threadid,$postname,$postmessage);\n\n\t//Now go back to the forum\n\t$core->do_redirect(\"forumdisplay.php?f=$boardid\");\t\t\n}", "protected function sendRequest($url, $message)\n {\n $this->xmlRequest = $message;\n\n //Dsfnet so possui producao\n if (!$url) {\n $url = $this->url[1];\n }\n\n if (!is_object($this->soap)) {\n $this->soap = new SoapCurl($this->certificate);\n }\n //formata o xml da mensagem para o padão esperado pelo webservice\n $dom = new \\DOMDocument('1.0', 'UTF-8');\n $dom->preserveWhiteSpace = false;\n $dom->formatOutput = false;\n $dom->loadXML($message);\n\n $message = str_replace('<?xml version=\"1.0\"?>', '', $dom->saveXML());\n\n $messageText = '<'.$this->method.' soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">';\n $messageText.= '<mensagemXml xsi:type=\"xsd:string\"><![CDATA['.$message.']]></mensagemXml>';\n $messageText.= '</'.$this->method.'>';\n \n $this->params = [\n 'POST /WsNFe2/LoteRps.jws HTTP/1.1',\n 'Host: www.issdigitalsod.com.br',\n 'Content-Type: text/xml; charset=utf-8',\n 'SOAPAction: \"https://www.issdigitalsod.com.br/WsNFe2/LoteRps.jws/LoteRps/'.$this->method.'\"'\n ];\n \n $action = '';\n\n //Realiza o request SOAP\n return $this->soap->send(\n $url,\n $this->method,\n $action,\n $this->soapversion,\n $this->params,\n $this->namespaces[$this->soapversion],\n $messageText\n );\n }", "public function markThread(PostRepositoryInterface $post): PodiumResponse;", "function post_day($httpClient, $base_url, $day) {\r\n error_log('post_day to server: ' . $day);\r\n $url = $base_url . '/day/';\r\n $response = $httpClient->request('POST', $url,['json' => $day]); //guzzale part\r\n// $request = $httpClient->createRequest('POST', $url);\r\n// $request->setBody(Stream::factory('9'));\r\n// $response = $request->send();\r\n return $response;\r\n //echo $response; die();\r\n error_log('post_day to server: ' . $day);\r\n \r\n// $url = 'http://' . $base_url . '/day/';\r\n// $day1['day'] = $day;\r\n// //$response = $httpClient->request('POST', $url, ['json' => $day1]);\r\n// return $response;\r\n \r\n}", "function sendJodel($Text, $color) {\n\n //Variablen\n global $Zeitstempel;\n //Jodel festlegen\n $jodel = \"\n curl -X POST \\\n https://api.go-tellm.com/api/v3/posts \\\n -H 'Accept: */*' \\\n -H 'Accept-Encoding: gzip, deflate' \\\n -H 'Authorization: Bearer \" . API_KEY . \"' \\\n -H 'Cache-Control: no-cache' \\\n -H 'Connection: keep-alive' \\\n -H 'Content-Type: application/json; charset=UTF-8' \\\n -H 'Host: api.go-tellm.com' \\\n -H 'X-Authorization: HMAC 123' \\\n -H 'cache-control: no-cache' \\\n -H 'x-timestamp: $Zeitstempel' \\\n -d '{\n \\\"message\\\": \\\"$Text\\\",\n \\\"channel\\\": \\\"\" . CHANNEL . \"\\\",\n \\\"color\\\": \\\"$color\\\"\n }'\n \";\n\n //Jodel an die JodelAPI senden\n $output = shell_exec($jodel);\n //Antwort der JodelAPI lesen\n $jodelAnswer = readJSON($output);\n //Falls Jodel nicht erfolgreich\n if ( array_key_exists(\"error\", $jodelAnswer) ) {\n //ErrorMail senden\n sendErrorMail(\"Dieser Jodel konnte nicht gesendet werden, da:\\n\" . $jodelAnswer[\"error\"] . \"\\n'\" . $Text . \"'\");\n }\n //Pausieren, damit keine JodelSperre eintritt (passiert ab 3 Jodel pro Minute)\n sleep(20);\n}", "private function sendRequestToTelegram(TelegramMethods $method) /*TelegramRawData*/\r\n {\r\n //curl\r\n\t\t//and then get response\r\n\t\t$response = $this -> post($this->composeApiMethodUrl($method));\r\n\t\t/*\r\n\t\t\tHere you can make smth with response\r\n\t\t*/\r\n\t\t\r\n\t\t//print_r($response);\r\n //file_get_contents('https://api.telegram.org/bot328910310:AAF1hhUoLCe1U_KBqHbvHSGX0RqgQuf56rs/sendMessage?chat_id=262492945&text='.$response);\t\t\r\n\t\t\r\n\t\t//echo $json_string = json_encode($response, JSON_PRETTY_PRINT);\r\n }", "public function send()\n {\n $fields = count($this->filed)?$this->filed:array();\n $fields = json_encode($fields);\n try{\n $client = new Client();\n $promise = $client->requestAsync('POST','https://onesignal.com/api/v1/notifications',[\n 'headers' =>array(\n 'Content-Type'=>'application/json',\n 'Authorization'=>'Basic '.$this->restKey[$this->platform]\n ),\n 'body'=>$fields\n ]);\n $promise->then(\n function (ResponseInterface $res){\n $body = $res->getBody();\n $stringBody = (string) $body;\n \\Yii::debug(\"onesignal: \".$stringBody);\n },\n function (RequestException $e) {\n \\Yii::error(\"onesignal error: \".$e->getMessage().' '.$e->getRequest()->getMethod());\n }\n );\n $promise->wait();\n }catch (RequestException $e) {\n \\Yii::error(\"send fail\");\n }\n }", "private function processRequest()\n\t{\n\t\t\n\t\t$request = NEnvironment::getService('httpRequest');\n\t\t\n\t\tif ($request->isPost() && $request->isAjax() && $request->getHeader('x-callback-client')) { \n\t\t\t\n\t\t\t$data = json_decode(file_get_contents('php://input'), TRUE);\n\t\t\tif (count($data) > 0) {\n\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\tif (isset($this->items[$key]) && isset($this->items[$key]['callback']) && $value === TRUE) {\n\t\t\t\t\t\t$this->items[$key]['callback']->invokeArgs($this->items[$key]['args']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdie(json_encode(array('status' => \"OK\")));\n\t\t}\n\t\t\n\t}", "public function write() {\n\t\t$this->loadModel('Thread');\n\t\tif ($this->request->is('post')) {\n $this->Thread->set('user_id', $this->Auth->user('id'));\n $this->Thread->set('forums_id', $this->params['pass'][0]);\n if ($this->Thread->save($this->request->data)) {\n $this->Session->setFlash('Din tråd har sparats.');\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash('Kunde inte spara tråden.');\n }\n }\n\t}", "public function postNewPushOnParse(){\n\t\t$this->generateChannel();\n\t\t$ch = curl_init();\n\t\t$headers = array( \"X-Parse-Application-Id: $this->PARSEAPPID\",\n \"X-Parse-REST-API-Key: $this->PARSEAPIKEY\",\n \"Content-Type: application/json\");\n $url = \"https://api.parse.com/1/classes/\" . $this->STORAGECLASS;\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(\"sender\" => $this->sender, \"message\" => $this->push, \"channel\" => $this->channel, \"sent\" => 0)));\n\t\t$result = curl_exec($ch);\n\t\tcurl_close($ch);\n \t\treturn $result;\n\t}", "public function action_post($id) {\n\t\tif (Request::$is_ajax) {\n\t\t\tif (isset($_POST['message']) && Batch::exists($id))\n\t\t\t\tBatch::client_post($id, $_POST['message']);\n\t\t}\n\t\telse\n\t\t\t$this->request->status = 403;\n\t}", "public function post() {\n if (!$this->data instanceof stdClass)\n throw new Exception('Invalid Request Object', 400);\n\n $this->data->accountId = models\\Account::current()->id;\n\n $locker = models\\Locker::new($this->data)->validate()->save();\n\n // send the response\n $this->send($locker);\n }", "protected function apiPost($args)\n {\n // Load thread\n $thread = self::getThread($args['threadId'], $args['token']);\n\n // Check variables\n self::checkParams($args, array('user', 'message'));\n\n // Get operator's array\n if (!$args['user']) {\n $operator = $this->checkOperator();\n // Operators can post messages only to own threads.\n $can_post = ($operator['operatorid'] == $thread->agentId);\n } else {\n // Users can post messages only when a thread is open.\n $can_post = $thread->state != Thread::STATE_CLOSED;\n }\n\n if (!$can_post) {\n throw new ThreadProcessorException(\n \"Cannot send\",\n ThreadProcessorException::ERROR_CANNOT_SEND\n );\n }\n\n // Set fields\n $kind = $args['user'] ? Thread::KIND_USER : Thread::KIND_AGENT;\n if ($args['user']) {\n $msg_options = array('name' => $thread->userName);\n } else {\n $msg_options = array(\n 'name' => $thread->agentName,\n 'operator_id' => $operator['operatorid'],\n );\n }\n\n // Post message\n $posted_id = $thread->postMessage($kind, $args['message'], $msg_options);\n\n // Update shownMessageId\n if ($args['user'] && $thread->shownMessageId == 0) {\n $thread->shownMessageId = $posted_id;\n $thread->save();\n }\n }", "public function postAction()\n {\n \n try{\n $externalId=null;\n $to=null;\n $status=null;\n $provider=null;\n $providerName=null;\n \n $writer = new Zend_Log_Writer_Stream('../private/logs/n2manager.messages.log');\n $logger = new Zend_Log($writer);\n //request sent from n2manager system to spoora\n if($this->_getParam('externalid')!=null){\n $externalId=$this->_getParam('externalid');\n }\n\t //intelliSMS status report\n\t elseif($this->_getParam('msgid')!=null){\n\t $provider = new IntelliSMSProvider();\n\t $providerName=\"IntelliSMS\";\n\t $externalId=$this->_getParam('msgid');\n\t $to=\"00\".$this->_getParam('toaddr');\n\t }\n\t //Routo report\n\t elseif($this->_getParam('mess_id')!=null){\n\t $provider = new RoutoProvider();\n\t $providerName=\"RoutoSMS\";\n\t $externalId=$this->_getParam('mess_id');\n\t $to=\"00\".$this->_getParam('number');\n\t }\n\t //42Telecom\n\t elseif($this->_getParam('smsid')!=null){\n\t $provider = new Sms42TelecomProvider();\n\t $providerName=\"42Telecom\";\n\t $externalId=$this->_getParam('smsid');\n\t $to=null;\n\t \n\t }\n\t //USA BulkSMS\n\t elseif($this->_getParam('referring_batch_id')!=null){\n\t $provider = new UsaBulkSMSProvider();\n\t $providerName=\"UsaBulkSMS\";\n\t $externalId=$this->_getParam('referring_batch_id');\n\t \n\t if($this->_getParam('msisdn')!=null)\n\t\t$to=\"00\".$this->_getParam('msisdn');\n\t \n\t }\n\t $status=$this->_getParam('status');\n\t \n\t sleep(2);\n\t\t\n\t if($to!=null){$messageBroadcast=MessageHelper::getMessageBroadcastByExternalId($externalId,$to);}\n\t else{\n\t\t$messageBroadcast=MessageHelper::getMessageBroadcastByExternalIdOnly($externalId);\n\t\t$to=$messageBroadcast->getDestinationNumber();\n\t\t}\n //to update spoora SMS send messages status\n \t$providerId=$messageBroadcast->getProviderId();\n\t \tswitch($providerId){\n\t\t\t/*case 1: $provider= new Tm4bProvider();break;*/\n\t\t\tcase 2: $provider= new RoutoProvider();$providerName=\"RoutoSMS\";break;\n\t\t\tcase 3: $provider= new IntelliSMSProvider();$providerName=\"IntelliSMS\";break;\n\t\t}\n\t \n\t\tif($messageBroadcast!=null){\n\t\t $provider->updateSmsStatus($messageBroadcast,$status); \n\t\t $responseError=\"No error\";\n\t\t}\n\t\telse{\n\t\t $responseError=\"messageBroadcast NULL\";\n\t\t}\n\t \n\t \n\t $logger->info($this->getRequest()->getServer('REMOTE_ADDR').\" - MessagestatusController > getAction:\\n\\t\".\n\t\t\t\t \"Provider: \".$providerName.\"\\n\\t\".\n\t\t\t\t \"externalId: \".$externalId.\"\\n\\t\".\n\t\t\t\t \"status: \".$status.\"\\n\\t\".\n\t\t\t\t \"to: \".$to.\"\\n\\t\".\n\t\t\t\t \"Error: \".$responseError.\"\\n\\t\");\n\t \n\t $this->getResponse()->appendBody(\"OK\");\n\t}catch (Exception $e) {\n\t\t$this->getRequest()->setParam('error_code', $e->getCode());\n\t\t$this->getRequest()->setParam('error_message', $e->getMessage());\n\t\t$this->getRequest()->setParam('error_trace', $e->getTraceAsString());\n\t\t$this->_forward('n2sms', 'error');\n \n }\n\t\n }", "public function send() {}", "public function send() {}", "public function send() {}", "public function send() {}", "public function send() {}", "public static function postMessage() {\n $con = pg_connect(\"host=\".CON_HOST.\" dbname=\".CON_DBNAME.\" user=\".CON_USER.\" password=\".CON_PASSWORD.\"\")\n or die (\"Could not connect to server.\");\n\n $query = \"INSERT INTO message (message, employee, start_date, end_date, removed)\n VALUES ('\". $_REQUEST['message'] .\"','\". $_REQUEST['name'] .\"','\". $_REQUEST['dateFrom'] .\"','\". $_REQUEST['dateTill'] .\"', false)\";\n\n pg_query($con, $query) or die(\"Cannot execute the query.\");\n return true;\n }", "function send_request($postdata = \"\") {\n\t\tif(!is_array($postdata) ) $postdata = array();\n\t\t\n\t\t$url = $this->_build_url();\n\t\t\n\t\tif(!isset($postdata['ip_address'])) $postdata['ip_address'] = $this->_get_client_ip();\n\t\tif(!isset($postdata['user_agent'])) $postdata['user_agent'] = $this->_get_client_user_agent();\n\t\t$postdata['api_key'] = $this->api_key;\n\n\t\t$ch = curl_init($url);\n\n\t\tcurl_setopt($ch, CURLOPT_POST ,1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, 'json='.$this->_json_encode($postdata));\n\t\tcurl_setopt($ch, CURLOPT_HEADER ,0); \n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER ,1);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT ,10);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\t\t\n\n\t\t$return_data = curl_exec($ch);\n\n\t\treturn $return_data;\n\t}", "public function postsAction() {\n\n $params = $this->_request->getParams();\n $this->view->ajax_post = isset($params['ajax_post']) ? TRUE : FALSE;\n\n //Добавим путь к действию\n $this->_breadcrumbs->addStep($this->Translate('Список сообщений в блогах'));\n }", "public function handle($postData){\r\n\t\t\r\n\t}", "public function sendChunk($data)\n {\n $cmd = \"$this->curlPath -X POST\";\n\n foreach ($this->getApiHeaders() as $name => $value) {\n $cmd .= \" --header \\\"$name: $value\\\"\";\n }\n\n $escapedData = $this->escapeArg($data);\n\n $cmd .= \" --data '$escapedData' '\".$this->config->getUrl().\"' --max-time 5\";\n if ($this->proxy) {\n $cmd .= \" --proxy '$this->proxy'\";\n }\n\n // return immediately while curl will run in the background\n $cmd .= ' > /dev/null 2>&1 &';\n\n $output = array();\n $r = exec($cmd, $output, $result);\n\n if ($result !== 0) {\n // curl returned some error\n error_log(date('Y-m-d H:i:s').\" - [Error] [\".get_class($this).\"] $result \");\n }\n }", "public function actionSendMessage() {\n\n // get data, sent by client\n $data = Yii::app()->request->getPost('chat', array());\n\n // try to store message\n $model = new Chat();\n $result = $model->storeMessage($data);\n\n // prepare return array, set status\n $response = array(\n 'status' => (bool)$result\n );\n\n // encode return array\n echo json_encode($response);\n\n // force app to end\n Yii::app()->end();\n\t}", "public function start_call()\n {\n if (post_data('tokbox_session_key') == NULL || post_data('tokbox_token') == NULL)\n {\n exit(json_encode(array('status' => '0')));\n }\n\n $this->session->set_userdata('tokbox_data', post_data());\n exit(json_encode(array('status' => '1')));\n }", "public function iSendARequestWithBody($method, $url, PyStringNode $string)\n {\n $url = $this->prepareUrl($url);\n $string = $this->replacePlaceHolder(trim($string));\n $this->request = new Request($method, $url, $this->getHeaders(), $string);\n\n $this->sendRequest();\n }", "public function sendCurl() {\n\t\t$this->curlResponse = $this->curl->exec();\n\t}", "public function send()\n\t{\n\t\t$message = $this->message ?: ucwords($this->getSystemUser()).' ran the ['.$this->task.'] task.';\n\n\t\t$payload = ['text' => $message, 'channel' => $this->channel];\n\n Request::post(\"https://{$this->team}.slack.com/services/hooks/incoming-webhook?token={$this->token}\")->sendsJson()->body($payload)->send();\n\t}", "function ticketbud_http_post($request, $host, $path, $port = 80, $ip=null) {\n\tglobal $wp_version;\n\t\n\t$ticketbud_version = constant('TICKETBUD_VERSION');\n\n\t$http_request = \"POST $path HTTP/1.0\\r\\n\";\n\t$http_request .= \"Host: $host\\r\\n\";\n\t$http_request .= \"Content-Type: application/x-www-form-urlencoded; charset=\" . get_option('blog_charset') . \"\\r\\n\";\n\t$http_request .= \"Content-Length: \" . strlen($request) . \"\\r\\n\";\n\t$http_request .= \"User-Agent: WordPress/$wp_version | Ticketbud/$ticketbud_version\\r\\n\";\n\t$http_request .= \"\\r\\n\";\n\t$http_request .= $request;\n\t\n\t$http_host = $host;\n\t// use a specific IP if provided - needed by ticketbud_check_server_connectivity()\n\tif ( $ip && long2ip(ip2long($ip)) ) {\n\t\t$http_host = $ip;\n\t} else {\n\t\t$http_host = ticketbud_get_host($host);\n\t}\n\n\t$response = '';\n\tif( false != ( $fs = @fsockopen($http_host, $port, $errno, $errstr, 10) ) ) {\n\t\tfwrite($fs, $http_request);\n\n\t\twhile ( !feof($fs) )\n\t\t\t$response .= fgets($fs, 1160); // One TCP-IP packet\n\t\tfclose($fs);\n\t\t$response = explode(\"\\r\\n\\r\\n\", $response, 2);\n\t}\n\treturn $response;\n}", "function hsend_post(&$app, &$c) {\n\t\t$app->logger->debug(sprintf('%s::%s', __CLASS__, __FUNCTION__));\n\n\t\t$this->_http->setMethod(HTTP_REQUEST_METHOD_POST);\n\n\t\t$this->_http->setURL($c->param('app.view_http.request.uri'));\n\n\t\t$this->_set_basic_auth($app, $c);\n\n\t\t$this->_load_post_params($app, $c);\n\n\t\t$this->_load_headers($app, $c);\n\n\t\t$this->_load_body($app, $c);\n\n\t\t$this->_load_files($app, $c);\n\n\t\t$this->_http->sendRequest();\n\n\t\t$this->_handler_response($app, $c);\n\n\t\treturn $app->status->handled;\n\t}", "public function seen_notification_post()\n\t{ \n\t\tif($_SERVER['REQUEST_METHOD'] == \"POST\"){\n \t// Get data\n\t\t\tif(isset($_POST)){\n\t\t\t\t$permission=false;\n\t\t\t\t$token= isset($_POST['token']) ?($_POST['token']) : \"\";\n\t\t\t\t$permission=$this->matchAppToken($token);\n\t\t\t\tif($permission==true){\n\t\t\t\t\t$notification_id= isset($_POST['notification_id']) ?($_POST['notification_id']) : \"\";\n\t\t\t\t\tif($notification_id!=''){\n\t\t\t\t\t\t$response=$this->advance_notification_model->seen_notification($notification_id);\t\n\t\t\t\t\t\tif($response){\n\t\t\t\t\t\t\t$json = array(\"status\" => 1, \"message\" => \"Ok\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Somthing went wrong. Please try again later\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Notification ID has been empty.\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Token has been not matched\");\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request has been uncompleted\");\n\t\t\t}\n\t\t}else{\n\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request method not accepted\");\n\t\t}\n\t\t$this->response($json, REST_Controller::HTTP_OK);\n\t}", "function post_request($url, $port, $dataid, $tStamp, $encodedSignature, $data, $referer = '')\n {\n //$data = http_build_query($data);\n\n // parse the given URL\n $url = parse_url($url);\n\n if ($url['scheme'] != 'http') {\n die('Error: Only HTTP request are supported !');\n }\n\n // extract host and path:\n $host = $url['host'];\n $path = $url['path'];\n\n // open a socket connection on port 80 - timeout: 50 sec\n $fp = fsockopen($host, $port, $errno, $errstr, 50);\n\n if ($fp) {\n\n // send the request headers:\n fputs($fp, \"POST $path HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: $host\\r\\n\");\n\n if ($referer != '')\n fputs($fp, \"Referer: $referer\\r\\n\");\n\n fputs($fp, \"x-cons-id: \" . $dataid . \"\\r\\n\");\n fputs($fp, \"x-timestamp: \" . $tStamp . \"\\r\\n\");\n fputs($fp, \"x-signature: \" . $encodedSignature . \"\\r\\n\");\n fputs($fp, \"Content-Type: application/x-www-form-urlencoded\\r\\n\");\n fputs($fp, \"Content-length: \" . strlen($data) . \"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n fputs($fp, $data);\n\n $result = '';\n while (!feof($fp)) {\n // receive the results of the request, 128 char\n $result .= fgets($fp, 128);\n }\n } else {\n return array(\n 'status' => 'err',\n 'error' => \"$errstr ($errno)\"\n );\n }\n\n // close the socket connection:\n fclose($fp);\n\n // split the result header from the content\n $result = explode(\"\\r\\n\\r\\n\", $result, 2);\n $header = isset($result[0]) ? $result[0] : '';\n $content = isset($result[1]) ? $result[1] : '';\n\n // return as structured array:\n return array(\n 'status' => 'ok',\n 'header' => $header,\n 'content' => $content\n );\n\n }" ]
[ "0.6692927", "0.6465889", "0.6213722", "0.60436106", "0.6004042", "0.59809446", "0.59677315", "0.5885979", "0.585215", "0.5833294", "0.58284706", "0.5779115", "0.5779115", "0.5779115", "0.57677656", "0.5761235", "0.57610977", "0.5758346", "0.5729671", "0.5720278", "0.5714129", "0.57109725", "0.5704098", "0.5663497", "0.5662578", "0.56624526", "0.56553346", "0.56347257", "0.56324196", "0.5622525", "0.562198", "0.5600308", "0.55773115", "0.55708283", "0.55698574", "0.55512875", "0.55266565", "0.5510042", "0.5505093", "0.54958355", "0.5495824", "0.5495824", "0.5495824", "0.5495824", "0.5495824", "0.5495824", "0.5495824", "0.5495824", "0.5495824", "0.5495824", "0.5495824", "0.54954207", "0.5474395", "0.5467565", "0.54610556", "0.54520196", "0.54520196", "0.544974", "0.5444427", "0.5441567", "0.5422316", "0.54213476", "0.541036", "0.5376089", "0.5369247", "0.5357499", "0.5354194", "0.5331947", "0.533053", "0.53143924", "0.53142476", "0.53107375", "0.5297383", "0.5292078", "0.5283707", "0.5276101", "0.527536", "0.5270725", "0.5250997", "0.5250714", "0.5247248", "0.5246961", "0.5246961", "0.5246961", "0.5246961", "0.5246961", "0.52449983", "0.5239093", "0.522318", "0.5213211", "0.5208771", "0.5205645", "0.5204352", "0.51988935", "0.5197049", "0.5186272", "0.5186085", "0.51756823", "0.5173951", "0.51721305" ]
0.6164959
3
Provides form data from the serialized data.
public function unserialize(string $serializedData): array { $encodedFields = $this->serializer->unserialize($serializedData); if (!is_array($encodedFields)) { throw new \InvalidArgumentException('Unable to unserialize value.'); } $formData = []; foreach ($encodedFields as $item) { $decodedFieldData = []; parse_str($item, $decodedFieldData); $formData = array_replace_recursive($formData, $decodedFieldData); } return $formData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_data()\n {\n return $this->form_data;\n }", "protected function loadFormData(){\n\t\t\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_egoi.edit.egoi.data', array());\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t\t$data = $this->getData(); \n \n return $data;\n\t}", "protected function loadFormData() {\r\n\t\t// Check the session for previously entered form data.\r\n\t\t$data = JFactory::getApplication()->getUserState('com_flexicontent.edit.'.$this->getName().'.data', array());\r\n\r\n\t\tif (empty($data)) {\r\n\t\t\t$data = $this->getItem();\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "protected function loadFormData()\n {\n $data = $this->getData();\n $this->preprocessData('com_ketshop.registration', $data);\n\n return $data;\n }", "protected function loadFormData() {\n $data = $this->getData();\n\n return $data;\n }", "protected function loadFormData()\n {\n $app = JFactory::getApplication();\n $data = $app->getUserState('com_jvisualcontent.edit.extrafield.data', array());\n\n if (empty($data)) {\n $data = $this->getItem();\n }\n\n $this->preprocessData('com_jvisualcontent.extrafield', $data);\n\n return $data;\n }", "protected function loadFormData() \r\n\t{\r\n\t\t// Check the session for previously entered form data.\r\n\t\t$data = JFactory::getApplication()->getUserState('com_ktbtracker.edit.' . $this->getName() . '.data', array());\r\n\t\t\r\n\t\t// Attempt to get the record from the database\r\n\t\tif (empty($data)) {\r\n\t\t\t$data = $this->getItem();\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "protected function loadFormData()\n\t\t{\n\t\t\t\t// Check the session for previously entered form data.\n\t\t\t\t$data = JFactory::getApplication()->getUserState('com_helloworld.edit.' . $this->context . '.data', array());\n\t\t\t\tif (empty($data))\n\t\t\t\t{\n\t\t\t\t\t\t$data = $this->getItem();\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t}", "protected function loadFormData()\n\t{\n\t\t// get data which the user previously entered into the form\n\t\t// the context 'com_u3abooking.edit.booking.data' is set in FormController\n\t\t$data = Factory::getApplication()->getUserState(\n\t\t\t'com_u3abooking.edit.booking.data',\n\t\t\tarray()\n\t\t);\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = Factory::getApplication()->getUserState('com_tkdclub.email.data', array());\n\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t\t$data = $this->getData();\n\n\t\t$this->preprocessData('com_volunteers.registration', $data);\n\n\t\treturn $data;\n\t}", "protected function loadFormData() {\n // Check the session for previously entered form data.\n $data = JFactory::getApplication()->getUserState('com_easysdi_processing.edit.order.data', array());\n\n if (empty($data)) {\n $data = $this->getItem();\n }\n\n return $data;\n }", "protected function loadFormData()\r\n {\r\n // Check the session for previously entered form data.\r\n $app = JFactory::getApplication();\r\n $data = $app->getUserState('com_data.edit.email.data', array());\r\n\r\n if (empty($data))\r\n {\r\n $data = $this->getItem();\r\n\r\n // Pre-select some filters (Status, Category, Language, Access) in edit form if those have been selected in Article Manager: Articles\r\n if ($this->getState('email.id') == 0)\r\n {\r\n $filters = (array) $app->getUserState('com_data.emails.filter');\r\n $data->set(\r\n 'state',\r\n $app->input->getInt(\r\n 'state',\r\n ((isset($filters['published']) && $filters['published'] !== '') ? $filters['published'] : null)\r\n )\r\n );\r\n\r\n $data->set('language', $app->input->getString('language', (!empty($filters['language']) ? $filters['language'] : null)));\r\n $data->set('access',\r\n $app->input->getInt('access', (!empty($filters['access']) ? $filters['access'] : JFactory::getConfig()->get('access')))\r\n );\r\n }\r\n }\r\n\r\n // If there are params fieldsets in the form it will fail with a registry object\r\n if (isset($data->params) && $data->params instanceof Registry)\r\n {\r\n $data->params = $data->params->toArray();\r\n }\r\n\r\n $this->preprocessData('com_data.email', $data);\r\n\r\n return $data;\r\n }", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_tjucm.edit.item.data', array());\n\n\t\tif (empty($data))\n\t\t{\n\t\t\tif ($this->item === null)\n\t\t\t{\n\t\t\t\t$this->item = $this->getItem();\n\t\t\t}\n\n\t\t\t$data = $this->item;\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function loadFormData() {\n // Check the session for previously entered form data.\n $data = JFactory::getApplication()\n ->getUserState('com_rotator.edit.block.data', []);\n if (empty($data)) {\n $data = $this->getItem();\n }\n return $data;\n }", "protected function loadFormData() \r\n\t{\r\n\t\t// Check the session for previously entered form data.\r\n\t\t$data = JFactory::getApplication()->getUserState('com_bigbluebutton.edit.meeting.data', array());\r\n\r\n\t\tif (empty($data))\r\n\t\t{\r\n\t\t\t$data = $this->getItem();\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_sfs.edit.rentalcar.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\t\t\t\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t $data = Factory::getApplication()->getUserState(\n\t\t\t'com_dinning_philosophers.edit.dinning_philosophers.data',\n\t\t\tarray()\n\t\t);\n\t\tif(empty($data))\n\t\t{\n\t\t\t$data=$this->getItem();\n\t\t}\n\t\treturn $data;\n\t}", "protected function getFormData() {\n\t\treturn $this->stripNonPrintables(json_decode($this->request->postVar('Details'), true));\n\t}", "protected function loadFormData()\n\t{\n\t\t$data = Factory::getApplication()->getUserState(\n\t\t\t'com_bookingmanager.edit.customer.data',\n\t\t\tarray()\n\t\t);\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function loadFormData() \r\n {\r\n $data = JFactory::getApplication()->getUserState('com_odyssey.edit.order.data', array());\r\n\r\n if(empty($data)) {\r\n $data = $this->getItem();\r\n }\r\n\r\n return $data;\r\n }", "protected function loadFormData() {\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_cp.edit.cptourismtype.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t\t$data = Factory::getApplication()->getUserState(\n\t\t\t'com_jed.edit.review.data', []\n\t\t);\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "public function getFormData()\n {\n $data = $this->getData('form_data');\n if ($data === null) {\n $formData = $this->_customerSession->getCustomerFormData(true);\n $data = new \\Magento\\Framework\\DataObject();\n if ($formData) {\n $data->addData($formData);\n $linkedinProfile = ['linkedin_profile' => $this->_customerSession->getLinkedinProfile()];\n $data->addData($linkedinProfile);\n $data->setCustomerData(1);\n }\n if (isset($data['region_id'])) {\n $data['region_id'] = (int)$data['region_id'];\n }\n $this->setData('form_data', $data);\n }\n return $data;\n }", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_extporter.edit.extension.data', array());\n\t\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_solidres.edit.reservationasset.data', array());\n\n\t\tif (empty($data))\n {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n // Get the dispatcher and load the users plugins.\n\t\t$dispatcher\t= JEventDispatcher::getInstance();\n\t\tJPluginHelper::importPlugin('solidres');\n\n // Trigger the data preparation event.\n\t\t$results = $dispatcher->trigger('onReservationAssetPrepareData', array('com_solidres.reservationasset', $data));\n\n // Check for errors encountered while preparing the data.\n\t\tif (count($results) && in_array(false, $results, true))\n {\n\t\t\t$this->setError($dispatcher->getError());\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_solidres.edit.tariff.data', array());\n\n\t\tif (empty($data))\n {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function loadFormData() \n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_squadmanagement.edit.war.data', array());\n\t\tif (empty($data)) \n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_projectfork.edit.project.data', array());\n\n\t\tif(empty($data)) $data = $this->getItem();\n\n\t\treturn $data;\n\t}", "protected function loadFormData()\n {\n // Check the session for previously entered form data.\n $app = JFactory::getApplication();\n $data = $app->getUserState('com_jtransport.config.data', array());\n\n if (empty($data))\n {\n $data = $this->getItem();\n }\n\n return $data;\n }", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState(\n\t\t\t'com_booking.edit.period.data',\n\t\t\t[]\n\t\t);\n\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "public function getFormData()\n {\n return $this->form->getData();\n }", "protected function loadFormData(){\n // Check the session for previously entered form data.\n $data = JFactory::getApplication()->getUserState($this->option.'.edit.profile.data', array());\n \n if(empty($data)){\n $data = $this->getItem();\n }\n \n return $data;\n }", "function loadFormData() \n\t{\n\t\t$data = JFactory::getApplication()->getUserState(\"$this->option.edit.\".$this->getName().\".data\", array());\n\t\tif (empty($data)) \n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\t\n\t\t$this->preprocessData('com_<#= StrConv(Value(\"Extension.name\"), VbStrConv.Lowercase) #>.<#= StrConv(Value(\"Task.nameObject\"), VbStrConv.Lowercase) #>', $data);\n\t\treturn $data;\n\t}", "public function getFormdata() {\n $formdata = array();\n\n foreach($this->elements as $element) {\n $key = $element['object']->getName();\n $value = $element['object']->getSubmittedValue();\n\n $formdata[$key] = $value;\n }\n\n return $formdata;\n }", "protected function loadFormData()\n {\n $data = JFactory::getApplication()->getUserState('com_labgeneagrogene.requests.data', array());\n\n if (empty($data)) {\n $id = JFactory::getApplication()->input->get('id');\n $data = $this->getData($id);\n }\n\n return $data;\n }", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_hwdmediashare.edit.album.data', array());\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_judges.edit.judge.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t$data \t\t\t\t\t\t= $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_joaktree.edit.location.data', array());\n\n\t\tif (empty($data)) {\t\t\n\t\t\t$data = $this->getItem();\n\t\t\t$data->resultValue2 = $data->resultValue;\n\t\t}\n\n\t\treturn $data;\n\t}", "public function formdata()\n {\n return Formdata::getinstance();\n }", "public function get_data() {\n $data = parent::get_data();\n\n if (!empty($data)) {\n $data->settings = $this->tool->form_build_settings($data);\n }\n\n return $data;\n }", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState($this->context, new stdClass);\n\n\t\t// Pre-create the list options\n\t\tif (!property_exists($data, 'list'))\n\t\t{\n\t\t\t$data->list = [];\n\t\t}\n\n\t\tif (!property_exists($data, 'filter'))\n\t\t{\n\t\t\t$data->filter = [];\n\t\t}\n\n\t\t// Joomla doesn't fill these correctly but requires some of them\n\t\t$data->list['fullordering'] = $this->state->get('list.fullordering',\n\t\t\t\"$this->defaultOrdering $this->defaultDirection\");\n\t\t$data->list['ordering'] = $this->state->get('list.ordering', $this->defaultOrdering);\n\t\t$data->list['direction'] = $this->state->get('list.direction', $this->defaultDirection);\n\t\t$data->list['limit'] = $this->state->get('list.limit', $this->defaultLimit);\n\t\t$data->list['start'] = $this->state->get('list.start', $this->defaultStart);\n\n\t\t// Set default values for filters\n\t\tforeach ($this->defaultFilters as $name => $defaultValue)\n\t\t{\n\t\t\t$data->filter[$name] = $this->state->get('filter.' . $name, $defaultValue);\n\t\t}\n\n\t\treturn $data;\n\t}", "public function getFormData()\n {\n return $this->_getApi()->getFormFields($this->_getOrder(), $this->getRequest()->getParams());\n }", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$app = JFactory::getApplication();\n\t\t$data = $app->getUserState('com_cooltouraman.edit.course.data', array());\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\n\t\t\t// Pre-select some filters (Status, Category, Language, Access) in edit form if those have been selected in Article Manager: Articles\n\t\t\tif ($this->getState('course.id') == 0)\n\t\t\t{\n\t\t\t\t$filters = (array) $app->getUserState('com_cooltouraman.course.filter');\n\t\t\t\t$data->set(\n\t\t\t\t\t'state',\n\t\t\t\t\t$app->input->getInt(\n\t\t\t\t\t\t'state',\n\t\t\t\t\t\t((isset($filters['published']) && $filters['published'] !== '') ? $filters['published'] : null)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$data->set('catid', $app->input->getInt('catid', (!empty($filters['category_id']) ? $filters['category_id'] : null)));\n\t\t\t\t$data->set('language', $app->input->getString('language', (!empty($filters['language']) ? $filters['language'] : null)));\n\t\t\t\t$data->set('access', $app->input->getInt('access', (!empty($filters['access']) ? $filters['access'] : JFactory::getConfig()->get('access'))));\n\t\t\t}\n\t\t}\n\n\t\t// If there are params fieldsets in the form it will fail with a registry object\n\t\tif (isset($data->params) && $data->params instanceof Registry)\n\t\t{\n\t\t\t$data->params = $data->params->toArray();\n\t\t}\n\n\t\t$this->preprocessData('com_cooltouraman.course', $data);\n\n\t\treturn $data;\n\t}", "protected function loadFormData(){\n\t\t$app = JFactory::getApplication();\n\t\t$data = $app->getUserState('mytest.login.form.data', array());\n\t\treturn $data;\n\t}", "protected function _readFormFields() {}", "public function getRichFormdata() {\n $formdata = array();\n\n foreach($this->elements as $element) {\n $key = $element['object']->getName();\n\n $value = array (\n \t'value' => $element['object']->getSubmittedValue(),\n \t'description' => $element['object']->getDescription()\n );\n\n $formdata[$key] = $value;\n }\n\n return $formdata;\n }", "protected function loadFormData() \n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_mams.edit.auth.data', array());\n\t\tif (empty($data)) \n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t\tif ($this->getState('auth.auth_id') == 0) {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "private function prepare_form_data()\n {\n $form_data = array(\n 'email' => array(\n 'name' => 'email',\n 'options' => array(\n '' => '--',\n ),\n 'extra' => array('id'=>'login-email', 'autofocus'=>''),\n ),\n 'password' => array(\n 'name' => 'password',\n 'options' => array(\n '' => '--',\n ),\n 'extra' => array('id'=>'login-password'),\n ),\n\n 'lbl-email' => array(\n 'target' => 'email',\n 'label' => 'E-mail Address',\n ),\n 'lbl-password' => array(\n 'target' => 'password',\n 'label' => 'Password',\n ),\n\n 'btn-submit' => array(\n 'value' => 'Login',\n 'extra' => array(\n 'class' => 'btn btn-primary',\n ),\n ),\n );\n\n return \\DG\\Utility::massage_form_data($form_data);\n }", "public function formData()\n {\n return array(\n 'id' => $this->_id,\n 'name' => $this->_name,\n 'content' => $this->_content,\n 'categoryId' => $this->_category_id,\n 'userId' => $this->_user_id\n );\n }", "protected function loadFormData()\r\n {\r\n $data = JFactory::getApplication()->getUserState('com_travelentity.edit.country.data', array());\r\n if(empty($data)){\r\n $data = $this->getItem();\r\n }\r\n\r\n\r\n return $data;\r\n }", "public function getFormData()\n {\n return $_POST;\n }", "protected function loadFormData()\n\t{\n\t}", "public function toFormData()\n {\n $data = $this->toArray();\n return $data;\n }", "public function toFormData()\n {\n $data = $this->toArray();\n return $data;\n }", "private function getFormisimoData()\n\t{\n\t\t//Get the data submitted by the tracking widget script\n\t\t$submitted = $this->getSubmittedData();\n\n\t\t/*\n\t\t * We flip the required array so we can compare\n\t\t * keys with the submitted data keys.\n\t\t */\n\t\t$required = array_flip($this->required);\n\n\t\t/*\n\t\t * Check whether the submitted data contains all of the required data.\n\t\t * The $diff will let us know data is missing.\n\t\t */\n\t\t$diff = array_diff_key($required, $submitted);\n\n\t\t/*\n\t\t * If difference is not empty then we are missing some of the\n\t\t * required data so stop execution and log the submitted data so we can debug.\n\t\t */\n\t\tif ( ! empty($diff))\n\t\t{\n\t\t\tthrow new Exception('Required Data Missing. Data: ' . json_encode($submitted));\n\t\t}\n\n\t\t/*\n\t\t * Just to be safe we will remove any extra data included\n\t\t * in the submitted data that is not required. This is an extra\n\t\t * security measure to ensure we are not accidently passing any rogue\n\t\t * data through to Formisimo\n\t\t */\n\t\t$data = array_intersect_key($submitted, $required);\n\n\t\t/*\n\t\t * Add the conversion key to the data\n\t\t * as Formisimo do in their conversion script\n\t\t */\n\t\t$data['conversion'] = true;\n\t\treturn $data;\n\t}", "function readForm() {\n\t\t$this->FiscaalGroepID = $this->formHelper(\"FiscaalGroepID\", 0);\n\t\t$this->FiscaalGroupType = $this->formHelper(\"FiscaalGroupType\", 0);\n\t\t$this->GewijzigdDoor = $this->formHelper(\"GewijzigdDoor\", 0);\n\t\t$this->GewijzigdOp = $this->formHelper(\"GewijzigdOp\", \"\");\n\t}", "public function prepareForm()\n {\n // Searching for the data to populate the Form\n\n // Adding default value to the list\n\n // Setting the lists in $data array\n $data = [\n ];\n\n //dd($data);\n\n return $data;\n }", "public function getDataAsArray()\n {\n $fields = $this->getFields();\n\n if (!$fields) {\n return [];\n }\n\n $result = [];\n\n foreach ($fields as $field) {\n //ignore non-fields\n if (!$field instanceof AbstractFormField) {\n continue;\n }\n\n // if a field is disabled, we will ignore the field and only set an empty string as value\n if ($field->isDisabled()) {\n if (!array_key_exists($field->getName(), $result)) {\n $result[$field->getName()] = '';\n }\n continue;\n }\n\n\n if ($field instanceof CheckBox) {\n $result[$field->getName()] = $field->isChecked() ? $field->getValue() : '';\n } elseif ($field instanceof RadioButton) {\n // if the field is not checked...\n if (!$field->isChecked()) {\n // there was no other field with the same name yet\n if (!array_key_exists($field->getName(), $result)) {\n // then set the field with an empty value\n $result[$field->getName()] = '';\n }\n } // the field is checked\n else {\n $result[$field->getName()] = $field->getValue();\n }\n } elseif ($field instanceof UploadField) {\n $value = $field->getValue();\n if (!$value ||\n !isset($value['error']) ||\n $value['error'] == UPLOAD_ERR_NO_FILE ||\n empty($value['name'])\n ) {\n continue;\n }\n $result[$field->getName()] = $value['name'];\n } elseif ($field instanceof AbstractFormField) {\n $result[$field->getName()] = $field->getValue();\n }\n }\n return $result;\n }", "public function getData()\n\t{\n if ( is_string($this->_data) ) {\n return $this->_data; \n }\n\t\telse \n return $this->_internal_request->to_postdata();\n\t}", "public function unserialize($data) {}", "protected function loadFormData() \n {\n\t\t\techo '<br/> **************************************************************';\n\t\t echo '<br/> model VISTA -> funcion loadFormData\t\t\t\t ';\n\t\t echo '<br/> ************************************************************** <br/>';\n //Compruebe la sesión de datos de formularios previamente introducidos.\n $data = JFactory::getApplication()->getUserState('com_codigorecibo.edit.vista.data', array());\n if (empty($data)) \n {\n $data = $this->getItem();\n echo '///////////////////////////////////////////////////////////////////';\n echo '<br/>DENTRO model vista -> data en funcion loadFormData '.$data;\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n echo '/////////////////////////////////////////////////////////////////////';\n // Prime some default values.\n //getstate cojo el id del registro indicando la vista en la que estoy\n\t\t\t\t\t\t\t\t\t//~ if ($this->getState('vista.id') == 0) \n\t\t\t\t\t\t\t\t\t//~ {\n\t\t\t\t\t\t\t\t\t\t//~ $id = $this->getState('vista.id');\n\t\t\t\t\t\t\t\t\t\t//~ echo '<br/> estado Model Vista --> funcion load --> '.$estado;\n\t\t\t\t\t\t\t\t\t\t//~ \n\t\t\t\t\t\t\t\t\t//~ }\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n \n }\n //data = los datos del registro\n $view = $_GET['view'];\n $layout =$_GET['layout'];\n echo '<br/>DEVUELVE = '.$view.'--'.$layout.' ------- model vista -> data en funcion loadFormData '.$data;\n //~ echo '<pre>';\n //~ print_r($this);\n //~ echo '</pre>';\n \n return $data;\n }", "public function prepareForm()\n {\n // Searching for the data to populate the Form\n $client = new Client();\n $street_type = new StreetType();\n $state = new State();\n\n // Adding default value to the list\n $clients = $client->getSelectList();\n $street_types = $street_type->getSelectList();\n $states = $state->getSelectList();\n\n // Setting the lists in $data array\n $data = [\n 'clients' => $clients,\n 'street_types' => $street_types,\n 'states' => $states,\n ];\n\n //dd($data);\n\n return $data;\n }", "function unserialize($data){\r\n\t\t$data = unserialize($data);\r\n\t\t$this -> firstName = $data['first'];\r\n\t\t$this -> lastName = $data['last'];\r\n\t}", "protected function getInputData ()\n {\n (new HCRivilePaymentsValidator())->validateForm();\n\n $_data = request()->all();\n\n if (array_has($_data, 'id'))\n array_set($data, 'record.id', array_get($_data, 'id'));\n\n array_set($data, 'record.COUNT', array_get($_data, 'COUNT'));\n array_set($data, 'record.I04_KODAS_CH', array_get($_data, 'I04_KODAS_CH'));\n array_set($data, 'record.I04_DOK_NR', array_get($_data, 'I04_DOK_NR'));\n array_set($data, 'record.I04_OP_RUSIS', array_get($_data, 'I04_OP_RUSIS'));\n array_set($data, 'record.I04_OP_TIPAS', array_get($_data, 'I04_OP_TIPAS'));\n array_set($data, 'record.I04_OP_STORNO', array_get($_data, 'I04_OP_STORNO'));\n array_set($data, 'record.I04_OP_DATA', array_get($_data, 'I04_OP_DATA'));\n array_set($data, 'record.I04_KODAS_SS', array_get($_data, 'I04_KODAS_SS'));\n array_set($data, 'record.I04_MOKETOJAS', array_get($_data, 'I04_MOKETOJAS'));\n array_set($data, 'record.I04_KODAS_KS', array_get($_data, 'I04_KODAS_KS'));\n array_set($data, 'record.I04_PAV', array_get($_data, 'I04_PAV'));\n array_set($data, 'record.I04_ADR', array_get($_data, 'I04_ADR'));\n array_set($data, 'record.I04_ATSTOVAS', array_get($_data, 'I04_ATSTOVAS'));\n array_set($data, 'record.I04_KODAS_VS', array_get($_data, 'I04_KODAS_VS'));\n array_set($data, 'record.I04_SUMA', array_get($_data, 'I04_SUMA'));\n array_set($data, 'record.I04_SUMA_DSK', array_get($_data, 'I04_SUMA_DSK'));\n array_set($data, 'record.I04_SUMA_PLK', array_get($_data, 'I04_SUMA_PLK'));\n array_set($data, 'record.I04_PASTABOS', array_get($_data, 'I04_PASTABOS'));\n array_set($data, 'record.I04_PERKELTA', array_get($_data, 'I04_PERKELTA'));\n array_set($data, 'record.I04_IMP_EXP', array_get($_data, 'I04_IMP_EXP'));\n array_set($data, 'record.I04_KODAS_VL', array_get($_data, 'I04_KODAS_VL'));\n array_set($data, 'record.I04_SUMA_VAL', array_get($_data, 'I04_SUMA_VAL'));\n array_set($data, 'record.I04_KOEF', array_get($_data, 'I04_KOEF'));\n array_set($data, 'record.I04_USERIS', array_get($_data, 'I04_USERIS'));\n array_set($data, 'record.I04_R_DATE', array_get($_data, 'I04_R_DATE'));\n array_set($data, 'record.I04_ADDUSR', array_get($_data, 'I04_ADDUSR'));\n array_set($data, 'record.I04_KODAS_SM', array_get($_data, 'I04_KODAS_SM'));\n array_set($data, 'record.I04_APRASYMAS', array_get($_data, 'I04_APRASYMAS'));\n array_set($data, 'record.I04_SUMA_PER', array_get($_data, 'I04_SUMA_PER'));\n array_set($data, 'record.I04_SUMA_WK', array_get($_data, 'I04_SUMA_WK'));\n array_set($data, 'record.I04_KODAS_LS_1', array_get($_data, 'I04_KODAS_LS_1'));\n array_set($data, 'record.I04_KODAS_LS_2', array_get($_data, 'I04_KODAS_LS_2'));\n array_set($data, 'record.I04_KODAS_LS_3', array_get($_data, 'I04_KODAS_LS_3'));\n array_set($data, 'record.I04_KODAS_LS_4', array_get($_data, 'I04_KODAS_LS_4'));\n array_set($data, 'record.I04_KODAS_ZN', array_get($_data, 'I04_KODAS_ZN'));\n array_set($data, 'record.I04_BUSENA', array_get($_data, 'I04_BUSENA'));\n\n return makeEmptyNullable($data);\n }", "function getFormData($data, $include_dynamic=false)\n {\n $static_mapped_form_fields = $this->getMappedFormFields($include_dynamic); // get non-dynamic form fields\n $unique_data = array_intersect_key((array)$data, array_flip($static_mapped_form_fields));\n return $unique_data;\n }", "protected function getInputData()\n {\n (new HCECOrderAddressValidator())->validateForm();\n\n $_data = request()->all();\n\n if( array_has($_data, 'id') )\n array_set($data, 'record.id', array_get($_data, 'id'));\n\n array_set($data, 'record.order_id', array_get($_data, 'order_id'));\n array_set($data, 'record.email', array_get($_data, 'email'));\n array_set($data, 'record.first_name', array_get($_data, 'first_name'));\n array_set($data, 'record.last_name', array_get($_data, 'last_name'));\n array_set($data, 'record.country', array_get($_data, 'country'));\n array_set($data, 'record.street_address', array_get($_data, 'street_address'));\n array_set($data, 'record.city', array_get($_data, 'city'));\n array_set($data, 'record.district', array_get($_data, 'district'));\n array_set($data, 'record.postal_code', array_get($_data, 'postal_code'));\n array_set($data, 'record.phone', array_get($_data, 'phone'));\n array_set($data, 'record.notes', array_get($_data, 'notes'));\n array_set($data, 'record.company_name', array_get($_data, 'company_name'));\n array_set($data, 'record.company_code', array_get($_data, 'company_code'));\n array_set($data, 'record.company_vat', array_get($_data, 'company_vat'));\n\n return $data;\n }", "public function WidgetSubmissionForm()\n {\n $formSectionData = new DataObject();\n $formSectionData->Form = $this->AddForm($this->extensionType);\n $formSectionData->Content = $this->dataRecord->AddContent;\n return $formSectionData;\n }", "public function getDataObject()\r\n {\r\n return $this->getElement()->getForm()->getDataObject();\r\n }", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n // All keys are srings in array, merge it with defaults to override\r\r\n $this->e_data = array_merge($this->default_options, $this->e_data);\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "private function parseInputValues()\r\n {\r\n parse_str(file_get_contents(\"php://input\"),$data);\r\n\r\n $data = reset($data);\r\n \r\n $data = preg_split('/------.*\\nContent-Disposition: form-data; name=/', $data);\r\n \r\n $this->inputValues = array();\r\n \r\n foreach($data as $input)\r\n {\r\n // get key\r\n preg_match('/\"([^\"]+)\"/', $input, $key);\r\n \r\n // get data\r\n $input = preg_replace('/------.*--/', '', $input);\r\n \r\n // Store to an array\r\n $this->inputValues[$key[1]] = trim(str_replace($key[0], '', $input));\r\n }\r\n }", "abstract protected function serializeData();", "public static function formData()\n {\n return [\n 'id',\n 'code',\n 'name',\n 'icon',\n 'position',\n 'link',\n 'parent_id' => [\n 'dropDownList' => [ 'list' => static::dataOptions('id', 'name') ]\n ],\n 'row_status' => [\n // 'radioList' => [ 'list' => [ 0 => 'Active', 1 => 'Disactive' ] ]\n 'dropDownList' => [ 'list' => [ 1 => 'Active', 0 => 'Disactive' ] ]\n ]\n ];\n }", "public function get_post_data() {\n\t\tforeach($this->form_fields as $form_field_key => $form_field_value) {\n\t\t\tif ($form_field_value['type'] == \"select_card_types\") {\n\t\t\t\t$form_field_key_select_card_types = $this->plugin_id . $this->id . \"_\" . $form_field_key;\n\t\t\t\t$select_card_types_values = array();\n\t\t\t\t$_POST[$form_field_key_select_card_types] = $select_card_types_values;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $this->data ) && is_array( $this->data ) ) {\n\t\t\treturn $this->data;\n\t\t}\n\t\treturn $_POST;\n\t}", "public function jsonSerialize()\n\t{\n\t\t$form = [\n\t\t\t'key' => $this->getFormKey(),\n\t\t\t'data' => $this->data,\n\t\t\t'schema' => $this->getSchema('frontend'),\n\t\t\t'theme' => $this->getTheme(),\n\t\t\t'columns' => $this->getColumns(),\n\t\t\t'class' => $this->class,\n\t\t\t'classes' => $this->classes,\n\t\t\t'labels' => $this->getLabels(),\n\t\t\t'layout' => $this->getLayout(),\n\t\t\t'formErrors' => $this->getFormErrors(),\n\t\t\t'buttons' => $this->getButtons(),\n\t\t\t'with' => $this->with,\n\t\t\t'messages' => $this->getMessages(),\n\t\t\t'locale' => $this->getLocale(),\n\t\t\t'endpoint' => $this->getEndpoint(),\n\t\t\t'method' => $this->getMethod(),\n\t\t\t'validateOn' => $this->getValidateOn(),\n\t\t];\n\n\t\treturn $form;\n\t}", "protected function serializeData($data) {\n return $data;\n }", "public function getForm($data = array(), $loadData = true)\n\t{\n\t}", "public function deserialize($data);", "public function from_form($data) {\n $data = $this->update_view_editors($data);\n\n return $data;\n }", "public static function mapFromForm(array $data): array\n {\n return $data['fields'];\n }", "public function getSubmittedData()\n\t{\n\t\t//Check we have received the Formisimo tracking data from the submission\n\t\t$data = isset($this->data['formisimo-tracking'])\n\t\t\t? $this->data['formisimo-tracking']\n\t\t\t: array(); //Default to empty array\n\n\t\treturn ! is_array($data)\n\t\t\t? (array) json_decode($data, true) //cast array in case json_decode fails\n\t\t\t: $data; //Just return the array\n\t}", "public function getSerializableData()\n {\n return [\n 'id' => $this->getId(),\n 'name' => $this->getName(),\n 'description' => $this->getDescription(),\n 'profile' => $this->getProfile(),\n 'salt' => $this->getSalt(),\n 'type' => $this->getType(),\n 'value' => $this->getValue(),\n ];\n }", "public function getSubmissionData()\n {\n return $this->data;\n }", "public function getSubmissionData()\n {\n return $this->data;\n }", "public function getSubmissionData()\n {\n return $this->data;\n }", "public function getSubmissionData()\n {\n return $this->data;\n }", "protected function loadFormData()\n {\n $data = JFactory::getApplication()->getUserState('com_tz_portfolio.config.data', array());\n\n if(empty($data) || count($data) == 0){\n\n $com = JComponentHelper::getComponent('com_tz_portfolio');\n $c_params = $com -> params;\n $data['tz_image_xsmall'] = $c_params -> get('tz_image_xsmall');\n $data['tz_image_small'] = $c_params -> get('tz_image_small');\n $data['tz_image_medium'] = $c_params -> get('tz_image_medium');\n $data['tz_image_large'] = $c_params -> get('tz_image_large');\n $data['tz_image_xlarge'] = $c_params -> get('tz_image_xlarge');\n $data['tz_image_gallery_xsmall']= $c_params -> get('tz_image_gallery_xsmall');\n $data['tz_image_gallery_small'] = $c_params -> get('tz_image_gallery_small');\n $data['tz_image_gallery_medium']= $c_params -> get('tz_image_gallery_medium');\n $data['tz_image_gallery_large'] = $c_params -> get('tz_image_gallery_large');\n $data['tz_image_gallery_xlarge']= $c_params -> get('tz_image_gallery_xlarge');\n }\n return $data;\n }", "private function parsed_data()\n {\n $parsed_data = array();\r\n\r\n //post data\r\n $parsed_data['name'] = $this->input->post(\"name\", TRUE);\r\n $parsed_data['email'] = $this->input->post(\"email\", TRUE);\r\n $parsed_data['countryID'] = $this->input->post(\"country\", TRUE);\r\n $parsed_data['phone'] = $this->input->post(\"phone\", TRUE);\r\n $parsed_data['message'] = $this->input->post(\"message\", TRUE);\r\n $parsed_data['IP'] = $this->input->ip_address();\r\n $parsed_data['browser'] = $this->input->user_agent();\r\n //post data\r\n\r\n return $parsed_data;\n }", "public function get_submitted_edit_form_data()\n\t{\n\t\t$this->credits = $_POST['credits'];\n\t\t$this->levelID = $_POST['level'];\t\n\t}", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "protected function loadFormData()\n {\n $presetTargetData = $this->mailer->getPresetTargetData();\n if ($this->request->isPost()) {\n $requestData = $this->request->getPost();\n foreach($requestData as $key=>$value) {\n if (!is_array($value)) {\n $this->formData[$key] = htmlspecialchars($value);\n } else {\n $this->formData[$key] = array_map('htmlspecialchars', $value);\n }\n }\n }\n\n if (empty($this->formData['preview']) && !isset($this->formData['send'])) {\n if (isset($this->formData['select_template']) && !empty($this->formData['select_template'])) {\n\n if ($template = $this->mailer->getTemplate($this->formData['select_template'])) {\n $this->formData['subject'] = $template['gctt_subject'];\n $this->formData['mailBody'] = $template['gctt_body'];\n }\n }\n }\n\n $this->formData['available_fields'] = $this->mailElements->displayMailFields($this->mailer->getMailFields());\n\n if (!empty($this->formData['subject']) || !empty($this->formData['mailBody'])) {\n $content = '[b]';\n $content .= $this->_('Subject:');\n $content .= '[/b] [i]';\n $content .= $this->mailer->applyFields($this->formData['subject']);\n $content .= \"[/i]\\n\\n\";\n $content .= $this->mailer->applyFields($this->formData['mailBody']);\n } else {\n $content = ' ';\n }\n $htmlView = \\MUtil_Html::create()->div();\n $textView = \\MUtil_Html::create()->div();\n\n $htmlView->div(array('class' => 'mailpreview'))->raw(\\MUtil_Markup::render($content, 'Bbcode', 'Html'));\n $textView->pre(array('class' => 'mailpreview'))->raw(\\MUtil_Markup::render($content, 'Bbcode', 'Text'));\n\n $this->formData['preview_html'] = $htmlView;\n $this->formData['preview_text'] = $textView;\n\n $this->formData = array_merge($this->formData, $presetTargetData);\n }", "protected function loadFormData()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$filters = $app->getUserState($this->context . '.filter', array());\n\t\t$error_dateformat = false;\n\n\t\tforeach ($filters as $key => $value)\n\t\t{\n\t\t\tif (strpos($key, '_dateformat') && !empty($value) && $this->isValidDate($value) == null)\n\t\t\t{\n\t\t\t\t$filters[$key] = '';\n\t\t\t\t$error_dateformat = true;\n\t\t\t}\n\t\t}\n\n\t\tif ($error_dateformat)\n\t\t{\n\t\t\t$app->enqueueMessage(JText::_(\"COM_ZVBUSCASOCIO_SEARCH_FILTER_DATE_FORMAT\"), \"warning\");\n\t\t\t$app->setUserState($this->context . '.filter', $filters);\n\t\t}\n\n\t\treturn parent::loadFormData();\n\t}", "public function getSubmissionData()\r\n {\r\n return $this->data;\r\n }", "function unserialize ( $data ) {\n return unserialize( $data );\n }", "public function to_form($data = null) {\n $data = $data ? $data : $this->data;\n\n // Prepare view editors.\n $data = $this->prepare_view_editors($data);\n\n return $data;\n }", "function ConvertToForm($data) {\n $outdata = array();\n foreach($data as $field){\n if($field[0]==\"select\") {\n $nextfield = '<select name=\"'.$field[1].'\">';\n $endtag = '</select>';\n } else {\n $nextfield = '<input type=\"'.$field[0].'\" name=\"'.$field[1].'\" ';\n $endtag = '/>';\n }\n\n if(!empty($field[2])){\n switch($field[0]){\n case \"select\":\n for ($i=0;$i<count($field[2]);$i++){\n $nextfield .= '<option value=\"'.$field[2][$i].'\">'.$field[2][$i].'</option>';\n }\n break;\n case \"radio\":\n case \"checkbox\":\n if($field[3]) $nextfield .= 'checked=\"checked\" ';\n case \"text\":\n default:\n $nextfield .= 'value=\"'.$field[2].'\" ';\n }\n }\n\n $nextfield .= $endtag;\n $outdata[]=$nextfield;\n }\n return $outdata;\n }", "protected function loadFormData()\n\t\t{\n\t\t\t$app = Factory::getApplication();\n\t\t\t$filters = $app->getUserState($this->context . '.filter', array());\n\t\t\t$error_dateformat = false;\n\t\t\tforeach ($filters as $key => $value)\n\t\t\t{\n\t\t\t\tif (strpos($key, '_dateformat') && !empty($value) && $this->isValidDate($value) == null)\n\t\t\t\t{\n\t\t\t\t\t$filters[$key] = '';\n\t\t\t\t\t$error_dateformat = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($error_dateformat)\n\t\t\t{\n\t\t\t\t$app->enqueueMessage(JText::_(\"COM_POLYUS_USERS_SEARCH_FILTER_DATE_FORMAT\"), \"warning\");\n\t\t\t\t$app->setUserState($this->context . '.filter', $filters);\n\t\t\t}\n\t\t\treturn parent::loadFormData();\n\t\t}", "protected function loadFormData()\n {\n try\n {\n $app = JFactory::getApplication();\n $filters = $app->getUserState($this->context . '.filter', array());\n $error_dateformat = false;\n\n foreach ($filters as $key => $value) {\n if (strpos($key, '_dateformat') && !empty($value) && $this->isValidDate($value) == null) {\n $filters[$key] = '';\n $error_dateformat = true;\n }\n }\n\n if ($error_dateformat) {\n $app->enqueueMessage(JText::_(\"COM_GM_CEILING_SEARCH_FILTER_DATE_FORMAT\"), \"warning\");\n $app->setUserState($this->context . '.filter', $filters);\n }\n\n return parent::loadFormData();\n }\n catch(Exception $e)\n {\n Gm_ceilingHelpersGm_ceiling::add_error_in_log($e->getMessage(), __FILE__, __FUNCTION__, func_get_args());\n }\n }", "public function preparePaymentData($data, $form)\n\t{\n\t\t$paymentData = $data[$this->owner->getFrontendFieldName()];\n\t\treturn $paymentData;\n\t}", "protected function fieldData()\n {\n if ($this->field_data_fetched === false) {\n $this->field_data = array(\n 'label' => 'Your date of birth',\n 'description' => 'Please enter your date of birth',\n 'placeholder' => 'dd/mm/yyyy',\n 'size' => 50,\n 'maxlength' => 10\n );\n\n $this->field_data_fetched = true;\n }\n }" ]
[ "0.7283632", "0.70722795", "0.70615685", "0.7052837", "0.7052104", "0.705208", "0.7050787", "0.69223285", "0.69103456", "0.6905013", "0.6903118", "0.6901854", "0.68706316", "0.68694234", "0.6822843", "0.6821098", "0.6801335", "0.6778762", "0.67722744", "0.6766456", "0.6746303", "0.67063016", "0.67017746", "0.6691307", "0.668217", "0.66743195", "0.66724515", "0.6661978", "0.66462225", "0.66120356", "0.6608536", "0.66012764", "0.65970707", "0.6595963", "0.6565918", "0.65475863", "0.65042305", "0.64770263", "0.6475623", "0.6457068", "0.64455754", "0.6440874", "0.6426193", "0.6401237", "0.63957804", "0.63214254", "0.6253941", "0.62534535", "0.6246902", "0.6241637", "0.6217173", "0.6194782", "0.6147248", "0.61376345", "0.613539", "0.613539", "0.61264247", "0.6068478", "0.6029845", "0.6025814", "0.6004962", "0.59756655", "0.5904528", "0.58995986", "0.58933276", "0.58770263", "0.5874666", "0.5846754", "0.58435154", "0.58312255", "0.5829199", "0.58254445", "0.58121324", "0.5806972", "0.5801351", "0.5785359", "0.5780673", "0.57641435", "0.57622", "0.5758709", "0.5748745", "0.5736335", "0.57028407", "0.5689536", "0.5689536", "0.5689536", "0.5689536", "0.56882656", "0.56881595", "0.5684433", "0.56794775", "0.5675029", "0.56675", "0.5638326", "0.5635871", "0.56301355", "0.56296813", "0.5629463", "0.5626851", "0.56113935", "0.5609462" ]
0.0
-1
Convert amount from to
public function convert($value, string $from, string $to): array { return Billingo::get('currency', [ 'from' => $from, 'to' => $to, 'value' => $value, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function convert($amount, Currency $currency);", "public function toMoney();", "function convertAmount($amount, $sourceCurrency, $destCurrency, $dateOfConversion) {\n\t$rateOfConversion = getExchangeRate($sourceCurrency, $destCurrency, $dateOfConversion);\n\treturn $amount * $rateOfConversion;\n}", "function bamiiConvertCurrency($amount, $from, $to){\n $conv_id = \"{$from}_{$to}\";\n $string = file_get_contents(\"https://free.currencyconverterapi.com/api/v5/convert?q=$conv_id&compact=y\");\n $json_a = json_decode($string, true);\n\n return $amount * $json_a[strtoupper($conv_id)]['val'];\n}", "public static function convert($amount, $from, $to){\n $data = file_get_contents(\"https://www.google.com/finance/converter?a=$amount&from=$from&to=$to\");\n preg_match(\"/<span class=bld>(.*)<\\/span>/\",$data, $converted);\n $converted = preg_replace(\"/[^0-9.]/\", \"\", $converted[1]);\n \n return round($converted, 2);\n }", "public static function convert($value, $from = '$', $to = 'U$S')\n\t{\n\t\t$currencyFrom = Currency::find($from);\n\t\t$currencyTo = Currency::find($to);\n\n\t\t$dollarValue = $value / $currencyFrom->value;\n\n\t\t$toValue = round($dollarValue * $currencyTo->value);\n\n\t\treturn $toValue;\n\t}", "function convertMoneyToCents($value){\n $value = preg_replace(\"/\\,/i\",\"\",$value);\n\n //to remove anything that is not a number, a dot or dash and replace it with an empty string\n $value = preg_replace(\"/([^0-9\\.\\-])/i\", \"\", $value);\n\n if(!is_numeric($value)){\n return 0.00;\n }\n\n $value = (float) $value;\n return round($value, 2) * 100;\n}", "public function convert($amount, $from, $to)\n {\n if (!isset($this->apiKey)) {\n throw new \\Exception('Api Key not found');\n }\n\n $amount = floatval($amount);\n $rate = $this->_getRateToUse($from, $to);\n\n return $this->_formatConvert($rate * $amount);\n }", "function amount($amount) {\n #print \"Amount: $amount<br>\\n\";\n\n list($integer, $desimal) = explode('.', trim($amount));\n $desimal = str_pad($desimal, 2, 0, STR_PAD_RIGHT);\n\n #print \"integer: $integer, desimal: $desimal<br>\\n\";\n \n #Should have been modules checksum on bank account here. \n $amount = trim($integer.$desimal);\n #print \"Amount adjusted: $amount<br>\\n\";\n return $amount;\n }", "public function freeConverter($amount, $from_currency, $to_currency)\n {\n\n $from_Currency = urlencode($from_currency);\n $to_Currency = urlencode($to_currency);\n $query = \"{$from_Currency}_{$to_Currency}\";\n\n $json = file_get_contents(\"https://free.currconv.com/api/v7/convert?q={$query}\" . \"&apiKey=259d66e2a7cccb4d60dd\");\n $obj = json_decode($json, true);\n $val = $obj['results'][\"$query\"]['val'];\n $total = $val * $amount;\n return number_format($total, 2, '.', '');\n }", "public function convert($amount, $from, $to)\n {\n return number_format(round($amount * $this->getConversionRate($from, $to), $this->roundingPrecision), 2, '.', '');\n }", "public function getConvertedAmount() {\n\t\t$money = new Money($this->getAmount(), new Currency($this->getCurrency()));\n\t\treturn $money->getConvertedAmount();\n\t}", "static function toCurrency($amount)\r\n {\r\n return \"$\" . number_format((double) $amount, 2);\r\n }", "public function actionConvert()\n {\n $session = Yii::$app->session;\n if ($session->has('money')){\n $money = $session->get('money');\n User::convertToBalance($money);\n $session->remove('money');\n return $this->redirect('/site/prizes');\n } else {\n return $this->redirect('/site/prizes');\n }\n }", "public function convertToDollar($amount) {\n\n if (Yii::app()->session['currency'] != \"USD\" && $amount > 0) {\n // Initialize the CURL library\n $api_key = \"a634e1f81617c61308330be500514cbe\";\n $cURL = curl_init();\n\n // Set the URL to execute\n curl_setopt($cURL, CURLOPT_URL, \"http://xmlfeed.theeasyapi.com\");\n\n // Set options\n curl_setopt($cURL, CURLOPT_HEADER, 0);\n curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($cURL, CURLOPT_POST, 1);\n curl_setopt($cURL, CURLOPT_POSTFIELDS, \"request=<easyapi_wrapper>\n <login>\n <apikey>\" . $api_key . \"</apikey>\n </login>\n <search>\n <service>convert_webxcurrency</service>\n <criteria>\n <amount>$amount</amount>\n <tocur>USD</tocur>\n <fromcur>\" . Yii::app()->session['currency'] . \"</fromcur>\n </criteria>\n </search>\n </easyapi_wrapper>\");\n\n // Execute, saving results in a variable\n $strPage = curl_exec($cURL);\n\n // Close CURL resource\n curl_close($cURL);\n\n // Now the variable $strPage has the returned XML.\n // Parse the XML into something a little more useful\n $xml_ret = simplexml_load_string($strPage);\n return json_decode(json_encode($xml_ret), true);\n }\n\n return $amount;\n }", "public function convertTo(Currency|string $to, ?Carbon $date = null): Money;", "function conv_money($uang){\n\t\t$uang_explode = explode('.',$uang);\n\t\tif($uang_explode[0] < '1,000'){\n\t\t\t$uang_res = $uang_explode[0];\n\t\t}else{\n\t\t\t$uang_res = str_replace(',','',$uang_explode[0]);\n\t\t}\n\t\treturn $uang_res;\n\t}", "public function convert($amount)\n {\n return money_format('%+n',\n $amount *\n $this->currencyWebservice->getExchangeRate(\n $this->getOriginalCurrency(),\n $this->getTargetCurrency()\n )\n );\n }", "public function convert($from, $to, $amount = 1.0)\n {\n $destiny = \"http://www.google.com/ig/calculator?hl=en&q={$amount}{$from}=?{$to}\";\n $request = new Request($destiny, 'GET');\n \n $response = $this->bind($request);\n \n // Tratamento de dados\n $content = str_replace(array('lhs', 'rhs', 'error', 'icc'), array('\"lhs\"', '\"rhs\"', '\"error\"', '\"icc\"'), $response->getContent());\n $object = json_decode($content);\n \n $value = preg_replace('/[^0-9.]|[0-9]*$/', '', $object->rhs);\n if ('' === $value) {\n throw new \\RuntimeException(sprintf(\n 'The resulted amount \"%s\" is invalid.',\n $value\n ));\n }\n \n return number_format(floatval($value), 5, '.', '');\n }", "function konv_to_money($money)\n\t{\n\t\t$money_r = number_format($money, 2, '.', ',');\n\t\treturn $money_r; // output : $5,000.00\n\t}", "public function conversion($from,$to,$amount)\n {\n $endpoint = 'convert';\n $access_key = 'b14850f91909bede5ee174463c195f92';\n\n // initialize CURL:\n $ch = curl_init('https://api.currencylayer.com/'.$endpoint.'?access_key='.$access_key.'&from='.$from.'&to='.$to.'&amount='.$amount.'');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // get the (still encoded) JSON data:\n $json = curl_exec($ch);\n curl_close($ch);\n\n // Decode JSON response:\n $conversionResult = json_decode($json, true);\n\n // access the conversion result\n return $conversionResult['result'];\n }", "public function toAmount($val){\n\t\treturn (int)($val*100);\n\t}", "public function convertAmountToCurrent($amount)\n {\n $base = $this->_helper->getBaseCurrencyCode();\n $current = $this->_helper->getCurrentCurrencyCode();\n $returnamount = $this->_helper->getwkconvertCurrency($base, $current, $amount);\n return $returnamount;\n }", "function convertir($devisefrom, $montant)\n\n//verifie sie le montant est numerique sinon il me faut un nombre\n\n{\n\n if(!is_numeric(($montant))) return 'il me faut un nombre';\n if($devisefrom = \"EUR\"){\n $total=$montant*1.15023; //1 EUR =1,15023USD\n }\n else {\n $total=$montant*0.869310; //1 USD = 0,869310 EUR\n }\n return ($total);\n}", "function ConvertCurrency($input_value, $input_currency_code, $target_currency_code) {\n // Convert input to base, then to target currency\n $rate_in = GetConversionRate($input_currency_code);\n $rate_out = GetConversionRate($target_currency_code);\n\n $output = ($input_value/$rate_in) * $rate_out;\n return number_format($output, 2, '.', '');\n }", "public static function convert($from, $to, $amount)\n {\n //get specified currency rates\n $rates = self::getRates();\n\n if (isset($rates[$from.$to])) {\n return $amount * $rates[$from.$to];\n } elseif (isset($rates[$to.$from])) {\n return $amount / $rates[$to.$from];\n } else {\n //if conversation rates not specified, convert using EUR\n return self::convert(\n 'EUR',\n $to,\n self::convert($from, 'EUR', $amount)\n );\n }\n }", "public function toCurrency()\n {\n return $this->amount * config('foria.tokens.value');\n }", "private function convertAmountToInt($amount) {\n return (int)$amount;\n }", "private function convertAmountToInt($amount) {\n return (int)$amount;\n }", "function convertInterest($interest)\n{\n $converted = $interest * .01;\n return $converted;\n}", "public static function tickerAmountToDB($amount) {\n $b = str_replace('USD', '', $amount);\n\n if (is_numeric($b)) {\n $amount = $b;\n }\n return $amount;\n }", "public function convertToBaseCurrency($amount) {\n $baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();\n $currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();\n return Mage::helper('directory')->currencyConvert($amount, $currentCurrencyCode, $baseCurrencyCode);\n }", "function convertToDollar($localAmount, $rate){\n return round ($localAmount/$rate, 3);\n //return number_format(round ($localAmount/$rate, 3), 3, \".\", \",\");\n\n}", "private function convertCurrencyByAmount($transaction) {\nlist($currency, $amount)=explode(\" \", $transaction);\n\n$stmt=$this->mysqli->prepare(\"SELECT currencyType, currencyRate FROM currencyrates WHERE currencyType=?\");\n$stmt->bind_param(\"s\", $currency);\n$stmt->execute();\n$res=$stmt->get_result();\n$row=$res->fetch_assoc();\n$stmt->close();\n\nreturn $this->basecurrency . ' ' . number_format((float)$row['currencyRate'] * (float)$amount, 2);\n}", "function to_price($amount = 0.00, $symbol = \"$\", $currency_code = \"USD\"){\n $amount = floatval($amount);\n return sprintf(\"%s%.2f %s\", $symbol, $amount, $currency_code);\n}", "public static function convertCurrency($from, $to, $amount)\n {\n if (isset($from) && isset($to) && isset($amount)) {\n\n if (strtoupper($from) === 'USD')\n print 'Total: ' . (float)$amount * ExchangeRatesHandler::getSelectedRate($to) . ' ' . strtoupper($to) . '<br>';\n\n if (strtoupper($to) === 'USD')\n print 'Total: ' . (float)$amount / ExchangeRatesHandler::getSelectedRate($from) . ' ' . strtoupper($from) . '<br>';\n\n if (strtoupper($from) !== 'USD' && strtoupper($to) !== 'USD')\n print 'Total: ' . (float)$amount / ExchangeRatesHandler::getSelectedRate($from) * ExchangeRatesHandler::getSelectedRate($to) . ' ' . strtoupper($from) . '<br>';\n }\n }", "public static function amountToDB($amount) {\n $b = str_replace(',', '', $amount);\n\n if (is_numeric($b)) {\n $amount = $b;\n }\n return $amount;\n }", "function getNumericAmount($amount)\n{\n\t$nu_amount = str_replace('$', '', $amount);\n\t$num_amount = str_replace(',', '', $nu_amount);\n\treturn $num_amount;\n}", "public function convertToCurrentCurrency($amount) {\n $baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();\n $currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();\n return Mage::helper('directory')->currencyConvert($amount, $baseCurrencyCode, $currentCurrencyCode);\n }", "public static function convertAmount($sourceId, $targetId, $amount, $transferType)\n {\n $funds = 0.0;\n if ($transferType == 1) {\n // Tenant Account Process\n $getTargetBaseCurrency = PartnerSetting::with('currency.currencyList')->where('partner_id', $targetId)->first();\n if ($getTargetBaseCurrency) {\n // Calculation Process => Convert Transaction Amount of Tenant to Partner Currency\n $funds = $amount * $getTargetBaseCurrency->currency->CurrentRate;\n }\n return ['converted_funds' => $funds, 'partners_currency' => $getTargetBaseCurrency->currency->currencyList->currency, 'currency_rate' => $getTargetBaseCurrency->currency->CurrentRate, 'partners_currency_id' => $getTargetBaseCurrency->currency->Id];\n } elseif ($transferType == 2) {\n // Partner Account Process\n $getTargetBaseCurrency = Currency::where('Tenant_Id', Auth::user()->TenantId)->where('isBaseCurrency', 1)->with('currencyList')->first();\n // GeneralFunctions::ajax_debug($getTargetBaseCurrency);\n return ['tenant_currency' => $getTargetBaseCurrency->currencyList->currency, 'currency_rate' => $getTargetBaseCurrency->CurrentRate, 'tenant_currency_id' => $getTargetBaseCurrency->Id];\n } else {\n // Partner to Partner Account Process\n $getTargetBaseCurrency = PartnerSetting::with('currency.currencyList')->where('partner_id', $targetId)->first();\n if ($getTargetBaseCurrency) {\n // Calculation Process => Convert Transaction Amount of Partner to Base Partner Currency\n $getTenantBaseCurrency = Currency::where('Tenant_Id', Auth::user()->TenantId)->where('isBaseCurrency', 1)->with('currencyList')->first();\n $funds = ($amount / $getTenantBaseCurrency->CurrentRate) * $getTargetBaseCurrency->currency->CurrentRate;\n }\n return ['converted_funds' => $funds, 'partners_currency' => $getTargetBaseCurrency->currency->currencyList->currency, 'currency_rate' => $getTargetBaseCurrency->currency->CurrentRate, 'partners_currency_id' => $getTargetBaseCurrency->currency->Id];\n }\n }", "function toMoney($val,$symbol='$',$r=2){\n\n\n $n = $val;\n $c = is_float($n) ? 1 : number_format($n,$r);\n $d = '.';\n $t = ',';\n $sign = ($n < 0) ? '-' : '';\n $i = $n=number_format(abs($n),$r);\n $j = (($j = strlen($i)) > 3) ? $j % 3 : 0;\n\n return $symbol.$sign .($j ? substr($i,0, $j) + $t : '').preg_replace('/(\\d{3})(?=\\d)/',\"$1\" + $t,substr($i,$j)) ;\n\n}", "public function convert(float $amount = null, string $fromCurrency = null, string $toCurrency = null, $date = null): float\n {\n return 12.34;\n }", "public function OriginalAmount() {\n\t\t// TODO: Multi currency\n\t\t$shopConfig = ShopConfig::current_shop_config();\n\n\t\t$amount = Price::create();\n\t\t$price = $this->Price;\n\t\t$amount->setAmount($price);\n\t\t$amount->setCurrency($shopConfig->BaseCurrency);\n\t\t$amount->setSymbol($shopConfig->BaseCurrencySymbol);\n\n\t\t// Transform amount for applying discounts etc.\n\t\t$this->extend('updateOriginalAmount', $amount);\n\n\t\treturn $amount;\n\t}", "public function convertUsdToCrypto(float $amount, string $from, string $to)\n {\n $to = strtolower($to);\n $currency = strtolower('USD');\n\n $rates = $this->getRates(Currency::TYPES['CRYPTO']);\n\n $baseRate = $rates[$currency]['value'];\n $toRate = $rates[$to]['value'];\n\n $btcValue = 1 / $baseRate;\n $rateToUsd = $toRate * $btcValue;\n\n return $amount * $rateToUsd;\n }", "public function toMoney()\n {\n return $this->rate;\n }", "public function toAmount($val)\n {\n return (float)round($val, 2);\n }", "public function formatCurrency($amount);", "public function getFormattedAmount(): string;", "public function FMoney($v) { return number_format($v,2,',','.'); }", "private function convertCurrency(\n CurrencyInterface $currencyFrom,\n CurrencyInterface $currencyTo,\n $amount\n ) {\n if ($currencyFrom->getIso() == $currencyTo->getIso()) {\n return Money::create($amount, $currencyFrom);\n }\n\n $convertedAmount = $this->convertBetweenIsos(\n $currencyFrom->getIso(),\n $currencyTo->getIso(),\n $amount\n );\n\n return Money::create($convertedAmount, $currencyTo);\n }", "public function getAmount(): float;", "public function convertCurrency($transaction) {\n if (is_array($transaction)) {\nreturn $this->convertCurrencyByArray($transaction);\n} else {\nreturn $this->convertCurrencyByAmount($transaction);\n}\n}", "private function makeAmount($amount, $currency = '')\n {\n $currency = \\strtoupper($currency);\n $amount = (float) str_replace(',', '.', $amount);\n return $currency . \\number_format($amount, 2, '.', '');\n }", "public function money($m){\n return number_format($m).' VND';\n }", "public static function _convertir($num)\n {\n //formatea el monto original a formato entendido por MySQL\n $_parse = numfmt_create('es_ES',\\NumberFormatter::DECIMAL);\n\n $_result = numfmt_parse($_parse,$num);\n\n return $_result;\n }", "public function convertFromTo($from_fcrn_id,$to_fcrn_id,$amt, $date,$round = 6, $source = false) {\n \n \n Yii::log(\"Converting from \".$this->convId2Code($from_fcrn_id).\" to \".$this->convId2Code($to_fcrn_id));\n //default source - syscompany source\n if(!$source){\n $source = $this->getSysCcmpCurrencySource($date);\n }\n \n $from_rate = $this->getCurrencyRate($from_fcrn_id, $date,$source);\n if ($from_rate === FALSE) {\n return FALSE;\n } \n \n $to_rate = $this->getCurrencyRate($to_fcrn_id, $date,$source);\n if ($to_rate === FALSE) {\n return FALSE;\n }\n \n /**\n * @todo add convert type to fcsr_courrency_source as definition\n */\n \n if ($source == self::SOURCE_BANK_RU){\n return round($to_rate*$from_rate * $amt, $round);\n } else {\n return round($to_rate/$from_rate * $amt, $round);\n }\n \n }", "public function convert($from, $to);", "function convertValueToLusin($value) {\r\n\t$unit_lusin = floor($value/12);\r\n\treturn $unit_lusin;\t\t\r\n}", "function convertnumber( $num, $precision = 1 ) {\n\t$last=preg_replace(\"/[^a-zA-Z]/\", '', $num);\n\t$remaining=preg_replace(\"/[^0-9\\.]/\", '', $num);\n\t//$remaining = (float)$remaining;\n\t\n\tif($last == 'K') {\n\t\t$amount = number_format(($remaining*1000), $precision);\n\t} else if($last == 'M') {\n\t\t$amount = number_format(($remaining*1000000), $precision);\n\t} else if($last == 'B') {\n\t\t$amount = number_format(($remaining*1000000000), $precision);\n\t} else if($last == 'T') {\n\t\t$amount = number_format(($remaining*1000000000000), $precision);\n\t} else {\n\t\t$amount = number_format($remaining, $precision);\n\t}\n\treturn $amount;\n}", "public function price_to_s(){\n return number_format($this->price, 2, '€', '');\n }", "function money($amount, \\App\\Models\\Currency $currency)\n {\n return $currency->symbol_left . number_format($amount, $currency->decimal_place, $currency->decimal_point,\n $currency->thousand_point) . $currency->symbol_right;\n }", "public function getToAmount() {\n return $this->_to_amount;\n }", "function formatAmountSimply($v,$t=1){\n return number_format($v,2,'.',',');\n}", "public function actionConvertCurrency($from_currency_ = '', $to_currency_ = '', $amount_ = 0)\n {\n // Recevei the POST params\n $request = Yii::$app->request;\n\n if (strcmp($from_currency_, '') != 0 && strcmp($to_currency_, '') != 0 && $amount_ != 0) {\n $from_currency = $from_currency_;\n $to_currency = $to_currency_;\n $amount = $amount_;\n } else {\n $from_currency = $request->post('from_currency');\n $to_currency = $request->post('to_currency');\n $amount = $request->post('amount');\n }\n\n $result = null;\n\n // Check the mandatory fields\n if (empty($from_currency)) {\n throw new BadRequestHttpException('The origin currency cannot be empty.');\n } else if (empty($to_currency)) {\n throw new BadRequestHttpException('The destiny currency cannot be empty.');\n } else if (empty($amount)) {\n throw new BadRequestHttpException('The amount cannot be empty.');\n } else {\n // Set the opration\n $operation = \"latest\";\n\n // Prepare the input\n $from_currency = strtoupper($from_currency);\n $to_currency = strtoupper($to_currency);\n\n // Check if the both currency are valid\n if (!self::checkCurrencyExists($from_currency)) {\n throw new BadRequestHttpException('The currency ' . $from_currency . ' does not exist.');\n }\n\n if (!self::checkCurrencyExists($to_currency)) {\n throw new BadRequestHttpException('The currency ' . $to_currency . ' does not exist.');\n }\n\n // Prepare the request data\n $conversionData = array();\n $conversionData['base'] = $from_currency;\n $conversionData['symbols'] = $to_currency;\n\n // Call the external API\n $result = self::callAPI('GET', $this->BASE_URL . $operation, $conversionData);\n\n if (isset($result)) {\n // Decode the json to array\n $result = json_decode($result, true);\n $result['amount'] = $amount;\n $result['converted_amount'] = $amount * $result[\"rates\"][$to_currency];\n $result['from_currency'] = $from_currency;\n $result['to_currency'] = $to_currency;\n\n // Log the transaction as complete\n $this->logTransaction(Transaction::CONVERSION, $result['amount'], $result['converted_amount'], '', '',\n $result['from_currency'], $result['to_currency'], Transaction::COMPLETE);\n } else {\n // Log the transaction as incomplete\n $this->logTransaction(Transaction::CONVERSION, $amount, 0, '', '', $from_currency, $to_currency, \n Transaction::INCOMPLETE);\n\n throw new HttpException('It was not possible to contact the currency exchange server.');\n }\n }\n\n return $result;\n }", "public static function convertEtherAmount($amount) {\n return (float)$amount / pow(10, 18);\n }", "function format_money($amount) {\r\n // prefixes the result with 'GBP', we remove that here.\r\n return substr(money_format(\"%.0i\", $amount), 3);\r\n}", "public function convertCurrency($amount, $amountCurrency, $targetCurrency) {\n $rate = $this->getExchangeRate($amountCurrency, $targetCurrency);\n $targetAmount = $amount * $rate;\n return floatval(intval($targetAmount).'.99');\n }", "public static function convertTo($value, $from = '$')\n\t{\n\t\tif ($from == '$'){\n\t\t\treturn self::convert($value, $from, 'U$S');\n\t\t}else{\n\t\t\treturn self::convert($value, $from, '$');\n\t\t}\n\t}", "function formatRawAmount($amount, $curr) {\n $dblAmount = $amount + 0.0;\n\n // Build Currency format table\n $curFormat = Array();\n $curFormat[\"020\"]=0;\n $curFormat[\"784\"]=2;\n $curFormat[\"044\"]=2;\n $curFormat[\"004\"]=2;\n $curFormat[\"008\"]=2;\n $curFormat[\"051\"]=2;\n $curFormat[\"532\"]=2;\n $curFormat[\"024\"]=2;\n $curFormat[\"032\"]=2;\n $curFormat[\"040\"]=2;\n $curFormat[\"036\"]=2;\n $curFormat[\"533\"]=2;\n $curFormat[\"031\"]=2;\n $curFormat[\"977\"]=2;\n $curFormat[\"052\"]=2;\n $curFormat[\"050\"]=2;\n $curFormat[\"056\"]=0;\n $curFormat[\"100\"]=2;\n $curFormat[\"048\"]=3;\n $curFormat[\"108\"]=0;\n $curFormat[\"060\"]=2;\n $curFormat[\"096\"]=2;\n $curFormat[\"068\"]=2;\n $curFormat[\"986\"]=2;\n $curFormat[\"064\"]=2;\n $curFormat[\"072\"]=2;\n $curFormat[\"974\"]=0;\n $curFormat[\"084\"]=2;\n $curFormat[\"124\"]=2;\n $curFormat[\"976\"]=2;\n $curFormat[\"756\"]=2;\n $curFormat[\"152\"]=0;\n $curFormat[\"156\"]=2;\n $curFormat[\"170\"]=2;\n $curFormat[\"188\"]=2;\n $curFormat[\"192\"]=2;\n $curFormat[\"132\"]=2;\n $curFormat[\"196\"]=2;\n $curFormat[\"203\"]=2;\n $curFormat[\"276\"]=2;\n $curFormat[\"262\"]=0;\n $curFormat[\"208\"]=2;\n $curFormat[\"214\"]=2;\n $curFormat[\"012\"]=2;\n $curFormat[\"233\"]=2;\n $curFormat[\"818\"]=2;\n $curFormat[\"232\"]=2;\n $curFormat[\"230\"]=2;\n $curFormat[\"978\"]=2;\n $curFormat[\"246\"]=2;\n $curFormat[\"242\"]=2;\n $curFormat[\"238\"]=2;\n $curFormat[\"250\"]=2;\n $curFormat[\"826\"]=2;\n $curFormat[\"981\"]=2;\n $curFormat[\"288\"]=2;\n $curFormat[\"292\"]=2;\n $curFormat[\"270\"]=2;\n $curFormat[\"324\"]=0;\n $curFormat[\"320\"]=2;\n $curFormat[\"624\"]=2;\n $curFormat[\"328\"]=2;\n $curFormat[\"344\"]=2;\n $curFormat[\"340\"]=2;\n $curFormat[\"191\"]=2;\n $curFormat[\"332\"]=2;\n $curFormat[\"348\"]=2;\n $curFormat[\"360\"]=2;\n $curFormat[\"372\"]=2;\n $curFormat[\"376\"]=2;\n $curFormat[\"356\"]=2;\n $curFormat[\"368\"]=3;\n $curFormat[\"364\"]=2;\n $curFormat[\"352\"]=2;\n $curFormat[\"380\"]=0;\n $curFormat[\"388\"]=2;\n $curFormat[\"400\"]=3;\n $curFormat[\"392\"]=0;\n $curFormat[\"404\"]=2;\n $curFormat[\"417\"]=2;\n $curFormat[\"116\"]=2;\n $curFormat[\"174\"]=0;\n $curFormat[\"408\"]=2;\n $curFormat[\"410\"]=0;\n $curFormat[\"414\"]=3;\n $curFormat[\"136\"]=2;\n $curFormat[\"398\"]=2;\n $curFormat[\"418\"]=2;\n $curFormat[\"422\"]=2;\n $curFormat[\"144\"]=2;\n $curFormat[\"430\"]=2;\n $curFormat[\"426\"]=2;\n $curFormat[\"440\"]=2;\n $curFormat[\"442\"]=0;\n $curFormat[\"428\"]=2;\n $curFormat[\"434\"]=3;\n $curFormat[\"504\"]=2;\n $curFormat[\"498\"]=2;\n $curFormat[\"450\"]=0;\n $curFormat[\"807\"]=2;\n $curFormat[\"104\"]=2;\n $curFormat[\"496\"]=2;\n $curFormat[\"446\"]=2;\n $curFormat[\"478\"]=2;\n $curFormat[\"470\"]=2;\n $curFormat[\"480\"]=2;\n $curFormat[\"462\"]=2;\n $curFormat[\"454\"]=2;\n $curFormat[\"484\"]=2;\n $curFormat[\"458\"]=2;\n $curFormat[\"508\"]=2;\n $curFormat[\"516\"]=2;\n $curFormat[\"566\"]=2;\n $curFormat[\"558\"]=2;\n $curFormat[\"528\"]=2;\n $curFormat[\"578\"]=2;\n $curFormat[\"524\"]=2;\n $curFormat[\"554\"]=2;\n $curFormat[\"512\"]=3;\n $curFormat[\"590\"]=2;\n $curFormat[\"604\"]=2;\n $curFormat[\"598\"]=2;\n $curFormat[\"608\"]=2;\n $curFormat[\"586\"]=2;\n $curFormat[\"985\"]=2;\n $curFormat[\"620\"]=0;\n $curFormat[\"600\"]=0;\n $curFormat[\"634\"]=2;\n $curFormat[\"642\"]=2;\n $curFormat[\"643\"]=2;\n $curFormat[\"810\"]=2;\n $curFormat[\"646\"]=0;\n $curFormat[\"682\"]=2;\n $curFormat[\"090\"]=2;\n $curFormat[\"690\"]=2;\n $curFormat[\"736\"]=2;\n $curFormat[\"752\"]=2;\n $curFormat[\"702\"]=2;\n $curFormat[\"654\"]=2;\n $curFormat[\"705\"]=2;\n $curFormat[\"703\"]=2;\n $curFormat[\"694\"]=2;\n $curFormat[\"706\"]=2;\n $curFormat[\"740\"]=2;\n $curFormat[\"678\"]=2;\n $curFormat[\"222\"]=2;\n $curFormat[\"760\"]=2;\n $curFormat[\"748\"]=2;\n $curFormat[\"764\"]=2;\n $curFormat[\"972\"]=2;\n $curFormat[\"795\"]=2;\n $curFormat[\"788\"]=3;\n $curFormat[\"776\"]=2;\n $curFormat[\"626\"]=0;\n $curFormat[\"792\"]=0;\n $curFormat[\"780\"]=2;\n $curFormat[\"901\"]=2;\n $curFormat[\"834\"]=2;\n $curFormat[\"980\"]=2;\n $curFormat[\"800\"]=2;\n $curFormat[\"840\"]=2;\n $curFormat[\"858\"]=2;\n $curFormat[\"860\"]=2;\n $curFormat[\"862\"]=2;\n $curFormat[\"704\"]=2;\n $curFormat[\"548\"]=0;\n $curFormat[\"882\"]=2;\n $curFormat[\"950\"]=0;\n $curFormat[\"951\"]=2;\n $curFormat[\"952\"]=0;\n $curFormat[\"953\"]=0;\n $curFormat[\"886\"]=2;\n $curFormat[\"891\"]=2;\n $curFormat[\"710\"]=2;\n $curFormat[\"894\"]=2;\n $curFormat[\"716\"]=2;\n\n $digCurr = $this->getISOCurrency(\"\" . $curr);\n $exponent = $curFormat[$digCurr];\n\n\n\n $strAmount = \"\" . Round($dblAmount, $exponent);\n $strRetVal = \"\" . $strAmount;\n\n // decimal position\n $curpos = strpos($strRetVal, \".\");\n\n // Pad with zeros\n if($curpos == true) {\n $padCount = $exponent - (strlen($strRetVal) - $curpos - 1);\n for($i=0;$i<$padCount;$i++) {\n $strRetVal .= \"0\";\n }\n }\n else {\n $padCount = $exponent;\n for($i=0;$i<$padCount;$i++) {\n $strRetVal .= \"0\";\n }\n }\n\n if($curpos !== false) {\n $strRetVal = substr($strRetVal, 0, $curpos) . substr($strRetVal, $curpos+1);\n }\n return $strRetVal;\n }", "public function getAmount();", "public function getAmount();", "public function getAmount();", "public function getAmount();", "public function offlineConvertTo(Currency|string $currency, string $rate): Money;", "public function convertCryptoToUsd(float $amount, string $from, string $to = 'USD')\n {\n $currency = strtolower($from);\n $rates = $this->getRates(Currency::TYPES['CRYPTO']);\n\n $baseRate = $rates[$currency]['value'];\n $usdRate = $rates['usd']['value'];\n\n $btcValue = 1 / $baseRate;\n $rateToUsd = $usdRate * $btcValue;\n\n return $amount * $rateToUsd;\n }", "function convertToNative($dollarAmount, $rate){\n return round((double)$dollarAmount * (double)$rate, 3);\n //return number_format(round((double)$dollarAmount * (double)$rate, 3), 3, \".\", \",\");\n}", "function moneyFormat($amount) {\n try {\n return number_format($amount, 2, '.', ',');\n } catch (Exception $e) {\n return $amount;\n }\n }", "function acadp_sanitize_amount( $amount, $currency_settings = array() ) {\n\n\t$is_negative = false;\n\n\tif( empty( $currency_settings ) ) {\n\t\t$currency_settings = get_option( 'acadp_currency_settings' );\n\t}\n\n\t$currency = ! empty( $currency_settings[ 'currency' ] ) ? $currency_settings[ 'currency' ] : 'USD';\n\t$thousands_sep = ! empty( $currency_settings[ 'thousands_separator' ] ) ? $currency_settings[ 'thousands_separator' ] : ',';\n\t$decimal_sep = ! empty( $currency_settings[ 'decimal_separator' ] ) ? $currency_settings[ 'decimal_separator' ] : '.';\n\n\t// Sanitize the amount\n\tif( $decimal_sep == ',' && false !== ( $found = strpos( $amount, $decimal_sep ) ) ) {\n\t\tif( ( $thousands_sep == '.' || $thousands_sep == ' ' ) && false !== ( $found = strpos( $amount, $thousands_sep ) ) ) {\n\t\t\t$amount = str_replace( $thousands_sep, '', $amount );\n\t\t} else if( empty( $thousands_sep ) && false !== ( $found = strpos( $amount, '.' ) ) ) {\n\t\t\t$amount = str_replace( '.', '', $amount );\n\t\t}\n\n\t\t$amount = str_replace( $decimal_sep, '.', $amount );\n\t} else if( $thousands_sep == ',' && false !== ( $found = strpos( $amount, $thousands_sep ) ) ) {\n\t\t$amount = str_replace( $thousands_sep, '', $amount );\n\t}\n\n\tif( $amount < 0 ) {\n\t\t$is_negative = true;\n\t}\n\n\t$amount = preg_replace( '/[^0-9\\.]/', '', $amount );\n\t$decimals = acadp_currency_decimal_count( 2, $currency );\n\t$amount = number_format( (double) $amount, $decimals, '.', '' );\n\n\tif( $is_negative ) {\n\t\t$amount *= -1;\n\t}\n\n\treturn apply_filters( 'acadp_sanitize_amount', $amount );\n\n}", "function numberFormat($amount) {\n try {\n return number_format($amount);\n } catch (Exception $e) {\n return $amount;\n }\n }", "protected function calculate(int $amount)\n {\n return $amount * 100;\n }", "public function convertPrice($price=0){\n return $this->priceCurrency->convert($price);\n }", "public function getToCurrency()\n {\n return $this->toCurrency;\n }", "function european_format($amount)\n {\n //return $fmt->formatCurrency($amount, \"EUR\");\n return $amount;\n }", "public static function fiat2crypto($value, $from, $to) {\n $from = trim(strtolower($from));\n $to = trim(strtolower($to));\n if ($from == $to) {\n return $value;\n }\n\n $endpoint = '/v1/to' . $to;\n $params = array(\n 'currency' => $from,\n 'value' => $value\n );\n $result = Request::execute('get', $endpoint, $params );\n\n if (Request::isResponseError($result)) {\n Log::debug($result);\n return false;\n }\n else {\n return (float) $result;\n }\n }", "private function cleanAmt($amount = 0, $wholeAmt = FALSE) {\n if($wholeAmt) {\n $amount = preg_replace('/[^0-9.]/', '', trim($amount));\n return (int)$amount; \n }\n else {\n $amount = preg_replace('/[^0-9.]/', '', trim($amount));\n return (float)$amount;\n }\n }", "public function transform($item)\n {\n $item = (int)$item;\n $price = round($item/100, 2);\n return ($price > 0) ? $price : '';\n }", "function Currency2Decimal($number, $reverse=0) {\n\n\n if($reverse===1) {\n $number = preg_replace('/[^0-9,]/', '', $number);\n $number = preg_replace('/[, ]/', '.', $number);\n $number = number_format($number, 2, '.', '');\n return $number;\n\n } else return number_format($number, 2, ',', '.');\n\n\n}", "function MoneyToFloat($zMoney) {\n\n /*--- Local Variables ---*/\n\n $laundermoney = null;\n $dollars = null;\n $cents = null;\n\n /*--- Start of Processing ---*/\n\n $zMoney = str_replace(\"$\",\"\",$zMoney);\n\n if(strrchr($zMoney,\",\") )\n {\n $gMoney = str_replace(\",\",\"\",$zMoney); \n if( strrchr($gMoney,\".\") )\n {\n $dollars = strtok($gMoney,\".\");\n $cents= strtok(\".\");\n }\n else\n $dollars = $gMoney;\n }\n else if( strrchr($zMoney,\".\") )\n {\n $dollars = strtok($zMoney,\".\");\n $cents= strtok(\".\");\n }\n else\n {\n $dollars = $zMoney;\n $cents = 0;\n } \n\n $laundermoney = $dollars.\".\".$cents;\n\n (float)$laundermoney = $laundermoney;\n \n return($laundermoney);\n}", "public function changeAmountCurrency($amount) {\n $amount_currency = $this->getConnectAmountCurrency();\n return ($amount*$amount_currency);\n }", "public function OriginalPrice() {\n\t\t$amount = $this->OriginalAmount();\n\n\t\t//Transform price here for display in different currencies etc.\n\t\t$this->extend('updateOriginalPrice', $amount);\n\n\t\treturn $amount;\n\t}", "public function JSON_to_amount($value)\n\t{\n\t\tif ( ! is_numeric($value))\n\t\t{\n\t\t\tlog_message('error', 'Bad data received for $value at bitcoin->JSON_to_amount()');\n\t\t\treturn NULL;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn (int) round($value * 1E+8);\n\t\t}\n\t}", "function quantitiesToTradingPrice($base_quantity, $quote_quantity)\n{\n $price = $quote_quantity / $base_quantity;\n\n return sprintf(\"%.8f\", $price);\n}", "public function getAmount(): string;", "private function getINRto1USD(){\n $client = new Client();\n\n $crawler = $client->request('GET', 'https://transferwise.com/in/currency-converter/usd-to-inr-rate');\n $USD_IN_1_INR = $crawler->filterXPath(\"//span[contains(@class,'text-success')]\")->text();\n \n //removing , and converting to float\n $USD_IN_1_INR_R = floatval (str_replace(\",\",\"\",$USD_IN_1_INR));\n return($USD_IN_1_INR_R);\n }", "function covertirNumLetras()\r\n{\r\n\r\n\t$number = $this->monto;\r\n\r\n\t//number = number_format (number, 2);\r\n $number1=$number;\r\n\r\n\r\n //settype (number, \"integer\");\r\n $cent = strpos($number1,\".\");\r\n\r\n if($cent > 0){\r\n\t\r\n\t$centavos = substr($number1,$cent+1,2);\r\n\t\r\n }else{\r\n\r\n \t$centavos = \"00\";\r\n\t\r\n\t}\r\n\t/* \r\n\t $cent = split(\".\",$number1,7); \r\n\r\n\t\techo $cent[4];\r\n\t\texit();\r\n\r\n\t $centavos = $cent[1];\r\n\r\n\t if ($centavos == 0 || empty($centavos)){\r\n\t \t$centavos = \"00\";\r\n\t }\r\n\t*/\r\n\t/*\r\n\t \r\n\t if (number == 0 || number == \"\") \r\n\t { // if amount = 0, then forget all about conversions, \r\n\t centenas_final_string=\" cero \"; // amount is zero (cero). handle it externally, to \r\n\t // function breakdown \r\n\t } \r\n\t else \r\n\t { \r\n \r\n \r\n\r\n\t \r\n millions = ObtenerParteEntDiv(number, 1000000); // first, send the millions to the string \r\n number = mod(number, 1000000); // conversion function \r\n \r\n\t alert(millions);\r\n\t \r\n if (millions != 0)\r\n { \r\n // This condition handles the plural case \r\n if (millions == 1) \r\n { // if only 1, use 'millon' (million). if \r\n descriptor= \" millon \"; // > than 1, use 'millones' (millions) as \r\n } \r\n else \r\n { // a descriptor for this triad. \r\n descriptor = \" millones \"; \r\n } \r\n } \r\n else \r\n { \r\n descriptor = \" \"; // if 0 million then use no descriptor. \r\n } \r\n millions_final_string = string_literal_conversion(millions)+descriptor; \r\n */ \r\n\r\n\r\n $thousands = $this->ObtenerParteEntDiv($number, 1000); // now, send the thousands to the string \r\n $number = fmod($number, 1000); // conversion function. \r\n //print \"Th:\".thousands;\r\n if ($thousands != 1) \r\n { // This condition eliminates the descriptor \r\n $thousands_final_string = $this->string_literal_conversion($thousands) . \" mil \"; \r\n // descriptor = \" mil \"; // if there are no thousands on the amount \r\n } \r\n if ($thousands == 1)\r\n {\r\n $thousands_final_string = \" mil \"; \r\n }\r\n if ($thousands < 1) \r\n { \r\n $thousands_final_string = \" \"; \r\n } \r\n \r\n // this will handle numbers between 1 and 999 which \r\n // need no descriptor whatsoever. \r\n\r\n\r\n $centenas = $number; \r\n $centenas_final_string = $this->string_literal_conversion($centenas) ; \r\n \r\n\t// } //end if (number ==0) \r\n\r\n /*if (ereg(\"un\",centenas_final_string))\r\n {\r\n centenas_final_string = ereg_replace(\"\",\"o\",centenas_final_string); \r\n }*/\r\n //finally, print the output. \r\n\r\n /* Concatena los millones, miles y cientos*/\r\n\r\n\r\n $cad = $thousands_final_string.$centenas_final_string; \r\n \r\n /* Convierte la cadena a Mayúsculas*/\r\n $cad = strtoupper($cad); \r\n\r\n\r\n\r\n\t/*\r\n\t if (strlen($centavos) > 2)\r\n\t { \r\n\t if(substr($centavos.substring,2,3) >= 5){\r\n\t $centavos = substr($centavos,0,1).(parseInt(centavos.substring(1,2)).1).toString();\r\n\t }else{\r\n\t centavos = centavos.substring(0,2);\r\n\t }\r\n\t }\r\n\r\n\t*/\r\n\r\n\r\n if (strlen($centavos) == 1)\r\n {\r\n $centavos = $centavos.\"0\";\r\n }\r\n $centavos = $centavos. \"/100\"; \r\n\r\n\r\n if ($number == 1)\r\n {\r\n $moneda = \" PESO \"; \r\n }\r\n else\r\n {\r\n $moneda = \" PESOS \"; \r\n }\r\n \r\n /* Regresa el número en cadena entre paréntesis y con tipo de moneda y la fase M.N.*/\r\n\r\n return $cad.$moneda.\" \".$centavos.\" M.N.\";\r\n \r\n}", "function ChangeCurrency($amount, $fromCurrency, $toCurrency)\n\t{\n\t\t$result = $this->sendRequest(\"ChangeCurrency\", array(\"Amount\"=>$amount, \"FromCurrency\"=>$fromCurrency, \"ToCurrency\"=>$toCurrency));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function base_convert($number, $source, $target): string\n{\n return Base::convert($number, $source, $target);\n}", "public function _castAmount($key, $creditKey)\n {\n if (isset($this->_castedAmounts[$key]) || !isset($this->_data[$key]) || !isset($this->_data[$creditKey])) {\n return;\n }\n if (empty($this->_data[$key])) {\n return;\n }\n $amount = $this->_data[$key] / 100;\n if ('CR' === $this->_data[$creditKey]) {\n $amount = -1 * $amount;\n }\n $this->_data[$key] = $amount;\n $this->_castedAmounts[$key] = true;\n }", "public function _castAmount($key, $creditKey)\n {\n if (isset($this->_castedAmounts[$key]) || !isset($this->_data[$key]) || !isset($this->_data[$creditKey])) {\n return;\n }\n if (empty($this->_data[$key])) {\n return;\n }\n $amount = $this->_data[$key] / 100;\n if ('CR' === $this->_data[$creditKey]) {\n $amount = -1 * $amount;\n }\n $this->_data[$key] = $amount;\n $this->_castedAmounts[$key] = true;\n }", "public static function Money ($amount) {\n\t\t\n\t\t\treturn sprintf('$%.2f',round(floatval($amount),2));\n\t\t\n\t\t}", "function getWithCurrency($amount, $decimals = 2)\n{\n return FormatNumber($amount, $decimals) . \\Config::get('website.currency');\n}" ]
[ "0.7254861", "0.722059", "0.70167464", "0.69451797", "0.68266636", "0.6663872", "0.6577384", "0.6502755", "0.64902455", "0.6337447", "0.63107127", "0.62476474", "0.622489", "0.61990684", "0.6190542", "0.6188009", "0.61852235", "0.61820865", "0.6163636", "0.61236054", "0.61224824", "0.6119709", "0.6096584", "0.6087045", "0.6072203", "0.60631686", "0.6062056", "0.60240525", "0.60240525", "0.59870946", "0.5960505", "0.5943232", "0.5938935", "0.5898311", "0.58702517", "0.58615285", "0.5839936", "0.58280486", "0.5828047", "0.57948756", "0.57915324", "0.57885075", "0.57678086", "0.5761933", "0.5719455", "0.57161665", "0.5714999", "0.5708032", "0.56962633", "0.5680684", "0.5679563", "0.5678012", "0.5675393", "0.5661472", "0.5648478", "0.56202316", "0.5618262", "0.56140053", "0.5612934", "0.55991894", "0.5595952", "0.5594368", "0.55915177", "0.556413", "0.5558454", "0.55440694", "0.55376077", "0.5532553", "0.5524942", "0.55176175", "0.55176175", "0.55176175", "0.55176175", "0.5515316", "0.55068797", "0.5502202", "0.5485716", "0.5478659", "0.54761946", "0.5468055", "0.5464006", "0.54636294", "0.5460561", "0.5449818", "0.5444908", "0.54147345", "0.5414194", "0.5401019", "0.53950155", "0.53732157", "0.5367347", "0.5365652", "0.536494", "0.5357397", "0.53564525", "0.53463733", "0.5336528", "0.53166556", "0.53166556", "0.53056717", "0.529939" ]
0.0
-1
passing negative even number
public function testIsEvenPassNegativeEVEN() { $this->assertTrue(isEven(-4)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testIsEvenPassNegativeODD()\n {\n \t$this->assertFalse(isEven(-5));\n }", "public function clipEvenOdd() {}", "function isEven($num){\r\n\treturn (is_numeric($num)&(!($num&1)));\r\n}", "function check_even($n)\n{\n\tif ($n % 2 == 0) {\n\t\techo \"{$n} la so so chan\";\n\t}\n}", "public function testisEvenNumberFail()\n {\n $result = $this->calculator->isEvenNumber(3);\n $this->assertFalse($result);\n }", "public function testIsEvenPassZERO()\n {\n \t$this->assertTrue(isEven(0));\n }", "function odd_even($n) {\n $odd_even = fmod($n, 2);\n if($odd_even == 1) {\n return '_';\n } else {\n return 'true';\n }\n }", "function neparan($b)\n{\n if($b%2==0)\n {\n return false;\n }\n else\n {\n return true;\n }\n}", "function is_even (int $value) : bool\n{\n return $value % 2 === 0;\n}", "function is_even($val) {\n\t\treturn ($val / 2 == floor($val / 2)) ? true : false;\n\t}", "private static function makeOddEven() {\n\n\t\tif (JudgeView::$even > 0)\n\t\t{\n\t\t\tJudgeView::$even = 0;\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJudgeView::$even = 1;\n\t\t\treturn 1;\n\t\t}\n\n\t}", "public function testIsEvenNumber()\n\t{\n\t\t$this->assertTrue(ParityGame\\isEvenNumber(2));\n\t\t$this->assertTrue(ParityGame\\isEvenNumber(10));\n\n\t\t$this->assertFalse(ParityGame\\isEvenNumber(7));\n\t\t$this->assertFalse(ParityGame\\isEvenNumber(21));\n\t}", "function evenOrOdd($number){\n\n\tif($number % 2 == 0){\n\t $number = $number + 10;\n\n\t}else{\n\t $number = $number + 11;\n\t}\n\n\treturn $number;\n\n}", "function is_odd (int $value) : bool\n{\n return $value % 2 !== 0;\n}", "function isEven ($input_number) {\n if (round($input_number/2) == ($input_number/2)) {\n return true;\n }\n else { return false; }\n}", "function isNegative () {\n return (($this->num < 0) xor ($this->denom < 0));\n }", "function checkEvenOrOdd($value) {\n\t\tif($value % 2 == 0) {\n\t\t\techo 'Even';\n\t\t} else {\n\t\t\techo 'Odd';\n\t\t}\n\t}", "public function testisEvenNumber()\n {\n $result = $this->calculator->isEvenNumber(2);\n $this->assertTrue($result);\n }", "public function testIsEvenPassTwo()\n {\n \t$this->assertTrue(isEven(2));\n }", "function numParImpar($num){\n $bool = true;\n if($num % 2 == 0){\n return true;\n }else{\n return false;\n }\n}", "public function fillEvenOdd() {}", "function oddEven($number)\n{\n\t$lastDigit = substr($number, -1, 1);\n\tif($lastDigit == 1 or $lastDigit == 3 or $lastDigit == 5 or $lastDigit == 7 or $lastDigit == 9) { $oddEven = 'odd'; } else { $oddEven = 'even'; }\n\treturn ($oddEven);\n}", "function isOdd($num){\r\n\treturn (is_numeric($num)&($num&1));\r\n}", "function isPowerOfTwo($num2)\n {\n if ($num2 === 0) {\n $return = 0;\n }\n while ($num2 != 1) {\n if ($num2 % 2 != 0)\n $return = 0;\n $num2 = $num2 / 2;\n }\n $return = 1;\n }", "function isOdd ($input_number) {\n if (round($input_number/2) == ($input_number/2)) {\n return false;\n }\n else { return true; }\n}", "public function even($value): bool\n {\n return is_numeric($value) && (int) $value % 2 === 0;\n }", "function is_entier($n) {\nreturn ($n>0 || $n=='0');\n}", "function fpb($a,$b){\n\t\treturn ($b == 0) ? ($a):( fpb($b, $a % $b) );\n\t}", "function isOddOrEven ($number) {\n $isEven = ($number % 2 == 0);\n echo '<p>Number is ' . ($isEven ? 'even' : 'odd') . '<p>';\n }", "public function isNegative(): bool;", "static function powerOfTwo($n)\n { \n if ($n >= 0 && $n < 31) {\n $pow = 2**$n;\n $all = 0; $count = 1;\n while($all != $pow)\n {\n $all = 2** $count;\n echo $all.\"\\n\";\n $count++;\n }\n } else {\n echo \"enter value between 0 to 31\".\"\\n\";\n Utility::powerOfTwo();\n }\n \n }", "public function testIsEvenPassString()\n {\n \t$this->assertFalse(isEven(\"fail\"));\n }", "#[@test]\n public function selectNegativeInteger() {\n $this->assertEquals(-6100, $this->db()->query('select -6100 as value')->next('value'));\n }", "public function implicar($x, $y){\n $b = 1-$x+$y;\n if ($b<=1)\n return $b;\n else \n return 1;\n }", "public function methodNumberTwo()\r\n\t{\r\n\t\ttry {\r\n\t\t\t\r\n\t\t} catch (Exception $e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "public static function clipEvenOdd()\n {\n return new FlagQualifier(self::CLIP_EVEN_ODD);\n }", "function calEventNum(int $num){\n\n $result = 0 ;\n\n for ($i=1 ,$ii = $num ; $i <= $ii ; $i++){\n if ($i%2 == 0){\n $result++;\n }\n }\n return $result;\n}", "function convertEvenToOdd($number)\n{\n $n = $number;\n if ($n % 2 === 0) {\n $n += 1;\n return $number . \" odd number\";\n }\n return $n . \" odd number\";\n}", "public function odd($value): bool\n {\n return is_numeric($value) && (int) $value % 2 !== 0;\n }", "private function __isNumberEven($num)\n {\n return (bool) (((int) $num % 2) === 0);\n }", "function _cb_negate($aVal) {\n return round(-$aVal);\n}", "function Even($K){\n if($K %2 == 0){\n\n return 'true';\n }else{\n\n return 'false';\n }\n}", "function is_not_zero($num){\n\tif($num <= 0){\n\t\treturn 1;\n\t}\n\t\n\treturn $num;\t\n}", "function change_negative_numeric($numeric) {\n\t\treturn $numeric * (-1);\n\t}", "function minus($a = 20, $b =10) {\n\n\treturn (int)$a - (int)$b;\n\n}", "public static function strictlyNegInts()\n {\n return self::ints()->fmap(function ($x) {\n return -abs($x)-1;\n });\n }", "function evenNumbers(array $array): array\n{\n $resultArray = [];\n\n if (count($array) !== 0) {\n foreach ($array as $elementArray) {\n if (($elementArray % 2) === 0) {\n $resultArray[] = $elementArray;\n }\n }\n }\n return $resultArray;\n}", "function negate() { # :: Num -> Num\n return -$this->value;\n }", "function class_odd_or_even( $num ) {\n echo ($num%2) ? ' item-odd' : ' item-even';\n}", "function resta($a,$b)\n {\n return $a-$b;\n }", "function oddArray(array $array): int\n {\n $odd = 0;\n\n foreach($array as $number)\n {\n if($number & 1)\n {\n $odd++;\n }\n }\n\n return $odd;\n }", "function evenFibonacciNumbers($n){\n $sum = 0;\n $seq[] = maxFibonacciValue($n);\n foreach($seq[0] as $value){\n if($value % 2 == 0){ $sum += $value; }\n }\n return $sum;\n }", "function mod($n, $m) {\n return (($n % $m) + $m) % $m;\n}", "public function testSubZero()\n {\n $this\n ->given(\n $zero = $this->fromNative(0),\n $number = $this->fromNative($this->randomNativeNumber())\n )\n ->then\n ->boolean(\n $number->sub($zero)->equals($number)\n )->isTrue()\n ->boolean(\n $zero->sub($number)->isNegative()\n )->isTrue()\n ;\n }", "function secondRightmostZeroBit($n) {\n return ((($n | $n+1) ^ (($n | $n + 1) + 1)) + 1) >> 1;\n}", "public static function negInts()\n {\n return self::ints()->fmap(function ($x) {\n return -abs($x);\n });\n }", "public function test_bool_variable_and_even_or_odd_method()\n {\n $parameter_one = 'first';\n $parameter_two = 'second';\n \n for ($i=0; $i<10; $i++)\n {\n $string = math::even_or_odd($parameter_one, $parameter_two);\n \n $this->assertInternalType('string', $string);\n $this->assertNotEmpty($string);\n \n if ($i % 2 == 0)\n {\n $this->assertEquals($string, $parameter_one);\n $this->assertNotEquals($string, $parameter_two);\n }\n else\n {\n $this->assertNotEquals($string, $parameter_one);\n $this->assertEquals($string, $parameter_two);\n }\n }\n }", "public function oddMask()\n {\n $low = (-($this->low & 1)) & 0xFFFFFFFF;\n $high = $low;\n return UInt64::newValue($high, $low);\n }", "function minus() {\n static $minus = false;\n $minus = $minus ?: curry(function($x, $y){\n return $x - $y;\n });\n return _apply($minus, func_get_args());\n}", "public function uneven( $numeral) {\n\t\t$booleanUneven = ($numeral/2) != 0;\n\t\tswitch ($booleanUneven) {\n\t\t\tcase true:\n\t\t\t\t$this->log($numeral . \" is odd!\");\n\t\t\t\treturn true;\n\t\t\tcase false: \n\t\t\t\t$this->log($numeral . \" is not odd!\");\n\t\t\t\treturn false;\n\t\t}\n\t}", "function flippingBits($n)\n{\n return $n ^ 0xFFFFFFFF;\n}", "function variant_neg($variant) {}", "function test_entier($valeur){\r\n return ($valeur>0 || $valeur==\"0\");\r\n}", "function absint($maybeint)\n {\n }", "public function subtract($number): ArbitraryInteger\n {\n }", "function modulo($val, $param) {\n\t\treturn $val - (floor($val / $param) * $param);\n\t}", "function x($i) {\n if ($i < 0)\n return 4294967296 - $i;\n else\n return $i;\n }", "private function luhnOddDigit($n){\n\t\treturn ($n >= 5) ? 2 * $n - 9 : 2 * $n;\n\t}", "function evenFibonacci($limit) {\n $x = 0;\n $y = 1;\n $sum = 0;\n while ($x <= $limit) {\n //printf($x . \"\\n\"); //prints the fibonacci sequence\n $x = $y - $x;\n $y = $x + $y;\n if ($x % 2 == 0) {\n $sum += $x;\n }\n }\n return $sum;\n}", "function reminder($a = NULL, $b = NULL){\n \treturn $a % $b;\n }", "public function testFilterWithNegative()\n {\n $this->expectException(FilterException::class);\n $this->expectExceptionMessage('Invalid integer: -1');\n $this->expectExceptionCode(FilterException::INVALID_INTEGER);\n\n $this->filter->filter(-1);\n }", "function Prime($n)\n{\n for($i=2; $i<$n; $i++)\n {\n if($n %$i ==0)\n\t {\n\t\t return 0;\n\t\t }\n }\n return 1;\n }", "function UglyNumber($number)\n{\n while ($number%2 == 0){\n $number = $number/2;\n }\n while ($number%3 == 0){\n $number = $number/3;\n }\n while ($number%5 == 0){\n $number = $number/5;\n }\n if($number == 1){\n return 1;\n }else{\n return 0;\n }\n}", "function checkNum($red, $stupac, $mjesto) {\n\tif($red%2 == 0){\n\t\t$broj=0;\n\t\tif($stupac == 1){\n\t\t\t$broj= $mjesto-9;\n\t\t\techo $broj;\n\t\t} else {\n\t\t\t$broj = $mjesto / 10;\n\t\t\t$broj = floor($broj);\n\t\t\t$broj *= 10;\n\t\t\t$broj += $stupac;\n\t\t\techo $broj . \" i \" . $red ;\n\t\t}\n\n\t} else {\n\t\techo $mjesto;\n\t}\n\n}", "public function setNegative($var)\n {\n GPBUtil::checkUint32($var);\n $this->negative = $var;\n\n return $this;\n }", "function getSomme( int $a , int $b )\n{\n return $a+$b;\n}", "function negate() {\n static $negate = false;\n $negate = $negate ?: curry(function($x){\n return -$x;\n });\n return _apply($negate, func_get_args());\n}", "function ganjilGenap($angka)\n{\n if ($angka % 2 === 0) {\n echo $angka . \". Bilangan Genap \";\n } else {\n echo $angka . \". Bilangan Ganjil \";\n }\n}", "function findeAllNegativeValue($array){\n $negativeValue = [];\n $i=0;\n for ($x = 0; $x < count($array); $x++){\n if ($array[$x] < 0){\n $negativeValue[$i] = $array[$x];\n $i++;\n };\n }\n return ['count'=>$i, 'negativArray'=>$negativeValue];\n}", "public function testGetOutOfBoundsNegative()\n {\n (new Dom())->get(-1);\n }", "function superSubtraction($r, $s, $t, $u, $v = 2, $w = 1) {\n\n\treturn (int)$r - (int)$s - (int)$t - (int)$u - (int)$v - (int)$w;\n\n}", "function provera($broj) {\r\n if ($broj <= 1) {\r\n throw new Exception(\"Broj mora biti veci od 1\");\r\n }\r\n}", "public function testConstructWithNegativeValues()\n {\n static::setExpectedExceptionRegExp('LogicException');\n new Box(-10, -10);\n }", "function array_pass($array)\r\n{\r\n $array[0] *= 2;\r\n $array[1] *= 2;\r\n}", "function verteilung2($n) {\n return (powInt($n, 7/4));\n}", "function primeCheck($number){ \n if ($number == 1) \n return 0; \n for ($i = 2; $i <= $number/2; $i++){ \n if ($number % $i == 0) \n return 0; \n } \n return 1; \n}", "#[@test]\n public function selectNegativeFloat() {\n $this->assertEquals(-6.1, $this->db()->query('select -6.1 as value')->next('value'));\n }", "function nomside2($id){\nif (($id) == 1 || ($id) == 3 || ($id) == 4 || ($id) == 7 || ($id) == 11) \n{ \necho \"0\";\n}\nelse \n{ \necho \"1\";\n}\n}", "public function testWidenWithNegative()\n {\n static::setExpectedExceptionRegExp('LogicException');\n $this->box->widen(-10);\n }", "function zeroise($number, $threshold)\n {\n }", "function int_int_divide($x, $y) {\n if ($x == 0) return 0;\n if ($y == 0) return FALSE;\n return ($x % $y >= $y / 2) ?\n (($x - ($x % $y)) / $y) + 1 : ($x - ($x % $y)) / $y;\n}", "function fib($c)\r\n{\r\n return psquare(5 * $c * $c + 4) || psquare(5 * $c * $c - 4);\r\n\r\n}", "private static function isOdd($number)\n {\n return ($number%2) ? true : false;\n }", "function xuLyThuatToan1B($from, $to, $flag) {\r\n for ($i = $from; $i <= $to; $i++) {\r\n if ($flag != 0 && $flag != 1) {\r\n echo \"Flag chi duoc nhan 2 gia tri 0 hoac 1\";\r\n return;\r\n }\r\n //if (is_integer($from)== false || is_integer($to) == false) {\r\n if (!is_integer($from) || !is_integer($to)) { \r\n echo '$from & $to khong duoc la so thuc';\r\n return;\r\n }\r\n if ($flag == 0 && $i%2 == 0) {\r\n echo \"$i: la so chan <br/>\";\r\n }\r\n if ($flag == 1 && $i%2 == 1) {\r\n echo \"$i: la so le <br/>\";\r\n }\r\n }\r\n }", "function getLinhaModulo($modulo, $limite) {\n $linha = ($modulo == 0) ? $limite : $modulo;\n return $linha;\n}", "function variant_abs($val) {}", "function oddRange($min, $max)\n{\n $range = [];\n while ($min <= $max) {\n if ($min % 2 == 1) {\n $range[] = $min;\n }\n $min += 1;\n }\n return $range;\n}", "function modulus($a = 0, $b = 0) {\n\tif(is_numeric($a) && is_numeric($b)) {\n\t\treturn $a % $b;\n\t} else {\n\t\treturn throwErrorMessage(\"get modulus\");\n\t}\t\n}", "function p3_ex4() {\n for ($i = 1; $i <= 10; $i = $i += ($i/2))\n $return .= $i.\" - \";\n\n return $return;\n}", "public function subtract($value);" ]
[ "0.75627023", "0.67464066", "0.65400076", "0.6495227", "0.64641285", "0.6453166", "0.6413785", "0.6397312", "0.63316053", "0.6183513", "0.6163191", "0.6133107", "0.612251", "0.6113515", "0.6083003", "0.5966133", "0.5951523", "0.5935128", "0.5880874", "0.5804344", "0.5792571", "0.5765458", "0.56889665", "0.56807727", "0.5680599", "0.5675805", "0.5652743", "0.56431824", "0.5640335", "0.5623891", "0.5585088", "0.55781573", "0.5576032", "0.5549329", "0.55312365", "0.5523691", "0.55187285", "0.5503165", "0.54482925", "0.5430971", "0.5421352", "0.5401763", "0.5360465", "0.53447485", "0.5341701", "0.52970153", "0.52946633", "0.52840936", "0.52623445", "0.5244244", "0.52336615", "0.5224716", "0.5204316", "0.51964843", "0.5189063", "0.5159819", "0.51588196", "0.51565266", "0.5149851", "0.513157", "0.51096267", "0.5109527", "0.50929207", "0.5077236", "0.50762486", "0.50613344", "0.50578636", "0.5055685", "0.50545555", "0.50511026", "0.5050462", "0.50431395", "0.5040418", "0.5032957", "0.5031413", "0.50230336", "0.5017157", "0.4967165", "0.49652195", "0.49424183", "0.48893794", "0.48849776", "0.48812634", "0.48725456", "0.48701382", "0.48571646", "0.48472235", "0.48394677", "0.4839447", "0.48392022", "0.48354608", "0.4831805", "0.4830511", "0.4822523", "0.4819552", "0.48189744", "0.48118433", "0.48059085", "0.48024786", "0.4802391" ]
0.75731874
0
passing negative odd number
public function testIsEvenPassNegativeODD() { $this->assertFalse(isEven(-5)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testIsEvenPassNegativeEVEN()\n {\n \t$this->assertTrue(isEven(-4));\n }", "public function clipEvenOdd() {}", "function is_odd (int $value) : bool\n{\n return $value % 2 !== 0;\n}", "function odd_even($n) {\n $odd_even = fmod($n, 2);\n if($odd_even == 1) {\n return '_';\n } else {\n return 'true';\n }\n }", "function isOdd($num){\r\n\treturn (is_numeric($num)&($num&1));\r\n}", "function isEven($num){\r\n\treturn (is_numeric($num)&(!($num&1)));\r\n}", "private static function makeOddEven() {\n\n\t\tif (JudgeView::$even > 0)\n\t\t{\n\t\t\tJudgeView::$even = 0;\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJudgeView::$even = 1;\n\t\t\treturn 1;\n\t\t}\n\n\t}", "function evenOrOdd($number){\n\n\tif($number % 2 == 0){\n\t $number = $number + 10;\n\n\t}else{\n\t $number = $number + 11;\n\t}\n\n\treturn $number;\n\n}", "function neparan($b)\n{\n if($b%2==0)\n {\n return false;\n }\n else\n {\n return true;\n }\n}", "function isOdd ($input_number) {\n if (round($input_number/2) == ($input_number/2)) {\n return false;\n }\n else { return true; }\n}", "function checkEvenOrOdd($value) {\n\t\tif($value % 2 == 0) {\n\t\t\techo 'Even';\n\t\t} else {\n\t\t\techo 'Odd';\n\t\t}\n\t}", "function check_even($n)\n{\n\tif ($n % 2 == 0) {\n\t\techo \"{$n} la so so chan\";\n\t}\n}", "function isOddOrEven ($number) {\n $isEven = ($number % 2 == 0);\n echo '<p>Number is ' . ($isEven ? 'even' : 'odd') . '<p>';\n }", "public function testisEvenNumberFail()\n {\n $result = $this->calculator->isEvenNumber(3);\n $this->assertFalse($result);\n }", "public function odd($value): bool\n {\n return is_numeric($value) && (int) $value % 2 !== 0;\n }", "public function fillEvenOdd() {}", "function oddEven($number)\n{\n\t$lastDigit = substr($number, -1, 1);\n\tif($lastDigit == 1 or $lastDigit == 3 or $lastDigit == 5 or $lastDigit == 7 or $lastDigit == 9) { $oddEven = 'odd'; } else { $oddEven = 'even'; }\n\treturn ($oddEven);\n}", "function is_even (int $value) : bool\n{\n return $value % 2 === 0;\n}", "function numParImpar($num){\n $bool = true;\n if($num % 2 == 0){\n return true;\n }else{\n return false;\n }\n}", "public static function clipEvenOdd()\n {\n return new FlagQualifier(self::CLIP_EVEN_ODD);\n }", "function oddArray(array $array): int\n {\n $odd = 0;\n\n foreach($array as $number)\n {\n if($number & 1)\n {\n $odd++;\n }\n }\n\n return $odd;\n }", "function isNegative () {\n return (($this->num < 0) xor ($this->denom < 0));\n }", "function is_even($val) {\n\t\treturn ($val / 2 == floor($val / 2)) ? true : false;\n\t}", "public function testIsEvenNumber()\n\t{\n\t\t$this->assertTrue(ParityGame\\isEvenNumber(2));\n\t\t$this->assertTrue(ParityGame\\isEvenNumber(10));\n\n\t\t$this->assertFalse(ParityGame\\isEvenNumber(7));\n\t\t$this->assertFalse(ParityGame\\isEvenNumber(21));\n\t}", "public function testIsEvenPassZERO()\n {\n \t$this->assertTrue(isEven(0));\n }", "function isEven ($input_number) {\n if (round($input_number/2) == ($input_number/2)) {\n return true;\n }\n else { return false; }\n}", "function convertEvenToOdd($number)\n{\n $n = $number;\n if ($n % 2 === 0) {\n $n += 1;\n return $number . \" odd number\";\n }\n return $n . \" odd number\";\n}", "public function oddMask()\n {\n $low = (-($this->low & 1)) & 0xFFFFFFFF;\n $high = $low;\n return UInt64::newValue($high, $low);\n }", "private static function isOdd($number)\n {\n return ($number%2) ? true : false;\n }", "public function uneven( $numeral) {\n\t\t$booleanUneven = ($numeral/2) != 0;\n\t\tswitch ($booleanUneven) {\n\t\t\tcase true:\n\t\t\t\t$this->log($numeral . \" is odd!\");\n\t\t\t\treturn true;\n\t\t\tcase false: \n\t\t\t\t$this->log($numeral . \" is not odd!\");\n\t\t\t\treturn false;\n\t\t}\n\t}", "function class_odd_or_even( $num ) {\n echo ($num%2) ? ' item-odd' : ' item-even';\n}", "public function testIsEvenPassTwo()\n {\n \t$this->assertTrue(isEven(2));\n }", "function calEventNum(int $num){\n\n $result = 0 ;\n\n for ($i=1 ,$ii = $num ; $i <= $ii ; $i++){\n if ($i%2 == 0){\n $result++;\n }\n }\n return $result;\n}", "public function even($value): bool\n {\n return is_numeric($value) && (int) $value % 2 === 0;\n }", "public function test_bool_variable_and_even_or_odd_method()\n {\n $parameter_one = 'first';\n $parameter_two = 'second';\n \n for ($i=0; $i<10; $i++)\n {\n $string = math::even_or_odd($parameter_one, $parameter_two);\n \n $this->assertInternalType('string', $string);\n $this->assertNotEmpty($string);\n \n if ($i % 2 == 0)\n {\n $this->assertEquals($string, $parameter_one);\n $this->assertNotEquals($string, $parameter_two);\n }\n else\n {\n $this->assertNotEquals($string, $parameter_one);\n $this->assertEquals($string, $parameter_two);\n }\n }\n }", "public function testisEvenNumber()\n {\n $result = $this->calculator->isEvenNumber(2);\n $this->assertTrue($result);\n }", "function evenNumbers(array $array): array\n{\n $resultArray = [];\n\n if (count($array) !== 0) {\n foreach ($array as $elementArray) {\n if (($elementArray % 2) === 0) {\n $resultArray[] = $elementArray;\n }\n }\n }\n return $resultArray;\n}", "function isPowerOfTwo($num2)\n {\n if ($num2 === 0) {\n $return = 0;\n }\n while ($num2 != 1) {\n if ($num2 % 2 != 0)\n $return = 0;\n $num2 = $num2 / 2;\n }\n $return = 1;\n }", "public function implicar($x, $y){\n $b = 1-$x+$y;\n if ($b<=1)\n return $b;\n else \n return 1;\n }", "public function printOddNums()\n {\n for ($i = 1; $i <= 99; $i += 2) {\n printf(\"%3d\", $i);\n if (($i / 2 + 1) % 15 == 0) {\n echo \"\\n\";\n }\n }\n echo \"\\n\";\n }", "private function __isNumberEven($num)\n {\n return (bool) (((int) $num % 2) === 0);\n }", "function is_entier($n) {\nreturn ($n>0 || $n=='0');\n}", "function fpb($a,$b){\n\t\treturn ($b == 0) ? ($a):( fpb($b, $a % $b) );\n\t}", "function UglyNumber($number)\n{\n while ($number%2 == 0){\n $number = $number/2;\n }\n while ($number%3 == 0){\n $number = $number/3;\n }\n while ($number%5 == 0){\n $number = $number/5;\n }\n if($number == 1){\n return 1;\n }else{\n return 0;\n }\n}", "public function isNegative(): bool;", "function is_not_zero($num){\n\tif($num <= 0){\n\t\treturn 1;\n\t}\n\t\n\treturn $num;\t\n}", "function oddRange($min, $max)\n{\n $range = [];\n while ($min <= $max) {\n if ($min % 2 == 1) {\n $range[] = $min;\n }\n $min += 1;\n }\n return $range;\n}", "public function testIsEvenPassString()\n {\n \t$this->assertFalse(isEven(\"fail\"));\n }", "public static function isOdd(IInt32\\Type $x) : IBool\\Type {\n\t\t\treturn IBool\\Type::box(($x->unbox() % 2) != 0);\n\t\t}", "public static function strictlyNegInts()\n {\n return self::ints()->fmap(function ($x) {\n return -abs($x)-1;\n });\n }", "function _cb_negate($aVal) {\n return round(-$aVal);\n}", "function is_ugly($num)\n {\n $z = $num;\n if ($num == 0)\n {\n return \"$num is not an Ugly number\";\n }\n \n $x = array(2, 3, 5);\n foreach ($x as $i)\n {\n while ($num % $i == 0)\n {\n $num /= $i;\n }\n } \n if ($num==1)\n {\n return \"$z is an Ugly number\";\n }\n else\n {\n return \"$z is not an Ugly number\";\n }\n\n }", "public function getOddAndReverse($n){\n\t\t$result = array();\n\t\t$data = 0;\n\t\tfor($i = 0; $i < $n; $i++){\n\t\t\t//collect to result array\n\t\t\t$result[$i] = $data;\n\t\t\t\n\t\t\tif($i <= ($n-1)/2-1){\n\t\t\t\t$data = $data + 2;\n\t\t\t} else {\n\t\t\t\t$data = $data - 2;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function Even($K){\n if($K %2 == 0){\n\n return 'true';\n }else{\n\n return 'false';\n }\n}", "function isSpecialArray($arr)\n{\n for ($i = 0; $i < count($arr); $i++) {\n if ($i % 2 == 0) {\n if ($arr[$i] % 2 != 0) {\n return false;\n }\n } else {\n if ($arr[$i] % 2 == 0) {\n return false;\n }\n }\n }\n return true;\n}", "private function luhnOddDigit($n){\n\t\treturn ($n >= 5) ? 2 * $n - 9 : 2 * $n;\n\t}", "function negate() { # :: Num -> Num\n return -$this->value;\n }", "function change_negative_numeric($numeric) {\n\t\treturn $numeric * (-1);\n\t}", "#[@test]\n public function selectNegativeInteger() {\n $this->assertEquals(-6100, $this->db()->query('select -6100 as value')->next('value'));\n }", "public function methodNumberTwo()\r\n\t{\r\n\t\ttry {\r\n\t\t\t\r\n\t\t} catch (Exception $e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "function mod($n, $m) {\n return (($n % $m) + $m) % $m;\n}", "function isPrime ($n) {\n if ($n % 2 == 0) return false; //Check if is divisible by 2\n for ($i = 3; $i <= $n/2; $i += 2) { //Check only odd numbers\n if ($n % $i == 0) return false;\n }\n return true;\n}", "static function powerOfTwo($n)\n { \n if ($n >= 0 && $n < 31) {\n $pow = 2**$n;\n $all = 0; $count = 1;\n while($all != $pow)\n {\n $all = 2** $count;\n echo $all.\"\\n\";\n $count++;\n }\n } else {\n echo \"enter value between 0 to 31\".\"\\n\";\n Utility::powerOfTwo();\n }\n \n }", "function Prime($n)\n{\n for($i=2; $i<$n; $i++)\n {\n if($n %$i ==0)\n\t {\n\t\t return 0;\n\t\t }\n }\n return 1;\n }", "function getOddNumber(array $arrValues): int\n\t{\n\t\t$valueCounts = array_count_values($arrValues);\n\t\t$oddOccurredNumber = array_filter($valueCounts, function ($count) { return $count % 2 != 0; });\n\t\treturn array_keys($oddOccurredNumber)[0];\n\t}", "function negate() {\n static $negate = false;\n $negate = $negate ?: curry(function($x){\n return -$x;\n });\n return _apply($negate, func_get_args());\n}", "function primo($num) {\n if ($num == 2 || $num == 3 || $num == 5 || $num == 7) {\n return True;\n } else {\n if ($num % 2 != 0) {\n for ($i = 3; $i <= sqrt($num); $i += 2) {\n if ($num % $i == 0) {\n return false;\n }\n }\n return true;\n }\n }\n return false;\n }", "function flippingBits($n)\n{\n return $n ^ 0xFFFFFFFF;\n}", "public static function negInts()\n {\n return self::ints()->fmap(function ($x) {\n return -abs($x);\n });\n }", "function checkNum($red, $stupac, $mjesto) {\n\tif($red%2 == 0){\n\t\t$broj=0;\n\t\tif($stupac == 1){\n\t\t\t$broj= $mjesto-9;\n\t\t\techo $broj;\n\t\t} else {\n\t\t\t$broj = $mjesto / 10;\n\t\t\t$broj = floor($broj);\n\t\t\t$broj *= 10;\n\t\t\t$broj += $stupac;\n\t\t\techo $broj . \" i \" . $red ;\n\t\t}\n\n\t} else {\n\t\techo $mjesto;\n\t}\n\n}", "function primeCheck($number){ \n if ($number == 1) \n return 0; \n for ($i = 2; $i <= $number/2; $i++){ \n if ($number % $i == 0) \n return 0; \n } \n return 1; \n}", "function _primeNumber($num)\n{\n if ($num <= 1) return false;\n if ($num % 2 === 0 && $num > 2) return false;\n $n = floor(sqrt($num));\n for ($i = 3; $i <= $n; $i++) {\n if ($num % $i === 0) {\n return false;\n }\n }\n echo \"{$num} is prime number\";\n}", "public function testFilterWithNegative()\n {\n $this->expectException(FilterException::class);\n $this->expectExceptionMessage('Invalid integer: -1');\n $this->expectExceptionCode(FilterException::INVALID_INTEGER);\n\n $this->filter->filter(-1);\n }", "function divmod($dividend, $divisor, &$modulus)\n{\n\tif ($divisor == 0) {\n\t\t// option 1\n\t\techo 'Not possible to divide by zero!!!';\n\t\treturn false;\n\t\t\n\t\t// option 2\n\t\tdie('Not possible to divide by zero!!!');\n\t\t\n\t\t// option 3\n\t\tthrow new Exception('Not possible to divide by zero!!!');\n\t}\n\t\n\t$modulus = $dividend % $divisor;\n\t\n\treturn $dividend / $divisor;\n}", "function int_int_divide($x, $y) {\n if ($x == 0) return 0;\n if ($y == 0) return FALSE;\n return ($x % $y >= $y / 2) ?\n (($x - ($x % $y)) / $y) + 1 : ($x - ($x % $y)) / $y;\n}", "function nprimo($n)\n {\n $primo=true;\n \n $i=2;\n while (($i< $n) & ($primo)){\n \n if($n%$i==0) {\n $primo=false;\n }\n $i++;\n }\n return $primo;\n }", "public static function isEven(IInt32\\Type $x) : IBool\\Type {\n\t\t\treturn IBool\\Type::box(($x->unbox() % 2) == 0);\n\t\t}", "function ganjilGenap($angka)\n{\n if ($angka % 2 === 0) {\n echo $angka . \". Bilangan Genap \";\n } else {\n echo $angka . \". Bilangan Ganjil \";\n }\n}", "function minus($a = 20, $b =10) {\n\n\treturn (int)$a - (int)$b;\n\n}", "function modulo( $value, $modulus ){\n return ( $value % $modulus + $modulus ) % $modulus;\n}", "function checkprime($x){\n \n $sqrt = sqrt($x);\n $counter = 2;\n \n while ($counter <= $sqrt){\n if ($x % $counter == 0){\n break;\n }\n else{\n $counter++;\n }\n }\n if ($x % $counter != 0){\n return $x;\n }\n}", "function reminder($a = NULL, $b = NULL){\n \treturn $a % $b;\n }", "public static function isOdd(int $number): bool\n {\n return (bool) ($number & 1);\n }", "function get_class_odd_or_even( $num ) {\n $output = ($num%2) ? ' item-odd' : ' item-even';\n return $output;\n}", "public function HexDecodeStringOdd($s){\n if (count($s)%2 != 0) {\n $s = \"0\" + $s;\n }\n return $this->DecodeString($s);\n }", "function calculateOdds($entry_pool,$total_pool,$odds_type,$max_odds)\n{\n// $odds_type 0 american, 1 decimal, 2 fraction\nif (($odds_type > 2) || ($odds_type < 0))\n{\n\t$odds_type = 0;\n}\nif ($entry_pool == 0.0)\n\t$ret_odds = $max_odds;\nelse\n\t$ret_odds = ($total_pool - $entry_pool) / $entry_pool;\n\nif ($odds_type == 0)\n{\n\tif ($ret_odds <= 1.0)\n\t{\n\t\t$ret_odds = -(1.0 / $ret_odds);\n\t\t$ret_string = strval(round(100 * $ret_odds,0));\n\t}\n\telse\n\t{\n\t\t$ret_string = \"+\" . strval(round(100*$ret_odds,0));\n\t}\n}\nelse if ($odds_type == 2) // fraction stuff here\n{\n\t$ret_string = \"catsbigolevaggy\";\n}\nelse\n{\n\t$ret_string = strval(round($ret_odds,2));\n}\nreturn $ret_string;\n}", "function findIt(array $seq): int\n{\n foreach ($seq as $number) {\n $arrNumeros = array_keys($seq, $number);\n if (count($arrNumeros) % 2 === 1) {\n return $number;\n }\n }\n}", "function minus() {\n static $minus = false;\n $minus = $minus ?: curry(function($x, $y){\n return $x - $y;\n });\n return _apply($minus, func_get_args());\n}", "function modulo($val, $param) {\n\t\treturn $val - (floor($val / $param) * $param);\n\t}", "function secondRightmostZeroBit($n) {\n return ((($n | $n+1) ^ (($n | $n + 1) + 1)) + 1) >> 1;\n}", "function isLeap($year)\n{\n if ($year % 400 == 0) {\n echo \"{$year} is a leap year.\";\n } elseif ($year % 4 == 0 && $year % 100 !== 0) {\n echo \"{$year} is a leap year.\";\n }\n}", "function nomside2($id){\nif (($id) == 1 || ($id) == 3 || ($id) == 4 || ($id) == 7 || ($id) == 11) \n{ \necho \"0\";\n}\nelse \n{ \necho \"1\";\n}\n}", "function array_pass($array)\r\n{\r\n $array[0] *= 2;\r\n $array[1] *= 2;\r\n}", "function getEvenYears( $years ) {\n\t\t$years = array_flip( $years );\n\t\tforeach( $years as $year => $id ) {\n\t\t\t$years[$year] = \"5\";\n\t\t\tif( $year % 2 == 0 ) unset( $years[$year] );\n\t\t}\n\t\treturn $years;\n\t}", "function resta($a,$b)\n {\n return $a-$b;\n }", "function deelbaarDoor3($invoer)\r\n{\r\n if ($invoer % 3 == 0) {\r\n $invoer = true;\r\n\r\n } else {\r\n $invoer = false;\r\n }\r\n return \"invoer = \" . $invoer;\r\n}", "function modulus($a = 0, $b = 0) {\n\tif(is_numeric($a) && is_numeric($b)) {\n\t\treturn $a % $b;\n\t} else {\n\t\treturn throwErrorMessage(\"get modulus\");\n\t}\t\n}", "function my_sort($a,$b){\n\tif($a%2==0 && $b%2==0)\n\t\treturn 0;\n\n\tif($a%2==0 && $b%2==1)\n\t\treturn -1;\n\telse\n\t\treturn 1;\n}", "function absint($maybeint)\n {\n }", "function p3_ex4() {\n for ($i = 1; $i <= 10; $i = $i += ($i/2))\n $return .= $i.\" - \";\n\n return $return;\n}" ]
[ "0.7302539", "0.72618663", "0.68092835", "0.6776312", "0.6746858", "0.6690784", "0.6590767", "0.65474516", "0.654103", "0.6454552", "0.6357149", "0.6341215", "0.62869585", "0.6266048", "0.6253534", "0.6225314", "0.6204725", "0.6190281", "0.6145267", "0.61184764", "0.611672", "0.60635746", "0.60579705", "0.6054306", "0.5989178", "0.59559363", "0.5936511", "0.5813849", "0.5812929", "0.57674414", "0.5686416", "0.5644616", "0.5602168", "0.56001896", "0.5599252", "0.5588209", "0.5560603", "0.55282766", "0.54895544", "0.5464394", "0.54495126", "0.54467446", "0.5435776", "0.5431693", "0.54304194", "0.5415461", "0.53890616", "0.53859895", "0.53739405", "0.53716123", "0.53553146", "0.5326723", "0.53039336", "0.5282718", "0.5274727", "0.52672017", "0.52654946", "0.5229341", "0.5219887", "0.5215872", "0.5197896", "0.5197497", "0.51706856", "0.51486224", "0.51398796", "0.5122829", "0.51056963", "0.5097357", "0.50795555", "0.5065435", "0.50464123", "0.5025277", "0.5019304", "0.50056654", "0.49866676", "0.49764013", "0.49708983", "0.4963955", "0.49579215", "0.49427953", "0.4941367", "0.49370828", "0.49319965", "0.4926405", "0.49214202", "0.49157512", "0.49070087", "0.48992738", "0.48973793", "0.48937142", "0.4890074", "0.4886925", "0.488272", "0.48677033", "0.4860228", "0.4852643", "0.4851494", "0.48481995", "0.48455095", "0.4844856" ]
0.7691487
0
passing 2 ( 2 % 2)
public function testIsEvenPassTwo() { $this->assertTrue(isEven(2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fpb($a,$b){\n\t\treturn ($b == 0) ? ($a):( fpb($b, $a % $b) );\n\t}", "function check_even($n)\n{\n\tif ($n % 2 == 0) {\n\t\techo \"{$n} la so so chan\";\n\t}\n}", "function modulo( $value, $modulus ){\n return ( $value % $modulus + $modulus ) % $modulus;\n}", "function modulo() {\n static $modulo = false;\n $modulo = $modulo ?: curry(function($x, $y){\n return $x % $y;\n });\n return _apply($modulo, func_get_args());\n}", "function divmod($divident,$divisor,&$modulus){\n\n//The function will return the result of the division of the first two.\nif ($divisor == 0) die ('Not possible to divide by 0');\n$modulus = $divident % $divisor;\n return $divident / $divisor;\n}", "function mod($n, $m) {\n return (($n % $m) + $m) % $m;\n}", "function is_odd (int $value) : bool\n{\n return $value % 2 !== 0;\n}", "private static function makeOddEven() {\n\n\t\tif (JudgeView::$even > 0)\n\t\t{\n\t\t\tJudgeView::$even = 0;\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJudgeView::$even = 1;\n\t\t\treturn 1;\n\t\t}\n\n\t}", "function reminder($a = NULL, $b = NULL){\n \treturn $a % $b;\n }", "function mod($right): Closure\n{\n return function ($left) use ($right) {\n return $left % $right;\n };\n}", "function modulus($a = 0, $b = 0) {\n\tif(is_numeric($a) && is_numeric($b)) {\n\t\treturn $a % $b;\n\t} else {\n\t\treturn throwErrorMessage(\"get modulus\");\n\t}\t\n}", "function checkEvenOrOdd($value) {\n\t\tif($value % 2 == 0) {\n\t\t\techo 'Even';\n\t\t} else {\n\t\t\techo 'Odd';\n\t\t}\n\t}", "function numParImpar($num){\n $bool = true;\n if($num % 2 == 0){\n return true;\n }else{\n return false;\n }\n}", "function neparan($b)\n{\n if($b%2==0)\n {\n return false;\n }\n else\n {\n return true;\n }\n}", "function ganjilGenap($angka)\n{\n if ($angka % 2 === 0) {\n echo $angka . \". Bilangan Genap \";\n } else {\n echo $angka . \". Bilangan Ganjil \";\n }\n}", "function is_even (int $value) : bool\n{\n return $value % 2 === 0;\n}", "function odd_even($n) {\n $odd_even = fmod($n, 2);\n if($odd_even == 1) {\n return '_';\n } else {\n return 'true';\n }\n }", "function class_odd_or_even( $num ) {\n echo ($num%2) ? ' item-odd' : ' item-even';\n}", "public function fillEvenOdd() {}", "function modulo($val, $param) {\n\t\treturn $val - (floor($val / $param) * $param);\n\t}", "function Even($K){\n if($K %2 == 0){\n\n return 'true';\n }else{\n\n return 'false';\n }\n}", "function isOddOrEven ($number) {\n $isEven = ($number % 2 == 0);\n echo '<p>Number is ' . ($isEven ? 'even' : 'odd') . '<p>';\n }", "function yy_r126(){$this->_retvalue = '!('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; }", "public static function remainder( $a, $b ) {\n \n // Use the modulo helper.\n return forward_static_call('HandlebarsHelpers\\MathHelpers::modulo', $a, $b);\n \n }", "public static function modulo( $a, $b ) {\n \n // Throw an error for any non-numeric values.\n if( !is_numeric($a) ) throw new Error('Expected the first argument to be a number');\n if( !is_numeric($b) ) throw new Error('Expected the second argument to be a number');\n \n // Modulo the two numbers.\n return ($a % $b);\n \n }", "function isPowerOfTwo($num2)\n {\n if ($num2 === 0) {\n $return = 0;\n }\n while ($num2 != 1) {\n if ($num2 % 2 != 0)\n $return = 0;\n $num2 = $num2 / 2;\n }\n $return = 1;\n }", "function get_two() { return 2; }", "function yy_r127(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; }", "public function mod($dividend, $modulus);", "function divmod($dividend, $divisor, &$modulus)\n{\n\tif ($divisor == 0) {\n\t\t// option 1\n\t\techo 'Not possible to divide by zero!!!';\n\t\treturn false;\n\t\t\n\t\t// option 2\n\t\tdie('Not possible to divide by zero!!!');\n\t\t\n\t\t// option 3\n\t\tthrow new Exception('Not possible to divide by zero!!!');\n\t}\n\t\n\t$modulus = $dividend % $divisor;\n\t\n\treturn $dividend / $divisor;\n}", "function isEven($num){\r\n\treturn (is_numeric($num)&(!($num&1)));\r\n}", "function bcpowmod($left_operand, $right_operand, $modulus, $scale = false)\n{\n}", "public function methodNumberTwo()\r\n\t{\r\n\t\ttry {\r\n\t\t\t\r\n\t\t} catch (Exception $e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "public static function modulus($self, $a, $b)\n {\n $retval = $a % $b;\n\n //PHP's mod operator has an odd behavior where it leaves negative operators negative\n //we'll fix this, for a more standard behavior\n if($retval < 0)\n $retval += $b;\n\n //return the result\n return $retval;\n }", "private function mcd($a, $b) {\n while (($a % $b) != 0) {\n $c = $b;\n $b = $a % $b;\n $a = $c;\n }\n return (integer) $b;\n }", "function evenOrOdd($number){\n\n\tif($number % 2 == 0){\n\t $number = $number + 10;\n\n\t}else{\n\t $number = $number + 11;\n\t}\n\n\treturn $number;\n\n}", "function calEventNum(int $num){\n\n $result = 0 ;\n\n for ($i=1 ,$ii = $num ; $i <= $ii ; $i++){\n if ($i%2 == 0){\n $result++;\n }\n }\n return $result;\n}", "function Prime($n)\n{\n for($i=2; $i<$n; $i++)\n {\n if($n %$i ==0)\n\t {\n\t\t return 0;\n\t\t }\n }\n return 1;\n }", "function isOdd($num){\r\n\treturn (is_numeric($num)&($num&1));\r\n}", "function findVal($num, $multiple1, $multiple2, $valTrue) {\n\tif ( ((int)$num % $multiple1 == 0) && ((int)$num % $multiple2 == 0) && is_numeric($num) )\n\t{\n\t\treturn $valTrue;\n\t} \n\treturn $num;\n}", "public static function mod($x, $y)\n {\n if ($y != 0) {\n return $x % $y;\n }\n\n return 'Denominator must not = 0';\n }", "function is_even($val) {\n\t\treturn ($val / 2 == floor($val / 2)) ? true : false;\n\t}", "public function testIsEvenPassNegativeODD()\n {\n \t$this->assertFalse(isEven(-5));\n }", "public static function mod($op1, $op2)\n {\n self::checkParameter($op1, $op2);\n $f = self::checkMathFunc('mod');\n if($f === false) {\n return self::operIsBig($op1, $op2) ? self::decDiv($op1, $op2, $mod) : $op1 % $op2;\n }\n return $f($op1, $op2);\n }", "function isOdd ($input_number) {\n if (round($input_number/2) == ($input_number/2)) {\n return false;\n }\n else { return true; }\n}", "public function odd($value): bool\n {\n return is_numeric($value) && (int) $value % 2 !== 0;\n }", "protected function divied($array,$n)\n{\n $data_divided = count($array) - count($array) % $n ;\n return $data_divided ;\n}", "function primeCheck($number){ \n if ($number == 1) \n return 0; \n for ($i = 2; $i <= $number/2; $i++){ \n if ($number % $i == 0) \n return 0; \n } \n return 1; \n}", "public function test_bool_variable_and_even_or_odd_method()\n {\n $parameter_one = 'first';\n $parameter_two = 'second';\n \n for ($i=0; $i<10; $i++)\n {\n $string = math::even_or_odd($parameter_one, $parameter_two);\n \n $this->assertInternalType('string', $string);\n $this->assertNotEmpty($string);\n \n if ($i % 2 == 0)\n {\n $this->assertEquals($string, $parameter_one);\n $this->assertNotEquals($string, $parameter_two);\n }\n else\n {\n $this->assertNotEquals($string, $parameter_one);\n $this->assertEquals($string, $parameter_two);\n }\n }\n }", "function yy_r72()\n {\n $this->_retvalue = '!(' . $this->yystack[$this->yyidx + - 2]->minor . ' % ' . $this->yystack[$this->yyidx + 0]->minor . ')';\n }", "public function testisEvenNumber()\n {\n $result = $this->calculator->isEvenNumber(2);\n $this->assertTrue($result);\n }", "function isEven ($input_number) {\n if (round($input_number/2) == ($input_number/2)) {\n return true;\n }\n else { return false; }\n}", "function int_int_divide($x, $y) {\n if ($x == 0) return 0;\n if ($y == 0) return FALSE;\n return ($x % $y >= $y / 2) ?\n (($x - ($x % $y)) / $y) + 1 : ($x - ($x % $y)) / $y;\n}", "function p3_ex4() {\n for ($i = 1; $i <= 10; $i = $i += ($i/2))\n $return .= $i.\" - \";\n\n return $return;\n}", "private function two() {\n $position1 = $this->inputarray[$this->position+1];\n $position2 = $this->inputarray[$this->position+2];\n $content1 = $this->inputarray[$position1];\n $content2 = $this->inputarray[$position2];\n $product = $content1 * $content2;\n return $product;\n }", "public function clipEvenOdd() {}", "public function modulus(...$params)\n {\n return $this->mod(...$params);\n }", "public function step_2()\n {\n }", "#[@test]\n public function canRepeat_withNumericRepeat2_TrueTwice() {\n $this->sut->setRepeat(2);\n $this->assertTrue($this->sut->canRepeat());\n $this->sut->incActualCalls();\n $this->assertTrue($this->sut->canRepeat());\n $this->sut->incActualCalls();\n $this->assertFalse($this->sut->canRepeat());\n }", "function test($num,$num2){\n\t\n\t\techo $num.\"<br/>\";\n\t\techo $num2;\n\t}", "function variant_mod($left, $right) {}", "public function even($value): bool\n {\n return is_numeric($value) && (int) $value % 2 === 0;\n }", "function array_pass($array)\r\n{\r\n $array[0] *= 2;\r\n $array[1] *= 2;\r\n}", "static function powerOfTwo($n)\n { \n if ($n >= 0 && $n < 31) {\n $pow = 2**$n;\n $all = 0; $count = 1;\n while($all != $pow)\n {\n $all = 2** $count;\n echo $all.\"\\n\";\n $count++;\n }\n } else {\n echo \"enter value between 0 to 31\".\"\\n\";\n Utility::powerOfTwo();\n }\n \n }", "function alternate_color($count)\n\t{\n\t\tif(($count%2) == 1)\n\t\t\techo 'class=\"row1\"';\n\t\telse\n\t\t\techo 'class=\"row2\"';\n\t}", "function dividir($numero1,$numero2) // a la funcion le paso los parametros\n{\n\n$numero1;//variables\n$numero2;\n\n$resultado = $numero1 / $numero2; \n\nreturn $resultado; // retorne resultado que va a ser numero1 / numero2\n}", "function gcd($a, $b) {\n while ($b) {\n $t = $b;\n $b = $a % $b;\n $a = $t;\n }\n\n return $a;\n }", "public function testIsEvenPassNegativeEVEN()\n {\n \t$this->assertTrue(isEven(-4));\n }", "public function testIsEvenNumber()\n\t{\n\t\t$this->assertTrue(ParityGame\\isEvenNumber(2));\n\t\t$this->assertTrue(ParityGame\\isEvenNumber(10));\n\n\t\t$this->assertFalse(ParityGame\\isEvenNumber(7));\n\t\t$this->assertFalse(ParityGame\\isEvenNumber(21));\n\t}", "function isPrime ($n) {\n if ($n % 2 == 0) return false; //Check if is divisible by 2\n for ($i = 3; $i <= $n/2; $i += 2) { //Check only odd numbers\n if ($n % $i == 0) return false;\n }\n return true;\n}", "public function printOddNums()\n {\n for ($i = 1; $i <= 99; $i += 2) {\n printf(\"%3d\", $i);\n if (($i / 2 + 1) % 15 == 0) {\n echo \"\\n\";\n }\n }\n echo \"\\n\";\n }", "function isPrime($n) { \n for($x=2; $x < ($n-1); $x++) { \n //echo \"Mod :\".($n%$x);\n if($n%$x == 0) { return \"$n is Prime Number..</br>\"; } \n } \n return \"$n is not a Prime Number..</br>\"; \n}", "function checkprime($x){\n \n $sqrt = sqrt($x);\n $counter = 2;\n \n while ($counter <= $sqrt){\n if ($x % $counter == 0){\n break;\n }\n else{\n $counter++;\n }\n }\n if ($x % $counter != 0){\n return $x;\n }\n}", "function GCD($a, $b)\n{\n while ($b != 0)\n {\n $remainder = $a % $b;\n $a = $b;\n $b = $remainder;\n }\n return abs($a);\n}", "private static function isOdd($number)\n {\n return ($number%2) ? true : false;\n }", "function Factor($n){\n while($n%2==0){\n echo \"2 \\n\";\n $n=$n/2;\n }\n for($i=3;$i<=sqrt($n);$i=$i+2){\n while($n%$i==0){\n echo \"$i \\n\";\n $n=$n/$i;\n }\n }\n if($n>2){\n echo \"$n\\n\";\n }\n }", "function findIt(array $seq): int\n{\n foreach ($seq as $number) {\n $arrNumeros = array_keys($seq, $number);\n if (count($arrNumeros) % 2 === 1) {\n return $number;\n }\n }\n}", "public function testisEvenNumberFail()\n {\n $result = $this->calculator->isEvenNumber(3);\n $this->assertFalse($result);\n }", "function array_pass($array)\n{\n $array[0] *= 2;\n $array[1] *= 2;\n}", "public function testIsEvenPassZERO()\n {\n \t$this->assertTrue(isEven(0));\n }", "function gcd( $a, $b) { if ($a==0 ) return $b; return gcd($b % $a, $a); }", "function convertEvenToOdd($number)\n{\n $n = $number;\n if ($n % 2 === 0) {\n $n += 1;\n return $number . \" odd number\";\n }\n return $n . \" odd number\";\n}", "protected function calc_cycle()\n {\n if($odd = $this->year%2)\n {\n $this->cycle = $this->year + 1;\n }\n else\n {\n $this->cycle = $this->year;\n }\n }", "function getLinhaModulo($modulo, $limite) {\n $linha = ($modulo == 0) ? $limite : $modulo;\n return $linha;\n}", "function modpow($a, $b, $m){\n\t\tif ($b == 0) return 1%$m;\n\t\t$tmp = modpow($a,$b/2,$m);\n\t\tif ($b%2 == 0) return $tmp*$tmp%$m;\n\t\treturn (($tmp*$tmp%$m)*$a)%$m;\n\t}", "function kiemTraChanLe()\n\t{\n\t\tglobal $a;\n\t\t$total = 100; // bien cuc bo\n\t\t// luu y: hay dat cau lenh nay ben tren cac lenh khac truoc khi goi bien do ra su dung\n\t\tif($a % 2 == 0) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "function tablealt($i) {\r\n\techo ($i%2 == 0) ? \" alt\" : \"\";\r\n}", "public static function mod(int $a, int $b): int {\n return $a - (int)floor($a / $b) * $b;\n }", "function oddArray(array $array): int\n {\n $odd = 0;\n\n foreach($array as $number)\n {\n if($number & 1)\n {\n $odd++;\n }\n }\n\n return $odd;\n }", "public function testPlayerRoll2()\n {\n $game = new DiceGame(4, 1);\n $this->assertInstanceOf(\"\\Ida\\Dice\\DiceGame\", $game);\n $game->setOrder();\n \n $current = $game->getPlayerTurn();\n \n function reDo2($current, $game)\n {\n while ($current != 0) {\n $game->nextTurn();\n $current = $game->getPlayerTurn();\n }\n \n $game->playerRoll();\n return [$game->getPlayerTurn(), $current];\n }\n\n $player = reDo2($current, $game);\n while ($player[0] === 0) {\n $player = reDo2($current, $game);\n }\n \n $this->assertNotEquals($player[0], $player[1]);\n }", "public static function modulo(IInt32\\Type $x, IInt32\\Type $y) : IInt32\\Type {\n\t\t\treturn IInt32\\Type::box($x->unbox() % $y->unbox());\n\t\t}", "public function f02()\n {\n }", "function UglyNumber($number)\n{\n while ($number%2 == 0){\n $number = $number/2;\n }\n while ($number%3 == 0){\n $number = $number/3;\n }\n while ($number%5 == 0){\n $number = $number/5;\n }\n if($number == 1){\n return 1;\n }else{\n return 0;\n }\n}", "function evenNumbers(array $array): array\n{\n $resultArray = [];\n\n if (count($array) !== 0) {\n foreach ($array as $elementArray) {\n if (($elementArray % 2) === 0) {\n $resultArray[] = $elementArray;\n }\n }\n }\n return $resultArray;\n}", "function saveDiv($param1, $param2) {\n\t\t\t$result = 0;\n\t\t\tif ($param2 != 0) {\n\t\t\t\t$result = $param1 / $param2;\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "function averageOfTwo($num1, $num2){\n// return $avg;\n return (($num1 + $num2) / 2);\n }", "protected function onEachSide(): int\n {\n return 3;\n }", "function get_class_odd_or_even( $num ) {\n $output = ($num%2) ? ' item-odd' : ' item-even';\n return $output;\n}", "function prime($x)\n{\n\tif ($x % 2 != 0) {\n\t\techo 'It is not a prime number';\n\t} else {\n\t\techo 'It is a prime number';\n\t}\n}", "final public function exp2()\n {\n $func = function(&$element)\n {\n $element = 2 ** $element;\n };\n\n return $this->copy()->walk_recursive($func);\n }" ]
[ "0.65400845", "0.649239", "0.6483335", "0.64039296", "0.637906", "0.63662434", "0.63043123", "0.62014955", "0.6171302", "0.6162165", "0.61577666", "0.61300176", "0.61105514", "0.61074984", "0.6085571", "0.60790926", "0.606005", "0.5934166", "0.59208596", "0.5917324", "0.59133524", "0.59098655", "0.58230484", "0.58117133", "0.5787061", "0.578522", "0.57680297", "0.57485396", "0.5741634", "0.5737577", "0.57252914", "0.5714297", "0.5705593", "0.5696368", "0.5646746", "0.56326216", "0.56064063", "0.5590657", "0.558952", "0.55791825", "0.5483306", "0.5477537", "0.54756963", "0.5436656", "0.5429426", "0.54244184", "0.541501", "0.54064363", "0.5398857", "0.537087", "0.5370219", "0.5362569", "0.53301585", "0.5317573", "0.53121686", "0.531175", "0.5307193", "0.5298621", "0.52956223", "0.52804357", "0.52475715", "0.52357864", "0.5219915", "0.5216339", "0.52097714", "0.52036023", "0.5202803", "0.51963955", "0.51919484", "0.5182243", "0.5177381", "0.51667386", "0.5157994", "0.5154384", "0.51471233", "0.5142181", "0.51403826", "0.5132591", "0.5129095", "0.5126934", "0.51250947", "0.5122582", "0.5114759", "0.5112933", "0.511233", "0.5111388", "0.50831634", "0.50823313", "0.5079965", "0.5069081", "0.5058522", "0.50480825", "0.5027068", "0.50260425", "0.50204897", "0.50110614", "0.50109226", "0.50104386", "0.5009916", "0.5007688" ]
0.6203706
7
passing zero, assuming that 0 is even number
public function testIsEvenPassZERO() { $this->assertTrue(isEven(0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function makeOddEven() {\n\n\t\tif (JudgeView::$even > 0)\n\t\t{\n\t\t\tJudgeView::$even = 0;\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJudgeView::$even = 1;\n\t\t\treturn 1;\n\t\t}\n\n\t}", "function isEven($num){\r\n\treturn (is_numeric($num)&(!($num&1)));\r\n}", "public function testIsEvenPassNegativeEVEN()\n {\n \t$this->assertTrue(isEven(-4));\n }", "public function testIsEvenPassNegativeODD()\n {\n \t$this->assertFalse(isEven(-5));\n }", "function is_even (int $value) : bool\n{\n return $value % 2 === 0;\n}", "public function testIsEvenNumber()\n\t{\n\t\t$this->assertTrue(ParityGame\\isEvenNumber(2));\n\t\t$this->assertTrue(ParityGame\\isEvenNumber(10));\n\n\t\t$this->assertFalse(ParityGame\\isEvenNumber(7));\n\t\t$this->assertFalse(ParityGame\\isEvenNumber(21));\n\t}", "public function fillEvenOdd() {}", "function check_even($n)\n{\n\tif ($n % 2 == 0) {\n\t\techo \"{$n} la so so chan\";\n\t}\n}", "function is_even($val) {\n\t\treturn ($val / 2 == floor($val / 2)) ? true : false;\n\t}", "function is_odd (int $value) : bool\n{\n return $value % 2 !== 0;\n}", "function isEven ($input_number) {\n if (round($input_number/2) == ($input_number/2)) {\n return true;\n }\n else { return false; }\n}", "function evenOrOdd($number){\n\n\tif($number % 2 == 0){\n\t $number = $number + 10;\n\n\t}else{\n\t $number = $number + 11;\n\t}\n\n\treturn $number;\n\n}", "function checkEvenOrOdd($value) {\n\t\tif($value % 2 == 0) {\n\t\t\techo 'Even';\n\t\t} else {\n\t\t\techo 'Odd';\n\t\t}\n\t}", "public function clipEvenOdd() {}", "public function testisEvenNumber()\n {\n $result = $this->calculator->isEvenNumber(2);\n $this->assertTrue($result);\n }", "public function testisEvenNumberFail()\n {\n $result = $this->calculator->isEvenNumber(3);\n $this->assertFalse($result);\n }", "function odd_even($n) {\n $odd_even = fmod($n, 2);\n if($odd_even == 1) {\n return '_';\n } else {\n return 'true';\n }\n }", "public function even($value): bool\n {\n return is_numeric($value) && (int) $value % 2 === 0;\n }", "function neparan($b)\n{\n if($b%2==0)\n {\n return false;\n }\n else\n {\n return true;\n }\n}", "public function testIsEvenPassTwo()\n {\n \t$this->assertTrue(isEven(2));\n }", "function isOdd ($input_number) {\n if (round($input_number/2) == ($input_number/2)) {\n return false;\n }\n else { return true; }\n}", "function is_not_zero($num){\n\tif($num <= 0){\n\t\treturn 1;\n\t}\n\t\n\treturn $num;\t\n}", "function isOddOrEven ($number) {\n $isEven = ($number % 2 == 0);\n echo '<p>Number is ' . ($isEven ? 'even' : 'odd') . '<p>';\n }", "function numParImpar($num){\n $bool = true;\n if($num % 2 == 0){\n return true;\n }else{\n return false;\n }\n}", "function isOdd($num){\r\n\treturn (is_numeric($num)&($num&1));\r\n}", "function is_entier($n) {\nreturn ($n>0 || $n=='0');\n}", "function calEventNum(int $num){\n\n $result = 0 ;\n\n for ($i=1 ,$ii = $num ; $i <= $ii ; $i++){\n if ($i%2 == 0){\n $result++;\n }\n }\n return $result;\n}", "public function odd($value): bool\n {\n return is_numeric($value) && (int) $value % 2 !== 0;\n }", "function __return_zero()\n {\n }", "function oddEven($number)\n{\n\t$lastDigit = substr($number, -1, 1);\n\tif($lastDigit == 1 or $lastDigit == 3 or $lastDigit == 5 or $lastDigit == 7 or $lastDigit == 9) { $oddEven = 'odd'; } else { $oddEven = 'even'; }\n\treturn ($oddEven);\n}", "function evenNumbers(array $array): array\n{\n $resultArray = [];\n\n if (count($array) !== 0) {\n foreach ($array as $elementArray) {\n if (($elementArray % 2) === 0) {\n $resultArray[] = $elementArray;\n }\n }\n }\n return $resultArray;\n}", "function convertEvenToOdd($number)\n{\n $n = $number;\n if ($n % 2 === 0) {\n $n += 1;\n return $number . \" odd number\";\n }\n return $n . \" odd number\";\n}", "function oddArray(array $array): int\n {\n $odd = 0;\n\n foreach($array as $number)\n {\n if($number & 1)\n {\n $odd++;\n }\n }\n\n return $odd;\n }", "function Even($K){\n if($K %2 == 0){\n\n return 'true';\n }else{\n\n return 'false';\n }\n}", "function secondRightmostZeroBit($n) {\n return ((($n | $n+1) ^ (($n | $n + 1) + 1)) + 1) >> 1;\n}", "function fpb($a,$b){\n\t\treturn ($b == 0) ? ($a):( fpb($b, $a % $b) );\n\t}", "function GpsData_Walk_Replace_Zero(&$value, $key, $newValueForZeros) {\n\tif ($value <= 0)\n\t\t$value = $newValueForZeros;\n}", "function isPowerOfTwo($num2)\n {\n if ($num2 === 0) {\n $return = 0;\n }\n while ($num2 != 1) {\n if ($num2 % 2 != 0)\n $return = 0;\n $num2 = $num2 / 2;\n }\n $return = 1;\n }", "private function __isNumberEven($num)\n {\n return (bool) (((int) $num % 2) === 0);\n }", "function evenFibonacciNumbers($n){\n $sum = 0;\n $seq[] = maxFibonacciValue($n);\n foreach($seq[0] as $value){\n if($value % 2 == 0){ $sum += $value; }\n }\n return $sum;\n }", "public function testAddZero()\n {\n $this\n ->given(\n $zero = $this->fromNative(0),\n $number = $this->fromNative($this->randomNativeNumber())\n )\n ->then\n ->boolean(\n $number->add($zero)->equals($number)\n )->isTrue()\n ->boolean(\n $zero->add($number)->equals($number)\n )->isTrue()\n ;\n }", "function class_odd_or_even( $num ) {\n echo ($num%2) ? ' item-odd' : ' item-even';\n}", "public function testSubZero()\n {\n $this\n ->given(\n $zero = $this->fromNative(0),\n $number = $this->fromNative($this->randomNativeNumber())\n )\n ->then\n ->boolean(\n $number->sub($zero)->equals($number)\n )->isTrue()\n ->boolean(\n $zero->sub($number)->isNegative()\n )->isTrue()\n ;\n }", "function zeroise($number, $threshold)\n {\n }", "function pilih($data){\n if($data === 0){\n return true;\n }\n return false;\n }", "function evenFibonacci($limit) {\n $x = 0;\n $y = 1;\n $sum = 0;\n while ($x <= $limit) {\n //printf($x . \"\\n\"); //prints the fibonacci sequence\n $x = $y - $x;\n $y = $x + $y;\n if ($x % 2 == 0) {\n $sum += $x;\n }\n }\n return $sum;\n}", "function nomside2($id){\nif (($id) == 1 || ($id) == 3 || ($id) == 4 || ($id) == 7 || ($id) == 11) \n{ \necho \"0\";\n}\nelse \n{ \necho \"1\";\n}\n}", "function UglyNumber($number)\n{\n while ($number%2 == 0){\n $number = $number/2;\n }\n while ($number%3 == 0){\n $number = $number/3;\n }\n while ($number%5 == 0){\n $number = $number/5;\n }\n if($number == 1){\n return 1;\n }else{\n return 0;\n }\n}", "public function isZero(): bool;", "public static function isEven(IInt32\\Type $x) : IBool\\Type {\n\t\t\treturn IBool\\Type::box(($x->unbox() % 2) == 0);\n\t\t}", "static function powerOfTwo($n)\n { \n if ($n >= 0 && $n < 31) {\n $pow = 2**$n;\n $all = 0; $count = 1;\n while($all != $pow)\n {\n $all = 2** $count;\n echo $all.\"\\n\";\n $count++;\n }\n } else {\n echo \"enter value between 0 to 31\".\"\\n\";\n Utility::powerOfTwo();\n }\n \n }", "function Prime($n)\n{\n for($i=2; $i<$n; $i++)\n {\n if($n %$i ==0)\n\t {\n\t\t return 0;\n\t\t }\n }\n return 1;\n }", "function num1BitsSecondSolution($number)\n{\n if ($number <= 0) {\n return 0;\n }\n\n for ($c = 0; $number; $number >>= 1) {\n $c += $number & 1;\n }\n\n return $c;\n}", "public function zeroFill($a, $b){\n return ($a >= 0) ? ($a >> $b) : ($a >> $b) & (PHP_INT_MAX >> ($b - 1));\n }", "function findIt(array $seq): int\n{\n foreach ($seq as $number) {\n $arrNumeros = array_keys($seq, $number);\n if (count($arrNumeros) % 2 === 1) {\n return $number;\n }\n }\n}", "function primeCheck($number){ \n if ($number == 1) \n return 0; \n for ($i = 2; $i <= $number/2; $i++){ \n if ($number % $i == 0) \n return 0; \n } \n return 1; \n}", "function int_int_divide($x, $y) {\n if ($x == 0) return 0;\n if ($y == 0) return FALSE;\n return ($x % $y >= $y / 2) ?\n (($x - ($x % $y)) / $y) + 1 : ($x - ($x % $y)) / $y;\n}", "public function testDoubleIfZero(){\n\t\t$this->assertEquals(0, \\Grafikart\\Math::double(0));\n\t}", "public function testMultZero()\n {\n $this\n ->given(\n $zero = $this->fromNative(0),\n $number = $this->fromNative($this->randomNativeNumber())\n )\n ->then\n ->boolean(\n $number->mult($zero)->equals($zero)\n )->isTrue()\n ->boolean(\n $zero->mult($number)->equals($zero)\n )->isTrue()\n ;\n }", "public function printOddNums()\n {\n for ($i = 1; $i <= 99; $i += 2) {\n printf(\"%3d\", $i);\n if (($i / 2 + 1) % 15 == 0) {\n echo \"\\n\";\n }\n }\n echo \"\\n\";\n }", "public static function getDefaultDivisor(): int;", "public function testDivByZero()\n {\n $this\n ->given(\n $zero = $this->fromNative(0),\n $number = $this->fromNative($this->randomNativeNumber())\n )\n ->then\n ->exception(function () use ($number, $zero) {\n $number->div($zero);\n })\n ->isInstanceOf(\\DomainException::class)\n ;\n }", "private static function isOdd($number)\n {\n return ($number%2) ? true : false;\n }", "function fib($c)\r\n{\r\n return psquare(5 * $c * $c + 4) || psquare(5 * $c * $c - 4);\r\n\r\n}", "public function methodNumberTwo()\r\n\t{\r\n\t\ttry {\r\n\t\t\t\r\n\t\t} catch (Exception $e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "public function oddMask()\n {\n $low = (-($this->low & 1)) & 0xFFFFFFFF;\n $high = $low;\n return UInt64::newValue($high, $low);\n }", "#[@test]\n public function selectIntegerZero() {\n $this->assertEquals(0, $this->db()->query('select 0 as value')->next('value'));\n }", "function test_entier($valeur){\r\n return ($valeur>0 || $valeur==\"0\");\r\n}", "public function implicar($x, $y){\n $b = 1-$x+$y;\n if ($b<=1)\n return $b;\n else \n return 1;\n }", "function solution($A)\n{\n $pairs = $zeros = 0;\n\n foreach ($A as $k => $v) {\n $zeros += ($v === 0);\n\n if ($v===1) {\n $pairs += $zeros;\n }\n\n if ($pairs>1000000000) {\n $pairs = -1;\n break;\n }\n }\n\n return $pairs;\n}", "public function testValidateZeroNumber(): void\n {\n $this->assertTrue($this->validate(0));\n }", "public function test_bool_variable_and_even_or_odd_method()\n {\n $parameter_one = 'first';\n $parameter_two = 'second';\n \n for ($i=0; $i<10; $i++)\n {\n $string = math::even_or_odd($parameter_one, $parameter_two);\n \n $this->assertInternalType('string', $string);\n $this->assertNotEmpty($string);\n \n if ($i % 2 == 0)\n {\n $this->assertEquals($string, $parameter_one);\n $this->assertNotEquals($string, $parameter_two);\n }\n else\n {\n $this->assertNotEquals($string, $parameter_one);\n $this->assertEquals($string, $parameter_two);\n }\n }\n }", "function mod($n, $m) {\n return (($n % $m) + $m) % $m;\n}", "public function equalsZero(): bool\r\n {\r\n return $this->getValue() == 0;\r\n }", "function ganjilGenap($angka)\n{\n if ($angka % 2 === 0) {\n echo $angka . \". Bilangan Genap \";\n } else {\n echo $angka . \". Bilangan Ganjil \";\n }\n}", "public function is_zero($number){\n\t\tif(($number == 0)){ \n\t\t\treturn true;\n\t\t}\n }", "public function is_zero($number){\n\t\tif(($number == 0)){ \n\t\t\treturn true;\n\t\t}\n }", "public function isZeroFill();", "function is_schinteger($number) {\n return is_zero($number->imaginary);\n}", "protected function parse_zero_fun()\n {\n $this->check_param_num(0);\n\n $this->generate_instruction();\n\n $this->xml->endElement();\n\n }", "function p3_ex4() {\n for ($i = 1; $i <= 10; $i = $i += ($i/2))\n $return .= $i.\" - \";\n\n return $return;\n}", "function addZero( $value )\r\n {\r\n $ret = $value;\r\n if ( $ret < 10 )\r\n {\r\n $ret = \"0\". $ret;\r\n }\r\n\r\n return $ret;\r\n }", "function addZero( $value )\r\n {\r\n $ret = $value;\r\n if ( $ret < 10 )\r\n {\r\n $ret = \"0\". $ret;\r\n }\r\n\r\n return $ret;\r\n }", "function GpsData_Filter_Zero($value) {\n\treturn $value > 0;\n}", "public function testDivSpecialCases()\n {\n $this\n ->given(\n $zero = $this->fromNative(0),\n $number = $this->fromNative($this->randomNativeNumber())\n )\n ->then\n ->boolean(\n $zero->div($number)->equals($zero)\n )->isTrue()\n ;\n }", "function checkNum($red, $stupac, $mjesto) {\n\tif($red%2 == 0){\n\t\t$broj=0;\n\t\tif($stupac == 1){\n\t\t\t$broj= $mjesto-9;\n\t\t\techo $broj;\n\t\t} else {\n\t\t\t$broj = $mjesto / 10;\n\t\t\t$broj = floor($broj);\n\t\t\t$broj *= 10;\n\t\t\t$broj += $stupac;\n\t\t\techo $broj . \" i \" . $red ;\n\t\t}\n\n\t} else {\n\t\techo $mjesto;\n\t}\n\n}", "function primeCheck($number){\n\t\t\tif ($number == 1)\n\t\t\treturn 0;\n\n\t\t\tfor ($i = 2; $i <= $number/2; $i++){\n\t\t\t\tif ($number % $i == 0)\n\t\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn 1;\n\t\t}", "function add_zero($num){\n if((int)$num<10){\n return \"0\".(String)$num;\n }\n else\n return $num;\n }", "function retornarSiEsCero ($numeroingresado)\n{\n \n if($numeroingresado == 0)\n {\n return true;\n }\n\n else\n {\n return false;\n }\n echo \"<br>El numeros es: \" .retornarSiEsCero(0);//coloco un numero\n\n}", "public function testIsEvenPassString()\n {\n \t$this->assertFalse(isEven(\"fail\"));\n }", "function divmod($dividend, $divisor, &$modulus)\n{\n\tif ($divisor == 0) {\n\t\t// option 1\n\t\techo 'Not possible to divide by zero!!!';\n\t\treturn false;\n\t\t\n\t\t// option 2\n\t\tdie('Not possible to divide by zero!!!');\n\t\t\n\t\t// option 3\n\t\tthrow new Exception('Not possible to divide by zero!!!');\n\t}\n\t\n\t$modulus = $dividend % $divisor;\n\t\n\treturn $dividend / $divisor;\n}", "public function testBrokeSecondArgumentZero()\n {\n $game = new Game21();\n\n $game->broke(10, 0);\n\n $data = $game->getData();\n\n $expBroke = \"Player broke - please reset bitcoins\";\n\n $broke = $data[\"broke\"];\n\n $this->assertEquals($expBroke, $broke);\n }", "public static function clipEvenOdd()\n {\n return new FlagQualifier(self::CLIP_EVEN_ODD);\n }", "function solution($arr, $int) {\n //\n}", "function sumate2(array $n,int $r) {\r\n if ($r < 0) {\r\n return 0;\r\n } else {\r\n print($n[$r]);\r\n print \"<br> \";\r\n return ($n[$r]) + sumate2($n, $r-1);\r\n }\r\n}", "function getSomme( int $a , int $b )\n{\n return $a+$b;\n}", "public function uneven( $numeral) {\n\t\t$booleanUneven = ($numeral/2) != 0;\n\t\tswitch ($booleanUneven) {\n\t\t\tcase true:\n\t\t\t\t$this->log($numeral . \" is odd!\");\n\t\t\t\treturn true;\n\t\t\tcase false: \n\t\t\t\t$this->log($numeral . \" is not odd!\");\n\t\t\t\treturn false;\n\t\t}\n\t}", "function fac($n)\n{\n if($n == 0)\n {\n return 1;\n }\n else\n {\n return $n * fac($n - 1); \n }\n}", "public static function isOdd(IInt32\\Type $x) : IBool\\Type {\n\t\t\treturn IBool\\Type::box(($x->unbox() % 2) != 0);\n\t\t}", "private function cover_zeros(){\n\t\t$this->numLines = 0;\n\t\t$this->lines = array();\n\t\t\n\t\t\n\t\t\n\t\tforeach ($this->clonedGrid as $row => $cols)\n\t\t{\n\t\t\tforeach ( $cols as $col => $value){\n\t\t\t\t$this->lines[$row][$col] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach ($this->clonedGrid as $row => $cols)\n\t\t{\n\t\t\tforeach ( $cols as $col => $value){\n\t\t\t\t\n\t\t\t\tif($value == 0) {\n\t\t\t\t\t\n\t\t\t\t\t$this->strike_nieghbors($row, $col, $this->max_vh($row, $col));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.682325", "0.6682445", "0.6615996", "0.66006154", "0.659337", "0.6520555", "0.65199983", "0.64399946", "0.64177495", "0.63619536", "0.6321866", "0.6252898", "0.6220042", "0.61459035", "0.6125508", "0.61061996", "0.6103357", "0.59718966", "0.5924956", "0.5893173", "0.58754516", "0.5850596", "0.58027995", "0.5800596", "0.5800409", "0.5794604", "0.5747118", "0.5744126", "0.57399815", "0.5738241", "0.5723508", "0.5698778", "0.5685872", "0.5685441", "0.5671858", "0.5647795", "0.56396455", "0.55851865", "0.55621564", "0.55568373", "0.5510912", "0.5493513", "0.547613", "0.5447698", "0.5422855", "0.5395281", "0.53813064", "0.53523034", "0.53388864", "0.53353477", "0.53251284", "0.5323848", "0.52848935", "0.5277101", "0.5265476", "0.524412", "0.52363867", "0.52346635", "0.52205324", "0.5203314", "0.5188747", "0.5133431", "0.5129917", "0.5115479", "0.51118934", "0.51104474", "0.51021266", "0.5094246", "0.5090505", "0.50898063", "0.50869596", "0.50312054", "0.50293064", "0.5024847", "0.5015704", "0.5005723", "0.5005723", "0.49998987", "0.49867263", "0.4981086", "0.49712917", "0.49709937", "0.49709937", "0.49680912", "0.49614838", "0.4949947", "0.49447876", "0.49368614", "0.49252754", "0.48993978", "0.48942652", "0.48803157", "0.4876785", "0.48507014", "0.48503208", "0.4850115", "0.48465243", "0.48391792", "0.48361275", "0.4834018" ]
0.75614387
0
passing not a number
public function testIsEvenPassString() { $this->assertFalse(isEven("fail")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_num($arg){ \n\tif (!(int)$arg) {\n\treturn false ;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "public function numbers_only($value)\n{\n //return preg_match('/^([0-9]+)$/', $value);\n return ctype_digit(strval($value));\n}", "function isNum($s){return is_numeric($s) ? true : false;}", "function esNumero($n1, $n2){\n if(is_numeric($n1) && is_numeric($n2)){\n \n }\n\n}", "public function isNumeric();", "function isNumeric ($value)\r\n{\r\n\treturn is_numeric ($value);\r\n}", "abstract public function validateNumber(): bool;", "function isnumeric($n) {\n\t//$n = round(readline(\"Digite o primeiro número: \"), 2);\n\tif (is_numeric($n)){\n\t\tprint(\"$n\");\n\treturn $n;\n}else{\n\t\texit;\n}\n}", "function validarnumero($numero){ \nif($numero=='0'){\n\t\n}else{\n\tif(is_numeric($numero)) {\n //si es un numero no dice nada\n } else {\n return TRUE;\n }\n}\n \n}", "public function ifNum($num);", "function vn ($v, $isAdd) {\n if (!is_numeric($v)) {\n $tag = $isAdd ? \"Did you mean '~'?\" : '';\n Tht::error(\"Can't use math on non-number value. $tag\");\n }\n return $v;\n}", "function number_check($var) {\n\tif ( is_numeric($var) )\n\t\treturn $var;\n\treturn null;\n}", "function est_entier($valeur): bool {\n return is_numeric($valeur);\n}", "function rest_is_integer($maybe_integer)\n {\n }", "function vNumber( $value )\r\n\t\t{\r\n\t\t\t#return filter_var($value, FILTER_VALIDATE_FLOAT); // float\r\n\t\t\treturn filter_var( $value, FILTER_VALIDATE_INT ); # int\r\n\t\t\t\r\n\t\t}", "function is_number(mixed $var): bool\n{\n return is_int($var) || is_float($var);\n}", "function isNumber ($value)\r\n{\r\n\treturn is_double ($value);\r\n}", "function df_is_int($v):bool {return is_numeric($v) && ($v == (int)$v);}", "private function process_numeric($value)\n {\n return is_numeric($value);\n }", "function is_number($number=\"\")\n {\n \tif ($number == \"\") return -1;\n \t\n \tif ( preg_match( \"/^([0-9]+)$/\", $number ) )\n \t{\n \t\treturn $number;\n \t}\n \telse\n \t{\n \t\treturn \"\";\n \t}\n }", "public function is_number($num){\t\t\n\t\tif(!empty($num)){\n\t\t\tif(!ctype_digit($num)){\n\t\t\t\treturn true;\n\t\t\t}\n \t}\n }", "function sNumber( $value )\r\n\t\t{\r\n\t\t\t#return filter_var($value, FILTER_SANITIZE_NUMBER_FLOAT); // float\r\n\t\t\treturn filter_var( $value, FILTER_SANITIZE_NUMBER_INT ); # int\r\n\t\t\t\r\n\t\t}", "function esUnNumero($string) {\n return is_numeric($string);\n }", "public function functionCanBeInterpretedAsIntegerInvalidDataProvider() {}", "static function checkInteger($param) {\n \n if(isset($param) && is_numeric($param)) { \n return true;\n } else {\n return false;\n }\n }", "function fiftyone_degrees_get_is_numeric($value) {\n return ($value >= ord('0') && $value <= ord('9'));\n}", "function isNumericType($type)\n{\n return(eregi('int',$type) or $type==\"real\" or $type==\"float\" or $type==\"double\" or $type==\"decimal\");\n}", "function isValidNumber($variable){\n\t\tif(preg_replace(\"/^(\\+|\\-)?[0-9]+$/\", '', $variable) !== '')\n\t\t\treturn false;\n\t\treturn true;\n\t}", "function validaOpcion($opcionSeleccionada) {\n if (is_numeric($opcionSeleccionada))\n return true;\n else\n return false;\n}", "function valid_number($num) {\r\nif(empty($num) || !is_numeric($num))\r\n return false ; \r\nelse {\r\n $num = intval($num) ; \r\n\tif($num <= 0) \r\n\t\treturn false ;\r\n }\r\n return true ; \r\n}", "function validate_is_number($field_input, array &$field): bool\n{\n if (!is_numeric($field_input)) {\n $field['error'] = 'Type in integer';\n return false;\n }\n return true;\n}", "public function getNumberFromUserInput() {\n }", "function check($a, $b) {\n if (is_numeric($a) && is_numeric($b)) {\n return true;\n } else {\n return \"please enter numbers only.\";\n }\n}", "public function functionCanBeInterpretedAsIntegerValidDataProvider() {}", "public function validate_numeric($param) {\n return is_numeric($param);\n }", "private function numeric($num) { \n if (strlen($num)) { \n if (!preg_match(\"/^[0-9]+$/\", $num)) { \n $num = 1; \n } else { \n $num = substr($num, 0, 11); \n } \n } else { \n $num = 1; \n } \n return $num; \n }", "function validateAmount($amount)\n{ \n return is_numeric($amount) && $amount > 0;\n}", "private function test_number($value)\r\n {\r\n $value = str_replace(',', '.', $value);\r\n return is_numeric($value);\r\n }", "function get_int($value) {\n return is_numeric($value) && !preg_match('/x/i', $value) ? $value : '0';\n}", "function tc_sanitize_number( $value) {\r\n $value = esc_attr( $value); // clean input\r\n $value = (int) $value; // Force the value into integer type.\r\n return ( 0 < $value ) ? $value : null;\r\n }", "public function requireNumbers($num = 1) {\n // Makes sure that the passed argument is a number and is greater than 0.\n\tif (is_numeric($num) && $num > 0) {\n // If so, it is assigned to the respective property of the current instance.\n\t $this->_minimumNumbers = (int) $num; \n\t}\n }", "private function validate()\n {\n if (! is_numeric($this->number)) {\n throw new \\InvalidArgumentException(\"Invalid numeric value provided ($this->number).\");\n }\n }", "function myisint($int)\n{\n if(is_numeric($int) === TRUE){\n \n // It's a number, but it has to be an integer\n if((int)$int == $int){\n\n return TRUE;\n \n // It's a number, but not an integer, so we fail\n }else{\n \n return FALSE;\n }\n \n // Not a number\n }else{\n \n return FALSE;\n }\n}", "function acf_get_numeric($value = '')\n{\n}", "function IsNumberType($type)\n{\n\tif($type==20 || $type==14 || $type==5 || $type==10 || $type==6 \n\t|| $type==3 || $type==131 || $type==4 || $type==2 || $type==16\n\t|| $type==21 || $type==19 || $type==18 || $type==17 || $type==139\n\t|| $type==11)\n\t\treturn true;\n\treturn false;\n}", "public function check()\n {\n return ctype_digit($this->value);\n }", "function isNumeric ($s) {\r\n return is_numeric($s);\r\n }", "public function takingnuminput()\n {\n fscanf(STDIN, \"%s\\n\",$num);\n while((Utility::validating_float($num)))\n {\n echo \"Warning :the num should not be decimal and it should not contain char\\n\";\n fscanf(STDIN, \"%s\\n\",$num);\n\n }\n return $num;\n }", "public function getNumber() {}", "protected function validateNumber($value){\n\t\treturn is_numeric($value);\n\t}", "function has_number($value , $options = []){\r\n if(!is_numeric($value)){\r\n return false;\r\n }\r\n if(isset($options['max']) && ($value > (int) $options['max'])){\r\n return false;\r\n }\r\n if(isset($options['min'])&& ($value < (int) $options['min'])){\r\n return false;\r\n }\r\n return true;\r\n}", "function acf_numval($value)\n{\n}", "function is_entier($n) {\nreturn ($n>0 || $n=='0');\n}", "function isNumber($value){\n \n if (!preg_match('/^[0-9]+(\\\\.[0-9]+)?$/', $value)){\n \n header(\"Location: ..\\Graduate_form.html?error=\"); \n \n }else{\n return $value; \n }\n}", "public function getNumber();", "public function sanitizeNumber($data){\n $data = filter_var($data, FILTER_SANITIZE_NUMBER_INT);\n return $data;\n }", "public function isNum(): bool\n {\n return \\wasm_valtype_is_num($this->inner);\n }", "function broj()\n {\n $parametar = func_get_args();\n foreach ($parametar as $broj) {\n if (is_int($broj)) {\n echo $broj.' je broj<br>';\n } else {\n echo $broj.' je string <br>';\n }\n }\n }", "public function isVariableNumerica(){ return false; }", "function sanitize_numbers($value)\n{\n return filter_var($value, FILTER_SANITIZE_NUMBER_INT);\n}", "function NeedQuotesNumeric($type)\n{\n if($type == 203 || $type == 8 || $type == 129 || $type == 130 || \n\t\t$type == 7 || $type == 133 || $type == 134 || $type == 135 ||\n\t\t$type == 201 || $type == 205 || $type == 200 || $type == 202 || $type==72 || $type==13)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function TypeCheck($i) \n{\n\n\tif (intval($i) == 0) {\n\n \t echo \"Bad String\";\n\n\t} else {\n\n echo intval($i);\n\n\t}\n}", "function validateNumber ( $validatedValue, $stringName ) {\n\tif ( !is_numeric ( $validatedValue ) ) {\n\t\techo \"<script>alert('$stringName should be a number!!!!')</script>\";\n\t\texit ();\n\t} else if ( $validatedValue < 0 ) {\n\t\techo \"<script>alert('$stringName should be greater or equal 0!!!!')</script>\";\n\t\texit ();\n\t}\n}", "function validaOpcion($opcionSeleccionada)\r\n{\r\n\tif(is_numeric($opcionSeleccionada)) return true;\r\n\telse return false;\r\n}", "function is_integer_val($value) {\n\treturn (!preg_match(\"/\\D/\", $value)) ? true : false;\n}", "public function requireNumericAndPositive($key)\n {\n $value = $this->getParam($key);\n if(!is_numeric($value) || $value <= 0){\n throw new InvalidParameterException($key, $value, __FUNCTION__);\n }\n\n return $value;\n }", "function testForInt($data)\r\n\t{\r\n\t\tif (!filter_var($data, FILTER_VALIDATE_INT) === false)\r\n\t\t{\r\n\t\t\treturn intval($data);\r\n\t\t} \r\n\t\telse \r\n\t\t{\r\n\t\t\techo(\"Integer is not valid<br>\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function validQty($qty)\n{\n return !empty($qty)\n && ctype_digit($qty)\n && $qty >= 1;\n}", "function aquamin_is_truty_or_zero( $mixed ) {\n\treturn ( !! $mixed || is_int( $mixed ) || is_float( $mixed ) || '0' === $mixed );\n}", "function int_check($var) {\n\tif ( is_numeric($var) )\n\t\treturn $var;\n\treturn null;\n}", "public function requireNumeric($key)\n {\n $value = $this->getParam($key);\n if(!is_numeric($value)){\n throw new InvalidParameterException($key, $value, __FUNCTION__);\n }\n\n return $value;\n }", "function isPosNum($number){\n if(((int)$number) >= 0){\n return true;\n }\n else{\n echo \"invalid number of pages (or words)\";\n return false;\n }\n }", "public function testValidateStringNumber(): void\n {\n $this->assertFalse($this->validate('1'));\n }", "function input_number_is_valid( $number ) {\n\t\treturn ( is_numeric( $number ) && $number > 0 );\n\t}", "static public function is_num($value) {\n\t\treturn preg_match(\"/^-?[0-9]+\\.?[0-9]*$/\",$value);\n\t}", "function startswithNum($str = null){\n $firstChar =substr($str,0 ,1);\n if (is_numeric($firstChar)) {\n echo \"input starts with a Number<br>\";\n return true;\n }else\n return false;\n}", "function pgtype_isnumber ($field_type) {\n\tswitch (strtolower(trim($field_type))) {\n\t\tcase 'bool': // a boolean from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'int2': // a small integer from a pg database\n\t\tcase 'int4': // an integer from a pg database\n\t\tcase 'int8': // a long integer from a pg database\n\t\t\t$output = true;\n\t\t\tbreak;\n\t\tcase 'numeric': // a \"numeric\" real number field from a pg database\n\t\tcase 'float4': // a single precision real number field from a pg database\n\t\tcase 'float8': // a double precision real number field from a pg database\n\t\t\t$output = true;\n\t\t\tbreak;\n\t\tcase 'date': // a date field from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'time': // a time field from a pg database\n\t\tcase 'timetz': // a time field with timezone from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'timestamp': // a timestamp field from a pg database\n\t\tcase 'timestamptz': // a timestamp field with timezone from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tcase 'text': // a text field from a pg database\n\t\tcase 'varchar': // a varchar field from a pg database\n\t\tcase 'bpchar': // a bpchar field from a pg database\n\t\t\t$output = false;\n\t\t\tbreak;\n\t\tdefault: // an unanticipated field type, put a text box or single selects, but may not work\n\t\t\t$output = false;\n\t}\n\treturn $output;\n}", "public function number($len){ }", "private static function isInteger($entry) {\n return ctype_digit(strval($entry));\n }", "public static function _number($value, $field) {\n\t\treturn (bool)preg_match('/^-?[0-9]+(\\.[0-9]+)?$/', $value);\n\t}", "function Bonjour(){\n\t\t\t$a= 1+3;\n\t\t\tif (is_int($a))\n\t\t\t{\n\t\t\t\techo 'Yes Sir , '. $a. ' is ' ;\n\t\t\t\techo gettype($a);\n\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo 'No Sir, '. $a. ' isnt String';\n\t\t\t\t}\n\t\t }", "public function testIsNumber() {\n\t\t$result = _::isNumber(1);\n\t\t$this->assertTrue($result);\n\n\t\t// test that a float is a number\n\t\t$result = _::isNumber(1.23);\n\t\t$this->assertTrue($result);\n\n\t\t// test that a numeric string is a number\n\t\t$result = _::isNumber('-1.23');\n\t\t$this->assertTrue($result);\n\n\t\t// test that a boolean is not a number\n\t\t$result = _::isNumber(false);\n\t\t$this->assertFalse($result);\n\t}", "static function isANumber($value) {\n // check whether the integer value has the same length like the entered string\n return is_numeric($value) && strlen(intval($value)) == strlen($value);\n }", "function is_digito($digito){\r\n if($digito=='0' || $digito=='1' || $digito=='2' || $digito=='3' || $digito=='4' ||\r\n $digito=='5' || $digito=='6' || $digito=='7' || $digito=='8' || $digito=='9'){return TRUE;\r\n }else{return FALSE;}\r\n}", "public static function checkIsNumber($input) {\r\n\r\n\t\tif (is_numeric($input) == true) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "public function hasNumberValue(){\n return $this->_has(2);\n }", "function isInteger($v) {\n return is_int($v) || (is_string($v) && preg_match('/^[0-9]+$/', $v));\n}", "function has_number($value, $options=[])\n{\n if (!is_numeric($value)) {\n return false;\n }\n if (isset($options['max']) && ($value > (int)$options['max'])) {\n return false;\n }\n if (isset($options['min']) && ($value < (int)$options['min'])) {\n return false;\n }\n return true;\n}", "public function invalidIntegers() {}", "public function testBasicPreconditionFail3()\n {\n $this->typeSafetyTestClass->iNeedNumeric('four');\n }", "function numfix($var){\n if(is_numeric($var)){\n if($var<0){\n return null;\n }else{\n return $var;\n }\n }else {\n return null;\n }\n}", "function isInteger ($value)\r\n{\r\n\treturn is_int ($value);\r\n}", "function strNumValid($val = '',$type = 's', $min_len = 0) {\r\n if(!empty($val)) {\r\n\t\tif(strlen($val)>=$min_len) {\r\n\t\t\tif($type == 'n' && ctype_digit($val)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if($type == 's' && is_string($val) && !ctype_digit($val)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse return false;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "public function number($value): bool\n {\n return is_numeric($value);\n }", "public function number($content) {\r\n if (! is_numeric ( $content ) && strlen ( $content ) > 0) {\r\n throw new ValidationException ( self::ERROR_NOT_NUMBER );\r\n }\r\n }", "public function validarSoloNumeroFloat($var){\n return (preg_match('/^-?(?:\\d+|\\d*\\.\\d+)$/', $var) xor preg_match('/^[0-9]+$', $var));\n }", "function isNumber($tableauPost) {\n unset($tableauPost['type']);\n $tableau = array();\n foreach ($tableauPost as $key => $value) {\n if (is_numeric($value)) { //is_numeric\n $tableau[] = $value;\n }\n }\n if (count($tableauPost) != count($tableau)) {\n return false;\n }\n else {\n return true;\n }\n}", "public function validIntegers() {}", "function isValid($value = null)\n {\n if(is_numeric($value)){\n return true;\n }\n\n $this->errorFound();\n\n return false;\n }", "private function int ($param)\n {\n $this->type = 'int';\n $this->value = (int)$this->value;\n return true;\n }", "function o_isInt($value) {\n\t\t\treturn Obj::singleton()->isInt($value);\n\t\t}" ]
[ "0.73493993", "0.7197255", "0.691229", "0.6891081", "0.6802502", "0.6597168", "0.6586304", "0.6565467", "0.6563727", "0.6543548", "0.6534312", "0.65146464", "0.6512598", "0.64372224", "0.6421711", "0.6395302", "0.6342785", "0.63341045", "0.6330423", "0.62941706", "0.62776494", "0.6260307", "0.62501025", "0.6244177", "0.6242114", "0.6212148", "0.6205041", "0.61482936", "0.61450666", "0.61365694", "0.6123564", "0.609564", "0.6090405", "0.6090246", "0.60870904", "0.60816175", "0.6072433", "0.6068326", "0.6059149", "0.60526085", "0.60521156", "0.6048305", "0.60369", "0.602795", "0.6024051", "0.60239017", "0.59824795", "0.59695727", "0.5954445", "0.59537554", "0.59516954", "0.59478354", "0.59377086", "0.5930756", "0.5919497", "0.59168154", "0.590633", "0.59038043", "0.58924", "0.5878147", "0.5876983", "0.58629125", "0.5852025", "0.5845491", "0.58248", "0.58209455", "0.5797036", "0.57968485", "0.5790973", "0.5771845", "0.57691234", "0.5758192", "0.575793", "0.57464963", "0.57410604", "0.5738863", "0.5736391", "0.5723506", "0.5713243", "0.5710697", "0.5703329", "0.56993127", "0.5696956", "0.56777", "0.56687826", "0.5664868", "0.5658329", "0.56582254", "0.56563866", "0.56393564", "0.56384647", "0.5631061", "0.5621746", "0.5609904", "0.5604629", "0.56010914", "0.55901146", "0.55896443", "0.5584023", "0.55707145", "0.5568773" ]
0.0
-1
/ Plugin Name: Praksa Plugin Description: (1) Protected Content Shortcode that displays the content to loggedin users only (2) Reverse Shortcode that displays the content in reverse order (3) Weather Shortcode that dispalys weather information for a given location Version: 1.0 Author: Lazar Zubic, Danica Misic License: GPLv2+
function shortcode_weather_handler($atts) { $args = shortcode_atts(array('city' => '', 'country' => ''), $atts); $url = 'http://api.openweathermap.org/data/2.5/weather?q=' . $args['city'] . ',' . $args['country'] . '&APPID=e8a25e6e27e357bbb70b8cacfe652bff'; $json = file_get_contents($url); $data = json_decode($json, true); $output = '<h3>CITY INFO</h3>'; $output .= 'Name: ' . $data['name'] . '<br>'; $output .= 'Country: ' . $data['sys']['country'] . '<br>'; $output .= 'Location: ' . $data['coord']['lon'] . ', ' . $data['coord']['lat'] . '<br>'; $output .= '<h3>WEATHER INFO ' . "<img src='http://openweathermap.org/img/w/" . $data['weather'][0]['icon'] . ".png'>" . '</h3>'; $output .= 'Main: ' . $data['weather'][0]['main'] . '<br>'; $output .= 'Description: ' . ucfirst($data['weather'][0]['description']) . '<br>'; $output .= 'Temperature: ' . $data['main']['temp'] . ' K' . '<br>'; $output .= 'Pressure: ' . $data['main']['pressure'] . ' hPa' . '<br>'; $output .= 'Humidity: ' . $data['main']['humidity'] . ' %' . '<br>'; $output .= 'Wind: ' . $data['wind']['speed'] . ' m/s' . '<br>'; $output .= 'Cloudness: ' . $data['clouds']['all'] . ' %' . '<br>'; return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpb_demo_shortcode() { \n \n // Things that you want to do. \n\n \n $message = 'Hello world!'; \n ob_start();\n \n // Output needs to be return\n if ( is_user_logged_in() )include(plugin_dir_path(__FILE__).'polarchart.php');\n $out = ob_get_clean();\n return $out;\n \n}", "function church_admin_shortcode($atts, $content = null) \n{\n \tforeach($atts AS $key=>$value)\n \t{\n \t\tif($value==='FALSE'||$value==='false')$atts[$key]=0;\n \t\tif($value==='TRUE'||$value==='true')$atts[$key]=1;\t\n \t}\n \textract(shortcode_atts(array('height'=>500,'width'=>900,\"pdf_font_resize\"=>TRUE,\"updateable\"=>1,\"restricted\"=>0,\"loggedin\"=>0,\"type\" => 'address-list','people_types'=>'all','site_id'=>0,'days'=>30,'year'=>date('Y'),'service_id'=>1,'photo'=>NULL,'category'=>NULL,'weeks'=>4,'ministry_id'=>NULL,'member_type_id'=>1,'kids'=>1,'map'=>NULL,'series_id'=>NULL,'speaker_id'=>NULL,'file_id'=>NULL,'api_key'=>NULL,'facilities_id'=>NULL), $atts));\n church_admin_posts_logout();\n $out='';\n \t\n global $wpdb;\n\n global $wp_query;\n if(empty($loggedin)||is_user_logged_in())\n {\n \n \t$upload_dir = wp_upload_dir();\n\t\t$path=$upload_dir['basedir'].'/church-admin-cache/';\n \t//look to see if church directory is o/p on a password protected page\t\n \t$pageinfo=get_page($wp_query->post->ID);\t\n \t//grab page info\n \t//check to see if on a password protected page\n \tif(($pageinfo->post_password!='')&&isset( $_COOKIE['wp-postpass_' . COOKIEHASH] )) \n \t{\n\t\t\t$text = __('Log out of password protected posts','church-admin');\n\t\t//text for link\n\t\t$link = site_url().'?church_admin_logout=posts_logout';\n\t\t$out.= '<p><a href=\"' . wp_nonce_url($link, 'posts logout') .'\">' . $text . '</a></p>';\n\t\t//output logoutlink\n \t}\n \t//end of password protected page\n \n \t//grab content\n \tswitch($type)\n \t{\n \t\n\t\t\tcase 'sessions':require_once(plugin_dir_path(__FILE__).'includes/sessions.php');$out.=church_admin_sessions(NULL,NULL);break;\n\t\t\tcase 'recent':require_once(plugin_dir_path(__FILE__).'includes/recent.php');$out.=church_admin_recent_visitors($member_type_id=1);break;\n\t\t\tcase 'podcast':\n\t\t\t\trequire_once(plugin_dir_path(__FILE__).'display/sermon-podcast.php');\n\t\t\t\tif(!empty($_GET['speaker_name'])){$speaker_name=urldecode($_GET['speaker_name']);}else{$speaker_name=NULL;}\n\t\t\t\tif(!empty($_GET['series_id'])){$series_id=urldecode($_GET['series_id']);}\n\t \t\t$out.=ca_podcast_display($series_id,$file_id,$speaker_name);\n\t\t\t\t$out = apply_filters ( 'the_content', $out );\n\t\t\t\tbreak; \n \tcase 'calendar':\n\t\t\tif(empty($facilities_id))\n\t\t\t{\n\t\t\t\t$out.='<table><tr><td>'.__('Year Planner pdfs','church-admin').' </td><td> <form name=\"guideform\" action=\"\" method=\"get\"><select name=\"guidelinks\" onchange=\"window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value\"> <option selected=\"selected\" value=\"\">-- '.__('Choose a pdf','church-admin').' --</option>';\n\t\t\t\tfor($x=0;$x<5;$x++)\n\t\t\t\t{\n\t\t\t\t\t$y=date('Y')+$x;\n\t\t\n\t\t\t\t\t$out.='<option value=\"'.home_url().'/?download=yearplanner&amp;yearplanner='.wp_create_nonce('yearplanner').'&amp;year='.$y.'\">'.$y.__('Year Planner','church-admin').'</option>';\n\t\t\t\t}\n\t\t\t\t$out.='</select></form></td></tr></table>';\n\t\t\t}\n \n\n require_once(plugin_dir_path(__FILE__).'display/calendar.php');\n $out.=church_admin_display_calendar();\n \tbreak;\n \n \tcase 'names':require_once(plugin_dir_path(__FILE__).'/display/names.php');$out.=church_admin_names($member_type_id,$people_types);break;\n \tcase 'calendar-list':\n \trequire_once(plugin_dir_path(__FILE__).'/display/calendar-list.php');\n \tbreak;\n \tcase 'directory':\n \t\t \trequire_once(plugin_dir_path(__FILE__).'display/directory.php');\n \t$out.=church_admin_frontend_people($member_type_id,$map,$photo,$api_key,$kids,$site_id);\n \tbreak;\n \tcase 'address-list':\n\t \t\t\t$out.='<p><a href=\"'.home_url().'/?download=addresslist&amp;addresslist='.wp_create_nonce('member'.$member_type_id ).'&amp;member_type_id='.$member_type_id.'\">'.__('PDF version','church-admin').'</a></p>';\n \trequire_once(plugin_dir_path(__FILE__).'display/address-list.php');\n \t$out.=church_admin_frontend_directory($member_type_id,$map,$photo,$api_key,$kids,$site_id,$updateable);\n \tbreak;\n \tcase 'small-groups-list':\n \trequire_once(plugin_dir_path(__FILE__).'/display/small-group-list.php');\n \t$out.= church_admin_small_group_list($map);\n \tbreak;\n\t\t\tcase 'small-groups':\n \trequire_once(plugin_dir_path(__FILE__).'/display/small-groups.php');\n \t$out.=church_admin_frontend_small_groups($member_type_id,$restricted);\n break;\n \tcase 'ministries':\n \trequire_once(plugin_dir_path(__FILE__).'/display/ministries.php');\n \t$out.=church_admin_frontend_ministries($ministry_id,$member_type_id);\n break;\n case 'my_rota':\n \trequire_once(plugin_dir_path(__FILE__).'/display/rota.php');\n \t$out.=church_admin_my_rota();\n \tbreak;\n\t\t\tcase 'rota':\n \trequire_once(plugin_dir_path(__FILE__).'/display/rota.php');\n \tif(!empty($_GET['date'])){$date=$_GET['date'];}else{$date=date('Y-m-d');}\n \t$out.=church_admin_front_end_rota($service_id,4,$pdf_font_resize,$date);\n \tbreak;\n \tcase 'rolling-average':\n \tcase 'weekly-attendance':\n \tcase 'monthly-attendance':\n \tcase 'rolling-average-attendance':\n\t\t\tcase 'graph':\n\t\t\t\tif(empty($width))$width=900;\n\t\t\t\tif(empty($height))$height=500;\n\t\t\t\tif(!empty($_POST['type']))\n\t\t\t\t{\n\t\t\t\t\tswitch($_POST['type'])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase'weekly':$graphtype='weekly';break;\n\t\t\t\t\t\tcase'rolling':$graphtype='rolling';break;\n\t\t\t\t\t\tdefault:$graphtype='weekly';break;\n\t\t\t\t\t}\n\t\t\t\t}else{$graphtype='weekly';}\n\t\t\t\tif(!empty($_POST['start'])){$start=$_POST['start'];}else{$start=date('Y-m-d',strtotime('-1 year'));}\n\t\t\t\tif(!empty($_POST['end'])){$end=$_POST['end'];}else{$end=date('Y-m-d');}\n\t\t\t\tif(!empty($_POST['service_id'])){$service_id=$_POST['service_id'];}else{$service_id='S/1';}\n\t\t\t\trequire_once(plugin_dir_path(__FILE__).'display/graph.php');\n\t\t\t\t$out.=church_admin_graph($graphtype,$service_id,$start,$end,$width,$height);\n\t\t\tbreak;\n\t\t\tcase 'birthdays':require_once(plugin_dir_path(__FILE__).'includes/birthdays.php');$out.=church_admin_frontend_birthdays($member_type_id, $days);break;\n\t\t\tdefault:\n\t\t\t\t$out.='<p><a href=\"'.home_url().'/?download=addresslist&amp;addresslist='.wp_create_nonce('member'.$member_type_id ).'&amp;member_type_id='.$member_type_id.'\">'.__('PDF version','church-admin').'</a></p>';\n \t require_once(plugin_dir_path(__FILE__).'display/address-list.php');\n \t $out.=church_admin_frontend_directory($member_type_id,$map,$photo,$api_key,$kids,$site_id,$updateable);\n \t\tbreak;\n \t}\n }\n else //login required\n {\n \t$out.=wp_login_form();\n }\n//output content instead of shortcode!\nreturn $out; \n}", "function add_shortcode_for_our_plugin ($attr , $content = null ){\n\t\textract(shortcode_atts(array(\n\t\t\t'post_type'=>'post',\n\t\t\t'posts_per_page'=>2,\n\t\t\t\n\t\t\t\n\t\t\n\t\t), $attr,'our_shortcode' ));\n\t\n\t$query = new WP_Query(array(\n\t\t'post_type'=>$post_type,\n\t\t'posts_per_page'=>$posts_per_page,\n\t\n\t));\n\t\n\tif($query->have_posts()):\n\t\t$output = '<div class=\"recent_posts\"><ul>';\n\t\t$i=0;\n\t\twhile($query->have_posts()){\n\t\t\t\n\t\t\t$query->the_post();\n\t\t\tif($i == 0):\n\t\t\t$output .= '<li><a href=\"'.get_the_permalink().'\" style=\"color:red;\" >'.get_the_title().'</a></li>';\n\t\t\telse:\n\t\t\t$output .= '<li><a href=\"'.get_the_permalink().'\">'.get_the_title().'</a></li>';\n\t\t\tendif;\n\t\t\t\n\t\t\t\n\t\t$i++; }\n\t\twp_reset_postdata();\n\t$output .= '</ul></div>';\n\treturn $output;\n\telse:\n\t return 'no post found';\n\t\n\tendif;\n\t\n\t\n\t\n\t\n\t\n\t\n}", "function ch2pit_private_shortcode( $atts, $content = null ) {\n if ( is_user_logged_in() )\n return '<div class=\"private\">' . $content . '</div>';\n else {\n $output = '<div class=\"register\">';\n\t\t$output .= 'You need to become a member to access ';\n\t\t$output .= 'this content.</div>';\n\t\treturn $output;\t\n\t}\n}", "function auxin_footer_copyright_markup( $echo = false ){\n global $post;\n\n $output = '';\n $copyright_text = ! empty( $post->ID ) ? auxin_get_post_meta( $post, 'page_footer_copyright', '') : '';\n $copyright_text = empty( $copyright_text ) ? auxin_get_option( 'copyright' ): $copyright_text ;\n\n if( $copyright_text ) {\n $date_format = 'Y'; // to pass theme check plugin\n $copyright_text = str_replace( array( '{{Y}}', '{{sitename}}' ), array( date_i18n( $date_format ), get_bloginfo( 'name' ) ), $copyright_text );\n $output .= '<small>' . do_shortcode( stripslashes( $copyright_text ) ) . '</small>';\n }\n\n $attribution = auxin_get_post_meta( $post, 'page_footer_attribution', 'default') ;\n $attribution = 'default' === $attribution ? auxin_get_option( 'attribution', false ) : $attribution;\n\n if ( auxin_is_true( $attribution ) ) {\n $output .= sprintf( '<small class=\"aux-attribution\"> %1$s <a href=\"https://wordpress.org/themes/phlox/\" title=\"%2$s\"> %3$s </a></small>',\n __( 'Powered by', 'phlox' ),\n __( 'Phlox Free WordPress Theme', 'phlox' ),\n __( 'Phlox Theme', 'phlox' )\n );\n }\n\n // Prints the policy markup in site footer\n if( auxin_get_option( 'footer_privacy_policy_link_display', 0 ) ){\n if ( function_exists( 'the_privacy_policy_link' ) ) {\n $output .= get_the_privacy_policy_link( '<small class=\"aux-privacy-policy\">', '</small>' );\n } else {\n $output .= sprintf( '<small class=\"aux-privacy-policy\">%s</small>', __( 'WordPress version 4.9.6 or higher is required for this feature.', 'phlox') );\n }\n }\n\n if( $echo ){\n echo $output;\n } else {\n return $output;\n }\n}", "function shortcodes_ultimate() {\n\treturn true;\n}", "function endcore_socialbuttons_shortcode($atts, $content = null) {\n if(is_admin()) {\n return;\n }\n\n\tob_start();\t\n\tget_template_part('parts/stuff/code', 'social');\n\t$output = ob_get_contents();\n\tob_end_clean();\n\treturn $output;\n}", "function wpestate_tiny_short_codes_register() {\n if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) {\n return;\n }\n \n if (get_user_option('rich_editing') == 'true') {\n add_filter('mce_external_plugins', 'wpestate_add_plugin');\n add_filter('mce_buttons_3', 'wpestate_register_button'); \n }\n\n}", "public function getShortcode();", "function display_site_info()\r\n{\r\n?>\r\n <? /*<ul>\r\n <li>Сервер статистики пользователей\r\n <li>Управление пользователями\r\n <li>Подключение и переподключение\r\n </ul> */ ?>\r\n<?\r\n}", "function tp_follow_shortcode($atts) {\r\n\textract(shortcode_atts(array(\r\n\t\t'user' => '',\r\n\t), $atts));\r\n\treturn get_tp_follow_button($user);\r\n}", "function handle_shortcode( ) {\n\n\tenqueue_files();\n\n\treturn get_location_content( );\n\n}", "function plugin_starter_shortcode_1() {\r\n\t// This is just for showing that the shortcut works\r\n\treturn '<div class=\"starter-test\">This is the output of this shortcode</div>';\r\n}", "function sample_admin_notice__success() {\n ?>\n <div class=\"notice notice-success is-dismissible\">\n <p><?php _e( 'RAR Example Plugin Installed!', 'sample-text-domain' ); ?></p>\n </div>\n <?php\n}", "function plugin_livehelp() {\n\t$olark_key = '7682-203-10-8874';\n?>\n<script type=\"text/javascript\">\n var hblProto = document.location.protocol == 'https:' ? \"https:\" : \"http:\";\n document.write(unescape('%3Cscript src=\\'' + hblProto + '//static.olark.com/js/wc.js\\' type=\\'text/javascript\\'%3E%3C/script%3E'));\n </script> <a href=\"http://olark.com/#<?php echo $olark_key?>\" id=\"hbl_code\">Olark Livehelp</a> <script type=\"text/javascript\"> wc_init(); </script>\n<?php\n}", "function tanvas_wholesale_content_restricted_shortcode($args, $content=\"\"){\n $args = shortcode_atts( array(\n 'object_type' => 'product_cat'\n ), $args);\n\n $required_authorities = array();\n if (class_exists('Lasercommerce_Tier_Tree')) {\n $required_authorities = array(\n $required_authorities = Lasercommerce_Tier_Tree::instance()->getWholesaleTier()\n );\n // global $Lasercommerce_Plugin;\n // if (isset($Lasercommerce_Plugin)) {\n // $required_authorities = array($Lasercommerce_Plugin->tree->getWholesaleTier() );\n // }\n }\n $user_authorities = tanvas_get_user_tiers();\n $object_type = $args['object_type'];\n $visible = tanvas_is_user_wholesale();\n $out = tanvas_display_tier_warnings($required_authorities, $user_authorities, $object_type, $visible, false);\n $out .= $content;\n return $out;\n}", "function netfunktheme_author_desc_shortcode( $atts ){\n\t\n\textract( shortcode_atts( array(\n\t\t'user_id' => '0'\n\t), $atts ) );\n\t\n\t$author_description = '';\n\t\n\tif ($atts['user_id'] != 0) {\n\n\t\t$author_description = get_the_author_meta('lb_about',$atts['user_id']);\n\n\t}\n\t\n\t$author_description = str_replace('/n','<br />',$author_description);\n\t$author_description = str_replace('/r','<br />',$author_description);\n\t\n\treturn '<p class=\"lb-shortcode-meta lb_author_description\">' . $author_description . '</p>';\n\t\n}", "function ssc_location_shortcode( $atts ) {\n\textract( shortcode_atts( array(\n\t\t'sites' => get_current_blog_id(),\n\t\t'hours' => 'hide',\n\t\t'map' => 'hide',\n\t\t'address' => 'show'\n\t\t), $atts ) );\n\tif ( $sites == 'all' ) {\n\t\t$site_list = get_blog_list( 0, 'all' );\n\t}\n\telse {\n\t\t$site_list = array($sites);\n\t}\n\tob_start();\n\tif ( $map == 'show' ) {\n\t\t$pageURL = 'http';\n if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"];\n }\n include_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n if ( is_plugin_active( 'osm/osm.php' ) ) {\n \t//echo $pageURL;\n \t echo do_shortcode( '[osm_map marker_file=\"'.$pageURL.'/marker/marker.php?sites='.$sites.'\" zoom=\"3\" width=\"600\" height=\"450\" lat=\"34.37\" long=\"-88.375\" ]' );\n \t}\n\t}\n echo '<ul class=\"site-list\">';\n foreach ( $site_list as $blog ) {\n \techo '<li>';\n \t$site_contacts = get_site_contacts( $blog['blog_id'] );\t\n \tif ( $address == 'show') {\n \techo '<h4><a href=\"' . $site_contacts[$blog['blog_id']]['path'] .'\">' . $site_contacts[$blog['blog_id']]['name'] . '</a></h4>';\n \techo '<address>' . $site_contacts[$blog['blog_id']]['street'] . '<br>';\n \t echo $site_contacts[$blog['blog_id']]['city'] . ', ' . $site_contacts[$blog['blog_id']]['state'] . ' ' . $site_contacts[$blog['blog_id']]['zip'] . '</address>';\n \t echo '<p><a href=\"tel:' . $site_contacts[$blog['blog_id']]['phone'] . '\">' . $site_contacts[$blog['blog_id']]['phone'] . '</a></p>';\n \t}\n \tif ( $hours == 'show' ) {\n $site_hours = get_site_hours( $blog );\n echo '<dl>';\n $current_day = '';\n foreach ( $site_hours[$blog['blog_id']] as $hours_val ) {\n \t$day = explode('_', $hours_val['name'] );\n \t$title = explode( ' ', $hours_val['title'] );\n \tif ( $day[1] == 'open' ) {\n \techo '<dt>' . $title[0] . '</dt>';\n \tif ( $hours_val['value'] ) {\n \t\techo '<dd>' . $hours_val['value'];\n \t\t$current_day = $day[0];\n \t}\n \telse {\n \t\techo '<dd>Closed</dd>';\n \t}\n }\n elseif ( $day[1] == 'close' && $day[0] == $current_day ) {\n \techo ' - ' . $hours_val['value'] .'</dd>';\n }\n else {\n \techo '</dd>';\n }\n } // Hours sites loop\n /**/\n echo '</dl>';\n\t }\n \techo '</li>';\n } // end sites loop\n echo '</ul>';\t \n $output = ob_get_clean();\n return $output;\n}", "function cbp_display_front_page() {\n\t?>\n\t\t<h2>Chibipaint Integration</h2>\n\t\t<h3>Introduction</h3>\n\t\t<p>This plugin's purpose is to integrate the Chibipaint applet with Wordpress. The code was largely rewritten from the previous version back in 2010. Some of the notable differences are:</p>\n\t\t<ul class=\"ul-disc\">\n\t\t<li>Visibility &amp; Accessibility: Where you had to access the applet via the upload media section, it is now placed in a &quot;metabox&quot; above the WYSIWYG editor of any post type of your choosing</li>\n\t\t<li>Choice of location: You can choose where to place the files you save, but you are restricted to within the upload folder.</li>\n\t\t</ul>\n\t\t<p>If you feel I've missed any, feel free to let me know. The applet itself can be found at http://www.chibipaint.com/.</p>\n\t\t<h3>Known Limitations</h3>\n\t\t<ul class=\"ul-disc\">\n\t\t<li>Currently, you can only change the default dimensions. There are plans to allow users to add dimensions they commonly use and to pick them from a drop down list at the editor.</li>\n\t\t<li>There is currently no implementation of templates. The closest thing to it now is to upload an image to the post, select it in the list of images and click on Edit. There are also plans to implement a template feature for the plugin.</li>\n\t\t<li>The plugin cannot do a recursive search for wp-config.php.</li>\n\t\t<li>This plugin has not been tested with a multiuser wordpress install. It's certain it will not work since there are no filtering based on author, nor is the author of the image saved with the attachment.</li>\n\t\t<li>If the user saves the source file, all edits will be based on the source file. This is particularly troublesome for those who decide to save image only later on.</li>\n\t\t</ul>\n\t<?php\n}", "function change_admin_footer_text() {\n return 'Powered by <a href=\"http://mist.ac.bd\" target=\"_blank\" title=\"Military Inistitute of Science & Technology (MIST)\">Military Inistitute of Science & Technology (MIST)</a>';\n }", "function wh_post_short_code() {\n\n return 'wh_post_filtres';\n}", "function dt_shortcode_admin() {\r\n $rel_theme_url = explode( $_SERVER['SERVER_NAME'], get_template_directory_uri() );\r\n if( isset($rel_theme_url[1]) )\r\n $rel_theme_url = $rel_theme_url[1];\r\n else\r\n $rel_theme_url = str_replace( site_url(), '', get_template_directory_uri() );\r\n\r\n wp_localize_script(\r\n 'custom_quicktags',\r\n 'dt_admin',\r\n array(\r\n 'themeurl'\t=> $rel_theme_url\r\n )\r\n );\r\n }", "function adrotate_licensed_update() {\n\tadd_filter('site_transient_update_plugins', 'adrotate_update_check');\n\tadd_filter('plugins_api', 'adrotate_get_plugin_information', 20, 3);\n}", "function og_views_extra_views_plugins() {\n return array(\n 'access' => array(\n 'group_member' => array(\n 'title' => t('Group Membership'),\n 'help' => t('Member of the current organic group'),\n 'handler' => 'og_views_extra_plugin_access_group_member',\n 'help topic' => 'access-none',\n 'uses options' => TRUE,\n ),\n )\n );\n}", "function adrotate_get_plugin_information($false, $action, $args) {\n\tif($action !== 'plugin_information') {\n\t\treturn false;\n\t}\n\n\tif(!isset($args->slug) OR $args->slug != \"adrotate-pro\") {\n\t\treturn $false;\n\t}\n\t\n\t$plugin_version = get_plugins()['adrotate-pro/adrotate-pro.php']['Version']; \n\t$license = get_option('adrotate_activate');\n\t\n\t$request_args = array(\n\t\t'slug' => \"adrotate-pro\", \n\t\t'version' => $plugin_version, \n\t\t'instance' => $license['instance'], \n\t\t'email' => $license['email'], \n\t\t'platform' => get_option('siteurl')\n\t);\n\t$request = wp_remote_post('https://ajdg.solutions/api/updates/7/', adrotate_prepare_request($action, $request_args));\n \t\n\tif(!is_wp_error($request) AND wp_remote_retrieve_response_code($request) === 200) {\n\t\t$request = json_decode($request['body'], 1);\n\n\t\t$res = new stdClass();\n\t\t$res->name = $request['name'];\n\t\t$res->slug = \"adrotate-pro\";\n\t\t$res->last_updated = $request['release_date'];\n\n\t\t$res->version = $request['version'];\n\t\t$res->tested = $request['tested'];\n\t\t$res->requires = $request['requires_wp'];\n\t\t$res->requires_php = $request['requires_php'];\n\n\t\t$res->author = $request['author'];\n\t\t$res->donate_link = $request['donate_link'];\n\n\t\t$res->homepage = $request['plugin_url'];\n\t\t$res->download_link = $request['download_url'];\n\t\t$res->active_installs = $request['active_installs'];\n\n\t\t$res->sections = array(\n\t\t\t'description' => $request['sections']['description'],\n\t\t\t'changelog' => $request['sections']['changelog'],\n\t\t); \n\t\tif(isset($request['sections']['debug'])) {\n\t\t\t$res->sections['debug'] = $request['sections']['debug'];\n\t\t}\n\n\t\t$res->banners = array(\n\t\t\t'low' => $request['banners']['low'],\n \t'high' => $request['banners']['high']\n\t\t);\n \t} else {\n\t\t$response_code = wp_remote_retrieve_response_code($request);\n\t\t$response_message = wp_remote_retrieve_response_message($request);\n\t\t$res = new WP_Error('plugins_api_failed', 'An Error occurred: [ERROR '.$response_code.'] '.$response_message.'. Try again in a few minutes or contact support if the error persists.');\n\t}\n\n\treturn $res;\n}", "function sl_admin_footer() {\n\techo __('The Dashboard Tweaks plugin has been developed by Piet Bos of <a href=\"http://wpti.ps\">WP TIPS</a>. For any issues, please open a thread in the Wordpress plugin forum.', 'sl_dashtweaks');\n}", "function do_utcw_shortcode($args) {\n\t\n\t// Shortcodes should return values, not echo out\n\t$args['return'] = true;\n\t\n\treturn do_utcw($args);\n}", "function wp_dashboard_quick_press_output()\n {\n }", "function my_admin_page_contents() {\n\t\t?>\n\t\t\t<h1>\n\t\t\t\tPage d'aministration du plugin de création de formulaire\n\t\t\t\t\n\t\t\t</h1>\n\t\t<?php\n\t}", "function premise_who_are_you(){\n\t if( get_theme_mod( 'premise_who_are_you') != \"\" ) {\n\t\techo get_theme_mod( 'premise_who_are_you');\n\t }\n}", "function shortcode_gracias() {\n $usuario = wp_get_current_user();\n $rol =(array) $usuario->roles[0];/*print_r() Imprimir array completo*/\n if ($rol[0] == 'administrator'){ // OR == !is_admin\n return '<p>Condicional aprovada, eres administrador.</p>';\n } else {\n return '<p>Condicional denegada, no eres admin.</p>'; \n }\n}", "function ignore_media_credit_shortcode($atts, $content = null)\r\n{\r\n return $content;\r\n}", "function my_shortcode() {\n\n$options = get_option('foodrecipecptplugin_settings');\nreturn \"<p>Recipe Name:\" . $options['foodrecipecptplugin_text_field_0'] . \"</p>\".\"<p>Category: \" . $options['foodrecipecptplugin_text_field_1'].\"</p>\".\"<p>Ingredients: \". $options['foodrecipecptplugin_text_field_2'].\"</p>\".\"<p>Recipe Instructions: \" . $options['foodrecipecptplugin_text_field_3'] . \"</p>\";\n}", "function my_admin_footer_text () {\n echo 'Realizzato da mic.';\n}", "function shortcode() {\n\n ob_start();\n\n if ( is_user_logged_in() ) {\n $this->prepare_form();\n } else {\n printf( __( \"This page is restricted. Please %s to view this page.\", 'wpuf' ), wp_loginout( '', false ) );\n }\n\n $content = ob_get_contents();\n ob_end_clean();\n\n return $content;\n }", "function skudo_register_required_plugins() {\n\t\n\t\t$plugins = array(\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'name' => 'Contact Form 7',\n\t\t\t\t'slug' => 'contact-form-7',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Widget Importer & Exporter',\n\t\t\t\t'slug' => 'widget-importer-exporter',\n\t\t\t\t'required' => false,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Really Simple CAPTCHA',\n\t\t\t\t'slug' => 'really-simple-captcha',\n\t\t\t\t'required' => false,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'WPBakery Visual Composer',\n\t\t\t\t'slug' => 'js_composer',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/js_composer.zip',\n\t\t\t\t'required' => true,\n\t\t\t\t'version' => '6.2.0'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' \t=> 'Revolution Slider',\n\t\t\t\t'slug' \t \t=> 'revslider',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/revslider.zip',\n\t\t\t\t'required' \t=> true,\n\t\t\t\t'version' => '6.2.15'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Ultimate Addons for Visual Composer',\n\t\t\t\t'slug' => 'Ultimate_VC_Addons',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/Ultimate_VC_Addons.zip',\n\t\t\t\t'required' => true,\n\t\t\t\t'version' => '3.19.4'\n\t\t\t),\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'name' \t=> 'Skudo Custom Post Types',\n\t\t\t\t'slug' \t \t=> 'skudo_custom_post_types',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/skudo_custom_post_types.zip',\n\t\t\t\t'required' \t=> true,\n\t\t\t\t'version' => '2.3'\n\t\t\t),\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'name' => 'Cube Portfolio',\n\t\t\t\t'slug' => 'cubeportfolio',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/cubeportfolio.zip',\n\t\t\t\t'required' => true,\n\t\t\t\t'version' => '4.0'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' \t=> 'Envato Market',\n\t\t\t\t'slug' \t \t=> 'envato-market',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/envato-market.zip',\n\t\t\t\t'required' \t=> true,\n\t\t\t\t'version' => '2.0.3'\n\t\t\t),\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'name' => 'LayerSlider WP',\n\t\t\t\t'slug' => 'LayerSlider',\n\t\t\t\t'source' => 'http://demos.upperthemes.com/plugins/skudo/LayerSlider.zip',\n\t\t\t\t'required' => false,\n\t\t\t\t'version' => '6.9.2'\n\t\t\t)\n\t\t\t\n\t\t);\n\t\n\t\t// Change this to your theme text domain, used for internationalising strings\n\t\t$config = array(\n\t\t\t'domain' \t\t=> 'skudo', \t// Text domain - likely want to be the same as your theme.\n\t\t\t'default_path' \t\t=> '',\n\t\t\t'parent_slug' => 'themes.php', \t\t\t// Parent menu slug.\n\t\t\t'menu' \t\t=> 'install-required-plugins', \t// Menu slug\n\t\t\t'has_notices' \t=> true, \t// Show admin notices or not\n\t\t\t'is_automatic' \t=> false,\t\t\t\t\t \t// Automatically activate plugins after installation or not\n\t\t\t'message' \t\t\t=> '',\t\t\t\t\t\t\t// Message to output right before the plugins table\n\t\t\t'strings' \t\t=> array(\n\t\t\t\t'page_title' \t\t\t=> esc_html__( 'Install Required Plugins', 'skudo' ),\n\t\t\t\t'menu_title' \t\t\t=> esc_html__( 'Install Plugins', 'skudo' ),\n\t\t\t\t'installing' \t\t\t=> esc_html__( 'Installing Plugin: %s', 'skudo' ), // %1$s = plugin name\n\t\t\t\t'oops' \t\t\t=> esc_html__( 'Something went wrong with the plugin API.', 'skudo' ),\n\t\t\t\t'notice_can_install_required' \t\t\t=> _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_install_recommended'\t\t\t=> _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_install' \t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_activate_required' \t\t\t=> _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_can_activate_recommended'\t\t\t=> _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_activate' \t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_ask_to_update' \t\t\t\t\t\t=> _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t'notice_cannot_update' \t\t\t\t\t\t=> _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'skudo' ), // %1$s = plugin name(s)\n\t\t\t\t'install_link' \t\t\t\t\t \t\t\t=> _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'skudo' ),\n\t\t\t\t'activate_link' \t\t\t\t \t\t\t=> _n_noop( 'Activate installed plugin', 'Activate installed plugins', 'skudo' ),\n\t\t\t\t'return' \t\t\t=> esc_html__( 'Return to Required Plugins Installer', 'skudo' ),\n\t\t\t\t'plugin_activated' \t\t\t=> esc_html__( 'Plugin activated successfully.', 'skudo' ),\n\t\t\t\t'complete' \t\t\t\t\t\t\t\t\t=> esc_html__( 'All plugins installed and activated successfully. %s', 'skudo' ), // %1$s = dashboard link\n\t\t\t\t'nag_type'\t\t\t\t\t\t\t\t\t=> 'updated' // Determines admin notice type - can only be 'updated' or 'error'\n\t\t\t)\n\t\t);\n\t\n\t\ttgmpa( $plugins, $config );\n\t\n\t}", "function visitor_check_shortcode( $atts, $content = null ) {\n\t if ( ( !is_user_logged_in() && !is_null( $content ) ) || is_feed() )\n\t\treturn $content;\n\treturn '';\n}", "function spartan_custom_admin_footer() {\n\n\t// VARIABLES\n\n\t$get_host = gethostname();\n\t$iq ='server1.iquariusmedia.com' || 'server2.iquariusmedia.com';\n\t$spartan = 'xenon.websitewelcome.com';\n\n\n\tif ( $get_host == $spartan ) {\n\n\t\t$developer = 'Renzo Johnson';\n\t\t$developer_url = 'http://renzojohnson.com';\n\n\t} else {\n\n\t\t$developer = 'iQuarius Media';\n\t\t$developer_url = 'http://iquariusmedia.com';\n\n\t}\n\n\t$client = get_option('blogname');\n\t$client_url = home_url();\n\n\n\n\t$spartan_admin_footer = 'Developed for ';\n\t$spartan_admin_footer .= '<a href=\"'. $client_url .'\">';\n\t$spartan_admin_footer .= $client;\n\t$spartan_admin_footer .= '</a>. Made Awesome by ';\n\t$spartan_admin_footer .= '<a href=\"' . $developer_url. '\" target=\"_blank\">'. $developer .'</a>.';\n\n\techo $spartan_admin_footer;\n\n}", "function spreadshop_assortment_detail()\n{\ninclude(plugin_dir_path(__FILE__).'/spreadassortmentdetail.php');\nadd_filter('wp_head', 'sources');\n}", "function cbp_display_help_page() {\n\t?>\n\t\t<h3>Options Walkthrough</h3>\n\t\t<ul class=\"ul-disc\">\n\t\t<li><strong>Post type integration</strong>: Which post type do you want to use the applet with? (Default: Post and Pages) </li>\n\t\t<li><strong>Save location</strong>: Where within the Wordpress upload folder would you like to save the image and/or source file? Don't forget the trailing slash! (Default: chibi/)</li>\n\t\t<li><strong>Add source files to Media Library</strong>: Any source files saved with the image is added to the library. (Default: on)</li>\n\t\t<li><strong>Dimensions</strong>: Change the default dimensions shown when creating a new image (Default: 250 x 250)</li>\n\t\t</ul>\n\t\t<h2>Chibipaint Integration Help</h2>\n\t\t<h3>How to use</h3>\n\t\t<ol class=\"ol-decimal\">\n\t\t<li>Ensure that the post type you wish to use the plugin with is enabled in Chibipaint &gt; Options.</li>\n\t\t<li>Create or edit a post. You should find the Chibipaint &quot;metabox&quot; above the text editor as shown: <img src=\"<?php echo plugins_url('/imgs/2.jpg', __FILE__);?>\" /></li>\n\t\t<li>Fill in the Name (feel free to use spaces and punctuation) and change the dimension if you wish to work with something other than 250px x 250px.</li>\n\t\t<li>Create your drawing. If you find the applet is too crowded, you can set the applet to floating mode. You can find the option in the applet's menu &gt; View &gt; Floating Mode.</li>\n\t\t<li>Once you're done, click on the &quot;send pic&quot; button or go to File &gt; Send Oekaki.</li>\n\t\t<li>Once it is sent successfully, you should find your drawing listed in the metabox.\n\t\t\t<br/><img src=\"<?php echo plugins_url('/imgs/6.jpg', __FILE__);?>\" /></li>\n\t\t<li>That's it! You should be able to find the image in the media library</li>\n\t\t</ol>\n\t<?php\n}", "function theme_doc()\n{\n\tinclude(\"admin/admin-shortcodes.php\");\n}", "function hmbkp_plugin_row( $plugins ) {\n\n\tif ( isset( $plugins[HMBKP_PLUGIN_SLUG . '/plugin.php'] ) )\n\t\t$plugins[HMBKP_PLUGIN_SLUG . '/plugin.php']['Description'] = str_replace( 'Once activated you\\'ll find me under <strong>Tools &rarr; Backups</strong>', 'Find me under <strong><a href=\"' . admin_url( 'tools.php?page=' . HMBKP_PLUGIN_SLUG ) . '\">Tools &rarr; Backups</a></strong>', $plugins[HMBKP_PLUGIN_SLUG . '/plugin.php']['Description'] );\n\n\treturn $plugins;\n\n}", "function hello_yoda_load(){\n if (current_user_can('activate_plugins')){\n add_action( 'admin_head', 'vader_css' );\n add_action( 'admin_notices', 'hello_yoda' );\n } else{\n add_action( 'admin_head', 'yoda_css' );\n add_action( 'admin_notices', 'hello_yoda' );\n }\n\n }", "function dm_contact_info_shortcode($atts, $content = null) {\n\textract(shortcode_atts(array(\n\t\t'title' => 'Contact Us',\n\t), $atts));\n\n\t$contact_info = get_transient('dm_contact_info');\n\n\tif ($contact_info === false) {\n\t\t$contact_info = array(\n\t\t\t'name' => get_option('dm_company_name'),\n\t\t\t'address' => get_option('dm_company_address'),\n\t\t\t'phone_1' => get_option('dm_company_phone_1'),\n\t\t\t'phone_2' => get_option('dm_company_phone_2'),\n\t\t\t'fax' => get_option('dm_company_fax'),\n\t\t\t'map_link' => get_option('dm_company_map_link'),\n\t\t\t'portland_address' => get_option('dm_company_portland_address'),\n\t\t\t'portland_map_link' => get_option('dm_company_portland_map_link'),\n\t\t);\n\t\tset_transient('dm_company_info', $contact_info, 86400);\n\t}\n\n\tob_start();\n?>\n\t<div class=\"sidebar_contact_us\">\n\t\t<h4><?php echo $title; ?></h4>\n\t\t<div class=\"office\">\n\t\t\t<h5><?php echo $contact_info['name']; ?></h5>\n\t\t\t<address>\n\t\t\t\t<?php echo $contact_info['address']; ?>\n\t\t\t</address>\n\t\t\t<div class=\"phone field\">\n\t\t\t\t<div class=\"label\">Phone:</div>\n\t\t\t\t<div class=\"number\"><?php echo $contact_info['phone_1']; ?></div>\n\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t<div class=\"number\"><?php echo $contact_info['phone_2']; ?></div>\n\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t<div class=\"label\">Fax:</div>\n\t\t\t\t<div class=\"number\"><?php echo $contact_info['fax']; ?></div>\n\t\t\t</div>\n\t\t\t<div class=\"clearfix\"></div>\n\t\t\t<a href=\"<?php echo $contact_info['map_link']; ?>\" target=\"_blank\">View Map</a>\n\t\t</div>\n\t\t<div class=\"office\">\n\t\t\t<h5>Portland Office</h5>\n\t\t\t<address>\n\t\t\t\t<?php echo $contact_info['portland_address']; ?>\n\t\t\t</address>\n\t\t\t<a href=\"<?php echo $contact_info['portland_map_link']; ?>\" target=\"_blank\">View Map</a>\n\t\t</div>\n\t</div>\n<?php\n\t$output = ob_get_clean();\n\treturn $output;\n}", "function spreadshop_assortment()\n{\ninclude(plugin_dir_path(__FILE__).'/spreadassortment.php');\nadd_filter('wp_head', 'sources');\n}", "function wpaddons_shortcode( $atts ) {\n\n\t// Register and enqueues styles\n\tadd_action( 'wp_enqueue_scripts', array( 'WP_Addons_IO', 'enqueue_styles' ) );\n\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\t'debug_mode' => 0,\n\t\t\t'plugin' => '',\n\t\t\t'view' => 'cover-grid-third',\n\t\t),\n\t\t$atts,\n\t\t'wpaddons'\n\t);\n\n\t// Load wpAddons SDK\n\t//require_once plugin_dir_path( __FILE__ ) . '/wpaddons-io-sdk/wpaddons-io-sdk.php';\n\n\t// Set addon parameters\n\t$plugin_data = array(\n\t\t'parant_plugin_slug' => $atts['plugin'],\n\t\t'view' => plugin_dir_path( __FILE__ ) . 'wpaddons-io-sdk/view/' . $atts['view'] . '.php',\n\t);\n\n\t// Initiate addons\n\tnew WP_Addons_IO( $plugin_data );\n\n}", "function ground_shortcode_logged_in( $atts, $content = null ) {\n\n\tif ( is_user_logged_in() ) {\n\t\treturn do_shortcode( $content );\n\t} else {\n\t\treturn;\n\t}\n\n}", "function change_footer_admin () { echo '<span id=\"footer-thankyou\">Developed by IT ADR</span>'; }", "function customPageHeader() {\n echo osc_apply_filter('custom_plugin_title', __('Plugins'));\n }", "function my_menu_output(){\n\techo '<h1>The Hello Yoda Plugin by Alan</h1>\n\t<p>\"Pass on what you have learned.\" --Yoda </p>';\n}", "function friendly_shortcode_toggles() {\n\t// Don't bother doing this stuff if the current user lacks permissions\n\tif ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )\n\t\treturn;\n\t \n\t// Add only in Rich Editor mode\n\tif ( get_user_option('rich_editing') == 'true') {\n\t\t// filter the tinyMCE buttons and add our own\n\t\tadd_filter(\"mce_external_plugins\", \"add_friendly_tinymce_plugin_toggles\");\n\t\tadd_filter('mce_buttons', 'register_friendly_toggles');\n\t}\n}", "public function display_plugin_admin_page() {\n include_once( plugin_dir_path(__FILE__) . 'partials/admin.php' );\n }", "function wp_dashboard_plugins()\n {\n }", "function ts_run_shortcode( $content ) {\r\r\n global $shortcode_tags;\r\r\n \r\r\n // Backup current registered shortcodes and clear them all out\r\r\n $orig_shortcode_tags = $shortcode_tags;\r\r\n remove_all_shortcodes();\r\r\n \r\r\n add_shortcode('accordions', 'ts_accordions');\r\r\n\tadd_shortcode('accordion', 'ts_accordion');\r\r\n\t\r\r\n\tadd_shortcode('one_half', 'ts_one_half');\r\r\n\tadd_shortcode('one_third', 'ts_one_third');\r\r\n\tadd_shortcode('one_fourth', 'ts_one_fourth');\r\r\n\tadd_shortcode('one_fifth', 'ts_one_fifth');\r\r\n\tadd_shortcode('one_sixth', 'ts_one_sixth');\r\r\n\t\r\r\n\tadd_shortcode('two_third', 'ts_two_third');\r\r\n\tadd_shortcode('two_fourth', 'ts_two_fourth');\r\r\n\tadd_shortcode('two_fifth', 'ts_two_fifth');\r\r\n\tadd_shortcode('two_sixth', 'ts_two_sixth');\r\r\n\t\r\r\n\t\r\r\n\tadd_shortcode('three_fourth', 'ts_three_fourth');\r\r\n\tadd_shortcode('three_fifth', 'ts_three_fifth');\r\r\n\tadd_shortcode('three_sixth', 'ts_three_sixth');\r\r\n\t\r\r\n\tadd_shortcode('four_fifth', 'ts_four_fifth');\r\r\n\tadd_shortcode('four_sixth', 'ts_four_sixth');\r\r\n\t\r\r\n\tadd_shortcode('five_sixth', 'ts_five_sixth');\r\r\n\t\r\r\n\tadd_shortcode('content_box', 'ts_content_box');\r\r\n\t\r\r\n\tadd_shortcode('content_highlight', 'ts_content_highlight');\r\r\n\t\r\r\n\tadd_shortcode( 'dropcap', 'ts_dropcap' );\r\r\n\t\r\r\n\tadd_shortcode( 'highlight', 'ts_highlight' );\r\r\n\t\r\r\n\tadd_shortcode('pre', 'ts_pre');\r\r\n\t\r\r\n\tadd_shortcode( 'pullquote', 'ts_pullquote' );\r\r\n\tadd_shortcode( 'blockquote', 'ts_blockquote' );\r\r\n\t\r\r\n\tadd_shortcode( 'recent_posts', 'ts_recentposts' );\r\r\n\t\r\r\n\tadd_shortcode('separator', 'ts_separator');\r\r\n\tadd_shortcode('clear', 'ts_clearfloat');\r\r\n\tadd_shortcode('clearfix', 'ts_clearfixfloat');\r\r\n\t\r\r\n\tadd_shortcode('social', 'ts_socialshortcode');\r\r\n\t\r\r\n\tadd_shortcode('tabs', 'ts_tab');\r\r\n\t\r\r\n\tadd_shortcode('toggles', 'ts_toggles');\r\r\n\tadd_shortcode('toggle', 'ts_toggle');\r\r\n \r\r\n // Do the shortcode (only the one above is registered)\r\r\n $content = do_shortcode( $content );\r\r\n \r\r\n // Put the original shortcodes back\r\r\n $shortcode_tags = $orig_shortcode_tags;\r\r\n \r\r\n return $content;\r\r\n}", "function shortcodes_xh_version()\n{\n global $pth;\n\n return '<h1>Shortcodes_xh</h1>'.\"\\n\"\n\t. tag('img src=\"'.$pth['folder']['plugins'].'shortcodes_xh/help/ShortCode_XH.png\" style=\"float: left; margin: 0 20px 20px 0\"')\n\t. '<p>This plugin is to use the familiar <a href=\"https://codex.wordpress.org/Shortcode_API\" target=\"_blank\">WordPress shortcode syntax</a> in CMSimple_XH.</p>'\n\t. '<p>Version: '.SHORTCODES_XH_VERSION.'</p>'.\"\\n\"\n\t. '<p>Copyright &copy; 2015 <a href=\"http://cmsimple-jp.org\" target=\"_blank\">cmsimple-jp.org</a></p>'.\"\\n\"\n\t. '<p>Original <a href=\"https://github.com/Badcow/Shortcodes\" target=\"_blank\">Badcow/Shortcodes Latest commit 5 Apr 2015</a></p>'\n\t. '<p style=\"text-align: justify\">'\n\t. '<b>License</b>'. tag('br') . \"\\n\"\n\t. ' Art License Terms : <a href=\"http://creativecommons.org/licenses/by-sa/4.0/\" target=\"_blank\">Creative Commons License </a> . Detail <a href=\"https://github.com/Badcow/Shortcodes\" target=\"_blank\">https://github.com/Badcow/Shortcodes</a>'. tag('br').\"\\n\"\n\t. ' Software License terms : <a href=\"http://www.gnu.org/licenses/\" target=\"_blank\">GPLv3.</a>';\n}", "public function getShortcodeReplace();", "function extamus_change_admin_footer(){\n\t echo '<span id=\"footer-note\">Please dont hesitate to reach out to your friends at <a href=\"http://www.extamus.com/\" target=\"_blank\">Extamus Media</a> with any questions.</span>';\n\t}", "function wh_short_code() {\n\n return 'waouh_filtres';\n}", "function do_shortcode($content, $ignore_html = \\false)\n {\n }", "function poemhd_plugin() {\n\t$chosen = Poemhd_plugin_get_lyric();\n\t$lang = '';\n\tif ( 'en_' !== substr( get_user_locale(), 0, 3 ) ) {\n\t\t$lang = ' lang=\"en\"';\n\t}\n\n\tprintf(\n\t\t'<p id=\"dolly\"><span class=\"screen-reader-text\">%s </span><span dir=\"ltr\"%s>%s</span></p>',\n\t\t__( 'Quote from Hello Dolly song, by Jerry Herman:' ),\n\t\t$lang,\n\t\t$chosen\n\t);\n}", "function plugin_version_itilcategorygroups() {\n return array('name' => __('ItilCategory Groups', 'itilcategorygroups'),\n 'version' => '0.90+1.0.3',\n 'author' => \"<a href='http://www.teclib.com'>TECLIB'</a>\",\n 'homepage' => 'http://www.teclib.com');\n}", "function obdiy_user_shortcode($atts, $content){\n\n\tif (!is_user_logged_in()) return '';\n\n\t$current_user = wp_get_current_user();\n\treturn $current_user->user_login;\n}", "function emas_shortcodes_wjarallax()\n{\n\tfunction emas_shortcode_wjarallax($atts = [], $content = null)\n\t{\n\t\t$atts = shortcode_atts( array( 'image' => 'image' ), $atts );\n\t\tob_start();\n\t\trequire ( plugin_dir_path(__FILE__) . '/view.php');\n\t\t$content = ob_get_clean();\n\t\treturn $content;\t\n\t}\n\n\tadd_shortcode('emas-jarallax', 'emas_shortcode_wjarallax');\n}", "public function add_short_code()\n {\n add_shortcode('colorYourLife', array($this, 'generate_short_code_content'));\n }", "function bfox_bp_plans_my_plans_screen_view() {\n\tadd_action('bp_template_content', 'bfox_bp_plans_my_plans_screen_view_content');\n\tbfox_bp_core_load_template(apply_filters('bfox_bp_plans_my_plans_screen_template', 'members/single/plugins'));\n}", "function customadmin() {\n if ( is_admin() ) {\n $script = <<< EOF\n<script type='text/javascript'>\n jQuery(document).ready(function($) {\n jQuery('#postexcerpt').show()\n jQuery('#wp-content-editor-container').hide()\n jQuery('#wp-content-editor-tools .wp-editor-tabs').hide()\n jQuery('head').append('<style>#post-status-info{display:none!important}</style>')\n });\n</script>\nEOF;\n echo $script;\n }\n}", "function arconix_single_plugin_filter( $content ) {\n $custom = get_post_custom();\n isset( $custom[\"_acpl_slug\"][0] )? $slug = $custom[\"_acpl_slug\"][0] : $slug = '';\n\n // Bail if $slug is not defined\n if( ! $slug ) return $content;\n\n // Pass the slug into the WP API to get the data we need\n $details = unserialize( ARCONIX_PLUGINS::get_wporg_custom_plugin_data( $slug ) );\n\n // Bail if $details isn't defined\n if( ! $details ) return $content;\n\n $sections = $details->sections;\n $description = $sections['description'];\n $installation = $sections['installation'];\n $screenshots = $sections['screenshots'];\n $faq = $sections['faq'];\n $changelog = $sections['changelog'];\n\n // Our page content\n $content = '[tabs]';\n $content .= '[tab title=\"Description\"]' . $description . '[/tab]'; \n $content .= '[tab title=\"Screenshots\"]' . $screenshots . '[/tab]';\n $content .= '[tab title=\"Installation\"]' . $installation . '[/tab]';\n $content .= '[tab title=\"FAQ\"]' . $faq . '[/tab]';\n $content .= '[tab title=\"Changelog\"]' . $changelog . '[/tab]';\n $content .= '[/tabs]';\n\n return $content;\n}", "function sh_display_custom_settings_callback(){\n require_once( plugin_dir_path(__FILE__) . '/templates/display_custom_settings.php' );\n}", "function init_plugin() : void {\n\n\t// CSS/JS.\n\tadd_action( 'enqueue_block_assets', __NAMESPACE__ . '\\load_block_frontend_assets' );\n\tadd_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\\load_block_editor_assets' );\n\tadd_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\load_full_assets' );\n\tadd_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\load_messaging_assets' );\n\n\t// Admin-only CSS/JS.\n\tadd_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\\Admin\\load_admin_assets' );\n\tadd_filter( 'admin_body_class', __NAMESPACE__ . '\\Admin\\add_admin_body_class' );\n\n\t// Modify output.\n\tadd_filter( 'body_class', __NAMESPACE__ . '\\add_body_class' );\n\tadd_filter( 'the_content', __NAMESPACE__ . '\\Gating\\maybe_restrict_content' );\n\tadd_filter( 'the_title', __NAMESPACE__ . '\\Gating\\maybe_add_padlock_to_title', 10, 2 );\n\tadd_action( 'wp_head', __NAMESPACE__ . '\\print_meta_tag' );\n\n\t// Admin screens and settings.\n\tadd_filter( 'plugin_action_links_coil-web-monetization/plugin.php', __NAMESPACE__ . '\\Admin\\add_plugin_action_links' );\n\tadd_filter( 'plugin_row_meta', __NAMESPACE__ . '\\Admin\\add_plugin_meta_link', 10, 2 );\n\tadd_action( 'admin_menu', __NAMESPACE__ . '\\Settings\\register_admin_menu' );\n\tadd_action( 'admin_init', __NAMESPACE__ . '\\Settings\\register_admin_content_settings' );\n\tadd_action( 'admin_notices', __NAMESPACE__ . '\\Settings\\admin_welcome_notice' );\n\tadd_action( 'wp_ajax_dismiss_welcome_notice', __NAMESPACE__ . '\\Settings\\dismiss_welcome_notice' );\n\n\t// Term meta.\n\tadd_action( 'edit_term', __NAMESPACE__ . '\\Admin\\maybe_save_term_meta', 10, 3 );\n\tadd_action( 'create_term', __NAMESPACE__ . '\\Admin\\maybe_save_term_meta', 10, 3 );\n\tadd_action( 'delete_term', __NAMESPACE__ . '\\Admin\\delete_term_monetization_meta' );\n\tadd_term_edit_save_form_meta_actions();\n\n\t// Customizer settings.\n\tadd_action( 'customize_register', __NAMESPACE__ . '\\Admin\\add_customizer_messaging_panel' );\n\tadd_action( 'customize_register', __NAMESPACE__ . '\\Admin\\add_customizer_options_panel' );\n\tadd_action( 'customize_register', __NAMESPACE__ . '\\Admin\\add_customizer_learn_more_button_settings_panel' );\n\n\t// User profile settings.\n\tadd_action( 'personal_options', __NAMESPACE__ . '\\User\\add_user_profile_payment_pointer_option' );\n\tadd_action( 'personal_options_update', __NAMESPACE__ . '\\User\\maybe_save_user_profile_payment_pointer_option' );\n\tadd_action( 'edit_user_profile_update', __NAMESPACE__ . '\\User\\maybe_save_user_profile_payment_pointer_option' );\n\tadd_filter( 'option_coil_payment_pointer_id', __NAMESPACE__ . '\\User\\maybe_output_user_payment_pointer' );\n\n\t// Metaboxes.\n\tadd_action( 'load-post.php', __NAMESPACE__ . '\\Admin\\load_metaboxes' );\n\tadd_action( 'load-post-new.php', __NAMESPACE__ . '\\Admin\\load_metaboxes' );\n\tadd_action( 'save_post', __NAMESPACE__ . '\\Admin\\maybe_save_post_metabox' );\n\n\t// Modal messaging\n\tadd_action( 'wp_footer', __NAMESPACE__ . '\\load_plugin_templates' );\n\n\t// Load order - important.\n\tadd_action( 'init', __NAMESPACE__ . '\\Gating\\register_content_meta' );\n\tadd_action( 'init', __NAMESPACE__ . '\\Gating\\register_term_meta' );\n}", "function flawless_footer_copyright() {\r\n global $flawless;\r\n echo do_shortcode( nl2br( $flawless[ 'footer' ][ 'copyright' ] ) );\r\n }", "function settings_callback_section() {\n\t ?>\n\t <p class=\"description\"><?php _e( 'Define the Utilities to use.', 'thaim-utilities' );?></p>\n\t <?php\n\t}", "public function group_find_main_content_action() {\n\t\techo \\do_shortcode( '[elementor-template id=\"32840\"]' );\n\t\t// echo \"hello\";\n\t}", "function my_function_admin_bar($content) {\n\treturn ( current_user_can( 'administrator' ) ) ? $content : false;\n}", "function JMA_GBS_footer_creds_filter($creds)\n{\n $rel = is_front_page() ? '' : 'rel=\"nofollow\"';\n $creds = \"<a {$rel} href=\\\"http://ironcodestudio.com/bootstrap-genesis-theme/\\\">Bootstrap Genesis Theme</a> by <a {$rel} href=\\\"http://ironcodestudio.com/\\\">Iron Code Studio</a>\";\n return $creds;\n}", "function cb_bookings_location_shortcode( $atts ) {\t\n$fieldname = isset ( $atts['acf'] ) ? $atts['acf'] : 'user_locations';\t\n$max_days = isset ( $atts['days'] ) ? $atts['days'] : 15;\t\n\n$current_user = wp_get_current_user();\n\t\nif ( 0 != $current_user->ID ) {\n\t$user_info = get_userdata($current_user->ID);\n\t$print = \"<p>Hallo \". $user_info->first_name .\",\";\n\tif (in_array( 'administrator', (array) $user_info->roles )\n\tor in_array( 'editor', (array) $user_info->roles )\n\tor in_array( 'contributor', (array) $user_info->roles )\n\t ){\n\t\t$print .= \"<br>als Administrator siehst du hier immer die Buchungsübersicht zu allen Standorten:</p>\";\n\t} else {\n\t\t$print .= \"<br>für Partner werden hier Buchungsinfos nur zu den Standorten angezeigt, die im Benutzerprofil eingetragen sind:</p>\";\n\t}\n\n if (in_array( 'administrator', (array) $user_info->roles )\n\t or in_array( 'editor', (array) $user_info->roles )\n\t or in_array( 'contributor', (array) $user_info->roles )\n\t\t) {\n\t\t$print .= \"<p>als Teammitglied siehst du hier zuerst noch alle Standort-Ansprechpartner:</p>\";\n\t\t$args = array(\t\n\t\t\t\t'role__not_in' => array('subscriber'),\n\t\t\t\t'meta_key' => $fieldname,\n\t\t\t\t'meta_value' => '',\n\t\t\t\t'meta_compare' => '!='\t\n \t\t ); \n\t $users = get_users( $args );\n\t\t$trenner = \"</th><th>\";\t\t\n\t\t$trenner1 = \"</th><th class = 'sortless'>\";\t\t\n\t\t$print .= '<table class = \"tablesorter\"><thead><tr><th>Wer'.$trenner1.'Mail'.$trenner1.'Telefon'.$trenner.' Standorte</th></thead><tbody>';\n\t\t$trenner = \"</td><td>\";\n\t\tforeach ( $users as $user ) { \n\t\t\t\t\t\n\t\t\t\t$user_locations = get_field($fieldname, 'user_'.$user->ID);\n\t\t\t \n\t\t\t \tif ( $user_locations) {\n\t\t\t\t\t \n\t\t\t\t \t $print .= \"<tr><td>\".$user->first_name.\" \".$user->last_name.$trenner.$user->user_email.$trenner.$user->phone.$trenner.\"<ul><li>\".implode('</li><li>', array_column($user_locations, 'post_title')).\"</li></ul></td></tr>\";\n\t\t\t\t}\n\t\t\t\n\t\t}\n\t\t$print .= \"</tbody></table>\";\t\n\t\t\n\t }\n\t\n\t if ( in_array( 'administrator', (array) $user_info->roles ) ) {\n\t\t$locations = get_posts( array(\n \t\t\t'post_type' => 'cb_locations',\n\t\t\t'post_status' => 'publish',\n\t\t\t'order' \t\t => 'ASC',\n \t\t\t'posts_per_page' => -1\t\n\t\t ) );\n\t\t \n\t } else {\n\t $locations = get_field('user_locations', 'user_'.$current_user->ID);\n\t }\n \n\t if ( $locations ) {\n \t\tforeach ( $locations as $location ) { \t\t\t\t\n\t\t\t\t $atts = array ('locid' => $location->ID, 'days' => $max_days);\t\t\t\t \t\t\n\t \t\t $print .= cb_bookings_overview_shortcode( $atts );\t\n\t\t}\n\t}\n}\nreturn $print;\n}", "public function group_find_main_screen_function() {\n\t\t// add title and content here - last is to call the members plugin.php template.\n\t\t\\add_action( 'bp_template_content', array( $this, 'group_find_main_content_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t// echo do_shortcode ( '[youzer_groups per_page=\"10\"]' );\n\t}", "function skudo_content_shortcoder($post_content, $loadglobally = false){\n\t\t\n\t\t$dependancy = array('jquery');\n\t\tglobal $vc_addons_url;\n\n\t\t\t\n\t\tif (isset($vc_addons_url) && $vc_addons_url != \"\"){\n\t\t\t\n\t\t\t$js_path = 'assets/min-js/';\n\t\t\t$css_path = 'assets/min-css/';\n\t\t\t$ext = '.min';\n\t\t\t$isAjax = true;\n\t\t\t$ultimate_smooth_scroll = get_option('ultimate_smooth_scroll');\n\t\n\t\t\t// register js\n\t\t\twp_register_script('ultimate-script',$vc_addons_url.'assets/min-js/ultimate.min.js',array('jquery', 'jquery-ui-core' ), '3.19.4', false);\n\t\t\twp_register_script('ultimate-appear',$vc_addons_url.$js_path.'jquery-appear'.$ext.'.js',array('jquery'), '3.19.4');\n\t\t\twp_register_script('ultimate-custom',$vc_addons_url.$js_path.'custom'.$ext.'.js',array('jquery'), '3.19.4');\n\t\t\twp_register_script('ultimate-vc-params',$vc_addons_url.$js_path.'ultimate-params'.$ext.'.js',array('jquery'), '3.19.4');\n\t\t\tif($ultimate_smooth_scroll === 'enable') {\n\t\t\t\t$smoothScroll = 'SmoothScroll-compatible.min.js';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$smoothScroll = 'SmoothScroll.min.js';\n\t\t\t}\n\t\t\twp_register_script('ultimate-smooth-scroll',$vc_addons_url.'assets/min-js/'.$smoothScroll,array('jquery'),'3.19.4',true);\n\t\t\twp_register_script(\"ultimate-modernizr\",$vc_addons_url.$js_path.'modernizr-custom'.$ext.'.js',array('jquery'),'3.19.4');\n\t\t\twp_register_script(\"ultimate-tooltip\",$vc_addons_url.$js_path.'tooltip'.$ext.'.js',array('jquery'),'3.19.4');\n\t\n\t\t\t// register css\n\t\t\twp_register_style('ultimate-animate',$vc_addons_url.$css_path.'animate'.$ext.'.css',array(),'3.19.4');\n\t\t\twp_register_style('ultimate-style',$vc_addons_url.$css_path.'style'.$ext.'.css',array(),'3.19.4');\n\t\t\twp_register_style('ultimate-style-min',$vc_addons_url.'assets/min-css/ultimate.min.css',array(),'3.19.4');\n\t\t\twp_register_style('ultimate-tooltip',$vc_addons_url.$css_path.'tooltip'.$ext.'.css',array(),'3.19.4');\n\t\n\t\t\t$ultimate_smooth_scroll = get_option('ultimate_smooth_scroll');\n\t\t\tif($ultimate_smooth_scroll == \"enable\" || $ultimate_smooth_scroll === 'enable') {\n\t\t\t\twp_enqueue_script('ultimate-smooth-scroll');\n\t\t\t}\n\t\n\t\t\tif(function_exists('vc_is_editor')){\n\t\t\t\tif(vc_is_editor()){\n\t\t\t\t\twp_enqueue_style('vc-fronteditor',$vc_addons_url.'assets/min-css/vc-fronteditor.min.css');\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t$ultimate_global_scripts = ($loadglobally) ? 'enable' : bsf_get_option('ultimate_global_scripts');\n\n\t\t\tif($ultimate_global_scripts === 'enable') {\n\t\t\t\t\n\t\t\t\twp_enqueue_script('ultimate-modernizr');\n\t\t\t\twp_enqueue_script('jquery_ui');\n\t\t\t\twp_enqueue_script('masonry');\n\t\t\t\tif(defined('DISABLE_ULTIMATE_GOOGLE_MAP_API') && (DISABLE_ULTIMATE_GOOGLE_MAP_API == true || DISABLE_ULTIMATE_GOOGLE_MAP_API == 'true'))\n\t\t\t\t\t$load_map_api = false;\n\t\t\t\telse\n\t\t\t\t\t$load_map_api = true;\n\t\t\t\tif($load_map_api)\n\t\t\t\t\twp_enqueue_script('googleapis');\n\t\t\t\twp_enqueue_script('ultimate-script');\n\t\t\t\twp_enqueue_script('ultimate-modal-all');\n\t\t\t\twp_enqueue_script('jquery.shake',$vc_addons_url.$js_path.'jparallax'.$ext.'.js');\n\t\t\t\twp_enqueue_script('jquery.vhparallax',$vc_addons_url.$js_path.'vhparallax'.$ext.'.js');\n\t\n\t\t\t\twp_enqueue_style('ultimate-style-min');\n\t\t\t\twp_enqueue_style(\"ult-icons\");\n\t\t\t\twp_enqueue_style('ultimate-vidcons',$vc_addons_url.'assets/fonts/vidcons.css');\n\t\t\t\twp_enqueue_script('jquery.ytplayer',$vc_addons_url.$js_path.'mb-YTPlayer'.$ext.'.js');\n\t\n\t\t\t\t$Ultimate_Google_Font_Manager = new Ultimate_Google_Font_Manager;\n\t\t\t\t$Ultimate_Google_Font_Manager->enqueue_selected_ultimate_google_fonts();\n\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\tif(!is_404() && !is_search()){\n\t\n\t\t\t\tif(stripos($post_content, 'font_call:'))\n\t\t\t\t{\n\t\t\t\t\tpreg_match_all('/font_call:(.*?)\"/',$post_content, $display);\n\t\t\t\t\tif (function_exists('enquque_ultimate_google_fonts_optimzed')) enquque_ultimate_google_fonts_optimzed($display[1]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( stripos( $post_content, '[swatch_container') || \n\t\t\t\t stripos( $post_content, '[ultimate_modal'))\n\t\t\t\t{\n\t\t\t\t\twp_enqueue_script('ultimate-modernizr');\n\t\t\t\t}\n\n\t\t\t\tif( stripos( $post_content, '[ultimate_exp_section') ||\n\t\t\t\t\tstripos( $post_content, '[info_circle') ) {\n\t\t\t\t\twp_enqueue_script('jquery_ui');\n\t\t\t\t}\n\n\t\t\t\tif( stripos( $post_content, '[icon_timeline') ) {\n\t\t\t\t\twp_enqueue_script('masonry');\n\t\t\t\t}\n\n\t\t\t\tif($isAjax == true) { // if ajax site load all js\n\t\t\t\t\twp_enqueue_script('masonry');\n\t\t\t\t}\n\n\t\t\t\tif( stripos( $post_content, '[ultimate_google_map') ) {\n\t\t\t\t\tif(defined('DISABLE_ULTIMATE_GOOGLE_MAP_API') && (DISABLE_ULTIMATE_GOOGLE_MAP_API == true || DISABLE_ULTIMATE_GOOGLE_MAP_API == 'true'))\n\t\t\t\t\t\t$load_map_api = false;\n\t\t\t\t\telse\n\t\t\t\t\t\t$load_map_api = true;\n\t\t\t\t\tif($load_map_api)\n\t\t\t\t\t\twp_enqueue_script('googleapis');\n\t\t\t\t}\n\n\t\t\t\tif( stripos( $post_content, '[ult_range_slider') ) {\n\t\t\t\t\twp_enqueue_script('jquery-ui-mouse');\n\t\t\t\t\twp_enqueue_script('jquery-ui-widget');\n\t\t\t\t\twp_enqueue_script('jquery-ui-slider');\n\t\t\t\t\twp_enqueue_script('ult_range_tick');\n\t\t\t\t\twp_enqueue_script('ult_ui_touch_punch');\n\t\t\t\t}\n\n\t\t\t\twp_enqueue_script('ultimate-script');\n\n\t\t\t\tif( stripos( $post_content, '[ultimate_modal') ) {\n\t\t\t\t\twp_enqueue_script('ultimate-modal-all');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ultimate_css = \"enable\";\n\t\n\t\t\t\tif ($ultimate_css == \"enable\"){\n\t\t\t\t\twp_enqueue_style('ultimate-style-min');\n\t\t\t\t\tif( stripos( $post_content, '[ultimate_carousel') ) {\n\t\t\t\t\t\twp_enqueue_style(\"ult-icons\");\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\twp_enqueue_script( 'ultimate-row-bg', $vc_addons_url.$js_path . 'ultimate_bg' . $ext . '.js' );\n\t\t\t}\n\t\t}\n\t}", "function spreadshop_designer()\n{\ninclude(plugin_dir_path(__FILE__).'/spreaddesigner.php');\nadd_filter('wp_head', 'sources');\n}", "function wc_show_author() {\n global $post;\n echo \"This plugin was made by William Cayetano\";\n\n}", "function widget_gempa_plugin($args) {\n\nextract($args);\necho $before_widget;\nshowWidgetGempaPlugin();\necho $after_widget;\n\n}", "function kw_youtube_short( $atts, $content = null )\r\n{\r\n\r\n extract( shortcode_atts( array(\r\n 'id' => '',\r\n ), $atts ) );\r\n\t \r\n\t$id = trim($id);\r\n\t$kw_spaces = get_option(\"kw_spaces\");\r\n\t$kw_spaces = stripslashes($kw_spaces);\r\n\t$kw_width = get_option(\"kw_width\");\r\n\t$kw_width = stripslashes($kw_width);\r\n\t$kw_height = get_option(\"kw_height\");\r\n\t$kw_height = stripslashes($kw_height);\r\n\t$kw_bgcolor = get_option(\"kw_bgcolor\");\r\n\t$kw_bgcolor = stripslashes($kw_bgcolor);\r\n\t$kw_api = get_option(\"kw_api\");\r\n\t$kw_api = stripslashes($kw_api);\r\n \r\nreturn ''.$kw_spaces.'<object width=\"'.$kw_width.'\" height=\"'.$kw_height.'\"><param name=\"movie\" value=\"http://www.youtube.com/v/'.$id.''.$kw_api.'\" /><param name=\"allowFullScreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"bgcolor\" value=\"'.$kw_bgcolor.'\"><embed type=\"application/x-shockwave-flash\" width=\"'.$kw_width.'\" height=\"'.$kw_height.'\" src=\"http://www.youtube.com/v/'.$id.''.$kw_api.'\" bgcolor=\"'.$kw_bgcolor.'\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed></object>'.$kw_spaces.'';\r\n}", "function modify_left_copyright() {\n \t ?><p>© <?php echo date('Y'); ?> AI Scripts <a href=\"<?php echo admin_url();?>\" title=\"Login to the backend of WordPress.\" />Login.</a></p>\n \t<?php\n }", "function hmbkp_actions() {\n\n\t$plugin_data = get_plugin_data( __FILE__ );\n\n\tdefine( 'HMBKP_VERSION', $plugin_data['Version'] );\n\n\t// Fire the update action\n\tif ( HMBKP_VERSION > get_option( 'hmbkp_plugin_version' ) )\n\t\thmbkp_update();\n\n\trequire_once( HMBKP_PLUGIN_PATH . '/admin.actions.php' );\n\trequire_once( HMBKP_PLUGIN_PATH . '/everbox/everbox.actions.php' );\n\n\t// Load admin css and js\n\tif ( isset( $_GET['page'] ) && $_GET['page'] == HMBKP_PLUGIN_SLUG ) :\n\t\twp_enqueue_script( 'hmbkp', HMBKP_PLUGIN_URL . '/assets/hmbkp.js' );\n\t\twp_enqueue_style( 'hmbkp', HMBKP_PLUGIN_URL . '/assets/hmbkp.css' );\n\tendif;\n\n\t// Handle any advanced option changes\n\thmbkp_constant_changes();\n\n}", "function add_meta_to_plugin_pages() {\r\n echo '<meta name=\"robots\" content=\"noindex\"/>';\r\n echo '<meta name=\"robots\" content=\"nofollow\"/>';\r\n }", "public function admin_script() {\n\n\t\tglobal $itsec_globals;\n\n\t\tif ( isset( get_current_screen()->id ) && strpos( get_current_screen()->id, 'security_page_toplevel_page_itsec_settings' ) !== false ) {\n\n\t\t\t$new_slug = get_site_option( 'itsec_hide_backend_new_slug' );\n\n\t\t\tif ( $new_slug !== false ) {\n\n\t\t\t\tdelete_site_option( 'itsec_hide_backend_new_slug' );\n\n\t\t\t\t$new_slug = get_site_url() . '/' . $new_slug;\n\n\t\t\t\t$slug_text = sprintf(\n\t\t\t\t\t'%s%s%s%s%s',\n\t\t\t\t\t__( 'Warning: Your admin URL has changed. Use the following URL to login to your site', 'it-l10n-ithemes-security-pro' ),\n\t\t\t\t\tPHP_EOL . PHP_EOL,\n\t\t\t\t\t$new_slug,\n\t\t\t\t\tPHP_EOL . PHP_EOL,\n\t\t\t\t\t__( 'Please note this may be different than what you sent as the URL was sanitized to meet various requirements. A reminder has also been sent to the notification email(s) set in this plugins global settings.', 'it-l10n-ithemes-security-pro' )\n\t\t\t\t);\n\n\t\t\t\t$this->send_new_slug( $new_slug );\n\n\t\t\t} else {\n\t\t\t\t$slug_text = false;\n\t\t\t}\n\n\t\t\tsprintf(\n\t\t\t\t'%s %s %s',\n\t\t\t\t__( 'Warning: Your admin URL has changed. Use the following URL to login to your site', 'it-l10n-ithemes-security-pro' ),\n\t\t\t\tget_site_url() . '/' . $new_slug,\n\t\t\t\t__( 'Please note this may be different than what you sent as the URL was sanitized to meet various requirements.', 'it-l10n-ithemes-security-pro' )\n\t\t\t);\n\n\t\t\twp_enqueue_script( 'itsec_hide_backend_js', $this->module_path . 'js/admin-hide-backend.js', array( 'jquery' ), $itsec_globals['plugin_build'] );\n\t\t\twp_localize_script(\n\t\t\t\t'itsec_hide_backend_js',\n\t\t\t\t'itsec_hide_backend',\n\t\t\t\tarray(\n\t\t\t\t\t'new_slug' => $slug_text,\n\t\t\t\t)\n\t\t\t);\n\n\t\t}\n\n\t}", "function _filter_do_shortcode_context()\n {\n }", "function mmc_dash_help_widget(){\n\t?>\n\t<iframe width=\"350\" height=\"250\" src=\"https://www.youtube.com/embed/x7R2HcTAyjI\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n\t<?php\n}", "public function run(){\n\t\tparent::run();\n\n\t\tadd_shortcode(\"wb_legal_name\", function(){\n\t\t\tob_start();\n\t\t\t$company = empty(\\Waboot\\functions\\get_option($this->name.'_company_name')) ? \"Company Name\" : \\Waboot\\functions\\get_option($this->name.'_company_name');\n\t\t\techo $company;\n\t\t\t$return_string = trim( preg_replace( \"|[\\r\\n\\t]|\", \"\", ob_get_clean() ) );\n\t\t\treturn $return_string;\n\t\t});\n\t\tadd_shortcode(\"wb_legal_address\", function(){\n\t\t\tob_start();\n\t\t\t$address = empty(\\Waboot\\functions\\get_option($this->name.'_address')) ? \"Company Address\" : \\Waboot\\functions\\get_option($this->name.'_address');\n\t\t\techo $address;\n\t\t\t$return_string = trim( preg_replace( \"|[\\r\\n\\t]|\", \"\", ob_get_clean() ) );\n\t\t\treturn $return_string;\n\t\t});\n\t\tadd_shortcode(\"wb_legal_mail\", function(){\n\t\t\tob_start();\n\t\t\t$mail = empty(\\Waboot\\functions\\get_option($this->name.'_mail')) ? \"Company Mail\" : \\Waboot\\functions\\get_option($this->name.'_mail');\n\t\t\techo $mail;\n\t\t\t$return_string = trim( preg_replace( \"|[\\r\\n\\t]|\", \"\", ob_get_clean() ) );\n\t\t\treturn $return_string;\n\t\t});\n\t\tadd_shortcode(\"wb_legal_tel\", function(){\n\t\t\tob_start();\n\t\t\t$tel = empty(\\Waboot\\functions\\get_option($this->name.'_tel')) ? \"Company Tel\" : \\Waboot\\functions\\get_option($this->name.'_tel');\n\t\t\techo $tel;\n\t\t\t$return_string = trim( preg_replace( \"|[\\r\\n\\t]|\", \"\", ob_get_clean() ) );\n\t\t\treturn $return_string;\n\t\t});\n\t\tadd_shortcode(\"wb_legal_siteurl\", function(){\n\t\t\tob_start();\n\t\t\t$siteurl = empty(\\Waboot\\functions\\get_option($this->name.'_siteurl')) ? preg_replace('/http:\\/\\//', '', get_home_url()) : \\Waboot\\functions\\get_option($this->name.'_siteurl');\n\t\t\techo $siteurl;\n\t\t\t$return_string = trim( preg_replace( \"|[\\r\\n\\t]|\", \"\", ob_get_clean() ) );\n\t\t\treturn $return_string;\n\t\t});\n\t\tadd_shortcode(\"wb_legal_rep\", function(){\n\t\t\tob_start();\n\t\t\t$siteurl = empty(\\Waboot\\functions\\get_option($this->name.'_rep')) ? \"Company Legal Representative\" : \\Waboot\\functions\\get_option($this->name.'_rep');\n\t\t\techo $siteurl;\n\t\t\t$return_string = trim( preg_replace( \"|[\\r\\n\\t]|\", \"\", ob_get_clean() ) );\n\t\t\treturn $return_string;\n\t\t});\n\t}", "function cpotheme_metadata_plugin()\n{\n $cpotheme_data = array();\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_title',\n 'std' => '',\n 'label' => 'Título del Producto',\n 'type' => 'text',\n 'desc' => 'Indica la etiqueta de título (H1) del tema.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_demo_url',\n 'std' => '',\n 'label' => 'URL de la Demo',\n 'type' => 'text',\n 'desc' => 'Especifica la URL de la demo del tema.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_url',\n 'std' => '',\n 'label' => 'External URL',\n 'type' => 'text',\n 'desc' => 'Especifica la URL del tema si es un archivo externo.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_product',\n 'std' => '',\n 'label' => 'ID de Producto',\n 'type' => 'select',\n 'option' => cpotheme_metadata_productlist_optional(),\n 'desc' => 'Indica la ID del producto para enlazarlo.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_changelog',\n 'std' => '',\n 'label' => 'Changelog',\n 'type' => 'textarea',\n 'desc' => 'Muestra el registro de cambios de la descarga.'\n );\n\n return $cpotheme_data;\n}", "function show_dhz_plugins_list_meta_box() {\n\n\t\t$plugins = apply_filters('_dhz_plugins_list', array());\n\t\t?>\n\t\t\t<p style=\"margin-bottom: 10px; font-weight:500\"><?php _e(\"Thank you for using my plugins!\", \"acf-collapse-fields\") ?></p>\n\t\t\t<ul style=\"margin-top: 0; margin-left: 5px;\">\n\t\t\t\t<?php \n\t\t\t\t\tforeach ($plugins as $plugin) {\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<li style=\"list-style-type: disc; list-style-position:inside; text-indent:-13px; margin-left:13px\">\n\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\techo $plugin['title'].\"<br/>\";\n\t\t\t\t\t\t\t\t\tif ($plugin['doc']) {\n\t\t\t\t\t\t\t\t\t\t?> <a style=\"font-size:12px\" href=\"<?php echo $plugin['doc']; ?>\" target=\"_blank\"><?php _e(\"Documentation\", \"acf-collapse-fields\") ?></a><?php \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<?php \n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</ul>\n\t\t\t<div style=\"margin-left:-12px; margin-right:-12px; margin-bottom: -12px; background: #2a9bd9; padding:14px 12px\">\n\t\t\t\t<p style=\"margin:0; text-align:center\"><a style=\"color: #fff;\" href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=XMLKD8H84HXB4&lc=US&item_name=Donation%20for%20WordPress%20Plugins&no_note=0&cn=Add%20a%20message%3a&no_shipping=1&currency_code=EUR\" target=\"_blank\"><?php _e(\"Please consider making a small donation!\", \"acf-collapse-fields\") ?></a></p>\n\t\t\t</div>\n\t\t<?php\n\t}", "function xt_admin_notice_installing() {\n ?>\n\n <div class=\"error fade\">\n <p><?php\n printf('<strong>需要到新淘客WordPress插件平台激活初始化您的网站</strong>. <br>\n\t <ul>\n\t <li>1.注册并登录<a href=\"%1s\" target=\"_blank\">新淘客WordPress插件平台</a>(已注册的会员可直接登录),添加网站</li>\n\t <li>2.验证并添加该网站(<a href=\"' . admin_url('admin.php?page=xt_menu_sys&xt-action=tool') . '\">填写验证代码</a>)</li>', XT_API_URL)\n ?></p>\n </div>\n\n <?php\n}", "function SimplonShortcode() {\n\treturn '<p>La publication de cet article est possible grace à mon super partenaire \n<a href=\"http//simplon.co\">simplon.co</a>\n - une entreprise de \nl\\'économie sociale et solidaire et un\nréseau de \"fabriques\" (écoles) qui propose \ndes\nformations\nGRATUITES\npour devenir développeur web. </p>';\n}", "function handleShortcode($atts = [], $content = null, $tag = '') {\n\n if (is_admin()){\n return;\n }\n \n $vueRootUrl = plugin_dir_url( __FILE__ ) . 'dist';\n $vueFileRoot = plugin_dir_path( __FILE__) . 'dist';\n\n $jsCore = ['bootstrap.min.js', 'jquery-3.3.1.min.js', 'popper.min.js'];\n\n // Find the build files\n $jsMatches = glob(plugin_dir_path( __FILE__) . 'dist/js/*.*.js');\n $cssMatches = glob(plugin_dir_path( __FILE__) . 'dist/css/*.*.css');\n\n // Bring in core dependencies first\n\n $isLocal = true;\n\n if ($isLocal){\n\n //wp_deregister_script('jquery');\n\n //wp_register_script('actiontracker_vuecore_jquery', $vueRootUrl . '/js/jquery-3.3.1.min.js', false, null, true);\n\n wp_register_script('actiontracker_vuecore_popper', $vueRootUrl . '/js/popper.min.js', false, null, true);\n wp_register_script('actiontracker_vuecore_bootstrap4', $vueRootUrl . '/js/bootstrap.min.js', false, null, true);\n \n foreach ($jsMatches as $i => $jsItem) {\n if (!in_array(basename($jsItem), $jsCore)){\n $url = $vueRootUrl . '/js/' . basename($jsItem);\n $name = \"actiontracker_vuejs_\".$i;\n if (!wp_script_is($name, 'enqueued')){\n //print_r('BUILD JS: ' . $jsItem . '<br/>');\n wp_register_script($name, $url);\n wp_enqueue_script($name); \n }\n }\n }\n \n foreach ($cssMatches as $i => $cssItem) { \n $url = $vueRootUrl . '/css/' . basename($cssItem);\n $name = \"actiontracker_vuecss_\".$i;\n if (!wp_script_is($name, 'enqueued')){\n //print_r('CSS JS: ' . $i . '<br/>');\n wp_register_style($name, $url);\n wp_enqueue_style($name); \n }\n \n }\n\n }\n else {\n\n wp_register_script('actiontracker_vuecore_popper', 'http://app.actiontracker.org/js/popper.min.js', false, null, true);\n wp_register_script('actiontracker_vuecore_bootstrap4', 'http://app.actiontracker.org/js/bootstrap.min.js', false, null, true);\n \n //wp_enqueue_script('actiontracker_vuecore_jquery');\n wp_enqueue_script('actiontracker_vuecore_popper');\n wp_enqueue_script('actiontracker_vuecore_bootstrap4');\n \n }\n\n\n \n \n\n /*\n\n */\n \n // Handle short code params\n\n if (array_key_exists('view', $atts)) {\n $str = \"<div class='actionTrackerVuePlugin' view='\".$atts['view'].\"'>You need Javascript for this feature, sorry.</div>\"; \n }\n else {\n $str = \"<div class='actionTrackerVuePlugin' view='all'>You need Javascript for this feature, sorry.</div>\"; \n }\n\n return $str;\n }", "function activate_sitewide_plugin()\n {\n }", "public function pointer_js() {\n\t\tif(!is_network_admin()) {\n\t\t\t$dismissed = explode(',', get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ));\n\t\t\tif(array_search('cptp_pointer0871', $dismissed) === false){\n\t\t\t\t$content = __(\"<h3>Custom Post Type Permalinks</h3><p>From <a href='options-permalink.php'>Permalinks</a>, set a custom permalink for each post type.</p>\", \"cptp\");\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\tjQuery(function($) {\n\n\t\t\t\t\t$(\"#menu-settings .wp-has-submenu\").pointer({\n\t\t\t\t\t\tcontent: \"<?php echo $content;?>\",\n\t\t\t\t\t\tposition: {\"edge\":\"left\",\"align\":\"center\"},\n\t\t\t\t\t\tclose: function() {\n\t\t\t\t\t\t\t$.post('admin-ajax.php', {\n\t\t\t\t\t\t\t\taction:'dismiss-wp-pointer',\n\t\t\t\t\t\t\t\tpointer: 'cptp_pointer0871'\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}).pointer(\"open\");\n\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t<?php\n\t\t\t}\n\t\t}\n\t}", "public function display($data) {\n\t\t\tglobal $cfct_build;\t\t\t\n\t\t\n\t\t\t$cfct_build->loaded_modules[$this->basename] = $this->pluginPath;\n\t\t\t$cfct_build->module_paths[$this->basename] = $this->pluginPath;\n\t\t\t$cfct_build->module_urls[$this->basename] = $this->pluginUrl;\n\n\t\t\t$text = do_shortcode($data[$this->get_field_id('content')]);\n\t\t\treturn $this->load_view($data, compact('text'));\t\t\t\n\t\t}", "function _wppa_page_help() {\r\nglobal $wppa_revno;\r\n\r\n\r\n?>\r\n\t<div class=\"wrap\">\r\n<?php \r\n\t\t$iconurl = \"http://www.gravatar.com/avatar/b421f77aa39db35a5c1787240c77634f?s=32&amp;d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&amp;r=G\";\r\n?>\t\t\r\n\t\t<div id=\"icon-album\" class=\"icon32\" style=\"background: transparent url(<?php echo($iconurl); ?>) no-repeat\">\r\n\t\t\t<br />\r\n\t\t</div>\r\n\t\t<h2><?php _e('Help and Information', 'wppa'); ?></h2>\r\n\t\t\r\n\t\t<h3><?php _e('Plugin Description', 'wppa'); ?></h3>\r\n <p><?php _e('This plugin is designed to easily manage and display your photo albums within your WordPress site.', 'wppa'); ?></p>\r\n\t\t\t<?php _e('Features:', 'wppa'); ?><br /><br />\r\n\t\t\t<ul class=\"wppa-help-ul\">\r\n\t\t\t\t<li><?php _e('You can create various albums that contain photos as well as sub albums at the same time.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('There is no limitation to the number of albums and photos.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('There is no limitation to the nesting depth of sub-albums.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('You have full control over the display sizes of the photos.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('You can specify the way the albums are ordered.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('You can specify the way the photos are ordered within the albums, both on a system-wide as well as an per album basis.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('The visitor of your site can run a slideshow from the photos in an album by a single mouseclick.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('The visitor can see an overview of thumbnail images of the photos in album.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('The visitor can browse through the photos in each album you decide to publish.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('You can add a Sidebar Widget that displays a photo which can be changed every hour, day or week.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('You can add a Sidebar Search Widget that enables the visitor to search for albums and photos with certan words in the name or description.', 'wppa'); ?></li>\r\n\t\t\t</ul>\r\n\t\t\r\n\t\t<h3><?php _e('Plugin Admin Features', 'wppa'); ?></h3>\r\n\t\t<p><?php _e('You can find the plugin admin section under Menu Photo Albums on the admin screen.', 'wppa'); ?></p>\r\n\t\t\t<?php _e('The following submenus exist.', 'wppa'); ?><br /><br />\r\n\t\t\t<ul class=\"wppa-help-ul\">\r\n\t\t\t\t<li><?php _e('Photo Albums: Create and manage Albums.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('Upload photos: To upload photos to an album you created.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('Import photos: To bulk import photos that have been uploaded by an ftp program.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('Settings: To control the various settings to customize your needs.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('Sidebar Widget: To specify the behaviour for an optional sidebar widget.', 'wppa'); ?></li>\r\n\t\t\t\t<li><?php _e('Help & Info: The screen you are watching now.', 'wppa'); ?></li>\r\n\t\t\t</ul>\r\n\r\n\t\t<h3><?php _e('Installation', 'wppa'); ?></h3>\r\n\t\t<ul>\r\n\t\t\t<li><?php _e('You can install the plugin via the standard WP plugins admin page.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('If you want to do it manually, follow the next steps:', 'wppa'); ?></li>\r\n\t\t</ul>\r\n <ol class=\"wppa-help-ol\">\r\n\t\t\t<li><?php _e('Unzip and upload the wppa plugin folder to', 'wppa'); ?> <tt>wp-content/plugins/</tt></li>\r\n\t\t\t<li><?php _e('Make sure that the folder', 'wppa'); ?> <tt>wp-content/uploads/</tt> <?php _e('exists and is writable by the server (CHMOD 755)', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Activate the plugin in WP Admin -> Plugins.', 'wppa'); ?></li>\r\n\t\t</ol>\r\n\r\n <h3><?php _e('Upgrading WP Photo Album Plus', 'wppa'); ?></h3>\r\n <p><?php _e('When upgrading WP Photo Album Plus be aware of:', 'wppa'); ?></p>\r\n <ul class=\"wppa-help-ul\">\r\n\t\t\t<li><?php _e('The revision number consists of 3 parts, Major, minor and fix revision. The current version is:', 'wppa'); echo(' '.$wppa_revno); ?><br /></li>\r\n\t\t\t<li><?php _e('When an update implies a major or minor version change and you have copied wppa_theme.php or wppa_style.css to your themes directory, you will have to remove them and make new copies and/or alterations if that should still be needed.', 'wppa'); ?><br />\r\n\t\t\t\t<?php _e('You will get a one-time reminder after upgrading, the first time you open a wppa admin page.', 'wppa'); ?></li>\r\n\t\t</ul>\r\n \r\n\t\t<h3><?php _e('How to start', 'wppa'); ?></h3>\r\n <ol class=\"wppa-help-ol\">\r\n\t\t\t<li><?php _e('Install WP Photo ALbum Plus as described above under \"Installation\".', 'wppa'); ?></li>\r\n <li><?php _e('Create at least two albums in the \"Photo Albums\" tab. Just enter the name and a brief description and press \"Create Album\". Leave \"Parent\" at \"--- none ---\".', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('In the uploads tab, you can now upload you photots. Upload at least 2 photos to each album. Make sure the photos you are uploading are of reasonable size (say up to 1024x768 pixels). Do not upload the full 7MP images!', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Create a new WP Page, name it something like \"Photo Gallery\" and put in the content:', 'wppa'); ?> <tt>%%wppa%%</tt></li>\r\n\t\t\t<li><?php _e('Publish the page, and view the page from your WP site.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Now, go playing with the settings in the \"Settings\" panel, discover all the configurable options and watch what is happening when you re-open the \"Photo Gallery\" page.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('If you want a \"Photo of the week\" sidebar widget you can use an album for that purpose. See all the options in the \"Sidebar Widget\" submenu.', 'wppa'); ?></li>\r\n </ol>\r\n\r\n\t\t<h3><?php _e('Creating a Photo Album Page or a Post with photos - Advanced', 'wppa'); ?></h3>\r\n\t\t<p>\r\n\t\t\t<?php _e('Create a page like you normally would in WordPress, using the \"Default Template\". In my example, give it the page title of \"Photo Gallery\". In the Page Content section add the following code:', 'wppa'); ?><br />\r\n\t\t\t<tt>%%wppa%%</tt><br />\r\n\t\t\t<?php _e('This will result in a gallery of all Albums that have their parent set to \"--- none ---\".', 'wppa'); ?><br /><br />\r\n\t\t\t<?php _e('If you want to display a single album - say album number 19 - in a WP page or WP post (they act exactly the same), add a second line like this:', 'wppa'); ?><br />\r\n\t\t\t<tt>%%album=19%%</tt><br />\r\n\t\t\t<?php _e('This will result in the display of the <b>contents</b> of album nr 19.', 'wppa'); ?><br /><br />\r\n\t\t\t<?php _e('If you want to display the <b>cover</b> of the album, i.e. like one of the albums in the \"Photo Gallery\" as used above, add (instead of \"%%album=...\") a second line like this:', 'wppa'); ?><br />\r\n\t\t\t<tt>%%cover=19%%</tt><br /><br />\r\n\t\t\t<?php _e('If you want to display the <b>slideshow</b> directly, use:', 'wppa'); ?><br />\r\n\t\t\t<tt>%%slide=19%%</tt><br /><br />\r\n\t\t\t<?php _e('You can add a third line if you want the photos to be displayed at a different size than normal. You can \"overrule\" the \"Full size\" setting by adding the line (for e.g. 300px):', 'wppa'); ?><br />\r\n\t\t\t<tt>%%size=300%%</tt><br /><br />\r\n\t\t\t<?php _e('Note: all information between the %% tags including newlines will be lost.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('The sequence above may be used more than once in a single page or post.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('The text before the first sequence, the text between 2 sequences, as well as the text after the last sequence will be preserved.', 'wppa'); ?><br />\r\n\t\t\t<br/ ><br />\r\n\t\t\t<?php _e('You can also create a custom page template by dropping the following code into a page template:', 'wppa'); ?><br />\r\n\t\t\t<tt>&lt;?php wppa_albums(); ?&gt;</tt><br /><br />\r\n\t\t\t<?php _e('If you want to display the <b>contents</b> of a single album in the template - say album number 19 - the code would be:', 'wppa'); ?><br />\r\n\t\t\t<tt>&lt;?php wppa_albums(19); ?&gt;</tt> or <tt>&lt;?php wppa_albums(19, 'album'); ?&gt;</tt><br />\r\n\t\t\t<?php _e('If you want the <b>cover</b> to be displayed instead, use the following code:', 'wppa'); ?><br />\r\n\t\t\t<tt>&lt;?php wppa_albums(19, 'cover'); ?&gt;</tt><br />\r\n\t\t\t<?php _e('And to display the <b>slideshow</b> it would be:', 'wppa'); ?><br />\r\n\t\t\t<tt>&lt;?php wppa_albums(19, 'slide'); ?&gt;</tt><br /><br />\r\n\t\t\t<?php _e('If you want to specify a size, add another argument:', 'wppa'); ?><br />\r\n\t\t\t<tt>&lt;?php wppa_albums(19, 'album', 300); ?&gt;</tt><br /><br />\r\n\t\t\t<?php _e('For more information on usable php routines see the <a href=\"http://wppa.opajaap.nl/\">Docs & Demos</a> website.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('In order to work properly, the wppa_albums() tag needs to be within the <a href=\"http://codex.wordpress.org/The_Loop\" target=\"_blank\">WordPress loop</a>.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('For more information on creating custom page templates, click', 'wppa'); ?> <a href=\"http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates\"><?php _e('here', 'wppa'); ?></a>.<br />\r\n\t\t</p>\r\n\t\t\r\n\t\t<h3><?php _e('Adjusting CSS and Template Styling', 'wppa'); ?></h3>\r\n\t\t<p>\r\n\t\t\t<?php _e('WP Photo Album Plus comes with a default layout and theme.', 'wppa'); ?>\r\n\t\t\t<?php _e('To change the style and layout of the photo album, copy <tt>.../wp-content/plugins/wp-photo-album-plus/theme/wppa_theme.php</tt> and <tt>.../wp-content/plugins/wp-photo-album-plus/theme/wppa_style.css</tt> to your active theme\\'s folder, and edit them.', 'wppa'); ?>\r\n\t\t</p>\r\n\t\t\r\n\t\t<h3><?php _e('Facts to remember', 'wppa'); ?></h3>\r\n\t\t<ul class=\"wppa-help-ul\">\r\n\t\t\t<li><?php _e('If the number of photos in an album is less than or equal to the treshold value, they will not display in the album. They will be used for the cover only.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('An album that has it\\'s parent set to \"--- separate ---\" will not be displayed in the \"generic\" gallery. This enables you to have albums for use solely for single posts or pages.', 'wppa'); ?>\r\n\t\t\t<li><?php _e('Specifying <tt>%%album=...</tt> causes the <b>content</b> of the album to be displayed.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Specifying <tt>%%cover=...</tt> causes the <b>cover</b> of the album to be displayed.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Specifying <tt>%%slide=...</tt> causes the <b>slideshow</b> of the album to be displayed.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Keep the sequence intact: 1. <tt>%%wppa%%</tt>, 2. <tt>%%album=</tt> or <tt>%%cover=</tt> or <tt>%%slide=</tt>, 3. <tt>%%size=</tt>. (2. being optional even when using 3.).', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('Use the default page template, or create one yourself.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('You can remove the plugin and re-install the latest version always. This will not affect your photos or albums.', 'wppa'); ?></li>\r\n\t\t\t<li><?php _e('You may combine %% items on one line like: <tt>%%wppa%% %%cover=13%% %%size=250%%</tt>', 'wppa'); ?></li>\r\n\t\t\t</ul>\r\n\t\r\n\t\t<h3><?php _e('Plugin Support And Feature Request', 'wppa'); ?></h3>\r\n\t\t<p>\r\n\t\t\t<?php _e('If you\\'ve read over this readme carefully and are still having issues, if you\\'ve discovered a bug,', 'wppa'); ?>\r\n\t\t\t<?php _e('or have a feature request, please check the <a href=\"http://wordpress.org/tags/wp-photo-album-plus\">forum</a> for this plugin and/or leave a question there.', 'wppa'); ?>\r\n\t\t\t<br />\r\n\t\t\t<?php _e('For hot fixes check the <a href=\"http://plugins.trac.wordpress.org/log/wp-photo-album-plus/\">development log</a> for this plugin.', 'wppa'); ?>\r\n\t\t\t<br />\r\n\t\t\t<?php _e('You may also visit the <a href=\"http://wppa.opajaap.nl/\" target=\"_blank\">WPPA+ Docs & Demos site</a> that also contains the <a href=\"http://wppa.opajaap.nl/?page_id=39\" target=\"_blank\">WPPA+ Tutorial</a>.', 'wppa'); ?>\r\n\t\t</p>\r\n <p>\r\n\t\t\t<?php _e('If you love this plugin, I would appreciate a donation, either in <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=USD&lc=US\">USD</a> or in <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source&currency_code=EUR&lc=US\">EURO</a>.', 'wppa'); ?>\r\n\t\t</p>\r\n\r\n\t\t<h3><?php _e('About and credits', 'wppa'); ?></h3>\r\n\t\t<p>\r\n\t\t\t<?php _e('WP Photo Album Plus is extended with many new features and is maintained by J.N. Breetvelt, a.k.a. (<a href=\"http://www.opajaap.nl/\">OpaJaap</a>)', 'wppa'); ?><br />\r\n\t\t\t<?php _e('Thanx to R.J. Kaplan for WP Photo Album 1.5.1.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('Thanx to E.S. Rosenberg for programming tips on security issues.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('Thanx to Pavel &#352;orejs for the Numbar code.', 'wppa'); ?><br />\r\n\t\t\t<?php _e('Thanx to the users who reported bugs and asked for enhancements. Without them WPPA should not have been what it is now!', 'wppa'); ?>\r\n\t\t</p>\r\n\t\t\r\n\t\t<h3><?php _e('Licence', 'wppa'); ?></h3>\r\n\t\t<p>\r\n\t\t\t<?php _e('WP Photo Album is released under the', 'wppa'); ?> <a href=\"http://www.gnu.org/copyleft/gpl.html\">GNU GPL</a> <?php _e('licence.', 'wppa'); ?>\r\n\t\t</p>\r\n\t\t\r\n\t</div>\r\n<?php\r\n}", "function wpestate_register_shortcodes() {\n<<<<<<< HEAD\n add_shortcode('slider_recent_items', 'wpestate_slider_recent_posts_pictures');\n \n add_shortcode('spacer', 'wpestate_spacer_shortcode_function');\n add_shortcode('recent-posts', 'wpestate_recent_posts_function');\n add_shortcode('testimonial', 'wpestate_testimonial_function');\n add_shortcode('recent_items', 'wpestate_recent_posts_pictures');\n=======\n add_shortcode('contact_us_form', 'wpestate_contact_us_form'); \n add_shortcode('slider_recent_items', 'wpestate_slider_recent_posts_pictures'); \n add_shortcode('spacer', 'wpestate_spacer_shortcode_function');\n add_shortcode('recent-posts', 'wpestate_recent_posts_function');\n add_shortcode('testimonial', 'wpestate_testimonial_function');\n add_shortcode('testimonial_slider', 'wpestate_testimonial_slider_function');\n add_shortcode('recent_items', 'wpestate_recent_posts_pictures_new');\n>>>>>>> 64662fd89bea560852792d7203888072d7452d48\n add_shortcode('featured_agent', 'wpestate_featured_agent');\n add_shortcode('featured_article', 'wpestate_featured_article');\n add_shortcode('featured_property', 'wpestate_featured_property');\n add_shortcode('login_form', 'wpestate_login_form_function');\n add_shortcode('register_form', 'wpestate_register_form_function');\n add_shortcode('list_items_by_id', 'wpestate_list_items_by_id_function');\n add_shortcode('advanced_search', 'wpestate_advanced_search_function');\n add_shortcode('font_awesome', 'wpestate_font_awesome_function');\n add_shortcode('icon_container', 'wpestate_icon_container_function');\n<<<<<<< HEAD\n=======\n add_shortcode('list_agents','wpestate_list_agents_function');\n add_shortcode('places_list', 'wpestate_places_list_function');\n add_shortcode('listings_per_agent', 'wplistingsperagent_shortcode_function' );\n add_shortcode('property_page_map', 'wpestate_property_page_map_function' );\n add_shortcode('test_sh', 'wpestate_test_sh' );\n \n add_shortcode('estate_property_page_tab', 'wpestate_property_page_design_tab' );\n add_shortcode('estate_property_page_acc', 'wpestate_property_page_design_acc' );\n add_shortcode('estate_property_simple_detail','wpestate_estate_property_simple_detail');\n add_shortcode('estate_property_details_section','wpestate_estate_property_details_section');\n add_shortcode('estate_property_slider_section','wpestate_estate_property_slider_section');\n add_shortcode('estate_property_design_agent','wpestate_estate_property_design_agent');\n add_shortcode('estate_property_design_agent_contact','wpestate_estate_property_design_agent_contact');\n add_shortcode('estate_property_design_related_listings','wpestate_estate_property_design_related_listings');\n add_shortcode('estate_property_design_intext_details','wpestate_estate_property_design_intext_details');\n add_shortcode('estate_property_design_gallery','wpestate_estate_property_design_gallery');\n add_shortcode('estate_property_design_agent_details_intext_details','wpestate_estate_property_design_agent_details_intext_details');\n add_shortcode('estate_membership_packages','wpestate_membership_packages_function');\n add_shortcode('estate_featured_user_role','wpestate_featured_user_role_shortcode');\n\t\n\t// slick new shortcode\n\tadd_shortcode('places_slider','wpestate_places_slider');\n>>>>>>> 64662fd89bea560852792d7203888072d7452d48\n}", "function register_block_core_shortcode()\n {\n }", "function jpst_create_menu() {\nadd_menu_page('Twitter Widget with Cache', 'Twitter Widget','administrator', __FILE__, 'jpst_settings_page',plugins_url('/twitterbrd.png', __FILE__));\n\n//call register settings function \nadd_action( 'admin_init', 'jpst_register_settings' );\n\n}", "function base_admin_footer_bloom() {\n\t?>\n\t<span id=\"footer-thankyou\">\n\t\t<?php esc_html_e( 'Theme Development by', 'base' ); ?>\n\t\t<a href=\"https://bloomcu.com\"><?php esc_html_e( 'BloomCU', 'base' ); ?></a>.\n\t</span>\n\t<?php\n}" ]
[ "0.6938222", "0.6804665", "0.63952774", "0.632179", "0.62150407", "0.6105631", "0.60898495", "0.6051905", "0.6025761", "0.60142976", "0.60129946", "0.6012383", "0.5975537", "0.59635425", "0.5949158", "0.59021235", "0.588097", "0.58691406", "0.58316725", "0.5830765", "0.58189875", "0.58179396", "0.5812246", "0.5792117", "0.5788183", "0.57878965", "0.57759076", "0.57680357", "0.5764427", "0.57639927", "0.5762307", "0.5761274", "0.57548016", "0.57538724", "0.57506233", "0.57484317", "0.5745285", "0.57356477", "0.57156867", "0.5710828", "0.57085156", "0.5705764", "0.5704311", "0.57004946", "0.5693299", "0.56880826", "0.5688025", "0.5683873", "0.5672474", "0.56709176", "0.56638753", "0.5663793", "0.56628007", "0.56592345", "0.564424", "0.5642297", "0.5641208", "0.5635163", "0.56349516", "0.5632704", "0.5628799", "0.5626232", "0.56222886", "0.5620211", "0.5615164", "0.5610187", "0.5602709", "0.5600338", "0.5599986", "0.5597473", "0.5594635", "0.55944264", "0.55743474", "0.5573015", "0.5568125", "0.5564445", "0.5558821", "0.5553678", "0.55506486", "0.55501336", "0.5547239", "0.55463785", "0.5545778", "0.5542369", "0.55410993", "0.5536213", "0.5533693", "0.5529127", "0.5527952", "0.55197597", "0.5518182", "0.5517609", "0.55131453", "0.5507701", "0.5506022", "0.5503716", "0.5498954", "0.54950166", "0.5494553", "0.54930353", "0.5491584" ]
0.0
-1
Compile config information Lists developer config variables
protected function _compile_config() { $output = "\n\n"; $output .= '<fieldset id="ci_profiler_config" style="border:1px solid #000;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">'; $output .= "\n"; $output .= '<legend style="color:#000;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_config').'&nbsp;&nbsp;(<span style="cursor: pointer;" onclick="var s=document.getElementById(\'ci_profiler_config_table\').style;s.display=s.display==\'none\'?\'\':\'none\';this.innerHTML=this.innerHTML==\''.$this->CI->lang->line('profiler_section_show').'\'?\''.$this->CI->lang->line('profiler_section_hide').'\':\''.$this->CI->lang->line('profiler_section_show').'\';">'.$this->CI->lang->line('profiler_section_show').'</span>)</legend>'; $output .= "\n"; $output .= "\n\n<table style='width:100%; display:none' id='ci_profiler_config_table'>\n"; foreach ($this->CI->config->config as $config=>$val) { if (is_array($val)||is_object($val)) { $val = print_r($val, TRUE); } $output .= "<tr><td style='padding:5px; vertical-align: top;color:#900;background-color:#ddd;'>".$config."&nbsp;&nbsp;</td><td style='padding:5px; color:#000;background-color:#ddd;'>".htmlspecialchars($val)."</td></tr>\n"; } $output .= "</table>\n"; $output .= "</fieldset>"; return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testconfig_vars()\n\t{\n\t\t$vars = array ('sys_name',\n\t\t\t 'sys_user_reg_restricted',\n\t\t\t 'sys_require_accept_conditions',\n\t\t\t 'sys_project_reg_restricted',\n\t\t\t 'sys_use_private_project',\n\t\t\t 'sys_default_domain',\n\t\t\t 'sys_scm_tarballs_path',\n\t\t\t 'sys_scm_snapshots_path',\n\t\t\t 'sys_theme',\n\t\t\t 'sys_lang',\n\t\t\t 'sys_default_timezone',\n\t\t\t 'sys_default_country_code',\n\t\t\t 'sys_use_scm',\n\t\t\t 'sys_use_tracker',\n\t\t\t 'sys_use_forum',\n\t\t\t 'sys_use_pm',\n\t\t\t 'sys_use_docman',\n\t\t\t 'sys_use_diary',\n\t\t\t 'sys_use_news',\n\t\t\t 'sys_use_mail',\n\t\t\t 'sys_use_survey',\n\t\t\t 'sys_use_frs',\n\t\t\t 'sys_use_project_tags',\n\t\t\t 'sys_use_project_full_list',\n\t\t\t 'sys_use_fti',\n\t\t\t 'sys_use_ftp',\n\t\t\t 'sys_use_trove',\n\t\t\t 'sys_use_snippet',\n\t\t\t 'sys_use_ssl',\n\t\t\t 'sys_use_people',\n\t\t\t 'sys_use_shell',\n\t\t\t 'sys_use_ratings',\n\t\t\t 'sys_use_ftpuploads',\n\t\t\t 'sys_use_manual_uploads',\n\t\t\t 'sys_use_gateways',\n\t\t\t 'sys_use_project_vhost',\n\t\t\t 'sys_use_project_database',\n\t\t\t 'sys_use_project_multimedia',\n\t\t\t 'sys_download_host',\n\t\t\t 'sys_shell_host',\n\t\t\t 'sys_users_host',\n\t\t\t 'sys_lists_host',\n\t\t\t 'sys_scm_host',\n\t\t\t 'sys_forum_return_domain',\n\t\t\t 'sys_chroot',\n\t\t\t 'sys_upload_dir',\n\t\t\t 'sys_ftp_upload_dir',\n\t\t\t 'sys_ftp_upload_host',\n\t\t\t 'sys_apache_user',\n\t\t\t 'sys_apache_group',\n\t\t\t 'sys_require_unique_email',\n\t\t\t 'sys_bcc_all_email_address',\n\t\t\t 'sys_themeroot',\n\t\t\t 'sys_force_login',\n\t\t\t 'sys_custom_path',\n\t\t\t 'sys_plugins_path',\n\t\t\t 'sys_use_jabber',\n\t\t\t 'sys_jabber_user',\n\t\t\t 'sys_jabber_server',\n\t\t\t 'sys_jabber_port',\n\t\t\t 'sys_jabber_pass',\n\t\t\t 'sys_ldap_host',\n\t\t\t 'sys_ldap_port',\n\t\t\t 'sys_ldap_version',\n\t\t\t 'sys_ldap_base_dn',\n\t\t\t 'sys_ldap_bind_dn',\n\t\t\t 'sys_ldap_admin_dn',\n\t\t\t 'sys_ldap_passwd',\n\t\t\t 'sys_news_group',\n\t\t\t 'sys_stats_group',\n\t\t\t 'sys_peer_rating_group',\n\t\t\t 'sys_template_group',\n\t\t\t 'sys_sendmail_path',\n\t\t\t 'sys_path_to_mailman',\n\t\t\t 'sys_path_to_jpgraph',\n\t\t\t 'sys_account_manager_type',\n\t\t\t 'unix_cipher',\n\t\t\t 'homedir_prefix',\n\t\t\t 'groupdir_prefix',\n\t\t\t 'sys_urlroot',\n\t\t\t 'sys_urlprefix',\n\t\t\t 'sys_images_url',\n\t\t\t 'sys_images_secure_url',\n\t\t\t 'sys_admin_email',\n\t\t\t 'sys_session_key',\n\t\t\t 'sys_session_expire',\n\t\t\t 'sys_show_source',\n\t\t\t 'default_trove_cat',\n\t\t\t 'sys_dbhost',\n\t\t\t 'sys_dbport',\n\t\t\t 'sys_dbname',\n\t\t\t 'sys_dbuser',\n\t\t\t 'sys_dbpasswd',\n\t\t\t 'sys_share_path',\n\t\t\t 'sys_var_path',\n\t\t\t 'sys_etc_path',\n\t\t\t) ;\n\n\t\t$pattern = implode ('|', $vars) ;\n\t\t\n\t\t$root = dirname(dirname(dirname(dirname(__FILE__))));\n\t\t$output = `cd $root ; find src tests -name '*.php' -type f | xargs pcregrep -n '\\\\$($pattern)\\b(?! *=[^=])' \\\n\t\t\t\t\t | grep -v ^src/common/include/config-vars.php`;\n\t\t$this->assertEquals('', $output, \"Found deprecated \\$var for var in ($pattern):\");\n\n\t\t$output = `cd $root ; find src tests -name '*.php' -type f | xargs pcregrep -n '\\\\\\$GLOBALS\\\\[.?($pattern).?\\\\](?! *=[^=])' \\\n\t\t\t\t\t | grep -v ^src/common/include/config-vars.php`;\n\t\t$this->assertEquals('', $output, \"Found deprecated \\$GLOBALS['\\$var'] for var in ($pattern):\");\n\t}", "protected function declareConfig(){\n\n $output = '';\n \n foreach( $this->getConfig() as $key => $value ){\n \n $output .= $key . '=' . json_encode( $value ) . ';';\n \n }\n \n return $output;\n\n }", "function getConfiguration() ;", "public function config_vars()\n\t{\n\t\tglobal $txt;\n\n\t\t$return_data = array();\n\n\t\t$core_features = $this->settings();\n\n\t\t// Convert this to a format that admin search will understand\n\t\tforeach ($core_features as $id => $data)\n\t\t{\n\t\t\t$return_data[] = array('switch', $data['title'] ?? $txt['core_settings_item_' . $id]);\n\t\t}\n\n\t\treturn $return_data;\n\t}", "function getInfo()\n {\n return array(\n 'releasetypes' => array('php', 'extsrc', 'extbin', 'bundle'),\n 'installable' => true,\n 'locationconfig' => false,\n 'honorsbaseinstall' => true,\n 'unusualbaseinstall' => false,\n 'phpfile' => false,\n 'executable' => false,\n 'phpextension' => false,\n );\n }", "static function plInfo()\n {\n return array(\n \"plShortName\" => _(\"Argonaut Mirror settings\"),\n \"plDescription\" => _(\"Argonaut Mirror settings\").\" (\"._(\"Services\").\")\",\n \"plIcon\" => \"plugins/argonaut/images/iconMiniMirrorConfig.png\",\n\n \"plProvidedAcls\" => parent::generatePlProvidedAcls(self::getAttributesInfo())\n );\n }", "function getConfigurationValues() ;", "public function buildConfigText() {\n\t\t$this->setPrimaryDomain();\n\t\n\t\tob_start();\n\t\t$installation_path = $this->installation_path;\n\t\t$name = $this->sitename;\n\t\t$domains = array(\n\t\t\t$this->primary_domain\n\t\t);\n\t\t$redirrectdomains = array();\n\t\tinclude(SHARED_PATH . 'provisioning/httpd.tpl');\n\t\t$config_text = ob_get_clean ();\n\t\treturn $config_text;\n\t\t\n\t}", "public function infosConfig(){\n $get_configuration_infos = \\App\\Helpers\\ConfigurationHelper\\Configuration::get_configuration_infos(1);\n return $get_configuration_infos;\n }", "function compile_compile_config($variable, &$object)\r{\r\t$_result\t= \"\";\r\r\t// remove the beginning and ending #\r\t$variable = substr($variable, 1, -1);\r\r\t// get [foo] and .foo and (...) pieces\t\t\t\r\tpreg_match_all('!(?:^\\w+)|(?:' . $object->_var_bracket_regexp . ')|\\.\\$?\\w+|\\S+!', $variable, $_match);\r\t$variable = $_match[0];\r\t$var_name = array_shift($variable);\r\r\t$_result = \"\\$this->_confs['$var_name']\";\r\tforeach ($variable as $var)\r\t{\r\t\tif ($var{0} == '[')\r\t\t{\r\t\t\t$var = substr($var, 1, -1);\r\t\t\tif (is_numeric($var))\r\t\t\t{\r\t\t\t\t$_result .= \"[$var]\";\r\t\t\t}\r\t\t\telseif ($var{0} == '$')\r\t\t\t{\r\t\t\t\t$_result .= \"[\" . $object->_compile_variable($var) . \"]\";\r\t\t\t}\r\t\t\telseif ($var{0} == '#')\r\t\t\t{\r\t\t\t\t$_result .= \"[\" . $object->_compile_config($var) . \"]\";\r\t\t\t}\r\t\t\telse\r\t\t\t{\r\t\t\t\t$_result .= \"['$var']\";\r\t\t\t}\r\t }\r\t else if ($var{0} == '.')\r\t {\r \t\t\t\tif ($var{1} == '$')\r\t\t\t{\r \t\t\t\t$_result .= \"[\\$this->_TPL['\" . substr($var, 2) . \"']]\";\r\t\t\t}\r\t \t\telse\r\t\t\t{\r\t\t \t\t$_result .= \"['\" . substr($var, 1) . \"']\";\r\t\t\t}\r\t\t}\r\t\telse if (substr($var,0,2) == '->')\r\t\t{\r\t\t\tif(substr($var,2,2) == '__')\r\t\t\t{\r\t\t\t\t$object->trigger_error('call to internal object members is not allowed', E_USER_ERROR, __FILE__, __LINE__);\r\t\t\t}\r\t\t\telse if (substr($var, 2, 1) == '$')\r\t\t\t{\r\t\t\t\t$_output .= '->{(($var=$this->_TPL[\\''.substr($var,3).'\\']) && substr($var,0,2)!=\\'__\\') ? $_var : $this->trigger_error(\"cannot access property \\\\\"$var\\\\\"\")}';\r\t\t\t}\r\t\t}\r\t\telse\r\t\t{\r\t\t\t$object->trigger_error('#' . $var_name.implode('', $variable) . '# is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);\r\t\t}\r\t}\r\treturn $_result;\r}", "function processConfiguration() ;", "private function LoadConstants()\r\n\t{\r\n\t\t$data_config = $this->LoadData('application/data/appconfig.xml','config');\r\n\t\t\r\n\t\tif(!defined(\"NEW_LINE\"))\r\n\t\t\tdefine(\"NEW_LINE\",\"\\n\");\r\n\t\t\t\r\n\t\tforeach ($data_config AS $elem)\r\n\t\t{\r\n\t\t\tif(!defined(strtoupper('sitename')))\r\n\t\t\t\tdefine(strtoupper('sitename'),$elem->getElementsByTagName('sitename')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('tagline')))\r\n\t\t\t\tdefine(strtoupper('tagline'),$elem->getElementsByTagName('tagline')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('ownername')))\t\r\n\t\t\t\tdefine(strtoupper('ownername'),$elem->getElementsByTagName('ownername')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('owneremail')))\t\r\n\t\t\t\tdefine(strtoupper('owneremail'),$elem->getElementsByTagName('owneremail')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('appversion')))\r\n\t\t\t\tdefine(strtoupper('appversion'),$elem->getElementsByTagName('appversion')->item(0)->nodeValue);\r\n\t\t\t\r\n\t\t\t$path = $elem->getElementsByTagName('paths');\r\n\t\t\tif($path->length > 0)\r\n\t\t\t{\r\n\t\t\t\tforeach ($path AS $nested)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!defined(strtoupper('application')))\r\n\t\t\t\t\t\tdefine(strtoupper('application'),$nested->getElementsByTagName('application')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('controls')))\r\n\t\t\t\t\t\tdefine(strtoupper('controls'),$nested->getElementsByTagName('controls')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('data')))\r\n\t\t\t\t\t\tdefine(strtoupper('data'),$nested->getElementsByTagName('data')->item(0)->nodeValue);\r\n\r\n\t\t\t\t\tif(!defined(strtoupper('templates')))\r\n\t\t\t\t\t\tdefine(strtoupper('templates'),$nested->getElementsByTagName('templates')->item(0)->nodeValue);\r\n\r\n\t\t\t\t\tif(!defined(strtoupper('navigation')))\n\t\t\t\t\t\tdefine(strtoupper('navigation'),$nested->getElementsByTagName('navigation')->item(0)->nodeValue);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('navigationdata')))\n\t\t\t\t\t\tdefine(strtoupper('navigationdata'),$nested->getElementsByTagName('navigationdata')->item(0)->nodeValue);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('modules')))\r\n\t\t\t\t\t\tdefine(strtoupper('modules'),$nested->getElementsByTagName('modules')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('pages')))\r\n\t\t\t\t\t\tdefine(strtoupper('pages'),$nested->getElementsByTagName('pages')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('public')))\r\n\t\t\t\t\t\tdefine(strtoupper('public'),$nested->getElementsByTagName('public')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('logs')))\r\n\t\t\t\t\t\tdefine(strtoupper('logs'),$nested->getElementsByTagName('logs')->item(0)->nodeValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tunset($data_config);\r\n\t}", "public static function config();", "public function buildConfigurationSummary();", "protected function getEditableConfigNames() {\n return ['d8_demo.weather_config'];\n }", "private static function print_log_configs() {\n\t//--\n\tglobal $configs;\n\t//--\n\t$log = '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_head\"><font size=\"4\"><b>Application :: CONFIGURATION Log</b></font></div>';\n\t//-- vars\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\"><b>App CONFIG VARIABLES</b></div>';\n\t$arr = (array) $configs;\n\tksort($arr);\n\t$i=0;\n\t$j=0;\n\tforeach((array)$arr as $key => $val) {\n\t\t//--\n\t\t$i++;\n\t\t//--\n\t\t$log .= '<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">';\n\t\t$log .= '<tr valign=\"top\" title=\"#'.$i.'\"><td width=\"195\"><div class=\"smartframework_debugbar_inforow\">';\n\t\t$log .= '<b>'.Smart::escape_html((string)$key).'</b>';\n\t\t$log .= '</div></td><td><div class=\"smartframework_debugbar_inforow\">';\n\t\tif(is_array($val)) {\n\t\t\t$log .= '<table width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" border=\"0\" style=\"font-size:13px;\">';\n\t\t\t$j=0;\n\t\t\tforeach($val as $k => $v) {\n\t\t\t\t$j++;\n\t\t\t\tif($j % 2) {\n\t\t\t\t\t$color = '#FFFFFF';\n\t\t\t\t} else {\n\t\t\t\t\t$color = '#FAFAFA';\n\t\t\t\t} //end if else\n\t\t\t\t$log .= '<tr bgcolor=\"'.$color.'\" valign=\"top\" title=\"#'.$i.'.'.$j.'\"><td width=\"290\"><b>'.Smart::escape_html((string)$k).'</b></td><td>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(self::print_value_by_type($v))), true).'</td></tr>';\n\t\t\t} //end foreach\n\t\t\t$log .= '</table>';\n\t\t} else {\n\t\t\t$log .= '<pre>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html((string)$val), true).'</pre>';\n\t\t} //end if else\n\t\t$log .= '</div></td></tr>';\n\t\t$log .= '</table>';\n\t\t//--\n\t} //end while\n\t//-- constants\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\"><b>App SETTING CONSTANTS</b></div>';\n\t$arr = (array) get_defined_constants(true);\n\t$arr = (array) $arr['user'];\n\tksort($arr);\n\t$i=0;\n\t$j=0;\n\tforeach((array)$arr as $key => $val) {\n\t\t//--\n\t\t$i++;\n\t\t//--\n\t\tif(((string)$key == 'SMART_FRAMEWORK_CHMOD_DIRS') OR ((string)$key == 'SMART_FRAMEWORK_CHMOD_FILES')) {\n\t\t\tif(is_numeric($val)) {\n\t\t\t\t$val = (string) '0'.@decoct($val).' (octal)';\n\t\t\t} else {\n\t\t\t\t$val = (string) $val.' (!!! Warning, Invalid ... Must be OCTAL !!!)';\n\t\t\t} //end if\n\t\t} //end if\n\t\t//--\n\t\t$log .= '<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">';\n\t\t$log .= '<tr valign=\"top\" title=\"#'.$i.'\"><td width=\"375\"><div class=\"smartframework_debugbar_inforow\"><b>'.Smart::escape_html((string)$key).'</b></div></td><td><div class=\"smartframework_debugbar_inforow\">'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(self::print_value_by_type($val))), true).'</div></td></tr>';\n\t\t$log .= '</table>';\n\t\t//--\n\t} //end while\n\t//--\n\treturn $log;\n\t//--\n}", "public function ovpnDisplayConfig()\n {\n $readArr = unserialize(file_get_contents(\"./vpn/ovpn.array.config\"));\n foreach ($readArr as $key=>$value) {\n echo \"$key = $value<br />\\n\";\n }\n }", "function display()\n\t{\n\t\tJToolBarHelper::title(JText::_('JOOMLAPACK').':: <small><small>'.JText::_('CONFIGURATION').'</small></small>');\n\t\tJToolBarHelper::apply();\n\t\tJToolBarHelper::save();\n\t\tJToolBarHelper::cancel();\n\t\tJoomlapackHelperUtils::addLiveHelp('config');\n\t\t$document =& JFactory::getDocument();\n\t\t$document->addStyleSheet(JURI::base().'components/com_joomlapack/assets/css/joomlapack.css');\n\n\t\t// Load the util helper\n\t\t$this->loadHelper('utils');\n\n\t\t// Load the model\n\t\t$model =& $this->getModel();\n\n\t\t// Pass on the lists\n\t\t$this->assign('backuptypelist',\t\t\t\t$model->getBackupTypeList());\n\t\t$this->assign('loglevellist',\t\t\t\t$model->getLogLevelList() );\n\t\t$this->assign('sqlcompatlist',\t\t\t\t$model->getSqlCompatList() );\n\t\t$this->assign('algolist',\t\t\t\t\t$model->getAlgoList() );\n\t\t$this->assign('listerlist',\t\t\t\t\t$model->getFilelistEngineList() );\n\t\t$this->assign('dumperlist',\t\t\t\t\t$model->getDatabaseEngineList() );\n\t\t$this->assign('archiverlist',\t\t\t\t$model->getArchiverEngineList() );\n\t\t$this->assign('installerlist',\t\t\t\t$model->getInstallerList() );\n\t\t$this->assign('backupmethodlist',\t\t\t$model->getBackupMethodList() );\n\t\t$this->assign('authlist',\t\t\t\t\t$model->getAuthLevelList() );\n\n\t\t// Let's pass the data\n\t\t// -- Common Basic\n\t\t$this->assign('OutputDirectory',\t\t\t$model->getVar('OutputDirectoryConfig') );\n\t\t// -- Common Frontend\n\t\t$this->assign('enableFrontend',\t\t\t\t$model->getVar('enableFrontend') );\n\t\t$this->assign('secretWord',\t\t\t\t\t$model->getVar('secretWord') );\n\t\t$this->assign('frontendemail',\t\t\t\t$model->getVar('frontendemail') );\n\t\t$this->assign('arbitraryfeemail',\t\t\t$model->getVar('arbitraryfeemail'));\n\t\t// -- Basic\n\t\t$this->assign('BackupType',\t\t\t\t\t$model->getVar('BackupType') );\n\t\t$this->assign('TarNameTemplate',\t\t\t$model->getVar('TarNameTemplate') );\n\t\t$this->assign('logLevel',\t\t\t\t\t$model->getVar('logLevel') );\n\t\t$this->assign('authlevel',\t\t\t\t\t$model->getVar('authlevel') );\n\t\t$this->assign('cubeinfile',\t\t\t\t\t$model->getVar('cubeinfile') );\n\t\t// -- Advanced\n\t\t$this->assign('MySQLCompat', \t\t\t\t$model->getVar('MySQLCompat') );\n\t\t$this->assign('dbAlgorithm',\t\t\t\t$model->getVar('dbAlgorithm') );\n\t\t$this->assign('packAlgorithm', \t\t\t\t$model->getVar('packAlgorithm') );\n\t\t$this->assign('listerengine', \t\t\t\t$model->getVar('listerengine') );\n\t\t$this->assign('dbdumpengine', \t\t\t\t$model->getVar('dbdumpengine') );\n\t\t$this->assign('packerengine', \t\t\t\t$model->getVar('packerengine') );\n\t\t$this->assign('InstallerPackage',\t\t\t$model->getVar('InstallerPackage') );\n\t\t$this->assign('backupMethod', \t\t\t\t$model->getVar('backupMethod') );\n\t\t$this->assign('minexectime',\t\t\t\t$model->getVar('minexectime'));\n\t\t$this->assign('enableSizeQuotas',\t\t\t$model->getVar('enableSizeQuotas') );\n\t\t$this->assign('enableCountQuotas',\t\t\t$model->getVar('enableCountQuotas') );\n\t\t$this->assign('sizeQuota',\t\t\t\t\t$model->getVar('sizeQuota') );\n\t\t$this->assign('countQuota',\t\t\t\t\t$model->getVar('countQuota') );\n\t\t$this->assign('enableMySQLKeepalive',\t\t$model->getVar('enableMySQLKeepalive') );\n\t\t$this->assign('gzipbinary',\t\t\t\t\t$model->getVar('gzipbinary'));\n\t\t$this->assign('effvfolder',\t\t\t\t\t$model->getVar('effvfolder'));\n\t\t$this->assign('dereferencesymlinks',\t\t$model->getVar('dereferencesymlinks'));\n\t\t$this->assign('splitpartsize',\t\t\t\t$model->getVar('splitpartsize'));\n\t\t// -- Magic numbers\n\t\t$this->assign('mnRowsPerStep', \t\t\t\t$model->getVar('mnRowsPerStep') );\n\t\t$this->assign('mnMaxFragmentSize',\t\t\t$model->getVar('mnMaxFragmentSize') );\n\t\t$this->assign('mnMaxFragmentFiles', \t\t$model->getVar('mnMaxFragmentFiles') );\n\t\t$this->assign('mnZIPForceOpen',\t\t\t\t$model->getVar('mnZIPForceOpen') );\n\t\t$this->assign('mnZIPCompressionThreshold',\t$model->getVar('mnZIPCompressionThreshold') );\n\t\t$this->assign('mnZIPDirReadChunk',\t\t\t$model->getVar('mnZIPDirReadChunk') );\n\t\t$this->assign('mnMaxExecTimeAllowed',\t\t$model->getVar('mnMaxExecTimeAllowed') );\n\t\t$this->assign('mnMinimumExectime',\t\t\t$model->getVar('mnMinimumExectime') );\n\t\t$this->assign('mnExectimeBiasPercent',\t\t$model->getVar('mnExectimeBiasPercent') );\n\t\t$this->assign('mnMaxOpsPerStep',\t\t\t$model->getVar('mnMaxOpsPerStep') );\n\t\t$this->assign('mnArchiverChunk',\t\t\t$model->getVar('mnArchiverChunk') );\n\t\t// -- MySQLDump\n\t\t$this->assign('mysqldumpPath',\t\t\t\t$model->getVar('mysqldumpPath') );\n\t\t$this->assign('mnMSDDataChunk',\t\t\t\t$model->getVar('mnMSDDataChunk') );\n\t\t$this->assign('mnMSDMaxQueryLines',\t\t\t$model->getVar('mnMSDMaxQueryLines') );\n\t\t$this->assign('mnMSDLinesPerSession',\t\t$model->getVar('mnMSDLinesPerSession') );\n\t\t// -- DirectFTP\n\t\t$this->assign('df_host',\t\t\t\t\t$model->getVar('df_host') );\n\t\t$this->assign('df_port',\t\t\t\t\t$model->getVar('df_port') );\n\t\t$this->assign('df_user',\t\t\t\t\t$model->getVar('df_user') );\n\t\t$this->assign('df_pass',\t\t\t\t\t$model->getVar('df_pass') );\n\t\t$this->assign('df_initdir',\t\t\t\t\t$model->getVar('df_initdir') );\n\t\t$this->assign('df_usessl',\t\t\t\t\t$model->getVar('df_usessl') );\n\t\t$this->assign('df_passive',\t\t\t\t\t$model->getVar('df_passive') );\n\n\t\t// Also load the Configuration HTML helper\n\t\t$this->loadHelper('config');\n\t\tparent::display();\n\t}", "function get_debug() {\n $rd = CRand::Instance();\n $html = \"<h2>Debuginformation</h2><hr><p>The content of the config array:</p><pre>\" . htmlentities(print_r($rd->config, true)) . \"</pre>\";\n $html .= \"<hr><p>The content of the data array:</p><pre>\" . htmlentities(print_r($rd->data, true)) . \"</pre>\";\n $html .= \"<hr><p>The content of the request array:</p><pre>\" . htmlentities(print_r($rd->request, true)) . \"</pre>\";\n return $html;\n}", "public function getConfig() {\r\n\r\n\t}", "public function build() {\n $config = $this->getConfiguration();\n return [\n '#theme' => 'helloadvanced',\n '#text' => isset($config['text']) ? $config['text'] : NULL,\n '#person' => isset($config['person']) ? $config['person'] : NULL,\n '#session' => isset($config['session']) ? $config['session'] : NULL,\n ];\n }", "protected function getEditableConfigNames()\n {\n return ['config.view_card'];\n }", "function config()\n\t{\n\t\t$rows=$GLOBALS['SITE_DB']->query_select('pstore_customs',array('*'),NULL,'ORDER BY id');\n\t\t$out=array();\n\t\tforeach ($rows as $i=>$row)\n\t\t{\n\t\t\t$fields=new ocp_tempcode();\n\t\t\t$hidden=new ocp_tempcode();\n\t\t\t$fields->attach($this->get_fields('_'.strval($i),get_translated_text($row['c_title']),get_translated_text($row['c_description']),$row['c_enabled'],$row['c_cost'],$row['c_one_per_member']));\n\t\t\t$fields->attach(do_template('FORM_SCREEN_FIELD_SPACER',array('TITLE'=>do_lang_tempcode('ACTIONS'))));\n\t\t\t$fields->attach(form_input_tick(do_lang_tempcode('DELETE'),do_lang_tempcode('DESCRIPTION_DELETE'),'delete_custom_'.strval($i),false));\n\t\t\t$hidden->attach(form_input_hidden('custom_'.strval($i),strval($row['id'])));\n\t\t\t$out[]=array($fields,$hidden,do_lang_tempcode('EDIT_CUSTOM_PRODUCT'));\n\t\t}\n\n\t\treturn array($out,do_lang_tempcode('ADD_NEW_CUSTOM_PRODUCT'),$this->get_fields());\n\t}", "public function localConfig();", "private function generateConfig() {\n $config_json = array(\n 'version' => '1.0.0',\n 'name' => $this->gateway_name,\n 'description' => '',\n 'authors' => [],\n 'currencies' => ['USD'],\n 'signup_url' => 'https://google.com'\n );\n\n foreach($config_json as $key => $value) {\n if($key == 'authors' && isset($this->config['authors'])) {\n foreach($this->config[\"authors\"] as $config_author) {\n $config_entry = array(\n \"name\" => \"\",\n \"url\" => \"\"\n );\n \n if(isset($config_author['name'])) {\n $config_entry[\"name\"] = $config_author['name'];\n \n if(isset($config_author[\"url\"])) {\n $config_entry[\"url\"] = $config_author['url'];\n }\n $config_json[\"authors\"][] = $config_entry;\n }\n }\n }\n else {\n if(isset($this->config[$key])) {\n $config_json[$key] = $this->config[$key];\n }\n }\n }\n\n return json_encode($config_json);\n }", "protected static function config()\n {\n return [\n 'view' => ['viewRenderClass' => 'Ice:Php', 'layout' => ''],\n 'input' => [\n 'resources' => [\n 'default' => [\n 'modules' => [\n 'Ice' => [\n 'vendor_js' => [\n 'path' => 'js/vendor/',\n 'js' => ['-modernizr-2.8.3.min.js'],\n 'css' => [],\n 'isCopy' => false,\n ],\n 'vendor_css' => [\n 'path' => 'css/vendor/',\n 'js' => [],\n 'css' => ['empty.css'],\n 'isCopy' => false,\n ],\n 'vendor' => [\n 'path' => 'vendor/',\n 'js' => [],\n 'css' => [],\n 'isCopy' => false,\n ],\n 'common' => [\n 'path' => '',\n 'js' => [],\n 'css' => ['css/flags.css', 'css/preloader.css'],\n 'isCopy' => false,\n ],\n 'module' => [\n 'path' => 'Ice/',\n 'js' => ['Helper/String.js', 'Ui/Form.js', 'Ui/Menu.js', 'Ui/Data.js'],\n 'css' => [],\n 'isCopy' => false,\n ],\n ],\n ],\n// 'vendors' => [\n// 'jquery/jquery-ui' => [\n// 'jquery' => [\n// 'path' => '/',\n// 'js' => ['external/jquery/jquery.js', '-jquery-ui.min.js'],\n// 'css' => ['-jquery-ui.min.css', '-jquery-ui.structure.min.css', '-jquery-ui.theme.min.css'],\n// 'isCopy' => true,\n// ],\n// ],\n// 'twbs/bootstrap' => [\n// 'bootstrap' => [\n// 'path' => 'dist/',\n// 'js' => ['-js/bootstrap.min.js'],\n// 'css' => ['-css/bootstrap.min.css', '-css/bootstrap-theme.min.css'],\n// 'isCopy' => true,\n// 'css_replace' => ['url(../', 'url('],\n// ],\n// ],\n// ],\n ],\n ],\n 'js' => ['default' => []],\n 'css' => ['default' => []],\n 'routeName' => ['default' => ''],\n 'context' => ['default' => '/resource/']\n ],\n 'ttl' => 3600\n ];\n }", "public function build_config_ui($host, $context = null) {\n\t\t\t$this->host = $host;\n\t\t\t\n\t\t\t$this->host->add_field('test_mode', 'Developer Mode')->tab('Configuration')->renderAs(frm_onoffswitcher)->comment('Use the Purolator E-Ship Development Environment to try out API requests.', 'above', true);\n\n\t\t\t$this->host->add_field('billing_account_number', 'Billing Account Number', 'left')->tab('API Credentials')->comment('Required by Purolator, but no billing methods are used yet.', 'above')->renderAs(frm_text)->validation()->required('Please specify your Billing Account Number');\n\t\t\t\n\t\t\tif($context !== 'preview') {\n\t\t\t\t$this->host->add_field('api_key', 'Key', 'left')->tab('API Credentials')->comment('Purolator key.', 'above')->renderAs(frm_text)->validation()->required('Please specify API user name');\n\t\t\t\t$this->host->add_field('api_key_password', 'Key Password', 'right')->tab('API Credentials')->comment('Purolator key password.', 'above')->renderAs(frm_password)->validation();\n\t\t\t}\n\n\t\t\t$this->host->add_field('container', 'Container Type', 'left')->tab('Shipping Parameters')->renderAs(frm_dropdown)->validation()->required('Please specify container type');\n\t\t\t$this->host->add_field('pickup_type', 'Pickup Type', 'right')->tab('Shipping Parameters')->renderAs(frm_dropdown)->validation()->required('Please specify pickup type');\n\t\t\t$this->host->add_field('allowed_methods', 'Allowed methods')->tab('Shipping Parameters')->renderAs(frm_checkboxlist)->validation();\n\t\t\t$this->host->add_field('min_weight', 'Minimum Item Weight')->tab('Shipping Parameters')->comment('Minimum weight for one package. Purolator requires a minimum weight of 1 lb per item.', 'above')->renderAs(frm_text)->validation()->fn('trim')->required('Please specify a minimum weight.')->float();\n\t\t\t$this->host->add_field('max_weight', 'Maximum Item Weight')->tab('Shipping Parameters')->comment('Maximum weight for one package. Purolator requires a maximum weight of 150 lb per item.', 'above')->renderAs(frm_text)->validation()->fn('trim')->required('Please specify a maximum weight')->float();\t\n\t\t\t\n\t\t\t$this->host->add_field('free_shipping_enabled', 'Enable free shipping option')->tab('Free Shipping')->renderAs(frm_checkbox)->validation();\n\t\t\t$this->host->add_field('free_shipping_option', 'Free shipping method')->tab('Free Shipping')->renderAs(frm_dropdown)->validation();\n\t\t\t$this->host->add_field('free_shipping_min_amount', 'Minimum order amount for free shipping', 'full', $type = db_number)->tab('Free Shipping')->renderAs(frm_text)->validation();\n\t\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['supports_advanced_import']=false;\n\t\t$info['product']='phpBB 3.0.x';\n\t\t$info['prefix']='phpbb_';\n\t\t$info['import']=array(\n\t\t\t\t\t\t\t\t'custom_comcode',\n\t\t\t\t\t\t\t\t'ocf_groups',\n\t\t\t\t\t\t\t\t'ocf_custom_profile_fields',\n\t\t\t\t\t\t\t\t'ocf_members',\n\t\t\t\t\t\t\t\t'ocf_member_files',\n\t\t\t\t\t\t\t\t'ocf_forums',\n\t\t\t\t\t\t\t\t'ocf_topics',\n\t\t\t\t\t\t\t\t'attachments',\n\t\t\t\t\t\t\t\t'ocf_posts',\n\t\t\t\t\t\t\t\t'ocf_polls_and_votes',\n\t\t\t\t\t\t\t\t//'notifications', Actually this is read tracking, not for notifications\n\t\t\t\t\t\t\t\t'ocf_personal_topics',\n\t\t\t\t\t\t\t\t'ocf_warnings',\n\t\t\t\t\t\t\t\t'wordfilter',\n\t\t\t\t\t\t\t\t'bookmarks',\n\t\t\t\t\t\t\t\t'config',\n\t\t\t\t\t\t\t\t'ip_bans',\n\t\t\t\t\t\t\t\t'friends',\n\t\t\t\t\t\t\t\t'reported_posts_forum',\n\t\t\t\t\t\t\t);\n\t\t$info['dependencies']=array( // This dependency tree is overdefined, but I wanted to make it clear what depends on what, rather than having a simplified version\n\t\t\t\t\t\t\t\t'attachments'=>array('ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_warnings'=>array('ocf_members','ocf_posts'),\n\t\t\t\t\t\t\t\t'ocf_members'=>array('ocf_groups','ocf_custom_profile_fields'),\n\t\t\t\t\t\t\t\t'ocf_member_files'=>array('ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_forums'=>array('ocf_members','ocf_groups'),\n\t\t\t\t\t\t\t\t'ocf_custom_profile_fields'=>array('ocf_groups'),\n\t\t\t\t\t\t\t\t'ocf_topics'=>array('ocf_forums','ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_polls_and_votes'=>array('ocf_topics','ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_posts'=>array('ocf_topics','ocf_members','attachments'),\n\t\t\t\t\t\t\t\t'notifications'=>array('ocf_topics','ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_personal_topics'=>array('ocf_members','attachments'),\n\t\t\t\t\t\t\t\t'friends'=>array('ocf_members'),\n\t\t\t\t\t\t\t\t'bookmarks'=>array('ocf_members','ocf_topics'),\n\t\t\t\t\t\t\t\t'reported_posts_forum'=>array('ocf_members','ocf_topics','ocf_posts'),\n\t\t\t\t\t\t\t);\n\t\t$_cleanup_url=build_url(array('page'=>'admin_cleanup'),get_module_zone('admin_cleanup'));\n\t\t$cleanup_url=$_cleanup_url->evaluate();\n\t\t$info['message']=(get_param('type','misc')!='import' && get_param('type','misc')!='hook')?new ocp_tempcode():do_lang_tempcode('FORUM_CACHE_CLEAR',escape_html($cleanup_url));\n\n\t\treturn $info;\n\t}", "public static function DEBUG_PRINT()\n {\n $self = new self;\n $debug = [\n 'Service_Endpoint' => $self->getServiceEndpoint(),\n 'App_key' => $self->getAppKey(),\n 'App_Secret' => $self->getSecretKey(),\n 'Server_URL' => $self->SERVER_URL\n ];\n\n echo \"<h1> Print our all configuration </h1>\";\n echo \"<br>\";\n\n foreach ($debug as $key => $value) {\n echo \"My \" . $key . ' is ' . $value . \"<br>\";\n }\n }", "private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\t\t\t\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = 'Specials products';\r\n }\r\n $response = Configuration::updateValue('FIELD_SPECIALPLS_NBR', 6);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_TITLE', $title);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_VERTICAL', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_COLUMNITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MAXITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MEDIUMITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MINITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLLDELAY', 4000);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAGINATION', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_NAVIGATION', 0);\r\n\r\n return $response;\r\n }", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getTsConfig() {}", "public function deleteConfigVars()\n {\n $config_vars = [\n 'DF_AI_ADMIN_ENDPOINT',\n 'DF_AI_API_ENDPOINT',\n 'DF_AI_APIKEY',\n 'DF_API_KEY',\n 'DF_API_LAYER_DESCRIPTION',\n 'DF_CSS_VS',\n 'DF_CUSTOMEXPLODEATTR',\n 'DF_DEBUG',\n 'DF_DEBUG_CURL',\n 'DF_DSBL_AJAX_TKN',\n 'DF_DSBL_DFCKIE_JS',\n 'DF_DSBL_DFFAC_JS',\n 'DF_DSBL_DFLINK_JS',\n 'DF_DSBL_DFPAG_JS',\n 'DF_DSBL_FAC_CACHE',\n 'DF_DSBL_HTTPS_CURL',\n 'DF_EB_LAYER_DESCRIPTION',\n 'DF_ENABLED_V9',\n 'DF_ENABLE_HASH',\n 'DF_EXTRA_CSS',\n 'DF_FACETS_TOKEN',\n 'DF_FEATURES_SHOWN',\n 'DF_FEED_FULL_PATH',\n 'DF_FEED_INDEXED',\n 'DF_FEED_MAINCATEGORY_PATH',\n 'DF_GROUP_ATTRIBUTES_SHOWN',\n 'DF_GS_DESCRIPTION_TYPE',\n 'DF_GS_DISPLAY_PRICES',\n 'DF_GS_IMAGE_SIZE',\n 'DF_GS_MPN_FIELD',\n 'DF_GS_PRICES_USE_TAX',\n 'DF_INSTALLATION_ID',\n 'DF_SHOW_LAYER',\n 'DF_SHOW_LAYER_MOBILE',\n 'DF_REGION',\n 'DF_RESTART_OV',\n 'DF_SHOW_PRODUCT_FEATURES',\n 'DF_SHOW_PRODUCT_VARIATIONS',\n 'DF_UPDATE_ON_SAVE_DELAY',\n 'DF_UPDATE_ON_SAVE_LAST_EXEC',\n 'DF_FEED_INDEXED',\n ];\n\n $hashid_vars = array_column(\n Db::getInstance()->executeS('\n SELECT name FROM ' . _DB_PREFIX_ . \"configuration where name like 'DF_HASHID_%'\"),\n 'name'\n );\n\n $config_vars = array_merge($config_vars, $hashid_vars);\n\n foreach ($config_vars as $var) {\n Configuration::deleteByName($var);\n }\n\n return true;\n }", "public function get_default_list_config()\n {\n return '[[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_id\",false,\"LC__CMDB__OBJTYPE__ID\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_id\"]],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_title\",false,\"LC__UNIVERSAL__TITLE_LINK\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_title\"]],' . '[' . C__PROPERTY_TYPE__STATIC . ',\"its_type\",\"isys_its_type__title\",\"LC__CMDB__CATG__TYPE\",\"isys_cmdb_dao_category_g_its_type::get_properties\",false],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_created\",false,\"LC__TASK__DETAIL__WORKORDER__CREATION_DATE\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_created\"]],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_changed\",false,\"LC__CMDB__LAST_CHANGE\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_changed\"]],' . '[' . C__PROPERTY_TYPE__STATIC . ',\"purpose\",\"isys_purpose__title\",\"LC__CMDB__CATG__GLOBAL_PURPOSE\",\"isys_cmdb_dao_category_g_global::get_properties\",false],' . '[' . C__PROPERTY_TYPE__STATIC . ',\"category\",\"isys_catg_global_category__title\",\"LC__CMDB__CATG__GLOBAL_CATEGORY\",\"isys_cmdb_dao_category_g_global::get_properties\",false],' . '[' . C__PROPERTY_TYPE__DYNAMIC . ',\"_cmdb_status\",false,\"LC__UNIVERSAL__CMDB_STATUS\",\"isys_cmdb_dao_category_g_global::get_dynamic_properties\",[\"isys_cmdb_dao_category_g_global\",\"dynamic_property_callback_cmdb_status\"]]]';\n }", "function serendipity_printConfigTemplate($config, $from = false, $noForm = false, $folded = true, $allowToggle = true, $showDangerous = false) {\n global $serendipity;\n $data = array();\n $data['noForm'] = $noForm;\n $data['formToken'] = serendipity_setFormToken();\n\n $data['allowToggle'] = $allowToggle;\n\n foreach ($config as &$category) {\n foreach ($category['items'] as &$item) {\n\n $value = $from[$item['var']] ?? false;\n\n /* Calculate value if we are not installed, how clever :) */\n if ($from == false) {\n $value = serendipity_query_default($item['var'], $item['default']);\n }\n\n /* Check for installOnly flag */\n if (in_array('installOnly', $item['flags']) && IS_installed === true) {\n continue;\n }\n\n if (in_array('hideValue', $item['flags'])) {\n $value = '';\n }\n\n if (!$showDangerous && ($item['view'] ?? null) == 'dangerous') {\n continue;\n }\n\n if (in_array('config', $item['flags']) && isset($from['authorid'])) {\n $value = serendipity_get_user_config_var($item['var'], $from['authorid'], $item['default']);\n }\n\n if (in_array('parseDescription', $item['flags'])) {\n $item['description'] = serendipity_replaceEmbeddedConfigVars($item['description']);\n }\n\n if (in_array('probeDefault', $item['flags'])) {\n $item['default'] = serendipity_probeInstallation($item['var']);\n }\n\n if (in_array('ignore', $item['flags'])) {\n $item['ignore'] = true;\n } else {\n $item['ignore'] = false;\n }\n\n if (in_array('ifEmpty', $item['flags']) && empty($value)) {\n $value = serendipity_query_default($item['var'], $item['default']);\n }\n $item['guessedInput'] = serendipity_guessInput($item['type'], $item['var'], $value, $item['default']);\n }\n }\n $data['config'] = $config;\n $data['config_groupkeys'] = null;\n return serendipity_smarty_show('admin/config_template.tpl', $data);\n}", "public function getConfig() {}", "private function getDefaultConfiguration() \n {\n return array(\n\n // the default cache directory is inside the tattoo library\n 'cache' => __DIR__ . '/../cache/',\n\n // the development mode forces tattoo to always \n // rebuild the files.\n 'development' => false,\n\n // compiler options\n 'compiler' => array(\n\n // automatically escape all outputet variables\n 'autoEscapeVariables' => true,\n\n // define the escaping function. This configuration\n // should always be a string, but calm your horses\n // the string will be directly used in the compiling\n // proccess so use this with attention.\n 'defaultEscapeFunction' => 'htmlentities',\n ),\n );\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\t$info['parameters']=array('root','sort','search','max','param','select','template_set','display_type');\n\t\treturn $info;\n\t}", "protected function RTEtsConfigParams() {}", "private function generateConfig()\n {\n if ('' == $this->config->getName()) {\n throw new \\InvalidArgumentException('No module name given');\n }\n $target = sprintf(\n '%s/app/code/%s/%s/%s/etc/config.xml',\n $this->config->getPath(),\n $this->config->getCodePool(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'config.xml', $target, array(\n 'config' => $this->config,\n ));\n \n \n $target = sprintf(\n '%s/app/etc/modules/%s_%s.xml',\n $this->config->getPath(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'Module.xml', $target, array(\n 'config' => $this->config,\n )); \n }", "public function info()\n {\n $info = array();\n $info['supports_advanced_import'] = false;\n $info['product'] = 'SMF 1.1.x';\n $info['prefix'] = 'smf_';\n $info['import'] = array(\n 'config',\n 'cns_groups',\n 'cns_members',\n 'cns_member_files',\n 'ip_bans',\n 'cns_forum_groupings',\n 'cns_forums',\n 'cns_topics',\n 'cns_private_topics',\n 'cns_posts',\n 'cns_post_files',\n 'cns_polls_and_votes',\n 'notifications',\n 'wordfilter',\n 'calendar'\n );\n\n $info['dependencies'] = array( // This dependency tree is overdefined, but I wanted to make it clear what depends on what, rather than having a simplified version\n 'cns_members' => array('cns_groups'),\n 'cns_member_files' => array('cns_members'),\n 'cns_forums' => array('cns_forum_groupings', 'cns_members', 'cns_groups'),\n 'cns_topics' => array('cns_forums', 'cns_members'),\n 'cns_polls_and_votes' => array('cns_topics', 'cns_members'),\n 'cns_posts' => array('cns_topics', 'cns_members'),\n 'cns_post_files' => array('cns_posts', 'cns_private_topics'),\n 'notifications' => array('cns_topics', 'cns_members', 'cns_polls_and_votes'),\n 'cns_private_topics' => array('cns_members')\n );\n $_cleanup_url = build_url(array('page' => 'admin_cleanup'), get_module_zone('admin_cleanup'));\n $cleanup_url = $_cleanup_url->evaluate();\n $info['message'] = (get_param_string('type', 'browse') != 'import' && get_param_string('type', 'browse') != 'hook') ? new Tempcode() : do_lang_tempcode('FORUM_CACHE_CLEAR', escape_html($cleanup_url));\n\n return $info;\n }", "function getSupportingConfigVars()\n {\n return array();\n }", "public function loadConfig(){\n\t\t\n\t\t$opt[] = [\n\t\t\t'method' => 'setFormParams',\n\t\t\t'value'=>$this->paramsLoad(3, \\sevian\\s::getReq('command_idx'), \\sevian\\s::getReq('unit_idx'))\n\t\t\t\n\t\t];\n\t\t$this->info = $opt;//$form->getInfo();\n\t}", "public function build_config_ui($host_obj, $context = null)\n\t\t{\n\t\t\t$host_obj->add_field('test_mode', 'Sandbox Mode')->tab('Configuration')->renderAs(frm_onoffswitcher)->comment('The sandbox environment is used for testing integration and feature configuration.', 'above');\n\n\t\t\tif ($context !== 'preview')\n\t\t\t{\n\t\t\t\t$host_obj->add_field('merchant_id', 'Merchant Id')->tab('Configuration')->renderAs(frm_text)->validation()->fn('trim')->required('Please provide Merchant ID.');\n\t\t\t\t$host_obj->add_field('public_key', 'Public Key', 'left')->tab('Configuration')->renderAs(frm_password)->validation()->fn('trim');\n\t\t\t\t$host_obj->add_field('private_key', 'Private Key', 'right')->tab('Configuration')->renderAs(frm_password)->validation()->fn('trim');\n\t\t\t}\n\n\t\t\t$host_obj->add_field('card_action', 'Transaction Type', 'left')->tab('Configuration')->renderAs(frm_dropdown)->comment('The type of transaction request you wish to perform.', 'above');\n\t\t\t$host_obj->add_field('order_status', 'Order Status', 'right')->tab('Configuration')->renderAs(frm_dropdown)->comment('Select status to assign the order in case of successful payment.', 'above');\n\t\t}", "public static function getConfiguration();", "function confdev()\n{\n global $app, $appname, $appversion;\n $app->config([\n 'debug' => true,\n 'cookies.lifetime' => '5 minutes',\n 'cookies.secret_key' => 'b4924c3579e2850a6fad8597da7ad24bf43ab78e',\n\n ]);\n $app->getLog()->setEnabled(true);\n $app->getLog()->setLevel(\\Slim\\Log::DEBUG);\n $app->getLog()->info($appname . ' ' . $appversion . ': Running in development mode.');\n $app->getLog()->info('Running on PHP: ' . PHP_VERSION);\n}", "public static function checkAndGetConfig()\n {\n return array(\n include(sfContext::getInstance()->getConfigCache()->checkConfig('config/bb_code_parser_config.yml')),\n include(sfContext::getInstance()->getConfigCache()->checkConfig('config/bb_code_parser_tags.yml'))\n );\n }", "abstract protected function getConfig();", "function yy_r79(){$this->_retvalue = '$_smarty_tpl->getConfigVariable(\\''. $this->yystack[$this->yyidx + -1]->minor .'\\')'; }", "protected function getCompilerDescriptions(): array\n {\n return [];\n }", "public function cfg_setup()\n\t{\n\t\t$this->cfg = AppConfig::get()[\"app\"];\n\t\t$this->cfg[\"app_name\"] = $this->cfg[\"name\"];\n\n\t}", "protected function displayConfigHeader() {\n\t\t}", "protected function initFileIncluded() {\n\t\treturn [\n\t\t\t'JQUERY' => env_checker()['JQUERY'],\n\t\t\t'POPPER' => env_checker()['POPPER'],\n\t\t\t'TWBS_CSS' => env_checker()['TWBS_CSS'],\n\t\t\t'TWBS_JS' => env_checker()['TWBS_JS'],\n\t\t\t'title' => 'Sistem Informasi'\n\t\t];\n\t}", "protected function _getConfigArray(){\n \n return array(\n array(\n 'version' => '0.0.4',\n 'path' => 'bss_quickview/seting_theme/product_image_wrapper',\n 'value' => 'product-item-photo'\n ),\n array(\n 'version' => '0.0.5',\n 'path' => 'bss_quickview/success_popup_design/background_color',\n 'value' => '0088CC'\n ),\n array(\n 'version' => '0.0.5',\n 'path' => 'porto_settings/custom_settings/custom_style',\n 'value' => 'table.desc_spec_tbl{border-collapse:collapse}\ntable.desc_spec_tbl td{border:1px solid #dcdcdc}\n.product.description ul{list-style:disc}\n.page-header.type2.header-newskin .main-panel-top{border-bottom:1px solid rgba(248,248,248,0.2)}\n.page-header.type2.header-newskin .main-panel-inner{border:none}\n#phone-hrs{font-size:1.4em!important;color:#636363;padding-right:15px!important}\n#phone-hrs a{color:#08C!important}\n.page-header.type2.header-newskin .custom-block{width:100%!important;text-align:right!important;top:90%!important;right:0!important}\nh2.side-menu-title{margin:0;background-color:#FF7B0D;color:#fff;font-size:13px;font-weight:700;line-height:1;padding:14px 15px;border-radius:5px 5px 0 0;border-bottom:1px solid #ddd}\n.filterproduct-title{color:#fff!important;background-color:#08c!important;padding-left:20px!important}\n.products-grid.columns4{margin-left:0!important;margin-right:0!important}\n.home-side-menu h2.side-menu-title{color:#fff!important}\n.page-header.type2.header-newskin .minicart-wrapper .action.showcart:before,.page-header.type2.header-newskin .minicart-wrapper .action.showcart.active:before{font-size:33px;color:#08C!important}\n.page-header.type2.header-newskin .minicart-wrapper .action.showcart{padding-right:17px}\n.page-header.type2.header-newskin .minicart-wrapper .action.showcart .counter.qty{margin-top:-21px;background-color:#ff5b5b}\n.page-header.type2.header-newskin .minicart-wrapper .action.showcart:after{right:-6px}\n.homepage-bar{border:none;background-color:transparent}\n.homepage-bar .col-lg-4{border-color:#fff;padding-top:14px;padding-bottom:15px}\n.homepage-bar [class*=\" porto-icon-\"],.homepage-bar [class^=\"porto-icon-\"]{color:#465157}\n.homepage-bar .text-area{display:inline-block;vertical-align:middle;text-align:left;margin-left:5px}\n.homepage-bar h3{font-size:14px;font-weight:600;color:#465157;line-height:19px}\n.homepage-bar p{font-size:13px;font-weight:300;color:#839199;line-height:19px}\n.owl-theme .owl-dots .owl-dot span{width:13px;height:13px;border-radius:100%;border:solid 2px #d5d5d5;background:none;position:relative;margin:5px 2px}\n#banner-slider-demo-9.owl-bottom-narrow .owl-controls{text-align:left;padding-left:28px}\n#banner-slider-demo-9.owl-theme .owl-dots .owl-dot span{border:2px solid rgba(0,0,0,0.2);background:none}\n#banner-slider-demo-9.owl-theme .owl-dots .owl-dot.active span,#banner-slider-demo-9.owl-theme .owl-dots .owl-dot:hover span{border-color:#fff;background:none}\n.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{border-color:#05131c;background:none}\n.owl-theme .owl-controls .owl-dot.active span:before,.owl-theme .owl-dots .owl-dot:hover span:before{content:\"\";position:absolute;left:3px;top:3px;right:3px;bottom:3px;background-color:#05131c;border-radius:100%}\n#banner-slider-demo-9.owl-theme .owl-dots .owl-dot.active span:before,#banner-slider-demo-9.owl-theme .owl-dots .owl-dot:hover span:before{background-color:#fff}\n.owl-theme .owl-dots .owl-dot.active span:before,.owl-theme .owl-dots .owl-dot:hover span:before{background-color:#05131c}\n.block.block-subscribe.home-sidebar-block{border:none;background-color:#f4f4f4;text-align:center;border-radius:2px!important}\n.block.block-subscribe.home-sidebar-block .block-title strong{font-size:17px;font-weight:700;color:#05131c}\n.block.block-subscribe.home-sidebar-block .block-content p{line-height:24px;letter-spacing:.001em;color:#4a505e;font-size:14px}\n.block.block-subscribe.home-sidebar-block .newsletter .control input{height:45px;border-color:#e4e4e4;padding-right:10px;border-radius:3px;color:#05131c;text-transform:uppercase}\n.block.block-subscribe.home-sidebar-block button.subscribe{width:100%;margin:7px 0 0;height:auto;position:relative;left:auto;right:auto;top:auto;border-radius:5px;background-color:inherit}\n.block.block-subscribe.home-sidebar-block button.subscribe span{height:45px;text-transform:uppercase;background-color:#05131c;border:none;border-radius:3px;font-size:12px;letter-spacing:.005em;color:#fff;font-family:\"Oswald\";line-height:45px;display:block}\n#testimonials-slider-demo-9{padding:22px;border:solid 2px #0188cc;border-radius:2px}\n.cms-index-index .testimonial-author{margin:8px 0 0}\n.cms-index-index .testimonial-author .img-thumbnail{border:none;padding:0;margin-right:20px;border-radius:100%!important;overflow:hidden}\n.cms-index-index blockquote.testimonial{background-color:transparent;color:#62615e;font-size:14px;font-style:normal;line-height:24px;font-weight:400;font-family:\"Open Sans\";margin:0 -10px;padding:15px 30px 15px 43px;width:100%;float:left;margin-top:13px}\n.cms-index-index blockquote.testimonial:before{color:#0188cc;font-family:\"porto\";font-weight:400;font-size:54px}\n.cms-index-index blockquote.testimonial:after{color:#0188cc;font-family:\"porto\";font-weight:400;font-size:54px;right:-2px}\n.cms-index-index .testimonial-author p{line-height:20px}\n.cms-index-index .testimonial-author p >strong{text-transform:uppercase;font-size:13px;font-weight:700;letter-spacing:.0025em;color:#2b2b2d}\n.cms-index-index blockquote.testimonial p{line-height:24px;letter-spacing:.001em}\n#testimonials-slider-demo-6.owl-theme .owl-controls{text-align:left;padding-left:32px}\n.recent-posts .item{padding-top:40px}\n.recent-posts .post-date{display:block;float:none;text-align:left}\n.recent-posts .post-date .long-date{font-size:13px;font-weight:700;color:#0188cc;line-height:22px;text-transform:uppercase}\n.recent-posts .postTitle{min-height:auto}\n.recent-posts .postTitle h2{margin:0}\n.recent-posts .postTitle h2 a{font-size:17px;font-weight:600;line-height:22px;color:#2b2b2d}\n.recent-posts .postContent{margin:0;padding:0}\n.recent-posts .postContent>p{line-height:27px;letter-spacing:.001em}\n.recent-posts a.readmore{display:none}\n.recent-posts .owl-controls{text-align:left}\n.filterproduct-title{background:none;font-size:17px;color:#2b2b2d}\n.filterproduct-title .content{background:none;padding:0}\n.owl-top-narrow .owl-theme .owl-controls .owl-dots{margin-top:0}\n.small-list.products-grid .product-item .product-item-name{font-size:14px;font-weight:400;letter-spacing:.005em}\n.small-list.products-grid .product-item .product-reviews-summary{margin-top:0}\n.shop-features [class*=\" porto-icon-\"],.shop-features [class^=\"porto-icon-\"]{color:#0188cc;border-color:#0188cc}\n.shop-features h3{font-size:14px;font-weight:700}\n.shop-features p{color:#4a505e;line-height:27px;font-weight:400}\n.shop-features a{font-family:\"Oswald\";font-size:12.5px;text-transform:uppercase;color:#2b2b2d;letter-spacing:.0025em;line-height:26px;border:solid 1px #efefef;padding:7px 28px;background:none;box-shadow:none}\n.shop-features a:hover{background:none;color:#2b2b2d;border-color:#efefef}\n.owl-top-narrow{margin:0 -10px}\n.owl-top-narrow .owl-theme .owl-controls{right:8px}\n.owl-top-narrow .owl-carousel .owl-item > .item{padding:10px}\n@media (min-width: 768px) {\n.catalog-category-view .page-main,.catalog-product-view .page-main{padding-top:0}\n}\n.breadcrumbs li.home a{width:15px;display:inline-block;text-indent:30px;overflow:hidden;float:left;position:relative}\n.breadcrumbs li.home a:after{content:\"\\e883\";font-family:\"porto-icons\";position:absolute;left:0;top:0;text-indent:0}\n.sidebar.sidebar-main{position:relative}\n.block-category-list .block-title,.filter-options-title,.filter .filter-current-subtitle{border:none;background-color:transparent;padding:16px 20px 4px;font-size:15px;text-transform:uppercase;font-weight:600;color:#21293c;letter-spacing:.01em}\n.block-category-list .block-title{padding:0 20px 0}\n.block-category-list .block-title strong{font-weight:600}\n.block-category-list .block-content,.filter-options-content{border:none;background-color:transparent;padding:10px 20px 26px;border-bottom:#efefef solid 1px;position:relative;z-index:2;border-radius:0}\n.filter-current .items{border:none;background-color:transparent;position:relative;z-index:2}\n.filter-current .item{padding-left:20px}\n.filter-current .action.remove{right:20px;color:#21293c}\n.filter-actions{border:none;background-color:transparent;border-bottom:#efefef solid 1px;position:relative;z-index:2;padding-right:20px}\n.filter-actions a{color:#858585}\n.filter-options-title:after{content:\"\\f803\";border:none;color:#21293c;font-size:17px;margin-top:-6px}\n.filter-options-title:hover:after{background:none;color:#21293c}\n.active > .filter-options-title:after{content:\"\\f800\"}\n#ln_slider_price.ui-slider-horizontal{height:3px;box-shadow:none}\n#ln_slider_price .ui-slider-handle{width:12px;height:12px;border-radius:100%}\n.sidebar-title{font-size:15px;font-weight:600;color:#21293c;letter-spacing:.01em;margin-bottom:20px;padding-left:20px;padding-right:20px}\n.porto-icon-left-open-huge:before{content:\"\\f802\";color:#21293c}\n.porto-icon-right-open-huge:before{content:\"\\f801\";color:#21293c}\n.sidebar .owl-top-narrow .owl-theme .owl-controls{top:-40px;right:3px}\n.sidebar .owl-top-narrow .owl-theme .owl-controls .owl-nav div :before{color:#21293c}\n.sidebar .product-items .product-item-info .product-item-photo{max-width:25.19%}\n.sidebar .product-items .product-item-details{margin-left:calc(26% + 15px)}\n.sidebar .product-items .product-item-name a{font-size:12px;color:#5b5b5f;font-weight:400}\n.sidebar .sidebar-filterproducts{margin-bottom:30px;padding-bottom:40px;background:none;border-bottom:#efefef solid 1px}\n.sidebar .product-items .product-item .product-reviews-summary{display:block}\n.sidebar-filterproducts.custom-block + h2{font-size:15px!important;text-transform:uppercase;font-weight:600;color:#21293c!important;letter-spacing:.01em;padding:0 20px}\n.sidebar-filterproducts.custom-block + h2 +h5{font-family:\"Open Sans\"!important;font-weight:600!important;font-size:14px!important;color:#7a7d82!important;letter-spacing:.022em;padding:0 20px}\n.sidebar-filterproducts.custom-block + h2 + h5 + p{color:#21293c!important;font-size:15px!important;letter-spacing:.01em;padding:0 20px}\n.sidebar .custom-block{padding:0 20px}\n.category-boxed-banner.owl-theme .owl-controls{bottom:0}\n.page-products .toolbar .limiter{display:block}\n.page-with-filter .toolbar-amount{display:none}\n.full-width-image-banner{height:300px}\n.full-width-image-banner:after{display:none}\n.full-width-image-banner h2{font-size:36px;font-weight:900;letter-spacing:-.025em;text-transform:uppercase;line-height:38px}\n.full-width-image-banner p{font-size:18px;line-height:38px;font-weight:700;text-transform:uppercase}\n.full-width-image-banner .btn-default{font-size:14px;line-height:25px;letter-spacing:.025em;padding:10px 20px;background-color:#010204;color:#fff;font-family:\"Oswald\";text-transform:uppercase;border-radius:2px;margin-top:31px}\n.page-products .toolbar .limiter .limiter-text{display:none}\n.modes-mode.active{border:none;background:none;color:#111}\n.modes-mode,.modes-mode:hover{border:none;background:none;color:#111;width:15px}\n.toolbar select{border:1px solid #e4e4e4;height:37px;color:#7a7d82;font-weight:400;font-size:14px;text-transform:capitalize;padding:0 10px;padding-right:30px;line-height:31px}\n.toolbar-sorter .sorter-action{margin-top:6px;color:#21293c}\n.toolbar-sorter .sorter-action:before{color:#21293c}\n.pages a.page,.pages strong.page,.pages .action{width:32px;line-height:32px}\n.products-grid + .toolbar.toolbar-products{border-top:solid 1px #efefef;padding-top:25px}\n.filterproducts.products .product-item .product-item-photo{border:solid 1px #ececec}\n.product-item .product-reviews-summary{background:none}\n.price-box .price{font-family:\"Oswald\";font-weight:400;font-size:18px;color:#465157}\n.old-price .price{font-size:13px;color:#999}\n.catalog-product-view .sidebar .custom-block{border:none;color:#6b7a83;padding-bottom:0;margin-bottom:33px;background:none}\n.catalog-product-view .sidebar .custom-block-1>div i{color:#08c;border:none;font-size:40px;float:left}\n.catalog-product-view .sidebar .custom-block-1>div{min-height:65px;clear:both;padding:18px 0;border-bottom:solid 1px #dee5e8;margin-bottom:0}\n.catalog-product-view .sidebar .custom-block-1>div:last-child{border-bottom-width:0}\n.block-manufacturer{text-align:center;padding:10px 20px 0;margin-bottom:0}\n.block-manufacturer hr{border-color:#dee5e8;margin-bottom:0}\n.catalog-product-view .sidebar .custom-block-1>div h3{font-size:14px;font-weight:600;line-height:20px;letter-spacing:.005em;color:#6b7a83;margin-left:80px}\n.block.related{padding:0 20px}\n.block .title strong{font-size:15px;font-weight:600;color:#21293c;letter-spacing:.01em;margin-bottom:20px!important;padding-top:0;text-transform:uppercase}\n.block.related .product-items .product-item-actions{display:none}\n.product-info-main .page-title-wrapper h1{font-size:25px;font-weight:600;letter-spacing:-.01em;color:#21293c;margin:3px 0 15px}\n.prev-next-products a{color:#555}\n.product-reviews-summary .reviews-actions a{line-height:20px;font-size:14px;color:#bdbdbd}\n.product-info-main .product.overview{font-size:14px;font-weight:400;letter-spacing:.005em;line-height:27px;border-bottom:solid 1px #dae2e6}\n.product.media{padding-right:12px}\n.fotorama__stage__shaft{border:none}\n.fotorama__nav--thumbs .fotorama__thumb{border-color:#dae2e6}\n.product-options-bottom .price-box .price-container .price,.product-info-price .price-box .price-container .price{font-family:\"Oswald\";font-size:21px;font-weight:700;letter-spacing:.005em}\n.product-info-main .product-info-price .old-price .price-wrapper .price{font-size:16px;color:#2b2b2d;font-weight:400}\n.product-info-main .fieldset > .field.qty,.product-info-main .nested.options-list > .field.qty{position:relative;width:106px}\n.product-info-main .qty.field .control,.product-info-main .qty.field .qty-changer{margin-left:29px}\n.product-info-main .qty.field .qty-changer > a{position:absolute;top:0;left:0;height:43px;width:30px;line-height:41px;text-align:center;margin:0;border-color:#dae2e6}\n.product-info-main .qty.field .qty-changer > a:first-child{left:auto;right:4px}\n.product-info-main .box-tocart .input-text.qty{font-family:\"Oswald\";display:inline-block;vertical-align:middle;height:43px;width:44px!important;font-size:14px;font-weight:400;text-align:center;color:#61605a;margin:0;border-color:#dae2e6}\n.product-info-main .qty.field .qty-changer > a .porto-icon-up-dir:before{content:\"\\f882\"}\n.product-info-main .qty.field .qty-changer > a .porto-icon-down-dir:before{content:\"\\f883\"}\n.catalog-product-view:not(.weltpixel-quickview-catalog-product-view):not(.weltpixel_quickview-catalog_product-view) .box-tocart .action.tocart{height:43px;font-size:14px;letter-spacing:.05em;font-weight:400}\n.box-tocart .action.tocart:before{content:\"\\e87f\";font-family:\"porto-icons\";margin-right:7px;font-size:16px}\n.action.primary,.action.primary:active{font-family:\"Oswald\";letter-spacing:1px;text-transform:uppercase}\n.product-addto-links .action.towishlist,.product-addto-links .action.tocompare,.moved-add-to-links .action.mailto.friend,.product-social-links .action.mailto.friend{width:43px;height:43px;line-height:41px}\n.product.data.items > .item.content{background-color:#fff;box-shadow:none;border:none;border-top:#dae2e6 solid 1px;font-size:14px;font-weight:400;letter-spacing:.005em;line-height:27px}\n.main-upsell-product-detail .block.upsell .title strong{background:none}\n.block.upsell .title{background:none;border-bottom:#e1e1e1 solid 1px;font-weight:700;margin-bottom:16px;padding-bottom:10px;text-transform:uppercase;text-align:left}\n.block.upsell .title strong{font-size:14px;font-weight:400;font-family:\"Oswald\";color:#302e2a}\n.review-ratings .rating-label{display:block}\n.footer-middle{padding:62px 0 42px}\n.footer-ribbon{margin:-78px 0 25px}\n.footer-middle p{font-size:13px;line-height:20px;margin-bottom:0}\n.footer-middle .block .block-title{margin-bottom:15px}\n.footer-middle .block .block-title strong{font-size:16px;font-weight:700;text-transform:uppercase}\n.footer-middle ul.links li,.footer-middle ul.features li{padding:6px 0}\n.footer-container .validation-advice{position:absolute}\n.footer-middle .block.newsletter .form.subscribe{max-width:400px}\n.footer-middle .block.newsletter .control:before{line-height:48px;margin-left:20px}\n.footer-middle .block.newsletter .control{position:relative}\n.footer-middle .block.newsletter .control input{background-color:#fff;color:#686865;height:48px;border:none;font-size:14px;padding-left:10px}\n.footer-middle .block.newsletter .control div.mage-error{position:absolute;bottom:-22px}\n.footer-middle .block.newsletter .action.subscribe{height:48px;text-transform:uppercase;padding:0 22px}\n.footer-middle .block-bottom{border-top:1px solid #3d3d38;text-align:left;padding:27px 0;overflow:hidden}\n.footer-middle .social-icons a{background-image:none;background-color:#33332f;text-indent:0;color:#fff;border-radius:0;font-size:15px;width:37px;height:37px;text-align:center;margin-left:0;margin-right:4px;float:left;line-height:35px}\n.footer-middle .contact-info li:first-child{border-top-width:0}\n.footer-middle .contact-info li{padding:9px 0}\n.footer-middle .contact-info i{color:#e1ddc3!important;font-size:26px;line-height:28px}\n.footer-middle .contact-info p{line-height:1}\n.footer-middle .contact-info b{font-weight:400;font-size:13px;margin-bottom:7px;display:inline-block}\n.footer-bottom{padding:18px 0}\n.footer-bottom address{float:left}\n.footer-bottom .container{position:relative}\n.footer-bottom .container:before{content:\"\";position:absolute;background-color:#3d3d38;left:15px;right:15px;top:-18px;height:1px;width:calc(100% - 30px)}\n@media (max-width: 991px) {\n.footer .block .block-content{margin-bottom:30px}\n.footer-middle .block-content{min-width:auto!important;width:100%}\n}\n@media (max-width: 767px) {\n.navigation.sw-megamenu > .sticky-logo{display:none}\n.page-header.type2.header-newskin .custom-block{display:none}\n.homepage-bar .col-lg-4{text-align:left!important}\n#banner-slider-demo-9{margin-bottom:20px}\n.sidebar.sidebar-main{position:static}\n.page-products .toolbar .limiter{display:none}\n.product.data.items{margin:0}\n.prev-next-products .product-nav.product-next .product-pop{margin:0}\n.prev-next-products .product-nav.product-prev .product-pop{left:-20px}\n.product-info-main .fieldset > .field.qty{margin-bottom:20px}\n.fieldset > .actions{vertical-align:top}\n.catalog-product-view .sidebar .custom-block{padding:0}\n.footer-middle{padding:62px 0 0;margin-bottom:-20px}\n.footer .block .block-content{margin-bottom:30px}\n.footer-middle .block-content{float:none!important}\n.footer-middle .social-icons{overflow:hidden;float:none!important}\n.footer-bottom .custom-block.f-right{margin-left:0}\n}\n.page-products .sorter{float:left}\n.modes{float:right;margin-right:0;margin-left:20px;margin-top:7px}\n.modes-mode:before{content:\"\\e880\";font-size:14px}\n.mode-list:before{content:\"\\e87b\";font-size:14px}\n.products.wrapper ~ .toolbar .limiter{float:left}\n.products.wrapper ~ .toolbar .pages{float:right}\n@media (min-width: 768px) {\n.page-header.type2.header-newskin .minicart-wrapper{background-color:transparent;width:81px;height:41px;text-align:center;box-shadow:none;border-radius:0;border:none}\n.home-side-menu{background-color:transparent;border-color:#dae2e6;border-radius:2px}\n.home-side-menu h2.side-menu-title{color:#465157;font-size:14.5px;font-weight:700;letter-spacing:.001em}\n.navigation.side-megamenu a,.navigation.side-megamenu a:hover{color:#465157}\n.sw-megamenu.navigation.side-megamenu li.level0.parent > a:after{color:#838b90}\n.sw-megamenu.navigation.side-megamenu li.level0.parent:hover > a:after{color:#fff}\n.sw-megamenu.navigation.side-megamenu li.level0 > .submenu{border:solid 1px #dae2e6;box-shadow:0 3px 15px -2px rgba(0,0,0,0.3);padding:10px 0 10px 15px}\n.sw-megamenu.navigation.side-megamenu li.level0 > .submenu:before,.sw-megamenu.navigation.side-megamenu li.level0 > .submenu:after{border-bottom-style:solid;content:\"\";display:block;height:0;position:absolute;width:0}\n.sw-megamenu.navigation.side-megamenu li.level0 > .submenu:before{border:8px solid;border-color:transparent #fff transparent transparent;z-index:3;left:-16px;top:11px}\n.sw-megamenu.navigation.side-megamenu li.level0 > .submenu:after{border:9px solid;border-color:transparent #dae2e6 transparent transparent;z-index:2;left:-18px;top:10px;right:auto}\n.sw-megamenu.navigation li.level0.fullwidth .submenu li.level1 > a,.sw-megamenu.navigation li.level0.staticwidth .submenu li.level1 > a{font-size:13px;font-weight:700;color:#434d53;letter-spacing:-.001em;margin-top:9px}\n.sw-megamenu.navigation li.level0.fullwidth .submenu a,.sw-megamenu.navigation li.level0.staticwidth .submenu a,.sw-megamenu.navigation li.level0.classic .submenu a{font-size:13px;font-weight:600;color:#696969;line-height:inherit}\n.sidebar.sidebar-main:before{content:\"\";position:absolute;left:0;right:20px;border:solid 1px #dae2e6;top:0;bottom:0;border-radius:2px}\n.product.data.items > .item.title{padding:10px 30px 10px 0}\n.product.data.items > .item.title > .switch{font-size:14px;font-weight:700;color:#818692;text-transform:uppercase;border:none;border-radius:0;line-height:30px;background:none;padding:0}\n.product.data.items > .item.title:not(.disabled) > .switch:focus,.product.data.items > .item.title:not(.disabled) > .switch:hover{background:none;color:#818692}\n.product.data.items > .item.title.active > .switch,.product.data.items > .item.title.active > .switch:focus,.product.data.items > .item.title.active > .switch:hover{color:#21293c;position:relative;border-bottom:#08C solid 2px}\n.product.data.items > .item.content{padding:35px 0 0;margin-top:45px}\n}\n@media (min-widtH: 768px) {\n.page-header .switcher .options .action.toggle{color:#fff}\n}\n.products-grid .product-item .product-item-info .product-item-photo > a:not(.weltpixel-quickview):after{content:\"\";display:block;background-color:#000;opacity:0;width:100%;height:100%;position:absolute;left:0;top:0;z-index:2;visibility:hidden;transition:all .3s}\n.products-grid .product-item .product-item-info:hover .product-item-photo > a:not(.weltpixel-quickview):after{opacity:.1;visibility:visible}\n.page-header.type2.header-newskin.sticky-header .minicart-wrapper .block-minicart:after{right:38px}\n.page-header.type2.header-newskin.sticky-header .minicart-wrapper .block-minicart:before{right:39px}\n.swatch-attribute.size .swatch-option,.swatch-attribute.manufacturer .swatch-option{background:#fff;color:#636363;border-color:#e9e9e9}\n.swatch-option.text{min-width:26px;line-height:18px;padding:3px;height:26px}\n.pages a.page,.pages strong.page,.pages .action{background:transparent;color:#706f6c;font-size:15px;font-weight:600;line-height:30px}\n.pages a.page:hover,.pages a.action:hover{background-color:transparent;color:#706f6c}\n.pages a.action:hover:before{color:#706f6c!important}\n.pages .action{border-color:transparent}\n.product-info-main .product-info-stock-sku{color:#333;font-size:14px;padding-bottom:23px}\n.product-reviews-summary .reviews-actions a{color:#21293c}\n.product-info-main .product-info-stock-sku{color:#21293c}\n.catalog-product-view .sidebar .custom-block.custom-block-1{margin-top:-25px}\n.block-minicart .block-content > .actions > .secondary .action.viewcart{color:#333;font-weight:500;font-family:\"Oswald\"}\n.cms-index-index .single-images{margin-bottom:5px}\n.product-item .rating-summary .rating-result > span:before{color:#575f68}\n@media (max-width: 767px) {\n.block-category-list .block-title,.block-category-list .block-content,.sidebar-title,.sidebar .custom-block,.sidebar-filterproducts.custom-block + h2,.sidebar-filterproducts.custom-block + h2 +h5,.sidebar-filterproducts.custom-block + h2 + h5 + p{padding-left:0;padding-right:0}\n}\n.page-header .switcher .options .action.toggle{color:#bde1f5}\n.page-wrapper > .breadcrumbs{margin-bottom:0}\n.products-grid .product-item-details .product-item-actions .tocart{text-transform:uppercase;font-size:12.53px;font-family:\"Oswald\";font-weight:400;letter-spacing:.025em;color:#fff;line-height:30px;background-color:#08c;border-color:#08c;}\n.products-grid .product-item-details .product-item-actions .tocart:hover{background-color:#006496!important;border-color:#006496!important;color:#fff}\n.product-item .tocart:before{content:\"\\e87f\";font-size:17px;vertical-align:middle}\n.product-social-links .action.towishlist:before,.product-addto-links .action.towishlist:before,.block-bundle-summary .action.towishlist:before,.product-item .action.towishlist:before,.table-comparison .action.towishlist:before{content:\"\\e889\"}'\n ),\n array(\n 'version' => '0.0.6',\n 'path' => 'persistent/options/lifetime',\n 'value' => '14400'\n ),\n );\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=3;\n\t\t$info['locked']=true;\n\t\t$info['update_require_upgrade']=1;\n\t\treturn $info;\n\t}", "function virtualname_getConfigArray(){\n //INIT MODULE\n global $vname_admin, $vname_domains, $vname_nameservers, $vname_contacts, $vname_install;\n virtualname_init();\n //CHECK INSTALLATION\n $virtualnameInstall = $vname_install->check_install();\n //GET LANGUAGES\n $adminID = $_SESSION['adminid'];\n $configLang = $vname_admin->get_config_lang($adminID);\n //GET CUSTOM CLIENT\n $client_custom_fields = $vname_admin->get_config_clients_customfields();\n //GET ALL CUSTOM\n $custom_buttons = $vname_admin->custom_buttons($virtualnameInstall, $configLang);\n $configarray = array(\n 'FriendlyName' => array('Type' => 'System', 'Value'=> 'Virtualname - TCpanel', 'Description' =>'Virtualname - TCpanel'),\n 'Description' => array('Type' => 'System', 'Value'=> $configLang['name'].' <a href=\\'http://whmcs.virtualname.net\\' target=\\'_blank\\'>Virtualname</a> - v.'.$vname_admin->module_version, 'Description' =>'Module Domains Administration Virtualname - WHMCS'),\n 'Virtualname - TCpanel' => array('Type' => 'display', 'Description' => $configLang['description']),\n 'Module-Version' => array('Type' => 'display', 'Description' => 'v'.$vname_admin->module_version, 'value'=>$vname_admin->module_version, 'FriendlyName' => $configLang['moduleVersion']),\n 'APIKey' => array('Type'=> 'text', 'Description' => '', 'Size' => '50', 'FriendlyName' => 'APIKey'),\n 'autoRenew' => array('Type' => 'yesno', 'Description' => $configLang['autoRenew'], 'FriendlyName' => $configLang['autoRenewField']),\n 'hideicnumber' => array('Type' => 'yesno', 'Description' => $configLang['hideicnumber'], 'FriendlyName' => $configLang['hideicnumberField']),\n 'freeRegisterDomains' => array('Type' => 'yesno', 'Description' => $configLang['freeRegisterDomains'], 'FriendlyName' => $configLang['freeRegisterDomainsField']),\n 'freeRenewDomains' => array('Type' => 'yesno', 'Description' => $configLang['freeRenewDomains'], 'FriendlyName' => $configLang['freeRenewDomainsField']),\n 'templateVersion' => array('Type' => 'dropdown', 'Description' => $configLang['templateVersion'], 'Options' => 'six,five', 'Default' => 'six', 'FriendlyName' => $configLang['templateVersionField']),\n 'secureRenovation' => array('Type' => 'dropdown', 'Description' => $configLang['secureRenovation'], 'Options' => 'Disabled,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24', 'Default' => 'Disabled', 'FriendlyName' => $configLang['secureRenovationField'])\n );\n //CHECK IF TAX_ID CAN BE USED\n $check_enable_tax_id = $vname_admin->check_enable_customer_tax_id();\n if($check_enable_tax_id)\n $configarray = array_merge($configarray, array('taxid' => array('Type' => 'yesno', 'Description' => $configLang['taxid'], 'FriendlyName' => $configLang['taxidField'])));\n $configarray = array_merge($configarray, array(\n 'defaultvatnumber' => array('Type' => 'dropdown', 'Description' => $configLang['defaultvatnumber'], 'Options' => $client_custom_fields, 'Default' => 'Disabled', 'FriendlyName' => $configLang['defaultvatnumberField']),\n 'disablelocktlds' => array('Type' => 'textarea', 'Description' => $configLang['disablelocktlds'], 'Rows' => '3', 'Cols' => '50', 'Default' => 'es com.es org.es edu.es', 'FriendlyName' => $configLang['disablelocktldsField']),\n 'outboundTransferMailing' => array('Type' => 'yesno', 'Description' => $configLang['outboundTransferMailing'], 'FriendlyName' => $configLang['outboundTransferMailingField']),\n 'defaultNameserversError' => array('Type' => 'yesno', 'Description' => $configLang['defaultNameserversError'], 'FriendlyName' => $configLang['defaultNameserversErrorField']),\n 'disableAdvanceContacts' => array('Type' => 'yesno', 'Description' => $configLang['disableAdvanceContacts'], 'FriendlyName' => $configLang['disableAdvanceContactsField']),\n 'defaultDomainsMail' => array('Type' => 'text', 'Description' => $configLang['addDefaultDomainsMail'], 'FriendlyName' => $configLang['addDefaultDomainsMailField']),\n 'defaultAdminRoles' => array('Type' => 'dropdown', 'Description' => $configLang['defaultAdminRoles'], 'Options' => $custom_buttons['roles'], 'Default' => 'six', 'FriendlyName' => $configLang['defaultAdminRolesField']),\n 'validationNewClient' => array('Type' => 'yesno', 'Description' => $configLang['validationNewClient'], 'FriendlyName' => $configLang['validationNewClientField']),\n 'disableContactVerification'=> array('Type' => 'yesno', 'Description' => $configLang['disableContactVerification'], 'FriendlyName' => $configLang['disableContactVerificationField']),\n 'enableDomainRecords' => array('Type' => 'yesno', 'Description' => $configLang['enableDomainRecords'], 'FriendlyName' => $configLang['enableDomainRecordsField']),\n 'enableDomainLifecycle' => array('Type' => 'yesno', 'Description' => $configLang['enableDomainLifecycle'], 'FriendlyName' => $configLang['enableDomainLifecycleField']),\n 'devMode' => array('Type' => 'yesno', 'Description' => $configLang['devMode'], 'FriendlyName' => $configLang['devModeField']),\n 'debug' => array('Type' => 'yesno', 'Description' => $configLang['debug'], 'FriendlyName' => $configLang['debugField']),\n ));\n if($custom_buttons['warnings'])\n $configarray['check-warnings'] = array('Type' => 'display', 'Description' => $custom_buttons['warnings'], 'FriendlyName' => $configLang['checkWarnings']);\n if($custom_buttons['crons'])\n $configarray['crons'] = array('Type' => 'display', 'Description' => $custom_buttons['crons'], 'FriendlyName' => $configLang['crons']);\n if($custom_buttons['errors'])\n $configarray['errors'] = array('Type' => 'display', 'Description' => $custom_buttons['errors'], 'FriendlyName' => $configLang['errors']);\n if($custom_buttons['update'])\n $configarray['update-module'] = array('Type' => 'display', 'Description' => $custom_buttons['update'], 'FriendlyName' => $configLang['updateModule']);\n $configarray['install-virtualname'] = array('Type' => 'display', 'Description' => $custom_buttons['install'], 'FriendlyName' => $configLang['installVirtualname']);\n return $configarray;\n}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=4;\n\t\t$info['locked']=false;\n\t\t$info['parameters']=array();\n\t\t$info['update_require_upgrade']=1;\n\n\t\treturn $info;\n\t}", "function get_rescueme_minify_config()\n {\n // NOTE: add dependencies before dependents!\n return array\n (\n 'index.less' => array\n (\n '//css/bootstrap.min.css', \n '//admin/css/admin.css'\n ),\n 'index.js' => array\n (\n '//js/rescueme.js', \n '//js/jquery-1.9.1.min.js', \n '//js/less.min.js',\n '//js/bootstrap.min.js'\n ),\n 'admin.less' => array\n (\n '//css/bootstrap.min.css', \n '//admin/css/admin.css'\n ),\n 'admin.js' => array\n (\n '//js/rescueme.js', \n '//js/jquery-1.9.1.min.js', \n '//js/less.min.js', \n '//js/capslock.js',\n '//js/bootstrap.min.js',\n '//admin/js/admin.js'\n ),\n ); \n }", "function configurationRecord() {\n\t\t// open the global configuration file that contains the variables and their values\n\t\tif(!$file = @fopen($_SERVER['DOCUMENT_ROOT'].'/config/podserver_config.php', 'w')) {\n\t\t\t// if some error, tell it!\n\t\t\t$error = ERROR_CAN_NOT_OPEN_CONFIG_PODSERVER_PHP;\n\t\t\treturn $error;\n\t\t}\n\t\t// open the software configuration file that contains \"define\"s\n\t\tif(!$file_soft = @fopen($_SERVER['DOCUMENT_ROOT'].'/config.php', 'w')) {\n\t\t\t// if some error, tell it!\n\t\t\t$error = ERROR_CAN_NOT_OPEN_CONFIG_PODSERVER_PHP;\n\t\t\treturn $error;\n\t\t}\n\t\t// config file header\n\t\tfwrite($file, \"<?\\n// \".FILE_GENERATED_BY.\" PodServer Configuration\\n\");\n\t\tfwrite($file_soft, \"<?\\n// \".FILE_GENERATED_BY.\" PodServer Configuration\\n\");\n\t\t// write configuration variables into the \"config/config-podserver.php\" file\n\t\tforeach($_POST as $key=>$val) {\n\t\t\t// pass for some special entry (prefixed by 'f_')\n\t\t\tif(strstr($key,\"f_\")) continue;\n\t\t\t// consider DEF_ item as for this software installation configuration defines\n\t\t\telseif(strstr($key,\"DEF_\")) {\n\t\t\t\t$key = substr($key,4,strlen($key));\n\t\t\t\tfwrite($file_soft, \"define(\\\"$key\\\", \\\"$val\\\");\\n\");\n\t\t\t}\n\t\t\t// numeric or boolean values\n\t\t\telseif(is_numeric($val) || preg_match(\"/true|false/\",$val)) fwrite($file, \"\\$$key = $val;\\n\");\t\n\t\t\t// string values\n\t\t\telse fwrite($file, \"\\$$key = \\\"\".preg_replace(\"/[\\n|\\r|\\r\\n]+/\", \" \", trim($val)).\"\\\";\\n\");\n\n\t\t}\n\t\t\n\t\tfwrite($file_soft,\"define('PODSERVER_BAN','\".addslashes(\" ___ _ __ ____ ____ ___ _____ __ \\\\\\\\ || //\n| _ \\ (_) //\\\\\\\\ | ___|| _ \\| _ || _ \\ //\\\\\\\\ \\\\\\\\||//\n|| \\ \\| |// \\\\\\\\| |__ | (_)||| ||| (_) /// \\\\\\\\ ====()====\n|| | || |||__|||__ || ___/|| ||| / ||__|| //||\\\\\\\\\n||_/ /| ||| || __| || | ||_||| |\\ \\ || || // || \\\\\\\\\n|___/ |_||| |||____||_| |___||_| \\_\\|| || \").\"');\");\n\t\t\n\t\t// save uploaded files to the \"uploads\" directory\n\t\tforeach ($this->itemsConfiguration as $item){\n\t\t\tif ($item->type == 'file')\t{\n\t\t\t\tif ($_FILES[$item->name][\"error\"] > 0){\n\t\t\t\t\t$this->error = UPLOAD_FILE_ERROR;\t\n\t\t\t\t}else{\n\t\t\t\t\tmove_uploaded_file($_FILES[$item->name][\"tmp_name\"],$_SERVER['DOCUMENT_ROOT'].'/uploads/' . $item->name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// close tag PHP\n\t\tfwrite($file, \"?>\\n\");\n\t\tfwrite($file_soft, \"?>\\n\");\n\t\t// close the file\n\t\tfclose($file);\n\t\tfclose($file_soft);\n\t\treturn true;\n\t}", "public function printConfiguration () {\n echo static::substituteTemplateVariables($this->template);\n }", "function ListConfiguration(){\n\t\t\n\t\t// create a new instance of this class\n\t\t$html_conf = new html_algpdf_conf($this->option,$this->rows,$this->db);\n\t\t\n\t\t// create a new patTemplate instance\n\t\t$t =& $html_conf->createTemplate();\n\t\t\t\t\n\t\t// read templates from file\n\t\t$t->readTemplatesFromFile(\"form_configuration.html\");\t\t\n\t\t\n\t\t// set variables\n\t\t$t->addVars(\"page\",array(\"js_url\" => JAVASCRIPT_URL,\n\t\t\t\t\t\t\t\t \"path_storefiles_value\" => $this->rows->path_storefiles));\n\t\t\n\t\t// write options\n\t\t$html_conf->write_yesno_options(&$t,\"options_recursive\",$this->rows->recursive);\n\t\t$html_conf->write_yesno_options(&$t,\"options_verify_cont\",$this->rows->verify_contents);\n\t\t$html_conf->write_yesno_options(&$t,\"options_verify_attachs\",$this->rows->verify_attachs);\n\t\t$html_conf->write_yesno_options(&$t,\"options_show_cat\",$this->rows->show_cat);\n\t\t$html_conf->write_categories_options(&$t,\"options_cats\",$this->rows->analyze_cats);\n\t\t\n\t\t// hiddens\n\t\t$hiddens = array(\"option\" => $this->option, \"task\" => \"\", \"analyze_cats\" => $this->rows->analyze_cats ,\"id_conf\" => $this->rows->id_conf, \"act\" => \"conf\");\n\t\tforeach ($hiddens as $name=>$value){\n\t\t\t$t->addVars(\"hiddens\",array(\"hidden_name\" => $name, \"hidden_value\" => $value));\n\t\t\t$t->parseTemplate(\"hiddens\",\"a\");\n\t\t}\n\t\t\n\t\t// show output\n\t\t$t->displayParsedTemplate();\n\t}", "public function config()\n {\n $rows = $GLOBALS['SITE_DB']->query_select('pstore_customs', array('*'), null, 'ORDER BY id');\n $out = array();\n foreach ($rows as $i => $row) {\n $fields = new Tempcode();\n $hidden = new Tempcode();\n $fields->attach($this->get_fields('_' . strval($i), get_translated_text($row['c_title']), get_translated_text($row['c_description']), $row['c_enabled'], $row['c_cost'], $row['c_one_per_member'], get_translated_text($row['c_mail_subject']), get_translated_text($row['c_mail_body'])));\n $fields->attach(do_template('FORM_SCREEN_FIELD_SPACER', array('_GUID' => '01362c21b40d7905b76ee6134198a128', 'TITLE' => do_lang_tempcode('ACTIONS'))));\n $fields->attach(form_input_tick(do_lang_tempcode('DELETE'), do_lang_tempcode('DESCRIPTION_DELETE'), 'delete_custom_' . strval($i), false));\n $hidden->attach(form_input_hidden('custom_' . strval($i), strval($row['id'])));\n $out[] = array($fields, $hidden, do_lang_tempcode('_EDIT_CUSTOM_PRODUCT', escape_html(get_translated_text($row['c_title']))));\n }\n\n return array($out, do_lang_tempcode('ADD_NEW_CUSTOM_PRODUCT'), $this->get_fields(), do_lang_tempcode('CUSTOM_PRODUCT_DESCRIPTION'));\n }", "public function actionGenerateModuleConfig()\n {\n $detectedModules = $this->actionDetectModules();\n\n $modules = Module::model()->findAll(new CDbCriteria(array(\n 'order' => 'name',\n 'condition' => 'enabled = true',\n )));\n $config = array();\n foreach ($modules as $module) {\n if (!isset($detectedModules[$module->name])) continue;\n $config[$module->name] = array(\n 'class' => $detectedModules[$module->name]\n );\n }\n $str = \"<?php\\nreturn \" . var_export($config, true) . \"\\n?>\";\n file_put_contents(Yii::getPathOfAlias('runtime.cache') . '/modules.php', $str);\n }", "abstract public function getConfig();", "public function component_info() {\n \n // Load the component's language files\n $this->CI->lang->load( 'frontend', $this->CI->config->item('language'), FALSE, TRUE, MIDRUB_BASE_ADMIN_FRONTEND );\n \n // Return component information\n return array(\n 'app_name' => $this->CI->lang->line('frontend'),\n 'display_app_name' => $this->CI->lang->line('frontend'),\n 'component_slug' => 'frontend',\n 'component_icon' => '<i class=\"far fa-edit\"></i>',\n 'version' => '0.0.1',\n 'required_version' => '0.0.7.8'\n );\n \n }", "public function getEditableConfigNames() {\n return array(\n 'happy_alexandrie.library_config'\n );\n }", "public static function getConfig()\n {\n }", "public function git_config($list=0)\n\t\t{\n\t\t\t$cmd=\"git config user.name \\\"\".$this->user_name.\"\\\"\";\n\t\t\t$last_line=exec ($cmd , $output , $retval);\n\t\t\tcheck_error($cmd,$retval);\n\n\t\t\t//2.git config user.email [email protected]\n\t\t\t$cmd=\"git config user.email \".$this->user_email;\n\t\t\t$last_line=exec ($cmd , $output , $retval);\n\t\t\tcheck_error($cmd,$retval);\n\t\t\t\n\t\t\t//3. git config --list\n\t\t\tif($list!=0)\n\t\t\t{\n\t\t\t\t$cmd=\"git config --list\";\n\t\t\t\t$last_line=exec ($cmd , $output , $retval);\n\t\t\t\tcheck_error($cmd,$retval);\n\t\t\t\tout_table($output);\n\t\t\t}\n\t\t}", "public function build_config_ui($host_obj, $context = null)\n\t\t{\n\t\t\tif ($context !== 'preview')\n\t\t\t{\n\t\t\t\t$host_obj->add_field('site_reference', 'Site Reference')->tab('Configuration')->renderAs(frm_text)->validation()->fn('trim')->required('Please enter Site Reference.');\n\t\t\t\t$host_obj->add_field('certificate', 'Certificate')->tab('Configuration')->renderAs(frm_textarea)->comment('Content of the certificate file. The certificate file should be obtained from SecureTrading support. The text field do not show the certificate text even if it is specified.<br/><strong>Important!</strong> For Xpay4 the field must contain the alias of the key/certificate you wish to use for this request. The alias is usually the same as your sitereference.', 'above', true)->hideContent()->validation()->fn('trim');\n\t\t\t}\n\n\t\t\t$host_obj->add_field('port', 'XPay Port')->tab('Configuration')->renderAs(frm_text)->comment('Port number to connect XPay Java application.<br/><strong>Important!</strong> Port 6666 must be open in the server firewall software in order to allow the XPay Java application to connect to the payment gateway.', 'above', true)->validation()->fn('trim')->required('Please enter port number.')->numeric('The port must be a number.');\n\n\t\t\t$host_obj->add_field('card_action', 'Transaction Type', 'left')->tab('Configuration')->renderAs(frm_dropdown)->comment('The type of transaction request you wish to perform.', 'above');\n\t\t\t$host_obj->add_field('order_status', 'Order Status', 'right')->tab('Configuration')->renderAs(frm_dropdown)->comment('Select status to assign the order in case of successful payment.', 'above');\n\t\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['supports_advanced_import']=false;\n\t\t$info['product']='HTML website (page extraction and basic themeing)';\n\t\t$info['import']=array(\n\t\t\t\t\t\t\t\t'pages',\n\t\t\t\t\t\t\t);\n\t\treturn $info;\n\t}", "public function getConfigurationExample() {\n\t\treturn '\n\t# can be used for usergroup relation in fe_users if they have to be generated\n\tadd_to_commaseparated_list_example {\n\t\trequired = 1\n\t\t\t\t\n\t\tstack {\n\t\t\t\n\t\t\t1 = TEXT\n\t\t\t1.value = {$org1}+{$org2}\n\t\t\t\n\t\t\t3 = add_to_commaseparated_list\n\t\t\t3 {\n\t\t\t\t# glue between the relations (normaly commaseparated)\n\t\t\t\tsplit = +\n\t\t\t\t\n\t\t\t\t# add record if not found\n\t\t\t\taddIfMissing = 1\n\t\t\t\t\n\t\t\t\t# table to relate to\n\t\t\t\ttable = fe_groups\n\t\t\t\t\t\t\t\t\n\t\t\t\t# field to relate to and add value if record is missing\n\t\t\t\ttablekeyfield = title\n\t\t\t}\n\t\t}\n\t}';\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Jason Verhagen';\n\t\t$info['organisation']='HolleywoodStudio.com';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=9;\n\t\t$info['locked']=false;\n\t\t$info['update_require_upgrade']=1;\n\t\t$info['parameters']=array('name','title','template_main','template_style','start_video','max_videos','orderby','embed_allowed','show_player','player_align','player_width','player_height','style','nothumbplayer','thumbnail','formorelead','formoretext','formoreurl');\n\t\treturn $info;\n\t}", "public function getBasicSettingsValues()\n\t{\n\t\t$values = array();\n\n\t\t$values[\"webspace_dir\"] = getcwd().\"/data\";\n\t\t$values[\"data_dir\"] = $this->setup->ini->readVariable(\"clients\",\"datadir\");\n\t\t$values[\"convert_path\"] = $this->setup->ini->readVariable(\"tools\",\"convert\");\n\t\t$values[\"zip_path\"] = $this->setup->ini->readVariable(\"tools\",\"zip\");\n\t\t$values[\"unzip_path\"] = $this->setup->ini->readVariable(\"tools\",\"unzip\");\n\t\t$values[\"ghostscript_path\"] = $this->setup->ini->readVariable(\"tools\",\"ghostscript\");\n\t\t$values[\"java_path\"] = $this->setup->ini->readVariable(\"tools\",\"java\");\n\t\t$values[\"htmldoc_path\"] = $this->setup->ini->readVariable(\"tools\",\"htmldoc\");\n\t\t//$values[\"mkisofs_path\"] = $this->setup->ini->readVariable(\"tools\",\"mkisofs\");\n\t\t$values[\"ffmpeg_path\"] = $this->setup->ini->readVariable(\"tools\",\"ffmpeg\");\n\t\t$values[\"latex_url\"] = $this->setup->ini->readVariable(\"tools\",\"latex\");\n\t\t$values[\"fop_path\"] = $this->setup->ini->readVariable(\"tools\",\"fop\");\n\t\t$values[\"vscanner_type\"] = $this->setup->ini->readVariable(\"tools\", \"vscantype\");\n\t\t$values[\"scan_command\"] = $this->setup->ini->readVariable(\"tools\", \"scancommand\");\n\t\t$values[\"clean_command\"] = $this->setup->ini->readVariable(\"tools\", \"cleancommand\");\n\t\t$values[\"log_path\"] = $this->setup->ini->readVariable(\"log\",\"path\").\"/\".\n\t\t\t$this->setup->ini->readVariable(\"log\",\"file\");\n\t\t$values[\"chk_log_status\"] = !$this->setup->ini->readVariable(\"log\",\"enabled\");\n\t\t$values[\"time_zone\"] = $this->setup->ini->readVariable(\"server\", \"timezone\");\n\t\t\n\t\t// https settings\n\t\t$values[\"auto_https_detect_enabled\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_enabled\");\n\t\t$values[\"auto_https_detect_header_name\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_header_name\");\n\t\t$values[\"auto_https_detect_header_value\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_header_value\");\n\n\t\t$this->form->setValuesByArray($values);\n\t}", "public function getConfigurationValues() {}", "protected function buildTypolinkConfiguration() {}", "public function getConfigurationValues() {}", "public function getConfigurationValues() {}", "public function getConfigurationValues() {}", "private function getAllConfig() {\n $this->user_panel->checkAuth();\n $this->config->findAll();\n }", "private function appSettings()\n {\n $getModuleUrl = function() {\n return strtok($this->module->getUrl(''), '?');\n };\n $removeExtraSlashes = function($url) {\n return preg_replace(\"/(?<!https:)(?<!http:)\\/{2,}/\", \"/\", $url);\n };\n $project_templates = [\n 'template for single study' => $this->module->getUrl('data/EPU_single.xml'),\n 'template for multiple studies' => $this->module->getUrl('data/EPU_multiple.xml'),\n ];\n $data = [\n 'module_version' => $this->module->VERSION,\n 'module_prefix' => $this->module->PREFIX,\n 'module_url' => $getModuleUrl(),\n 'redcap_root_url' => APP_PATH_WEBROOT_FULL,\n 'redcap_relative_url' => APP_PATH_WEBROOT,\n 'redcap_full_url' => $removeExtraSlashes(APP_PATH_WEBROOT_FULL.APP_PATH_WEBROOT),\n 'project_templates' => $project_templates,\n ];\n return $data;\n }", "public function generateConfigCommand()\n {\n $this->outputLine('Making the following config settings:');\n foreach ($this->configSettings as $key => $value) {\n $this->h5pFramework->setOption($key, $value);\n $this->outputLine(\"<b>$key:</b> $value\");\n }\n }", "public function getConfigurationExample() {\n\t\treturn '\nsource = xls\nsource {\n\t# in KB\n\tmaxFileSize = 10000 \n\tarchivePath = uploads/tx_cabagimport/\n\t\n\t# force charset if you have problems with umlaute\n\tforceCharset = en_US.UTF-8\n\t\n\t# interpreter which parses the data\n\tinterpret = csv\n\tinterpret {\n\t\t# csv options\n\t\tdelimiter = ,\n\t\t\n\t\tenclosure = \"\n\t}\n}';\n\t}", "public function createConfig()\n\t{\n\t}", "protected static function _processConfiguration()\n {\n\n //Pour la ligne de commandes\n global $argv;\n\n //Récupération des valeurs\n $key = Tools::getValue('key');\n $value = Tools::getValue('value',-1);\n $action_conf = Tools::getValue('action_conf', 'update');\n\t\t\t\t\n //Gestion via la ligne de commande\n if ($argv) {\n $allowsKeys = array('key','value','action_conf');\n\n foreach ($argv as $arg) {\n $arguments = explode('=', $arg);\n if (in_array($arguments[0], $allowsKeys)) {\n ${$arguments[0]} = $arguments[1];\n }\n }\n\t\t\t\n\t\t\tif ( self::$verbose )\n\t\t\t\techo 'Lancement via la ligne de commande '.self::$endOfLine;\n }\n\n if (!$key && $value == -1 ) {\n exit('Erreur Pas de clé et de valeur définie pour la configuration'.self::$endOfLine);\n }\n\n if (!in_array($action_conf, self::$configurationActionsAllowed)) {\n exit('Erreur action non autorisée pour la configuration '.self::$endOfLine);\n }\n\n if ($action_conf == 'update') {\n\t\t\techo 'On est bien dans update';\n\t\t\techo 'value '.$value;\n\t\t\tif ( $value == -1 )\n\t\t\t\texit('Erreur Impossible de mettre à jour la configuration, pas de valeur défine');\n Configuration::UpdateValue($key, $value);\n }\n\t\t elseif ( $action_conf == 'get'){\n\t\t\tif ( self::$verbose )\n\t\t\t\techo 'Valeur de la configuration'.$key.' '.Configuration::get($key).self::$endOfLine;\n\t\t\telse\t\n\t\t\t\techo Configuration::get($key);\n\t\t }else {\n Configuration::deleteByName($key);\n }\n\n\t\t if ( self::$verbose )\n\t\t\techo $action_conf.' effectuee pour la cle '.$key.' '.self::$endOfLine;\n }", "protected function createModuleInfo()\n {\n return new Core_ModuleInfo(\n \"SASS Compiler\",\n \"Automatically compiles SASS files\",\n \"Flynsarmy\" );\n }", "public function configs() {\n\n\t\t// Recommend plugins\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/tgm-plugin-activation-config.php' );\n\n\t\t// Post Series\n\t\tif ( get_theme_mod( 'post_series_enable', true ) ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'post-series/post-series-config.php' );\n\t\t}\n\n\t\t// Portfolio config\n\t\tif ( WPEX_PORTFOLIO_IS_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'portfolio/portfolio-config.php' );\n\t\t}\n\n\t\t// Staff config\n\t\tif ( WPEX_STAFF_IS_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'staff/staff-config.php' );\n\t\t}\n\n\t\t// Testimonials config\n\t\tif ( WPEX_TESTIMONIALS_IS_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'testimonials/testimonials-config.php' );\n\t\t}\n\n\t\t// WooCommerce config\n\t\tif ( WPEX_WOOCOMMERCE_ACTIVE ) {\n\n\t\t\t// WooCommerce core tweaks\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'woocommerce/woocommerce-config.php' );\n\n\t\t}\n\n\t\t// Visual composer config\n\t\tif ( WPEX_VC_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'visual-composer/visual-composer-config.php' );\n\t\t}\n\n\t\t// Tribe events config\n\t\tif ( WPEX_TRIBE_EVENTS_CALENDAR_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/tribe-events-config.php' );\n\t\t}\n\n\t\t// Revolution slider config\n\t\tif ( WPEX_REV_SLIDER_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/revslider-config.php' );\n\t\t}\n\n\t\t// WPML Config\n\t\tif ( WPEX_WPML_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/wpml-config.php' );\n\t\t}\n\n\t\t// Polylang Config\n\t\tif ( class_exists( 'Polylang' ) ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/polylang-config.php' );\n\t\t}\n\n\t}", "public function build_config_ui($host_obj, $context = null)\n {\n if ($context !== 'preview') \n {\n $host_obj->add_field('merchant_id', 'Merchant ID')->tab('Configuration')->\n renderAs(frm_text)->comment('Cardsave 15 digit Merchant ID', 'above')->\n validation()->fn('trim')->required('Please provide Merchant ID.');\n \n $host_obj->add_field('password', 'Password')->tab('Configuration')->\n renderAs(frm_text)->comment('Cardsave account password', 'above')->\n validation()->fn('trim')->required('Please provide a Cardsave account password');\n \n $host_obj->add_field('hash_method', 'Hash Method')->tab('Configuration')->\n renderAs(frm_dropdown)->comment('Hashing Method', 'above')->\n validation()->fn('trim')->required('Please provide a Hash Method');\n \n $host_obj->add_field('shared_key', 'Shared Key')->tab('Configuration')->\n renderAs(frm_text)->comment('Shared Key', 'above')->\n validation()->fn('trim')->required('Please provide a Shared Key');\n \n $host_obj->add_field('transaction_type', 'Transaction Type')->\n tab('Configuration')->renderAs(frm_dropdown)->\n comment('The type of credit card transaction you want to perform.', 'above');\n \n $host_obj->add_field('order_status', 'Order Status')->tab('Configuration')->\n renderAs(frm_dropdown)->comment('Select status to assign the order in \n case of successful payment.', 'above', true);\n }\n }", "public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }", "private function _Config() {\n $data['ttcConfig'] = $this->cNavMenuBuilder->Config();\n return $data;\n }", "private function lazy_get_config(): array\n\t{\n\t\treturn array_merge_recursive($this->configs['app'], $this->construct_options);\n\t}", "public function checkConstantsConfigFile($config)\n {\n if (!file_exists($config)) {\n $constantFile = fopen($config, 'w');\n $data = \"<?php \n return array(\n 'site_title' => '',\n 'site_logo' => '',\n 'site_email' => '',\n 'site_icon' => '',\n 'site_copyright' => '',\n 'stripe_publishable_key' => '',\n 'stripe_secret_key' => '',\n 'contact_number' => '',\n 'timezone' => '',\n \n 'demo_mode' => '',\n \n 'store_link_android_user' => '',\n 'version_android_user' => '',\n 'store_link_android_provider' => '',\n 'version_android_provider' => '',\n 'store_link_ios_user' => '',\n 'version_ios_user' => '',\n 'store_link_ios_provider' => '',\n 'version_ios_provider' => '',\n 'facebook_link' => '',\n 'instagram_link' => '',\n 'twitter_link' => '',\n \n 'social_login' => '',\n 'fb_public_key' => '',\n 'fb_secret_key' => '',\n 'fb_redirect_url' => '',\n 'google_public_key' => '',\n 'google_secret_key' => '',\n 'google_redirect_url' => '',\n \n 'provider_accept_timeout' => '',\n 'provider_search_radius' => '',\n 'distance_map' => '',\n \n 'map_key' => '',\n 'server_map_key' => '',\n 'fb_app_version' => '',\n 'android_sender_key' => '',\n \n 'ios_push_environment' => '',\n 'ios_push_user_permission' => '',\n 'ios_push_provider_permission' => '',\n 'ios_push_password' => '',\n 'android_push_key' => '',\n \n 'send_mail' => '',\n 'mail_driver' => '',\n 'mail_host' => '',\n 'mail_port' => '',\n 'mail_username' => '',\n 'mail_password' => '',\n 'mail_from_address' => '',\n 'mail_from_name' => '',\n 'mail_encryption' => '',\n 'referral' => '',\n 'referral_count' => '',\n 'referral_amount' => '',\n 'booking_id_prefix' => '',\n 'currency' => '',\n 'currency_exchange_key' => '',\n \n 'cash_payment' => '',\n 'online_payment' => '',\n 'stripe_payment' => '',\n\n 'ride_toll' => '0',\n 'ride_otp' => '0',\n \n 'payment_daily_target' => '',\n 'tax_percentage' => '',\n 'commission_percentage' => '',\n 'agent_commission_percentage' => '',\n 'payment_peakHours_commission' => '',\n 'payment_mini_negative_bal' => '',\n );\";\n\n fwrite($constantFile, $data);\n fclose($constantFile);\n chmod($config, 0777);\n }\n }", "public function config()\n {\n }", "function yy_r80(){$this->_retvalue = '$_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -1]->minor .')'; }" ]
[ "0.6280962", "0.6214347", "0.5860661", "0.5859436", "0.58045435", "0.57924974", "0.57888675", "0.57886624", "0.5590653", "0.5568784", "0.55463225", "0.5545489", "0.5538961", "0.55326027", "0.5529021", "0.5523924", "0.5517575", "0.5516098", "0.55001366", "0.5478547", "0.546973", "0.5460478", "0.5436637", "0.5417954", "0.53963256", "0.539512", "0.53815687", "0.53713334", "0.5356068", "0.5351617", "0.5347657", "0.5347657", "0.5347657", "0.5347657", "0.5347657", "0.5347657", "0.5347657", "0.5347657", "0.5346498", "0.5345497", "0.5342522", "0.5330947", "0.53288794", "0.53180784", "0.53063005", "0.5304178", "0.53016645", "0.5300146", "0.5299308", "0.5295344", "0.52931404", "0.52896804", "0.52817756", "0.5280408", "0.5279649", "0.52782714", "0.5265585", "0.5263038", "0.5260546", "0.5256573", "0.52557874", "0.52528644", "0.52520555", "0.5239754", "0.5237487", "0.5235368", "0.52342707", "0.5233589", "0.5230624", "0.5222958", "0.5218398", "0.52120656", "0.52092415", "0.52065027", "0.52031595", "0.5202485", "0.519179", "0.51912564", "0.5188109", "0.51856506", "0.51842093", "0.51839054", "0.5183754", "0.5183754", "0.5183754", "0.5181938", "0.51812243", "0.51806915", "0.51795715", "0.5170728", "0.51682", "0.51681936", "0.51659036", "0.51635075", "0.5160895", "0.51504844", "0.5141333", "0.51377445", "0.51376337", "0.51342404" ]
0.6259492
1
Compile session userdata; NOTE: parent method modified from private > protected,
protected function _compile_session_data() { if ( ! isset($this->CI->session)) { return; } $output = '<fieldset id="ci_profiler_csession" style="border:1px solid #000;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">'; $output .= '<legend style="color:#000;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_session_data').'&nbsp;&nbsp;(<span style="cursor: pointer;" onclick="var s=document.getElementById(\'ci_profiler_session_data\').style;s.display=s.display==\'none\'?\'\':\'none\';this.innerHTML=this.innerHTML==\''.$this->CI->lang->line('profiler_section_show').'\'?\''.$this->CI->lang->line('profiler_section_hide').'\':\''.$this->CI->lang->line('profiler_section_show').'\';">'.$this->CI->lang->line('profiler_section_show').'</span>)</legend>'; $output .= "<table style='width:100%;display:none' id='ci_profiler_session_data'>"; foreach ($this->CI->session->all_userdata() as $key => $val) { if (is_array($val)||is_object($val)) { $val = print_r($val, TRUE); } $output .= "<tr><td style='padding:5px; vertical-align: top;color:#900;background-color:#ddd;'>".$key."&nbsp;&nbsp;</td><td style='padding:5px; color:#000;background-color:#ddd;'>".htmlspecialchars($val)."</td></tr>\n"; } $output .= '</table>'; $output .= "</fieldset>"; return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function loadSessionData();", "protected function loadUserData()\n {\n $this->userData = ($this->session->userData?:[]) + $this->userDataTemplate;\n }", "protected function createUserDataScript() {\n\t\t$cdata_user = '\n\t\t\t//<![CDATA[\n\t\t\t var cursorImageUrl = \"'.$this->image_cursor_path.'\";\n\t\t\t var clickImageUrl = \"'.$this->image_click_path.'\";\n\t\t\t var recordingData = {\n\t\t\t \tvp_height: '.$this->viewPortHeight.',\n\t\t\t\tvp_width: '.$this->viewPortWidth.',\n\t\t\t\thovered: '.$this->hovered.',\n\t\t\t\tclicked: '.$this->clicked.',\n\t\t\t\tlost_focus: '.$this->lostFocus.',\n\t\t\t\tscrolls: '.$this->scrolls.',\n\t\t\t\tviewports: '.$this->viewports.'\n\t\t\t\t};\n\t\t\t window.parent.resizeFrame(recordingData.vp_height,recordingData.vp_width);\n\t\t\t//]]>\n\t\t\t';\n\t\t// create user data script\n\t\t$this->js_user_data = $this->doc->createInlineScript($cdata_user);\n\t}", "public function fetchSessionData() {}", "function cek_session(){\n echo '<pre>';\n print_r($this->session->all_userdata());\n echo '</pre>';\n }", "function profileUser(){\r\n\t\t$this->load->library('session');\r\n\t\t$alldata['loginsession'] = $this->session->userdata('loginsession');\r\n\t\t\r\n\t\tif(isset($alldata['loginsession']) && $alldata['loginsession']){\r\n\t\t\t$alldata['userid'] = $this->session->userdata('userid');\r\n\t\t\t$alldata['oper_id'] = $this->session->userdata('operid');\r\n\t\t\t$alldata['oper_hsc_no'] = $this->session->userdata('hscno');\r\n\t\t\t$alldata['oper_bc'] = $this->session->userdata('branchcode');\r\n\t\t\t$alldata['valid'] = $this->session->userdata('valid_user');\r\n\t\t\t$alldata['sirenK1'] = $this->session->userdata('sirenKelas1');\r\n\t\t\t$alldata['sirenK2'] = $this->session->userdata('sirenKelas2');\r\n\t\t}\r\n\t\t\r\n\t\treturn $alldata;\r\n\t}", "private function sessionLogin() {\r\n $this->uid = $this->sess->getUid();\r\n $this->email = $this->sess->getEmail();\r\n $this->fname = $this->sess->getFname();\r\n $this->lname = $this->sess->getLname();\r\n $this->isadmin = $this->sess->isAdmin();\r\n }", "protected function getCurrentUserData() {}", "protected function getCurrentUserData() {}", "function PrepareUserSession(){\n\t\t\n\t\t$User = $this->input->post('frm_MJ_User_Login');\n\n\t\t$this->load->model('UserModel', 'UM');\n\t\t$UserID = $this->UM->getUser($User); //added by raquib\n\t\t$UserType = $this->UM->getUserType($UserID, $User);\n\t\n\t\t//echo \"Usertype\".$UserType;\n\n\t\t$UserRole = $this->UM->getUserRole($UserType); // added by raquib\t\t\n\t\t$LoginDtl= $this->UM->getLoginDtl($UserID, $User); //added by raquib\n\t\tif (count($LoginDtl) >0) {\n\t\t\tforeach($LoginDtl as $lstl):\n \t\t$UserPrev= $lstl->MJ_USER_ROLE_TP;\n\t\t\tendforeach;\n\n\t\t}\n\n\t\t// this if condition added by raquib\n\t\tif ($UserType == 2 || $UserType == 5) {//User is employee and Pensioner\n\t\t\t$EmpUserData = $this->UM->getEmpData($UserID);\t\n\t\t\tforeach($EmpUserData as $eudata):\n\t\t\t$UserName= $eudata->EMPNAME;\n\t\t\t$UserEmail = $eudata->EMP_EMAIL_ID;\n \t\t$DepId= $eudata->EMP_POST_DEP;\n \t\t$DepDesc= $eudata->DEP_DESC;\n\t\t\tendforeach;\n\n\t\t} elseif ($UserType == 1 || $UserType == 4) {//User is student and Alimni\n\t\t\t$StuUserData = $this->UM->getStuData($UserID);\n\t\t\tforeach($StuUserData as $sudata):\n\t\t\t$UserName=$sudata->STUNAME;\n \t\t$SsmId= $sudata->STU_SSM_ID;\n \t\t$DepId= $sudata->STU_DEPT;\n \t\t$DepDesc=$sudata->DEPTNAME;\n\t\t\tendforeach;\n\t\t} else { //added by raquib\n\t\t\t$AdminUserData = $this->UM->getAdminName($UserID);\n\t\t\tforeach($AdminUserData as $audata):\n\t\t\t$UserName= $audata->ADMINNAME;\n\t\t\t$UserEmail = $audata->EMAILID;\n \t\t$AdminDepId= $audata->DEPID;\n \t\t$AdminDepDesc= $audata->DEP_NAME;\n\t\t\tendforeach;\n\t\t}\n\t\t\n\t\t$this->load->model('MenuModel');\n\t\t$UserMenu = $this->MenuModel->getUserMenu($UserType);\n\t\t$MenuPrev = $this->MenuModel->getMenuPrev($UserType);\n\n\t\t$sessionData = array(\n\t\t\t'user'\t\t=> \t$User,\n\t\t\t'login'\t\t=> \t$UserID,\n \t'username' => \t$UserName,\n \t'useremail' => \t$UserEmail,\n \t'userprev'\t=>\t$UserPrev,\n \t'usertype'\t=>\t$UserType,\n \t'userrole'\t=>\t$UserRole,\n \t'menu' \t\t=> \t$UserMenu,\n \t'menuprev'\t=>\t$MenuPrev,\n \t'ssmid'\t\t=>\t$SsmId,\n \t'depid'\t\t=>\t$DepId,\n \t'depdesc'\t=>\t$DepDesc,\n \t'admindepid'=>\t$AdminDepId,\n \t'admindepdesc'=>$AdminDepDesc\n\t\t);\n\n\t\t$this->session->set_userdata($sessionData);\n\t}", "function load(){\n\t\t$this->ctrl = (int)$_SESSION['ctrl'];\n\t\t$this->id = (int)$_SESSION['USid'];\n\t\t$this->name = (string)$_SESSION['USname'];\n\t\t$this->email = (string)$_SESSION['USemail'];\n\t\t$this->lastlogin = (string)$_SESSION['USlastlogin'];\n\t\t$this->priv = (int)$_SESSION['priv'];\n\t\t$this->logontries = (int)$_SESSION['logontries'];\n\t\t$this->agentid = @(int)$_SESSION['USagentid'];\n\t}", "function _read_user_session_db()\n {\n if (!$this->sessionModel->read()) {return false;}\n\t\t\n\t\t$this->user = SHIN_Core::$_models['sys_user_model']->get_instance();\n\n if (!$this->user->fetchByID($this->sessionModel->uid)) {\n\t\t\t$pk = $this->user->primary_key;\n $this->user->$pk = 0;\n return false;\n }\n\n\t\t$pk = $this->user->primary_key;\n\t\tSHIN_Core::$_user = $this->user;\n\t\t\n\t\t// addons for new field added //////////////////////////\n\t\t// request by Stefano. Detail: http://binary-studio.office-on-the.net/issues/5287\n\t\t//$data = array('updated' => date('Y-m-d H:i:s'));\n\t\t//SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->where('idUser', SHIN_Core::$_user->idUser);\n\t\t//SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->update('sys_user', $data); \t\t\n\t\t////////////////////////////////////////////////////////\t\t\n\n\t\t// lang //////////////////////////////////////////////////////////////////////////////\n\t\t$_current_language = '';\n\t\t//dump(SHIN_Core::$_libs['session']->userdata('language'));\n\t\tif(SHIN_Core::$_libs['session']->userdata('language')){\n\t\t\t$_current_language = SHIN_Core::$_libs['session']->userdata('language');\n\t\t} else {\n\t\t\t$_current_language = SHIN_Core::$_user->lang;\n\t\t}\n\t\tif($_current_language == '') {$_current_language = SHIN_Core::$_config['lang']['language'];} \n//\t\tSHIN_Core::$_libs['session']->set_userdata('language', $_current_language);\n\t\t//dump($_current_language);\n\t\t\n\t\t// addons from Dimas (need disscuss with Stefano) \n\t\t// Logic follow. each application can override native language /////\n\t\t// if($_current_language != SHIN_Core::$_config['lang']['language']){\n\t\t// $_current_language = SHIN_Core::$_config['lang']['language'];\n\t\t// }\n\t\t////////////////////////////////////////////////////////////////////\n\n\t\tSHIN_Core::$_language->load('app', $_current_language);\n\t SHIN_Core::$_current_lang = $_current_language;\n\t SHIN_Core::log('debug', '[LANGUAGE] Current language: '.SHIN_Core::$_current_lang);\n\t\t//////////////////////////////////////////////////////////////////////////////////////\n \n\t\t// theme /////////////////////////////////////////////////////////////////////////////\n\t\t$_current_theme = '';\n if(SHIN_Core::$_libs['session']->userdata('theme')){\n $_current_theme = SHIN_Core::$_libs['session']->userdata('theme');\n } else {\n\t\t\t$_current_theme = SHIN_Core::$_user->theme;\n }\n\t\tif($_current_theme == '') {SHIN_Core::$_config['theme']['default_theme'];}\n\n\t SHIN_Core::$_theme = $_current_theme;\n\t\t//////////////////////////////////////////////////////////////////////////////////////\n\n return true;\n }", "protected function _initialize_userdata()\n\t{\n\t\t// my_* cookies used by guests in the comment form\n\t\t$this->userdata = array(\n\t\t\t'username'\t\t\t=> ee('Cookie')->getSignedCookie('my_name', TRUE),\n\t\t\t'screen_name'\t\t=> '',\n\t\t\t'email'\t\t\t\t=> ee('Cookie')->getSignedCookie('my_email', TRUE),\n\t\t\t'url'\t\t\t\t=> ee('Cookie')->getSignedCookie('my_url', TRUE),\n\t\t\t'location'\t\t\t=> ee('Cookie')->getSignedCookie('my_location', TRUE),\n\t\t\t'language'\t\t\t=> '',\n\t\t\t'timezone'\t\t\t=> ee()->config->item('default_site_timezone'),\n\t\t\t'date_format'\t\t=> ee()->config->item('date_format') ? ee()->config->item('date_format') : '%n/%j/%Y',\n\t\t\t'time_format'\t\t=> ee()->config->item('time_format') ? ee()->config->item('time_format') : '12',\n\t\t\t'include_seconds'\t=> ee()->config->item('include_seconds') ? ee()->config->item('include_seconds') : 'n',\n\t\t\t'group_id'\t\t\t=> '3',\n\t\t\t'access_cp'\t\t\t=> 0,\n\t\t\t'last_visit'\t\t=> 0,\n\t\t\t'is_banned'\t\t\t=> $this->_do_ban_check(),\n\t\t\t'ignore_list'\t\t=> array()\n\t\t);\n\t}", "public function __construct() {\n \n parent::__construct();\n \n $this->sessionUser = Zf_SessionHandler::zf_getSessionVariable(\"ttv_identificationCode\");\n \n \n }", "function OnProcess() {\n\n $this->login = $this->Request->ToString(\"login\", \"\", 1, 32);\n $this->password = $this->Request->ToString(\"password\", \"\", 1, 32);\n $this->packagefrom = $this->Request->ToString(\"frompackage\", \"\");\n $this->former_query = $this->Request->ToString(\"query\", \"\");\n\n $UsersTable = new UsersTable($this->Kernel->Connection, $this->Kernel->Settings->GetItem(\"Authorization\", \"AuthorizeTable\"));\n //die(pr($UsersTable));\n $data = $UsersTable->GetByFields(array($this->Kernel->Settings->GetItem(\"Authorization\", \"FLD_login\") => $this->login));\n\n if (!count($data) || $data[\"active\"]==0) {\n $this->AddErrorMessage(\"UserLogonPage\", \"INVALID_LOGIN\");\n return;\n }\n\n $_pass = $data[$this->Kernel->Settings->GetItem(\"Authorization\", \"FLD_password\")];\n if($this->Kernel->Settings->GetItem(\"Authorization\", \"FLG_MD5_PASSWORD\")) {\n $this->password = md5($this->password);\n }\n\n if($_pass != $this->password){\n $this->AddErrorMessage(\"UserLogonPage\", \"INVALID_PASSWORD\");\n return;\n }\n\n if(!$this->Kernel->Settings->GetItem(\"Authorization\", \"FLG_MD5_PASSWORD\")) {\n $this->password = md5($this->password);\n }\n\n $this->Session = new ControlSession($this, $CookieName);\n session_start();\n $login_var = $this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_Login\");\n $password_var = $this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_Password\");\n\n $GLOBALS[$login_var] = $this->login;\n $GLOBALS[$password_var] = $this->password;\n\n $this->Session->Set($this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_Login\"), $this->login);\n $this->Session->Set($this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_Password\"), $this->password);\n $this->Session->Set($this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_UserId\"), $data[$this->Kernel->Settings->GetItem(\"Authorization\", \"FLD_user_id\")]);\n\n if (strlen($this->camefrom)) {\n $this->Response->Redirect($this->Kernel->Settings->GetItem(\"MODULE\",\"SiteURL\").$this->camefrom);\n } else {\n $this->Auth->DefaultRedirect(\"Frontend\");\n }\n }", "protected function fetchUserSessionFromDB() {}", "private function construct_user_sessions_log(user_data $userdata) {\n global $USER;\n $context = context_module::instance($userdata->filtercontrols->cm->id);\n\n $shortform = false;\n if ($USER->id == $userdata->user->id) {\n // This is a user viewing their own stuff - hide non-relevant columns.\n $shortform = true;\n }\n\n $table = new html_table();\n $table->attributes['class'] = 'generaltable attwidth boxaligncenter';\n $table->head = array();\n $table->align = array();\n $table->size = array();\n $table->colclasses = array();\n if (!$shortform) {\n $table->head[] = get_string('sessiontypeshort', 'attendance');\n $table->align[] = '';\n $table->size[] = '1px';\n $table->colclasses[] = '';\n }\n $table->head[] = get_string('date');\n $table->head[] = get_string('description', 'attendance');\n\n $table->align = array_merge($table->align, array('', 'left'));\n $table->colclasses = array_merge($table->colclasses, array('datecol', 'desccol'));\n $table->size = array_merge($table->size, array('1px', '*'));\n\n // Add custom fields.\n $customfields = [];\n if (!empty($userdata->sessionslog)) {\n $sessionids = [];\n foreach ($userdata->sessionslog as $s) {\n $sessionids[] = $s->id;\n }\n $handler = \\mod_attendance\\customfield\\session_handler::create();\n $customfields = $handler->get_fields_for_display(reset($sessionids)); // Pass first sessionid.\n $customfieldsdata = $handler->get_instances_data($sessionids);\n }\n foreach ($customfields as $field) {\n $table->head[] = $field->get_formatted_name();\n $table->align[] = '';\n $table->size[] = '';\n $table->colclasses[] = 'customfield';\n }\n $table->head[] = get_string('status', 'attendance');\n $table->head[] = get_string('points', 'attendance');\n $table->head[] = get_string('remarks', 'attendance');\n\n $table->align = array_merge($table->align, array('center', 'center', 'center'));\n $table->colclasses = array_merge($table->colclasses, array('statuscol', 'pointscol', 'remarkscol'));\n $table->size = array_merge($table->size, array('*', '1px', '*'));\n\n if (has_capability('mod/attendance:takeattendances', $context)) {\n $table->head[] = get_string('action');\n $table->align[] = '';\n $table->size[] = '';\n }\n\n $statussetmaxpoints = attendance_get_statusset_maxpoints($userdata->statuses);\n\n $i = 0;\n foreach ($userdata->sessionslog as $sess) {\n $i++;\n\n $row = new html_table_row();\n if (!$shortform) {\n if ($sess->groupid) {\n $sessiontypeshort = get_string('group') . ': ' . $userdata->groups[$sess->groupid]->name;\n } else {\n $sessiontypeshort = get_string('commonsession', 'attendance');\n }\n\n $row->cells[] = html_writer::tag('nobr', $sessiontypeshort);\n }\n $row->cells[] = userdate($sess->sessdate, get_string('strftimedmyw', 'attendance')) .\n \" \". $this->construct_time($sess->sessdate, $sess->duration);\n $row->cells[] = format_text($sess->description);\n foreach ($customfields as $field) {\n if (isset($customfieldsdata[$sess->id][$field->get('id')])) {\n $row->cells[] = $customfieldsdata[$sess->id][$field->get('id')]->get('value');\n } else {\n $row->cells[] = '';\n }\n }\n\n if (!empty($sess->statusid)) {\n $updatelink = '';\n $status = $userdata->statuses[$sess->statusid];\n list($canmark, $reason) = attendance_can_student_mark($sess, false);\n if (attendance_check_allow_update($sess->id) && $canmark) {\n $url = new moodle_url('/mod/attendance/attendance.php',\n array('sessid' => $sess->id, 'sesskey' => sesskey()));\n $updatelink = \"<br>\".html_writer::link($url, get_string('updateattendance', 'attendance'));\n }\n $row->cells[] = $status->description.$updatelink;\n $row->cells[] = format_float($status->grade, 1, true, true) . ' / ' .\n format_float($statussetmaxpoints[$status->setnumber], 1, true, true);\n $row->cells[] = $sess->remarks;\n } else if (($sess->sessdate + $sess->duration) < $userdata->user->enrolmentstart) {\n $cell = new html_table_cell(get_string('enrolmentstart', 'attendance',\n userdate($userdata->user->enrolmentstart, '%d.%m.%Y')));\n $cell->colspan = 3;\n $row->cells[] = $cell;\n } else if ($userdata->user->enrolmentend && $sess->sessdate > $userdata->user->enrolmentend) {\n $cell = new html_table_cell(get_string('enrolmentend', 'attendance',\n userdate($userdata->user->enrolmentend, '%d.%m.%Y')));\n $cell->colspan = 3;\n $row->cells[] = $cell;\n } else {\n list($canmark, $reason) = attendance_can_student_mark($sess, false);\n if ($canmark) {\n // Student can mark their own attendance.\n // URL to the page that lets the student modify their attendance.\n $url = new moodle_url('/mod/attendance/attendance.php',\n array('sessid' => $sess->id, 'sesskey' => sesskey()));\n if (attendance_session_open_for_students($sess)) {\n if ($sess->rotateqrcode == 1) {\n $url = new moodle_url('/mod/attendance/attendance.php');\n $output = html_writer::empty_tag('input', ['type' => 'hidden', 'name' => 'sessid',\n 'value' => $sess->id]);\n $output .= html_writer::empty_tag('input', ['type' => 'text', 'name' => 'qrpass',\n 'placeholder' => \"Enter password\"]);\n $output .= html_writer::empty_tag('input', ['type' => 'submit',\n 'value' => get_string('submit'),\n 'class' => 'btn btn-secondary']);\n $cell = new html_table_cell(html_writer::tag('form', $output,\n ['action' => $url->out(), 'method' => 'get']));\n } else {\n $cell = new html_table_cell(html_writer::link($url, get_string('submitattendance', 'attendance')));\n }\n } else {\n $cell = new html_table_cell(html_writer::link($url, get_string('submitattendancefuture', 'attendance')));\n }\n $cell->colspan = 3;\n $row->cells[] = $cell;\n } else { // Student cannot mark their own attendace.\n $row->cells[] = '?';\n $row->cells[] = '? / ' . format_float($statussetmaxpoints[$sess->statusset], 1, true, true);\n $row->cells[] = '';\n }\n }\n\n if (has_capability('mod/attendance:takeattendances', $context)) {\n $params = array('id' => $userdata->filtercontrols->cm->id,\n 'sessionid' => $sess->id,\n 'grouptype' => $sess->groupid);\n $url = new moodle_url('/mod/attendance/take.php', $params);\n $icon = $this->output->pix_icon('redo', get_string('changeattendance', 'attendance'), 'attendance');\n $row->cells[] = html_writer::link($url, $icon);\n }\n\n $table->data[] = $row;\n }\n\n return html_writer::table($table);\n }", "function get_cur_userdata(){\n //get the session id from session\n if($this->loggedin){\n if(empty($this->cur_userdata)){\n $user_ses_code = $this->session->userdata('ses_code');\n $result = $this->db->query(\"SELECT * FROM users INNER JOIN session ON session.ses_userid = users.user_id WHERE session.ses_code = '\".$user_ses_code.\"' LIMIT 1\");\n \n $this->cur_userdata = $result->row();\n }\n \n return $this->cur_userdata;\n \n }else{\n \n }\n }", "public function setSessionUserData(){\r\n\t\t$data = array();\r\n\t\t$res = $this->curd_m->get_search(\"SELECT u.fld_balance_type AS balanceType,u.fld_reseller_id AS fld_reseller_id, g.group_id AS group_id, r.name AS name FROM users u INNER JOIN users_groups g INNER JOIN groups r WHERE u.id=\".$this->session->userdata('userId').\" AND u.id = g.user_id AND g.group_id=r.id \",'object');\r\n\r\n\t\tif($res!==NULL && sizeof($res)==1){\r\n\t\t\t$data['reseller'] = $res[0]->fld_reseller_id;\r\n\t\t\t$data['gname'] = $res[0]->name;\r\n\t\t\t$data['groupId'] = $res[0]->group_id;\r\n\t\t\t$data['balanceType'] = $res[0]->balanceType;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t$res = $this->curd_m->get_search(\"SELECT r.fld_int_id AS fld_int_id ,r.fld_chr_acro AS fld_chr_acro FROM country r INNER JOIN users_country c INNER JOIN users u WHERE u.id=\".$this->session->userdata('userId').\" AND u.id = c.fld_user_id AND c.fld_country_id=r.fld_int_id \",'object');\r\n\t\tif($res!==NULL && sizeof($res)==1){\r\n\t\t\t$data['countryId'] = $res[0]->fld_int_id;\r\n\t\t\t$data['countryAcro'] = $res[0]->fld_chr_acro;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t$this->session->set_userdata($data);\r\n\t\treturn TRUE;\r\n\r\n\r\n\t}", "private function loginWithSessionData()\n { \n $this->user_name = $_SESSION['user_name'];\n $this->user_email = $_SESSION['user_email'];\n\n // set logged in status to true, because we just checked for this:\n //if(!empty($_SESSION['user_name']) && ($_SESSION['user_logged_in'] == 1)\n // when we called this method (in the constructor)\n $this->user_is_logged_in = true;\n \n if($_SESSION['user_privileges'] == 1)\n $this->user_admin = true;\n }", "abstract protected function getSession();", "public function user_session($data)\n {\n session_start();\n $_SESSION[\"id\"] = $data['id'];\n $_SESSION[\"username\"]\t= $data['username'];\n $_SESSION[\"isloggedin\"] = true;\n }", "private function construct_user_allsessions_log(user_data $userdata) {\n global $USER;\n\n $allsessions = new stdClass();\n\n $shortform = false;\n if ($USER->id == $userdata->user->id) {\n // This is a user viewing their own stuff - hide non-relevant columns.\n $shortform = true;\n }\n\n $groupby = $userdata->pageparams->groupby;\n\n $table = new html_table();\n $table->attributes['class'] = 'generaltable attwidth boxaligncenter allsessions';\n $table->head = array();\n $table->align = array();\n $table->size = array();\n $table->colclasses = array();\n $colcount = 0;\n $summarywidth = 0;\n\n // If grouping by date, we need some form of date up front.\n // Only need course column if we are not using course to group\n // (currently date is only option which does not use course).\n if ($groupby === 'date') {\n $table->head[] = '';\n $table->align[] = 'left';\n $table->colclasses[] = 'grouper';\n $table->size[] = '1px';\n\n $table->head[] = get_string('date');\n $table->align[] = 'left';\n $table->colclasses[] = 'datecol';\n $table->size[] = '1px';\n $colcount++;\n\n $table->head[] = get_string('course');\n $table->align[] = 'left';\n $table->colclasses[] = 'colcourse';\n $colcount++;\n } else {\n $table->head[] = '';\n $table->align[] = 'left';\n $table->colclasses[] = 'grouper';\n $table->size[] = '1px';\n if ($groupby === 'activity') {\n $table->head[] = '';\n $table->align[] = 'left';\n $table->colclasses[] = 'grouper';\n $table->size[] = '1px';\n }\n }\n\n // Need activity column unless we are using activity to group.\n if ($groupby !== 'activity') {\n $table->head[] = get_string('pluginname', 'mod_attendance');\n $table->align[] = 'left';\n $table->colclasses[] = 'colcourse';\n $table->size[] = '*';\n $colcount++;\n }\n\n // If grouping by date, it belongs up front rather than here.\n if ($groupby !== 'date') {\n $table->head[] = get_string('date');\n $table->align[] = 'left';\n $table->colclasses[] = 'datecol';\n $table->size[] = '1px';\n $colcount++;\n }\n\n // Use \"session\" instead of \"description\".\n $table->head[] = get_string('session', 'attendance');\n $table->align[] = 'left';\n $table->colclasses[] = 'desccol';\n $table->size[] = '*';\n $colcount++;\n\n if (!$shortform) {\n $table->head[] = get_string('sessiontypeshort', 'attendance');\n $table->align[] = '';\n $table->size[] = '*';\n $table->colclasses[] = '';\n $colcount++;\n }\n\n if (!empty($USER->attendanceediting)) {\n $table->head[] = get_string('status', 'attendance');\n $table->align[] = 'center';\n $table->colclasses[] = 'statuscol';\n $table->size[] = '*';\n $colcount++;\n $summarywidth++;\n\n $table->head[] = get_string('remarks', 'attendance');\n $table->align[] = 'center';\n $table->colclasses[] = 'remarkscol';\n $table->size[] = '*';\n $colcount++;\n $summarywidth++;\n } else {\n $table->head[] = get_string('status', 'attendance');\n $table->align[] = 'center';\n $table->colclasses[] = 'statuscol';\n $table->size[] = '*';\n $colcount++;\n $summarywidth++;\n\n $table->head[] = get_string('points', 'attendance');\n $table->align[] = 'center';\n $table->colclasses[] = 'pointscol';\n $table->size[] = '1px';\n $colcount++;\n $summarywidth++;\n\n $table->head[] = get_string('remarks', 'attendance');\n $table->align[] = 'center';\n $table->colclasses[] = 'remarkscol';\n $table->size[] = '*';\n $colcount++;\n $summarywidth++;\n }\n\n $statusmaxpoints = array();\n foreach ($userdata->statuses as $attid => $attstatuses) {\n $statusmaxpoints[$attid] = attendance_get_statusset_maxpoints($attstatuses);\n }\n\n $lastgroup = array(null, null);\n $groups = array();\n $stats = array(\n 'course' => array(),\n 'activity' => array(),\n 'date' => array(),\n 'overall' => array(\n 'points' => 0,\n 'maxpointstodate' => 0,\n 'maxpoints' => 0,\n 'pcpointstodate' => null,\n 'pcpoints' => null,\n 'statuses' => array()\n )\n );\n $group = null;\n if ($userdata->sessionslog) {\n foreach ($userdata->sessionslog as $sess) {\n if ($groupby === 'date') {\n $weekformat = date(\"YW\", $sess->sessdate);\n if ($weekformat != $lastgroup[0]) {\n if ($group !== null) {\n array_push($groups, $group);\n }\n $group = array();\n $lastgroup[0] = $weekformat;\n }\n if (!array_key_exists($weekformat, $stats['date'])) {\n $stats['date'][$weekformat] = array(\n 'points' => 0,\n 'maxpointstodate' => 0,\n 'maxpoints' => 0,\n 'pcpointstodate' => null,\n 'pcpoints' => null,\n 'statuses' => array()\n );\n }\n $statussetmaxpoints = $statusmaxpoints[$sess->attendanceid];\n // Ensure all possible acronyms for current sess's statusset are available as\n // keys in status array for period.\n //\n // A bit yucky because we can't tell whether we've seen statusset before, and\n // we usually will have, so much wasted spinning.\n foreach ($userdata->statuses[$sess->attendanceid] as $attstatus) {\n if ($attstatus->setnumber === $sess->statusset) {\n if (!array_key_exists($attstatus->acronym, $stats['date'][$weekformat]['statuses'])) {\n $stats['date'][$weekformat]['statuses'][$attstatus->acronym] =\n array('count' => 0, 'description' => $attstatus->description);\n }\n if (!array_key_exists($attstatus->acronym, $stats['overall']['statuses'])) {\n $stats['overall']['statuses'][$attstatus->acronym] =\n array('count' => 0, 'description' => $attstatus->description);\n }\n }\n }\n // The array_key_exists check is for hidden statuses.\n if (isset($sess->statusid) && array_key_exists($sess->statusid, $userdata->statuses[$sess->attendanceid])) {\n $status = $userdata->statuses[$sess->attendanceid][$sess->statusid];\n $stats['date'][$weekformat]['statuses'][$status->acronym]['count']++;\n $stats['date'][$weekformat]['points'] += $status->grade;\n $stats['date'][$weekformat]['maxpointstodate'] += $statussetmaxpoints[$sess->statusset];\n $stats['overall']['statuses'][$status->acronym]['count']++;\n $stats['overall']['points'] += $status->grade;\n $stats['overall']['maxpointstodate'] += $statussetmaxpoints[$sess->statusset];\n }\n $stats['date'][$weekformat]['maxpoints'] += $statussetmaxpoints[$sess->statusset];\n $stats['overall']['maxpoints'] += $statussetmaxpoints[$sess->statusset];\n } else {\n // By course and perhaps activity.\n if (\n ($sess->courseid != $lastgroup[0]) ||\n ($groupby === 'activity' && $sess->cmid != $lastgroup[1])\n ) {\n if ($group !== null) {\n array_push($groups, $group);\n }\n $group = array();\n $lastgroup[0] = $sess->courseid;\n $lastgroup[1] = $sess->cmid;\n }\n if (!array_key_exists($sess->courseid, $stats['course'])) {\n $stats['course'][$sess->courseid] = array(\n 'points' => 0,\n 'maxpointstodate' => 0,\n 'maxpoints' => 0,\n 'pcpointstodate' => null,\n 'pcpoints' => null,\n 'statuses' => array()\n );\n }\n $statussetmaxpoints = $statusmaxpoints[$sess->attendanceid];\n // Ensure all possible acronyms for current sess's statusset are available as\n // keys in status array for course\n //\n // A bit yucky because we can't tell whether we've seen statusset before, and\n // we usually will have, so much wasted spinning.\n foreach ($userdata->statuses[$sess->attendanceid] as $attstatus) {\n if ($attstatus->setnumber === $sess->statusset) {\n if (!array_key_exists($attstatus->acronym, $stats['course'][$sess->courseid]['statuses'])) {\n $stats['course'][$sess->courseid]['statuses'][$attstatus->acronym] =\n array('count' => 0, 'description' => $attstatus->description);\n }\n if (!array_key_exists($attstatus->acronym, $stats['overall']['statuses'])) {\n $stats['overall']['statuses'][$attstatus->acronym] =\n array('count' => 0, 'description' => $attstatus->description);\n }\n }\n }\n // The array_key_exists check is for hidden statuses.\n if (isset($sess->statusid) && array_key_exists($sess->statusid, $userdata->statuses[$sess->attendanceid])) {\n $status = $userdata->statuses[$sess->attendanceid][$sess->statusid];\n $stats['course'][$sess->courseid]['statuses'][$status->acronym]['count']++;\n $stats['course'][$sess->courseid]['points'] += $status->grade;\n $stats['course'][$sess->courseid]['maxpointstodate'] += $statussetmaxpoints[$sess->statusset];\n $stats['overall']['statuses'][$status->acronym]['count']++;\n $stats['overall']['points'] += $status->grade;\n $stats['overall']['maxpointstodate'] += $statussetmaxpoints[$sess->statusset];\n }\n $stats['course'][$sess->courseid]['maxpoints'] += $statussetmaxpoints[$sess->statusset];\n $stats['overall']['maxpoints'] += $statussetmaxpoints[$sess->statusset];\n\n if (!array_key_exists($sess->cmid, $stats['activity'])) {\n $stats['activity'][$sess->cmid] = array(\n 'points' => 0,\n 'maxpointstodate' => 0,\n 'maxpoints' => 0,\n 'pcpointstodate' => null,\n 'pcpoints' => null,\n 'statuses' => array()\n );\n }\n $statussetmaxpoints = $statusmaxpoints[$sess->attendanceid];\n // Ensure all possible acronyms for current sess's statusset are available as\n // keys in status array for period\n //\n // A bit yucky because we can't tell whether we've seen statusset before, and\n // we usually will have, so much wasted spinning.\n foreach ($userdata->statuses[$sess->attendanceid] as $attstatus) {\n if ($attstatus->setnumber === $sess->statusset) {\n if (!array_key_exists($attstatus->acronym, $stats['activity'][$sess->cmid]['statuses'])) {\n $stats['activity'][$sess->cmid]['statuses'][$attstatus->acronym] =\n array('count' => 0, 'description' => $attstatus->description);\n }\n if (!array_key_exists($attstatus->acronym, $stats['overall']['statuses'])) {\n $stats['overall']['statuses'][$attstatus->acronym] =\n array('count' => 0, 'description' => $attstatus->description);\n }\n }\n }\n // The array_key_exists check is for hidden statuses.\n if (isset($sess->statusid) && array_key_exists($sess->statusid, $userdata->statuses[$sess->attendanceid])) {\n $status = $userdata->statuses[$sess->attendanceid][$sess->statusid];\n $stats['activity'][$sess->cmid]['statuses'][$status->acronym]['count']++;\n $stats['activity'][$sess->cmid]['points'] += $status->grade;\n $stats['activity'][$sess->cmid]['maxpointstodate'] += $statussetmaxpoints[$sess->statusset];\n }\n $stats['activity'][$sess->cmid]['maxpoints'] += $statussetmaxpoints[$sess->statusset];\n $stats['overall']['maxpoints'] += $statussetmaxpoints[$sess->statusset];\n }\n array_push($group, $sess);\n }\n array_push($groups, $group);\n }\n\n $points = $stats['overall']['points'];\n $maxpoints = $stats['overall']['maxpointstodate'];\n $summarytable = new html_table();\n $summarytable->attributes['class'] = 'generaltable table-bordered table-condensed';\n $row = new html_table_row();\n $cell = new html_table_cell(get_string('allsessionstotals', 'attendance'));\n $cell->colspan = 2;\n $cell->header = true;\n $row->cells[] = $cell;\n $summarytable->data[] = $row;\n foreach ($stats['overall']['statuses'] as $acronym => $status) {\n $row = new html_table_row();\n $row->cells[] = $status['description'] . \":\";\n $row->cells[] = $status['count'];\n $summarytable->data[] = $row;\n }\n\n $row = new html_table_row();\n if ($maxpoints !== 0) {\n $pctodate = format_float( $points * 100 / $maxpoints);\n $pointsinfo = get_string('points', 'attendance') . \": \" . $points . \"/\" . $maxpoints;\n $pointsinfo .= \" (\" . $pctodate . \"%)\";\n } else {\n $pointsinfo = get_string('points', 'attendance') . \": \" . $points . \"/\" . $maxpoints;\n }\n $pointsinfo .= \" \" . get_string('todate', 'attendance');\n $cell = new html_table_cell($pointsinfo);\n $cell->colspan = 2;\n $row->cells[] = $cell;\n $summarytable->data[] = $row;\n $allsessions->summary = html_writer::table($summarytable);\n\n $lastgroup = array(null, null);\n foreach ($groups as $group) {\n\n $statussetmaxpoints = $statusmaxpoints[$sess->attendanceid];\n\n // For use in headings etc.\n $sess = $group[0];\n\n if ($groupby === 'date') {\n $row = new html_table_row();\n $row->attributes['class'] = 'grouper';\n $cell = new html_table_cell();\n $cell->rowspan = count($group) + 2;\n $row->cells[] = $cell;\n $week = date(\"W\", $sess->sessdate);\n $year = date(\"Y\", $sess->sessdate);\n // ISO week starts on day 1, Monday.\n $weekstart = date_timestamp_get(date_isodate_set(date_create(), $year, $week, 1));\n $dmywformat = get_string('strftimedmyw', 'attendance');\n $cell = new html_table_cell(get_string('weekcommencing', 'attendance') . \": \" . userdate($weekstart, $dmywformat));\n $cell->colspan = $colcount - $summarywidth;\n $cell->rowspan = 2;\n $cell->attributes['class'] = 'groupheading';\n $row->cells[] = $cell;\n $weekformat = date(\"YW\", $sess->sessdate);\n $points = $stats['date'][$weekformat]['points'];\n $maxpoints = $stats['date'][$weekformat]['maxpointstodate'];\n if ($maxpoints !== 0) {\n $pctodate = format_float( $points * 100 / $maxpoints);\n $summary = get_string('points', 'attendance') . \": \" . $points . \"/\" . $maxpoints;\n $summary .= \" (\" . $pctodate . \"%)\";\n } else {\n $summary = get_string('points', 'attendance') . \": \" . $points . \"/\" . $maxpoints;\n }\n $summary .= \" \" . get_string('todate', 'attendance');\n $cell = new html_table_cell($summary);\n $cell->colspan = $summarywidth;\n $row->cells[] = $cell;\n $table->data[] = $row;\n $row = new html_table_row();\n $row->attributes['class'] = 'grouper';\n $summary = array();\n foreach ($stats['date'][$weekformat]['statuses'] as $acronym => $status) {\n array_push($summary, html_writer::tag('b', $acronym) . $status['count']);\n }\n $cell = new html_table_cell(implode(\" \", $summary));\n $cell->colspan = $summarywidth;\n $row->cells[] = $cell;\n $table->data[] = $row;\n $lastgroup[0] = date(\"YW\", $weekstart);\n } else {\n if ($groupby === 'course' || $sess->courseid !== $lastgroup[0]) {\n $row = new html_table_row();\n $row->attributes['class'] = 'grouper';\n $cell = new html_table_cell();\n $cell->rowspan = count($group) + 2;\n if ($groupby === 'activity') {\n $headcell = $cell; // Keep ref to be able to adjust rowspan later.\n $cell->rowspan += 2;\n $row->cells[] = $cell;\n $cell = new html_table_cell();\n $cell->rowspan = 2;\n }\n $row->cells[] = $cell;\n $courseurl = new moodle_url('/course/view.php', array('id' => $sess->courseid));\n $cell = new html_table_cell(get_string('course', 'attendance') . \": \" .\n html_writer::link($courseurl, $sess->cname));\n $cell->colspan = $colcount - $summarywidth;\n $cell->rowspan = 2;\n $cell->attributes['class'] = 'groupheading';\n $row->cells[] = $cell;\n $points = $stats['course'][$sess->courseid]['points'];\n $maxpoints = $stats['course'][$sess->courseid]['maxpointstodate'];\n if ($maxpoints !== 0) {\n $pctodate = format_float( $points * 100 / $maxpoints);\n $summary = get_string('points', 'attendance') . \": \" . $points . \"/\" . $maxpoints;\n $summary .= \" (\" . $pctodate . \"%)\";\n } else {\n $summary = get_string('points', 'attendance') . \": \" . $points . \"/\" . $maxpoints;\n }\n $summary .= \" \" . get_string('todate', 'attendance');\n $cell = new html_table_cell($summary);\n $cell->colspan = $summarywidth;\n $row->cells[] = $cell;\n $table->data[] = $row;\n $row = new html_table_row();\n $row->attributes['class'] = 'grouper';\n $summary = array();\n foreach ($stats['course'][$sess->courseid]['statuses'] as $acronym => $status) {\n array_push($summary, html_writer::tag('b', $acronym) . $status['count']);\n }\n $cell = new html_table_cell(implode(\" \", $summary));\n $cell->colspan = $summarywidth;\n $row->cells[] = $cell;\n $table->data[] = $row;\n }\n if ($groupby === 'activity') {\n if ($sess->courseid === $lastgroup[0]) {\n $headcell->rowspan += count($group) + 2;\n }\n $row = new html_table_row();\n $row->attributes['class'] = 'grouper';\n $cell = new html_table_cell();\n $cell->rowspan = count($group) + 2;\n $row->cells[] = $cell;\n $attendanceurl = new moodle_url('/mod/attendance/view.php', array('id' => $sess->cmid,\n 'studentid' => $userdata->user->id,\n 'view' => ATT_VIEW_ALL));\n $cell = new html_table_cell(get_string('pluginname', 'mod_attendance') .\n \": \" . html_writer::link($attendanceurl, $sess->attname));\n $cell->colspan = $colcount - $summarywidth;\n $cell->rowspan = 2;\n $cell->attributes['class'] = 'groupheading';\n $row->cells[] = $cell;\n $points = $stats['activity'][$sess->cmid]['points'];\n $maxpoints = $stats['activity'][$sess->cmid]['maxpointstodate'];\n if ($maxpoints !== 0) {\n $pctodate = format_float( $points * 100 / $maxpoints);\n $summary = get_string('points', 'attendance') . \": \" . $points . \"/\" . $maxpoints;\n $summary .= \" (\" . $pctodate . \"%)\";\n } else {\n $summary = get_string('points', 'attendance') . \": \" . $points . \"/\" . $maxpoints;\n }\n $summary .= \" \" . get_string('todate', 'attendance');\n $cell = new html_table_cell($summary);\n $cell->colspan = $summarywidth;\n $row->cells[] = $cell;\n $table->data[] = $row;\n $row = new html_table_row();\n $row->attributes['class'] = 'grouper';\n $summary = array();\n foreach ($stats['activity'][$sess->cmid]['statuses'] as $acronym => $status) {\n array_push($summary, html_writer::tag('b', $acronym) . $status['count']);\n }\n $cell = new html_table_cell(implode(\" \", $summary));\n $cell->colspan = $summarywidth;\n $row->cells[] = $cell;\n $table->data[] = $row;\n }\n $lastgroup[0] = $sess->courseid;\n $lastgroup[1] = $sess->cmid;\n }\n\n // Now iterate over sessions in group...\n\n foreach ($group as $sess) {\n $row = new html_table_row();\n\n // If grouping by date, we need some form of date up front.\n // Only need course column if we are not using course to group\n // (currently date is only option which does not use course).\n if ($groupby === 'date') {\n // What part of date do we want if grouped by it already?\n $row->cells[] = userdate($sess->sessdate, get_string('strftimedmw', 'attendance')) .\n \" \". $this->construct_time($sess->sessdate, $sess->duration);\n\n $courseurl = new moodle_url('/course/view.php', array('id' => $sess->courseid));\n $row->cells[] = html_writer::link($courseurl, $sess->cname);\n }\n\n // Need activity column unless we are using activity to group.\n if ($groupby !== 'activity') {\n $attendanceurl = new moodle_url('/mod/attendance/view.php', array('id' => $sess->cmid,\n 'studentid' => $userdata->user->id,\n 'view' => ATT_VIEW_ALL));\n $row->cells[] = html_writer::link($attendanceurl, $sess->attname);\n }\n\n // If grouping by date, it belongs up front rather than here.\n if ($groupby !== 'date') {\n $row->cells[] = userdate($sess->sessdate, get_string('strftimedmyw', 'attendance')) .\n \" \". $this->construct_time($sess->sessdate, $sess->duration);\n }\n\n $sesscontext = context_module::instance($sess->cmid);\n if (has_capability('mod/attendance:takeattendances', $sesscontext)) {\n $sessionurl = new moodle_url('/mod/attendance/take.php', array('id' => $sess->cmid,\n 'sessionid' => $sess->id,\n 'grouptype' => $sess->groupid));\n $description = html_writer::link($sessionurl, $sess->description);\n } else {\n $description = $sess->description;\n }\n $row->cells[] = $description;\n\n if (!$shortform) {\n if ($sess->groupid) {\n $sessiontypeshort = get_string('group') . ': ' . $userdata->groups[$sess->courseid][$sess->groupid]->name;\n } else {\n $sessiontypeshort = get_string('commonsession', 'attendance');\n }\n $row->cells[] = html_writer::tag('nobr', $sessiontypeshort);\n }\n\n if (!empty($USER->attendanceediting)) {\n $context = context_module::instance($sess->cmid);\n if (has_capability('mod/attendance:takeattendances', $context)) {\n // Takedata needs:\n // sessioninfo->sessdate\n // sessioninfo->duration\n // statuses\n // updatemode\n // sessionlog[userid]->statusid\n // sessionlog[userid]->remarks\n // pageparams->viewmode == mod_attendance_take_page_params::SORTED_GRID\n // and urlparams to be able to use url method later.\n //\n // user needs:\n // enrolmentstart\n // enrolmentend\n // enrolmentstatus\n // id.\n\n $nastyhack = new \\ReflectionClass('mod_attendance\\output\\take_data');\n $takedata = $nastyhack->newInstanceWithoutConstructor();\n $takedata->sessioninfo = $sess;\n $takedata->statuses = array_filter($userdata->statuses[$sess->attendanceid], function($x) use ($sess) {\n return ($x->setnumber == $sess->statusset);\n });\n $takedata->updatemode = true;\n $takedata->sessionlog = array($userdata->user->id => $sess);\n $takedata->pageparams = new stdClass();\n $takedata->pageparams->viewmode = mod_attendance_take_page_params::SORTED_GRID;\n $ucdata = $this->construct_take_session_controls($takedata, $userdata->user);\n\n $celltext = join($ucdata['text']);\n\n if (array_key_exists('warning', $ucdata)) {\n $celltext .= html_writer::empty_tag('br');\n $celltext .= $ucdata['warning'];\n }\n if (array_key_exists('class', $ucdata)) {\n $row->attributes['class'] = $ucdata['class'];\n }\n\n $cell = new html_table_cell($celltext);\n $row->cells[] = $cell;\n\n $celltext = empty($ucdata['remarks']) ? '' : $ucdata['remarks'];\n $cell = new html_table_cell($celltext);\n $row->cells[] = $cell;\n\n } else {\n if (!empty($sess->statusid)) {\n $status = $userdata->statuses[$sess->attendanceid][$sess->statusid];\n $row->cells[] = $status->description;\n $row->cells[] = $sess->remarks;\n }\n }\n\n } else {\n if (!empty($sess->statusid)) {\n $status = $userdata->statuses[$sess->attendanceid][$sess->statusid];\n $row->cells[] = $status->description;\n $row->cells[] = format_float($status->grade, 1, true, true) . ' / ' .\n format_float($statussetmaxpoints[$status->setnumber], 1, true, true);\n $row->cells[] = $sess->remarks;\n } else if (($sess->sessdate + $sess->duration) < $userdata->user->enrolmentstart) {\n $cell = new html_table_cell(get_string('enrolmentstart', 'attendance',\n userdate($userdata->user->enrolmentstart, '%d.%m.%Y')));\n $cell->colspan = 3;\n $row->cells[] = $cell;\n } else if ($userdata->user->enrolmentend && $sess->sessdate > $userdata->user->enrolmentend) {\n $cell = new html_table_cell(get_string('enrolmentend', 'attendance',\n userdate($userdata->user->enrolmentend, '%d.%m.%Y')));\n $cell->colspan = 3;\n $row->cells[] = $cell;\n } else {\n list($canmark, $reason) = attendance_can_student_mark($sess, false);\n if ($canmark) {\n // Student can mark their own attendance.\n // URL to the page that lets the student modify their attendance.\n\n $url = new moodle_url('/mod/attendance/attendance.php',\n array('sessid' => $sess->id, 'sesskey' => sesskey()));\n if (attendance_session_open_for_students($sess)) {\n $cell = new html_table_cell(html_writer::link($url, get_string('submitattendance', 'attendance')));\n } else {\n $cell = new html_table_cell(html_writer::link($url, get_string('submitattendancefuture', 'attendance')));\n }\n $cell->colspan = 3;\n $row->cells[] = $cell;\n } else { // Student cannot mark their own attendace.\n $row->cells[] = '?';\n $row->cells[] = '? / ' . format_float($statussetmaxpoints[$sess->statusset], 1, true, true);\n $row->cells[] = '';\n }\n }\n }\n\n $table->data[] = $row;\n }\n }\n\n if (!empty($USER->attendanceediting)) {\n $row = new html_table_row();\n $params = array(\n 'type' => 'submit',\n 'class' => 'btn btn-primary',\n 'value' => get_string('save', 'attendance'));\n $cell = new html_table_cell(html_writer::tag('center', html_writer::empty_tag('input', $params)));\n $cell->colspan = $colcount + (($groupby == 'activity') ? 2 : 1);\n $row->cells[] = $cell;\n $table->data[] = $row;\n }\n\n $logtext = html_writer::table($table);\n\n if (!empty($USER->attendanceediting)) {\n $formtext = html_writer::start_div('no-overflow');\n $formtext .= $logtext;\n $formtext .= html_writer::input_hidden_params($userdata->url(array('sesskey' => sesskey())));\n $formtext .= html_writer::end_div();\n // Could use userdata->urlpath if not private or userdata->url_path() if existed, but '' turns\n // out to DTRT.\n $logtext = html_writer::tag('form', $formtext, array('method' => 'post', 'action' => '',\n 'id' => 'attendancetakeform'));\n }\n $allsessions->detail = $logtext;\n return $allsessions;\n }", "protected function _session()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'set data on session markers',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n if ($this->_session && $this->_session->returns('display')) {\n foreach ($this->_session->returns('display') as $key => $val) {\n $this->generate('session_display;' . $key, $val);\n }\n }\n }", "function initSession(){\n\n\t\t//load resource files\n\t\t$this->refreshDataSet();\n\n\t\tif($this->isFatal())return;\n\n\t\t//check the state\n\t\t$this->checkInput();\n\n\t\t\n\t\tif($this->isFatal())return;\n\n\t\t//construct the table from the data\n\t\t$this->buildTable($this->schedule, $this->users);\n\n\t\tif($this->isFatal())return;\t\n\n\t}", "public function sess_create()\r\r\n\t{\r\r\n\t\tif(session_id() == '') {\r\r\n\t\t\tsession_start();\r\r\n\t\t}\r\r\n\r\r\n\t\t$_SESSION['session_id']\t\t= session_id();\r\r\n\t\t$_SESSION['ip_address']\t\t= $this->CI->input->ip_address();\r\r\n\t\t$_SESSION['user_agent']\t\t= substr($this->CI->input->user_agent(), 0, 120);\r\r\n\t\t$_SESSION['last_activity']\t= $this->parent->now;\r\r\n\r\r\n\t\t$this->parent->userdata = $_SESSION;\r\r\n\t}", "public function getUserSession(){\n return $this->getParam('user-data', 'auth');\n }", "public function GetSessionVars($sessCtxt)\n\t{\n\t if ($this->m_Stateless == \"Y\")\n\t return;\n $sessCtxt->GetObjVar($this->m_Name, \"Mode\", $mode);\n $sessCtxt->GetObjVar($this->m_Name, \"SubForms\", $this->m_SubForms);\n $sessCtxt->GetObjVar($this->m_Name, \"ParentFormName\", $this->m_ParentFormName);\n $sessCtxt->GetObjVar($this->m_Name, \"PrtCommitPending\", $this->m_PrtCommitPending);\n $sessCtxt->GetObjVar($this->m_Name, \"FixSearchRule\", $this->m_FixSearchRule);\n $sessCtxt->GetObjVar($this->m_Name, \"OnSortField\", $this->m_OnSortField);\n $sessCtxt->GetObjVar($this->m_Name, \"OnSortFlag\", $this->m_OnSortFlag);\n $sessCtxt->GetObjVar($this->m_Name, \"RecordId\", $this->m_RecordId);\n //$sessCtxt->GetObjVar($this->m_Name, \"ActiveRecord\", $this->m_ActiveRecord);\n $sessCtxt->GetObjVar($this->m_Name, \"CurrentPage\", $this->m_CurrentPage);\n $sessCtxt->GetObjVar($this->m_Name, \"TotalRecords\", $this->m_TotalRecords);\n\n if ($this->m_CurrentPage == 0)\n $this->m_CurrentPage = 1;\n \n if ($this->m_Range>0)\n $this->m_TotalPages = (int) ceil($this->m_TotalRecords / $this->m_Range);\n\n $this->SetDisplayMode ($mode);\n if ($this->m_ActiveRecord)\n $this->m_RecordRow->SetRecordArr($this->m_ActiveRecord);\n $this->SetSortFieldFlag($this->m_OnSortField, $this->m_OnSortFlag);\n\t}", "function getUserSession(){\n\t\t\tChromePhp::log(\"inside retrieveCurrentUserInSession\");\n\t\t\tretrieveCurrentUserInSession();\n\t\t}", "public function storeSessionData() {}", "public function storeSessionData() {}", "function loadSession() {}", "public function data($userdata)\r\n {\r\n $data = $this->session->userdata($this->key); \r\n #var_dump($data);exit();\r\n return $data[$userdata];\r\n }", "function auth_retrieve_user_properties($db, $user_id)\r\r\n{\r\r\n $result_user = func_db_query($db, \"SELECT user_id, username, email, display_name, status, activation_code, first_name, last_name, address, city, \"\r\r\n . \"state, post_code, country, phone1, phone2, phone3, date_of_birth, last_active, post_count, avatar, tag_line, attribute1, \"\r\r\n . \"attribute2, attribute3, attribute4, attribute5, attribute6, attribute7, attribute8, attribute9, attribute10 \"\r\r\n . \"FROM @TABLE_PREFIX@nx3_user WHERE user_id = ? LIMIT 1\", array(\"i\", $user_id));\r\r\n foreach ($result_user[0] as $field => $value)\r\r\n {\r\r\n $_SESSION['NX3_USER'][$field] = $value;\r\r\n }\r\r\n}", "public static function sessionData(): object {\n return Session::instance()->get(AccessControl::SESSION_AUTH_KEY);\n }", "public function fillInAddedSessionData();", "public function __construct() {\n\t\tself::_sess_init();\n\t}", "public function __construct($data)\n\t{\n\t\tself::$SESSDATA = $data;\n\t}", "function _read_user_session()\n {\t\t\n\t\tif($this->sh_Options['keeping_logic'] == 'db'){\n\t\t\t$this->is_present = $this->_read_user_session_db();\n\t\t} else {\n\t\t\t$this->is_present = $this->_read_user_session_ss();\n\t\t}\n\t}", "public function generateSession()\n\t{\n\t\t$name = $_POST['name'];\n\t\t$password = $_POST['password'];\n\t\t//validación de Usuario con un name y password ya definido\n\t\t$this->validaUsuario($name,$password);\n\n\t\t//validacion de un Usuario a Nivel Base de Datos cargar la base de datos y en la clase de la conexion poner los datos de la base de datos\n\t\t//$this->validaUsuarioDB($name,$password);\n\n\n\t}", "public function UserData(){\n\t\t$this->id = \"\"; \n\t\t$this->nombre =null;\n\t\t$this->cc = null;\n $this->email = null; \n\t\t$this->telefono =null;\n\t\t$this->rol = null;\n\t\t$this->user = null; \n\t\t$this->pass = null;\n \n\t}", "function get_userdata( $index ){\n\t\treturn isset ( $_SESSION[$index] ) ? $_SESSION[$index] : null;\n\t}", "function phpAds_SessionDataFetch()\n{\n global $session;\n $dal = new MAX_Dal_Admin_Session();\n\n // Guard clause: Can't fetch a session without an ID\n\tif (empty($_COOKIE['sessionRPID'])) {\n return;\n }\n\n $serialized_session = $dal->getSerializedSession($_COOKIE['sessionRPID']);\n // This is required because 'sessionRPID' cookie is set to new during logout.\n // According to comments in the file it is because some servers do not\n // support setting cookies during redirect.\n if (empty($serialized_session)) {\n return;\n }\n\n $loaded_session = unserialize($serialized_session);\n\tif (!$loaded_session) {\n // XXX: Consider raising an error\n return;\n }\n\t$session = $loaded_session;\n $dal->refreshSession($_COOKIE['sessionRPID']);\n}", "public function cek_user($data)\n\t\t{\n\t\t\t$query = $this->db->get_where('login_session', $data);\n\t\t\treturn $query;\n\t\t}", "public static function SetUpUserBySession ();", "function sessionFields($resultSet){\r\n\t\t$_SESSION['id'] = $resultSet[0]->id;\r\n\t\t$_SESSION['username'] = $resultSet[0]->username;\r\n\t\t$_SESSION['name'] = $resultSet[0]->name;\r\n\t\t$_SESSION['surname'] = $resultSet[0]->surname;\r\n\t\t$_SESSION['email'] = $resultSet[0]->email;\r\n\t\t$_SESSION['role'] = $resultSet[0]->role;\r\n\t\t$_SESSION['picture'] = $resultSet[0]->picture;\r\n\t}", "function getDataSession()\r\n\t{\r\n\t\t$id = $this->Auth->user('id');\r\n\t\t$dataUser = $this->User->find('first', array('conditions' => array('User.id' => $id)));\r\n\t\t\r\n\t\treturn $dataUser;\r\n\t}", "function bdd2session() {\n\tif (!empty($_SESSION['dims']['userid'])) {\n\t\tinclude_once DIMS_APP_PATH.'/modules/catalogue/include/class_panier.php';\n\t\t$panier = new cata_panier();\n\t\t$panier->open($_SESSION['dims']['userid']);\n\n\t\tforeach ($panier->articles as $art) {\n\t\t\t$_SESSION['catalogue']['panier']['articles'][$art['ref']]['qte'] = $art['qte'];\n\n\t\t\tif (isset($art['forced_price'])) {\n\t\t\t\t$_SESSION['catalogue']['panier']['articles'][$art['ref']]['forced_price'] = $art['forced_price'];\n\t\t\t}\n\t\t}\n\t\t// update_montant_panier();\n\t}\n}", "function __data() {\n\t\tif ($data = $this->Session->read('data')) {\n\t\t\tforeach ($data as $k => $i) {\n\t\t\t\t$obj = ClassRegistry::init($k);\n\t\t\t\t$this->data[$k] = $i;\n\t\t\t}\n\t\t\t$this->Session->write('data', null);\n\t\t}\n\t\t// attempts to remember identity of commentor and prefill fields\n\t\tif (empty($this->data['Comment']) && $data = $this->Cookie->read('CommentUser')) {\n\t\t\t$this->data['Comment'] = $data;\n\t\t}\n\t}", "function requestSessionInfo()\n {\n //para pasarselo al aside;\n\n $sessionLevel = $this->loginController->GetSessionAuthLevel();\n $this->view->setSessionLevel($sessionLevel);\n\n $sessionName = $this->loginController->GetSessionUsername();\n $this->view->setSessionName($sessionName);\n }", "public function userdata($key = NULL)\n\t{\n\t\tif (isset($key))\n\t\t{\n\t\t #return isset($this->sess_name[$key]) ? $this->sess_name['$key'] : NULL ;\n\t\t\treturn isset($_SESSION[$key]) ? $_SESSION[$key] : NULL;\n\t\t}\n\t\telseif (empty($_SESSION))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t$userdata = array();\n\t\t$_exclude = array_merge(\n\t\t\tarray($this->sess_name),\n\t\t\t$this->get_flash_keys(),\n\t\t\t$this->get_temp_keys()\n\t\t);\n\n\t\tforeach (array_keys($_SESSION) as $key)\n\t\t#foreach (array_keys($this->sess_name) as $key)\n\t\t{\n\t\t\tif ( ! in_array($key, $_exclude, TRUE))\n\t\t\t{\n\t\t\t\t$userdata[$key] = $_SESSION[$key];\n\t\t\t\t#$userdata[$key] = $this->sess_name[$key];\n\t\t\t}\n\t\t}\n\n\t\treturn $userdata;\n\t}", "private function getSessionData()\n {\n $session = Shopware()->Session();\n $sessionData = $session->getIterator()->getArrayCopy();\n $sessionData['id'] = Shopware()->SessionID();\n\n return $sessionData;\n }", "protected function _session_update_info(){\n\t\t$info = session_info($this->_state_session_id);\n\t\t$this->_user_name = $info['name'];\n\t\t$this->_user_id = $info['user_id'];\n\t\t$this->_user_email = $info['email'];\n\t\t$this->_user_class_id = $info['userclass_id'];\n\t\t$this->_user_class_name = $info['userclass_name'];\n\t}", "public function setupUser() {\n parent::setupGlobalVariables();\n $session = (new SessionService())->getNewSession();\n if (!$session->isStarted()) $session->start();\n if ($session->get('user')) {\n $variables = array(\n 'username' => $session->get('user')['username'],\n 'role' => $session->get('user')['role']\n );\n $this->mergeToTemplateVariables($variables);\n }\n }", "public function createSessionByUserData($user) : void {\n $_SESSION['userId'] = $user->getId();\n $_SESSION['userName'] = $user->getUsername();\n }", "private function _sess_run() {\n\t\t// session\n\t\tini_set('session.save_handler', $this->sess_save_handler);\n\t\t$path = array();\n\t\tforeach ($this->sess_server as $server) {\n\t\t\tif (isset($server['host']) && isset($server['port'])) {\n\t\t\t\t$path[] = \"tcp://{$server['host']}:{$server['port']}?\" . http_build_query(isset($server['params']) ? $server['params'] : array());\n\t\t\t}\n\t\t}\n\t\tif (empty($path)) {\n\t\t\tshow_error('Session save_path is empty');\n\t\t}\n\t\tini_set('session.save_path', implode(',', $path));\n\n\t\tini_set('session.gc_maxlifetime', $this->sess_expiration);\t// 过期时间\n\t\t// cookie\n\t\tini_set('session.cookie_secure', 0);\t\t// 0 http:// 1 https://\n\t\tini_set('session.cookie_httponly', 1);\t\t// 不让JS读取session的cookie\n\t\tsession_name($this->sess_cookie_name);\n\n\t\tsession_start();\n\t\t// delete old flashdata (from last request)\n\t\t$this->_flashdata_sweep();\n\t\t// mark all new flashdata as old (data will be deleted before next request)\n\t\t$this->_flashdata_mark();\n\t}", "public function setupSession($userid, $data) {\n $_SESSION['userid'] = $userid;\n $_SESSION['nickname'] = $data['nickname'];\n $_SESSION['email'] = $data['email'];\n $_SESSION['firstname'] = $data['firstname'];\n $_SESSION['lastname'] = $data['lastname'];\n $_SESSION['access'] = $data['access'];\n\n // Next checking time\n $_SESSION['token_expiration'] = time() + self::TOKEN_EXPIRATION;\n }", "public function getData(){\n\n // get public user data for this user\n $userData = $this->getSimpleData();\n\n // add sensitive user data\n $userData->email = $this->email;\n\n // all chars\n $userData->characters = [];\n $characters = $this->getCharacters();\n foreach($characters as $character){\n /**\n * @var $character CharacterModel\n */\n $userData->characters[] = $character->getData();\n }\n\n // get active character with log data\n $activeCharacter = $this->getActiveCharacter();\n $userData->character = $activeCharacter->getData(true);\n\n return $userData;\n }", "public function getSession() {}", "protected function _initialize_session()\n\t{\n\t\t$this->sdata = array(\n\t\t\t'session_id' \t\t=> 0,\n\t\t\t'fingerprint'\t\t=>\t0,\n\t\t\t'member_id' \t\t=> 0,\n\t\t\t'admin_sess' \t\t=> 0,\n\t\t\t'ip_address' \t\t=> ee()->input->ip_address(),\n\t\t\t'user_agent' \t\t=> substr(ee()->input->user_agent(), 0, 120),\n\t\t\t'last_activity'\t\t=> 0,\n\t\t\t'sess_start'\t\t=>\t0\n\t\t);\n\t}", "function __destruct() {\n\t\t$_SESSION['QC_UserData'] = self::$data;\n\t}", "function __construct(){\r\n if(isset($_SESSION['login']) && $_SESSION['login'] == 'true' && isset($_SESSION['username'])){\r\n $this->username = $_SESSION['username'];\r\n $this->login = $_SESSION['login'];\r\n $this->email = $_SESSION['email'];\r\n $this->credential = $_SESSION['credential'];\r\n $this->picture = $_SESSION['picture'];\r\n $this->academy = $_SESSION['fullname'];\r\n }\r\n }", "public function getSession();", "private function construct_take_session_info(take_data $takedata) {\n $sess = $takedata->sessioninfo;\n $date = userdate($sess->sessdate, get_string('strftimedate'));\n $starttime = attendance_strftimehm($sess->sessdate);\n $endtime = attendance_strftimehm($sess->sessdate + $sess->duration);\n $time = html_writer::tag('nobr', $starttime . ($sess->duration > 0 ? ' - ' . $endtime : ''));\n $sessinfo = $date.' '.$time;\n $sessinfo .= html_writer::empty_tag('br');\n $sessinfo .= html_writer::empty_tag('br');\n $sessinfo .= format_text($sess->description);\n\n return $sessinfo;\n }", "function get_db_session_data()\r\n\t{\r\n\t\t$query = $this->db->select('user_data')->get('ci_sessions');\r\n\t\t$user = array(); /* array to store the user data we fetch */\r\n\t\tforeach ($query->result() as $row)\r\n\t\t{\r\n\t\t $udata = unserialize($row->user_data);\r\n\t\t /* put data in array using username as key */\r\n\t\t $user['user_name'] = $udata['user_name']; \r\n\t\t $user['is_logged_in'] = $udata['is_logged_in']; \r\n\t\t}\r\n\t\treturn $user;\r\n\t}", "function __construct()\n {\n parent::__construct();\n # $this->session->set_userdata('userid',43);\n # $this->session->set_userdata('user',new User($this->session->userdata('userid')));\n \n }", "public function run(){\r\n $registry = Registry::getInstance();\r\n $validate = $registry->getValidator();\r\n $session = $registry->getSession();\r\n\r\n //Creates and sets the respective view and model objects\r\n $view = $this->makeView('Login');\r\n $model = $this->makeModel('Login');\r\n $this->setView($view);\r\n $this->setModel($model);\r\n\r\n //Establish a connection with the database\r\n $this->observableModel->makeConnection();\r\n\r\n //Attach the view to the observable_model so the view can recieve updates from it\r\n $this->observableModel->attach($this->view);\r\n //If data is needed from the model, get the array of data\r\n //(In this case it returns the multi-dimensional array of users)\r\n $data = $this->observableModel->findAll();\r\n\r\n\r\n if(isset($_POST['login'])){\r\n\r\n //POSTED user array from CommandContext\r\n $userPOSTData = $this->objectData->get('post');\r\n\r\n $userRecord = $this->observableModel->findRecord($userPOSTData['email']);\r\n $hashedPassword = \"\";\r\n $hashedPassword = $userRecord['users']['Password'];\r\n\r\n $validate->isEmailValid($userPOSTData['email']);\r\n $validate->isPasswordValid($userPOSTData['password']);\r\n $validate->passwordHashMatch($userPOSTData['password'], $hashedPassword);\r\n\r\n if(!$validate->getErrorThrown()){\r\n\r\n //Get ResponseHandler\r\n $responseHandler = ResponseHandler::getInstance();\r\n \r\n //Get clone of State\r\n $state = $responseHandler->giveState();\r\n\r\n //Make array with Profile in it\r\n $stateData = ['Login' => 'Success'];\r\n $state->addEntries($stateData);\r\n \r\n //Store response state in session variable\r\n $session->add(\"state\", $state);\r\n\r\n //Store user email in session\r\n $session->add(\"Email\", $userPOSTData['email']);\r\n\r\n //Set post as profile for requestHandler\r\n header(\"Location: index.php?Profile\");\r\n \r\n }\r\n else{\r\n\r\n $errors['Errors'] = \"Invalid email/password\";\r\n $this->view->addVar(\"Errors\", $errors);\r\n\r\n //Get ResponseHandler\r\n $responseHandler = ResponseHandler::getInstance();\r\n $responseHandler->storeErrorLogs();\r\n $responseHandler->storeHeaders();\r\n $state = $responseHandler->giveState();\r\n\r\n //Make array with Profile in it\r\n $stateData = ['Login' => 'Failure'];\r\n $state->addEntries($stateData);\r\n\r\n //Store response handler in session variable\r\n $session->remove('state');\r\n $session->add(\"state\", $state);\r\n }\r\n\r\n }\r\n\r\n //Tell the model to update the data which changed\r\n $this->observableModel->updateChangedData($data); \r\n \r\n //Tell the model to notify it's attached observers, pushing the updated data to them\r\n $this->observableModel->notify();\r\n \r\n }", "public static function get_user_data()\n {\n }", "protected function getRealScriptUserObj() {}", "private function addUserDataFromSession( $event ){\n $aamSettings = $this->_fbeHelper->getAAMSettings();\n $customer = $this->_magentoDataHelper->getCurrentCustomer();\n if( $aamSettings && $customer && $aamSettings->getEnableAutomaticMatching() ){\n $userData = $event->getUserData();\n $address = $this->_magentoDataHelper->getCustomerAddress($customer);\n if(in_array(AAMSettingsFields::EMAIL, $aamSettings->getEnabledAutomaticMatchingFields())){\n $userData ->setEmail(\n $customer->getEmail()\n );\n }\n if(in_array(AAMSettingsFields::FIRST_NAME, $aamSettings->getEnabledAutomaticMatchingFields())){\n $userData->setFirstName(\n $customer->getFirstname()\n );\n }\n if(in_array(AAMSettingsFields::LAST_NAME, $aamSettings->getEnabledAutomaticMatchingFields())){\n $userData->setLastName(\n $customer->getLastname()\n );\n }\n if(in_array(AAMSettingsFields::GENDER, $aamSettings->getEnabledAutomaticMatchingFields())){\n $userData->setGender(\n $this->_magentoDataHelper->getGenderAsString($customer)\n );\n }\n if(in_array(AAMSettingsFields::DATE_OF_BIRTH, $aamSettings->getEnabledAutomaticMatchingFields())){\n $userData->setDateOfBirth(\n $customer->getDob() ? date(\"Ymd\", strtotime($customer->getDob())) : null\n );\n }\n if($address){\n if(in_array(AAMSettingsFields::PHONE, $aamSettings->getEnabledAutomaticMatchingFields())){\n $userData->setPhone(\n $address->getTelephone()\n );\n }\n if(in_array(AAMSettingsFields::CITY, $aamSettings->getEnabledAutomaticMatchingFields())){\n $userData ->setCity(\n $address->getCity()\n );\n }\n if(in_array(AAMSettingsFields::STATE, $aamSettings->getEnabledAutomaticMatchingFields())){\n $userData->setState(\n $this->_magentoDataHelper->getRegionCodeForAddress($address)\n );\n }\n if(in_array(AAMSettingsFields::ZIP_CODE, $aamSettings->getEnabledAutomaticMatchingFields())){\n $userData->setZipCode(\n $address->getPostcode()\n );\n }\n if(in_array(AAMSettingsFields::COUNTRY, $aamSettings->getEnabledAutomaticMatchingFields())){\n $userData->setCountryCode(\n $address->getCountryId()\n );\n }\n }\n }\n return $event;\n }", "protected function initializeSession() {}", "function get_db_session_data()\r\n\t{\r\n\t\t$query = $this->mongo_db->select('user_data')->get('ci_sessions');\r\n\t\t$user = array(); /* array to store the user data we fetch */\r\n\t\tforeach ($query->result() as $row)\r\n\t\t{\r\n\t\t $udata = unserialize($row->user_data);\r\n\t\t /* put data in array using username as key */\r\n\t\t $user['user_name'] = $udata['user_name']; \r\n\t\t $user['is_logged_in'] = $udata['is_logged_in']; \r\n\t\t}\r\n\t\treturn $user;\r\n\t}", "public function instantiate() {\n\n // Checking if a user session already exists.\n if ($this->session->userData('loggedIn') === true) {\n\n // Set the identity\n $this->setIdentity($this->session->userData('id'));\n\n // Set isGuest to false.\n $this->isGuest = false;\n }\n }", "function create_session($userid) {\r\n \t// To work in all browsers\r\n $result = $this->DatabaseModel->access_database('ts_user','select','',array('user_id'=>$userid));\r\n\r\n if($result[0]['user_status'] == '3') {\r\n\t\t\t$this->session->userdata['ts_loginstatus'] = 'Blocked'; // Blocked\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif($result[0]['user_status'] == '2') {\r\n\t\t\t\t$this->DatabaseModel->access_database('ts_user','update',array('user_status'=>1),array('user_id'=>$userid));\r\n\t\t\t\t$result = $this->DatabaseModel->access_database('ts_user','select','',array('user_id'=>$userid));\r\n\t\t\t}\r\n\r\n\t\t\t$userPlan = $result[0]['user_plans'];\r\n\t\t\t$uid = $result[0]['user_id'];\r\n\t\t\tif( $userPlan != '0' ) {\r\n\t\t\t\t$planDetails = $this->DatabaseModel->access_database('ts_plans','select','',array('plan_id'=>$userPlan));\r\n\t\t\t\t$planDuration = explode(' ',$planDetails[0]['plan_duration']);\r\n\t\t\t\tif( $planDuration[1] == 'Time' ) {\r\n\t\t\t\t\t$planstatus = 1; // Life time\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif( $planDuration[1] == 'Days' ) {\r\n\t\t\t\t\t\t$p_date = date('Y-m-d H:i:s',strtotime(\"-\".$planDuration[0].\" days\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif( $planDuration[1] == 'Weeks' ) {\r\n\t\t\t\t\t\t$n = $planDuration[0] * 7 ;\r\n\t\t\t\t\t\t$p_date = date('Y-m-d H:i:s',strtotime(\"-\".$n.\" days\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif( $planDuration[1] == 'Months' ) {\r\n\t\t\t\t\t\t$p_date = date('Y-m-d H:i:s',strtotime(\"-\".$planDuration[0].\" month\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif( $planDuration[1] == 'Years' ) {\r\n\t\t\t\t\t\t$p_date = date('Y-m-d H:i:s',strtotime(\"-\".$planDuration[0].\" year\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$p = $this->DatabaseModel->access_database('ts_user','select','',array('user_id'=>$uid,'user_plansdate <'=>$p_date));\r\n\r\n\t\t\t\t\t$planstatus = empty($p) ? '1' : '0' ;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$planstatus = '404';\r\n\t\t\t}\r\n\r\n\t\t\t// Vendor Plans\r\n\r\n\t\t\t$vendorPlan = $result[0]['user_vplans'];\r\n\t\t\tif( $vendorPlan != '0' ) {\r\n\t\t\t\t$planDetails = $this->DatabaseModel->access_database('ts_vendorplans','select','',array('vplan_id'=>$vendorPlan));\r\n\t\t\t\t$planDuration = explode(' ',$planDetails[0]['vplan_duration']);\r\n\t\t\t\tif( $planDuration[1] == 'Time' ) {\r\n\t\t\t\t\t$planstatus = 1; // Life time\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif( $planDuration[1] == 'Days' ) {\r\n\t\t\t\t\t\t$p_date = date('Y-m-d H:i:s',strtotime(\"-\".$planDuration[0].\" days\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif( $planDuration[1] == 'Weeks' ) {\r\n\t\t\t\t\t\t$n = $planDuration[0] * 7 ;\r\n\t\t\t\t\t\t$p_date = date('Y-m-d H:i:s',strtotime(\"-\".$n.\" days\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif( $planDuration[1] == 'Months' ) {\r\n\t\t\t\t\t\t$p_date = date('Y-m-d H:i:s',strtotime(\"-\".$planDuration[0].\" month\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif( $planDuration[1] == 'Years' ) {\r\n\t\t\t\t\t\t$p_date = date('Y-m-d H:i:s',strtotime(\"-\".$planDuration[0].\" year\"));\r\n\t\t\t\t\t}\r\n//echo $p_date;\r\n\t\t\t\t\t$p = $this->DatabaseModel->access_database('ts_user','select','',array('user_id'=>$uid,'user_vplansdate <'=>$p_date));\r\n\r\n\t\t\t\t\t$vplanstatus = empty($p) ? '1' : '0' ;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$vplanstatus = '404';\r\n\t\t\t}\r\n\r\n\t\t\t$user_details\t= array(\r\n\t\t\t\t'ts_uid'\t\t=> $uid,\r\n\t\t\t\t'ts_uname'\t\t=> $result[0]['user_uname'],\r\n\t\t\t\t'ts_login'\t\t=> true,\r\n\t\t\t\t'ts_level'\t\t=> $result[0]['user_accesslevel'],\r\n\t\t\t\t'ts_planstatus'\t\t=> $planstatus,\r\n\t\t\t\t'ts_vendorplanstatus'\t\t=> $vplanstatus\r\n\t\t\t);\r\n\r\n\t\t\t$this->session->set_userdata($user_details);\r\n\t\t\t// User will redirect after page reload \r\n\t\t}\r\n \r\n }", "function Session() {\n $sesskey = $_COOKIE['FortissimoSession'];\n if (! $sesskey) {\n # they don't have one, so let's ignore\n return;\n }\n\n # try to parse their cookie\n $ct = sscanf($sesskey, \"%d %s %d\", $sessid, $auth, $exptime);\n\n # return if bad cookie, or they say it's expired, or the auth length is wrong or bad sessid\n if ($ct != 3 || $exptime < time() || strlen($auth) != 64 || $sessid <= 0) {\n return;\n }\n\n # okay, so try loading it\n global $ft;\n $row = $ft->dbh->_select_row_as_object('SELECT * FROM tbl:sessions WHERE sessid = ? AND sesskey = ?',\n array($sessid, $auth));\n $userid = $row->userid;\n if (is_null($userid) || $userid <= 0 || $row->exptime < time()) {\n return;\n }\n\n # get the user this refers to\n $this->user = new User($userid);\n }", "function start_user_session( $assemblervars){\n\t$userid = getSessionId();\n\n\t// Load the session data from the form, if available\n\t// Loop through an array of options provided and set the session\n\tforeach($assemblervars AS $option){\n\t\tif (isset($_REQUEST[$option])){\n\t\t\t$_SESSION[$option] = $_REQUEST[$option];\n\t\t} elseif ( !isset($_SESSION[$option])) {\n\t\t\t$_SESSION[$option] = '';\n\t\t}\n\t}\n}", "static public function regenerate(){\n \t$_SESSION['TFUser'] = self::$_instance = new TFUserM(array('id'=>self::$_id,'debug'=>self::isDebug()));\n }", "public static function getSessionData($systemName, $dataKey);", "public function profile()\n {\n $this->data['page_title'] = $this->session->userdata('username');\n $this->data['player-activity'] = $this->individual($this->session->userdata('username'));\n $this->data['pagebody'] = 'tradetable';\n }", "function SessionSetUser($UserRow){\r\n\r\n\t $_SESSION[\"UserTypeUUID\"]=\t$UserRow[\"UserTypeUUID\"];\r\n\t $_SESSION[\"UserTypeName\"]=\t$UserRow[\"UserTypeName\"];\r\n\t $_SESSION[\"UserUUID\"]=\t\t$UserRow[\"UserUUID\"];\r\n\t $_SESSION[\"UserName\"]=\t\t$UserRow[\"UserName\"];\r\n\t $_SESSION[\"UserEmail\"]=\t\t$UserRow[\"UserEmail\"];\r\n\t $_SESSION[\"UserPassword\"]=\t$UserRow[\"UserPassword\"];\r\n\t $_SESSION[\"FirstName\"]=\t\t$UserRow[\"FirstName\"];\r\n\t $_SESSION[\"LastName\"]=\t\t$UserRow[\"LastName\"];\r\n\t}", "public static function put_privilages_in_session($user_id){\n $conn= DBConnect::getConnection();\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n $sql=\"SELECT * FROM privilages where user_id=$user_id\";\n $result=$conn->query($sql);\n if ($result->num_rows ==0 ){ \n echo \"Error while fetching user privilages\";\n }\n else{\n while($row = $result->fetch_assoc()) {\n $_SESSION[\"customers_page\"]=$row[\"customers_page\"];\n $_SESSION[\"sessions_page\"]=$row[\"sessions_page\"];\n $_SESSION[\"financial_page\"]=$row[\"financial_page\"];\n $_SESSION[\"users_page\"]=$row[\"users_page\"];\n $_SESSION[\"ended_procecutions\"]=$row[\"ended_procecutions\"];\n \n } \n echo $_SESSION[\"customers_page\"];\n echo $_SESSION[\"sessions_page\"];\n echo $_SESSION[\"financial_page\"];\n echo $_SESSION[\"users_page\"];\n echo $_SESSION[\"ended_procecutions\"];\n }\n}", "function session_create()\n\t{\n\t\t$this->data = array();\n\t\treturn true;\n\t}", "function set_userdata($newdata = array(), $newval = '')\n {\n if (is_string($newdata)) {\n $newdata = array($newdata => $newval);\n }\n if (count($newdata) > 0) {\n foreach ($newdata as $key => $val) {\n $this->userdata[$key] = $val;\n $_SESSION[$key] = $this->_ra_encode($val);\n }\n }\n }", "protected abstract function getUserData(): array;", "function recupero_session()\n{\n\tglobal $data_inserimento_rm_spettroscopica;\n\tglobal $flag_aggiorna;\n\tglobal $te;\n\tglobal $spettro;\n\tglobal $naa;\n\tglobal $valore_naa_cr;\n\tglobal $valore_cho_cr;\n\tglobal $lipidi_lattati;\n\tglobal $mioinositolo;\n\n\t$flag_aggiorna = $_SESSION['flag_aggiorna'];\n\t$data_inserimento_rm_spettroscopica = $_SESSION['data_inserimento_rm_spettroscopica'];\n\t$valore_r_cbv=$_SESSION['valore_r_cbv'];\t\n\t$te=$_SESSION['te'];\n\t$spettro=$_SESSION['spettro'];\n\t$naa=$_SESSION['naa'];\n\t$valore_naa_cr=$_SESSION['valore_naa_cr'];\n\t$valore_cho_cr=$_SESSION['valore_cho_cr'];\n\t$lipidi_lattati=$_SESSION['lipidi_lattati'];\n\t$mioinositolo=$_SESSION['mioinositolo'];\n}", "private function getSession() {\n\t\t//read session file and fill the array\n\t\tif (file_exists ( self::SESSION_FILE )) {\n\t\t\t$this->session = unserialize ( file_get_contents ( self::SESSION_FILE ) );\n\t\t}\n\t\t\n\t\t//If the last session has expired, remove the session\n\t\tif (isset ( $this->session ) && $this->session ['lastlogin'] + (10 * 60) <= time ()) {\n\t\t\tunset ( $this->session );\n\t\t\t$this->updateSession ();\n\t\t}\n\t}", "public function session_init()\n {\n // session started (Installer?)\n if (session_id())\n return;\n\n $sess_name = $this->config->get('session_name');\n $sess_domain = $this->config->get('session_domain');\n $lifetime = $this->config->get('session_lifetime', 0) * 60;\n\n // set session domain\n if ($sess_domain) {\n ini_set('session.cookie_domain', $sess_domain);\n }\n // set session garbage collecting time according to session_lifetime\n if ($lifetime) {\n ini_set('session.gc_maxlifetime', $lifetime * 2);\n }\n\n ini_set('session.cookie_secure', rcube_ui::https_check());\n ini_set('session.name', $sess_name ? $sess_name : 'roundcube_sessid');\n ini_set('session.use_cookies', 1);\n ini_set('session.use_only_cookies', 1);\n ini_set('session.serialize_handler', 'php');\n\n // use database for storing session data\n $this->session = new rcube_session($this->get_dbh(), $this->config);\n\n $this->session->register_gc_handler(array($this, 'temp_gc'));\n $this->session->register_gc_handler(array($this, 'cache_gc'));\n\n // start PHP session (if not in CLI mode)\n if ($_SERVER['REMOTE_ADDR'])\n session_start();\n\n // set initial session vars\n if (!$_SESSION['user_id'])\n $_SESSION['temp'] = true;\n\n // restore skin selection after logout\n if ($_SESSION['temp'] && !empty($_SESSION['skin']))\n $this->config->set('skin', $_SESSION['skin']);\n }", "function __construct() {\n\t\tkataMakeTmpPath('sessions');\n\t}", "protected function getSession()\n {\n $session = Session::getInstance();\n\n $this->settings = $session->get('member-import-settings');\n $this->importData = $session->get('member-import-data');\n }", "function __construct(){\n @session_start();\n $this->tmpl_init();\n $this->rights = new opc_um_rights($this);\n $this->groups = new opc_um_groups($this);\n $this->fields = new opc_um_fields($this);\n foreach(func_get_args() as $ar){\n if(is_string($ar) and is_readable($ar))\n\t$this->init__um_settings($ar);\n else if(is_string($ar))\n\t$this->init__um_key($ar); \n else if(is_bool($ar)) \n\t$this->init__pwd_mandatory($ar);\n else if($ar instanceof opc_fw)\n\t$this->init__fw($ar);\n else if($ar instanceof _tools_)\n\t$this->init__tool($ar);\n else if(is_array($ar))\n\t$this->init__array($ar);\n else \n\ttrigger_error('unkown construct-argument for opc_um' . var_export($ar,TRUE));\n }\n if(is_null($this->key)) $this->key = session_id();\n $this->cls_map = defca('cls_map_def',$this);\n }", "public function sess_write()\r\r\n\t{\r\r\n\t\tif( ! $this->parent->check_write())\r\r\n\t\t{\r\r\n\t\t\t$_SESSION = array();\r\r\n\t\t\tforeach($this->parent->userdata as $key => $val)\r\r\n\t\t\t{\r\r\n\t\t\t\t$_SESSION[$key] = $val;\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$this->parent->track_write();\r\r\n\t\t}\r\r\n\t}", "public function setup_session(){\n if(!(isset($_SESSION))){\n session_start();\n }\n\n $_SESSION['user_id'] = $this->user_id;\n $_SESSION['name'] = $this->firstname;\n\n //Remove anon flag\n if(isset($_SESSION['anon'])){\n unset($_SESSION['anon']);\n }\n\n }", "public function userdata($item)\n\t{\n\t\tif(isset($_SESSION[$item]))\n\t\t{\n\t\t\t$value = $_SESSION[$item];\n\t\t\treturn $value;\n\t\t}\n\t}", "public function store() {\n\t\t$_SESSION['puserauth'] = serialize($this);\n\t}", "public static function reloadSession(){\n $auth = App_Auth::getInstance();\n\n $userModel = new FrontendUser();\n $user = $userModel->findById(self::getSession()->id);\n $user->groups = $user->findManyToManyRowset('Group', 'FrontendUserGroup');\n $user->group = $user->groups[0];\n\n $session = new stdClass();\n foreach($user as $k => $v){\n $session->{$k} = $v;\n }\n $session->group->name = $user->get('group')->name;\n\n $auth->getStorage()->write($session);\n }", "public function userLoggedIn(){\r\n \n \t$user = new UserObject();\n \t\r\n \tif( isset ($_SESSION['id']) &&\r\n \t\tisset ($_SESSION['username']) &&\r\n \t\tisset ($_SESSION['profile_picture']) &&\r\n \t\tisset ($_SESSION['access_token'])){\r\n \t\t\t\r\n \t\t$user->id = $_SESSION['id'];\r\n \t\t$user->username = $_SESSION['username'];\r\n \t\t$user->profile_picture = $_SESSION['profile_picture'];\r\n \t\t$user->access_token = $_SESSION['access_token'];\r\n \t}\n \t\t\r\n \treturn $user;\r\n }", "private function _cek_user_login() {\r\n //if ($this->session->userdata('VNAME')) {\r\n if (isset($_SESSION['VNAME'])) {\r\n //echo \"test\";exit; \r\n header('location:' . $this->data['base_url'] . \"index.php/backend/home\");\r\n }\r\n //$this->data['username'] = strtoupper($this->session->userdata('VUSERNAME'));\r\n //echo \"test22\". $this->session->userdata('username').\" lalala\";exit;\r\n }", "public function userInfo() {\n return $userInfo = $this->session->userdata('userinfo');\n }", "private function setUp($config) {\r\n //print_r($config);\r\n //$this->_MYSESSION_CONF=$config;\r\n\r\n $this->db_type = $config[\"DATABASE_TYPE\"];\r\n $this->db_name = $config[\"DB_DATABASE\"];\r\n $this->db_pass = $config[\"DB_PASSWORD\"];\r\n $this->db_server = $config[\"DB_SERVER\"];\r\n $this->db_username = $config[\"DB_USERNAME\"];\r\n\r\n $this->table_name_session = $config[\"TB_NAME_SESSION\"];\r\n $this->table_name_variable = $config[\"TB_NAME_VALUE\"];\r\n $this->table_column_sid = $config[\"SID\"];\r\n $this->table_column_name = $config[\"NAME\"];\r\n $this->table_column_value = $config[\"VALUE\"];\r\n $this->table_column_fexp = $config[\"FEXP\"];\r\n $this->table_column_ua = $config[\"UA\"];\r\n $this->table_column_exp = $config[\"EXP\"];\r\n\r\n $this->sid_name = $config[\"SESSION_VAR_NAME\"];\r\n $this->overwrite = ($config[\"OVERWRITE_PHP_FUNCTION\"]=='1')?true:false;\r\n $this->sid_len = intval($config[\"SID_LEN\"]);\r\n $this->session_duration = intval($config[\"DURATION\"]);\r\n $this->session_max_duration = intval($config[\"MAX_DURATION\"]);\r\n $this->use_cookie = ($config[\"USE_COOKIE\"]=='1')?true:false;\r\n $this->encrypt_data = ($config[\"CRIPT\"]=='1')?true:false;\r\n $this->encrypt_key = $config[\"CRIPT_KEY\"];\r\n\r\n $this->hijackBlock = ($config[\"ENABLE_ANTI_HIJACKING\"]=='1')?true:false;\r\n $this->hijackSalt = $config[\"ANTI_HIJACKING_SALT\"];\r\n\r\n $this->dbConnection();\r\n $this->readSessionId();\r\n //check if i have to overwrite php\r\n if ($this->overwrite) {\r\n //yes.. i'm the best so i overwrite php function\r\n //Make sure session cookies expire when we want it to expires\r\n ini_set('session.cookie_lifetime', $this->session_duration); \r\n //set the value of the garbage collector\r\n ini_set('session.gc_maxlifetime', $this->session_max_duration);\r\n // set the session name to our fantastic name\r\n ini_set('session.name', $this->sid_name); \r\n\r\n // register the new handler\r\n session_set_save_handler(\r\n array(&$this, 'open'),\r\n array(&$this, 'close'),\r\n array(&$this, 'read'),\r\n array(&$this, 'write'),\r\n array(&$this, 'destroy'),\r\n array(&$this, 'gc')\r\n );\r\n\r\n\r\n // start the session and cross finger\r\n session_id($this->getSessionId());\r\n session_start();\r\n\r\n } \r\n\r\n \r\n //echo \"<hr>\".$this->sessionId.\"<hr>\";\r\n //if ($this->expireSession()) $this->destroy();\r\n //$_REQUEST[$this->_MYSESSION_CONF['SESSION_VAR_NAME']]=$this->sessionId;\r\n\r\n }", "protected function collectSessionData() {\n\n\t\t$time_started = time();\n\t\t$time_ended = $time_started;\n\n\t\t$user_guid = elgg_get_logged_in_user_guid();\n\n\t\t$ip_address = $this->getIpAddress();\n\n\t\t$geolite = elgg_get_config('geolite_db');\n\t\tif (file_exists($geolite)) {\n\t\t\t$reader = new Reader($geolite);\n\t\t\t$geoip = $reader->get($ip_address);\n\t\t} else {\n\t\t\t$geoip = [];\n\t\t}\n\n\t\t$city = '';\n\t\tif (!empty($geoip['city']['names']['en'])) {\n\t\t\t$city = $geoip['city']['names']['en'];\n\t\t}\n\n\t\t$state = '';\n\t\tif (!empty($geoip['subdivisions'])) {\n\t\t\t$state = array_shift($geoip['subdivisions']);\n\t\t\tif (!empty($state['names']['en'])) {\n\t\t\t\t$state = $state['names']['en'];\n\t\t\t}\n\t\t}\n\n\t\t$country = '';\n\t\tif (!empty($geoip['country']['iso_code'])) {\n\t\t\t$country = $geoip['country']['iso_code'];\n\t\t}\n\n\t\t$latitude = '';\n\t\tif (!empty($geoip['location']['latitude'])) {\n\t\t\t$latitude = $geoip['location']['latitude'];\n\t\t}\n\n\t\t$longitude = '';\n\t\tif (!empty($geoip['location']['longitude'])) {\n\t\t\t$longitude = $geoip['location']['longitude'];\n\t\t}\n\n\t\t$timezone = '';\n\t\tif (!empty($geoip['location']['time_zone'])) {\n\t\t\t$timezone = $geoip['location']['time_zone'];\n\t\t}\n\n\t\treturn [\n\t\t\t'user_guid' => $user_guid,\n\t\t\t'time_started' => $time_started,\n\t\t\t'time_ended' => $time_ended,\n\t\t\t'ip_address' => $ip_address,\n\t\t\t'city' => $city,\n\t\t\t'state' => $state,\n\t\t\t'country' => $country,\n\t\t\t'latitude' => $latitude,\n\t\t\t'longitude' => $longitude,\n\t\t\t'timezone' => $timezone,\n\t\t];\n\t}" ]
[ "0.6300158", "0.62745667", "0.6120194", "0.60374725", "0.5937095", "0.5928759", "0.59046435", "0.5882418", "0.58820003", "0.58131766", "0.58114165", "0.57677424", "0.57572967", "0.5699838", "0.56920624", "0.569203", "0.5690582", "0.5688223", "0.56864864", "0.5679682", "0.5667835", "0.56273496", "0.5600494", "0.5570268", "0.55686563", "0.55621314", "0.55509716", "0.55407965", "0.5510479", "0.54994404", "0.5496878", "0.54895926", "0.5476751", "0.54581183", "0.54544467", "0.5452374", "0.54330903", "0.5430262", "0.5429593", "0.5420141", "0.5406553", "0.54039973", "0.53848445", "0.5381104", "0.5377513", "0.537652", "0.5370153", "0.53677714", "0.53594697", "0.53590477", "0.53549576", "0.5344323", "0.53431565", "0.53364694", "0.5335866", "0.53302914", "0.53297895", "0.5329651", "0.53295135", "0.5328428", "0.5324547", "0.53226155", "0.5317678", "0.53168494", "0.53086156", "0.53084755", "0.5305096", "0.5295916", "0.52894247", "0.5273494", "0.5269271", "0.5267096", "0.5253795", "0.5245063", "0.52324194", "0.5229449", "0.5227949", "0.52144694", "0.5212025", "0.5201771", "0.51951796", "0.51885116", "0.51770806", "0.51762587", "0.51727086", "0.517131", "0.51691234", "0.5158039", "0.5156587", "0.51468575", "0.5143728", "0.51434416", "0.51386523", "0.51368797", "0.5123468", "0.5120936", "0.5116999", "0.51159847", "0.511479", "0.51134616" ]
0.6249719
2
Determine if the user is authorized to make this request.
public function authorize() { return $this->user()->can('create', MarEntry::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.7717961", "0.7717961", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'mars.*.medication_id' => 'required|integer|exists:medications,medication_id', 'mars.*.medical_record_number' => 'required|integer|exists:patients,medical_record_number', 'mars.*.stat' => 'boolean|nullable', 'mars.*.instructions' => 'required|string', 'mars.*.given_at.*' => 'boolean|nullable', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Migration UP: We have just installed the plugin and need to prepare all necessary data.
public function up() { // Client ID of Vimeo app Config::get()->create('VIMEO_CLIENT_ID', [ 'value' => '', 'type' => 'string', 'range' => 'global', 'section' => 'externalvideos', 'description' => 'Client-ID der in Vimeo erstellten App' ]); // Client ID of Vimeo app Config::get()->create('VIMEO_CLIENT_SECRET', [ 'value' => '', 'type' => 'string', 'range' => 'global', 'section' => 'externalvideos', 'description' => 'Client Secret der in Vimeo erstellten App' ]); // Authorization code as provided by Vimeo after OAuth authorization Config::get()->create('VIMEO_AUTHORIZATION_CODE', [ 'value' => '', 'type' => 'string', 'range' => 'global', 'section' => 'externalvideos', 'description' => 'OAuth-Code bei erfolgter Authentifizierung' ]); // Authorization code as provided by Vimeo after OAuth authorization Config::get()->create('VIMEO_ACCESS_TOKEN', [ 'value' => '', 'type' => 'string', 'range' => 'global', 'section' => 'externalvideos', 'description' => 'Access Token zur Authentifizierung bei Vimeo' ]); // Callback URL for authentication requests Config::get()->create('VIMEO_CALLBACK_URL', [ 'value' => URLHelper::getLink('plugins.php/externalvideos/vimeo/callback'), 'type' => 'string', 'range' => 'global', 'section' => 'externalvideos', 'description' => 'Callback URL nach erfolgter Authentifizierung' ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function run_install()\n {\n global $wpdb;\n\n // Create Base Table in mysql\n //$charset_collate = $wpdb->get_charset_collate();\n //require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n }", "public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function install(){\n // Create plugin tables\n Project::createTable();\n\n Repo::createTable();\n\n CommitCache::createTable();\n\n MergeRequest::createTable();\n\n MergeRequestComment::createTable();\n\n $htracker = PLugin::get('h-tracker');\n if($htracker && !$htracker->isInstalled()) {\n $htracker->install();\n }\n\n // Create permissions\n Permission::add($this->_plugin . '.access-plugin', 1, 0);\n Permission::add($this->_plugin . '.create-projects', 0, 0);\n }", "public function migrate()\n {\n $this->syncRepository();\n $this->copyVariables();\n $this->copyDeployKeys();\n $this->reEnableBuilds();\n }", "public function migrate()\n {\n $this->prepareWizardsTable();\n\n $this->processProcessing();\n $this->processLogs();\n $this->processConfigData();\n\n $this->prepareOrdersTables();\n $this->prepareOrdersConfigTable();\n $this->processOrdersData();\n }", "public function migrate()\n\t{\n\t}", "public function safeUp()\n\t{\n\t\tif (!craft()->db->columnExists('plugins', 'licenseKey'))\n\t\t{\n\t\t\tCraft::log('Adding licenseKey column to plugins table', LogLevel::Info, true);\n\t\t\t$this->addColumnAfter('plugins', 'licenseKey', array('column' => ColumnType::Char, 'length' => 24), 'schemaVersion');\n\t\t\tCraft::log('Done adding licenseKey column to plugins table.', LogLevel::Info, true);\n\t\t}\n\n\t\tif (!craft()->db->columnExists('plugins', 'licenseKeyStatus'))\n\t\t{\n\t\t\tCraft::log('Adding licenseKeyStatus column to plugins table', LogLevel::Info, true);\n\t\t\t$this->addColumnAfter('plugins', 'licenseKeyStatus', array('column' => ColumnType::Enum, 'values' => array('valid', 'invalid', 'mismatched', 'unknown'), 'default' => 'unknown', 'null' => false), 'licenseKey');\n\t\t\tCraft::log('Done adding licenseKeyStatus column to plugins table.', LogLevel::Info, true);\n\t\t}\n\n\t\treturn true;\n\t}", "function wlms_plugin_install()\n{\n wlms_create_table();\n wlms_settings_data();\n}", "public function installPlugins(){\n\n $listPlugin = $this->sanitizePluginsArray();\n\n foreach ($listPlugin as $Plugin) {\n $command = \"{$this->node} {$this->ltpm} install {$Plugin['filename']}\";\n\n exec($command,$output);\n\n Artisan::call('lt-plugin:update',['--vendor-name'=> $Plugin['vendor'].','.$Plugin['name'], '--silent' => true]);\n\n Artisan::call('lt-migration:up',['--vendor-name'=>$Plugin['vendor'].','.$Plugin['name'], '--silent' => true]);\n }\n }", "public function up()\n {\n //legacy app clean up\n dbexec('DELETE FROM `#__migrator_versions` WHERE component = \"opensocial\"');\n\n dbexec('ALTER TABLE `#__nodes` CHANGE `meta` `meta` text DEFAULT NULL');\n dbexec('ALTER TABLE `#__edges` CHANGE `meta` `meta` text DEFAULT NULL');\n dbexec('ALTER TABLE `#__components` CHANGE `params` `meta` text DEFAULT NULL');\n dbexec('ALTER TABLE `#__components` DROP COLUMN `link`');\n dbexec('ALTER TABLE `#__components` DROP COLUMN `menuid`');\n dbexec('ALTER TABLE `#__components` DROP COLUMN `admin_menu_link`');\n dbexec('ALTER TABLE `#__components` DROP COLUMN `admin_menu_alt`');\n dbexec('ALTER TABLE `#__components` DROP COLUMN `admin_menu_img`');\n\n //deleting legacy data\n dbexec('DELETE FROM `#__components` WHERE `option` IN (\"com_config\",\"com_cpanel\",\"com_plugins\",\"com_templates\",\"com_components\", \"com_languages\")');\n\n $this->_updateMeta('components');\n\n dbexec('UPDATE `#__components` SET meta = REPLACE(meta, \\'\"allowUserRegistration\":\\', \\'\"allow_registration\":\\') WHERE `option` = \\'com_people\\'');\n\n //legacy data clean up\n dbexec('DELETE FROM `#__plugins` WHERE `element` = \"invite\" ');\n dbexec('ALTER TABLE `#__plugins` DROP COLUMN `access`');\n dbexec('ALTER TABLE `#__plugins` DROP COLUMN `client_id`');\n dbexec('ALTER TABLE `#__plugins` DROP COLUMN `checked_out`');\n dbexec('ALTER TABLE `#__plugins` DROP COLUMN `checked_out_time`');\n\n $this->_updateMeta('plugins');\n\n dbexec('DROP TABLE IF EXISTS `#__templates_menu`');\n dbexec('DROP TABLE IF EXISTS `#__session`');\n dbexec('DROP TABLE IF EXISTS `#__sessions`');\n\n $query = \"CREATE TABLE `#__sessions` (\"\n .\"`id` SERIAL,\"\n .\"`session_id` char(64) NOT NULL,\"\n .\"`node_id` bigint(11) NOT NULL DEFAULT 0,\"\n .\"`username` varchar(255) DEFAULT NULL,\"\n .\"`usertype` varchar(255),\"\n .\"`time` INT(11) DEFAULT 0,\"\n .\"`guest` tinyint(2) DEFAULT '1',\"\n .\"`meta` longtext,\"\n .\"PRIMARY KEY (`id`),\"\n .\"KEY `whosonline` (`guest`,`usertype`,`username`),\"\n .\"UNIQUE KEY `session_id` (`session_id`),\"\n .\"KEY `node_id` (`node_id`),\"\n .\"KEY `username` (`username`)\"\n .\") ENGINE=InnoDB CHARACTER SET=utf8\";\n dbexec($query);\n\n //for people the alias is the same as username\n dbexec(\"UPDATE `#__nodes` SET alias = person_username WHERE type LIKE '%com:people.domain.entity.person' \");\n\n dbexec('DROP TABLE IF EXISTS `#__people_people`');\n\n $query = \"CREATE TABLE `#__people_people` (\"\n .\"`people_person_id` SERIAL,\"\n .\"`node_id` BIGINT UNSIGNED NOT NULL,\"\n .\"`userid` INT(11) DEFAULT NULL,\"\n .\"`email` varchar(255) DEFAULT NULL,\"\n .\"`username` varchar(255) DEFAULT NULL,\"\n .\"`password` varchar(255) DEFAULT NULL,\"\n .\"`usertype` varchar(50) DEFAULT NULL,\"\n .\"`gender` varchar(50) DEFAULT NULL,\"\n .\"`given_name` varchar(255) DEFAULT NULL,\"\n .\"`family_name` varchar(255) DEFAULT NULL,\"\n .\"`network_presence` tinyint(3) NOT NULL DEFAULT 0,\"\n .\"`last_visit_date` datetime DEFAULT NULL,\"\n .\"`time_zone` int(11) DEFAULT NULL,\"\n .\"`language` varchar(100) DEFAULT NULL,\"\n .\"`activation_code` varchar(255) DEFAULT NULL,\"\n .\"PRIMARY KEY (`people_person_id`),\"\n .\"KEY `usertype` (`usertype`),\"\n .\"UNIQUE KEY `username` (`username`),\"\n .\"UNIQUE KEY `email` (`email`),\"\n .\"UNIQUE KEY `node_id` (`node_id`),\"\n .\"KEY `last_visit_date` (`last_visit_date`)\"\n .\") ENGINE=InnoDB CHARACTER SET=utf8\";\n dbexec($query);\n\n $query = \"INSERT INTO `#__people_people` (\"\n .\"`node_id`,`userid`,`username`,`usertype`,`gender`,\"\n .\"`email`,`given_name`,`family_name`,\"\n .\"`last_visit_date`,`time_zone`,`language` )\"\n .\" SELECT \"\n .\"`id`,`person_userid`,`person_username`,`person_usertype`,`actor_gender`,\"\n .\"`person_useremail`,`person_given_name`,`person_family_name`,\"\n .\"`person_lastvisitdate`,`person_time_zone`,`person_language` \"\n .\" FROM `#__nodes` ORDER BY `id`\";\n dbexec($query);\n\n $query = \"UPDATE `#__people_people` AS `p` \"\n .\"INNER JOIN `#__users` AS `u` ON `u`.`id` = `p`.`userid`\"\n .\" SET \"\n .\"`p`.`password` = `u`.`password`,\"\n .\"`p`.`last_visit_date` = `u`.`lastvisitDate`,\"\n .\"`p`.`activation_code` = `u`.`activation`\";\n dbexec($query);\n\n dbexec('ALTER TABLE `#__nodes` DROP COLUMN `person_userid`');\n dbexec('ALTER TABLE `#__nodes` DROP COLUMN `person_username`');\n dbexec('ALTER TABLE `#__nodes` DROP COLUMN `person_useremail`');\n dbexec('ALTER TABLE `#__nodes` DROP COLUMN `person_usertype`');\n dbexec('ALTER TABLE `#__nodes` DROP COLUMN `person_lastvisitdate`');\n dbexec('ALTER TABLE `#__nodes` DROP COLUMN `actor_gender`');\n dbexec('ALTER TABLE `#__nodes` DROP COLUMN `person_given_name`');\n dbexec('ALTER TABLE `#__nodes` DROP COLUMN `person_family_name`');\n dbexec('ALTER TABLE `#__nodes` DROP COLUMN `person_network_presence`');\n\n dbexec('ALTER TABLE `#__nodes` CHANGE `person_time_zone` `timezone` int(3) DEFAULT NULL');\n dbexec('ALTER TABLE `#__nodes` CHANGE `person_language` `language` VARCHAR(50) DEFAULT NULL');\n\n dbexec('ALTER TABLE `#__people_people` DROP COLUMN `userid`');\n\n dbexec('DROP TABLE IF EXISTS `#__users`');\n\n //update user and authentication plugins\n dbexec(\"UPDATE `#__plugins` SET `element` = 'anahita' WHERE `element` = 'joomla'\");\n dbexec(\"UPDATE `#__plugins` SET `name` = 'User - Anahita' WHERE `folder` = 'user' AND `element` = 'anahita'\");\n\n dbexec('ALTER TABLE `#__nodes` CHANGE name name VARCHAR(255) CHARACTER SET utf8mb4');\n dbexec('ALTER TABLE `#__nodes` CHANGE alias alias VARCHAR(255) CHARACTER SET utf8mb4');\n dbexec('ALTER TABLE `#__nodes` CHANGE body body MEDIUMTEXT CHARACTER SET utf8mb4');\n dbexec('ALTER TABLE `#__nodes` CHANGE excerpt excerpt TEXT CHARACTER SET utf8mb4');\n }", "public function safeUp()\n\t{\n\t $json = '{\"settings\":{\"dependencies\":[],\"elements\":{\"fields\":[{\"group\":\"About Page\",\"name\":\"CV\",\"handle\":\"cv\",\"instructions\":\"This is the cv and shadow cv that can be downloaded.\",\"translatable\":\"0\",\"required\":false,\"type\":\"Assets\",\"typesettings\":{\"useSingleFolder\":\"\",\"sources\":[\"resources\"],\"defaultUploadLocationSource\":\"timelinePhotos\",\"defaultUploadLocationSubpath\":\"\",\"singleUploadLocationSource\":\"timelinePhotos\",\"singleUploadLocationSubpath\":\"\",\"restrictFiles\":\"\",\"limit\":\"1\",\"viewMode\":\"list\",\"selectionLabel\":\"Upload CV\"}},{\"group\":\"About Page\",\"name\":\"Speaker Packet\",\"handle\":\"speakerPacket\",\"instructions\":\"This is the professional bio and speaker\\u0027s packet that can be downloaded.\",\"translatable\":\"0\",\"required\":false,\"type\":\"Assets\",\"typesettings\":{\"useSingleFolder\":\"\",\"sources\":[\"resources\"],\"defaultUploadLocationSource\":\"resources\",\"defaultUploadLocationSubpath\":\"\",\"singleUploadLocationSource\":\"timelinePhotos\",\"singleUploadLocationSubpath\":\"\",\"restrictFiles\":\"\",\"limit\":\"1\",\"viewMode\":\"list\",\"selectionLabel\":\"Upload speaker packet\"}}]}}}';\n return craft()->migrationManager_migrations->import($json);\n }", "function migrate_db() {\r\n \r\n // $migrater->create_migrations_table();\r\n // $migrater->build_schema();\r\n }", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function preUp()\n {\n }", "public function migrate() \n {\n\n Masteryl_Migration::createOrUpdateDir(MASTERYL_MIGRATIONS_PATH, $this);\n\n if(!empty($this->modules)) {\n foreach($this->modules as $mod) {\n $dir = $mod['path'].'migrations';\n \n if(file_exists($dir))\n Masteryl_Migration::createOrUpdateDir($dir, $this);\n }\n }\n\n }", "public function up()\n {\n $oldStores = $this->getOldStores(); // update to newest data_version\n $newStores = $this->getNewStores(); // run all upgrade files\n if (!count($oldStores) && !count($newStores)) {\n return;\n }\n\n foreach ($this->getDepends() as $moduleCode) {\n if (0 !== strpos($moduleCode, 'TM_')) {\n continue;\n }\n $this->_getModuleObject($moduleCode)->up();\n }\n $saved = false;\n\n // upgrade currently installed version to the latest data_version\n if (count($oldStores)) {\n foreach ($this->getUpgradesToRun() as $version) {\n // customer able to skip upgrading data of installed modules\n if (!$this->getSkipUpgrade()) {\n $this->getUpgradeObject($version)\n ->setStoreIds($oldStores)\n ->upgrade();\n }\n $this->setDataVersion($version)->save();\n $saved = true;\n }\n }\n\n // install module to the new stores\n if (count($newStores)) {\n foreach ($this->getUpgradesToRun(0) as $version) {\n $this->getUpgradeObject($version)\n ->setStoreIds($newStores)\n ->upgrade();\n $this->setDataVersion($version)->save();\n $saved = true;\n }\n }\n\n if (!$saved) {\n $this->save(); // identity key could be updated without running the upgrades\n }\n }", "private function prepareDatabase()\n {\n if ($database = $this->getStringOption('database')) {\n $this->migrator->setConnection($database);\n }\n\n if ( ! $this->migrator->repositoryExists()) {\n $this->call('migrate:install', [\n '--database' => $database,\n ]);\n }\n }", "protected function migration_process() {\n\t\t$available_languages = Fusion_Multilingual::get_available_languages();\n\t\tself::$available_languages = ( ! empty( $available_languages ) ) ? $available_languages : [ '' ];\n\n\t\t$this->migrate_options();\n\t}", "function plugin_install () {\n global $wpdb;\n $charset_collate = $wpdb->get_charset_collate();\n\n // First we define our tables. We need 3, so let's create the names\n $pollsTable = $wpdb->prefix . \"polls_\" .\"polls\";\n $optionsTable = $wpdb->prefix . \"polls_\" .\"options\";\n $votesTable = $wpdb->prefix . \"polls_\" .\"votes\";\n\n // Let's now create the tables with the names we built\n\n // Poll is the \"master container\" of our little system\n $createPollTable = \"CREATE TABLE $pollsTable (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n name tinytext NOT NULL,\n creationDate TIMESTAMP NOT NULL,\n PRIMARY KEY (id)\n ) $charset_collate;\";\n \n // Then we need to create options that are tied to each poll\n $createOptionsTable = \"CREATE TABLE $optionsTable (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n poll_id mediumInt(9) NOT NULL,\n name tinytext NOT NULL,\n PRIMARY KEY (id),\n FOREIGN KEY (poll_id) REFERENCES {$pollsTable} (id)\n ) $charset_collate;\";\n\n // And finally, we need to store each vote as a row. Each vote belongs to a poll\n // and represents one option from it\n $createVotesTable = \"CREATE TABLE $votesTable (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n poll_id mediumInt(9) NOT NULL,\n option_id mediumInt(9) NOT NULL,\n creationDate TIMESTAMP NOT NULL,\n PRIMARY KEY (id),\n FOREIGN KEY (poll_id) REFERENCES {$pollsTable} (id),\n FOREIGN KEY (option_id) REFERENCES {$optionsTable} (id)\n ) $charset_collate;\";\n\n // We need to import the upgrade script to make the plugin create the tables upon activation:\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n // And now let's execute our queries\n dbDelta($createPollTable);\n dbDelta($createOptionsTable);\n dbDelta($createVotesTable);\n}", "function install_plugins_upload()\n {\n }", "public function sync()\n {\n $sql = null;\n $module = new \\ZPM\\Core\\Setup\\Schema();\n $modData = new \\ZPM\\Core\\Setup\\Info();\n\n $module->install();\n }", "public function setUp()\n {\n parent::setUp();\n $this->_installSchema(self::$oldVersion);\n }", "public function migrate()\n\t{ \n\t\t(new MigratorInterface)->migrate();\n\t}", "public function installWordpressData() {\n }", "private function setupMigrations()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n }", "protected function prepareDatabase()\n {\n if (!$this->repositoryExists()) {\n $this->components->info('Preparing database.');\n\n $this->components->task('Creating package migration table', function () {\n return $this->callSilent('package:migrate:install', array_filter([\n '--database' => $this->option('database'),\n ])) == 0;\n });\n\n $this->newLine();\n }\n\n }", "public function migrate() {}", "public function safeUp()\n\t{\n\t $json = '{\"settings\":{\"dependencies\":{\"sections\":[{\"name\":\"Resources\",\"handle\":\"resources\",\"type\":\"channel\",\"enableVersioning\":\"1\",\"hasUrls\":\"1\",\"template\":\"resources/_entry\",\"maxLevels\":null,\"locales\":{\"en_us\":{\"locale\":\"en_us\",\"urlFormat\":\"resources/{slug}\",\"nestedUrlFormat\":null,\"enabledByDefault\":\"1\"}},\"entrytypes\":[{\"sectionHandle\":\"resources\",\"hasTitleField\":\"1\",\"titleLabel\":\"Title\",\"name\":\"Resources\",\"handle\":\"resources\",\"fieldLayout\":{\"Content\":[\"description\"]},\"requiredFields\":[]}]}]},\"elements\":{\"sections\":[{\"name\":\"Resources\",\"handle\":\"resources\",\"type\":\"channel\",\"enableVersioning\":\"1\",\"hasUrls\":\"1\",\"template\":\"resources/_entry\",\"maxLevels\":null,\"locales\":{\"en_us\":{\"locale\":\"en_us\",\"urlFormat\":\"resources/{slug}\",\"nestedUrlFormat\":null,\"enabledByDefault\":\"1\"}},\"entrytypes\":[{\"sectionHandle\":\"resources\",\"hasTitleField\":\"1\",\"titleLabel\":\"Title\",\"name\":\"Resources\",\"handle\":\"resources\",\"fieldLayout\":{\"Content\":[\"description\"]},\"requiredFields\":[]}]}]}}}';\n return craft()->migrationManager_migrations->import($json);\n }", "function plugin_install_now()\n{\n global $_CONF, $_TABLES, $_USER, $_DB_dbms,\n $GROUPS, $FEATURES, $MAPPINGS, $DEFVALUES, $base_path,\n $pi_name, $pi_display_name, $pi_version, $gl_version, $pi_url;\n\n COM_errorLog(\"Attempting to install the $pi_display_name plugin\", 1);\n\n // create the plugin's groups\n $admin_group_id = 0;\n foreach ($GROUPS as $name => $desc) {\n COM_errorLog(\"Attempting to create $name group\", 1);\n\n $grp_name = addslashes($name);\n $grp_desc = addslashes($desc);\n DB_query(\"INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr) VALUES ('$grp_name', '$grp_desc')\", 1);\n if (DB_error()) {\n PLG_uninstall($pi_name);\n\n return false;\n }\n\n // replace the description with the new group id so we can use it later\n $GROUPS[$name] = DB_insertId();\n\n // assume that the first group is the plugin's Admin group\n if ($admin_group_id == 0) {\n $admin_group_id = $GROUPS[$name];\n }\n }\n\n // Create the plugin's table(s)\n $_SQL = array();\n if (file_exists($base_path . 'sql/' . $_DB_dbms . '_install.php')) {\n require_once $base_path . 'sql/' . $_DB_dbms . '_install.php';\n }\n\n if (count($_SQL) > 0) {\n $use_innodb = false;\n if (($_DB_dbms == 'mysql') &&\n (DB_getItem($_TABLES['vars'], 'value', \"name = 'database_engine'\")\n == 'InnoDB')) {\n $use_innodb = true;\n }\n foreach ($_SQL as $sql) {\n $sql = str_replace('#group#', $admin_group_id, $sql);\n if ($use_innodb) {\n $sql = str_replace('MyISAM', 'InnoDB', $sql);\n }\n DB_query($sql);\n if (DB_error()) {\n COM_errorLog('Error creating table', 1);\n PLG_uninstall($pi_name);\n\n return false;\n }\n }\n }\n\n // Add the plugin's features\n COM_errorLog(\"Attempting to add $pi_display_name feature(s)\", 1);\n\n foreach ($FEATURES as $feature => $desc) {\n $ft_name = addslashes($feature);\n $ft_desc = addslashes($desc);\n DB_query(\"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr) \"\n . \"VALUES ('$ft_name', '$ft_desc')\", 1);\n if (DB_error()) {\n PLG_uninstall($pi_name);\n\n return false;\n }\n\n $feat_id = DB_insertId();\n\n if (isset($MAPPINGS[$feature])) {\n foreach ($MAPPINGS[$feature] as $group) {\n COM_errorLog(\"Adding $feature feature to the $group group\", 1);\n DB_query(\"INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES ($feat_id, {$GROUPS[$group]})\");\n if (DB_error()) {\n PLG_uninstall($pi_name);\n\n return false;\n }\n }\n }\n }\n\n // Add plugin's Admin group to the Root user group\n // (assumes that the Root group's ID is always 1)\n COM_errorLog(\"Attempting to give all users in the Root group access to the $pi_display_name's Admin group\", 1);\n\n DB_query(\"INSERT INTO {$_TABLES['group_assignments']} VALUES \"\n . \"($admin_group_id, NULL, 1)\");\n if (DB_error()) {\n PLG_uninstall($pi_name);\n\n return false;\n }\n\n // Pre-populate tables or run any other SQL queries\n COM_errorLog('Inserting default data', 1);\n foreach ($DEFVALUES as $sql) {\n $sql = str_replace('#group#', $admin_group_id, $sql);\n DB_query($sql, 1);\n if (DB_error()) {\n PLG_uninstall($pi_name);\n\n return false;\n }\n }\n\n // Load the online configuration records\n if (function_exists('plugin_load_configuration')) {\n if (!plugin_load_configuration()) {\n PLG_uninstall($pi_name);\n\n return false;\n }\n }\n\n // Finally, register the plugin with Geeklog\n COM_errorLog(\"Registering $pi_display_name plugin with Geeklog\", 1);\n\n // silently delete an existing entry\n DB_delete($_TABLES['plugins'], 'pi_name', $pi_name);\n\n DB_query(\"INSERT INTO {$_TABLES['plugins']} (pi_name, pi_version, pi_gl_version, pi_homepage, pi_enabled) VALUES \"\n . \"('$pi_name', '$pi_version', '$gl_version', '$pi_url', 1)\");\n\n if (DB_error()) {\n PLG_uninstall($pi_name);\n\n return false;\n }\n\n // give the plugin a chance to perform any post-install operations\n if (function_exists('plugin_postinstall')) {\n if (!plugin_postinstall()) {\n PLG_uninstall($pi_name);\n\n return false;\n }\n }\n\n COM_errorLog(\"Successfully installed the $pi_display_name plugin!\", 1);\n\n return true;\n}", "protected function prepareDatabase()\n {\n $this->stateSaver->setConnection($this->input->getOption('database'));\n\n if (!$this->stateSaver->repositoryExists()) {\n $options = ['--database' => $this->input->getOption('database')];\n $this->call('migrate:install', $options);\n }\n }", "public function start_plugin_backup() {\n \n // Backups the files to update and save update\n (new MidrubBaseAdminCollectionUpdateHelpers\\Plugins)->start_backup();\n \n }", "function install_plugin_information()\n {\n }", "public function init() {\n//\t\tif (checkTable()) {\n//\t\t\t$this->model->upgrade();\n//\t\t}\n//\t\telse {\n\t\t\t$this->model->install();\n\t\t\t$this->loadDefaults();\n//\t\t}\n\t\t\n\t}", "public function setUp()\n {\n $this->pluginsEnabled[] = PluginStatic::$PLUGIN_BASE_NAME;\n $this->pluginsEnabled[] = 'sqlite';\n parent::setUp();\n }", "abstract protected function up();", "public function plugin_setup() {\n\n\t\t//Get plugin Data information\n\t\tif ( ! function_exists( 'get_plugin_data' ) ) {\n\t\t\trequire_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\t}\n\t\t$plugin_data = get_plugin_data( __FILE__ );\n\n\t\t//Get Option\n\t\tself::$option = get_option( 'wp_online_pub_opt' );\n\n\t\t//Get Plugin Version\n\t\tself::$plugin_version = $plugin_data['Version'];\n\n\t\t//Set Variable\n\t\tself::$plugin_url = plugins_url( '', __FILE__ );\n\t\tself::$plugin_path = plugin_dir_path( __FILE__ );\n\n\t\t//Set Text Domain\n\t\t$this->load_language( 'wp-onlinepub' );\n\n\t\t//Load Composer\n\t\tinclude_once dirname( __FILE__ ) . '/vendor/autoload.php';\n\n\t\t//set plugin option\n\t\tnew \\WP_OnlinePub\\Gravity_Form();\n\t\tnew \\WP_OnlinePub\\Ticket();\n\t\tnew \\WP_OnlinePub\\Admin_Setting_Api();\n\t\tnew \\WP_OnlinePub\\Admin_Page();\n\t\tnew \\WP_OnlinePub\\Front();\n\t\tnew \\WP_OnlinePub\\Payment();\n\t\tnew \\WP_OnlinePub\\Ajax();\n\n\t\t//Test Service\n\t\tif ( isset( $_GET['test'] ) ) {\n\t\t\t//self::send_mail('admin', 'عنوان ایمیل','matn email test');\n\t\t\t//exit;\n\t\t}\n\t}", "public function setUp() {\n\t\tparent::setUp();\n\n\t\t$testPluginData = [\n\t\t\t'full_path' => ROOT . DS . 'plugins' . DS . 'PluginInstallerTest' . DS,\n\t\t\t'config_folder' => ROOT . DS . 'plugins' . DS . 'PluginInstallerTest' . DS . 'config' . DS\n\t\t];\n\n\t\t$pluginFolder = new Folder($testPluginData['full_path'], self::CREATE_FOLDER_IF_NOT_EXISTS, self::PLUGIN_FOLDER_PERMISSIONS);\n\t\t$pluginFolder->create('config');\n\n\t\t$defaultSettingsFile = new File($testPluginData['config_folder'] . 'default_settings.php', true);\n\t\t$defaultSettingsFile->write(\"<?php \n\t\t\treturn [\n\t\t\t\t'MyApplication.Modules.PluginInstallerTest.Settings' => \n\t\t\t\t\t['Default' => true]\n\t\t\t\t]; \n\t\t?>\");\n\t\t$defaultSettingsFile->close();\n\t\t$bootstrapFile = new File($testPluginData['config_folder'] . 'bootstrap.php', true);\n\t\t$bootstrapFile->close();\n\t\tPlugin::load('PluginInstallerTest', ['routes' => false, 'bootstrap' => false]);\n\t}", "public function upgrade () {\r\n }", "function plugin_install_now()\n{\n global $pi_name, $pi_version, $gl_version, $pi_url, $NEWTABLE, $DEFVALUES, $NEWFEATURE;\n global $_TABLES, $_CONF;\n\n COM_errorLog(\"Attempting to install the $pi_name Plugin\",1);\n $uninstall_plugin = 'plugin_uninstall_' . $pi_name;\n\n // Create the Plugins Tables\n require_once($_CONF['path'] . 'plugins/forum/sql/mysql_install_2.6.php');\n\n for ($i = 1; $i <= count($_SQL); $i++) {\n $progress .= \"executing \" . current($_SQL) . \"<br\" . XHTML . \">\\n\";\n COM_errorLOG(\"executing \" . current($_SQL));\n DB_query(current($_SQL),'1');\n if (DB_error()) {\n COM_errorLog(\"Error Creating $table table\",1);\n $uninstall_plugin ('DeletePlugin');\n return false;\n exit;\n }\n next($_SQL);\n }\n COM_errorLog(\"Success - Created $table table\",1);\n \n // Insert Default Data\n \n foreach ($DEFVALUES as $table => $sql) {\n COM_errorLog(\"Inserting default data into $table table\",1);\n DB_query($sql,1);\n if (DB_error()) {\n COM_errorLog(\"Error inserting default data into $table table\",1);\n $uninstall_plugin ();\n return false;\n exit;\n }\n COM_errorLog(\"Success - inserting data into $table table\",1);\n }\n \n // Create the plugin admin security group\n COM_errorLog(\"Attempting to create $pi_name admin group\", 1);\n DB_query(\"INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr) \"\n . \"VALUES ('$pi_name Admin', 'Users in this group can administer the $pi_name plugin')\",1);\n if (DB_error()) {\n $uninstall_plugin();\n return false;\n exit;\n }\n COM_errorLog('...success',1);\n $query = DB_query(\"SELECT max(grp_id) FROM {$_TABLES['groups']} \");\n list ($group_id) = DB_fetchArray($query);\n\n // Save the grp id for later uninstall\n COM_errorLog('About to save group_id to vars table for use during uninstall',1);\n DB_query(\"INSERT INTO {$_TABLES['vars']} VALUES ('{$pi_name}_admin', $group_id)\",1);\n if (DB_error()) {\n $uninstall_plugin ();\n return false;\n exit;\n }\n COM_errorLog('...success',1);\n \n // Add plugin Features\n foreach ($NEWFEATURE as $feature => $desc) {\n COM_errorLog(\"Adding $feature feature\",1);\n DB_query(\"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr) \"\n . \"VALUES ('$feature','$desc')\",1);\n if (DB_error()) {\n COM_errorLog(\"Failure adding $feature feature\",1);\n $uninstall_plugin ();\n return false;\n exit;\n }\n $query = DB_query(\"SELECT max(ft_id) FROM {$_TABLES['features']} \");\n list ($feat_id) = DB_fetchArray($query);\n\n COM_errorLog(\"Success\",1);\n COM_errorLog(\"Adding $feature feature to admin group\",1);\n DB_query(\"INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES ($feat_id, $group_id)\");\n if (DB_error()) {\n COM_errorLog(\"Failure adding $feature feature to admin group\",1);\n $uninstall_plugin ();\n return false;\n exit;\n }\n COM_errorLog(\"Success\",1);\n } \n \n // OK, now give Root users access to this plugin now! NOTE: Root group should always be 1\n COM_errorLog(\"Attempting to give all users in Root group access to $pi_name admin group\",1);\n DB_query(\"INSERT INTO {$_TABLES['group_assignments']} VALUES ($group_id, NULL, 1)\");\n if (DB_error()) {\n $uninstall_plugin ();\n return false;\n exit;\n }\n\n // Register the plugin with Geeklog\n COM_errorLog(\"Registering $pi_name plugin with Geeklog\", 1);\n DB_delete($_TABLES['plugins'],'pi_name',$pi_name);\n DB_query(\"INSERT INTO {$_TABLES['plugins']} (pi_name, pi_version, pi_gl_version, pi_homepage, pi_enabled) \"\n . \"VALUES ('$pi_name', '$pi_version', '$gl_version', '$pi_url', 1)\");\n\n if (DB_error()) {\n $uninstall_plugin ();\n return false;\n exit;\n }\n\n COM_errorLog(\"Succesfully installed the $pi_name Plugin!\",1);\n return true;\n}", "public function migrate()\n {\n $fileSystem = new Filesystem();\n $classFinder = new ClassFinder();\n\n foreach ($fileSystem->files(__DIR__.'/../../../../tests/NilPortugues/App/Migrations') as $file) {\n $fileSystem->requireOnce($file);\n $migrationClass = $classFinder->findClass($file);\n (new $migrationClass())->down();\n (new $migrationClass())->up();\n }\n }", "public function setup()\n {\n CRUD::setModel(Plugin::class);\n CRUD::setRoute(config('backpack.base.route_prefix') . '/plugin');\n CRUD::setEntityNameStrings('plugin', 'plugins');\n $this->crud->denyAccess('update');\n }", "public function onMigratePostImport(MigrateImportEvent $event) {\n\n if ($this->searchStatus == TRUE) {\n \\Drupal::service('module_installer')->install(['search']);\n $config = $this->entityTypeManager->getStorage('search.settings')->load();\n $config->setOption('search.settings', $this->searchSettings);\n }\n if ($this->trackerStatus == TRUE) {\n \\Drupal::service('module_installer')->install(['tracker']);\n $config = $this->entityTypeManager->getStorage('tracker.settings')->load();\n $config->setOption('tracker.settings', $this->trackerSettings);\n }\n if ($this->pathautoStatus == TRUE) {\n \\Drupal::service('module_installer')->install(['pathauto']);\n $config = $this->entityTypeManager->getStorage('pathauto.settings')->load();\n $config->setOption('pathauto.settings', $this->pathautoSettings);\n }\n\n }", "function initConfig(){\n log_message('info',\"INIT DB MIGRATIONS\");\n $this->CI->load->library('migration');\n\n// $this->CI->migration->version(9);\n\n if(!$this->CI->migration->latest()){\n show_error($this->CI->migration->error_string());\n }\n\n }", "function xmldb_assignsubmission_cle_install() {\r\n global $CFG;\r\n\r\n // do the install\r\n\r\n require_once($CFG->dirroot . '/mod/assign/adminlib.php');\r\n // set the correct initial order for the plugins\r\n $pluginmanager = new assign_plugin_manager('assignsubmission');\r\n\r\n \r\n \r\n // do the upgrades\r\n return true;\r\n\r\n}", "protected function afterInstall()\n {\n }", "function hs_courses_importer_post_update_8003() {\n $migrations = hs_field_helpers_migration_list();\n /** @var \\Drupal\\migrate_plus\\Entity\\Migration $course_migration */\n $course_migration = $migrations['hs_courses']['hs_courses'];\n $log = new MigrateMessage();\n $executable = new MigrateExecutable($course_migration, $log);\n $executable->import();\n}", "public function upgrade() {\n//\t\tupdate it's database table, you will need to run this:\n//\t\t\n//\t\t$est = AttributeType::getByHandle('attribute_handle');\n//\t\t$path = $est->getAttributeTypeFilePath(FILENAME_ATTRIBUTE_DB);\n//\t\tPackage::installDB($path);\n\n\t\tparent::upgrade();\n\t\t//$pkg = Package::getByHandle($this->pkgHandle);\n\t\t//$this->installAdditionalPageAttributes($pkg);\n\t}", "public function up()\n\t{\n// $import->import();\n\t}", "public function safeUp()\n\t{\n $this->execute(\"\n -- Дамп структуры для таблица dev_dont_stop.Currencies\n CREATE TABLE IF NOT EXISTS `Currencies` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Currency ID',\n `name` varchar(50) NOT NULL DEFAULT '' COMMENT 'Currency name',\n `key` varchar(10) NOT NULL DEFAULT '' COMMENT 'Currency key',\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;\n\n -- Дамп данных таблицы dev_dont_stop.Currencies: ~3 rows (приблизительно)\n /*!40000 ALTER TABLE `Currencies` DISABLE KEYS */;\n INSERT INTO `Currencies` (`id`, `name`, `key`) VALUES\n (1, 'Российский рубль', 'RUR'),\n (2, 'Белорусский рубль', 'BYR'),\n (3, 'Доллар США', 'USD');\n /*!40000 ALTER TABLE `Currencies` ENABLE KEYS */;\n /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;\n /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;\n /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n \");\n\t}", "public function _postSetup()\n {\n }", "public function install()\r\n {\r\n if (!get_option('ohs_newsletter_installed')) {\r\n global $wpdb;\r\n $charset_collate = $wpdb->get_charset_collate();\r\n $fullTableName = $wpdb->prefix . self::$tableName;\r\n\r\n $sql = \"CREATE TABLE $fullTableName (\r\n id mediumint(9) UNSIGNED NOT NULL AUTO_INCREMENT,\r\n first_name varchar(100) NOT NULL,\r\n last_name varchar(100) NOT NULL,\r\n email varchar(100) NOT NULL,\r\n validation_code varchar(200) NOT NULL,\r\n PRIMARY KEY id (id)\r\n ) $charset_collate;\";\r\n\r\n dbDelta($sql);\r\n add_option('ohs_newsletter_installed', 1);\r\n\r\n add_option('ohs_newsletter_sendgrid_api', \"\");\r\n add_option('ohs_newsletter_sendgrid_list', \"\");\r\n add_option('ohs_newsletter_redirect', \"\");\r\n }\r\n }", "function deployment_admin_init() {\n\n\t// What is the current version of this plugin?\n\t$deployment_version = 3;\n\n\t// What is the current version in the db\n\t$db_version = get_option( 'deployment_version', 0 );\n\n\t// Is the db out of date?\n\tif ( $db_version < $deployment_version ) {\n\n\t\t// If so, loop over all subsequent version numbers and attempt to run corresponding deployment_update_N functions\n\t\tfor ( $version = $db_version + 1; $version <= $deployment_version; $version ++ ) {\n\t\t\tif ( function_exists( 'deployment_update_' . $version ) ) {\n\t\t\t\t$success = call_user_func( 'deployment_update_' . $version );\n\n\t\t\t\t// If the function returns a boolean false, log an error and bail out. Subsequent updates may rely on this update\n\t\t\t\t// so we shouldn't proceed any further.\n\t\t\t\tif ( $success === FALSE ) {\n\t\t\t\t\t// @TODO: log error here\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we've reached this far without error, update the db version\n\t\t\tupdate_option( 'deployment_version', $version );\n\t\t}\n\n\t\t// @TODO: output update summary on success\n\t}\n}", "public static function upgrade_120() {\n global $wpdb;\n\n // Add caps again, has not worked for everyone in 1.1.0\n self::assign_capabilities();\n\n // Clean up duplicate indexes (due to bug in dbDelta)\n self::remove_duplicate_indexes('h5p_contents', 'id');\n self::remove_duplicate_indexes('h5p_contents_libraries', 'content_id');\n self::remove_duplicate_indexes('h5p_results', 'id');\n self::remove_duplicate_indexes('h5p_libraries', 'id');\n self::remove_duplicate_indexes('h5p_libraries_libraries', 'library_id');\n self::remove_duplicate_indexes('h5p_libraries_languages', 'library_id');\n\n // Make sure we use the charset defined in wp-config, and not DB default.\n $charset = self::determine_charset();\n if (!empty($charset)) {\n $wpdb->query(\"ALTER TABLE `{$wpdb->prefix}h5p_contents` {$charset}\");\n $wpdb->query(\"ALTER TABLE `{$wpdb->prefix}h5p_contents_libraries` {$charset}\");\n $wpdb->query(\"ALTER TABLE `{$wpdb->prefix}h5p_results` {$charset}\");\n $wpdb->query(\"ALTER TABLE `{$wpdb->prefix}h5p_libraries` {$charset}\");\n $wpdb->query(\"ALTER TABLE `{$wpdb->prefix}h5p_libraries_libraries` {$charset}\");\n $wpdb->query(\"ALTER TABLE `{$wpdb->prefix}h5p_libraries_languages` {$charset}\");\n }\n }", "public function up(){\n $migration_files=dirToArray($this->migrations_dir);\n if(!sizeof($migration_files)){\n die('migration does not exist');\n }\n\n //check MIGRATION_TABLE_NAME\n $this->_check_table();\n\n //check run migrations\n $migration_files=$this->_check_run_migrations($migration_files);\n\n if(sizeof($migration_files)<=0){\n die('migration file does not exist');\n }\n\n $responses = [];\n foreach($migration_files as $file){\n $responses[] = $this->_run($file,'up');\n }\n return $responses;\n }", "public function up()\n {\n $discoverableDirectories[] = __DIR__ . '/../../kojo-environment';\n $finder = new Finder();\n $finder->name('*.yml');\n $finder->files()->in($discoverableDirectories);\n\n $jobCreator = (new Job\\Type\\Service())\n ->addYmlServiceFinder($finder)\n ->getNewJobTypeRegistrar();\n\n $jobCreator->setCode(Component\\WorkerInterface::JOB_TYPE_CODE)\n ->setWorkerClassUri(Component\\Worker\\Proxy::class)\n ->setWorkerMethod('work')\n ->setName('Worker completing successfully')\n // ->setCronExpression('* * * * *')\n ->setCanWorkInParallel(false)\n ->setDefaultImportance(10)\n ->setScheduleLimit(0)\n ->setIsEnabled(true)\n ->setAutoCompleteSuccess(false)\n ->setAutoDeleteIntervalDuration('PT1M');\n $jobCreator->save();\n }", "public function action_admin_init() {\n\t\t$this->maybe_upgrade();\n\t}", "protected function setup()\n {\n //prepare your stuff\n }", "public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }", "public function up() {\n\n\t\tif ( $this->skip_this_migration ) {\n\t\t\tEE::debug( 'Skipping add-ext-config-8.0 update migration as it is not needed.' );\n\n\t\t\treturn;\n\t\t}\n\n\t\t$os = php_uname( 'v' );\n\t\t$ip_command_present = EE::launch( 'command -v ip' )->return_code === 0;\n\n\t\tif ( ( strpos( $os, 'Ubuntu') !== false || strpos( $os, 'Debian' ) !== false )\n\t\t\t&& ! $ip_command_present ) {\n\t\t\tEE::exec( 'bash -c \\'if command -v apt; then apt install -y iproute2; fi\\'' );\n\t\t}\n\t}", "public function migrate()\n\t{\n\t\t$this->process( $this->mysql );\n\t}", "public function migrate()\n\t{\n\t\t$this->process( $this->mysql );\n\t}", "protected function _upgrade()\n {\n $this->helper->pluginBroker->callHook(\n 'upgrade', array('old_version' => self::$oldVersion), 'Neatline'\n );\n }", "private function finalize() {\n\n\t\t// Remove git before it's moved.\n\t\t$plugin_dir = untrailingslashit( dirname( app()->plugin_file ) );\n\n\t\tif ( ! $this->dryrun ) {\n\t\t\t$this->fs->delete( \"{$plugin_dir}/.git\", true ); // Remove git.\n\t\t\t$this->fs->delete( \"{$plugin_dir}/.gitignore\", true ); // Remove gitignore.\n\t\t}\n\n\t\t// Move it.\n\t\t$slug = $this->slugify( $this->cli_args->get_arg( 'name' ) );\n\n\t\t$plugins_dir = untrailingslashit( dirname( dirname( app()->plugin_file ) ) );\n\n\t\t$olddir = dirname( app()->plugin_file );\n\t\t$newdir = \"{$plugins_dir}/{$slug}\";\n\n\t\tif ( ! file_exists( $newdir ) ) {\n\t\t\tif ( ! $this->dryrun ) {\n\t\t\t\t$this->fs->move( $olddir, $newdir );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! $this->dryrun ) {\n\t\t\t// @codingStandardsIgnoreLine: Try and activate that plugin.\n\t\t\tshell_exec( \"wp plugin activate {$slug} --allow-root\" );\n\t\t}\n\t}", "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function up() {\n\n\t\tif ( $this->fs->exists( EE_SERVICE_DIR . '/docker-compose.yml' ) ) {\n\t\t\t$this->skip_this_migration = false;\n\t\t}\n\n\t\tif ( $this->skip_this_migration ) {\n\t\t\tEE::debug( 'Skipping save-global-db-pass migration as it is not needed.' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tEE::debug( 'Starting save-global-db-pass' );\n\n\t\t$launch = EE::launch( sprintf( 'cat %s | grep MYSQL_ROOT_PASSWORD | cut -d\"=\" -f2', EE_SERVICE_DIR . '/docker-compose.yml' ) );\n\t\t$password = trim( $launch->stdout );\n\n\t\tOption::set( GLOBAL_DB, $password );\n\t}", "function install()\n {\n \t// Creating tables\n\t\t\tinclude('db/tables.php');\n }", "public function preInstall()\n {\n }", "public function safeUp()\n {\n $fields = (new Query())\n ->select(['*'])\n ->from([Table::FIELDS])\n ->where(['like', 'context', 'superTableBlockType:'])\n ->andWhere(['type' => MissingField::class])\n ->all();\n\n foreach ($fields as $field) {\n $settings = Json::decode($field['settings']);\n\n if (is_array($settings) && array_key_exists('expectedType', $settings)) {\n $expectedType = $settings['expectedType'];\n $newSettings = $settings['settings'] ?? [];\n\n $this->update(Table::FIELDS, [\n 'type' => $expectedType,\n 'settings' => $newSettings,\n ], [\n 'id' => $field['id']\n ]);\n }\n }\n }", "protected function upgrade() {\r\n\t\tif (!$version = $this->ci->options->get('gw_users_version', false)) {\r\n\t\t\t$this->setup();\r\n\t\t}\r\n\t}", "public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }", "function qa_initialize_predb_plugins()\n{\n\tglobal $qa_pluginManager;\n\t$qa_pluginManager = new Q2A_Plugin_PluginManager();\n\t$qa_pluginManager->readAllPluginMetadatas();\n\n\t$qa_pluginManager->loadPluginsBeforeDbInit();\n\tqa_load_override_files();\n}", "function pinimp_install()\n{\n global $wpdb, $wp_roles, $wp_version;\n\n // Check for capability\n //if (!current_user_can('activate_plugins'))\n // return;\n\n // Set the capabilities for the administrator\n $role = get_role('administrator');\n // We need this role, no other chance\n if (empty($role)) {\n update_option(\"pinimp_init_check\", __('Sorry, Pinterest Import works only with a role called administrator', \"pinimp\"));\n return;\n }\n\n // upgrade function changed in WordPress 2.3\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\n // add charset & collate like wp core\n $charset_collate = '';\n\n if (version_compare(mysql_get_server_info(), '4.1.0', '>=')) {\n if (!empty($wpdb->charset))\n $charset_collate = \"DEFAULT CHARACTER SET $wpdb->charset\";\n if (!empty($wpdb->collate))\n $charset_collate .= \" COLLATE $wpdb->collate\";\n }\n\n $pinimp_images = $wpdb->prefix . 'pinimp_images';\n\n // Create pictures table\n $sql = \"CREATE TABLE \" . $pinimp_images . \" (\n `pid` BIGINT(20) NOT NULL AUTO_INCREMENT ,\n `id` VARCHAR(255) NOT NULL,\n `title` VARCHAR(255) NOT NULL,\n `filename` VARCHAR(255) NOT NULL ,\n `sourcefeed` MEDIUMTEXT NULL ,\n `imagedate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',\n `meta_data` LONGTEXT,\n PRIMARY KEY (`pid`)\n ) $charset_collate;\";\n\n dbDelta($sql);\n}", "public function setUp()\n {\n self::$manager->migrate('test');\n }", "public function onMigratePreImport(MigrateImportEvent $event) {\n\n $this->searchStatus = FALSE;\n $this->searchSettings = NULL;\n if ($this->moduleHandler->moduleExists('search')) {\n \\Drupal::service('module_installer')->uninstall(['search']);\n $config = $this->entityTypeManager->getStorage('search.settings')->load();\n $this->searchSettings = $config->getOption('search.settings');\n unset($module_data['search']);\n }\n $this->trackerStatus = FALSE;\n $this->trackerSettings = NULL;\n if ($this->moduleHandler->moduleExists('tracker')) {\n $this->trackerStatus = TRUE;\n $config = $this->entityTypeManager->getStorage('tracker.settings')->load();\n $this->trackerSettings = $config->getOption('tracker.settings');\n \\Drupal::service('module_installer')->uninstall(['search']);\n }\n $this->pathautoStatus = FALSE;\n $this->pathautoSettings = NULL;\n if ($this->moduleHandler->moduleExists('pathauto')) {\n $this->pathautoStatus = TRUE;\n $config = $this->entityTypeManager->getStorage('pathauto.settings')->load();\n $this->pathautoSettings = $config->getOption('pathauto.settings');\n \\Drupal::service('module_installer')->uninstall(['search']);\n }\n\n }", "protected function _setup() {\n // $this->_createTable();\n parent::_setup();\n }", "public function up() { return $this->run('up'); }", "public function prepare_db_for_extensions()\n\t{\n\t\t/**\n\t\t * @todo remove when my pull request gets accepted\n\t\t */\n\t\tob_start();\n\n\t\t// Resolves core tasks.\n\t\trequire_once path('sys').'cli/dependencies'.EXT;\n\n\t\t// Check for the migrations table\n\t\ttry\n\t\t{\n\t\t\tDB::table('laravel_migrations')->count();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tCommand::run(array('migrate:install'));\n\t\t}\n\n\t\t// Check for the extensions table. The reason\n\t\t// this isn't in a migration is simply\n\t\ttry\n\t\t{\n\t\t\tDB::table('extensions')->count();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tSchema::create('extensions', function($table)\n\t\t\t{\n\t\t\t\t$table->increments('id')->unsigned();\n\t\t\t\t$table->string('slug', 50)->unique();\n\t\t\t\t$table->text('version', 25);\n\t\t\t\t$table->boolean('enabled');\n\t\t\t});\n\t\t}\n\n\t\t// Just incase the install process got interrupted, start\n\t\t// extensions\n\t\t$this->start_extensions();\n\n\t\t/**\n\t\t * @todo remove when my pull request gets accepted\n\t\t */\n\t\tob_end_clean();\n\t}", "public function up()\n {\n if(!($customFieldsModule = $this->module->getModule($this->customFieldsModule)))\n {\n echo \" > error: the module $this->customFieldsModule does not exist in module {$this->module->id}.\\n\";\n return false;\n }\n \n ####################### TABLES #######################\n \n //Create the table that stores custom field configurations.\n $this->createTable($customFieldsModule->tableName, [\n 'id' => 'pk',\n 'name' => 'varchar(50) NOT NULL',\n 'title' => 'string NOT NULL',\n 'description' => 'text NOT NULL',\n 'form_group_id' => 'integer NOT NULL default \\'0\\'',\n 'type' => 'varchar(255) NOT NULL',\n 'size' => 'int(3) NOT NULL default \\'0\\'',\n 'min_size' => 'int(3) NOT NULL default \\'0\\'',\n 'required' => 'boolean NOT NULL default \\'0\\'',\n 'configuration' => 'text NOT NULL',\n 'validator' => 'string NOT NULL default \\'\\'',\n 'default' => 'text NOT NULL',\n 'in_forms' => 'boolean NOT NULL default \\'1\\'',\n 'translatable' => 'boolean NOT NULL default \\'0\\'',\n 'position' => 'integer NOT NULL default \\'0\\'',\n 'protected' => 'boolean NOT NULL default \\'0\\'',\n 'dt_crtd' => 'datetime NOT NULL',\n 'ts_updt' => 'timestamp NOT NULL default CURRENT_TIMESTAMP',\n ]);\n \n ####################### FIELD PARAMETERS #######################\n \n echo \" > creating field parameters ...\";\n $time = microtime(true); \n\n foreach($customFieldsModule->getFieldParameters() as $param)\n {\n Yii::$app->db->createCommand()->addColumn($customFieldsModule->tableName, $param->name, $param->getSql())->execute();\n }\n \n Yii::$app->db->schema->refresh(); // Schema changed so we must refresh it.\n \n echo \" done (time: \".sprintf('%.3f', microtime(true)-$time).\"s)\\n\";\n \n ####################### PERMISSIONS #######################\n \n echo \" > creating permissions ...\";\n $time = microtime(true);\n $this->createModelPermissions($customFieldsModule->id, ['CustomField-'.$this->module->id]);\n echo \" done (time: \".sprintf('%.3f', microtime(true)-$time).\"s)\\n\";\n }", "public function up(): void\n {\n $filename = sprintf('%s/%s', static::UP, static::FILENAME);\n\n $this->execute($filename);\n }", "public function safeUp()\n\t{\n $this->execute(\"\n /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n /*!40101 SET NAMES utf8mb4 */;\n /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n\n DROP TABLE IF EXISTS `Rating`;\n DROP TABLE IF EXISTS `RatingParams`;\n DROP TABLE IF EXISTS `RatingParamsValues`;\n\n /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;\n /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;\n /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n \");\n\t}", "function install() {\n /*\n * do some stuff at install db table creation/modification, email template creation etc.\n * \n * \n */\n return parent::install();\n }", "public function afterInstall()\n\t{}", "public function setup()\n\t\t{\n\t\t\t$this->regenerateSchema([Batteries::class]);\n\t\t}", "public function install() {\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n\t\tglobal $wpdb;\n\t\t$wpdb->hide_errors();\n\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$sql = \"CREATE TABLE {$wpdb->prefix}queue_jobs (\n\t\t\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n job longtext NOT NULL,\n attempts tinyint(3) NOT NULL DEFAULT 0,\n reserved_at datetime DEFAULT NULL,\n available_at datetime NOT NULL,\n created_at datetime NOT NULL,\n PRIMARY KEY (id)\n\t\t\t\t) $charset_collate;\";\n\n\t\tdbDelta( $sql );\n\n\t\tWP_CLI::success( \"Table {$wpdb->prefix}queue_jobs created.\" );\n\n\t\t$sql = \"CREATE TABLE {$wpdb->prefix}queue_failures (\n\t\t\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n job longtext NOT NULL,\n error text DEFAULT NULL,\n failed_at datetime NOT NULL,\n PRIMARY KEY (id)\n\t\t\t\t) $charset_collate;\";\n\n\t\tdbDelta( $sql );\n\n\t\tWP_CLI::success( \"Table {$wpdb->prefix}queue_failures created.\" );\n\t}", "public function action_up_migration_get()\n {\n $this->load->library('migration');\n $this->migration->current();\n }", "public static function install_database_for_addons(){\n\t\t$sqls = self::get_table_queries_for_addons();\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n foreach($sqls as $sql){\n error_log(print_r(dbDelta( $sql ), true));\n }\n\t}", "public function setUp()\n {\n if ($this->_plugin->getOption('auditLog')) {\n $this->_plugin->initialize($this->_table);\n }\n\n $version = $this->_options['version'];\n $name = $version['name'] . (isset($version['alias']) ? ' as ' . $version['alias'] : '');\n $this->hasColumn($name, $version['type'], $version['length'], $version['options']);\n\n $this->addListener(new dmDoctrineAuditLogListener($this->_plugin));\n }", "public function safeUp() {\n $this->update('system_explanatory_texts', array(\n 'tooltip' => \"Add job if you would like to add another service (CC or SDH) to this particular language.\"\n ), 'attribute = \"add_language_job\"');\n }", "public function safeUp() {\n $this->addColumn('tenant_setting', 'app_version', 'text');\n $this->update('tenant_setting', array('app_version' => '3.0'), null);\n }", "public function setUp(): void {\n $this->resetAfterTest();\n $this->setAdminUser();\n $this->generator = $this->getDataGenerator()->get_plugin_generator('mod_ouwiki');\n }", "function migrate()\r\n\t{\r\n\t\treturn '';\r\n\t}", "public function install(){\r\n\t\t\r\n\t}", "public function migrate()\n {\n $fileSystem = new Filesystem();\n\n $fileSystem->copy(\n __DIR__.'/../database/migrations/2018_06_29_032244_create_laravel_follow_tables.php',\n __DIR__.'/database/migrations/create_laravel_follow_tables.php'\n );\n\n foreach ($fileSystem->files(__DIR__.'/database/migrations') as $file) {\n $fileSystem->requireOnce($file);\n }\n\n (new \\CreateLaravelFollowTables())->up();\n (new \\CreateUsersTable())->up();\n (new \\CreateOthersTable())->up();\n }", "public function admin_init () {\n $data = get_plugin_data(__FILE__);\n $this->plugin_name = $data['Name'];\n $this->plugin_version = $data['Version'];\n $this->plugin_slug = plugin_basename(__FILE__, '.php');\n $this->plugin_name_sanitized = basename(__FILE__, '.php');\n\n // init updater class to plugin updates check\n $this->updater();\n }", "public function set_up() {\n\t\tparent::set_up();\n\t}", "public function __invoke()\n {\n $this->migrate();\n }", "function up() {\n\t\t// Ensure that all the tables are built correctly\n\t\t\\Mojavi\\Util\\StringTools::consoleWrite(' - Index Initialization', 'Building', \\Mojavi\\Util\\StringTools::CONSOLE_COLOR_YELLOW);\n\t\t\n\t\t// Build User Indexes\n\t\ttry {\n\t\t\t\\Ficus\\User::ensureIndexes();\n\t\t} catch (\\Exception $e) {\n\t\t\t\\Mojavi\\Util\\StringTools::consoleWrite('\t - User', $e->getMessage(), \\Mojavi\\Util\\StringTools::CONSOLE_COLOR_RED, true);\n\t\t}\n\n\t\t\\Mojavi\\Util\\StringTools::consoleWrite(' - Index Initialization', 'Done', \\Mojavi\\Util\\StringTools::CONSOLE_COLOR_GREEN, true);\n\t}", "function install_hooks() {\n // Info that the plugin is activated.\n update_option( 'DB_Plugin_Hooks', true );\n }", "public function install()\n {\n $logger = $this->container->get('logger');\n $userName = $this->container->get('zikula_users_module.current_user')->get('uname');\n \n // Check if upload directories exist and if needed create them\n try {\n $container = $this->container;\n $uploadHelper = new \\MU\\FilesModule\\Helper\\UploadHelper(\n $container->get('translator.default'),\n $container->get('filesystem'),\n $container->get('session'),\n $container->get('logger'),\n $container->get('zikula_users_module.current_user'),\n $container->get('zikula_extensions_module.api.variable'),\n $container->getParameter('datadir')\n );\n $uploadHelper->checkAndCreateAllUploadFolders();\n } catch (\\Exception $exception) {\n $this->addFlash('error', $exception->getMessage());\n $logger->error('{app}: User {user} could not create upload folders during installation. Error details: {errorMessage}.', ['app' => 'MUFilesModule', 'user' => $userName, 'errorMessage' => $exception->getMessage()]);\n \n return false;\n }\n // create all tables from according entity definitions\n try {\n $this->schemaTool->create($this->listEntityClasses());\n } catch (\\Exception $exception) {\n $this->addFlash('error', $this->__('Doctrine Exception') . ': ' . $exception->getMessage());\n $logger->error('{app}: Could not create the database tables during installation. Error details: {errorMessage}.', ['app' => 'MUFilesModule', 'errorMessage' => $exception->getMessage()]);\n \n return false;\n }\n \n // set up all our vars with initial values\n $this->setVar('allowedExtensions', 'pdf,doc,docx,odt');\n $this->setVar('maxSize', '200k');\n $this->setVar('onlyParent', false);\n $this->setVar('specialCollectionMenue', false);\n $this->setVar('collectionEntriesPerPage', 10);\n $this->setVar('linkOwnCollectionsOnAccountPage', true);\n $this->setVar('fileEntriesPerPage', 10);\n $this->setVar('linkOwnFilesOnAccountPage', true);\n $this->setVar('showOnlyOwnEntries', false);\n $this->setVar('moderationGroupForCollections', 2);\n $this->setVar('moderationGroupForFiles', 2);\n $this->setVar('allowModerationSpecificCreatorForCollection', false);\n $this->setVar('allowModerationSpecificCreationDateForCollection', false);\n $this->setVar('allowModerationSpecificCreatorForFile', false);\n $this->setVar('allowModerationSpecificCreationDateForFile', false);\n $this->setVar('enabledFinderTypes', 'collection###file');\n \n // add default entry for category registry (property named Main)\n $categoryHelper = new \\MU\\FilesModule\\Helper\\CategoryHelper(\n $this->container->get('translator.default'),\n $this->container->get('request_stack'),\n $logger,\n $this->container->get('zikula_users_module.current_user'),\n $this->container->get('zikula_categories_module.category_registry_repository'),\n $this->container->get('zikula_categories_module.api.category_permission')\n );\n $categoryGlobal = $this->container->get('zikula_categories_module.category_repository')->findOneBy(['name' => 'Global']);\n if ($categoryGlobal) {\n $categoryRegistryIdsPerEntity = [];\n $entityManager = $this->container->get('doctrine.orm.default_entity_manager');\n \n $registry = new CategoryRegistryEntity();\n $registry->setModname('MUFilesModule');\n $registry->setEntityname('CollectionEntity');\n $registry->setProperty($categoryHelper->getPrimaryProperty('Collection'));\n $registry->setCategory($categoryGlobal);\n \n try {\n $entityManager->persist($registry);\n $entityManager->flush();\n } catch (\\Exception $exception) {\n $this->addFlash('warning', $this->__f('Error! Could not create a category registry for the %entity% entity. If you want to use categorisation, register at least one registry in the Categories administration.', ['%entity%' => 'collection']));\n $logger->error('{app}: User {user} could not create a category registry for {entities} during installation. Error details: {errorMessage}.', ['app' => 'MUFilesModule', 'user' => $userName, 'entities' => 'collections', 'errorMessage' => $exception->getMessage()]);\n }\n $categoryRegistryIdsPerEntity['collection'] = $registry->getId();\n }\n \n // initialisation successful\n return true;\n }", "protected function install(){ return true;}", "public function safeUp()\n\t{\n\t\tif (!craft()->db->columnExists('sections_i18n', 'enabledByDefault'))\n\t\t{\n\t\t\t$this->addColumnAfter('sections_i18n', 'enabledByDefault', array('column' => ColumnType::Bool, 'default' => 1), 'locale');\n\t\t\tCraft::log('Successfully added the sections_i18n.enabledByDefault column.', LogLevel::Info, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCraft::log('The sections_i18n.enabledByDefault column already exists.', LogLevel::Info, true);\n\t\t}\n\n\t\treturn true;\n\t}" ]
[ "0.7054103", "0.69983864", "0.6727485", "0.66107893", "0.658216", "0.65008986", "0.6474332", "0.6448922", "0.6446971", "0.643911", "0.6437631", "0.641112", "0.64091647", "0.63843197", "0.63840234", "0.63364834", "0.6325481", "0.631031", "0.6275752", "0.62509334", "0.61951697", "0.6187446", "0.6160083", "0.61489344", "0.6142413", "0.61397517", "0.6139585", "0.61364865", "0.6134794", "0.6122436", "0.61154747", "0.6111906", "0.61080104", "0.61036056", "0.6103557", "0.61025614", "0.6094494", "0.60929644", "0.6075618", "0.60682243", "0.6055797", "0.6041493", "0.60167176", "0.60057414", "0.59958893", "0.5993545", "0.5983933", "0.5971739", "0.59655225", "0.5963385", "0.5963351", "0.59575456", "0.59407157", "0.59333503", "0.59315526", "0.59157985", "0.59148824", "0.59126943", "0.5905589", "0.5903137", "0.5903137", "0.59019655", "0.59015954", "0.588704", "0.5885254", "0.58812225", "0.58786047", "0.5871707", "0.58690983", "0.58682454", "0.5861732", "0.5859811", "0.58545935", "0.58538014", "0.58491766", "0.58451545", "0.5843945", "0.58351254", "0.5833253", "0.5826585", "0.58225656", "0.5819442", "0.58159786", "0.58151495", "0.58105606", "0.5805849", "0.5802282", "0.5799071", "0.579883", "0.57972044", "0.57971525", "0.5793206", "0.57882804", "0.5785357", "0.57843876", "0.578163", "0.57790923", "0.5778916", "0.5778218", "0.57715636", "0.5770746" ]
0.0
-1
Migration DOWN: cleanup all created data.
public function down() { // Remove config entries. foreach (words('CLIENT_ID CLIENT_SECRET AUTHORIZATION_CODE ACCESS_TOKEN CALLBACK_URL') as $entry) { Config::get()->delete('VIMEO_' . $entry); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }", "public function afterTearDown()\n {\n $this->schema()->dropIfExists('users');\n $this->schema()->dropIfExists('friends');\n $this->schema()->dropIfExists('posts');\n $this->schema()->dropIfExists('comments');\n $this->schema()->dropIfExists('photos');\n $this->schema()->dropIfExists('invalid_kids');\n $this->schema()->dropIfExists('profiles');\n }", "public function tearDown()\n {\n $this->schema()->drop('users');\n $this->schema()->drop('users32');\n $this->schema()->drop('usersb');\n $this->schema()->drop('posts');\n $this->schema()->drop('posts32');\n $this->schema()->drop('postsb');\n $this->schema()->drop('rolesb');\n $this->schema()->drop('roles32');\n $this->schema()->drop('user32_role32');\n $this->schema()->drop('userb_roleb');\n }", "public function down(): void\n {\n // Remove your data\n }", "protected function tearDown(): void\n {\n $this->schema()->drop('users');\n $this->schema()->drop('users_created_at');\n $this->schema()->drop('users_updated_at');\n }", "public function down()\n {\n Schema::dropIfExists('data');\n }", "public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "protected function tearDown(): void\n {\n $this->schema('default')->drop('users');\n }", "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function tearDown(): void\n {\n $this->schema($this->schemaName)->drop('users');\n $this->schema($this->schemaName)->drop('emails');\n $this->schema($this->schemaName)->drop('phones');\n $this->schema($this->schemaName)->drop('role_users');\n $this->schema($this->schemaName)->drop('roles');\n $this->schema($this->schemaName)->drop('permission_roles');\n $this->schema($this->schemaName)->drop('permissions');\n $this->schema($this->schemaName)->drop('tasks');\n $this->schema($this->schemaName)->drop('locations');\n $this->schema($this->schemaName)->drop('assignments');\n $this->schema($this->schemaName)->drop('jobs');\n\n Relation::morphMap([], false);\n\n parent::tearDown();\n }", "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function cleanUp();", "public function cleanUp();", "public function cleanUp();", "public function down()\n {\n Schema::dropIfExists('cmd_daarticles');\n }", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "public function tearDown()\n {\n Artisan::call('migrate:reset');\n parent::tearDown();\n }", "public function down()\n {\n Schema::drop('warehouses');\n }", "public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}", "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "public function safeDown()\n {\n $this->dropForeignKey(\n 'fk-production_prepare_order-order',\n 'production_prepare_order'\n );\n\n // drops index for column `order`\n $this->dropIndex(\n 'idx-production_prepare_order-order',\n 'production_prepare_order'\n );\n\n // drops foreign key for table `production_stage_prepare`\n $this->dropForeignKey(\n 'fk-production_prepare_order-stage',\n 'production_prepare_order'\n );\n\n // drops index for column `stage`\n $this->dropIndex(\n 'idx-production_prepare_order-stage',\n 'production_prepare_order'\n );\n\n $this->dropTable('production_prepare_order');\n }", "protected function tearDown() {\r\n\t\t$this->dropDatabase();\r\n\t\tunset ( $this->cacheDatabaseEntryRepository );\r\n\t\t\r\n\t}", "public function down() {\n Schema::create('unit_office_secondaries');\n }", "public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}", "public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "protected function tearDown(): void\n {\n foreach (['default'] as $connection) {\n $this->schema($connection)->drop('users');\n $this->schema($connection)->drop('friends');\n $this->schema($connection)->drop('posts');\n $this->schema($connection)->drop('photos');\n }\n\n Relation::morphMap([], false);\n }", "public function down()\n {\n Schema::dropIfExists('records');\n }", "public function tear_down()\n {\n }", "public function tear_down()\n {\n }", "public function tear_down()\n {\n }", "public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}", "protected function _after()\n {\n $this->_adapter->execute('drop table if exists comments;\n drop table if exists posts_tags;\n drop table if exists posts;\n drop table if exists tags;\n drop table if exists profiles;\n drop table if exists credentials;\n drop table if exists people;\n ');\n parent::_after();\n }", "public function safeDown()\n {\n //return false;\n $this->dropTable($this->tablePost);\n $this->dropTable($this->tableUser);\n }", "protected function tearDown(): void\n {\n $this->_connection->dropTable($this->_tableName);\n $this->_connection->resetDdlCache($this->_tableName);\n $this->_connection = null;\n }", "protected function tearDown()\n {\n unset($this->ascendingSequence);\n unset($this->descendingSequence);\n \\Yana\\Db\\FileDb\\Sequence::drop($this->ascendingId);\n \\Yana\\Db\\FileDb\\Sequence::drop($this->descendingId);\n chdir(CWD);\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}", "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}", "public function down()\n {\n //the list must be reverse from the order of the create schema\n Schema::drop('question_lines');\n Schema::drop('questions');\n Schema::drop('categories');\n Schema::drop('credit_investigations');\n Schema::drop('products_line');\n Schema::drop('purchase_orders');\n Schema::drop('companies');\n Schema::drop('la_requirements');\n Schema::drop('requirements');\n Schema::drop('note_to_loan_applications');\n Schema::drop('loan_applications');\n Schema::drop('itineraries_line');\n Schema::drop('itineraries');\n Schema::drop('existing_loans');\n Schema::drop('child_dependents');\n Schema::drop('personal_references');\n Schema::drop('note_to_customer_profiles'); \n Schema::drop('customers');\n Schema::drop('branches');\n Schema::drop('password_resets');\n Schema::drop('users');\n Schema::drop('text_messaging_contacts'); \n Schema::drop('preset_text_messages'); \n }", "public function safeDown()\n {\n $this->dropTable($this->tableName);\n }", "public function down()\n\t{\n\t\t// nothing to do here.\n\t}", "protected function tearDown(): void\n {\n parent::tearDown();\n\n $this->dropTables();\n\n unset($this->repository);\n\n $this->clearDataDir();\n }", "protected function tearDown()\n {\n //clear out any tables we populated\n $this->adapter->query('DELETE FROM ' . RUCKUSING_TS_SCHEMA_TBL_NAME);\n }", "public function down()\n\t{\n\t\tDB::table('dispositions')->delete();\n\t}", "public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}", "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }", "protected function tearDown(): void\n {\n $this->dbClear();\n }", "public function down()\n {\n Schema::dropIfExists('personas');\n }" ]
[ "0.8047985", "0.7574941", "0.75546914", "0.7432064", "0.74241656", "0.7399916", "0.72800314", "0.72680694", "0.72680694", "0.72680694", "0.72680694", "0.72680694", "0.72680694", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72672087", "0.72664404", "0.72664404", "0.72664404", "0.72664404", "0.72664404", "0.72664404", "0.72664404", "0.7247728", "0.7192035", "0.71800995", "0.71536374", "0.71136856", "0.7033601", "0.7033601", "0.7033601", "0.70334023", "0.70154816", "0.7009105", "0.70075077", "0.7002579", "0.7001489", "0.6989373", "0.6986111", "0.69827694", "0.69807154", "0.6978422", "0.6975137", "0.6971223", "0.6971223", "0.6971223", "0.6969676", "0.696796", "0.69668216", "0.6964211", "0.6964211", "0.6964211", "0.6960994", "0.69605225", "0.6929766", "0.69244176", "0.6922555", "0.69206464", "0.69118917", "0.69006914", "0.68840694", "0.6883402", "0.6880566", "0.6878615", "0.6878442", "0.6863472", "0.6854868", "0.6854689", "0.68511194", "0.68382657", "0.6819527" ]
0.0
-1
Create a new event instance.
public function __construct(Ticker $ticker) { $ticker->update_cachefile(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createEvent()\n {\n return new Event();\n }", "public function __create()\n {\n $this->eventPath = $this->data('event_path');\n $this->eventName = $this->data('event_name');\n $this->eventInstance = $this->data('event_instance');\n $this->eventFilter = $this->data('event_filter');\n }", "public static function createEvent(array $data)\n {\n $event = new \\echolibre\\google_wave\\Model\\Event;\n \n $event->type = $data['type'];\n $event->timestamp = $data['timestamp'];\n $event->modifiedBy = $data['modifiedBy'];\n $event->properties = new \\stdClass();\n \n if (isset($data['properties'])) {\n $event->properties = $data['properties'];\n }\n \n return $event;\n }", "public function newEvent()\n\t{\n $this->to = $this->domain;\n $this->email = $this->info_mail;\n $this->subject = 'Neue Messe gemeldet';\n $this->view = 'emails.user.new_event';\n\t\t\n\t\t$this->data = [\n\t\t\t'contact'\t\t=> \\Input::get('contact'),\n\t\t\t'email'\t\t\t=> \\Input::get('email'),\n\t\t\t'name'\t\t\t=> \\Input::get('name'),\n\t\t\t'location'\t\t=> \\Input::get('location'),\n\t\t\t'start_date'\t=> \\Input::get('start_date'),\n\t\t\t'end_date'\t\t=> \\Input::has('end_date') ? \\Input::get('end_date') : \\Input::get('start_date'),\n\t\t\t'region'\t\t=> \\Input::get('region'),\n\t\t\t'organizer'\t\t=> \\Input::get('organizer')\n\t\t];\n\n\t\treturn $this;\n\t}", "private function createinstallevent()\n {\n $cat = CategoryUtil::getCategoryByPath('/__SYSTEM__/Modules/PostCalendar/Events');\n\n $eventArray = array(\n 'title' => $this->__('PostCalendar Installed'),\n 'hometext' => ':text:' . $this->__('On this date, the PostCalendar module was installed. Thank you for trying PostCalendar! This event can be safely deleted if you wish.'),\n 'alldayevent' => true,\n 'eventstatus' => PostCalendar_Entity_CalendarEvent::APPROVED,\n 'sharing' => PostCalendar_Entity_CalendarEvent::SHARING_GLOBAL,\n 'website' => 'https://github.com/craigh/PostCalendar/wiki',\n 'categories' => array(\n 'Main' => $cat['id']));\n\n try {\n $event = new PostCalendar_Entity_CalendarEvent();\n $event->setFromArray($eventArray);\n $this->entityManager->persist($event);\n $this->entityManager->flush();\n } catch (Exception $e) {\n return LogUtil::registerError($e->getMessage());\n }\n\n return true;\n }", "private function event(): Event\n {\n if (!$this->event) {\n $this->event = new Event($this->eventMutex(), '');\n }\n\n return $this->event;\n }", "public function createEvent(string $name): Event\n {\n if (!$this->isEventIDValid($name)) {\n throw new RuntimeException('invalid event name: ' . $name);\n }\n\n $class = $this->validEventIDs[$name];\n /** @var \\CaptainHook\\App\\Event $event */\n $event = new $class($this->io, $this->config, $this->repository);\n return $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function __construct(Event $event)\n {\n $this->event = $event;\n }", "public function createCustomevent(): self\n {\n $this->event_type = debug_backtrace()[1]['function'];\n $attr = $this->getAttributes();\n $dirty = $this->getDirty();\n $original = $this->getOriginal();\n // dd($attr, $dirty, $original);\n\n $details = [];\n foreach ($attr as $property => $value) {\n if (array_key_exists($property, $dirty) or !$dirty) {\n $details[] = [\n $property,\n $original[$property] ?? FALSE,\n $dirty[$property] ?? FALSE,\n ];\n }\n }\n\n Customevent::create([\n 'user_id' => auth()->user() ? auth()->user()->id : User::SYSUID,\n 'model' => $this->getTable(),\n 'model_id' => $this->id,\n 'model_name' => $this->name,\n 'type' => $this->event_type,\n 'description' => $this->event_description ?? FALSE,\n 'details' => serialize($details) ?? '',\n ]);\n return $this;\n }", "protected function _Build_Event($context) {\r\n $form_instance = $this->form_instance;\r\n // Retrieve the event class item\r\n $class = $context['class'];\r\n // Generate a new event class\r\n $event_instance = new $class();\r\n // Populate with the form instance\r\n $event_instance->form_instance = $form_instance;\r\n // Populate with the form instance\r\n $event_instance->type = $context['type'];\r\n // Populate with the form instance\r\n $event_instance->title = $context['title'];\r\n // Populate with the event context\r\n $event_instance->context = $context;\r\n // If the field has a sanitize method\r\n if (method_exists($event_instance,'On_Create')) { $event_instance->On_Create(); }\r\n // Fire any on create action\r\n $event_instance->Do_Action('create');\r\n // Do a wordpress hook\r\n do_action('vcff_event_create',$event_instance);\r\n // Fire any on create action\r\n $event_instance->Do_Action('after_create');\r\n // Do a wordpress hook\r\n do_action('vcff_trigger_after_create',$event_instance);\r\n // Return the event instance\r\n return $event_instance;\r\n }", "protected function __construct()\n {\n parent::__construct(\n 'Event',\n array(\n TextField::create(\n 'title',\n array(\n 'mandatory' => true,\n )\n ),\n TextareaField::create(\n 'description',\n array(\n 'use_markdown' => true,\n )\n ),\n TextField::create(\n 'date',\n array()\n ),\n ReferenceField::create(\n 'guest_lists',\n array(\n 'references' => array(\n array(\n 'module' => '\\\\Honeybee\\\\Domain\\\\Guestlist\\\\GuestlistModule',\n 'identity_field' => 'identifier',\n 'display_field' => 'title',\n ),\n ),\n )\n ),\n ReferenceField::create(\n 'assignee',\n array(\n 'max' => 1,\n 'references' => array(\n array(\n 'module' => '\\\\Honeybee\\\\Domain\\\\User\\\\UserModule',\n 'identity_field' => 'identifier',\n 'display_field' => 'username',\n ),\n ),\n )\n ),\n KeyValueField::create(\n 'meta',\n array(\n 'constraints' => array(\n 'value_type' => 'dynamic',\n ),\n )\n ),\n AggregateField::create(\n 'workflowTicket',\n array(\n 'modules' => array(\n '\\\\Honeybee\\\\Domain\\\\Event\\\\WorkflowTicketModule',\n ),\n )\n ),\n ),\n array(\n 'prefix' => 'event',\n 'identifier_field' => 'identifier',\n 'slugPattern' => 'event-{shortId}',\n )\n );\n }", "public function create()\n {\n return view ('event.create');\n }", "public function create()\n {\n return view(\"Event::create\");\n }", "public function create_event( $eventname )\n\t{\n\t\tCmsEvents::create_event($this->get_name(), $eventname);\n\t}", "public function createNewEvent($copyLastEvent = true, $data = array())\n\t{\n\t\t$event = new App_Model_Event();\n\n\t\t// pokud $copyLastEvent == true, vezmu data z minule udalosti a nastavim\n\t\t// je teto\n\t\tif ($copyLastEvent) {\n\t\t\t// TODO: vzit nastaveni posledni udalosti u teto akce\n\t\t}\n\n\t\t// pokud byla zaslana nejaka inicializacni data, nastavim je\n\t\tif (is_array($data) && count($data)) {\n\t\t\t$event->setPropsFromArray($data);\n\t\t}\n\n\t\t$event->setActionId($this->_actionId);\n\t\t$event->setEventNo(count($this->getAllEvents()) + 1);\n\n\t\t$event->insert();\n\n\t\t// vytvorim take prvni navrh terminu, pokud byl zaslan\n\t\tif (isset($data['dates']) && $data['dates'] != '') {\n\t\t\t$event->createNewProposal($data['dates']);\n\t\t}\n\n\t\treturn $event;\n\t}", "public function __construct($event)\n {\n $this->event = $event;\n }", "public function __construct($event)\n {\n $this->event = $event;\n }", "public function requestCreateEvent()\n {\n $ch = self::curlIni('event_new', $this->eventParams);\n\n return $ch;\n }", "public function createCustomevent(): self\n {\n $this->event_type = debug_backtrace()[1]['function'];\n if ($this->isDirty('status') and $this->status === User::STATUS_ACTIVE) {\n $this->event_type = 'verify';\n }\n $attr = $this->getAttributes();\n $dirty = $this->getDirty();\n $original = $this->getOriginal();\n // dd($attr, $dirty, $original);\n\n $details = [];\n foreach ($attr as $property => $value) {\n if (array_key_exists($property, $dirty) or !$dirty) {\n $details[] = [\n $property,\n $original[$property] ?? FALSE,\n $dirty[$property] ?? FALSE,\n ];\n }\n }\n\n Customevent::create([\n 'user_id' => auth()->user() ? auth()->user()->id : self::URUID, // unregistered user id\n 'model' => $this->getTable(),\n 'model_id' => $this->id,\n 'model_name' => $this->name,\n 'type' => $this->event_type,\n 'description' => $this->event_description ?? FALSE,\n 'details' => serialize($details) ?? '',\n ]);\n return $this;\n }", "public function create()\n {\n return view('events::create_event');\n }", "protected function create(array $data)\n {\n $user = Auth::user();\n $article = new Article($data);\n $article->userID = $user->userID;\n $article->ctgID = $data['category'];\n $article->updated_at = Carbon::now();\n $article->save();\n\n if (array_key_exists('image', $data)) {\n $path = $data['image']->store('articles/'.$article->artID, 'images');\n $article->image = $path;\n $article->save();\n }\n \n $event = new Event($data);\n if ($data['place'] !== 'none') {\n $event->placeID = $data['place'];\n }\n $event->artID = $article->artID;\n $event->save();\n \n return $event;\n }", "public function create()\n {\n return view('events.createevent');\n }", "public static function get_instance() \n {\n if ( ! isset(self::$instance)) \n {\n self::$instance = new Event();\n }\n\n return self::$instance;\n }", "public function __construct(NewMessageEvent $event)\n {\n $this->event = $event;\n }", "public function createEvent(Event $event)\n {\n $this->setCalendarId($event->calendar_id);\n\n /*\n * Create new google event object\n */\n $googleEvent = new \\Google_Service_Calendar_Event();\n\n /*\n * Set Details\n */\n $googleEvent->setSummary($event->title);\n $googleEvent->setDescription($event->description);\n $googleEvent->setLocation($event->location);\n\n /*\n * Set Start Date\n */\n $start = $this->createDateTime($event->start, $event->timeZone, $event->all_day);\n $googleEvent->setStart($start);\n\n /*\n * Set End Date\n */\n $end = $this->createDateTime($event->end, $event->timeZone, $event->all_day);\n $googleEvent->setEnd($end);\n\n /*\n * Set Recurrence Rule, make sure it's not empty\n */\n if ($event->rrule) {\n $googleEvent->setRecurrence([$event->rrule]);\n }\n\n /*\n * Create the event\n */\n $newGoogleEvent = $this->service->events->insert($this->calendarId, $googleEvent);\n\n return $this->createEventObject($newGoogleEvent);\n }", "public function construct(CakeEvent $event) {\n\t\t$this->__startTime = time();\n\t}", "public function create()\n {\n return view('admin.adminevent.create_event');\n }", "protected function createEvent(DateTime $dateStart, DateTime $dateEnd)\n {\n $event = new Event();\n $event->setTitle($this->title);\n $event->setDescription($this->description);\n $event->setDateStart($dateStart);\n $event->setDateEnd($dateEnd);\n\n return $event;\n }", "public function __construct(array $event = array())\n {\n $this\n ->setEvent($event);\n }", "public function create(Request $request)\n {\n $data = $request->all();\n $event = Event::make($data);\n $event->user_id = Auth::user()->id;\n $event->save();\n }", "public function create()\n {\n\n $event = new Event;\n return view('events.create',compact('event'));\n }", "public function create()\n {\n return view('event');\n }", "public function create()\n {\n return view('event.create');\n }", "public function create()\n {\n return view('event.create');\n }", "public function create()\n {\n return view('event.create');\n }", "public function create()\n {\n return view('event.create');\n }", "protected function getRandomInstance()\n {\n $eventLine = new EventTag();\n $this->fillThing($eventLine);\n\n return $eventLine;\n }", "function create_event( $options=array() ){\n\t\t\t//length = 255, present\n\t\t\n\t\t$error_append = \" CLASS[\".__CLASS__.\"] METHOD[\".__METHOD__.\"] DATE[\".date('Y-m-d H:i:s').\"]\";\n\t\t\n\t\tCore::ensure_defaults(array(\n\t\t\t\t'title_unique' => 1\n\t\t\t), $options\n\t\t);\n\t\t\n\t\tif( empty( $options['title'] ) or empty( $options['description'] ) or empty( $options['date'] ) ){\n\t\t\t$error = Core::error($this->errors, 1);\n\t\t\t$error['error_msg'] .= $error_append;\n\t\t\treturn $error;\n\t\t}\n\t\t\n\t\t$values['title'] = $this->validate_title( array('title' => $options['title']) );\n\t\tif(Core::has_error( $values['title'] )){\n\t\t\treturn $values['title'] ;\n\t\t}\n\t\t\n\t\t$values['description'] = $this->validate_description( array('description' => $options['description']) );\n\t\tif(Core::has_error( $values['description'] )){\n\t\t\treturn $values['description'];\n\t\t}\n\t\t\n\t\t$values['date_time'] = $this->validate_event_date( array('date' => $options['date']) );\n\t\tif(Core::has_error( $values['date_time'] )){\n\t\t\treturn $values['date_time'];\n\t\t}\n\t\t\n\t\tif($options['title_unique']){\n\t\t\t//TODO:Check if the title unique\n\t\t\tif( Core::db_count( array(\n\t\t\t\t'table' => CORE_DB.\".\".self::$table_name,\n\t\t\t\t'values' => array(\n\t\t\t\t\t'title' => $values['title']\n\t\t\t\t)\n\t\t\t))){\n\t\t\t\t$error = Core::error($this->errors, 7);\n\t\t\t\t$error['error_msg'] .= 'Event title must be unique. ';\n\t\t\t\t$error['error_msg'] .= $error_append;\n\t\t\t\treturn $error;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t$result = Core::db_insert( array(\n\t\t\t\t'table' => CORE_DB.\".\".self::$table_name,\n\t\t\t\t'values' => $values\n\t\t));\n\t\t\n\t\tif( Core::has_error($result) or empty($result) ){\n\t\t\t$result['error_msg'] .= $error_append;\n\t\t\treturn $result;\n\t\t}\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "private function create()\n {\n $events = [\n Webhook::EVENT_CONVERSATION_CREATED,\n Webhook::EVENT_CONVERSATION_UPDATED,\n Webhook::EVENT_MESSAGE_CREATED,\n Webhook::EVENT_MESSAGE_UPDATED,\n ];\n\n $chosenEvents = $this->choice(\n 'What kind of event you want to create',\n $events,\n $defaultIndex = null,\n $maxAttempts = null,\n $allowMultipleSelections = true\n );\n\n $webhookUrl = $this->ask('Please enter the webhook URL'); \n\n $webhook = new Webhook();\n $webhook->events = $chosenEvents;\n $webhook->channelId = $this->whatsAppChannelId;\n $webhook->url = $webhookUrl;\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->create($webhook);\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "public function createEvent(Actions $emailAction){\n $event = new Events();\n $event->type = self::$typeMap[$emailAction->type];\n $event->subtype = 'email';\n $event->associationId = $emailAction->associationId;\n $event->associationType = X2Model::getModelName($emailAction->associationType);\n $event->timestamp = time();\n $event->lastUpdated = $event->timestamp;\n $event->user = $emailAction->assignedTo;\n if($event->save())\n $this->log(Yii::t('app','Created activity feed event for the email.'));\n return $event;\n }", "function __construct($event) {\n $this->init($event);\n }", "public function actionCreate()\n {\n $model = new Event();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n\t{\n\t\treturn view('events.create');\n\t}", "protected function initEvent()\n {\n $locales = $this->container->getParameter('event.locales');\n $event = $this->getRepository('EventEventBundle:Event')->getEvent();\n $now = new \\DateTime();\n\n if (!$event) {\n $event = new Event();\n $event\n ->setTitle('My Event')\n ->setDescription('My another awesome event!')\n ->setStartDate($now)\n ->setEndDate($now->modify('+1 day'))\n ->setVenue('Burj Khalifa Tower')\n ->setEmail('[email protected]')\n ;\n\n $speaker = new Speaker();\n $speaker\n ->setFirstName('Phill')\n ->setLastName('Pilow')\n ->setCompany('Reseach Supplier')\n ;\n\n if ($locales) {\n foreach ($locales as $locale => $title) {\n $eventTranslation = new EventTranslation();\n $eventTranslation->setEvent($event);\n $eventTranslation->setlocale($locale);\n\n $this->getManager()->persist($eventTranslation);\n\n $speakerTranslation = new SpeakerTranslation();\n $speakerTranslation->setSpeaker($speaker);\n $speakerTranslation->setlocale($locale);\n\n $this->getManager()->persist($speakerTranslation);\n }\n }\n\n $this->getManager()->persist($event);\n $this->getManager()->persist($speaker);\n $this->getManager()->flush();\n }\n }", "public function __construct($data)\n {\n $this->event = $data;\n }", "public function create()\n {\n return view('admin.event.create');\n }", "public function create()\n {\n return view('admin.event.create');\n }", "public function create()\n {\n return view('event::create');\n }", "public function actionCreate()\n\t{\n\t\t$model=new Event;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Event']))\n\t\t{\t\n\t\t\t$model->attributes=$_POST['Event'];\n\t\t\t\n\t\t\t$model->created_on = new CDbExpression('NOW()');\n\t\t\t$model->created_by=Yii::app()->user->id;\n\t\t\tif($model->save()){\n\t\t\t\t\n\t\t\t\t$this->redirect(array('view', 'id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n\t ->getStateMachine()\n ->getTransition()\n ->abortTransition()\n ->isTransitionAborted()\n // EventInterface\n ->getName()\n ->setName()\n ->getTarget()\n ->setTarget()\n ->getParams()\n ->setParams()\n ->getParam()\n ->setParam()\n ->stopPropagation()\n ->isPropagationStopped();\n\n return $mock->new();\n }", "protected function newEventLogger()\n {\n return new EventLogger(static::getLogger());\n }", "public function create()\n\t{\n\t\treturn View::make('events.create');\n\t}", "public function __construct(?EventConfig $cfg = null) {}", "public function create()\n {\n $programEvent = new ProgramEvent();\n return view('program-event.create', compact('programEvent'));\n }", "public function create()\n {\n return view(\"admin.event_create\")->with([\n\n ]);\n }", "public function createEvent(Request $request)\n {\n $this->validator($request->all())->validate();\n\n $event = $this->create($request->all());\n \n return redirect('/cms/events');\n }", "public function __construct($name, $event)\n {\n $this->name = $name;\n $this->event = $event;\n }", "final private static function makeEvent(Sincronizacao $sincronizacao)\n {\n $endpoint = self::getEventEndpoint($sincronizacao->sym_table, $sincronizacao->sym_action);\n\n $dependencies = self::getDependencies($sincronizacao);\n $eventClass = self::getEventClass($endpoint);\n\n return new $eventClass($dependencies['entry'], $dependencies['extra']);\n }", "public static function create(Client $client, $data) {\n if ($data == null || is_array($data)) {\n $d = new Event($data == null ? array() : $data);\n $data = $d->jsonSerialize();\n }\n $req = $client->newRequest(\"POST\", \"/{accountname}/events\");\n $req->setBody($data, \"json\");\n\n $result = $req->run(\"json\");\n return Event::fromJson($result);\n }", "public function __construct()\n {\n parent::__construct('BaseEvent');\n }", "public function actionCreate()\n\t{\n\t\tYii::import('ext.multimodelform.MultiModelForm');\n\n\t\t$model=new Event;\n\t\t$eventType=new EventType;\n\t\t$member=new EventAttribute;\n\t\t$validatedMembers = array(); // ensure an empty array\n\t\t$attr = array(); \n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Event']))\n\t\t{\n\t\t if(isset($_POST['Event']['attributes']))\n\t\t {\n\t\t $attr = $_POST['Event']['attributes'];\n\t\t }\n\t\t\t$model->attributes=$_POST['Event'];\n\t\t\tif($model->save()) {\n\t\t\t\t$this->addAttributes($attr, $model);\n\t\t\t\t$this->redirect(array('view','id'=>$model->idEvent));\n\t\t\t}\n\t\t} else {\n\t\t\t$this->render('create',array(\n\t\t\t\t'model'=>$model,\n\t\t\t\t'eventType'=>$eventType,\n\t\t\t\t'member'=>$member,\n\t\t\t\t'validatedMembers'=>$validatedMembers,\n\t\t\t));\n\t\t}\n\t}", "public function create()\n {\n // $crud = new Events();\n // $crud->photo ='anniv.png';\n // $crud->title = 'Sogod Founding Anniversary Concert';\n // $crud->descriptions = 'secret';\n // $crud->venue = 'Sogod Covered Court';\n // $crud->date = date('04/02/2018');\n // $crud->time = time('h:i:s');\n\n // $crud->save(); \n }", "public function create(){}", "function event(): EventEmitter\n{\n return EventEmitter::getInstance();\n}", "public function create() {}", "public function storeEvent(){\n \t$eventStore = new Event_Store();\n\n\t\t$eventStore->command = $this->command; \t\n\t\t$eventStore->event = $this->event;\n\t\t$eventStore->status = \"published\";\n\t\t$eventStore->created_at = now();\n\t\t$eventStore->updated_at = now();\n\n\n\t\t$eventStore->save();\n }", "public function create()\n {}", "public function user_can_create_event()\n {\n $user = User::factory()->create();\n $event = Event::factory()->make()->toArray();\n $response = $this->actingAs($user)->post('/events', $event);\n $response->assertStatus(302);\n $this->assertNotNull(Event::where('name', $event['name'])->first());\n }", "private function __construct() {\n\t\t$action = isset($_GET['action']) ? sanitize_key($_GET['action']) : '';\n\t\t$copy = isset($_GET['copy']) ? intval($_GET['copy']) : 0;\n\t\tif(!empty($copy)) {\n\t\t\t$this->copy_event = new EL_Event($copy);\n\t\t\tadd_filter('get_object_terms', array(&$this, 'set_copied_categories'));\n\t\t}\n\n\t\t$this->options = &EL_Options::get_instance();\n\t\t$this->is_new = 'edit' !== $action;\n\n\t\tadd_action('add_meta_boxes', array(&$this, 'add_eventdata_metabox'));\n\t\tadd_action('edit_form_top', array(&$this, 'form_top_content'));\n\t\tadd_action('edit_form_after_title', array(&$this, 'form_after_title_content'));\n\t\tadd_action('admin_print_scripts', array(&$this, 'embed_scripts'));\n\t\tadd_action('save_post_el_events', array(&$this, 'save_eventdata'), 10, 3);\n\t\tadd_filter('enter_title_here', array(&$this, 'change_default_title'));\n\t\tadd_filter('post_updated_messages', array(&$this, 'updated_messages'));\n\t}", "public static function create() {\n\t\t$entry = new GuestbookEntry();\n\t\t$entry->Date = SS_DateTime::now()->getValue();\n\t\t$entry->IpAddress = $_SERVER['REMOTE_ADDR'];\n\t\t$entry->Host = gethostbyaddr($entry->IpAddress);\n\t\treturn $entry;\n\t}", "public function create()\n {\n //\n return view('events.create');\n }", "public function create()\n\t{ \n\t\t# Return if just the countoff is needed\n\t\tif ($this->countoff<2) return;\n\t\t\n\t\t# Add a note on and note off for each beat in the click track\n\t\tfor($i=0; $i<$this->beatsTotal; $i++) { \n\t\t\t$vol = (($i%$this->timeSig)==0) ? 127 : 70;\n\t\t\t$this->addEvent(0,153,37,$vol);\n\t\t\t$this->addEvent($this->ticksPerBeat,153,37,0);\n\t\t}\n\t}", "public function create()\n {\n return view('adm.events.create');\n }", "public function create()\n\t{\n\t\treturn View::make('administrator.events.create')->with('page_title','Create New Event');\n\t\t\n\t}", "public function run()\n {\n factory(TechnoEvent::class,10)->create();\n }", "protected function manageEvent()\n {\n // Manage the incoming session\n $this->manageSession();\n\n // Get the event data from the incoming request\n $eventData = $this->eventRequest->getEvent();\n\n // Get the entity data from the event\n $entityData = $eventData->get('entity');\n\n if (!is_array($entityData)) $entityData = [];\n\n // Hydrate the event entity\n $this->eventEntity = $this->hydrateEntity($entityData);\n\n // Create the event object\n $this->event = new WebsiteEvent();\n\n // Format the action\n $action = $eventData->get('action');\n $this->setDefaultAction($action);\n\n $this->event->setAction($action);\n $this->event->setEntity($this->eventEntity);\n $this->event->setCreatedAt(time());\n\n if (!is_null($eventData->get('data'))) {\n $this->event->setData($eventData->get('data'));\n }\n\n // Set any related entities to the event\n $relatedEntityData = $eventData->get('relatedEntities');\n if (is_array($relatedEntityData) && !empty($relatedEntityData)) {\n foreach ($relatedEntityData as $relatedEntity) {\n $relEntityObj = $this->hydrateEntity($relatedEntity);\n $this->event->addRelatedEntity($relEntityObj);\n\n }\n }\n // Set the session to the event\n $this->event->setSession($this->session);\n }", "public function create(Event $event)\n {\n if ($this->shouldUseLocks($this->cache->store($this->store)->getStore())) {\n return $this->cache->store($this->store)->getStore()\n ->lock($event->mutexName(), $event->expiresAt * 60)\n ->acquire();\n }\n\n return $this->cache->store($this->store)->add(\n $event->mutexName(), true, $event->expiresAt * 60\n );\n }", "public function createEvents()\n {\n //\n\n return 'something';\n }", "public function create() {\n\t \n }", "public function actionCreate()\n\t{\n\t\t$model=new Events;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Events']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Events'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->event_id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n {\n return view('events.create');\n }", "public function create()\n {\n return view('events.create');\n }", "public function create()\n {\n return view('events.create');\n }", "public function create()\n {\n return view('events.create');\n }", "public function create()\n {\n return view('events.create');\n }", "public function create()\n {\n return view('events.create');\n }", "function add_new_event($eventName, $eventColor){\n\t\tif( isset($_POST[$eventName]) ){\n\t\t\tglobal $base;\n\t\t\t\n\t\t\t$title \t= $_POST[$eventName];\n\t\t\t$color \t= $_POST[$eventColor];\n\n\t\t\t$full_calendar_notifications = new full_calendar_notification();\n\n\t\t\t$full_calendar_notifications->user_id = $base->clear_string($_SESSION['user_id']);\n\t\t\t$full_calendar_notifications->notification_title = $title;\n\t\t\t$full_calendar_notifications->notification_color = $color;\n\n\t\t\t$full_calendar_notifications->create();\n\t\t}\n\t}", "public function initialize()\n {\n // attributes\n $this->setName('event');\n $this->setPhpName('Event');\n $this->setClassname('ArtRequestORM\\\\Event');\n $this->setPackage('ArtRequest');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('EVENT_ID', 'EventId', 'INTEGER', true, null, null);\n $this->addColumn('EVENT_TITLE', 'EventTitle', 'VARCHAR', true, 100, null);\n $this->addColumn('EVENT_DESCRIPTION', 'EventDescription', 'LONGVARCHAR', true, null, null);\n $this->addColumn('EVENT_LOCATION', 'EventLocation', 'VARCHAR', true, 100, null);\n $this->addColumn('EVENT_SPONSOR_NAME', 'EventSponsorName', 'VARCHAR', true, 100, null);\n $this->addColumn('EVENT_START_TIME', 'EventStartTime', 'VARCHAR', true, 10, null);\n $this->addColumn('EVENT_END_TIME', 'EventEndTime', 'VARCHAR', true, 10, null);\n $this->addColumn('EVENT_START_DATE', 'EventStartDate', 'DATE', true, null, null);\n $this->addColumn('EVENT_END_DATE', 'EventEndDate', 'DATE', true, null, null);\n $this->addColumn('EVENT_PRICING_MEMBER', 'EventPricingMember', 'DECIMAL', true, null, null);\n $this->addColumn('EVENT_PRICING_STAFF', 'EventPricingStaff', 'DECIMAL', true, null, null);\n $this->addColumn('EVENT_PRICING_STUDENT', 'EventPricingStudent', 'DECIMAL', true, null, null);\n $this->addColumn('EVENT_PRICING_PUBLIC', 'EventPricingPublic', 'DECIMAL', true, null, null);\n // validators\n }", "public static function create_event($pid, $event) \n\t\t{\t\n\t\t\t$mysqli = MysqlInterface::get_connection();\n\t\t\t\n\t\t\t// insert event\n\t\t\t$stmt = $mysqli->stmt_init();\n\t\t\t$stmt->prepare('INSERT INTO event (title, owner, gowner, start_time, end_time, location, logo, description, category, size, tag, price) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);');\n\t\t\t$stmt->bind_param('siisssssiisd', $event['title'], $pid, $gid, $event['start_time'], $event['end_time'], $event['location'], $event['logo'], $event['description'], $event['category'], $event['size'], $event['tag'], $event['price']);\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\t// get auto generated id\n\t\t\t$eid = $mysqli->insert_id;\n\t\t\t\n\t\t\t$stmt->close();\n\t\t\t\n\t\t\t// grant user host role\n\t\t\tPeopleDAO::set_event_role_pid($pid, $eid, Role::Owner);\n\t\t\treturn $eid;\n\t\t}", "public static function create_event( $module_name, $event_name )\n\t{\n\t\t$event = cms_orm('CmsDatabaseEvent')->find_by_module_name_and_event_name($module_name, $event_name);\n\t\tif ($event == null)\n\t\t{\n\t\t\t$event = new CmsDatabaseEvent();\n\t\t\t$event->module_name = $module_name;\n\t\t\t$event->event_name = $event_name;\n\t\t\treturn $event->save();\n\t\t}\n\t}", "public function create()\n {\n return view('admin.events.create');\n }", "public function create()\n {\n return view('admin.events.create');\n }", "public function create()\n {\n return view('admin.events.create');\n }", "public function create()\n {\n return view('admin.events.create');\n }" ]
[ "0.8178475", "0.73455495", "0.67515916", "0.6665345", "0.66544545", "0.66479546", "0.6640835", "0.6556383", "0.6556383", "0.6556383", "0.6556383", "0.6556383", "0.6543442", "0.64682955", "0.645909", "0.64520663", "0.6441302", "0.6438299", "0.63917476", "0.6371641", "0.6371641", "0.63478637", "0.63475716", "0.63285524", "0.6319918", "0.63108855", "0.6275116", "0.6206908", "0.6195245", "0.6193101", "0.61870754", "0.61810726", "0.61807376", "0.612506", "0.612064", "0.61166775", "0.6116489", "0.6116489", "0.6116489", "0.6116489", "0.6111236", "0.6099429", "0.6076598", "0.6072973", "0.6068453", "0.60566765", "0.6056391", "0.6041123", "0.6033919", "0.60277027", "0.60277027", "0.60181046", "0.6014412", "0.6007521", "0.6007521", "0.6007521", "0.5998441", "0.59855086", "0.5971869", "0.5971259", "0.59670085", "0.5959153", "0.59413785", "0.59338146", "0.5930427", "0.5917219", "0.5907522", "0.59049624", "0.58941996", "0.58838826", "0.5868322", "0.58614963", "0.58599705", "0.5856868", "0.58510625", "0.5838314", "0.58332664", "0.5826795", "0.58255696", "0.58250695", "0.5822382", "0.58223313", "0.58191884", "0.58166337", "0.5807514", "0.5798503", "0.57970744", "0.5794831", "0.5794831", "0.5794831", "0.5794831", "0.5794831", "0.5794831", "0.579301", "0.5784509", "0.5783719", "0.5780148", "0.57786983", "0.57786983", "0.57786983", "0.57786983" ]
0.0
-1
Update Function. Called when changes are made in the admin panel.
function update($new_instance, $old_instance) { $instance = $old_instance; $instance['html_text'] = $new_instance['html_text']; return $instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updating()\n {\n # code...\n }", "public function update()\r\n {\r\n \r\n }", "protected function update() {}", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function actionUpdate() {}", "public function actionUpdate() {}", "protected function _update()\n\t{\n\t}", "public function update()\r\n {\r\n //\r\n }", "public function update() {\n parent::update();\n }", "function update() {\n\n\t\t\t}", "public function update() {\r\n\r\n\t}", "public function update()\n {\n }", "public function update() {\r\n }", "public function update()\n {\n //\n }", "public function update()\n {\n //\n }", "public function update()\n\t{\n\n\t}", "public function update() {\n \n }", "public function update()\n {\n \n }", "public function update()\n {\n \n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "protected function update() {\n $this->db->updateRows($this->table_name, $this->update, $this->filter);\n storeDbMsg($this->db,ucwords($this->form_ID) . \" successfully updated!\");\n }", "public function update()\n {\n\n }", "public function update()\n {\n\n }", "public function update () {\n\n }", "protected function updateAction()\n {\n }", "function update()\n {\n $this->dbInit();\n if ( isset( $this->ID ) )\n {\n query( \"UPDATE Grp set Name='$this->Name', Description='$this->Description',\n\t\tUserAdmin='$this->UserAdmin',\n \t\tUserGroupAdmin='$this->UserGroupAdmin',\n\t\tPersonTypeAdmin='$this->PersonTypeAdmin',\n\t\tCompanyTypeAdmin='$this->CompanyTypeAdmin',\n\t\tPhoneTypeAdmin='$this->PhoneTypeAdmin',\n\t\tAddressTypeAdmin='$this->AddressTypeAdmin' WHERE ID='$this->ID'\" );\n }\n }", "public function update()\n {\n # code...\n }", "public function update();", "public function update();", "public function update();", "public function update();", "public static function update(){\n }", "public function update()\n\t{\n\t\t$this->user->db_update();\n\t}", "public function update(){\n\n }", "public function update(){\n\n }", "public function index_onUpdate()\n\t{\n\t\t$record_id = post('record_id');\n\t\tparent::update_onSave($record_id));\n\t\treturn $this->controller->listRefresh();\n\t}", "public static function update(){\r\n }", "function update(){\n\t\t$this->model->update();\n\t}", "protected function afterUpdating()\n {\n }", "public function update() {\n\t\treturn;\n\t}", "public function crudUpdated()\n {\n }", "public function db_update() {}", "protected function _update()\n\t{\n\t\t$this->date_modified = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->last_online = $this->date_modified;\n\t}", "public function updateAction()\n {\n }", "protected function performUpdate() {}", "function updateModified() {\n\n\t\t\tif (!$this->requestAction('admins/checkAdminLoggedIn')) {\n\t\t\t\t// Set the modified date for the editation and leave registration number unchanged\n\t\t\t\t$this->Session->write('Registration.Registration.modified', date('Y-m-d H:i:s'));\n\t\t\t}\n\t}", "protected function saveUpdate()\n {\n }", "protected function _postUpdate()\n\t{\n\t}", "public function information_update() {\r\n $this->check_permission(16);\r\n $content_data['add'] = $this->check_page_action(16, 'add');\r\n $content_data['product_list'] = $this->get_product_list();\r\n $content_data['shift_list'] = $this->get_shift_list();\r\n $content_data['category_list'] = $this->get_category_list();\r\n $this->quick_page_setup(Settings_model::$db_config['adminpanel_theme'], 'adminpanel', $this->lang->line('information_update'), 'operation/information_update', 'header', 'footer', '', $content_data);\r\n }", "public function update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}", "public function update()\n {\n $this->settingService->update(\\Request::input('settings'));\n \\Msg::success('Settings have been updated successfully!');\n return redir('admin/settings');\n }", "public function after_update() {}", "public function _update()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public function update()\n {\n if ($GLOBALS['config']['cache_method'] == 'memcached') {\n $this->memcache_obj->flush();\n } elseif ($GLOBALS['config']['cache_method'] == 'apc') {\n apc_clear_cache('user');\n }\n\n $this->removeFiles();\n\n $this->updateDataFormats();\n\n $this->updateSubmitForms();\n $this->updateCategoriesByType();\n $this->updateCategoriesByParent();\n $this->updateCategoriesByID();\n $this->updateSearchForms();\n $this->updateSearchFields();\n\n $this->updateFeaturedFormFields();\n $this->updateTitlesFormFields();\n $this->updateShortFormFields();\n $this->updateSortingFormFields();\n\n $this->updateListingStatistics();\n }", "public function onUpdate();", "public function onUpdate();", "public function onUpdate();", "public function onUpdateField()\n {\n //TODO Validate input\n\n $post = post();\n\n $flags = FieldManager::makeFlags(\n in_array('enabled', $post['flags']),\n in_array('registerable', $post['flags']),\n in_array('editable', $post['flags']),\n in_array('encrypt', $post['flags'])\n );\n\n $validation = $this->makeValidationArray($post);\n\n $data = $this->makeDataArray($post);\n\n $feedback = FieldManager::updateField(\n $post['name'],\n $post['code'],\n $post['description'],\n $post['type'],\n $validation,\n $flags,\n $data\n );\n\n FieldFeedback::with($feedback, true)->flash();\n\n return Redirect::to(Backend::url('clake/userextended/fields/manage'));\n }", "public function action_update()\n {\n\t $this->template = View::forge('template-admin');\n\n\t\t$get = Input::get();\n\t\t$id = $get[\"id\"];\n\t\t$data[\"update\"] = Model_Event::find_by('id',$id);\n\t\t$data[\"category\"] = Model_Category::find_all();\n\t\t$this->template->title = \"イベント更新\";\n\t\t$this->template->content = View::forge('event/update', $data);\n }", "protected function afterUpdate()\n {\n }", "protected function afterUpdate()\n {\n }", "private function update_form()\n\t{\n\t\t$this->title = sprintf(lang('update_title'), $this->installed_version, $this->version);\n\t\t$vars['action'] = $this->set_qstr('do_update');\n\t\t$this->set_output('update_form', $vars);\n\t}", "public function settings_updated() {\n\t\tglobal $pagenow;\n\t\t$on_options_page = ($pagenow == 'options-general.php');\n\t\t$on_plugins_page = (isset($_GET['page']) && $_GET['page'] == $this->menu_page);\n\t\t$just_updated = (isset($_GET['settings-updated']) && $_GET['settings-updated'] == 'true');\n\n\t\tif($on_options_page && $on_plugins_page && $just_updated) {\n\t\t\tdo_action('chaos-settings-updated');\n\t\t}\n\t}", "protected function afterUpdate() {\n\t}", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update() {\n\t\t$date = date(\"Y-m-d H:i:s\");\n\n\t\t$query=mysql_query(\"update \".$this->table.\" set \".$this->column.\" = '\".mysql_escape_string($this->value).\"', modified_by = \".$this->userID.\", modified='\".$date.\"' where id=\".$this->id);\n\n\t}", "protected function beforeUpdating()\n {\n }", "public function update($raporAdminSetting);", "public function index_onUpdateForm()\n\t{\n\t\t$record_id = post('record_id');\n\t\tparent::update($record_id);\n\t\t$this->controller->vars['record_id'] = $record_id;\n\t\treturn $this->makePartial('update');\n\t}", "function before_update() {}", "public function updates()\n\t{\n\t\t$this->load->model(\"professionalop\");\n\t\t$row=$this->professionalop->getupdates();\n\t\t$data['row']=$row;\n\t\t$this->load->view('professional/home/header');\n\t\t$this->load->view('professional/home/updates',$data);\n\t\t$this->load->view('professional/home/footer');\t\t\n\t}", "public function actionUpdate()\n {\n\t\t\t$id=7;\n $model = $this->findModel($id);\n $model->slug = \"asuransi\";\n $model->waktu_update = date(\"Y-m-d H:i:s\");\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "function wp_direct_php_update_button()\n {\n }", "public function Do_update_Example1(){\n\n\t}", "function update() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->updateElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "public function update()\n {\n return $this->edit();\n }", "public function update ()\n {\n $vereinRepository = new VereinRepository();\n\n $view = new View('verein_update');\n $view->title = \"Verein\";\n $view->heading = \"Verein bearbeiten\";\n $view->verein = $vereinRepository->readById($_GET['id']);\n $view->display();\n }", "public function update(){\n\t\tparent::update(\"UPDATE Users set privacy_setting = \" . $this->privacy_setting . \" where id = \" . $this->id);\n\t}", "public function SQL_UPDATE() {\r\n\t}", "function update( $update_id )\n{\n $this->_numeric_check($update_id); \n $this->_security_check(); \n\n // get item color from store_items_color table\n list ($item_title, $small_img) = $this->model_name->_get_item_title_byid($update_id);\n $data['item_title'] = $item_title;\n $data['small_img'] = $small_img;\n\n // get existing options\n $data['query'] = $this->get_where_custom('item_id', $update_id, $this->store_db_column);\n\n $data['options_hdr'] = 'Color'; \n $data['update_id'] = $update_id; \n $data['num_rows'] = $data['query']->num_rows();\n $data['store_db_column'] = $this->store_db_column;\n\n $data['custom_jscript'] = [ 'public/js/datatables.min',\n 'public/js/site_datatable_loader',\n 'public/js/format_flds'\n ];\n\n $data['page_url'] = \"update\";\n $data['view_module'] = 'store_item_sizes';\n $data['title'] = \"Manage Categories Accounts\";\n\n $this->default['page_title'] = \"Update Item Sizes\";\n $data['default'] = $this->default; \n\n $this->load->module('templates');\n $this->templates->admin($data); \n}", "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n // Update data\n $this->Update();\n }", "public function successUpdate() {\n $this->loadFrontView('profile/after_update');\n }", "function after_update() {}", "public function updateAdmin() {\n\t$numRows = $this->db->update();\n\t\tif($numRows===1) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function Avi_Update(){\n\t\t\n\t\t\n\t\t//when click on button\n\t\tif(isset($_POST['avibtnupdate'])){\n\t\t\t\n\t\t\t//move id into variable\n\t\t\t$get_id = $_GET['Edit'];\n\t\t\t\n\t\t\t//values for table \n\t\t\t$values = \"monday='\".$_POST['monstart'].\" - \".$_POST['monend'].\"',tuesday='\".$_POST['tustart'].\" - \".$_POST['tuend'].\"',wednesday='\".$_POST['wedstart'].\" - \".$_POST['wedend'].\"',thursday='\".$_POST['thustart'].\" - \".$_POST['thuend'].\"',friday='\".$_POST['fristart'].\" - \".$_POST['friend'].\"',saturday='\".$_POST['satstart'].\" - \".$_POST['satend'].\"',sunday='\".$_POST['sunstart'].\" - \".$_POST['sunend'].\"',user_id='\".$_POST['doctor'].\"',date=NOW()\";\n\t\t\t\n\t\t\t//Update From Avialibalility table\n\t\t\t$this->Update('availability',$values,\" where id='$get_id' \",'Availability?List&m');\n\t\t\t\n\t\t\t\n\t\n\t\t} // ifisset close\n\t\t\n\t}", "public function Update()\n {\n \t$rs = mysql_query(\"UPDATE subscriptions SET subscription_name_fr='\" . scrub($this->subscription_name_fr) .\n\t\t\t\t\t\t\t\t \t\t\t\t \"', subscription_name_en='\" . scrub($this->subscription_name_en) .\n\t\t\t\t\t\t\t\t\t \t\t\t \"', subscription_desc_fr='\" . scrub($this->subscription_desc_fr) .\n\t\t\t\t\t\t\t\t\t \t\t\t \"', subscription_desc_en='\" . scrub($this->subscription_desc_en) .\n\t\t\t\t\t\t\t\t \t\t\t\t \"', modified_by_id='\" . $this->modified_by_id .\n\t\t\t\t\t\t\t\t \t\t\t\t \"', modified_date='\" . date(\"Y-m-d H:i:s\") .\n\t\t\t\t\t\t\t\t \t\t\t\t \"' WHERE subscription_id=\" . $this->subscription_id);\n \t\t\n \tif (mysql_errno())\n \t{\n \t\treturn \"MySQL error \".mysql_errno().\": \".mysql_error().\"\\n<br>When executing:<br>\\n$rs\\n<br>\";\n \t}\n \t\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",short_name=\\\"$this->short_name\\\",is_active=\\\"$this->is_active\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "protected function onUpdated()\n {\n return true;\n }", "function update()\n {\n $GLOBALS[\"DEBUG\"] = true;\n $this->dbInit();\n $this->Database->query( \"UPDATE eZLink_Link SET\n Title='$this->Title',\n Description='$this->Description',\n LinkGroup='$this->LinkGroupID',\n KeyWords='$this->KeyWords',\n Url='$this->Url',\n ImageID='$this->ImageID',\n Accepted='$this->Accepted'\n WHERE ID='$this->ID'\" );\n }" ]
[ "0.7614507", "0.7563618", "0.754938", "0.75257784", "0.75257784", "0.75115514", "0.75115514", "0.7510454", "0.7480381", "0.74770397", "0.7464042", "0.7453993", "0.74191177", "0.73998684", "0.739302", "0.739302", "0.73236394", "0.7304145", "0.72854984", "0.72854984", "0.72386384", "0.72386384", "0.72386384", "0.72386384", "0.72386384", "0.72386384", "0.72386384", "0.72386384", "0.72386384", "0.72386384", "0.72386384", "0.72386384", "0.7213084", "0.71669555", "0.71669555", "0.7166308", "0.7165064", "0.7143694", "0.70961374", "0.7082897", "0.7082897", "0.7082897", "0.7082897", "0.70656896", "0.7059746", "0.7059413", "0.7059413", "0.70564604", "0.7041976", "0.70393765", "0.6988854", "0.69529134", "0.6949076", "0.69430405", "0.6921872", "0.6915566", "0.69040734", "0.68996114", "0.68843526", "0.6857408", "0.68289095", "0.68079233", "0.6797849", "0.6786523", "0.677497", "0.6754836", "0.67508024", "0.67508024", "0.67508024", "0.67033875", "0.6696662", "0.66929764", "0.66929764", "0.667574", "0.6673173", "0.66716236", "0.66654193", "0.6650035", "0.6640543", "0.66311973", "0.66214466", "0.66200286", "0.6613864", "0.65849996", "0.6580931", "0.65801", "0.65794694", "0.65774053", "0.6574366", "0.6570287", "0.65404326", "0.6538194", "0.6529061", "0.65207225", "0.6518637", "0.6509129", "0.6507735", "0.65055805", "0.64995414", "0.64731", "0.64641386" ]
0.0
-1
Form function. Used in dashboard to allow users to configure the widget.
function form($config) { $html_text = $config['html_text']; ?> <label for="<?php echo $this->get_field_id("html_text"); ?>"> <p>HTML Text: <textarea rows="5" cols="50" name="<?php echo $this->get_field_name("html_text"); ?>" id="<?php echo $this->get_field_id("html_text") ?>"> <?php echo $html_text; ?> </textarea> </p> </label> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "function buildSettingsForm() {}", "function renderConfigForm() {\n\t}", "function form($instance)\n\t{\n\t\t/* Set up some default widget settings. */\n\t\t$defaults = array('title' => __('Guild News', 'guildnews'),\n\t\t\t\t'region' => 'eu.battle.net',\n\t\t\t\t'locale' => 'de_DE',\n\t\t\t\t'realm' => 'Blackhand',\n\t\t\t\t'guild' => 'Embargo Agency',\n\t\t\t\t'max' => '5'\n\t\t);\n\n\t\t$instance = wp_parse_args((array) $instance, $defaults); ?>\n\n<!-- Widget Title: Text Input -->\n<p>\n\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'hybrid'); ?>\n\t</label> <input id=\"<?php echo $this->get_field_id( 'title' ); ?>\"\n\t\tname=\"<?php echo $this->get_field_name( 'title' ); ?>\"\n\t\tvalue=\"<?php echo $instance['title']; ?>\" style=\"width: 100%;\" />\n</p>\n\n<!-- Guild Name: Text Input -->\n<p>\n\t<label for=\"<?php echo $this->get_field_id( 'guild' ); ?>\"><?php _e('Guild Name:', 'guildnews'); ?>\n\t</label> <input id=\"<?php echo $this->get_field_id( 'guild' ); ?>\"\n\t\tname=\"<?php echo $this->get_field_name( 'guild' ); ?>\"\n\t\tvalue=\"<?php echo $instance['guild']; ?>\" style=\"width: 100%;\" />\n</p>\n\n<!-- Realm Name: Text Input -->\n<p>\n\t<label for=\"<?php echo $this->get_field_id( 'realm' ); ?>\"><?php _e('Realm Name:', 'guildnews'); ?>\n\t</label> <input id=\"<?php echo $this->get_field_id( 'realm' ); ?>\"\n\t\tname=\"<?php echo $this->get_field_name( 'realm' ); ?>\"\n\t\tvalue=\"<?php echo $instance['realm']; ?>\" style=\"width: 100%;\" />\n</p>\n\n<!-- Region: Select Box -->\n<p>\n\t<label for=\"<?php echo $this->get_field_id( 'region' ); ?>\"><?php _e('Region:', 'guildnews'); ?>\n\t</label> <select id=\"<?php echo $this->get_field_id( 'region' ); ?>\"\n\t\tname=\"<?php echo $this->get_field_name( 'region' ); ?>\"\n\t\tclass=\"widefat\" style=\"width: 100%;\">\n\t\t<option\n\t\t<?php if ( 'eu.battle.net' == $instance['region'] ) echo 'selected=\"selected\"'; ?>>eu.battle.net</option>\n\t\t<option\n\t\t<?php if ( 'us.battle.net' == $instance['region'] ) echo 'selected=\"selected\"'; ?>>us.battle.net</option>\n\t\t<option\n\t\t<?php if ( 'kr.battle.net' == $instance['region'] ) echo 'selected=\"selected\"'; ?>>kr.battle.net</option>\n\t\t<option\n\t\t<?php if ( 'tw.battle.net' == $instance['region'] ) echo 'selected=\"selected\"'; ?>>tw.battle.net</option>\n\t</select>\n</p>\n\n<!-- Locale: Select Box -->\n<p>\n\t<label for=\"<?php echo $this->get_field_id( 'locale' ); ?>\"><?php _e('Locale:', 'guildnews'); ?>\n\t</label> <select id=\"<?php echo $this->get_field_id( 'locale' ); ?>\"\n\t\tname=\"<?php echo $this->get_field_name( 'locale' ); ?>\"\n\t\tclass=\"widefat\" style=\"width: 100%;\">\n\t\t<option\n\t\t<?php if ( 'en_US' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>en_US</option>\n\t\t<option\n\t\t<?php if ( 'es_MX' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>es_MX</option>\n\t\t<option\n\t\t<?php if ( 'pt_BR' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>pt_BR</option>\n\t\t<option\n\t\t<?php if ( 'en_GB' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>en_GB</option>\n\t\t<option\n\t\t<?php if ( 'es_ES' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>es_ES</option>\n\t\t<option\n\t\t<?php if ( 'fr_FR' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>fr_FR</option>\n\t\t<option\n\t\t<?php if ( 'ru_RU' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>ru_RU</option>\n\t\t<option\n\t\t<?php if ( 'de_DE' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>de_DE</option>\n\t\t<option\n\t\t<?php if ( 'pt_PT' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>pt_PT</option>\n\t\t<option\n\t\t<?php if ( 'ko_KR' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>ko_KR</option>\n\t\t<option\n\t\t<?php if ( 'zh_TW' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>zh_TW</option>\n\t</select>\n</p>\n\n<!-- Number of News Items: Text Input -->\n<p>\n\t<label for=\"<?php echo $this->get_field_id( 'max' ); ?>\"><?php _e('Number of News Items: (empty for all)', 'guildnews'); ?>\n\t</label> <input id=\"<?php echo $this->get_field_id( 'max' ); ?>\"\n\t\tname=\"<?php echo $this->get_field_name( 'max' ); ?>\"\n\t\tvalue=\"<?php echo $instance['max']; ?>\" style=\"width: 100%;\" />\n</p>\n\n<?php\n\n\t}", "public static function config() {\n\t\t$username = ( isset( $_POST['username'] ) ) ? stripslashes( $_POST['username'] ) : self::get_dashboard_widget_option(self::wid, 'username');\n\t\t$apikey = ( isset( $_POST['apikey'] ) ) ? stripslashes( $_POST['apikey'] ) : self::get_dashboard_widget_option(self::wid, 'apikey');\n\t\t$project_id = ( isset( $_POST['project_id'] ) ) ? stripslashes( $_POST['project_id'] ) : self::get_dashboard_widget_option(self::wid, 'project_id');\n\t\t\n\t\tself::update_dashboard_widget_options(\n\t\t\tself::wid, //The widget id\n\t\t\tarray( //Associative array of options & default values\n\t\t\t\t'username' => $username,\n\t\t\t\t'apikey' => $apikey,\n\t\t\t\t'project_id' => $project_id,\n\t\t\t)\n\t\t);\n ?>\n\t\t<p><label for=\"username\"><?php _e('Benutzername:', 'affiliatetheme-backend'); ?></label> <input type=\"text\" name=\"username\" value=\"<?php echo $username; ?>\" /></p>\n\t\t<p><label for=\"apikey\"><?php _e('API Key:', 'affiliatetheme-backend'); ?></label> <input type=\"text\" name=\"apikey\" value=\"<?php echo $apikey; ?>\" ></p>\n\t\t<p><label for=\"project_id\"><?php _e('Projekt ID:', 'affiliatetheme-backend'); ?></label> <input type=\"text\" name=\"project_id\" value=\"<?php echo $project_id; ?>\" ></p>\n\n <p><?php _e('Kein API Key vorhanden? Bitte wende dich an den Rankalyst Support: [email protected]', 'affiliatetheme-backend'); ?></p>\n\t\t<?php\n }", "abstract function setupform();", "public function hookConfigForm() {\n }", "function form( $instance ) {\n\n require( 'src/widget-fields.php' );\n }", "function siteorigin_panels_ajax_widget_form(){\n\t$request = array_map('stripslashes_deep', $_REQUEST);\n\tif( empty( $request['widget'] ) ) exit();\n\n\techo siteorigin_panels_render_form( $request['widget'], !empty($request['instance']) ? json_decode( $request['instance'], true ) : array(), $_REQUEST['raw'] );\n\texit();\n}", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'layout',\n\t\t\t\t\t'fonts',\n\t\t\t\t\t'custom',\n\t\t\t\t\t'columns',\n\t\t\t\t\t'liststyle',\n\t\t\t\t\t'imageratios',\n\t\t\t\t\t'background',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-display',\n\t\t\t\t\t\t'label' => __( 'Display', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'text_style' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $text_style ) ) ? $text_style : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Title &amp; Excerpt Position' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t\t\t'regular' => __( 'Regular' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t\t'overlay' => __( 'Overlay' , 'layerswp' )\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_media' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_media ) ) ? $show_media : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Featured Images' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_titles' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_titles ) ) ? $show_titles : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Titles' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_excerpts' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_excerpts ) ) ? $show_excerpts : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Excerpts' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'excerpt_length' => array(\n 'type' => 'number',\n 'name' => $this->get_field_name( 'excerpt_length' ) ,\n 'id' => $this->get_field_id( 'excerpt_length' ) ,\n 'min' => 0,\n 'max' => 10000,\n 'value' => ( isset( $excerpt_length ) ) ? $excerpt_length : NULL,\n 'label' => __( 'Excerpts Length' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_dates' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_dates ) ) ? $show_dates : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Dates' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_author' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_author ) ) ? $show_author : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Author' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_tags' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_tags ) ) ? $show_tags : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Tags' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_categories' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_categories ) ) ? $show_categories : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Categories' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_call_to_action' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_call_to_action ) ) ? $show_call_to_action : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show \"Read More\" Buttons' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'call_to_action' => array(\n 'type' => 'text',\n 'name' => $this->get_field_name( 'call_to_action' ) ,\n 'id' => $this->get_field_id( 'call_to_action' ) ,\n 'value' => ( isset( $call_to_action ) ) ? $call_to_action : NULL,\n 'label' => __( '\"Read More\" Text' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_pagination' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_pagination ) ) ? $show_pagination : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Pagination' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' => __( 'Post' , 'layerswp' ),\n\t\t\t\t\t'icon_class' =>'post'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\n\t\t\t\t\t<div class=\"layers-row layers-push-bottom\">\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Enter title here' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $title ) ) ? $title : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-text layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Short Excerpt' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $excerpt ) ) ? $excerpt : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-textarea layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php // Grab the terms as an array and loop 'em to generate the $options for the input\n\t\t\t\t\t\t$terms = get_terms( $this->taxonomy );\n\t\t\t\t\t\tif( !is_wp_error( $terms ) ) { ?>\n\t\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'category' ); ?>\"><?php echo __( 'Category to Display' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t\t<?php $category_options[ 0 ] = __( 'All' , 'layerswp' );\n\t\t\t\t\t\t\t\tforeach ( $terms as $t ) $category_options[ $t->term_id ] = $t->name;\n\t\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Select a Category' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t'value' => ( isset( $category ) ) ? $category : NULL ,\n\t\t\t\t\t\t\t\t\t\t'options' => $category_options\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php } // if !is_wp_error ?>\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'posts_per_page' ); ?>\"><?php echo __( 'Number of items to show' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php $select_options[ '-1' ] = __( 'Show All' , 'layerswp' );\n\t\t\t\t\t\t\t$select_options = $this->form_elements()->get_incremental_options( $select_options , 1 , 20 , 1);\n\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $posts_per_page ) ) ? $posts_per_page : NULL ,\n\t\t\t\t\t\t\t\t\t'min' => '-1',\n\t\t\t\t\t\t\t\t\t'max' => '100'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'order' ); ?>\"><?php echo __( 'Sort by' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $order ) ) ? $order : NULL ,\n\t\t\t\t\t\t\t\t\t'options' => $this->form_elements()->get_sort_options()\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\t\t<?php }", "public function form($instance)\n {\n // Set widget defaults\n $defaults = [\n \"design_style\" => \"circles\",\n \"background_color\" => \"#ff7a59\",\n \"icon_color\" => \"#ffffff\",\n \"layout\" => \"horizontal\",\n \"facebook\" => \"\",\n \"twitter\" => \"\",\n \"email\" => \"\",\n \"linkedin\" => \"\",\n ];\n\n // Parse current settings with defaults\n extract(wp_parse_args((array) $instance, $defaults));\n // Design Style\n ?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id(\n \"design_style\"\n ); ?>\"><?php _e(\"Design Style\", \"kelp_agency\"); ?></label>\n\t\t\t<select required name=\"<?php echo $this->get_field_name(\n \"design_style\"\n ); ?>\" id=\"<?php echo $this->get_field_id(\"design_style\"); ?>\" class=\"widefat\">\n\t\t\t<?php\n $options = [\n \"circles\" => __(\"Circles\", \"kelp_agency\"),\n \"squircles\" => __(\"Squircles\", \"kelp_agency\"),\n \"square\" => __(\"Square\", \"kelp_agency\"),\n \"basic\" => __(\"Basic\", \"kelp_agency\"),\n ];\n // Loop through options and add each one to the select dropdown\n foreach ($options as $key => $name) {\n echo '<option value=\"' .\n esc_attr($key) .\n '\" id=\"' .\n esc_attr($key) .\n '\" ' .\n selected($select, $key, false) .\n \">\" .\n $name .\n \"</option>\";\n }\n ?>\n\t\t\t</select>\n\t\t</p>\n\n\t\t<?php // Background Color\n ?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr(\n $this->get_field_id(\"background_color\")\n ); ?>\"><?php _e(\"Background Color:\", \"kelp_agency\"); ?></label>\n\t\t\t<input required id=\"<?php echo esc_attr(\n $this->get_field_id(\"background_color\")\n ); ?>\" name=\"<?php echo esc_attr($this->get_field_name(\"background_color\")); ?>\" type=\"color\" value=\"<?php echo esc_attr($background_color); ?>\" />\n\t\t</p>\n\n\t\t<?php // Icon Color\n ?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr(\n $this->get_field_id(\"icon_color\")\n ); ?>\"><?php _e(\"Icon Color:\", \"kelp_agency\"); ?></label>\n\t\t\t<input required id=\"<?php echo esc_attr(\n $this->get_field_id(\"icon_color\")\n ); ?>\" name=\"<?php echo esc_attr($this->get_field_name(\"icon_color\")); ?>\" type=\"color\" value=\"<?php echo esc_attr($icon_color); ?>\" />\n\t\t</p>\n\n\t\t<?php // Layout\n ?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id(\n \"layout\"\n ); ?>\"><?php _e(\"Layout\", \"kelp_agency\"); ?></label>\n\t\t\t<select required name=\"<?php echo $this->get_field_name(\n \"layout\"\n ); ?>\" id=\"<?php echo $this->get_field_id(\"layout\"); ?>\" class=\"widefat\">\n\t\t\t\t<?php\n // Your options array\n $options = [\n \"horizontal\" => __(\"Horizontal\", \"kelp_agency\"),\n \"vertical\" => __(\"Vertical\", \"kelp_agency\"),\n ];\n // Loop through options and add each one to the select dropdown\n foreach ($options as $key => $name) {\n echo '<option value=\"' .\n esc_attr($key) .\n '\" id=\"' .\n esc_attr($key) .\n '\" ' .\n selected($select, $key, false) .\n \">\" .\n $name .\n \"</option>\";\n }\n ?>\n\t\t\t</select>\n\t\t</p>\n\n\t\t<?php // Facebook\n ?>\n\t\t<p>\n\t\t\t<input id=\"<?php echo esc_attr(\n $this->get_field_id(\"facebook\")\n ); ?>\" name=\"<?php echo esc_attr($this->get_field_name(\"facebook\")); ?>\" type=\"checkbox\" value=\"1\" <?php checked(\"1\", $facebook); ?> />\n\t\t\t<label for=\"<?php echo esc_attr(\n $this->get_field_id(\"facebook\")\n ); ?>\"><?php _e(\"Facebook\", \"text_domain\"); ?></label>\n\t\t</p>\n\n\t\t<?php // Twitter\n ?>\n\t\t<p>\n\t\t\t<input id=\"<?php echo esc_attr(\n $this->get_field_id(\"twitter\")\n ); ?>\" name=\"<?php echo esc_attr($this->get_field_name(\"twitter\")); ?>\" type=\"checkbox\" value=\"1\" <?php checked(\"1\", $twitter); ?> />\n\t\t\t<label for=\"<?php echo esc_attr(\n $this->get_field_id(\"twitter\")\n ); ?>\"><?php _e(\"Twitter\", \"text_domain\"); ?></label>\n\t\t</p>\n\n\t\t<?php // Email\n ?>\n\t\t<p>\n\t\t\t<input id=\"<?php echo esc_attr(\n $this->get_field_id(\"email\")\n ); ?>\" name=\"<?php echo esc_attr($this->get_field_name(\"email\")); ?>\" type=\"checkbox\" value=\"1\" <?php checked(\"1\", $email); ?> />\n\t\t\t<label for=\"<?php echo esc_attr(\n $this->get_field_id(\"email\")\n ); ?>\"><?php _e(\"Email\", \"text_domain\"); ?></label>\n\t\t</p>\n\n\t\t<?php // LinkedIn\n ?>\n\t\t<p>\n\t\t\t<input id=\"<?php echo esc_attr(\n $this->get_field_id(\"linkedin\")\n ); ?>\" name=\"<?php echo esc_attr($this->get_field_name(\"linkedin\")); ?>\" type=\"checkbox\" value=\"1\" <?php checked(\"1\", $linkedin); ?> />\n\t\t\t<label for=\"<?php echo esc_attr(\n $this->get_field_id(\"linkedin\")\n ); ?>\"><?php _e(\"LinkedIn\", \"text_domain\"); ?></label>\n\t\t</p>\n\t<?php\n }", "public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }", "public function form( $instace ){\n echo '<p><strong>Widget ini belum bisa diubag secara Manual!</strong><br> Hubungi developer untuk melakukan perubahan</p>'; \n }", "function w2s_dashboard_widget_setup() {\n\t\n\t// Save the data\n\tif ( isset( $_POST['widget_id'] ) && ( $_POST['widget_id'] == 'way2sms-wp-plugin' ) )\n\t\tupdate_option( 'way2sms', array( 'username' => $_POST['way2sms_username'], 'password' => $_POST['way2sms_password'] ) );\n\t\n\t// Build the form\n\t$way2sms = get_option( 'way2sms' );\n?>\n\t<style type=\"text/css\">\n\t\t#way2sms-wp-plugin .dashboard-widget-control-form label {\n\t\t\twidth: 70px;\n\t\t\tdisplay: block;\n\t\t\tfloat: left;\n\t\t\tpadding-top:5px;\n\t\t}\n\t</style>\n\t<label for=\"way2sms_username\">Username</label>\n\t<input type=\"text\" name=\"way2sms_username\" id=\"way2sms_username\" value=\"<?php echo $way2sms['username']; ?>\" />\n\t<br />\n\t<label for=\"way2sms_password\">Password</label>\n\t<input type=\"password\" name=\"way2sms_password\" id=\"way2sms_password\" value=\"<?php echo $way2sms['password']; ?>\" />\n\t\n<?php\n}", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'custom',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'layout' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-layout-fullwidth',\n\t\t\t\t\t\t'label' => __( 'Layout', 'layerswp' ),\n\t\t\t\t\t\t'wrapper-class' => 'layers-pop-menu-wrapper layers-small',\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t'layout' => array(\n\t\t\t\t\t\t\t\t'type' => 'select-icons',\n\t\t\t\t\t\t\t\t'label' => __( '' , 'layerswp' ),\n\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'design' ) . '[layout]' ,\n\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'design-layout' ) ,\n\t\t\t\t\t\t\t\t'value' => ( isset( $design['layout'] ) ) ? $design['layout'] : NULL,\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'layout-boxed' => __( 'Boxed' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'layout-fullwidth' => __( 'Full Width' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'layout-full-screen' => __( 'Full Screen' , 'layerswp' )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-slider',\n\t\t\t\t\t\t'label' => __( 'Slider', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'show_slider_arrows' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_slider_arrows' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_slider_arrows' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_slider_arrows ) ) ? $show_slider_arrows : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Slider Arrows' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_slider_dots' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_slider_dots' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_slider_dots' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_slider_dots ) ) ? $show_slider_dots : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Slider Dots' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'autoplay_slides' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'autoplay_slides' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'autoplay_slides' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $autoplay_slides ) ) ? $autoplay_slides : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Autoplay Slides' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'slide_time' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_time' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'slide_time' ) ,\n\t\t\t\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t\t\t\t'max' => 10,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Time in seconds, eg. 2' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $slide_time ) ) ? $slide_time : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Slide Interval' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'data' => array( 'show-if-selector' => '#' . $this->get_field_id( 'autoplay_slides' ), 'show-if-value' => 'true' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'slide_height' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_height' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'slide_height' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $slide_height ) ) ? $slide_height : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Slider Height' , 'layerswp' )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\" id=\"layers-slide-widget-<?php echo esc_attr( $this->number ); ?>\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' =>'Sliders',\n\t\t\t\t\t'icon_class' =>'slider'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'type' => 'hidden',\n\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_ids' ) ,\n\t\t\t\t\t\t\t\t'id' => 'slide_ids_input_' . $this->number,\n\t\t\t\t\t\t\t\t'value' => ( isset( $slide_ids ) ) ? $slide_ids : NULL\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t); ?>\n\n\t\t\t\t\t\t<?php // If we have some slides, let's break out their IDs into an array\n\t\t\t\t\t\tif( isset( $slide_ids ) && '' != $slide_ids ) $slides = explode( ',' , $slide_ids ); ?>\n\n\t\t\t\t\t\t<ul id=\"slide_list_<?php echo esc_attr( $this->number ); ?>\" class=\"layers-accordions layers-accordions-sortable layers-sortable\" data-id_base=\"<?php echo $this->id_base; ?>\" data-number=\"<?php echo esc_attr( $this->number ); ?>\">\n\t\t\t\t\t\t\t<?php if( isset( $slides ) && is_array( $slides ) ) { ?>\n\t\t\t\t\t\t\t\t<?php foreach( $slides as $slide ) {\n\t\t\t\t\t\t\t\t\t$this->slide_item( array(\n\t\t\t\t\t\t\t\t\t\t\t\t'id_base' => $this->id_base ,\n\t\t\t\t\t\t\t\t\t\t\t\t'number' => $this->number\n\t\t\t\t\t\t\t\t\t\t\t) ,\n\t\t\t\t\t\t\t\t\t\t\t$slide ,\n\t\t\t\t\t\t\t\t\t\t\t( isset( $instance[ 'slides' ][ $slide ] ) ) ? $instance[ 'slides' ][ $slide ] : NULL );\n\t\t\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<button class=\"layers-button btn-full layers-add-widget-slide add-new-widget\" data-number=\"<?php echo esc_attr( $this->number ); ?>\"><?php _e( 'Add New Slide' , 'layerswp' ) ; ?></button>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\n\t\t<?php }", "function form( $instance ) {\n\n\t\t/* Set up some default widget settings. */\n\t\t$defaults = array(\n\t\t\n\t\t 'title' => '',\n\t\t\n\t\t 'text_widget' => 'Collaboratively administrate empowered markets via plug-and-play networks. Dynamically procrastinate B2C users after installed base benefits. Dramatically visualize customer directed convergence without revolutionary ROI. Efficiently unleash cross-media information without cross-media value. Quickly maximize timely deliverables for real-time schemas.',\n\t\t\t\n\t\t\t'more_linkurl' => 'http://www.anariel.com/intune/bio/',\n\t\t\t'more_linktext' => 'Do you want to help us?'\n\t\t\n\t\t);\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n<!-- Widget Title: Text Input -->\n<p>\n <label for=\"<?php echo $this->get_field_id( 'title' ); ?>\">\n <?php _e('Title:', 'anariel') ?>\n </label>\n <input type=\"text\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" />\n</p>\n<hr>\n<p>\n <label for=\"<?php echo $this->get_field_id( 'text_widget' ); ?>\">\n <?php _e('Sponsors Text:', 'anariel') ?>\n </label>\n <textarea type=\"text\" id=\"<?php echo $this->get_field_id( 'text_widget' ); ?>\" name=\"<?php echo $this->get_field_name( 'text_widget' ); ?>\"><?php echo $instance['text_widget']; ?></textarea>\n</p>\n<hr>\n<p>\n <label for=\"<?php echo $this->get_field_id( 'more_linkurl' ); ?>\">\n <?php _e('Button link url:', 'anariel') ?>\n </label>\n <input type=\"text\" id=\"<?php echo $this->get_field_id( 'more_linkurl' ); ?>\" name=\"<?php echo $this->get_field_name( 'more_linkurl' ); ?>\" value=\"<?php echo $instance['more_linkurl']; ?>\" />\n</p>\n<hr>\n<p>\n <label for=\"<?php echo $this->get_field_id( 'more_linktext' ); ?>\">\n <?php _e('Button link text:', 'anariel') ?>\n </label>\n <input type=\"text\" id=\"<?php echo $this->get_field_id( 'more_linktext' ); ?>\" name=\"<?php echo $this->get_field_name( 'more_linktext' ); ?>\" value=\"<?php echo $instance['more_linktext']; ?>\" />\n</p>\n<?php\n\t}", "protected function form()\n {\n // return Admin::form(Campaign_setting_form::class, function (Form $form) {\n // });\n }", "function form( $instance ) {\n // Retrieve previous values from $instance or set defaults\n // $render_widget = ( ! empty( $instance['render_widget'] ) ? $instance['render_widget'] : 'true' );\n $widget_title = ( ! empty( $instance['widget_title'] ) ? esc_attr( $instance['widget_title'] ) : __( 'Today\\'s Tasks', 'adventure-log' ) );\n ?>\n <!-- Display fields for widget options -->\n <p>\n <label for=\"<?php echo $this->get_field_id( 'widget_title' ); ?>\">\n <?php _e( 'Title:', 'adventure-log' ); ?>\n </label>\n <input type=\"text\" class=\"widefat title\" id=\"<?php echo $this->get_field_id( 'widget_title' ); ?>\" name=\"<?php echo $this->get_field_name( 'widget_title' );?>\" value=\"<?php echo $widget_title; ?>\"> \n </p>\n <?php\n }", "function form( $instance ) {\n\t\t\n\t\tTrends()->view->load(\n\t\t\t'/view/backend',\n\t\t\tarray(\n\t\t\t\t'widget' => $this,\n\t\t\t\t'instance' => $instance\n\t\t\t),\n\t\t\tfalse,\n\t\t\tdirname( __FILE__ )\n\t\t);\n\t\t\n\t}", "function form( $instance ) {\r\n\r\n\t\t/* Set up some default widget settings. */\r\n\t\t$defaults = array( 'title' => __('Good Reads', 'gr'), 'name' => __('John Doe', 'gr'), 'sex' => 'male', 'show_sex' => true, 'sort_type' => 'Publish Date', 'window_action' => 'new tab' );\r\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\r\n\r\n\t\t<!-- Widget Title: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'hybrid'); ?></label>\r\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" />\r\n\t\t</p>\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'sort_type' ); ?>\"><?php _e('Sort Method:', 'gr'); ?></label>\r\n\t\t\t<select id=\"<?php echo $this->get_field_id( 'sort_type' ); ?>\" name=\"<?php echo $this->get_field_name( 'sort_type' ); ?>\">\r\n\t\t\t\t<option <?php if ( 'Publish Date' == $instance['format'] ) echo 'selected=\"selected\"'; ?>>Publish Date</option>\r\n\t\t\t\t<option <?php if ( 'Alpha' == $instance['format'] ) echo 'selected=\"selected\"'; ?>>Site Title</option>\r\n\t\t\t</select>\r\n\t\t</p>\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'window_action' ); ?>\"><?php _e('Open links in:', 'gr'); ?></label>\r\n\t\t\t<select id=\"<?php echo $this->get_field_id( 'window_action' ); ?>\" name=\"<?php echo $this->get_field_name( 'window_action' ); ?>\">\r\n\t\t\t\t<option <?php if ( 'new tab' == $instance['format'] ) echo 'selected=\"selected\"'; ?>>new tab</option>\r\n\t\t\t\t<option <?php if ( 'same tab' == $instance['format'] ) echo 'selected=\"selected\"'; ?>>same tab</option>\r\n\t\t\t</select>\r\n\t\t</p>\r\n\r\n\t<?php\r\n\t}", "public function valiteForm();", "public function form( $instance ) {\n\t\t?><p>This widget has no settings.</p><?php\n\t}", "function form( $instance ) {\n\n \t$title = esc_attr($instance['title']);\n \t$display_image = esc_attr($instance['display_image']);\n \t$num_articles = esc_attr($instance['num_articles']);\n\n \t$options = get_option('pgnyt_articles');\n \t$pgnyt_results = $options['pgnyt_results'];\n\n \trequire ('inc/widget-fields.php');\n\n }", "function postageapp_admin_form() {\n $form = array();\n \n $form['settings'] = array(\n '#type' => 'fieldset',\n '#title' => t('Postageapp settings'),\n );\n \n $form['settings']['postageapp_api_key'] = array(\n '#type' => 'textfield',\n '#title' => t('PostageApp API Key'),\n '#required' => TRUE,\n '#default_value' => variable_get('postageapp_api_key', ''),\n '#description' => t('The API key for your PostageApp account. Get or generate a valid API key at your PostageApp dashboard which is available at yourusername.postageapp.com')\n );\n \n return system_settings_form($form);\n}", "public function settingsForm()\n {\n return 'forecastio-form-settings';\n }", "public function form($instance)\r\n {\r\n echo 'There are no options for this widget.\r\n Click on <a href=\"http://localhost/th-wp/wp-admin/admin.php?page=sunset-sidebar\" target=\"_blank\" >\r\n this link</a> to edit the options.';\r\n }", "function mkConfigForm() {\r\n\t\tglobal $database;\r\n\r\n\t\t$database->setQuery(\t\"SELECT lft, rgt FROM #__core_acl_aro_groups WHERE name = 'Public Backend'\" );\r\n\t\t$borders\t\t\t=\t$database->loadRow();\r\n\t\t$database->setQuery(\t\"SELECT group_id AS id, name\" .\r\n\t\t\t\t\t\t\t\t\"\\n FROM #__core_acl_aro_groups\" .\r\n\t\t\t\t\t\t\t\t\"\\n WHERE lft > $borders[0]\" .\r\n\t\t\t\t\t\t\t\t\"\\n AND rgt < $borders[1]\" .\r\n\t\t\t\t\t\t\t\t\"\\n ORDER BY lft DESC\"\r\n\t\t);\r\n\t\t$groups = $database->loadObjectList();\r\n\r\n\t\t//load config values\r\n\t\t\t$database->setQuery(\t\"SELECT params FROM #__components WHERE link = 'ca=eventcal'\" );\r\n\t\t\t$text\t\t\t=\t$database->loadResult();\r\n\t\t\t$config_values\t=\tnew mosParameters( $text );\r\n\t\t\t\r\n\r\n\t\tHTML_admin_eventcal::configPage( $config_values, $groups );\r\n\t}", "public function initConfigurationForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\t$pl = $this->getPluginObject();\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\n\t\t// setting 1 (a checkbox)\n\t\t$cb = new ilCheckboxInputGUI($pl->txt(\"setting_1\"), \"setting_1\");\n\t\t$form->addItem($cb);\n\t\t\n\t\t// setting 2 (text)\n\t\t$ti = new ilTextInputGUI($pl->txt(\"setting_2\"), \"setting_2\");\n\t\t$ti->setRequired(true);\n\t\t$ti->setMaxLength(10);\n\t\t$ti->setSize(10);\n\t\t$form->addItem($ti);\n\t\n\t\t$form->addCommandButton(\"save\", $lng->txt(\"save\"));\n\t \n\t\t$form->setTitle($pl->txt(\"example_plugin_configuration\"));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t\t\n\t\treturn $form;\n\t}", "function form( $instance ) {\n\n\t\t/* Set up some default widget settings. */\n\t\t$defaults = array( 'title' => __('Active Listing', 'example'), 'website' => __('http://yourwebsite.com', 'example'));\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n\t\t<!-- Widget Title: Text Input -->\n\t\t<p><?php _e('Title:', 'hybrid'); ?></label><br/><input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:250px;\" />\n\t\t</p>\n\n\t\t<!-- myRealPage Website URL -->\n\t\t<p><?php _e('Your myRealPage Website:', 'example'); ?><br/><input id=\"<?php echo $this->get_field_id( 'name' ); ?>\" name=\"<?php echo $this->get_field_name( 'website' ); ?>\" value=\"<?php echo $instance['website']; ?>\" style=\"width:250px\" />\n\t\t</p>\n\n\t<?php\n\t}", "function form($instance) {\r\r\n\r\r\n global $bookyourtravel_theme_globals;\r\r\n\r\r\n /* Set up some default widget settings. */\r\r\n $defaults = array(\r\r\n 'title' => esc_html__('Refine search results', 'bookyourtravel'),\r\r\n 'enabled_search_fields_text' => esc_html__('What search fields do you want enabled?', 'bookyourtravel'),\r\r\n 'what_text' => esc_html__('What?', 'bookyourtravel'),\r\r\n 'when_text' => esc_html__('When?', 'bookyourtravel'),\r\r\n 'where_text' => esc_html__('Where?', 'bookyourtravel'),\r\r\n 'accommodation_date_from_label_text' => esc_html__('Check-in date', 'bookyourtravel'),\r\r\n 'accommodation_date_to_label_text' => esc_html__('Check-out date', 'bookyourtravel'),\r\r\n 'rooms_label_text' => esc_html__('Rooms', 'bookyourtravel'),\r\r\n 'accommodation_location_label_text' => esc_html__('Your destination', 'bookyourtravel'),\r\r\n 'accommodation_type_label_text' => esc_html__('Accommodation type', 'bookyourtravel'),\r\r\n 'star_rating_label_text' => esc_html__('Star rating', 'bookyourtravel'),\r\r\n 'user_rating_label_text' => esc_html__('User rating', 'bookyourtravel'),\r\r\n 'car_rental_location_label_text' => esc_html__('Pick up from', 'bookyourtravel'),\r\r\n 'car_rental_date_from_label_text' => esc_html__('Pick-up date', 'bookyourtravel'),\r\r\n 'car_rental_date_to_label_text' => esc_html__('Drop-off date', 'bookyourtravel'),\r\r\n 'car_type_label_text' => esc_html__('Car type', 'bookyourtravel'),\r\r\n 'tour_type_label_text' => esc_html__('Tour type', 'bookyourtravel'),\r\r\n 'tour_location_label_text' => esc_html__('Tour location', 'bookyourtravel'),\r\r\n 'tour_date_from_label_text' => esc_html__('Start date', 'bookyourtravel'),\r\r\n 'cruise_date_from_label_text' => esc_html__('Start date', 'bookyourtravel'),\r\r\n 'cruise_type_label_text' => esc_html__('Cruise type', 'bookyourtravel'),\r\r\n 'cabins_label_text' => esc_html__('Cabins', 'bookyourtravel'),\r\r\n 'price_per_person_label_text' => esc_html__('Price per person', 'bookyourtravel'),\r\r\n 'price_per_night_label_text' => esc_html__('Price per night', 'bookyourtravel'),\r\r\n 'price_per_day_label_text' => esc_html__('Price per day', 'bookyourtravel'),\r\r\n 'submit_button_text' => esc_html__('Search again', 'bookyourtravel'),\r\r\n 'show_what_filter' => true,\r\r\n 'show_where_filter' => true,\r\r\n 'show_when_filter' => true,\r\r\n 'show_price_filter' => false,\r\r\n 'show_stars_filter' => false,\r\r\n 'show_rating_filter' => false,\r\r\n 'show_room_count_filter' => false,\r\r\n 'show_accommodation_type_filter' => false,\r\r\n 'show_cruise_type_filter' => false,\r\r\n 'show_cabin_count_filter' => false,\r\r\n 'show_car_type_filter' => false,\r\r\n 'show_tour_type_filter' => false,\r\r\n 'location_select_label_text' => esc_html__('Search location', 'bookyourtravel'),\r\r\n 'make_cruises_searchable' => true,\r\r\n 'make_car_rentals_searchable' => true,\r\r\n 'make_accommodations_searchable' => true,\r\r\n 'make_tours_searchable' => true,\r\r\n );\r\r\n\r\r\n $instance = wp_parse_args((array)$instance, $defaults); ?>\r\r\n\r\r\n <!-- Widget Title: Text Input -->\r\r\n <p>\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('title')); ?>\"><?php esc_html_e('Title:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\" id=\"<?php echo esc_attr($this->get_field_id('title')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('title')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['title']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <?php esc_html_e('What general search filters do you want enabled?', 'bookyourtravel') ?>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('show_what_filter')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('show_what_filter')); ?>\" type=\"checkbox\"\r\r\n value=\"1\" <?php checked($instance['show_what_filter']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('show_what_filter')); ?>\"><?php esc_html_e('Show \"What\" filter?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('show_where_filter')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('show_where_filter')); ?>\"\r\r\n type=\"checkbox\" value=\"1\" <?php checked($instance['show_where_filter']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('show_where_filter')); ?>\"><?php esc_html_e('Show \"Where\" filter?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $bookyourtravel_theme_globals->search_only_available_properties() ? 'display:block;' : 'display:none'; ?>\">\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('show_when_filter')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('show_when_filter')); ?>\" type=\"checkbox\"\r\r\n value=\"1\" <?php checked($instance['show_when_filter']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('show_when_filter')); ?>\"><?php esc_html_e('Show \"When\" filter?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('show_price_filter')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('show_price_filter')); ?>\"\r\r\n type=\"checkbox\" value=\"1\" <?php checked($instance['show_price_filter']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('show_price_filter')); ?>\"><?php esc_html_e('Show \"Price\" filter?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <?php if ($this->enable_reviews) { ?>\r\r\n <p>\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('show_rating_filter')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('show_rating_filter')); ?>\"\r\r\n type=\"checkbox\" value=\"1\" <?php checked($instance['show_rating_filter']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('show_rating_filter')); ?>\"><?php esc_html_e('Show \"Rating\" filter?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n <?php } ?>\r\r\n\r\r\n\r\r\n <h4><?php esc_html_e('General field labels', 'bookyourtravel') ?></h4>\r\r\n\r\r\n <p>\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('what_text')); ?>\"><?php esc_html_e('What label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('what_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('what_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['what_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('when_text')); ?>\"><?php esc_html_e('When label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('when_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('when_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['when_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('where_text')); ?>\"><?php esc_html_e('Where label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('where_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('where_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['where_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('location_select_label_text')); ?>\"><?php esc_html_e('Location label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('location_select_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('location_select_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['location_select_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('price_per_person_label_text')); ?>\"><?php esc_html_e(\"Price per person label\", 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('price_per_person_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('price_per_person_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['price_per_person_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('price_per_night_label_text')); ?>\"><?php esc_html_e(\"Price per night label\", 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('price_per_night_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('price_per_night_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['price_per_night_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('price_per_day_label_text')); ?>\"><?php esc_html_e(\"Price per day label\", 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('price_per_day_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('price_per_day_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['price_per_day_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <?php if ($this->enable_reviews) { ?>\r\r\n <p>\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('user_rating_label_text')); ?>\"><?php esc_html_e(\"User rating label\", 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('user_rating_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('user_rating_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['user_rating_label_text']); ?>\"/>\r\r\n </p>\r\r\n <?php } ?>\r\r\n\r\r\n <?php if ($this->enable_accommodations) { ?>\r\r\n\r\r\n <?php $accommodation_fields_visible = ($instance['make_accommodations_searchable']); ?>\r\r\n\r\r\n <p>\r\r\n <?php esc_html_e('For accommodations', 'bookyourtravel') ?>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('make_accommodations_searchable')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('make_accommodations_searchable')); ?>\"\r\r\n type=\"checkbox\"\r\r\n value=\"1\" <?php checked($instance['make_accommodations_searchable']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('make_accommodations_searchable')); ?>\"><?php esc_html_e('Make accommodations searchable?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $accommodation_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('show_accommodation_type_filter')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('show_accommodation_type_filter')); ?>\"\r\r\n type=\"checkbox\"\r\r\n value=\"1\" <?php checked($instance['show_accommodation_type_filter']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('show_accommodation_type_filter')); ?>\"><?php esc_html_e('Show \"Accommodation type\" filter?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $accommodation_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('show_stars_filter')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('show_stars_filter')); ?>\"\r\r\n type=\"checkbox\" value=\"1\" <?php checked($instance['show_stars_filter']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('show_stars_filter')); ?>\"><?php esc_html_e('Show \"Stars\" filter?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('show_room_count_filter')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('show_room_count_filter')); ?>\"\r\r\n type=\"checkbox\" value=\"1\" <?php checked($instance['show_room_count_filter']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('show_room_count_filter')); ?>\"><?php esc_html_e('Show \"Rooms\" filter?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $accommodation_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('accommodation_date_from_label_text')); ?>\"><?php esc_html_e('Accommodation date from label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('accommodation_date_from_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('accommodation_date_from_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['accommodation_date_from_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $accommodation_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('accommodation_date_to_label_text')); ?>\"><?php esc_html_e('Accommodation date to label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('accommodation_date_to_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('accommodation_date_to_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['accommodation_date_to_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $accommodation_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('accommodation_location_label_text')); ?>\"><?php esc_html_e('Accommodation location label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('accommodation_location_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('accommodation_location_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['accommodation_location_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('rooms_label_text')); ?>\"><?php esc_html_e('Rooms label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('rooms_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('rooms_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['rooms_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $accommodation_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('accommodation_type_label_text')); ?>\"><?php esc_html_e(\"Accommodation type label\", 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('accommodation_type_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('accommodation_type_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['accommodation_type_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $accommodation_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('star_rating_label_text')); ?>\"><?php esc_html_e(\"Star rating label\", 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('star_rating_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('star_rating_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['star_rating_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <?php } ?>\r\r\n\r\r\n <?php if ($this->enable_tours) { ?>\r\r\n\r\r\n <?php $tour_fields_visible = ($instance['make_tours_searchable']); ?>\r\r\n\r\r\n <p>\r\r\n <?php esc_html_e('For tours', 'bookyourtravel') ?>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('make_tours_searchable')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('make_tours_searchable')); ?>\"\r\r\n type=\"checkbox\" value=\"1\" <?php checked($instance['make_tours_searchable']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('make_tours_searchable')); ?>\"><?php esc_html_e('Make tours searchable?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $tour_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('show_tour_type_filter')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('show_tour_type_filter')); ?>\"\r\r\n type=\"checkbox\" value=\"1\" <?php checked($instance['show_tour_type_filter']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('show_tour_type_filter')); ?>\"><?php esc_html_e('Show \"Tour type\" filter?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $tour_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('tour_date_from_label_text')); ?>\"><?php esc_html_e('Tour date from label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('tour_date_from_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('tour_date_from_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['tour_date_from_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $tour_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('tour_type_label_text')); ?>\"><?php esc_html_e(\"Tour type label\", 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('tour_type_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('tour_type_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['tour_type_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $tour_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('tour_location_label_text')); ?>\"><?php esc_html_e('Tour location label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('tour_location_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('tour_location_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['tour_location_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <?php } ?>\r\r\n\r\r\n <?php if ($this->enable_car_rentals) { ?>\r\r\n\r\r\n <?php $car_rental_fields_visible = ($instance['make_car_rentals_searchable']); ?>\r\r\n\r\r\n <p>\r\r\n <?php esc_html_e('For car rentals', 'bookyourtravel') ?>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('make_car_rentals_searchable')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('make_car_rentals_searchable')); ?>\"\r\r\n type=\"checkbox\"\r\r\n value=\"1\" <?php checked($instance['make_car_rentals_searchable']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('make_car_rentals_searchable')); ?>\"><?php esc_html_e('Make car rentals searchable?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $car_rental_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('show_car_type_filter')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('show_car_type_filter')); ?>\"\r\r\n type=\"checkbox\" value=\"1\" <?php checked($instance['show_car_type_filter']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('show_car_type_filter')); ?>\"><?php esc_html_e('Show \"Car type\" filter?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $car_rental_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('car_rental_date_from_label_text')); ?>\"><?php esc_html_e('Car rental date from label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('car_rental_date_from_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('car_rental_date_from_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['car_rental_date_from_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $car_rental_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('car_rental_date_to_label_text')); ?>\"><?php esc_html_e('Car rental date to label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('car_rental_date_to_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('car_rental_date_to_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['car_rental_date_to_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $car_rental_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('car_rental_location_label_text')); ?>\"><?php esc_html_e('Car rental location label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('car_rental_location_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('car_rental_location_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['car_rental_location_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $car_rental_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('car_type_label_text')); ?>\"><?php esc_html_e(\"Car type label\", 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('car_type_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('car_type_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['car_type_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <?php } ?>\r\r\n\r\r\n <?php if ($this->enable_cruises) { ?>\r\r\n\r\r\n <?php $cruise_fields_visible = ($instance['make_cruises_searchable']); ?>\r\r\n\r\r\n <p>\r\r\n <?php esc_html_e('For cruises', 'bookyourtravel') ?>\r\r\n </p>\r\r\n\r\r\n <p>\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('make_cruises_searchable')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('make_cruises_searchable')); ?>\"\r\r\n type=\"checkbox\" value=\"1\" <?php checked($instance['make_cruises_searchable']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('make_cruises_searchable')); ?>\"><?php esc_html_e('Make cruises searchable?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $cruise_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('show_cruise_type_filter')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('show_cruise_type_filter')); ?>\"\r\r\n type=\"checkbox\" value=\"1\" <?php checked($instance['show_cruise_type_filter']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('show_cruise_type_filter')); ?>\"><?php esc_html_e('Show \"Cruise type\" filter?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $cruise_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <input id=\"<?php echo esc_attr($this->get_field_id('show_cabin_count_filter')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('show_cabin_count_filter')); ?>\"\r\r\n type=\"checkbox\" value=\"1\" <?php checked($instance['show_cabin_count_filter']); ?> />\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('show_cabin_count_filter')); ?>\"><?php esc_html_e('Show \"Cabin count\" filter?', 'bookyourtravel'); ?></label>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $cruise_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('cruise_date_from_label_text')); ?>\"><?php esc_html_e('Cruise date from label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('cruise_date_from_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('cruise_date_from_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['cruise_date_from_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $cruise_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('cabins_label_text')); ?>\"><?php esc_html_e('Cabins label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('cabins_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('cabins_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['cabins_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <p style=\"<?php echo $cruise_fields_visible ? '' : 'display:none'; ?>\">\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('cruise_type_label_text')); ?>\"><?php esc_html_e('Cruise type label:', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('cruise_type_label_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('cruise_type_label_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['cruise_type_label_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n <?php } ?>\r\r\n\r\r\n <p>\r\r\n <label\r\r\n for=\"<?php echo esc_attr($this->get_field_id('submit_button_text')); ?>\"><?php esc_html_e('Search submit button text', 'bookyourtravel') ?></label>\r\r\n <input type=\"text\" class=\"widefat\"\r\r\n id=\"<?php echo esc_attr($this->get_field_id('submit_button_text')); ?>\"\r\r\n name=\"<?php echo esc_attr($this->get_field_name('submit_button_text')); ?>\"\r\r\n value=\"<?php echo esc_attr($instance['submit_button_text']); ?>\"/>\r\r\n </p>\r\r\n\r\r\n\t<?php\r\r\n\t}", "protected function getConfigForm()\n {\n // toDo: Add config to choose items showed by viewedItems\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Live mode'),\n 'name' => 'CAPTURELEADSXAVIER_LIVE_MODE',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a valid email address'),\n 'name' => 'CAPTURELEADSXAVIER_ACCOUNT_EMAIL',\n 'label' => $this->l('Email'),\n ),\n array(\n 'type' => 'password',\n 'name' => 'CAPTURELEADSXAVIER_ACCOUNT_PASSWORD',\n 'label' => $this->l('Password'),\n ),\n array(\n 'type' => 'radio',\n 'label' => $this->l('Column selector'),\n 'name' => 'CAPTURELEADSXAVIER_COL_SEL',\n 'required' => true,\n 'is_bool' => true,\n 'desc' => $this->l('Select on what column you want the module'),\n 'values' => array(\n array(\n 'id' => 'col_left',\n 'value' => \"left\",\n 'label' => $this->l('Left')\n ),\n array(\n 'id' => 'col_right',\n 'value' => \"right\",\n 'label' => $this->l('Right')\n )\n\n ),\n ),\n \n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n )\n )\n );\n }", "public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }", "public function buildForm()\n {\n }", "function form( $instance ) {\n\n\t// Set up some default widget settings\n\t$defaults = array(\n\t\t'title' => 'Featured Clients',\n\t\t'image1' => '',\n\t\t'image2' => '',\n\t\t'image3' => '',\n\t\t'image4' => '',\n\t\t'image5' => '',\n\t\t'client1' => '',\n\t\t'client2' => '',\n\t\t'client3' => '',\n\t\t'client4' => '',\n\t\t'client5' => '',\n\t\t'link1' => '',\n\t\t'link2' => '',\n\t\t'link3' => '',\n\t\t'link4' => '',\n\t\t'link5' => '',\n\t);\n\t\n\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n\t<!-- Widget Title: Text Input -->\n\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'cleanbusiness') ?></label>\n\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" />\n\t</p>\n\n\t\n\t\t<!-- Image 1: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'client1' ); ?>\"><?php _e('Client 1:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'client1' ); ?>\" name=\"<?php echo $this->get_field_name( 'client1' ); ?>\" value=\"<?php echo $instance['client1']; ?>\" />\n\t\t\t\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'image1' ); ?>\"><?php _e('Image 1:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"client-image\" type=\"text\" id=\"<?php echo $this->get_field_id( 'image1' ); ?>\" name=\"<?php echo $this->get_field_name( 'image1' ); ?>\" value=\"<?php echo $instance['image1']; ?>\" />&nbsp;<input type=\"button\" class=\"upload_button client-image-upload\" value=\"Upload\"/>\n\t\t\t<br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'link1' ); ?>\"><?php _e('link 1:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'link1' ); ?>\" name=\"<?php echo $this->get_field_name( 'link1' ); ?>\" value=\"<?php echo $instance['link1']; ?>\" />\n\t\t</p>\n\t\n\t\n\t\t<!-- Image 2: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'client2' ); ?>\"><?php _e('Client 2:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'client2' ); ?>\" name=\"<?php echo $this->get_field_name( 'client2' ); ?>\" value=\"<?php echo $instance['client2']; ?>\" />\n\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'image2' ); ?>\"><?php _e('Image 2:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"client-image\" type=\"text\" id=\"<?php echo $this->get_field_id( 'image2' ); ?>\" name=\"<?php echo $this->get_field_name( 'image2' ); ?>\" value=\"<?php echo $instance['image2']; ?>\" />&nbsp;<input type=\"button\" class=\"upload_button client-image-upload\" value=\"Upload\"/>\n\t\t\t<br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'link2' ); ?>\"><?php _e('link 2:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'link2' ); ?>\" name=\"<?php echo $this->get_field_name( 'link2' ); ?>\" value=\"<?php echo $instance['link2']; ?>\" />\n\t\t</p>\t\n\t\t<!-- Image 3: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'client3' ); ?>\"><?php _e('Client 3:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'client3' ); ?>\" name=\"<?php echo $this->get_field_name( 'client3' ); ?>\" value=\"<?php echo $instance['client3']; ?>\" />\n\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'image3' ); ?>\"><?php _e('Image 3:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"client-image\" type=\"text\" id=\"<?php echo $this->get_field_id( 'image3' ); ?>\" name=\"<?php echo $this->get_field_name( 'image3' ); ?>\" value=\"<?php echo $instance['image3']; ?>\" />&nbsp;<input type=\"button\" class=\"upload_button client-image-upload\" value=\"Upload\"/>\n\t\t\t<br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'link3' ); ?>\"><?php _e('link 3:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'link3' ); ?>\" name=\"<?php echo $this->get_field_name( 'link3' ); ?>\" value=\"<?php echo $instance['link3']; ?>\" />\n\t\t</p>\n\t\n\t\t<!-- Image 4: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'client4' ); ?>\"><?php _e('Client 4:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'client4' ); ?>\" name=\"<?php echo $this->get_field_name( 'client4' ); ?>\" value=\"<?php echo $instance['client4']; ?>\" />\n\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'image4' ); ?>\"><?php _e('Image 4:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"client-image\" type=\"text\" id=\"<?php echo $this->get_field_id( 'image4' ); ?>\" name=\"<?php echo $this->get_field_name( 'image4' ); ?>\" value=\"<?php echo $instance['image4']; ?>\" />&nbsp;<input type=\"button\" class=\"upload_button client-image-upload\" value=\"Upload\"/>\n\t\t\t<br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'link4' ); ?>\"><?php _e('link 4:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'link4' ); ?>\" name=\"<?php echo $this->get_field_name( 'link4' ); ?>\" value=\"<?php echo $instance['link4']; ?>\" />\n\t\t</p>\n\n\t\t<!-- Image 5: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'client5' ); ?>\"><?php _e('Client 5:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'client5' ); ?>\" name=\"<?php echo $this->get_field_name( 'client5' ); ?>\" value=\"<?php echo $instance['client5']; ?>\" />\n\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'image5' ); ?>\"><?php _e('Image 5:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"client-image\" type=\"text\" id=\"<?php echo $this->get_field_id( 'image5' ); ?>\" name=\"<?php echo $this->get_field_name( 'image5' ); ?>\" value=\"<?php echo $instance['image5']; ?>\" />&nbsp;<input type=\"button\" class=\"upload_button client-image-upload\" value=\"Upload\"/>\n\t\t\t<br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'link5' ); ?>\"><?php _e('link 5:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'link5' ); ?>\" name=\"<?php echo $this->get_field_name( 'link5' ); ?>\" value=\"<?php echo $instance['link5']; ?>\" />\n\t\t</p>\n\t\n\t\t\t\n\t<?php\n\t}", "function form( $instance ) {\r\n\t\t?>\r\n\r\n\t\t<!-- Widget Title: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:'); ?></label>\r\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:80%;\" />\r\n\t\t</p>\r\n\r\n\t\t<!-- Your Name: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'taxonomy' ); ?>\"><?php _e('Taxonomy:', 'forritz'); ?></label>\r\n\t\t\t<!--\t\t\t<input id=\"<?php echo $this->get_field_id( 'taxonomy' ); ?>\" name=\"<?php echo $this->get_field_name( 'taxonomy' ); ?>\" value=\"<?php echo $instance['taxonomy']; ?>\" style=\"width:100%;\" />-->\r\n\t\t\t<select id=\"<?php echo $this->get_field_id( 'taxonomy' ); ?>\" name=\"<?php echo $this->get_field_name( 'taxonomy' ); ?>\" class=\"widefat\" style=\"width:80%;\">\r\n\t\t\t\t<?php $taxonomies = get_taxonomies(array(),'objects');\r\n\t\t\t\tforeach($taxonomies as $taxonomy)\r\n\t\t\t\t\tif ( $taxonomy->name == $instance['taxonomy'])\r\n\t\t\t\t\t\tprintf('<option value=\"%s\" selected=\"selected\">%s</option>',$taxonomy->name,$taxonomy->label);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tprintf('<option value=\"%s\">%s</option>',$taxonomy->name,$taxonomy->label);\r\n\t\t\t\t\t?>\r\n\t\t\t\t</select>\r\n\t\t\t</p>\r\n\r\n\t\t\t<p>\r\n\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'parameter' ); ?>\"><?php _e('parameter:', 'forritz'); ?></label>\r\n\t\t\t\t<input id=\"<?php echo $this->get_field_id( 'parameter' ); ?>\" name=\"<?php echo $this->get_field_name( 'parameter' ); ?>\" value=\"<?php echo $instance['parameter']; ?>\" style=\"width:80%;\" />\r\n\t\t\t</p>\r\n\r\n\t\t\t<?php\r\n\t\t}", "function form( $instance ) {\n\n /* Set up some default widget settings. */\n $defaults = array( \n 'title' => __('', 'hybrid'), \n 'post_count' => __('4', 'hybrid')\n );\n $instance = wp_parse_args( (array) $instance, $defaults );?>\n \n\n <!-- Widget Title: Text Input -->\n <p>\n <label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'hybrid'); ?></label>\n <input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:100%;\" />\n </p>\n\n <!-- Sponsor image url: Text Input -->\n <p>\n <label for=\"<?php echo $this->get_field_id( 'post_count' ); ?>\"><?php _e('Show Post Count:', 'hybrid'); ?></label>\n <input id=\"<?php echo $this->get_field_id( 'post_count' ); ?>\" name=\"<?php echo $this->get_field_name( 'post_count' ); ?>\" value=\"<?php echo $instance['post_count']; ?>\" style=\"width:100%;\" />\n </p>\n \n <?php\n }", "function showInputForm()\n {\n $user = common_current_user();\n\n $profile = $user->getProfile();\n\n $this->elementStart('form', array('method' => 'post',\n 'id' => 'form_ostatus_sub',\n 'class' => 'form_settings',\n 'action' => $this->selfLink()));\n\n $this->hidden('token', common_session_token());\n\n $this->elementStart('fieldset', array('id' => 'settings_feeds'));\n\n $this->elementStart('ul', 'form_data');\n $this->elementStart('li');\n $this->input('profile',\n // TRANS: Field label for a field that takes an OStatus user address.\n _m('Subscribe to'),\n $this->profile_uri,\n // TRANS: Tooltip for field label \"Subscribe to\".\n _m('OStatus user\\'s address, like [email protected] or http://example.net/nickname.'));\n $this->elementEnd('li');\n $this->elementEnd('ul');\n // TRANS: Button text.\n $this->submit('validate', _m('BUTTON','Continue'));\n\n $this->elementEnd('fieldset');\n\n $this->elementEnd('form');\n }", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "protected function Form_Run() {}", "function form( $instance ) {\r\n\r\n\t\t/* Set up some default widget settings. */\r\n\t\t$defaults = array( 'title' => __('Follow me on Twitter', 'twitterfollowbutton'), 'username' => __('webgrafia', 'twitterfollowbutton'));\r\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\r\n\r\n\t\t<!-- Widget Title: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'hybrid'); ?></label>\r\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:100%;\" />\r\n\t\t</p>\r\n\r\n\t\t<!-- Your Name: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'username' ); ?>\"><?php _e('Twitter Username:', 'twitterfollowbutton'); ?></label>\r\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'username' ); ?>\" name=\"<?php echo $this->get_field_name( 'username' ); ?>\" value=\"<?php echo $instance['username']; ?>\" style=\"width:100%;\" />\r\n\t\t</p>\r\n\t\r\n\t<!-- Your Color -->\r\n\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'color' ); ?>\"><?php _e('Background color:', 'twitterfollowbutton'); ?></label><br />\r\n\t<input type=\"radio\" id=\"<?php echo $this->get_field_id( 'color' ); ?>\" name=\"<?php echo $this->get_field_name( 'color' ); ?>\" value=\"white\" style=\"width:100%;\" <? if(($instance['color'] == \"\") || ($instance['color '] == \"white\")) echo \"checked\"; ?> /> White<br />\r\n\t<input type=\"radio\" id=\"<?php echo $this->get_field_id( 'color' ); ?>\" name=\"<?php echo $this->get_field_name( 'color' ); ?>\" value=\"black\" style=\"width:100%;\" <? if($instance['color'] == \"black\") echo \"checked\"; ?>/> Black\r\n\t\t</p>\r\n\r\n\r\n\t\t<!-- language: Select Box -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'language' ); ?>\"><?php _e('Language:', 'twitterfollowbutton'); ?></label> \r\n\t\t\t<select id=\"<?php echo $this->get_field_id( 'language' ); ?>\" name=\"<?php echo $this->get_field_name( 'language' ); ?>\" class=\"widefat\" style=\"width:100%;\">\r\n\t\t\t\t<option <?php if ( 'en' == $instance['language'] ) echo 'selected=\"selected\"'; ?> value=\"en\">English</option>\r\n\t\t\t\t<option <?php if ( 'ko' == $instance['language'] ) echo 'selected=\"selected\"'; ?> value=\"ko\">Corean</option>\r\n\t\t\t\t<option <?php if ( 'fr' == $instance['language'] ) echo 'selected=\"selected\"'; ?> value=\"fr\">France</option>\r\n\t\t\t\t<option <?php if ( 'ja' == $instance['language'] ) echo 'selected=\"selected\"'; ?> value=\"ja\">Japanese</option>\r\n\t\t\t\t<option <?php if ( 'ru' == $instance['language'] ) echo 'selected=\"selected\"'; ?> value=\"ru\">Russian</option>\r\n\t\t\t\t<option <?php if ( 'it' == $instance['language'] ) echo 'selected=\"selected\"'; ?> value=\"it\">Italiano</option>\r\n\t\t\t\t<option <?php if ( 'de' == $instance['language'] ) echo 'selected=\"selected\"'; ?> value=\"de\">Deutsch</option>\r\n\t\t\t\t<option <?php if ( 'tr' == $instance['language'] ) echo 'selected=\"selected\"'; ?> value=\"tr\">Turkish</option>\r\n\t\t\t</select>\r\n\t\t</p>\r\n\r\n\t\t<!-- Show number Checkbox -->\r\n\t\t<p>\r\n\r\n\t\t\t<input class=\"checkbox\" type=\"checkbox\" <?php checked( $instance['shownumber'], true ); ?> value=\"1\" id=\"<?php echo $this->get_field_id( 'shownumber' ); ?>\" name=\"<?php echo $this->get_field_name( 'shownumber' ); ?>\" <? if($instance['shownumber']) echo \" checked \";?> /> \r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'shownumber' ); ?>\"><?php _e('Show numbers of follower?', 'twitterfollowbutton'); ?></label>\r\n\t\t</p>\r\n\r\n\r\n<p style=\"background-color:#000; float:left; padding:6px; color:#ffffff;-moz-border-radius: 5px; border-radius: 5px; font-size:11px; \">\r\n\r\n<a href=\"http://twitter.com/webgrafia\" class=\"twitter-follow-button\" data-button=\"grey\" data-text-color=\"#FFFFFF\" data-link-color=\"#00AEFF\">Follow @webgrafia</a>\r\n<script src=\"http://platform.twitter.com/widgets.js\" type=\"text/javascript\"></script>\r\n<br />for update on plugin development\r\n</p>\r\n\t<?php\r\n\t}", "function widgetControlOutput( ) {\r\n\t\t\t$options = get_option( 'ILuvWalking.com Widget' );\r\n\t\t\tif( isset( $_POST[ \"iluvwalking-com-submit\" ] ) ) {\r\n\t\t\t\t$options[ 'title' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-title' ] ) );\r\n\t\t\t\t$options[ 'name' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-name' ] ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tupdate_option( 'ILuvWalking.com Widget', $options );\r\n\t\t\t\r\n\t\t\t$title = attribute_escape( $options[ 'title' ] );\r\n\t\t\t$name = attribute_escape( $options[ 'name' ] );\r\n\t\t\t\r\n\t\t\tinclude ( 'views/widget-control.php' );\r\n\t\t}", "public function dashboard_widget() {\n\t\tglobal $wpdb;\n\n\t\t// Get the date/time format that is saved in the options table\n\t\t$date_format = get_option( 'date_format' );\n\t\t$time_format = get_option( 'time_format' );\n\n\t\t$widgets = get_option( 'vfb_dashboard_widget_options' );\n\t\t$total_items = isset( $widgets['vfb_dashboard_recent_entries'] ) && isset( $widgets['vfb_dashboard_recent_entries']['items'] ) ? absint( $widgets['vfb_dashboard_recent_entries']['items'] ) : 5;\n\n\t\t$forms = $wpdb->get_var( \"SELECT COUNT(*) FROM {$this->form_table_name}\" );\n\n\t\tif ( !$forms ) :\n\t\t\techo sprintf(\n\t\t\t\t'<p>%1$s <a href=\"%2$s\">%3$s</a></p>',\n\t\t\t\t__( 'You currently do not have any forms.', 'visual-form-builder-pro' ),\n\t\t\t\tesc_url( admin_url( 'admin.php?page=vfb-add-new' ) ),\n\t\t\t\t__( 'Get started!', 'visual-form-builder-pro' )\n\t\t\t);\n\n\t\t\treturn;\n\t\tendif;\n\n\t\t$entries = $wpdb->get_results( $wpdb->prepare( \"SELECT forms.form_title, entries.entries_id, entries.form_id, entries.sender_name, entries.sender_email, entries.date_submitted FROM $this->form_table_name AS forms INNER JOIN $this->entries_table_name AS entries ON entries.form_id = forms.form_id ORDER BY entries.date_submitted DESC LIMIT %d\", $total_items ) );\n\n\t\tif ( current_user_can( 'vfb_edit_entries' ) )\n\t\t\t$action = 'edit';\n\t\telseif ( current_user_can( 'vfb_view_entries' ) )\n\t\t\t$action = 'view';\n\n\t\tif ( !$entries ) :\n\t\t\techo sprintf( '<p>%1$s</p>', __( 'You currently do not have any entries.', 'visual-form-builder-pro' ) );\n\t\telse :\n\n\t\t\t$content = '';\n\n\t\t\tforeach ( $entries as $entry ) :\n\n\t\t\t\t$content .= sprintf(\n\t\t\t\t\t'<li><a href=\"%1$s\">%4$s</a> via <a href=\"%2$s\">%5$s</a> <span class=\"rss-date\">%6$s</span><cite>%3$s</cite></li>',\n\t\t\t\t\tesc_url( add_query_arg( array( 'action' => $action, 'entry' => absint( $entry->entries_id ) ), admin_url( 'admin.php?page=vfb-entries' ) ) ),\n\t\t\t\t\tesc_url( add_query_arg( 'form-filter', absint( $entry->form_id ), admin_url( 'admin.php?page=vfb-entries' ) ) ),\n\t\t\t\t\tesc_html( $entry->sender_name ),\n\t\t\t\t\tesc_html( $entry->sender_email ),\n\t\t\t\t\tesc_html( $entry->form_title ),\n\t\t\t\t\tdate( \"$date_format $time_format\", strtotime( $entry->date_submitted ) )\n\t\t\t\t);\n\n\t\t\tendforeach;\n\n\t\t\techo \"<div class='rss-widget'><ul>$content</ul></div>\";\n\n\t\tendif;\n\t}", "public function populateForm() {}", "function form( $instance ) {\n\t\t$defaults = array( 'title' => '', 'datefirst' => 'all', 'datesecond' => 'all', 'datethird' => 'all', 'datefourth' => 'all', 'titlefirst' => '', 'metafirst' => '','titlesecond' => '', 'metasecond' => '','titlethird' => '', 'metathird' => '','titlefourth' => '', 'metafourth' => '',);\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\t\n\t\t<div>\n\t\t<p><em style=\"color:red;\"><?php _e('Use this widget only in sidebar area!', 'rehub_framework');?></em></p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title of widget:', 'rehub_framework'); ?></label>\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" />\n\t\t</p>\t\t\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'titlefirst' ); ?>\"><?php _e('Enter title for first tab:', 'rehub_framework'); ?></label>\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'titlefirst' ); ?>\" name=\"<?php echo $this->get_field_name( 'titlefirst' ); ?>\" value=\"<?php echo $instance['titlefirst']; ?>\" />\n\t\t\t<span><em><?php _e('Required', 'rehub_framework');?></em></span>\n\t\t</p>\n\t\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id('datefirst'); ?>\"><?php _e('Show posts for first tab published:', 'rehub_framework');?></label> \n\t\t<select id=\"<?php echo $this->get_field_id('datefirst'); ?>\" name=\"<?php echo $this->get_field_name('datefirst'); ?>\" style=\"width:100%;\">\n\t\t\t<option value='all' <?php if ( 'all' == $instance['datefirst'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('all time', 'rehub_framework');?></option>\n\t\t\t<option value='day' <?php if ( 'day' == $instance['datefirst'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last 24 hours', 'rehub_framework');?></option>\t\t\t\n\t\t\t<option value='week' <?php if ( 'week' == $instance['datefirst'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last 7 days', 'rehub_framework');?></option>\n\t\t\t<option value='month' <?php if ( 'month' == $instance['datefirst'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last month', 'rehub_framework');?></option>\n\t\t\t<option value='year' <?php if ( 'year' == $instance['datefirst'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last year', 'rehub_framework');?></option>\n\t\t</select>\n\t\t</p>\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'metafirst' ); ?>\"><?php _e('Enter meta for first tab', 'rehub_framework'); ?></label>\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'metafirst' ); ?>\" name=\"<?php echo $this->get_field_name( 'metafirst' ); ?>\" value=\"<?php echo $instance['metafirst']; ?>\" />\n\t\t</p>\n\t\t<p style=\"font-style: italic;\">\n\t\t\t<?php _e('Some important meta keys: <br /><strong>rehub_review_overall_score</strong> - key for overall review score, <br /><strong>post_hot_count</strong> - hot or thumb counter, <br /><strong>post_user_average</strong> - user rating score(based on full review criterias), <br /><strong>rehub_views</strong> - post view counter', 'rehub_framework')?>\t\t\t\t\t\t\t\n\t\t</p>\t\t\n\t\t<hr style=\"margin: 30px 0\" />\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'titlesecond' ); ?>\"><?php _e('Enter title for second tab', 'rehub_framework'); ?></label>\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'titlesecond' ); ?>\" name=\"<?php echo $this->get_field_name( 'titlesecond' ); ?>\" value=\"<?php echo $instance['titlesecond']; ?>\" />\n\t\t\t<span><em><?php _e('Required', 'rehub_framework');?></em></span>\n\t\t</p>\n\t\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id('datesecond'); ?>\"><?php _e('Show posts for second tab published:', 'rehub_framework');?></label> \n\t\t<select id=\"<?php echo $this->get_field_id('datesecond'); ?>\" name=\"<?php echo $this->get_field_name('datesecond'); ?>\" style=\"width:100%;\">\n\t\t\t<option value='all' <?php if ( 'all' == $instance['datesecond'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('all time', 'rehub_framework');?></option>\n\t\t\t<option value='day' <?php if ( 'day' == $instance['datesecond'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last 24 hours', 'rehub_framework');?></option>\t\t\t\n\t\t\t<option value='week' <?php if ( 'week' == $instance['datesecond'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last 7 days', 'rehub_framework');?></option>\n\t\t\t<option value='month' <?php if ( 'month' == $instance['datesecond'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last month', 'rehub_framework');?></option>\n\t\t\t<option value='year' <?php if ( 'year' == $instance['datesecond'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last year', 'rehub_framework');?></option>\n\t\t</select>\n\t\t</p>\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'metasecond' ); ?>\"><?php _e('Enter meta for second tab', 'rehub_framework'); ?></label>\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'metasecond' ); ?>\" name=\"<?php echo $this->get_field_name( 'metasecond' ); ?>\" value=\"<?php echo $instance['metasecond']; ?>\" />\t\t\t\n\t\t</p>\n\t\t<p style=\"font-style: italic;\">\n\t\t\t<?php _e('Some important meta keys: <br /><strong>rehub_review_overall_score</strong> - key for overall review score, <br /><strong>post_hot_count</strong> - hot or thumb counter, <br /><strong>post_user_average</strong> - user rating score(based on full review criterias), <br /><strong>rehub_views</strong> - post view counter', 'rehub_framework')?>\t\t\t\t\t\t\t\n\t\t</p>\t\t\n\t\t\n\t\t<hr style=\"margin: 30px 0\" />\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'titlethird' ); ?>\"><?php _e('Enter title for third tab', 'rehub_framework'); ?></label>\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'titlethird' ); ?>\" name=\"<?php echo $this->get_field_name( 'titlethird' ); ?>\" value=\"<?php echo $instance['titlethird']; ?>\" />\n\t\t</p>\n\t\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id('datethird'); ?>\"><?php _e('Show posts for third tab published:', 'rehub_framework');?></label> \n\t\t<select id=\"<?php echo $this->get_field_id('datethird'); ?>\" name=\"<?php echo $this->get_field_name('datethird'); ?>\" style=\"width:100%;\">\n\t\t\t<option value='all' <?php if ( 'all' == $instance['datethird'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('all time', 'rehub_framework');?></option>\n\t\t\t<option value='day' <?php if ( 'day' == $instance['datethird'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last 24 hours', 'rehub_framework');?></option>\t\t\t\n\t\t\t<option value='week' <?php if ( 'week' == $instance['datethird'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last 7 days', 'rehub_framework');?></option>\n\t\t\t<option value='month' <?php if ( 'month' == $instance['datethird'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last month', 'rehub_framework');?></option>\n\t\t\t<option value='year' <?php if ( 'year' == $instance['datethird'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last year', 'rehub_framework');?></option>\n\t\t</select>\n\t\t</p>\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'metathird' ); ?>\"><?php _e('Enter meta for third tab', 'rehub_framework'); ?></label>\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'metathird' ); ?>\" name=\"<?php echo $this->get_field_name( 'metathird' ); ?>\" value=\"<?php echo $instance['metathird']; ?>\" />\t\t\t\n\t\t</p>\n\t\t<p style=\"font-style: italic;\">\n\t\t\t<?php _e('Some important meta keys: <br /><strong>rehub_review_overall_score</strong> - key for overall review score, <br /><strong>post_hot_count</strong> - hot or thumb counter, <br /><strong>post_user_average</strong> - user rating score(based on full review criterias), <br /><strong>rehub_views</strong> - post view counter', 'rehub_framework')?>\t\t\t\t\t\t\t\t\n\t\t</p>\t\t\n\t\t\n\t\t<hr style=\"margin: 30px 0\" />\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'titlefourth' ); ?>\"><?php _e('Enter title for fourth tab', 'rehub_framework'); ?></label>\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'titlefourth' ); ?>\" name=\"<?php echo $this->get_field_name( 'titlefourth' ); ?>\" value=\"<?php echo $instance['titlefourth']; ?>\" />\n\t\t</p>\n\t\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id('datefourth'); ?>\"><?php _e('Show posts for fourth tab published:', 'rehub_framework');?></label> \n\t\t<select id=\"<?php echo $this->get_field_id('datefourth'); ?>\" name=\"<?php echo $this->get_field_name('datefourth'); ?>\" style=\"width:100%;\">\n\t\t\t<option value='all' <?php if ( 'all' == $instance['datefourth'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('all time', 'rehub_framework');?></option>\n\t\t\t<option value='day' <?php if ( 'day' == $instance['datefourth'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last 24 hours', 'rehub_framework');?></option>\t\t\t\n\t\t\t<option value='week' <?php if ( 'week' == $instance['datefourth'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last 7 days', 'rehub_framework');?></option>\n\t\t\t<option value='month' <?php if ( 'month' == $instance['datefourth'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last month', 'rehub_framework');?></option>\n\t\t\t<option value='year' <?php if ( 'year' == $instance['datefourth'] ) : echo 'selected=\"selected\"'; endif; ?>><?php _e('For last year', 'rehub_framework');?></option>\n\t\t</select>\n\t\t</p>\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'metafourth' ); ?>\"><?php _e('Enter meta for fourth tab', 'rehub_framework'); ?></label>\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'metafourth' ); ?>\" name=\"<?php echo $this->get_field_name( 'metafourth' ); ?>\" value=\"<?php echo $instance['metafourth']; ?>\" />\t\t\t\n\t\t</p>\n\t\t<p style=\"font-style: italic;\">\n\t\t\t<?php _e('Some important meta keys: <br /><strong>rehub_review_overall_score</strong> - key for overall review score, <br /><strong>post_hot_count</strong> - hot or thumb counter, <br /><strong>post_user_average</strong> - user rating score(based on full review criterias), <br /><strong>rehub_views</strong> - post view counter', 'rehub_framework')?>\t\t\t\t\t\t\t\t\n\t\t</p>\t\t\n\t\t\t\t\t\t\t\t\n\t\t\n\t\t</div>\n\t<?php\n\t}", "public function form( $instance ) {\n\t\t$args = array_merge( $this->defaults, $instance );\n\t\textract( $args );\n\t\tinclude( 'templates/pblw-requirements-widget-settings.php' );\n }", "function createPluginConfig()\n {\n $form = $this->Form();\n $parent = $this->Forms()->findOneBy(array('name' => 'Interface'));\n $form->setParent($parent);\n\n $form->setElement('checkbox', 'fontawesome_add', array(\n 'label' => 'Fontawesome Icons über CDN einbinden?',\n 'value' => true,\n 'scope' => \\Shopware\\Models\\Config\\Element::SCOPE_SHOP,\n 'description' => 'Wenn aktiviert wird die Fontawesome Iconbibliothek welche für die Socialmedia Icons benötigt wird im header eingebunden'\n ));\n\n $form->setElement('checkbox', 'social_footer', array(\n 'label' => 'Socialmedia Icons im Footer einbinden?',\n 'value' => true,\n 'scope' => \\Shopware\\Models\\Config\\Element::SCOPE_SHOP,\n 'description' => 'Erzeugt einen Socialmedia Block unter dem Newsletter Bereich im Footer. Es werden Icons für alle Socialmedia kanäle erzeugt, für die eine URL hinterlegt ist.'\n ));\n\n $form->setElement('text', 'base_color', array(\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP, \n 'label' => 'Social Media Icon Grundfarbe',\n 'value' => '@brand-secondary',\n 'description' => 'Social Media Icon Grundfarbe'\n ));\n\n $form->setElement('text', 'fb_url', array(\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP, \n 'label' => 'Facebook URL',\n 'value' => '#',\n 'description' => 'Facebook URL'\n ));\n\n $form->setElement('text', 'fb_color', array(\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP, \n 'label' => 'Facebook Farbe Hover',\n 'value' => '#3b5998',\n 'description' => 'Facebook Farbe Hover'\n ));\n\n $form->setElement('text', 'tw_url', array(\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP, \n 'label' => 'Twitter URL',\n 'value' => '#',\n 'description' => 'Twitter URL'\n ));\n\n $form->setElement('text', 'tw_color', array(\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP, \n 'label' => 'Twitter Farbe Hover',\n 'value' => '#00aced',\n 'description' => 'Twitter Farbe Hover'\n ));\n\n $form->setElement('text', 'gp_url', array(\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP, \n 'label' => 'GooglePlus URL',\n 'value' => '#',\n 'description' => 'GooglePlus URL'\n ));\n\n $form->setElement('text', 'gp_color', array(\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP, \n 'label' => 'GooglePlus Farbe Hover',\n 'value' => '#dd4b39',\n 'description' => 'GooglePlus Farbe Hover'\n ));\n\n $form->setElement('text', 'yt_url', array(\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP, \n 'label' => 'YouTube URL',\n 'value' => '#',\n 'description' => 'YouTube URL'\n ));\n\n $form->setElement('text', 'yt_color', array(\n 'scope' => Shopware\\Models\\Config\\Element::SCOPE_SHOP, \n 'label' => 'Youtube Farbe Hover',\n 'value' => '#bb0000',\n 'description' => 'Youtube Farbe Hover'\n ));\n }", "function async_social_vk_form() {\n\n\t$form['sasync_social_vk_text'] = array(\n \t'#markup' => '<label for=\"vk-notice\">Please note:</label><div id=\"vk-notice\">\n \t<p>VK buttons don\\'t work without an API ID.<br />\n \tAnd at the same time the VK button language<br/>\n \tdepends on the language that is set for<br />\n \tthe VK account the API ID was created with.</p>\n \t<p>You may also pay attention at VK to set<br />\n \ta corresponding base domain during development<br />\n \tto test the button in your local environment<br />\n \tas well.</p></div>'\n\t);\n\t$form['async_social_vk_apiid'] = array(\n\t\t'#type' => 'textfield',\n\t\t'#title' => t('Mandatory: VK API ID'),\n\t\t'#description' => t('Enter a VK API ID. It\\'s mandatory to make the VK button work.'),\n\t\t'#default_value' => variable_get('async_social_vk_apiid', ''),\n\t);\n\n\treturn system_settings_form($form);\n}", "function form( $instance ) {\n\n\t\t$title = esc_attr($instance['title']);\n\n\t\trequire( 'inc/widget-fields.php' );\n\n\t}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Show Website'),\n 'name' => $this->mod_prefix.'SHOW_WEBSITE',\n 'is_bool' => true,\n 'desc' => $this->l('Show Website structured data'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Show')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Hide')\n )\n ),\n ),\n array(\n 'type'\t\t=> 'switch',\n 'label'\t\t=> $this->l('Show Website -> Sitelinks Searchbox '),\n 'name'\t\t=> $this->mod_prefix.'SHOW_WEBSITE_SEARCHBOX',\n 'is_bool'\t=> true,\n 'desc' \t\t=> $this->l('Show \"Website - Sitelinks Searchbox\" structured data?').'<br />'\n .$this->l('See:').'\n <a href=\"https://developers.google.com/search/docs/data-types/sitelinks-searchbox\" target=\"_blank\">\n https://developers.google.com/search/docs/data-types/sitelinks-searchbox\n </a>',\n 'values' \t=> array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Show')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Hide')\n )\n ),\n ),\n array(\n 'type' => 'separator',\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Show Organization'),\n 'name' => $this->mod_prefix.'SHOW_ORGANIZATION',\n 'is_bool' => true,\n 'desc' => $this->l('Show Organization structured data'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Show')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Hide')\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Show Organization -> Logo'),\n 'name' => $this->mod_prefix.'SHOW_ORGANIZATION_LOGO',\n 'is_bool' => true,\n 'desc' => $this->l('Show Organization Logo.').'<br />'\n .$this->l('See more at:').' <a href =\"https://developers.google.com/search/docs/data-types/logo\" target=\"_blank\">https://developers.google.com/search/docs/data-types/logo</a> '\n .$this->l('or').'<a href=\"https://schema.org/logo\" target=\"_blank\">https://schema.org/logo</a>',\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Show')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Hide')\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Show Organization -> Contact'),\n 'name' => $this->mod_prefix.'SHOW_ORGANIZATION_CONTACT',\n 'is_bool' => true,\n 'desc' => $this->l('Show Organization Contact structured data').'<br />'.$this->l('See more at:').' <a href=\"https://developers.google.com/search/docs/data-types/corporate-contact\">https://developers.google.com/search/docs/data-types/corporate-contact</a>',\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Show')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Hide')\n )\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('email address, if other than main').': '.Configuration::get('PS_SHOP_EMAIL'),\n 'name' => $this->mod_prefix.'ORGANIZATION_CONTACT_EMAIL',\n 'label' => $this->l('Email'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-phone\"></i>',\n 'desc' => $this->l('Organization telephone number (optional)'),\n 'name' => $this->mod_prefix.'ORGANIZATION_CONTACT_TELEPHONE',\n 'label' => $this->l('Telephone:'),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Show Organization -> Facebook page?'),\n 'name' => $this->mod_prefix.'SHOW_ORGANIZATION_FACEBOOK',\n 'is_bool' => true,\n 'desc' => $this->l('Show Facebook page URL in Organization structured data.'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Show')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Hide')\n )\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-facebook\"></i>',\n 'desc' => $this->l('Facebook page full URL eg.:').' https://www.facebook.com/YourPage',\n 'name' => $this->mod_prefix.'ORGANIZATION_FACEBOOK',\n 'label' => $this->l('Facebook Fan page URL:'),\n ),\n array(\n 'type' => 'separator',\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Show \"LocalBusiness\" data?'),\n 'name' => $this->mod_prefix.'SHOW_LOCALBUSINESS',\n 'is_bool' => true,\n 'desc' => $this->l('Show LocalBusiness structured data'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Show')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Hide')\n )\n ),\n ),\n array(\n 'type' => 'select',\n 'label' => $this->l('Select LocalBusiness type:'),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_TYPE',\n 'desc' => $this->l(''),\n 'required' => true,\n //'disabled' => true,\n //'class' => '',\n 'options' => array(\n 'query' => array(\n array(\n 'option_id' => 'Store',\n 'option_name' => 'Store'\n ),\n array(\n 'option_id' => 'LocalBusiness',\n 'option_name' => 'LocalBusiness'\n )\n ),\n 'id' => 'option_id',\n 'name' => 'option_name'\n )\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n // 'prefix' => '<i class=\"icon icon- \"></i>',\n // 'desc' => $this->l(''),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_STORENAME',\n 'label' => $this->l('Name of store:'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n // 'prefix' => '<i class=\"icon icon- \"></i>',\n 'desc' => $this->l('Short description of your business'),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_DESC',\n 'label' => $this->l('Description:'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n // 'prefix' => '<i class=\"icon icon- \"></i>',\n // 'desc' => $this->l(''),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_VAT',\n 'label' => $this->l('Tax id:'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-money\"></i>',\n 'desc' => $this->l('Range of products prices in this shop from min to max.'),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_PRANGE',\n 'label' => $this->l('Store price range:'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n //\t'prefix' => '<i class=\"icon icon-address-book\"></i>',\n // 'desc' => $this->l(''),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_STREET',\n 'label' => $this->l('Street:'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n // 'prefix' => '<i class=\"icon icon- \"></i>',\n // 'desc' => $this->l(''),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_COUNTRY',\n 'label' => $this->l('Country:'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n // 'prefix' => '<i class=\"icon icon- \"></i>',\n // 'desc' => $this->l(''),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_REGION',\n 'label' => $this->l('Region:'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n // 'prefix' => '<i class=\"icon icon- \"></i>',\n // 'desc' => $this->l(''),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_CODE',\n 'label' => $this->l('Postal code:'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n // 'prefix' => '<i class=\"icon icon- \"></i>',\n // 'desc' => $this->l(''),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_LOCALITY',\n 'label' => $this->l('Locality:'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-phone\"></i>',\n 'desc' => $this->l('telephone if other than main'),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_PHONE',\n 'label' => $this->l('Telephone:'),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Show priceRange?'),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_PRANGE_SHOW',\n 'is_bool' => true,\n 'desc' => $this->l('Show Localbusiness priceRange?'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Show')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Hide')\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Show \"LocalBusiness\" GPS lat , lon?'),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_GPS_SHOW',\n 'is_bool' => true,\n 'desc' => $this->l('Show LocalBusiness GPS?'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Show')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Hide')\n )\n ),\n ),\n array(\n 'col' => 1,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-map-marker\"></i>',\n // 'desc' => $this->l(''),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_GPS_LAT',\n 'label' => $this->l('GPS lat:'),\n ),\n array(\n 'col' => 1,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-map-marker\"></i>',\n // 'desc' => $this->l(''),\n 'name' => $this->mod_prefix.'LOCALBUSINESS_GPS_LON',\n 'label' => $this->l('GPS lon:'),\n ),\n ),\n // Submit form\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "public function form($instance){\n $title = (isset($instance['title']) && !empty($instance['title'])) ? apply_filters('widget_title',$instance['title']) : __('LP Widget Title','lp_weather');\n $unit = (isset($instance['unit']) && !empty($instance['unit'])) ? $instance['unit'] : 'celsius';\n require(LP_WEATHER_PLUGIN_DIR.'views/lp-weather-widget-form.php');\n }", "function form( $instance ) \r\n {\r\n $defaults = array( 'title' => __('OptinSkin', 'OptinSkin'));\r\n $instance = wp_parse_args( (array) $instance, $defaults );\r\n $instance_key = uniqid();\r\n?>\r\n\r\n <style type=\"text/css\">\r\n \t.ois_admin_widget_title {\r\n font-size:15px;\r\n padding: 0 0 7px 0px;\r\n }\r\n .ois_admin_widget {\r\n max-width: 250px;\r\n }\r\n .ois_widget_selection {\r\n min-width: 200px;\r\n }\r\n .ois_admin_widget p {\r\n max-width: 250px;\r\n }\r\n </style>\r\n <div class=\"ois_admin_widget\">\r\n <h3 style=\"padding-top: 0;margin-top:10px;\">Basic Settings</h3>\r\n <div class=\"ois_admin_widget_title\">\r\n Skin to Display:\r\n </div><select class=\"ois_widget_selection\" name=\"<?php echo $this->get_field_name( 'skin' ); ?>\">\r\n <?php\r\n $skins = get_option('ois_skins');\r\n foreach ($skins as $id=>$skin) {\r\n echo '<option value=\"' . $id . '\"';\r\n if (isset($instance['skin']) && $instance['skin'] == $id) {\r\n echo ' selected=\"selected\" ';\r\n } // if\r\n echo '>' . $skin['title'] . '</option>';\r\n } // foreach\r\n ?>\r\n </select>\r\n <hr>\r\n <h3>Split-Testing <span style=\"font-weight:normal;\">(Optional)</span></h3>\r\n\r\n <p><input class=\"ois_widget_split\" id=\"<?php echo $instance_key; ?>_split\" type=\"checkbox\" name=\"<?php echo $this->get_field_name( 'split-test' ); ?>\" <?php if ($instance['split-test'] == 'yes') {\r\n echo ' checked=\"checked\" ';\r\n }?> value=\"yes\"> <span style=\"font-size:13px;\">I want to split-test this widget</span></p>\r\n\r\n <div id=\"<?php echo $instance_key; ?>_selection\" style=\"padding: 2px 0 8px 0;\">\r\n <div class=\"ois_admin_widget_title\">\r\n Alternate Skin:\r\n </div><select class=\"ois_widget_selection\" name=\"<?php echo $this->get_field_name( 'skin-b' ); ?>\">\r\n <?php\r\n foreach ($skins as $id=>$skin) {\r\n echo '<option value=\"' . $id . '\"';\r\n if (isset($instance['skin-b']) && $instance['skin-b'] == $id) {\r\n echo ' selected=\"selected\" ';\r\n } // if\r\n echo '>' . $skin['title'] . '</option>';\r\n }\r\n ?>\r\n </select>\r\n </div>\r\n\r\n <p style=\"border: 1px solid #e0e0e0; padding: 7px;&lt;?php\r\n ?&gt;\" id=\"<?php echo $instance_key; ?>_info\">If split-testing is enabled, the widget will either show the first or second skin, based on a random algorithm.</p>\r\n </div><?php\r\n }", "public function configure()\n {\n if (sfContext::getInstance()->getModuleName() == 'file') {\n unset($this['judge_id'], $this['result'], $this['instruction'], \n $this['user_file_id'], $this['court_note_id'], $this['coordinator_id'],\n $this['barrister_id'], $this['appearing_type_id']/*, $this['appearing_id']*/\n );\n \n $this->widgetSchema['appearing_id']->setOption('method', 'obtainFullName');\n $this->widgetSchema['appearing_id']->setOption('table_method', 'getSolicitorsCB');\n \n $this->widgetSchema['court_id']->setAttribute('style', 'width:200px');\n $this->widgetSchema['listing_id']->setAttribute('style', 'width:150px');\n }\n else {\n //unset($this['coordinator_id']);\n $this->widgetSchema['result']->setAttributes(array('cols' => '70', 'rows' => '12'));\n $this->widgetSchema['user_file_id']->setOption('method', 'getClientName');\n $this->widgetSchema['court_note_id']->setLabel('Note');\n \n $this->widgetSchema['instruction'] = new sfWidgetFormTextarea(array(), array('cols' => '70', 'rows' => '4'));\n \n $this->widgetSchema['judge_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => $this->getRelatedModelName('Judge'), \n 'form_module' => 'judge', \n 'add_empty' => true,\n 'method' => 'obtainFullName',\n 'table_method' => 'getJudgesCB'\n ));\n \n $this->widgetSchema['judge_id']->setLabel('Before');\n $this->validatorSchema['judge_id']->setOption('required', false);\n //$this->widgetSchema['judge_id']->setOption('method', 'obtainFullName');\n //$this->widgetSchema['judge_id']->setOption('table_method', 'getJudgesCB');\n \n $this->widgetSchema['appearing_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => $this->getRelatedModelName('Appearing'), \n 'form_module' => 'user?_frm=MyAccount', \n 'add_empty' => true,\n 'method' => 'obtainFullName',\n 'table_method' => 'getSolicitorsCB'\n ));\n \n // added by William, 26/05/2013: add barrister\n $this->widgetSchema['barrister_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => $this->getRelatedModelName('Barrister'), \n 'form_module' => 'user?_frm=MyAccount', \n 'add_empty' => true,\n 'method' => 'obtainFullName',\n 'table_method' => 'getBarristersCB'\n ));\n \n //$this->widgetSchema['appearing_id']->setOption('method', 'obtainFullName');\n //$this->widgetSchema['appearing_id']->setOption('table_method', 'getSolicitorsCB');\n \n // for the add/edit button widget\n if (!sfContext::getInstance()->getRequest()->getParameter('shbx') ) {\n $this->widgetSchema['court_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => 'Agency', \n 'form_module' => 'agency?code=COU', \n 'add_empty' => true,\n ));\n }\n \n // for the add/edit button widget\n //if (!sfContext::getInstance()->getRequest()->getParameter('shbx') ) {\n $this->widgetSchema['listing_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => 'Listing', \n 'form_module' => 'listing', \n 'add_empty' => true,\n 'order_by' => array('name', 'asc') \n ));\n \n $this->widgetSchema['court_note_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => 'CourtNote', \n 'form_module' => 'courtNote', \n 'add_empty' => true,\n 'method' => 'getValue',\n 'order_by' => array('value', 'asc') \n ));\n //}\n \n $this->hideField('user_file_id');\n \n $this->addFee();\n $this->widgetSchema['Fee']->setLabel(false);\n }\n \n // add class to year to validate past dates\n $this->widgetSchema['date']->setAttribute('class', 'validateYear');\n\n // set method to load values to show\n $this->widgetSchema['court_id']->setOption('table_method', 'getCourtsCB');\n \n //$this->widgetSchema['coordinator_id']->setOption('method', 'obtainFullName');\n //$this->widgetSchema['coordinator_id']->setOption('table_method', 'getCoordinatorsCB');\n \n if (sfContext::getInstance()->getModuleName() == 'file') {\n // remove emptys\n $this->widgetSchema['court_id']->setOption('add_empty', false);\n }\n \n // sort some dropboxes\n $this->widgetSchema['listing_id']->addOption('order_by', array('name', 'asc'));\n \n // adding some extra validators\n //$this->widgetSchema['time'] = new sfWidgetFormTime();\n $this->widgetSchema['time'] = $this->formattedWidgetFormTime();\n $this->validatorSchema['time'] = new sfValidatorTime(array('required' => false));\n $this->validatorSchema['court_id']->setOption('required', true);\n \n /*$this->validatorSchema->setPostValidator(\n new sfValidatorCallback(array('callback' => array($this, 'setSpecialValues')))\n );*/\n $this->validatorSchema->setPostValidator(new sfValidatorAnd(array(\n new sfValidatorCallback(array('callback' => array($this, 'setSpecialValues'))),\n new sfValidatorCallback(array('callback' => array($this, 'setSpecialFeeValues')))\n )));\n \n // adding asterisk for required fields\n $this->setAsteriskForRequiredFields();\n \n // this formatting is applied only if form is called directly, without admin generator templates\n $first = ($this->getOption('first') !== null) ? $this->getOption('first') : false;\n $custom_decorator = new ExtendedFormSchemaFormatter($this->getWidgetSchema(), array('header' => $first));\n $this->widgetSchema->addFormFormatter('Myformatter', $custom_decorator);\n $this->widgetSchema->setFormFormatterName('Myformatter');\n }", "function form( $instance ) {\n\n\t\t/* Set up some default widget settings. */\n\t\t$defaults = array(\n\t\t\n\t\t 'title' => '',\n\t\t\n\t\t 'text_widget' => '<strong>4 Children</strong> is charitable organization dedicated to the children.',\n\t\t\t'textone_widget' => 'Organization is estamblish in early 1985. Proactively envisioned multimedia based expertise and cross-media growth strategies.',\n\t\t\t'texttwo_widget' => 'Seamlessly visualize quality intellectual capital without superior collaboration and idea-sharing. Holistically pontificate installed base portals after maintainable products.'\n\t\t\n\t\t);\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n<!-- Widget Title: Text Input -->\n<p>\n <label for=\"<?php echo $this->get_field_id( 'title' ); ?>\">\n <?php _e('Title:', 'anariel') ?>\n </label>\n <input type=\"text\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" />\n</p>\n<hr>\n<p>\n <label for=\"<?php echo $this->get_field_id( 'text_widget' ); ?>\">\n <?php _e('First Sentence:', 'anariel') ?>\n </label>\n <textarea type=\"text\" id=\"<?php echo $this->get_field_id( 'text_widget' ); ?>\" name=\"<?php echo $this->get_field_name( 'text_widget' ); ?>\"><?php echo $instance['text_widget']; ?></textarea>\n</p>\n<p>\n <label for=\"<?php echo $this->get_field_id( 'textone_widget' ); ?>\">\n <?php _e('Second Sentence:', 'anariel') ?>\n </label>\n <textarea type=\"text\" id=\"<?php echo $this->get_field_id( 'textone_widget' ); ?>\" name=\"<?php echo $this->get_field_name( 'textone_widget' ); ?>\"><?php echo $instance['textone_widget']; ?></textarea>\n</p>\n<p>\n <label for=\"<?php echo $this->get_field_id( 'texttwo_widget' ); ?>\">\n <?php _e('Third Sentence:', 'anariel') ?>\n </label>\n <textarea type=\"text\" id=\"<?php echo $this->get_field_id( 'texttwo_widget' ); ?>\" name=\"<?php echo $this->get_field_name( 'texttwo_widget' ); ?>\"><?php echo $instance['texttwo_widget']; ?></textarea>\n</p>\n\n<?php\n\t}", "function form( $instance ) {\n\n\t// Set up some default widget settings\n\t$defaults = array(\n\t\t'title' => '',\n\t\t'ad' => get_template_directory_uri().\"/images/300x250.gif\",\n\t\t'link' => 'http://mythemeshop.com/',\n\t);\n\t\n\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n\t<!-- Widget Title: Text Input -->\n\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'framework') ?></label>\n\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" />\n\t</p>\n\n\t<!-- Ad image url: Text Input -->\n\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id( 'ad' ); ?>\"><?php _e('Ad image url:', 'framework') ?></label>\n\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'ad' ); ?>\" name=\"<?php echo $this->get_field_name( 'ad' ); ?>\" value=\"<?php echo $instance['ad']; ?>\" />\n\t</p>\n\t\n\t<!-- Ad link url: Text Input -->\n\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id( 'link' ); ?>\"><?php _e('Ad link url:', 'framework') ?></label>\n\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'link' ); ?>\" name=\"<?php echo $this->get_field_name( 'link' ); ?>\" value=\"<?php echo $instance['link']; ?>\" />\n\t</p>\n\t\n\t<?php\n\t}", "function form($instance) {\n\t\n\t // Set any uninitialized args to default values\n $instance = wp_parse_args( (array) $instance, \n array( 'widget_title' => $this->defaults['widget_title'],\n 'upcoming_number' => $this->defaults['upcoming_number'],\n 'include_author' => $this->defaults['include_author'],\n 'upcoming_title' => $this->defaults['upcoming_title'],\n 'grab_by_tag' => $this->defaults['grab_by_tag'],\n 'upcoming_tag_slug' => $this->defaults['upcoming_tag_slug'],\n 'upcoming_post_type' => $this->defaults['upcoming_post_type'] ) );\n \n // Get values \n $widget_title = esc_attr($instance['widget_title']);\n\t\t$upcoming_number = absint($instance['upcoming_number']);\n $include_author = (bool) $instance['include_author'];\t\t\n $upcoming_title = esc_attr($instance['upcoming_title']); \n $grab_by_tag = (bool) $instance['grab_by_tag']; \n $upcoming_tag_slug = esc_attr($instance['upcoming_tag_slug']);\n\t\t$upcoming_post_type = esc_attr($instance['upcoming_post_type']);\n\t\t\n\t\t\n\t\t// Widget Title\n $output_widget_title = '<label for=\"' . $this->get_field_name('widget_title') . \n '\">' . __('Widget Title: ');\t\t\n\t\t$output_widget_title .= \"<input id='{$this->get_field_id('widget_title')}' name='{$this->get_field_name('widget_title')}'\";\n\t $output_widget_title .= \"type='text' value='{$widget_title}' />\";\n\t $output_widget_title .= '</label>';\n\t \n\t\t\n\t\t// Number of posts to list\n $output_upcoming_number = '<label for=\"' . $this->get_field_name('upcoming_number') . \n '\">' . __('Number of posts to display: ');\n $output_upcoming_number .= '<select id=\"' . $this->get_field_id('upcoming_number') . \n '\" name=\"' . $this->get_field_name('upcoming_number') . '\"> ';\n for( $i = 1; $i <=10; ++$i ){\n $selected = ($upcoming_number == $i ? ' selected=\"selected\"' : '' );\n $output_upcoming_number .= '<option value=\"' . $i . '\"' . $selected . '>' . $i . '</option>';\n }\t\t\n $output_upcoming_number .= '</label></select></p>';\t\n\t\t\n\t\t\n // Include Author\n $output_include_author = '<label for=\"' . $this->get_field_id('include_author') .'\">';\n $output_include_author .= '<input type=\"checkbox\" id=\"' . $this->get_field_id('include_author') . \n '\" name=\"' . $this->get_field_name('include_author') . '\"';\n if( $include_author ){\n $output_include_author .= ' checked=\"checked\" ';\n }\n $output_include_author .= '/>' . __('Include Author? ');\n $output_include_author .= '</label>';\t\n \n\t\t// Default Post Title\n $output_upcoming_title = '<label for=\"' . $this->get_field_name('upcoming_title') . \n '\">' . __('Default Post Title: ') ;\t\t\n\t\t$output_upcoming_title .= \"<input id='{$this->get_field_id('upcoming_title')}' \" . \n\t\t \"name='{$this->get_field_name('upcoming_title')}'\" . \n\t\t \"type='text' value='{$upcoming_title}' />\";\n\t $output_upcoming_title .= \"</label>\";\t \n\t \n // Grab by tag\n $output_grab_by_tag = '<label for=\"' . $this->get_field_id('grab_by_tag ') . '\">';\n $output_grab_by_tag .= '<input type=\"checkbox\" id=\"' . $this->get_field_id('grab_by_tag') . \n '\" name=\"' . $this->get_field_name('grab_by_tag') . '\"';\n if( $grab_by_tag ){\n $output_grab_by_tag .= ' checked=\"checked\" ';\n }\n $output_grab_by_tag .= '/>' . __('Grab drafts by tag? ');\n $output_grab_by_tag .= '</label>';\t\n\t \n\t\t// Default Tag slug\n $output_upcoming_tag_slug = \"<label for={$this->get_field_name('upcoming_tag_slug')}\" . \n \"'>\" . __('Draft Tag Slug: ');\t\t\n\t\t$output_upcoming_tag_slug .= \"<input id='{$this->get_field_id('upcoming_tag_slug')}' \" . \n \t\t \"name='{$this->get_field_name('upcoming_tag_slug')}'\" . \n\t \t \"type='text' value='{$upcoming_tag_slug}' />\";\n\t $output_upcoming_tag_slug .= \"</label>\";\t \t \n \n \n \n // Draft or Scheduled posts\n $output_upcoming_post_type = '<label for=\"' . $this->get_field_name('upcoming_post_type') . \n '\">' . __('Draft or Scheduled post? <br />');\t\t\n if( 0 == strcmp( 'draft', $upcoming_post_type ) ){ \n\t\t $output_upcoming_post_type .= \"<input type='radio' id='{$this->get_field_id('upcoming_post_type')}'\" . \n\t \" name='{$this->get_field_name('upcoming_post_type')}'\" . \n\t \" value='draft' checked='checked' />Draft\";\n\t\t $output_upcoming_post_type .= \"<input type='radio' id='{$this->get_field_id('upcoming_post_type')}'\" . \n\t \" name='{$this->get_field_name('upcoming_post_type')}'\" . \n\t \" value='future' />Scheduled\";\n\t \n } else {\n\t\t $output_upcoming_post_type .= \"<input type='radio' id='{$this->get_field_id('upcoming_post_type')}'\" . \n\t \" name='{$this->get_field_name('upcoming_post_type')}'\" . \n\t \" value='draft' />Draft\"; \n\t\t $output_upcoming_post_type .= \"<input type='radio' id='{$this->get_field_id('upcoming_post_type')}'\" . \n\t \" name='{$this->get_field_name('upcoming_post_type')}'\" . \n\t \" value='future' checked='checked' />Scheduled\";\n }\n\t $output_upcoming_post_type .= \"</label>\";\t\n\n\n\n // Output the form\n echo \"<p>$output_widget_title</p>\";\n echo \"<p>$output_upcoming_number\" . \"$output_include_author</p>\";\n echo \"<p>$output_upcoming_post_type</p>\";\n echo \"<p>$output_upcoming_title</p>\";\n echo \"<p>$output_grab_by_tag</p>\";\n echo \"<p>$output_upcoming_tag_slug<p>\";\n\t\n\t}", "public function hookConfigForm() {\n\t\trequire IIIF_API_BRIDGE_DIRECTORY . '/config_form.php';\n\t}", "function form( $instance ) {\n\t\t\t/* Set up some default widget settings. */\n \t\t$instance = wp_parse_args( (array) $instance, array( 'type' => 'news', 'rsr-id' => 'rsr', 'type-text' => '') );\n\t\t\tinclude \"templates/single_post_widget.php\";\n\t\t}", "public abstract function settingsForm(array $pluginInfo);", "public function form( $instance ) { \n\t\t/* Set up default widget settings. */ \n\t\t$defaults = array( 'title' => '', 'size' => '32', 'icon_shape' => 'round', 'facebook' => '', 'twitter' => '', 'instagram' => '', 'parler' => '', 'pinterest' => '', 'behance' => '', 'flickr' => '', 'foursquare' => '', 'github' => '', 'linkedin' => '', 'linkedin_company' => '', 'medium' => '', 'mewe' => '', 'odnoklassniki' => '', 'snapchat' => '', 'telegram' => '', 'tumblr' => '', 'vimeo' => '', 'vkontakte' => '', 'xing' => '', 'youtube' => '', 'youtube_channel' => '', 'rss_feed' => '', 'before_widget_content' => '', 'after_widget_content' => '' ); \n\n\t\tforeach( $instance as $key => $value ) { \n\t\t\tif ( is_string( $value ) ) {\n\t\t\t\t$instance[ $key ] = esc_attr( $value ); \n\t\t\t}\n\t\t}\n\n\t\t$instance = wp_parse_args( (array)$instance, $defaults ); \n\t\t?> \n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\"><?php _e( 'Before widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'before_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['before_widget_content']; ?>\" /><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" type=\"text\" value=\"<?php echo $instance['title']; ?>\" /><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'size' ); ?>\"><?php _e( 'Size of icons', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 82%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'size' ); ?>\" name=\"<?php echo $this->get_field_name( 'size' ); ?>\" type=\"text\" value=\"<?php echo $instance['size']; ?>\" />pixels<br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'icon_shape' ); ?>\"><?php _e( 'Icon Shape', 'super-socializer' ); ?></label> \n\t\t\t<select style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'icon_shape' ); ?>\" name=\"<?php echo $this->get_field_name( 'icon_shape' ); ?>\">\n\t\t\t\t<option value=\"round\" <?php echo !isset($instance['icon_shape']) || $instance['icon_shape'] == 'round' ? 'selected' : '' ; ?>><?php _e( 'Round', 'super-socializer' ); ?></option>\n\t\t\t\t<option value=\"square\" <?php echo isset($instance['icon_shape']) && $instance['icon_shape'] == 'square' ? 'selected' : '' ; ?>><?php _e( 'Square', 'super-socializer' ); ?></option>\n\t\t\t</select><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'facebook' ); ?>\"><?php _e( 'Facebook URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'facebook' ); ?>\" name=\"<?php echo $this->get_field_name( 'facebook' ); ?>\" type=\"text\" value=\"<?php echo $instance['facebook']; ?>\" /><br/>\n\t\t\t<span>https://www.facebook.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'twitter' ); ?>\"><?php _e( 'Twitter URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'twitter' ); ?>\" name=\"<?php echo $this->get_field_name( 'twitter' ); ?>\" type=\"text\" value=\"<?php echo $instance['twitter']; ?>\" /><br/>\n\t\t\t<span>https://twitter.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'parler' ); ?>\"><?php _e( 'Parler URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'parler' ); ?>\" name=\"<?php echo $this->get_field_name( 'parler' ); ?>\" type=\"text\" value=\"<?php echo $instance['parler']; ?>\" /><br/>\n\t\t\t<span>https://parler.com/profile/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'instagram' ); ?>\"><?php _e( 'Instagram URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'instagram' ); ?>\" name=\"<?php echo $this->get_field_name( 'instagram' ); ?>\" type=\"text\" value=\"<?php echo $instance['instagram']; ?>\" /><br/>\n\t\t\t<span>https://www.instagram.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'pinterest' ); ?>\"><?php _e( 'Pinterest URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'pinterest' ); ?>\" name=\"<?php echo $this->get_field_name( 'pinterest' ); ?>\" type=\"text\" value=\"<?php echo $instance['pinterest']; ?>\" /><br/>\n\t\t\t<span>https://www.pinterest.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'behance' ); ?>\"><?php _e( 'Behance URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'behance' ); ?>\" name=\"<?php echo $this->get_field_name( 'behance' ); ?>\" type=\"text\" value=\"<?php echo $instance['behance']; ?>\" /><br/>\n\t\t\t<span>https://www.behance.net/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'flickr' ); ?>\"><?php _e( 'Flickr URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'flickr' ); ?>\" name=\"<?php echo $this->get_field_name( 'flickr' ); ?>\" type=\"text\" value=\"<?php echo $instance['flickr']; ?>\" /><br/>\n\t\t\t<span>https://www.flickr.com/photos/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'foursquare' ); ?>\"><?php _e( 'Foursquare URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'foursquare' ); ?>\" name=\"<?php echo $this->get_field_name( 'foursquare' ); ?>\" type=\"text\" value=\"<?php echo $instance['foursquare']; ?>\" /><br/>\n\t\t\t<span>https://foursquare.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'github' ); ?>\"><?php _e( 'Github URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'github' ); ?>\" name=\"<?php echo $this->get_field_name( 'github' ); ?>\" type=\"text\" value=\"<?php echo $instance['github']; ?>\" /><br/>\n\t\t\t<span>https://github.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'linkedin' ); ?>\"><?php _e( 'LinkedIn URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'linkedin' ); ?>\" name=\"<?php echo $this->get_field_name( 'linkedin' ); ?>\" type=\"text\" value=\"<?php echo $instance['linkedin']; ?>\" /><br/>\n\t\t\t<span>https://www.linkedin.com/in/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'linkedin_company' ); ?>\"><?php _e( 'LinkedIn Company URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'linkedin_company' ); ?>\" name=\"<?php echo $this->get_field_name( 'linkedin_company' ); ?>\" type=\"text\" value=\"<?php echo $instance['linkedin_company']; ?>\" /><br/>\n\t\t\t<span>https://www.linkedin.com/company/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'medium' ); ?>\"><?php _e( 'Medium URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'medium' ); ?>\" name=\"<?php echo $this->get_field_name( 'medium' ); ?>\" type=\"text\" value=\"<?php echo $instance['medium']; ?>\" /><br/>\n\t\t\t<span>https://medium.com/@ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'mewe' ); ?>\"><?php _e( 'MeWe URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'mewe' ); ?>\" name=\"<?php echo $this->get_field_name( 'mewe' ); ?>\" type=\"text\" value=\"<?php echo $instance['mewe']; ?>\" /><br/>\n\t\t\t<span>https://mewe.com/profile/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'odnoklassniki' ); ?>\"><?php _e( 'Odnoklassniki URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'odnoklassniki' ); ?>\" name=\"<?php echo $this->get_field_name( 'odnoklassniki' ); ?>\" type=\"text\" value=\"<?php echo $instance['odnoklassniki']; ?>\" /><br/>\n\t\t\t<span>https://ok.ru/profile/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'snapchat' ); ?>\"><?php _e( 'Snapchat URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'snapchat' ); ?>\" name=\"<?php echo $this->get_field_name( 'snapchat' ); ?>\" type=\"text\" value=\"<?php echo $instance['snapchat']; ?>\" /><br/>\n\t\t\t<span>https://www.snapchat.com/add/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'telegram' ); ?>\"><?php _e( 'Telegram URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'telegram' ); ?>\" name=\"<?php echo $this->get_field_name( 'telegram' ); ?>\" type=\"text\" value=\"<?php echo $instance['telegram']; ?>\" /><br/>\n\t\t\t<span>https://t.me/username</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'tumblr' ); ?>\"><?php _e( 'Tumblr URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'tumblr' ); ?>\" name=\"<?php echo $this->get_field_name( 'tumblr' ); ?>\" type=\"text\" value=\"<?php echo $instance['tumblr']; ?>\" /><br/>\n\t\t\t<span>https://ID.tumblr.com</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'vimeo' ); ?>\"><?php _e( 'Vimeo URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'vimeo' ); ?>\" name=\"<?php echo $this->get_field_name( 'vimeo' ); ?>\" type=\"text\" value=\"<?php echo $instance['vimeo']; ?>\" /><br/>\n\t\t\t<span>https://vimeo.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'vkontakte' ); ?>\"><?php _e( 'Vkontakte URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'vkontakte' ); ?>\" name=\"<?php echo $this->get_field_name( 'vkontakte' ); ?>\" type=\"text\" value=\"<?php echo $instance['vkontakte']; ?>\" /><br/>\n\t\t\t<span>https://vk.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'xing' ); ?>\"><?php _e( 'Xing URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'xing' ); ?>\" name=\"<?php echo $this->get_field_name( 'xing' ); ?>\" type=\"text\" value=\"<?php echo $instance['xing']; ?>\" /><br/>\n\t\t\t<span>https://www.xing.com/profile/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'youtube' ); ?>\"><?php _e( 'Youtube URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'youtube' ); ?>\" name=\"<?php echo $this->get_field_name( 'youtube' ); ?>\" type=\"text\" value=\"<?php echo $instance['youtube']; ?>\" /><br/>\n\t\t\t<span>https://www.youtube.com/user/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'youtube_channel' ); ?>\"><?php _e( 'Youtube Channel URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'youtube_channel' ); ?>\" name=\"<?php echo $this->get_field_name( 'youtube_channel' ); ?>\" type=\"text\" value=\"<?php echo $instance['youtube_channel']; ?>\" /><br/>\n\t\t\t<span>https://www.youtube.com/channel/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'rss_feed' ); ?>\"><?php _e( 'RSS Feed URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'rss_feed' ); ?>\" name=\"<?php echo $this->get_field_name( 'rss_feed' ); ?>\" type=\"text\" value=\"<?php echo $instance['rss_feed']; ?>\" /><br/>\n\t\t\t<span>http://www.example.com/feed/</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\"><?php _e( 'After widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'after_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['after_widget_content']; ?>\" /> \n\t\t</p> \n<?php \n }", "function form( $instance ) {\r\n /* Set up some default widget settings. */\r\n $defaults = array(\r\n 'title' => '热门文章',\r\n 'type' => 'hot',\r\n 'style' => 'image',\r\n 'limit' => '5',\r\n );\r\n $instance = wp_parse_args( (array) $instance, $defaults ); ?>\r\n <!-- widget title: -->\r\n <p>\r\n <label for=\"<?php echo $this->get_field_id( 'title' ); ?>\">显示标题</label>\r\n <input type=\"text\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:100%;\" />\r\n </p>\r\n <!-- type -->\r\n <p>\r\n <label for=\"<?php echo $this->get_field_id( 'type' ); ?>\">类型</label>\r\n <select id=\"<?php echo $this->get_field_id( 'type' ); ?>\" name=\"<?php echo $this->get_field_name( 'type' ); ?>\" class=\"widefat\" style=\"width:100%;\">\r\n <option value=\"hot\" <?php if ( 'hot' == $instance['type'] ) echo 'selected=\"selected\"'; ?>>热门</option>\r\n <option value=\"random\" <?php if ( 'random' == $instance['type'] ) echo 'selected=\"selected\"'; ?>>随机</option>\r\n <option value=\"comment\" <?php if ( 'comment' == $instance['type'] ) echo 'selected=\"selected\"'; ?>>评论数</option>\r\n </select>\r\n </p>\r\n <!-- style -->\r\n <p>\r\n <label for=\"<?php echo $this->get_field_id( 'style' ); ?>\">样式</label>\r\n <select id=\"<?php echo $this->get_field_id( 'style' ); ?>\" name=\"<?php echo $this->get_field_name( 'style' ); ?>\" class=\"widefat\" style=\"width:100%;\">\r\n <option value=\"image\" <?php if ( 'image' == $instance['style'] ) echo 'selected=\"selected\"'; ?>>图片</option>\r\n <option value=\"side\" <?php if ( 'side' == $instance['style'] ) echo 'selected=\"selected\"'; ?>>侧边图片</option>\r\n <option value=\"brief\" <?php if ( 'brief' == $instance['style'] ) echo 'selected=\"selected\"'; ?>>简约</option>\r\n </select>\r\n </p>\r\n <!-- limit -->\r\n <p>\r\n <label for=\"<?php echo $this->get_field_id( 'limit' ); ?>\">显示数量</label>\r\n <input type=\"number\" id=\"<?php echo $this->get_field_id( 'limit' ); ?>\" name=\"<?php echo $this->get_field_name( 'limit' ); ?>\" value=\"<?php echo $instance['limit']; ?>\" style=\"width:100%;\" />\r\n </p>\r\n <!-- Sex: Select Box -->\r\n <?php\r\n }", "function form( $instance ) {\n\t\n\t\t/* Set up some default widget settings. */\n\t\t$defaults = array(\n\t\t\t'api_id' => '',\n\t\t\t'location_id' => '',\n\t\t\t'weather_unit' => 'metric'\t\t\t\n\t\t);\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'api_id' ); ?>\"><?php _e('API-Key:', 'makakken') ?></label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'api_id' ); ?>\" name=\"<?php echo $this->get_field_name( 'api_id' ); ?>\" value=\"<?php echo $instance['api_id']; ?>\" />\n\t\t\t<?php _e( 'API-Key openweathermap.org.', 'makakken' ); ?>\n\t\t</p>\t\t\n\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'location_id' ); ?>\"><?php _e('Location ID:', 'makakken') ?></label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'location_id' ); ?>\" name=\"<?php echo $this->get_field_name( 'location_id' ); ?>\" value=\"<?php echo $instance['location_id']; ?>\" />\n\t\t\t<?php _e( 'Location ID from openweathermap.org', 'makakken' ); ?>\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'unit' ); ?>\"><?php _e('Weather unit:', 'makakken') ?></label>\t\t\t\n\t\t\t<select name=\"<?php echo $this->get_field_name('weather_unit'); ?>\" id=\"<?php echo $this->get_field_id('weather_unit'); ?>\" class=\"widefat\">\n\t\t\t\t<option value=\"metric\"<?php selected( $instance['weather_unit'], 'metric' ); ?>><?php _e('Celsius', 'makakken'); ?></option>\n\t\t\t\t<option value=\"imperial\"<?php selected( $instance['weather_unit'], 'imperial' ); ?>><?php _e('Fahrenheit', 'makakken'); ?></option>\n\t\t\t</select>\n\t\t\t\n\t\t</p>\n\t<?php\n\t}", "public function form( $instance ) {\n $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );\n $divider = $instance['divider']; \n \n // PART 2-3: Display the fields\n ?>\n \n <!-- PART 3: Widget City field START -->\n <p>\n <label for=\"<?php echo $this->get_field_id('text'); ?>\">Divider Type: \n <select class='widefat' id=\"<?php echo $this->get_field_id('divider'); ?>\"\n name=\"<?php echo $this->get_field_name('divider'); ?>\" type=\"text\">\n <option value='Solid'<?php echo ($divider=='Solid')?'selected':''; ?>>\n Solid\n </option>\n <option value='Dotted'<?php echo ($divider=='Dotted')?'selected':''; ?>>\n Dotted\n </option> \n <option value='Dashed'<?php echo ($divider=='Dashed')?'selected':''; ?>>\n Dashed\n </option> \n </select> \n </label>\n </p>\n <!-- Widget City field END -->\n \n <?php\n }", "function form( $instance ) {\r\n\r\n\t\t/* Set up some default widget settings. */\r\n\t\t$defaults = array( 'title' => 'Recent Posts' );\r\n\t\t$instance = wp_parse_args( (array) $instance, $defaults );?>\r\n\t\t<!-- Widget Title: Text Input -->\r\n\t\t<p>\r\n\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'hybrid'); ?></label>\r\n\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:100%;\" />\r\n <p><label for=\"cat\">Select a category to display</label><?php wp_dropdown_categories( array('selected'=>$instance['category'], 'name'=>$this->get_field_name('category')) );?>\r\n\t\t</p>\r\n\r\n\t<?php\r\n\t}", "public function dashboard_widget() {\n global $wpdb;\n\n // Get the date/time format that is saved in the options table\n $date_format = get_option('date_format');\n $time_format = get_option('time_format');\n\n $widgets = get_option('swpm_dashboard_widget_options');\n $total_items = isset($widgets['swpm_dashboard_recent_entries']) && isset($widgets['swpm_dashboard_recent_entries']['items']) ?\n absint($widgets['swpm_dashboard_recent_entries']['items']) : 5;\n\n $forms = $wpdb->get_var(\"SELECT COUNT(*) FROM {$this->form_table_name}\");\n\n if (!$forms) :\n echo sprintf(\n '<p>%1$s <a href=\"%2$s\">%3$s</a></p>', __('You currently do not have any forms.', 'swpm-form-builder'), esc_url(admin_url('admin.php?page=swpm-add-new')), __('Get started!', 'swpm-form-builder')\n );\n\n return;\n endif;\n\n $entries = $wpdb->get_results($wpdb->prepare(\"SELECT forms.form_title, entries.entries_id, entries.form_id, \"\n . \"entries.sender_name, entries.sender_email, entries.date_submitted FROM $this->form_table_name \"\n . \"AS forms INNER JOIN $this->entries_table_name AS entries ON entries.form_id = forms.form_id ORDER BY \"\n . \"entries.date_submitted DESC LIMIT %d\", $total_items));\n\n if (!$entries) :\n echo sprintf('<p>%1$s</p>', __('You currently do not have any entries.', 'swpm-form-builder'));\n else :\n\n $content = '';\n\n foreach ($entries as $entry) :\n\n $content .= sprintf(\n '<li><a href=\"%1$s\">%4$s</a> via <a href=\"%2$s\">%5$s</a> <span class=\"rss-date\">%6$s</span><cite>%3$s</cite></li>', esc_url(add_query_arg(array('action' => 'view', 'entry' => absint($entry->entries_id)), admin_url('admin.php?page=swpm-entries'))), esc_url(add_query_arg('form-filter', absint($entry->form_id), admin_url('admin.php?page=swpm-entries'))), esc_html($entry->sender_name), esc_html($entry->sender_email), esc_html($entry->form_title), date(\"$date_format $time_format\", strtotime($entry->date_submitted))\n );\n\n endforeach;\n\n echo \"<div class='rss-widget'><ul>$content</ul></div>\";\n\n endif;\n }", "function buildForm(){\n\t\t# menampilkan form\n\t}", "public function form( $instance ) {\n\n\t\t\t$mycred = mycred();\n\n\t\t\t// Defaults\n\t\t\t$title = isset( $instance['title'] ) ? $instance['title'] : 'My Wallet';\n\t\t\t$types = isset( $instance['types'] ) ? $instance['types'] : array();\n\t\t\t$row_template = isset( $instance['row'] ) ? $instance['row'] : '%label%: %cred_f%';\n\t\t\t$show_visitors = isset( $instance['show_visitors'] ) ? $instance['show_visitors'] : 0;\n\t\t\t$message = isset( $instance['message'] ) ? $instance['message'] : '<a href=\"%login_url_here%\">Login</a> to view your balance.';\n\n?>\n<!-- Widget Options -->\n<p class=\"myCRED-widget-field\">\n\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\"><?php _e( 'Title', 'mycred' ); ?>:</label>\n\t<input id=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\" class=\"widefat\" />\n</p>\n\n<!-- Point Type -->\n<p class=\"myCRED-widget-field\">\n\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'types' ) ); ?>\"><?php _e( 'Point Types', 'mycred' ); ?>:</label><br />\n\t<?php mycred_types_select_from_checkboxes( $this->get_field_name( 'types' ) . '[]', $this->get_field_id( 'types' ), $types ); ?>\n</p>\n\n<!-- Row layout -->\n<p class=\"myCRED-widget-field\">\n\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'row' ) ); ?>\"><?php _e( 'Row Layout', 'mycred' ); ?>:</label>\n\t<textarea name=\"<?php echo esc_attr( $this->get_field_name( 'row' ) ); ?>\" id=\"<?php echo esc_attr( $this->get_field_id( 'row' ) ); ?>\" rows=\"3\" cols=\"20\" class=\"widefat\"><?php echo esc_attr( $row_template ); ?></textarea>\n\t<small><?php echo $mycred->available_template_tags( array( 'general', 'amount' ) ); ?></small>\n</p>\n\n<!-- Show to Visitors -->\n<p class=\"myCRED-widget-field\">\n\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>\"><input type=\"checkbox\" name=\"<?php echo esc_attr( $this->get_field_name( 'show_visitors' ) ); ?>\" id=\"<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>\" value=\"1\"<?php checked( $show_visitors, 1 ); ?> class=\"checkbox\" /> <?php _e( 'Show message when not logged in', 'mycred' ); ?></label>\n</p>\n<div id=\"<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>-details\" class=\"mycred-hidden<?php if ( $show_visitors == 1 ) echo ' ex-field'; ?>\">\n\t<p class=\"myCRED-widget-field\">\n\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'message' ) ); ?>\"><?php _e( 'Message', 'mycred' ); ?>:</label>\n\t\t<textarea name=\"<?php echo esc_attr( $this->get_field_name( 'message' ) ); ?>\" id=\"<?php echo esc_attr( $this->get_field_id( 'message' ) ); ?>\" rows=\"3\" cols=\"20\" class=\"widefat\"><?php echo esc_attr( $message ); ?></textarea>\n\t\t<small><?php echo $mycred->available_template_tags( array( 'general', 'amount' ) ); ?></small>\n\t</p>\n</div>\n<!-- Widget Admin Scripting -->\n<script type=\"text/javascript\">//<![CDATA[\njQuery(function($) {\n\n\t$( '#<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>' ).change(function(){\n\t\t$( '#' + $(this).attr( 'id' ) + '-details' ).toggleClass( 'ex-field' );\n\t});\n\n});//]]>\n</script>\n<?php\n\n\t\t}", "public function form( $instance ) {\n\n // Define default values for variables\n $defaults = array(\n 'school' => '',\n 'department' => '',\n 'limit' => '5',\n );\n $instance = wp_parse_args((array) $instance, $defaults);\n\n // TODO: Store the values of the widget in their own variable\n\n // Display the admin form\n include( plugin_dir_path(__FILE__) . 'views/admin.php' );\n\n }", "function form( $instance ) {\n\n\t\tfor ( $i = 0; $i < count( $this->widget_fields ); $i ++ ) :\n\t\t\t$field_id = $this->widget_fields[$i]['id'];\n\t\t\t$this->widget_fields[$i]['field_id'] = $this->get_field_id( $field_id );\n\t\t\t$this->widget_fields[$i]['field_name'] = $this->get_field_name( $field_id );\n\t\tendfor;\n\n\t\tallonsy_display_widget_form( $this->widget_fields, $instance );\n\n\t}", "function form( $instance ) {\n\t\t$defaults = array( 'title' => 'Title', 'tags' => '', 'showcat' => 'on', 'number' => 5 );\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\t\t<!-- Widget Title: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\">Title:</label>\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:90%;\" />\n\t\t</p>\n\t\t<!-- Category -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('categories'); ?>\">Select category:</label>\n\t\t\t<select id=\"<?php echo $this->get_field_id('categories'); ?>\" name=\"<?php echo $this->get_field_name('categories'); ?>\" style=\"width:100%;\">\n\t\t\t\t<option value='all' <?php if ('all' == $instance['categories']) echo 'selected=\"selected\"'; ?>>All Categories</option>\n\t\t\t\t<?php $categories = get_categories('hide_empty=0&depth=1&type=post'); ?>\n\t\t\t\t<?php foreach($categories as $category) { ?>\n\t\t\t\t<option value='<?php echo $category->term_id; ?>' <?php if ($category->term_id == $instance['categories']) echo 'selected=\"selected\"'; ?>><?php echo $category->cat_name; ?></option>\n\t\t\t\t<?php } ?>\n\t\t\t</select>\n\t\t</p>\n <!-- Tag -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'tags' ); ?>\">Tag Name:</label>\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'tags' ); ?>\" name=\"<?php echo $this->get_field_name( 'tags' ); ?>\" value=\"<?php echo $instance['tags']; ?>\" style=\"width:90%;\" />\n\t\t</p>\n\t<?php\n\t}", "function form( $instance ) {\n\t\t$instance = wp_parse_args( (array) $instance, array( 'title' => 'Multi Twitter', 'users' => 'wrought thinkclay', 'terms' => 'wordpress, plos', 'user_limit' => 5, 'term_limit' => 5, 'result_limit' => 2, 'links' => 1, 'reply' => 1, 'hash' => 1, 'date' => 1, 'credits' => 1, 'styles' => 1 ) );\n\t\t// Output admin widget options form\n\t\t?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('title'); ?>\">Widget Title: </label><br />\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" value=\"<?php echo $instance['title']; ?>\" />\n\t\t</p>\n\t\t<p>\t\n\t\t\t<label for=\"<?php echo $this->get_field_id('users'); ?>\">Users: </label><br />\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id('users'); ?>\" name=\"<?php echo $this->get_field_name('users'); ?>\" value=\"<?php echo $instance['users']; ?>\" /><br />\n\t\t\t<small><em>enter accounts separated with a space</em></small>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('terms'); ?>\">Search Terms: </label><br />\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id('terms'); ?>\" name=\"<?php echo $this->get_field_name('terms'); ?>\" value=\"<?php echo $instance['terms']; ?>\" /><br />\n\t\t\t<small><em>enter search terms separated with a comma</em></small>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('user_limit'); ?>\">Limit user feed to: </label>\n\t\t\t<select id=\"<?php echo $this->get_field_id('user_limit'); ?>\" name=\"<?php echo $this->get_field_name('user_limit'); ?>\">\t\t\t\t<option value=\"<?php echo $instance['user_limit']; ?>\"><?php echo $instance['user_limit']; ?></option>\n\t\t\t\t<option value=\"1\">1</option>\n\t\t\t\t<option value=\"2\">2</option>\n\t\t\t\t<option value=\"3\">3</option>\n\t\t\t\t<option value=\"4\">4</option>\n\t\t\t\t<option value=\"5\">5</option>\n\t\t\t\t<option value=\"6\">6</option>\n\t\t\t\t<option value=\"7\">7</option>\n\t\t\t\t<option value=\"8\">8</option>\n\t\t\t\t<option value=\"9\">9</option>\n\t\t\t\t<option value=\"10\">10</option>\n\t\t\t</select>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('term_limit'); ?>\">Limit search terms to: </label>\n\t\t\t<select id=\"<?php echo $this->get_field_id('term_limit'); ?>\" name=\"<?php echo $this->get_field_name('term_limit'); ?>\">\n\t\t\t\t<option value=\"<?php echo $instance['term_limit']; ?>\"><?php echo $instance['term_limit']; ?></option>\n\t\t\t\t<option value=\"1\">1</option>\n\t\t\t\t<option value=\"2\">2</option>\n\t\t\t\t<option value=\"3\">3</option>\n\t\t\t\t<option value=\"4\">4</option>\n\t\t\t\t<option value=\"5\">5</option>\n\t\t\t\t<option value=\"6\">6</option>\n\t\t\t\t<option value=\"7\">7</option>\n\t\t\t\t<option value=\"8\">8</option>\n\t\t\t\t<option value=\"9\">9</option>\n\t\t\t\t<option value=\"10\">10</option>\n\t\t\t</select>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('result_limit'); ?>\">Limit search results to: </label>\n\t\t\t<select id=\"<?php echo $this->get_field_id('result_limit'); ?>\" name=\"<?php echo $this->get_field_name('result_limit'); ?>\">\n\t\t\t\t<option value=\"<?php echo $instance['result_limit']; ?>\"><?php echo $instance['result_limit']; ?></option>\n\t\t\t\t<option value=\"1\">1</option>\n\t\t\t\t<option value=\"2\">2</option>\n\t\t\t\t<option value=\"3\">3</option>\n\t\t\t\t<option value=\"4\">4</option>\n\t\t\t\t<option value=\"5\">5</option>\n\t\t\t\t<option value=\"6\">6</option>\n\t\t\t\t<option value=\"7\">7</option>\n\t\t\t\t<option value=\"8\">8</option>\n\t\t\t\t<option value=\"9\">9</option>\n\t\t\t\t<option value=\"10\">10</option>\n\t\t\t</select>\n\t\t<br />\n\t\t<small><em>Limits number of results for each term.</em></small>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('links'); ?>\">Automatically convert links?</label>\n\t\t\t<input type=\"checkbox\" name=\"<?php echo $this->get_field_name('links'); ?>\" id=\"<?php echo $this->get_field_id('links'); ?>\" <?php if ($instance['links']) echo 'checked=\"checked\"'; ?> />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('reply'); ?>\">Automatically convert @replies?</label>\n\t\t\t<input type=\"checkbox\" name=\"<?php echo $this->get_field_name('reply'); ?>\" id=\"<?php echo $this->get_field_id('reply'); ?>\" <?php if ($instance['reply']) echo 'checked=\"checked\"'; ?> />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('hash'); ?>\">Automatically convert #hashtags?</label>\n\t\t\t<input type=\"checkbox\" name=\"<?php echo $this->get_field_name('hash'); ?>\" id=\"<?php echo $this->get_field_id('hash'); ?>\" <?php if ($instance['hash']) echo 'checked=\"checked\"'; ?> />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('date'); ?>\">Show Date?</label>\n\t\t\t<input type=\"checkbox\" name=\"<?php echo $this->get_field_name('date'); ?>\" id=\"<?php echo $this->get_field_id('date'); ?>\" <?php if ($instance['date']) echo 'checked=\"checked\"'; ?> />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('credits'); ?>\">Show Credits?</label>\n\t\t\t<input type=\"checkbox\" name=\"<?php echo $this->get_field_name('credits'); ?>\" id=\"<?php echo $this->get_field_id('credits'); ?>\" <?php if ($instance['credits']) echo 'checked=\"checked\"'; ?> />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('styles'); ?>\">Use Default Styles?</label>\n\t\t\t<input type=\"checkbox\" name=\"<?php echo $this->get_field_name('styles'); ?>\" id=\"<?php echo $this->get_field_id('styles'); ?>\" <?php if ($instance['styles']) echo 'checked=\"checked\"'; ?> />\n\t\t</p>\n\t\t<?php\n\t}", "function form( $instance ) {\n\n\t\t// WIDGET DEFAULTS\n\t\t$defaults = array(\n\t\t\t'title' \t=> 'Instagram Widget',\n\t\t\t'account' \t=> 'ckiriaze',\n\t\t\t'count' \t=> 4,\n\t\t\t'cache'\t\t=> 15\n\t\t);\n\n\t\t$instance \t= wp_parse_args( (array) $instance, $defaults );\n\t\t$title \t\t= $instance['title'];\n\t\t$account \t= $instance['account'];\n\t\t$count \t\t= $instance['count'];\n\t\t$cache \t\t= $instance['cache'];\n\n\t\t?>\n\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('title'); ?>\"><?php _e('Title:', 'simple'); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\" />\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('account'); ?>\"><?php _e('<a href=\"http://www.dribbble.com/constantine\">Instagram</a> account:', 'simple'); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('account'); ?>\" name=\"<?php echo $this->get_field_name('account'); ?>\" type=\"text\" value=\"<?php echo $account; ?>\" />\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('count'); ?>\"><?php _e('Number of Grams:', 'simple'); ?></label>\n\t\t\t<select name=\"<?php echo $this->get_field_name('count'); ?>\">\n\t\t\t\t<?php for( $i = 1; $i <= 12; $i++ ) { ?>\n\t\t\t\t\t<option value=\"<?php echo $i; ?>\" <?php selected( $i, $count ); ?>><?php echo $i; ?></option>\n\t\t\t\t<?php } ?>\n\t\t\t</select>\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('cache'); ?>\"><?php _e('Cache:', 'simple'); ?> (Coming Soon!)</label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('cache'); ?>\" name=\"<?php echo $this->get_field_name('cache'); ?>\" type=\"text\" value=\"<?php echo $cache; ?>\" />\n\t\t</p>\n\n\t<?php\n\n\t}", "function tvchat_config_form()\n{\n $config = _tvchat_query();\n\n /* check in */\n $form['checkin'] = array(\n '#type' => 'fieldset',\n\t\t'#title' => t('Check In'),\n\t\t'#description' => t('Check In 기능에 대한 설정'),\n );\n\n $form['checkin']['max_checkin_day'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('하루 최대 Check In 회수 '),\n\t\t'#weight' => 0,\n\t\t'#size' => 10,\n\t\t'#maxlength' => 3,\n\t\t'#default_value' => $config['max_checkin_day'],\n\t\t'#description' => t('하루에 최대로 Check In 할 수 있는 회수'),\n );\n\n $form['checkin']['reset_checkin'] = array(\n '#type' => 'checkbox',\n\t\t'#title' => t('어제까지의 체크인 내역 초기화'),\n\t\t'#weight' => 1,\n\t\t'#default_value' => 0,\n\t\t'#description' => t('어제까지의 모든 체크인 내역을 초기화한다.'),\n );\n\n $form['checkin']['submit'] = array(\n '#type' => 'submit',\n\t '#value' => t('Save'),\n\t\t'#weight' => 2,\n );\n\n\t/* TV Show */\n $form['tvshow'] = array(\n '#type' => 'fieldset',\n\t\t'#title' => t('TV 프로그램 등수 산정 가중치'),\n\t\t'#description' => t('각 TV 프로그램의 등수 산정을 위한 가중치'),\n );\n\n $form['tvshow']['checkin_count'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('Check In 회수'),\n\t\t'#size' => 10,\n\t\t'#maxlength' => 3,\n\t\t'#default_value' => $config['checkin_count'],\n\t\t'#description' => t('Check In 회수에 대한 가중치'),\n );\n\n $form['tvshow']['favorite_count'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('Follow 사용자 수'),\n\t\t'#size' => 10,\n\t\t'#maxlength' => 3,\n\t\t'#default_value' => $config['favorite_count'],\n\t\t'#description' => t('Follow 사용자수에 대한 가중치'),\n );\n\n $form['tvshow']['comment_count'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('Comment 사용자 수'),\n\t\t'#size' => 10,\n\t\t'#maxlength' => 3,\n\t\t'#default_value' => $config['comment_count'],\n\t\t'#description' => t('Comment 사용자수에 대한 가중치'),\n );\n\n $form['tvshow']['rate_now'] = array(\n '#type' => 'checkbox',\n\t\t'#title' => t('TV 프로그램 등수 계산'),\n\t\t'#default_value' => 0,\n\t\t'#description' => t('어제까지의 사용자 활동 내역을 바탕으로 TV 프로그램 등수를 계산한다.'),\n );\n\n\n $form['tvshow']['submit'] = array(\n '#type' => 'submit',\n\t '#value' => t('Save'),\n );\n\n\t/* TV Episode */\n $form['episode'] = array(\n '#type' => 'fieldset',\n\t\t'#title' => t('TV 프로그램 에피소드 관리'),\n\t\t'#description' => t('각 TV 프로그램의 에피소드에 대한 설정 관리'),\n );\n\n $form['episode']['create_episode'] = array(\n '#type' => 'checkbox',\n\t\t'#title' => t('오늘 방송될 에피소드 생성'),\n\t\t'#default_value' => 0,\n\t\t'#description' => t('오늘 방송될 에피소드를 생성한다.'),\n );\n\n $form['episode']['submit'] = array(\n '#type' => 'submit',\n\t '#value' => t('Save'),\n );\n\n\t/* TV Chat Configuration */\n $form['environ'] = array(\n '#type' => 'fieldset',\n\t\t'#title' => t('Teeple 환경 설정 관리'),\n\t\t'#description' => t('각 TV 프로그램의 에피소드에 대한 설정 관리'),\n );\n\n $form['environ']['dir_timetable'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('TimeTable Directory'),\n\t\t'#default_value' => '/var/www/data/timetable',\n\t\t'#description' => t('편성표가 저장되는 장소이다.'),\n );\n\n $form['environ']['max_top_show'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('인기 프로그램 수'),\n\t\t'#size' => 5,\n\t\t'#maxlength' => 3,\n\t\t'#default_value' => 5,\n\t\t'#description' => t('매일 변경되는 인기 프로그램의 갯수'),\n );\n\n $form['environ']['url_intro_shorten'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('Introduction Page URL (shorten)'),\n\t\t'#default_value' => 'http://goo.gl/VL6Ww',\n\t\t'#description' => t('teeple의 소개페이지 URL이다.'),\n );\n\n $form['environ']['apns_request_url'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('APNS REQUEST URL '),\n\t\t'#default_value' => 'http://newbiz.uangel.com/tvchat/ApnsPHP/sample_push.php',\n\t\t'#description' => t('teeple의 APNS request URL이다.'),\n );\n\n $form['environ']['xmpp_send_cmd'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('XMPP Send Command'),\n\t\t'#default_value' => 'echo newbiz.123 | sudo -S /usr/sbin/ejabberdctl send_message_chat %s %s \\'%s\\'',\n\t\t'#description' => t('teeple의 APNS request URL이다.'),\n );\n\n $form['environ']['submit'] = array(\n '#type' => 'submit',\n\t '#value' => t('Save'),\n );\n\n /* SMS Link Configuration */\n $form['smsgw'] = array(\n '#type' => 'fieldset',\n\t\t'#title' => t('Teeple SMS 링크 설정 관리'),\n\t\t'#description' => t('Teeple SMS 링크에 대한 설정 관리'),\n );\n\n $form['smsgw']['cmp_usr_id'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('CMP USER ID'),\n\t\t'#default_value' => '21105',\n\t\t'#description' => t('SMS링크 전달 Unique ID.'),\n );\n\n $form['smsgw']['snd_phn_id'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('SMS 전송자 폰 번호'),\n\t\t'#default_value' => '0317103953',\n\t\t'#description' => t('SMS 전송자 폰 번호임.'),\n );\n\n $form['smsgw']['callback'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('SMS 전송자 번호 - phone에 표시됨'),\n\t\t'#default_value' => '0317103953',\n\t\t'#description' => t('SMS 전송자 번호 - 받는 사람 폰에 표시되는 번호'),\n );\n\n $form['smsgw']['auth_msg'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('인증 번호 전송 메시지'),\n\t\t'#default_value' => '귀하의 인증 번호는 [%s]입니다.',\n\t\t'#description' => t('인증 번호 전송 메시지'),\n );\n\n $form['smsgw']['invite_msg'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('서비스 초대 메시지'),\n\t\t'#default_value' => '친구 %s(%s)분이 Teeple서비스(%s)에 초대하셨습니다.',\n\t\t'#description' => t('서비스 초대 메시지'),\n );\n\n $form['smsgw']['submit'] = array(\n '#type' => 'submit',\n\t '#value' => t('Save'),\n );\n\n /* Tracking Configuration */\n $form['tracking'] = array(\n '#type' => 'fieldset',\n\t\t'#title' => t('Teeple Tracking을 위한 설정 관리'),\n\t\t'#description' => t('Teeple Service Tracking을 위한 설정 관리'),\n );\n\n $form['tracking']['usernames_for_tracking'] = array(\n '#type' => 'textfield',\n\t\t'#title' => t('User names for tracking '),\n\t\t'#default_value' => '[email protected], [email protected], [email protected], [email protected], [email protected], [email protected]',\n\t\t'#description' => t('User names for tracking.'),\n );\n\n $form['tracking']['submit'] = array(\n '#type' => 'submit',\n\t '#value' => t('Save'),\n );\n\n return $form;\n}", "function hosting_task_jenkins_settings_form() {\n\n $form['hosting_task_jenkins_url'] = array(\n '#type' => 'textfield',\n '#title' => t('Jenkins Server URL'),\n '#description' => t('The URL of your Jenkins server.'),\n '#default_value' => variable_get('hosting_task_jenkins_url', 'http://username:password@localhost:8080'),\n );\n return system_settings_form($form);\n}", "public function FormAction()\n {\n return Controller::join_links($this->_widgetEditor->Link('field'), str_replace('\\\\', '_', $this->_widget->ClassName), '');\n }", "function wp_dashboard_rss_control($widget_id, $form_inputs = array())\n {\n }", "public function plugin_page() {\n\t\t$this->setting_api->show_forms();\n\t}", "public function hookConfigForm()\n {\n require 'config_form.php';\n }", "function form( $instance ) {\r\n\r\n\t\t/* Set up some default widget settings. */\r\n\t\t$defaults = array( 'title' => __('DHL Search', ''), 'search'=> __('Search', ''), 'name' => __('John Doe', ''), 'searchField'=>__('s'), 'searchButton'=>__('searchsubmit'), 'sex' => 'male', 'show_sex' => true );\r\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\r\n \r\n <?php echo DHLSettings::getVal('dhl_username') == \"\" ? \"<p><em>\".DHLOutput::__(\"Inactive\").\"</em></p>\" : \"\"; ?>\r\n \r\n <!-- Widget Title: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'hybrid'); ?></label>\r\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:90%;\" />\r\n\t\t</p>\r\n \r\n <p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'search' ); ?>\"><?php _e(\"Fallback Search:\"); ?></label>\r\n\t\t\t<select id=\"<?php echo $this->get_field_id( 'search' ); ?>\" name=\"<?php echo $this->get_field_name( 'search' ); ?>\" class=\"widefat\" style=\"width:90%;\">\r\n\t\t\t\t<option <?php if ( 'wordpress' == $instance['search'] ) echo 'selected=\"selected\"'; ?> value=\"wordpress\">WordPress</option>\r\n\t\t\t\t<!--<option <?php if ( 'google' == $instance['search'] ) echo 'selected=\"selected\"'; ?> value=\"google\">Google</option>-->\r\n\t\t\t\t<option <?php if ( 'none' == $instance['search'] ) echo 'selected=\"selected\"'; ?> value=\"none\">None</option>\r\n\t\t\t</select>\r\n\t\t</p>\r\n\t<?php\r\n\t}", "public function configure()\n\t{\n\t\tif (!$this->form)\n\t\t{\n\t\t\t$this->form = new WebForm\\Form($this->getId());\n\t\t}\n\n\t\t$data = $this->form->get();\n\t\t$isCloud = Loader::includeModule('bitrix24');\n\n\t\t$this->fileDir = 'form';\n\t\t$this->fileName = str_replace(\n\t\t\t['#id#', '#sec#'],\n\t\t\t[$this->getId(), $data['SECURITY_CODE']],\n\t\t\t$isCloud ? 'loader_#id#.js' : 'loader_#id#_#sec#.js'\n\t\t);\n\n\t\t$name = 'crm.site.form.embed.unit';\n\t\t$this->addExtension($name);\n\t\t$module = $this->getModule($name);\n\t\t$module->getProfile()->setCallParameter($this->getCallParameter());\n\n\t\t$this->embeddedModuleName = 'crm.site.form.unit.loader';\n\t}", "function cbstdsys_render_form() {\n\t?>\n\t<div class=\"wrap\">\n\n\t\t<!-- Display Plugin Icon, Header, and Description -->\n\t\t<div class=\"icon32\" id=\"icon-options-general\"><br></div>\n\t\t<h2><span style=\"font-family:Consolas,Monaco,Courier,monospace\">cb-std-sys</span>-<?php _e('Settings'); ?>, Version <?php echo CB_STD_SYS_VERSION; ?></h2>\n\n\t\t<!-- Beginning of the Plugin Options Form -->\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields('cbstdsys_plugin_options'); ?>\n\n<!--\n <fieldset>\n <legend><?php _e('Content','cb-std-sys'); ?></legend>\n\n \t\t\t<table class=\"form-table\">\n-->\n<?php render_form_fields( get_cbstdsys_options(), 'cbstdsys', 'cbstdsys_options' ); ?>\n<!--\n </table>\n\n </fieldset>\n-->\n\t\t\t<p class=\"submit\">\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\t\t\t</p>\n\n\t\t</form>\n\n\t</div>\n\t<?php\n}", "public function form( $instance ){\n }", "function form( $instance ) {\r\n\t\t?>\r\n\r\n\t\t<!-- Widget Title: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:'); ?></label>\r\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:80%;\" />\r\n\t\t</p>\r\n\r\n\t\t\r\n\r\n\t\t<?php\r\n\t}", "function settingsForm($field, $instance, $view_mode, $form, &$form_state);", "function form( $instance ) {\r\n\t/* Default widget settings. */\r\n\r\n\t$defaults = array( 'title' => __('The Latest RSS Items', 'Sandy_RSS'), 'location' => '', 'geo' => '', 'gsearch' => '', 'topic' => '', 'name' => __('', 'Sandy_RSS'), 'lkbtitle' => 'off', 'filter' => '', 'number' => '5', 'ltime' => '', 'pubdate' => 'on', 'pubtime' => 'off', 'dformat' => 'm/d/yyyy', 'tformat' => '', 'pubauthor' => 'off', 'excerpt' => 'off', 'charex' => '', 'chartle' => '', 'list' => 'ul', 'target' => '_blank', 'sort' => 'false', 'cachefeed' => '3600');\r\n\r\n\t$instance = wp_parse_args( (array) $instance, $defaults ); \r\n?>\r\n\r\n\t<!-- Widget Title: Text Input -->\r\n\t<p>\r\n\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Widget Title:', 'Sandy_RSS'); ?></label>\r\n\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:90%;\" /> \r\n\r\n\t<!-- Link Title to Feed? Checkbox -->\r\n\t<input class=\"checkbox\" type=\"checkbox\" <?php checked( $instance['lkbtitle'], 'on' ); ?> id=\"<?php echo $this->get_field_id( 'lkbtitle' ); ?>\" name=\"<?php echo $this->get_field_name( 'lkbtitle' ); ?>\" title=\"<?php _e('Disable if title needs to be linked to the chosen Feed URL', 'Sandy_RSS'); ?>\" /> \r\n\t</p>\r\n\r\n\t<style>\r\n\tfieldset {\r\n\tborder: 1px solid #CCA383;\r\n\tpadding: 3px;\r\n\t}\r\n\t</style>\r\n\r\n\t<fieldset>\r\n\t<legend><?php _e('Generic RSS/Atom Feed URL:', 'Sandy_RSS'); ?></legend>\r\n\t<!-- Feed URL: Text Input -->\r\n\t<p>\r\n\t<input id=\"<?php echo $this->get_field_id( 'name' ); ?>\" name=\"<?php echo $this->get_field_name( 'name' ); ?>\" value=\"<?php echo $instance['name']; ?>\" style=\"width:95%;\" />\r\n\t</p>\r\n\t</fieldset>\r\n\t<p align=\"center\">=== OR ===</p>\r\n\t<fieldset>\r\n\t<legend>Feed URL for Google News</legend>\r\n\r\n\t<!-- Location: Select Box -->\r\n\t<p>\r\n\t<label for=\"<?php echo $this->get_field_id( 'location' ); ?>\"><?php _e('Google News Location:', 'Sandy_RSS'); ?></label> \r\n\t<select id=\"<?php echo $this->get_field_id( 'location' ); ?>\" name=\"<?php echo $this->get_field_name( 'location' ); ?>\" class=\"widefat\" style=\"width:95%;\">\r\n// Locations in news.google.com on 12 Nov 11\r\n<option value=\"\" <?php if (\"es_ar\" == $instance['location']) echo 'selected';?>> </option> \r\n<option value=\"es_ar\" <?php if (\"es_ar\" == $instance['location']) echo 'selected';?>>Argentina</option> \r\n<option value=\"au\" <?php if (\"au\" == $instance['location']) echo 'selected';?>>Australia</option> \r\n<option value=\"nl_be\" <?php if (\"nl_be\" == $instance['location']) echo 'selected';?>>België</option> \r\n<option value=\"fr_be\" <?php if (\"fr_be\" == $instance['location']) echo 'selected';?>>Belgique</option> \r\n<option value=\"en_bw\" <?php if (\"en_bw\" == $instance['location']) echo 'selected';?>>Botswana</option> \r\n<option value=\"pt-BR_br\" <?php if (\"pt-BR_br\" == $instance['location']) echo 'selected';?>>Brasil</option> \r\n<option value=\"ca\" <?php if (\"ca\" == $instance['location']) echo 'selected';?>>Canada English</option> \r\n<option value=\"fr_ca\" <?php if (\"fr_ca\" == $instance['location']) echo 'selected';?>>Canada Français</option> \r\n<option value=\"cs_cz\" <?php if (\"cs_cz\" == $instance['location']) echo 'selected';?>>Ceská republika</option> \r\n<option value=\"es_cl\" <?php if (\"es_cl\" == $instance['location']) echo 'selected';?>>Chile</option> \r\n<option value=\"es_co\" <?php if (\"es_co\" == $instance['location']) echo 'selected';?>>Colombia</option> \r\n<option value=\"es_cu\" <?php if (\"es_cu\" == $instance['location']) echo 'selected';?>>Cuba</option> \r\n<option value=\"de\" <?php if (\"de\" == $instance['location']) echo 'selected';?>>Deutschland</option> \r\n<option value=\"es\" <?php if (\"es\" == $instance['location']) echo 'selected';?>>Espańa</option> \r\n<option value=\"es_us\" <?php if (\"es_us\" == $instance['location']) echo 'selected';?>>Estados Unidos</option> \r\n<option value=\"en_et\" <?php if (\"en_et\" == $instance['location']) echo 'selected';?>>Ethiopia</option> \r\n<option value=\"fr\" <?php if (\"fr\" == $instance['location']) echo 'selected';?>>France</option> \r\n<option value=\"en_gh\" <?php if (\"en_gh\" == $instance['location']) echo 'selected';?>>Ghana</option> \r\n<option value=\"in\" <?php if (\"in\" == $instance['location']) echo 'selected';?>>India</option> \r\n<option value=\"en_ie\" <?php if (\"en_ie\" == $instance['location']) echo 'selected';?>>Ireland</option> \r\n<option value=\"en_il\" <?php if (\"en_il\" == $instance['location']) echo 'selected';?>>Israel English</option> \r\n<option value=\"it\" <?php if (\"it\" == $instance['location']) echo 'selected';?>>Italia</option> \r\n<option value=\"en_ke\" <?php if (\"en_ke\" == $instance['location']) echo 'selected';?>>Kenya</option> \r\n<option value=\"hu_hu\" <?php if (\"hu_hu\" == $instance['location']) echo 'selected';?>>Magyarország</option> \r\n<option value=\"en_my\" <?php if (\"en_my\" == $instance['location']) echo 'selected';?>>Malaysia</option> \r\n<option value=\"es_mx\" <?php if (\"es_mx\" == $instance['location']) echo 'selected';?>>México</option> \r\n<option value=\"en_na\" <?php if (\"en_na\" == $instance['location']) echo 'selected';?>>Namibia</option> \r\n<option value=\"nl_nl\" <?php if (\"nl_nl\" == $instance['location']) echo 'selected';?>>Nederland</option> \r\n<option value=\"nz\" <?php if (\"nz\" == $instance['location']) echo 'selected';?>>New Zealand</option> \r\n<option value=\"en_ng\" <?php if (\"en_ng\" == $instance['location']) echo 'selected';?>>Nigeria</option> \r\n<option value=\"no_no\" <?php if (\"no_no\" == $instance['location']) echo 'selected';?>>Norge</option> \r\n<option value=\"de_at\" <?php if (\"de_at\" == $instance['location']) echo 'selected';?>>Österreich</option> \r\n<option value=\"en_pk\" <?php if (\"en_pk\" == $instance['location']) echo 'selected';?>>Pakistan</option> \r\n<option value=\"es_pe\" <?php if (\"es_pe\" == $instance['location']) echo 'selected';?>>Perú</option> \r\n<option value=\"en_ph\" <?php if (\"en_ph\" == $instance['location']) echo 'selected';?>>Philippines</option> \r\n<option value=\"pl_pl\" <?php if (\"pl_pl\" == $instance['location']) echo 'selected';?>>Polska</option> \r\n<option value=\"pt-PT_pt\" <?php if (\"pt-PT_pt\" == $instance['location']) echo 'selected';?>>Portugal</option> \r\n<option value=\"de_ch\" <?php if (\"de_ch\" == $instance['location']) echo 'selected';?>>Schweiz</option> \r\n<option value=\"fr_sn\" <?php if (\"fr_sn\" == $instance['location']) echo 'selected';?>>Sénégal</option> \r\n<option value=\"en_sg\" <?php if (\"en_sg\" == $instance['location']) echo 'selected';?>>Singapore</option> \r\n<option value=\"en_za\" <?php if (\"en_za\" == $instance['location']) echo 'selected';?>>South Africa</option> \r\n<option value=\"fr_ch\" <?php if (\"fr_ch\" == $instance['location']) echo 'selected';?>>Suisse</option> \r\n<option value=\"sv_se\" <?php if (\"sv_se\" == $instance['location']) echo 'selected';?>>Sverige</option> \r\n<option value=\"en_tz\" <?php if (\"en_tz\" == $instance['location']) echo 'selected';?>>Tanzania</option> \r\n<option value=\"tr_tr\" <?php if (\"tr_tr\" == $instance['location']) echo 'selected';?>>Türkiye</option> \r\n<option value=\"uk\" <?php if (\"uk\" == $instance['location']) echo 'selected';?>>U.K.</option> \r\n<option value=\"us\" <?php if (\"us\" == $instance['location']) echo 'selected';?>>U.S.</option> \r\n<option value=\"en_ug\" <?php if (\"en_ug\" == $instance['location']) echo 'selected';?>>Uganda</option> \r\n<option value=\"es_ve\" <?php if (\"es_ve\" == $instance['location']) echo 'selected';?>>Venezuela</option> \r\n<option value=\"vi_vn\" <?php if (\"vi_vn\" == $instance['location']) echo 'selected';?>>Vi?t Nam (Vietnam)</option> \r\n<option value=\"en_zw\" <?php if (\"en_zw\" == $instance['location']) echo 'selected';?>>Zimbabwe</option> \r\n<option value=\"el_gr\" <?php if (\"el_gr\" == $instance['location']) echo 'selected';?>>????da (Greece)</option> \r\n<option value=\"ru_ru\" <?php if (\"ru_ru\" == $instance['location']) echo 'selected';?>>?????? (Russia)</option> \r\n<option value=\"ru_ua\" <?php if (\"ru_ua\" == $instance['location']) echo 'selected';?>>??????? / ??????? (Ukraine)</option> \r\n<option value=\"uk_ua\" <?php if (\"uk_ua\" == $instance['location']) echo 'selected';?>>??????? / ?????????? (Ukraine)</option> \r\n<option value=\"iw_il\" <?php if (\"iw_il\" == $instance['location']) echo 'selected';?>>????? (Israel)</option> \r\n<option value=\"ar_ae\" <?php if (\"ar_ae\" == $instance['location']) echo 'selected';?>>???????? (UAE)</option> \r\n<option value=\"ar_sa\" <?php if (\"ar_sa\" == $instance['location']) echo 'selected';?>>???????? (KSA)</option> \r\n<option value=\"ar_me\" <?php if (\"ar_me\" == $instance['location']) echo 'selected';?>>?????? ?????? (Arabic)</option> \r\n<option value=\"ar_lb\" <?php if (\"ar_lb\" == $instance['location']) echo 'selected';?>>????? (Lebanon)</option> \r\n<option value=\"ar_eg\" <?php if (\"ar_eg\" == $instance['location']) echo 'selected';?>>??? (Egypt)</option> \r\n<option value=\"hi_in\" <?php if (\"hi_in\" == $instance['location']) echo 'selected';?>>?????? (India)</option> \r\n<option value=\"ta_in\" <?php if (\"ta_in\" == $instance['location']) echo 'selected';?>>?????(India)</option> \r\n<option value=\"te_in\" <?php if (\"te_in\" == $instance['location']) echo 'selected';?>>?????? (India)</option> \r\n<option value=\"ml_in\" <?php if (\"ml_in\" == $instance['location']) echo 'selected';?>>?????? (India)</option> \r\n<option value=\"kr\" <?php if (\"kr\" == $instance['location']) echo 'selected';?>>?? (Korea)</option> \r\n<option value=\"cn\" <?php if (\"cn\" == $instance['location']) echo 'selected';?>>??? (China)</option> \r\n<option value=\"tw\" <?php if (\"tw\" == $instance['location']) echo 'selected';?>>??? (Taiwan)</option> \r\n<option value=\"jp\" <?php if (\"jp\" == $instance['location']) echo 'selected';?>>?? (Japan)</option> \r\n<option value=\"hk\" <?php if (\"hk\" == $instance['location']) echo 'selected';?>>??? (Hong Kong)</option>\r\n// End Locations in news.google.com on 12 Nov 11\r\n\t</select>\r\n\t<br /><span style=\"font-size: 0.8em;\">Read more about <a target=\"_blank\" href=\"http://www.stefaniamarchisio.com/2010/02/google-news-localization-codes/\">Google's Localization Codes</a>.</span>\r\n\t</p>\r\n\r\n\t<!-- Local (USA & Can only): Text Input -->\r\n\t<p>\r\n\t<label for=\"<?php echo $this->get_field_id( 'geo' ); ?>\"><?php _e('Local (Us & Ca in English only):', 'Sandy_RSS'); ?></label>\r\n\t<input id=\"<?php echo $this->get_field_id( 'geo' ); ?>\" name=\"<?php echo $this->get_field_name( 'geo' ); ?>\" value=\"<?php echo $instance['geo']; ?>\" style=\"width:95%;\" />\r\n\t</p>\r\n\r\n\t<!-- Search Keyword(s): Text Input -->\r\n\t<fieldset>\r\n\t<legend><?php _e('Filter Results by keyword(s) OR topics (optional)', 'Sandy_RSS'); ?></legend>\r\n\t<p>\r\n\t<label for=\"<?php echo $this->get_field_id( 'gsearch' ); ?>\"><?php _e('Google News Keyword(s):', 'Sandy_RSS'); ?></label>\r\n\t<input id=\"<?php echo $this->get_field_id( 'gsearch' ); ?>\" name=\"<?php echo $this->get_field_name( 'gsearch' ); ?>\" value=\"<?php echo $instance['gsearch']; ?>\" style=\"width:90%;\" />\r\n\t<br /><span style=\"font-size: 0.8em;\">Learn a few <a target=\"_blank\" href=\"http://www.stefaniamarchisio.com/googles-search-operators/\">Google Search Tips</a>.</span>\r\n\r\n\t</p>\r\n\t<!-- Topic: Select Box -->\r\n\t<p> \r\n\t<label for=\"<?php echo $this->get_field_id( 'topic' ); ?>\"><?php _e('Google News Topic:', 'Sandy_RSS'); ?></label>\r\n\t<select id=\"<?php echo $this->get_field_id( 'topic' ); ?>\" name=\"<?php echo $this->get_field_name( 'topic' ); ?>\" class=\"widefat\" style=\"width:90%;\">\r\n// options in Google News on 20 Feb 2010\r\n<option value=\"\" <?php if ('' == $instance['topic']) echo 'selected';?>>Top Stories (default)</option>\r\n<option value=\"w\" <?php if ('w' == $instance['topic']) echo 'selected';?>>World</option>\r\n<option value=\"n\" <?php if ('n' == $instance['topic']) echo 'selected';?>>Nation</option>\r\n<option value=\"b\" <?php if ('b' == $instance['topic']) echo 'selected';?>>Business</option>\r\n<option value=\"t\" <?php if ('t' == $instance['topic']) echo 'selected';?>>Sci/Tecn</option>\r\n<option value=\"tc\" <?php if ('tc' == $instance['topic']) echo 'selected';?>>Technology</option>\r\n<option value=\"e\" <?php if ('e' == $instance['topic']) echo 'selected';?>>Entertainment</option>\r\n<option value=\"s\" <?php if ('s' == $instance['topic']) echo 'selected';?>>Sports</option>\r\n<option value=\"snc\" <?php if ('snc' == $instance['topic']) echo 'selected';?>>Science</option>\r\n<option value=\"m\" <?php if ('m' == $instance['topic']) echo 'selected';?>>Health</option>\r\n<option value=\"ir\" <?php if ('ir' == $instance['topic']) echo 'selected';?>>Spotlight</option>\r\n<option value=\"po\" <?php if ('po' == $instance['topic']) echo 'selected';?>>Most Popular</option>\r\n\t</select>\r\n\t<br /><span style=\"font-size: 0.8em;\">Read more about <a target=\"_blank\" href=\"http://www.stefaniamarchisio.com/2010/02/google-news-topic-codes/\">Google's Topics</a>.</span>\r\n\t</p>\r\n\t</fieldset>\r\n\t</fieldset>\r\n\r\n\t<!-- Cache Refresh Frequency(sec.): Text Input -->\r\n\t<p>\r\n\t<label for=\"<?php echo $this->get_field_id( 'cachefeed' ); ?>\"><?php _e('Cache Refresh Frequency (in sec.):', 'Sandy_RSS'); ?></label>\r\n\t<input id=\"<?php echo $this->get_field_id( 'cachefeed' ); ?>\" name=\"<?php echo $this->get_field_name( 'cachefeed' ); ?>\" value=\"<?php echo $instance['cachefeed']; ?>\" style=\"width:10%;\" />\r\n\t</p>\r\n\r\n\t<!-- Sort by Title: checkbox -->\r\n\t<p>\r\n\t<label for=\"<?php echo $this->get_field_id( 'sort' ); ?>\"><?php _e('Sort by Title (instead of date/time):', 'Sandy_RSS'); ?></label>\r\n\t<input class=\"checkbox\" type=\"checkbox\" <?php checked( $instance['sort'], 'on' ); ?> id=\"<?php echo $this->get_field_id( 'sort' ); ?>\" name=\"<?php echo $this->get_field_name( 'sort' ); ?>\" /> \t\r\n\t</p>\r\n\r\n\t<!-- Text Filter: Text Input -->\r\n\t<p>\r\n\t<label for=\"<?php echo $this->get_field_id( 'filter' ); ?>\"><?php _e('Keywords Filter:', 'Sandy_RSS'); ?></label>\r\n\t<input id=\"<?php echo $this->get_field_id( 'filter' ); ?>\" name=\"<?php echo $this->get_field_name( 'filter' ); ?>\" value=\"<?php echo $instance['filter']; ?>\" style=\"width:95%;\" />\r\n\t<br /><span style=\"font-size: 0.8em;\">Example: with [foo -bar] items need to include \"foo\" and not \"bar\" words. Case insensitive, no wildchars, quotes, booleans or exact phrases are accepted.</span>\r\n \t</p>\r\n\r\n\t<!-- N. articles to display: Text Input -->\r\n\t<p>\r\n\t<label for=\"<?php echo $this->get_field_id( 'number' ); ?>\"><?php _e('Max No. of Items: ', 'Sandy_RSS'); ?></label>\r\n\t<input id=\"<?php echo $this->get_field_id( 'number' ); ?>\" name=\"<?php echo $this->get_field_name( 'number' ); ?>\" value=\"<?php echo $instance['number']; ?>\" style=\"width:10%;\" /> to display. If 0 then all items will be displayed.\r\n\t</p>\r\n\r\n\t<!-- Only items published in the last : Text Input -->\r\n\t<p>\r\n\t<label for=\"<?php echo $this->get_field_id( 'ltime' ); ?>\"><?php _e('Only items published in the last: ', 'Sandy_RSS'); ?></label>\r\n\t<input id=\"<?php echo $this->get_field_id( 'ltime' ); ?>\" name=\"<?php echo $this->get_field_name( 'ltime' ); ?>\" value=\"<?php echo $instance['ltime']; ?>\" style=\"width:10%;\" /> hours.\r\n\t</p>\r\n\r\n\t<!-- Limit/Truncate title to ... chars: Text Input -->\r\n\t<p>\r\n\t<label for=\"<?php echo $this->get_field_id( 'chartle' ); ?>\"><?php _e('Limit Item title to ', 'Sandy_RSS'); ?></label>\r\n\t<input id=\"<?php echo $this->get_field_id( 'chartle' ); ?>\" name=\"<?php echo $this->get_field_name( 'chartle' ); ?>\" value=\"<?php echo $instance['chartle']; ?>\" style=\"width:10%;\" /> chars.\r\n\t</p>\r\n\r\n\t<!-- Show Publication Date? Checkbox -->\r\n\r\n\t<p>\r\n\t<label for=\"<?php echo $this->get_field_id( 'pubdate' ); ?>\"><?php _e('Show item date?', 'Sandy_RSS'); ?></label>\r\n\t<input class=\"checkbox\" type=\"checkbox\" <?php checked( $instance['pubdate'], 'on' ); ?> id=\"<?php echo $this->get_field_id( 'pubdate' ); ?>\" name=\"<?php echo $this->get_field_name( 'pubdate' ); ?>\" /> \r\n\r\n\t<label for=\"<?php echo $this->get_field_id( 'dformat' ); ?>\"><?php _e(' Date Format ', 'Sandy_RSS'); ?></label>\r\n\t<input id=\"<?php echo $this->get_field_id( 'dformat' ); ?>\" name=\"<?php echo $this->get_field_name( 'dformat' ); ?>\" value=\"<?php echo $instance['dformat']; ?>\" style=\"width:20%;\" /> chars.\r\n\r\n\t</p>\r\n\r\n\r\n\t<!-- Show Publication Time? Checkbox -->\r\n\r\n\t<p>\r\n\t<label for=\"<?php echo $this->get_field_id( 'pubtime' ); ?>\"><?php _e('Show item time?', 'Sandy_RSS'); ?></label>\r\n\r\n\t<input class=\"checkbox\" type=\"checkbox\" <?php checked( $instance['pubtime'], 'on' ); ?> id=\"<?php echo $this->get_field_id( 'pubtime' ); ?>\" name=\"<?php echo $this->get_field_name( 'pubtime' ); ?>\" /> \r\n\r\n\t<label for=\"<?php echo $this->get_field_id( 'tformat' ); ?>\"><?php _e(' Time Format ', 'Sandy_RSS'); ?></label>\r\n\r\n\t<input id=\"<?php echo $this->get_field_id( 'tformat' ); ?>\" name=\"<?php echo $this->get_field_name( 'tformat' ); ?>\" value=\"<?php echo $instance['tformat']; ?>\" style=\"width:20%;\" /> chars.\r\n\r\n\t<br /><span style=\"font-size: 0.8em;\">Learn how to customize you <a target=\"_blank\" href=\"http://codex.wordpress.org/Formatting_Date_and_Time\">Date and Time Formats</a>.</span>\r\n\r\n\t</p>\r\n\r\n\r\n\r\n\t<!-- Show Excerpt? Checkbox -->\r\n\r\n\t<p>\r\n\r\n\t<label for=\"<?php echo $this->get_field_id( 'excerpt' ); ?>\"><?php _e('Show excerpt?', 'Sandy_RSS'); ?></label>\r\n\r\n\t<input class=\"checkbox\" type=\"checkbox\" <?php checked( $instance['excerpt'], 'on' ); ?> id=\"<?php echo $this->get_field_id( 'excerpt' ); ?>\" name=\"<?php echo $this->get_field_name( 'excerpt' ); ?>\" />\r\n\r\n\t<label for=\"<?php echo $this->get_field_id( 'charex' ); ?>\"><?php _e(' and limit it to ', 'Sandy_RSS'); ?></label>\r\n\r\n\t<input id=\"<?php echo $this->get_field_id( 'charex' ); ?>\" name=\"<?php echo $this->get_field_name( 'charex' ); ?>\" value=\"<?php echo $instance['charex']; ?>\" style=\"width:10%;\" /> chars.\r\n\r\n\t<br /><span style=\"font-size: 0.8em;\">(Warning. the excerpt may contain formatting/images: might not be suitable for sidebars)</span>\r\n\r\n </p>\r\n\r\n\r\n\r\n\t<!-- List Type: Select Box -->\r\n\r\n\t<p>\r\n\r\n\t<label for=\"<?php echo $this->get_field_id( 'list' ); ?>\"><?php _e('List Type:', 'Sandy_RSS'); ?></label> \r\n\r\n\t<select id=\"<?php echo $this->get_field_id( 'list' ); ?>\" name=\"<?php echo $this->get_field_name( 'list' ); ?>\" class=\"widefat\" style=\"width:95%;\">\r\n\r\n\t<option value=\"ul\" <?php if ('ul' == $instance['list']) echo 'selected';?>>Unordered (or Dotted) List (default)</option>\r\n\r\n\t<option value=\"ol\" <?php if ('ol' == $instance['list']) echo 'selected';?>>Ordered (or Numbered) List</option>\r\n\r\n\t</select>\r\n\r\n\t</p>\r\n\r\n\r\n\r\n\t<!-- Target: Select Box -->\r\n\r\n\t<p>\r\n\r\n\t<label for=\"<?php echo $this->get_field_id( 'target' ); ?>\"><?php _e('Target:', 'Sandy_RSS'); ?></label> \r\n\r\n\t<select id=\"<?php echo $this->get_field_id( 'target' ); ?>\" name=\"<?php echo $this->get_field_name( 'target' ); ?>\" class=\"widefat\" style=\"width:95%;\">\r\n\r\n\t<option value=\"_blank\" <?php if ('_blank' == $instance['target']) echo 'selected';?>>Open link in a new window (default)</option>\r\n\r\n\t<option value=\"_self\" <?php if ('_self' == $instance['target']) echo 'selected';?>>Open link in the same window</option>\r\n\r\n\t</select>\r\n\r\n\t</p>\r\n\r\n\r\n\r\n\t<!-- Show Plugin Homepage? Checkbox -->\r\n\r\n\t<p>\r\n\r\n\t<label for=\"<?php echo $this->get_field_id( 'pubauthor' ); ?>\"><?php _e('Show footer [link to this plugin homepage]?', 'Sandy_RSS'); ?></label>\r\n\r\n\t<input class=\"checkbox\" type=\"checkbox\" <?php checked( $instance['pubauthor'], 'on' ); ?> id=\"<?php echo $this->get_field_id( 'pubauthor' ); ?>\" name=\"<?php echo $this->get_field_name( 'pubauthor' ); ?>\" /> \r\n\r\n\t<br /><span style=\"font-size: 0.9em;\">(please, say yes)</span>\r\n\r\n\t</p>\r\n\r\n<?php\r\n\r\n\t}", "public function setForm() {\n\t\t$translator = Zend_Registry::get('Zend_Translate');\n\t\t$this->setMethod('post');\n\t\t \n\t\t$this->addEnabled();\n\t\t$this->addRentDueDay();\n\t\t$this->addProrationType();\n\t\t$this->addProrationApplyMonth();\n\t\t$this->addSecondMonthDue();\n\t\t$this->addSubmitButton();\n\n\t\t$this->addDisplayGroup( $this->displayGroupArray, 'updateRentProrationSetting',array('legend' => 'rentProrationSettings'));\n\t\t$this->getDisplayGroup('updateRentProrationSetting')->setDecorators(array(\n 'FormElements',\n 'Fieldset', \n\t\t));\n\t}", "public function createComponentEditForm(){\n $frm = $this->formFactory->create();\n $listingID = $this->hlp->sess(\"listing\")->listingID;\n \n //query database for listing type\n $FE = $this->listings->isFE($listingID);\n $MS = $this->listings->isMultisig($listingID);\n \n //checkbox value rendering logic\n $checkVal = array();\n \n if ($MS){\n $checkVal[\"ms\"] = \"ms\";\n }\n \n if ($FE){\n $checkVal[\"fe\"] = \"fe\";\n }\n \n $this->lHelp->constructCheckboxList($frm)->setValue($checkVal);\n \n //discard option array\n unset($checkVal);\n\n $cnt = count ($this->postageOptions); \n $session = $this->hlp->sess(\"postage\");\n\n \n for ($i = 0; $i<$cnt; $i++){\n\n $frm->addText(\"postage\" . $i, \"Doprava\");\n $frm->addText(\"pprice\" . $i, \"Cena dopravy\");\n\n }\n \n //additional postage textboxes logic\n $counter = $session->counterEdit;\n $values = $session->values;\n \n if (!is_null($counter)){\n \n $frm->addGroup(\"Postage\");\n \n for ($i =0; $i<$counter; $i++){\n $frm->addText(\"postage\" .$i. \"X\", \"Doprava\"); \n $frm->addText(\"pprice\" .$i. \"X\", \"Cena\");\n }\n }\n \n $frm->addSubmit(\"submit\", \"Upravit\");\n $frm->addSubmit(\"add_postage\", \"Přidat dopravu\")->onClick[] = \n \n function() use($listingID) {\n \n //inline onlclick handler, that counts postage options\n $session = $this->hlp->sess(\"postage\");\n $counter = &$session->counterEdit;\n \n if ($counter <= self::MAX_POSTAGE_OPTIONS){\n $counter++;\n } else {\n $this->flashMessage(\"Dosáhli jste maxima poštovních možností.\");\n }\n \n $form = $this->getComponent(\"editForm\");\n $session->values = $form->getValues(TRUE);\n \n $this->redirect(\"Listings:editListing\", $listingID);\n };\n \n $this->lHelp->fillForm($frm, $values); \n $frm->onSuccess[] = array($this, 'editSuccess');\n $frm->onValidate[] = array($this, 'editValidate');\n \n return $frm; \n }", "function form( $instance ) {\n\t\t$defaults = array( 'title' => 'Title');\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n\t\t<!-- Widget Title: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\">Title:</label>\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:90%;\" />\n\t\t</p>\n\n\t\t<!-- Social buttons -->\n\t\t<p>Social media buttons will automatically appear once you enter your information in the \"Social Media Options\" section of the <a href=\"../wp-admin/themes.php?page=siteoptions\">Theme Options.</a></p>\n\n\n\t<?php\n\t}", "private function loadForm()\n {\n // init settings form\n $this->frm = new Form('settings');\n\n // add festival year\n $this->frm->addText('year', $this->get('fork.settings')->get($this->URL->getModule(), 'year'));\n\n // add fields for pagination\n $this->frm->addDropdown(\n 'overview_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'overview_num_items', 10)\n );\n $this->frm->addDropdown(\n 'recent_festival_list_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'recent_festival_list_num_items', 5)\n );\n\n // add functions fields\n $this->frm->addCheckbox('cover_image_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_enabled', false));\n $this->frm->addCheckbox('cover_image_required', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_required', false));\n $this->frm->addCheckbox('multi_images_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'multi_images_enabled', false));\n\n // add god user only fields\n if ($this->godUser) {\n $this->frm->addText('image_size_limit', (float) $this->get('fork.settings')->get($this->URL->getModule(), 'image_size_limit', 10));\n }\n }", "public function form()\r\n {\r\n $this->switch('field_select_create', Support::trans('main.select_create'))\r\n ->default(admin_setting('field_select_create'));\r\n }", "public function form( $instance ) { \n\t\t/* Set up default widget settings. */ \n\t\t$defaults = array( 'title' => __('Login with your Social Account', 'super-socializer'), 'title_after' => '', 'before_widget_content' => '', 'after_widget_content' => '' ); \n\n\t\tforeach( $instance as $key => $value ) { \n\t\t\tif ( is_string( $value ) ) {\n\t\t\t\t$instance[ $key ] = esc_attr( $value ); \n\t\t\t}\n\t\t}\n\n\t\t$instance = wp_parse_args( (array)$instance, $defaults ); \n\t\t?> \n\t\t<p> \n\t\t\t<p><strong>Note:</strong> <?php _e('Make sure Social Login is enabled at \"Super Socializer > Social Login\" page.', 'super-socializer') ?></p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title (before login):', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" type=\"text\" value=\"<?php echo $instance['title']; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title_after' ); ?>\"><?php _e( 'Title (after login):', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title_after' ); ?>\" name=\"<?php echo $this->get_field_name( 'title_after' ); ?>\" type=\"text\" value=\"<?php echo $instance['title_after']; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\"><?php _e( 'Before widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'before_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['before_widget_content']; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\"><?php _e( 'After widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'after_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['after_widget_content']; ?>\" /> \n\t\t\t<br /><br />\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\"><?php _e( 'Hide for logged in users:', 'super-socializer' ); ?></label> \n\t\t\t<input type=\"checkbox\" id=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\" name=\"<?php echo $this->get_field_name( 'hide_for_logged_in' ); ?>\" type=\"text\" value=\"1\" <?php if(isset($instance['hide_for_logged_in']) && $instance['hide_for_logged_in']==1) echo 'checked=\"checked\"'; ?> /> \n\t\t</p> \n<?php \n }", "public function form( $instance ) { \n\t\t/* Set up default widget settings. */ \n\t\t$defaults = array( 'title' => 'Share the joy', 'before_widget_content' => '', 'after_widget_content' => '', 'target_url_custom' => '', 'target_url' => 'default' );\n\n\t\tforeach( $instance as $key => $value ) { \n\t\t\tif ( is_string( $value ) ) {\n\t\t\t\t$instance[ $key ] = esc_attr( $value ); \n\t\t\t}\n\t\t}\n\t\t\n\t\t$instance = wp_parse_args( (array)$instance, $defaults ); \n\t\t?> \n\t\t<script type=\"text/javascript\">\n\t\t\tfunction theChampToggleHorCounterTargetUrl(val){\n\t\t\t\tif(val == 'custom'){\n\t\t\t\t\tjQuery('.theChampHorCounterTargetUrl').css('display', 'block');\n\t\t\t\t}else{\n\t\t\t\t\tjQuery('.theChampHorCounterTargetUrl').css('display', 'none');\n\t\t\t\t}\n\t\t\t}\n\t\t</script>\n\t\t<p> \n\t\t\t<p><strong>Note:</strong> <?php _e('Make sure \"Standard Like Buttons\" are enabled from \"Super Socializer > Like Buttons\" page.', 'super-socializer') ?></p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" type=\"text\" value=\"<?php echo $instance['title']; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'target_url' ); ?>\"><?php _e( 'Target Url:', 'super-socializer' ); ?></label> \n\t\t\t<select style=\"width: 95%\" onchange=\"theChampToggleHorCounterTargetUrl(this.value)\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'target_url' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url' ); ?>\">\n\t\t\t\t<option value=\"\">--<?php _e('Select', 'super-socializer') ?>--</option>\n\t\t\t\t<option value=\"default\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'default' ? 'selected' : '' ; ?>>Url of the webpage where icons are located (default)</option>\n\t\t\t\t<option value=\"homepage\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'homepage' ? 'selected' : '' ; ?>>Url of the homepage of your website</option>\n\t\t\t\t<option value=\"custom\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'custom' ? 'selected' : '' ; ?>>Custom Url</option>\n\t\t\t</select>\n\t\t\t<input placeholder=\"Custom url\" style=\"width:95%; margin-top: 5px; <?php echo !isset($instance['target_url']) || $instance['target_url'] != 'custom' ? 'display: none' : '' ; ?>\" class=\"widefat theChampHorCounterTargetUrl\" id=\"<?php echo $this->get_field_id( 'target_url_custom' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url_custom' ); ?>\" type=\"text\" value=\"<?php echo isset($instance['target_url_custom']) ? $instance['target_url_custom'] : ''; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\"><?php _e( 'Before widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'before_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['before_widget_content']; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\"><?php _e( 'After widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'after_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['after_widget_content']; ?>\" /> \n\t\t\t<br /><br /><label for=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\"><?php _e( 'Hide for logged in users:', 'super-socializer' ); ?></label> \n\t\t\t<input type=\"checkbox\" id=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\" name=\"<?php echo $this->get_field_name( 'hide_for_logged_in' ); ?>\" type=\"text\" value=\"1\" <?php if(isset($instance['hide_for_logged_in']) && $instance['hide_for_logged_in']==1) echo 'checked=\"checked\"'; ?> /> \n\t\t</p> \n\t<?php \n }", "public function form( $instance ) {\n \t// outputs the options form on admin\n }", "function widget_opml_browser_init() {\r\n\t\r\n\t// Check for the required API functions\r\n\tif ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') )\r\n\t\treturn;\r\n\r\n\t// This saves options and prints the widget's config form.\r\n\tfunction widget_opml_browser_control($number) {\r\n\r\n $options = $newoptions = get_option('widget_opml_browser');\r\n if ( $_POST[\"opml-browser-submit-$number\"] ) {\r\n $newoptions[$number]['title'] = strip_tags(stripslashes($_POST[\"opml-browser-title-$number\"]));\r\n $newoptions[$number]['opmlurl'] = $_POST[\"opml-browser-opmlurl-$number\"];\r\n $newoptions[$number]['opmlpath'] = $_POST[\"opml-browser-opmlpath-$number\"];\r\n $newoptions[$number]['opmltitle'] = $_POST[\"opml-browser-opmltitle-$number\"];\r\n\t $newoptions[$number]['imageurl'] = $_POST[\"opml-browser-imageurl-$number\"];\r\n $newoptions[$number]['monda'] = $_POST[\"opml-browser-monda-$number\"];\r\n $newoptions[$number]['reqhtml'] = $_POST[\"opml-browser-reqhtml-$number\"];\r\n $newoptions[$number]['reqfeed'] = $_POST[\"opml-browser-reqfeed-$number\"];\r\n $newoptions[$number]['noself'] = $_POST[\"opml-browser-noself-$number\"];\r\n $newoptions[$number]['opmllink'] = $_POST[\"opml-browser-opmllink-$number\"];\r\n $newoptions[$number]['showfolders'] = $_POST[\"opml-browser-showfolders-$number\"];\r\n $newoptions[$number]['closeall'] = $_POST[\"opml-browser-closeall-$number\"];\r\n\t $newoptions[$number]['sortitems'] = $_POST[\"opml-browser-sortitems-$number\"];\r\n\t $newoptions[$number]['flatten'] = $_POST[\"opml-browser-flatten-$number\"];\r\n\t $newoptions[$number]['tooltips'] = $_POST[\"opml-browser-tooltips-$number\"];\r\n $newoptions[$number]['indent'] = $_POST[\"opml-browser-indent-$number\"];\r\n\t $newoptions[$number]['credit'] = $_POST[\"opml-browser-credit-$number\"];\r\n wp_cache_delete(\"opml-browser-content-$number\");\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_opml_browser', $options);\r\n }\r\n $browser = new OpmlBrowser();\r\n ?>\r\n\t<div style=\"text-align:right\">\r\n\t <label for=\"opml-browser-title-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Widget title: <input type=\"text\" id=\"opml-browser-title-<?php echo $number; ?>\" name=\"opml-browser-title-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo htmlspecialchars($options[$number]['title'], ENT_COMPAT, \"UTF-8\", false); ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmlurl-<?php echo $number; ?>\" style=\"display:block\">\r\n\t OPML URL: <input type=\"text\" id=\"opml-browser-opmlurl-<?php echo $number; ?>\" name=\"opml-browser-opmlurl-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmlurl']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmlpath-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Local path: <input type=\"text\" id=\"opml-browser-opmlpath-<?php echo $number; ?>\" name=\"opml-browser-opmlpath-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmlpath']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmltitle-<?php echo $number; ?>\" style=\"display:block\">\r\n\t OPML title override: <input type=\"text\" id=\"opml-browser-opmltitle-<?php echo $number; ?>\" name=\"opml-browser-opmltitle-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmltitle']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-imageurl-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Image URL: <input type=\"text\" id=\"opml-browser-imageurl-<?php echo $number; ?>\" name=\"opml-browser-imageurl-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['imageurl']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-monda-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Use rss.png from wp-includes/images (Monda option)? <input type=\"checkbox\" id=\"opml-browser-monda-<?php echo $number; ?>\" name=\"opml-browser-monda-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['monda'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-reqhtml-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude if no HTML link? <input type=\"checkbox\" id=\"opml-browser-reqhtml-<?php echo $number; ?>\" name=\"opml-browser-reqhtml-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['reqhtml'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-reqfeed-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude if no feed link? <input type=\"checkbox\" id=\"opml-browser-reqfeed-<?php echo $number; ?>\" name=\"opml-browser-reqfeed-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['reqfeed'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-noself-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude <?php echo $browser->host;?>? <input type=\"checkbox\" id=\"opml-browser-noself-<?php echo $number; ?>\" name=\"opml-browser-noself-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['noself'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-opmllink-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Link to OPML? <input type=\"checkbox\" id=\"opml-browser-opmllink-<?php echo $number; ?>\" name=\"opml-browser-opmllink-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['opmllink'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-showfolders-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Show clickable folders for categories? <input type=\"checkbox\" id=\"opml-browser-showfolders-<?php echo $number; ?>\" name=\"opml-browser-showfolders-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['showfolders'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-closeall-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Start with folders closed? <input type=\"checkbox\" id=\"opml-browser-closeall-<?php echo $number; ?>\" name=\"opml-browser-closeall-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['closeall'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-sortitems-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Sort items? <input type=\"checkbox\" id=\"opml-browser-sortitems-<?php echo $number; ?>\" name=\"opml-browser-sortitems-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['sortitems'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <label for=\"opml-browser-flatten-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Flatten hierarchy? <input type=\"checkbox\" id=\"opml-browser-flatten-<?php echo $number; ?>\" name=\"opml-browser-flatten-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['flatten'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <label for=\"opml-browser-tooltips-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Include OPML descriptions as tooltips? <input type=\"checkbox\" id=\"opml-browser-tooltips-<?php echo $number; ?>\" name=\"opml-browser-tooltips-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['tooltips'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-indent-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Left indent (CSS margin) <input type=\"text\", id=\"opml-browser-indent-<?php echo $number; ?>\" name=\"opml-browser-indent-<?php echo $number; ?>\" size=\"10\" value=\"<?php echo $options[$number]['indent']; ?>\" />\r\n\t </label>\r\n\t <label for=\"opml-browser-credit-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Include &quot;Get this widget&quot; link (please)? <input type=\"checkbox\" id=\"opml-browser-credit-<?php echo $number; ?>\" name=\"opml-browser-credit-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['credit'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <input type=\"hidden\" name=\"opml-browser-submit-<?php echo $number; ?>\" id=\"opml-browser-submit-<?php echo $number; ?>\" value=\"1\" />\r\n\t</div>\r\n\t <?php\r\n\t}\r\n \r\n\r\n\t// This prints the widget\r\n\tfunction widget_opml_browser($args, $number = 1) {\r\n \r\n \t extract($args);\r\n\t $defaults = array('title' => 'Blogroll');\r\n\t $options = (array) get_option('widget_opml_browser');\r\n\t\r\n\t foreach ( $defaults as $key => $value )\r\n\t\tif ( !isset($options[$number][$key]) )\r\n\t\t\t$options[$number][$key] = $defaults[$key];\r\n\t\r\n\t echo $before_widget;\r\n\t echo $before_title . $options[$number]['title'] . $after_title;\r\n\t ?>\r\n\r\n <div id=\"opml-browser-box-<?php echo $number; ?>\">\r\n <?php\r\n if ($widget_content = wp_cache_get(\"opml-browser-content-$number\")) {\r\n echo $widget_content; // Found it in the cache\r\n }\r\n else\r\n {\r\n if (isset($options[$number]['opmlpath']) && ($options[$number]['opmlpath'] != ''))\r\n $filename = $options[$number]['opmlpath'];\r\n else\r\n $filename = $options[$number]['opmlurl'];\r\n if (isset($filename) && ($filename != '')) {\r\n $browser = new OpmlBrowser();\r\n $browser->filename = $filename;\r\n if ($options[$number]['opmllink'] == '1')\r\n {\r\n $browser->opmlurl = $options[$number]['opmlurl'];\r\n $browser->opmltitle = $options[$number]['opmltitle'];\r\n }\r\n\t\t\t$imageurl = $options[$number]['imageurl'];\r\n\t\t\tif (isset($imageurl) && ($imageurl != ''))\r\n\t\t\t{\r\n\t\t\t if (substr_compare($imageurl, '/', -1) != 0)\r\n\t\t\t {\r\n\t\t\t $imageurl .= '/';\r\n\t\t\t }\r\n\t\t\t $browser->image_url = $imageurl;\r\n\t\t\t}\r\n\t\t\t$browser->monda = ($options[$number]['monda'] == '1');\r\n $browser->require_html = ($options[$number]['reqhtml'] == '1');\r\n $browser->require_feed = ($options[$number]['reqfeed'] == '1');\r\n $browser->exclude_self = ($options[$number]['noself'] == '1');\r\n\t\t\t$browser->show_folders = ($options[$number]['showfolders'] == '1');\r\n $browser->closeall = ($options[$number]['closeall'] == '1');\r\n $browser->sort_items = ($options[$number]['sortitems'] == '1');\r\n\t\t\t$browser->flatten = ($options[$number]['flatten'] == '1');\r\n\t\t\t$browser->tooltips = ($options[$number]['tooltips'] == '1');\r\n $browser->margin = $options[$number]['indent'];\r\n\t\t\t$browser->credit = ($options[$number]['credit'] == '1');\r\n $browser->name = \"-widget-$number-\";\r\n $widget_content = $browser->render();\r\n\t\t\tif ($browser->credit)\r\n\t\t\t{\r\n\t\t\t $widget_content.= '<div id=\"opml-browser-link-' . $number . '\" class=\"opml-browser-link\"><a href=\"http://chipstips.com/?tag=phpopmlbrowse\">Get this widget</a></div>';\r\n\t\t\t}\r\n echo $widget_content;\r\n wp_cache_add(\"opml-browser-content-$number\", $widget_content);\r\n }\r\n else\r\n {\r\n echo \"<p>OPML URL or file not specified</p>\";\r\n }\r\n }\r\n ?>\r\n </div>\r\n\t <?php\r\n\t\techo $after_widget;\r\n\t}\r\n\r\n function widget_opml_browser_register()\r\n {\r\n // Check for version upgrade\r\n $options = get_option('widget_opml_browser');\r\n $need_update = false;\r\n if (isset($options['version'])) {\r\n $curver = $options['version'];\r\n if ($curver < 1.2) {\r\n $curver = 1.2;\r\n $options['version'] = $curver;\r\n $options[1]['title'] = $options['title'];\r\n $options[1]['opmlurl'] = $options['opmlurl'];\r\n $options[1]['opmlpath'] = $options['opmlpath'];\r\n $options[1]['reqhtml'] = $options['reqhtml'];\r\n $options[1]['reqfeed'] = $options['reqfeed'];\r\n $options[1]['noself'] = $options['noself'];\r\n $options[1]['opmllink'] = $options['opmllink'];\r\n $options[1]['closeall'] = $options['closeall'];\r\n $options[1]['indent'] = $options['indent'];\r\n $options['number'] = 1;\r\n $need_update = true;\r\n }\r\n /* No changes to options between 1.2 and 2.2 */\r\n\t if ($curver < 2.2) {\r\n\t $curver = 2.2;\r\n $options['version'] = $curver;\r\n\t\tfor ($i = 1; $i <= $options['number']; $i++)\r\n\t\t{\r\n\t\t $options[$i]['imageurl'] = get_settings('siteurl') . '/wp-content/plugins/opml-browser/images/';\r\n\t\t $options[$i]['tooltips'] = '1';\r\n\t\t $options[$i]['credit'] = '1';\r\n\t\t}\r\n\t\t$need_update = true;\r\n\t }\r\n\t if ($curver < 2.3) {\r\n\t $curver = 2.3;\r\n\t\t$options['version'] = $curver;\r\n\t\tfor ($i = 1; $i <= $options['number']; $i++)\r\n\t\t{\r\n\t\t $options[$i]['showfolders'] = '1';\r\n\t\t}\r\n\t\t$need_update = true;\r\n\t }\r\n\t if ($curver < 2.4) {\r\n\t $curver = 2.4;\r\n\t\t$options['version'] = $curver;\r\n\t\t$need_update = true;\r\n\t }\r\n }\r\n else {\r\n $curver = 2.4;\r\n $options['version'] = $curver;\r\n\t $options[1]['imageurl'] = get_settings('siteurl') . '/wp-content/plugins/opml-browser/images/';\r\n\t $options[1]['tooltips'] = '1';\r\n $options[1]['indent'] = \"5px\";\r\n\t $options[1]['credit'] = '1';\r\n $need_update = true;\r\n }\r\n\r\n $number = $options['number'];\r\n if ( $number < 1 ) {\r\n $number = 1;\r\n $options['number'] = 1;\r\n $need_update = true;\r\n }\r\n else if ( $number > 9 ) {\r\n $number = 9;\r\n $options['number'] = 9;\r\n $need_update = true;\r\n }\r\n\r\n // Apply any upgrades here by testing $curver and setting $need_update to true\r\n\r\n if ($need_update)\r\n update_option('widget_opml_browser', $options);\r\n\r\n for ($i = 1; $i <= 9; $i++) {\r\n $name = array('opml-browser %s', null, $i);\r\n register_sidebar_widget($name, $i <= $number ? 'widget_opml_browser' : /* unregister */ '', $i);\r\n register_widget_control($name, $i <= $number ? 'widget_opml_browser_control' : /* unregister */ '', 550, 500, $i);\r\n }\r\n add_action('sidebar_admin_setup', 'widget_opml_browser_setup');\r\n add_action('sidebar_admin_page', 'widget_opml_browser_page');\r\n\r\n // add the Link to the OPML file For Autodiscovery\r\n add_action('wp_head', 'opml_browser_head');\t\r\n\r\n // Add a filter for embedded browsers in content\r\n add_filter('the_content', 'opml_browser_content_filter');\r\n }\r\n\r\n function widget_opml_browser_setup() {\r\n $options = $newoptions = get_option('widget_opml_browser');\r\n if ( isset($_POST['opml-browser-number-submit']) ) {\r\n $number = (int) $_POST['opml-browser-number'];\r\n if ( $number > 9 ) $number = 9;\r\n else if ( $number < 1 ) $number = 1;\r\n $newoptions['number'] = $number;\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_opml_browser', $options);\r\n widget_opml_browser_register();\r\n }\r\n }\r\n\r\n function widget_opml_browser_page() {\r\n $options = $newoptions = get_option('widget_opml_browser');\r\n?>\r\n\t<div class=\"wrap\">\r\n\t\t<form method=\"POST\">\r\n\t\t\t<h2>OPML Browser Widgets</h2>\r\n\t\t\t<p><?php _e('How many opml-browser widgets would you like?'); ?>\r\n\t\t\t<select id=\"opml-browser-number\" name=\"opml-browser-number\" value=\"<?php echo $options['number']; ?>\">\r\n<?php for ( $i = 1; $i < 10; ++$i ) echo \"<option value='$i' \".($options['number']==$i ? \"selected='selected'\" : '').\">$i</option>\"; ?>\r\n\t\t\t</select>\r\n\t\t\t<span class=\"submit\"><input type=\"submit\" name=\"opml-browser-number-submit\" id=\"opml-browser-number-submit\" value=\"<?php _e('Save'); ?>\" /></span></p>\r\n\t\t</form>\r\n\t</div>\r\n<?php\r\n }\r\n\r\n function opml_browser_head(){\r\n $options = (array) get_option('widget_opml_browser');\r\n $number = $options['number'];\r\n for ($i = 1; $i <= 9; $i++) {\r\n $opmlurl = $options[$i]['opmlurl'];\r\n if (isset($opmlurl) && $opmlurl != '')\r\n echo ' <link rel=\"outline\" type=\"text/x-opml\" title=\"OPML\" href=\"'.$opmlurl.'\" />';\r\n }\r\n\t$filepath = get_settings('siteurl') . '/wp-content/plugins/opml-browser/';\r\n\t$filebase = $filepath . 'opml-browser.';\r\n // Link our JavaScript\r\n\techo '<script language=\"javascript\" type=\"text/javascript\" src=\"' . $filebase . 'js\"></script>';\r\n\t// and our stylesheet\r\n\techo '<link rel=\"StyleSheet\" type=\"text/css\" href=\"' . $filebase . 'css\"/>';\r\n\t// Set the image URL for JavaScript\r\n\techo '<script language=\"javascript\" type=\"text/javascript\">opml_browser.image_url = \\'' .\r\n\t\t$filepath . 'images\\';</script>';\r\n }\r\n\r\n function opml_browser_content_filter($text) {\r\n $textarray = preg_split(\"/(\\[opml-browser.*\\])/sU\", $text, -1, PREG_SPLIT_DELIM_CAPTURE);\r\n $limit = count($textarray);\r\n $output = '';\r\n for ($i = 0; $i < $limit; $i++) {\r\n $content = $textarray[$i];\r\n if (preg_match(\"/\\[opml-browser(.*)\\]/sU\", $content, $bcode)) {\r\n $bcode = $bcode[1];\r\n $bcode = preg_replace(array('/\\&#8221;/','/\\&#8243;/'), '\"', $bcode, -1);\r\n $browser = new OpmlBrowser();\r\n $browser->opmlurl = parse_attribute_value($bcode, \"opmlurl\");\r\n $browser->filename = parse_attribute_value($bcode, \"filename\");\r\n if (is_null($browser->filename) || $browser->filename == '') {\r\n $browser->filename = $browser->opmlurl;\r\n }\r\n if (parse_attribute_value($bcode, \"link_opml\") != \"1\") {\r\n $browser->opmlurl = null;\r\n }\r\n $browser->opmltitle = parse_attribute_value($bcode, 'opmltitle');\r\n\t\t$imageurl = parse_attribute_value($bcode, 'imageurl');\r\n\t\tif (isset($imageurl) && ($imageurl != ''))\r\n\t\t{\r\n\t\t if (substr_compare($imageurl, '/', -1) != 0)\r\n\t\t {\r\n\t\t $imageurl .= '/';\r\n\t\t }\r\n\t\t $browser->image_url = $imageurl;\r\n\t\t}\r\n\t\t$browser->monda = (parse_attribute_value($bcode, 'monda') == '1');\r\n $browser->require_html = (parse_attribute_value($bcode, 'require_html') == '1');\r\n $browser->require_feed = (parse_attribute_value($bcode, 'require_feed') == '1');\r\n $browser->exclude_self = (parse_attribute_value($bcode, 'exclude_self') == '1');\r\n $browser->show_folders = (parse_attribute_value($bcode, 'show_folders') != '0');\r\n $browser->closeall = (parse_attribute_value($bcode, 'closeall') == '1');\r\n\t\t$browser->sort_items = (parse_attribute_value($bcode, 'sort') == '1');\r\n\t\t$browser->flatten = (parse_attribute_value($bcode, 'flatten') == '1');\r\n\t\t$browser->tooltips = (parse_attribute_value($bcode, 'tooltips') != '0');\r\n $browser->margin = parse_attribute_value($bcode, 'margin');\r\n\t\t$browser->credit = (parse_attribute_value($bcode, 'credit') != '0');\r\n $browser->name = parse_attribute_value($bcode, 'name');\r\n $output .= $browser->render();\r\n }\r\n else\r\n $output .= $content;\r\n }\r\n return $output;\r\n }\r\n\r\n widget_opml_browser_register();\r\n}", "function form( $instance ) {\n\n\t\t\t\t // instance exist? if not set defaults\n\t\tif ( $instance ) {\n\t\t\t$title = $instance['title'];\n\t\t\t$types = $instance['types'];\n\t\t\t$num = $instance['num'];\n\t\t\t$width = $instance['width'];\n\t\t\t$image_size = $instance['image_size'];\n\t\t} else {\n\t\t\t//These are our defaults\n\t\t\t$title = '';\n\t\t\t$types = 'post';\n\t\t\t$num = '5';\n\t\t\t$width = '50%';\n\t\t\t$image_size = 'thumbnail';\n\t\t}\n\t\t\n\t\t/* Set up some default widget settings. \n\t\t$defaults = array( \n\t\t\t'title' => __('Featured content', 'showshop'),\n\t\t\t'num' => 6,\n\t\t\t'width'=>'45%',\n\t\t\t'image_size' => 'thumbnail' ,\n\t\t\t'types' => 'post'\n\t\t\t);\n\t\t\t\n\t\t$instance = wp_parse_args( (array) $instance, $defaults );\n\t\t*/\n\t\t$types = explode(',', $types);\n\t\t\n\t\t//Count number of post types for select box sizing\n\t\t$custom_post_list_types = get_post_types( array( 'public' => true ), 'names' );\n\t\tforeach ($custom_post_list_types as $custom_post_list ) {\n\t\t $custom_post_list_ar[] = $custom_post_list;\n\t\t}\n\t\t$n = count($custom_post_list_ar);\n\t\tif($n > 10) { $n = 10;}\n\t\t?>\n\t\t\n\t\t\n\t\t<!-- Widget Title: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr($this->get_field_id( 'title' )); ?>\"><?php esc_html_e('Title:', 'showshop'); ?></label>\n\t\t\t<input id=\"<?php echo esc_attr($this->get_field_id( 'title' )); ?>\" name=\"<?php echo esc_attr($this->get_field_name( 'title' )); ?>\" value=\"<?php echo sanitize_text_field($title); ?>\" style=\"width:100%;\" />\n\t\t</p>\n\t\t\n\t\t<!-- Number of images: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr($this->get_field_id( 'num' )); ?>\"><?php esc_html_e('Number of images:', 'showshop'); ?></label>\n\t\t\t<input id=\"<?php echo esc_attr($this->get_field_id( 'num' )); ?>\" name=\"<?php echo esc_attr($this->get_field_name( 'num' )); ?>\" value=\"<?php echo sanitize_text_field($num); ?>\" style=\"width:100%;\" />\n\t\t</p>\n\t\t\n\t\t<!-- Post types : multislect -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr($this->get_field_id('types')); ?>\"><?php esc_html_e( 'Post type:','showshop' ); ?></label>\n\t\t\t<select name=\"<?php echo esc_attr($this->get_field_name('types')); ?>[]\" id=\"<?php echo esc_attr($this->get_field_id('types')); ?>\" class=\"widefat\" style=\"height: auto;\" size=\"<?php echo esc_attr($n) ?>\" >\n\t\t\t<?php \n\t\t\t$args = array( 'public' => true );\n\t\t\t$post_types = get_post_types( $args, 'names' );\n\t\t\tforeach ($post_types as $post_type ) { \n\t\t\t\tif( !( $post_type == 'revision' || $post_type == 'nav_menu_item' || $post_type == 'attachment' || $post_type == 'options' || $post_type == 'slogan')) {\n\t\t\t?>\n\t\t\t\t<option value=\"<?php echo esc_attr($post_type); ?>\" <?php if( in_array($post_type, $types)) { echo 'selected=\"selected\"'; } ?>><?php echo esc_html($post_type);?></option>\n\t\t\t<?php \n\t\t\t\t} //endif\n\t\t\t}// end foreach\n\t\t\t?>\n\t\t\t</select>\n\t\t</p>\n\n\t\t<!-- Image sizes : select -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr($this->get_field_id('image_size')); ?>\"><?php esc_html_e( 'Image sizes:','showshop' ); ?></label>\n\t\t\t<?php \n\t\t\t$sizes = array();\n\t\t\t$image_sizes = array();\n\t\t\t$added_sizes = get_intermediate_image_sizes();\n\t\t\t\n\t\t\tforeach( $added_sizes as $key => $value) {\n\t\t\t\t$image_sizes[$value] = $value;\n\t\t\t}\n\t\t\t?>\n\t\t\t\n\t\t\t<select id=\"<?php echo esc_attr($this->get_field_id('image_size')); ?>\" name=\"<?php echo esc_attr($this->get_field_name('image_size')); ?>\">\n\t\t\t\n\t\t\t<?php \n\t\t\tforeach($image_sizes as $key=>$value) {\n\t\t\t\techo '<option value=\"'.$key.'\" '.selected( $instance['image_size'], $key, false ).'>'.htmlspecialchars($value).'</option>';\n\t\t\t}\n\t\t\t?>\n\t\t\t</select>\n\t\t\t\n\n\t\t</p>\n\t\n\t\t<!-- Images width: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr($this->get_field_id( 'width' )); ?>\"><?php esc_html_e('Image width in px or % (height is set auto):', 'showshop'); ?></label>\n\t\t\t<input id=\"<?php echo esc_attr($this->get_field_id( 'width' )); ?>\" name=\"<?php echo esc_attr($this->get_field_name( 'width' )); ?>\" value=\"<?php echo sanitize_text_field($width); ?>\" style=\"width:100%;\" />\n\t\t</p>\n\t\t\n\t<?php\n\t}", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "public function hookForm() {\n if ($this->isCompanyForm()) {\n $this->setDefaultExpDate();\n $this->makeBillingAreaRequired();\n }\n elseif ($this->isCompanyViewsMultiSearchForm()) {\n $this->form['company_name']['#type'] = 'textarea';\n $this->duplicateField('sort_by');\n }\n }", "public function form( $instance ) { \n\t\t/* Set up default widget settings. */ \n\t\t$defaults = array('alignment' => 'left', 'show_counts' => '', 'total_shares' => '', 'left_offset' => '40', 'right_offset' => '0', 'target_url' => 'default', 'target_url_custom' => '', 'top_offset' => '100', 'vertical_bg' => '', 'hide_for_logged_in' => '');\n\n\t\tforeach( $instance as $key => $value ) { \n\t\t\tif ( is_string( $value ) ) {\n\t\t\t\t$instance[ $key ] = esc_attr( $value ); \n\t\t\t}\n\t\t}\n\t\t\n\t\t$instance = wp_parse_args( (array)$instance, $defaults ); \n\t\t?> \n\t\t<p> \n\t\t\t<script>\n\t\t\tfunction theChampToggleSharingOffset(alignment){\n\t\t\t\tif(alignment == 'left'){\n\t\t\t\t\tjQuery('.theChampSharingLeftOffset').css('display', 'block');\n\t\t\t\t\tjQuery('.theChampSharingRightOffset').css('display', 'none');\n\t\t\t\t}else{\n\t\t\t\t\tjQuery('.theChampSharingLeftOffset').css('display', 'none');\n\t\t\t\t\tjQuery('.theChampSharingRightOffset').css('display', 'block');\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction theChampToggleVerticalSharingTargetUrl(val){\n\t\t\t\tif(val == 'custom'){\n\t\t\t\t\tjQuery('.theChampVerticalSharingTargetUrl').css('display', 'block');\n\t\t\t\t}else{\n\t\t\t\t\tjQuery('.theChampVerticalSharingTargetUrl').css('display', 'none');\n\t\t\t\t}\n\t\t\t}\n\t\t\t</script>\n\t\t\t<p><strong>Note:</strong> <?php _e('Make sure \"Floating Social Sharing\" is enabled at \"Super Socializer > Social Sharing\" page.', 'super-socializer') ?></p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'show_counts' ); ?>\"><?php _e( 'Show individual share counts:', 'super-socializer' ); ?></label>\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'show_counts' ); ?>\" name=\"<?php echo $this->get_field_name( 'show_counts' ); ?>\" type=\"checkbox\" value=\"1\" <?php echo isset($instance['show_counts']) && $instance['show_counts'] == 1 ? 'checked' : ''; ?> /><br/><br/> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'total_shares' ); ?>\"><?php _e( 'Show total shares:', 'super-socializer' ); ?></label> \n\t\t\t<input id=\"<?php echo $this->get_field_id( 'total_shares' ); ?>\" name=\"<?php echo $this->get_field_name( 'total_shares' ); ?>\" type=\"checkbox\" value=\"1\" <?php echo isset($instance['total_shares']) && $instance['total_shares'] == 1 ? 'checked' : ''; ?> /><br/> <br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'target_url' ); ?>\"><?php _e( 'Target Url:', 'super-socializer' ); ?></label> \n\t\t\t<select style=\"width: 95%\" onchange=\"theChampToggleVerticalSharingTargetUrl(this.value)\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'target_url' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url' ); ?>\">\n\t\t\t\t<option value=\"\">--<?php _e('Select', 'super-socializer') ?>--</option>\n\t\t\t\t<option value=\"default\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'default' ? 'selected' : '' ; ?>>Url of the webpage where icons are located (default)</option>\n\t\t\t\t<option value=\"homepage\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'homepage' ? 'selected' : '' ; ?>>Url of the homepage of your website</option>\n\t\t\t\t<option value=\"custom\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'custom' ? 'selected' : '' ; ?>>Custom Url</option>\n\t\t\t</select>\n\t\t\t<input placeholder=\"Custom url\" style=\"width:95%; margin-top: 5px; <?php echo !isset($instance['target_url']) || $instance['target_url'] != 'custom' ? 'display: none' : '' ; ?>\" class=\"widefat theChampVerticalSharingTargetUrl\" id=\"<?php echo $this->get_field_id( 'target_url_custom' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url_custom' ); ?>\" type=\"text\" value=\"<?php echo isset($instance['target_url_custom']) ? $instance['target_url_custom'] : ''; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'alignment' ); ?>\"><?php _e( 'Alignment', 'super-socializer' ); ?></label> \n\t\t\t<select onchange=\"theChampToggleSharingOffset(this.value)\" style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'alignment' ); ?>\" name=\"<?php echo $this->get_field_name( 'alignment' ); ?>\">\n\t\t\t\t<option value=\"left\" <?php echo $instance['alignment'] == 'left' ? 'selected' : ''; ?>><?php _e( 'Left', 'super-socializer' ) ?></option>\n\t\t\t\t<option value=\"right\" <?php echo $instance['alignment'] == 'right' ? 'selected' : ''; ?>><?php _e( 'Right', 'super-socializer' ) ?></option>\n\t\t\t</select>\n\t\t\t<div class=\"theChampSharingLeftOffset\" <?php echo $instance['alignment'] == 'right' ? 'style=\"display: none\"' : ''; ?>>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'left_offset' ); ?>\"><?php _e( 'Left Offset', 'super-socializer' ); ?></label> \n\t\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'left_offset' ); ?>\" name=\"<?php echo $this->get_field_name( 'left_offset' ); ?>\" type=\"text\" value=\"<?php echo $instance['left_offset']; ?>\" />px<br/>\n\t\t\t</div>\n\t\t\t<div class=\"theChampSharingRightOffset\" <?php echo $instance['alignment'] == 'left' ? 'style=\"display: none\"' : ''; ?>>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'right_offset' ); ?>\"><?php _e( 'Right Offset', 'super-socializer' ); ?></label> \n\t\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'right_offset' ); ?>\" name=\"<?php echo $this->get_field_name( 'right_offset' ); ?>\" type=\"text\" value=\"<?php echo $instance['right_offset']; ?>\" />px<br/>\n\t\t\t</div>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'top_offset' ); ?>\"><?php _e( 'Top Offset', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'top_offset' ); ?>\" name=\"<?php echo $this->get_field_name( 'top_offset' ); ?>\" type=\"text\" value=\"<?php echo $instance['top_offset']; ?>\" />px<br/>\n\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'vertical_bg' ); ?>\"><?php _e( 'Background Color', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'vertical_bg' ); ?>\" name=\"<?php echo $this->get_field_name( 'vertical_bg' ); ?>\" type=\"text\" value=\"<?php echo $instance['vertical_bg']; ?>\" />\n\t\t\t\n\t\t\t<br /><br /><label for=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\"><?php _e( 'Hide for logged in users:', 'super-socializer' ); ?></label> \n\t\t\t<input type=\"checkbox\" id=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\" name=\"<?php echo $this->get_field_name( 'hide_for_logged_in' ); ?>\" type=\"text\" value=\"1\" <?php if(isset($instance['hide_for_logged_in']) && $instance['hide_for_logged_in']==1) echo 'checked=\"checked\"'; ?> /> \n\t\t</p> \n\t<?php \n }", "public function form( $instance ) { \n\t\t/* Set up default widget settings. */ \n\t\t$defaults = array( 'title' => 'Share the joy', 'show_counts' => '', 'total_shares' => '', 'target_url' => 'default', 'target_url_custom' => '', 'before_widget_content' => '', 'after_widget_content' => '', 'hide_for_logged_in' => '' );\n\n\t\tforeach( $instance as $key => $value ) { \n\t\t\tif ( is_string( $value ) ) {\n\t\t\t\t$instance[ $key ] = esc_attr( $value ); \n\t\t\t}\n\t\t}\n\t\t\n\t\t$instance = wp_parse_args( (array)$instance, $defaults );\n\t\t?> \n\t\t<script type=\"text/javascript\">\n\t\t\tfunction theChampToggleHorSharingTargetUrl(val){\n\t\t\t\tif(val == 'custom'){\n\t\t\t\t\tjQuery('.theChampHorSharingTargetUrl').css('display', 'block');\n\t\t\t\t}else{\n\t\t\t\t\tjQuery('.theChampHorSharingTargetUrl').css('display', 'none');\n\t\t\t\t}\n\t\t\t}\n\t\t</script>\n\t\t<p> \n\t\t\t<p><strong>Note:</strong> <?php _e('Make sure \"Standard Social Sharing\" is enabled at \"Super Socializer > Social Sharing\" page.', 'super-socializer') ?></p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" type=\"text\" value=\"<?php echo $instance['title']; ?>\" /> <br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'show_counts' ); ?>\"><?php _e( 'Show individual share counts:', 'super-socializer' ); ?></label> \n\t\t\t<input id=\"<?php echo $this->get_field_id( 'show_counts' ); ?>\" name=\"<?php echo $this->get_field_name( 'show_counts' ); ?>\" type=\"checkbox\" value=\"1\" <?php echo isset($instance['show_counts']) && $instance['show_counts'] == 1 ? 'checked' : ''; ?> /><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'total_shares' ); ?>\"><?php _e( 'Show total shares:', 'super-socializer' ); ?></label> \n\t\t\t<input id=\"<?php echo $this->get_field_id( 'total_shares' ); ?>\" name=\"<?php echo $this->get_field_name( 'total_shares' ); ?>\" type=\"checkbox\" value=\"1\" <?php echo isset($instance['total_shares']) && $instance['total_shares'] == 1 ? 'checked' : ''; ?> /><br/> <br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'target_url' ); ?>\"><?php _e( 'Target Url:', 'super-socializer' ); ?></label> \n\t\t\t<select style=\"width: 95%\" onchange=\"theChampToggleHorSharingTargetUrl(this.value)\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'target_url' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url' ); ?>\">\n\t\t\t\t<option value=\"\">--<?php _e('Select', 'super-socializer') ?>--</option>\n\t\t\t\t<option value=\"default\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'default' ? 'selected' : '' ; ?>>Url of the webpage where icons are located (default)</option>\n\t\t\t\t<option value=\"homepage\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'homepage' ? 'selected' : '' ; ?>>Url of the homepage of your website</option>\n\t\t\t\t<option value=\"custom\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'custom' ? 'selected' : '' ; ?>>Custom Url</option>\n\t\t\t</select>\n\t\t\t<input placeholder=\"Custom url\" style=\"margin-top: 5px; <?php echo !isset($instance['target_url']) || $instance['target_url'] != 'custom' ? 'display: none' : '' ; ?>\" class=\"widefat theChampHorSharingTargetUrl\" id=\"<?php echo $this->get_field_id( 'target_url_custom' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url_custom' ); ?>\" type=\"text\" value=\"<?php echo isset($instance['target_url_custom']) ? $instance['target_url_custom'] : ''; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\"><?php _e( 'Before widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'before_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['before_widget_content']; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\"><?php _e( 'After widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'after_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['after_widget_content']; ?>\" /> \n\t\t\t<br /><br /><label for=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\"><?php _e( 'Hide for logged in users:', 'super-socializer' ); ?></label> \n\t\t\t<input type=\"checkbox\" id=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\" name=\"<?php echo $this->get_field_name( 'hide_for_logged_in' ); ?>\" type=\"text\" value=\"1\" <?php if(isset($instance['hide_for_logged_in']) && $instance['hide_for_logged_in']==1) echo 'checked=\"checked\"'; ?> /> \n\t\t</p> \n\t<?php \n }", "protected function getForm() {\n\t\tglobal $wgScript;\n\n\t\t$this->opts['title'] = $this->getPageTitle()->getPrefixedText();\n\t\tif ( !isset( $this->opts['target'] ) ) {\n\t\t\t$this->opts['target'] = '';\n\t\t} else {\n\t\t\t$this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] );\n\t\t}\n\n\t\tif ( !isset( $this->opts['namespace'] ) ) {\n\t\t\t$this->opts['namespace'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['nsInvert'] ) ) {\n\t\t\t$this->opts['nsInvert'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['associated'] ) ) {\n\t\t\t$this->opts['associated'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['contribs'] ) ) {\n\t\t\t$this->opts['contribs'] = 'user';\n\t\t}\n\n\t\tif ( !isset( $this->opts['year'] ) ) {\n\t\t\t$this->opts['year'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['month'] ) ) {\n\t\t\t$this->opts['month'] = '';\n\t\t}\n\n\t\tif ( $this->opts['contribs'] == 'newbie' ) {\n\t\t\t$this->opts['target'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['tagfilter'] ) ) {\n\t\t\t$this->opts['tagfilter'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['topOnly'] ) ) {\n\t\t\t$this->opts['topOnly'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['newOnly'] ) ) {\n\t\t\t$this->opts['newOnly'] = false;\n\t\t}\n\n\t\t$form = Html::openElement(\n\t\t\t'form',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'action' => $wgScript,\n\t\t\t\t'class' => 'mw-contributions-form'\n\t\t\t)\n\t\t);\n\n\t\t# Add hidden params for tracking except for parameters in $skipParameters\n\t\t$skipParameters = array(\n\t\t\t'namespace',\n\t\t\t'nsInvert',\n\t\t\t'deletedOnly',\n\t\t\t'target',\n\t\t\t'contribs',\n\t\t\t'year',\n\t\t\t'month',\n\t\t\t'topOnly',\n\t\t\t'newOnly',\n\t\t\t'associated'\n\t\t);\n\n\t\tforeach ( $this->opts as $name => $value ) {\n\t\t\tif ( in_array( $name, $skipParameters ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$form .= \"\\t\" . Html::hidden( $name, $value ) . \"\\n\";\n\t\t}\n\n\t\t$tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );\n\n\t\tif ( $tagFilter ) {\n\t\t\t$filterSelection = Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\t\tarray_shift( $tagFilter )\n\t\t\t);\n\t\t\t$filterSelection .= Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-input' ),\n\t\t\t\timplode( '&#160', $tagFilter )\n\t\t\t);\n\t\t} else {\n\t\t\t$filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );\n\t\t}\n\n\t\t$labelNewbies = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-newbies' )->text(),\n\t\t\t'contribs',\n\t\t\t'newbie',\n\t\t\t'newbie',\n\t\t\t$this->opts['contribs'] == 'newbie',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$labelUsername = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-username' )->text(),\n\t\t\t'contribs',\n\t\t\t'user',\n\t\t\t'user',\n\t\t\t$this->opts['contribs'] == 'user',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$input = Html::input(\n\t\t\t'target',\n\t\t\t$this->opts['target'],\n\t\t\t'text',\n\t\t\tarray( 'size' => '40', 'required' => '', 'class' => 'mw-input' ) +\n\t\t\t\t( $this->opts['target'] ? array() : array( 'autofocus' )\n\t\t\t\t)\n\t\t);\n\t\t$targetSelection = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$labelNewbies . '<br />' . $labelUsername . ' ' . $input . ' '\n\t\t);\n\n\t\t$namespaceSelection = Xml::tags(\n\t\t\t'td',\n\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\tXml::label(\n\t\t\t\t$this->msg( 'namespace' )->text(),\n\t\t\t\t'namespace',\n\t\t\t\t''\n\t\t\t)\n\t\t);\n\t\t$namespaceSelection .= Html::rawElement(\n\t\t\t'td',\n\t\t\tnull,\n\t\t\tHtml::namespaceSelector(\n\t\t\t\tarray( 'selected' => $this->opts['namespace'], 'all' => '' ),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'namespace',\n\t\t\t\t\t'id' => 'namespace',\n\t\t\t\t\t'class' => 'namespaceselector',\n\t\t\t\t)\n\t\t\t) . '&#160;' .\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'invert' )->text(),\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t$this->opts['nsInvert'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-invert' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'namespace_association' )->text(),\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t$this->opts['associated'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-namespace_association' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t)\n\t\t);\n\n\t\tif ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {\n\t\t\t$deletedOnlyCheck = Html::rawElement(\n\t\t\t\t'span',\n\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\tXml::checkLabel(\n\t\t\t\t\t$this->msg( 'history-show-deleted' )->text(),\n\t\t\t\t\t'deletedOnly',\n\t\t\t\t\t'mw-show-deleted-only',\n\t\t\t\t\t$this->opts['deletedOnly'],\n\t\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$deletedOnlyCheck = '';\n\t\t}\n\n\t\t$checkLabelTopOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-toponly' )->text(),\n\t\t\t\t'topOnly',\n\t\t\t\t'mw-show-top-only',\n\t\t\t\t$this->opts['topOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$checkLabelNewOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-newonly' )->text(),\n\t\t\t\t'newOnly',\n\t\t\t\t'mw-show-new-only',\n\t\t\t\t$this->opts['newOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$extraOptions = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly\n\t\t);\n\n\t\t$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),\n\t\t\tXml::dateMenu(\n\t\t\t\t$this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],\n\t\t\t\t$this->opts['month']\n\t\t\t) . ' ' .\n\t\t\t\tXml::submitButton(\n\t\t\t\t\t$this->msg( 'sp-contributions-submit' )->text(),\n\t\t\t\t\tarray( 'class' => 'mw-submit' )\n\t\t\t\t)\n\t\t);\n\n\t\t$form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() );\n\t\t$form .= Html::rawElement( 'table', array( 'class' => 'mw-contributions-table' ), \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $targetSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $namespaceSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $filterSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $extraOptions ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $dateSelectionAndSubmit ) . \"\\n\"\n\t\t);\n\n\t\t$explain = $this->msg( 'sp-contributions-explain' );\n\t\tif ( !$explain->isBlank() ) {\n\t\t\t$form .= \"<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>\";\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );\n\n\t\treturn $form;\n\t}", "function room_reservations_admin_settings_page($form, &$form_state) {\n $default_calendar_text = _room_reservations_get_variable('calendar_text');\n $default_reserve_room_instructions_text\n = _room_reservations_get_variable('reserve_instructions');\n $default_reserve_form_instructions_text\n = _room_reservations_get_variable('reserve_form_instructions');\n $default_policies = _room_reservations_get_variable('policies');\n $form['calendar_text'] = array(\n '#title' => t('Calendar page text'),\n '#type' => 'textarea',\n '#rows' => 5,\n '#description' => t('Text displayed at the top of the reservation\n calendar page.'),\n '#default_value' => $default_calendar_text,\n '#weight' => -90,\n );\n $form['reserve_instructions_text'] = array(\n '#title' => t('Reserve a room instructions text'),\n '#type' => 'textarea',\n '#rows' => 2,\n '#description' => t('Text displayed just above the words Reservation\n Calendar on the reservation calendar page.'),\n '#default_value' => $default_reserve_room_instructions_text,\n '#weight' => -80,\n );\n $form['form_instructions_text'] = array(\n '#title' => t('Reservation form instructions text'),\n '#type' => 'textarea',\n '#rows' => 2,\n '#description' => t('Text displayed at the top of the reservation form.'),\n '#default_value' => $default_reserve_form_instructions_text,\n '#weight' => -70,\n );\n $form['policies'] = array(\n '#title' => t('Policies'),\n '#type' => 'textarea',\n '#rows' => 10,\n '#description' => t('Policies displayed on the reservation policies page.'),\n '#default_value' => $default_policies,\n '#weight' => -60,\n );\n $form['save'] = array(\n '#type' => 'submit',\n '#value' => t('Save configuration'),\n '#weight' => 100,\n );\n $form['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset to defaults'),\n '#weight' => 101,\n );\n return $form;\n}", "public function Form()\n {\n include(CONFIG\\PATH\\FORMS . 'Account_Create.php');\n }" ]
[ "0.72983557", "0.7258511", "0.71763337", "0.7030468", "0.69945043", "0.69556177", "0.69229543", "0.6896423", "0.68752253", "0.6854969", "0.6811243", "0.6791907", "0.67672986", "0.6753069", "0.67406726", "0.673091", "0.6725855", "0.67186713", "0.67148685", "0.6695795", "0.6690486", "0.6675928", "0.6671111", "0.66487664", "0.66470414", "0.6644658", "0.6620161", "0.6603078", "0.6594189", "0.6592485", "0.65830135", "0.6578534", "0.65679413", "0.6563913", "0.6553833", "0.6550235", "0.6538585", "0.6534469", "0.653288", "0.6513367", "0.65044796", "0.65022165", "0.65021867", "0.649235", "0.6488879", "0.6488094", "0.6481545", "0.64757997", "0.6474392", "0.64714366", "0.6471413", "0.64704305", "0.6469854", "0.6467675", "0.6457604", "0.64439565", "0.6434463", "0.64271736", "0.6418372", "0.6417319", "0.6403955", "0.6402245", "0.6389468", "0.6388803", "0.6387581", "0.6387093", "0.6378027", "0.63771343", "0.63666296", "0.63661456", "0.6363228", "0.6359369", "0.63532764", "0.6350738", "0.634583", "0.63399404", "0.6339303", "0.6332264", "0.63239145", "0.63211274", "0.6319559", "0.6317991", "0.6315722", "0.6315087", "0.6308963", "0.6307905", "0.63051", "0.6302624", "0.6301614", "0.630003", "0.62873036", "0.6284028", "0.6280218", "0.6269384", "0.6265453", "0.62585217", "0.62570006", "0.62545335", "0.6252866", "0.62484086", "0.6243078" ]
0.0
-1
Create a new controller instance.
public function __construct(){ // $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Show the application dashboard.
public function index(){ $types = Types::orderBy('name','asc')->get(); $cans = Answer::all(); $subscriber = Subscriber::all(); $ques = Question::latest()->paginate(15); return view('index' , compact('ques','cans','subscriber','types')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
If $mask is a string then convert it to an integer:
public static function print_UAC_flags($mask) { if (is_string($mask)) { $mask = intval($mask); } else if (!is_int($mask)) { // Else $mask is something weird: $msg = 'ActiveDirectory::print_UAC_flags: $mask is type ' . gettype($mask); echo($msg); throw new \UnexpectedValueException($msg); } $result = ""; // Iterate over every bitmask: foreach (self::$UseraccountcontrolFlags as $key => $value) { if ($mask & $key) { $result .= $value . ","; } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function ip__mask__long_to_number($long_mask)\n\t{\n\t\t$num_mask = strpos((string)decbin($long_mask), '0');\n\t\treturn $num_mask === false ? 32 : $num_mask;\n\t}", "function mask2cidr($mask){\n\t$long = ip2long($mask);\n\t$base = ip2long('255.255.255.255');\n\treturn 32-log(($long ^ $base)+1,2);\n}", "private static function _Mask2cidr($mask) {\n\t\t$long = ip2long($mask);\n\t\t$base = ip2long('255.255.255.255');\n\t\treturn 32-log(($long ^ $base)+1,2);\n\t}", "public static function mask_to_prefix($mask)\n {\n if (false === filter_var($mask, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n throw new \\InvalidArgumentException(\"Invalid IP netmask \\\"$mask\\\"\");\n }\n return strrpos(IP::inet_ptob($mask, 32), '1') + 1;\n }", "public function getNumberMasked($mask = 'X')\n {\n $maskLength = strlen($this->getNumber()) - 4;\n\n return str_repeat($mask, $maskLength) . $this->getNumberLastFour();\n }", "protected function getMask($mask)\n {\n if (is_array($mask)) {\n $mask = array_reduce($mask, function ($combined, $val) {\n return $combined |= $this->getMask($val);\n }, 0);\n }\n\n return parent::getMask($mask);\n }", "public function countByMask(string $mask): int\n {\n return $this->model\n ->select(['id', 'word'])\n ->where('word', 'LIKE', $mask)\n ->count();\n }", "public function mask2Cidr($mask)\n {\n $base_mask = $this->convertIp2Long(self::NETMASK);\n return 32-log(($mask ^ $base_mask)+1,2);\n }", "public function __validate_mask() {\n if (isset($this->initial_data['mask'])) {\n # Check that our mask is within range (between 0-32) for IPv4 network.\n if ($this->ip_version === 4 and $this->initial_data[\"mask\"] >= 0 and $this->initial_data[\"mask\"] <= 32) {\n $this->validated_data[\"mask\"] = $this->initial_data['mask'];\n }\n elseif ($this->ip_version === 6 and $this->initial_data[\"mask\"] >= 0 and $this->initial_data[\"mask\"] <= 128) {\n $this->validated_data[\"mask\"] = $this->initial_data['mask'];\n }\n else {\n $this->errors[] = APIResponse\\get(2070);\n }\n } else {\n $this->errors[] = APIResponse\\get(2071);\n }\n }", "private function _convertNetworkMaskToCIDR($networkMask)\n {\n $binary = $this->_convertIPAddressToBinary($networkMask);\n return substr_count($binary, 1);\n }", "private function get_maskLen()\n\t{\n\t\treturn $this->m_maskLen;\n\t}", "public static function maskToCIDR($netmask){\r\nif(self::validNetMask($netmask))\r\n\treturn self::countSetBits($netmask);\r\nelse\r\n\tthrow new Exception('Invalid Netmask');\r\n}", "private function _convertNetworkMaskToWildcart($networkMask)\n {\n return long2ip(pow(2, 32)-1 ^ ip2long($networkMask));\n }", "public function setMaskAttribute($mask)\n {\n if (! is_a($mask, MaskBuilder::class)) {\n $reflection = new \\ReflectionClass(MaskBuilder::class);\n $constants = $reflection->getConstants();\n // Check if $mask is MASK_name\n switch (true) {\n // mask is int\n case is_int($mask):\n $value = $mask;\n break;\n // MASK_*\n case isset($constants['MASK_' . strtoupper($mask)]):\n $value = $constants['MASK_' . strtoupper($mask)];\n break;\n // CODE_*\n case $key = array_search(strtoupper($mask), $constants):\n $value = $constants[str_replace('CODE_', 'MASK_', $key)];\n break;\n // Else\n default:\n throw new \\InvalidArgumentException(\"The mask $mask is not supported.\");\n \n break;\n }\n $this->attributes['mask'] = $value;\n } else {\n $this->attributes['mask'] = $mask->get();\n }\n }", "private function _convertCIDRToNetworkMask($cidr)\n {\n return long2ip(pow(2, 32)-1<<32-$cidr);\n }", "function Mask($mask, $str){\n if(strlen($str) > 0){ \n $str = str_replace(\" \",\"\",$str);\n \n for($i=0;$i<strlen($str);$i++){\n $mask[strpos($mask,\"#\")] = $str[$i];\n }\n \n return $mask;\n }\n }", "public function setMask($mask)\n {\n $this->_mask = $mask;\n }", "public function scrubInt(int $data) : int;", "public function __construct($mask)\n {\n $this->mask = $mask;\n }", "function mask_format($nric) {\n if (is_numeric($nric) == 1) {\n return $nric;\n } else {\n $new_nric = substr_replace($nric, 'XXXXX', 0, 5);\n //$new_nric = substr_replace($nric,'XXXX',5); \n return $new_nric;\n }\n }", "static public function ip__mask_match($ip, $cidr, $ip_type = 'v4', $xtet_count = 0)\n\t{\n\n\t\tif(is_array($cidr)){\n\t\t\tforeach($cidr as $curr_mask){\n\t\t\t\tif(self::ip__mask_match($ip, $curr_mask, $ip_type)){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($curr_mask);\n\t\t\treturn false;\n\t\t}\n\n if( ! self::ip__validate( $ip ) || ! self::cidr__validate( $cidr ) ){\n return false;\n }\n\t\t\n\t\t$xtet_base = ($ip_type == 'v4') ? 8 : 16;\n\t\t\n\t\t// Calculate mask\n\t\t$exploded = explode('/', $cidr);\n\t\t$net_ip = $exploded[0];\n\t\t$mask = $exploded[1];\n\t\t\n\t\t// Exit condition\n\t\t$xtet_end = ceil($mask / $xtet_base);\n\t\tif($xtet_count == $xtet_end)\n\t\t\treturn true;\n\t\t\n\t\t// Lenght of bits for comparsion\n\t\t$mask = $mask - $xtet_base * $xtet_count >= $xtet_base ? $xtet_base : $mask - $xtet_base * $xtet_count;\n\t\t\n\t\t// Explode by octets/hextets from IP and Net\n\t\t$net_ip_xtets = explode($ip_type == 'v4' ? '.' : ':', $net_ip);\n\t\t$ip_xtets = explode($ip_type == 'v4' ? '.' : ':', $ip);\n\t\t\n\t\t// Standartizing. Getting current octets/hextets. Adding leading zeros.\n\t\t$net_xtet = str_pad(decbin($ip_type == 'v4' ? $net_ip_xtets[$xtet_count] : @hexdec($net_ip_xtets[$xtet_count])), $xtet_base, 0, STR_PAD_LEFT);\n\t\t$ip_xtet = str_pad(decbin($ip_type == 'v4' ? $ip_xtets[$xtet_count] : @hexdec($ip_xtets[$xtet_count])), $xtet_base, 0, STR_PAD_LEFT);\n\t\t\n\t\t// Comparing bit by bit\n\t\tfor($i = 0, $result = true; $mask != 0; $mask--, $i++){\n\t\t\tif($ip_xtet[$i] != $net_xtet[$i]){\n\t\t\t\t$result = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Recursing. Moving to next octet/hextet.\n\t\tif($result)\n\t\t\t$result = self::ip__mask_match($ip, $cidr, $ip_type, $xtet_count + 1);\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "public function withMaskingStringLength(PositiveInteger $maskingStringLength): static;", "public static function Mask($val, $mask){\n\n\t\t$maskared = '';\n\t\t$k = 0;\n\t\t\n\t\tfor ($i = 0; $i<=strlen($mask)-1; $i++) {\n\t\t \t\n\t\t \tif ($mask[$i] == '#') {\n\t\t \t\tif (isset($val[$k]))\n\t\t \t\t $maskared .= $val[$k++];\t\n\t\t \t\n\t\t \t} else {\n\t\t \t\n\t\t \tif (isset($mask[$i]))\n\t\t \t\t$maskared .= $mask[$i];\n\t\t \t}\n\t\t}\n\t\n\t\treturn $maskared;\n\n\t}", "public function getMask(): string {\n return $this->mask;\n }", "public function mask($mask = null){\n $mask = $mask !== null ? $mask : $this->mask;\n if(class_exists($mask)){\n return new $mask($this);\n }\n\n throw new MaskNotFoundException(\"Unknown mask provided: \".$mask);\n }", "function sanitize_int( $value, $key, array $data ) {\n\treturn (int) $value;\n}", "function string_to_int($str){\n\t\treturn sprintf(\"%u\",crc32($str));\n\t}", "public function toInt(): int\n {\n if ($this->ipVersion == 4) {\n return ip2long($this->addrStr);\n } else {\n throw new \\LogicException('IPv6 address cannot be converted to long');\n }\n }", "function toNumber($dest)\n {\n if ($dest)\n return ord(strtolower($dest)) - 96;\n else\n return 0;\n }", "private function get_userMaskLen()\n\t{\n\t\treturn $this->m_userMaskLen;\n\t}", "public static function mask32($a) {\n if (PHP_INT_MAX != 0x0000000080000000) { # 2147483647\n $a = -(~($a & 0x00000000FFFFFFFF) + 1);\n } return (int)$a;\n }", "public function getMaskingStringLength(): PositiveInteger;", "public static function maskPhoneNumber($_input = NULL) {\n\n $_string = self::getNumbers($_input);\n\n switch (strlen($_string)) {\n\n case 7 :\n $_mask = '###-####';\n break;\n\n case 8 :\n $_mask = '####-####';\n break;\n\n case 9 :\n $_mask = '####-#####';\n break;\n\n case 10 :\n $_mask = '(##) ####-####';\n break;\n\n case 11 :\n $_mask = '(##) ###-###-###';\n break;\n\n case 12 :\n $_mask = '(##) (##) ####-####';\n break;\n\n case 13 :\n $_mask = '(##) (##) ###-###-###';\n break;\n\n default :\n return $_input;\n }\n\n for ($count = 0; $count < strlen($_string); $count++) {\n $_mask[strpos($_mask, \"#\")] = $_string[$count];\n }\n\n return $_mask;\n }", "function getnum($str){\n return $int = (int) filter_var($str, FILTER_SANITIZE_NUMBER_INT);\n}", "function StrToNum($Str, $Check, $Magic) {\n\t\t$Int32Unit = 4294967296; // 2^32\n\t\n\t\t$length = strlen($Str);\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\t$Check *= $Magic; \t\n\t\t\t//If the float is beyond the boundaries of integer (usually +/- 2.15e+9 = 2^31), \n\t\t\t// the result of converting to integer is undefined\n\t\t\t// refer to http://www.php.net/manual/en/language.types.integer.php\n\t\t\tif ($Check >= $Int32Unit) {\n\t\t\t\t$Check = ($Check - $Int32Unit * (int) ($Check / $Int32Unit));\n\t\t\t\t//if the check less than -2^31\n\t\t\t\t$Check = ($Check < -2147483648) ? ($Check + $Int32Unit) : $Check;\n\t\t\t}\n\t\t\t$Check += ord($Str{$i}); \n\t\t}\n\t\treturn $Check;\n\t}", "protected function filterUint($value) {\n return abs((int) $value);\n }", "public function testInteger() {\n $this->assertEquals(1292932, Sanitize::integer('129sdja2932'));\n $this->assertEquals(-1275452, Sanitize::integer('-12,754.52'));\n $this->assertEquals(18840, Sanitize::integer('+18#840'));\n }", "static public function Integer( $var ) {\r\n\r\n\t\t$cleaned = filter_var( $var, FILTER_SANITIZE_NUMBER_INT);\r\n\t\treturn $cleaned == \"\" ? false : (int)$cleaned;\r\n\r\n\t}", "function ip_to_numbers($val) {\r\n\tlist($A, $B, $C, $D) = explode('.', $val);\r\n\t\r\n\treturn\r\n substr(\"000\".$A,-3). \r\n substr(\"000\".$B,-3). \r\n substr(\"000\".$C,-3). \r\n substr(\"000\".$D,-3);\r\n}", "function o_castInt($value) {\n\t\t\treturn Obj::singleton()->castInt($value);\n\t\t}", "function integeronly($string)\n\t{\n\t\t$nn = preg_replace(\"/[^0-9]/\", \"\", $string );\n\t\treturn $nn;\n\t}", "function ip_in_range($ip, $range) {\r\n if (strpos($ip, '.') !== false) { // regular IPv4\r\n if (strpos($range, '/') !== false) {\r\n // $range is in IP/NETMASK format\r\n list($range, $netmask) = explode('/', $range, 2);\r\n if (strpos($netmask, '.') !== false) {\r\n // $netmask is a 255.255.0.0 format, or 255.*\r\n $nets = explode('.', $netmask);\r\n while(count($nets) < 4) $nets[] = '*';\r\n $netmask = implode('.', $nets);\r\n // by now we have ensured that we have 4 octets of the netmask a.b.c.d\r\n $netmask = str_replace('*', '0', $netmask);\r\n $netmask_dec = ip2float($netmask);\r\n#printf(\"%-10s: %s\\n\", \"Netmask\", $netmask);\r\n#printf(\"%-10s: %-032b\\n\", \"Netmaskbin\", $netmask_dec);\r\n\r\n } else {\r\n // $netmask is a CIDR size block\r\n // fix the range argument\r\n $x = explode('.', $range);\r\n while(count($x)<4) $x[] = '0';\r\n #list($a,$b,$c,$d) = $x;\r\n #$range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\r\n $range = implode('.', $x);\r\n\r\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\r\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\r\n\r\n # Strategy 2 - Use math to create it\r\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\r\n $netmask_dec = ~ $wildcard_dec;\r\n $netmask_dec = (float)(pow(2,32) - pow(2, (32-$netmask)));\r\n\r\n }\r\n#printf(\"%-10s: %s\\n\", \"IP\", $ip);\r\n#printf(\"%-10s: %-032b\\n\", \"IPbin\", ip2float($ip));\r\n#printf(\"%-10s: %s\\n\", \"Range\", $range);\r\n#printf(\"%-10s: %-032b\\n\", \"Rangebin\", ip2float($range));\r\n#printf(\"%-10s: %-032b\\n\", \"Netmask\", $netmask_dec);\r\n# $a = float_and(ip2float($ip), $netmask_dec);\r\n# $b = float_and(ip2float($range), $netmask_dec);\r\n#printf(\"%-10s: %-032b\\n\", \"IP&MASK\", $a);\r\n#printf(\"%-10s: %-032b\\n\", \"Range&MASK\", $b);\r\n return ( float_and(ip2float($ip), $netmask_dec) == float_and(ip2float($range), $netmask_dec) );\r\n } else {\r\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\r\n if (strpos($range, '*') !==false) { // a.b.*.* format\r\n // Just convert to A-B format by setting * to 0 for A and 255 for B\r\n $lower = str_replace('*', '0', $range);\r\n $upper = str_replace('*', '255', $range);\r\n $range = \"$lower-$upper\";\r\n }\r\n\r\n if (strpos($range, '-')!==false) { // A-B format\r\n list($lower, $upper) = explode('-', $range, 2);\r\n $lower_dec = ip2float($lower);\r\n $upper_dec = ip2float($upper);\r\n $ip_dec = ip2float($ip);\r\n return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\r\n }\r\n\r\n echo 'Range argument is not in 1.2.3.4/24 or 1.2.3.4/255.255.255.0 format';\r\n return false;\r\n }\r\n }\r\n if (strpos($ip, ':') !== false) { // IPv6\r\n ini_set(\"display_errors\", 1);\r\n error_reporting(E_ALL);\r\n // Parse out the $range\r\n if (strpos($range, '/') !== false) {\r\n // $range is in IPv6/NETMASK format\r\n list($range, $netbits) = explode('/', $range, 2);\r\n $netmask_binstr = str_pad('', $netbits, '1') . str_pad('', 128-$netbits, '0');\r\n }\r\n if (preg_match('/::$/', $range)) {\r\n $range = preg_replace('/::$/', '', $range);\r\n $x = explode(':', $range);\r\n while(count($x) < 8) $x[] = '0';\r\n $range = implode(':', $x);\r\n }\r\n return ( largearray_and(ip6floatA($ip), largebin2floatA($netmask_binstr)) == largearray_and(ip6floatA($range), largebin2floatA($netmask_binstr)) );\r\n }\r\n\r\n}", "function inet6_prefix_to_mask($prefix)\r\n{\r\n /* Make sure the prefix is a number between 1 and 127 (inclusive) */\r\n $prefix = intval($prefix);\r\n if ($prefix < 0 || $prefix > 128) return false;\r\n $mask = '0b';\r\n for ($i = 0; $i < $prefix; $i++) $mask .= '1';\r\n for ($i = strlen($mask) - 2; $i < 128; $i++) $mask .= '0';\r\n $mask = gmp_strval(gmp_init($mask), 16);\r\n for ($i = 0; $i < 8; $i++) {\r\n $result .= substr($mask, $i * 4, 4);\r\n if ($i != 7) $result .= ':';\r\n } // for\r\n return inet6_compress($result);\r\n}", "function get_int($value) {\n return is_numeric($value) && !preg_match('/x/i', $value) ? $value : '0';\n}", "function char_translate($u1)\n{ \n $conv = array(0,0xffff,0,0xffff); \n //echo \"len=\".mb_strlen($u1).\" , \".bin2hex($u1).\" , \".mb_decode_numericentity($u1,$conv).\"<br>\";\n switch (mb_strlen($u1))\n {\n case 1:\n $mask = 0x7f;\n break;\n case 2:\n $mask = 0x1f3f; /* U+80 - U+7ff : 110x-xxxx-10xx-xxxx */\n break;\n case 3:\n $mask = 0x0f3f3f; /* U+800 - U+ffff : 1110-xxxx-10xx-xxxx-10xx-xxxx */\n break;\n case 4:\n $mask = 0x073f3f3f; /* U+10000 - U+1fffff : 1111-0xxx-10xx-xxxx-10xx-xxxx-10xx-xxxx */\n break;\n }\n $a = intval(bin2hex($u1),16);\n $n = $a & $mask;\n $val = intval($n); \n //var_dump($a);\n //var_dump($mask);\n //var_dump($n);\n return $val;\n}", "function PMA_ipMaskTest($testRange, $ipToTest)\n{\n $result = true;\n\n if (preg_match('|([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)/([0-9]+)|', $testRange, $regs)) {\n // performs a mask match\n $ipl = ip2long($ipToTest);\n $rangel = ip2long($regs[1] . '.' . $regs[2] . '.' . $regs[3] . '.' . $regs[4]);\n\n $maskl = 0;\n\n for ($i = 0; $i < 31; $i++) {\n if ($i < $regs[5] - 1) {\n $maskl = $maskl + PMA_pow(2, (30 - $i));\n } // end if\n } // end for\n\n if (($maskl & $rangel) == ($maskl & $ipl)) {\n return true;\n } else {\n return false;\n }\n } else {\n // range based\n $maskocts = explode('.', $testRange);\n $ipocts = explode('.', $ipToTest);\n\n // perform a range match\n for ($i = 0; $i < 4; $i++) {\n if (preg_match('|\\[([0-9]+)\\-([0-9]+)\\]|', $maskocts[$i], $regs)) {\n if (($ipocts[$i] > $regs[2])\n || ($ipocts[$i] < $regs[1])) {\n $result = false;\n } // end if\n } else {\n if ($maskocts[$i] <> $ipocts[$i]) {\n $result = false;\n } // end if\n } // end if/else\n } //end for\n } //end if/else\n\n return $result;\n}", "function calc_integ($str)\r\n\t{\r\n\treturn (int)$str;\r\n\t}", "public function getMask()\n {\n return $this->mask;\n }", "public function getMask()\n {\n return $this->mask;\n }", "public function getMask()\n {\n return $this->mask;\n }", "public static function tryParseInt(&$fld, $default = false, $allowZero = false)\n\t{\n\t\t$fld = intval($fld);\n\t\tif(!$allowZero && !$fld && $default !== false)\n\t\t\t$fld = $default;\n\t\t\t\n\t\treturn $fld;\n\t}", "private function isIntegerCast($cast)\n {\n return 0 === strncmp($cast, 'int:', 4) || 0 === strncmp($cast, 'integer:', 4);\n }", "private static function isInteger($entry) {\n return ctype_digit(strval($entry));\n }", "function cleanInt($name) {\n\t\tif (isset($this->getvars[$name])){\n\t\t\tif (is_array($this->getvars[$name])){\n\t\t\t\treturn Cgn::cleanIntArray($this->getvars[$name]);\n\t\t\t}\n\t\t\treturn intval($this->getvars[$name]);\n\t\t} else {\n\t\t\tif (@is_array($this->postvars[$name])){\n\t\t\t\treturn Cgn::cleanIntArray($this->postvars[$name]);\n\t\t\t}\n\t\t\treturn intval(@$this->postvars[$name]);\n\t\t}\n\t}", "function int_filter ($nama){\rif (is_numeric ($nama)){\rreturn (int)preg_replace ( '/\\D/i', '', $nama);\r}\relse {\r $nama = ltrim($nama, ';');\r $nama = explode (';', $nama);\r return (int)preg_replace ( '/\\D/i', '', $nama[0]);\r}\r}", "public function integer()\n\t{\n\t\treturn $this->filter(FILTER_SANITIZE_NUMBER_INT);\n\t}", "public function setMask($mask)\n {\n $this->mask = $mask;\n return $this;\n }", "public function getMask()\n {\n return self::prefix_to_mask($this->prefix, $this->version);\n }", "function testForInt($data)\r\n\t{\r\n\t\tif (!filter_var($data, FILTER_VALIDATE_INT) === false)\r\n\t\t{\r\n\t\t\treturn intval($data);\r\n\t\t} \r\n\t\telse \r\n\t\t{\r\n\t\t\techo(\"Integer is not valid<br>\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function cp_str_isInt($str){\r\n return preg_match('/^[[:digit:]]+$/',$str);\r\n}", "public static function filterInt($attrValue)\n\t{\n\t\treturn filter_var($attrValue, FILTER_VALIDATE_INT);\n\t}", "function get_netmask($netmask) {\n $_netmask = $netmask;\n if(is_numeric($netmask)) {\n $num_arr_netmask = array();\n $str_arr_netmask = str_split(str_pad(str_pad('', $netmask, '1'), 32, '0'), 8);\n foreach($str_arr_netmask as $s) {\n $num_arr_netmask[] = bindec($s);\n }\n $_netmask = join($num_arr_netmask, '.');\n }\n\n return $_netmask;\n}", "public static function tryParseInt(&$fld, $default, $allowZero = false)\n\t{\n\t\t$fld = intval($fld);\n\t\tif(!$allowZero && !$fld && isset($default))\n\t\t\t$fld = $default;\n\t\t\t\n\t\treturn $fld;\n\t}", "function int1 ($var){\n\tif (preg_match(\"|^[\\(\\)\\-+\\ 0-9]+$|\",$var)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t\t}\n\t}", "public static function unprefix($userId)\n {\n if (empty(static::$_prefix)) {\n if (static::hasPrefix($userId)) {\n return false;\n }\n \n return (int)$userId;\n \n } else {\n if (!static::hasPrefix($userId)) {\n return false;\n }\n \n list($prefix, $intUserId) = explode(static::SEPARATOR, $userId);\n if ($prefix != static::$_prefix) {\n return false;\n }\n \n return (int)$intUserId;\n }\n }", "function ip_in_range($ip, $range) {\n if ( is_string($range) ) $ranges = explode(',',$range);\n else $ranges = $range;\n if (strpos($ip,':') !== false) {\n return in_array($ip,$ranges);\n } else {\n $in = false;\n foreach($ranges as $range) {\n if ($in) return $in;\n if (strpos($range,':') !== false) continue;\n # If IP has the 4 blocks is a host, but we need the prefix, so put it\n if (strpos($range,'/') === false && strpos($range,'-') === false && strpos($range,'*') === false) $range .= '/32';\n if (strpos($range, '/') !== false) {\n // $range is in IP/NETMASK format\n list($range, $netmask) = explode('/', $range, 2);\n if (strpos($netmask, '.') !== false) {\n // $netmask is a 255.255.0.0 format\n $netmask = str_replace('*', '0', $netmask);\n $netmask_dec = ip2long($netmask);\n return ( (ip2long($ip) & $netmask_dec) == (ip2long($range) & $netmask_dec) );\n } else {\n // $netmask is a CIDR size block\n // fix the range argument\n $x = explode('.', $range);\n while(count($x)<4) $x[] = '0';\n list($a,$b,$c,$d) = $x;\n $range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\n $range_dec = ip2long($range);\n $ip_dec = ip2long($ip);\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\n # Strategy 2 - Use math to create it\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\n $netmask_dec = ~ $wildcard_dec;\n $in = (($ip_dec & $netmask_dec) == ($range_dec & $netmask_dec));\n }\n } else {\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\n if (strpos($range, '*') !==false) { // a.b.*.* format\n // Just convert to A-B format by setting * to 0 for A and 255 for B\n $lower = str_replace('*', '0', $range);\n $upper = str_replace('*', '255', $range);\n $range = \"$lower-$upper\";\n }\n if (strpos($range, '-')!==false) { // A-B format\n list($lower, $upper) = explode('-', $range, 2);\n $lower_dec = (float)sprintf(\"%u\",ip2long($lower));\n $upper_dec = (float)sprintf(\"%u\",ip2long($upper));\n $ip_dec = (float)sprintf(\"%u\",ip2long($ip));\n $in = ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\n }\n }\n }\n return $in;\n }\n}", "public function getInt32Field()\n {\n $value = $this->get(self::INT32_FIELD);\n return $value === null ? (integer)$value : $value;\n }", "public function wt_parse_int_field($value) {\n // Remove the ' prepended to fields that start with - if needed.\n//\t\t$value = $this->unescape_data( $value );\n\n return intval($value);\n }", "protected function ip2int($ip_address)\n\t{\n\t\treturn sprintf(\"%u\", ip2long($ip_address));\n\t}", "private function setIPv6( $addr, $mask )\n\t{\n\t\t$this->net_addr = @inet_pton($addr);\n\t\tif( $this->net_addr == false )\n\t\t{\n\t\t\tthrow new \\Exception( \"invalid ip address {$addr}\" );\n\t\t} \n\t\t$this->valid = true;\n\t\t$this->net_addr_long = $this->inet_ntogmp( $this->net_addr );\n\t\t//$this->inet_gmpton( $this->net_addr_long );\n\t\t\t\n\t\t// set the netmask\n\t\tif( preg_match( '/^[0-9]+$/', $mask ))\n\t\t{\n\t\t\t$this->net_mask_bits = intval( $mask );\n\t\t\tif( $this->ipv4 && $this->net_mask_bits != 0 ){\n\t\t\t\t$this->net_mask_bits += 96;\n\t\t\t}\n\t\t\t$this->net_mask_long = \\gmp_mul( \\gmp_sub( gmp_pow( 2, $this->net_mask_bits ), 1 ), \\gmp_pow( 2, 128-$this->net_mask_bits ));\n\t\t\t//\t\t\techo gmp_strval( $this->net_mask_long, 2 ).\"<br />\\n\";\n\t\t\t$this->net_mask = $this->inet_gmpton($this->net_mask_long);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->net_mask = inet_pton($mask);\n\t\t\t$this->net_mask_long = $this->inet_ntogmp($this->netmask);\n\t\t\t$this->net_mask_bits = \\gmp_scan0( $this->net_mask_long, 0 );\n\t\t}\n\t\t\t\n\t\t// normalize it...\n\t\t$this->net_addr_long = \\gmp_and( $this->net_addr_long, $this->net_mask_long );\n\t\t$this->net_addr = $this->inet_gmpton( $this->net_addr_long );\n\t\t$this->net_broadcast_long = \\gmp_or( $this->net_addr_long, \\gmp_sub( \\gmp_pow( 2, 128-$this->net_mask_bits ), 1 ));\n\t\t$this->net_broadcast = $this->inet_gmpton($this->net_broadcast_long );\n\t}", "public static function maskCep($_input = NULL) {\n\n $_string = self::getNumbers($_input);\n\n switch (strlen($_string)) {\n\n case 8 :\n $_mask = '#####-###';\n break;\n\n default :\n return $_input;\n }\n\n for ($count = 0; $count < strlen($_string); $count++) {\n $_mask[strpos($_mask, \"#\")] = $_string[$count];\n }\n\n return $_mask;\n }", "Function ip_in_range($ip, $range) {\n if (strpos($range, '/') !== false) {\n // $range is in IP/NETMASK format\n list($range, $netmask) = explode('/', $range, 2);\n if (strpos($netmask, '.') !== false) {\n // $netmask is a 255.255.0.0 format\n $netmask = str_replace('*', '0', $netmask);\n $netmask_dec = ip2long($netmask);\n return ( (ip2long($ip) & $netmask_dec) == (ip2long($range) & $netmask_dec) );\n } else {\n // $netmask is a CIDR size block\n // fix the range argument\n $x = explode('.', $range);\n while(count($x)<4) $x[] = '0';\n list($a,$b,$c,$d) = $x;\n $range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\n $range_dec = ip2long($range);\n $ip_dec = ip2long($ip);\n\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\n\n # Strategy 2 - Use math to create it\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\n $netmask_dec = ~ $wildcard_dec;\n\n return (($ip_dec & $netmask_dec) == ($range_dec & $netmask_dec));\n }\n } else {\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\n if (strpos($range, '*') !==false) { // a.b.*.* format\n // Just convert to A-B format by setting * to 0 for A and 255 for B\n $lower = str_replace('*', '0', $range);\n $upper = str_replace('*', '255', $range);\n $range = \"$lower-$upper\";\n }\n\n if (strpos($range, '-')!==false) { // A-B format\n list($lower, $upper) = explode('-', $range, 2);\n $lower_dec = (float)sprintf(\"%u\",ip2long($lower));\n $upper_dec = (float)sprintf(\"%u\",ip2long($upper));\n $ip_dec = (float)sprintf(\"%u\",ip2long($ip));\n return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\n }\n\n //echo 'Range argument is not in 1.2.3.4/24 or 1.2.3.4/255.255.255.0 format';\n return false;\n }\n\n}", "protected static function string_to_number($string, $check, $magic)\n\t{\n\t\t$int32 = 4294967296; // 2^32\n\t\t$length = strlen($string);\n\n\t\tfor ($i = 0; $i < $length; $i++)\n\t\t{\n\t\t\t$check *= $magic; \n\n\t\t\t// If the float is beyond the boundaries of integer (usually +/- 2.15e+9 = 2^31), \n\t\t\t// the result of converting to integer is undefined\n\t\t\t// refer to http://www.php.net/manual/en/language.types.integer.php\n\t\t\tif($check >= $int32)\n\t\t\t{\n\t\t\t\t$check = ($check - $int32 * (int) ($check / $int32));\n\t\t\t\t//if the check less than -2^31\n\t\t\t\t$check = ($check < -($int32 / 2)) ? ($check + $int32) : $check;\n\t\t\t}\n\n\t\t\t$check += ord($string{$i}); \n\t\t}\n\n\t\treturn $check;\n\t}", "function ip2long() {\n\t\t$args = func_get_args();\n\t\t$result=call_user_func_array(\"ip2long\", $args);\n\t\tif ($result===false) $result=-1;\n\t\treturn $result;\n\t}", "function d2d_check_convert_int(&$x) {\n $y = intval($x);\n if ($x != strval($y)) {\n return FALSE;\n }\n else {\n $x = $y;\n return TRUE;\n }\n}", "public function getExpectedMask()\n {\n return isset($this->expected_mask) ? $this->expected_mask : null;\n }", "function cidrips($cidr) {\n\t\t\tif (!IPv6::validate_cidr($cidr))\n\t\t\t\treturn false;\n\n\t\t\treturn pow(2, (128-$cidr));\n\t\t}", "function gen_subnet_mask($bits) {\n\treturn long2ip(gen_subnet_mask_long($bits));\n}", "protected function filterInteger($value) {\n $intValue = filter_var($value, FILTER_VALIDATE_INT);\n if($intValue !== false && is_string($value)) {\n $value = $intValue;\n }\n\n return $value;\n }", "function decodeInteger($integer);", "private function set_dimension($input_val, $type)\n\t{\n\t\t$return_val = 0;\n\n\t\tswitch(true)\n\t\t{\n\t\t\tcase ($type=='nochange'):\n\t\t\t\t$return_val = $input_val;\n\t\t\t\tbreak;\n\t\t\tcase (is_numeric($type)):\n\t\t\t\t$return_val = $type;\n\t\t\t\tbreak;\n\t\t\tcase (!is_numeric($type)):\n\t\t\t\t$return_val = intval($type) / 100 * $input_val;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn (int)$return_val;\n\t}", "public function getMaskingString(): string;", "function MakePhoneNumberInt($thenumber)\r\n{\r\n\t$dff = substr($thenumber, 0, 1);\r\n\t$dff2 = substr($thenumber, 0, 3);\r\n\tif($dff==\"+\")\r\n\t{\r\n\t\treturn $thenumber;\r\n\t}\r\n\telse if($dff == \"0\")\r\n\t{\r\n\t\treturn \"234\".substr($thenumber, 1);\r\n\t}\r\n\telse if($dff2 == \"234\")\r\n\t{\r\n\t\treturn $thenumber;\r\n\t}\r\n}", "Function ip_in_range($ip, $range) {\r\n if (strpos($range, '/') !== false) {\r\n // $range is in IP/NETMASK format\r\n list($range, $netmask) = explode('/', $range, 2);\r\n if (strpos($netmask, '.') !== false) {\r\n // $netmask is a 255.255.0.0 format\r\n $netmask = str_replace('*', '0', $netmask);\r\n $netmask_dec = ip2long($netmask);\r\n return ( (ip2long($ip) & $netmask_dec) == (ip2long($range) & $netmask_dec) );\r\n } else {\r\n // $netmask is a CIDR size block\r\n // fix the range argument\r\n $x = explode('.', $range);\r\n while(count($x)<4) $x[] = '0';\r\n list($a,$b,$c,$d) = $x;\r\n $range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\r\n $range_dec = ip2long($range);\r\n $ip_dec = ip2long($ip);\r\n\r\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\r\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\r\n\r\n # Strategy 2 - Use math to create it\r\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\r\n $netmask_dec = ~ $wildcard_dec;\r\n\r\n return (($ip_dec & $netmask_dec) == ($range_dec & $netmask_dec));\r\n }\r\n } else {\r\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\r\n if (strpos($range, '*') !==false) { // a.b.*.* format\r\n // Just convert to A-B format by setting * to 0 for A and 255 for B\r\n $lower = str_replace('*', '0', $range);\r\n $upper = str_replace('*', '255', $range);\r\n $range = \"$lower-$upper\";\r\n }\r\n\r\n if (strpos($range, '-')!==false) { // A-B format\r\n list($lower, $upper) = explode('-', $range, 2);\r\n $lower_dec = (float)sprintf(\"%u\",ip2long($lower));\r\n $upper_dec = (float)sprintf(\"%u\",ip2long($upper));\r\n $ip_dec = (float)sprintf(\"%u\",ip2long($ip));\r\n return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\r\n }\r\n\r\n echo 'Range argument is not in 1.2.3.4/24 or 1.2.3.4/255.255.255.0 format';\r\n return false;\r\n }\r\n\r\n}", "function unmask($text) {\r\n\t\r\n\t$length = ord($text[1]) & 127;\r\n\tif($length == 126) {\r\n\t\t$masks = substr($text, 4, 4);\r\n\t\t$data = substr($text, 8);\r\n\t}\r\n\telseif($length == 127) {\r\n\t\t$masks = substr($text, 10, 4);\r\n\t\t$data = substr($text, 14);\r\n\t}\r\n\telse {\r\n\t\t$masks = substr($text, 2, 4);\r\n\t\t$data = substr($text, 6);\r\n\t}\r\n\t$text = \"\";\r\n\tfor ($i = 0; $i < strlen($data); ++$i) {\r\n\t\t$text .= $data[$i] ^ $masks[$i%4];\r\n\t}\r\n\treturn $text;\r\n}", "public static function findEndMask($content,$offset,$mask)\r\n\t{\r\n\t\twhile(strpos($mask,$content[$offset])!==false){$offset++;}\r\n\t\treturn $offset;\r\n\t}", "function df_is_int($v):bool {return is_numeric($v) && ($v == (int)$v);}", "public static function ipToInt($ip_str) {\n $octets = array_map(function ($oc) {\n return (int) $oc;\n }, explode('.', $ip_str));\n\n return ($octets[0] * pow(256, 3)) +\n ($octets[1] * pow(256, 2)) +\n ($octets[2] * pow(256, 1)) +\n ($octets[3] * pow(256, 0));\n }", "public static function filterUint($attrValue)\n\t{\n\t\treturn filter_var($attrValue, FILTER_VALIDATE_INT, array(\n\t\t\t'options' => array('min_range' => 0)\n\t\t));\n\t}", "public function toInteger(&$value = false)\n {\n try{\n $value = (int)$value;\n }\n catch(\\Exception $e){\n $value = 0;\n }\n }", "public function getGivenIpWithNetmask()\n\t{\n\t\treturn $this->given_ip . \"/\" . $this->getMask();\n\t}", "protected function applyMask($headers, $payload) \n\t{\n\t\t$effectiveMask = \"\";\n\n\t\tif ($headers['hasmask']) \n\t\t\t$mask = $headers['mask'];\n\t\telse\n\t\t\treturn $payload;\n\n\t\twhile ( strlen($effectiveMask) < strlen($payload) ) \n\t\t{\n\t\t\t$effectiveMask .= $mask;\n\t\t}\n\n\t\twhile ( strlen($effectiveMask) > strlen($payload) ) \n\t\t{\n\t\t\t$effectiveMask = substr($effectiveMask,0,-1);\n\t\t}\n\n\t\treturn $effectiveMask ^ $payload;\n\t}", "function getInteger($input) : int {\n return $input;\n}", "function unmask($text) {\n\t$length = ord($text[1]) & 127;\n\tif($length == 126) {\n\t\t$masks = substr($text, 4, 4);\n\t\t$data = substr($text, 8);\n\t}\n\telseif($length == 127) {\n\t\t$masks = substr($text, 10, 4);\n\t\t$data = substr($text, 14);\n\t}\n\telse {\n\t\t$masks = substr($text, 2, 4);\n\t\t$data = substr($text, 6);\n\t}\n\t$text = \"\";\n\tfor ($i = 0; $i < strlen($data); ++$i) {\n\t\t$text .= $data[$i] ^ $masks[$i%4];\n\t}\n\treturn $text;\n}", "public static function toInt($data): int\n {\n return is_int($data) ? $data : (int) preg_replace('[\\D]', '', substr(md5(json_encode($data)), 0, 16));\n }", "private function stringToInteger(string $value): int\n {\n // empty value is prevented by the schema validator\n return match ($value[0]) {\n '0' => match ($value[1] ?? null) {\n null => 0,\n 'x', 'X' => hexdec($value),\n default => octdec($value),\n },\n default => (int)$value,\n };\n }", "function digits_to_int($a, $b, $c, $d) {\n\treturn (intval($a) << 24) + (intval($b) << 16) + (intval($c) << 8) + intval($d);\n}", "public static function fix_attendee_id($attendee_id){\n $retval = 0; // initialize to empty value\n $pos = strpos($attendee_id, '-');\n if ($pos === FALSE){\n $retval = $attendee_id;\n }else{\n // look for \"-\" character\n $retval = (int)$attendee_id;\n $pos++;\n $num2 = (int)substr($attendee_id, $pos);\n $retval += $num2;\n }\n\n return $retval;\n }", "function rest_is_integer($maybe_integer)\n {\n }", "function gmp_intval($gmpnumber)\n{\n}", "private function unmask($text)\n\t{\n\t\t\t$length = ord($text[1]) & 127;\n\t\t\tif ($length == 126) {\n\t\t\t\t\t$masks = substr($text, 4, 4);\n\t\t\t\t\t$data = substr($text, 8);\n\t\t\t} elseif ($length == 127) {\n\t\t\t\t\t$masks = substr($text, 10, 4);\n\t\t\t\t\t$data = substr($text, 14);\n\t\t\t} else {\n\t\t\t\t\t$masks = substr($text, 2, 4);\n\t\t\t\t\t$data = substr($text, 6);\n\t\t\t}\n\t\t\t$text = \"\";\n\t\t\tfor ($i = 0; $i < strlen($data); ++ $i) {\n\t\t\t\t\t$text .= $data[$i] ^ $masks[$i % 4];\n\t\t\t}\n\t\t\treturn $text;\n\t}" ]
[ "0.7413249", "0.66354764", "0.6598855", "0.6201869", "0.60969394", "0.59854996", "0.59123695", "0.58689016", "0.58289075", "0.5787843", "0.5563755", "0.55169636", "0.5509552", "0.54594845", "0.5323989", "0.5302388", "0.52908224", "0.5255941", "0.5239106", "0.5227094", "0.5216671", "0.51695347", "0.51488984", "0.5143689", "0.5137821", "0.5135546", "0.5090347", "0.5051711", "0.50497144", "0.5031493", "0.5029456", "0.5007752", "0.49822202", "0.49723488", "0.49541467", "0.49435112", "0.4926881", "0.4926633", "0.49046922", "0.49033922", "0.4901834", "0.49007306", "0.48896435", "0.48836684", "0.48822737", "0.4879369", "0.4861567", "0.48603594", "0.48603594", "0.48603594", "0.48497382", "0.4847493", "0.48208734", "0.4817573", "0.48155287", "0.47931793", "0.4791721", "0.4790569", "0.47823343", "0.4775428", "0.47675273", "0.47647768", "0.47641632", "0.47631574", "0.47595513", "0.47498894", "0.4742317", "0.4735516", "0.47342446", "0.47265264", "0.47258687", "0.47223085", "0.47202605", "0.47115555", "0.4708982", "0.47065395", "0.47061127", "0.47059447", "0.46937174", "0.4689247", "0.46826297", "0.46746528", "0.46730474", "0.4664463", "0.4664374", "0.46640417", "0.46630692", "0.46616477", "0.4650646", "0.46503833", "0.46461937", "0.46389675", "0.46343818", "0.4634053", "0.462521", "0.45973095", "0.45933515", "0.45904076", "0.45867145", "0.4580761", "0.45800468" ]
0.0
-1
revision 8bit unsigned int (C1)
public static function SID_to_string($value) { // count - 8bit unsigned int (C1) // 2 null bytes // ID - 32bit unsigned long, big-endian order $sid = @unpack('C1rev/C1count/x2/N1id', $value); $subAuthorities = []; if (!isset($sid['id']) or !isset($sid['rev'])) { var_dump($sid); throw new \UnexpectedValueException( 'The revision level or identifier authority was not ' . 'found when decoding the SID.' ); } $revisionLevel = $sid['rev']; $identifierAuthority = $sid['id']; $subs = isset($sid['count']) ? $sid['count'] : 0; if ($subs > 15) { throw new \OutOfBoundsException('SubAuthorityCount exceeds 15.'); } // The sub-authorities depend on the count, so only get as many as // the count, regardless of data beyond it: for ($i = 0; $i < $subs; $i++) { // Each sub-auth is a 32bit unsigned long, little-endian order: $subAuthorities[] = unpack('V1sub', hex2bin(substr(bin2hex($value), 16 + ($i * 8), 8) ) )['sub']; } // Tack on the 'S-' and glue it all together... return 'S-' . $revisionLevel . '-' . $identifierAuthority.implode(preg_filter('/^/', '-', $subAuthorities)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readUInt8BE();", "public function readInt8();", "public function unsigned();", "function readUnsignedByte();", "public function readUInt8();", "public function readUInt8LE();", "public function writeUInt8($int) {}", "private function doGetBinaryBitsetLeInt()\n {\n $bin = \\pack(\\PHP_INT_SIZE === 8 ? 'P' : 'V', $this->bitset);\n return \\substr($bin, 0, (int)\\ceil($this->enumerationCount / 8));\n }", "public function readInt8BE();", "public function get_version() {\n\n\t\treturn '000001';\n\n\t}", "public function readUInt32BE();", "public function writeInt8($int) {}", "public static function formatToUInt8($int) {}", "function readInt1(): int {\n return \\ord($this->read(1));\n }", "function acucTo8Bit( $arrayPasscode )\r\n{\r\n\t$returnArrayCode = array();\r\n\t\r\n\t$bit6Idx = 0;\r\n\t$bit8Idx = 0;\r\n\t$byte6Idx = 0;\r\n\t$byte8Idx = 0;\r\n\t\r\n\t$valueByte = 0;\r\n\t$currentBit = 0;\r\n\t\r\n\twhile( true )\r\n\t{\r\n\t\t$currentBit = ( $arrayPasscode[ $byte6Idx ] >> $bit6Idx ) & 0x01;\r\n\t\t$currentBit <<= $bit8Idx;\r\n\t\t$bit6Idx++;\r\n\t\t$bit8Idx++;\r\n\t\t$valueByte |= $currentBit;\r\n\t\t\r\n\t\tif($bit8Idx == 8)\r\n\t\t{\r\n\t\t\t$returnArrayCode[ $byte8Idx ] = $valueByte;\r\n\t\t\t$byte8Idx++;\r\n\t\t\tif( $byte8Idx == 21 )\r\n\t\t\t\treturn $returnArrayCode;\r\n\t\t\t$bit8Idx = 0;\r\n\t\t\t$valueByte = 0;\r\n\t\t}\r\n\t\tif($bit6Idx == 6)\r\n\t\t{\r\n\t\t\t$bit6Idx = 0;\r\n\t\t\t$byte6Idx++;\r\n\t\t}\r\n\t}\r\n}", "public function readInt8LE();", "public function getBits(): int;", "public function getRev() : string;", "function getBinary() {return $this->_binary;}", "public static function getRepairBits($cid){\n //repair state from mySql for a specific vehicle\n $r = getRepairs($cid);\n $ret = ($r & 0xF000) >> 12;\n //echo $ret;\n return 0; //$ret;\n }", "function readInt3(): int {\n return \\unpack('V', $this->read(3).\"\\0\")[1];\n }", "public static function formatFromUInt8($byte) {}", "function readUnsignedShort();", "public static function getRepairBits($cid){\n //repair state from mySql for a specific vehicle\n $r = getRepairs($cid);\n //$ret = ($r & 0x000F) >> 0;\n //echo $ret;\n return 0; //$ret;\n }", "function uniord($c)\n{\n// $k = mb_convert_encoding($c, 'UCS-2LE', 'UTF-8');\n// $k1 = ord(substr($k, 0, 1));\n// $k2 = ord(substr($k, 1, 1));\n// return $k2 * 256 + $k1;\n \n\t$h = ord($c[0]);\n\tif ($h <= 0x7F) {\n\t\treturn $h;\n\t} else if ($h < 0xC2) {\n\t\treturn false;\n\t} else if ($h <= 0xDF) {\n\t\treturn ($h & 0x1F) << 6 | (ord($c[1]) & 0x3F);\n\t} else if ($h <= 0xEF) {\n\t\treturn ($h & 0x0F) << 12 | (ord($c[1]) & 0x3F) << 6\n\t\t\t\t\t\t\t\t | (ord($c[2]) & 0x3F);\n\t} else if ($h <= 0xF4) {\n\t\treturn ($h & 0x0F) << 18 | (ord($c[1]) & 0x3F) << 12\n\t\t\t\t\t\t\t\t | (ord($c[2]) & 0x3F) << 6\n\t\t\t\t\t\t\t\t | (ord($c[3]) & 0x3F);\n\t} else {\n\t\treturn false;\n\t}\n}", "public function getRevision() ;", "function getBitVersion( $pIncludeLevel = TRUE ) {\n\t\t$ret = BIT_MAJOR_VERSION.\".\".BIT_MINOR_VERSION.\".\".BIT_SUB_VERSION;\n\t\tif( $pIncludeLevel && defined( BIT_LEVEL ) && BIT_LEVEL != '' ) {\n\t\t\t$ret .= '-'.BIT_LEVEL;\n\t\t}\n\t\treturn $ret;\n\t}", "public function consumeInt8()\n {\n list(, $ret) = unpack(\"c\", $this->consume(1));\n return $ret;\n }", "function packUI8($number)\n\t{\n\t\tarray_push($this->FMDebug, \"packUI8\");\n\n\t\tif (!(is_numeric($number))) {\n\n\t\t\t$this->FMError(\"packUI8 argument $number not a number\");\n\t\t}\n\n\t\t$number = (int) $number;\n\n\t\t$lower_limit = 0;\n\t\t$upper_limit = 255;\n\n\t\tif ($number < $lower_limit) {\n\n\t\t\t$number = $lower_limit;\n\t\t}\n\n\t\tif ($number > $upper_limit) {\n\n\t\t\t$number = $upper_limit;\n\t\t}\n\n\t\t$atom = chr($number);\n\n\t\tarray_pop($this->FMDebug);\n\n\t\treturn $atom;\n\t}", "public function readUInt16BE();", "public function getBinaryBitsetBe(): string\n {\n return \\strrev($this->getBinaryBitsetLe());\n }", "public function readByte()\n\t{\n\t\t$b = parent::readByte();\n\t\tif( $b >= 0 ){\n\t\t\t$this->length = ($this->length + 1) & 0xffffffff;\n\t\t\thash_update($this->crc, chr($b));\n\t\t}\n\t\treturn $b;\n\t}", "public function readUInt32();", "public static function formatFromInt8($byte) {}", "public function consumeUint8()\n {\n list(, $ret) = unpack(\"C\", $this->buffer);\n $this->discard(1);\n return $ret;\n }", "static private function getBits($entier){\n $bits = array();\n for ($i=0; $i<8; $i++){\n $bits[$i] = $entier & (128 >> $i) ? 1 : 0;\n }\n return $bits;\n }", "function readFileVersion()\n\t{\n\t\treset($this->lastfilecontent);\n\t\t$regs = array();\n\t\tforeach ($this->lastfilecontent as $row)\n\t\t{\n\t\t\tif (ereg(\"^<#([0-9]+)>\", $row, $regs))\n\t\t\t{\n\t\t\t\t$version = $regs[1];\n\t\t\t}\n\t\t}\n\n\t\t$this->fileVersion = (integer) $version;\n\t\treturn $this->fileVersion; \n\t}", "function _wp_get_post_revision_version($revision)\n {\n }", "public function __construct()\n {\n $this->workingByte = new BitArray(8);\n }", "public function veriCode() {}", "public static function bit8(int $data): string\n {\n return pack('C', $data);\n }", "function bin2int($value)\n\t{\n\t\t$x = 1;\n\t\t$tmp = 0;\n\t\tfor ($i = 0; $i < strlen($value);$i++)\n\t\t{\n\t\t\t$tmp = $tmp + ($x * ord($value{$i}));\n\t\t\t$x = $x *256;\n\t\t\n\t\t}\n\t\treturn($tmp);\n\t}", "public function readS1(): int {\n return unpack(\"c\", $this->readBytes(1))[1];\n }", "public function readUInt32LE();", "function inttobyte($n)\r\n\t{\r\n\t\treturn chr($n);\r\n\t}", "public function readInt8($pos = null) {}", "protected function decodeTransparentColorIndex(string $byte): int\n {\n return unpack('C', $byte)[1];\n }", "public static function getNumericTypo3Version() {}", "private function readInt() {\n $unsigned = $this->unpack(\"N\", 4);\n return unpack(\"l\", pack(\"l\", $unsigned))[1];\n }", "public static function getMachineByteOrder() {}", "function uniord($u) {\n $k = mb_convert_encoding($u, 'UCS-2LE', 'UTF-8');\n $k1 = ord(substr($k, 0, 1));\n $k2 = ord(substr($k, 1, 1));\n return $k2 * 256 + $k1;\n }", "public static function getCssRevision()\n {\n return 16;\n }", "function _freadint($f)\n\t\t{\n\t\t\t$i=ord(fread($f,1))<<24;\n\t\t\t$i+=ord(fread($f,1))<<16;\n\t\t\t$i+=ord(fread($f,1))<<8;\n\t\t\t$i+=ord(fread($f,1));\n\t\t\treturn $i;\n\t\t}", "function getSha1() ;", "function readInt8() {\n $strInt = $this->read(8);\n \n if(\\PHP_INT_SIZE > 4) {\n return \\unpack('P', $strInt)[1];\n }\n \n if(static::$gmp) {\n $result = \\gmp_import($strInt, 1, (\\GMP_LSW_FIRST | \\GMP_LITTLE_ENDIAN));\n if($result === false) {\n throw new \\RuntimeException('Unable to convert input into an integer');\n }\n \n if(\\gmp_cmp($result, '9223372036854775808') !== -1) {\n $result = \\gmp_sub($result, '18446744073709551616'); // $result -= (1 << 64)\n }\n \n $result = \\gmp_strval($result);\n } else {\n $result = \\bcadd('0', \\unpack('n', \\substr($strInt, 0, 2))[1]);\n $result = \\bcmul($result, '65536');\n $result = \\bcadd($result, \\unpack('n', \\substr($strInt, 2, 2))[1]);\n $result = \\bcmul($result, '65536');\n $result = \\bcadd($result, \\unpack('n', \\substr($strInt, 4, 2))[1]);\n $result = \\bcmul($result, '65536');\n $result = \\bcadd($result, \\unpack('n', \\substr($strInt, 6, 2))[1]);\n \n // 9223372036854775808 is equal to (1 << 63)\n if(\\bccomp($result, '9223372036854775808') !== -1) {\n $result = \\bcsub($result, '18446744073709551616'); // $result -= (1 << 64)\n }\n }\n \n return $result;\n }", "function mungeByte() {\n $return = $this->readUByte();\n $this->seek(-1);\n\n return $return;\n }", "function _encode_v1() {\n if ($this->debug) print($this->debugbeg . \"_encode_v1()<HR>\\n\");\n\n if ($this->track) {\n // ID3 v1.1\n $id3pack = 'a3a30a30a30a4a28x1C1C1';\n $newtag = pack($id3pack,\n 'TAG',\n $this->name,\n $this->artists,\n $this->album,\n $this->year,\n $this->comment,\n $this->track,\n $this->genreno\n );\n } else {\n // ID3 v1\n $id3pack = 'a3a30a30a30a4a30C1';\n $newtag = pack($id3pack,\n 'TAG',\n $this->name,\n $this->artists,\n $this->album,\n $this->year,\n $this->comment,\n $this->genreno\n );\n }\n\n if ($this->debug) {\n print('id3pack: ' . $id3pack . \"\\n\");\n $unp = unpack('H*new', $newtag);\n print_r($unp);\n }\n\n if ($this->debug) print($this->debugend);\n return $newtag;\n }", "public function getSpecFileRevision()\n {\n $value = $this->get(self::SPEC_FILE_REVISION);\n return $value === null ? (integer)$value : $value;\n }", "public function getSpecFileRevision()\n {\n $value = $this->get(self::SPEC_FILE_REVISION);\n return $value === null ? (integer)$value : $value;\n }", "public function getRevision() {}", "public function writeUnsignedChar($byte){ }", "public function GetAccountUniverse() : int\n\t{\n\t\treturn gmp_intval( $this->Get( 56, '255' ) ); // 255 = 0xFF\n\t}", "function v8(string $bytes): string\n{\n return Uuid::uuid8($bytes)->toString();\n}", "public function getRevision()\n {\n return $this->_rev;\n }", "abstract public function get_version();", "public function getBits();", "public function getRev()\n {\n return $this->data['fields']['rev'];\n }", "public function appendInt8($value)\n {\n return $this->append(pack(\"c\", $value));\n }", "function vancode2int($c = '00') {\n\t\treturn base_convert(substr($c, 1), 36, 10);\n\t}", "public function get_version();", "private static function getControlCode() {\n if ( self :: $conrolCode === null ) {\n self :: $conrolCode = pack('c', 0x1B);\n }\n return self:: $conrolCode;\n }", "static function writeInt8($int): string {\n if(\\PHP_INT_SIZE > 4) {\n return \\pack('P', ((int) $int));\n }\n \n if(static::$gmp) {\n $int = \\gmp_init($int);\n \n if(\\gmp_cmp($int, '0') === -1) {\n // 18446744073709551616 is equal to (1 << 64)\n $int = \\gmp_add($int, '18446744073709551616');\n }\n \n return \\gmp_export($int, 1, (\\GMP_LSW_FIRST | \\GMP_LITTLE_ENDIAN));\n }\n \n if(\\bccomp($int, '0') === -1) {\n // 18446744073709551616 is equal to (1 << 64)\n $int = \\bcadd($int, '18446744073709551616');\n }\n \n return \\pack('v', \\bcmod(\\bcdiv($int, '281474976710656'), '65536')).\n \\pack('v', \\bcmod(\\bcdiv($int, '4294967296'), '65536')).\n \\pack('v', \\bcdiv($int, '65536'), '65536').\n \\pack('v', \\bcmod($int, '65536'));\n }", "public function getRevision()\n {\n return $this->result[\"revision\"];\n }", "function bigendian_int($str){\n\t$bits = array_map(\"intval\",str_split($str,1));\n\t$v = 0;\n\t$x = 0;\n\tfor($i = strlen($str) - 1; $i >= 0; --$i){\n\t\t$v += pow(2, $i) * $bits[$x];\n\t\t++$x;\n\t}\n\treturn $v;\n\n}", "public function readUInt8($pos = null) {}", "public function getVerCode(){\n \n $rand = $this->generateRandomString(6);\n return $rand;\n }", "public static function getJsRevision()\n {\n return 3;\n }", "public function getRevisionId() {\n return $this->revisionId;\n }", "function R8(state $state) {\n global $S;\n $tem = Array_fill(0, 256, 0);\n $t = 0;\n $roundconstant_expanded = Array_fill(0, 256, 0);\n\n /* expand the round constant into 256 one-bit element */\n for ($i = 0; $i < count($roundconstant_expanded); $i++)\n $roundconstant_expanded[$i] = ($state->roundconstant[$i >> 2] >> (3 - ($i & 3))) & 1;\n\n\n /* S box layer, each constant bit selects one Sbox from S0 and S1 */\n for ($i = 0; $i < count($tem); $i++)\n $tem[$i] = $S[$roundconstant_expanded[$i]][$state->A[$i]]; /* constant bits are used to determine which Sbox to use */\n\n\n /* MDS Layer */\n for ($i = 0; $i < 256; $i = $i + 2) {\n // L(tem[i], tem[i+1])\n $tem[$i + 1] ^= (((($tem[$i]) << 1) >> 0) ^ (($tem[$i]) >> 3) ^ ((($tem[$i]) >> 2) & 2)) & 0xf;\n $tem[$i] ^= (((($tem[$i + 1]) << 1) >> 0) ^ (($tem[$i + 1]) >> 3) ^ ((($tem[$i + 1]) >> 2) & 2)) & 0xf;\n }\n\n /* The following is the permuation layer P_8$\n\n /*initial swap Pi_8 */\n for ($i = 0; $i < 256; $i = $i + 4) {\n $t = $tem[$i + 2];\n $tem[$i + 2] = $tem[$i + 3];\n $tem[$i + 3] = $t;\n }\n\n /* permutation P'_8 */\n for ($i = 0; $i < 128; $i = $i + 1) {\n $state->A[$i] = $tem[$i << 1];\n $state->A[$i + 128] = $tem[($i << 1) + 1];\n }\n\n /* final swap Phi_8 */\n for ($i = 128; $i < 256; $i = $i + 2) {\n $t = $state->A[$i];\n $state->A[$i] = $state->A[$i + 1];\n $state->A[$i + 1] = $t;\n }\n}", "public function writeUnsignedInt($num){ }", "function getFixedIv8Byte()\r\n{\r\n return \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";}", "function readByte();", "function zerificabinario( $rel )\n {\n $caratteriBin = strlen( $rel );\n $diff = 8 - $caratteriBin;\n if ( $diff > 0 ) {\n for ( $c = 1; $c <= $diff; $c++ ) {\n $rel = \"0\" . $rel;\n };\n };\n return ( $rel );\n }", "public function readbyte(){\n \treturn ser_readbyte();\n }", "function packSI8($number)\n\t{\n\t\tarray_push($this->FMDebug, \"packSI8\");\n\n\t\tif (!(is_numeric($number))) {\n\n\t\t\t$this->FMError(\"packSI8 argument not a number\");\n\t\t}\n\n\t\t$number = (int) $number;\n\n\t\t$lower_limit = -127;\n\t\t$upper_limit = 127;\n\n\t\tif ($number < $lower_limit) {\n\n\t\t\t$number = $lower_limit;\n\t\t}\n\n\t\tif ($number > $upper_limit) {\n\n\t\t\t$number = $upper_limit;\n\t\t}\n\n\t\tif ($number < 0) {\n\n\t\t\t$number = $upper_limit + 1 + abs($number);\n\t\t}\n\n\t\t$atom = chr($number);\n\n\t\tarray_pop($this->FMDebug);\n\n\t\treturn $atom;\n\t}", "function cubrid_version()\n{\n}", "public function getCodeArticle8() {\n return $this->codeArticle8;\n }", "public function getVersion(): int;", "public function getVersion(): int;", "public function getVersion(): int;", "function int_to_dword($n)\r\n\t{\r\n\t\treturn chr($n & 255).chr(($n >> 8) & 255).chr(($n >> 16) & 255).chr(($n >> 24) & 255);\r\n\t}", "protected function getGitRevision() {}", "function _fourbytes2int_le($s) {\n\treturn (ord($s[3])<<24) + (ord($s[2])<<16) + (ord($s[1])<<8) + ord($s[0]);\n}", "public function getRevision();", "public function getLittleEndian()\n {\n return pack(\n 'ISSCC',\n hexdec($this->uuidFields->getTimeLow()),\n hexdec($this->uuidFields->getTimeMid()),\n hexdec($this->uuidFields->getTimeHiAndVersion()),\n hexdec($this->uuidFields->getClockSeqHiAndReserved()),\n hexdec($this->uuidFields->getClockSeqLow()),\n ).hex2bin($this->uuidFields->getNode());\n }", "function read_byte(&$payload) {\n $byte = \\unpack('C', $payload)[1];\n $payload = \\substr($payload, 1);\n\n return $byte;\n}", "function readUInt32() {\n $tmp = unpack(\"V\", $this->read(4));\n return $tmp[1];\n }", "function getVersion() {\r\n\t\treturn '1.1';\r\n\t}", "static function writeInt3(int $int): string {\n return \\substr(\\pack('V', $int), 0, 3);\n }", "public function getRevisionID()\n {\n return $this->revisionid;\n }", "public function readBits() {}" ]
[ "0.5896087", "0.5819138", "0.57589936", "0.57454836", "0.5743211", "0.56359076", "0.56260526", "0.5603487", "0.56023747", "0.55546117", "0.5432854", "0.53854114", "0.5377897", "0.5366586", "0.53519934", "0.5324963", "0.5310146", "0.5267248", "0.52644235", "0.5247837", "0.5241951", "0.520218", "0.51874304", "0.51777726", "0.5164118", "0.51630074", "0.51337194", "0.51287264", "0.5124721", "0.5108314", "0.50725615", "0.50556713", "0.5047142", "0.50191194", "0.5005859", "0.49950668", "0.4992507", "0.49921978", "0.49875665", "0.49862245", "0.4978161", "0.49572575", "0.49550962", "0.49545854", "0.49500713", "0.49400038", "0.49392027", "0.49385542", "0.49348256", "0.49288884", "0.4928589", "0.4923562", "0.49202484", "0.49149862", "0.48920968", "0.48842314", "0.48825958", "0.48807618", "0.48807618", "0.48706758", "0.48480418", "0.48466465", "0.4838559", "0.48334068", "0.48266745", "0.48246053", "0.48158997", "0.4812203", "0.4808043", "0.48078868", "0.48044178", "0.48021424", "0.4796995", "0.4793303", "0.47763735", "0.4768374", "0.47678298", "0.47674254", "0.4764894", "0.4764865", "0.47631863", "0.47610667", "0.47529513", "0.47433856", "0.4741403", "0.4738427", "0.4738372", "0.47350636", "0.47350636", "0.47350636", "0.47292054", "0.47291818", "0.47202015", "0.47192857", "0.4717698", "0.47157785", "0.47145298", "0.47131345", "0.47118476", "0.47113556", "0.47092646" ]
0.0
-1
If sid is a packed, binary string:
public static function SID_to_userid($sid) { if (strncmp($sid, "S-", 2) != 0) { $sid = ActiveDirectory::SID_to_string($sid); // Make sid human-readable. } // sid is now a human-readable string: $fields = explode("-", $sid, 18); // 0 = 'S-' // 1 = revisionLevel // 2 = identifierAuthority // 3 ... 17 = subAuthorities $num_fields = count($fields); if ($num_fields < 4 or $num_fields > 18 or $fields[0] !="S" or intval($fields[1]) != Secrets::SID_REV_LVL or intval($fields[2]) != Secrets::SID_ID_AUTH or !ActiveDirectory::match_subauth($fields, Secrets::SID_SUBAUTH)) { echo("<br/>In SID_to_userid() !!!!!!!!!!!!!!! <br/>"); var_dump($sid); //exit(); throw new \UnexpectedValueException('Malformed SID.'); } // Which fields vary from person to person? $unique_start = 3 + count(Secrets::SID_SUBAUTH); $num_unique = $num_fields - $unique_start; $uid = 0; for ($i = 0; $i < $num_unique; $i++) { // Each sub-auth is a 32bit unsigned long: $uid += intval($fields[$i + $unique_start]) << (32 * $i); } return $uid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sid2str($sid)\n {\n\t\t// 1 byte for the revision level\n\t\t// 1 byte for the number n of variable sub-ids\n\t\t// 6 bytes for identifier authority value\n\t\t// n*4 bytes for n sub-ids\n\t\t//\n\t\t// Example: 010400000000000515000000a681e50e4d6c6c2bca32055f\n\t\t// Legend: RRNNAAAAAAAAAAAA11111111222222223333333344444444\n\t\t$revision = ord($sid[0]);\n\t\t$numberSubID = ord($sid[1]);\n\t\t$subIdStart = 8; // 1 + 1 + 6\n\t\t$subIdLength = 4;\n\t\tif (strlen($sid) !== $subIdStart + $subIdLength * $numberSubID) {\n\t\t\t// Incorrect number of bytes present.\n\t\t\treturn '';\n\t\t}\n\t\t// 6 bytes = 48 bits can be represented using floats without loss of\n\t\t// precision (see https://gist.github.com/bantu/886ac680b0aef5812f71)\n\t\t$iav = number_format(hexdec(bin2hex(substr($sid, 2, 6))), 0, '', '');\n\t\t$subIDs = array();\n\t\tfor ($i = 0; $i < $numberSubID; $i++) {\n\t\t\t$subID = unpack('V', substr($sid, $subIdStart + $subIdLength * $i, $subIdLength));\n\t\t\t$subIDs[] = sprintf('%u', $subID[1]);\n\t\t}\n\t\t// Result for example above: S-1-5-21-249921958-728525901-1594176202\n\t\treturn sprintf('S-%d-%s-%s', $revision, $iav, implode('-', $subIDs));\n }", "public function convertObjectSidBinaryToString($bin) {\n return $this->getTextSID($bin);\n }", "public static function api_decode_id($sid)\n\t{\n\t\tif (!is_int($sid)&& !is_numeric($sid))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$sid ^= 282335;\t//该值定了就不能再改了,否则就出问题了\n\t\t$id = ($sid & 0x00ff0000)<< 8;\n\t\t$id += ($sid & 0x000000ff)<< 16;\n\t\t$id += (($sid & 0xff000000)>> 16)& 0x0000ff00;\n\t\t$id += ($sid & 0x0000ff00)>> 8;\n\t\treturn $id;\n\t}", "function binSIDtoText($binsid)\n\t{\n\t\t$hex_sid=bin2hex($binsid);\n\t\t$rev = hexdec(substr($hex_sid,0,2)); // Get revision-part of SID\n\t\t$subcount = hexdec(substr($hex_sid,2,2)); // Get count of sub-auth entries\n\t\t$auth = hexdec(substr($hex_sid,4,12)); // SECURITY_NT_AUTHORITY\n\t\t$result = \"$rev-$auth\";\n\t\tfor ($x=0;$x < $subcount; $x++)\n\t\t{\n\t\t\t$result .= \"-\".hexdec($this->littleEndian(substr($hex_sid,16+($x*8),8))); // get all SECURITY_NT_AUTHORITY\n\t\t}\n\t\treturn $result;\n\t}", "protected function getTextSID($binsid) {\n $hex_sid = bin2hex($binsid);\n $rev = hexdec(substr($hex_sid, 0, 2));\n $subcount = hexdec(substr($hex_sid, 2, 2));\n $auth = hexdec(substr($hex_sid, 4, 12));\n $result = \"$rev-$auth\";\n\n for ($x=0;$x < $subcount; $x++) {\n $subauth[$x] =\n hexdec($this->little_endian(substr($hex_sid, 16 + ($x * 8), 8)));\n $result .= \"-\" . $subauth[$x];\n }\n\n // Cheat by tacking on the S-\n return 'S-' . $result;\n }", "public static function sid64($steamid) {\n\t\t$parts = explode(':', str_replace('STEAM_', '' ,$steamid)); \n\t\treturn bcadd(bcadd('76561197960265728', $parts['1']), bcmul($parts['2'], '2')); \n\t}", "public static function api_encode_id($id)\n\t{\n\t\t$sid = ($id & 0x0000ff00)<< 16;\n\t\t$sid += (($id & 0xff000000)>> 8)& 0x00ff0000;\n\t\t$sid += ($id & 0x000000ff)<< 8;\n\t\t$sid += ($id & 0x00ff0000)>> 16;\n\t\t$sid ^= 282335;\t//该值定了就不能再改了,否则就出问题了\n\t\treturn $sid;\n\t}", "public static function SID_to_string($value)\n {\n // count - 8bit unsigned int (C1)\n // 2 null bytes\n // ID - 32bit unsigned long, big-endian order\n $sid = @unpack('C1rev/C1count/x2/N1id', $value);\n $subAuthorities = [];\n \n if (!isset($sid['id']) or !isset($sid['rev'])) {\n var_dump($sid);\n throw new \\UnexpectedValueException(\n 'The revision level or identifier authority was not ' .\n 'found when decoding the SID.'\n );\n }\n\n $revisionLevel = $sid['rev'];\n $identifierAuthority = $sid['id'];\n $subs = isset($sid['count']) ? $sid['count'] : 0;\n if ($subs > 15) {\n throw new \\OutOfBoundsException('SubAuthorityCount exceeds 15.');\n }\n \n // The sub-authorities depend on the count, so only get as many as\n // the count, regardless of data beyond it:\n for ($i = 0; $i < $subs; $i++) {\n // Each sub-auth is a 32bit unsigned long, little-endian order:\n $subAuthorities[] = unpack('V1sub', hex2bin(substr(bin2hex($value),\n 16 + ($i * 8), 8)\n ) )['sub'];\n }\n\n // Tack on the 'S-' and glue it all together...\n return 'S-' . $revisionLevel . '-' .\n $identifierAuthority.implode(preg_filter('/^/', '-', $subAuthorities));\n }", "function benc_str($s) {\n\treturn strlen($s) . \":$s\";\n}", "function xlsBOF() {\r\n return pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0); \r\n \r\n}", "function decodeSID($value)\n{\n # count - 8bit unsigned int (C1)\n # 2 null bytes\n # ID - 32bit unsigned long, big-endian order\n $sid = @unpack('C1rev/C1count/x2/N1id', $value);\n $subAuthorities = [];\n if (!isset($sid['id']) || !isset($sid['rev'])) {\n throw new \\UnexpectedValueException(\n 'The revision level or identifier authority was not found when decoding the SID.'\n );\n }\n\n $revisionLevel = $sid['rev'];\n $identifierAuthority = $sid['id'];\n $subs = isset($sid['count']) ? $sid['count'] : 0;\n\n // The sub-authorities depend on the count, so only get as many as the count, regardless of data beyond it\n for ($i = 0; $i < $subs; $i++) {\n # Each sub-auth is a 32bit unsigned long, little-endian order\n $subAuthorities[] = unpack('V1sub', hex2bin(substr(bin2hex($value), 16 + ($i * 8), 8)))['sub'];\n }\n\n # Tack on the 'S-' and glue it all together...\n return 'S-'.$revisionLevel.'-'.$identifierAuthority.implode(\n preg_filter('/^/', '-', $subAuthorities)\n );\n}", "public function pack($sig);", "public function toBinary()\n {\n /**\n * @todo There is no documentation on the reserved data, but this is how it seems to act. May need to change this.\n */\n if (!$this->tsPropertyArray && !$this->dialInData) {\n $binary = $this->encodeReservedData('');\n } elseif ($this->tsPropertyArray && $this->dialInData) {\n $binary = $this->encodeReservedData(self::RESERVED_DATA_VALUE['NPS_RDS']);\n } elseif ($this->dialInData) {\n $binary = $this->encodeReservedData(self::RESERVED_DATA_VALUE['NPS']);\n } else {\n $binary = $this->encodeReservedData(self::RESERVED_DATA_VALUE['RDS']);\n }\n \n $binary .= $this->dialInData ? $this->dialInData->toBinary() : hex2bin(str_pad('', 52, '20'));\n if ($this->tsPropertyArray) {\n $binary .= $this->tsPropertyArray->toBinary();\n }\n\n return $binary.$this->postBinary;\n }", "function v8(string $bytes): string\n{\n return Uuid::uuid8($bytes)->toString();\n}", "abstract protected function getItoa64() ;", "function rockIdString($id) \n { //{{{\n if (is_object($id) && $id instanceof MongoId) {\n return \"rid_object:\" . $id->__toString();\n }\n if (is_object($id)) {\n return \"rid_\" . get_class($id) . \":\" . $id->__toString();\n }\n if (is_scalar($id)) {\n return \"rid_\" . gettype($id) . \":\" . $id;\n }\n return \"rid_mixed:\" . base64_encode(var_export($id, true));\n }", "function xlsBOF() { \necho pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0); \nreturn; \n}", "public static function sid32($i64friendID)\n\t{\n\t\t$tmpfriendID = $i64friendID;\n\t\t$iServer = \"1\";\n\t\tif(bcmod($i64friendID, \"2\") == \"0\")\n\t\t{\n\t\t\t$iServer = \"0\";\n\t\t}\n\t\t$tmpfriendID = bcsub($tmpfriendID,$iServer);\n\t\tif(bccomp(\"76561197960265728\",$tmpfriendID) == -1)\n\t\t\t$tmpfriendID = bcsub($tmpfriendID,\"76561197960265728\");\n\t\t$tmpfriendID = bcdiv($tmpfriendID, \"2\");\n\t\treturn (\"STEAM_0:\" . $iServer . \":\" . $tmpfriendID);\n\t}", "public function getStrId();", "public function encodeBinary(UuidInterface $uuid): string;", "function xlsBOF() {\r\necho pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\r\nreturn;\r\n}", "function xlsBOF() {\r\necho pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\r\nreturn;\r\n}", "function xlsBOF() {\r\necho pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\r\nreturn;\r\n}", "function xlsBOF() \n{\necho pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\nreturn;\n}", "protected function getItoa64() {}", "protected function getItoa64() {}", "private function createSid()\n\t{\n\t\t$id = uniqid($this->VF->input->ipAddress(),TRUE);\n\t\t$id = join('',explode('.',$id));\n\t\treturn md5($id);\n\t}", "function xlsBOF() {\r\n\techo pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\r\n\treturn;\r\n}", "public function quoteBinary(?string $value): string\n {\n if ($value===null || $value==='') return 'null';\n\n return '0x'.bin2hex($value);\n }", "public function binarySerialize();", "function string_to_oid($string)\n{\n $oid = strlen($string);\n\n for($i = 0; $i != strlen($string); $i++)\n {\n $oid .= \".\".ord($string[$i]);\n }\n\n return $oid;\n}", "public function getSecurityCode()\n {\n $sid = 'abcdefghiklmnopqstvxuyz0123456789ABCDEFGHIKLMNOPQSTVXUYZ';\n $max = strlen($sid) - 1;\n $res = \"\";\n for($i = 0; $i<16; ++$i){\n $res .= $sid[mt_rand(0, $max)];\n } \n return $res;\n }", "private function encode_id( $id ) {\n\t\treturn base64_encode( $id );\n\t}", "function bin2bstr($input)\r\n\t{\r\n\t\tif (!is_string($input)) return null; // Sanity check\r\n\t\t// Pack into a string\r\n\t\t$input = str_split($input, 2);\r\n\t\t$str = '';\r\n\t\tforeach ($input as $v){\r\n\t\t\t$str .= base_convert($v, 2, 16);\r\n\t\t}\r\n\t\t$str = pack('H*', $str);\r\n\t\treturn $str;\r\n\t}", "function bin2str($binary)\n {\n // 8 bits\n $binary = chunk_split($binary, 8, ' ');\n if(substr($binary, -1) === ' ') {\n $binary = substr($binary, 0, -1);\n }\n\n $binaryArray = explode(' ', $binary);\n\n $string = '';\n foreach ($binaryArray as $bin) {\n $bin = str_pad($bin, 8, 0, STR_PAD_RIGHT);\n $string .= chr(bindec($bin));\n }\n\n return $string;\n }", "public function provide()\n {\n $bytes = parent::provide();\n $uid = unpack(\"C*\", pack(\"L\", $this->uid));\n $bytes->replace(0, array_values($uid)); // unpack starts with index \"1\"..\n\n return $bytes;\n }", "function snmp_hexstring($string)\n{\n if (isHexString($string))\n {\n return hex2str(str_replace(' 00', '', $string)); // 00 is EOL\n } else {\n return $string;\n }\n}", "function encodeID($var) {\n\treturn chevereto_id($var, \"encode\");\n}", "public static function swapEndian64($s)\n {\n return $s[7] . $s[6] . $s[5] . $s[4] . $s[3] . $s[2] . $s[1] . $s[0];\n }", "function xlsBOF() {\n\t\techo pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\n\t\treturn;\n\t\t}", "public function create_sid()\n {\n }", "function packSI16($number)\n\t{\n\t\tarray_push($this->FMDebug, \"packSI16\");\n\n\t\tif (!(is_numeric($number))) {\n\n\t\t\t$this->FMError(\"packSI16 argument not a number\");\n\t\t}\n\n\t\t$number = (int) $number;\n\n\t\t$lower_limit = -32767;\n\t\t$upper_limit = 32767;\n\n\t\tif ($number < $lower_limit) {\n\n\t\t\t$number = $lower_limit;\n\t\t}\n\n\t\tif ($number > $upper_limit) {\n\n\t\t\t$number = $upper_limit;\n\t\t}\n\n\t\tif ($number < 0 ) {\n\n\t\t\t$number = $upper_limit + 1 + abs($number);\n\t\t}\n\n\t\t$number = sprintf(\"%04x\", $number);\n\n\t\t$low_byte = base_convert(substr($number, 2, 2), 16, 10);\n\t\t$high_byte = base_convert(substr($number, 0, 2), 16, 10);\n\n\t\t$atom = chr($low_byte) . chr($high_byte);\n\n\t\tarray_pop($this->FMDebug);\n\n \treturn $atom;\n\t}", "function packSI32($number)\n\t{\t\n\t\tarray_push($this->FMDebug, \"packSI32\");\n\n\t if (!(is_numeric($number))) {\n\n \t $this->FMError(\"packUI32 argument not a number\");\n \t}\n\t\t$lower_limit = -2147483647;\n\t\t$upper_limit = 2147483647;\n\n\t\tif ($number < $lower_limit) {\n\n\t\t\t$number = $lower_limit;\n\t\t}\n\n\t\tif ($number > $upper_limit) {\n\n\t\t\t$number = $upper_limit;\n\t\t}\n\n\t\tif ($number < 0) {\n\n\t\t\t$number = $upper_limit + 1 + abs($number);\n\t\t}\n\n\t\t$number = sprintf(\"%08x\", $number);\n\n\t\t$low_byte_low_word = base_convert(substr($number, 6, 2), 16, 10);\n\t\t$high_byte_low_word = base_convert(substr($number, 4, 2), 16, 10); \n\n\t\t$low_byte_high_word = base_convert(substr($number, 2, 2), 16, 10);\n\t\t$high_byte_high_word = base_convert(substr($number, 0, 2), 16, 10);\n\n\t\t$atom = chr($low_byte_low_word) . chr($high_byte_low_word);\n\t\t$atom .= chr($low_byte_high_word) . chr($high_byte_high_word);\n\n\t\tarray_pop($this->FMDebug);\n\n \treturn $atom;\n\t}", "function createMongoDbLikeId($timestamp, $hostname, $processId, $id)\n{\n// Building binary data.\n$bin = sprintf(\n \"%s%s%s%s\",\n pack('N', $timestamp),\n substr(md5($hostname), 0, 3),\n pack('n', $processId),\n substr(pack('N', $id), 1, 3)\n);\n\n// Convert binary to hex.\n$result = '';\nfor ($i = 0; $i < 12; $i++) {\n $result .= sprintf(\"%02x\", ord($bin[$i]));\n}\nreturn $result;\n}", "function _encode_v1() {\n if ($this->debug) print($this->debugbeg . \"_encode_v1()<HR>\\n\");\n\n if ($this->track) {\n // ID3 v1.1\n $id3pack = 'a3a30a30a30a4a28x1C1C1';\n $newtag = pack($id3pack,\n 'TAG',\n $this->name,\n $this->artists,\n $this->album,\n $this->year,\n $this->comment,\n $this->track,\n $this->genreno\n );\n } else {\n // ID3 v1\n $id3pack = 'a3a30a30a30a4a30C1';\n $newtag = pack($id3pack,\n 'TAG',\n $this->name,\n $this->artists,\n $this->album,\n $this->year,\n $this->comment,\n $this->genreno\n );\n }\n\n if ($this->debug) {\n print('id3pack: ' . $id3pack . \"\\n\");\n $unp = unpack('H*new', $newtag);\n print_r($unp);\n }\n\n if ($this->debug) print($this->debugend);\n return $newtag;\n }", "function bstr2bin($input)\r\n\t{\r\n\t\tif (!is_string($input)) return null; // Sanity check\r\n\t\t// Unpack as a hexadecimal string\r\n\t\t$value = unpack('H*', $input);\r\n\t\t// Output binary representation\r\n\t\t$value = str_split($value[1], 1);\r\n\t\t$bin = '';\r\n\t\tforeach ($value as $v){\r\n\t\t\t$b = str_pad(base_convert($v, 16, 2), 4, '0', STR_PAD_LEFT);\r\n\t\t\t$bin .= $b;\r\n\t\t}\r\n\t\treturn $bin;\r\n\t}", "public function encode()\n {\n /**\n * 4a - value tag\n * 00 00 - name length\n * 00 0c - value length\n * 6d 65 64 69 61 2d 73 6f 75 72 63 65 - media-source (12 bytes)\n * 44 - member value tag\n * 00 00 - name length\n * 00 08 - member-value-length\n * 65 6e 76 65 6c 6f 70 65 - member value (8 bytes) \n */\n // value tag\n $binary = pack('c', $this->valueTag);\n // name-length 0x0000\n $binary .= $this->nameLength->encode();\n // value-length (value is w)\n $binary .= $this->valueLength->encode();\n // value (member-name)\n $binary .= $this->value->encode();\n // member-value-tag\n $binary .= pack('c', $this->memberValueTag);\n // name-length (value is 0x0000)\n $binary .= $this->nameLength->encode();\n // member-value-length (value is x)\n $binary .= $this->memberValueLength->encode();\n // member-value\n $binary .= $this->memberValue->encode();\n return $binary;\n }", "protected function pack($data): string\n {\n return \\serialize($data);\n }", "function rs2xmlrpcstring (&$adodbrs) {\r\n $xmlrpc = rs2xmlrpcval ($adodbrs);\r\n if ($xmlrpc)\r\n return $xmlrpc->serialize();\r\n else\r\n return null;\r\n }", "public function keyIdentifier64(): string\n {\n $id = substr($this->keyIdentifier(), -8);\n $c = (ord($id[0]) & 0x0f) | 0x40;\n $id[0] = chr($c);\n return $id;\n }", "function _long2str($l){\r\n return pack('N', $l);\r\n }", "function getSCID() {\n $svnid = '$Rev$';\n $scid = substr($svnid, 6);\n return intval(substr($scid, 0, strlen($scid) - 2));\n}", "private function writeStringRecord($stringValue): void\n {\n $record = 0x0207; // Record identifier\n $data = StringHelper::UTF8toBIFF8UnicodeLong($stringValue);\n\n $length = strlen($data);\n $header = pack('vv', $record, $length);\n\n $this->append($header . $data);\n }", "function suid(int $length = 6, int $base = 62): string\n{\n return Uuid::generateSuid($length, $base);\n}", "function ts3client_identityStringToUniqueIdentifier($identityString, &$result) {}", "public function getLittleEndian()\n {\n return pack(\n 'ISSCC',\n hexdec($this->uuidFields->getTimeLow()),\n hexdec($this->uuidFields->getTimeMid()),\n hexdec($this->uuidFields->getTimeHiAndVersion()),\n hexdec($this->uuidFields->getClockSeqHiAndReserved()),\n hexdec($this->uuidFields->getClockSeqLow()),\n ).hex2bin($this->uuidFields->getNode());\n }", "function packBitValues($atoms)\n\t{\n\t\tarray_push($this->FMDebug, \"packBitsValues\");\n\n\t\tif (!(is_string($atoms))) {\n\n\t\t\t$this->FMError(\"packBitValues argument not a string\");\n\t\t}\n\n\t\t$atoms = $atoms . str_repeat(\"0\", (int) ((ceil(strlen($atoms) / 8)) * 8 - strlen($atoms)));\n\n\t\t$limit = ceil(strlen($atoms) / 8);\n\n\t\t$bytestream = \"\";\n\n\t\tfor ($n = 0; $n < $limit; $n++) {\n\n\t\t\t$bytestream .= chr(base_convert(substr($atoms, 0, 8), 2, 10));\n\t\t\t$atoms = substr($atoms, 8);\n\t\t}\n\n\t\tarray_pop($this->FMDebug);\n\n\t\treturn $bytestream;\n\t}", "public function getHashSignedById(): string;", "function get_short_id()\n {\n // E.g. 04622F2089E037A5 => 89E037A5\n return enigma_key::format_id($this->id);\n }", "public function getSid(){\n return $this->sid;\n }", "public function decode($s_id){\n return $this->cryptomute->decrypt((string) $s_id, 10, true, $this->getPass(), $this->getIV());\n }", "public static function generateJournalId() {\n $value = random_bytes(24);\n\n $data = substr(base64_encode($value), 0, 32);\n $data = str_replace(array('+','/','='), array('-','_',''), $data);\n return $data;\n }", "protected function packConvertHexStringToRawBinary($hex_string){\n\t\treturn pack('h*', $hex_string);\n\t}", "protected function authHash ($sid, $ahash)\n {\n return hash($this->hashType, trim($sid.$ahash));\n }", "function nSmToBinIp($sn) {\n\n $snb = \"\";\n\n for($i=1;$i<=32;$i++) {\n\n if($i<=$sn) {\n $snb.=\"1\";\n }\n else {\n $snb.=\"0\";\n }\n\n if($i%8==0 && $i<32){\n $snb.=\".\";\n }\n }\n\n return $snb;\n}", "function generateFixedSalt16Byte()\r\n{\r\n return \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";\r\n}", "public function _varEncoder() {\n do $shortId = Packer::encode52($this->count++);\n while (preg_match('/[^\\\\w$.]'.$shortId.'[^\\\\w$:]/', $this->script));\n return $shortId;\n }", "static function writeInt4(int $int): string {\n return \\pack('V', $int);\n }", "function packstr( &$out )\n{\n $args = func_num_args();\n for ( $i = 1; $i < $args; $i++ )\n {\n $str = func_get_arg( $i ); \n $out .= pack( 'Ca*', strlen( $str ), $str );\n }\n}", "function getuid_sid($sid)\n{\n $uid = mysql_fetch_array(mysql_query(\"SELECT uid FROM ibwf_ses WHERE id='\".$sid.\"'\"));\n $uid = $uid[0];\n return $uid;\n}", "function unpack_SNAC($raw) {\r\n $snac = array(\r\n 'raw' => array(\r\n 'header' => substr($raw, 0, 10),\r\n 'body' => substr($raw, 10)\r\n ),\r\n 'header' => array()\r\n );\r\n $snac['header'] = unpack('n1family/n1id/n1flags/N1req_id', $snac['raw']['header']);\r\n return $snac;\r\n }", "public function getBinary();", "public static function hex2str($hex) {}", "static function stripBinary(string $s): string {\n // printable characters\n return preg_replace('/[^[:print:]]/', '', $s);\n }", "function toBin($str){\n $str = (string)$str;\n $l = strlen($str);\n $result = '';\n while($l--){\n $result = str_pad(decbin(ord($str[$l])),8,\"0\",STR_PAD_LEFT).$result;\n }\n return $result;\n }", "public static function bytesToString(&$bytes)\n {\n return self::packArrayToString(\"c*\", $bytes);\n }", "public function testOnPacketToString()\n {\n $payload = \"\\x01\\x38\" . // transaction id: 0138 (2 bytes)\n \"\\x00\\x00\" . // protocol id: 0000 (2 bytes)\n \"\\x00\\x08\" . // length: 0008 (2 bytes) (8 bytes after this field)\n \"\\x11\" . // unit id: 11 (1 byte)\n \"\\x16\" . // function code: 16 (1 byte)\n \"\\x04\\x10\" . // start address: 0410 (2 bytes)\n \"\\x00\\x01\" . // AND mask: 0x01 (2 bytes)\n \"\\x00\\x02\" . // OR mask: 0x02 (2 bytes)\n '';\n $this->assertEquals(\n $payload,\n (new MaskWriteRegisterRequest(\n 0x0410,\n 0x1,\n 0x2,\n 0x11,\n 0x0138\n ))->__toString()\n );\n }", "public function __tostring()\n\t\t{\n\t\t\treturn (string) $this->ID;\n\t\t}", "public static function getBinary(): string\n {\n return PHP_BINARY;\n }", "public function writeHexString($str, $length=null, $lowNibble=null){ }", "function str2bin($str)\n {\n $out = '';\n\n foreach (str_split($str) as $char) {\n //determine symbol ASCII-code\n $dec = ord($char);\n //convert to binary representation and add leading zeros\n $bin = sprintf('%08d', base_convert($dec, 10, 2));\n $out .= $bin;\n }\n\n return $out;\n }", "abstract function encode($s);", "public function getEncoded();", "public function encode(string $type, int|string $id): string;", "private function write_ue4_string(&$file, $string)\n {\n $length = strlen($string) + 1;\n $packed_data = pack('i', $length);\n fwrite($file, $packed_data);\n fwrite($file, $string);\n fwrite($file, pack('c', '0'));\n }", "public function bytes();", "public function read($sessionId): string\n {\n $session = (object) $this->getQuery()->find($sessionId);\n\n if ($this->expired($session)) {\n $this->exists = true;\n\n return '';\n }\n\n if ($session->payload) {\n $this->exists = true;\n\n return base64_decode($session->payload);\n }\n\n return '';\n }", "function hash_decode($id) {\n $decode = Hashids::decode($id);\n return $decode ? $decode[0] : false;\n}", "public function __toString ()\r\n\t{\r\n\t\tif ($this->type != self::IMAGESHOW_TYPE) {\r\n\t\t\t// TODO: add a byte (or bit) somewhere to force redownload\r\n\t\t\t$binary = pack('cccV', $this->type, $this->duration, 0,\r\n\t\t\t$this->media_id);\r\n\t\t\tif ($this->type == self::IMAGE_TYPE ||\r\n\t\t\t $this->type == self::VIDEO_TYPE ||\r\n\t\t\t $this->type == self::POWERPOINT_TYPE) {\r\n\t\t\t\t// 11 for the item/type headers and 5 for the extension\r\n\t\t\t\t$binary .= pack('Va5', 11 + 5,\r\n\t\t\t\tpathinfo($this->filename, PATHINFO_EXTENSION));\r\n\t\t\t}\r\n\t\t\treturn $binary;\r\n\t\t}\r\n\t}", "static function debug_only_SigStr ( $strScriptName, $arrParams, $strSecretKey ) {\n\t\treturn self::makeSigStr($strScriptName, $arrParams, $strSecretKey);\n\t}", "private function newSid() {\r\n\r\n $this->sessionId=$this->generateString($this->sid_len);\r\n \r\n while ( $this->getSidCount($this->sessionId) > 0 || is_int($this->sessionId) ) {\r\n\r\n $this->sessionId=$this->generateString($this->sid_len);\r\n\r\n }\r\n\r\n $this->forcedExpire = time()+ $this->session_max_duration;\r\n $expireTime = time() + $this->session_duration;\r\n\r\n $this->SQLStatement_InsertSession->bindParam(':expires', $expireTime, PDO::PARAM_INT);\r\n $this->SQLStatement_InsertSession->bindParam(':forcedExpires', $this->forcedExpire, PDO::PARAM_INT);\r\n $this->SQLStatement_InsertSession->bindParam(':sid', $this->sessionId, PDO::PARAM_STR, $this->sid_len);\r\n $this->SQLStatement_InsertSession->bindParam(':ua', $this->getUa(), PDO::PARAM_STR, 40);\r\n\r\n return $this->SQLStatement_InsertSession->execute();\r\n\r\n }", "function read_string(&$payload) {\n $length = read_uint32($payload);\n $string = \\substr($payload, 0, $length);\n $payload = \\substr($payload, $length);\n\n return $string;\n}", "function createMongoDbLikeId($timestamp, $hostname, $processId, $id)\r\n{\r\n\t// Building binary data.\r\n\t$bin = sprintf(\r\n\t\t\"%s%s%s%s\",\r\n\t\tpack('N', $timestamp),\r\n\t\tsubstr(md5($hostname), 0, 3),\r\n\t\tpack('n', $processId),\r\n\t\tsubstr(pack('N', $id), 1, 3)\r\n\t);\r\n\r\n\t// Convert binary to hex.\r\n\t$result = '';\r\n\tfor ($i = 0; $i < 12; $i++) {\r\n\t\t$result .= sprintf(\"%02x\", ord($bin[$i]));\r\n\t}\r\n\r\n\treturn $result;\r\n}", "private function byteToString($buffer, $offset=null) {\n return (bin2hex(substr($buffer, 0, 4)) . '-' .\n bin2hex(substr($buffer, 4, 2)) . '-' .\n bin2hex(substr($buffer, 8, 2)) . '-' .\n bin2hex(substr($buffer, 10, 6))\n );\n }", "public static function encodIdBit($id, $str = '')\n\t{\n\t\t$strChars = '0123456789abcdef';\n\t\t$arrValue = self::reinterpret_cast($id);\n\t\t\n\t\t$strCode = $strChars[$arrValue[0] >> 4] . $strChars[$arrValue[0] & 15];\n\t\t$strCode .= $strChars[$arrValue[1] >> 4] . $strChars[$arrValue[1] & 15];\n\t\t\n\t\t$intLen = strlen($str);\n\t\tfor ($i = 0; $i < $intLen; ++$i) {\n\t\t\t$intValue = ord($str[$i]);\n\t\t\t$strCode .= $strChars[($intValue >> 4)] . $strChars[($intValue & 15)];\n\t\t}\n\t\t\n\t\t$strCode .= $strChars[$arrValue[2] >> 4] . $strChars[$arrValue[2] & 15];\n\t\t$strCode .= $strChars[$arrValue[3] >> 4] . $strChars[$arrValue[3] & 15];\n\t\t\n\t\treturn $strCode;\n\t}", "function getPassword($sid) {\n\t\t$db = CMSDb::getInstance();\n\t\t$query = \"SELECT password FROM #__captcha_session WHERE sessionid='$sid'\";\n\t\t$db->query($query);\n\t\t$secCode = $db->get_value();\n\t\t\n\t\t$query = \"DELETE FROM #__captcha_session where sessionid='$sid';\";\n\t\t$db->query($query);\n\t\n\t\treturn $secCode;\n\t}", "function _Write($cmd, $s1='', $s2='') {\n\t\t$id = ++$this->_Id;\n\n\t\t// Put our packet together\n\t\t$data = pack(\"VV\",$id,$cmd).$s1.chr(0).$s2.chr(0);\n\n\t\t// Prefix the packet size\n\t\t$data = pack(\"V\",strlen($data)).$data;\n\n\t\t// Send packet\n\t\tfwrite($this->_Sock,$data,strlen($data));\n\n\t\t// In case we want it later we'll return the packet id\n\t\treturn $id;\n\t}", "function decodeID($var) {\n\treturn chevereto_id($var, \"decode\");\n}", "function serialise(): string;", "function DecodeFileName($key)\n{\n return ($key == '') ? '' : substr(pack('H*', '20202020' . $key), 4);\n}" ]
[ "0.73459643", "0.65253156", "0.6186545", "0.61109334", "0.6099774", "0.60283256", "0.60158324", "0.5782683", "0.56836504", "0.5565672", "0.5545781", "0.5463649", "0.54077184", "0.53987527", "0.5383635", "0.5369754", "0.5345218", "0.5341759", "0.53354347", "0.5323726", "0.53132915", "0.53132915", "0.53132915", "0.53007394", "0.52785313", "0.52785313", "0.52614266", "0.5238121", "0.5230178", "0.521644", "0.5212562", "0.52056265", "0.5190354", "0.51859695", "0.51150626", "0.50848705", "0.50735766", "0.5066258", "0.5064786", "0.5052602", "0.5048074", "0.50434613", "0.50308484", "0.5015806", "0.50075734", "0.500302", "0.49655655", "0.49653572", "0.49511957", "0.4950372", "0.4950196", "0.49446064", "0.4942362", "0.4933163", "0.4908494", "0.49046737", "0.49024308", "0.49012846", "0.48989698", "0.4898318", "0.48948744", "0.48754445", "0.48744655", "0.4867945", "0.48643535", "0.48638633", "0.4862997", "0.48508984", "0.48468903", "0.4843601", "0.48433402", "0.4839427", "0.4827899", "0.48269668", "0.4815789", "0.48118463", "0.48064357", "0.4798766", "0.47972065", "0.47966027", "0.47756916", "0.47739264", "0.47684997", "0.47638717", "0.47618204", "0.47406378", "0.47352841", "0.47318175", "0.47282478", "0.4726734", "0.47246662", "0.47114137", "0.47071612", "0.47019356", "0.4701186", "0.46975794", "0.46960446", "0.4684405", "0.46810308", "0.467956" ]
0.49906442
46
Display a listing of the resource.
public function index() { // $records = Payment::paginate(20); return view('payments.index', compact('records')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('payments.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $model = Payment::findOrFail($id); return view('payments.edit', compact('model')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }" ]
[ "0.78557473", "0.76946205", "0.72731614", "0.7241571", "0.71700776", "0.70650244", "0.7052897", "0.698311", "0.69465625", "0.6944826", "0.69399333", "0.69286525", "0.69031185", "0.68969506", "0.68969506", "0.6878258", "0.6862812", "0.6859171", "0.68560475", "0.68436426", "0.6834711", "0.6810601", "0.680613", "0.6804975", "0.68015367", "0.6795471", "0.6791821", "0.6791821", "0.6787303", "0.6783644", "0.67790574", "0.67766285", "0.6767741", "0.67610145", "0.67455536", "0.67455536", "0.6744367", "0.6743159", "0.6739656", "0.67351145", "0.67246765", "0.67128825", "0.6692859", "0.66916454", "0.6687554", "0.66875297", "0.6687494", "0.6684443", "0.668203", "0.66689324", "0.66680384", "0.6664605", "0.6664605", "0.66621166", "0.66604865", "0.66589504", "0.6655767", "0.66542184", "0.665213", "0.66422516", "0.6631665", "0.663077", "0.6627607", "0.6627607", "0.66193914", "0.6618503", "0.66160196", "0.66146857", "0.6609641", "0.6608315", "0.6605284", "0.6595882", "0.65947276", "0.6594626", "0.65895563", "0.6589339", "0.6587281", "0.65805006", "0.6579201", "0.6579166", "0.657641", "0.6576111", "0.65740323", "0.65692765", "0.6568046", "0.6567221", "0.6565346", "0.6560687", "0.6560687", "0.6560384", "0.65577257", "0.65569293", "0.65558636", "0.6555392", "0.65553015", "0.65542984", "0.655418", "0.6554106", "0.6547678", "0.65473104", "0.6543329" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // $records = Payment::findOrFail($id); $records->update($request->all()); flash()->success(trans('admin.messageEdited')); return redirect(route('payment.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $record = Payment::findOrFail($id); if (!$record) { return response()->json([ 'status' => 0, 'message' => trans('admin.error') ]); } $record->delete(); return response()->json([ 'status' => 1, 'message' => trans('admin.messageDeleted'), 'id' => $id ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
RADIO BUTTON CLASS FUNCTION: GET CHOICE
public static function getChoice($menuname) { // Check to see if a choice has been made previously or is a session variable if (!isset($_SESSION["$menuname"]) || $_SESSION["$menuname"] == "") { // no session var, see if in $_POST if (isset($_POST["$menuname"]) && $_POST["$menuname"] != -9999) { $choice = $_POST["$menuname"]; } else { $choice= -1; } // nothing in $_POST or $_SESSION } else { $choice = $_SESSION["$menuname"]; } // use session data to get choice return $choice; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_selected()\n {\n }", "public function getChoiceList()\n {\n return $this->choice;\n }", "public function getControl()\n {\n return \\Nette\\Forms\\Controls\\BaseControl::getControl()->checked($this->value);\n }", "public function getChoix()\n {\n return $this->valeur;\n }", "protected static function radio()\n {\n }", "function tep_mod_select_option($select_array, $key_name, $key_value) {\n reset($select_array);\n while (list($key, $value) = each($select_array)) {\n if (is_int($key)) $key = $value;\n $string .= '<br><input type=\"radio\" name=\"configuration[' . $key_name . ']\" value=\"' . $key . '\"';\n if ($key_value == $key) $string .= ' CHECKED';\n $string .= '> ' . $value;\n }\n\n return $string;\n}", "function isSelected($val,$option) {\r\n $cmp = strcmp($val,$option);\r\n if ($cmp == 0)\r\n return \" SELECTED\";\r\n else\r\n return \"\";\r\n}", "public static function renderRadio();", "function form_radio_group($field, $options) {\n\n}", "public function getChoices();", "public function getRadioInput($key)\n\t{\n\t\t$control = parent::getControl();\n\t\t$id = $control->id;\n\t\t$value = $this->value === NULL ? NULL : (string) $this->getValue();\n\t\t$control->id = $id . '-' . $key;\n\t\t$control->checked = (string) $key == $value;\n\t\t$control->value = $key;\n\t\treturn $control;\n\t}", "function option_radiobutton($label, $name, $value='', $keys, $comment='') {\r\n\t\techo \"<tr valign='top'><th scope='row'>\" . $label . \"</th>\";\r\n\t\techo \"<td>\";\r\n\r\n\t\tforeach ((array)$keys as $key => $description) {\r\n\t\t\tif ($key == $value)\r\n\t\t\t\t$checked = \"checked\";\r\n\t\t\telse\r\n\t\t\t\t$checked = \"\";\r\n\t\t\techo \"<input type='radio' id='$name' name='$name' value='\" . htmlentities($key, ENT_QUOTES, 'UTF-8') . \"' $checked />\" . $description . \"<br>\";\r\n\t\t}\r\n\t\techo $comment . \"<br>\";\r\n\t\techo \"</td></tr>\";\r\n\t}", "function acf_get_radio_input($attrs = array())\n{\n}", "private function getCheckboxOrRadioOptions($type) {\n $result = \"\";\n foreach($this->itemList as $key => $val) {\n $selectedText = \"\";\n if(in_array($key, $this->selectedItems)) {\n $selectedText = 'checked=\"checked\"';\n }\n $result .= '<section class=\"'.$type.'\">'.\"\\n \\t\";\n $result .= '<label>'.\"\\n \\t\";\n $result .= '<input type=\"'.$type.'\" value=\"'.$key.'\" name=\"'.$this->name.'\"/>'.$val.\"\\n \\t\";\n $result .= '</label>'.\"\\n \\t\";\n $result .= '</section>'.\"\\n \\t\";\n }\n return $result;\n }", "function radio_button($object, $field, $tag_value, $options = array()) {\n $form = new FormHelper($object, $field);\n return $form->to_radio_button_tag($tag_value, $options);\n}", "public function getChoicesCallback();", "function __checked_selected_helper($helper, $current, $display, $type)\n {\n }", "public function choice_group() {\n return $this->group;\n }", "function checkIt( $field, $set, $type ) {\n\tswitch( $type ){\n\t\tcase 'radio' :\n\t\tcase 'check' :\n\t\t\t\t\t $language = 'checked=\"checked\"';\n\t\t\t\t\t break;\n\t\tcase 'select' :\n\t\t\t\t\t $language = 'selected=\"selected\"';\n\t\t\t\t\t break;\n\t}\n\tif ( $field == $set ){\n\t\t$selected = $language;\n\t} else {\n\t\t$selected = '';\n\t}\n\treturn $selected;\n}", "function mk_radio( $myTitle, $myName, $myValue, $myChek1, $myChek2, $myDesc1, $myDesc2 ){\n\t#initialize needed variables\n\t$str = $chekd1 = $chekd2 = '';\n\n\tif ($myValue == $myChek1) { $chekd1 = \"checked='checked'\"; }else{$chekd2 = \"checked='checked'\";}\n\n\t$str .= '<div class=\"row hoverHighlight\">\n\t\t\t<div class=\"col-sm-3 text-right text-muted\">\n\t\t\t\t<p class=\"text-right\">\n\t\t\t\t\t<strong>' . ucwords($myTitle) . ': </strong>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<div class=\"col-sm-9\">\n\t\t\t\t<p>';\n\t\t\t\t$str .= \"<label>\n\t\t\t\t\t<input type='radio' value='{$myChek1}' name='{$myName}' {$chekd1}> &nbsp; {$myDesc1} &nbsp; &nbsp; </label>\n\t\t\t\t\t<input type='radio' value='{$myChek2}' name='{$myName}' {$chekd2}> &nbsp; {$myDesc2} </label>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</div>\";\n\n\treturn $str;\n}", "function uds_pricing_render_product_options_radiocross($key, $value)\n{\n\tglobal $uds_pricing_column_options;\n\t$field = $uds_pricing_column_options[$key];\n\t$selected = $value ? 'checked=\"checked\"' : '';\n\t$out = \"\n\t\t<div>\n\t\t\t<label>{$field['label']}</label>\n\t\t\t<input type='radio' name='{$key}' value='$value' class='radio {$key}' $selected />\n\t\t\t<span class='tooltip'>?</span>\n\t\t\t<div class='tooltip-content'>{$field['tooltip']}</div>\n\t\t\t<div class='clear'></div>\n\t\t</div>\n\t\";\n\t\n\treturn $out;\n}", "function barnelli_wp_radio( $field ) {\n\tglobal $thepostid, $post, $vision;\n\n\t$thepostid \t\t\t\t= empty( $thepostid ) ? $post->ID : $thepostid;\n\t$field['class'] \t\t= isset( $field['class'] ) ? $field['class'] : 'select short';\n\t$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';\n\t$field['value'] \t\t= isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );\n\n\techo '<fieldset class=\"form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '\"><legend>' . wp_kses_post( $field['label'] ) . '</legend><ul>';\n\n\tif ( ! empty( $field['description'] ) ) {\n\t\techo '<li class=\"description\">' . wp_kses_post( $field['description'] ) . '</li>';\n\t}\n\n foreach ( $field['options'] as $key => $value ) {\n\n\t\techo '<li><label><input\n \t\tname=\"' . esc_attr( $field['id'] ) . '\"\n \t\tvalue=\"' . esc_attr( $key ) . '\"\n \t\ttype=\"radio\"\n \t\tclass=\"' . esc_attr( $field['class'] ) . '\"\n \t\t' . checked( esc_attr( $field['value'] ), esc_attr( $key ), false ) . '\n \t\t/> ' . esc_html( $value ) . '</label>\n \t</li>';\n\t}\n echo '</ul></fieldset>';\n}", "function zen_draw_selection_field($name, $type, $value = '', $checked = false, $parameters = '') {\n $selection = '<input type=\"' . zen_output_string($type) . '\" name=\"' . zen_output_string($name) . '\"';\n\n if (zen_not_null($value)) $selection .= ' value=\"' . zen_output_string($value) . '\"';\n\n if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) {\n $selection .= ' checked=\"checked\"';\n }\n\n if (zen_not_null($parameters)) $selection .= ' ' . $parameters;\n\n $selection .= ' />';\n\n return $selection;\n }", "function radio( $args ) {\n $current = Premium_Posts::get_settings( $args['key'] ) ? Premium_Posts::get_settings( $args['key'] ) : $args['default'];\n foreach( $args['options'] as $value => $label ) {\n printf(\n '<input type=\"radio\" name=\"%1$s\" value=\"%2$s\" %3$s /> %4$s<br />',\n esc_attr( $args['id'] ),\n esc_attr( $value ),\n $checked = checked( $current, $value, $echo = false ),\n esc_attr( $label )\n );\n }\n }", "function sb_slideshow_radio( $value, $key, $name, $checked = '' ) {\n\treturn '<input type=\"radio\" name=\"sb_' . esc_attr( $name ) . '\" id=\"' . esc_attr( $name . '_' . $value ) . '\"\n\t\tvalue=\"' . esc_attr( $value ) . '\"' . ($value == $checked ? 'checked=\"checked\"' : '') . ' />\n\t\t<label for=\"' . esc_attr( $name . '_' . $value ) . '\">' . $key . '</label><br />';\n}", "function tep_mod_select_option($select_array, $key_name, $key_value) {\n foreach ( $select_array as $key => $value ) {\n if (is_int($key)) $key = $value;\n $string .= '<br /><input type=\"radio\" name=\"configuration[' . $key_name . ']\" value=\"' . $key . '\"';\n if ($key_value == $key) $string .= ' checked=\"checked\"';\n $string .= ' /> ' . $value;\n }\n\n return $string;\n }", "private function radioCustomField(): string\n {\n $value = $this->getValue($this->index);\n foreach($this->options as &$option) {\n if($option['key'] == $value) {\n $option['checked'] = true;\n break;\n }\n }\n\n return Template::build($this->getTemplatePath('radio.html'), [\n 'id' => uniqid(\"{$this->id}-\", true),\n 'name' => $this->id,\n 'label' => $this->label,\n 'options' => $this->options,\n 'index' => isset($this->index) ? $this->index : false\n ]);\n }", "public static function createFromArray() {\n\n $args = func_get_args();\n\t\n\tswitch (count($args)) {\n\n\t\tcase 2: \n\t\t\t\t$buttonset = $args[0];\n\t\t\t\t$array = $args[1];\n\t\t\t\t$auto = 0; // don't auto-submit\n\t\t\t\tbreak;\n\n\t\tcase 3: \n\t\t\t\t$buttonset = $args[0];\n\t\t\t\t$array = $args[1];\n\t\t\t\t$atuo = DropDownList::testAutoSubmit($args[2]);\n\t\t\t\tbreak;\n }\n \n \t// Check to see if a choice has been made previously or is a session variable\n \n $choice = RadioButton::getChoice($buttonset);\n \n // Create the radio button set... \n if ($choice == -1) { // No choice made -- user prompted to select\n \n while (list($key, $value) = each ($array)) {\n echo \"<INPUT type=\\\"radio\\\" name=\\\"$buttonset\\\" value=\\\"$key\\\"> $value<BR>\"; \n } // end of while loop\n }\n else { // prior choice made -- select that value\n while (list($key, $value) = each ($array)) {\n if ($key == $choice) { echo \"<INPUT type=\\\"radio\\\" name=\\\"$buttonset\\\" value=\\\"$key\\\" checked> $value<BR>\"; }\n else { echo \"<INPUT type=\\\"radio\\\" name=\\\"$buttonset\\\" value=\\\"$key\\\"> $value<BR>\"; }\n } // end of while loop\n \n }\n \n return;\n \n}", "function getChoiceCategoryType(){\n\n\t\t$query = $this->db->get('tbl_choice_category_type');\n\t\treturn $query->result();\n\t}", "function select_option()\r\n{}", "function woocommerce_form_field_radio( $key, $args, $value = '' ) {\n global $woocommerce;\n $defaults = array(\n 'type' => 'radio',\n 'label' => '',\n 'placeholder' => '',\n 'required' => false,\n 'class' => array(),\n 'label_class' => array(),\n 'return' => false,\n 'options' => array(),\n );\n $args = wp_parse_args( $args, $defaults );\n\n $required = ( $args[ 'required' ] ) ? ' <abbr class=\"required\" title=\"' . esc_attr__( 'required', 'woocommerce' ) . '\">*</abbr>' : '';\n switch ( $args[ 'type' ] ) {\n case \"select\":\n $options = '';\n if ( !empty( $args[ 'options' ] ) ) {\n $count = 0;\n foreach ( $args[ 'options' ] as $option_key => $option_text ) {\n $checked = $count === 1 ? 'checked=\"checked\"' : '';\n $options .= '<li><input type=\"radio\" name=\"'.$key .'\" id=\"'.$key.'\" value=\"'.$option_key.'\" '.selected( $value, $option_key, false ).' '.$checked.' > <span>'.$option_text.'</span></li>';\n $field = '<ul class=\"form-row '.implode( ' ', $args[ 'class' ] ).'\" id=\"'.$key.'_field\">'.$options.'</ul>';\n $count++;\n }\n }\n break;\n }\n if ( $args[ 'return' ] ) {\n return $field;\n } else {\n echo $field;\n }\n}", "function radioButtonChecked($chkName){\n\t\t$radioButtonString = '';\n\t\t$chkText = '';\n\t\tif ( $_GET[$chkName->name] == $chkName->value){\n\t\t\t\t$chkText = 'checked';\n\t\t}\n\t\t\t $radioButtonString = $radioButtonString . '<input ' .$chkText. ' ' .$chkName->status.' type=\"radio\" id =\"' .$chkName->value. '\" value=\"' .$chkName->value. '\" name=\"' .$chkName->name. '\" class=\"' .$chkName->class. '\">' .$chkName->label. ' ';\n\t\t\n\t\treturn $radioButtonString;\n\t}", "function olc_mod_select_option($select_array, $key_name, $key_value) {\n\treset($select_array);\n\twhile (list($key, $value) = each($select_array)) {\n\t\tif (is_int($key)) $key = $value;\n\t\t$string .= '<br/><input type=\"radio\" name=\"configuration[' . $key_name . ']\" value=\"' . $key . QUOTE;\n\t\tif ($key_value == $key) $string .= ' CHECKED';\n\t\t$string .= '> ' . $value;\n\t}\n\n\treturn $string;\n}", "static function get_option_values_select_radio( $field_key ) {\n\t\tglobal $wpdb;\n\t\tif ( is_multisite() ) {\n\t\t\t$current_blog = get_current_blog_id();\n\t\t\t$sql = \"SELECT options FROM {$wpdb->base_prefix}pp_profile_fields WHERE field_key = '$field_key' AND (blog_id = 0 OR blog_id = $current_blog)\";\n\t\t}\n\t\telse {\n\t\t\t$sql = \"SELECT options FROM {$wpdb->base_prefix}pp_profile_fields WHERE field_key = '$field_key'\";\n\t\t}\n\n\t\treturn $wpdb->get_col( $sql );\n\t}", "public function radiobuttonClicked($sender,$param)/*\n Module: radiobuttonClicked\n Parameters:\n * $sender -- Page that sent request\n * $param -- Tcontrol that sent request\n Author Name(s): Nate Priddy\n Date Created: 12/7/2010\n Purpose: Not in use!\n * Meant to be used when radio buttons rather than select button is\n * used to make adjusstments to lists\n */{\n $item = $param->Item;\n // obtains the primary key corresponding to the datagrid item\n $RL_ID = $this->RecipeUserListGrid->DataKeys[$item->ItemIndex];\n $this->SetSelectedID($RL_ID);\n $this->UserListRebind($this->User->getUserId());\n $this->ListRebind($RL_ID);\n }", "function get_selected($value,$comparison_value='')\n{\n\treturn ($value == $comparison_value) ? 'selected': ''; \n}", "public function getControlType()\n {\n return 'radio';\n }", "function selectStock() {\n\n\tglobal $db;\n\n\tglobal $p_stock;\n\n\tif ($p_stock == 'In stock') {\n\t\t\n\t\techo \"<option value='Out of stock'>Out of stock</option>\";\n\n\t} else {\n\n\t\techo \"<option value='In stock'>In stock</option>\";\n\n\t}\n}", "function ffw_port_radio_callback( $args ) {\n global $ffw_port_settings;\n\n foreach ( $args['options'] as $key => $option ) :\n $checked = false;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) && $ffw_port_settings[ $args['id'] ] == $key )\n $checked = true;\n elseif( isset( $args['std'] ) && $args['std'] == $key && ! isset( $ffw_port_settings[ $args['id'] ] ) )\n $checked = true;\n\n echo '<input name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"\" id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\" type=\"radio\" value=\"' . $key . '\" ' . checked(true, $checked, false) . '/>&nbsp;';\n echo '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\">' . $option . '</label><br/>';\n endforeach;\n\n echo '<p class=\"description\">' . $args['desc'] . '</p>';\n}", "function display_choice($array)\n{\n\tglobal $config;\n\t\n\tswitch ($array['type']) {\n\tcase 'text':\n\t\techo '<input type=\"text\" id=\"' . $array['name'] . '\" name=\"' . $array['name'] . '\" value=\"' . $config[$array['name']] . '\" />';\n\t\tbreak;\n\tcase 'select':\n\t\techo '<select id=\"' . $array['name'] . '\" name=\"' . $array['name'] . '\" onchange=\"' . $array['script'] . '\">';\n\t\tforeach ($array['options'] as $option) {\n\t\t\techo \"<option label='\" . $option . \"' value='\" . $option . \"' \";\n\t\t\tif ($option == $config[$array['name']])\n\t\t\t\techo \"selected='selected'\";\n\t\t\techo \">\" . $option . \"</option>\\n\";\n\t\t}\n\t\techo '</select>';\n\t\tbreak;\n\n\tcase 'array':\n\t\techo '<input type=\"text\" name=\"' . $array['name'] . '\" value=\"' . implode(',',$config[$array['name']]) . '\" id=\"' . $array['name'] . '\" />';\n\t\tbreak;\n\n\tcase 'boolean':\n\t\techo '<select id=\"' . $array['name'] . '\" name=\"' . $array['name'] . '\" onchange=\"' . $array['script'] . '\">';\n\t\techo \"<option label='TRUE' value='TRUE' \";\n\t\tif ($config[$array['name']])\n\t\t\techo \"selected='selected'\";\n\t\techo \">TRUE</option>\\n\";\n\t\techo \"<option label='FALSE' value='FALSE' \";\n\t\tif (!$config[$array['name']])\n\t\t\techo \"selected='selected'\";\n\t\techo \">FALSE</option>\\n\";\t\t\n\t\techo '</select>';\n\t\tbreak;\n\t\t\n\tdefault:\n\t\tbreak;\n\t}\n}", "public function choice($field) {\n\t\t\t$this->all($field);\n\t\t\t$args = array(\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'label' => '',\n\t\t\t\t'instructions' => '',\n\t\t\t\t'name' => 'to_content_format',\n\t\t\t\t'_append' => 'to_content',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'label' => 'Label',\n\t\t\t\t\t'value' => 'Value',\n\t\t\t\t\t'both' => 'Both'\n\t\t\t\t),\n\t\t\t\t'default_value' => 'label',\n\t\t\t\t'layout' => 'horizontal',\n\t\t\t\t'required' => 0,\n\t\t\t\t'allow_null' => 0,\n\t\t\t\t'wrapper' => array(\n\t\t\t\t\t'width' => '',\n\t\t\t\t\t'class' => 'acf-to-content-format',\n\t\t\t\t\t'id' => ''\n\t\t\t\t)\n\t\t\t);\n\t\t\tacf_render_field_setting($field, $args, false);\n\t\t}", "function callback_radio(array $args)\n {\n }", "private function selectedCheckbox($parametro)\n {\n if($parametro==1)\n {\n return 'checked';\n }\n else\n {\n return '';\n }\n }", "function getFieldGender(){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_sex');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_sex');\n\t\t$tooltip = setToolTipNotification(\"gender\");\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('gender') === 'gender' ? '<span class=\"red\">*</span>' : '').$tooltip.\"</label><br><input class='gender' type='radio' name='sex' value='M' data-value='Male' checked>&nbsp;&nbsp;Male</br><input class='gender' type='radio' name='sex' data-value='Female' value='F'>&nbsp;&nbsp;Female<br>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "public static function alm_filters_radio_select($field){\n\t \t$return = false;\n\t \tif($field === 'radio' || $field === 'select' || $field === 'select_multiple'){\n\t\t \t$return = true;\n\t \t}\n\t \treturn $return;\n \t}", "public function getSelected() {}", "public function getSelected() {}", "public function orderRadio()\n {\n $order = get_site_option($this->orderOption);\n\n if (!is_string($order)) {\n $order = 'DESC';\n }\n ?>\n <p>\n <label>\n <input id=\"<?php echo $this->orderOption; ?>\" <?php echo $order === 'DESC'\n ? 'checked'\n : ''; ?> name=\"<?php echo $this->orderOption; ?>\" type=\"radio\" value=\"DESC\">DESC\n </label><br>\n\n <label>\n <input id=\"<?php echo $this->orderOption; ?>\" <?php echo $order === 'ASC'\n ? 'checked'\n : ''; ?> name=\"<?php echo $this->orderOption; ?>\" type=\"radio\" value=\"ASC\">ASC\n </label>\n </p>\n <?php\n }", "function radioButtonHtml($groupName, $buttonValue, $displayValue, $isChecked) {\n $checked = $isChecked ? ' checked' : '';\n $html = \"<input type='radio' name='$groupName' value='$buttonValue'$checked>\";\n return $html . $displayValue . '<br>';\n}", "function radio($item, $default_value, $key, $value) {\n\n\t\t$checked = (check_plain($default_value) == $key) ? ' checked=\"checked\" ' : ' ';\n\n\t\t$retval ='<input type=\"radio\" '\n\t\t\t. 'name=\"' . $item['#name'] .'\" '\n\t\t\t. 'value=\"'. $key .'\" '\n\t\t\t. \"class=\\\"reg-level-radio\\\" \"\n\t\t\t. $checked\n\t\t\t. \" />\"\n\t\t\t;\n\n\t\tif (!is_null($item['#title'])) {\n\t\t\t$retval = \"<label class=\\\"option reg-level\\\">\" . $retval . \" \" . $value \n\t\t\t\t. \"</label><br><br>\\n\";\n\t\t}\n\n\t\treturn($retval);\n\n\t}", "public function getValue()\n {\n return $this->checked;\n }", "function getDropDown() ;", "function mc_option_selected( $field, $value, $type = 'checkbox' ) {\n\tswitch ( $type ) {\n\t\tcase 'radio':\n\t\tcase 'checkbox':\n\t\t\t$result = ' checked=\"checked\"';\n\t\t\tbreak;\n\t\tcase 'option':\n\t\t\t$result = ' selected=\"selected\"';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$result = '';\n\t\t\tbreak;\n\t}\n\tif ( $field == $value ) {\n\t\t$output = $result;\n\t} else {\n\t\t$output = '';\n\t}\n\n\treturn $output;\n}", "function radio( $element )\n\t\t{\t\n\t\t\t$output = \"\";\n\t\t\t$counter = 1;\n\t\t\tforeach($element['buttons'] as $radiobutton)\n\t\t\t{\t\n\t\t\t\t$checked = \"\";\n\t\t\t\tif( $element['std'] == $counter ) { $checked = 'checked = \"checked\"'; }\n\t\t\t\t\n\t\t\t\t$output .= '<span class=\"ace_radio_wrap\">';\n\t\t\t\t$output .= '<input '.$checked.' type=\"radio\" class=\"'.$element['class'].'\" ';\n\t\t\t\t$output .= 'value=\"'.$counter.'\" id=\"'.$element['id'].$counter.'\" name=\"'.$element['id'].'\"/>';\n\t\t\t\t\n\t\t\t\t$output .= '<label for=\"'.$element['id'].$counter.'\">'.$radiobutton.'</label>';\n\t\t\t\t$output .= '</span>';\n\t\t\t\t\n\t\t\t\t$counter++;\n\t\t\t}\t\n\t\t\t\t\n\t\t\treturn $output;\n\t\t}", "function smartchoice_get_choice($choiceid) {\n global $DB;\n\n if ($choice = $DB->get_record('smartchoice', array('id' => $choiceid))) {\n if ($options = $DB->get_records('smartchoice_options', array('choiceid' => $choiceid), 'id')) {\n foreach ($options as $option) {\n $choice->option[$option->id] = $option->text;\n }\n\n return $choice;\n }\n }\n\n return false;\n}", "function tep_cfg_select_option($select_array, $key_value, $key = '') {\n $string = '';\n for ($i = 0, $n = sizeof($select_array); $i < $n; $i++) {\n $name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');\n $string .= '<br><input type=\"radio\" name=\"' . $name . '\" value=\"' . $select_array[$i] . '\"';\n if ($key_value == $select_array[$i]) $string .= ' CHECKED';\n $string .= '> ' . $select_array[$i];\n }\n\n return $string;\n}", "function brthemeoptions_backofficeCallback_iconset() {\n\t$options = get_option('brthemeoptions', themeoptionsGet_default());\n\t$sets = array(\n\t\tarray('id'=>'disabled','label'=>'Désactivé'),\n\t\tarray('id'=>'myicon','label'=>'Manuel (.myicon)'),\n\t\tarray('id'=>'glyphicon','label'=>'Glyphicon','url'=>'<a href=\"http://getbootstrap.com/components/#glyphicons\" target=\"_blank\">afficher</a>'),\n\t\tarray('id'=>'font-awesome','label'=>'Font-Awesome','url'=>'<a href=\"http://fortawesome.github.io/Font-Awesome/icons/\" target=\"_blank\">afficher</a>'),\n\t\tarray('id'=>'elusive','label'=>'Elusive','url'=>'<a href=\"http://shoestrap.org/downloads/elusive-icons-webfont/\" target=\"_blank\">afficher</a>')\n\t\t);\n\n\tforeach ($sets as $S) {\n\t\techo '<input '.checked( $options['iconset'], $S['id'] , false).' name=\"brthemeoptions[iconset]\" type=\"radio\" value=\"'.$S['id'].'\" id=\"brthemeoptions[iconset]\" /> '.$S['label'];\n\t\techo (isset($S['url']) ? ' '.$S['url'] : false);\n\t\techo '<br>';\n\t}\n}", "function zen_draw_radio_field($name, $value = '', $checked = false, $parameters = '') {\n return zen_draw_selection_field($name, 'radio', $value, $checked, $parameters);\n }", "protected function getHairColorChoice()\n {\n $optCollection = $this->createMockOptionCollection(4);\n// $optCollection->add(\n// (new Option('noir', 300))\n// ->add(new Option\\Data\\Text('les cheveux noirs'))\n// );\n// $optCollection->add(\n// (new Option('blond', 100))\n// ->add(new Option\\Data\\Text('les cheveux blonds'))\n// );\n// $optCollection->add(\n// (new Option('vert', 5))\n// ->add(new Option\\Data\\Text('les cheveux verts'))\n// );\n// $optCollection->add(\n// (new Option('violet', 1))\n// ->add(new Option\\Data\\Text('les cheveux violets'))\n// );\n\n $choice = new Choice('cheveux', $optCollection);\n\n return $choice;\n }", "function input_radiocheck($type, $element_name, $values, $element_value) {\r\n print '<input type=\"' . $type . '\" name=\"' . $element_name .'\"id=\"'.$element_name.'\" value=\"' . $element_value . '\" ';\r\n if ($element_value == $values[$element_name]) {\r\n print ' checked=\"checked\"';\r\n }\r\n print '/>';\r\n}", "function getOption($name);", "function smarty_function_v4b_selector_yesno ($params, &$smarty) \n{\n $selected = $params['selected'];\n $defaultValue = $params['defaultValue'];\n $defaultText = $params['defaultText'];\n $lang = $params['lang'];\n $name = $params['name'];\n\n require_once ('includes/v4blib/HtmlUtil.class.php');\n return HtmlUtil::getSelector_Category ('/__SYSTEM__/General/YesNo', $name,\n $selected, $defaultValue, $defaultText, $lang);\n}", "function onRender($e, $t) {\n\t\t$v = $t->viewGet();\n\t\t$v->pushText('Label', $this->getLabel());\n\t\t$v->pushText('Reqd', $this->isRequired());\n\t\t$select = $this->_selectProvider->provideDataAndRead($t);\n\t\tassert($select);\n\t\t$selected = $this->getValue($t);\n\t\t$body = '';\n\t\tforeach ($select as $key => $value) {\n\t\t\tif ($selected == $key) {\n\t\t\t\t$checked = 'checked';\n\t\t\t} else {\n\t\t\t\t$checked = '';\n\t\t\t}\n\t\t\t$body .= \"<label><input type=\\\"radio\\\" name=\\\"$this->_name\\\" value=\\\"$key\\\" $checked />$value</label><br/>\";\n\t\t\t//debug('t', $body);\n\t\t}\n\t\t$v->pushText('Body', $body);\n\t\treturn true;\n\t}", "function ShowInRadioBox( $Table, $name_fld, $cols, $val, $position = \"left\", $disabled = NULL, $sort_name = 'move', $asc_desc = 'asc' )\n {\n //$Tbl = new html_table(1);\n\n $row1 = NULL;\n if (empty($name_fld)) $name_fld=$Table;\n\n $tmp_db = DBs::getInstance();\n $q = \"SELECT * FROM `\".$Table.\"` WHERE 1 LIMIT 1\";\n $res = $tmp_db->db_Query($q);\n //echo '<br>q='.$q.' res='.$res.' $tmp_db->result='.$tmp_db->result;\n if ( !$res ) return false;\n if ( !$tmp_db->result ) return false;\n $fields_col = mysql_num_fields($tmp_db->result);\n\n if ($fields_col>4) $q = \"select * from `\".$Table.\"` where lang_id='\"._LANG_ID.\"' order by `$sort_name` $asc_desc\";\n else $q = \"select * from `\".$Table.\"` where lang_id='\"._LANG_ID.\"'\";\n\n $res = $tmp_db->db_Query($q);\n if (!$res) return false;\n $rows = $tmp_db->db_GetNumRows();\n\n $col_check=1;\n //$Tbl->table_header();\n //$Tbl->tr();\n echo '<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" align=\"left\" ><tr>';\n for( $i = 0; $i < $rows; $i++ )\n {\n $row1 = $tmp_db->db_FetchAssoc();\n if ($col_check > $cols) {\n //$Tbl->tr();\n echo '</tr><tr>';\n $col_check=1;\n }\n\n $checked ='>';\n if ($val==$row1['cod']) $checked = \" checked\".$checked;\n\n if ( $position == \"left\" ) $align= 'left';\n else $align= 'right';\n echo \"\\n<td align=\".$align.\" valign='middle' class='checkbox'>\";\n\n if ( $position == \"left\" ) echo \"<input class='checkbox' type='radio' name='\".$name_fld.\"' value='\".$row1['cod'].\"' \".$disabled.\" \".$checked.' '.stripslashes($row1['name']);\n else echo stripslashes($row1['name']).\"<input class='checkbox' type='checkbox' name=\".$name_fld.\" value='\".$row1['cod'].\"' \".$disabled.\" \".$checked;\n echo \"</td>\";\n $col_check++;\n }\n echo '</tr></table>';\n //$Tbl->table_footer();\n }", "function getEstadoRp($fEstado, $opt){\r\nconnect();\r\n switch($opt){\r\n\tcase 0:\r\n\t $status[0] = 'PE'; $d_status[0] = 'Pendiente';\r\n\t\t $status[1] = 'PA'; $d_status[1] = 'Pagado';\r\n\t\t $cant = 2;\r\n\t\t for($i=0;$i<$cant;$i++){\r\n\t\t if($status[$i]==$fEstado) echo\"<option value='$status[$i]' selected>$d_status[$i]</option>\";\r\n\t\t\telse echo\"<option value='$status[$i]'> $d_status[$i]</option>\";\r\n\t\t }\r\n }\r\n}", "protected function getSelectedValue() {}", "public function getControl()\r\n {\r\n return $this->_checkBoxTreeRender($this->_getTree());\r\n }", "function drawMultiRadioBoxes($baseName,$selectedItem, $items, $valueColumnName, $titleColumnName, $options=null) {\n\n\t\t$sortBy = $options['sortBy'];\n\t\tif (!$sortBy)\n\t\t\t$sortBy = 'value';\n\t\t\n\t\t$optionType = $options['type'];\n\t\tif ($optionType=='radio' or empty($optionType)) {\n\t\t\t$optionType = 'radio';\n\t\t} else {\n\t\t\t$baseName.='[]';\n\t\t}\n\t\t\n\t\t//echo $optionType;\n\t\t\n\t\tif (!is_array($selectedItem))\n\t\t\t$selectedItems[] = $selectedItem;\n\t\telse\n\t\t\t$selectedItems = $selectedItem;\n\t\t\n\t\t$displayMode = $options['displayMode'];\n\t\tif (!$displayMode)\n\t\t\t$displayMode = 'table';\n\t\t\n\t\t$template['table'] = array(\n\t\t\t'mainWrapper' => '<table %wrapperAttributes%>%contents%</table>',\n\t\t\t'contents' => '<tr>%fields%</tr>',\n\t\t\t'fields' => '<td>%field%</td>',\n\t\t\t'defaultAttributes' => array(\n\t\t\t\t'border' => 0,\n\t\t\t),\n\t\t);\n\t\t$template['normal'] = array(\n\t\t\t'mainWrapper' => '<p>%contents%</p>',\n\t\t\t'contents' => '%fields%',\n\t\t\t'fields' => '%field%<br />',\n\t\t\t'defaultAttributes' => array(\n\t\t\t\t'border' => 0,\n\t\t\t),\n\t\t);\n\t\t\n\t\tif (is_array($options[$displayMode])){\n\t\t\t$attributes = array_merge($template[$displayMode]['defaultAttributes'], $options[$displayMode]);\n\t\t\t$wrapperAttributes = cmfcHtml::attributesToHtml($attributes);\n\t\t}\n\t\telseif (is_string($options[$displayMode]))\n\t\t\t$wrapperAttributes = $options[$displayMode];\n\t\t\n\t\tif (is_array($options['inputAttributes']))\n\t\t\t$inputAttributes = cmfcHtml::attributesToHtml($options['inputAttributes']);\n\t\telseif (is_string($options['inputAttributes']))\n\t\t\t$inputAttributes = $options['inputAttributes'];\n\t\t\n\t\t$numColumns = $options['columns'];\n\t\tif (!$numColumns)\n\t\t\t$numColumns = 5;\n\t\t\n\t\tif (is_string($items)){\n\t\t\t$items = cmfcMySql::getRowsCustom($items);\n\t\t}\n\t\t\n\t\t$counter = 0;\n\t\t$contents = '';\n\t\tif (is_array($items)){\n\t\t\t//cmfcHtml::printr($items);\n\t\t\tswitch ($sortBy){\n\t\t\tcase 'title':\n\t\t\t\t$items = cmfcArray::sortItems($items, $titleColumnName, 'asc');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'value':\n\t\t\t\t$items = cmfcArray::sortItems($items, $valueColumnName, 'asc');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$items = cmfcArray::sortItems($items, $valueColumnName, 'asc');\n\t\t\t}\n\t\t\t//cmfcHtml::printr($items);\n\t\t\t//cmfcHtml::printr( $options);\n\t\t\tforeach ($items as $item) {\n\t\t\t\t//cmfcHtml::printr($item);\n\t\t\t\t//echo $numColumns;\n\t\t\t\t$counter ++;\n\t\t\t\t\n\t\t\t\tif (in_array($item[$valueColumnName], $selectedItems) )\n\t\t\t\t\t$checked='checked=\"checked\"';\n\t\t\t\telse \n\t\t\t\t\t$checked='';\n\t\t\t\t\n\t\t\t\tif (in_array($optionType, array('checkbox', 'radio')) ){\n\t\t\t\t\t$value = $item[$valueColumnName];\n\t\t\t\t\t$field = '<input '.$inputAttributes.\n\t\t\t\t\t\t'name=\"'.$baseName.'\" id=\"'.$baseName.$counter.'\" type=\"'.$optionType.'\" value=\"'.$value.'\" '.$checked.'>&nbsp;<label for=\"'.$baseName.$counter.'\">';\n\t\t\t\t\t\n\t\t\t\t\tif(is_array($options['strongItems']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(in_array($value, $options['strongItems'])) {\n\t\t\t\t\t\t\t$itemTitleColumnName = \"<b>\".$item[$titleColumnName].\"</b>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$itemTitleColumnName = $item[$titleColumnName];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$itemTitleColumnName = $item[$titleColumnName];\n\t\t\t\t\t}\n\t\t\t\t\t$field .= $itemTitleColumnName;\n\t\t\t\t\t$field .= '</label>';\n\t\t\t\t}\n\t\t\t\telseif ($optionType == 'custom'){\n\t\t\t\t\tif ($checked)\n\t\t\t\t\t\t$tag = $options['tag']['selected'];\n\t\t\t\t\telse\n\t\t\t\t\t\t$tag = $options['tag']['notSelected'];\n\t\t\t\t\t\n\t\t\t\t\t$value = $item[$titleColumnName];\n\t\t\t\t\t$tag = str_replace('%value%', $value, $tag);\n\t\t\t\t\t$tag = str_replace('%inputAttributes%', $inputAttributes, $tag);\n\t\t\t\t\t\n\t\t\t\t\t$field = $tag;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= str_replace('%field%', $field, $template[$displayMode]['fields']);\n\t\t\t\t\n\t\t\t\tif ($counter % $numColumns == 0) {\n\t\t\t\t\t$contents .= str_replace('%fields%', $html, $template[$displayMode]['contents']);\n\t\t\t\t\t$html = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($html){\n\t\t\t\t$contents .= str_replace('%fields%', $html, $template[$displayMode]['contents']);\n\t\t\t}\n\t\t\t$result = str_replace('%contents%', $contents, $template[$displayMode]['mainWrapper']);\n\t\t}\n\t\telse{\n\t\t\t$result = 'no valid items';\n\t\t}\n\t\treturn $result;\n\t}", "function radio( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null,\n\t $options = array(),\n\t $datatype = Form::DATA_STRING\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_RADIO,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t $options,\n\t $datatype\n );\n\t}", "function acf_radio_input($attrs = array())\n{\n}", "public function getProductOption();", "function theme_radios(&$item) {\n\n\t\t$retval = \"\";\n\n\t\t//\n\t\t// Get a list of our current membership levels for later use.\n\t\t//\n\t\t$levels = $this->get_valid_levels();\n\n\t\t$class = 'form-radios';\n\t\tif (isset($item['#attributes']['class'])) {\n\t\t\t$class .= ' '. $item['#attributes']['class'];\n\t\t}\n\n\t\t//\n\t\t// Do a pre-liminary loop through our values, and set a flag\n\t\t// if we find any default values from a past form submission.\n\t\t//\n\t\t$value_found = false;\n\t\tforeach ($item[\"#options\"] as $key => $value) {\n\t\t\tif (!empty($item[\"#value\"])) {\n\t\t\t\t$value_found = true;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($item[\"#options\"] as $key => $value) {\n\n\t\t\t//\n\t\t\t// If we did not find any radio buttons that were set, then set\n\t\t\t// the first one in the list.\n\t\t\t//\n\t\t\tif (empty($value_found)) {\n\t\t\t\t$item[\"#value\"] = $key;\n\t\t\t\t$value_found = true;\n\t\t\t}\n\n\t\t\t$retval .= $this->radio($item, $item[\"#value\"], $key, $value);\n\n\t\t\t$price = $levels[$key][\"price\"];\n\n\t\t\t//\n\t\t\t// Create a span tag that contains the price for this level, for\n\t\t\t// later use by jQuery.\n\t\t\t//\n\t\t\t$retval .= \"<span id=\\\"reg-level-id-$key\\\" \"\n\t\t\t\t. \"style=\\\"display: none; \\\" \"\n\t\t\t\t. \">$price</span>\\n\";\n\n\t\t}\n\n\t\treturn($retval);\n\n\t}", "public function get_value() {\n return $this->get_selected_options();\n }", "public function getType()\n {\n return 'radio';\n }", "public function getActiveChoices()\n {\n $choices = $this->find()->where(['category_id'=> $this->category_id, 'status' => 1])->orderBy('name')->all();\n\n $html = '';\n foreach($choices as $choice){\n\n $html .= ' <label><input type=\"checkbox\" value=\"'.$choice->id.'\" name=\"StartupForm[technology][]\"> '.$choice->name.'</label>';\n }\n return $html;\n }", "public function getButton() {}", "public function show_radrpt()\n {\n // load library to cek user session and level\n $this->pageauth->sess_level_auth();\n $this->load->model('pages/m_crud_report');\n $query = $this->m_crud_report->select_radrpt();\n foreach ($query->result() as $row) {\n echo \"<input onclick='GetRadValue()' type='radio' name='\".$row->el_name.\"' value='\".$row->rpt_code.\"'> \".$row->rpt_name.\"&nbsp;&nbsp;&nbsp;\";\n }\n }", "public function testSimpleChoice()\n {\n /** @var ChoicesAwareViewData $result */\n $result = $this->getContainer()->get(ONGRFilterManagerExtension::getFilterManagerId('single_choice'))\n ->handleRequest(new Request())->getFilters()['sc'];\n\n $expectedChoices = [\n 'green',\n 'yellow',\n 'red',\n 'blue',\n ];\n\n $actualChoices = [];\n\n foreach ($result->getChoices() as $choice) {\n $actualChoices[] = $choice->getLabel();\n }\n\n $this->assertEquals($expectedChoices, $actualChoices);\n }", "public function isChosen(){\r\n return $this->isChosen;\r\n }", "function get_rsvp_choices($opt2, $optRS, $countARR='', $setchoice='', $formtype=''){\n\t\t\t\t$selection = (!empty($optRS['evors_selection']))? $optRS['evors_selection']: true;\n\t\t\t\t$selOpt = array(\n\t\t\t\t\t'y'=>array('Yes', 'evoRSL_003'),\n\t\t\t\t\t'n'=>array('No', 'evoRSL_005'),\n\t\t\t\t\t'm'=>array('Maybe', 'evoRSL_004'),\n\t\t\t\t);\n\n\t\t\t\t$content ='';\n\t\t\t\t$lang = $this->get_local_lang();\n\n\t\t\t\t//if(!is_array($selection)) return false;\n\n\t\t\t\t$rsvp_option_count = 0;\n\t\t\t\tforeach($selOpt as $field=>$value){\n\n\t\t\t\t\tif(is_array($selection) && in_array($field, $selection) || $field=='y' || ($field=='n' && !empty($formtype) && $formtype!='submit') \n\t\t\t\t\t){\n\t\t\t\t\t\t$selCount = (!is_array($selection))? 'one ': '';\n\t\t\t\t\t\t$count = (!empty($countARR) && $countARR[$field] != ' (0)')? $countARR[$field]: null;\n\t\t\t\t\t\t$setChoice = (!empty($setchoice) && $setchoice==$field)?'set':'';\n\n\t\t\t\t\t\t$content .= \"<span data-val='{$field}' class='evors_choices {$selCount}{$setChoice}'>\".eventon_get_custom_language($opt2, $value[1],$value[0], $lang).$count.\"</span>\";\n\t\t\t\t\t\t$rsvp_option_count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->rsvp_option_count = $rsvp_option_count;\n\t\t\t\treturn $content;\n\t\t\t}", "static function cat_gender()\n {\n global $post;\n\n // Nonce field to validate form request came from current site\n wp_nonce_field(basename(__FILE__), 'cat_fields');\n\n // Get the gender data if it's already been entered\n $gender = get_post_meta($post->ID, 'gender', true);\n\n // Output the field\n echo sprintf('<input type=\"radio\" id=\"male\" name=\"gender\" %s value=\"male\">\n <label for=\"male\">Male</label><br>\n <input type=\"radio\" id=\"female\" name=\"gender\" %s value=\"female\">\n <label for=\"female\">Female</label><br><br>', $gender == 'male' ? 'checked' : '', $gender == 'female' ? 'checked' : '');\n }", "function check_radio_button($col, $row, $position)\n{\n\tif ($col.$row == $position)\n\t\treturn \" checked\";\n\telse\n\t\t;\n}", "public static function radioButton($name,$value,$selected=\"\",$id=\"\",$label=\"\",$class=\"\")\n\t{\n\t\tif(strlen(trim($id))){\n\t\t\t$id_html = ' id=\"'.$id.'\" ';\n\t\t}else{\n\t\t\t$id_html = ' ';\n\t\t}\n\n\t\tif($value == $selected){\n\t\t\t$selected_html = ' checked=\"checked\" ';\n\t\t}else{\n\t\t\t$selected_html = ' ';\n\t\t}\n\t\tob_start(); ?>\n\t\t\t<div class=\"radio <?php echo $class; ?>\">\n\t\t\t\t<label for=\"<?php echo $id; ?>\">\n\t\t\t\t\t<input type=\"radio\" id=\"<?php echo $id; ?>\" name=\"<?php echo $name; ?>\" value=\"<?php echo $value; ?>\" <?php echo $selected_html; ?> />\n\t\t\t\t\t<span class=\"cr\"><i class=\"cr-icon fa fa-circle\"></i></span>\n\t\t\t\t\t<?php echo $label; ?>\n\t\t\t\t</label>\n\t\t\t</div>\n\t\t<?php\n\t\treturn ob_get_clean();\n\t}", "function choose( $question, $choice = 'yn', $default = 'n' ) {\n\treturn Streams::choose( $question, $choice, $default );\n}", "function htmlRadio($nombre,$selected,$class=\"\") \n { \n $cad='';\n if(strlen($class)>0)\n $cad.='<span class=\"'.$class.'\" >';\n //radio de single\n $cad.='<input type=\"radio\" name=\"'.$nombre.'\" value=\"'.$this->single().'\" ';\n if($this->marsta_id==$selected)\n $cad.=' checked';\n $cad.=' > '.$this->marsta_name.' &nbsp&nbsp';\n //radio de married\n $cad.='<input type=\"radio\" name=\"'.$nombre.'\" value=\"'.$this->married().'\" ';\n if($this->marsta_id==$selected)\n $cad.=' checked';\n $cad.=' > '.$this->marsta_name.' &nbsp&nbsp';\n //radio de divorced\n $cad.='<input type=\"radio\" name=\"'.$nombre.'\" value=\"'.$this->divorced().'\" ';\n if($this->marsta_id==$selected)\n $cad.=' checked';\n $cad.=' > '.$this->marsta_name.' &nbsp&nbsp';\n \n if(strlen($class)>0)\n $cad.='</span>';\n \n return($cad);\n }", "public function renderRadio(): string\n\t{\n\t\t$gateUrl = $this->config->gateUrl;\n\t\t$queryArgs = [\n\t\t\t'merchantId' => $this->config->merchantId,\n\t\t\t'accountId' => $this->config->accountId,\n\t\t\t'name' => $this->name,\n\t\t\t'value' => $this->value,\n\t\t\t'showIcon' => $this->showIcon,\n\t\t\t'selected' => $this->isTpMethodChosen() ? (int) $_REQUEST['tp_radio_value'] : '',\n\t\t];\n\t\t// Currency is an optional argument. For compatibility reasons, it is\n\t\t// not present in the query at all if its value is empty.\n\t\tif ($this->currency) {\n\t\t\t$queryArgs['currency'] = $this->currency;\n\t\t}\n\n\t\t$queryArgs['signature'] = $this->createSignature($queryArgs);\n\n\t\t$queryArgs = http_build_query($queryArgs);\n\t\t$thepayGateUrl = \"{$gateUrl}radiobuttons/index.php?{$queryArgs}\";\n\t\t$thepayGateUrl = Escaper::jsonEncode($thepayGateUrl);\n\n\t\t$href = \"{$gateUrl}radiobuttons/style/radiobuttons.css?v=\" . time();\n\t\t$out = \"<link href=\\\"{$href}\\\" type=\\\"text/css\\\" rel=\\\"stylesheet\\\" />\\n\";\n\t\t$out .= \"<script type=\\\"text/javascript\\\">\\n\";\n\t\t$out .= \"\\tvar thepayGateUrl = {$thepayGateUrl};\\n\";\n\n\t\tif ($this->appendCode) {\n\t\t\t$thepayAppendCode = Escaper::jsonEncode($this->appendCode);\n\t\t\t$out .= \"\\tvar thepayAppendCode = {$thepayAppendCode};\\n\";\n\t\t}\n\n\t\t$out .= \"</script>\\n\";\n\n\t\t$src = \"{$gateUrl}radiobuttons/js/jquery.js?v=\" . time();\n\t\t$out .= \"<script type=\\\"text/javascript\\\" src=\\\"{$src}\\\" async=\\\"async\\\"></script>\\n\";\n\n\t\t$src = \"{$gateUrl}radiobuttons/js/radiobuttons.js?v=\" . time();\n\t\t$out .= \"<script type=\\\"text/javascript\\\" src=\\\"{$src}\\\" async=\\\"async\\\"></script>\\n\";\n\n\t\t$out .= \"<div id=\\\"thepay-method-box\\\"></div>\\n\";\n\n\t\treturn $out;\n\t}", "public function callback_radio( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n $html = '<fieldset>';\n\n foreach ( $args['options'] as $key => $label ) {\n $html .= sprintf( '<label for=\"wpuf-%1$s[%2$s]\">', $name_id, $key );\n $html .= sprintf( '<input type=\"radio\" class=\"radio\" id=\"wpuf-%1$s[%2$s]\" name=\"%1$s\" value=\"%2$s\" %3$s %4$s/>', $name_id, $key, checked( $value, $key, false ), $disable );\n $html .= sprintf( '%1$s</label><br>', $label );\n }\n\n $html .= $this->get_field_description( $args );\n $html .= '</fieldset>';\n\n echo $html;\n }", "public function getControl()\n\t{\n\t\t$items = $this->getPrompt() === FALSE ? array() : array('' => $this->translate($this->getPrompt()));\n\t\tforeach ($this->options as $key => $value) {\n\t\t\t$items[is_array($value) ? $key : $key] = $value;\n\t\t}\n\n\t\treturn Nette\\Forms\\Helpers::createSelectBox(\n\t\t\t$items,\n\t\t\tarray(\n\t\t\t\t'selected?' => $this->value,\n\t\t\t\t'disabled:' => is_array($this->disabled) ? $this->disabled : NULL\n\t\t\t)\n\t\t)->addAttributes(BaseControl::getControl()->attrs);\n\t}", "public static function dt_checkbox($title,$name,$value,$default = 1,$array_value = array(1 => 'Có', 0 => 'Không' ),$sub_item = '',$comment ='',$class_col1='col-md-2',$class_col2='col-md-10' ){\n\t\tif(!$array_value){\n\t\t\t$array_value = array(1 => 'Có', 0 => 'Không' );\n\t\t}\n\t\n\t\t$module = FSInput::get('module');\n\t\t$view = FSInput::get('view',$module);\n\t\tif($name =='published' ){\n\t\t\t$permission = FSSecurity::check_permission($module, $view, 'published');\n\t if (!$permission){\n\t return;\n\t }\n\t }\n\t\t$html = '<div class=\"form-group\">\n <label class=\"'.$class_col1.' col-xs-12 control-label\">'.$title.'</label>\n <div class=\"'.$class_col2.' col-xs-12\">\n ';\n\t\t$compare = isset($value)?$value:$default;\n\t\tforeach($array_value as $key => $item){\n\t\t //$html .= '<label class=\"radio-inline control control--radio\">'; \n\t\t\tif($compare == $key){\n\t\t\t\t$html .= ' <input class=\"radio-custom\" type=\"radio\" name=\"'.$name.'\" value=\"'.$key.'\" checked=\"checked\" id=\"'.$name.'_'.$key.'\" />\n <label for=\"'.$name.'_'.$key.'\" class=\"radio-custom-label\">'.$item.'&nbsp;&nbsp;</label>\n ';\n\t\t\t}else{\n\t\t\t\t$html .= '<input class=\"radio-custom\" type=\"radio\" name=\"'.$name.'\" value=\"'.$key.'\" id=\"'.$name.'_'.$key.'\" />\n <label for=\"'.$name.'_'.$key.'\" class=\"radio-custom-label\">'.$item.'&nbsp;&nbsp;</label>\n ';\n\t\t\t}\n //$html .= '</label>'; \n\t\t}\n \n\t\tif($sub_item)\n\t\t\t$html .= $sub_item;\n\t\tif($comment)\n\t\t\t$html .= '<p class=\"help-block\">'.$comment.'</p>';\t\n\t\t$html .= '</div></div>';\n\t\techo $html;\n\t}", "private function build_radio_field($_meta, $_ptype = \"wccpf\", $_class = \"\", $_index, $_show_as_value = \"no\", $_readonly = \"\", $_cloneable = \"\", $_wrapper = true, $_has_pricing_rules = \"no\") {\r\n $html = ''; \r\n $has_field_rules = isset( $_meta[\"field_rules\"] ) && is_array( $_meta[\"field_rules\"] ) && count( $_meta[\"field_rules\"] ) != 0 ? \"yes\" : \"no\";\r\n if ($_show_as_value == \"no\") {\r\n /* For admin field, we don't need <ul> wrapper */\r\n if ($_ptype != \"wccaf\") {\r\n $html = '<ul class=\"' . ((isset($_meta['layout']) && $_meta['layout'] == \"horizontal\") ? \"wccpf-field-layout-horizontal\" : \"wccpf-field-layout-vertical\") . '\" ' . $_cloneable . '>';\r\n }\r\n $choices = explode(\";\", ((isset($_meta[\"choices\"]) && ! empty($_meta[\"choices\"])) ? $_meta[\"choices\"] : \"\"));\r\n $_meta[\"default_value\"] = (isset($_meta[\"default_value\"]) && ! empty($_meta[\"default_value\"])) ? trim($_meta[\"default_value\"]) : \"\";\r\n foreach ($choices as $choice) {\r\n $attr = '';\r\n $key_val = explode(\"|\", $choice);\r\n /* It has to be two items ( Value => Label ), otherwise don't proceed */\r\n if (count($key_val) == 2) {\r\n if ($_ptype != \"wccaf\") {\r\n /* Since version 2.0.0 - Default value will be absolute value not as key|val pair */\r\n if (strpos($_meta[\"default_value\"], \"|\") !== false) {\r\n /* Compatibility for <= V 1.4.0 */\r\n if ($choice == $_meta[\"default_value\"]) {\r\n $attr = 'checked=\"checked\"';\r\n }\r\n } else {\r\n /*\r\n * For product fields from V 2.0.0\r\n * For admin fields, which will be displyed as Product Fields\r\n */\r\n if ($key_val[0] == $_meta[\"default_value\"]) {\r\n $attr = 'checked=\"checked\"';\r\n }\r\n }\r\n } else {\r\n if ($key_val[0] == $_meta[\"value\"]) {\r\n $attr = 'checked=\"checked\"';\r\n }\r\n }\r\n /* For admin field, we don't need <li></li> wrapper */\r\n $html .= (($_ptype != \"wccaf\") ? '<li>' : '') . '<label class=\"wcff-option-wrapper-label\"><input type=\"radio\" data-has_field_rules=\"'.$has_field_rules.'\" data-has_pricing_rules=\"'.$_has_pricing_rules.'\" data-fkey=\"'. $_meta[\"key\"] .'\" class=\"' . $_ptype . '-field ' . $_class . '\" name=\"' . esc_attr($_meta[\"key\"] . $_index) . '\" value=\"' . esc_attr(trim($key_val[0])) . '\" ' . $attr . ' data-field-type=\"'. $_meta[\"type\"] .'\" ' . $_ptype . '-pattern=\"mandatory\" ' . $_ptype . '-mandatory=\"' . $_meta[\"required\"] . '\" ' . $_readonly . ' /> ' . esc_html(trim($key_val[1])) . '</label>' . (($_ptype != \"wccaf\") ? '</li>' : '');\r\n }\r\n }\r\n /* For admin field, we don't need <ul> wrapper */\r\n $html .= ($_ptype != \"wccaf\") ? '</ul>' : '';\r\n } else {\r\n /*\r\n * Show the raw value instead of as a field\r\n * Used for the Admin Field showing on product page\r\n */\r\n $html = '<p class=\"wcff-wccaf-value-para-tag\">' . $_meta[\"default_value\"] . '</p>';\r\n }\r\n /* Add wrapper around the field, based on the user options */\r\n if ($_wrapper) {\r\n $html = $this->built_field_wrapper($html, $_meta, $_ptype, $_index);\r\n }\r\n return $html;\r\n }", "function layout_options($db){\n $query = \"SELECT l.*, s.id_utente, u.username, u.immagine FROM (Layout l join Sviluppatore s on s.id = l.sviluppatore) join Utente u on u.id = s.id_utente;\";\n $result = mysqli_query($db,$query);\n $check =\"checked\";\n $margin=17;\n while($row=mysqli_fetch_assoc($result)){\n if($row['id']>9)$margin=10;\n else $margin= 17;\n $link=\"profilo.php?id=\".$row['id_utente'];\n ?>\n \t<div class=\"radio\">\n \t<label>\n \t\t<input class=\"lay\" type=\"radio\" name=\"layout\" value=\"<?php echo $row['id']; ?>\" data-costo=\"<?php echo $row['costo_tot']; ?>\">\n \t\t<?php echo \"Layout \".$row['id'];?>\n \t\t<button onclick='show_slim_layout_popup(\"<?php echo $row['id']; ?>\")' style=\"margin-left: <?php echo $margin; ?>px;\" type=\"button\" class=\"btn btn-sm btn-info\">VEDI</button>\n \t</label>\n \t</div>\n <?php\n $check = \"\";\n }\n}", "function getdefault($item, $value, $type) {\r\n if ($item == $value) {\r\n if ($type == 'check') {\r\n return ' checked=\"checked\"';\r\n } elseif ($type == 'select') {\r\n return ' selected=\"selected\"';\r\n }\r\n } else {\r\n return '';\r\n }\r\n }", "function get_checked_attribute($row=NULL, $field, $checked_value=NULL) {\n $return = '';\n if (isset($row->$field)) {\n $field_value = $row->$field;\n if (isset($checked_value)) {\n if ($field_value == $checked_value)\n $return = INPUT_CHECKED;\n } else {\n if ($field_value)\n $return = INPUT_CHECKED;\n }\n }\n return $return;\n }", "public function getRadioSelector( $key, $item )\n {\n return '#field-' . $this->formId . '-' . $key . '-' . $item;\n }", "public function getParent()\n {\n return 'choice';\n }", "static public function createCheckboxRadio($input, $name) {\n include $_SERVER[\"DOCUMENT_ROOT\"] . \"/mvdv/core/view/templates/general/form/formelements/radiocheckbox.php\";\n }", "function get_selected_keys()\n {\n }", "function radioButtonList($name,$values,$labels,$selected=\"\",$ids)\n\t{\n\t\t$name = $name;\n\n\t\t$str = '<div class=\"radioButton-list\" >';\n\n\t\tfor($i = 0; $i < sizeof($values); $i++){\n\t\t\tif($values[$i] == $selected){\n\t\t\t\t$str .= FormComponent::radioButton($name, $values[$i], $values[$i], $ids[$i], $labels[$i]);\n\t\t\t}else{\n\t\t\t\t$str .= FormComponent::radioButton($name, $values[$i], \"\", $ids[$i], $labels[$i]);\n\t\t\t}\n\t\t}\n\n\t\t$str .= '</div>';\n\n\t\treturn $str;\n\t}", "function snoc_marquee_meta_box_option() {\r\n global $post;\r\n wp_nonce_field( basename( __FILE__ ), 'wpse_our_nonce' );\r\n $checkbox_value = get_post_meta($post->ID, '_marquee_latest_news', true);\r\n ?>\r\n <p>Please select option for text rotation on black bar.</p>\r\n <label><input name=\"marquee_news_check\" type=\"radio\" value=\"Yes\" <?php if($checkbox_value == \"Yes\"){ echo 'checked'; }?>>Yes&nbsp;&nbsp;</label>\r\n <label><input name=\"marquee_news_check\" type=\"radio\" value=\"No\" <?php if($checkbox_value != \"Yes\"){ echo 'checked'; }?>>No</label>\r\n <?php \r\n}", "function create_radio($values = array('16', '24'), $name = 'pace') {\n\n\t// Start the element:\n\tforeach ($values as $value) {\n\t\techo '<input type=\"radio\" name=\"' . $name .'\" value=\"' . $value . '\"';\n\n\t\t// Check for stickiness:\n\t\tif (isset($_POST[$name]) && ($_POST[$name] == $value)) {\n\t\t\techo ' checked=\"checked\"';\n\t\t}\n\n\t// Complete the element:\n\techo \"> $value hrs/week \";\n\t} // End of foreach loop.\n\n}" ]
[ "0.62056386", "0.6153048", "0.6015461", "0.5967789", "0.5944435", "0.5838395", "0.57818395", "0.5776747", "0.57742655", "0.57611233", "0.5703458", "0.56707716", "0.5669471", "0.5666462", "0.5646624", "0.5608753", "0.5606491", "0.55711174", "0.5524992", "0.55143297", "0.5486454", "0.54647374", "0.5462253", "0.5446808", "0.5433918", "0.54213244", "0.53979367", "0.5386238", "0.5353513", "0.53497267", "0.53371334", "0.5330909", "0.5324334", "0.5319399", "0.53164345", "0.5310565", "0.53088045", "0.53017753", "0.5297197", "0.52963454", "0.5289769", "0.52833617", "0.5279497", "0.5273835", "0.52703017", "0.5267341", "0.5267341", "0.52582026", "0.52509147", "0.5245044", "0.5226368", "0.5219429", "0.5212938", "0.5199741", "0.51995033", "0.5196931", "0.5189704", "0.5181112", "0.51667714", "0.51544714", "0.5149453", "0.5147611", "0.51432055", "0.5139434", "0.5139244", "0.5136071", "0.5133221", "0.5102147", "0.509564", "0.5083443", "0.5082378", "0.5077979", "0.50753164", "0.50706214", "0.50624365", "0.5055334", "0.50482357", "0.50475556", "0.5046286", "0.50455725", "0.50391376", "0.5036467", "0.5028784", "0.5013841", "0.50023323", "0.49984848", "0.49925628", "0.49864745", "0.49812227", "0.4973241", "0.4969104", "0.49610412", "0.49582875", "0.49509144", "0.49508137", "0.4939349", "0.49348035", "0.4925415", "0.492324", "0.491789" ]
0.49633935
91
end of getChoice() FUNCTION: TEST AUTOSUBMIT
public static function testAutoSubmit($arg) { // Check to see if a argument possibly indicating auto-submitting if ($arg == 1 || $arg == "auto" || $arg == "submit") { $auto = 1; } // auto-submit else { $auto = 0; } return $auto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function chooseQuestionToAnswer() : void\n {\n $questionId = $this->console->choice(__('Please select question to answer:'), $this->options);\n $this->handleAnswer($questionId ? array_search($questionId, $this->options) : null);\n }", "public function testCreateSurveyQuestionChoice0()\n {\n }", "public function testCreateSurveyQuestionChoice0()\n {\n }", "public function takeControl(): void {\r\n while (true) {\r\n $this->print(); /// print menu\r\n\r\n $input = '';\r\n while (! $this->isChoiceIndex((int)$input)) { /// while input not valid\r\n echo \"Enter a choice's number : \";\r\n $input = readline(); /// obtain input again\r\n }\r\n\r\n $choice = $this->choice((int)$input - 1); /// obtain Action to happen upon selection\r\n\r\n if ( $choice->isEndSelection() ) { $choice->takeControl(); return; }\r\n $choice->takeControl(); /// give control to the menu's Action\r\n }\r\n }", "public function askChoice(string $question, array $choices, $default, int $attempts = self::INFINITE_ATTEMPTS): string;", "function testOptionsFunction(){\n\t\t#mdx:OptionsFunction\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// pretend this was fetched from the db\n\t\t\t$rows = [\n\t\t\t\t['id'=>1,'name'=>'Action'],\n\t\t\t\t['id'=>2,'name'=>'Drama'],\n\t\t\t\t['id'=>3,'name'=>'Sci-fi']\n\t\t\t];\n\n\t\t\treturn $rows;\n\n\t\t})->context(['category'=>3]); // selects category 3\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Sci-fi\",\"$choice\");\n\n\t}", "function smartchoice_user_submit_response($formanswer, $choice, $cm) {\n global $DB;\n\n $continueurl = new moodle_url('/mod/smartchoice/view.php', array('id' => $cm->id));\n\n // No answers selected.\n if (empty($formanswer)) {\n print_error('atleastoneoption', 'smartchoice', $continueurl);\n }\n\n if (is_array($formanswer)) {\n if (!$choice->allowmultiple) {\n print_error('multiplenotallowederror', 'smartchoice', $continueurl);\n }\n $formanswers = $formanswer;\n } else {\n $formanswers = array($formanswer);\n }\n\n $options = $DB->get_records('smartchoice_options', array('choiceid' => $choice->id), '', 'id');\n foreach ($formanswers as $key => $val) {\n if (!isset($options[$val])) {\n print_error('cannotsubmit', 'smartchoice', $continueurl);\n }\n }\n\n // Add new answer.\n foreach ($formanswers as $answer) {\n $newanswer = new stdClass();\n $newanswer->choiceid = $choice->id;\n $newanswer->optionid = $answer;\n $DB->insert_record('smartchoice_answers', $newanswer);\n }\n}", "public function testPrompt(){\n $message = null;\n $input = 'hello';\n $go = new Getopt(null, function($msg)use(&$message){ $message = $msg;}, function(){}, function()use(&$input){return $input;});\n //test default\n $testOpt = array(\n 'arg'=>'test1',\n 'prompt'=>true,\n\n 'promptMsg'=>'please enter'\n );\n\n $go->setOption($testOpt);\n $go->parse();\n $this->assertEquals($testOpt['promptMsg'], $message);\n $this->assertEquals($input, $go->test1);\n\n $input = 'ok';\n $go->parse();\n $this->assertEquals($input, $go->test1);\n\n $input = ''; //empty input\n $go->parse();\n $this->assertNull($go->test1);\n\n\n }", "function chooseSpecialOption($choice) {\n self::checkAction('choose');\n $player_id = self::getActivePlayerId();\n \n $special_type_of_choice = self::getGameStateValue('special_type_of_choice');\n \n if ($special_type_of_choice == 0) { // This is not a special choice\n // The player is cheating...\n throw new BgaUserException(self::_(\"You cannot choose a special option; you have to choose a card [Press F5 in case of troubles]\"));\n }\n \n switch(self::decodeSpecialTypeOfChoice($special_type_of_choice)) {\n case 'choose_opponent':\n case 'choose_opponent_with_fewer_points':\n // Player choice\n // Check if the choice is a opponent\n if ($choice == $player_id) {\n // The player is cheating...\n throw new BgaUserException(self::_(\"You cannot choose yourself [Press F5 in case of troubles]\"));\n }\n else if ($choice == self::getPlayerTeammate($player_id)) {\n // The player is cheating...\n throw new BgaUserException(self::_(\"You cannot choose your teammate [Press F5 in case of troubles]\"));\n }\n $players = self::loadPlayersBasicInfos();\n if (!array_key_exists($choice, $players)) {\n // The player is cheating...\n throw new BgaUserException(self::_(\"You must choose an opponent [Press F5 in case of troubles]\"));\n }\n if ($choice == 'choose_opponent_with_fewer_points' && self::getPlayerScore($choice) >= self::getPlayerScore($player_id)) {\n // The player is cheating...\n throw new BgaUserException(self::_(\"You must choose an opponent with fewer points than you [Press F5 in case of troubles]\"));\n }\n break;\n case 'choose_value':\n // Values choice\n if (!ctype_digit($choice) || $choice < 1 || $choice > 10) {\n // The player is cheating...\n throw new BgaUserException(self::_(\"Your choice must be a value from 1 to 10 [Press F5 in case of troubles]\"));\n }\n break;\n case 'choose_color':\n // Color choice\n if (!ctype_digit($choice) || $choice < 0 || $choice > 4) {\n // The player is cheating...\n throw new BgaUserException(self::_(\"Your choice must be a color [Press F5 in case of troubles]\"));\n }\n break;\n case 'choose_two_colors':\n // Two color choice\n if (!ctype_digit($choice) || $choice < 0) {\n // The player is cheating...\n throw new BgaUserException(self::_(\"Your choice must be two colors [Press F5 in case of troubles]\"));\n }\n $colors = self::getValueAsArray($choice);\n if (count($colors) <> 2 || $colors[0] == $colors[1] || $colors[0] < 0 || $colors[0] > 4 || $colors[1] < 0 || $colors[1] > 4) {\n // The player is cheating... \n throw new BgaUserException(self::_(\"Your choice must be two colors [Press F5 in case of troubles]\"));\n }\n break;\n case 'choose_rearrange':\n $exception = self::_(\"Ill formated permutation info [Press F5 in case of troubles]\");\n // Choice contains the color and the permutations made\n if (!is_array($choice) || !array_key_exists('color', $choice)) {\n throw new BgaUserException($exception);\n }\n $color = $choice['color'];\n if (!ctype_digit($color) || $color < 0 || $color > 4) {\n // The player is cheating...\n throw new BgaUserException($exception);\n }\n if (!array_key_exists('permutations_done', $choice)) {\n throw new BgaUserException($exception);\n }\n $permutations_done = $choice['permutations_done'];\n if (!is_array($permutations_done) || count($permutations_done) == 0) {\n throw new BgaUserException($exception);\n }\n $n = self::countCardsInLocation($player_id, 'board', false, true);\n $n = $n[$color];\n \n foreach($permutations_done as $permutation) {\n if (!array_key_exists('position', $permutation)) {\n throw new BgaUserException($exception);\n }\n $position = $permutation['position'];\n if (!array_key_exists('delta', $permutation)) {\n throw new BgaUserException($exception);\n }\n $delta = $permutation['delta'];\n if ($delta <> 1 && $delta <> -1) {\n throw new BgaUserException($exception);\n }\n if (!ctype_digit($position) || $position >= $n || $position + $delta >= $n) {\n throw new BgaUserException($exception);\n }\n }\n \n // Do the rearrangement now\n $actual_change = self::rearrange($player_id, $color, $permutations_done);\n \n if (!$actual_change) {\n throw new BgaUserException(self::_(\"Your choice does not make any change in the rearrangement [Press F5 in case of troubles]\"));\n }\n \n // This move was legal\n self::notifyPlayer($player_id, 'log', clienttranslate('${You} rearrange your ${color} pile.'), array('i18n' => array('color'), 'You' => 'You', 'color' => self::getColorInClear($color)));\n self::notifyAllPlayersBut($player_id, 'rearrangedPile', clienttranslate('${player_name} rearranges his ${color} pile.'), array('i18n' => array('color'), 'player_id' => $player_id, 'rearrangement' => $choice, 'player_name' => self::getColoredText(self::getPlayerNameFromId($player_id), $player_id), 'color' => self::getColorInClear($color)));\n try {\n self::checkForSpecialAchievements($player_id, false); // Check all except Wonder\n }\n catch (EndOfGame $e) {\n // End of the game: the exception has reached the highest level of code\n self::trace('EOG bubbled from self::chooseSpecialOption');\n self::trace('selectionMove->justBeforeGameEnd');\n $this->gamestate->nextState('justBeforeGameEnd');\n return;\n }\n \n $choice = 1;\n break;\n case 'choose_yes_or_no':\n // Yes/no choice\n if ($choice != 0 && $choice != 1) {\n // The player is cheating...\n throw new BgaUserException(self::_(\"You have to choose between yes or no [Press F5 in case of troubles]\"));\n }\n break;\n default:\n break;\n }\n // No cheating here\n self::setGameStateValue('choice', $choice);\n \n // Return to the resolution of the effect\n self::trace('selectionMove->interSelectionMove (chooseSpecialOption)');\n $this->gamestate->nextState('interSelectionMove');\n }", "function select_option()\r\n{}", "public function testSimpleChoice()\n {\n /** @var ChoicesAwareViewData $result */\n $result = $this->getContainer()->get(ONGRFilterManagerExtension::getFilterManagerId('single_choice'))\n ->handleRequest(new Request())->getFilters()['sc'];\n\n $expectedChoices = [\n 'green',\n 'yellow',\n 'red',\n 'blue',\n ];\n\n $actualChoices = [];\n\n foreach ($result->getChoices() as $choice) {\n $actualChoices[] = $choice->getLabel();\n }\n\n $this->assertEquals($expectedChoices, $actualChoices);\n }", "public static function getChoice($menuname) {\n\n // Check to see if a choice has been made previously or is a session variable\n if (!isset($_SESSION[\"$menuname\"]) || $_SESSION[\"$menuname\"] == \"\") { // no session var, see if in $_POST\n if (isset($_POST[\"$menuname\"]) && $_POST[\"$menuname\"] != -9999) { $choice = $_POST[\"$menuname\"]; }\n\n else { $choice= -1; } // nothing in $_POST or $_SESSION\n }\n else { $choice = $_SESSION[\"$menuname\"]; } // use session data to get choice\n \n return $choice;\n\n}", "public function testUpdateSurveyQuestionChoice0()\n {\n }", "public function testUpdateSurveyQuestionChoice0()\n {\n }", "function testSelected(){\n\t\t#mdx:Selected\n\t\t$choice = new SimpleChoice('season');\n\t\t$choice->options([\n\t\t\t1 => 'Spring',\n\t\t\t2 => 'Summer',\n\t\t\t3 => 'Fall',\n\t\t\t4 => 'Winter'\n\t\t]);\n\t\t$choice->context(['season'=>3]); // selects season 3 (Fall)\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Fall\",\"$choice\");\n\t}", "public function getChoicesCallback();", "function testOptionsTuples(){\n\t\t#mdx:OptionsTuples\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options([[1,'Action'],[2,'Drama'],[3,'Sci-fi']]);\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\n\t}", "function testGuessItsSelectIfOptionsAreSet() {\n\t\t$result = $this->helper->__guessInputType('Test.foo', array('options' => array()));\n\t\t$this->assertEqual($result, 'select');\n\t}", "public function testactualizar_aprendiz()\n {\n $this->visit('editar/1')\n ->see('actualizar aprendiz')\n ->type('juan','Nombre')\n ->type('','Apellido')\n ->type('','Identificacion')\n ->type('','Telefono')\n ->type('','Correo')\n ->type('','Direccion')\n ->type('','Genero')\n\n ->press('actualizar aprendiz');\n }", "function choose( $question, $choice = 'yn', $default = 'n' ) {\n\treturn Streams::choose( $question, $choice, $default );\n}", "public function select($question, $choices, $default = null, $attempts = false, $errorMessage = 'Value \"%s\" is invalid');", "public function setup_selected() {\n\t}", "public function testDeleteSurveyQuestionChoice0()\n {\n }", "public function testDeleteSurveyQuestionChoice0()\n {\n }", "function correctAnswer() {\n\t}", "public function testGetSurveyQuestionChoices0()\n {\n }", "public function testGetSurveyQuestionChoices0()\n {\n }", "public function usersNeedChoice()\n {\n $madechoice = (R::count('choice'))/2;\n $choicedecided = R::count('finalchoice');\n return $madechoice - $choicedecided;\n }", "public function testIssue255()\n {\n $session = $this->getSession();\n $session->visit($this->pathTo('/issue255.php'));\n\n $session->getPage()->selectFieldOption('foo_select', 'Option 3');\n\n $session->wait(2000, '$(\"#output_foo_select\").text() != \"\"');\n $this->assertEquals('onChangeSelect', $session->getPage()->find('css', '#output_foo_select')->getText());\n }", "public function askForCard()\n {\n }", "function main(){\n while(1){\n // show initial options\n $user_input = readline(showOptions(0));\n\n /* Buy flight ticket */\n if($user_input == \"1\"){\n $user_input = readline(showOptions(1));\n if($user_input == \"0\")\n continue;\n buyTicket();\n }\n\n /* Book accomodation */\n else if($user_input == \"2\"){\n $user_input = readline(showOptions(2));\n if( $user_input == \"0\")\n continue;\n bookRoom();\n }\n\n /* Buy package */\n else if($user_input == \"3\"){\n $user_input = readline(showOptions(3));\n if( $user_input == \"0\")\n continue;\n buyPackage();\n }\n }\n}", "function choice_set_instance(&$block) {\n global $CFG, $USER, $OUTPUT, $COURSE, $DB, $PAGE;\n\n require_once($CFG->dirroot.'/mod/choice/lib.php');\n\n $timenow = time();\n $current = false;\n $cm = $block->cm;\n\n if (!$choice = choice_get_choice($cm->instance)) {\n print_error('invalidcoursemodule');\n }\n\n $groupmode = groups_get_activity_groupmode($cm);\n\n $str = '';\n\n if ($groupmode) {\n groups_get_activity_group($cm, true);\n $choiceurl = new moodle_url('/mod/choice/view.php', array('id' => $cm->id));\n $str .= groups_print_activity_menu($cm, $choiceurl, true);\n }\n $allresponses = choice_get_response_data($choice, $cm, $groupmode, false); // Big function, approx 6 SQL calls per user\n\n /*\n * If user has already made a selection, and they are not allowed to update it or\n * if choice is not open, show their selected answer.\n */\n $params = array('choiceid' => $choice->id, 'userid' => $USER->id);\n if (isloggedin() &&\n ($current = $DB->get_record('choice_answers', $params)) &&\n (empty($choice->allowupdate) || ($timenow > $choice->timeclose)) ) {\n $str .= $OUTPUT->box(get_string('yourselection', 'choice', userdate($choice->timeopen)).\": \".format_string(choice_get_option_text($choice, $current->optionid)), 'generalbox', 'yourselection');\n } else {\n\n // Print the form.\n $choiceopen = true;\n if ($choice->timeclose != 0) {\n if ($choice->timeopen > $timenow ) {\n $str .= $OUTPUT->box(get_string('notopenyet', 'choice', userdate($choice->timeopen)), 'generalbox notopenyet');\n } else if ($timenow > $choice->timeclose) {\n $str .= $OUTPUT->box(get_string('expired', 'choice', userdate($choice->timeclose)), 'generalbox expired');\n $choiceopen = false;\n }\n } else if ( (!$current or $choice->allowupdate) and $choiceopen) {\n // They haven't made their choice yet or updates allowed and choice is open.\n $options = choice_prepare_options($choice, $USER, $cm, $allresponses);\n $options['hascapability'] = true;\n $renderer = $PAGE->get_renderer('mod_choice');\n $str .= $renderer->display_options($options, $cm->id, $choice->display);\n $choiceformshown = true;\n } else {\n $choiceformshown = false;\n }\n\n if (!$choiceformshown) {\n \n if (isguestuser()) {\n // Guest account.\n $str .= $OUTPUT->confirm(get_string('noguestchoose', 'choice').'<br /><br />'.get_string('liketologin'),\n get_login_url(), new moodle_url('/course/view.php', array('id' => $COURSE->id)));\n }\n }\n }\n\n $block->content->text = $str;\n\n return true;\n}", "public function ask($question, $default = null);", "function testActivitySearchBySelect() {\n\t\t$this->setUrl('/search/advanced?r=act&q[act_type][op]=IS+NOT&q[act_type][value]=100');\n\t\t$this->app->go();\n\t\t$this->assertFalse(Flash::Instance()->hasErrors());\n\t\t$this->assertPattern('/id=\"qb_act_type\"/', $this->view->output);\n\t\t$this->assertPattern('/<th>Activity Type<\\/th>/', $this->view->output);\n\t\t$this->assertPattern('/<td>Recreational<\\/td>/', $this->view->output);\n\t\t$collection = $this->view->get('collection');\n\t\t$this->assertIsA($collection, 'Tactile_ActivityCollection');\n\t\t$names = $collection->pluck('name');\n\t\t$this->assertEqual($names, array('Eat a sandwich', 'Throw a party'));\n\t}", "public function setoptinchoice($bid)\n {\n $optchoice = $this->input->post('optin');\n $values = array(\n 'OPTEDIN' => $optchoice,\n 'OPT_FLAG' => 'Y'\n );\n\n $this->db->where('BEACHID', $bid);\n $this->db->update('USERS', $values);\n\n if ($optchoice == 1) {\n echo '<p class=\"alert alert-success\" style=\"margin:20px;\"><strong>Your profile is now searchable in the FREE system.</strong></p>';\n } else {\n echo '<p class=\"alert alert-warning\" style=\"margin:20px;\"><strong>Your profile is now unsearchable in the FREE system.</strong></p>';\n }\n }", "function testRender(){\n\t\t#mdx:Render\n\t\t$choice = new SimpleChoice('color');\n\t\t$choice->options([\n\t\t\t1 => 'Black',\n\t\t\t2 => 'White',\n\t\t\t3 => 'Gray'\n\t\t]);\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"input\",\"$choice\");\n\t\t$this->assertContains(\"1 - Black\",\"$choice\");\n\t\t$this->assertContains(\"3 - Gray\",\"$choice\");\n\t}", "function course_completion_check_custom_rule($element,$value,$extra) {\n $key = $extra[0];\n $values = $extra[1];\n $set_ok = false;\n\n foreach ($values->_options['choices'] as $name=>$choice) {\n $item = $key.'_'.$name;\n if (optional_param($item,0,PARAM_INT) == 1) {\n $set_ok = true;\n }\n }\n\n return $set_ok ? true : false;\n}", "function testOptionsArray(){\n\t\t#mdx:OptionsArray\n\t\t$choice = new SimpleChoice(\"language\",\"Type in the desired language code:\");\n\t\t$choice->options(['en','es','pt','fr']);\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"- en\", \"$choice\");\n\t\t$this->assertNotContains(\"0 - en\", \"$choice\");\n\n\t}", "private function _askQuestion()\n {\n // Grab the question\n $question = str_replace(\"!question \", \"\", $this->_data->message);\n\n // Create the yql\n $yql = 'select * from answers.search where query=\"'. $question .'\" and type=\"resolved\"';\n \n $array = $this->grabData($yql);\n \n $stuff = $array['query']['results']['Question'];\n if (is_array($stuff)) {\n $answer = $stuff[array_rand($stuff)]['ChosenAnswer'];\n $link = $stuff[array_rand($stuff)]['Link'];\n }\n $this->_message($this->_data->nick.': You asked: '. $question);\n if (!$answer) {\n $this->_message($this->_data->nick.': Sorry, I cannot answer that one! Try asking a simpler question.'); \n }\n else {\n $this->_message($this->_data->nick.': Yahoo! answers says: '. $answer .' ('. $link .')');\n }\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visitRoute('subscription', ['id' => '1'])\n ->radio('gender', 'L')\n ->type('fullName', 'GHF')\n ->type('birthdate', '04/24/1999')\n ->type('phone', '088177552')\n ->type('address', 'Bandung')\n ->press('Submit');\n });\n }", "function testOptionsFunction2(){\n\n\t\t#mdx:OptionsFunction2\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// return a function which returns an associative array:\n\t\t\treturn function(){\n\t\t\t\treturn [1=>'Category A',2=>'Category B',3=>'Category C'];\n\t\t\t};\n\t\t});\n\n\t\t$choice->context(['category'=>2]); // selects category 2\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>2\",\"$choice\");\n\n\t}", "function quest_usercp_options(){\r\n global $mybb, $db, $templates, $questoption, $checkoption;\r\n\r\n if(isset($mybb->user['questoption']) && $mybb->user['questoption'] == 1) {\r\n $checkoption = \"checked=\\\"checked\\\"\";\r\n }else{\r\n $checkoption = \"\";\r\n }\r\n\r\n eval(\"\\$questoption = \\\"\".$templates->get(\"quest_profil_checked\").\"\\\";\");\r\n\r\n}", "public function optInAction()\n {\n\n $tokenYes = preg_replace('/[^a-zA-Z0-9]/', '', ($this->request->hasArgument('token_yes') ? $this->request->getArgument('token_yes') : ''));\n $tokenNo = preg_replace('/[^a-zA-Z0-9]/', '', ($this->request->hasArgument('token_no') ? $this->request->getArgument('token_no') : ''));\n $userSha1 = preg_replace('/[^a-zA-Z0-9]/', '', $this->request->getArgument('user'));\n\n /** @var \\RKW\\RkwRegistration\\Tools\\Registration $register */\n $register = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('RKW\\\\RkwRegistration\\\\Tools\\\\Registration');\n $check = $register->checkTokens($tokenYes, $tokenNo, $userSha1, $this->request, $data);\n\n // set hash value for changing subscriptions without login\n $hash = '';\n if ($check == 1) {\n\n $this->addFlashMessage(\n \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\n 'subscriptionController.message.subscriptionSaved',\n 'rkw_newsletter'\n )\n );\n\n if (\n ($data['frontendUser'])\n && ($frontendUser = $data['frontendUser'])\n && ($frontendUser instanceof \\RKW\\RkwRegistration\\Domain\\Model\\FrontendUser)\n && ($frontendUser = $this->frontendUserRepository->findByIdentifier($frontendUser->getUid()))\n ) {\n /** @var \\RKW\\RkwNewsletter\\Domain\\Model\\FrontendUser $frontendUser */\n if (!$frontendUser->getTxRkwnewsletterHash()) {\n $hash = sha1($frontendUser->getUid() . $frontendUser->getEmail() . rand());\n $frontendUser->setTxRkwnewsletterHash($hash);\n $this->frontendUserRepository->update($frontendUser);\n\n } else {\n $hash = $frontendUser->getTxRkwnewsletterHash();\n }\n }\n\n\n } elseif ($check == 2) {\n\n $this->addFlashMessage(\n \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\n 'subscriptionController.message.subscriptionCanceled',\n 'rkw_newsletter'\n )\n );\n\n if (\n ($data['frontendUser'])\n && ($frontendUser = $data['frontendUser'])\n && ($frontendUser instanceof \\RKW\\RkwRegistration\\Domain\\Model\\FrontendUser)\n && ($frontendUser = $this->frontendUserRepository->findByIdentifier($frontendUser->getUid()))\n ) {\n /** @var \\RKW\\RkwNewsletter\\Domain\\Model\\FrontendUser $frontendUser */\n $hash = $frontendUser->getTxRkwnewsletterHash();\n }\n\n } else {\n\n $this->addFlashMessage(\n \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\n 'subscriptionController.error.subscriptionError',\n 'rkw_newsletter'\n ),\n '',\n \\TYPO3\\CMS\\Core\\Messaging\\AbstractMessage::ERROR\n );\n }\n\n $this->redirect('message', null, null, array('hash' => $hash));\n //===\n }", "private function ___doDummy() {\r\n\r\n __( 'The options have been updated.', 'wpcommand' );\r\n __( 'The options have been cleared.', 'wpcommand' );\r\n __( 'Export', 'wpcommand' );\r\n __( 'Export Options', 'wpcommand' );\r\n __( 'Import', 'wpcommand' );\r\n __( 'Import Options', 'wpcommand' );\r\n __( 'Submit', 'wpcommand' );\r\n __( 'An error occurred while uploading the import file.', 'wpcommand' );\r\n /* translators: 1: Uploaded file type */\r\n __( 'The uploaded file type is not supported: %1$s', 'wpcommand' );\r\n __( 'Could not load the importing data.', 'wpcommand' );\r\n __( 'The uploaded file has been imported.', 'wpcommand' );\r\n __( 'No data could be imported.', 'wpcommand' );\r\n __( 'Upload Image', 'wpcommand' );\r\n __( 'Use This Image', 'wpcommand' );\r\n __( 'Insert from URL', 'wpcommand' );\r\n __( 'Are you sure you want to reset the options?', 'wpcommand' );\r\n __( 'Please confirm your action.', 'wpcommand' );\r\n __( 'The specified options have been deleted.', 'wpcommand' );\r\n __( 'A problem occurred while processing the form data. Please try again.', 'wpcommand' );\r\n /* translators: 1: The value of max_input_vars set by PHP 2: Actual $_POST element count */\r\n __( 'Not all form fields could not be sent. Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. <code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s', 'wpcommand' ); // sanitization unnecessary as a literal string\r\n __( 'Is it okay to send the email?', 'wpcommand' );\r\n __( 'The email has been sent.', 'wpcommand' );\r\n __( 'The email has been scheduled.', 'wpcommand' );\r\n __( 'There was a problem sending the email', 'wpcommand' );\r\n __( 'Title', 'wpcommand' );\r\n __( 'Author', 'wpcommand' );\r\n __( 'Categories', 'wpcommand' );\r\n __( 'Tags', 'wpcommand' );\r\n __( 'Comments', 'wpcommand' );\r\n __( 'Date', 'wpcommand' );\r\n __( 'Show All', 'wpcommand' );\r\n __( 'Show All Authors', 'wpcommand' );\r\n __( 'Thank you for creating with', 'wpcommand' );\r\n __( 'and', 'wpcommand' );\r\n __( 'Settings', 'wpcommand' );\r\n __( 'Manage', 'wpcommand' );\r\n __( 'Select Image', 'wpcommand' );\r\n __( 'Upload File', 'wpcommand' );\r\n __( 'Use This File', 'wpcommand' );\r\n __( 'Select File', 'wpcommand' );\r\n __( 'Remove Value', 'wpcommand' );\r\n __( 'Select All', 'wpcommand' );\r\n __( 'Select None', 'wpcommand' );\r\n __( 'No term found.', 'wpcommand' );\r\n __( 'Select', 'wpcommand' );\r\n __( 'Insert', 'wpcommand' );\r\n __( 'Use This', 'wpcommand' );\r\n __( 'Return to Library', 'wpcommand' );\r\n /* translators: 1: Number of performed database queries 2: Elapsed seconds for page load */\r\n __( '%1$s queries in %2$s seconds.', 'wpcommand' );\r\n /* translators: 1: Used memory amount 2: Max memory cap set by WordPress (WP_MEMORY_LIMIT) 3: Percentage of the memory usage */\r\n __( '%1$s out of %2$s MB (%3$s) memory used.', 'wpcommand' );\r\n /* translators: 1: Peak memory usage amount */\r\n __( 'Peak memory usage %1$s MB.', 'wpcommand' );\r\n /* translators: 1: Initial memory usage amount */\r\n __( 'Initial memory usage %1$s MB.', 'wpcommand' );\r\n __( 'The allowed maximum number of fields is {0}.', 'wpcommand' );\r\n __( 'The allowed minimum number of fields is {0}.', 'wpcommand' );\r\n __( 'Add', 'wpcommand' );\r\n __( 'Remove', 'wpcommand' );\r\n __( 'The allowed maximum number of sections is {0}', 'wpcommand' );\r\n __( 'The allowed minimum number of sections is {0}', 'wpcommand' );\r\n __( 'Add Section', 'wpcommand' );\r\n __( 'Remove Section', 'wpcommand' );\r\n __( 'Toggle All', 'wpcommand' );\r\n __( 'Toggle all collapsible sections', 'wpcommand' );\r\n __( 'Reset', 'wpcommand' );\r\n __( 'Yes', 'wpcommand' );\r\n __( 'No', 'wpcommand' );\r\n __( 'On', 'wpcommand' );\r\n __( 'Off', 'wpcommand' );\r\n __( 'Enabled', 'wpcommand' );\r\n __( 'Disabled', 'wpcommand' );\r\n __( 'Supported', 'wpcommand' );\r\n __( 'Not Supported', 'wpcommand' );\r\n __( 'Functional', 'wpcommand' );\r\n __( 'Not Functional', 'wpcommand' );\r\n __( 'Too Long', 'wpcommand' );\r\n __( 'Acceptable', 'wpcommand' );\r\n __( 'No log found.', 'wpcommand' );\r\n\r\n /* translators: 1: Method name */\r\n __( 'The method is called too early: %1$s', 'wpcommand' );\r\n __( 'Debug Info', 'wpcommand' );\r\n\r\n __( 'Click here to expand to view the contents.', 'wpcommand' );\r\n __( 'Click here to collapse the contents.', 'wpcommand' );\r\n\r\n __( 'Loading...', 'wpcommand' );\r\n __( 'Please enable JavaScript for better user experience.', 'wpcommand' );\r\n\r\n __( 'Debug', 'wpcommand' );\r\n // __( 'Field Arguments', 'wpcommand' ); @deprecated 3.8.22\r\n __( 'This information will be disabled when <code>WP_DEBUG</code> is set to <code>false</code> in <code>wp-config.php</code>.', 'wpcommand' );\r\n\r\n // __( 'Section Arguments', 'wpcommand' ); // 3.8.8+ @deprecated 3.8.22\r\n\r\n __( 'The ability to repeat sections is disabled.', 'wpcommand' ); // 3.8.13+\r\n __( 'The ability to repeat fields is disabled.', 'wpcommand' ); // 3.8.13+\r\n __( 'Warning.', 'wpcommand' ); // 3.8.13+\r\n\r\n __( 'Submit the form.', 'wpcommand' ); // 3.8.24\r\n __( 'Please check this box if you want to proceed.', 'wpcommand' ); // 3.8.24\r\n __( 'No file is selected.', 'wpcommand' ); // 3.8.24\r\n\r\n __( 'Please fill out this field.', 'wpcommand' ); // 3.9.0\r\n\r\n }", "function testOptionsRows(){\n\t\t#mdx:OptionsRows\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options([\n\t\t\t['id'=>1,'name'=>'Action'],\n\t\t\t['id'=>2,'name'=>'Drama'],\n\t\t\t['id'=>3,'name'=>'Sci-fi']\n\t\t])->context(['category'=>2]); // selects category 2\n\t\t\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\t\t$this->assertContains(\"<b>2 - Drama\",\"$choice\");\n\n\t}", "function schedule_table_entry ($key)\n{\n // echo \" <TD><INPUT TYPE=TEXT NAME=$key SIZE=1 MAXLENGTH=1 VALUE=\\\"$_POST[$key]\\\"></TD>\\n\";\n\n $mykey = str_replace ( ' ' , '_' , $key );\n\n if (! isset ($_POST[$mykey]))\n $value = '';\n else\n {\n $value = trim ($_POST[$mykey]);\n if (1 == get_magic_quotes_gpc())\n $value = stripslashes ($value);\n }\n\n $dont_care = '';\n $one = '';\n $two = '';\n $three = '';\n $no = '';\n\n switch ($value)\n {\n case '': $dont_care = 'selected'; break;\n case '1': $one = 'selected'; break;\n case '2': $two = 'selected'; break;\n case '3': $three = 'selected'; break;\n case 'X': $no = 'selected'; break;\n }\n\n echo \" <TD>\\n\";\n echo \" <SELECT NAME=$mykey SIZE=1>\\n\";\n echo \" <option value=\\\"\\\" $dont_care>Don't Care&nbsp;</option>\\n\";\n echo \" <option value=1 $one>1st Choice&nbsp;</option>\\n\";\n echo \" <option value=2 $two>2nd Choice&nbsp;</option>\\n\";\n echo \" <option value=3 $three>3rd Choice&nbsp;</option>\\n\";\n echo \" <option value=X $no>Prefer Not&nbsp;</option>\\n\";\n echo \" </SELECT>\\n\";\n echo \" </TD>\\n\";\n}", "public function testNewSelect()\n {\n $this->todo('stub');\n }", "function qa_clicked($name)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\treturn isset($_POST[$name]) || isset($_POST[$name . '_x']) || (qa_post_text('qa_click') == $name);\n}", "function adminOperations()\r\n{\r\n do\r\n {\r\n #displaying admin menu\r\n adminMenu();\r\n $option = readline(\"Enter admin option : \");\r\n\r\n # executing operation based on option entered\r\n switch ($option)\r\n {\r\n case 1:\r\n $GLOBALS['adminObj']->addLoan();\r\n break;\r\n case 2:\r\n $GLOBALS['adminObj']->addCustomer();\r\n break;\r\n case 3:\r\n $GLOBALS['adminObj']->checkLoans();\r\n break;\r\n case 4: $GLOBALS['adminObj']->getCustDetails();\r\n break; \r\n case \"exit\":\r\n echo \"you are exited from the Admin Menu\";\r\n break;\r\n default:\r\n echo \"Enter a valid option from admin\\n\";\r\n break;\r\n\r\n }\r\n }while ($option != \"exit\");\r\n\r\n}", "public function test_checked_selected_helper_default_value_for_second_parameter( $input, $expect_output = false ) {\n\t\t$fn = array_rand( $this->child_functions );\n\t\t$expected = '';\n\n\t\tif ( false !== $expect_output ) {\n\t\t\t$expected = \" {$fn}='{$fn}'\";\n\t\t\tif ( 'wp_readonly' === $fn ) {\n\t\t\t\t// Account for the function name not matching the expected output string.\n\t\t\t\t$expected = \" readonly='readonly'\";\n\t\t\t}\n\n\t\t\t// Only set output expectation when output is expected, so the test will fail on unexpected output.\n\t\t\t$this->expectOutputString( $expected );\n\t\t}\n\n\t\t// Function will always return the value, even when echoing it out.\n\t\t$this->assertSame( $expected, $fn( $input ) );\n\t}", "protected function promptForModelTraits()\n {\n $choice = null;\n\n while (!in_array($choice, ['q'])) {\n $choice = $this->choice(\n \"Which model options would you like to set up?\",\n $choices = $this->modelTraits(),\n 'q' // Default is to just continue without traits\n );\n\n if (!in_array($choice, ['q'])) {\n $this->chooseTrait($choices[$choice]);\n }\n }\n }", "public function testInitActionPost()\n {\n $this->app->request->setPost(\"dices\", 2);\n $this->app->request->setPost(\"opponents\", 2);\n $res = $this->controller->initActionPost();\n $this->assertInstanceOf(ResponseUtility::class, $res);\n //$this->assertStringEndsWith(\"active\", $res);\n }", "public function askName()\n {\n $this->ask('Antes que nada. ¿Cómo te llamas? Para dirigirme a ti', function(Answer $answer) {\n // Texto respuesta\n $this->name = $answer->getText();\n $this->say('Encantado, '.$this->name);\n $this->askWhatToDo();\n });\n }", "public function makeMenuAllGoodExpectTrue() {}", "public function choosePrize(){\n if($this->adminVerify()){\n\n }else{\n echo \"Vous devez avoir les droits administrateur pour accéder à cette page\";\n }\n }", "protected function choice(string $question, array $choices, ?string $via_option = null, $default = null, ?int $attempts = null, $multiple = false)\n {\n if ($answer = $this->viaOption($question, $via_option, $choices)) {\n return $answer;\n }\n $question = new ChoiceQuestion($question, $choices, $default);\n return $this->_ask($question->setMaxAttempts($attempts)->setMultiselect($multiple));\n }", "public function isButtonValidValidSetupExpectTrue() {}", "function testOptionsObjects(){\n\t\n\t\t#mdx:OptionsObjects\n\t\t$choice = new SimpleChoice(\"category\");\n\t\n\t\t$option1 = new StdClass();\n\t\t$option1->id = 1;\n\t\t$option1->name = 'Action';\n\t\n\t\t$option2 = new StdClass();\n\t\t$option2->id = 2;\n\t\t$option2->name = 'Drama';\n\n\t\t$choice->options([$option1, $option2])\n\t\t\t->context(['category'=>2]); // selects category 2\n\t\t\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\t\t$this->assertContains(\"<b>2 - Drama\",\"$choice\");\n\n\t}", "public function testRightSubmission()\n {\n $client = static::createClient();\n $client->followRedirects();\n\n $crawler = $client->request('GET', '/play');\n\n $movieId = $crawler->filter('#quizz_movie')->attr('value');\n $actorId = $crawler->filter('#quizz_actor')->attr('value');\n\n $movieRepo = $client->getContainer()->get('doctrine')->getRepository('AppBundle:Movie');\n $personRepo = $client->getContainer()->get('doctrine')->getRepository('AppBundle:Person');\n\n $movie = $movieRepo->find($movieId);\n $person = $personRepo->find($actorId);\n\n if ($movie->isActor($person)) {\n $form = $crawler->selectButton('quizz_yes')->form();\n } else {\n $form = $crawler->selectButton('quizz_no')->form();\n }\n\n $client->submit($form);\n\n $request = $client->getRequest();\n $this->assertEquals('/play', $request->getPathInfo(), 'on a good submission, the player is redirected on /play');\n }", "public function getPrompt();", "function langChoice()\n{\n\tglobal $supported;\n\n\tglobal $detailp; //is usefull when on the detail page\n\n\t$rep = '';\n\n\t$rep .= '<form method=\"get\" id=\"langForm\" action=\"' . $_SERVER[\"PHP_SELF\"] . '\">\n\t\t<select onchange=\"submitForm(\\'langForm\\')\" name=\"lang\">';\n\n\tforeach($supported as $elem)\n\t{\n\t\t$rep .= '<option value=\"' . $elem . '\"';\n\n\t\tif ($_SESSION['lang']===$elem)\n\t\t{\n\t\t\t$rep .= ' selected';\n\t\t}\n\t\t$rep .= '>';\n\n\t\t//we usually want 'Français' instead of 'fr' don't we\n\t\t$rep .= (isset(ABR_LANG[$elem])?ABR_LANG[$elem]:$elem);\n\t\t$rep .= '</option>' . PHP_EOL;\n\t}\n\n\t$rep .= '\t</select> ';\n\n\t\t//so that we keep the current IT (and don't redirect afterwards)\n\t\tif (isset($detailp))\n\t\t{\n\t\t\t$rep .= '<input type=\"hidden\" name=\"choix\" value=\"' . $_GET['choix'] . '\"/>';\n\t\t}\n$rep .= '\t</form>';\n\n\treturn $rep;\n}", "function sopac_request_item() {\n if (variable_get('sopac_catalog_disabled', FALSE)) {\n drupal_set_message(variable_get('sopac_catalog_disabled_message', 'Requesting is disabled'), 'error');\n drupal_goto(variable_get('sopac_url_prefix', 'cat/seek'));\n }\n\n global $user;\n // avoid php errors when debugging\n $varname = $request_result_msg = $request_error_msg = $item_form = $bnum = NULL;\n $staff_request = $_GET['staff'];\n $patron_bcode = $_POST['patron_barcode'];\n if($_GET['patron_barcode']) {\n $patron_bcode = $_GET['patron_barcode'];\n }\n\n $button_txt = t('Request Selected Item');\n //profile_load_profile(&$user);\n if (($user->uid && $user->bcode_verified) || $staff_request == 1) {\n // support multi-branch & user home branch\n $locum = sopac_get_locum();\n $actions = sopac_parse_uri();\n\n $bnum = $actions[1];\n $pickup_arg = $actions[2] ? $actions[2] : NULL;\n $pickup_name = $locum->locum_config['branches'][$pickup_arg];\n $varname = $actions[3] ? $actions[3] : NULL;\n $bib_item = $locum->get_bib_item($bnum, TRUE);\n $barcode = $user->profile_pref_cardnum;\n if ($staff_request && $patron_bcode && user_access('staff request')) {\n $barcode = $patron_bcode;\n $patron_info = $locum->get_patron_info($barcode);\n }\n\n if($staff_request && !$patron_bcode){\n $item_form = drupal_get_form('sopac_staff_request_form');\n $result_page = theme('sopac_request', $request_result_msg, $request_error_msg, $item_form, $bnum);\n return '<p>'. t($result_page) .'</p>';\n }\n else {\n $hold_result = $locum->place_hold($barcode, $bnum, $varname, $user->locum_pass, $pickup_arg);\n }\n // Set home branch if none set\n if ($pickup_name && !$user->profile_pref_home_branch) {\n user_save($user, array('profile_pref_home_branch' => $pickup_name));\n drupal_set_message(\"Your home branch has been set to $pickup_name.<br />\" . l('Adjust your home branch preference', \"user/$user->uid/edit/Preferences\"));\n }\n\n if ($hold_result['success']) {\n // handling multi-branch scenario\n $request_result_msg = t('You have successfully requested a copy of ') . '<span class=\"req_bib_title\"> ' . $bib_item['title'] . ' ' .$bib_item['title_medium'] . '</span>';\n if ($pickup_name) {\n $request_result_msg .= t(' for pickup at ') . $pickup_name;\n }\n if($staff_request){\n $request_result_msg .= '<br />for patron '.$patron_info['name'].' ( '.$barcode.' )';\n }\n else {\n $request_result_msg .= '<br />(Please allow a few moments for the request to appear on your My Account list)';\n }\n/*\n // probably abstract this out to a locum->sendalert or something?\n $item_status = $locum->get_item_status($bnum);\n $zooms_avail = $item_status['callnums']['Zoom Lends DVD']['avail'] + $item_status['callnums']['Zoom Lends Book']['avail'];\n $avail = $item_status['avail'] - $zooms_avail;\n if ($avail > 0) {\n require_once('/usr/local/lib/libphp-aadl/contrib/redisent/redisent.php');\n $redisjob = array();\n $redisjob['command'] = 'holdrequest';\n $redisjob['title'] = $bib_item['title'];\n $redisjob['bnum'] = $bib_item['bnum'];\n // Build list of locations\n $locations = array();\n foreach ($item_status['items'] as $itemstat) {\n if ($itemstat['avail']) {\n $locations[$itemstat['loc_code']] = $itemstat['location'] . \" (\".$itemstat['callnum'].\")\";\n }\n }\n $locations = implode(', ', $locations);\n $redisjob['locations'] = $locations;\n $redisjob['pickup_loc'] = $pickup_name;\n $redis = new redisent('multivac');\n $redis->publish('redisbot', json_encode($redisjob));\n }\n*/\n\n }\n else if (count($hold_result['choose_location'])) {\n $locum = sopac_get_locum();\n $request_result_msg = '<h2 class=\"title\">' . t('Please select a pickup location for your request:') . '</h2><div class=\"item-request\"><ul>';\n\n foreach ($locum->locum_config['branches'] as $branch_code => $branch_name) {\n $link = l($branch_name, variable_get('sopac_url_prefix', 'cat/seek') . '/request/' . $bnum . '/' . $branch_code);\n $request_result_msg .= '<li class=\"button green\">' . $link . '</li>';\n }\n $request_result_msg .= '</ul></div>';\n }\n else if ($hold_result['selection']) {\n $request_result_msg = '<h2 class=\"title\">' . t('Please select an item for your request:') . '</h2>';\n\n $issues = array();\n $link_options = array();\n\n if ($_GET['lightbox']) {\n $link_options['query']['lightbox'] = 1;\n }\n if($staff_request) {\n $link_options['query']['staff'] = 1;\n }\n if($patron_bcode) {\n $link_options['query']['patron_barcode'] = $patron_bcode;\n }\n\n // Group items by callnumber\n foreach ($hold_result['selection'] as $selection) {\n $selection['branch_code'] = strtolower($selection['location'][0]);\n // Get issue number info\n preg_match('/v\\.([\\d]+)[^\\d]/', $selection['callnum'], $vol_match);\n preg_match('/no\\.([\\d]+)[^\\d]/', $selection['callnum'], $no_match);\n if ($vol_match[1] || $no_match[1]) {\n // volume and/or number found\n $issue_id = intval($vol_match[1] . str_pad($no_match[1], 6, '0', STR_PAD_LEFT));\n }\n else {\n // search for year\n if (preg_match('/([\\d]{4})/', $selection['callnum'], $year_match)) {\n $issue_id = $year_match[1];\n // translate seasons/months into corresponding issue values\n if (stripos($selection['callnum'], 'jan') !== FALSE) {\n $issue_id .= '01';\n }\n else if (stripos($selection['callnum'], 'feb') !== FALSE) {\n $issue_id .= '02';\n }\n else if (stripos($selection['callnum'], 'mar') !== FALSE) {\n $issue_id .= '03';\n }\n else if (stripos($selection['callnum'], 'apr') !== FALSE) {\n $issue_id .= '04';\n }\n else if (stripos($selection['callnum'], 'may') !== FALSE) {\n $issue_id .= '05';\n }\n else if (stripos($selection['callnum'], 'jun') !== FALSE) {\n $issue_id .= '06';\n }\n else if (stripos($selection['callnum'], 'jul') !== FALSE) {\n $issue_id .= '07';\n }\n else if (stripos($selection['callnum'], 'aug') !== FALSE) {\n $issue_id .= '08';\n }\n else if (stripos($selection['callnum'], 'sep') !== FALSE) {\n $issue_id .= '09';\n }\n else if (stripos($selection['callnum'], 'oct') !== FALSE) {\n $issue_id .= '10';\n }\n else if (stripos($selection['callnum'], 'nov') !== FALSE) {\n $issue_id .= '11';\n }\n else if (stripos($selection['callnum'], 'dec') !== FALSE) {\n $issue_id .= '12';\n }\n else if (stripos($selection['callnum'], 'spr') !== FALSE) {\n $issue_id .= '01';\n }\n else if (stripos($selection['callnum'], 'sum') !== FALSE) {\n $issue_id .= '02';\n }\n else if (stripos($selection['callnum'], 'fal') !== FALSE) {\n $issue_id .= '03';\n }\n else if (stripos($selection['callnum'], 'win') !== FALSE) {\n $issue_id .= '04';\n }\n\n // check for date\n if (preg_match('/[A-Za-z]{3} ([\\d]{1,2}) /', $selection['callnum'], $date_match)) {\n $issue_id .= str_pad($date_match[1], 2, '0', STR_PAD_LEFT);\n }\n }\n else {\n // no year found, just use the call number to sort A-Z\n $issue_id = $selection['callnum'];\n }\n }\n $issues[$issue_id][] = $selection;\n }\n // reverse to show latest issues first\n krsort($issues);\n\n // Find 'Magazine' material code\n $magazine_code = array_search('Magazine', $locum->locum_config['formats']);\n\n foreach ($issues as $issue) {\n $selection = array();\n\n if (!$first_issue_found && $bib_item['mat_code'] == $magazine_code) {\n // First issue isn't requestable\n $selection = $issue[0];\n $selection['location'] = 'N/A';\n $selection['varname'] = '';\n $selection['status'] = 'Latest copy is unrequestable';\n $first_issue_found = TRUE;\n }\n else {\n // select the best availble item to be the link for this callnum\n shuffle($issue);\n foreach($issue as $issue_item) {\n if ($issue_item['status'] == 'AVAILABLE') {\n $selection = $issue_item;\n if ($issue_item['branch_code'] == $pickup_arg) {\n // Availble at the itended branch, use it\n break;\n }\n }\n // Grab a requestable issue only if no selection yet\n else if (empty($selection)) {\n if ($issue_item['varname']) {\n $selection = $issue_item;\n }\n }\n }\n // if nothing was requestable, just use the first item\n if (empty($selection)) {\n $selection = $issue[0];\n }\n }\n\n $status = $selection['status'];\n if ($selection['varname']) {\n $request = l('Request this item',\n variable_get('sopac_url_prefix', 'cat/seek') . \"/request/$bnum/$pickup_arg/\" . $selection['varname'],\n $link_options);\n $requestable++;\n }\n else {\n $request = '';\n $status = '<span class=\"non_circ_msg\">' . $status . '</span>';\n }\n $rows[] = array(\n $selection['location'],\n $selection['callnum'],\n $status,\n $request,\n );\n }\n\n if (count($rows)) {\n $header = array(t('Location'), t('Call Number'), t('Status'), t('Request'));\n $item_form = theme('table', $header, $rows);\n }\n else {\n $request_result_msg = '';\n $item_form = t('There are no copies of this item available for circulation.');\n }\n $item_form .= '<ul><li class=\"button red\">' .\n l('Return to ' . $bib_item['title'], variable_get('sopac_url_prefix', 'cat/seek') . '/record/' . $bnum) .\n '</li></ul>';\n }\n else {\n drupal_set_message(t('We were unable to fulfill your request for ') . '<span class=\"req_bib_title\">' . $bib_item['title'] . '</span>', 'error');\n }\n\n if ($hold_result['error']) {\n drupal_set_message($hold_result['error'], 'error');\n }\n // TODO - add a tally for top items data recovery\n }\n else {\n $request_error_msg = t(\"You must have a valid library card number registered with our system.\");\n }\n $result_page = theme('sopac_request', $request_result_msg, $request_error_msg, $item_form, $bnum);\n return '<p>'. t($result_page) .'</p>';\n}", "protected function renderSimulateUserSelectAndLabel() {}", "public function test_do_action_1_params() {\n $hook = rand_str();\n yourls_add_action( $hook, array( $this, 'accept_multiple_params' ) );\n\n $this->expectOutputString( \"array (0 => 'hello',)\" );\n yourls_do_action( $hook, 'hello' );\n }", "public function choose_action()\n {\n $id = get_param_integer('id', -1);\n $start = get_param_integer('start', 0);\n $max = get_param_integer('max', 50);\n $sortables = array('date_and_time' => do_lang_tempcode('DATE_TIME'), 'the_type' => do_lang_tempcode('ACTION'));\n $test = explode(' ', get_param_string('sort', 'date_and_time DESC'), 2);\n if (count($test) == 1) {\n $test[1] = 'DESC';\n }\n list($sortable, $sort_order) = $test;\n if (((strtoupper($sort_order) != 'ASC') && (strtoupper($sort_order) != 'DESC')) || (!array_key_exists($sortable, $sortables))) {\n log_hack_attack_and_exit('ORDERBY_HACK');\n }\n\n require_code('templates_results_table');\n $field_titles = array(do_lang_tempcode('USERNAME'), do_lang_tempcode('DATE_TIME'), do_lang_tempcode('ACTION'), do_lang_tempcode('PARAMETER_A'), do_lang_tempcode('PARAMETER_B'));\n if (addon_installed('securitylogging')) {\n $field_titles[] = do_lang_tempcode('BANNED');\n }\n $fields_title = results_field_title($field_titles, $sortables, 'sort', $sortable . ' ' . $sort_order);\n\n $filter_to_type = get_param_string('to_type', '');\n $filter_param_a = get_param_string('param_a', '');\n $filter_param_b = get_param_string('param_b', '');\n\n $max_rows = 0;\n\n // Pull up our rows: forum...\n\n if (get_forum_type() == 'cns') {\n // Possible filter (called up by URL)\n $where = '1=1';\n if ($filter_to_type != '') {\n $where .= ' AND (1=2';\n foreach (explode(',', $filter_to_type) as $_filter_to_type) {\n $where .= ' OR ' . db_string_equal_to('l_the_type', $_filter_to_type);\n }\n $where .= ')';\n }\n if ($filter_param_a != '') {\n if (is_numeric($filter_param_a)) {\n $where .= ' AND ' . db_string_equal_to('l_param_a', $filter_param_a);\n } else {\n $where .= ' AND l_param_a LIKE \\'' . db_encode_like('%' . $filter_param_a . '%') . '\\'';\n }\n }\n if ($filter_param_b != '') {\n if (is_numeric($filter_param_b)) {\n $where .= ' AND ' . db_string_equal_to('l_param_b', $filter_param_b);\n } else {\n $where .= ' AND l_param_b LIKE \\'' . db_encode_like('%' . $filter_param_b . '%') . '\\'';\n }\n }\n if ($id != -1) {\n $where .= ' AND l_by=' . strval($id);\n }\n\n // Fetch\n $rows1 = $GLOBALS['FORUM_DB']->query('SELECT l_reason,id,l_by AS member_id,l_date_and_time AS date_and_time,l_the_type AS the_type,l_param_a AS param_a,l_param_b AS param_b FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_moderator_logs WHERE ' . $where . ' ORDER BY ' . $sortable . ' ' . $sort_order, $max + $start, null, false, true);\n $max_rows += $GLOBALS['FORUM_DB']->query_value_if_there('SELECT COUNT(*) FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_moderator_logs WHERE ' . $where, false, true);\n } else {\n $rows1 = array();\n }\n\n // Pull up our rows: site...\n\n // Possible filter (called up by URL)\n $where = '1=1';\n if ($filter_to_type != '') {\n $where .= ' AND (1=2';\n foreach (explode(',', $filter_to_type) as $_filter_to_type) {\n $where .= ' OR ' . db_string_equal_to('the_type', $_filter_to_type);\n }\n $where .= ')';\n }\n if ($filter_param_a != '') {\n if (is_numeric($filter_param_a)) {\n $where .= ' AND ' . db_string_equal_to('param_a', $filter_param_a);\n } else {\n $where .= ' AND param_a LIKE \\'' . db_encode_like('%' . $filter_param_a . '%') . '\\'';\n }\n }\n if ($filter_param_b != '') {\n if (is_numeric($filter_param_b)) {\n $where .= ' AND ' . db_string_equal_to('param_b', $filter_param_b);\n } else {\n $where .= ' AND param_b LIKE \\'' . db_encode_like('%' . $filter_param_b . '%') . '\\'';\n }\n }\n if ($id != -1) {\n $where .= ' AND member_id=' . strval($id);\n }\n\n // Fetch\n $rows2 = $GLOBALS['SITE_DB']->query('SELECT id,member_id,date_and_time,the_type,param_a,param_b,ip FROM ' . get_table_prefix() . 'actionlogs WHERE ' . $where . ' ORDER BY ' . $sortable . ' ' . $sort_order, $max + $start, null, false, true);\n $max_rows += $GLOBALS['SITE_DB']->query_value_if_there('SELECT COUNT(*) FROM ' . get_table_prefix() . 'actionlogs WHERE ' . $where, false, true);\n $rows = array_merge($rows1, $rows2);\n\n // Render...\n\n require_code('actionlog');\n\n $fields = new Tempcode();\n $pos = 0;\n while ((count($rows) != 0) && (($pos - $start) < $max)) {\n $best = 0; // Initialise type to integer\n $_best = 0; // Initialise type to integer\n $best = null;\n $_best = null;\n foreach ($rows as $x => $row) {\n if ((is_null($best))\n || (($row['date_and_time'] < $_best) && ($sortable == 'date_and_time') && ($sort_order == 'ASC'))\n || (($row['date_and_time'] > $_best) && ($sortable == 'date_and_time') && ($sort_order == 'DESC'))\n || ((intval($row['the_type']) < $_best) && ($sortable == 'the_type') && ($sort_order == 'ASC'))\n || ((intval($row['the_type']) > $_best) && ($sortable == 'the_type') && ($sort_order == 'DESC'))\n ) {\n $best = $x;\n if ($sortable == 'date_and_time') {\n $_best = $row['date_and_time'];\n }\n if ($sortable == 'the_type') {\n $_best = $row['the_type'];\n }\n }\n }\n if ($pos >= $start) {\n $myrow = $rows[$best];\n\n $username = $GLOBALS['FORUM_DRIVER']->member_profile_hyperlink($myrow['member_id'], false, '', false);\n $mode = array_key_exists('l_reason', $myrow) ? 'cns' : 'cms';\n $url = build_url(array('page' => '_SELF', 'type' => 'view', 'id' => $myrow['id'], 'mode' => $mode), '_SELF');\n $mode_nice = ($mode == 'cms') ? 'Composr' : 'Conversr';\n $date = hyperlink($url, get_timezoned_date($myrow['date_and_time']), false, true, $mode_nice . '/' . $myrow['the_type'] . '/' . strval($myrow['id']), null, null, null, '_top');\n\n if (!is_null($myrow['param_a'])) {\n $a = $myrow['param_a'];\n } else {\n $a = '';\n }\n if (!is_null($myrow['param_b'])) {\n $b = $myrow['param_b'];\n } else {\n $b = '';\n }\n\n require_code('templates_interfaces');\n $_a = tpl_crop_text_mouse_over($a, 12);\n $_b = tpl_crop_text_mouse_over($b, 15);\n\n $type_str = do_lang($myrow['the_type'], $_a, $_b, null, null, false);\n if (is_null($type_str)) {\n $type_str = $myrow['the_type'];\n }\n\n $test = actionlog_linkage($myrow['the_type'], $a, $b, $_a, $_b);\n if (!is_null($test)) {\n list($_a, $_b) = $test;\n }\n\n $result_entry = array($username, $date, $type_str, $_a, $_b);\n\n if (addon_installed('securitylogging')) {\n $banned_test_1 = array_key_exists('ip', $myrow) ? ip_banned($myrow['ip'], true) : false;\n $banned_test_2 = !is_null($GLOBALS['SITE_DB']->query_select_value_if_there('usersubmitban_member', 'the_member', array('the_member' => $myrow['member_id'])));\n $banned_test_3 = $GLOBALS['FORUM_DRIVER']->is_banned($myrow['member_id']);\n $banned = (((!$banned_test_1)) && ((!$banned_test_2)) && (!$banned_test_3)) ? do_lang_tempcode('NO') : do_lang_tempcode('YES');\n\n $result_entry[] = $banned;\n }\n\n $fields->attach(results_entry($result_entry, true));\n }\n\n unset($rows[$best]);\n $pos++;\n }\n $table = results_table(do_lang_tempcode('ACTIONS'), $start, 'start', $max, 'max', $max_rows, $fields_title, $fields, $sortables, $sortable, $sort_order, 'sort');\n\n $tpl = do_template('ACTIONLOGS_SCREEN', array('_GUID' => 'd75c813e372c3ca8d1204609e54c9d65', 'TABLE' => $table, 'TITLE' => $this->title));\n\n require_code('templates_internalise_screen');\n return internalise_own_screen($tpl);\n }", "function testGuessCheckbox() {\n\t\t$result = $this->helper->__guessInputType('Test.is_foo');\n\t\t$this->assertEqual($result, 'checkbox');\n\t}", "public function test1()\n {\n \t$this->visit('/')\n \t\t->type('management','name')\n \t\t ->press('submit')\n ->see('Search Results')\n ->see('Management');\n }", "function display_choice($array)\n{\n\tglobal $config;\n\t\n\tswitch ($array['type']) {\n\tcase 'text':\n\t\techo '<input type=\"text\" id=\"' . $array['name'] . '\" name=\"' . $array['name'] . '\" value=\"' . $config[$array['name']] . '\" />';\n\t\tbreak;\n\tcase 'select':\n\t\techo '<select id=\"' . $array['name'] . '\" name=\"' . $array['name'] . '\" onchange=\"' . $array['script'] . '\">';\n\t\tforeach ($array['options'] as $option) {\n\t\t\techo \"<option label='\" . $option . \"' value='\" . $option . \"' \";\n\t\t\tif ($option == $config[$array['name']])\n\t\t\t\techo \"selected='selected'\";\n\t\t\techo \">\" . $option . \"</option>\\n\";\n\t\t}\n\t\techo '</select>';\n\t\tbreak;\n\n\tcase 'array':\n\t\techo '<input type=\"text\" name=\"' . $array['name'] . '\" value=\"' . implode(',',$config[$array['name']]) . '\" id=\"' . $array['name'] . '\" />';\n\t\tbreak;\n\n\tcase 'boolean':\n\t\techo '<select id=\"' . $array['name'] . '\" name=\"' . $array['name'] . '\" onchange=\"' . $array['script'] . '\">';\n\t\techo \"<option label='TRUE' value='TRUE' \";\n\t\tif ($config[$array['name']])\n\t\t\techo \"selected='selected'\";\n\t\techo \">TRUE</option>\\n\";\n\t\techo \"<option label='FALSE' value='FALSE' \";\n\t\tif (!$config[$array['name']])\n\t\t\techo \"selected='selected'\";\n\t\techo \">FALSE</option>\\n\";\t\t\n\t\techo '</select>';\n\t\tbreak;\n\t\t\n\tdefault:\n\t\tbreak;\n\t}\n}", "public function testApproveMatchingSuggestionsUsingPOST()\n {\n }", "public function test_interactive_correct_no_submit() {\n $dd = test_question_maker::make_question('ddimageortext');\n $dd->hints = array(\n new question_hint_with_parts(23, 'This is the first hint.',\n FORMAT_MOODLE, false, false),\n new question_hint_with_parts(24, 'This is the second hint.',\n FORMAT_MOODLE, true, true),\n );\n $dd->shufflechoices = false;\n $this->start_attempt_at_question($dd, 'interactive', 3);\n\n // Check the initial state.\n $this->check_current_state(question_state::$todo);\n $this->check_current_mark(null);\n $this->check_current_output(\n $this->get_contains_drag_image_home_expectation(1, 1, 1),\n $this->get_contains_drag_image_home_expectation(2, 2, 1),\n $this->get_contains_drag_image_home_expectation(3, 1, 2),\n $this->get_contains_drag_image_home_expectation(4, 2, 2),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p1'),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p2'),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p3'),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p4'),\n $this->get_contains_submit_button_expectation(true),\n $this->get_does_not_contain_feedback_expectation(),\n $this->get_tries_remaining_expectation(3),\n $this->get_no_hint_visible_expectation());\n\n // Save the right answer.\n $this->process_submission(array('p1' => '1', 'p2' => '2', 'p3' => '1', 'p4' => '2'));\n\n // Finish the attempt without clicking check.\n $this->quba->finish_all_questions();\n\n // Verify.\n $this->check_current_state(question_state::$gradedright);\n $this->check_current_mark(3);\n $this->check_current_output(\n $this->get_contains_drag_image_home_expectation(1, 1, 1),\n $this->get_contains_drag_image_home_expectation(2, 2, 1),\n $this->get_contains_drag_image_home_expectation(3, 1, 2),\n $this->get_contains_drag_image_home_expectation(4, 2, 2),\n $this->get_does_not_contain_submit_button_expectation(),\n $this->get_contains_correct_expectation(),\n $this->get_no_hint_visible_expectation());\n\n // Check regrading does not mess anything up.\n $this->quba->regrade_all_questions();\n\n // Verify.\n $this->check_current_state(question_state::$gradedright);\n $this->check_current_mark(3);\n }", "private function handleOption() : void\n {\n switch ($this->selectedOption) {\n case QAOptionsEnum::ADD:\n $this->addQuestion();\n break;\n\n case QAOptionsEnum::VIEW:\n $this->viewQuestion();\n break;\n\n case QAOptionsEnum::SHOW_ANSWERS:\n $this->showAnswers();\n break;\n\n case QAOptionsEnum::QA_EXIT:\n $this->exit();\n break;\n }\n\n $this->showOptions($this->console);\n }", "function selectAndPick(sfTestBrowser $t, array $options)\n{\n foreach($options as $check => $value)\n {\n $t->setField($check . \"_check\", 1);\n $t->setField($check, $value);\n }\n\n return $t;\n}", "function chooseAction() {\r\n\t\t// TODO maybe? - prevent people from viewing this page if localization is not enabled\r\n\t\t$default_locale = strtolower(Bolts_Registry::get('default_locale', 'default'));\r\n\t\t$request = new Bolts_Request($this->getRequest());\r\n\r\n\t\t// TODO - get cookie value and validate it\r\n\r\n\t\t// TODO - only redirect if a valid cookie value exists !\r\n\t\tif (!$request->has('change') && false) {\r\n\t\t\t$this->_redirect(\"/\".$this->locale_code);\r\n\t\t}\r\n\t\t\r\n\t\t// Force the use of en-US\r\n\t\tif ($this->locale_code != $default_locale) {\r\n\t\t\t$this->locale_code = $default_locale;\r\n\t\t\t$this->_redirect(\"/\".$this->_request->getModuleName().\"/\".$this->_request->getControllerName().\"/\".$this->_request->getActionName().\"/\");\r\n\t\t}\r\n\t\t\r\n\t\t$locales_table = new Locales();\r\n\t\t$tmp_regions = $locales_table->getDistinctRegions();\r\n\t\t$choices = array();\r\n\r\n\t\tforeach ($tmp_regions as $tmp_region) {\r\n\t\t\tif ($tmp_region['region_name'] == 'Global') {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$tmp_countries = $locales_table->getDistinctCountries($tmp_region['region_name']);\r\n\t\t\t$tmp_pseudo_countries = $locales_table->getDistinctPseudoCountryCodes($tmp_region['region_name']);\r\n\t\t\tforeach ($tmp_countries as $tmp_country) {\r\n\t\t\t\tif (!empty($tmp_pseudo_countries) && in_array($tmp_country['country_code'], $tmp_pseudo_countries[0])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$tmp_lang = $locales_table->getLanguages($tmp_region['region_name'], $tmp_country['country_code']);\r\n\t\t\t\t$tmp_country['languages'] = array();\r\n\t\t\t\tforeach ($tmp_lang as $lan) {\r\n\t\t\t\t\tif (!is_null($lan['pseudo_country_code'])) {\r\n\t\t\t\t\t\t$tmp_locale_code = strtolower($lan['language_code'].\"-\".$lan['pseudo_country_code']);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$tmp_locale_code = strtolower($lan['language_code'].\"-\".$tmp_country['country_code']);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (in_array($tmp_locale_code,$this->live_locales)) {\r\n\t\t\t\t\t\t$tmp_country['languages'][] = $lan;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (count($tmp_country['languages']) > 0) {\r\n\t\t\t\t\t$tmp_region['countries'][] = $tmp_country;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (array_key_exists('countries',$tmp_region) && count($tmp_region['countries']) > 0) {\r\n\t\t\t\t$choices[] = $tmp_region;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->view->choices = $choices;\r\n\t\tif ($request->has('inline')) {\r\n\t\t\t$this->view->inline = $request->inline;\r\n\t\t}\r\n\t}", "function module_specific_controls($totalnumber, $recurse, $category, $cmid, $cmoptions) {\n global $OUTPUT;\n $out = '';\n $catcontext = context::instance_by_id($category->contextid);\n if (has_capability('moodle/question:useall', $catcontext)) {\n $cmoptions->hasattempts = false;\n if ($cmoptions->hasattempts) {// Prior attempts donít matter with IPAL.\n $disabled = ' disabled=\"disabled\"';\n } else {\n $disabled = '';\n }\n $randomusablequestions = question_bank::get_qtype('random')->get_available_questions_from_category(\n $category->id, $recurse);\n $maxrand = count($randomusablequestions);$maxrand = 0;// Adding random questions is not an IPAL option.\n if ($maxrand > 0) {\n for ($i = 1; $i <= min(10, $maxrand); $i++) {\n $randomcount[$i] = $i;\n }\n for ($i = 20; $i <= min(100, $maxrand); $i += 10) {\n $randomcount[$i] = $i;\n }\n } else {\n $randomcount[0] = 0;\n $disabled = ' disabled=\"disabled\"';\n }\n\n $out = '<strong><label for=\"menurandomcount\">'.get_string('addrandomfromcategory', 'quiz').\n '</label></strong><br />';\n $attributes = array();\n $attributes['disabled'] = $disabled ? 'disabled' : null;\n $select = html_writer::select($randomcount, 'randomcount', '1', null, $attributes);\n $out .= get_string('addrandom', 'quiz', $select);\n $out .= '<input type=\"hidden\" name=\"recurse\" value=\"'.$recurse.'\" />';\n $out .= '<input type=\"hidden\" name=\"categoryid\" value=\"' . $category->id . '\" />';\n $out .= ' <input type=\"submit\" name=\"addrandom\" value=\"'.\n get_string('addtoquiz', 'quiz').'\"' . $disabled . ' />';\n $out .= $OUTPUT->help_icon('addarandomquestion', 'quiz');\n }\n return $out;\n}", "public function test_interactive_behaviour() {\n $dd = test_question_maker::make_question('ddimageortext');\n $dd->hints = array(\n new question_hint_with_parts(13, 'This is the first hint.', FORMAT_HTML, false, false),\n new question_hint_with_parts(14, 'This is the second hint.', FORMAT_HTML, true, true),\n );\n $dd->shufflechoices = false;\n $this->start_attempt_at_question($dd, 'interactive', 12);\n\n // Check the initial state.\n $this->check_current_state(question_state::$todo);\n $this->check_current_mark(null);\n\n $this->check_current_output(\n $this->get_contains_drag_image_home_expectation(1, 1, 1),\n $this->get_contains_drag_image_home_expectation(2, 2, 1),\n $this->get_contains_drag_image_home_expectation(3, 1, 2),\n $this->get_contains_drag_image_home_expectation(4, 2, 2),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p1'),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p2'),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p3'),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p4'),\n $this->get_contains_submit_button_expectation(true),\n $this->get_does_not_contain_feedback_expectation(),\n $this->get_tries_remaining_expectation(3),\n $this->get_no_hint_visible_expectation());\n\n // Save the wrong answer.\n $this->process_submission(array('p1' => '2', 'p2' => '1', 'p3' => '2', 'p4' => '1'));\n // Verify.\n $this->check_current_state(question_state::$todo);\n $this->check_current_mark(null);\n\n $this->check_current_output(\n $this->get_contains_drag_image_home_expectation(1, 1, 1),\n $this->get_contains_drag_image_home_expectation(2, 2, 1),\n $this->get_contains_drag_image_home_expectation(3, 1, 2),\n $this->get_contains_drag_image_home_expectation(4, 2, 2),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p1', 2),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p2', 1),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p3', 2),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p4', 1),\n $this->get_contains_submit_button_expectation(true),\n $this->get_does_not_contain_feedback_expectation(),\n $this->get_tries_remaining_expectation(3),\n $this->get_no_hint_visible_expectation());\n // Submit the wrong answer.\n $this->process_submission(\n array('p1' => '2', 'p2' => '1', 'p3' => '2', 'p4' => '1', '-submit' => 1));\n\n // Verify.\n $this->check_current_state(question_state::$todo);\n $this->check_current_mark(null);\n $this->check_current_output(\n $this->get_contains_drag_image_home_expectation(1, 1, 1),\n $this->get_contains_drag_image_home_expectation(2, 2, 1),\n $this->get_contains_drag_image_home_expectation(3, 1, 2),\n $this->get_contains_drag_image_home_expectation(4, 2, 2),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p1', 2),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p2', 1),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p3', 2),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p4', 1),\n $this->get_contains_try_again_button_expectation(true),\n $this->get_contains_hint_expectation('This is the first hint'));\n\n // Do try again.\n $this->process_submission(array('-tryagain' => 1));\n\n // Verify.\n $this->check_current_state(question_state::$todo);\n $this->check_current_mark(null);\n\n $this->check_current_output(\n $this->get_contains_drag_image_home_expectation(1, 1, 1),\n $this->get_contains_drag_image_home_expectation(2, 2, 1),\n $this->get_contains_drag_image_home_expectation(3, 1, 2),\n $this->get_contains_drag_image_home_expectation(4, 2, 2),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p1', '2'),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p2', '1'),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p3', '2'),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p4', '1'),\n $this->get_contains_submit_button_expectation(true),\n $this->get_does_not_contain_correctness_expectation(),\n $this->get_does_not_contain_feedback_expectation(),\n $this->get_tries_remaining_expectation(2),\n $this->get_no_hint_visible_expectation());\n\n // Submit the right answer.\n $this->process_submission(\n array('p1' => '1', 'p2' => '2', 'p3' => '1', 'p4' => '2', '-submit' => 1));\n\n // Verify.\n $this->check_current_state(question_state::$gradedright);\n $this->check_current_mark(8);\n $this->check_current_output(\n $this->get_contains_drag_image_home_expectation(1, 1, 1),\n $this->get_contains_drag_image_home_expectation(2, 2, 1),\n $this->get_contains_drag_image_home_expectation(3, 1, 2),\n $this->get_contains_drag_image_home_expectation(4, 2, 2),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p1', '1'),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p2', '2'),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p3', '1'),\n $this->get_contains_hidden_expectation(\n $this->quba->get_field_prefix($this->slot) . 'p4', '2'),\n $this->get_does_not_contain_submit_button_expectation(),\n $this->get_contains_correct_expectation(),\n $this->get_no_hint_visible_expectation());\n\n // Check regrading does not mess anything up.\n $this->quba->regrade_all_questions();\n\n // Verify.\n $this->check_current_state(question_state::$gradedright);\n $this->check_current_mark(8);\n }", "function exam_take_page_advance_confirm($form, &$form_state) {\n \n print '<p>pButtonClicked = ' . $_SESSION['exam']['pButtonClicked'] . '</p>';\n print '<p>pNextButtonClick = ' . $_SESSION['exam']['pNextButtonClick'] . '</p>';\n \n if ($_SESSION['exam']['pButtonClicked'] == $_SESSION['exam']['pNextButtonClick']) {\n print '<p>IF</p>';\n // All is good\n $_SESSION['exam']['pNextButtonClick']++;\n } else {\n print '<p>ELSE</p>';\n // The test taker is not using buttons to advance\n // Presumably that means he or she is using the browser\n // to back up through the exam.\n // Interrupt this navigation and redirect the user to the \n // summary page\n $form_state['redirect'] = array('exam/summary/' . $_SESSION['exam']['pExamTitleURL']);\n }\n \n return null;\n \n}", "function testSelectedOption(){\n\t\t#mdx:SelectedOption\n\t\t$select = new HtCklist(\"select_days\");\n\t\t$select->options([1=>'Mon',2=>'Tue',3=>'Wed',4=>'Thu',5=>'Fri',6=>'Sat']);\n\t\t$select->context(['select_days'=>[2,5]]); // check Tue and Fri\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/input.*?2.*checked.*?input.*?5.*?checked/s\");\n\t\techo $select;\n\t}", "function onAction_agent_trojan()\n {\n $bAskPasscode = true;\n $code = false;\n\n $this->set('ask_passcode', false);\n\n if (isset($_POST['passcode']))\n {\n $code = $_POST['passcode'];\n }\n else if (isset($_GET['passcode']))\n {\n $code = $_GET['passcode'];\n }\n\n if ($code === PASSCODE_TROJAN)\n {\n $bAskPasscode = false;\n }\n\n if ($bAskPasscode === true)\n {\n // no passcode set or wrong, so must ask user\n $this->m_bRender = true;\n $this->set('ask_passcode', true);\n }\n else\n {\n // do some actions...\n\n // finally... redirect to main page\n $this->redirect('/');\n }\n }", "public function testSearchBookHasInputValueSelectAuthor()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/books')\n ->resize(1200,1600)\n ->assertSee('List Books')\n ->type('search', 'Pytago')\n ->select('filter', 'author')\n ->click('#btn-search')\n ->visit('/admin/books?search=Pytago&filter=author')\n ->assertQueryStringHas('search', 'Pytago')\n ->assertQueryStringHas('filter', 'author');\n $elements = $browser->elements('#list-books tbody tr');\n $this->assertCount(1, $elements);\n });\n }", "function isSelected($val,$option) {\r\n $cmp = strcmp($val,$option);\r\n if ($cmp == 0)\r\n return \" SELECTED\";\r\n else\r\n return \"\";\r\n}", "function promptUser($prompt, $allowedValues=NULL, $default=NULL, $lower=TRUE) {\n while (true) {\n $userValue = readline($prompt);\n if ($lower) {\n $userValue = strtolower($userValue);\n }\n // if answer is an empty string and default is specified, return default\n if (($userValue == \"\") && $default){\n err_log(\"defaulting to $default\");\n return $default;\n }\n // check answer against allowed values.\n if ($allowedValues) {\n if (in_array($userValue, $allowedValues)) {\n // valid answer given, return answer\n return $userValue;\n } else {\n // invalid answer given, prompt again\n $validAnswer = implode(\", \", $allowedValues);\n err_log(\"$userValue is not a valid answer. Please answer [$validAnswer]\");\n continue;\n }\n } else {\n // all answers valid\n return $userValue;\n }\n }\n}", "public function test_do_action_no_params() {\n $hook = rand_str();\n yourls_add_action( $hook, array( $this, 'accept_multiple_params' ) );\n\n $this->expectOutputString( \"array (0 => '',)\" );\n yourls_do_action( $hook );\n }", "public static function userBadChoice()\n {\n say('Invalid entry, please try again');\n }", "function module_specific_buttons($cmid, $cmoptions) {\n global $OUTPUT;\n $params = array(\n 'type' => 'submit',\n 'name' => 'add',\n 'value' => $OUTPUT->larrow() . ' ' . get_string('addtoquiz', 'quiz'),\n );\n $cmoptions->hasattempts = false;\n if ($cmoptions->hasattempts) {// Prior attempts donít matter with IPAL.\n $params['disabled'] = 'disabled';\n }\n return html_writer::empty_tag('input', $params);\n}", "public function testCreateSubmit()\n {\n }", "public function testCanFallBackToRandomInput()\n {\n $optionsMock = $this->getMockBuilder(Ulrichsg\\Getopt::class)\n ->getMock();\n\n $optionsMock->expects($this->exactly(5))\n ->method(\"getOption\")\n ->withConsecutive(array(\"template\"), array(\"list-templates\"), array(\"input\"), array(\"input\"), array(\"input\"))\n ->willReturn(null, null, \"test\", \"test\", \"test\");\n\n $board = new Board(10, 8, 5, true);\n\n if ($optionsMock instanceof \\Ulrichsg\\Getopt) $this->input->fillBoard($board, $optionsMock);\n\n $this->assertGreaterThanOrEqual(0.15, $board->getFillPercentage());\n $this->assertLessThanOrEqual(0.70, $board->getFillPercentage());\n }", "function pickup_submit()\n\t{\n\t\t$name = '_f_'.$this->name;\n\t\t$this->value = $GLOBALS[$name];\n\t}", "function user_agreement() {\n\t\t$agreement = $this->agreementmdl->getLast();\n\n\t\tif ($this->input->post('iagree') && $this->input->post('submit')) {\n\t\t\t$this->usermdl->submitContractAgreement($this->getUserId(), $agreement->agreement_id);\n\t\t\tredirect();\n\t\t}\n\t\telseif ($this->input->post('cancel')) {\n\t\t\tredirect('welcome/logout');\n\t\t}\n\t\t$this->tpl->assign(\"terms\", $agreement->agreement_text);\n\t\t$this->tpl->assign_include(\"dynamic_tpl\", \"sys_msgs/terms\");\n\t\t$this->tpl->view(\"sys_msgs/sys_msg\", $this->lang->language);\n\t}", "public function setChoiceProvider(ChoiceProviderInterface $provider): NeedChoiceProviderInterface;", "public function Do_select_Example1(){\n\n\t}", "function load_choices() {\n /*\n if (is_array($this->choices)) {\n return true;\n }\n .... load choices here\n */\n return true;\n }", "function load_choices() {\n /*\n if (is_array($this->choices)) {\n return true;\n }\n .... load choices here\n */\n return true;\n }", "public function asso_needAssoSelected($action)\r\n {\r\n $this->get('logger')->debug('[Asso] Using asso_needAssoSelected() from the AbstractController. \"'.get_class($this).'\" should define this method itself.');\r\n\r\n return false;\r\n }", "public function isChosen(){\r\n return $this->isChosen;\r\n }", "function smartchoice_get_choice($choiceid) {\n global $DB;\n\n if ($choice = $DB->get_record('smartchoice', array('id' => $choiceid))) {\n if ($options = $DB->get_records('smartchoice_options', array('choiceid' => $choiceid), 'id')) {\n foreach ($options as $option) {\n $choice->option[$option->id] = $option->text;\n }\n\n return $choice;\n }\n }\n\n return false;\n}", "function askQuestion($currentCategory) {\n\t}", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n \n $browser->visit('/')\n ->pause(2000)\n ->assertSee('后台登录');\n \n\n // 页面 url, 是否有All按钮, select 选择框\n // 模板 [\"url\" => \"\", \"select\" => [\"name\" => \"\", \"value\" => \"\"]]\n /*\n $pages = [\n [\"url\" => \"/user_manage/all_users\", \"all\" => true, \"select\" => [\"name\" => \"id_grade\", \"value\" => 102], \"click\" => \".td-info\"],\n [\"url\" => \"human_resource/index_new\", \"select\" => [\"name\" => \"id_teacher_money_type\", \"value\" => 0], \"click\" => \".opt-freeze-list\"],\n [\"url\" => \"/authority/manager_list\", \"select\" =>[\"name\" => \"id_call_phone_type\", \"value\" => \"2\"]]\n ];\n \n foreach($pages as $item) {\n $browser->visit($item[\"url\"])->pause(5000);\n if (isset($item[\"all\"]))\n $browser->press(\"ALL\");\n //$browser->select($item[\"select\"]['name'], $item[\"select\"][\"value\"]);\n if (isset($item[\"click\"]) && $item[\"click\"])\n $browser->click($item[\"click\"]);\n //$browser->pause(5000);\n }*/\n\n /* $browser->visit(\"/user_manage/all_users\")\n ->press(\"ALL\")\n ->select(\"id_grade\", 101)\n ->select(\"id_grade\", 102)\n ->click(\".td-info\")\n ->pause(500);\n /*\n\n //$browser->click(\".bootstrap-dialog-body .opt-user\");\n\n $browser->click(\".bootstrap-dialog-header .close\"); // 关闭模态框\n\n $browser->visit(\"/tea_manage/lesson_list\")\n ->press(\"ALL\")\n ->pause(2000);\n */\n\n });\n }", "function getUserAction($type)\n{\n\t$rep = \"\";\n\n\t$question;\n\n\tswitch ($type)\n\t{\n\t\tcase 'index':\n\t\t$question = I18(\"Que voulez-vous faire?\");\n\tbreak;\n\n\t\tcase 'detail':\n\t\t$question = I18(\"Que voulez-vous faire?\");\n\tbreak;\n\t}\n\n\t$rep .= PHP_EOL . \"<div class='userAction'>\n\t<p style='margin:0'>$question</p>\" . PHP_EOL;\n\n\t$rep .= \"<select name='actionChoice' id='actionChoice'\nonchange='changedSelect(\\\"actionChoice\\\", \\\"ITupload\\\", \\\"upload\\\", \\\"update\\\")'>\" . PHP_EOL;\n\n\tforeach (ACTIONS as $key => $elem)\n\t{\n\t\t$rep .= \" <option value='$key'>$elem</option>\" . PHP_EOL;\n\t}\n\n\t$rep .= \"</select>\n\t<div id='ITupload'>\n\t\t<input type='hidden' name='MAX_FILE_SIZE' value='\" . MAXFSIZE . \"'/>\n\t\t<input type='file' name='newIT' id='newIT'/>\n\t</div>\" . PHP_EOL;\n\n\tif ($type==='detail' AND isset($_GET['choix']))\n\t{\n\t\t$rep .= \"<input type='hidden' name='IT[]' value='\" . withoutTag($_GET['choix']) . \"'>\";\n\t}\n\n\t$rep .= \"<input type='submit' value='\" . I18(\"Valider\") . \"'/>\n</div>\";\n\n\treturn $rep;\n}", "public function waitforconfirmationAction()\n {\n \tZend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n }", "function incorrectAnswer() {\n\t}" ]
[ "0.6665399", "0.63650054", "0.63650054", "0.5918038", "0.5864034", "0.5847077", "0.57928026", "0.57539433", "0.5722745", "0.5704236", "0.5687776", "0.5652487", "0.5616292", "0.5616292", "0.5565221", "0.5550574", "0.55393887", "0.553933", "0.5530776", "0.55233335", "0.5481931", "0.5474597", "0.5460042", "0.5460042", "0.5445228", "0.5438587", "0.5438587", "0.54355645", "0.543106", "0.54199725", "0.54160815", "0.54005706", "0.5388519", "0.5385861", "0.53741914", "0.5314517", "0.53042305", "0.52880985", "0.52701485", "0.5268363", "0.52571434", "0.5254149", "0.52434367", "0.51980424", "0.517727", "0.5162626", "0.51581246", "0.51450956", "0.51227635", "0.5111679", "0.5103819", "0.50937074", "0.50924647", "0.50888246", "0.50811684", "0.5077728", "0.5074119", "0.50690544", "0.5067423", "0.5058104", "0.5052539", "0.50504285", "0.50502753", "0.5046481", "0.5040355", "0.50373113", "0.50365895", "0.50328636", "0.5032534", "0.50184256", "0.5009261", "0.50064343", "0.50064063", "0.5005938", "0.49991915", "0.49940673", "0.4990304", "0.49841735", "0.49839434", "0.497368", "0.49710426", "0.4970255", "0.4968445", "0.49677452", "0.49676937", "0.4963378", "0.49588856", "0.49558648", "0.49554497", "0.49503493", "0.49493152", "0.49493152", "0.49394578", "0.4935586", "0.49330506", "0.49308583", "0.49266544", "0.49252594", "0.49232104", "0.4922578" ]
0.57927185
7
end of testAutoSubmit() FUNCTION: CREATE FROM ARRAY / This function creates a set of radio buttons from a hash array. This can be used to generate quick radio buttons, but there are some specialty sets below that are commonly used using those specialty sets should be even faster for common tasks. Autosubmit doesn't work yet, so only feed two arguments for now.
public static function createFromArray() { $args = func_get_args(); switch (count($args)) { case 2: $buttonset = $args[0]; $array = $args[1]; $auto = 0; // don't auto-submit break; case 3: $buttonset = $args[0]; $array = $args[1]; $atuo = DropDownList::testAutoSubmit($args[2]); break; } // Check to see if a choice has been made previously or is a session variable $choice = RadioButton::getChoice($buttonset); // Create the radio button set... if ($choice == -1) { // No choice made -- user prompted to select while (list($key, $value) = each ($array)) { echo "<INPUT type=\"radio\" name=\"$buttonset\" value=\"$key\"> $value<BR>"; } // end of while loop } else { // prior choice made -- select that value while (list($key, $value) = each ($array)) { if ($key == $choice) { echo "<INPUT type=\"radio\" name=\"$buttonset\" value=\"$key\" checked> $value<BR>"; } else { echo "<INPUT type=\"radio\" name=\"$buttonset\" value=\"$key\"> $value<BR>"; } } // end of while loop } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createRadios($hiddenName, $outerIndex)\n{\n\t// Loop through and generate all radio buttons, giving unique names \n\tfor($i = 1; $i <= 4; $i++)\n\t{\n\t\t$id = \"radio\" . $outerIndex . $i;\n\t\t$name = \"radio\" . $outerIndex;\n\t\t\n\t\tif(isset($_REQUEST[$name]))\n\t\t\t$currentSelected = $_REQUEST[$name];\n\t\telse\n\t\t\t$currentSelected = \"\";\n\t\t\n\t\techo \"<p>\\n\";\n\t\t$checked = (strcmp($currentSelected, $id) == 0) ? \"checked\" : \"\";\n\t\techo \"<input type=\\\"radio\\\" id=\\\"$id\\\" name=\\\"$name\\\" value=\\\"$id\\\" $checked>\\n\";\n\t\t\n\t\tif($i == 1)\n\t\t\techo \"<img class=\\\"thumb\\\" src=\\\"pictures/egypt.jpg\\\"/>\\n\";\n\t\telse if($i == 2)\n\t\t\techo \"<img class=\\\"thumb\\\" src=\\\"pictures/disney.jpg\\\"/>\\n\";\n\t\telse if($i == 3)\n\t\t\techo \"<img class=\\\"thumb\\\" src=\\\"pictures/theater_masks.jpg\\\"/>\\n\";\n\t\telse\n\t\t\techo \"<img class=\\\"thumb\\\" src=\\\"pictures/wookie.jpg\\\"/>\\n\";\n\t\t\n\t\techo \"</p>\\n\";\n\t}\n}", "function create_radio($values = array('16', '24'), $name = 'pace') {\n\n\t// Start the element:\n\tforeach ($values as $value) {\n\t\techo '<input type=\"radio\" name=\"' . $name .'\" value=\"' . $value . '\"';\n\n\t\t// Check for stickiness:\n\t\tif (isset($_POST[$name]) && ($_POST[$name] == $value)) {\n\t\t\techo ' checked=\"checked\"';\n\t\t}\n\n\t// Complete the element:\n\techo \"> $value hrs/week \";\n\t} // End of foreach loop.\n\n}", "function isubmit_multi($array, $label, $confirm = false, $class = false, $id = false)\r\n{\r\n $name = 'multi_var';\r\n $value = ret_multivar($array);\r\n\r\n isubmit($name, $value, $label, $confirm, $class, $id);\r\n}", "private function _output_options_radios($arr, $name) {\n\t\t$output = '';\n\t\tforeach ($arr as $val => $opt) :\n\t\t\t$slug = $this->_make_slug($opt);\n\t\t\t$output .= '\n\t\t\t\t\t\t<input type=\"radio\" name=\"' . $name . '[]\" value=\"' . $val . '\" id=\"' . $slug . '\"';\n\t\t\t$output .= $this->form['markup'] === 'xhtml' ? ' />' : '>';\n\t\t\t$output .= '\n\t\t\t\t\t\t<label for=\"' . $slug . '\">' . $opt . '</label>';\n\t\tendforeach;\n\t\treturn $output;\n\t}", "function form_radio_yn($name, $array='', $yes='0', $empty='0', $extra='', $value_y = 1, $value_n = 0) {\n\n\tif ($array) {\n\t\t$name = $array . \"[\" . $name . \"]\";\n\t}\n\n\t$id = 'radio_yn' . $name . $array;\n\n\t$html = \"<div style=\\\"white-space: nowrap;\\\">\";\n\n\tif ($empty) {\n\t\tif ($yes == \"1\") {\n\t\t\t$html .= \"<label for=\\\"either_$id\\\">Either:</label> <input id=\\\"either_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"xxxNULLxxx\\\" $extra>\\n\";\n\t\t\t$html .= \"<label for=\\\"yes_$id\\\">Yes:</label> <input id=\\\"yes_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"$value_y\\\" checked=\\\"checked\\\" $extra />\\n\";\n\t\t\t$html .= \"<label for=\\\"no_$id\\\">No:</label> <input id=\\\"no_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"$value_n\\\" $extra />\\n\";\n\t\t} elseif ($yes == \"0\") {\n\t\t\t$html .= \"<label for=\\\"either_$id\\\">Either:</label> <input id=\\\"either_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"xxxNULLxxx\\\" $extra>\\n\";\n\t\t\t$html .= \"<label for=\\\"yes_$id\\\">Yes:</label> <input id=\\\"yes_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"$value_y\\\" $extra />\\n\";\n\t\t\t$html .= \"<label for=\\\"no_$id\\\">No:</label> <input id=\\\"no_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"$value_n\\\" checked=\\\"checked\\\" $extra />\\n\";\n\t\t} else {\n\t\t\t$html .= \"<label for=\\\"either_$id\\\">Either:</label> <input id=\\\"either_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"xxxNULLxxx\\\" checked=\\\"checked\\\" $extra>\\n\";\n\t\t\t$html .= \"<label for=\\\"yes_$id\\\">Yes:</label> <input id=\\\"yes_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"$value_y\\\" $extra />\\n\";\n\t\t\t$html .= \"<label for=\\\"no_$id\\\">No:</label> <input id=\\\"no_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"$value_n\\\" $extra />\\n\";\n\t\t}\n\t} else {\n\t\tif ($yes) {\n\t\t\t$html .= \"<label for=\\\"yes_$id\\\">Yes:</label> <input id=\\\"yes_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"$value_y\\\" checked=\\\"checked\\\" $extra />\\n\";\n\t\t\t$html .= \"<label for=\\\"no_$id\\\">No:</label> <input id=\\\"no_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"$value_n\\\" $extra />\\n\";\n\t\t} else {\n\t\t\t$html .= \"<label for=\\\"yes_$id\\\">Yes:</label> <input id=\\\"yes_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"$value_y\\\" $extra />\\n\";\n\t\t\t$html .= \"<label for=\\\"no_$id\\\">No:</label> <input id=\\\"no_$id\\\" type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"$value_n\\\" checked=\\\"checked\\\" $extra />\\n\";\n\t\t}\n\t}\n\n\t$html .= \"</div>\";\n\n\treturn $html;\n}", "function option_radiobutton($label, $name, $value='', $keys, $comment='') {\r\n\t\techo \"<tr valign='top'><th scope='row'>\" . $label . \"</th>\";\r\n\t\techo \"<td>\";\r\n\r\n\t\tforeach ((array)$keys as $key => $description) {\r\n\t\t\tif ($key == $value)\r\n\t\t\t\t$checked = \"checked\";\r\n\t\t\telse\r\n\t\t\t\t$checked = \"\";\r\n\t\t\techo \"<input type='radio' id='$name' name='$name' value='\" . htmlentities($key, ENT_QUOTES, 'UTF-8') . \"' $checked />\" . $description . \"<br>\";\r\n\t\t}\r\n\t\techo $comment . \"<br>\";\r\n\t\techo \"</td></tr>\";\r\n\t}", "function mk_radio( $myTitle, $myName, $myValue, $myChek1, $myChek2, $myDesc1, $myDesc2 ){\n\t#initialize needed variables\n\t$str = $chekd1 = $chekd2 = '';\n\n\tif ($myValue == $myChek1) { $chekd1 = \"checked='checked'\"; }else{$chekd2 = \"checked='checked'\";}\n\n\t$str .= '<div class=\"row hoverHighlight\">\n\t\t\t<div class=\"col-sm-3 text-right text-muted\">\n\t\t\t\t<p class=\"text-right\">\n\t\t\t\t\t<strong>' . ucwords($myTitle) . ': </strong>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<div class=\"col-sm-9\">\n\t\t\t\t<p>';\n\t\t\t\t$str .= \"<label>\n\t\t\t\t\t<input type='radio' value='{$myChek1}' name='{$myName}' {$chekd1}> &nbsp; {$myDesc1} &nbsp; &nbsp; </label>\n\t\t\t\t\t<input type='radio' value='{$myChek2}' name='{$myName}' {$chekd2}> &nbsp; {$myDesc2} </label>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</div>\";\n\n\treturn $str;\n}", "function ipal_make_instructor_form(){\r\nglobal $ipal;\r\n$myform=\"<form action=\\\"?\".$_SERVER['QUERY_STRING'].\"\\\" method=\\\"post\\\">\\n\";\r\n\t$myform .= \"\\n\";\r\n\t\tforeach(ipal_get_questions() as $items){\r\n$myform .= \"<input type=\\\"radio\\\" name=\\\"question\\\" value=\\\"\".$items['id'].\"\\\" />\";\r\n\r\n$myform .=\"<a href=\\\"show_question.php?qid=\".$items['id'].\"&id=\".$ipal->id.\"\\\" target=\\\"_blank\\\">[question]</a>\";\r\n$myform .= \"<a href=\\\"standalone_graph.php?id=\".$items['id'].\"&ipalid=\".$ipal->id.\"\\\" target=\\\"_blank\\\">[graph]</a>\".$items['question'].\"<br /><br />\\n\";\r\n\t\t}\r\nif(ipal_check_active_question()){\r\n\t$myform .= \"<input type=\\\"submit\\\" value=\\\"Send Question\\\" />\\n</form>\\n\";\r\n}else{\r\n$myform .= \"<input type=\\\"submit\\\" value=\\\"Start Polling\\\" />\\n</form>\\n\";}\r\n\r\n\treturn($myform);\r\n}", "function form_radio($name, $value, $start='', $extra='', $array='', $id='') {\n\n\t$value = html_form_escape($value, $override);\n\n\tif ($array != \"\") {\n\t\t$name = $array . \"[\" . $name . \"]\";\n\t}\n\n\tif (!$id) {\n\t\t$id = $name;\n\t}\n\n\tif ($start) {\n\t\treturn \"<input type=\\\"radio\\\" name=\\\"$name\\\" id=\\\"$id\\\" value=\\\"$value\\\" checked=\\\"checked\\\" $extra />\";\n\t} else {\n\t\treturn \"<input type=\\\"radio\\\" name=\\\"$name\\\" id=\\\"$id\\\" value=\\\"$value\\\" $extra />\";\n\t}\n}", "public function create()\n {\n $buttons = [\n [\n \"name\" => \"舍得茶馆\",\n \"sub_button\" => [\n [\n \"type\" => \"view\",\n \"name\" => \"节目预告\",\n \"url\" => \"http://www.soso.com/\"\n ],\n [\n \"type\" => \"view\",\n \"name\" => \"在线购票\",\n \"url\" => \"http://ming.cure4.net/getseats/1\"\n ],\n [\n \"type\" => \"view\",\n \"name\" => \"往期集锦\",\n \"url\" => \"http://v.qq.com/\"\n ],\n ],\n ],\n ];\n// $buttons = [\n// [\n// \"type\" => \"click\",\n// \"name\" => \"茶文雅集\",\n// \"key\" => \"CHA_WEN_YA_JI\",\n// \"sub_button\" => [\n// [\n// \"type\" => \"view\",\n// \"name\" => \"敬请期待\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// [\n// \"type\" => \"view\",\n// \"name\" => \"敬请期待\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n//// [\n//// \"type\" => \"view\",\n//// \"name\" => \"微杂志\",\n//// \"url\" => \"http://www.soso.com/\"\n//// ],\n//// [\n//// \"type\" => \"view\",\n//// \"name\" => \"掌柜说\",\n//// \"url\" => \"http://v.qq.com/\"\n//// ],\n//// [\n//// \"type\" => \"click\",\n//// \"name\" => \"文章搜索\",\n//// \"key\" => \"V1001_GOOD\"\n//// ],\n// ],\n//\n// ],\n// [\n// \"type\" => \"click\",\n// \"name\" => \"舍得茶馆\",\n// \"key\" => \"SHE_DE_CHA_GUAN\",\n// \"sub_button\" => [\n// [\n// \"type\" => \"view\",\n// \"name\" => \"节目预告\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// [\n// \"type\" => \"view\",\n// \"name\" => \"在线购票\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// [\n// \"type\" => \"view\",\n// \"name\" => \"往期集锦\",\n// \"key\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// ],\n// ],\n// [\n// \"type\" => \"click\",\n// \"name\" => \"茗品荟萃\",\n// \"key\" => \"MING_PIN_HUI_CUI\",\n// \"sub_button\" => [\n// [\n// \"type\" => \"view\",\n// \"name\" => \"敬请期待\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n// [\n// \"type\" => \"view\",\n// \"name\" => \"敬请期待\",\n// \"url\" => \"http://ming.cure4.net/getseats/1\"\n// ],\n//// [\n//// \"type\" => \"view\",\n//// \"name\" => \"在线商城\",\n//// \"url\" => \"http://www.soso.com/\"\n//// ],\n//// [\n//// \"type\" => \"view\",\n//// \"name\" => \"本月推荐\",\n//// \"url\" => \"http://v.qq.com/\"\n//// ],\n//// [\n//// \"type\" => \"click\",\n//// \"name\" => \"寻茶记\",\n//// \"key\" => \"V1001_GOOD\"\n//// ],\n// ],\n// ],\n// ];\n $this->menu->add($buttons);\n }", "function buildQuiz() {\n for ($i = 0; $i <= 9; $i++) {\n $randomNumbers = getRandomNumbers();\n $correctAnswer = getCorrectAnswer($randomNumbers);\n $answers = getRandomAnswers($correctAnswer);\n $quiz[] = [\n \"leftAdder\" => $randomNumbers[0],\n \"rightAdder\" => $randomNumbers[1],\n \"correctAnswer\" => $correctAnswer,\n \"firstIncorrectAnswer\" => $answers[0],\n \"secondIncorrectAnswer\" => $answers[1],\n ];\n }\n return $quiz;\n}", "function radio_button($object, $field, $tag_value, $options = array()) {\n $form = new FormHelper($object, $field);\n return $form->to_radio_button_tag($tag_value, $options);\n}", "function tep_mod_select_option($select_array, $key_name, $key_value) {\n reset($select_array);\n while (list($key, $value) = each($select_array)) {\n if (is_int($key)) $key = $value;\n $string .= '<br><input type=\"radio\" name=\"configuration[' . $key_name . ']\" value=\"' . $key . '\"';\n if ($key_value == $key) $string .= ' CHECKED';\n $string .= '> ' . $value;\n }\n\n return $string;\n}", "protected function generateButtons() {}", "function acf_get_radio_input($attrs = array())\n{\n}", "public function testRadioGroup()\n {\n $form = new class extends Formulaic\\Post {};\n $form[] = (new Formulaic\\Radio\\Group(\n 'test',\n [1 => 'foo', 2 => 'bar']\n ))->isRequired();\n yield assert($form->valid() != true);\n $_POST['test'] = 1;\n $form = new class extends Formulaic\\Post {};\n $form[] = (new Formulaic\\Radio\\Group(\n 'test',\n [1 => 'foo', 2 => 'bar']\n ))->isRequired();\n yield assert($form->valid());\n yield assert(\"$form\" == <<<EOT\n<form action=\"\" method=\"post\">\n<div>\n<label for=\"test-1\"><input checked id=\"test-1\" name=\"test\" required=\"1\" type=\"radio\" value=\"1\"> foo</label>\n<label for=\"test-2\"><input id=\"test-2\" name=\"test\" required=\"1\" type=\"radio\" value=\"2\"> bar</label>\n</div>\n</form>\nEOT\n );\n }", "public function generate($name, $value, $attributes = array()) {\r\n\t\t$this->init($name, $value, $attributes);\r\n\t\t\r\n\t\t$vmode = false;\r\n\t\tif(isset($this->attributes['vmode'])){\r\n\t\t\t$vmode = $this->attributes['vmode'];\r\n\t\t\tunset($this->attributes['vmode']);\r\n\t\t}\r\n\r\n\t\t$attTmp = array();\r\n\t\t$attTmp['name'] = $name;\r\n\t\t$attTmp['type'] = 'radio';\r\n\t\t\r\n\t\tif(isset($this->attributes['disabled']) && $this->attributes['disabled']){\r\n\t\t\t$attTmp['disabled'] = 'disabled';\t\r\n\t\t}\r\n\t\t// @TODO this not work corectlly in IE\r\n\t\tif(isset($this->attributes['readonly']) && $this->attributes['readonly']){\r\n\t\t\t$attTmp['onclick'] = 'return false';\r\n\t\t}\r\n\r\n\t\t$tmp = '';\r\n\t\t$check = false;\r\n\t\tforeach ($this->data as $val => $txt){\r\n\t\t $attTmp['id'] = uniqid();\r\n\t\t\t$attTmp['value'] = $val;\r\n\t\t\t\r\n\t\t\tif($value == $val || (!$value && !$check)){\r\n\t\t\t\t$attTmp['checked'] = 'checked';\r\n\t\t\t\t$check = true;\r\n\t\t\t}\r\n\t\t\t$tmp .= BASIC_GENERATOR::init()->element('div', 'style='.(!$vmode ? '' : '').'|class=radioBox_Item',//float:left|\r\n\t\t\t\tBASIC_GENERATOR::init()->createCloseTag('input', $attTmp).' <label for=\"'.$attTmp['id'].'\" class=\"radioBox_label\">'.$txt.'</label>'\r\n\t\t\t);\r\n\t\t\tunset($attTmp['checked']);\r\n\t\t}\r\n\t\t$this->attributes = BASIC_GENERATOR::init()->convertStringAtt($this->attributes);\r\n\t\tif(isset($this->attributes['id'])){\r\n\t\t\t$name = $this->attributes['id'];\r\n\t\t}\r\n\t\tif(isset($this->attributes['class'])){\r\n\t\t\t$this->attributes['class'] .= ' radioBox '.$name;\r\n\t\t}else{\r\n\t\t\t$this->attributes['class'] = 'radioBox '.$name;\r\n\t\t}\r\n\t\treturn BASIC_GENERATOR::init()->element('div', $this->attributes, $tmp);\r\n\t}", "function radioButtonList($name,$values,$labels,$selected=\"\",$ids)\n\t{\n\t\t$name = $name;\n\n\t\t$str = '<div class=\"radioButton-list\" >';\n\n\t\tfor($i = 0; $i < sizeof($values); $i++){\n\t\t\tif($values[$i] == $selected){\n\t\t\t\t$str .= FormComponent::radioButton($name, $values[$i], $values[$i], $ids[$i], $labels[$i]);\n\t\t\t}else{\n\t\t\t\t$str .= FormComponent::radioButton($name, $values[$i], \"\", $ids[$i], $labels[$i]);\n\t\t\t}\n\t\t}\n\n\t\t$str .= '</div>';\n\n\t\treturn $str;\n\t}", "function create_mcq($question_set, $question_text, $answer_list, $answer_key) {\n $question = array();\n $question['type'] = '1';\n $question['answer_list'] = $answer_list;\n $question['answer_key'] = $answer_key;\n $question_set['el_set'][] = $question;\n return $question_set;\n}", "public function callback_radio( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n $html = '<fieldset>';\n\n foreach ( $args['options'] as $key => $label ) {\n $html .= sprintf( '<label for=\"wpuf-%1$s[%2$s]\">', $name_id, $key );\n $html .= sprintf( '<input type=\"radio\" class=\"radio\" id=\"wpuf-%1$s[%2$s]\" name=\"%1$s\" value=\"%2$s\" %3$s %4$s/>', $name_id, $key, checked( $value, $key, false ), $disable );\n $html .= sprintf( '%1$s</label><br>', $label );\n }\n\n $html .= $this->get_field_description( $args );\n $html .= '</fieldset>';\n\n echo $html;\n }", "function displayTheQuestions($questions) {\n\tif (count($questions) > 0) {\n\t\tforeach ($questions as $key => $value) {\n\t\t\techo \"<b>$value[0]</b><br/><br/>\";\n\t\t\t\n\t\t\t// Break the choices appart into a choice array\n\t\t\t$choices = explode(\",\",$value[1]);\n\t\t\t\n\t\t\t// For each choice, create a radio button as part of that questions radio button group\n\t\t\t// Each radio will be the same group name (in this case the question number) and have\n\t\t\t// a value that is the first letter of the choice.\n\t\t\t\n\t\t\tforeach($choices as $value) {\n\t\t\t\t$letter = substr(trim($value),0,1);\n\t\t\t\techo \"<input type=\\\"radio\\\" name=\\\"$key\\\" value=\\\"$letter\\\">$value<br/>\";\n\t\t\t}\n\t\t\t\n\t\t\techo \"<br/>\";\n\t\t}\n\t}\n\telse { echo \"No questions to display.\"; }\n}", "function drawMultiRadioBoxes($baseName,$selectedItem, $items, $valueColumnName, $titleColumnName, $options=null) {\n\n\t\t$sortBy = $options['sortBy'];\n\t\tif (!$sortBy)\n\t\t\t$sortBy = 'value';\n\t\t\n\t\t$optionType = $options['type'];\n\t\tif ($optionType=='radio' or empty($optionType)) {\n\t\t\t$optionType = 'radio';\n\t\t} else {\n\t\t\t$baseName.='[]';\n\t\t}\n\t\t\n\t\t//echo $optionType;\n\t\t\n\t\tif (!is_array($selectedItem))\n\t\t\t$selectedItems[] = $selectedItem;\n\t\telse\n\t\t\t$selectedItems = $selectedItem;\n\t\t\n\t\t$displayMode = $options['displayMode'];\n\t\tif (!$displayMode)\n\t\t\t$displayMode = 'table';\n\t\t\n\t\t$template['table'] = array(\n\t\t\t'mainWrapper' => '<table %wrapperAttributes%>%contents%</table>',\n\t\t\t'contents' => '<tr>%fields%</tr>',\n\t\t\t'fields' => '<td>%field%</td>',\n\t\t\t'defaultAttributes' => array(\n\t\t\t\t'border' => 0,\n\t\t\t),\n\t\t);\n\t\t$template['normal'] = array(\n\t\t\t'mainWrapper' => '<p>%contents%</p>',\n\t\t\t'contents' => '%fields%',\n\t\t\t'fields' => '%field%<br />',\n\t\t\t'defaultAttributes' => array(\n\t\t\t\t'border' => 0,\n\t\t\t),\n\t\t);\n\t\t\n\t\tif (is_array($options[$displayMode])){\n\t\t\t$attributes = array_merge($template[$displayMode]['defaultAttributes'], $options[$displayMode]);\n\t\t\t$wrapperAttributes = cmfcHtml::attributesToHtml($attributes);\n\t\t}\n\t\telseif (is_string($options[$displayMode]))\n\t\t\t$wrapperAttributes = $options[$displayMode];\n\t\t\n\t\tif (is_array($options['inputAttributes']))\n\t\t\t$inputAttributes = cmfcHtml::attributesToHtml($options['inputAttributes']);\n\t\telseif (is_string($options['inputAttributes']))\n\t\t\t$inputAttributes = $options['inputAttributes'];\n\t\t\n\t\t$numColumns = $options['columns'];\n\t\tif (!$numColumns)\n\t\t\t$numColumns = 5;\n\t\t\n\t\tif (is_string($items)){\n\t\t\t$items = cmfcMySql::getRowsCustom($items);\n\t\t}\n\t\t\n\t\t$counter = 0;\n\t\t$contents = '';\n\t\tif (is_array($items)){\n\t\t\t//cmfcHtml::printr($items);\n\t\t\tswitch ($sortBy){\n\t\t\tcase 'title':\n\t\t\t\t$items = cmfcArray::sortItems($items, $titleColumnName, 'asc');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'value':\n\t\t\t\t$items = cmfcArray::sortItems($items, $valueColumnName, 'asc');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$items = cmfcArray::sortItems($items, $valueColumnName, 'asc');\n\t\t\t}\n\t\t\t//cmfcHtml::printr($items);\n\t\t\t//cmfcHtml::printr( $options);\n\t\t\tforeach ($items as $item) {\n\t\t\t\t//cmfcHtml::printr($item);\n\t\t\t\t//echo $numColumns;\n\t\t\t\t$counter ++;\n\t\t\t\t\n\t\t\t\tif (in_array($item[$valueColumnName], $selectedItems) )\n\t\t\t\t\t$checked='checked=\"checked\"';\n\t\t\t\telse \n\t\t\t\t\t$checked='';\n\t\t\t\t\n\t\t\t\tif (in_array($optionType, array('checkbox', 'radio')) ){\n\t\t\t\t\t$value = $item[$valueColumnName];\n\t\t\t\t\t$field = '<input '.$inputAttributes.\n\t\t\t\t\t\t'name=\"'.$baseName.'\" id=\"'.$baseName.$counter.'\" type=\"'.$optionType.'\" value=\"'.$value.'\" '.$checked.'>&nbsp;<label for=\"'.$baseName.$counter.'\">';\n\t\t\t\t\t\n\t\t\t\t\tif(is_array($options['strongItems']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(in_array($value, $options['strongItems'])) {\n\t\t\t\t\t\t\t$itemTitleColumnName = \"<b>\".$item[$titleColumnName].\"</b>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$itemTitleColumnName = $item[$titleColumnName];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$itemTitleColumnName = $item[$titleColumnName];\n\t\t\t\t\t}\n\t\t\t\t\t$field .= $itemTitleColumnName;\n\t\t\t\t\t$field .= '</label>';\n\t\t\t\t}\n\t\t\t\telseif ($optionType == 'custom'){\n\t\t\t\t\tif ($checked)\n\t\t\t\t\t\t$tag = $options['tag']['selected'];\n\t\t\t\t\telse\n\t\t\t\t\t\t$tag = $options['tag']['notSelected'];\n\t\t\t\t\t\n\t\t\t\t\t$value = $item[$titleColumnName];\n\t\t\t\t\t$tag = str_replace('%value%', $value, $tag);\n\t\t\t\t\t$tag = str_replace('%inputAttributes%', $inputAttributes, $tag);\n\t\t\t\t\t\n\t\t\t\t\t$field = $tag;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= str_replace('%field%', $field, $template[$displayMode]['fields']);\n\t\t\t\t\n\t\t\t\tif ($counter % $numColumns == 0) {\n\t\t\t\t\t$contents .= str_replace('%fields%', $html, $template[$displayMode]['contents']);\n\t\t\t\t\t$html = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($html){\n\t\t\t\t$contents .= str_replace('%fields%', $html, $template[$displayMode]['contents']);\n\t\t\t}\n\t\t\t$result = str_replace('%contents%', $contents, $template[$displayMode]['mainWrapper']);\n\t\t}\n\t\telse{\n\t\t\t$result = 'no valid items';\n\t\t}\n\t\treturn $result;\n\t}", "private function build_radio_field($_meta, $_ptype = \"wccpf\", $_class = \"\", $_index, $_show_as_value = \"no\", $_readonly = \"\", $_cloneable = \"\", $_wrapper = true, $_has_pricing_rules = \"no\") {\r\n $html = ''; \r\n $has_field_rules = isset( $_meta[\"field_rules\"] ) && is_array( $_meta[\"field_rules\"] ) && count( $_meta[\"field_rules\"] ) != 0 ? \"yes\" : \"no\";\r\n if ($_show_as_value == \"no\") {\r\n /* For admin field, we don't need <ul> wrapper */\r\n if ($_ptype != \"wccaf\") {\r\n $html = '<ul class=\"' . ((isset($_meta['layout']) && $_meta['layout'] == \"horizontal\") ? \"wccpf-field-layout-horizontal\" : \"wccpf-field-layout-vertical\") . '\" ' . $_cloneable . '>';\r\n }\r\n $choices = explode(\";\", ((isset($_meta[\"choices\"]) && ! empty($_meta[\"choices\"])) ? $_meta[\"choices\"] : \"\"));\r\n $_meta[\"default_value\"] = (isset($_meta[\"default_value\"]) && ! empty($_meta[\"default_value\"])) ? trim($_meta[\"default_value\"]) : \"\";\r\n foreach ($choices as $choice) {\r\n $attr = '';\r\n $key_val = explode(\"|\", $choice);\r\n /* It has to be two items ( Value => Label ), otherwise don't proceed */\r\n if (count($key_val) == 2) {\r\n if ($_ptype != \"wccaf\") {\r\n /* Since version 2.0.0 - Default value will be absolute value not as key|val pair */\r\n if (strpos($_meta[\"default_value\"], \"|\") !== false) {\r\n /* Compatibility for <= V 1.4.0 */\r\n if ($choice == $_meta[\"default_value\"]) {\r\n $attr = 'checked=\"checked\"';\r\n }\r\n } else {\r\n /*\r\n * For product fields from V 2.0.0\r\n * For admin fields, which will be displyed as Product Fields\r\n */\r\n if ($key_val[0] == $_meta[\"default_value\"]) {\r\n $attr = 'checked=\"checked\"';\r\n }\r\n }\r\n } else {\r\n if ($key_val[0] == $_meta[\"value\"]) {\r\n $attr = 'checked=\"checked\"';\r\n }\r\n }\r\n /* For admin field, we don't need <li></li> wrapper */\r\n $html .= (($_ptype != \"wccaf\") ? '<li>' : '') . '<label class=\"wcff-option-wrapper-label\"><input type=\"radio\" data-has_field_rules=\"'.$has_field_rules.'\" data-has_pricing_rules=\"'.$_has_pricing_rules.'\" data-fkey=\"'. $_meta[\"key\"] .'\" class=\"' . $_ptype . '-field ' . $_class . '\" name=\"' . esc_attr($_meta[\"key\"] . $_index) . '\" value=\"' . esc_attr(trim($key_val[0])) . '\" ' . $attr . ' data-field-type=\"'. $_meta[\"type\"] .'\" ' . $_ptype . '-pattern=\"mandatory\" ' . $_ptype . '-mandatory=\"' . $_meta[\"required\"] . '\" ' . $_readonly . ' /> ' . esc_html(trim($key_val[1])) . '</label>' . (($_ptype != \"wccaf\") ? '</li>' : '');\r\n }\r\n }\r\n /* For admin field, we don't need <ul> wrapper */\r\n $html .= ($_ptype != \"wccaf\") ? '</ul>' : '';\r\n } else {\r\n /*\r\n * Show the raw value instead of as a field\r\n * Used for the Admin Field showing on product page\r\n */\r\n $html = '<p class=\"wcff-wccaf-value-para-tag\">' . $_meta[\"default_value\"] . '</p>';\r\n }\r\n /* Add wrapper around the field, based on the user options */\r\n if ($_wrapper) {\r\n $html = $this->built_field_wrapper($html, $_meta, $_ptype, $_index);\r\n }\r\n return $html;\r\n }", "function acf_radio_input($attrs = array())\n{\n}", "public static function init($arr)\n {\n //print_r($arr);\n //exit;\n self::makeFormString($arr);\n }", "function buildQuickForm( ) {\n // and the grades\n require_once 'School/Utils/Conference.php';\n $details = School_Utils_Conference::getReminderDetails( );\n $string = array();\n foreach ( $details as $name => $grade ) {\n $string[] = \"{$name} (Grade: {$grade})\";\n }\n $this->assign( 'conferenceTeachers',\n implode( ', ', $string ) );\n\n $this->addButtons(array( \n array ( 'type' => 'refresh', \n 'name' => ts( 'Send Reminder' ),\n 'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', \n 'isDefault' => true ), \n array ( 'type' => 'cancel', \n 'name' => ts('Cancel') ), \n )\n );\n }", "function createQuickReplies ($title, $arr) {\n $i = 0;\n $qrs = array ();\n foreach ($arr as $key => $value) {\n $i = $i + 1;\n if ($i > 10) {\n break;\n }\n array_push($qrs, array (\n \"content_type\" => \"text\",\n \"title\" => (strlen($key) > 19) ? substr($key,0,16).'...' : $key,\n \"payload\" => $value\n ));\n }\n\n $bot_resp = array ();\n $bot_resp['text'] = $title;\n $bot_resp['quick_replies'] = $qrs;\n return $bot_resp;\n }", "protected function buildRadio($row) {\n\t\tif (!$this->filled) $$row['Default'] = \" checked='checked'\";\n\t\t$vals = explode (',',$row['values']);\n\t\tforeach ($vals as $value) {\n\t\t\tif ($pos = strpos($value,\"=ON\")) {\n\t\t\t\t$value = substr($value,0,$pos);\n\t\t\t\t$$value = \" checked='checked'\";\n\t\t\t}\n\t\t\t$elem .= sprintf(\"<input type='radio' name='%s' value='%s'%s />%s<br />\\n\",$row['Field'],$value,$$value,$value);\n\t\t}\n\t\treturn $elem;\n\t}", "function FormAsseretion(){\r\n $creat = new UIMAP_createFormPage();\r\n \r\n $this->assertElementPresent($creat->formName());\r\n $this->assertElementPresent($creat->formLanguige());\r\n for($i = 1; $i < 4; $i++){\r\n $this->assertElementPresent($creat->formRespuniqtype($i));\r\n }\r\n $this->assertElementPresent($creat->submitButton());\r\n }", "private function quiz_generate($data_quiz_src) {\n // extract all possible answer\n $all_possible_answer = array();\n foreach ($data_quiz_src as $single_quiz) {\n $all_correct_answer = explode('|', $single_quiz['correct_answer']);\n $all_possible_answer[] = $all_correct_answer[0];\n }\n\n $out = array();\n $index = 0;\n foreach ($data_quiz_src as $single_quiz) {\n shuffle($all_possible_answer);\n\n $single_quiz['all_correct_answer'] = explode('|', $single_quiz['correct_answer']);\n\n $single_quiz['possible_answer'] = array($single_quiz['all_correct_answer'][0]);\n\n $single_quiz['response_type'] = !empty($single_quiz['response_type']) ? $single_quiz['response_type'] : $this->configuration['default_response_type'];\n\n // add wrong answer to $possible_answer from input data\n if (isset($single_quiz[\"wrong_answer\"])) {\n $possible_wrong_answer = explode('|', $single_quiz[\"wrong_answer\"]);\n\n //remove eventually emtpy element\n $single_quiz['possible_answer'] = array_filter($single_quiz['possible_answer']);\n\n\n $single_quiz['possible_answer'] = array_merge($single_quiz['possible_answer'], $possible_wrong_answer);\n }\n\n // add random wrong answer to $possible_answer\n $single_quiz['possible_answer'] = array_merge($single_quiz['possible_answer'], $all_possible_answer);\n\n // eliminate duplicates\n $single_quiz['possible_answer'] = array_unique($single_quiz['possible_answer']);\n\n //remove eventually emtpy element\n $single_quiz['possible_answer'] = array_filter($single_quiz['possible_answer']);\n\n //get only the correct number of elements:\n $single_quiz['response_type'] = strtolower($single_quiz['response_type']);\n $option_array = explode('_', $single_quiz['response_type']);\n if (isset($option_array[1])) {\n $max_option = $option_array[1];\n $single_quiz['response_type'] = $option_array[0];\n } else {\n $max_option = $this->configuration['num_options'];\n }\n\n $single_quiz['possible_answer'] = array_slice($single_quiz['possible_answer'], 0, $max_option);\n\n // shuffle all data:\n shuffle($single_quiz['possible_answer']);\n\n $single_quiz['all_question'] = explode('|', $single_quiz['question']);\n\n // remove all empty values \n $single_quiz['all_question'] = array_filter($single_quiz['all_question']);\n\n shuffle($single_quiz['all_question']);\n\n $single_quiz['question'] = $single_quiz['all_question'][0];\n\n\n // add id of the correct_answer to correct answer if the answer_type is 'options' \n if ($single_quiz['response_type'] == \"options\") {\n $key = array_search($single_quiz['all_correct_answer'][0], $single_quiz['possible_answer']);\n $single_quiz['all_correct_answer'][] = $key;\n }\n\n\n $output_keys = array(\n 'id',\n 'question',\n 'all_correct_answer',\n 'possible_answer',\n 'response_type',\n 'if_correct',\n 'if_wrong'\n );\n\n\n $out[$index] = array();\n foreach ($output_keys as $single_key) {\n\n $out[$index][$single_key] = isset($single_quiz[$single_key]) ? $single_quiz[$single_key] : \"\";\n }\n\n $index ++;\n }\n return $out;\n }", "function radio($name='',$value='',$id='',$attrib='',$rows=''){\n\t\t$n = ''; \n\t\t$brekz = 0;\n\t\t$fldname = str_replace(' ', '_', $name);\n\t\t$radio = '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>';\n\t\tif(isset($_SESSION[$fldname])) $n = $_SESSION[$fldname];\n\t\tif(isset($_POST[$fldname])) $n = $_POST[$fldname]; \n\t\tif(empty($rows)){\n\t\t\t$rows = 4;\n\t\t}\n\t\tforeach($value as $radVal){\n\t\t\t$cndtn = ($n == $radVal)? 'checked=\"checked\"' : '';\n\t\t\tif($brekz == $rows) {\n\t\t\t\t$radio .= '</tr><tr>';\n\t\t\t\t$brekz = 0; \n\t\t\t}\n\t\t\t$radio .= '<td><input type=\"radio\" name=\"'.$fldname.'\" value=\"'.$radVal.'\" '.$cndtn.' id=\"'.$id.'\" '.$attrib.'>'.'<span style=\"font-weight:normal; color:#000;\">'.$radVal.'</span></td>'.\"\\n\";\n\t\t\t$brekz++;\n\t\t}\n\t\t$radio .= \"</tr></table>\";\n\t\techo $radio;\n\t}", "function ffw_port_radio_callback( $args ) {\n global $ffw_port_settings;\n\n foreach ( $args['options'] as $key => $option ) :\n $checked = false;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) && $ffw_port_settings[ $args['id'] ] == $key )\n $checked = true;\n elseif( isset( $args['std'] ) && $args['std'] == $key && ! isset( $ffw_port_settings[ $args['id'] ] ) )\n $checked = true;\n\n echo '<input name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"\" id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\" type=\"radio\" value=\"' . $key . '\" ' . checked(true, $checked, false) . '/>&nbsp;';\n echo '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\">' . $option . '</label><br/>';\n endforeach;\n\n echo '<p class=\"description\">' . $args['desc'] . '</p>';\n}", "function miradio($name, $opts, $form = array()) {\n\t$output = \"\";\n\tforeach ($opts as $key => $content) {\n\t\tif (isset($form[$name]) && $form[$name] == $key) {\n\t\t\t// this is the default\n\t\t\t$checked = \"checked=\\\"checked\\\" \";\n\t\t} else {\n\t\t\t$checked = \"\";\n\t\t}\n\t\tif (empty($output)) { // first row\n\t\t\t$output .= \"<input type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"$key\\\" $checked/>$content [{\" . $name . \"_MOD}]<br />\";\n\t\t} else {\n\t\t\t$output .= \"<input type=\\\"radio\\\" name=\\\"$name\\\" value=\\\"$key\\\" $checked/>$content<br />\";\n\t\t}\n\t}\n\n\treturn $output;\n}", "private function radioCustomField(): string\n {\n $value = $this->getValue($this->index);\n foreach($this->options as &$option) {\n if($option['key'] == $value) {\n $option['checked'] = true;\n break;\n }\n }\n\n return Template::build($this->getTemplatePath('radio.html'), [\n 'id' => uniqid(\"{$this->id}-\", true),\n 'name' => $this->id,\n 'label' => $this->label,\n 'options' => $this->options,\n 'index' => isset($this->index) ? $this->index : false\n ]);\n }", "function tep_mod_select_option($select_array, $key_name, $key_value) {\n foreach ( $select_array as $key => $value ) {\n if (is_int($key)) $key = $value;\n $string .= '<br /><input type=\"radio\" name=\"configuration[' . $key_name . ']\" value=\"' . $key . '\"';\n if ($key_value == $key) $string .= ' checked=\"checked\"';\n $string .= ' /> ' . $value;\n }\n\n return $string;\n }", "protected function generateButtons()\n {\n $arrButtons = array();\n\n // Add \"update cart\" button\n $arrButtons['update'] = array(\n 'type' => 'submit',\n 'name' => 'button_update',\n 'label' => $GLOBALS['TL_LANG']['MSC']['updateCartBT'],\n );\n\n // Add button to cart button (usually if not on the cart page)\n if ($this->iso_cart_jumpTo > 0) {\n $objJumpToCart = \\PageModel::findByPk($this->iso_cart_jumpTo);\n\n if (null !== $objJumpToCart) {\n $arrButtons['cart'] = array(\n 'type' => 'submit',\n 'name' => 'button_cart',\n 'label' => $GLOBALS['TL_LANG']['MSC']['cartBT'],\n 'href' => \\Controller::generateFrontendUrl($objJumpToCart->row()),\n );\n\n if (\\Input::post('FORM_SUBMIT') == $this->strFormId && \\Input::post('button_cart') != '') {\n $this->jumpToOrReload($this->iso_cart_jumpTo);\n }\n }\n }\n\n // Add button to checkout page\n if ($this->iso_checkout_jumpTo > 0 && !Isotope::getCart()->hasErrors()) {\n $objJumpToCheckout = \\PageModel::findByPk($this->iso_checkout_jumpTo);\n\n if (null !== $objJumpToCheckout) {\n $arrButtons['checkout'] = array(\n 'type' => 'submit',\n 'name' => 'button_checkout',\n 'label' => $GLOBALS['TL_LANG']['MSC']['checkoutBT'],\n 'href' => \\Controller::generateFrontendUrl($objJumpToCheckout->row()),\n );\n\n if (\\Input::post('FORM_SUBMIT') == $this->strFormId && \\Input::post('button_checkout') != '') {\n $this->jumpToOrReload($this->iso_checkout_jumpTo);\n }\n }\n }\n\n if ($this->iso_continueShopping && $this->Input->get('continue') != '') {\n $arrButtons['continue'] = array(\n 'type' => 'submit',\n 'name' => 'button_continue',\n 'label' => $GLOBALS['TL_LANG']['MSC']['continueShoppingBT'],\n 'href' => ampersand(base64_decode($this->Input->get('continue', true))),\n );\n\n if (\\Input::post('FORM_SUBMIT') == $this->strFormId && \\Input::post('button_continue') != '') {\n \\Controller::redirect($arrButtons['continue']['href']);\n }\n }\n\n return $arrButtons;\n }", "function payroll_combo_cell($name, $selected_id, $array, $submit_on_change = false) {\n echo \"<td>\";\n //echo payroll_combobox($name, $selected_id, $array);\n echo array_selector($name, $selected_id, $array, array(\n 'select_submit' => $submit_on_change\n ));\n echo \"</td>\\n\";\n}", "public function fillQuestion(array $question)\n\t{\n\t\t[$inputMode, $inputExpectation, $notUseful, $from] = explode('_', $question['type']);\n\n\t\tvar_dump($inputMode, $inputExpectation, $notUseful, $from);\n\t\t//var_dump($question['function']['name']);\n\n\t\tif($inputMode == 'type')\n\t\t{\n\t\t\t$question['text'] .= $question['function'][$from] . ' ?';\n\t\t\t$question['answer_text'] = $question['function'][$inputExpectation];\n\t\t}\n\n\t\telseif($inputMode == 'choose')\n\t\t{\n\t\t\t$question['answer_text'] = $question['function'][$inputExpectation];\n\n\t\t\tif($from == 'name')\n\t\t\t{\n\t\t\t\t$question['text'] .= $question['function']['name'] . '() ?';\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\t$question['text'] .= $question['function'][$from] . ' ?';\n\t\t\t}\n\n\t\t\t$question['choices'] = $this->generateChoices($question);\n\n\t\t\t//put correct answer in (by clobbering one of generated choices)\n\t\t\t$randomChoice = array_rand($question['choices']);\n\n\t\t\t$question['choices'][$randomChoice] = $question['answer_text'];\n\t\t\t$question['answer_index'] = $randomChoice;\n\t\t}\n\n\t\t\n\n\t\treturn $question;\n\t}", "protected function buildCheckboxes(array $options)\n {\n return new Checkbox\\RadioGroup($options);\n }", "function display_cynetic($attributes=[]) {\n\n $attributes = array_change_key_case((array)$attributes, CASE_LOWER);\n $lang = $attributes['lang'];\n\n\n $token = oauth2::determineToken();\n $tube_number = oauth2::getData($token, 'tube_number');\n $specimen_collection_number = oauth2::getData($token, 'specimen_collection_number');\n $specimen_collection = [];\n foreach($specimen_collection_number->data as $specimen) {\n $specimen_collection[$specimen->VISIT_TYPE_NAME] = $specimen->SPECIMEN_COLLECTION_NUMBER;\n }\n // Sorting specimens\n $specimen_order = ['D0', 'R0', 'a1', 'a2', 'c1', 'c2', 's1', 's2', 's3'];\n uksort($specimen_collection, function($key1, $key2) use ($specimen_order) {\n return (array_search($key1, $specimen_order) > array_search($key2, $specimen_order));\n });\n\n\n $content = '<hr /><h3>' . __( 'VEUILLEZ SÉLECTIONNER UN TYPE DE GREFFE', 'cynetique-labels' ) . '</h3><br />';\n $content .= '<form id=\"type_selector_form\" autocomplete=\"off\">';\n $content .= '<label id=\"graft1_label\"><input name=\"type_greffe\" id=\"graft1\" data-id=\"1\" checked type=\"radio\"> '. __( 'Donneur non apparenté (DV)', 'cynetique-labels' ) .'</label>';\n $content .= '<label id=\"graft2_label\"><input name=\"type_greffe\" id=\"graft2\" data-id=\"2\" type=\"radio\"> '. __( 'Géno-identique', 'cynetique-labels' ) .'</label>';\n $content .= '<label id=\"graft3_label\"><input name=\"type_greffe\" id=\"graft3\" data-id=\"3\" type=\"radio\"> '. __( 'Haplo-identique', 'cynetique-labels' ) .'</label>';\n $content .= '<label id=\"graft4_label\"><input name=\"type_greffe\" id=\"graft4\" data-id=\"4\" type=\"radio\"> '. __( 'Unité de sang placentaire (USP)', 'cynetique-labels' ) .'</label>';\n $content .= '</form>';\n $content .= '<br />';\n\n $svg_path = plugin_dir_path( __FILE__) . 'svg/cynetique_'.$lang.'.svg';\n $svg_legend_path = plugin_dir_path( __FILE__) . 'svg/cynetique_legend_'.$lang.'.svg';\n $svg_content = file_get_contents($svg_path);\n $svg_content .= file_get_contents($svg_legend_path);\n $content .= $svg_content;\n $content .= '<script>var restData={};</script>';\n $content .= '<div id=\"dataContainer\"></div>';\n\n $current_date = $lang =='fr' ? date('d/m/Y') : date('m/d/Y');\n\n //BILAN DES PRÉLÈVEMENTS\n $content .= '<br /><br />';\n $content .= '<h3>' . __( 'BILAN DES PRÉLÈVEMENTS', 'cynetique-labels' ) . '</h3>';\n $content .= '<table>';\n $content .= '<tr>';\n $content .= '<td>' . __( 'Au', 'cynetique-labels' ) . ' ' . $current_date . '</td>';\n\n foreach($specimen_collection as $key=>$value) {\n $content .= '<td>' . $key . '</td>';\n }\n $content .= '<td>' . __( 'TOTAL', 'cynetique-labels' ) . '</td>';\n $content .= '</tr>';\n $content .= '<tr>';\n $content .= '<td>' . __( 'Nombre de prélèvements', 'cynetique-labels' ) . '</td>';\n $total = 0;\n foreach($specimen_collection as $value) {\n $total += $value;\n $content .= '<td>' . $value . '</td>';\n }\n $content .= '<td>' . $total . '</td>';\n $content .= '</tr>';\n $content .= '</tbody>';\n $content .= '</table>';\n\n\n //BILAN DES RESSOURCES DISPONIBLES\n $content .= '<br /><br />';\n $content .= '<h3>' . __( 'BILAN DES RESSOURCES DISPONIBLES', 'cynetique-labels' ) . '</h3>';\n $content .= '<table>';\n $content .= '<tbody>';\n $content .= '<tr>';\n $content .= '<td>' . __( 'Au', 'cynetique-labels' ) . ' ' . $current_date . '</td>';\n foreach($tube_number->data as $tube) {\n $content .= '<td>' . __( $tube->SA_TY_NA_1210592326, 'cynetique-labels' ) . '</td>';\n }\n $content .= '<td>' . __( 'TOTAL', 'cynetique-labels' ) . '</td>';\n $content .= '</tr>';\n $content .= '<tr>';\n $content .= '<td>' . __( 'Nombre d\\'aliquots', 'cynetique-labels' ) . '</td>';\n $total = 0;\n foreach($tube_number->data as $tube) {\n $nb_tube = $tube->TUBE_NUMBER;\n $total += $nb_tube;\n $content .= '<td>' . $nb_tube . '</td>';\n }\n $content .= '<td>' . $total . '</td>';\n $content .= '</tr>';\n $content .= '</tbody>';\n $content .= '</table>';\n\n //$content .= '<hr /><pre>' . print_r($specimen_collection_number->data, true) . '</pre>';\n\n/*\n $other_label1 = __( 'Plasma', 'cynetique-labels' ) ;\n $other_label2 = __( 'Culot cellulaire', 'cynetique-labels' ) ;\n $other_label3 = __( 'Cellules DMSO', 'cynetique-labels' );\n $other_label4 = __( 'ADN', 'cynetique-labels' );\n*/\n\n return $content;\n}", "function minorite_radio($variables) {\n $element = $variables['element'];\n $element['#attributes']['type'] = 'radio';\n element_set_attributes($element, array('id', 'name', '#return_value' => 'value'));\n\n if (isset($element['#return_value']) && $element['#value'] !== FALSE && $element['#value'] == $element['#return_value']) {\n $element['#attributes']['checked'] = 'checked';\n }\n _form_set_class($element, array('form-custom-radio'));\n\n drupal_add_js(\"\n jQuery('.form-custom-radio').iCheck({\n checkboxClass: 'icheckbox_square-blue',\n radioClass: 'iradio_square-blue',\n increaseArea: '20%' // optional\n });\", array('type' => 'inline', 'scope' => 'footer', 'group' => JS_THEME));\n\n return '<label for=\"' . $element['#id'] . '\"><input' . drupal_attributes($element['#attributes']) . '><span>' . $element['#title'] . '</span></label>';\n}", "function getGeneratedQuestions() {\n $generatedQuestions = [];\n\n // for the generated questions, let's make the total 12\n for ($i = 0; $i < 12; $i++) {\n\n // create the queston attributes\n $leftAdder = mt_rand(0 , 100);\n\n $rightAdder;\n do {\n $rightAdder = mt_rand(0 , 100);\n } while ($rightAdder === $leftAdder);\n\n $correctAnswer = $leftAdder + $rightAdder;\n\n $firstIncorrectAnswer;\n do {\n $firstIncorrectAnswer = mt_rand($correctAnswer - 10, $correctAnswer + 10);\n } while ($firstIncorrectAnswer === $correctAnswer);\n\n $secondIncorrectAnswer;\n do {\n $secondIncorrectAnswer = mt_rand($correctAnswer - 10, $correctAnswer + 10);\n } while (\n $secondIncorrectAnswer === $correctAnswer || \n $secondIncorrectAnswer === $firstIncorrectAnswer\n );\n\n // cast to object to mimic json file\n $generatedQuestions[] = (object)[\n \"leftAdder\" => $leftAdder,\n \"rightAdder\" => $rightAdder,\n \"correctAnswer\" => $correctAnswer,\n \"firstIncorrectAnswer\" => $firstIncorrectAnswer,\n \"secondIncorrectAnswer\" => $secondIncorrectAnswer \n ];\n }\n\n return $generatedQuestions;\n}", "function genSubmitRow(){\n\t\t$row = array();\n\t\tarray_pad($row, sizeof($this->table[0]), '');\n\n\t\tif($this->state->isNewEntry()){\n\t\t\t$textField = 'text';\n\t\t\t$row[0] = $this->translator->markupAttributes('input', '',array('type'=>'text', 'name'=>'user'));\n\t\t\t$row[1] = $this->translator->markupAttributes('input','',array('type'=>'submit', 'name'=>'submit', 'value'=>'Submit'));\n\n\n\t\t\tfor($count = 2; $count < sizeof($this->table[0]); $count++) $row[$count] = $this->translator->markupAttributes('input', '',array('type'=>'checkbox', 'name'=>$count));\n\t\t\n\t\t}\n\t\telse{\n\t\t\t$row[0] = '';\n\t\t\t$row[1] = $this->translator->markupAttributes('input','',array('type'=>'submit', 'name'=>'new', 'value'=>'New'));\n\n\t\t\tfor($count = 2; $count < sizeof($this->table[0]); $count++) $row[$count] = '';\n\t\t}\n\n\t\treturn $row;\n\t}", "function tep_cfg_select_option($select_array, $key_value, $key = '') {\n $string = '';\n for ($i = 0, $n = sizeof($select_array); $i < $n; $i++) {\n $name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');\n $string .= '<br><input type=\"radio\" name=\"' . $name . '\" value=\"' . $select_array[$i] . '\"';\n if ($key_value == $select_array[$i]) $string .= ' CHECKED';\n $string .= '> ' . $select_array[$i];\n }\n\n return $string;\n}", "function definition_inner(&$mform) {\n $mform->addElement('advcheckbox', 'shuffleanswers', get_string('shuffle', 'quiz'), null, null, array(0,1));\n $mform->setHelpButton('shuffleanswers', array('matchshuffle', get_string('shuffle','quiz'), 'quiz'));\n $mform->setDefault('shuffleanswers', 1);\n\n $mform->addElement('static', 'answersinstruct', get_string('choices', 'quiz'), get_string('filloutthreequestions', 'quiz'));\n $mform->closeHeaderBefore('answersinstruct');\n\n $repeated = array();\n $repeated[] =& $mform->createElement('header', 'choicehdr', get_string('questionno', 'quiz', '{no}'));\n // change elements to support htmleditor (nadavkav)\n $repeated[] =& $mform->createElement('htmleditor', 'subquestions', get_string('question', 'quiz'), array('cols'=>40, 'rows'=>13));\n $repeated[] =& $mform->createElement('htmleditor', 'subanswers', get_string('answer', 'quiz'), array('cols'=>40, 'rows'=>13));\n\n if (isset($this->question->options)){\n $countsubquestions = count($this->question->options->subquestions);\n } else {\n $countsubquestions = 0;\n }\n $repeatsatstart = (QUESTION_NUMANS_START > ($countsubquestions + QUESTION_NUMANS_ADD))?\n QUESTION_NUMANS_START : ($countsubquestions + QUESTION_NUMANS_ADD);\n $mform->setType('subanswer', PARAM_TEXT);\n $mform->setType('subquestion', PARAM_TEXT);\n\n $this->repeat_elements($repeated, $repeatsatstart, array(), 'noanswers', 'addanswers', QUESTION_NUMANS_ADD, get_string('addmoreqblanks', 'qtype_match'));\n\n }", "function RadioBox($name,$data) {\n\n $content .= \"<table cellspacing=0 cellpadding=0 width=100%>\\n\";\n\n foreach($data as $k => $v) {\n\n if (($k % 2) == 0) {\n\t$content .= my_comma(checkboxlist,\"</td></tr>\").\"<tr><td width=1%>\\n\";\n } else {\n\t$content .= \"</td><td width=1%>\\n\";\n }\n\n if ($v[checked]) {\n\t$content .= \"<input type=radio name=\\\"$name\\\" value=\\\"*\\\" checked></td><td width=49%>$v[text]\\n\";\n } else {\n\t$content .= \"<input type=radio name=\\\"$name\\\" value=\\\"*\\\"></td><td width=49%>$v[text]\\n\";\n }\n }\n\n# echo count($data);\n\n $contemt .= \"</td></tr>\\n\";\n $content .= \"</table>\\n\";\n\n return $content;\n }", "public function radioButtonGroup($items, $options = [])\n {\n return $this->getToggleFieldList(self::TYPE_RADIO, $items, $options, true);\n }", "function social_build_buttons()\n{\n $icon_classes = array(\n 'facebook' => 'fa fa-facebook',\n 'linkedin' => 'fa fa-linkedin',\n 'gplus' => 'fa fa-google-plus',\n 'twitter' => 'fa fa-twitter',\n 'whatsapp' => 'fa fa-whatsapp',\n 'email' => 'fa fa-envelope',\n );\n $link_classes = array(\n 'facebook' => 'vsac-social-facebook',\n 'linkedin' => 'vsac-social-linkedin',\n 'gplus' => 'vsac-social-google',\n 'twitter' => 'vsac-social-twitter',\n 'whatsapp' => 'vsac-social-whatsapp hidden-lg hidden-md',\n 'email' => 'vsac-social-email',\n );\n $labels = array(\n 'facebook' => 'Facebook',\n 'linkedin' => 'LinkedIn',\n 'gplus' => 'Google +',\n 'twitter' => 'Twitter',\n 'whatsapp' => 'WhatsApp',\n 'email' => 'Email',\n );\n $buttons = array();\n foreach (array_keys($icon_classes) as $service) {\n $buttons[$service] = array(\n 'link' => $link_classes[$service],\n 'icon' => $icon_classes[$service],\n 'label' => $labels[$service],\n );\n }\n return $buttons;\n}", "function setTypeAsRadioButtons($itemList) {\n\t\t$this->type = \"radio\";\n\t\t$this->seleu_itemlist = $itemList;\n\t}", "function radio( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null,\n\t $options = array(),\n\t $datatype = Form::DATA_STRING\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_RADIO,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t $options,\n\t $datatype\n );\n\t}", "function _generateSelection()\n {\n $i = 0;\n foreach ($_POST as $key=>$value) {\n echo \"<input type='hidden' name=$key value=$value required>\";\n echo \"<div class='form-group'>\";\n if (isset($value) && $this->\n _childexists($value, $this->_getRubriekFromDb())) {\n echo $this->_generateRubriekVerkoopList($value, $this->_getRubriekFromDb(), \"subrubriek\" . $i);\n echo \"<script type='text/javascript'>\n document.getElementById('$key').disabled = true;\n </script>\";\n }\n echo \"</div>\";\n echo \"<script type='text/javascript'>\n document.getElementById('$key').value= $value \n </script>\";\n $i++;\n }\n }", "function buildVotingInputFields() {\n global $gallery;\n\n $nv_pairs = $gallery->album->getVoteNVPairs();\n $votingInputFieldArray = array();\n for ($i=0; $i<$gallery->album->getPollScale() ; $i++) {\n\t $votingInputFieldArray[] = \"<input type=\\\"text\\\" name=\\\"nv_pairs[$i][name]\\\" value=\\\"\". $nv_pairs[$i][\"name\"] .\"\\\">\";\n\t $votingInputFieldArray[] = \"<input type=\\\"text\\\" name=\\\"nv_pairs[$i][value]\\\" value=\\\"\". $nv_pairs[$i][\"value\"] .\"\\\">\";\n }\n\n return $votingInputFieldArray;\n}", "function funkyfactory($buttons) {\r\n\t\tmyGovHTML :: funkyTableStart();\r\n\t\tforeach ($buttons as $button) {\r\n\t\t\tmyGovHTML :: funkyButton($button['text'], $button['link'], $button['image'], $button['js']);\r\n\t\t}\r\n\t\tmyGovHTML :: funkyTableEnd();\r\n\t}", "function make_action_html() {\n $grading_id = 'grading_' . rand(1,1000000);\n\n // html for actions\n $html = '';\n $html .= '<td class=\"actions hidden-sm hidden-xs no-select\">';\n $html .= '<div class=\"btn-group grading-actions\">';\n $html .= '<label class=\"btn btn-sm btn-default\"><input type=\"radio\" class=\"js-grading-pass\" name=\"' . $grading_id . '\" value=\"1\" autocomplete=\"off\">Attended</label>';\n $html .= '<label class=\"btn btn-sm btn-default\"><input type=\"radio\" class=\"js-grading-fail\" name=\"' . $grading_id . '\" value=\"0\" autocomplete=\"off\">No Show</label>';\n\n $html .= '</div>';\n $html .= '</td>';\n\n return $html;\n}", "public function createAuto($array)\n {\n }", "public function get_submission_buttons() {\n return array(\n 'save',\n 'savecont',\n 'savenew',\n 'savecontnew',\n 'savenewcont',\n 'cancel'\n );\n }", "static public function radio($name = '', $options = array(), $checked = '', $attrib = '')\n {\n $options = (array)($options);\n if(!is_array($options) or empty($options)) return false;\n\n $string = '';\n foreach($options as $key => $value)\n {\n $string .= \"<input type='radio' name='$name' value='$key' \";\n $string .= ($key == $checked) ? \" checked ='checked'\" : \"\";\n $string .= $attrib;\n $string .= \" /> $value\\n\";\n }\n return $string;\n }", "function createObject($objectType,$array,$type){\r\n\t$object=\"\";\r\n\tif($objectType==\"select\"){\r\n\t\t\t$object.=\"<select class='form-control makeofcar' name='info[\".$type.\"]' id='\".$type.\"'>\";\r\n\t\t\t$object.=\"<option value=''>Select \".ucwords($type).\"</option>\";\r\n\t\t\tif($array){\r\n\t\t\t\tforeach($array as $data){\r\n\t\t\t\t\t\t$object.=\"<option value='\".trim($data).\"'>\".$data.\"</option>\";\r\n\t\t\t\t} \r\n\t\t\t\t $object.=\"</select>\";\r\n\t\t\t }\r\n\t}\r\n\t\r\n\tif($objectType==\"text\"){\r\n\t\t\t$object.=\"<input type='text' class='form-control' name='info[\".$type.\"]' id='\".$type.\"'>\";\r\n\t}\r\n\t\r\n\tif($objectType==\"checkbox\"){\r\n\t if($array){\r\n\t foreach($array as $options){\r\n\t\t\t $object.=\"<label class='checkbox-inline'>\";\r\n\t\t\t\t$object.=\"<input type='checkbox' value='\".$options.\"' id='\".$type.\"' class='advcheckbox' name='info[\".$type.\"]'>\".$options;\r\n\t\t\t\t$object.=\"</label>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tif($objectType==\"radio\"){\r\n\t if($array){\r\n\t foreach($array as $options){\r\n\t\t\t $object.=\"<label class='checkbox-inline'>\";\r\n\t\t\t\t$object.=\"<input type='radio' value='\".$options.\"' id='\".$type.\"' class='advcheckbox' name='info[\".$type.\"]'>\".\"&nbsp;&nbsp;&nbsp;\".$options;\r\n\t\t\t\t$object.=\"</label>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\techo $object;\r\n}", "function teligence_surveys_prerender($form)\r\n{\r\n\tforeach((array)element_children($form) as $key)\r\n\t{\r\n\t\t$form[$key]['#description'] .= \" Variable Name: <strong>variable_get('\" . $key . \"', '' )</strong>\";\r\n\t\t\r\n\t\tif(substr($key, -8) == '_subject')\r\n\t\t{\r\n\t\t\t$subjectsibling = substr($key, 0, -8);\r\n\t\t\t$form['group_'.$subjectsibling] = array(\r\n\t\t\t\t'#title' => \"COMBO - \" . $subjectsibling,\r\n\t\t\t\t'#type' => 'fieldset',\r\n\t\t\t\t'#collapsible' => true,\r\n\t\t\t\t'#collapsed' => true,\r\n\t\t\t\t'#weight' => -100,\r\n\t\t\t);\r\n\t\t\t$form['group_'.$subjectsibling][$key] = $form[$key];\r\n\t\t\tunset($form[$key]);\r\n\t\t}\r\n\t\tif($key == $subjectsibling)\r\n\t\t{\r\n\t\t\t$form['group_'.$subjectsibling][$key] = $form[$key];\r\n\t\t\tunset($form[$key]);\r\n\t\t\tunset($subjectsibling);\r\n\t\t}\r\n\t}\t\r\n\t\r\n\treturn $form;\r\n}", "public function form_field_radio ( $args ) {\n\t\t$options = $this->get_settings();\n\t\t\n\t\tif ( isset( $args['data']['options'] ) && ( count( (array)$args['data']['options'] ) > 0 ) ) {\n\t\t\t$html = '';\n\t\t\tforeach ( $args['data']['options'] as $k => $v ) {\n\t\t\t\t$html .= '<input type=\"radio\" name=\"' . $this->token . '[' . esc_attr( $args['key'] ) . ']\" value=\"' . esc_attr( $k ) . '\"' . checked( esc_attr( $options[$args['key']] ), $k, false ) . ' /> ' . $v . '<br />' . \"\\n\";\n\t\t\t}\n\t\t\techo $html;\n\t\t\t\n\t\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\t\techo '<span class=\"description\">' . $args['data']['description'] . '</span>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "function echoCreate($spec, $extra_data=[]) {\n\techo('<form class=\"tr\" method=\"POST\">');\n\tforeach($extra_data as $key => $value) {\n\t\techo('<input name=\"' . htmlspecialchars($key) . '\" type=\"hidden\" value=\"' . htmlspecialchars($value) . '\"></input>');\n\t}\n\tforeach($spec as $col) {\n\t\techo('<div class=\"td\"><input name=\"' . htmlspecialchars($col) . '\"></input></div>');\n\t}\n\techo('<div class=\"td\"><input type=\"submit\" name=\"action\" value=\"create\"></input></div>');\n\techo('</form>');\n}", "function radio( $element )\n\t\t{\t\n\t\t\t$output = \"\";\n\t\t\t$counter = 1;\n\t\t\tforeach($element['buttons'] as $radiobutton)\n\t\t\t{\t\n\t\t\t\t$checked = \"\";\n\t\t\t\tif( $element['std'] == $counter ) { $checked = 'checked = \"checked\"'; }\n\t\t\t\t\n\t\t\t\t$output .= '<span class=\"ace_radio_wrap\">';\n\t\t\t\t$output .= '<input '.$checked.' type=\"radio\" class=\"'.$element['class'].'\" ';\n\t\t\t\t$output .= 'value=\"'.$counter.'\" id=\"'.$element['id'].$counter.'\" name=\"'.$element['id'].'\"/>';\n\t\t\t\t\n\t\t\t\t$output .= '<label for=\"'.$element['id'].$counter.'\">'.$radiobutton.'</label>';\n\t\t\t\t$output .= '</span>';\n\t\t\t\t\n\t\t\t\t$counter++;\n\t\t\t}\t\n\t\t\t\t\n\t\t\treturn $output;\n\t\t}", "function form_radio_group($field, $options) {\n\n}", "function minorite_radios($variables) {\n $element = $variables['element'];\n $attributes = array();\n if (isset($element['#id'])) {\n $attributes['id'] = $element['#id'];\n }\n\n return '<span class=\"form-frame form-input-group\">' . $element['#children'] . '</span>';\n}", "private function generateQuestion(){\n\t\t\t$questions = array(\n\t\t\t\t\tarray('name' => 'chevrolet', 'logo' => 'chevrolet.png'),\n\t\t\t\t\tarray('name' => 'playboy', 'logo' => 'playboy.png'),\n\t\t\t\t\tarray('name' => 'shell', 'logo' => 'shell.png'),\n\t\t\t\t\tarray('name' => 'java', 'logo' => 'java.png'),\n\t\t\t\t\tarray('name' => 'mysql', 'logo' => 'mysql.png'),\n\t\t\t\t\tarray('name' => 'postgresql', 'logo' => 'postgresql.png'),\n\t\t\t\t\tarray('name' => 'chrome', 'logo' => 'chrome.png'),\n\t\t\t\t\tarray('name' => 'firefox', 'logo' => 'firefox.png'),\n\t\t\t\t\tarray('name' => 'bluetooth', 'logo' => 'bluetooth.png'),\n\t\t\t\t\tarray('name' => 'twitter', 'logo' => 'twitter.png')\n\t\t\t\t);\n\t\t\t\t\n\t\t\t$index = rand(0, count($questions) - 1);\n\t\t\t\n\t\t\t$this->session->set('gl_answer', $questions[$index]['name']);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t\t\t\t'type' => 'image',\n\t\t\t\t\t\t\t'originalContentUrl' => $this->image_url . $questions[$index]['logo'],\n\t\t\t\t\t\t\t'previewImageUrl' => $this->image_url . $questions[$index]['logo']\n\t\t\t\t\t\t);\n\t\t}", "public function make_multianswer_question_multiple() {\n question_bank::load_question_definition_classes('multianswer');\n $q = new qtype_multianswer_question();\n test_question_maker::initialise_a_question($q);\n $q->name = 'Multichoice multiple';\n $q->questiontext = 'Please select the fruits {#1} and vegetables {#2}';\n $q->generalfeedback = 'You should know which foods are fruits or vegetables.';\n $q->qtype = question_bank::get_qtype('multianswer');\n\n $q->textfragments = array(\n 'Please select the fruits ',\n ' and vegetables ',\n ''\n );\n $q->places = array('1' => '1', '2' => '2');\n\n // Multiple-choice subquestion.\n question_bank::load_question_definition_classes('multichoice');\n $mc = new qtype_multichoice_multi_question();\n test_question_maker::initialise_a_question($mc);\n $mc->name = 'Multianswer 1';\n $mc->questiontext = '{1:MULTIRESPONSE:=Apple#Good~%-50%Burger~%-50%Hot dog#Not a fruit~%-50%Pizza' .\n '~=Orange#Correct~=Banana}';\n $mc->questiontextformat = FORMAT_HTML;\n $mc->generalfeedback = '';\n $mc->generalfeedbackformat = FORMAT_HTML;\n\n $mc->shuffleanswers = 0;\n $mc->answernumbering = 'none';\n $mc->layout = qtype_multichoice_base::LAYOUT_VERTICAL;\n $mc->single = 0;\n\n $mc->answers = array(\n 16 => new question_answer(16, 'Apple', 0.3333333,\n 'Good', FORMAT_HTML),\n 17 => new question_answer(17, 'Burger', -0.5,\n '', FORMAT_HTML),\n 18 => new question_answer(18, 'Hot dog', -0.5,\n 'Not a fruit', FORMAT_HTML),\n 19 => new question_answer(19, 'Pizza', -0.5,\n '', FORMAT_HTML),\n 20 => new question_answer(20, 'Orange', 0.3333333,\n 'Correct', FORMAT_HTML),\n 21 => new question_answer(21, 'Banana', 0.3333333,\n '', FORMAT_HTML),\n );\n $mc->qtype = question_bank::get_qtype('multichoice');\n $mc->maxmark = 1;\n\n // Multiple-choice subquestion.\n question_bank::load_question_definition_classes('multichoice');\n $mc2 = new qtype_multichoice_multi_question();\n test_question_maker::initialise_a_question($mc2);\n $mc2->name = 'Multichoice 2';\n $mc2->questiontext = '{1:MULTIRESPONSE:=Raddish#Good~%-50%Chocolate~%-50%Biscuit#Not a vegetable~%-50%Cheese' .\n '~=Carrot#Correct}';\n $mc2->questiontextformat = FORMAT_HTML;\n $mc2->generalfeedback = '';\n $mc2->generalfeedbackformat = FORMAT_HTML;\n\n $mc2->shuffleanswers = 0;\n $mc2->answernumbering = 'none';\n $mc2->layout = qtype_multichoice_base::LAYOUT_VERTICAL;\n $mc2->single = 0;\n\n $mc2->answers = array(\n 22 => new question_answer(22, 'Raddish', 0.5,\n 'Good', FORMAT_HTML),\n 23 => new question_answer(23, 'Chocolate', -0.5,\n '', FORMAT_HTML),\n 24 => new question_answer(24, 'Biscuit', -0.5,\n 'Not a vegetable', FORMAT_HTML),\n 25 => new question_answer(25, 'Cheese', -0.5,\n '', FORMAT_HTML),\n 26 => new question_answer(26, 'Carrot', 0.5,\n 'Correct', FORMAT_HTML),\n );\n $mc2->qtype = question_bank::get_qtype('multichoice');\n $mc2->maxmark = 1;\n\n $q->subquestions = array(\n 1 => $mc,\n 2 => $mc2,\n );\n\n return $q;\n }", "function callback_radio(array $args)\n {\n }", "function _recommends_req_steps() {\n return array(\n 1 => array(\n 'form' => 'recommends_req_wizard_student_info',\n ),\n 2 => array(\n 'form' => 'recommends_req_wizard_schools_info',\n ),\n 3 => array(\n 'form' => 'recommends_req_wizard_courses_info',\n ),\n 4 => array(\n 'form' => 'recommends_req_wizard_verification',\n ),\n );\n}", "public function run()\n {\n $data = [\n [\n 'id' => 1,\n 'name' => '选择题1',\n 'type' => 'radio',\n 'level' => rand(0,2),\n 'value' => rand(1,5),\n 'answer' => 'A',\n 'description' => '没什么好说的',\n 'created_at' => \\Carbon\\Carbon::now(),\n 'user_id' => 1\n ],\n [\n 'id' => 2,\n 'name' => '选择题2',\n 'type' => 'radio',\n 'level' => rand(0,2),\n 'value' => rand(1,5),\n 'answer' => 'B',\n 'description' => '没什么好说的',\n 'created_at' => \\Carbon\\Carbon::now(),\n 'user_id' => 1,\n\n ],\n [\n 'id' => 3,\n 'name' => '选择题3',\n 'type' => 'radio',\n 'level' => rand(0,2),\n 'value' => rand(1,5),\n 'answer' => 'C',\n 'description' => '没什么好说的',\n 'user_id' => 1,\n 'created_at' => \\Carbon\\Carbon::now()\n ],\n [\n 'id' => 4,\n 'name' => '选择题4',\n 'type' => 'multiselect',\n 'level' => rand(0,2),\n 'value' => rand(1,5),\n 'answer' => 'B,D',\n 'description' => '没什么好说的',\n 'user_id' => 1,\n 'created_at' => \\Carbon\\Carbon::now()\n ],\n [\n 'id' => 5,\n 'name' => '选择题5',\n 'type' => 'multiselect',\n 'level' => rand(0,2),\n 'value' => rand(1,5),\n 'answer' => 'A,B',\n 'description' => '没什么好说的',\n 'user_id' => 1,\n 'created_at' => \\Carbon\\Carbon::now()\n ],\n [\n 'id' => 6,\n 'name' => '选择题6',\n 'type' => 'multiselect',\n 'level' => rand(0,2),\n 'value' => rand(1,5),\n 'answer' => 'A,D',\n 'description' => '没什么好说的',\n 'user_id' => 1,\n 'created_at' => \\Carbon\\Carbon::now()\n ],\n [\n 'id' => 7,\n 'name' => '选择题7',\n 'type' => 'select',\n 'level' => rand(0,2),\n 'value' => rand(1,5),\n 'answer' => 'A,C',\n 'description' => '没什么好说的',\n 'user_id' => 1,\n 'created_at' => \\Carbon\\Carbon::now()\n ],\n [\n 'id' => 8,\n 'name' => '选择题8',\n 'type' => 'select',\n 'level' => rand(0,2),\n 'value' => rand(1,5),\n 'answer' => 'A,D,B',\n 'description' => '没什么好说的',\n 'user_id' => 1,\n 'created_at' => \\Carbon\\Carbon::now()\n ],\n [\n 'id' => 9,\n 'name' => '选择题9',\n 'type' => 'select',\n 'level' => rand(0,2),\n 'value' => rand(1,5),\n 'answer' => 'A',\n 'description' => '没什么好说的',\n 'user_id' => 1,\n 'created_at' => \\Carbon\\Carbon::now()\n ],\n ];\n\n DB::table('topics')->insert($data);\n\n $data1 = [];\n for($i=1;$i<10;$i++) {\n $data1[] = [\n 'topic_id' => $i,\n 'name' => '0',\n 'description' => '选项1',\n ];\n $data1[] = [\n 'topic_id' => $i,\n 'name' => '1',\n 'description' => '选项2',\n ];\n $data1[] = [\n 'topic_id' => $i,\n 'name' => '2',\n 'description' => '选项3',\n ];\n $data1[] = [\n 'topic_id' => $i,\n 'name' => '3',\n 'description' => '选项4',\n ];\n }\n\n DB::table('stopics')->insert($data1);\n }", "function radio( $args ) {\n $current = Premium_Posts::get_settings( $args['key'] ) ? Premium_Posts::get_settings( $args['key'] ) : $args['default'];\n foreach( $args['options'] as $value => $label ) {\n printf(\n '<input type=\"radio\" name=\"%1$s\" value=\"%2$s\" %3$s /> %4$s<br />',\n esc_attr( $args['id'] ),\n esc_attr( $value ),\n $checked = checked( $current, $value, $echo = false ),\n esc_attr( $label )\n );\n }\n }", "public function get_multianswer_question_form_data_twosubq() {\n $formdata = new stdClass();\n $formdata->name = 'Simple multianswer';\n $formdata->questiontext = array('text' => 'Complete this opening line of verse: \"The ' .\n '{1:SHORTANSWER:Dog#Wrong, silly!~=Owl#Well done!~*#Wrong answer} ' .\n 'and the {1:MULTICHOICE:Bow-wow#You seem to have a dog obsessions!' .\n '~Wiggly worm#Now you are just being ridiculous!~=Pussy-cat#Well done!}' .\n ' went to sea\".', 'format' => FORMAT_HTML);\n $formdata->generalfeedback = array('text' => 'General feedback: It\\'s from \"The Owl and the Pussy-cat\" ' .\n 'by Lear: \"The owl and the pussycat went to sea', 'format' => FORMAT_HTML);\n\n $formdata->hint = array(\n 0 => array('text' => 'Hint 1', 'format' => FORMAT_HTML, 'itemid' => 0),\n 1 => array('text' => 'Hint 2', 'format' => FORMAT_HTML, 'itemid' => 0),\n );\n\n return $formdata;\n }", "function testCheck($testcase, $testmethod)\n{\n return \"<input type=\\\"checkbox\\\" name=\\\"testmethods[$testcase][$testmethod]\\\" value=\\\"1\\\">$testmethod <br>\\n\";\n}", "function getForm($title, $arr)\n{\n\t$ret = '<form method=\"post\" action=\"index.php\">' . $title;\n\n\twhile(list(,$array) = each($arr))\n\t\t$ret .= $array[0] . getFormField($array[1]);\n\n\t$ret .= '</form>';\n\n\treturn $ret;\n}", "public function generateChoices(array $question)\n\t{\n\t\t[$inputMode, $inputExpectation, $notUseful, $from] = explode('_', $question['type']);\n\n\t\tif($this->config['cross_sections_for_possible_answers'])\n\t\t{\n\t\t\t//TODO\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\t//leave space for the correct answer to be slotted in!\n\t\t\t//(not done in this method BTW)\n\t\t\t//UPDATE: actually, no, we'll just clobber one to put the correct answer in\n\t\t\t//$count = $this->config['choices_per_question'] - 1;\n\t\t\t$count = $this->config['choices_per_question'];\n\n\t\t\t$randomKeys = array_rand($this->functionData[$question['section']], $count);\n\n\t\t\t$choices = [];\n\n\t\t\tforeach($randomKeys as $key)\n\t\t\t{\n\t\t\t\t$choices[] = $this->functionData[$question['section']][$key][$inputExpectation];\n\t\t\t}\n\n\t\t\treturn $choices;\n\n\t\t}\n\t}", "protected function getFormButtons() : array\n {\n $result = parent::getFormButtons();\n\n $result['submit'] = new Submit(\n [\n AButton::PARAM_LABEL => 'Sign up',\n AButton::PARAM_BTN_TYPE => 'btn regular-main-button submit',\n ]\n );\n\n return $result;\n }", "public function radios()\n {\n $this->items(func_get_args());\n }", "public static function answer_question(array $question);", "function makeForm($request, $formOpts){\n\t\t#print_r ($request);\n\t\t$formDescriptor = array(\n\t\t\t'radioForm' => array(\n \t\t\t\t'type' => 'radio',\n \t\t\t\t'label' => 'Select a search type:',\n \t\t\t\t'options' => array( # The options available within the checkboxes (displayed => value)\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 0' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 1' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 2' => 2,\n\t\t\t\t\t\t\t\t\t\t\t),\n \t\t\t\t'default' => 0 # The option selected by default (identified by value)\n \t\t\t),\n 'textfield1' => array(\n\t\t\t\t\t\t\t\t'label' => 'textfield 1 label', # What's the label of the field\n\t\t\t\t\t\t\t\t'class' => 'HTMLTextField' # What's the input type\n\t\t\t\t\t\t\t\t),\n\t\t\t'textfield2' => array(\n\t\t\t\t\t'label' => 'textfield 2 label', # What's the label of the field\n\t\t\t\t\t'class' => 'HTMLTextField' # What's the input type\n\t\t\t\t\t), \t\t\t\t\n \t\t);\n\t\t\n\t\tswitch($formOpts){\n\t\t\tcase '1':\n\t\t\t\t$formDescriptor['textfield1']['label'] = 'textfield 1 label'; # What's the label of the field\n\t\t\t\t$formDescriptor['textfield2']['label'] = 'textfield 2 label'; # What's the label of the field\t\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\t#same as case 1\n\t\t\tdefault:\n\t\t}\n\n\t\t#Submit button structure and page callback. \n $htmlForm = new HTMLForm( $formDescriptor, $this->getContext(), 'myform'); # We build the HTMLForm object, calling the form 'myform'\n $htmlForm->setSubmitText( 'Submit button text' ); # What text does the submit button display\n\t\t\n\t\t/* We set a callback function */ \n\t\t#This code has no function to the special page. It used to produce red wiki text callback such as \"Try Again\" commented-out below under processInput function. \n\t\t$htmlForm->setSubmitCallback( array( 'specialpagetemplate', 'processInput' ) ); # Call processInput() in specialpagetemplate on submit\n $htmlForm->show(); # Displaying the form\n\t}", "function create_user_registration_form($data) {\n foreach($data as $key => $val) {\n echo '<div class=\"form-group\">\n <label for=\"'.$val.'\" class=\"pl-1\">'.$key.':';\n if ($val != \"mobile\") echo '*'; echo '</label>\n <input type=\"'.USERS_FORM_TYPES[$key].'\" class=\"form-control\"\n name=\"'.$val.'\" placeholder=\"'.$key.'\" maxlength=\"40\"';\n if (isset($_POST[$val])) echo ' value=\"'.$_POST[$val].'\"';\n echo '></div>';\n }\n }", "function getFormData($array) {\r\n $data = array();\r\n foreach($array as $key=>$dataname){\r\n $data[$dataname] = xtc_db_input($_POST[$dataname]);\r\n }\r\n return $data;\r\n }", "function guifi_radio_add_radio_form($edit) {\n $cr = 0; $tr = 0; $firewall=FALSE;\n $maxradios = db_fetch_object(db_query('SELECT radiodev_max FROM {guifi_model_specs} WHERE mid=%d',$edit[variable][model_id]));\n\n if (isset($edit[radios]))\n foreach ($edit[radios] as $k => $radio) {\n $tr++;\n if (!$radio['deleted'])\n $cr++;\n if ($radio['mode'] == 'client')\n $firewall = TRUE;\n } // foreach $radio\n\n // print \"Max radios: \".$maxradios->radiodev_max.\" Current: $cr Total: $tr Firewall: $firewall Edit details: $edit[edit_details]\\n<br />\";\n $modes_arr = guifi_types('mode');\n // print_r($modes_arr);\n\n if ($cr>0)\n\t if (!$firewall)\n\t\t $modes_arr = array_diff_key($modes_arr,array('client' => 0));\n\t else\n\t\t $modes_arr = array_intersect_key($modes_arr,array('client' => 0));\n\n $form['newradio_mode'] = array(\n '#type' => 'select',\n '#parents' => array('newradio_mode'),\n '#required' => FALSE,\n '#default_value' => 'client',\n '#options' => $modes_arr,\n '#prefix' => '<table style=\"width: 100%\"><th colspan=\"0\">'.t('New radio (mode)').'</th><tr><td style=\"width: 0\" align=\"right\">',\n '#suffix' => '</td>',\n// '#weight' => 20\n );\n $form['AddRadio'] = array(\n '#type' => 'button',\n '#parents' => array('AddRadio'),\n '#default_value' => t('Add new radio'),\n '#executes_submit_callback' => TRUE,\n '#submit' => array(guifi_radio_add_radio_submit),\n '#prefix' => '<td style=\"width: 10em\" align=\"left\">',\n '#suffix' => '</td><td style=\"width: 100%\" align=\"right\">&nbsp</td></tr>',\n// '#weight' => 21,\n );\n $form['help_addradio'] = array(\n '#type' => 'item',\n '#description' => t('Usage:<br />Choose <strong>wireless client</strong> mode for a normal station with full access to the network. That\\'s the right choice in general.<br />Use the other available options only for the appropiate cases and being sure of what you are doing and what does it means. Note that you might require to be authorized by networks administrators for doing this.<br />Youwill not be able to define you link and get connected to the network until you add at least one radio.'),\n '#prefix' => '<tr><td colspan=\"3\">',\n '#suffix' => '</td></tr></table>',\n// '#weight' => 22,\n );\n return $form;\n}", "public static function FormRadioSelect( $name, $data = null, $dataKey = null, $dataTitle = null, $value = null, $class = null, $nullValue = true, $callback = null , $params = [] ) {\n $xhtml = '';\n if ( $data ) {\n $i = 0;\n foreach ( $data as $index => $element ) {\n $i ++;\n\n if ( is_object( $element ) ) {\n $title = $element->$dataTitle;\n $key = $element->$dataKey;\n } else if ( is_array( $element ) ) {\n $title = $element[$dataTitle];\n $key = $element[$dataKey];\n } else {\n $title = $element;\n $key = $index;\n }\n\n if ( $callback ) {\n $title = call_user_func_array( $callback, [ $title, $element ] );\n }\n\n $classes = $class ? [ $class ] : [];\n if ( $i != count( $data ) ) {\n $classes[] = 'marginRightBase';\n }\n\n $xhtml .= sprintf( '<label%s>%s %s</label>', $classes ? ' class=\"' . implode( $classes, ' ' ) . '\"' : '',\n FormHelper::FormRadioButton( $name, $key, null, $class, ($value && $value == $key) || (!$nullValue && $i == 1), $params ),\n $title\n );\n }\n }\n\n return $xhtml;\n }", "public function test_export_multichoice_1() {\n $qdata = new stdClass();\n $qdata->id = 123;\n $qdata->contextid = 0;\n $qdata->qtype = 'multichoice';\n $qdata->name = 'Multiple choice question';\n $qdata->questiontext = 'Questiontext of muliple choice question.';\n $qdata->questiontextformat = FORMAT_HTML;\n $qdata->generalfeedback = 'General feedback';\n $qdata->generalfeedbackformat = FORMAT_HTML;\n $qdata->defaultmark = 23;\n $qdata->length = 1;\n $qdata->penalty = 0.3333333;\n $qdata->hidden = 0;\n \n $qdata->options = new stdClass();\n $qdata->options->single = 0;\n $qdata->options->shuffleanswers = 0;\n $qdata->options->answernumbering = 'abc';\n $qdata->options->correctfeedback = '<p>Your answer is correct.</p>';\n $qdata->options->correctfeedbackformat = FORMAT_HTML;\n $qdata->options->partiallycorrectfeedback = '<p>Your answer is partially correct.</p>';\n $qdata->options->partiallycorrectfeedbackformat = FORMAT_HTML;\n $qdata->options->shownumcorrect = 1;\n $qdata->options->incorrectfeedback = '<p>Your answer is incorrect.</p>';\n $qdata->options->incorrectfeedbackformat = FORMAT_HTML;\n \n $qdata->options->answers = array(\n 13 => new question_answer(13, 'answer 1', 0, '', FORMAT_HTML),\n 14 => new question_answer(14, 'answer 2', 1, '', FORMAT_HTML),\n 15 => new question_answer(15, 'answer 3', 0, '', FORMAT_HTML),\n 16 => new question_answer(16, 'answer 4', 0, '', FORMAT_HTML),\n );\n \n $qdata->hints = array(\n new question_hint_with_parts(0, 'Hint 1.', FORMAT_HTML, false, false),\n new question_hint_with_parts(0, 'Hint 2.', FORMAT_HTML, false, false),\n );\n \n \n // Export the question.\n $exporter = new qformat_smart();\n $questions = array($qdata);\n $zipcontent = $exporter->export_questions($questions);\n \n // Open exported question as import_data.\n $import_data = $this->zip_to_import_data($zipcontent);\n \n /*\n * Test content of imsmanifest.xml\n */\n \n $imsmanifest = $import_data->imsmanifest;\n \n $expected = '<resource identifier=\"group0_pages\" href=\"page0.svg\" type=\"webcontent\" adlcp:scormType=\"asset\"><file href=\"page0.svg\"/></resource>';\n $actual = $imsmanifest->resources->resource[0]->asXML();\n $this->assert_same_xml($expected, $actual);\n \n $expected = '<resource identifier=\"pages\" href=\"page0.svg\" type=\"webcontent\" adlcp:scormType=\"asset\"><file href=\"page0.svg\"/></resource>';\n $actual = $imsmanifest->resources->resource[1]->asXML();\n $this->assert_same_xml($expected, $actual);\n \n /*\n * Test content of page.\n */\n \n // Test number of pages.\n $this->assertCount(1, $import_data->pages);\n \n $page = $import_data->pages[0];\n \n // Test the number of question elements.\n $questions = $page->xpath('//g[@class=\"question\"]');\n $this->assertCount(1, $questions);\n \n // Test the question element.\n $question = $questions[0];\n $expectedvotemetadata = '<votemetadata><questiontext format=\"choice\" labelstyle=\"upper-alpha\" correct=\"2\" points=\"23\" tags=\"\" explanation=\"General feedback\" mathgradingoption=\"\" likert=\"false\"/></votemetadata>';\n $votemetadata = $question->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the question number.\n $expectedquestionnumber = '1';\n $questionnumber = strip_tags($question->text[0]->asXML());\n $this->assertEquals($expectedquestionnumber, $questionnumber);\n \n // Test the question text without formattings.\n $expectedquestiontext = 'Questiontext of muliple choice question.';\n $questiontext = strip_tags($question->text[1]->asXML());\n $this->assertEquals($expectedquestiontext, $questiontext);\n \n // Test the number of choices.\n $choices = $page->xpath('//g[@class=\"questionchoice\"]');\n $this->assertCount(4, $choices);\n \n // Test the 1. choice element.\n $choice = $choices[0];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"1\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'A';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'answer 1';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 2. choice element.\n $choice = $choices[1];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"2\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'B';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'answer 2';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 3. choice element.\n $choice = $choices[2];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"3\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'C';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'answer 3';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 4. choice element.\n $choice = $choices[3];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"4\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'D';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'answer 4';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n }", "function HTMLSubmit ($params) {\n if (!isset($params['name'])) {\n if (isset($params['id'])) {\n $params['name'] = $params['id'];\n }\n }\n $val = $params['value'];\n unset($params['value']);\n $str = '';\n foreach ($params as $k=>$v) {\n $str .= \" {$k}=\\\"{$v}\\\"\";\n }\n return \"<button type='submit' {$str} >{$val}</button>\";\n }", "function scrappy_get_radios($id) {\n $args = array(\n 'posts_per_page' => -1,\n 'offset' => 0,\n 'category' => '',\n 'category_name' => '',\n 'orderby' => 'meta_value',\n 'order' => 'DESC',\n 'include' => '',\n 'exclude' => '',\n 'meta_key' => '',\n 'meta_value' => '',\n 'post_type' => 'radio',\n 'post_mime_type' => '',\n 'post_parent' => '',\n 'author'\t => '',\n 'author_name'\t => '',\n 'post_status' => 'publish',\n 'suppress_filters' => true,\n /*'tax_query' => array(\n array(\n 'taxonomy' => 'radio_category',\n 'field' => 'id',\n 'terms' => 2\n )\n ),*/\n 'meta_key' => 'scrappy_url',\n );\n if ( $id ) {\n $args['post__in'] = ( is_array($id) ? $id : array($id));\n }\n return get_posts( $args );\n}", "public function renderRadio(): string\n\t{\n\t\t$gateUrl = $this->config->gateUrl;\n\t\t$queryArgs = [\n\t\t\t'merchantId' => $this->config->merchantId,\n\t\t\t'accountId' => $this->config->accountId,\n\t\t\t'name' => $this->name,\n\t\t\t'value' => $this->value,\n\t\t\t'showIcon' => $this->showIcon,\n\t\t\t'selected' => $this->isTpMethodChosen() ? (int) $_REQUEST['tp_radio_value'] : '',\n\t\t];\n\t\t// Currency is an optional argument. For compatibility reasons, it is\n\t\t// not present in the query at all if its value is empty.\n\t\tif ($this->currency) {\n\t\t\t$queryArgs['currency'] = $this->currency;\n\t\t}\n\n\t\t$queryArgs['signature'] = $this->createSignature($queryArgs);\n\n\t\t$queryArgs = http_build_query($queryArgs);\n\t\t$thepayGateUrl = \"{$gateUrl}radiobuttons/index.php?{$queryArgs}\";\n\t\t$thepayGateUrl = Escaper::jsonEncode($thepayGateUrl);\n\n\t\t$href = \"{$gateUrl}radiobuttons/style/radiobuttons.css?v=\" . time();\n\t\t$out = \"<link href=\\\"{$href}\\\" type=\\\"text/css\\\" rel=\\\"stylesheet\\\" />\\n\";\n\t\t$out .= \"<script type=\\\"text/javascript\\\">\\n\";\n\t\t$out .= \"\\tvar thepayGateUrl = {$thepayGateUrl};\\n\";\n\n\t\tif ($this->appendCode) {\n\t\t\t$thepayAppendCode = Escaper::jsonEncode($this->appendCode);\n\t\t\t$out .= \"\\tvar thepayAppendCode = {$thepayAppendCode};\\n\";\n\t\t}\n\n\t\t$out .= \"</script>\\n\";\n\n\t\t$src = \"{$gateUrl}radiobuttons/js/jquery.js?v=\" . time();\n\t\t$out .= \"<script type=\\\"text/javascript\\\" src=\\\"{$src}\\\" async=\\\"async\\\"></script>\\n\";\n\n\t\t$src = \"{$gateUrl}radiobuttons/js/radiobuttons.js?v=\" . time();\n\t\t$out .= \"<script type=\\\"text/javascript\\\" src=\\\"{$src}\\\" async=\\\"async\\\"></script>\\n\";\n\n\t\t$out .= \"<div id=\\\"thepay-method-box\\\"></div>\\n\";\n\n\t\treturn $out;\n\t}", "function createCheckboxGroup($data) {\n foreach($data as $key => $value) {\n echo '<div class=\"form-check mb-2\">';\n echo \"<label class=\\\"form-check-label font-weight-bold\\\">\";\n echo \"<input type=\\\"checkbox\\\" class=\\\"form-check-input\\\" name=\\\"$value\\\" value=\\\"$value\\\"\";\n if(isset($_POST[$value]) && $_POST[$value]){\n echo \" checked=\\\"checked\\\"\";\n }\n echo \"> $key</label></div>\";\n }\n }", "function sb_slideshow_radio( $value, $key, $name, $checked = '' ) {\n\treturn '<input type=\"radio\" name=\"sb_' . esc_attr( $name ) . '\" id=\"' . esc_attr( $name . '_' . $value ) . '\"\n\t\tvalue=\"' . esc_attr( $value ) . '\"' . ($value == $checked ? 'checked=\"checked\"' : '') . ' />\n\t\t<label for=\"' . esc_attr( $name . '_' . $value ) . '\">' . $key . '</label><br />';\n}", "public static function generate($fields) {\n $form=\"\";\n $extraOptions=[];\n // wildCard will be applied all inputs\n $wildCard=isset($fields[\"*\"]) ? $fields[\"*\"]:[];\n // exclude given elements\n if(isset($fields[\"_exclude\"])) {\n foreach ($fields[\"_exclude\"] as $value) {\n unset($fields[$value]);\n }\n }\n foreach ($fields as $key => $val) {\n if($key==\"*\"||$key==\"_exclude\") continue;\n if(!empty($wildCard)) {\n $val=array_replace_recursive($val,$wildCard);\n }\n $inputOptions=isset($val[\"options\"]) ? $val[\"options\"] : [];\n \n $placeholder=isset($val[\"placeholder\"]) ? $val[\"placeholder\"] : null;\n switch ($val[\"type\"]) {\n case 'select':\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$val[\"data\"],$inputOptions);\n break;\n case 'password':\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$placeholder,$inputOptions);\n break;\n case 'checkbox':\n case 'radio':\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$val[\"value\"],null); // removed $val[\"checked\"] for unwanted results\n break;\n case 'color':\n case 'number':\n case 'file';\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$inputOptions);\n break;\n // other elements share the same parameters.\n default:\n try {\n\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$placeholder,$inputOptions);\n }catch(\\Exception $err) {\n if(config('app.debug')==false) { // only show error on debug\n dump(\"Error on generating form\",$err,$key,$val);\n }\n }\n break;\n }\n }\n return $form;\n }", "public function CreateTaphonomyMultiple()\n {\n // Test user login\n $user = ['email' => '[email protected]', 'password' => 'Password!23'];\n $this->browse(function ($browser) use ($user) {\n $browser->visit(new loginPage)\n ->loginUser($user['email'], $user['password'])\n ->assertSee('Welcome');\n\n // Skeletal elements search set up\n $browser->visit(new specimenPage)\n ->pause(1000)\n ->select('@search-type-selector','SE-P1')\n ->pause(1000)\n ->type('@cora-search','888')\n ->keys('@cora-search','{enter}')\n\n // Search Result Assertions for humerus ABC999-888-777-555\n ->waitForLink('ABC999-888-777-555')\n ->assertSeeLink('ABC999-888-777-555')\n ->assertSee('Humerus')\n ->assertSee('Left')\n ->assertSee('Bone')\n ->assertSee('Side')\n ->assertSee('DNA Sampled')\n\n // Specimen Assertions\n ->clickLink('ABC999-888-777-555')\n ->assertSee('View Specimen - ABC999-888-777-555')\n ->click('@se-details-menu')\n ->click('@se-taphonomys-menu')\n ->assertSee('Taphonomies: ABC999-888-777-555')\n ->assertPathIs('/skeletalelements/1220/taphonomys')\n\n // Open Edit Functions\n ->click('@se-taphonomys-menu')\n ->click('@taphonomy-actions-edit')\n ->assertSee('Taphonomies: ABC999-888-777-555')\n ->assertSee('Save')\n ->assertPathIs('/skeletalelements/1220/associatetaphonomys')\n\n // Add and Save a multiple new taphonomies\n ->select('@se-taphonomy-list','General Color-Natural')\n ->select('@se-taphonomy-list','Human Modification-Other')\n ->select('@se-taphonomy-list','Physical-Weathering')\n ->click('@se-taphonomy-save')\n ->acceptDialog()\n ->assertSee('Taphonomies successfully associated')\n ->assertPathIs('/skeletalelements/1220/associatetaphonomys')\n\n ->logoutUser();\n });\n }", "protected function printRadioFormField($nameField, $label, $array, $required=false, $value=null){\n $optRequired = \"\";\n if($required == true){\n $optRequired = \"required\";\n }\n if($value == null){\n if(isset($_POST[$nameField])){\n $value = $_POST[$nameField];\n }\n }\n \n ?>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-2\" for=\"<?php echo $nameField ?>\" ><?php echo $label ?></label>\n <?php\n foreach($array as $k => $v){\n if($value == $k){\n echo '<label class=\"radio-inline\"><input type=\"radio\" value=\"'.$k.'\" name=\"'.$nameField.'\" '.$optRequired.' checked>'.$v.'</label>';\n }\n else{\n echo '<label class=\"radio-inline\"><input type=\"radio\" value=\"'.$k.'\" name=\"'.$nameField.'\" '.$optRequired.'>'.$v.'</label>';\n }\n }\n ?>\n \n \n </div>\n <?php\n }", "public function initAddQuestionAndAnswersForm () {\n global $tpl, $ilCtrl;\n\n $my_tpl = new ilTemplate(\"tpl.question_and_answers.html\", true, true,\n \"Customizing/global/plugins/Services/Repository/RepositoryObject/MobileQuiz\");\n $rtokenFactory = new ilCtrl();\n $my_tpl->setVariable(\"ACTION_URL\",$this->ctrl->getFormAction($this));\n $my_tpl->setVariable(\"SUBMIT_BUTTON\", $this->txt(\"save\"));\n $my_tpl->setVariable(\"NEW_QUESTION\", $this->txt(\"question_add_head\"));\n $my_tpl->setVariable(\"QUESTION\", $this->txt(\"question_add_text\"));\n $my_tpl->setVariable(\"QUESTION_TYPE\", $this->txt(\"question_add_type\"));\n $my_tpl->setVariable(\"CHOICES\", $this->txt(\"choice_add_texts\"));\n $my_tpl->setVariable(\"VAR_1\", \"value1\");\n $my_tpl->setVariable(\"COMMAND\", \"cmd[createQuestionAndAnswers]\");\n $my_tpl->setVariable(\"MINIMUM\", $this->txt(\"choice_add_numeric_minimum\"));\n $my_tpl->setVariable(\"MAXIMUM\", $this->txt(\"choice_add_numeric_maximum\"));\n $my_tpl->setVariable(\"STEP\", $this->txt(\"choice_add_numeric_steprange\"));\n $my_tpl->setVariable(\"CORRECT_VALUE\", $this->txt(\"choice_add_numeric_correctvalue\"));\n $my_tpl->setVariable(\"TOLERANCE_RANGE\", $this->txt(\"choice_add_numeric_tolerenace_range\"));\n $my_tpl->setVariable(\"SELECTED_SINGLE\", 'selected=\"selected\"');\n\n $my_tpl->setVariable(\"HIDE_NUMERIC_BLOCK\", 'style=\"display:none;\"');\n $my_tpl->setVariable(\"HIDE_SINGLE_CHOICE_BLOCK\", 'style=\"display:none;\"');\n\n $html = $my_tpl->get();\n $tpl->setContent($html);\n }", "public function test_export_multichoice_2() {\n $qdata = new stdClass();\n $qdata->id = 123;\n $qdata->contextid = 0;\n $qdata->qtype = 'multichoice';\n $qdata->name = 'Multiple choice question';\n $qdata->questiontext = 'Questiontext of muliple choice question.';\n $qdata->questiontextformat = FORMAT_HTML;\n $qdata->generalfeedback = 'General feedback';\n $qdata->generalfeedbackformat = FORMAT_HTML;\n $qdata->defaultmark = 23;\n $qdata->length = 1;\n $qdata->penalty = 0.3333333;\n $qdata->hidden = 0;\n \n $qdata->options = new stdClass();\n $qdata->options->single = 0;\n $qdata->options->shuffleanswers = 0;\n $qdata->options->answernumbering = 'abc';\n $qdata->options->correctfeedback = '<p>Your answer is correct.</p>';\n $qdata->options->correctfeedbackformat = FORMAT_HTML;\n $qdata->options->partiallycorrectfeedback = '<p>Your answer is partially correct.</p>';\n $qdata->options->partiallycorrectfeedbackformat = FORMAT_HTML;\n $qdata->options->shownumcorrect = 1;\n $qdata->options->incorrectfeedback = '<p>Your answer is incorrect.</p>';\n $qdata->options->incorrectfeedbackformat = FORMAT_HTML;\n \n $qdata->options->answers = array(\n 13 => new question_answer(13, 'answer 1', 0, '', FORMAT_HTML),\n 14 => new question_answer(14, 'answer 2', 1, '', FORMAT_HTML),\n 15 => new question_answer(15, 'answer 3', 0, '', FORMAT_HTML),\n 16 => new question_answer(16, 'answer 4', 1, '', FORMAT_HTML),\n );\n \n $qdata->hints = array(\n new question_hint_with_parts(0, 'Hint 1.', FORMAT_HTML, false, false),\n new question_hint_with_parts(0, 'Hint 2.', FORMAT_HTML, false, false),\n );\n \n \n // Export the question.\n $exporter = new qformat_smart();\n $questions = array($qdata);\n $zipcontent = $exporter->export_questions($questions);\n \n // Open exported question as import_data.\n $import_data = $this->zip_to_import_data($zipcontent);\n \n /*\n * Test content of imsmanifest.xml\n */\n \n $imsmanifest = $import_data->imsmanifest;\n \n $expected = '<resource identifier=\"group0_pages\" href=\"page0.svg\" type=\"webcontent\" adlcp:scormType=\"asset\"><file href=\"page0.svg\"/></resource>';\n $actual = $imsmanifest->resources->resource[0]->asXML();\n $this->assert_same_xml($expected, $actual);\n \n $expected = '<resource identifier=\"pages\" href=\"page0.svg\" type=\"webcontent\" adlcp:scormType=\"asset\"><file href=\"page0.svg\"/></resource>';\n $actual = $imsmanifest->resources->resource[1]->asXML();\n $this->assert_same_xml($expected, $actual);\n \n /*\n * Test content of page.\n */\n \n // Test number of pages.\n $this->assertCount(1, $import_data->pages);\n \n $page = $import_data->pages[0];\n \n // Test the number of question elements.\n $questions = $page->xpath('//g[@class=\"question\"]');\n $this->assertCount(1, $questions);\n \n // Test the question element.\n $question = $questions[0];\n $expectedvotemetadata = '<votemetadata><questiontext format=\"selection\" labelstyle=\"upper-alpha\" correct=\"2 4\" points=\"23\" tags=\"\" explanation=\"General feedback\" mathgradingoption=\"\" likert=\"\"/></votemetadata>';\n $votemetadata = $question->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the question number.\n $expectedquestionnumber = '1';\n $questionnumber = strip_tags($question->text[0]->asXML());\n $this->assertEquals($expectedquestionnumber, $questionnumber);\n \n // Test the question text without formattings.\n $expectedquestiontext = 'Questiontext of muliple choice question.';\n $questiontext = strip_tags($question->text[1]->asXML());\n $this->assertEquals($expectedquestiontext, $questiontext);\n \n // Test the number of choices.\n $choices = $page->xpath('//g[@class=\"questionchoice\"]');\n $this->assertCount(4, $choices);\n \n // Test the 1. choice element.\n $choice = $choices[0];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"1\" format=\"selection\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'A';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'answer 1';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 2. choice element.\n $choice = $choices[1];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"2\" format=\"selection\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'B';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'answer 2';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 3. choice element.\n $choice = $choices[2];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"3\" format=\"selection\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'C';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'answer 3';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 4. choice element.\n $choice = $choices[3];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"4\" format=\"selection\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'D';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'answer 4';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n }", "function re_post_form($var, $ignore=array('submit'))\r\n{\r\n $input_hiddens = '';\r\n\r\n foreach($var as $k=>$v)\r\n {\r\n $k = format_str($k);\r\n if(in_array($k, $ignore)!=false) continue;\r\n\r\n if(is_array($v))\r\n {\r\n foreach($v as $k2=>$v2){\r\n $input_hiddens .= \"<input type='hidden' name='{$k}[{$k2}]' value='{$v2}' />\\r\\n\";\r\n }\r\n }\r\n else{\r\n $input_hiddens .= \"<input type='hidden' name='{$k}' value='{$v}' />\\r\\n\";\r\n }\r\n }\r\n\r\n return $input_hiddens;\r\n}", "public function getDomObject()\n\t\t{\n\t\t\t$fieldset = new \\System\\XML\\DomObject( 'fieldset' );\n\t\t\t$fieldset->setAttribute( 'id', $this->getHTMLControlId() );\n//\t\t\t$fieldset->setAttribute( 'class', ' radiobuttonlist' );\n\n\t\t\tif( !$this->visible )\n\t\t\t{\n\t\t\t\t$fieldset->setAttribute( 'style', 'display:none;' );\n\t\t\t}\n\n\t\t\tfor( $i = 0, $count = $this->items->count; $i < $count; $i++ )\n\t\t\t{\n\t\t\t\t$input = $this->createDomObject( 'input' );\n\t\t\t\t$input->setAttribute( 'id', $this->getHTMLControlId() . '__' . $i );\n//\t\t\t\t$input->setAttribute( 'class', 'radiobuttonlist_input' );\n\t\t\t\t$input->setAttribute( 'value', $this->items->itemAt( $i ));\n\t\t\t\t$input->setAttribute( 'title', $this->tooltip );\n\n\t\t\t\tif( $this->submitted && !$this->validate() )\n\t\t\t\t{\n\t\t\t\t\t$input->setAttribute( 'class', 'invalid' );\n\t\t\t\t}\n\n\t\t\t\tif( $this->autoPostBack )\n\t\t\t\t{\n\t\t\t\t\t$input->setAttribute( 'onclick', 'Rum.id(\\''.$this->getParentByType('\\System\\Web\\WebControls\\Form')->getHTMLControlId().'\\').submit();' );\n\t\t\t\t}\n\n\t\t\t\tif( $this->ajaxPostBack )\n\t\t\t\t{\n\t\t\t\t\t$input->setAttribute( 'onclick', 'Rum.evalAsync(\\'' . $this->ajaxCallback . '\\',\\''.$this->getHTMLControlId().'=\\'+encodeURIComponent(this.value)+\\'&'.$this->getRequestData().'\\',\\'POST\\','.\\addslashes($this->ajaxStartHandler).','.\\addslashes($this->ajaxCompletionHandler).');' );\n\t\t\t\t}\n\n\t\t\t\tif( $this->readonly )\n\t\t\t\t{\n\t\t\t\t\t$input->setAttribute( 'readonly', 'readonly' );\n\t\t\t\t}\n\n\t\t\t\tif( $this->disabled )\n\t\t\t\t{\n\t\t\t\t\t$input->setAttribute( 'disabled', 'disabled' );\n\t\t\t\t}\n\n\t\t\t\tif( $this->multiple )\n\t\t\t\t{\n\t\t\t\t\t$input->setAttribute( 'type', 'checkbox' );\n\t\t\t\t\t$input->setAttribute( 'name', $this->getHTMLControlId() .'[]' );\n\n\t\t\t\t\tif( in_array( $this->items->itemAt( $i ), $this->value, false ))\n\t\t\t\t\t{\n\t\t\t\t\t\t$input->setAttribute( 'checked', 'checked' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$input->setAttribute( 'type', 'radio' );\n\t\t\t\t\t$input->setAttribute( 'name', $this->getHTMLControlId() );\n\n\t\t\t\t\tif( $this->value === $this->items->itemAt( $i ))\n\t\t\t\t\t{\n\t\t\t\t\t\t$input->setAttribute( 'checked', 'checked' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$input->setAttribute( 'onclick',\tstr_replace( '%value%', $this->items->itemAt( $i ), $this->onclick ));\n\t\t\t\t$input->setAttribute( 'ondblclick', str_replace( '%value%', $this->items->itemAt( $i ), $this->ondblclick ));\n\n\t\t\t\t$label = new \\System\\XML\\DomObject( 'label' );\n\t\t\t\t$label->addChild( $input );\n\t\t\t\t$label->addChild( new \\System\\XML\\TextNode( $this->items->keyAt( $i )) );\n\t\t\t\t$fieldset->addChild( $label );\n\t\t\t}\n\n\t\t\treturn $fieldset;\n\t\t}", "public function make_multianswer_question_twosubq() {\n question_bank::load_question_definition_classes('multianswer');\n $q = new qtype_multianswer_question();\n test_question_maker::initialise_a_question($q);\n $q->name = 'Simple multianswer';\n $q->questiontext =\n 'Complete this opening line of verse: \"The {#1} and the {#2} went to sea\".';\n $q->generalfeedback = 'General feedback: It\\'s from \"The Owl and the Pussy-cat\" by Lear: ' .\n '\"The owl and the pussycat went to sea';\n $q->qtype = question_bank::get_qtype('multianswer');\n\n $q->textfragments = array(\n 'Complete this opening line of verse: \"The ',\n ' and the ',\n ' went to sea\".',\n );\n $q->places = array('1' => '1', '2' => '2');\n\n // Shortanswer subquestion.\n question_bank::load_question_definition_classes('shortanswer');\n $sa = new qtype_shortanswer_question();\n test_question_maker::initialise_a_question($sa);\n $sa->name = 'Simple multianswer';\n $sa->questiontext = '{1:SHORTANSWER:Dog#Wrong, silly!~=Owl#Well done!~*#Wrong answer}';\n $sa->questiontextformat = FORMAT_HTML;\n $sa->generalfeedback = '';\n $sa->generalfeedbackformat = FORMAT_HTML;\n $sa->usecase = true;\n $sa->answers = array(\n 13 => new question_answer(13, 'Dog', 0.0, 'Wrong, silly!', FORMAT_HTML),\n 14 => new question_answer(14, 'Owl', 1.0, 'Well done!', FORMAT_HTML),\n 15 => new question_answer(15, '*', 0.0, 'Wrong answer', FORMAT_HTML),\n );\n $sa->qtype = question_bank::get_qtype('shortanswer');\n $sa->maxmark = 1;\n\n // Multiple-choice subquestion.\n question_bank::load_question_definition_classes('multichoice');\n $mc = new qtype_multichoice_single_question();\n test_question_maker::initialise_a_question($mc);\n $mc->name = 'Simple multianswer';\n $mc->questiontext = '{1:MULTICHOICE:Bow-wow#You seem to have a dog obsessions!' .\n '~Wiggly worm#Now you are just being rediculous!~=Pussy-cat#Well done!}';\n $mc->questiontextformat = FORMAT_HTML;\n $mc->generalfeedback = '';\n $mc->generalfeedbackformat = FORMAT_HTML;\n\n $mc->shuffleanswers = 0;\n $mc->answernumbering = 'none';\n $mc->layout = qtype_multichoice_base::LAYOUT_DROPDOWN;\n\n $mc->answers = array(\n 13 => new question_answer(13, 'Bow-wow', 0,\n 'You seem to have a dog obsessions!', FORMAT_HTML),\n 14 => new question_answer(14, 'Wiggly worm', 0,\n 'Now you are just being rediculous!', FORMAT_HTML),\n 15 => new question_answer(15, 'Pussy-cat', 1,\n 'Well done!', FORMAT_HTML),\n );\n $mc->qtype = question_bank::get_qtype('multichoice');\n $mc->maxmark = 1;\n\n $q->subquestions = array(\n 1 => $sa,\n 2 => $mc,\n );\n\n return $q;\n }", "public function createQuestionAndAnswers () {\n global $tpl, $lng, $ilCtrl, $ilTabs;\n\n // create wizard object\n include_once('class.ilObjMobileQuizWizard.php');\n $wiz = new ilObjMobileQuizWizard();\n\n\n $ilTabs->activateTab(\"editQuiz\");\n\n\n if ($wiz->checkInput()){\n $wiz->createQuestionAndAnswers($this->object);\n ilUtil::sendSuccess($this->txt(\"question_obj_create\"), true);\n $ilCtrl->redirect($this, \"editQuiz\");\n }\n $this->initAddQuestionAndAnswersFormAfterError();\n //$tpl->setContent(\"Test\");\n }", "function create_question_set($title, $points) {\n $set = array();\n $set['title'] = $title;\n $set['points'] = $points;\n return $set;\n}", "public function run()\n {\n $data = [\n [\n 'title' => 'Общие и финансовые вопросы',\n 'questions' => [\n [\n 'general' => true,\n 'title' => 'Как я могу узнать, какой у меня подключен тарифный план и до какого числа оплачен интернет?',\n 'description' => 'Ознакомиться с этой информацией можно несколькими способами: - В личном кабинете в разделе «Интернет – Услуги». - Для владельцев Apple разработано удобное приложение “SkyNet Личный кабинет”. Найти приложение можно в магазине приложений AppStore по запросу \"SkyNet. Требования: iPhone, iPod, iPad с операционной системой iOS 7.1 и выше. - Обратиться по телефону в Отдел Поддержки Пользователей SkyNet (тел.: 386-20-20)'\n ],\n [\n 'general' => true,\n 'title' => 'Подключение банковской карты в Личном кабинете',\n 'description' => 'Заходим в Личный кабинет, в раздел «Автоматическая оплата картой». Нажимаем «Подключить карту». Заполняем все поля. Имя держателя карты вводится заглавными латинскими буквами. Для не именных карт указываем «NO NAME». Нажимаем «Подтвердить». Возвращаемся в Личный кабинет. Нажимаем «Активировать карту». На карте резервируются две суммы: — 1 рубль для проверки активности карты; — Случайная сумма от 0,01 до 9,99 рублей. Данную сумму (три цифры без запятых) необходимо ввести в поле «Сумма авторизации (в копейках)» в течение 15 минут. Сумма вводится в формате кода, например: для суммы 5 р. 56 коп. необходимо ввести — 556; Если Вы не получили SMS с суммой авторизации, пожалуйста, обратитесь в банк-держатель карты. Нажимаем «Подтвердить». После регистрации карты зарезервированные суммы возвращаются на банковскую карту. Нажимаем «Вернуться в личный кабинет». Карта успешно подключена! Теперь Вы можете оплатить через «Разовое пополнение» или включить «Автопополнение».'\n ],\n [\n 'general' => true,\n 'title' => 'Как подключить оповещения в Telegram от SkyNet?',\n 'description' => 'Каждый абонент сети SkyNet может пользоваться услугой информирования в Telegram. Это можно сделать следующим образом. Прежде всего Вам потребуется установить мессенджер Telegram на устройство. Это может быть смартфон по управлением ОС iOS или Android, а так же устройство на ОС Windows или MAC OS. Ссылки на загрузку приложения: OS Android; iOS; Windows Phone; Для Android: Откройте Play Market на Вашем устройстве В поиске введите «Telegram» или «Телеграмм» Нажмите кнопку «Установить» Запустите приложение. После этого введите номер своего мобильного телефона. На указанный Вами номер поступит СМС-уведомление с кодом активации приложения. Введите код в соответствующее поле. Для iOS. Откройте AppStore на Вашем устройстве. В поиске введите «Telegram» или «Телеграмм» Нажмите кнопку «Установить» После этого откройте приложение. Введите Ваш номер телефона. Затем введите номер своего мобильного телефона. На указанный Вами номер поступит СМС-уведомление с кодом активации приложения. Введите код в соответствующее поле. Для ОС Windows и MAC OS: Загрузите клиент с официального сайта программы. После этого запустите процесс установки. Подключить оповещения от любимого провайдера SkyNet можно следующим образом: 1. Пройдите по ссылке и нажмите кнопку «Join». 2. - Запустите Telegram; - Нажмите поиск (кнопка лупа). В поиске введите «skntbot» - Нажмите кнопку «Start» - После этого разрешите приложению использовать Ваш номер телефона, нажав кнопку «OK» - Затем нажмите кнопку «Продолжить» После этого Вы можете использовать функции нашего бота. Он будет оповещать Вас о: Балансе своего счета; Предстоящих списаниях и зачислении средств; Ремонтных работах. Обратите внимание! Ваш номер телефона, указанный в Telegram, так же должен быть указан в Личном кабинете SkyNet в разделе «Настройка SMS-оповещения».'\n ],\n [\n 'general' => true,\n 'title' => 'Я внес средства на лицевой счет, как я могу узнать об их поступлении?',\n 'description' => '- В личном кабинете в разделе «Баланс и платежи» - Через приложение «SkyNet Личный кабинет» (для владельцев Apple iOS) - Вы можете подключить услугу «SMS-чек» в личном кабинете и после внесения денежных средств вам на телефон будет приходить SMS-сообщение об их поступлении.'\n ],\n [\n 'title' => 'Я хочу сменить тариф. Как это сделать?',\n 'description' => 'Сменить тариф Вы можете в личном кабинете. Для смены тарифа в личном кабинете выбираете раздел «Интернет» -> «Услуги». В разделе «Услуги» нажимаете «Сменить текущий/будущий тариф», после этого откроется таблица с тарифами. В данной таблице выбираете желаемый тариф и нажимаете «Отправить»'\n ],\n [\n 'title' => 'Как я могу узнать пароль от личного кабинета?',\n 'description' => 'Пароль от личного кабинета предоставляется каждому клиенту при подключении. Если он был утерян, Вы можете его восстановить несколькими способами: - При входе в личный кабинет нажать кнопку «Забыли пароль» - на Ваш номер телефона придет SMS с новым паролем, сменить его Вы можете в любой момент в личном кабинете в разделе «Сменить пароль» - Обратиться в Отдел Поддержки Пользователей по телефону 386-20-20 или через онлайн-консультант.'\n ],\n [\n 'title' => 'Как я могу оплатить интернет без комиссии?',\n 'description' => 'Произвести оплату без комиссии Вы можете через терминалы Сбербанка в любом отделении банка, а также банковской картой в личном кабинете или на нашем сайте.'\n ],\n [\n 'title' => 'Я пропустил оплату, интернет не работает, но хотелось бы оплатить услуги банковской картой. Как я могу это сделать?',\n 'description' => '- Вы можете активировать «Отложенный платеж» в личном кабинете. Через 15 минут доступ в интернет восстановится, и можно будет оплатить услуги банковской картой через наш сайт. - Если Вы уже воспользовались услугой «Отложенный платеж», но оплатить не успели – Вы можете привязать банковскую карту к договору в личном кабинете в разделе «Оплата банковской картой» и после этого оплатить. Также, Вы можете подключить в личном кабинете «Автоплатеж» и более не беспокоиться об оплате – средства будут списываться с Вашей банковской карты автоматически.'\n ],\n [\n 'title' => 'Как привязать банковскую карту к договору в личном кабинете?',\n 'description' => 'Для того что бы привязать карту нужно зайти в Личный кабинет, в раздел «Оплата банковской картой» и нажать кнопку «Подключить карту». Далее: 1. Заполняем все поля; - Произойдёт резервирование средств на сумму 1 рубля для проверки активности карты. - Далее резервируется случайная сумма от 0,01 до 9,99 (с учётом копеек), после этого процедура регистрации карты переходит в режим ожидания ввода данной суммы, срок ожидания ограничен по времени - 2 часа. 2. Нажимаем «Вернуться в личный кабинет»; 3. Нажимаем «Активировать карту»; 4. В строке «Сумма авторизации» вводим сумму, которая была зарезервирована. Сумма вводится в формате кода, например: для суммы 5 р. 56 коп. необходимо ввести - 556; 5. Нажимаем «Подтвердить». После успешной регистрации карты, зарезервированные суммы возвращаются на банковскую карту.'\n ],\n [\n 'title' => 'Я случайно оплатил на неверный номер договора, что делать?',\n 'description' => 'Вам нужно написать заявление на [email protected], либо приехать в офис с паспортом и чеком. В заявлении должно быть указано: 1. Ф.И.О. полностью 2. Паспортные данные 3. Дата оплаты 4. Верный ID 5. Неверный ID 6. Сумма к зачислению 7. Число 8. Подпись 9. Копия чека (это может быть скан или четкая фотография) На почте заявление рассматривается от 1 до 7 дней в порядке очереди, но как правило это происходит быстрее, в течение 1-2 дней. В офисе денежные средства переведут сразу при Вас.'\n ],\n [\n 'title' => 'Как добавить номер телефона в Личном кабинете?',\n 'description' => 'Чтобы указать номер телефона в Личном кабинете: 1. Слева, в разделе «SMS-услуги» выбираем «Мой телефон» 2. В поле «Текущий номер телефона для оповещений» указываем номер телефона и нажимаем кнопку «Сохранить».'\n ],\n [\n 'title' => 'Я оплатил банковской картой с сайта, но деньги не дошли, почему?',\n 'description' => '— чтобы выяснить это, нам потребуется «Идентификатор транзакции», который отображается после проведения платежа (выделен красным на рисунке ниже). Вы можете передать его нам любым удобным для вас способом: – обращением из ЛК; – по почте [email protected]; – через чат с нашего сайта; – по телефону 386–2020 (круглосуточно). Если Вы вдруг не сохранили «Идентификатор транзакции», необходимо обращаться в банк, который выпустил Вашу карту. Заметим, что данный процесс может занимать значительное время (в зависимости от банка, время реакции может различаться), поэтому настоятельно рекомендуем сохранять его до поступления Вашего платежа на счёт.'\n ],\n ]\n ],\n [\n 'title' => 'Техническая поддержка: Интернет',\n 'questions' => [\n [\n 'general' => true,\n 'title' => 'Я подключил кабель интернета в новое устройство, но Интернет не заработал. Почему?',\n 'description' => 'Я подключил кабель интернета в новое устройство, но Интернет не заработал. Почему? Необходимо зарегистрировать Ваше устройство в сети, для этого потребуется Физический (MAC) адрес нового оборудования. Физический адрес Вашего устройства нужно указать в Личном кабинете. · Зайдите в Личный кабинет; · Зайдите в раздел «Услуги»; · Нажмите кнопку «Сменить мак-адрес»; · В поле для ввода укажите физический адрес Вашего устройства, затем нажмите «Сохранить». Так же Вы можете зарегистрировать новое устройство в приложении «SkyNet Личный кабинет». После регистрации нового устройства доступ появится в течение 10 минут.'\n ],\n [\n 'general' => true,\n 'title' => 'Как узнать Физический (MAC) адрес моего компьютера?',\n 'description' => 'Windows 7 Необходимо открыть меню Пуск; Затем выбрать Панель управления; После этого Сеть и интернет; Далее Центр управления сетями и общим доступом, там нужно выбрать Изменение параметров адаптера; Нажмите левой кнопкой мыши дважды по значку Подключение по локальной сети; в выпадающем меню выберите пункт Состояние, кнопка Сведения; В открывшемся окне найдите строчку Физический адрес. Windows 8/8.1/10 Необходимо нажать на клавиатуре одновременно клавишу \"Windows\" и английскую клавишу \"X\"; В открывшемся списке выберите Панель управления; После этого Сеть и интернет; Далее Центр управления сетями и общим доступом, там нужно выбрать Изменение параметров адаптера; Нажмите левой кнопкой мыши дважды по значку Ethernet; В выпадающем меню выберите пункт Состояние, кнопка Сведения; В открывшемся окне найдите строчку Физический адрес. Mac OS X 10.5 и новее Необходимо перейти в Системные настройки; Далее Сеть, после этого нужно выбрать подключение Ethernet; Затем Дополнительно, дальше Ethernet; В поле Идентификатор Ethernet находится MAC-адрес.'\n ],\n [\n 'title' => 'Как можно сменить IP-адрес?',\n 'description' => 'Внешний IP-адрес можно сменить в личном кабинете в разделе «Интернет» → «Услуги».'\n ],\n [\n 'title' => 'Какие порты блокируются в сети SkyNet?',\n 'description' => 'В нашу сеть закрыт доступ из глобальной сети по следующим портам: 68 – порт DHCP; 135, 137, 138, 139 – порты NETBIOS; 445 – порт MICROSOFT-DS. Так же закрыт доступ из глобальной сети для порта 53 (UDP). Это означает, что из интернета нельзя сделать запрос к DNS-серверам пользователей нашей сети, зато сами пользователи по-прежнему могут отправлять такие запросы в интернет и получать ответ. Это обусловлено тем, что иногда пользователи некорректно настраивают свои домашние сервера и совершают неумышленные сетевые атаки на сторонние ресурсы, приводящие к отключению или перезагрузке сетевого оборудования. Если вы все-таки хотите настроить у себя дома полноценный DNS-сервер, рекомендуем ознакомиться с разделом «Хостинг DNS» в личном кабинете.'\n ],\n [\n 'general' => true,\n 'title' => 'Настройка роутера Dlink DIR-615S',\n 'description' => 'Подключение и обновление ПО роутера Кабель сети SkyNetTelecom соедините с портом INTERNET (WAN) на роутере; Стационарные компьютеры внутренней сети соедините с портами LAN на роутере. ВНИМАНИЕ! Категорически запрещается соединять кабель сети SkyNet с портами LAN. Настройка интернета и доступа к Wi-Fi После подключения роутера к компьютеру откройте браузер (Firefox, Google Chrome, Opera или Safari) и в адресной строке наберите: 192.168.0.1 Появится страница авторизации. Введите пароль «admin», который в дальнейшем будете использовать для настройки роутера, и нажмите «Save» После входа на главную страницу нажмите «Статус». В пункте «Сетевая статистика» найдите «WAN» и соответствующее значение «MAC». MAC-адрес необходим для регистрации роутера в сети SkyNetTelecom. Узнать о способах регистрации устройства можно здесь. Зайдите на вкладку «Сеть», выберите «WAN» Далее нажмите на имя соединения. Следуйте настройкам согласно рисунку и нажмите «Применить» В пункте «Wi-Fi» зайдите в основные настройки. Установите все как на представленном рисунке и нажмите «Применить». После возврата в главное меню в окне предупреждения нажмите кнопку «Сохранить». Далее выберите в разделе «Wi-Fi» пункт «Настройка безопасности». В пункте «Сетевая аутентификация» из выпадающего списка выберите «WPA-PSK/WPA2-PSK mixed». Введите пароль (не менее 8 символов) в пункте «Ключ шифрования PSK». Он в дальнейшем будет использоваться для ограничения доступа к Вашей беспроводной сети. Остальные настройки осуществите, как указано на рисунке. Нажмите «Применить». После возврата в главное меню в окне предупреждения нажмите кнопку «Сохранить» Настройка IPTV Зайдите в пункт «Начало», там выберите раздел «Мастер настройки IPTV» Выберите порт(ы), к которому будет подключена приставка, и нажмите «Сохранить» После возврата в главное меню в окне предупреждения нажмите кнопку «Сохранить» Зайдите в раздел «Дополнительно», выберите вкладку «Разное». Установите все как на представленном рисунке и нажмите «Применить». Если ваше устройство не поддерживает Multicast (SmartTV с OS TIZEN, мобильные устройства), необходимо включить сервер UDP-to-HTTP Proxy. На вкладке «Разное» должны быть следующие настройки После внесения изменений нажмите «Применить». Настройка удаленного доступа Зайдите в раздел «Дополнительно», выберите вкладку «Удаленный доступ к устройству». Нажмите кнопку «Добавить» В появившемся окне установите следующие настройки: После внесения изменений нажмите «Применить». Настроив функцию таким образом, мы можем гарантировать, что подключиться к роутеру для удаленной настройки сможет только сотрудник SkyNetTelecom.'\n ],\n [\n 'title' => 'Настройка роутера Zyxel',\n 'description' => 'Подключение и настройка · кабель сети SkyNet Telecom соедините с портом «ИНТЕРНЕТ» (WAN) на роутере; · стационарные компьютеры внутренней сети соедините с портами «ДОМАШНЯЯ СЕТЬ» (LAN) на роутере. ВНИМАНИЕ! Категорически запрещается соединять кабель сети SkyNet Telecom с портами LAN. После подключения роутера к компьютеру откройте браузер (Firefox, Google Chrome, Opera или Safari) и в адресной строке наберите: 192.168.1.1 Появится страница быстрой настройки, выберите «Веб-конфигуратор» В открывшимся окне найдите поле «MAC-адрес». Это значение необходимо для регистрации роутера в сети SkyNet Telecom. Узнать о способах регистрации устройства можно здесь. Зайдите на вкладку «Интернет» Затем на вкладке «Подключения» зайдите в «Broadbandconnection» Убедитесь, что все настройки соответствуют указанным на картинке. После внесения изменений, нажмите «Применить» Настройка Wi-Fi Зайдите на вкладку «Сеть Wi-Fi» Во вкладке «Точка доступа» установите следующие настройки и нажмите «Применить» НастройкаIPTV Для работы IPTV по кабелю и по Wi-Fi необходимы следующие настройки: Зайдите на вкладку «Домашняя сеть» На вкладке «IGMP Proxy» должны быть следующие настройки После внесения изменений нажмите «Применить» Если ваше устройство не поддерживаетMulticast (SmartTVс OS TIZEN, мобильные устройства), необходимо включить сервер UDP-to-HTTP Proxy. На вкладке «Серверudpxy» должны быть следующие настройки После внесения изменений нажмите «Применить». Обновление и установка компонентов Некоторых компонентов может не хватать для работы, а некоторые компоненты не нужны, поэтому их можно удалить. Для этого зайдите на вкладку «Система» На вкладке «Обновление» нажмите кнопку«Показать компоненты» оставьте галочки только на следующих и нажмите «Обновить». · ПлатформаNDMS; · IPv6 · UDP-HTTPпрокси(udpxy) · Модуль управления маршрутизатором через облачную службу · ИнтерфейсWi-Fi; · СлужбаIGMP/PPPoEproxy; · СерверDHCP; · СлужбаUPnP; · БиблиотекаSSL. Некоторые компоненты могут отсутствовать на разных моделях роутеров. Настройка удаленного доступа Зайдите на вкладку «Безопасность» на вкладке «Межсетевой экран» нажмите кнопку «Добавить правило» в появившемся окне установите следующие настройки: Нажмите «Сохранить» Настроив функцию таким образом, мы можем гарантировать, что подключиться к роутеру для удаленной настройки сможет только сотрудник SkyNetTelecom.'\n ],\n [\n 'title' => 'Настройка роутера TP-Link',\n 'description' => 'Подключение роутера Настройка роутера предоставлена с целью облегчения подключения нескольких компьютеров к локальной и интернет-сети в пределах квартиры. кабель сети SkyNet Telecom соедините с портомWAN (выделен другим цветом) на роутере; стационарные компьютеры иприставки IPTV внутренней сети соедините с портами LAN на роутере. ВНИМАНИЕ! Категорически запрещается соединять кабель сети SkyNet Telecom с портами LAN. Настройка интернета и доступа к Wi-Fi После подключения роутера к компьютеру откройте браузер (Firefox, Google Chrome, Opera или Safari), в адресной строке наберите: 192.168.0.1 Появится страница авторизации. Введите «admin»в два поля и нажмите «Вход». Зайдите на вкладку «Состояние». В разделе «WAN» найдите поле«MAC-адрес». Это значение необходимо для регистрации роутера в сети SkyNet Telecom. Узнать о способах регистрации устройства можно здесь. Зайдите на вкладку «Сеть». В разделе «WAN» в поле «Тип WAN соединения» выберите из списка «ДинамическийIP-адрес». Если изменения внесены, нажмите кнопку «Сохранить». Если потребуется, перезагрузите роутер. Зайдите на вкладку «Беспроводной режим». В разделе «Настройки беспроводного режима» установите настройки,аналогичные представленным на рисунке. После внесения изменения, нажмите кнопку «Сохранить». Если потребуется, перезагрузите роутер. В разделе «Защита беспроводного режима» выберите шифрование данных «WPA-Personal/WPA2-Personal (Рекомендуется)».В поле «Версия» из выпадающего списка выберите «WPA2-Personal» и в поле «Шифрование»из выпадающего списка выберите «AES» В поле «Пароль PSK» введите ключ защиты.Он в дальнейшем будет использоваться как пароль для ограничения доступа к Вашей беспроводной сети. По окончании настроек нажмите на кнопку «Сохранить», чтобы применить внесенные изменения. Если потребуется,перезагрузите роутер. Настройка IPTV Зайдите на вкладку «Сеть», в раздел «IPTV». В поле «Режим» из выпадающего списка выберите «Мост». В поле «Порт для IPTV» выберите тот порт(ы), к которому будет подключена IPTV приставка.'\n ],\n [\n 'title' => 'Настройка роутера Asus',\n 'description' => 'Подключение роутера кабель сети SkyNet Telecom соедините с портом INTERNET (выделен отдельным цветом) на роутере; стационарные компьютеры внутренней сети соедините с портами LAN на роутере. ВНИМАНИЕ! Категорически запрещается соединять кабель сети SkyNet Telecom с портами LAN. Настройка интернета После подключения роутера к компьютеру откройте браузер (Firefox, Google Chrome, Opera или Safari) и в адресной строке наберите: 192.168.1.1 Появится страница авторизации. Введите «admin» в два поля и нажмите «Вход». Зайдите в меню «Интернет» во вкладку «Подключение» Убедитесь, что все настройки соответствуют указанным на картинке. После внесения изменений, нажмите «Применить». При желании Вы можете использовать функцию клонирования MAC-адреса, если до этого Ваш компьютер был подключен к нашей сети напрямую. Это избавит Вас от необходимости звонить в службу поддержки при подключении интернет-кабеля к роутеру. Либо вы можете внести MAC-адрес нового устройства в личном кабинете в разделе интернет –услуги – сменить мак адрес. Настройка Wi-Fi Зайдите в меню «Беспроводная сеть» Введите желаемое название беспроводной сети в поле «SSID». Далее установите режим защиты как показано на картинке, придумайте ключ сети и запишите его в поле «Предварительный ключWPA». Нажмите кнопку «Применить» Настройка IPTV Для работы IPTV по кабелю и по Wi-Fi необходимы следующие настройки: Зайдите в разделе «Локальная сеть» на вкладку «IPTV» За трансляцию IPTV отвечает функция «Включить многоадресную маршрутизацию (IGMP Proxy)» и «Включить IGMP Snooping». Установите параметры в соответствии с изображением. Примечание: на некоторых младших моделях роутеров может отсутствовать параметр «Включить IGMP Snooping». В этом случае достаточно установки только первого параметра.'\n ],\n [\n 'title' => 'Настройка роутера D-Link',\n 'description' => 'Подключение и обновление ПО роутера кабель сети SkyNet Telecom соедините с портом INTERNET (WAN) на роутере; стационарные компьютеры внутренней сети соедините с портами LAN на роутере. ВНИМАНИЕ! Категорически запрещается соединять кабель сети SkyNet с портами LAN. Настройка интернета и доступа к Wi-Fi После подключения роутера к компьютеру откройте браузер (Firefox, Google Chrome, Opera или Safari) и в адресной строке наберите: 192.168.0.1 Появится страница авторизации. Введите пароль «admin», который в дальнейшем будете использовать для настройки роутера,и нажмите «Save» После входа на главную страницу нажмите «Расширенные настройки». В пункте «Сеть» найдите и выберите «WAN». Нажмите на предложенное подключении WAN для его редактирования. Следуйте настройкам согласно рисунку. При желании Вы можете использовать функцию клонирования MAC-адреса, если до этого Ваш компьютер был подключен к нашей сети напрямую. Это избавит Вас от необходимости звонить в службу поддержки при подключении интернет-кабеля к роутеру. Либо вы можете внести MAC-адрес нового устройства в личном кабинете в разделе интернет –услуги – сменить мак адрес. После возврата в главное меню в окне предупреждения нажмите кнопку «Сохранить». В пункте «Wi-Fi» зайдите в основные настройки. Установите все как на представленном рисунке и нажмите «Изменить». После возврата в главное меню в окне предупреждения нажмите кнопку «Сохранить». Далее выберите в разделе «Wi-Fi» пункт«Настройка безопасности». В пункте «Сетевая аутентификация» из выпадающего списка выберите «WPA-PSK/WPA2-PSK mixed». Введите пароль в пункте «Ключ шифрования PSK». Он в дальнейшем будет использоваться для ограничения доступа к Вашей беспроводной сети. Остальные настройки осуществите, как указано на рисунке.Нажмите «Изменить». После возврата в главное меню в окне предупреждения нажмите кнопку «Сохранить» Настройка IPTV Зайдите в пункт «Мастер настройкиIPTV» Выберите порт(ы), к которому будет подключена приставка, и нажмите «Изменить» После возврата в главное меню в окне предупреждения нажмите кнопку «Сохранить»'\n ],\n [\n 'general' => true,\n 'title' => 'Я замеряю скорость по кабелю, и она ниже тарифной, почему так?',\n 'description' => 'Выделим три момента: Удалённость ресурса от Вас Когда сайт за пределами нашей сети, на пример, в Лондоне, то скорость будет изменяться в зависимости от пройденного сигналом расстояния и количества различных узлов связи до ресурса. Не все сегменты этого пути принадлежат провайдеру, а в таком случае гарантировать скорость мы сможем в пределах нашей сети. Сайты для измерения скорости Любой сайт измерения скорости – это чьё-то оборудование с ограниченной полосой пропускания. В тот момент, когда возникает нагрузка от большого количества пользователей, сайт делит свои ресурсы между всеми. Можно измерить скорость трижды подряд и получить совершенно разные результаты. И браузер, и загружаемый для замера скорости файл используют ресурсы вашего устройства: процессор, память, жёсткий диск и браузер. Точность результатов измерения может зависеть от этих характеристик. Так же обратите внимание на местоположение сервера, ведь чтобы получить более реальные показатели, он должен находиться в Санкт-Петербурге. Технические особенности При передаче данных в сети, определённая их часть всегда тратится на технические нужды, такие, как адрес отправителя и получателя, размер пакета, флаги, время жизни пакета и т.д. Это не зависит от провайдера. Это свойство работы Операционной Системы (компьютера,планшета, роутера) с различными сетевыми протоколами. Все эти технические данные всегда добавляются к скачиваемой вами информации, из-за чего отображаемый показатель скорости может быть до 6% ниже заявленной. Если вы видите значительную разницу между тарифной и фактической скоростями, пожалуйста, обратитесь в нашу службу поддержки для диагностики. Мы поможем!'\n ],\n ]\n ],\n [\n 'title' => 'Техническая поддержка: Цифровое ТВ',\n 'questions' => [\n [\n 'general' => true,\n 'title' => 'Я хочу подключить Цифровое ТВ.',\n 'description' => 'Цифровое ТВ доступно на тарифах: Вода, Вода HD, Огонь и Огонь HD. Просматривать Цифровое телевидение можно несколькими способами: На мониторе компьютера: загрузите и установите VLC-плеер, затем загрузите и запустите плейлист со списком каналов. Для просмотра на телевизоре SAMSUNG с функцией SMART TV: загрузите и установите приложение SkyNet.TV в магазине приложений SAMSUNG APPS. Данное приложение совместимо только с телевизорами выпуска 2013 – 2015 годов. Узнать какого года выпуска ваш телевизор можно здесь. Для просмотра на экране любого другого телевизора необходима IPTV-приставка.'\n ],\n [\n 'general' => true,\n 'title' => 'Как настроить роутер для просмотра Цифрового телевидения?',\n 'description' => 'Прежде всего роутер должен поддерживать функцию – Multicast (IGMP). Если Вы используете нашу IPTV приставку при подключении Интернета через роутер, рекомендуем на последнем настроить выделение порта под ТВ. TP-link: В адресной строке браузера необходимо ввести 192.168.0.1 (192.168.1.1); В поле Имя пользователя нужно ввести admin, в поле пароль admin; Заходим в раздел \"Сеть\"; Выбираем подпункт \"Мост\" или \"IPTV\"; В строке - \"Порт LAN, соединенный в режиме \"Мост\" с WAN\" выбираем нужный нам порт под IPTV приставку. D-link: В адресной строке браузера необходимо ввести 192.168.0.1 (192.168.1.1); В поле Имя пользователя нужно ввести admin, в поле пароль admin (либо оставить пустым); На главной странице веб-интерфейса выбираем раздел \"IP Телевидение\" и подраздел \"Мастер настройки IPTV\" или “IPTV”; Далее щелкаем по нужному порту для IPTV. ZyXEL: микропрограмма NDMS V1 В адресной строке браузера необходимо ввести 192.168.1.1; В поле Имя пользователя нужно ввести admin, в поле пароль - 1234; Слева в категориях выбираем \"Домашняя сеть\", далее подгруппа \"IP-телевидение; Выбираем \"Назначить разъем LAN\" в строке \"Режим TVport\"; Ниже в \"Разъем для ресивера IPTV\" выбираем нужным нам LAN порт. микропрограмма NDMS V2 В адресной строке браузера необходимо ввести 192.168.1.1; В поле Имя пользователя нужно ввести admin, в поле пароль - 1234; В панели значков выбираем значок глобуса \"Интернет\"; Далее выбираем активное подключение в списке \"Подключения к интернету и другим сетям\"; В новом окне ставим галочку в строке \"Использовать разъем\" под нужным LAN портом. Upvel: В адресной строке браузера необходимо ввести 192.168.10.1; В поле Имя пользователя нужно ввести admin, в поле пароль - admin; На главной странице веб-интерфейса нажимаем на \"Настройки\"; Далее настройки VLAN; Ставим галочку напротив \"Включить VLAN\"; Напротив нужного для нас LAN порта - \"Ethernet Port #\" ставим галочку и выбираем под; категорией \"Forwarding Rule\" выбираем из списка тип \"Bridge\", под категорией \"Priority\" в случае лагов, можно поднимать приоритет до значения \"7\", NetGear: В адресной строке браузера необходимо ввести 192.168.1.1; В поле Имя пользователя нужно ввести admin, в поле пароль - password; В левой части главной страницы, есть \"Меню быстрого перехода\", там выбираем \"Настройки\", далее пункт \"Параметры интернет-порта\"; В строке \"Перенаправить IPTV-поток для приставки на\" выбираем нужным нам LAN порт. ASUS: В адресной строке браузера необходимо ввести 192.168.1.1; В поле Имя пользователя нужно ввести admin, в поле пароль - admin; На главной странице веб-интерфейса, в левой части в списке выбирайте \"Локальная сеть\"; Сверху в открывшемся окне выбираем категорию \"IPTV\". В строке \"Выбор порта IPTV STB\"; выбираем нужный нам LAN порт из предложенного списка.'\n ],\n [\n 'general' => true,\n 'title' => 'Как настроить IPTV на телевизорах Samsung (Tizen)',\n 'description' => 'Один из способов просмотра IPTV — приложение SkyNet.TV на Samsung Smart TV для моделей, выпущенных после 2013 года. Установить приложение можно следующим образом: На телевизоре SAMSUNG SMART TV нажимаем на кнопку SMART HUB; Переходим в раздел ПРИЛОЖЕНИЯ и выбираем иконку SAMSUNG APPS; В поиске набираем латиницей «SkyNet»; Нажимаем «УСТАНОВИТЬ» бесплатное приложение «SkyNet»; Запускаем его; Наслаждаемся множеством каналов и отличной картинкой. С 2015 года компания Samsung выпускает телевизоры с операционной системой Tizen, которая не поддерживает функцию multicast. Для воспроизведения требуется дополнительное оборудование – роутер с поддержкой функции udpxy. В качестве такого устройства можно выбрать ZyXEL Keenetic Lite III. Настроить его можно следующим образом: В адресную строку браузера необходимо ввести адрес роутера: 192.168.1.1. Для входа в настройки потребуется авторизация (по умолчанию имя пользователя «admin», пароль такой же). В веб-интерфейсе необходимо открыть пункт Домашняя сеть. Выбрать вкладку Сервер udpxy Если при этом на роутере включен multicast (IGMP proxy), появится предупреждение, что одновременно использовать функции невозможно. В этом же окне есть кнопка для отключения IGMP Proxy. Нажав ее, можно будет продолжить настройку. При включении функции udpxy роутер автоматически предложит номер TCP-порта (по умолчанию – 4022), этот номер необходимо запомнить - он потребуется для дальнейшей настройки приложения на телевизоре. Нажимаем кнопку Применить и перезагружаем роутер. Далее потребуется настройка приложения. Выбираем пункт Меню, далее Настройки → Видео и аудио → Udp прокси → Включить. В появившемся окне нужно ввести адрес роутера и номер выбранного порта (192 - 168 - 1 - 1 - 4022)'\n ],\n ]\n ]\n ];\n\n foreach ($data as $key => $value) {\n $type = factory(QuestionType::class)->create([\n 'published' => true,\n 'title' => $value['title'],\n ]);\n foreach ($value['questions'] as $question) {\n factory(Question::class)->create(array_merge($question, [\n 'published' => true,\n 'question_type_id' => $type->id,\n ]));\n }\n }\n }", "function guifi_radio_add_link2ap_submit(&$form,&$form_state) {\n $radio_id =$form_state['clicked_button']['#parents'][1];\n $interface_id=$form_state['clicked_button']['#parents'][2];\n guifi_log(GUIFILOG_TRACE,\n sprintf(\"function guifi_radio_add_link2ap_submit(Radio: %d, Interface: %d)\",\n $radio_id, $interface_id),\n $form_state['clicked_button']['#parents']);\n\n $form_state['rebuild'] = TRUE;\n $form_state['action'] = 'guifi_radio_add_link2ap_form';\n\n // initialize the filters\n $form_state['filters'] = array(\n 'dmin' => 0,\n 'dmax' => 10,\n 'search' => NULL,\n 'type' => 'ap/client',\n 'mode' => $form_state['values']['radios'][$radio_id]['mode'],\n 'from_node' => $form_state['values']['nid'],\n 'from_device' => $form_state['values']['id'],\n 'from_radio' => $radio_id,\n 'azimuth' => \"0,360\",\n );\n\n $form_state['link2apInterface'] =\n &$form_state['values']['radios'][$radio_id]['interfaces'][$interface_id];\n\n return;\n}" ]
[ "0.5851053", "0.55911535", "0.5372921", "0.5343518", "0.5342001", "0.53135383", "0.5303237", "0.5252377", "0.5118637", "0.5106243", "0.5092101", "0.5055059", "0.5021198", "0.5008819", "0.49969587", "0.49287325", "0.49158427", "0.4912691", "0.4900946", "0.48587927", "0.4856847", "0.48421472", "0.48239562", "0.48222768", "0.4813508", "0.48067412", "0.47975975", "0.47958273", "0.47798997", "0.47796124", "0.4766512", "0.47432205", "0.47319105", "0.4711188", "0.47102958", "0.47068322", "0.47060537", "0.46911857", "0.46847892", "0.46765625", "0.4669285", "0.46669215", "0.46562332", "0.4654035", "0.46483618", "0.46483403", "0.46470532", "0.46450227", "0.46437111", "0.46384144", "0.46299973", "0.4629914", "0.462823", "0.46253118", "0.4622993", "0.46216527", "0.46162343", "0.46151736", "0.4612979", "0.4605235", "0.46027917", "0.46011493", "0.45951188", "0.45894074", "0.45879343", "0.45848486", "0.458465", "0.45799136", "0.4577065", "0.4570759", "0.45700458", "0.45687464", "0.456873", "0.45620716", "0.45500866", "0.453641", "0.4531706", "0.45287704", "0.45178574", "0.4512111", "0.4510875", "0.45063886", "0.4497621", "0.44841528", "0.4480395", "0.44720808", "0.44714463", "0.44695637", "0.4447326", "0.44455135", "0.4442955", "0.4433087", "0.44327685", "0.4430775", "0.44155976", "0.44133908", "0.44047648", "0.4403539", "0.44002813", "0.43985906" ]
0.73485553
0
Estrutura da tabela fornecedores
public function up() { Schema::create('fornecedors', function (Blueprint $table) { $table->increments('id'); $table->string('cnpj', 20)->unique(); $table->string('nome', 45); $table->string('email', 45)->unique()->nullable(true); $table->string('telefone', 15)->nullable(true); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTablas() {\r\n $tablas['inventario_equipo']['id']='inventario_equipo';\r\n $tablas['inventario_equipo']['nombre']='Inventario (equipo)';\r\n\r\n $tablas['inventario_grupo']['id']='inventario_grupo';\r\n $tablas['inventario_grupo']['nombre']='Inventario (grupo)';\r\n\r\n $tablas['inventario_estado']['id']='inventario_estado';\r\n $tablas['inventario_estado']['nombre']='Inventario (estado)';\r\n\r\n $tablas['inventario_marca']['id']='inventario_marca';\r\n $tablas['inventario_marca']['nombre']='Inventario (marca)';\r\n\r\n $tablas['obligacion_clausula']['id']='obligacion_clausula';\r\n $tablas['obligacion_clausula']['nombre']='Obligacion (clausula)';\r\n\r\n $tablas['obligacion_componente']['id']='obligacion_componente';\r\n $tablas['obligacion_componente']['nombre']='Obligacion (componente)';\r\n\r\n $tablas['documento_tipo']['id']='documento_tipo';\r\n $tablas['documento_tipo']['nombre']='Documento (Tipo)';\r\n\r\n \t\t$tablas['documento_tema']['id']='documento_tema';\r\n \t\t$tablas['documento_tema']['nombre']='Documento (Tema)';\r\n\r\n \t\t$tablas['documento_subtema']['id']='documento_subtema';\r\n \t\t$tablas['documento_subtema']['nombre']='Documento (Subtema)';\r\n\r\n \t\t$tablas['documento_estado']['id']='documento_estado';\r\n \t\t$tablas['documento_estado']['nombre']='Documento (Estado)';\r\n\r\n \t\t$tablas['documento_estado_respuesta']['id']='documento_estado_respuesta';\r\n \t\t$tablas['documento_estado_respuesta']['nombre']='Documento (Estado Respuesta)';\r\n\r\n \t\t$tablas['documento_actor']['id']='documento_actor';\r\n \t\t$tablas['documento_actor']['nombre']='Documento (Responsables)';\r\n\r\n \t\t$tablas['documento_tipo_actor']['id']='documento_tipo_actor';\r\n \t\t$tablas['documento_tipo_actor']['nombre']='Documento (Tipo de Responsable)';\r\n\r\n \t\t$tablas['riesgo_probabilidad']['id']='riesgo_probabilidad';\r\n \t\t$tablas['riesgo_probabilidad']['nombre']='Riesgo (Probabilidad)';\r\n\r\n \t\t$tablas['riesgo_categoria']['id']='riesgo_categoria';\r\n \t\t$tablas['riesgo_categoria']['nombre']='Riesgo (Categoria)';\r\n\r\n \t\t$tablas['riesgo_impacto']['id']='riesgo_impacto';\r\n \t\t$tablas['riesgo_impacto']['nombre']='Riesgo (Impacto)';\r\n\r\n \t\t$tablas['compromiso_estado']['id']='compromiso_estado';\r\n \t\t$tablas['compromiso_estado']['nombre']='Compromisos (Estado)';\r\n\r\n \t\t$tablas['departamento']['id']='departamento';\r\n \t\t$tablas['departamento']['nombre']='Departamentos';\r\n\r\n \t\t$tablas['departamento_region']['id']='departamento_region';\r\n \t\t$tablas['departamento_region']['nombre']='Departamentos (Region)';\r\n\r\n \t\t$tablas['municipio']['id']='municipio';\r\n \t\t$tablas['municipio']['nombre']='Municipios';\r\n\r\n $tablas['operador']['id']='operador';\r\n\t $tablas['operador']['nombre']='Operador';\r\n\r\n asort($tablas);\r\n return $tablas;\r\n }", "function table()\n {\n return array('pattern' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,\n 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL);\n }", "public function crearTablas(){\r\n\t\t\t$this->crearTablaUsuario();\r\n\t\t\t$this->crearTablaDeporte();\r\n\t\t\t$this->crearTablaUsuarioDeporte();\r\n\t\t\t$this->crearTablaPassw();\r\n\t\t}", "public function getTableData()\n\t{\n\t}", "public function getTabla(){\n return $this->table;\n }", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "function table()\n {\n\n $db = $this->getDatabaseConnection();\n $dbtype = $db->phptype; // Database type is stored here. Crazy but true.\n\n return array('user_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,\n 'yubikey_id' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,\n 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL,\n 'modified' => ($dbtype == 'mysql' || $dbtype == 'mysqli') ?\n DB_DATAOBJECT_MYSQLTIMESTAMP + DB_DATAOBJECT_NOTNULL :\n DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME\n );\n }", "function getTablas() {\n $tablas['departamento']['id'] = 'departamento';\n $tablas['departamento']['nombre'] = 'Departamentos';\n\n $tablas['departamento_region']['id'] = 'departamento_region';\n $tablas['departamento_region']['nombre'] = 'Departamentos (Region)';\n\n $tablas['municipio']['id'] = 'municipio';\n $tablas['municipio']['nombre'] = 'Municipios';\n\n $tablas['operador']['id'] = 'operador';\n $tablas['operador']['nombre'] = 'Operador';\n\n $tablas['pais']['id'] = 'pais';\n $tablas['pais']['nombre'] = 'Paises';\n\n $tablas['ciudad']['id'] = 'ciudad';\n $tablas['ciudad']['nombre'] = 'Ciudades';\n\n $tablas['familias']['id'] = 'familias';\n $tablas['familias']['nombre'] = 'Familias';\n\n $tablas['monedas']['id'] = 'monedas';\n $tablas['monedas']['nombre'] = 'Monedas';\n\n $tablas['cuentas_financiero']['id'] = 'cuentas_financiero';\n $tablas['cuentas_financiero']['nombre'] = 'Cuentas';\n\n $tablas['cuentas_financiero_ut']['id'] = 'cuentas_financiero_ut';\n $tablas['cuentas_financiero_ut']['nombre'] = 'Cuentas UT';\n\n $tablas['cuentas_financiero_tipo']['id'] = 'cuentas_financiero_tipo';\n $tablas['cuentas_financiero_tipo']['nombre'] = 'Tipos de Cuentas';\n\n $tablas['extracto_movimiento']['id'] = 'extracto_movimiento';\n $tablas['extracto_movimiento']['nombre'] = 'Movimientos';\n\n $tablas['centropoblado']['id'] = 'centropoblado';\n $tablas['centropoblado']['nombre'] = 'Centros Poblados';\n\n $tablas['encuesta_tipo']['id'] = 'encuesta_tipo';\n $tablas['encuesta_tipo']['nombre'] = 'Tipo de Encuesta';\n\n $tablas['actividades_tipo']['id'] = 'actividades_tipo';\n $tablas['actividades_tipo']['nombre'] = 'Planes de Actividades';\n\n $tablas['tipohallazgo']['id'] = 'tipohallazgo';\n $tablas['tipohallazgo']['nombre'] = 'Tipo Hallazgo';\n\n asort($tablas);\n return $tablas;\n }", "public function getTable();", "abstract public function getTable();", "abstract public function getTable();", "protected function tableModel()\n {\n }", "public function tabla()\n {\n\n \treturn Datatables::eloquent(Encargos::query())->make(true);\n }", "function getTabla() {\r\n return $this->tabla;\r\n }", "abstract protected function getTable();", "function tableData(){\n\t\t$entity_type = in(\"entity_type\");\t\t\n\t\t$table = $entity_type()->getTable();\n\t\t$test = in('test');\n\n\t\t// Table's primary key\n\t\t$primaryKey = 'id';\n\n\t\t// Array of database columns which should be read and sent back to DataTables.\n\t\t// The `db` parameter represents the column name in the database, while the `dt`\n\t\t// parameter represents the DataTables column identifier. In this case simple\n\t\t// indexes\n\t\t$columns = array(\n\t\t\tarray( \t'db' => 'id',\n\t\t\t\t\t'dt' => 0 \n\t\t\t\t ),\n\t\t\tarray( \t'db' => 'created', \n\t\t\t\t\t'dt' => 1, \n\t\t\t\t\t'formatter' => function( $d, $row ) {\n\t\t\t\t\t\tif( $d == 0 ) return 0;\n\t\t\t\t\t\treturn date( 'M d, Y H:i', $d);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t),\n\t\t\tarray( \t'db' => 'updated',\n\t\t\t\t\t'dt' => 2,\n\t\t\t\t\t'formatter' => function( $d, $row ) {\n\t\t\t\t\t\tif( $d == 0 ) return 0;\n\t\t\t\t\t\treturn date( 'M d, Y H:i', $d);\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t ),\n\t\t);\n\t\t\n\t\t$additional_columns = self::getAdditionalFields( $entity_type );\n\t\t\n\t\t$columns = array_merge( $columns, $additional_columns );\n\n\t\t// SQL server connection information\n\t\t$sql_details = array(\n\t\t\t'user' => 'root',\n\t\t\t'pass' => '7777',\n\t\t\t'db' => 'ci3',\n\t\t\t'host' => 'localhost'\n\t\t);\n\t\n\t\trequire( 'theme/admin/scripts/ssp.class.php' );\t\t\n\t\t$date_from = in(\"date_from\");\n\t\t$date_to = in(\"date_to\");\n\t\t$extra_query = null;\n\t\tif( !empty( $date_from ) ){\n\t\t\t$stamp_from = strtotime( $date_from );\n\t\t\t$extra_query .= \"created > $stamp_from\";\n\t\t}\n\t\tif( !empty( $date_to ) ){\n\t\t\t$stamp_to = strtotime( $date_to.\" +1 day\" ) - 1;\n\t\t\tif( !empty( $extra_query ) ) $extra_query .= \" AND \";\n\t\t\t$extra_query .= \"created < $stamp_to\";\n\t\t\t\n\t\t}\t\t\n\t\t\n\t\techo json_encode(\n\t\t\tSSP::complex( $_GET, $sql_details, $table, $primaryKey, $columns, $extra_query )\n\t\t);\n\t}", "function tabela($vetorComcadastros, $vetorComIndices){//Função que cria a tabela/lista recebe o vetor cos os cadsastros e outro com os indices\n retornaEscolhidos($vetorComcadastros, $vetorComIndices);//escreve a tabela\n }", "public function initTable(){\n\t\t\t\n\t\t}", "private function createTables() {\n \n foreach($this->G->tableInfo as $table) {\n $this->tables[$table[\"title\"]] = new IdaTable($table[\"title\"]);\n } \n }", "private function tbl_estados() {\r\n\t\t\t$this->estados = $this->esquema->createTable('ESTADOS');\r\n\t\t\t$this->estados->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Estado'\r\n\t\t\t));\r\n\t\t\t$this->estados->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombre del Estado'\r\n\t\t\t));\r\n\t\t\t$this->estados->setPrimaryKey(array('ID'));\r\n\t\t}", "public function getTableFields()\n {\n return array(\n array(\"Field\" => \"uid_empresa\", \"Type\" => \"int(10)\", \"Null\" => \"NO\", \"Key\" => \"PRI\", \"Default\" => \"\", \"Extra\" => \"auto_increment\"),\n array(\"Field\" => \"endeve_id\", \"Type\" => \"varchar(60)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"pago_no_obligatorio\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"nombre\", \"Type\" => \"varchar(100)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"nombre_comercial\", \"Type\" => \"varchar(200)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"representante_legal\", \"Type\" => \"varchar(512)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cif\", \"Type\" => \"varchar(20)\", \"Null\" => \"NO\", \"Key\" => \"UNI\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"pais\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_pais\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"direccion\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"localidad\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"provincia\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cp\", \"Type\" => \"int(8)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"accion\", \"Type\" => \"timestamp\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"CURRENT_TIMESTAMP\", \"Extra\" => \"\"),\n array(\"Field\" => \"updated\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_provincia\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_municipio\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"convenio\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"created\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"aviso_caducidad_subcontratas\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"color\", \"Type\" => \"varchar(10)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"email\", \"Type\" => \"varchar(255)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_enterprise\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"logo\", \"Type\" => \"tinytext\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"skin\", \"Type\" => \"varchar(300)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"dokify\", \"Extra\" => \"\"),\n array(\"Field\" => \"lang\", \"Type\" => \"varchar(2)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"es\", \"Extra\" => \"\"),\n array(\"Field\" => \"activo_corporacion\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"pago_aplicacion\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"receive_summary\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"date_last_summary\", \"Type\" => \"int(16)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"license\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_validation_partner\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"partner_validation_price\", \"Type\" => \"float\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"partner_validation_price_urgent\", \"Type\" => \"float\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"validation_languages\", \"Type\" => \"varchar(250)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cost\", \"Type\" => \"float\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"pay_for_contracts\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"invoice_periodicity\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_attached\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_validated\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_rejected\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_expired\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_transfer_pending\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"kind\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"min_app_version\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"2\", \"Extra\" => \"\"),\n array(\"Field\" => \"prevention_service\", \"Type\" => \"varchar(20)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_idle\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"corporation\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_referrer\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"requirement_count\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"invoice_count\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_referrer\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_manager\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_self_controlled\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"has_custom_login\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"header_img\", \"Type\" => \"tinytext\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"), array(\"Field\" => \"uid_manager\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_referrer\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"requirements_origin_company_cloneables\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n );\n }", "public function getTable()\r\n {\r\n }", "public static function getTable();", "public static function getTablename() { return \"Productos_01\"; }", "public function makeTableur()\n {\n return $this->setDocumentPropertiesWithMetas(new Spreadsheet());\n }", "public function dataTable();", "public function getTable() {}", "public function getTable() {}", "private function create_tables()\n {\n global $wpdb;\n\n /* http://wiip.fr/content/choisir-le-type-de-colonne-de-ses-tables-mysql */\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n nom VARCHAR(255) NOT NULL,\n prenom VARCHAR(255) NOT NULL,\n email VARCHAR(320) NOT NULL,\n password VARCHAR(500) NOT NULL,\n adresse CHAR(255),\n codepostal CHAR(10),\n ville CHAR(60),\n pays CHAR(60),\n telephone_professionnel CHAR(20),\n dateinscription CHAR(20) NOT NULL,\n statut VARCHAR(15),\n evenement VARCHAR(255),\n date_evenement DATE,\n specialite VARCHAR(100),\n categorie VARCHAR(20),\n isUpdate VARCHAR(10),\n organisme_facturation CHAR(100),\n email_facturation CHAR(255),\n adresse_facturation CHAR(255),\n ville_facturation CHAR(60),\n codepostal_facturation CHAR(10),\n pays_facturation CHAR(50),\n contacts TEXT\n \n\n )';\n\n dbDelta($sql);\n\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users_file'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n email VARCHAR(320) NOT NULL,\n fichier VARCHAR(500) NOT NULL,\n chemin VARCHAR(500) NOT NULL,\n date_enregistrement VARCHAR(500) NOT NULL,\n type_doc VARCHAR(100) NOT NULL\n \n )';\n\n dbDelta($sql);\n }", "public function getTable() {}", "abstract public function getTables();", "private function myTables(){\n }", "private function prepareTables() {}", "protected function _initsTable() {}", "protected abstract function createTestTable();", "function getTables()\n {\n // Init global variables\n global $types, $classes, $makes;\n // Set each variable to array\n $types = get_types();\n $classes = get_classes();\n $makes = getMakes();\n }", "abstract public function tableName();", "abstract public function tableName();", "private function _set_table()\n\t{\n\t\t$dossier = $this->config->item('dossier');\n\t\tif($dossier === false)\n\t\t{\n\t\t\tlog_message('info', '\"Dossier\" params is not set');\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_dossier = $dossier;\n\t\t\t$this->_table = $this->_dossier . '.' . $this->_table;\n\t\t}\n\t}", "private function getTableNames()\n {\n $this->tableNames = [\n 'eav_attribute' => $this->resource->getTableName('eav_attribute'),\n 'EnitureModules' => $this->resource->getTableName('EnitureModules'),\n ];\n }", "function as_table() \n {\n #$str = \"<table> \\n\";\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) \n {\n if ($obj != NULL) \n {\n $str .= \"<tr>\\n\\t<td>\".$obj->label().\"</td>\\n\\t\";\n $str .= \"<td>\".$obj.\"</td>\\n</tr>\\n\";\n }\n }\n #$str .= \"</table>\\n\";\n return $str;\n }", "public function getTables();", "public function getTables();", "public function getTables();", "function mesabonnes_declarer_tables_objets_sql($tables){\r\n\t$tables['spip_mesabonnes'] = array(\r\n\t\t/* Declarations principales */\r\n\t\t'table_objet' => 'mesabonnes',\r\n\t\t'table_objet_surnoms' => array('mesabonnes'),\r\n\t\t'type' => 'mesabonnes',\r\n\t\t'type_surnoms' => array('mesabonnes'),\r\n\r\n\t\t/* La table */\r\n\t\t'field'=> array(\r\n\t\t\t\t\"id_abonne\" \t=> \"bigint(21) NOT NULL auto_increment\",\r\n\t\t\t\t\"nom\"\t=> \"text DEFAULT '' NOT NULL\",\r\n\t\t\t\t\"email\"\t=> \"text DEFAULT '' NOT NULL\",\r\n\t\t\t\t\"lang\"\t=> \"tinytext DEFAULT '' NOT NULL\",\r\n\t\t\t\t\"date_modif\"\t=> \"datetime DEFAULT '0000-00-00 00:00:00' NOT NULL\",\r\n\t\t\t\t\"liste\"\t=> \"text DEFAULT '' NOT NULL\", // pas utilise pour l'instant, gestion multi-liste ?\r\n\t\t\t\t\"statut\"\t=> \"varchar(6) DEFAULT '0' NOT NULL\"),\r\n\t\t'key' => array(\r\n\t\t\t\"PRIMARY KEY\" => \"id_abonne\",\r\n\t\t),\r\n\t\t'principale' => 'oui'\r\n\r\n\t);\r\n\r\n\r\n\treturn $tables;\r\n}", "function prikazi_sqltabelu($sql_tabela) {\n\n\tglobal $db;\n\n\techo \"<table class='dt-table'>\";\n\techo \"<h2>\" . $sql_tabela . \"</h2>\";\n\n\t// generisanje headera tabele (prikaz podataka)\n\n\t$komanda_head = \"SELECT * FROM $sql_tabela LIMIT 1\";\n\t$result_head = mysql_query($komanda_head, $db);\t\n\n\twhile ( $red = mysql_fetch_assoc($result_head) ) :\n\n\t\t$m = 0;\n\n\t\techo \"<tr class='dt-table'>\";\n\n\t\tforeach ($red as $item) {\n\t\n\t\t\t$kolona = mysql_field_name($result_head, $m);\n \t\t\techo \"<td class='dt-table'>\" . $kolona . \"</td>\";\n \t\t\t//echo \"<td>\" . $item . \"</td>\";\n \t\t$m++;\n\n\t\t}\n\n\t\techo \"</tr>\";\n\n\tendwhile;\n\n\t// generisanje tela tabele (prikaz podataka)\n\n\t$komanda_body = \"SELECT * FROM $sql_tabela\";\n\t$result_body = mysql_query($komanda_body, $db);\n\n\n\twhile ( $red = mysql_fetch_assoc($result_body) ) :\n\n\t\t$n = 0;\n\n\t\techo \"<tr class='dt-table'>\";\n\n\t\tforeach ($red as $item) {\n\t\n\t\t\t$kolona = mysql_field_name($result_body, $n);\n \t\t\techo \"<td class='dt-table'>\" . $item . \"</td>\";\n \t\t$n++;\n\n\t\t}\n\n\t\techo \"</tr>\";\n\n\tendwhile;\n\n\techo \"</table>\";\n\n}", "public function tableWizard() {}", "public function getTableInformation() {}", "function createTableModel()\r\n {\r\n?>\r\n // table model\r\n var <?php echo $this->Name; ?>_tableModel = new qx.ui.table.SimpleTableModel();\r\n <?php\r\n if ($this->owner!=null)\r\n {\r\n ?>\r\n <?php echo $this->owner->Name.\".\".$this->Name; ?>_tableModel=<?php echo $this->Name; ?>_tableModel;\r\n <?php\r\n }\r\n ?>\r\n<?php\r\n }", "public function mostrarTablas(){\t\r\n\r\n\t\t$item = null;\r\n \t\t$valor = null;\r\n\r\n \t\t$proveedores = ControladorProveedores::ctrMostrarProveedores($item, $valor);\r\n\r\n\r\n \t\t$datosJson = '{\r\n\t\t \r\n\t \t\"data\": [ ';\r\n\r\n\t \tfor($i = 0; $i < count($proveedores); $i++){\r\n\r\n\t \t\t/*=============================================\r\n\t\t\tDEVOLVER DATOS JSON\r\n\t\t\t=============================================*/\r\n\r\n\t\t\t$datosJson\t .= '[\r\n\t\t\t\t \"'.($i+1).'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"codigo\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"rfc\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"razonSocial\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"fechaAlta\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"limiteCredito\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"diasCredito\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"rfc2\"].'\",\r\n\t\t\t\t \"'.$proveedores[$i][\"curp\"].'\"\r\n\t\t\t\t ],';\r\n\r\n\t \t}\r\n\r\n\t \t$datosJson = substr($datosJson, 0, -1);\r\n\r\n\t\t$datosJson.= ']\r\n\t\t\t \r\n\t\t}'; \r\n\r\n\t\techo $datosJson;\r\n\r\n \t}", "public function getTableName() ;", "private function createDummyTable() {}", "function getItemTableName() ;", "public function getTabla()\n {\n return Datatables::of($this->index())\n ->addColumn(\n 'acciones',\n function ($ret) {\n return '<button data-id=\"'.$ret->id_area_tematica.'\" class=\"btn btn-info btn-xs editar\" '.\n 'title=\"Editar\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></button>';\n }\n )\n ->make(true);\n }", "public static function getTables() {\n }", "abstract function tableName();", "public function getTableName() {}", "public function getTableName() {}", "abstract public function getTableName();", "abstract public function getTableName();", "abstract public function getTableName();", "private function tableDataTable()\r\n\t{\r\n\t\t$source = $this->getSource();\r\n\r\n\t\t//$table = new TableExample\\DataTable();\r\n\t\t$table = new Model\\DataInsTable();\r\n\t\t$table->setAdapter($this->getDbAdapter())\r\n\t\t->setSource($source)\r\n\t\t->setParamAdapter(new AdapterDataTables($this->getRequest()->getPost()))\r\n\t\t;\r\n\t\treturn $table;\r\n\t}", "public function setTableDefinition()\n {\n $this->setTableName('textosLayout');\n $this->hasColumn('id', 'integer', 4, array(\n 'type' => 'integer',\n 'length' => 4,\n 'fixed' => false,\n 'unsigned' => false,\n 'primary' => true,\n 'autoincrement' => true,\n ));\n $this->hasColumn('id_texto', 'integer', 4, array(\n 'type' => 'integer',\n 'length' => 4,\n 'fixed' => false,\n 'unsigned' => false,\n 'primary' => false,\n 'notnull' => true,\n 'autoincrement' => false,\n ));\n $this->hasColumn('id_idioma', 'integer', 4, array(\n 'type' => 'integer',\n 'length' => 4,\n 'fixed' => false,\n 'unsigned' => false,\n 'primary' => false,\n 'notnull' => true,\n 'autoincrement' => false,\n ));\n $this->hasColumn('texto', 'string', 255, array(\n 'type' => 'string',\n 'length' => 255,\n 'fixed' => false,\n 'unsigned' => false,\n 'primary' => false,\n 'notnull' => true,\n 'autoincrement' => false,\n ));\n }", "function getTableFields(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t $sql = \"SELECT field_name, field_label\n\t\t FROM export_tabs_fields\n\t\t WHERE source_id = '\".$this->penelopeTabID.\"' ORDER BY field_num ; \";\n\t\t \n\t\t $result = $db->fetchAll($sql);\n\t\t if($result){\n\t\t\t\t$tableFields = array();\n\t\t\t\t$tableFields[] = self::primaryKeyFieldLabel; //always start with the primary key\n\t\t\t\t\n\t\t\t\t$tableFieldsTemp = array();\n\t\t\t\t$tableFieldsTemp[self::primaryKeyField] = self::primaryKeyFieldLabel; //always start with the primary key\n\t\t \n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t $tableFields[] = $row[\"field_label\"];\n\t\t\t\t\t $tableFieldsTemp[$row[\"field_name\"]] = $row[\"field_label\"];\n\t\t\t\t}\n\t\t\t\t$this->tableFieldsTemp = $tableFieldsTemp;\n\t\t\t\t$this->tableFields = $tableFields;\n\t\t }\n\t\t else{\n\t\t\t\treturn false;\n\t\t }\n\t\t \n\t }", "abstract public function createTable();", "protected function get_table_classes()\n {\n }", "public function tabla()\n\t\t{\t//condicion para la proteccion de las vistas\n\t\t\t$id_empleado = $_SESSION['id_empleado'];\n\t\t\tif ($id_empleado == null)\n\t\t\t{\n\t\t\t\tredirect(base_url() . 'index.php/header/controller_inicio/login');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->load->view(\"header/Header_caja\");\n\t\t\t\t$this->load->view(\"ventas/Tabla_dinamica_producto\");\n\t\t\t}\n\t\t}", "protected function _readTable() {}", "protected function _readTable() {}", "function titulopersonal(){\n print (\"\\n<tr>\");\n if($this->titulo !=\"\")\n foreach ($this->titulo as $titulo){\n print (\"\\n<th>$titulo</th>\");\n }\n print (\"\\n<tr>\"); \n }", "protected function setTable()\n {\n $class = explode('\\\\', get_called_class());\n $this->table = lcfirst(end($class)).'s';\n }", "public function baseTable();", "function tablaRuta($Nombre){\r\n\t\t$query = \"SELECT * FROM \" . self::TABLA . \";\";\r\n\t\treturn parent::tablaRegistro($Nombre, $query);\r\n\t\r\n }", "function tablaDatos(){\n\n $editar = $this->Imagenes($this->PrimaryKey,0);\n $eliminar = $this->Imagenes($this->PrimaryKey,1);\n $sql = 'SELECT\n C.id_componentes,\n P.descripcion planta,\n S.descripcion secciones,\n E.descripcion Equipo,\n C.`descripcion` Componente\n ,'.$editar.','.$eliminar.' \nFROM\n `componentes` C\nINNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\nINNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\nINNER JOIN\n plantas P ON P.id_planta = S.id_planta\nWHERE\n \n C.`activo` = 1';\n \n $datos = $this->Consulta($sql,1); \n if(count($datos)){\n $_array_formu = array();\n $_array_formu = $this->generateHead($datos);\n $this->CamposHead = ( isset($_array_formu[0]) && is_array($_array_formu[0]) )? $_array_formu[0]: array();\n \n $tablaHtml = '<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-body recargaDatos\" style=\"page-break-after: always;\">\n <div class=\"table-responsive\">';\n $tablaHtml .='';\n \t\t$tablaHtml .= $this->print_table($_array_formu, 7, true, 'table table-striped table-bordered',\"id='tablaDatos'\");\n \t\t$tablaHtml .=' </div>\n </div>\n </div>\n </div>\n </div>\n ';\n }else{\n $tablaHtml = '<div class=\"col-md-8\">\n <div class=\"alert alert-info alert-dismissable\">\n <button class=\"close\" aria-hidden=\"true\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Atenci&oacute;n</strong>\n No se encontraron registros.\n </div>\n </div>';\n }\n \n if($this->_datos=='r') echo $tablaHtml;\n else return $tablaHtml;\n \n }", "public static function getTableName()\n {\n return 'b_sotbit_seometa_section_chpu';\n }", "function retornaTabelas(){\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n $aRetorno = array();\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n # Recupera o nome da tabela e gera o nome da classe\n $aRetorno[] = (string)$aTabela['NOME'];\n }\n return $aRetorno;\n }", "protected function tableclass(){\n\n\t\tforeach($this->mapChild($this) as $key => $table ){\n\n\t\t\t$myadrs = $this->address;\n\n\t\t\tif(!in_array($table,$myadrs)){\n\n\t\t\t\tarray_push($myadrs,$table);\n\n\t\t\t\teval('$this->'.$table.' = new $this::$tclass($myadrs);');\n\n\t\t\t}\n\n\t\t\t//print($key . ':' .$table. p);\n\n\t\t}\n\n\t}", "function mostrar_tabla()\n {\n return $this->mostrar_tabla_slickgrid();\n /*\n $sPrefs = '';\n $id_usuario= core\\ConfigGlobal::mi_id_usuario();\n $tipo = 'tabla_presentacion';\n $oPref = new usuarios\\Preferencia(array('id_usuario'=>$id_usuario,'tipo'=>$tipo));\n $sPrefs=$oPref->getPreferencia();\n if ($sPrefs == 'html') {\n return $this->mostrar_tabla_html();\n } else {\n return $this->mostrar_tabla_slickgrid();\n }\n */\n }", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public function getTable()\n {\n\n }", "private function getTables() {\n\t\t$this->_vm_product = $this->getTable('vm_product');\n\t}", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }", "abstract public static function getTableName();", "abstract public static function getTableName();", "public function obtenerTabla() {\n $builder = $this->db->table($this->table);\n $data = $builder->get()->getResult();\n $tabla = '';\n foreach($data as $item):\n $accion = '<div class=\\\"custom-control custom-radio\\\">';\n $accion .= '<input type=\\\"radio\\\" id=\\\"row-'.$item->tipoTelefonoId.'\\\" name=\\\"id\\\" class=\\\"custom-control-input radio-edit\\\" value=\\\"'.$item->tipoTelefonoId.'\\\">';\n $accion .= '<label class=\\\"custom-control-label\\\" for=\\\"row-'.$item->tipoTelefonoId.'\\\"> </label> </div>';\n $tabla .= '{\n \"concepto\" : \"'.$item->tipoTelefonoTipo.'\",\n \"acciones\" : \"'.$accion.'\"\n },';\n endforeach;\n $tabla = substr($tabla, 0, strlen($tabla) - 1);\n $result = '{\"data\" : ['. $tabla .']}';\n return $this->response->setStatusCode(200)->setBody($result);\n }", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'cCountry_list.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "public function getTableDescription();", "public function mostrarTablaAsegurados() {\n\n\t\t$item = null;\n\t\t$valor = null;\n\n\t\t$asegurados = ControladorAsegurados::ctrMostrarAsegurados($item, $valor);\n\n\t\tif ($asegurados == null) {\n\t\t\t\n\t\t\t$datosJson = '{\n\t\t\t\t\"data\": []\n\t\t\t}';\n\n\t\t} else {\n\n\t\t\t$datosJson = '{\n\t\t\t\"data\": [';\n\n\t\t\tfor ($i = 0; $i < count($asegurados); $i++) { \n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LA EMPRESA\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemEmpleador = \"id\";\n\t\t\t\t$valorEmpleador = $asegurados[$i][\"id_empleador\"];\n\n\t\t\t\t$Empleadores = ControladorEmpleadores::ctrMostrarEmpleadores($itemEmpleadore, $valorEmpresa);\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS EL TIPO DE SEGURO\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemSeguro = \"id\";\n\t\t\t\t$valorSeguro = $asegurados[$i][\"id_seguro\"];\n\n\t\t\t\t$seguros = ControladorSeguros::ctrMostrarSeguros($itemSeguro, $valorSeguro);\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LAS LOCALIDADES\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemLocalidad = \"id\";\n\t\t\t\t$valorLocalidad = $asegurados[$i][\"id_localidad\"];\n\n\t\t\t\t$localidades = ControladorLocalidades::ctrMostrarLocalidades($itemLocalidad, $valorLocalidad);\t\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LAS OCUPACIONES\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemOcupacion = \"id\";\n\t\t\t\t$valorOcupacion = $asegurados[$i][\"id_ocupacion\"];\n\n\t\t\t\t$ocupaciones = ControladorOcupaciones::ctrMostrarOcupaciones($itemOcupacion, $valorOcupacion);\t\t\t\t\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LAS ACCIONES\n\t\t\t\t=============================================*/\n\n\t\t\t\t$botones1 = \"<div class='btn-group'><button class='btn btn-info btnAgregarBeneficiario' idAsegurado='\".$asegurados[$i][\"id\"].\"' data-toggle='tooltip' title='Agregar Beneficiario'><i class='fas fa-check'></i></button></div>\";\n\n\t\t\t\t$botones2 = \"<div class='btn-group'><button class='btn btn-warning btnEditarEmpleador' idAsegurado='\".$asegurados[$i][\"id\"].\"' data-toggle='tooltip' title='Editar'><i class='fas fa-pencil-alt'></i></button><button class='btn btn-danger btnEliminarAsegurado' idAsegurado='\".$asegurados[$i][\"id\"].\"' data-toggle='tooltip' title='Eliminar'><i class='fas fa-times'></i></button></div>\";\n\n\t\t\t\t$datosJson .='[\n\t\t\t\t\t\"'.$botones1.'\",\t\n\t\t\t\t\t\"'.$empleadores[\"razon_social\"].'\",\t\t\t\n\t\t\t\t\t\"'.$seguros[\"tipo_seguro\"].'\",\t\n\t\t\t\t\t\"'.$asegurados[$i][\"matricula\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"documento_ci\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"paterno\"].' '.$asegurados[$i][\"materno\"].' '.$asegurados[$i][\"nombre\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"sexo\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"fecha_nacimiento\"].'\",\n\t\t\t\t\t\"'.$Localidades[\"nombre_localidad\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"zona\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"calle\"].' '.$asegurados[$i][\"nro_calle\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"salario\"].'\",\n\t\t\t\t\t\"'.$ocupaciones[\"nombre_ocupacion\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"fecha_ingreso\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"estado\"].'\",\n\t\t\t\t\t\"'.$botones2.'\"\n\t\t\t\t],';\n\t\t\t}\n\n\t\t\t$datosJson = substr($datosJson, 0, -1);\n\n\t\t\t$datosJson .= ']\n\t\t\t}';\t\n\n\t\t}\n\n\t\techo $datosJson;\n\t\n\t}", "public static function tableStruct($table){\n\t\t$table->addCol(\"user_id\", \"BIGINT\",FALSE,TRUE);\n\t\t$table->addCol(\"user_name\", \"MEDIUMTEXT\", TRUE);\n\t\t$table->addCol(\"real_name\", \"MEDIUMTEXT\", TRUE);\n\t\t$table->addCol(\"toy\", \"MEDIUMTEXT\", TRUE);\n\t\t$table->addCol(\"spot\", \"MEDIUMTEXT\", TRUE);\n\t\t$table->addCol(\"bg_color\", \"MEDIUMTEXT\", TRUE);\n\t\t$table->addCol(\"bio\", \"MEDIUMTEXT\", TRUE);\n\t\t$table->addCol(\"website\", \"MEDIUMTEXT\", TRUE);\n\t\t$table->addCol(\"location\", \"MEDIUMTEXT\", TRUE);\n\t\t$table->addCol(\"image_URL\", \"MEDIUMTEXT\", TRUE);\n\t}" ]
[ "0.7211428", "0.7080428", "0.70710194", "0.705402", "0.70183194", "0.7014872", "0.7014872", "0.7014872", "0.7014872", "0.7014872", "0.7014872", "0.7014872", "0.69283265", "0.69040364", "0.68689007", "0.6837484", "0.6837484", "0.6817986", "0.6791694", "0.6749327", "0.6742793", "0.6682271", "0.6652013", "0.66489965", "0.66337353", "0.6611205", "0.6607355", "0.65919363", "0.6570053", "0.6563515", "0.65323144", "0.6520345", "0.64826316", "0.64820933", "0.6481086", "0.648045", "0.6472924", "0.64494836", "0.64473736", "0.6432732", "0.64149314", "0.6410274", "0.64061946", "0.64061946", "0.6404323", "0.6403054", "0.63874084", "0.6382889", "0.6382889", "0.6382889", "0.63481534", "0.6342843", "0.63386023", "0.63306653", "0.6324245", "0.632206", "0.63140726", "0.63114697", "0.6309185", "0.6304532", "0.63037616", "0.6294574", "0.62896144", "0.62896144", "0.6268097", "0.6268097", "0.6268097", "0.6264342", "0.6264102", "0.6259294", "0.62534624", "0.62519", "0.6246421", "0.6245207", "0.6243268", "0.624091", "0.62349105", "0.6227325", "0.6226134", "0.6224207", "0.62221944", "0.6210403", "0.6209985", "0.6207592", "0.6190824", "0.6190824", "0.6190824", "0.6190824", "0.6190824", "0.6190824", "0.61896425", "0.6189256", "0.6188691", "0.6187346", "0.6185274", "0.6185274", "0.6183002", "0.6179757", "0.6177493", "0.61742145", "0.61713195" ]
0.0
-1
end constructor ==============================process work=============================== ==========Select Data=======
public function selectData(){ $query = "SELECT * FROM tbl_userinfo ORDER BY Id ASC"; $result = $this->conn->query($query) or die($this->conn->error.__LINE__); if ($result->num_rows > 0){ //fetch_row() or num_rows gives number of rows in db return $result; }else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n // if required data are received\n if(isset($_POST['resname']) && isset($_POST['ajx'])) {\n $_POST = array_map('trim', $_POST); // removes whitesapces\n\n // if $_POST['idop'] returns data from MySQL; else, if $_POST['sdata'], calls method to save data\n if(isset($_POST['idop'])) echo $this->getSlistsMysql($_POST['resname'], $_POST['idop']); // required <select>\n else if(isset($_POST['geto'])) echo $this->allSlistsMysql($_POST['resname']); // data for all <select>s\n else if(isset($_POST['sdata'])) echo $this->saveData();\n }\n }", "public function __construct() { \n\t\t$this->Connection = new RDataConnection();\t// connection object\n\t\t$this->buildQuery = array(\n\t\t\t'query' \t=> array(),\n\t\t\t'select' \t=> array(),\n\t\t\t'where' \t=> array(),\n\t\t\t'insert' \t=> array(),\n\t\t\t'update' \t=> array(),\n\t\t\t'join' \t=> array(),\n\t\t\t'orderBy' \t=> array(),\n\t\t\t'limit'\t\t=> array(),\n\t\t\t'groupBy' \t=> array(),\n\t\t\t'having' \t=> array(),\n\t\t\t'from' \t=> array(),\n\t\t\t'delete' \t=> array()\n\t );\t\t\t\t\t\t\t \n\t\t$this->params = array();\t\n\t\t$this->types = array();\t\t\n\t\t$this->customQuery = array();\t\n\t\t$this->customParams = array();\t\n\t\t$this->customTypes = array();\t\n\t\t$this->addFoundRows = false;\t\n\t\t$this->queryType = self::SELECT;\n\t\tself::$inputIdx = 0;\n\t\t//$this->debug = (defined('DEV_MODE') && constant('DEV_MODE') === true); \n\t\t$this->debug = isDevMode(); \n\t\t\t\n\t\t// init connection\n\t\t//$this->Connection->Connect(CONNECTION_TYPE,DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME,DATABASE_HOST,DATABASE_PORT);\n\t\t$this->Connection->Connect('mysql',DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME,DATABASE_HOST,DATABASE_PORT);\n\t}", "public function __construct()\n {\n \t$this->schema();\n\t\t$this->data();\n }", "public function __construct($data)\n {\n $this->all_data = $data;\n }", "function __construct($data) {\n\t\t$this->id_work = (isset($data['id_work'])) ? $data['id_work'] : \"\";\n\t\t$this->name_work = (isset($data['name_work'])) ? $data['name_work'] : \"\";\n\t}", "function __construct()\n\t{\n\t\t$this->db = new dbHelper();\n\t\t$this->cb = new CombosData();\n\t\treturn;\n\t}", "public function __construct(){\n $this->db=Conectar::con();\n $this->sector=array();\n $this->id=array();\n \n }", "function __construct()\n\t{\n\t\t$error = 0;\t\n\t\t$dbresult = false;\n\t\t$this->fields = array();\n\t\t$this->tables = array();\n\t\t$this->filters = \"\";\n\t\t$this->groupby = array();\t\t\n\t\t$this->having = \"\";\n\t\t$this->sortfields = array();\n\t\t$this->limit = \"\";\n\t\t$this->values = array();\t\t\n\t}", "public function __construct() {\r\n\t\t$this->_data = array(\r\n\t\t\t'Steve' => array(\r\n\t\t\t\t'id' => 1,\r\n\t\t\t\t'userid' => 'Steve',\r\n\t\t\t\t'passwd' => 'lollypop',\r\n\t\t\t\t'inactive' => 'N',\r\n\t\t\t\t'dept_field' => 'North',\r\n\t\t),\r\n\t\t\t'Sally' => array(\r\n\t\t\t\t'id' => 2,\r\n\t\t\t\t'userid' => 'Sally',\r\n\t\t\t\t'passwd' => 'sallybop',\r\n\t\t\t\t'inactive' => 'N',\r\n\t\t\t\t'dept_field' => 'East',\r\n\t\t),\r\n\t\t\t'Sam' => array(\r\n\t\t\t\t'id' => 3,\r\n\t\t\t\t'userid' => 'Sam',\r\n\t\t\t\t'passwd' => 'sammydop',\r\n\t\t\t\t'inactive' => 'Y',\r\n\t\t\t\t'dept_field' => 'West',\r\n\t\t),\r\n\t\t\t);\r\n\r\n\t}", "protected function __construct()\n\t\t{\n\t\t\t$this->Connect();\n// \t\t\t$this->Create($this->query); // Czy tak?\n\t\t\t$this->Insert();\n \t\t\t$this->Update('update tabelka ');\n// \t\t\t$this->Delete();\n// \t\t\t$this->Select();\n\t\t}", "public function __construct() {\n\t\t // Datenbankverbindung aufbauen \n\t\t\n\t}", "public function Do_select_Example1(){\n\n\t}", "public function __construct()\n {\n $this->select = new Query_Select();\n $this->from = new Query_From();\n $this->where = new Query_Where();\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n $this->counties = Region::select('id','name')->get()->values()->toArray();\n\t}", "public function __construct()\n {\n $lang = getLang();\n $sqlSub = \",mpt.name_$lang as parcel_type_name ,mst.name_$lang as supplies_type_name\";\n $this->sqlSub = $sqlSub ;\n }", "protected static function select()\n {\n }", "public function __construct()\n\t{\n\t\tif(isset ($_GET['DepartmentId']))\n\t\t\t$this -> mSelectedDepartment = (int)$_GET['DepartmentId'];\n\t\t\t\n\t\tif(isset ($_GET['CategoryId']))\n\t\t\t$this -> mSelectedCategory = (int)$_GET['CategoryId'];\n\t}", "function __construct()\n\t{\n\t\tglobal $db;\n\t\t//$aOptions = $db->get_results(\"SELECT task_id, task_description FROM tasks WHERE task_id = '2'\",ARRAY_N);\n\t\t//$db->debug();\n\t\t//$this->print_options($aOptions);\n\t}", "function __construct() {\n\t\t\t$this->db_name = DATABASE;\n\t\t\t//$this->table1 = TKR_TBL; \n\t\t\t//$this->table2 = DATA_TBL;\n\t\t\t\n\t\t\t}", "function __construct($data){\n\t $this->data=$data;\n }", "public function __construct() {\n parent::__construct(self::TABLE_NAME, self::ID, self::NAME);\n $this->_old_gcd_access_id = null;\n $this->_site_country = null;\n $this->_site_region_id = null;\n $this->_site_land_id = null;\n $this->_biome_type_id = null;\n $this->_site_type_id = null;\n $this->_basin_size_id = null;\n $this->_basin_size_value = null;\n $this->_catch_size_id = null;\n $this->_catch_size_value = null;\n $this->_local_veg_id = null;\n $this->_regional_veg_id = null;\n $this->_flow_type_id = null;\n $this->_site_id_status = 0 ;\n \n $this->_list_site_notes = array();\n $this->_liste_publi_id = array(); //xli initialisation des publications.\n\n $this->_temp_status_import_id = null;\n $this->_temp_latitude_value = null;\n $this->_temp_longitude_value = null;\n $this->_temp_elevation_value = null;\n $this->_temp_charcoal_pref_unit_id = null;\n $this->_temp_water_depth_value = null;\n $this->_temp_age_model_method_id = null;\n $this->_temp_data_source_id = null;\n $this->_temp_database_version_id = null;\n $this->_temps_age_units_id = null;\n $this->_list_core = array();\n }", "public function _construct(){\n\t\treturn $this->data;\n\t}", "public function _construct(){\n\t\treturn $this->data;\n\t}", "public function __construct($data)\n {\n }", "public function __construct($data)\n {\n }", "public function __construct($data)\n {\n }", "public function __construct($data)\n {\n }", "function select() {\r\n\r\n $oc_id = $this->oc_id;\r\n $prov_id = $this->prov_id;\r\n $oc_tipo = $this->oc_tipo;\r\n $oc_estado = $this->oc_estado;\r\n $oc_fecha_entrega = $this->oc_fecha_entrega;\r\n $oc_fecha_entrega_fin = $this->oc_fecha_entrega_fin;\r\n\r\n $sql = \"SELECT * FROM ing_oc p LEFT JOIN efectua_compra h ON p.oc_id=h.oc_id WHERE \";\r\n\r\n if ($oc_estado != null) {\r\n $sql = $sql . \"p.oc_estado = '\" . $oc_estado . \"' \";\r\n } else {\r\n $sql = $sql . \"p.oc_estado > '0' \";\r\n }\r\n if ($oc_id != null) {\r\n $sql = $sql . \"AND p.oc_id = '\" . $oc_id . \"' \";\r\n }\r\n if ($prov_id != null) {\r\n $sql = $sql . \"AND p.prov_id = '\" . $prov_id . \"' \";\r\n }\r\n if ($oc_tipo != null) {\r\n $sql = $sql . \"AND p.oc_tipo = '\" . $oc_tipo . \"' \";\r\n }\r\n if ($oc_fecha_entrega != null) {\r\n if ($oc_fecha_entrega_fin != null) {\r\n $sql = $sql . \"AND P.oc_fecha_entrega BETWEEN '\" . $oc_fecha_entrega . \"' AND '\" . $oc_fecha_entrega_fin . \"' \";\r\n }\r\n $sql = $sql . \"AND P.oc_fecha_entrega = '\" . $oc_fecha_entrega . \"' \";\r\n }\r\n\r\n $result = $this->database->query($sql);\r\n// $result = $this->database->result;\r\n// $row = mysql_fetch_object($result);\r\n\r\n $i = 0;\r\n while ($datos = $this->database->fetch_array($result)) {\r\n $this->arringoc[$i]['prov_id'] = $datos['prov_id'];\r\n $this->arringoc[$i]['oc_id'] = $datos['oc_id'];\r\n $this->arringoc[$i]['oc_codigo'] = $datos['oc_codigo'];\r\n $this->arringoc[$i]['oc_tipo'] = $datos['oc_tipo'];\r\n $this->arringoc[$i]['oc_empresa'] = $datos['oc_empresa'];\r\n $this->arringoc[$i]['oc_log'] = $datos['oc_log'];\r\n $this->arringoc[$i]['oc_estado'] = $datos['oc_estado'];\r\n $this->arringoc[$i]['oc_fecha_entrega'] = $datos['oc_fecha_entrega'];\r\n $this->arringoc[$i]['oc_solicitante'] = $datos['oc_solicitante'];\r\n $this->arringoc[$i]['oc_observacion'] = $datos['oc_observacion'];\r\n $this->arringoc[$i]['oc_neto'] = $datos['oc_neto'];\r\n $this->arringoc[$i]['oc_iva'] = $datos['oc_iva'];\r\n $this->arringoc[$i]['oc_total'] = $datos['oc_total'];\r\n $this->arringoc[$i]['oc_forma_pago'] = $datos['oc_forma_pago'];\r\n $this->arringoc[$i]['oc_condiciones'] = $datos['oc_condiciones'];\r\n $this->arringoc[$i]['oc_tipo_descuento'] = $datos['oc_tipo_descuento'];\r\n $this->arringoc[$i]['oc_impuesto'] = $datos['oc_impuesto'];\r\n $this->arringoc[$i]['oc_gasto_envio'] = $datos['oc_gasto_envio'];\r\n $this->arringoc[$i]['solc_id'] = $datos['solc_id'];\r\n $i++;\r\n }\r\n\r\n// $this->prov_id = $row->prov_id;\r\n//\r\n// $this->oc_id = $row->oc_id;\r\n//\r\n// $this->oc_codigo = $row->oc_codigo;\r\n//\r\n// $this->oc_tipo = $row->oc_tipo;\r\n//\r\n// $this->oc_empresa = $row->oc_empresa;\r\n//\r\n// $this->oc_log = $row->oc_log;\r\n//\r\n// $this->oc_estado = $row->oc_estado;\r\n//\r\n// $this->oc_fecha_entrega = $row->oc_fecha_entrega;\r\n//\r\n// $this->oc_solicitante = $row->oc_solicitante;\r\n//\r\n// $this->oc_observacion = $row->oc_observacion;\r\n//\r\n// $this->oc_neto = $row->oc_neto;\r\n//\r\n// $this->oc_iva = $row->oc_iva;\r\n//\r\n// $this->oc_total = $row->oc_total;\r\n//\r\n// $this->oc_forma_pago = $row->oc_forma_pago;\r\n//\r\n// $this->oc_condiciones = $row->oc_condiciones;\r\n//\r\n// $this->oc_rut_emision = $row->oc_rut_emision;\r\n//\r\n// $this->oc_rut_aprobacion = $row->oc_rut_aprobacion;\r\n//\r\n// $this->oc_cheque_adjunto = $row->oc_cheque_adjunto;\r\n//\r\n// $this->oc_descuento = $row->oc_descuento;\r\n//\r\n// $this->oc_tipo_descuento = $row->oc_tipo_descuento;\r\n//\r\n// $this->oc_impuesto = $row->oc_impuesto;\r\n//\r\n// $this->oc_gasto_envio = $row->oc_gasto_envio;\r\n//\r\n// $this->oc_estado_pago = $row->oc_estado_pago;\r\n }", "function __construct($data = null) {\n if ($data !== null) {\n $this->id = (isset($data[0]['id'])) ? $data[0]['id'] : \"\";\n $this->technology_id = (isset($data[0]['technology_id'])) ? $data[0]['technology_id'] : \"\";\n $this->student_id = (isset($data[0]['student_id'])) ? $data[0]['student_id'] : \"\";\n $this->count = (isset($data[0]['count'])) ? $data[0]['count'] : \"\";\n }\n }", "function __construct()\n {\n if (!empty($_SESSION['oDBListas']) && $_SESSION['oDBListas'] == 'error') {\n exit(_(\"no se puede conectar con la base de datos de Listas\"));\n }\n $oDbl = $GLOBALS['oDBListas'];\n $this->setoDbl($oDbl);\n $this->setNomTabla('dbo.q_dl_Estudios_b');\n }", "function select() {\r\n $ing_item = $this->ing_item;\r\n $ing_estado_ingreso = $this->ing_estado_ingreso;\r\n $ing_item = $this->ing_item;\r\n $prov_id = $this->prov_id;\r\n $ing_numerodoc = $this->ing_numerodoc;\r\n $ing_tipodoc = $this->ing_tipodoc;\r\n $bod_codigo = $this->bod_codigo;\r\n\r\n $sql = \"SELECT * FROM ing_ingreso_det h INNER JOIN ingreso_compra p ON p.ing_numerodoc = h.ing_numerodoc WHERE p.ing_estado_doc > '0' \";\r\n if ($ing_estado_ingreso != null) {\r\n $sql = $sql . \"AND h.ing_estado_ingreso = '\" . $ing_estado_ingreso . \"' \";\r\n } else {\r\n $sql = $sql . \"AND h.ing_estado_ingreso > '0' \";\r\n }\r\n if ($ing_item != null) {\r\n $sql = $sql . \"AND h.ing_item = '\" . $ing_item . \"' \";\r\n }\r\n if ($prov_id != null) {\r\n $sql = $sql . \"AND h.prov_id = '\" . $prov_id . \"' \";\r\n }\r\n if ($ing_numerodoc != null) {\r\n $sql = $sql . \"AND h.ing_numerodoc = '\" . $ing_numerodoc . \"' \";\r\n }\r\n if ($ing_tipodoc != null) {\r\n $sql = $sql . \"AND h.ing_tipodoc = '\" . $ing_tipodoc . \"' \";\r\n }\r\n if ($bod_codigo != null) {\r\n $sql = $sql . \"AND h.bod_codigo = '\" . $bod_codigo . \"' \";\r\n }\r\n\r\n\r\n $result = $this->database->query($sql);\r\n\r\n $i = 0;\r\n while ($datos = $this->database->fetch_array($result)) {\r\n $this->arringdet[$i]['ing_item'] = $datos['ing_item'];\r\n $this->arringdet[$i]['prov_id'] = $datos['prov_id'];\r\n $this->arringdet[$i]['ing_numerodoc'] = $datos['ing_numerodoc'];\r\n $this->arringdet[$i]['ing_tipodoc'] = $datos['ing_tipodoc'];\r\n $this->arringdet[$i]['prod_equiv_id'] = $datos['prod_equiv_id'];\r\n $this->arringdet[$i]['bod_codigo'] = $datos['bod_codigo'];\r\n $this->arringdet[$i]['prod_codigo'] = $datos['prod_codigo'];\r\n $this->arringdet[$i]['ing_bodega'] = $datos['ing_bodega'];\r\n $this->arringdet[$i]['ing_zeta'] = $datos['ing_zeta'];\r\n $this->arringdet[$i]['ing_cantidad1'] = $datos['ing_cantidad1'];\r\n $this->arringdet[$i]['ing_cantidad_bulto'] = $datos['ing_cantidad_bulto'];\r\n $this->arringdet[$i]['ing_unid_bulto'] = $datos['ing_unid_bulto'];\r\n $this->arringdet[$i]['ing_valor1'] = $datos['ing_valor1'];\r\n $this->arringdet[$i]['ing_valor2'] = $datos['ing_valor2'];\r\n $this->arringdet[$i]['ing_estado_ingreso'] = $datos['ing_estado_ingreso'];\r\n $this->arringdet[$i]['ing_peso'] = $datos['ing_peso'];\r\n $this->arringdet[$i]['ing_umed_peso'] = $datos['ing_umed_peso'];\r\n $this->arringdet[$i]['ing_valor_total'] = $datos['ing_valor_total'];\r\n\r\n $this->arringdet[$i]['ing_correlativo'] = $datos['ing_correlativo'];\r\n $this->arringdet[$i]['ing_fechadoc'] = $datos['ing_fechadoc'];\r\n $this->arringdet[$i]['ing_fechavisacion'] = $datos['ing_fechavisacion'];\r\n $this->arringdet[$i]['ing_numerovisacion'] = $datos['ing_numerovisacion'];\r\n $this->arringdet[$i]['ing_moneda'] = $datos['ing_moneda'];\r\n $this->arringdet[$i]['ing_tipodecambio'] = $datos['ing_tipodecambio'];\r\n $this->arringdet[$i]['ing_iva'] = $datos['ing_iva'];\r\n $this->arringdet[$i]['ing_ciftotal'] = $datos['ing_ciftotal'];\r\n $this->arringdet[$i]['ing_costototal'] = $datos['ing_costototal'];\r\n $this->arringdet[$i]['ing_viutotal'] = $datos['ing_viutotal'];\r\n $this->arringdet[$i]['ing_estado_pago'] = $datos['ing_estado_pago'];\r\n $this->arringdet[$i]['ing_estado_doc'] = $datos['ing_estado_doc'];\r\n $this->arringdet[$i]['ing_neto'] = $datos['ing_neto'];\r\n $this->arringdet[$i]['ing_total'] = $datos['ing_total'];\r\n $this->arringdet[$i]['ing_tipodocsve'] = $datos['ing_tipodocsve'];\r\n $this->arringdet[$i]['ing_bodega_rec'] = $datos['ing_bodega_rec'];\r\n }\r\n }", "public function __construct( )\n\t\t{\n\t\t\t$this->state = self::STATE_NULL;\n\t\t\t$this->iCallbacks = new \\stdClass;\n\t\t\tabstractDatasourceBase::__construct();\n\t\t}", "public function __construct() {\n\t\t\n\t\t\t$this->arrResultData = array(\"success\" => \"true\", \"m\" => array());\n\t\t\t\n\t\t\t//connection for database_1\n\t\t\t$this->conexion = mysqli_connect(SERVIDOR, USUARIO, CONTRASENA, BASEDATOS) or die (json_encode(array(\"success\" => \"false\", \"m\" => \"Fail to connect Database at server: \" . SERVIDOR)));\n\t\t\t\n\t\t\t// connection for database_0\n\t\t\t$this->conexion_0 = mysqli_connect(SERVIDOR, USUARIO, CONTRASENA, BASEDATOS_0) or die (json_encode(array(\"success\" => \"false\", \"m\" => \"Fail to connect Database at server: \" . SERVIDOR)));\n\t\t\t\n\t\t\t$this->userId =0;\n\t\t\t\n \n\t\t}", "public function __construct($data = array()){\r\n\r\n\t\t$this->data = $data;\r\n\r\n\t}", "function __construct($arrData=array())\n\t{\n $this->data = $arrData;\n $this->tableName = \"tblusers\";\n\n require_once(C_P_CLASES.'utils/tables.names.php');\n //inicializo nombres de campos de tabla\n $tmpIns = new A_TABLENAMES(\"\");\n $tmpIns->set_dataTblusers();\n $this->arrDataNames = $tmpIns->get_tblusers();\n $this->domain = C_DOMAIN;\n }", "public function select()\n {\n\n }", "function __construct($data) {\n assert(isset($data['id']));\n $this->data = $data;\n $this->connection = new Database();\n }", "public function __construct()\n {\n $accountData = Account::find('first',array('conditions'=>array('id = ?', $this->accountId())));\n // grab only what we need\n $this->setData('account', $accountData->values_for(array('id','name','api_key','map_api_key', 'mobile_url')));\n }", "abstract public function prepareSelect();", "function __construct($ename=null, $dbname=null) {\n //\n $this->bind_arg('ename',$ename );\n $this->bind_arg('dbname', $dbname);\n //save the arguments of the of this identifier\n //\n //save the entity\n $this->entity= table::get_entity($this->ename, $this->dbname);\n //\n //Get the fields of this select sql which are the resolved column attributes \n //used by the first index it also includes any name, title or description \n $fields = $this->get_fields();\n //\n //Get the joins of this sql\n $joins= $this->joins();\n //\n //The parent select \n parent::__construct(new table($dbname, $ename), $fields, $joins, []);\n }", "function __construct($data, $id = 0) {\r\n $this->id = $id;\r\n $this->coldate = array();\r\n $this->etat = 0;\r\n\r\n /* Definition des object */\r\n $this->data = $data;\r\n $this->colonnes = new ArrayObject();\r\n $this->checkedbutton = array();\r\n $this->checkedbutton[] = -1;\r\n }", "public function __construct($id)\n\n {\n $record = $this->getSelectAllQuery($id);\n\n }", "private function __construct()\n\t{\n\t\tglobal $ilDB;\n\n\t\t$this->db =& $ilDB;\n\n\t\t$this->__read();\n\t}", "public function __construct() {\n parent::__construct(self::TABLE_NAME, self::ID, self::NAME);\n $this->_age_model_method = null;\n $this->_core_id = null;\n $this->_age_model_notes = array();\n $this->_contact_id = null;\n $this->_age_model_id_status = 0;\n }", "function loadData()\n\t{\n\t\tstatic $data;\n\t\t\n\t\tif(!$data)\n\t\t\t$data=self::getData();\n\n\t\tif(isset($data[$this->id]))\n\t\t\t$this->setValues((array)$data[$this->id]);\t\t\t\n\t}", "public function __construct()\n {\n $args = func_get_args ();\n if (empty ( $args [0] )) {\n $args [0] = array ();\n }\n $this->_data = $args [0];\n }", "function __construct(array $data)\n\t{\n if (isset($data)) {\n $this->id = $data['id'];\n $this->productid = $data['product_id'];\n $this->pattern = $data['pattern'];\n }\n\t}", "public function __construct($row) {\n $this->pd_id = isset($row['pd_id']) ? intval($row['pd_id']) : null;\n//each column data is extracted\n $this->product_id = $row['product_id'];\n $this->org_id = $row['org_id'];\n $this->machine_id = $row['machine_id'];\n $this->machine_name = $row['machine_name'];\n }", "private function init_consolidationAndSelect()\n {\n // RETURN : there isn't any filter\n if ( !$this->bool_isFilter )\n {\n return;\n }\n // RETURN : there isn't any filter\n // Add tableUids to the consolidation array\n $this->init_consolidationAndSelect_setArrayConsolidation();\n\n // Add tableFields to the ts property SELECT\n $this->init_consolidationAndSelect_setTsSelect();\n }", "public function __construct($data) {\n $this->setValues($data);\n }", "public function __construct()\n\t{\n\t\t$db = Db::conectar();\n\t\t$select = $db->query(\"SET NAMES 'utf8'\");\n\t}", "public function __construct()\n\t{\n\t\t$db = Db::conectar();\n\t\t$select = $db->query(\"SET NAMES 'utf8'\");\n\t}", "public function __construct() {\n\t\t\t$this->dbConnection = new dbConnection();\n\t\t\t$this->query = new query();\n\t\t}", "public function __construct() {\n $this->ambilData();\n }", "function __construct()\n\t{\n\t\tparent::__construct(); \n \n \n\t\tif(!$this->access->is_login())redirect(base_url());\n \t\t$this->load->helper(array('url','form','mylib_helper','browse_select'));\n $this->load->library('sysvar');\n\t\t$this->load->library('template');\n\t\t$this->load->library('form_validation');\n\t\t$this->load->model('inventory_products_model');\n\t\t$this->load->model('inventory_model');\n\t\t$this->load->model('shipping_locations_model');\n\t\t$this->load->model('syslog_model');\n $this->load->library(\"list_of_values\"); \n $this->sql=\"select distinct shipment_id,\n concat(year(date_received),'-',month(date_received),'-',day(date_received)) as date_received,\n ip.warehouse_code,\n ip.supplier_number, ip.doc_type\n from inventory_products ip \n where receipt_type='$this->receipt_type' and doc_type='$this->doc_type'\n \";\n $this->load->model(\"replicate_model\");\n \n\t}", "public function select();", "public function select();", "public function select();", "public function __construct(){\r\n\t\t\trequire_once(\"conectar_bd.php\");\r\n\t\t\t$this->db=Conectar::conexion();\r\n\t\t\t$this->productos=array();\r\n\t\t}", "function __construct(){\n\t\t\t$this->setId(0);\n\t\t\t$this->setFecha('');\t\n\t\t\t$this->setMotivo('');\n\t\t\t$this->setEstado(true);\n\t\t}", "function dataSelect() {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t\t= \"SELECT * FROM pegawai ORDER BY id ASC\";\n\t\t\t\t\n\t\t\t\t$sql\t\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\treturn $sql;\n\t\t\t}", "function __construct(array $data)\n {\n if (isset($data)) {\n $this->id = $data['id'];\n $this->code = $data['code'];\n $this->startDate = $data['start_date'];\n $this->endDate = $data['end_date'];\n $this->discount = $data['discount'];\n }\n }", "function __construct($data) {\r\n\t\t$this->annee = (isset($data['annee'])) ? $data['annee'] : \"\";\r\n\t\t$this->tDate = (isset($data['tDate'])) ? $data['tDate'] : \"\";\r\n\t}", "function __construct () {\n parent::__construct();\n\n $temp = json_decode ($this -> planes -> all (), true);\n \n $ap = -1;\n \n // Iterate through each record in associate array and check if type matches plane in fleet\n // assigns a plane to the fleet if it's name matches the selected planes\n foreach ($temp as $key => $record) {\n $check = false;\n if (!empty ($record[\"id\"])) {\n $check = true;\n switch ($record[\"id\"]) {\n case \"avanti\" :\n break;\n case \"caravan\" :\n break;\n default :\n $check = false;\n }\n if ($check) {\n ++$ap;\n $this -> data[\"a$ap\"] = $record;\n }\n }\n }\n \n\n }", "public function __construct($id = null) {\n // Return each value as $this->whatever\n if ($id) {\n $sql = \"SELECT * FROM {$this->table} WHERE id = {$id}\"; // Sanitize this\n $results = DB::getRow($sql);\n if ($results) {\n foreach ($results as $field => $value) {\n $this->_values[$field] = $value;\n }\n $this->_fresh = false;\n }\n }\n }", "public function __construct()\n\t{\n\t\t$data = array();\n\t parent::__construct();\n\t // load library form validation\n\t $this->load->library('form_validation');\n\t \t$this->load->helper('url');\n\t \t$this->load->model('UserModel');\n\t \t$this->load->library('pagination');\n\t \n\t \t$this->load->library('email'); \n\n\t \t$this->getprocsses \t\t= $this->UserModel->getAllProcessesWithSubProcesses();\n\t \t$this->getstation \t\t= $this->UserModel->getallstation();\n\t \t$this->getprcesses \t\t= $this->UserModel->getallprocesses();\n\t \t$this->getorganization = $this->UserModel->getallorgnization();\n\t \t// get all station here\n\t}", "private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }", "public function __construct($data){\r\n $this->data = $data;\r\n }", "public function __construct() {\n\n\t\t$this->contenuto=array();\n\t\t$this->quantita=array();\n }", "function __construct() { \r\n\t\t\t\t$this->id;\r\n\t\t\t\t$this->cpf;\r\n\t\t\t\t$this->email;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}", "function __construct(){\n\n\t\tparent::__construct(); //Llamada al constructor de la clase padre\n\n\t\t$this->id = \"\";\n\t\t$this->actividad = \"\";\n\t\t$this->nota = \"\";\n\t\t$this->alumno = \"\";\n\t\t$this->materia = \"\";\n\n\t}", "public function __construct($data)\n {\n $this->data=$data;\n }", "public function __construct($data)\n {\n //\n $this->franchisee = $data['franchiseename'];\n $this->notes = $data['notes'];\n //print_r($this);die;\n }", "private function iniciarRecolectarData()\r\n\t\t{\r\n\t\t\tself::findPagoDetalleActividadEconomica();\r\n\t\t\tself::findPagoDetalleInmuebleUrbano();\r\n\t\t\tself::findPagoDetalleVehiculo();\r\n\t\t\tself::findPagoDetalleAseo();\r\n\t\t\tself::findPagoDetallePropaganda();\r\n\t\t\tself::findPagoDetalleEspectaculo();\r\n\t\t\tself::findPagoDetalleApuesta();\r\n\t\t\tself::findPagoDetalleVario();\r\n\t\t\tself::findPagoDetalleMontoNegativo();\r\n\t\t\tself::ajustarDataReporte();\r\n\t\t}", "public function __construct(array $data){\t\n\t\t$this->data=$data;\n\t}", "function __construct() {\n $this->load->database();\n parent::__construct();\n// if ($nPerId != null) {\n// $this->get_Persona($nPerId);\n// }\n }", "function __construct($row) {\n\t\t $this->id = $row ['id'];\n\t\t $this->name = $row ['name'];\n\t\t $this->city = $row ['city'];\n\t\t $this->street = $row ['street'];\n\t\t $this->contact = $row ['contact'];\t\t \t\n\t }", "public function Do_Allselect_Example1(){\n\n\t}", "function __construct()\n\t{\n\t\t$this->connection = Application::getDatabaseConnection();\n\t\t$this->connection->SetFetchMode(2);\n\t}", "function __construct()\n {\n $this->_data = array();\n }", "public function select($option,$data)\r\n\t{\r\n\t\t$info = array();\r\n\t\tswitch($option['lvl1'])\r\n\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tcase \"user\":\r\n switch($option['lvl2'])\r\n {\r\n case \"all\": \r\n //\r\n break;\r\n }\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase \"factura\":\r\n switch($option['lvl2'])\r\n {\r\n case \"max\": \r\n $info=$this->get_data(\"SELECT MAX(codigo) AS codigo FROM factura LIMIT 0 , 1;\");\r\n break;\r\n }\r\n\t\t\tbreak;\r\n\t\t\t case \"empresa\":\r\n switch($option['lvl2'])\r\n {\r\n case \"datos\": \r\n $info=$this->get_data(\"SELECT * FROM empresa LIMIT 0 , 1;\");\r\n break;\r\n }\r\n break;\r\n case \"cliente\":\r\n switch($option['lvl2'])\r\n {\r\n case \"all\": \r\n $info=$this->get_data(\"SELECT * FROM cliente;\");\r\n break;\r\n case \"count_by_ced\" :\r\n $ced = mysqli_real_escape_string($this->cn,$data['cedula']); \r\n $info = $this->get_data(\"SELECT COUNT(*) AS contador FROM cliente WHERE cedula='$ced';\");\r\n break;\r\n case \"factura\" :\r\n $ced = mysqli_real_escape_string($this->cn,$data['cedula']); \r\n $info = $this->get_data(\"SELECT * FROM cliente WHERE cedula='$ced';\");\r\n break;\r\n }\r\n break;\r\n\t\t\tcase \"edicion\":\r\n switch($option['lvl2'])\r\n {\r\n case \"by_keyword\": \r\n $keyword = mysqli_real_escape_string($this->cn, $data['keyword']);\r\n $info=$this->get_data(\"SELECT e.*,a.* FROM edicion e, album a WHERE a.nro_catalogo = e.album AND (a.titulo LIKE '$keyword');\");\r\n break;\r\n case \"factura\": \r\n $cod = mysqli_real_escape_string($this->cn, $data['codigo_de_barras']);\r\n $info=$this->get_data(\"SELECT e.*,a.* FROM edicion e, album a where a.nro_catalogo = e.album AND e.codigo_de_barras = '$cod';\");\r\n break;\r\n case \"all\": \r\n $info=$this->get_data(\"select e.*,a.* from edicion e, album a where a.nro_catalogo = e.album;\");\r\n break;\r\n case \"all_ea\": \r\n $cod = mysqli_real_escape_string($this->cn, $data['codigo_de_barras']);\r\n $info=$this->get_data(\"select e.*,a.* from edicion e, album a where a.nro_catalogo = e.album AND e.codigo_de_barras = '$cod';\");\r\n break;\r\n }\r\n\t\t\tbreak;\r\n \r\n case \"empleado\":\r\n switch ($option['lvl2'])\r\n {\r\n case \"all\" :\r\n $info=$this->get_data(\"SELECT * FROM empleado;\");\r\n break;\r\n case \"login\":\r\n $cc=mysqli_real_escape_string($this->cn,$data['cedula']);\r\n \r\n \r\n //$password=mysqli_real_escape_string($this->cn,$data['contraseña']);\r\n //$info=$this->get_data(\"SELECT * FROM empleado WHERE cedula='$id' AND contraseña='$password';\");\r\n \r\n $info=$this->get_data(\"SELECT * FROM empleado WHERE cedula='$cc';\");\r\n break;\r\n case \"count_by_ced\" :\r\n $ced = mysqli_real_escape_string($this->cn,$data['cedula']); \r\n $info = $this->get_data(\"SELECT COUNT(*) AS contador FROM empleado WHERE cedula='$ced';\");\r\n break;\r\n }\r\n break; \r\n \r\n case \"album\":\r\n switch ($option['lvl2'])\r\n {\r\n case \"count_by_ncatalogo\" :\r\n $nro = mysqli_real_escape_string($this->cn,$data['nro_catalogo']); \r\n $info = $this->get_data(\"SELECT COUNT(*) AS contador FROM album WHERE nro_catalogo='$nro';\");\r\n break;\r\n case \"buscar_ediciones_titulo\":\r\n //print_r2($data);\r\n $texto = mysqli_real_escape_string($this->cn,$data['titulo']); \r\n $txt1 = strtolower($texto);\r\n $txt2 = ucfirst($txt1);\r\n $txt3 = strtoupper($texto);\r\n $info = $this->get_data(\"SELECT DISTINCT e.codigo_de_barras, a.interprete, a.titulo, e.formato, e.precio, e.cantidad, a.ano_publicacion, a.caratula, e.album\r\n FROM album a, edicion e\r\n WHERE (INSTR(a.titulo,'$txt1') >0 OR INSTR(a.titulo,'$txt2')>0 OR INSTR(a.titulo,'$txt3')>0)\r\n AND e.album=a.nro_catalogo;\");\r\n break;\r\n case \"buscar_ediciones_interprete\":\r\n // print_r2($data);\r\n $texto = mysqli_real_escape_string($this->cn,$data['interprete']); \r\n // print_r2($texto);\r\n $txt1 = strtolower($texto);\r\n $txt2 = ucfirst($txt1);\r\n $txt3 = strtoupper($texto);\r\n $info = $this->get_data(\"SELECT e.codigo_de_barras, a.titulo, a.interprete, e.formato, e.precio, e.cantidad, a.ano_publicacion, a.caratula, e.album\r\n FROM album a, edicion e\r\n WHERE (INSTR(a.interprete,'$txt1') >0 OR INSTR(a.interprete,'$txt2')>0 OR INSTR(a.interprete,'$txt3')>0)\r\n AND e.album=a.nro_catalogo;\");\r\n break;\r\n \r\n }\r\n break;\r\n case \"cancion\":\r\n switch ($option['lvl2'])\r\n {\r\n case \"buscar_ediciones\" :\r\n \r\n $texto = mysqli_real_escape_string($this->cn,$data['nombre']); \r\n $txt1 = strtolower($texto);\r\n $txt2 = ucfirst($txt1);\r\n $txt3 = strtoupper($texto);\r\n $info = $this->get_data(\"SELECT DISTINCT e.codigo_de_barras,a.interprete, a.titulo, e.formato, e.precio, e.cantidad, a.ano_publicacion, a.caratula, e.album\r\n FROM cancion c, album a, edicion e\r\n WHERE (INSTR(c.nombre,'$txt1') >0 OR INSTR(c.nombre,'$txt2')>0 OR INSTR(c.nombre,'$txt3')>0)\r\n AND c.album=a.nro_catalogo AND e.album=a.nro_catalogo;\");\r\n break;\r\n \r\n case \"las_canciones\":\r\n $album = mysqli_real_escape_string($this->cn,$data['album']); \r\n $info = $this->get_data(\"SELECT * FROM cancion WHERE album='$album';\");\r\n \r\n break;\r\n }\r\n break;\r\n\t\t\t\r\n\t\t\tdefault: break;\r\n\t\t}\r\n\t\treturn $info;\r\n\t}", "public function __construct(){\n //get the configuration for connection to database\n $data_base_opt = System\\Config::get_instance()->get_database_config();\n // receiving object for working with database\n $this->database = System\\Safe_SQL::get_instance($data_base_opt);\n }", "public function __construct()\n\t{\n\t\t$this->dataMgr = createNewDataManager();\n\t\t\n\t\t$this->qLeague = NULL;\n\t\t$this->startYear = 0;\n\t\t$this->curYear = 0;\n\t\t$this->stage = 0;\n\t\t$this->week = 0;\n\t\t$this->FAStage = 0;\n\t\t$this->aTeams = array();\n\t\t\n\t\t$sql = \"SELECT a.startYear, a.curYear, a.stage, a.week, a.FAStage,\n\t\t\t\t\t\t\t\t\t b.StageName, b.StageIndex as stageID, b.transactionStage\n\t\t\t\t\t\t FROM fof_gameinfo a\n\t\t\t\t\t\t\tJOIN fof_stagenames b\n\t\t\t\t\t\t\t ON a.Stage = b.GameInfoStage\n\t\t\t\t\t\t\t AND a.Week = b.GameInfoWeek\n\t\t\t\t\t\t\t AND a.FAStage = b.GameInfoFAStage\";\n\t\t$this->qLeague = $this->dataMgr->runQuery($sql);\n\t\t\n\t\tif(mysql_num_rows($this->qLeague))\n\t\t{\n\t\t\t$row = mysql_fetch_object($this->qLeague);\n\t\t\t\n\t\t\t$this->startYear = $row->startYear;\n\t\t\t$this->curYear = $row->curYear;\n\t\t\t$this->stage = $row->stage;\n\t\t\t$this->week = $row->week;\n\t\t\t$this->FAStage = $row->FAStage;\n\t\t\t$this->stageName = $row->StageName;\n\t\t\t$this->stageID = $row->stageID;\n\t\t\t$this->transactionStage = $row->transactionStage;\n\t\t}\n\t\t\n\t}", "public function __construct($data)\n {\n $this->data=$data;\n }", "function __construct(array $data)\n\t{\n if (isset($data)) {\n $this->id = $data['id'];\n $this->name = $data['name'];\n $this->description = $data['description'];\n }\n\t}", "function __construct() {\n parent::__construct();\n\t\t// Cargamos la base de datos\n\t\t$this -> load -> database();\n }", "function __construct() {\n parent::__construct();\n\t\t// Cargamos la base de datos\n\t\t$this -> load -> database();\n }", "function __construct() {\n parent::__construct();\n\t\t// Cargamos la base de datos\n\t\t$this -> load -> database();\n }", "public function __construct() {\n\t\ttry {\n\t\t\t// Store sql queries\n\t\t\t$_queries = \"select name from udo_fleet where id=%s;\";\n\t\t\t\n\t\t\t// Create new SQL Query class object\n\t\t\t$_mysqlQueryMAX = new PullDataFromMySQLQuery ( self::MAXDB );\n\t\t\t$_mysqlQueryT24 = new PullDataFromMySQLQuery ( self::T24DB );\n\t\t\t\n\t\t\t// : Loop through each fleet ID stored in the fleet IDs array and return the name for each and add it to the array variable\n\t\t\tforeach ( $this->_fleets as $fleetKey => $fleetValue ) {\n\t\t\t\tforeach ( $fleetValue as $_fleet ) {\n\t\t\t\t\t\n\t\t\t\t\t$_aQuery = preg_replace ( \"/%s/\", $_fleet, $_queries );\n\t\t\t\t\tswitch ($fleetKey) {\n\t\t\t\t\t\tcase \"MAX\" :\n\t\t\t\t\t\t\t$_result = $_mysqlQueryMAX->getDataFromQuery ( $_aQuery );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"T24\" :\n\t\t\t\t\t\t\t$_result = $_mysqlQueryT24->getDataFromQuery ( $_aQuery );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (count ( $_result ) != 0) {\n\t\t\t\t\t\tif (($_result [0] [\"name\"]) && (array_key_exists ( \"0\", $_result ) != FALSE) && (array_key_exists ( \"name\", $_result [0] ) != FALSE)) {\n\t\t\t\t\t\t\t$this->_fleetnames [$fleetKey] [$_fleet] = $_result [0] [\"name\"];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// : End\n\t\t\t// : Fetch and store the parameters required from user\n\t\t\t$options = getopt ( \"s:e:\" );\n\t\t\t// Start Date\n\t\t\t$this->_startDate = $options [\"s\"];\n\t\t\t// End Date\n\t\t\t$this->_endDate = $options [\"e\"];\n\t\t\t// : End\n\t\t\t\n\t\t\t// : Construct a multidimensional array containing the year => month => days\n\t\t\t$constructedDates = ( array ) array ();\n\t\t\t// Build an array of the desired date range\n\t\t\t$reportDates = ( array ) $this->createDateRangeArray ( $this->_startDate, $this->_endDate );\n\t\t\t\n\t\t\t// Get the the year within the dates\n\t\t\t$firstYear = intval ( substr ( $reportDates [0], 0, 4 ) );\n\t\t\t$lastYear = intval ( substr ( $reportDates [(count ( $reportDates ) - 1)], 0, 4 ) );\n\t\t\t\n\t\t\t// Determine the first and last month and the total number of months\n\t\t\t$firstMonth = ( string ) substr ( $reportDates [0], - 5, 2 );\n\t\t\t$lastMonth = ( string ) substr ( $reportDates [(count ( $reportDates ) - 1)], - 5, 2 );\n\t\t\t\n\t\t\t// Construct initial parts of our mulitdimensional array\n\t\t\t$aYear = $firstYear;\n\t\t\t$constructedDates [$firstYear] = array ();\n\t\t\t$aMonth = $firstMonth;\n\t\t\t$constructedDates [$firstYear] [$firstMonth] = array ();\n\t\t\t\n\t\t\t// Construct the multidimensional array with the dates\n\t\t\tforeach ( $reportDates as $value ) {\n\t\t\t\tif ($aYear != substr ( $value, 0, 4 )) {\n\t\t\t\t\t$constructedDates [substr ( $value, 0, 4 )] = array ();\n\t\t\t\t\t$aYear = substr ( $value, 0, 4 );\n\t\t\t\t}\n\t\t\t\tif ($aMonth != substr ( $value, - 5, 2 )) {\n\t\t\t\t\t$constructedDates [substr ( $value, 0, 4 )] [substr ( $value, - 5, 2 )] = array ();\n\t\t\t\t\t$aMonth = substr ( $value, - 5, 2 );\n\t\t\t\t}\n\t\t\t\t$constructedDates [$aYear] [$aMonth] [] = $value;\n\t\t\t}\n\t\t\t// : End\n\t\t\t\n\t\t\t// Set variables\n\t\t\t$all = ( array ) array ();\n\t\t\t$dataCount = ( int ) 0;\n\t\t\tforeach ( $constructedDates as $key1 => $value1 ) {\n\t\t\t\tforeach ( $value1 as $key2 => $value2 ) {\n\t\t\t\t\t$all = array ();\n\t\t\t\t\t// Set the filename for the csv file\n\t\t\t\t\t$this->setFileName ( self::DOC_FILE_NAME . date ( \"-\" . $key1 . \"-\" . $key2 ) );\n\t\t\t\t\t// Set the filename for the xls file\n\t\t\t\t\t$this->setExcelFile ( \"/export/\" . $this->getFileName () );\n\t\t\t\t\t// Print the year and month\n\t\t\t\t\techo $key1 . \"-\" . $key2 . PHP_EOL;\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $value2 as $key3 => $value3 ) {\n\t\t\t\t\t\tforeach ( $this->_fleets as $fleetKey => $fleetValue ) {\n\t\t\t\t\t\t\tforeach ( $fleetValue as $fleet_id ) {\n\t\t\t\t\t\t\t\t$aDate = strtotime ( \"+1 day\", strtotime ( $value3 ) );\n\t\t\t\t\t\t\t\t$reportData = array (\n\t\t\t\t\t\t\t\t\t\t($value3 . \" 00:00:00\"),\n\t\t\t\t\t\t\t\t\t\t(date ( \"Y-m-d\", $aDate )) . \" 00:00:00\" \n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$reportUrl = $this->getApiUrl ( $fleetKey ) . \"&responseFormat=csv&Start_Date=\" . $reportData [0] . \"&Stop_Date=\" . $reportData [1] . \"&Fleet=\" . $fleet_id;\n\t\t\t\t\t\t\t\t// Comply with HTML string standard for whitespace characters and replace with %20\n\t\t\t\t\t\t\t\t$reportUrl = str_replace ( \" \", \"%20\", $reportUrl );\n\t\t\t\t\t\t\t\t$fileParser = new FileParser ( $reportUrl );\n\t\t\t\t\t\t\t\t$fileParser->setCurlFile ( $this->getFileName () . \"-\" . $value3 . \".csv\" );\n\t\t\t\t\t\t\t\t$data = $fileParser->parseFile ();\n\t\t\t\t\t\t\t\t$dataCount = count ( $data );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$filteredData = array ();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// If report run is empty skip adding to the array\n\t\t\t\t\t\t\t\tif ($dataCount != 0) {\n\t\t\t\t\t\t\t\t\tforeach ( $data as $dataRecord ) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// : Run through each line item imported and if kms === high then add to filteredData array\n\t\t\t\t\t\t\t\t\t\t$_tenant = \"\";\n\t\t\t\t\t\t\t\t\t\t$kms = 0;\n\t\t\t\t\t\t\t\t\t\t$emptykms = 0;\n\t\t\t\t\t\t\t\t\t\t$highKmsTrue = FALSE;\n\t\t\t\t\t\t\t\t\t\tif ((array_key_exists ( \"Kms in Trip leg\", $dataRecord )) && (array_key_exists ( \"Empty Kms\", $dataRecord ))) {\n\t\t\t\t\t\t\t\t\t\t\t$kms = intval ( $dataRecord [\"Kms in Trip leg\"] );\n\t\t\t\t\t\t\t\t\t\t\t$emptykms = intval ( $dataRecord [\"Empty Kms\"] );\n\t\t\t\t\t\t\t\t\t\t\tif ((($kms != NULL) && ($kms > 0) && ($kms >= self::KMS_HIGH)) && (($emptykms != NULL) && ($emptykms > 0) && ($emptykms >= self::KMS_HIGH))) {\n\t\t\t\t\t\t\t\t\t\t\t\t$highKmsTrue = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$highKmsTrue = FALSE;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if (array_key_exists ( \"Total Kms\", $dataRecord )) {\n\t\t\t\t\t\t\t\t\t\t\t$kms = intval ( $dataRecord [\"Total Kms\"] );\n\t\t\t\t\t\t\t\t\t\t\tif (($kms != NULL) && ($kms > 0) && ($kms >= self::KMS_HIGH)) {\n\t\t\t\t\t\t\t\t\t\t\t\t$highKmsTrue = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$highKmsTrue = FALSE;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tswitch ($highKmsTrue) {\n\t\t\t\t\t\t\t\t\t\t\tcase TRUE :\n\t\t\t\t\t\t\t\t\t\t\t\t$filteredData [] = $dataRecord;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// : End\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// If filteredData is empty then dont add to final data array\n\t\t\t\t\t\t\t\t\tif (count ( $filteredData ) != 0) {\n\t\t\t\t\t\t\t\t\t\t$all [$this->_fleetnames [$fleetKey] [$fleet_id]] [$value3] = $filteredData;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \".\"; // print and period to indicate a report is successfully completed\n\t\t\t\t\t}\n\t\t\t\t\t// : Print final array data to be exported to page\n\t\t\t\t\tprint (\"<pre>\" . PHP_EOL);\n\t\t\t\t\tprint (date(\"Y-m-d H:i:s\") . \" Print final data to export to spreadsheet\" . PHP_EOL);\n\t\t\t\t\tprint_r($all);\n\t\t\t\t\tprint (PHP_EOL . \"</pre>\" . PHP_EOL);\n\t\t\t\t\t// : End\n\t\t\t\t\t\n\t\t\t\t\t// Write excel spreadsheet using final data array only if there is data to export\n\t\t\t\t\tif (count ( $all ) != 0) {\n\t\t\t\t\t\t$this->writeExcelFile ( dirname ( __FILE__ ) . $this->getExcelFile () . \".xlsx\", $all, self::REPORT_NAME . \"-\" . $key1 . \"-\" . $key2, $key1 . \"-\" . $key2 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\techo \"Caught exception: \", $e->getMessage (), \"\\n\";\n\t\t\techo \"F\", \"\\n\";\n\t\t\texit ();\n\t\t}\n\t}", "public function __construct() \n\t{\n\t\t$strSqlModel = \n\t\t'SELECT cat.*, prd.* \n\t\tFROM \n\t\t(\n\t\t\t(\n\t\t\t\t(\n\t\t\t\t\t(\n\t\t\t\t\t\tproducts prd INNER JOIN categories cat ON (prd.prd_cat_id = cat.cat_id)\n\t\t\t\t\t) INNER JOIN prices pri ON (prd.prd_id = pri.pri_prd_id)\n\t\t\t\t) INNER JOIN countries cnt ON (pri.pri_cnt_id = cnt.cnt_id)\n\t\t\t) INNER JOIN currencies cur ON (cnt.cnt_cur_id = cur.cur_id)\n\t\t)\n\t\tINNER JOIN stocks stk ON (prd.prd_id = stk.stk_prd_id) \n\t\t'.CONF_TAG_LIST_SQL_CRITERIA.' \n\t\tGROUP BY prd.prd_id \n\t\tORDER BY cat.cat_id ASC, prd.prd_id ASC \n\t\t'.CONF_TAG_LIST_SQL_LIMIT.'';\n\t\t\n\t\t$intPageNbRow = CONF_LIST_PAGE_COUNT_ROW_PROD;\n\t\t\n\t\t$tabCritOperation = array();\n\t\t$tabCritOperation['cur_id'] = \"(cur.cur_id = \".CONF_TAG_LIST_SQL_OPE_VALUE.\")\";\n\t\t\n\t\tparent::__construct($strSqlModel, $tabCritOperation, $intPageNbRow);\n\t}", "public function __construct($data)\r\n {\r\n $this->_name = $data->name;\r\n $this->_option = ($data->optional == '1') ? true : false;\r\n $data = (array) $data;\r\n $this->_description = $data['$t'];\r\n }", "function __construct()\n {\n if (ConfigGlobal::is_dmz()) {\n $oDbl = $GLOBALS['oDBEP'];\n $oDbl_Select = $GLOBALS['oDBEP_Select'];\n $this->setoDbl($oDbl);\n $this->setoDbl_Select($oDbl_Select);\n $this->setNomTabla('u_centros');\n } else {\n $oDbl = $GLOBALS['oDBP'];\n $this->setoDbl($oDbl);\n $this->setoDbl_Select($oDbl);\n $this->setNomTabla('u_centros');\n }\n }", "function __construct(){\n\n\t\t\t$this->setConnection();\n\n\t\t}", "function __construct($data)\n {\n $this->Id = @$data['id'];\n $this->navegador = @$data['navegador'];\n $this->pregunta = @$data['pregunta'];\n $this->respuesta = @$data['respuesta'];\n }", "function __construct() {\r\n\t\t\r\n\t\t$this->conexaoDB=new DB();\r\n\t\t$this->tabela=\"retirante\";\r\n\t\r\n\t}", "public function __construct() {\n self::getBdd();\n }", "function __construct($u_id = \"-1\"){\n try{\n $db = new MyConnection();\n $this->connection = $db->getConnection();\n // Initialise frequently used queries as prepared statements\n $this->initQueries();\n }\n catch (Exception $e){\n echo \"MySQL Connection Failed\";\n }\n // if the emmployee id is -1 create a container employee\n if($u_id == \"-1\")\n // default data\n $this->data = array('u_id'=> -1,\n 'e_id' => 'MAHE9999999',\n 'email' => 'na',\n 'password' => 'na');\n else // if not check if employee exists and then retrieve\n {\n // Retrieve data from the employee id\n $this->data['u_id'] = $u_id;\n $result = $this->connection->query(\"SELECT * FROM user WHERE u_id = '{$this->data['u_id']}'\");\n if($result && $result->num_rows == 1){\n\n $this->data = $result->fetch_assoc();\n }\n else{\n echo \"Cannot Retrieve\";\n }\n }\n }", "public function __construct()\n\t\t{\n\t\t\t$this->connection();\n\t\t}", "public function __construct($id = 0)\n\t{\n\t\tparent::__construct($id); \n\t\t\n\t\tif($id > 0)\n\t\t\t$this->getData($id);\n\t}", "public function __construct($data){\n\t\t$this->id = $data->id;\n\t\t$this->name = (string)$data->name;\n\t\t$this->date = (string)$data->date;\n\t\t$this->time = (string)$data->time;\n\t\t$this->information = (string)$data->information;\n\t\t$this->dailycomment = (string)$data->dailycomment;\n\t\t\n\t\t$this->status['code'] = (string)$data->status->code;\n\t\t$this->status['openingdate'] = (string)$data->status->openingdate;\n\t\t$this->status['updatetime'] = (string)$data->status->updatetime;\n\t\t\n\t\t$this->snow['base'] = (string)$data->snow->mindepth; //min\n\t\t$this->snow['upperbase'] = (string)$data->snow->base; //max\n\t\t$this->snow['latestfall'] = (string)$data->snow->latestfall;\n\t\t$this->snow['latestfalldate'] = (string)$data->snow->latestfalldate;\n\t\t$this->snow['detail'] = (string)$data->snow->detail;\n\t\t\n\t\t$this->road['code'] = (string)$data->road->code;\n\t\t$this->road['brief'] = (string)$data->road->brief;\n\t\t$this->road['detail'] = (string)$data->road->detail;\n\t\t\n\t\t$this->weather['detail'] = (string)$data->weather->detail;\n\t\t$this->weather['brief'] = (string)$data->weather->brief;\n\t\t$this->weather['temperature'] = (string)$data->weather->temperature;\n\t\t\n\t\t$this->facilityTypes = new ArrayList();\n\t\tforeach($data->facilities->facilitytype as $type) {\n\t\t\t$t = FacilityType::createFromXMLElement($type);//mostly just to get this viewable in template, and display it's name\n\t\t\t$t->facilities = new ArrayList();\n\t\t\tforeach($type as $name=>$facility){\n\t\t\t\tif ($name === 'facility'){//avoid the facility type's name and ID\n\t\t\t\t\t$f = Facility::createFromXMLElement($facility);\n\t\t\t\t\t$t->facilities->push($f);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->facilityTypes->push($t);\n\t\t}\n\t}", "function __construct() {\n parent::__construct();\n\n // prepare SQL statements\n $this->selectStmt = self::$PDO->prepare(\n \"SELECT * FROM work_shiftworker WHERE id=?\");\n $this->selectAllStmt = self::$PDO->prepare(\n \"SELECT * FROM work_shiftworker\");\n $this->findByShiftIdStmt = self::$PDO->prepare(\n \"SELECT * FROM work_shiftworker WHERE shift_id=?\");\n $this->findByUserIdStmt = self::$PDO->prepare(\n \"SELECT * FROM work_shiftworker WHERE user_id=?\");\n $this->insertStmt = self::$PDO->prepare(\n \"INSERT INTO work_shiftworker (\n shift_id, user_id, assigned, no_show, user_comment, employer_comment\n ) values (?, ?, ?, ?, ?, ?)\");\n $this->updateStmt = self::$PDO->prepare(\n \"UPDATE work_shiftworker SET\n shift_id=?,\n user_id=?,\n assigned=?,\n no_show=?,\n user_comment=?,\n employer_comment=?\n WHERE id=?\");\n $this->deleteStmt = self::$PDO->prepare(\n \"DELETE FROM work_shiftworker WHERE id=?\");\n }" ]
[ "0.69302994", "0.68096316", "0.6462163", "0.6418216", "0.63574094", "0.6355634", "0.6337757", "0.63037443", "0.6303583", "0.629766", "0.62749726", "0.6241014", "0.62236476", "0.6221065", "0.62190926", "0.6218964", "0.6217489", "0.6213406", "0.6194933", "0.6189272", "0.6163814", "0.61634535", "0.61634535", "0.61616963", "0.61616963", "0.61609083", "0.61609083", "0.6156409", "0.6145158", "0.61421156", "0.6131797", "0.61249936", "0.6120082", "0.6116903", "0.6108642", "0.609957", "0.60987115", "0.60914433", "0.6081077", "0.6072496", "0.6051103", "0.60403216", "0.604", "0.6035385", "0.6011706", "0.600939", "0.60050315", "0.60012835", "0.59965086", "0.599028", "0.59887385", "0.59887385", "0.59882414", "0.5987261", "0.5982659", "0.5972017", "0.5972017", "0.5972017", "0.5970919", "0.59707516", "0.5967238", "0.59575254", "0.59549177", "0.59518296", "0.59472096", "0.5946187", "0.5938533", "0.59348625", "0.5934564", "0.5931475", "0.59312874", "0.5922612", "0.5921325", "0.591537", "0.59107596", "0.59053123", "0.5897732", "0.5897519", "0.5895464", "0.5894774", "0.58738667", "0.58731085", "0.5869082", "0.5868841", "0.5866407", "0.5862951", "0.5862951", "0.5862951", "0.5861143", "0.58609694", "0.58444124", "0.5832243", "0.58313", "0.5825662", "0.5823061", "0.5821949", "0.5817865", "0.5814498", "0.5807526", "0.58018625", "0.5800855" ]
0.0
-1
end insertData check email,it is already used or not
function checkEmail($email){ $query = "SELECT Email FROM tbl_userinfo WHERE Email=$email LIMIT 1"; $result = $this->conn->query($query); if (var_dump($result) > 0){ return true; }else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function validateEmailUser(){\n $this->deleteDuplicateCode($this->_datPerson[personId]);\n $this->_code = rand(10000, 99999);\n $em = $this->getDoctrine()->getManager();\n $UserValidationEmail = new Uservalidationemail();\n $UserValidationEmail->setEmail($this->_datPerson[email]);\n $UserValidationEmail->setCode($this->_code);\n $UserValidationEmail->setDateregister(new \\DateTime());\n $UserValidationEmail->setData(json_encode($this->_datPerson));\n $UserValidationEmail->setPersonid($this->_datPerson[personId]);\n\n $em->persist($UserValidationEmail);\n $em->flush();\n }", "public function insertData($name,$email)\n {\n $name = strip_tags($name);\n $email = strip_tags($email);\n if (($name && $email) != null) {\n # code...\n $sql_check = \"SELECT * FROM testdata WHERE mail = :email\";\n $query = $this->db->prepare($sql_check);\n $query->bindParam(\":email\",$email);\n $query->execute();\n $row = $query->fetch(PDO::FETCH_ASSOC);\n if (! $row) {\n # code...\n $sql = \"INSERT INTO testdata (name, mail) VALUES (:name,:email)\";\n $query = $this->db->prepare($sql);\n $query->execute(array(':name' => $name, ':email' => $email));\n return true;\n }\n else\n {\n return false;\n }\n \n }else\n {\n return false;\n }\n }", "public function insert($email,$data)\n { \n\n try\n {\n DB::insert('userdata', array('email','data'))\n ->values(array($email, $data))\n ->execute();\n \n return true;\n }\n catch( Database_Exception $e )\n {\n //echo $e->getMessage(); \n return false;\n }\n }", "public function insertRecord(){\n\t\tglobal $db;\n $data = array('email'=>$this->email);\n\t\t\t $user_email = $this->chk_user_exist();\n\t\t\t if(!empty($user_email)){\n\t\t\t\t $response['m'] = 'exist';\n\t\t\t }else{\n\t\t\t\t if($db->insert($this->table,$data))\n\t\t\t\t $response['m'] = 'success';\n\t\t\t }\n\t\t \n\t\treturn $response;\t\n\t}", "public function uniqueEmail() {\n if (CmsUser::model()->exists(\"id != \" . userId() . \" AND email='{$this->register_email}'\")) {\n $this->addError('register_email', 'Email already exist');\n }\n }", "function insert_account($data){\n\t\t//$this->db->query($insert_exec);\n\t\t$query = $this->db->query(\"select * from Account where email=\\\"\".$data['email'].\"\\\" limit 1\")->result_array();\n\t\tif(!$query){\n\t\t\tif($data['email'] != NULL){\n\t\t\t\tif($data['passwd'] != NULL){\n\t\t\t\t\tif($data['name'] != NULL){\n\t\t\t\t\t\t$this->db->insert('Account', $data);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function addEmail( $email ){\n \n $conn = $this->connect();\n \n //By default, mysql is not case sensitive, but you can change it in my.cnf file, to prevent error, change all to lowercase\n $sql = 'select email from ' . $this->dbtable . ' where email = lower(\"' . trim($email) . '\")';\n\t\t\t$query = mysql_query( $sql, $conn);\n\t\t\t\n\t\t\tif( mysql_num_rows( $query ) > 0 ){\n\t\t\t\treturn 'EMAIL JA CADASTRADO'; //Email already exist msg\n\t\t\t} else {\n\t\t\t\t$sql = 'insert into ' . $this->dbtable . '(email) value(lower(\"' . $email . '\"))';\n\t\t\t\tmysql_query( $sql, $conn);\n\t\t\t}\n \n mysql_close( $conn );\n \n return 'EMAIL SALVO COM SUCESSO'; //Email sucefully saved\n }", "public function addNewEmail($data){\r\n // \"VALUES ('',null,null,null, NOW(), NOW())\";\r\n //$query = $this->db->query($queryString);\r\n $queryString = \"INSERT INTO `\". DB_PREFIX .\"visitor_email` (`email`, `name`, `gender`, `active`, `date_added`, `date_modified`) VALUES(\";\r\n $queryString .= \"'\". (isset($data['email']) ? $data['email'] : \"\") .\"', \";\r\n $queryString .= isset($data['name']) ? \"'\".$data['name'].\"', \" : \"null, \";\r\n $queryString .= isset($data['gender']) ? \"'\".$data['gender'].\"', \" : \"null, \";\r\n $queryString .= isset($data['active']) ? \"'\".$data['active'].\"', \" : \"null, \";\r\n $queryString .= isset($data['date_added']) ? \"'\".$data['date_added'].\"', \" : \"NOW(), \";\r\n $queryString .= isset($data['date_modified']) ? \"'\".$data['date_modified'].\"', \" : \"NOW()\";\r\n $queryString .= \")\";\r\n return $this->db->query($queryString); \r\n }", "function check_email_duplicate(){\n $this->SQL = \"SELECT email FROM users\"\n . \" WHERE email = '\" . $this->params['email'] . \"';\" ;\n \n \n $this->selecet_query();\n return $this->results;\n \n }", "public function insertNewEmail($data)\r\n {\r\n $this->setTable('subscribed');\r\n $table = $this->getTable();\r\n\r\n $this->setEmail('email');\r\n $email = $this->getEmail();\r\n\r\n $this->setDate('date');\r\n $date = $this->getDate();\r\n\r\n $queryText = \"INSERT INTO \" . $table;\r\n $queryText .= \" (\" . $date. \", \" . $email;\r\n $queryText .= \") VALUES(:date, :email)\";\r\n\r\n $this->query($queryText);\r\n\r\n $this->bind(':date', $data['date']);\r\n $this->bind(':email', $data['email']);\r\n\r\n if ($this->execute()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public function chkEmailDuplicate() {\n $this->load->model('register_model');\n $user_email = $this->input->post('user_email');\n $user_email_back = $this->input->post('user_email_back');\n if ($user_email == $user_email_back) {\n echo 'true';\n } else {\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('user_id', 'user_email');\n $condition_to_pass = array(\"user_email\" => $user_email);\n $arr_login_data = $this->register_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\n if (count($arr_login_data)) {\n echo 'false';\n } else {\n echo 'true';\n }\n }\n }", "function checkHold($msi,$user_id,$contact_data,$email,&$err_msg) {\n foreach($contact_data->em as $ex) {\n if($ex['email']['v'] == $email) {\n return true;\n }\n }\n if(!$stmt=$msi->prepare('insert into hold_email '.\n '(user_id,action,contact_id,email_id,email_type_id,email) '.\n \"values (?,'A',?,0,3,?)\")) {\n $err_msg.='checkHold prep insert error: '.$msi->error.' ';\n return false;\n }\n if(!$stmt->bind_param('iis',$user_id,\n $contact_data->contact_id,$email)) {\n $err_msg.='checkHold bind param error: '.$msi->error.' ';\n return false;\n }\n if(!$stmt->execute()) {\n $err_msg.='checkHold exec error: '.$msi->error.' ';\n return false;\n }\n return true;\n}", "public function validUniqueMail() {\n $em = $this->getDoctrine()->getManager();\n $Person = $em->getRepository('UNOEvaluacionesBundle:Person')->findOneBy(array('email' => $this->_datPerson[email]));\n if ($Person) {\n #si existe el mail, por lo que hay q pedirle q ingrece otro\n return false;\n }else{\n return true;\n }\n\n }", "public function _unique_email() {\r\n // UNLESS it's the email for the current user\r\n\r\n $id = $this->uri->segment(4);\r\n $this->db->where('email', $this->input->post('email'));\r\n !$id || $this->db->where('id !=', $id);\r\n $account = $this->account_model->get();\r\n\r\n if (count($account)) {\r\n $this->form_validation->set_message('_unique_email', '%s này đã tồn tại');\r\n return FALSE;\r\n }\r\n return TRUE;\r\n }", "public function insert_new_user($data)\n {\n foreach($data as $key=>$val) $$key=get_magic_quotes_gpc()?$val:addslashes($val);\n $password = md5($password);\n $query = new Query;\n $count = $query->select('COUNT(*) as count')->from('core_users')->where(\"email = '$email'\")->orWhere(\"phone_number = '$phone_number'\")->All();\n if($count[0]['count']==0)\n {\n $query = Yii::$app->db;\n $result = $query->createCommand()->insert('core_users', [\n \"user_name\"=>$user_name,\n \"email\"=>$email,\n \"password\"=>$password,\n \"phone_number\"=>$phone_number,\n //\"phone_prefix\"=>'91',\n \"user_status\"=>'1',\n \"company_name\"=>$company_name,\n \"designation\"=>$designation,\n \"company_email\"=>$company_email,\n \"company_address\"=>$address,\n \"user_type\"=>1\n ])->execute();\n \n \n $subject=\"Big Equipments India | User Registration\";\n //get message to send to user\n $message = Mail_settings::get_registration_message();\n //send email to user\n Mail_settings::send_email_notification($email,$subject,$message);\n \n if($result)\n {\n return true;\n }\n return false;\n }\n return false;\n \n }", "public function registration_insert($data) {\n\n// Query to check whether username already exist or not\n$condition = \"Email =\" . \"'\" . $data['Email'] . \"'\";\n$this->db->select('*');\n$this->db->from('customer');\n$this->db->where($condition);\n$this->db->limit(1);\n$query = $this->db->get();\nif ($query->num_rows() == 0) {\n\n// Query to insert data in database\n$this->db->insert('customer', $data);\nif ($this->db->affected_rows() > 0) {\nreturn true;\n}\n} else {\nreturn false;\n}\n}", "public function _check_email_exists($email = ''){\n\t\t\n\t}", "public function chkEmailExist() {\n ob_clean();\n $this->load->model('register_model');\n $user_email = $this->input->post('user_email');\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('user_id', 'user_email');\n if ($this->input->post('action') != \"\") {\n $condition_to_pass = \"(user_type!=2) and (`user_email` = '\" . $user_email . \"' or `user_name` = '\" . $user_email . \"')\";\n } else {\n $condition_to_pass = array(\"user_email\" => $user_email);\n }\n $arr_login_data = $this->register_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\n if (count($arr_login_data)) {\n echo 'true';\n } else {\n echo 'false';\n }\n }", "function email_unique_check($email)\r\n\t{\r\n\t\t$isUnique = true;\r\n\r\n\t\t//Skapar anslutning till databasen.\r\n\t\t$db=new Database();\r\n\r\n\t\t//Hämtar de rader som har samma email.\r\n\t\t$result = $db->getUser($email);\r\n\r\n\t\t//Om det blev resultat.\r\n\t\tif($result)\r\n\t\t{\r\n\t\t\t//Finns det en rad betyder detta att ett konto med samma email redan existerar i databasen, och inget nytt konto ska skapas.\r\n\t\t\tif($row = mysqli_fetch_row($result))\r\n\t\t\t{\r\n\t\t\t\t//Email är ej unikt.\r\n\t\t\t\t$isUnique = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Avslutar anslutning till databasen.\r\n\t\t$db->close();\r\n\r\n\t\treturn $isUnique;\r\n\t}", "public function register($data){\r\n\r\n if(($this->check_email($data['email'])) && ($this->check_username($data['username']))){\r\n $this->db->insert('users', $data);\r\n return $idOfInsertedData = $this->db->insert_id();\r\n }else{\r\n return false;\r\n }\r\n\r\n }", "public static function modeloExisteEmail( String $email):bool{\n $stmt=self::$db->prepare(self::consulta_email);\n $stmt->bindValue(1,$email);\n $stmt->execute();\n modeloUserDB::Init();\n}", "public function save() {\n $query = $this->conn->prepare(\"INSERT INTO subscribers (email) VALUES (:email)\");\n $res = $query->execute([\"email\" => $this->email]);\n return $res ? $this->email : false;\n }", "function fgcf_insert_data($name, $email, $msg) {\n\t global $wpdb;\n $data = array(\n 'user_name' => $name,\n 'user_email' => $email,\n 'user_message' => $msg\n );\n $wpdb->insert(Fgcf::$table_name, $data);\n return true;\n }", "function checkEmailUnique($data) {\n App::import('Model', 'Member');\n //pr()\n $obj = new Member();\n //if( $Session->read('Auth.Profile.ch_active') == 'STSTY05' ) :\n //\t$Session = new CakeSession();\n // pr($Session->read('Auth'));\n\n if (isset($this->data['Customer']['editvalue']) && $this->data['Customer']['editvalue'] == 'edit') {\n\n $countResult = $this->find('count', array(\n 'conditions' => array(\n 'OR' => array(\n array('Customer.vc_alter_email' => $data['vc_alter_email'],\n 'Customer.vc_cust_no!' => $this->data['Customer']['vc_cust_no'],\n ),\n array('Customer.vc_email' => $data['vc_alter_email'],\n )),\n 'Customer.vc_comp_code' => $this->data['Customer']['vc_comp_code']\n )));\n\n $countmemberResult = $obj->find('count', array(\n 'conditions' => array(\n 'Member.vc_email_id' => $data['vc_alter_email'],\n 'Member.vc_comp_code' => $this->data['Customer']['vc_comp_code'],\n 'Member.vc_cbc_customer_no!' => $this->data['Customer']['vc_cust_no'],)));\n } else {\n\n $countResult = $this->find('count', array(\n 'conditions' => array(\n 'OR' => array(\n array('Customer.vc_alter_email' => $data['vc_alter_email'],\n ),\n array('Customer.vc_email' => $data['vc_alter_email'],\n )),\n 'Customer.vc_comp_code' => $this->data['Customer']['vc_comp_code']\n ))\n );\n $countmemberResult = $obj->find('count', array(\n 'conditions' => array(\n 'Member.vc_email_id' => $data['vc_alter_email'],\n 'Member.vc_comp_code' => $this->data['Customer']['vc_comp_code']\n )));\n }\n if (isset($data['vc_alter_email']) && !empty($data['vc_alter_email']) && trim($data['vc_alter_email']) == trim(isset($this->data['Customer']['vc_email']))) {\n return false;\n }\n\n if ($countResult == 0 && $countmemberResult == 0) {\n\n return true;\n } else {\n return false;\n }\n }", "public function chkEditEmailDuplicate() {\r\n\r\n if ($this->input->post('user_email') == $this->input->post('user_email_old')) {\r\n echo 'true';\r\n } else {\r\n $table_to_pass = 'mst_users';\r\n $fields_to_pass = array('user_id', 'user_email');\r\n $condition_to_pass = array(\"user_email\" => $this->input->post('user_email'));\r\n $arr_login_data = $this->user_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\r\n if (count($arr_login_data)) {\r\n echo 'false';\r\n } else {\r\n echo 'true';\r\n }\r\n }\r\n }", "public function _insert_key($data)\n {\n $email=$data['user_email'];\n $deviceId=$data['device_id'];\n $key=$data['auth_key'];\n //check if key exists for the email\n if($this->_get_key($email,$deviceId))\n { \n //$result= $this->update_key($data);\n $result = 0;\n $message = \"Already Logged In\";\n }\n else{\n $query = $this->db->insert('login_keys',$data);\n $result= $this->db->affected_rows($query);\n }\n \n if ($result>0) { \n return TRUE; \n }\n else \n return $message;\n \n }", "public function insertEmail(DepositTracker $config, $email)\n {\n $this->db->set(\"id\", GuidGenerator::generate());\n $this->db->set(\"deposit_tracker_id\", $config->getId());\n $this->db->set(\"email\", $email);\n $this->db->set(\"status\", \"pending\");\n $this->db->set(\"screened\",self::FLAG_SCREENED);\n $this->db->set(\"created_at\", IappsDateTime::now()->getUnix());\n $this->db->set(\"created_by\", $config->getCreatedBy());\n if($this->db->insert('iafb_remittance.deposit_tracker_email'))\n {\n return true;\n }\n return false;\n }", "function do_insert_additional_email($s_id,$fname,$lname,$email) {\n\t# Dim some Vars:\n\t\tglobal $_DBCFG, $db_coin;\n\n\t# Do purge contact\n\t\t$query \t = 'INSERT INTO '.$_DBCFG['suppliers_contacts'];\n\t\t$query\t.= ' (contacts_id, contacts_s_id, contacts_name_first, contacts_name_last, contacts_email)';\n\t\t$query\t.= \"VALUES ('', \";\n\t\t$query\t.= \"'\".$db_coin->db_sanitize_data($s_id).\"', \";\n\t\t$query\t.= \"'\".$db_coin->db_sanitize_data($fname).\"', \";\n\t\t$query\t.= \"'\".$db_coin->db_sanitize_data($lname).\"', \";\n\t\t$query\t.= \"'\".$db_coin->db_sanitize_data($email).\"')\";\n\t\t$db_coin->db_query_execute($query) OR DIE(\"Unable to complete request\");\n\t\treturn $db_coin->db_query_affected_rows();\n}", "public function email_check($str){ \n $con = array( \n 'returnType' => 'count', \n 'conditions' => array( \n 'email' => $str \n ) \n ); \n $checkEmail = $this->Admins->getRows($con); \n if($checkEmail > 0){ \n $this->form_validation->set_message('email_check', 'The given email already exists.'); \n return FALSE; \n }else{ \n return TRUE; \n } \n }", "public function add_user_act() { \n $where['email'] = $this->input->post('str_Admin_ID'); // \"[email protected]\";\n $post = $this->input->post();\n $data1 = $this->user_model->select_table2($where,\"admin\");\n if($data1)\n {\n $this->session->set_flashdata('message', 'Email Id Already Exits');\n redirect('user/add_user');\n }\n else\n { \n $rand = rand();\n if ($_POST['region']) {\n $region = $_POST['region'];\n } else {\n $region = \"\";\n }\n $de = $this->input->post('usertype');\n $design = explode(',', $de);\n $con = $this->input->post('country');\n $co = explode(',', $con);\n $words = explode(\" \", $_POST['str_name']);\n $name = \"\";\n foreach ($words as $w) {\n $name .= $w[0];\n }\n $name = strtoupper($name);\n $coun = mb_substr($co[1], 0, 3);\n $coun = strtoupper($coun);\n $gen = mb_substr($_POST['gender'], 0, 1);\n $join = str_replace(\"/\", \"\", $_POST['joining']);\n $dob = substr($_POST['dob'], -2);\n $unique = \"$name$dob$gen/$coun/$join\";\n if (isset($_POST)) {\n $data = array(\n 'name' => $_POST['str_name'],\n 'admin_id' => $_POST['str_Admin_ID'],\n 'email' => $_POST['str_Admin_ID'],\n 'password' => md5($_POST['str_Password']),\n 'location' => $_POST['location'],\n 'gender' => $_POST['gender'],\n 'dob' => $_POST['dob'],\n 'joining' => $_POST['joining'],\n 'country' => $_POST['country'],\n 'usertype' => $design[1],\n\t\t\t\t'design_id' => $design[0],\n\t\t\t\t'shift_id' => $_POST['shift_id'],\n 'unique_code' => $unique,\n 'tx_desc' => $post['tx_desc'],\n 'region' => $region,\n 'ses_id' => $rand,\n 'menu' => json_encode($_POST['menu']),\n 'created_at' => date('Y-m-d h:m:s')\n );\n //echo '<pre>';print_r($data);die;\n\n if(!empty($_FILES['image']['name']))\n { \n $config['upload_path'] = './assets/images/employee';\n $config['allowed_types'] = 'jpeg|jpg|png|JPG|JPEG';\n $config['max_size'] = '2048000';\n $this->load->library('upload', $config);\n $this->upload->initialize($config);\n if($this->upload->do_upload('image'))\n {\n $fileData = $this->upload->data();\n $data['image'] = $fileData['file_name'];\n }\n else\n {\n return $message = $this->upload->display_errors();\n }\n }\n $table_name = \"admin\";\n $last_id = $this->user_model->insert_table($data, $table_name);\n //echo $this->db->last_query(); exit;\n redirect('user');\n }\n }\n }", "function m_verifyInsertUser()\n\t{\n\t\t$this->errMsg=MSG_HEAD.\"<br />\";\n\t\t$data = implode(\",\",$this->request);\n\t\tif(CAPTCHA_REGISTRATION){\n\t\t\tif($_SESSION['image_auth_string'] != $this->request['cap_key']){\n\t\t\t\t$this->err=1;\n\t\t\t\t$this->errMsg.=MSG_INVALID_CAP_KEY.\"<br />\";\n\t\t\t}\n\t\t}\n\t\tif(!$this->libFunc->m_validEmailData($data)){\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_INVALID_EMAILDATA.\"<br />\";\n\t\t}\n\t\tif(empty($this->request['first_name']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_FIRSTNAME_EMPTY.\"<br />\";\n\t\t}\n\t\tif(empty($this->request['last_name']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_LASTNAME_EMPTY.\"<br>\";\n\t\t}\n\t\tif(empty($this->request['txtemail']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_EMAIL_EMPTY.\"<br>\";\n\t\t}\n\t\tif(!$this->libFunc->m_validateEmail($this->request['txtemail']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_INVALID_EMAILADDR.\"<br />\";\n\t\t}\n\t\tif(empty($this->request['address1']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_ADDRESS1_EMPTY.\"<br>\";\n\t\t}\n\n\t\tif(empty($this->request['city']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_CITY_EMPTY.\"<br>\";\n\t\t}\n\t\tif(empty($this->request['zip']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_ZIP_EMPTY.\"<br>\";\n\t\t}\n\t\tif(empty($this->request['phone']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_PHONE_EMPTY.\"<br>\";\n\t\t}\n\t\t#VALIDATING EXISTING OPTION TITLE\n\t\t//adding status check to allow for registration of a account that has already ordered once. Status signifies it was a auto generated account and shouldnt be used or is a yet to be verified account. Should consider making a seperate flag for account signalling that it is a autogenerated account.\n\t\t$this->obDb->query = \"SELECT iCustmerid_PK FROM \".CUSTOMERS.\" where vEmail = '\".$this->request['txtemail'].\"' AND iRegistered='1'\";\n\t\t$row_code = $this->obDb->fetchQuery();\n\t\tif($this->obDb->record_count != 0)\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_EMAIL_EXIST.\"<br>\";\n\t\t}\n\t\t\n\t\treturn $this->err;\n\t}", "public function validateEmailConfirmedUnique()\n\t{ \n\t\tif ( $this->email )\n\t\t{\n\t\t\t$exists = User::findOne([\n\t\t\t\t'email' => $this->email,\n\t\t\t]);\n\n\t\t\tif ( $exists )\n\t\t\t{\n\t\t\t\t$this->addError('email', 'This E-mail has already been taken.');\n\t\t\t}\n\t\t}\n\t}", "public function isAlreadyExist(){\n \n $query = \"SELECT *\n FROM \" . $this->table . \" \n WHERE email='\".$this->email.\"'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n // execute query\n $stmt->execute();\n if($stmt->rowCount() > 0){\n return true;\n }else{\n return false;\n }\n }", "public function insertNlAbo()\n\t{\n\t try{\n\t $tup=array('email'=>$_POST['email']);\n\t\t//$t=array('email'=>$tab['email']);\n\t\t$req= self::$bdd->prepare('insert into AbonnementNlGW values (:email);');\n\t\t$req->execute($tup);\n\t\treturn true;\n\t }catch(PDOException $Exception){\n\t return false;\n\t }\n\t}", "public function enter_data($name,$email){\n\n\n $status=0;//status is 0 initially\n $code=md5(rand(0,1000));\n \t$query = $this ->conn ->prepare('INSERT INTO androidusers SET name =:name,\n email =:email, status =:status, code=:code');\n \t$query->execute(array('name' => $name, ':email' => $email, 'status'=>$status, 'code'=>$code));\n\n //Send verification link to registered email after clicking the link the confirmed email address after that admin sends password to \n //that email.\n $mail = new PHPMailer;\n $mail->isSMTP();//SMTP-Simple mail transfer protocol(TCP/IP)protocol used in sending and receiving email.\n $mail->Host = 'smtp.mail.yahoo.com';\n $mail->Port = 587;//TLS port number in case of SSL 465.\n $mail->SMTPSecure = 'tls';// TLS- Transport layer security is a cryptographic protocol that provide authentication and data encryptions between the servers\n //e.g client connection to webserver\n $mail->SMTPAuth = true;\n $mail->Username = '';//Admin can replace email alotted to them\n $mail->Password = '';//Password can also be replaced according to the email\n $mail->From = \"[email protected]\";\n $mail->FromName = \"[email protected]\";\n $mail->AddAddress($email);\n $mail->Subject = 'SMART LAB IoT USER LOGIN - EMAIL VERIFICATION';\n \n $mail->msgHTML('<p>Dear '.$name.',<br/><br/><br/> Your verification link is: http://192.168.1.101/android/server/verify.php?name='.$name.'&email='.$email.'&code='.$code.'</p>');\n \n if (!$mail->send()) {\n $error = \"Mailer Error: \" . $mail->ErrorInfo;\n echo '<p id=\"para\">'.$error.'</p>';\n }\n else {\n return true;\n }\n //Ending mail function\n\n\n\n if ($query) {\n \n return true;\n\n } else {\n\n return false;\n\n }\n\n\n\n\n\n\n }", "public function pushEmail($receipientMail)\n {\n $sql = \"SELECT email FROM subscriptionEmail\";\n $query = mysqli_query($this->con, $sql);\n $query = mysqli_fetch_array($query);\n\n // check if the users email is not already in the database\n while ($row = ($query['email'])) {\n if ($row !== $receipientMail) {\n // echo $row. \" and \" . $receipientMail;\n $sql =\"INSERT INTO subscriptionEmail VALUES('', '$receipientMail')\";\n $query = mysqli_query($this->con, $sql);\n }\n }\n }", "public function email_check($str){ \n $con = array( \n 'returnType' => 'count', \n 'conditions' => array( \n 'email' => $str \n ) \n ); \n $checkEmail = $this->User->getRows($con); \n if($checkEmail > 0){ \n $this->form_validation->set_message('email_check', 'The given email already exists.'); \n return FALSE; \n }else{ \n return TRUE; \n } \n }", "function _check_email_exist_create($email) {\n\n\t\t$this->load->model('user');\n\n\t\t$result = $this->user->check_email_exist($email);\n\n\t\t\n\n\t\tif ($result == TRUE) {\n\n\t\t\t$this->form_validation->set_message('_check_email_exist_create', 'The email \"'.$email.'\" already exists!');\n\n\t\t\treturn FALSE;\n\n\t\t} else {\n\n\t\t\treturn TRUE;\n\n\t\t}\n\n\t}", "function _check_email_exist_create($email) {\n\n\t\t$this->load->model('user');\n\n\t\t$result = $this->user->check_email_exist($email);\n\n\t\t\n\n\t\tif ($result == TRUE) {\n\n\t\t\t$this->form_validation->set_message('_check_email_exist_create', 'The email \"'.$email.'\" already exists!');\n\n\t\t\treturn FALSE;\n\n\t\t} else {\n\n\t\t\treturn TRUE;\n\n\t\t}\n\n\t}", "public function create($data)\n\t{\n\t\t$this->db->where('email',$data['email']);\n\t\t$is_exists = $this->db->get($this->table);\n\n\t\tif ( $is_exists->num_rows() > 0 ) {\n\t\t\treturn [ 'status' => 'exists', 'message' => 'Email already exists.' , 'data' => null ];\t\n\t\t} else {\n\t\t\tif ( $this->db->insert( $this->table , $data ) )\n\t\t\t\treturn [ 'status' => 'success', 'message' => 'New user successfully created.' , 'data' => $this->db->insert_id() ];\t\n\t\t\telse \n\t\t\t\treturn [ 'status' => 'error', 'message' => 'Error on creation.' , 'data' => null ];\t\n\t\t}\n\t}", "function emailExists(){\n\t\t\t\t \n\t\t\t\t // query to check if email exists\n\t\t\t\t $query = \"SELECT rep_id, rep_name, rep_surname, rep_pwd, rep_email\n\t\t\t\t FROM \" . $this->table . \"\n\t\t\t\t WHERE rep_email = :rep_email\n\t\t\t\t LIMIT 0,1\";\n\t\t\t\t \n\t\t\t\t // prepare the query\n\t\t\t\t $stmt = $this->conn->prepare($query);\n\t\t\t\t \n\t\t\t\t // sanitize\n\t\t\t\t $this->rep_email=htmlspecialchars(strip_tags($this->rep_email));\n\t\t\t\t \n\t\t\t\t // bind given email value\n\t\t\t\t $stmt->bindParam(':rep_email', $this->rep_email);\n\t\t\t\t \n\t\t\t\t // execute the query\n\t\t\t\t $stmt->execute();\n\t\t\t\t \n\t\t\t\t // get number of rows\n\t\t\t\t $num = $stmt->rowCount();\n\t\t\t\t \n\t\t\t\t // if email exists, assign values to object properties for easy access and use for php sessions\n\t\t\t\t if($num>0){\n\t\t\t\t \n\t\t\t\t // get record details / values\n\t\t\t\t $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t \n\t\t\t\t // assign values to object properties\n\t\t\t\t $this->rep_id = $row['rep_id'];\n\t\t\t\t $this->rep_name = $row['rep_name'];\n\t\t\t\t $this->rep_surname = $row['rep_surname'];\n\t\t\t\t $this->rep_pwd = $row['rep_pwd'];\n\t\t\t\t $this->rep_email = $row['rep_email'];\n\t\t\t\t \n\t\t\t\t // return true because email exists in the database\n\t\t\t\t return true;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t // return false if email does not exist in the database\n\t\t\t\t return false;\n\t\t\t\t}", "function _check_email_add()\n\t{\n\n\t\tif ($this->security_model->_check_free_email_accounts($this->validation->primary_email) == true)\n\t\t{\n\t\t\t$this->validation->set_message('_check_email_add', $this->lang->line('free_email_accounts_not_allowed'));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$mem = $this->db_validation_model->_get_details('members', '*', 'primary_email', $this->validation->primary_email);\n\t\t\n\t\tif (!empty($mem))\n\t\t{\n\t\t\t//check for multiple program login\n\t\t\tif ($this->config->item('sts_site_showcase_multiple_programs') == 0)\n\t\t\t{\n\t\t\t\t//check for members programs\n\t\t\t\t$prog = $this->members_model->_check_member_program($mem[0]['member_id']);\n\t\t\t\tif (empty($prog))\n\t\t\t\t{\n\t\t\t\t\t//add to members programs table with confirm ID\n\t\t\t\t\t$prog = $this->members_model->_add_member_program($mem[0]['member_id'], $this->config->item('prg_program_id'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!empty($prog['confirm_id']))\n\t\t\t\t{\n\t\t\t\t\t//send the confirmation email\n\t\t\t\t\t$confirm = $mem[0];\n\t\t\t\t\t$confirm['confirm_link'] = _public_url() . 'confirm/program/' . $this->config->item('prg_signup_link') . '/' . $this->config->item('prg_program_id') . '-' .$confirm['member_id'] . '-' . $prog['confirm_id'];\n\t\t\t\t\t$confirm['signup_link'] = $this->config->item('prg_signup_link');\n\t\t\t\t\t\n\t\t\t\t\t$this->emailing_model->_send_template_email('member', $confirm, 'member_affiliate_program_confirm_template', false, $this->config->item('prg_program_id'));\n\t\t\t\t\n\t\t\t\t\t//log success\n\t\t\t\t\tlog_message('info', 'email confirmation email sent to ' . $mem[0]['primary_email']);\n\t\t\t\t\tredirect_301(_public_url() . 'confirm/program/' . $this->config->item('prg_signup_link'), true, false);\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->validation->set_message('_check_email_add', $this->lang->line('member_email_taken'));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function Insert_Email()\n\t{\n\t\t$this->load->library('form_validation');\n\t\t\n\t\t$configValidation = array(\n array(\n 'field' => 'email', \n 'label' => parent::_getFieldTitle('email'), \n 'rules' => 'trim|required|max_length[255]|valid_email|callback__unique_field[email]'\n )\n );\n\n\t\t$this->form_validation->set_rules($configValidation);\n\t\t\t\n\t\tif ($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\techo \"<span class='red'>\".validation_errors().\"</span>\";\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$this->subscribers_model->addEmail($this->input->post('email'));\n\t\t\techo \"<span class='green'>\".language('your_email_address_added_in_mailing_list').\"</span>\";\n\t\t}\n\t\texit;\n\t}", "function check_existing_email($email){\n $sql = \"SELECT * from mbf_user WHERE email='$email'\";\n $query = $query = $this->db->query($sql);\n if ($query->num_rows() > 0){\n return true;\n }else{\n return false;\n }\n }", "public function p_signup() {\n\n $q= 'Select email \n From users \n WHERE email=\"'.$_POST['email'].'\"';\n # see if the email exists\n $emailexists= DB::instance(DB_NAME)->select_field($q);\n \n # email exists, throw an error\n if($emailexists){ \n \n Router::redirect(\"/users/signup/error\"); \n \n }\n \n #requires all fields to be entered if java script is disabled, otherwise thow a different error\n \n elseif (!$_POST['email'] OR !$_POST['last_name'] OR !$_POST['first_name'] OR !$_POST['password']) {\n Router::redirect(\"/users/signup/error2\"); \n }\n # all is well , proceed with signup\n else{\n \n $_POST['created']= Time::now();\n $_POST['password']= sha1(PASSWORD_SALT.$_POST['password']); \n $_POST['token']= sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \n\n # add user to the database and redirect to users login page \n $user_id=DB::instance(DB_NAME)->insert_row('users',$_POST);\n # Create users first Notebook\n $notebook['name']= $_POST['first_name'].' Notebook';\n $notebook['user_id']= $user_id;\n $notebook['created']= Time::now(); \n $notebook['modified']= Time::now(); \n DB::instance(DB_NAME)->insert_row('notebooks',$notebook); \n\n Router::redirect('/users/login');\n }\n \n }", "public function validateAndLoadData($data) {\n $this->email = $data['email'];\n\n\n return true;\n }", "public function emailCheck(Request $request)\n\t{\n\t\t\t$enteredEmail= $request['datafile'];\n\t\t\tif(DB::table('users')->where('email', '?')->setBindings([$enteredEmail])->exists())\n\t\t\t{\n\t\t\t\techo '<div style=\"color: red;\"> <b>'.$enteredEmail.'</b> is already in use! </div>|false';\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\techo '<div style=\"color: green;\"> <b>'.$enteredEmail.'</b> is avaialable! </div>|true';\n\t\t\t}\t\n\t}", "public function testRegisterRepeatedEmail() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\t$this->email\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "public function register($data) {\n $this->db->query(\"SELECT email FROM users WHERE email = :email\");\n $this->db->bind(':email', $data['email']);\n $result = $this->db->single();\n \n if ($result) {\n redirect('register.php', 'That email is already in use try <a href=\"login.php\">logging in</a>', 'error');\n }else {\n \n // insert the user into the database\n $this->db->query('INSERT INTO users \n (name, email, avatar, username, password, membership)\n VALUES (:name, :email, :avatar, :username, :password, :membership)');\n // bind the prepared statements\n $this->db->bind(':name', $data['name']);\n $this->db->bind(':email', $data['email']);\n $this->db->bind(':avatar', $data['avatar']);\n $this->db->bind(':username', $data['username']);\n $this->db->bind(':password', password_hash($data['password'], PASSWORD_DEFAULT));\n $this->db->bind(':membership', $data['membership']);\n \n // make it work\n if($this->db->execute()) {\n return true;\n }else {\n return false;\n }\n }\n\n // they should now be registered..\n }", "private function saveUser(){\n\n if( ! $this->checkEmail() ){\n $password = password_hash($this->_userPassword, PASSWORD_DEFAULT);\n $request = $this->_connexion->prepare(\"INSERT INTO Users (user_name, user_email, user_password) VALUES (?, ?, ?)\");\n $request->execute(array($this->_userName, $this->_userEmail, $password));\n\n return $response = json_encode([\n 'status' => 'ok',\n 'message' => 'successfuly add'\n ]);\n }\n else{\n return $response = json_encode([\n 'status' => 'failed',\n 'message' => 'this email allready exist'\n ]);\n }\n\n }", "public static function register($data){\n\t\t// Validate email\n\t\tif(!filter_var($data['email'], FILTER_VALIDATE_EMAIL))\n\t\t\treturn 'Email not valid';\n\n\t\t$emailDomain = explode('@', $data['email'])[1];\n\n\t\tgetmxrr($emailDomain, $mx);\n\t\tif(empty($mx))\n\t\t\treturn 'Email not valid';\n\n\t\t// Validate username\n\t\tif(strlen(preg_replace('/[^a-zA-Z0-9]/', '', $data['username'])) < strlen($data['username']))\n\t\t\treturn 'Username not valid';\n\n\t\t// Check for existance\n\t\t$temp = self::$database->get(self::$table, ['user_id', 'username'], [\n\t\t\t'OR'=>[\n\t\t\t\t'username'=>$data['username'],\n\t\t\t\t'email[,]'=>$data['email']\n\t\t\t]\n\t\t]);\n\n\t\tif($temp !== false){\n\t\t\tif($temp['username'] === $data['username'])\n\t\t\t\treturn 'Username already used';\n\t\t\treturn 'Email already used';\n\t\t}\n\n\t\t$data['email'] = \",$data[email],\";\n\t\t$data['username'] = strtolower($data['username']);\n\n\t\t// Hash password\n\t\t$data['password'] = password_hash($data['password'], PASSWORD_BCRYPT, ['cost'=>10]);\n\t\tif(!$data['password']) throw new Exception('Failed to hash password');\n\n\t\t$userID = self::$database->insert(self::$table, $data, true);\n\t\treturn $userID+0;\n\t}", "private function checkEmail(){\n\n $request = $this->_connexion->prepare(\"SELECT COUNT(*) AS num FROM Users WHERE user_email=?\");\n $request->execute(array($this->_userEmail));\n $numberOfRows = $request->fetch();\n\n if($numberOfRows['num'] == 0)\n return false;\n else\n return true;\n\n }", "public function store(Request $request)\n {\n $check = Subscription::where('email',$request->email)->first();\n if(!$check){\n $subscription = new Subscription();\n $subscription->email= $request->email;\n $subscription->save();\n return[\n 'status'=>'success',\n 'msg'=>'email inserted'\n ];\n }\n else {\n return[\n 'status'=>'already',\n 'msg'=>'email Already Exist'\n ];\n }\n }", "function registerEmailInviata($emailId) {\n //echo $emailId;\n if ($this->connectToMySql()) {\n $query = sprintf(\"UPDATE scuola.email_store\n SET email_inviata = 1 WHERE id_email = %s \", $emailId);\n\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n //die('<span class=\"error\">'.mysql_error().'</span>');\n setcookie(\"message\", mysql_error());\n }\n //setcookie(\"message\",$query );\n $this->closeConnection();\n return $result;\n }\n return FALSE;\n }", "public function validateData(){\n if(substr($this->user_id,0,5)!=$this->office_id){\n return false;\n }\n if(in_array($this->email,$this->getEmails())){\n return false;\n }\n return true; \n }", "public function checkemail() {\n\n if (env(\"NEW_ACCOUNTS\") == \"Disabled\" && env(\"GUEST_SIGNING\") == \"Disabled\") {\n\n $account = Database::table(\"users\")->where(\"email\", input(\"email\"))->first();\n if (!empty($account)){\n response()->json(array(\"exists\" => true));\n }else{\n response()->json(array(\"exists\" => false));\n }\n\n }\n\n }", "public function check_email($email){\n $query = $this->db->select('01_email')\n ->where('01_email', $email)\n ->get('register_01');\n if($query->num_rows()>0){\n return 0;\n }else{\n $query = $this->db->where('is_sms', 1)\n ->where('number', $email)\n ->get('verify_otp_12');\n if($query->num_rows()>0){\n return 'sent';\n }else{\n $query = $this->db->where('number', $email)\n ->delete('verify_otp_12');\n $otp = rand(10000, 1000000);\n $data = array(\n 'number' => $email,\n 'otp' => $otp,\n );\n $query = $this->db->insert('verify_otp_12', $data);\n return true;\n }\n }\n }", "function m_verifyInsert()\n\t{\n\t\t$this->errMsg=\"\";\n\n\t\tif(empty($this->request['subject']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg=MSG_SUBJECT_EMPTY.\"<br>\";\n\t\t}\n\t\t\n\t\tif(!empty($this->request['sid']))\n\t\t{\n\t\t\t#VALIDATING EXISTING OPTION TITLE\n\t\t\t$this->obDb->query = \"SELECT iMailid_PK FROM \".EMAILS.\" where vSid = '\".$this->request['sid'].\"'\";\n\t\t\t$row_code = $this->obDb->fetchQuery();\n\t\t\tif($this->obDb->record_count != 0)\n\t\t\t{\n\t\t\t\t$this->err=1;\n\t\t\t\t$this->errMsg.=MSG_SID_EXIST.\"<br>\";\n\t\t\t}\n\t\t}\n\t\treturn $this->err;\n\t}", "public function checkEmail($data){\n $this->stmt = $this->query('SELECT * FROM users WHERE email = :email');\n $this->stmt->bindValue(':email', $data['email']);\n $row = $this->single();\n // Check row\n if($this->stmt->rowCount() > 0){\n return true;\n } else {\n return false;\n }\n\n }", "public function email_check($str){\n $con['returnType'] = 'count';\n $con['conditions'] = array('email'=>$str);\n $checkEmail = $this->user->getRows($con);\n if($checkEmail > 0){\n $this->form_validation->set_message('email_check', 'The given email already exists.');\n return FALSE;\n } else {\n return TRUE;\n }\n }", "public function registration($data){\n \n\n\n\n // restrict if fields are empty\n \n\t\tif($data['fname']==\"\" || $data['lname']==\"\" || $data['email']==\"\" || $data['password']==\"\"){\n\n\t\t\t$_SESSION['message'] = \"Please fill out these fields\";\n\t\t\t$_SESSION['msg_type'] = \"danger\";\n\n\t\t \t// validata the email format\n\n\t\t}elseif(!preg_match(\"/^[a-zA-Z ]*$/\",$data['fname'])) {\n\n\t\t\t $_SESSION['message'] = \"Only letters and white space allowed for names\";\n\t\t\t $_SESSION['msg_type'] = \"warning\";\n \n\t\t\t}\n\n\t\telseif (!filter_var($data['email'], FILTER_VALIDATE_EMAIL)){\n\n\t\t\t$_SESSION['message'] = \"Email Format is not valid\";\n\t\t\t $_SESSION['msg_type'] = \"danger\";\n \n\n\t\t}elseif(strlen($data['password'])<8){\n\n\t\t\t$_SESSION['message'] = \"Password must contain 8 letters\";\n\t\t\t $_SESSION['msg_type'] = \"danger\";\n \n\n\t\t}elseif(!preg_match(\"/^[a-zA-Z0-9%@#$]+$/\", $data['password'])){\n\n\t\t\t$_SESSION['message'] = \"Password must contain special characters\";\n\t\t\t $_SESSION['msg_type'] = \"info\";\n \n\n\t\t}\n\t\telse{\n \n \t// check the email if already exit in database\n\n\t\t$q = \"SELECT * FROM user_table WHERE email='$data[email]'\";\n\t\t\n\t\t$result = $this->connection->query($q);\n\n\t\tif($result->num_rows > 0){\n\n\t\t\t$_SESSION['message'] = \"Email already exist\";\n\t\t\t $_SESSION['msg_type'] = \"danger\";\n \n\t\t\treturn; \n\n\t\t}\n\t else{\n\n\n\t\t// Insert data in database using mysqli query\n\n\t\t$q = \"INSERT INTO user_table (fname, lname, email, password ) VALUES('$data[fname]', '$data[lname]', '$data[email]', '$data[password]') \";\n\n\t\t$result = $this->connection->query($q);\n\n\t\tif($result){\n\n\t\t\t$_SESSION['message'] = \"Registered Successfuly\";\n\t\t\t $_SESSION['msg_type'] = \"success\";\n \n\t\t}\n\n\t\t\n\n\t}\n\n\t}\n}", "function insert($data)\n\t\t{\n\n\t\t\t$sql = $this->conn_id->prepare(\"INSERT INTO users(name, email, mobileno, profilepic, passwd, hash_key) VALUES (?,?,?,?,?,?)\");\n\t\t\t$sql->execute($data);\n\t\t\t// returns 1 if entry in table\n\t\t\t$affected_rows = $sql->rowCount();\n\t\t\treturn $affected_rows;\n\t\t}", "protected function afterInsert() {\r\n // echo 'checking mail todo'.BR;\r\n $lUid = intval($this -> mVal['user_id']);\r\n if (empty($lUid)) {\r\n return;\r\n }\r\n $lSql = 'SELECT val FROM al_usr_pref WHERE uid='.$lUid.' AND code=\"sys.mail.todo\"';\r\n $lVal = CCor_Qry::getStr($lSql);\r\n if (FALSE === $lVal) {\r\n $lSql = 'SELECT val FROM al_sys_pref WHERE code=\"sys.mail.todo\"';\r\n $lVal = CCor_Qry::getStr($lSql);\r\n } \r\n if (smEveryTime == $lVal) {\r\n // mail versenden\r\n $lUsr = CCor_Usr::getInstance();\r\n $lFMail = $lUsr -> getVal('email');\r\n $lFName = $lUsr -> getVal('firstname').' '.$lUsr -> getVal('lastname');\r\n \r\n $lSql = 'SELECT firstname,lastname,email FROM al_usr WHERE id='.intval($lUid);\r\n $lQry = new CCor_Qry($lSql);\r\n if ($lRow = $lQry -> getAssoc()) {\r\n $lToName = $lRow['firstname'].' '.$lRow['lastname'];\r\n $lToMail = $lRow['email'];\r\n $lMsg = 'Dear user,'.LF.LF.'you have a new todo in your todo list:'.LF.LF;\r\n $lMsg.= $this['subject'].LF.LF; \r\n $lCfg = CCor_Cfg::getInstance();\r\n $lUrl = $lCfg -> getVal('base.url').'index.php?act=';\r\n $lMsg.= 'Link: '.$lUrl.$this['ref_link'];\r\n #echo $lMsg;\r\n $lMai = new CApi_Mail_Item($lFMail, $lFName, $lToMail, $lToName, 'Todo: '.$this['subject'], $lMsg);\r\n #$lMai -> send();\r\n $lMai -> insert();\r\n }\r\n } \r\n }", "public function saveuser()\n {\n $time = date('Y-m-d H:i:s');\n $tim = strtotime($time);\n $token= do_hash($this->input->post('useremail').$tim);\n\n $data_check = array( \n 'email' => $_POST[\"useremail\"],// adding the Encryp name and the extention file 2gether\n 'isdeleted' => 0\n );\n $check_data = $this->Fashion_model->is_user_email_available($data_check);\n\n if($check_data) \n { \n $Json_resultSave = array (\n 'status' => '0',\n 'content' => 'Email Already Register'\n );\n echo json_encode($Json_resultSave);\n exit();\n }\n else\n {\n $data_New = array( \n 'restaurantid' => $_SESSION['rest_id'],\n 'userroleid' => $_POST['userrole'],\n 'firstname' => $_POST['firstname'],\n 'lastname' => $_POST['lastname'],\n 'email' => $_POST['useremail'],\n 'phonenumber' => $_POST['phone'],\n 'confirmemail' => $token,\n 'forcepasswordchange' => 0,\n 'status' => 1\n );\n\n //print(\"<pre>\".print_r($data_New,true).\"</pre>\");//die;\n $insert_data = $this->Fashion_model->_insertnewuser($data_New);// insert to db\n\n if($insert_data)\n {\n $rest_info=$this->Fashion_model->get_restaurant_info($_SESSION['rest_id']);\n // send the customer an email\n $site_email ='[email protected]';\n $logo = 'jol.png';\n $this->Email_model->send_restaurant_User_email($this->input->post('firstname'), $this->input->post('lastname'), $_POST['useremail'], $site_email, $logo, $rest_info->companyname,$token );\n\n $Json_resultSave = array (\n 'status' => '1'\n );\n echo json_encode($Json_resultSave);\n exit();\n\n }\n else \n {\n $Json_resultSave = array (\n 'status' => '0'\n );\n echo json_encode($Json_resultSave);\n exit();\n }\n }\n }", "public function testRegisterWithRepeatedEmail()\n {\n self::$body['email'] = User::first()->email;\n\n $generic = new GenericValidationTests($this);\n $generic->testNotUniqueAttribute('register', 'POST', self::$headers, self::$body, 'email');\n }", "function _email_callback($email)\n {\n $id = $this->uri->segment(4);\n $data = $this->user_model->email_validation($id, $email);\n \n if ($data->num_rows() > 0) {\n $this->form_validation->set_message('_email_callback', '%s already taken.');\n return FALSE;\n } else {\n return TRUE;\n }\n }", "function addEmail($email) {\n\t\t$email = trim($email);\n\t\tif (is_rfc3696_valid_email_address($email)) {\n\t\t\t\n\t\t\tglobal $polarbear_db;\n\t\t\t$emailSafe = $polarbear_db->escape($email);\n\n\t\t\tif ($this->isEmailInList($email)) {\n\t\t\t\t#echo \"already in list!\";\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\t#echo \"not inlist\";\n\t\t\t\t$sql = \"INSERT INTO \" . POLARBEAR_DB_PREFIX . \"_emaillist_emails SET listID = '{$this->id}', email = '$emailSafe', dateAdded = now()\";\n\t\t\t\t$polarbear_db->query($sql);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function actionEmailunique()\n\t{\n\t\t$email = $_GET['email'];\n\t\t$isexits = '0';\n\t\t$check=UsersDetails::model()->find(\"user_details_email='$email'\");\n\t\tif(isset($check))\t\t\t\t\n\t\t\t$isexits = '1'; //This email already used.\n\t\techo $isexits;\n\t\tYii::app()->end();\n\t}", "function saveMemberToDB()\n{\n global $fname, $lname, $email, $pwd_hashed, $errorMsg, $success;\n $num = $_POST['phoneno'];\n $addr = $_POST['address'];\n $po = $_POST['postalcode'];\n $unit = $_POST['unit'];\n $country = $_POST['Country'];\n $bd = $_POST['birthdate'];\n $token = md5(rand('10000', '99999'));\n \n // Create database connection.\n $config = parse_ini_file('../../private/db1-config.ini');\n $conn = new mysqli($config['servername'], $config['username'], $config['password'], $config['dbname']);\n // Check connection\n if ($conn->connect_error)\n {\n $errorMsg = \"Connection failed: \" . $conn->connect_error;\n $success = false;\n }\n else\n {\n \n \n // Prepare the statement:\n $stmt = $conn->prepare(\"INSERT INTO cake_member(fname, lname, email, password, phoneno, birthdate, street,PostalCode,Unit,Country,token,status,profilepic,Mem) VALUES (?, ?, ?, ?, '$num', '$bd', '$addr', '$po','$unit','$country' , '\".$token.\"','Inactive','images/defualtprofile.jpg','user')\");\n \n $sql = \"select * from cake_member where email = '$email' \";\n $search_result = mysqli_query($conn, $sql);\n $emailfound = mysqli_num_rows($search_result);\n \n \n \n if($emailfound >= 1)\n {\n //fail\n echo \"<script>\n alert('Email already been use try other email');\n window.location.href='register.php';\n </script>\";\n $success = false;\n $stmt->close();\n }\n \n $url = 'http://'.$_SERVER['SERVER_NAME'].'/ICT1004-TartsNCakes/verify.php?name='.$lname.'&token='.$token; // Set email format to HTML\n\t\t\n\t\t$output = '<div>Thanks for registering with Tarts Ns Cake account. Please click this link to complete this registation <br>'.$url.'</div>';\n\n\t\tif ($search_result == true) \n {\n\t\t\t$mail = new PHPMailer();\n\t\t\t$mail->isSMTP(); \n\t\t\t//$mail->SMTPDebug = 4; // debug mode\n\t\t\t$mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers\n\t\t\t$mail->SMTPAuth = true; // Enable SMTP authentication\n\t\t\t$mail->Username = EMAIL; // SMTP username\n\t\t\t$mail->Password = PASS; // SMTP password\n\t\t\t$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted\n\t\t\t$mail->Port = 587; // TCP port to connect to\n\n\t\t\t$mail->setFrom(EMAIL, 'info');\n\t\t\t$mail->addAddress($email, $lname); // Add a recipient\n\t\t\t\t\n\t\t\t$mail->isHTML(true);\n\n\t\t\t$mail->Subject = 'Register confirmation';\n\t\t\t$mail->Body = $output;\n\t\t\t//$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n\n\t\t\tif(!$mail->send()) \n {\n\t\t\t\techo 'Message could not be sent.';\n\t\t\t\techo 'Mailer Error: ' . $mail->ErrorInfo;\n\t\t\t} else \n {\n\t\t\t\t$msg = '<div class=\"alert alert-success\">Congratulation, Your registration has been successful. please verify your account.</div>';\n\t\t\t}\n\t\t}\n \n // Bind & execute the query statement:\n $stmt->bind_param(\"ssss\", $fname, $lname, $email, $pwd_hashed);\n if (!$stmt->execute())\n {\n $errorMsg = \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n $success = false;\n }\n $stmt->close();\n }\n $conn->close();\n}", "public function testCheckIfEmailIdUsed(){\r\n $db = new database;\r\n $db->connectToDatabase();\r\n $this->assertEquals(true,$db->checkIfEmailIdUsed(\"[email protected]\"));\r\n }", "function insert($pConsumerBO,$pEmailCheck) \n\t\t{\n\t\t\t$this->objDB->startTransaction(FALSE);\n\n\t\t\t/// Calling Stored Procedure\n\t\t\t$strQuery = \"CALL CONSUMER_INSERT(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t\t$objStatement=$this->objDB->executePrepare($strQuery);\n\t\t\t$objStatement->bind_param(\"iiiisssssssssssisisi\",$pConsumerBO->getConsumerCountryId()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerStateId()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerAccountType()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerSecretQuestion()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerEmail()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerPassword()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerFristName()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerLastName()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerAddress()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerCity()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerZipCode()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerTelephone1()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerDateOfBirth()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerAnswer()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerActivationCode()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerIsVerified()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerCreateDate()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getConsumerIsActive()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getMobileNumber()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$pConsumerBO->getCellularId());\n\t\t\t$objStatement->execute();\n\t\n\t\t\t/// Get error no from stored procedure\n\t\t\t$this->intErrorNo=$this->objDB->geterrornumber();\n\t\t\t\n\t\t\tif($this->intErrorNo==0) /// Error does not exists\n\t\t\t{\n\t\t\t\t/// Set activation page URL\n\t\t\t\t$pageRegistrationActivation=$this->siteUrl.clsConstants::PAGE_CONSUMER_REGISTRATION_ACTIVATION;\n\n\t\t\t\t/// Generating Email body for customer registration\n\t\t\t\t$this->strRegistrationEmailBody=str_replace(\"[ACTIVATION_PAGE]\",$pageRegistrationActivation,$this->strRegistrationEmailBody);\n\t\t\t\t$this->strRegistrationEmailBody=str_replace(\"[ACTIVATION_CODE]\",$pConsumerBO->getConsumerActivationCode(),$this->strRegistrationEmailBody);\n\t\t\t\t$this->strRegistrationEmailBody=str_replace(\"[EMAIL]\",$pConsumerBO->getConsumerEmail(),$this->strRegistrationEmailBody);\t\t\t\t\n\t\t\t\t$this->strRegistrationEmailBody=str_replace(\"[PASSWORD]\",$pConsumerBO->getConsumerPassword(),$this->strRegistrationEmailBody);\t\t\t\t\t\t\t\t\n\t\t\t\t$this->strRegistrationEmailBody=str_replace(\"[FIRST_NAME]\",$pConsumerBO->getConsumerFristName(),$this->strRegistrationEmailBody);\n\t\t\t\t$this->strRegistrationEmailBody=str_replace(\"[LAST_NAME]\",$pConsumerBO->getConsumerLastName(),$this->strRegistrationEmailBody);\t\t\t\t\n\t\t\t\t$this->strRegistrationEmailBody=str_replace(\"[SITE_URL]\",$this->siteUrl,$this->strRegistrationEmailBody);\t\t\t\t\n\t\t\t\t$this->strRegistrationEmailBody=str_replace(\"[CONSUMER_REGISTRATION_HELP_EMAIL]\",$this->helpEmail,$this->strRegistrationEmailBody);\t\t\t\t\t\t\t\t\n\n\t\t\tif($pEmailCheck!=1)\n\t\t\t{\n\t\t\t\t/// Sending Registration Email to Consumer\n\t\t\t\t$objUtitlity=new utility();\n\t\t\t\t$objUtitlity->sendEmail($this->strRegistrationFromEmail,$pConsumerBO->getConsumerEmail(),$this->strRegistrationEmailSubject,$this->strRegistrationEmailBody);\n\t\t\t}\n\t\t\t\n\t\t\t}\t\n\t\t\t$this->objDB->commitTransaction();\n\t\t\t\n\t\t\t\n\t\t\tif ($this->intErrorNo!=0) // Error exists\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$this->objDB->rollBackTransaction(); \n\t\t\t\t$this->strErrorMessage=$this->objDB->geterrormessage();\n\t\t\t\tthrow new SQLException($this->strErrorMessage);\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$objStatement->close(); \n\t }", "public function registerUser($firstName, $lastName,$password,$email,$phone,$personalinfo)\n {\n \n $sql2= \"SELECT userid from basicUser where email= '\".$email.\"' \";\n $alreadyUser = mysql_fetch_array(mysql_query($sql2));\n var_dump($alreadyUser);\n die();\n $alreadyUser = $alreadyUser[0];\n \n if ($alreadyUser == null){\n \n $sql = \"INSERT INTO basicUser VALUES '\". mysql_real_escape_string($firstName).\"'\n , '\".mysql_real_escape_string($lastName).\"'\n , '\".mysql_real_escape_string($password).\"'\n , '\".mysql_real_escape_string($email).\"'\n , '\". mysql_real_escape_string($phone).\"'\n , '\". mysql_real_escape_string($personalinfo).\"'\";\n \n mysql_query($sql); \n return \"Sucess User registered\";\n }\n else{\n //give an error saying an account is already associated with this email \n return \"failure: There is an account associated with this email\";\n }\n }", "private function is_duplicate () {\n $email = $this->payload['email'];\n $facebook_id = '0';\n if (!empty($this->payload['facebook_id'])) {\n $facebook_id = $this->payload['facebook_id'];\n }\n $sql = \"SELECT id FROM users WHERE email='$email' OR facebook_id='$facebook_id'\";\n $sql = $this->conn->query($sql);\n\n return $sql->num_rows > 0;\n }", "function checkUniqueEmail($email)\n {\n // will be null for insert operations\n $sql = \"SELECT * FROM $this->table WHERE email=:email LIMIT 1\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute([':email' => $email]);\n return $stmt->rowCount() >= 1;\n }", "function emailExist($dbx, string $targetEmail){\n // debug($dbx->count(\"SELECT * FROM user WHERE email = ?\",[$targetEmail]));\n return $dbx->count(\"SELECT * FROM user WHERE email = ?\",[$targetEmail]);\n}", "function KTEmail($email){\n\t\t\t\t$sql=\"SELECT * FROM user WHERE Email='$email'\";\n\t\t\t\t$re=mysql_query($sql) or die(mysql_error());\n\t\t\t\t$n=mysql_num_rows($re);\n\t\t\t\tif($n>=1)\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t}", "public function registration($data) {\n\n // Query to check whether username already exist or not\n $condition = \"users =\" . \"'\" . $data['users'] . \"'\";\n $this->db->select('*');\n $this->db->from('users');\n $this->db->where($condition);\n $this->db->limit(1);\n $query = $this->db->get();\n if ($query->num_rows() == 0) {\n\n // Query to insert data in database\n $this->db->insert('users', $data);\n if ($this->db->affected_rows() > 0) {\n return true;\n }\n } else {\n return false;\n }\n }", "public function emailtemplatesaeve(Request $request)\n {\n \n\n if(!empty($successmsgdata)){\n $data['successmsgdata']=$successmsgdata;\n }\n if(!empty($errormsgdata)){\n $data['errormsgdata']=$errormsgdata; \n }\n\n $subject = trim(addslashes($request->input('subject')));\n $article_description = htmlentities($request->input('description'));\n \n $id = $request->input('id'); \n $dataInsert=array();\n $dataInsert['subject'] = $subject;\n $dataInsert['message'] = $article_description;\n $dataInsert['status'] = 1;\n \n\n //******** array for update article\n\n $dataUpdate=array();\n $dataUpdate['subject'] = $subject;\n $dataUpdate['message'] = $article_description;\n // $dataUpdate['modified_date']= $modified_date;\n\n $chkvalid=$this->checkemailtemplateform($request,$id); \n\n if($chkvalid===true)\n {\n\n //********Getting SEO name starts here\n $seoname = $this->seoUrl($subject);\n $seoname = $seoname.'--';\n //********** Checking SEO name exists or not strats here\n\n $seoqry = DB::table('email_templates');\n $seoqry=$seoqry->where('template_for_alias', 'like', $seoname.'%');\n if(!empty($id))\n {\n //***check for edit\n $seoqry=$seoqry->where('id', '<>', $id);\n }\n \n $seoqry=$seoqry->count();\n $tot_seocount=$seoqry;\n $tot_seocount = $tot_seocount+1;\n $seoname = $seoname.$tot_seocount;\n $dataInsert['template_for_alias']= $seoname;\n //********** Checkign SEO name exists or not ends here\n //********Getting SEO name ends here\n if(empty($id))\n {\n //*** insert query\n /*Insert query*/\n $isInserted = DB::table('email_templates')->insert($dataInsert);\n /*Last Insert id*/\n $any_id_or_rownum=DB::getPdo()->lastInsertId();\n }\n else\n {\n //******checking seo already exists or not starts here\n $seoqrydoublechk = DB::table('email_templates');\n $seoqrydoublechk=$seoqrydoublechk->where('template_for_alias',$seoname);\n $seoqrydoublechk=$seoqrydoublechk->count();\n\n if($seoqrydoublechk == 0)\n {\n $dataUpdate['template_for_alias']= $seoname;\n }\n //******checking seo already exists or not ends here\n //*** update query\n $any_id_or_rownum=DB::table('email_templates')\n ->where('id', $id)\n ->update($dataUpdate);\n }\n \n if($any_id_or_rownum >= 0 )\n {\n $request->session()->flash('admin_successmsgdata_sess', 'Template Successfully saved.');\n return redirect(ADMINSEPARATOR.'/email-template');\n \n }\n\n \n\n }\n else\n {\n if(!empty($id))\n {\n\n return redirect(ADMINSEPARATOR.'/createemailtemplate/'.$id)\n ->withErrors($chkvalid)\n ->withInput();\n }\n else\n {\n return redirect(ADMINSEPARATOR.'/createemailtemplate')\n ->withErrors($chkvalid)\n ->withInput();\n }\n }\n \n return redirect(ADMINSEPARATOR.'/email-template');\n \n }", "public function IsEmailAlreadyExist()\r\n\t{\r\n\t\t$txt_user_email\t\t= $this->input->post('txt_user_email');\r\n\t\t$Employee_id = $this->input->post('Employee_id');\r\n\t\t\r\n\t\t$WhereCondition = \"\";\r\n\t\tif($Employee_id != '' && $Employee_id != 0)\r\n\t\t{\r\n\t\t\t$WhereCondition = \" AND tu.user_id != $Employee_id \";\r\n\t\t}\r\n\t \t$query = $this->db->query(\" \t\r\n \t\t\t\t\t\t\t\t\tSELECT user_id\r\n \t\t\t\t\t\t\t\t\tFROM `tbl_user` tu\r\n\t\t\t\t\t\t\t\t\tWHERE tu.user_email = '$txt_user_email'\r\n\t\t\t\t\t\t\t\t\t$WhereCondition\r\n\t\t\t\t\t\t\t\t\");\r\n\t\t$result = $query->result_array();\t\t\t\r\n\t\treturn $result;\r\n\t}", "public function check_unique($username,$email){\n $usernameQuery = $this->db->get_where('user_ac',array('user_email'=>$username));\n $emailQuery = $this->db->get_where('user_ac',array('user_email'=>$email));\n \n $usernameCount=$usernameQuery->num_rows();\n $emailCount=$emailQuery->num_rows();\n \n if($emailCount>0 && $usernameCount>0)\n {\n return \"Both username and email exist\";\n }\n elseif($usernameCount>0)\n {\n return \"Username already exists\";\n }\n elseif ($emailCount>0) {\n return \"Email already exists\";\n }\n else {\n return true; \n }\n }", "function add_domain_to_pre_check($domain, $port, $email, $visitor_ip)\n{\n global $current_domain;\n global $pre_check_file;\n global $check_file;\n $result = array();\n $domain = trim($domain);\n $email = trim($email);\n $file = file_get_contents($pre_check_file);\n if ($file === FALSE) {\n $result['errors'][] = \"Can't open database.\";\n return $result;\n }\n $json_a = json_decode($file, true);\n if ($json_a === null && json_last_error() !== JSON_ERROR_NONE) {\n $result['errors'][] = \"Can't read database: \" . htmlspecialchars(json_last_error());\n return $result;\n }\n\n foreach ($json_a as $key => $value) {\n if ($value[\"domain\"] == $domain && $value[\"email\"] == $email) {\n $result['errors'][] = \"Domain/email combo for \" . htmlspecialchars($domain) . \" already exists. Please confirm your subscription email.\";\n return $result;\n }\n }\n\n $check_json_file = file_get_contents($check_file);\n if ($check_json_file === FALSE) {\n $result['errors'][] = \"Can't open database.\";\n return $result;\n }\n $check_json_a = json_decode($check_json_file, true);\n if ($check_json_a === null && json_last_error() !== JSON_ERROR_NONE) {\n $result['errors'][] = \"Can't read database: \" . htmlspecialchars(json_last_error());\n return $result;\n }\n\n foreach ($check_json_a as $key => $value) {\n if ($value[\"domain\"] == $domain && $value[\"email\"] == $email) {\n $result['errors'][] = \"Domain / email combo for \" . htmlspecialchars($domain) . \" already exists.\";\n return $result;\n }\n }\n\n $uuid = gen_uuid();\n\n $json_a[$uuid] = [\"domain\" => $domain,\n \"port\" => $port,\n \"email\" => $email,\n \"visitor_pre_register_ip\" => $visitor_ip,\n \"pre_add_date\" => time()\n ];\n\n $json = json_encode($json_a, JSON_PRETTY_PRINT);\n if (file_put_contents($pre_check_file, $json, LOCK_EX)) {\n $result['success'][] = true;\n } else {\n $result['errors'][] = \"Can't write database.\";\n return $result;\n }\n\n\n $sublink = \"https://\" . $current_domain . \"/confirm.php?id=\" . $uuid;\n\n $to = $email;\n $subject = \"Confirm your Certificate Expiry Monitor subscription for \" . htmlspecialchars($domain) . \":\" . htmlspecialchars($port) . \".\";\n $message = \"Hello,\\r\\n\\r\\nSomeone, hopefully you, has added his website to the Certificate Expiry Monitor. \";\n $message .= \"This is a service which monitors an SSL certificate on a website, and notifies you when it is about to expire. \";\n $message .= \"This extra notification helps you remember to renew your certificate on time.\";\n $message .= \"\\r\\n\\r\\nIf you have subscribed to this check, please click the link below to confirm this subscription. \";\n $message .= \"If you haven't subscribed to the Certificate Expiry Monitor service, please consider this message as not sent.\";\n $message .= \"\\r\\n\\r\\nDomain: \" . trim(htmlspecialchars($domain)) . \":\" . trim(htmlspecialchars($port));\n $message .= \"\\r\\nEmail: \" . trim(htmlspecialchars($email));\n $message .= \"\\r\\nIP subscribed from: \" . htmlspecialchars($visitor_ip);\n $message .= \"\\r\\nDate subscribed: \" . date(\"Y-m-d H:i:s T\");\n $message .= \"\\r\\n\\r\\nPlease click or copy and paste the below link in your browser to subscribe: \\r\\n\\r\\n\" . $sublink;\n //$message = wordwrap($message, 70, \"\\r\\n\");\n $headers = 'From: noreply@' . $current_domain . \"\\r\\n\" .\n 'Reply-To: noreply@' . $current_domain . \"\\r\\n\" .\n 'Return-Path: noreply@' . $current_domain . \"\\r\\n\" .\n 'X-Visitor-IP: ' . $visitor_ip . \"\\r\\n\" .\n 'X-Coffee: Black' . \"\\r\\n\" .\n 'List-Unsubscribe: <https://' . $current_domain . \"/unsubscribe.php?id=\" . $uuid . \">\" . \"\\r\\n\" .\n 'X-Mailer: PHP/4.1.1';\n\n\n if (mail($to, $subject, $message, $headers) === true) {\n $result['success'][] = true;\n $result['uuid'] = $uuid;\n } else {\n $result['errors'][] = \"Can't send email.\";\n return $result;\n }\n\n return $result;\n}", "public function testRegistrationEmailAlreadyInUse(): void { }", "public function email_must_be_unique_on_update()\n {\n User::factory()->create([\n 'email' => '[email protected]',\n ]);\n\n $this\n ->from(\"nova/resources/users/{$this->user->id}/edit\")\n ->put(\n \"nova-api/users/{$this->user->id}\",\n [\n 'email' => '[email protected]',\n ]\n )\n ->assertRedirect(\"nova/resources/users/{$this->user->id}/edit\")\n ->assertSessionHasErrors('email');\n }", "function register_resend_email($email) {\n\t\tglobal $pdo;\n\n\t\t//delete old registration attempts\n\t\t$pdo->query(\"DELETE FROM user WHERE verified = 0 AND TIME_TO_SEC(TIMEDIFF(CURRENT_TIMESTAMP, code_generation_time)) > 600\");\n\n\t\t//empty or array check\n\t\tif(empty($email) || is_array($email)) {\n\t\t\treturn 1;\n\t\t}\n\n\t\t//check if email exists and is not verified\n\t\t$sql = \"SELECT name, verification_code FROM user WHERE REPLACE(email, \\\".\\\", \\\"\\\") = REPLACE(:email, \\\".\\\", \\\"\\\") AND verified = 0\";\n\t\t$sth = $pdo->prepare($sql);\n\t\t$sth->bindValue(\":email\", mail_simplify($email), PDO::PARAM_STR);\n\t\t$sth->execute();\n\n\t\tif($sth->rowCount() == 0) {\n\t\t\t//check if email exists but is already verified\n\t\t\t$sql = \"SELECT id FROM user WHERE REPLACE(email, \\\".\\\", \\\"\\\") = REPLACE(:email, \\\".\\\", \\\"\\\") AND verified = 1\";\n\t\t\t$sth2 = $pdo->prepare($sql);\n\t\t\t$sth2->bindValue(\":email\", mail_simplify($email), PDO::PARAM_STR);\n\t\t\t$sth2->execute();\n\n\t\t\tif($sth2->rowCount() == 0) {\n\t\t\t\treturn 2;\n\t\t\t} else {\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t}\n\n\t\t//get data required for email\n\t\t$name_verification_code = $sth->fetch();\n\t\t$name = $name_verification_code[\"name\"];\n\t\t$verification_code = $name_verification_code[\"verification_code\"];\n\n\t\t$reg_link = \"https://swapitg.com/firstlogin/$verification_code\";\n\t\t$subject = \"Registration\";\n\t\t$mailfile = fopen(__DIR__ . \"/register_mail_template.html\", \"r\") or die(\"Unable to open file!\");\n\t\t$message = strtr(fread($mailfile, filesize(__DIR__ . \"/register_mail_template.html\")), array('$reg_link' => $reg_link, '$name' => htmlspecialchars($name)));\n\t\tfclose($mailfile);\n\t\t$sender_email = \"[email protected]\";\n\t\t$sender_name = \"SwapitG no-reply\";\n\n\t\t//send email\n\t\tif(mail($email, $subject, wordwrap($message, 70, \"\\r\\n\"), \"From: $sender_name<$sender_email>\\r\\nContent-type: text/html; charset=utf-8\", \" -f \" . $sender_email)) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 4;\n\t\t}\n\t}", "public function validateData(){\n\t\tif (!self::isEmailValid($this->email))\n\t\t\tthrow new Exception(\"Email address {$this->email} is not a valid email address.\");\n\n\t\tparent::validateData();\n\t}", "protected function saveData($data) {\n\t\t$msg = '';\n\t\t$dtype = $data->dtype;\n\t\t$token = md5(time()); \n\t\tif($dtype=='email'){\n\t\t\t$email \t\t= $data->email;\n\t\t\t$password \t= $data->password;\n\t\t\t$username \t= $data->username;\n\t\t\t$user_id\t= $this->app_model->getUserIdByUsername($username);\n\t\t\tif($user_id) {\n\t\t\t\t$this->falseResponse(\"Username already exists.\");\n\t\t\t\t\n\t\t\t}\n\t\t\t$user_email\t= $this->app_model->getUserEmailByEmail($email);\n\t\t\tif($user_email) {\n\t\t\t\t$this->falseResponse(\"Email already exists.\");\n\t\t\t} else {\n\t\t\t\t$data = array(\n\t\t\t\t\t'email' \t\t=> $email,\n\t\t\t\t\t'password' \t\t=> md5($password),\n\t\t\t\t\t'username' \t\t=> $username, \n\t\t\t\t\t'fb_tw_id'\t\t=> '',\n\t\t\t\t\t'creation_date' => date('Y-m-d H:i:s'),\n\t\t\t\t\t'session_token' => $token,\n\t\t\t\t\t'dtype' \t\t=> $dtype,\n\t\t\t\t\t'is_logged_in' \t=> '1',\n\t\t\t\t\t'user_from' \t=> 'app'\n\t\t\t\t);\n\t\t\t\t$result = $this->db->insert('users', $data);\n\t\t\t\t$last_inserted_id = $this->db->insert_id();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($last_inserted_id)) { \n\t\t\t\t\t$userData\t= $this->app_model->getUserAllDataById($last_inserted_id);\n\t\t\t\t\tif($userData) {\n\t\t\t\t\t\t$id \t\t\t= $userData['id'];\n\t\t\t\t\t\t$email \t\t\t= $userData['email'];\n\t\t\t\t\t\t$fb_tw_id\t\t= '';\n\t\t\t\t\t\t$session_token \t= $userData['session_token'];\n\t\t\t\t\t\t$username \t\t= $userData['username'];\n\t\t\t\t\t\t$dtype \t\t\t= $userData['dtype'];\n\t\t\t\t\t\t$is_logged_in \t= $userData['is_logged_in'];\n\t\t\t\t\t\t$data1\t\t\t= array('user_id' => $id, 'session_token' => $session_token, 'username' => $username, 'dtype' => $dtype, 'is_logged_in' => $is_logged_in, 'fb_tw_id' => $fb_tw_id, 'email' => $email);\n\t\t\t\t\t\t$this->trueResponse($data1,'success'); \n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->falseResponse(\"No response\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($dtype=='fb' || $dtype=='tw'){ die('you are here');\n\t\t\t$fb_tw_id \t= $data->fb_tw_id;//check\n\t\t\t$username \t= $data->username;\n\t\t\t$sql \t\t= \"select id as user_id from users where fb_tw_id='$fb_tw_id' AND dtype='$dtype'\";\n\t\t\t$query \t\t= $this->db->query($sql);\n\t\t\tif ($query->num_rows() > 0) {\n\t\t\t\t$userData \t\t= $query->_fetch_object();\n\t\t\t\t$this->falseResponse(\"User Already exists\", $userData);\n\t\t\t} else {\n\t\t\t\t$data = array(\n\t\t\t\t\t'email' \t\t=> '',\n\t\t\t\t\t'password'\t\t=> '',\n\t\t\t\t\t'username' \t\t=> $username, \n\t\t\t\t\t'fb_tw_id'\t\t=> $fb_tw_id, \n\t\t\t\t\t'creation_date'\t=> date('Y-m-d H:i:s'),\n\t\t\t\t\t'session_token' => $token,\n\t\t\t\t\t'dtype' \t\t=> $dtype,\n\t\t\t\t\t'is_logged_in' \t=> '1',\n\t\t\t\t\t'user_from' \t=> 'app'\n\t\t\t\t);\n\t\t\t\t$result\t\t\t\t= $this->db->insert('users', $data);\n\t\t\t\t$last_inserted_id \t= $this->db->insert_id();\n\t\t\t\tif(!empty($last_inserted_id)) {\n\t\t\t\t\t$sql = \"select * from users where id='$last_inserted_id'\";\n\t\t\t\t\t$query = $this->db->query($sql);\n\t\t\t\t\tif ($query->num_rows() > 0) {\n\t\t\t\t\t\t$userData \t\t= $query->_fetch_object();\n\t\t\t\t\t\t$id \t\t\t= $userData->id;\n\t\t\t\t\t\t$fb_tw_id \t\t= $userData->fb_tw_id;\n\t\t\t\t\t\t$email \t\t\t= '';//$userData->email;\n\t\t\t\t\t\t$session_token \t= $userData->session_token;\n\t\t\t\t\t\t$username \t\t= $userData->username;\n\t\t\t\t\t\t$dtype \t\t\t= $userData->dtype;\n\t\t\t\t\t\t$is_logged_in \t= $userData->is_logged_in;\n\t\t\t\t\t\t$data1\t\t\t= array('user_id' => $id, 'session_token' => $session_token, 'username' => $username, 'dtype' => $dtype, 'is_logged_in' => $is_logged_in, 'fb_tw_id' => $fb_tw_id, 'email' => $email);\n\t\t\t\t\t\t$this->trueResponse($data1,'success'); \n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->falseResponse(\"No response\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "function dbCheck($data){\n\t\t\t\t$sql = \"SELECT UID FROM user_info WHERE email = '$data'\";\n\n\t\t\t\t$result = mysqli_query($GLOBALS['db'], $sql);\n\t\t\t\t$count = mysqli_num_rows($result);\n\t\t\t\tif(!$result || $count == 0){\n\t\t\t\t\treturn \"This user does not exist.\";\n\t\t\t\t}//if\n\t\t\t\telse{\n\t\t\t\t\treturn \"\";\n\t\t\t\t}//ifelse\n\t\t\t\treturn \"\";\n\n\t}", "public function checkUserDuplicate($email){\n $q = $this->getRows($this->query(\"SELECT * FROM user WHERE email='$email' \"));\n return $q;\n }", "public function saveEmail()\n {\n $this->validate([\n 'email' => [\n 'sometimes',\n 'required',\n 'email',\n Rule::unique(shopper_table('users'), 'email')->ignore($this->customer_id),\n ],\n ]);\n\n $this->updateValue(\n 'email',\n $this->email,\n 'Customer Email address updated successfully.'\n );\n\n $this->emailUpdate = false;\n $this->emit('profileUpdate');\n }", "function user_create_validate($data)\r\n{\r\n\tglobal $db;\r\n\t$out = true;\r\n\t@unlink(_CACHE.'user_create_validate_msg.txt');\r\n\tif ($db->getOne(\"SELECT 1 FROM `bbc_user` WHERE `username`='\".$data['username'].\"'\"))\r\n\t{\r\n\t\tuser_create_validate_msg('Username has already been used!');\r\n\t\t$out = false;\r\n\t}\r\n\tif ($out && $db->getOne(\"SELECT 1 FROM `bbc_account` WHERE `email`='\".$data['email'].\"'\"))\r\n\t{\r\n\t\tuser_create_validate_msg('Email address has already been used!');\r\n\t\t$out = false;\r\n\t}\r\n\tif ($out)\r\n\t{\r\n\t\t$out = user_call_func_validate(__FUNCTION__, $data);\r\n\t}\r\n\treturn $out;\r\n}", "public function store(Request $request)\n {\n $this->validate($request,[\n 'nama_lengkap' => 'required',\n 'username' => 'required',\n 'alamat' => 'required',\n 'phone' => 'required',\n 'email' => 'required',\n 'password'=> 'required',\n ]); \n\n try {\n\n $cekemail = User::where('email',$request->get('email'))->count();\n\n if($cekemail==0)\n {\n $users = new User;\n\n $users->nama_lengkap=$request->get('nama_lengkap');\n $users->username=$request->get('username');\n $users->role='member';\n $users->phone=$request->get('phone');\n $users->alamat=$request->get('alamat');\n $users->email=$request->get('email');\n $users->password=bcrypt($request->get('password'));\n $users->verifikasi=0;\n $users->code=str_random(32);\n \n $users->save();\n\n // Mail::to($users->email)->send(new UserRegistered($users));\n\n $response = $this->generateItem($users);\n\n return $this->sendResponse($response, 201);\n }\n else{\n return response()->json('Email already used',404);\n }\n\n } catch (\\Exception $e) {\n return $this->sendIseResponse($e->getMessage());\n }\n\n }", "public function adicionar($email, $nome = '') {\n // 2 passo = adicionar\n\n if($this->existeEmail($email) == false) {\n $sql = \"INSERT INTO contatos (nome, email) VALUES (:nome, :email)\";\n $sql = $this->pdo->prepare($sql);\n $sql->bindValue(':nome', $nome);\n $sql->bindValue(':email', $email);\n $sql->execute();\n\n return true;\n } else {\n return false;\n }\n }", "public function create()\n\t{\n\t\t$check_email = \" SELECT * FROM admin WHERE \";\n\t\t$check_email .= \" (email = '\".$this->email.\"') \";\n\t\t$check_email_query = mysqli_query($this->plug, $check_email);\n\t\tif(!$check_email_query)\n\t\t{\n\t\t\techo 'Error checking email query <br />'.mysqli_error($this->plug);\n\t\t}elseif (mysqli_num_rows($check_email_query)) {\n\t\t\t# code...\n\t\t\techo ' <b>'.$this->email.'</b> already exits !';\n\t\t}else{\n\t\t\t# check if phone number already exits\n\t\t\t$check_phone = \" SELECT * FROM admin WHERE \";\n\t\t\t$check_phone .= \" (phone = '\".$this->phone.\"') \";\n\t\t\t$check_phone_query = mysqli_query($this->plug, $check_phone);\n\t\t\tif(!$check_phone_query)\n\t\t\t{\n\t\t\t\techo 'Error running phone check query <br />'.mysqli_error($this->plug);\n\t\t\t}elseif (mysqli_num_rows($check_phone_query)) {\n\t\t\t\t# code...\n\t\t\t\techo ' <b>'.$this->phone.'</b> already exits !';\n\t\t\t}else{\n\t\t\t\t# sign up user \n\t\t\t\t$add_user = \" INSERT INTO admin \";\n\t\t\t\t$add_user .= \" (username, email, password, phone, date ) \";\n\t\t\t\t$add_user .= \" VALUES('\".$this->username.\"', '\".$this->email.\"', \";\n\t\t\t\t$add_user .= \" '\".$this->password.\"', '\".$this->phone.\"', '\".$this->date.\"') \";\n\t\t\t\t$add_user_query = mysqli_query($this->plug, $add_user);\n\t\t\t\tif(!$add_user_query)\n\t\t\t\t{\n\t\t\t\t\techo 'Error running add user query <br />'.mysqli_error($this->plug);\n\t\t\t\t}elseif(mysqli_affected_rows($this->plug))\n\t\t\t\t{\n\t\t\t\t\techo ' Thanks for signing up. <br />';\n\t\t\t\t\techo ' Activation code has been sent! ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function checkIfEmailExists($email);", "function createEmail($from_email, $from_name, $id_user) {\n $result = $this->getNewEmailId($id_user); //Contiene le email dell'utente con data a null\n if (mysql_num_rows($result) > 0) {//Se vi sono email pregresse ritorna la lista delle email pregresse\n return $result;\n }\n if ($this->connectToMySql()) {\n $query = sprintf(\"INSERT INTO scuola.email_store(from_email, from_name, id_user, subject, body) VALUES ('%s','%s', '%s', '<NO SUBJECT>', '<NO BODY>')\", $from_email, $from_name, $id_user);\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }//else\n //setcookie('message','Creata nuova Email');\n }\n $this->closeConnection();\n return $result;\n }", "public function validEmailInvalidDataProvider() {}", "function insertarAgencias($agencia,$email) {\r\n$sql = \"insert into tbagencias(idagencia,agencia,email)\r\nvalues ('','\".($agencia).\"','\".($email).\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function testAddToNewsLetterFailForDuplicateEmail()\n {\n $request = Request::create('/api/contact/subscribe', 'POST', $this->validSubscriber);\n $response = $this->contactController->addToNewsletter($request);\n $response2 = $this->contactController->addToNewsletter($request);\n\n $this->assertEquals(ResponseMessage::INPUT_ERROR, $response2->getData()->message);\n $this->assertObjectHasAttribute('email',$response2->getData()->data);\n }", "function php($data, $allowExistingEmail = false){\n\t\t$valid = parent::php($data);\n\t\t$uniqueFieldName = Member::get_unique_identifier_field();\n\t\t$loggedInMember = Member::currentUser();\n\t\t$loggedInMemberID = 0;\n\t\tif(isset($data[$uniqueFieldName]) && $data[$uniqueFieldName]){\n\t\t\t$isShopAdmin = false;\n\t\t\tif($loggedInMember) {\n\t\t\t\t$loggedInMemberID = $loggedInMember->ID;\n\t\t\t\tif($loggedInMember->IsShopAdmin()) {\n\t\t\t\t\t$isShopAdmin = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($isShopAdmin) {\n\t\t\t\t//do nothing\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$uniqueFieldValue = Convert::raw2sql($data[$uniqueFieldName]);\n\t\t\t\t//can't be taken\n\t\t\t\t$otherMembersWithSameEmail = Member::get()\n\t\t\t\t\t->filter(array($uniqueFieldName => $uniqueFieldValue))\n\t\t\t\t\t->exclude(array(\"ID\" => $loggedInMemberID));\n\t\t\t\tif($otherMembersWithSameEmail->count()){\n\t\t\t\t\tif($allowExistingEmail) {\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$message = _t(\n\t\t\t\t\t\t\t\"Account.ALREADYTAKEN\",\n\t\t\t\t\t\t\t\"{uniqueFieldValue} is already taken by another member. Please log in or use another {uniqueFieldName}\",\n\t\t\t\t\t\t\tarray(\"uniqueFieldValue\" => $uniqueFieldValue, \"uniqueFieldName\" => $uniqueFieldName)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->validationError(\n\t\t\t\t\t\t\t$uniqueFieldName,\n\t\t\t\t\t\t\t$message,\n\t\t\t\t\t\t\t\"required\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$valid = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$uniqueFieldValue = Convert::raw2sql($data[$uniqueFieldName]);\n\t\t\t\t\t//can't be taken\n\t\t\t\t\tif(DataObject::get_one('Member',\"\\\"$uniqueFieldName\\\" = '$uniqueFieldValue' AND \\\"Member\\\".\\\"ID\\\" <> \".$loggedInMemberID)){\n\t\t\t\t\t\t$message = sprintf(\n\t\t\t\t\t\t\t_t(\"Account.ALREADYTAKEN\", '%1$s is already taken by another member. Please log in or use another %2$s'),\n\t\t\t\t\t\t\t$uniqueFieldValue,\n\t\t\t\t\t\t\t$uniqueFieldName\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->validationError(\n\t\t\t\t\t\t\t$uniqueFieldName,\n\t\t\t\t\t\t\t$message,\n\t\t\t\t\t\t\t\"required\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$valid = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// check password fields are the same before saving\n\t\tif(isset($data[\"Password\"]) && isset($data[\"PasswordDoubleCheck\"])) {\n\t\t\tif($data[\"Password\"] != $data[\"PasswordDoubleCheck\"]) {\n\t\t\t\t$this->validationError(\n\t\t\t\t\t\"PasswordDoubleCheck\",\n\t\t\t\t\t_t('Account.PASSWORDSERROR', 'Passwords do not match.'),\n\t\t\t\t\t\"required\"\n\t\t\t\t);\n\t\t\t\t$valid = false;\n\t\t\t}\n\t\t\t//if you are not logged in, you hvae not provided a password and the settings require you to be logged in then\n\t\t\t//we have a problem\n\t\t\tif( !$loggedInMember && !$data[\"Password\"] && EcommerceConfig::get(\"EcommerceRole\", \"must_have_account_to_purchase\") ) {\n\t\t\t\t$this->validationError(\n\t\t\t\t\t\"Password\",\n\t\t\t\t\t_t('Account.SELECTPASSWORD', 'Please select a password.'),\n\t\t\t\t\t\"required\"\n\t\t\t\t);\n\t\t\t\t$valid = false;\n\t\t\t}\n\t\t\t$letterCount = strlen($data[\"Password\"]);\n\t\t\tif($letterCount > 0 && $letterCount < 7) {\n\t\t\t\t$this->validationError(\n\t\t\t\t\t\"Password\",\n\t\t\t\t\t_t('Account.PASSWORDMINIMUMLENGTH', 'Please enter a password of at least seven characters.'),\n\t\t\t\t\t\"required\"\n\t\t\t\t);\n\t\t\t\t$valid = false;\n\t\t\t}\n\t\t}\n\t\t//\n\t\tif(isset($data[\"FirstName\"])) {\n\t\t\tif(strlen($data[\"FirstName\"]) < 2) {\n\t\t\t\t$this->validationError(\n\t\t\t\t\t\"FirstName\",\n\t\t\t\t\t_t('Account.NOFIRSTNAME', 'Please enter your first name.'),\n\t\t\t\t\t\"required\"\n\t\t\t\t);\n\t\t\t\t$valid = false;\n\t\t\t}\n\t\t}\n\t\tif(isset($data[\"Surname\"])) {\n\t\t\tif(strlen($data[\"Surname\"]) < 2) {\n\t\t\t\t$this->validationError(\n\t\t\t\t\t\"Surname\",\n\t\t\t\t\t_t('Account.NOSURNAME', 'Please enter your surname.'),\n\t\t\t\t\t\"required\"\n\t\t\t\t);\n\t\t\t\t$valid = false;\n\t\t\t}\n\t\t}\n\t\tif(!$valid) {\n\t\t\t$this->form->sessionMessage(_t('Account.ERRORINFORM', 'We could not save your details, please check your errors below.'), \"bad\");\n\t\t}\n\t\treturn $valid;\n\t}", "function validate_email_unique($email, $dbc) {\n\t$q = \"SELECT * from users WHERE email = '$email'\";\n\t$r = mysqli_query($dbc, $q);\n\tif (mysqli_num_rows($r) == 1) {\n\t\treturn FALSE;\n\t} else return TRUE;\n}", "function insert()\n\t{\n\t\t//@TODO email advisor and student(?)\n\t\t$kReport = $this->report->insert();\n\t\tif($this->input->post(\"email_advisor\")){\n\t\t\t$this->notify($kReport);\n\t\t}\n\t\tredirect(\"report/view/$kReport\");\n\t}" ]
[ "0.72509396", "0.6893395", "0.6872661", "0.6859085", "0.67865175", "0.674905", "0.66783077", "0.6655187", "0.6628223", "0.66266525", "0.6608445", "0.66011727", "0.6589726", "0.6510431", "0.6475248", "0.64663714", "0.64529324", "0.6449127", "0.64488244", "0.6434251", "0.6431522", "0.6430829", "0.6393796", "0.63886064", "0.636843", "0.63581103", "0.63504493", "0.63286066", "0.6326718", "0.6296374", "0.62809736", "0.6279419", "0.625984", "0.6250222", "0.6246478", "0.62154406", "0.62136775", "0.6211421", "0.6211421", "0.6198924", "0.6195837", "0.61947346", "0.6188087", "0.61822623", "0.6180686", "0.61749506", "0.6168775", "0.61538905", "0.61519796", "0.614875", "0.614553", "0.6135158", "0.6133453", "0.61294115", "0.61276513", "0.6126172", "0.61234295", "0.61223876", "0.6122106", "0.6119892", "0.61191565", "0.61135536", "0.6113338", "0.61006546", "0.607574", "0.60641646", "0.6060635", "0.6052949", "0.6051772", "0.60487795", "0.6044368", "0.60442", "0.60170615", "0.6012222", "0.60064584", "0.60025483", "0.5984588", "0.5980045", "0.59780097", "0.5977457", "0.5977362", "0.59748185", "0.5963518", "0.59575486", "0.5950715", "0.5942069", "0.5927339", "0.59227586", "0.5918504", "0.5916435", "0.59159374", "0.5914037", "0.5910878", "0.5909391", "0.5904621", "0.59017736", "0.59013474", "0.58958703", "0.5895474", "0.5895425", "0.58919036" ]
0.0
-1
checkEmail method ==========Update data======= show one user data in the field
public function getUserById($userid){ $query = "SELECT * FROM tbl_userinfo WHERE Id=$userid LIMIT 1"; $query = $this->conn->query($query) or die($this->conn->error .__LINE__); $result = $query->fetch_assoc(); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateEmail(){\n if(\n !empty($_POST['email'])){\n $email = $_POST['email'];\n $id = $_SESSION['userID'];\n $user = new User();\n $user->updateEmail($email, $id);\n }\n else {\n echo \"false\";\n }\n }", "public function checkEmail(){\n\t\t\t$user = new User;\n\t\t\t$doubleCount = $user->where('login','=', Input::get('new_user_email'))->count();\n\t\t\t\n\t\t\tif($doubleCount > 0){\n\t\t\t\t$result = array(\n\t\t\t\t\t'cmd'=>1,\n\t\t\t\t\t'msg'=>trans('alerts.exist_email')\n\t\t\t\t);\n\t\t\t}else{\n\t\t\t\t$result = array(\n\t\t\t\t\t'cmd'=>0,\n\t\t\t\t\t'msg'=>'good email'\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\treturn Response::json($result);\n\t\t}", "function checkEmail()\n {\n\t\t\t$email = $_POST['email'];\n\n\t\t\t// Check its existence (for example, execute a query from the database) ...\n\t\t\t$email_cek = $this->account_model->Check_TblUsers('email',$email);\n\t\t\t\n\t\t\tif($email_cek == 0)\n\t\t\t{\n\t\t\t\t$isAvailable = true;\n\t\t\t}else{\n\t\t\t\t$isAvailable = False;\n\t\t\t} \n\n\t\t\t// Finally, return a JSON\n\t\t\techo json_encode(array(\n\t\t\t\t'valid' => $isAvailable,\n\t\t\t));\n\t\t}", "public function editEmailProfil()\n {\n $this->form_validation->set_rules('email', '\"Email adress\"', 'required|valid_email|min_length[1]');\n\n if ($this->form_validation->run()) {\n //-----Get my adress mail of my input-----//\n $this->email = $this->input->post('email');\n //---------------------------------------//\n\n //-------------Create my objet--------------//\n $this->modelMembers->setId($this->id_member);\n $this->modelMembers->setEmail($this->email);\n //-----------------------------------------//\n\n $membersModel = $this->modelMembers;\n $this->modelMembers->updateEmailMembers($membersModel);\n\n $this->index();\n\n } else {\n $this->index();\n }\n }", "public function chkEditEmailDuplicate() {\r\n\r\n if ($this->input->post('user_email') == $this->input->post('user_email_old')) {\r\n echo 'true';\r\n } else {\r\n $table_to_pass = 'mst_users';\r\n $fields_to_pass = array('user_id', 'user_email');\r\n $condition_to_pass = array(\"user_email\" => $this->input->post('user_email'));\r\n $arr_login_data = $this->user_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\r\n if (count($arr_login_data)) {\r\n echo 'false';\r\n } else {\r\n echo 'true';\r\n }\r\n }\r\n }", "function checkEmailUnique($data) {\n App::import('Model', 'Member');\n //pr()\n $obj = new Member();\n //if( $Session->read('Auth.Profile.ch_active') == 'STSTY05' ) :\n //\t$Session = new CakeSession();\n // pr($Session->read('Auth'));\n\n if (isset($this->data['Customer']['editvalue']) && $this->data['Customer']['editvalue'] == 'edit') {\n\n $countResult = $this->find('count', array(\n 'conditions' => array(\n 'OR' => array(\n array('Customer.vc_alter_email' => $data['vc_alter_email'],\n 'Customer.vc_cust_no!' => $this->data['Customer']['vc_cust_no'],\n ),\n array('Customer.vc_email' => $data['vc_alter_email'],\n )),\n 'Customer.vc_comp_code' => $this->data['Customer']['vc_comp_code']\n )));\n\n $countmemberResult = $obj->find('count', array(\n 'conditions' => array(\n 'Member.vc_email_id' => $data['vc_alter_email'],\n 'Member.vc_comp_code' => $this->data['Customer']['vc_comp_code'],\n 'Member.vc_cbc_customer_no!' => $this->data['Customer']['vc_cust_no'],)));\n } else {\n\n $countResult = $this->find('count', array(\n 'conditions' => array(\n 'OR' => array(\n array('Customer.vc_alter_email' => $data['vc_alter_email'],\n ),\n array('Customer.vc_email' => $data['vc_alter_email'],\n )),\n 'Customer.vc_comp_code' => $this->data['Customer']['vc_comp_code']\n ))\n );\n $countmemberResult = $obj->find('count', array(\n 'conditions' => array(\n 'Member.vc_email_id' => $data['vc_alter_email'],\n 'Member.vc_comp_code' => $this->data['Customer']['vc_comp_code']\n )));\n }\n if (isset($data['vc_alter_email']) && !empty($data['vc_alter_email']) && trim($data['vc_alter_email']) == trim(isset($this->data['Customer']['vc_email']))) {\n return false;\n }\n\n if ($countResult == 0 && $countmemberResult == 0) {\n\n return true;\n } else {\n return false;\n }\n }", "public function update_details_db($user_email, $data) {\r\n $this->db->where('user_email', $user_email);\r\n $result = $this->db->update('users', $data);\r\n if ($result == 1) {\r\n return 'true';\r\n } else {\r\n return 'false';\r\n }\r\n }", "public function checkemail() {\n\n if (env(\"NEW_ACCOUNTS\") == \"Disabled\" && env(\"GUEST_SIGNING\") == \"Disabled\") {\n\n $account = Database::table(\"users\")->where(\"email\", input(\"email\"))->first();\n if (!empty($account)){\n response()->json(array(\"exists\" => true));\n }else{\n response()->json(array(\"exists\" => false));\n }\n\n }\n\n }", "function checkEmail(){\n\t\t$json\t= ceHelper::checkEmail(JRequest::getVar('email'));\n\t\t$this->jsonReturn($json);\n\t}", "public function edit($data)\n {\n print_r($data);\n $this->db->where('signup_email', $data['signup_email']);\n if ($this->db->update('signups', $data)) {\n return true;\n } else {\n return false;\n }\n }", "public function change_email()\n {\n if ($this->input->get('email')) {\n $res = $this->_api('user')->update_email([\n 'id' => $this->current_user->_operator_id(),\n 'email' => $this->input->get('email')\n ]);\n if ($res['submit']) {\n $this->_flash_message('メールアドレスを変更しました');\n redirect('setting');\n return;\n }\n }\n\n $view_data = [\n 'form_errors' => []\n ];\n\n\n // Check input data\n if ($this->input->is_post()) {\n // Call API to send verify email\n $res = $this->_api('user')->send_verify_email([\n 'user_id' => $this->current_user->id,\n 'email_type' => 'change_email',\n 'email' => $this->input->post('email'),\n ]);\n if ($res['submit']) {\n redirect('setting/change_email_sent');\n }\n\n // Show error if form is incorrect\n $view_data['form_errors'] = $res['invalid_fields'];\n $view_data['post'] = $this->input->post();\n }\n $user_res = $this->get_current_user_detail();\n $view_data['post'] = $user_res['result'];\n\n $this->_render($view_data);\n }", "public function chkEmailExist() {\n ob_clean();\n $this->load->model('register_model');\n $user_email = $this->input->post('user_email');\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('user_id', 'user_email');\n if ($this->input->post('action') != \"\") {\n $condition_to_pass = \"(user_type!=2) and (`user_email` = '\" . $user_email . \"' or `user_name` = '\" . $user_email . \"')\";\n } else {\n $condition_to_pass = array(\"user_email\" => $user_email);\n }\n $arr_login_data = $this->register_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\n if (count($arr_login_data)) {\n echo 'true';\n } else {\n echo 'false';\n }\n }", "private function validateEmailUser(){\n $this->deleteDuplicateCode($this->_datPerson[personId]);\n $this->_code = rand(10000, 99999);\n $em = $this->getDoctrine()->getManager();\n $UserValidationEmail = new Uservalidationemail();\n $UserValidationEmail->setEmail($this->_datPerson[email]);\n $UserValidationEmail->setCode($this->_code);\n $UserValidationEmail->setDateregister(new \\DateTime());\n $UserValidationEmail->setData(json_encode($this->_datPerson));\n $UserValidationEmail->setPersonid($this->_datPerson[personId]);\n\n $em->persist($UserValidationEmail);\n $em->flush();\n }", "function _webform_edit_email_validate($element, &$form_state) {\r\n if ($form_state['values']['user_email']) {\r\n $form_state['values']['value'] = '%useremail';\r\n }\r\n}", "public function checkEmailAction() {\n\t\t\n\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\tif ($request->isPost()) {\n\t\t\t// get the json raw data\n\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t$http_raw_post_data = '';\n\t\t\t\n\t\t\twhile (!feof($handle)) {\n\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t}\n\t\t\tfclose($handle); \n\t\t\t\n\t\t\t// convert it to a php array\n\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\t\n\t\t\t$isFreeEmail = Application_Model_User::checkEmail($json_data);\n\t\t\t\n\t\t\tif($isFreeEmail) {\n\t\t\t\t// continue\n\t\t\t\techo 1;\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\t// email exists already\n\t\t\t\techo 0;\n\t\t\t}\n\t\t}\n\t}", "public function editProfile($email, Request $request){\n if ($user = \\DB::table('users')->where('email', $email)->first()) {\n// check if the new email doesn't already exist in the database except in 1 record which is current logged in user\n if ( \\DB::table('users')->where('email', $request->email)->where('email', '<>', $email)->count() == 0) {\n\n $this->validate(request(), [\n 'adresse' => 'required',\n 'email' => 'required|email',\n 'post' => 'required',\n 'telephone' => 'required'\n\n ]);\n\n\n\n \\DB::table('users')\n ->where('email', $email)\n ->update(['email' => $request->email, 'post'=>$request->post, 'telephone'=>$request->telephone, 'adresse'=>$request->adresse]);\n //$collab->save();\n return response()->json([\n 'status'=>'success',\n 'email'=>$request->email,\n 'adresse'=> $request->adresse,\n 'post'=>$request->post,\n 'telephone'=>$request->telephone\n ]);\n } else {\n return response()->json([\n 'status' => 'failed, new email exists',\n\n ]);\n }\n\n } else {\n return response()->json([\n 'status' => 'failed',\n\n ]);\n }\n\n }", "public static function fp_rac_edit_mail_update_data() {\n\n check_ajax_referer('update-guest-email', 'rac_security');\n if (isset($_POST['id']) && $_POST['email']) {\n $row_id = $_POST['id'];\n $email_value = $_POST['email'];\n $cart_details = maybe_unserialize(get_post_meta($row_id, 'rac_cart_details', true));\n $cart_details[\"visitor_mail\"] = $email_value;\n $details = maybe_serialize($cart_details);\n update_post_meta($row_id, 'rac_cart_details', $details);\n }\n exit();\n }", "public function change_email() {\n if($_SESSION['user']->set_email($this->email)) {\n return true;\n } else {\n // An error occured updating the email address, return false\n return false;\n }\n }", "function updateEmail($id, $email) {\n\t$db = DB::getInstance();\n\t$fields=array('email'=>$email);\n\t$db->update('users',$id,$fields);\n\n\treturn true;\n}", "public function saveEmail()\n {\n $this->validate([\n 'email' => [\n 'sometimes',\n 'required',\n 'email',\n Rule::unique(shopper_table('users'), 'email')->ignore($this->customer_id),\n ],\n ]);\n\n $this->updateValue(\n 'email',\n $this->email,\n 'Customer Email address updated successfully.'\n );\n\n $this->emailUpdate = false;\n $this->emit('profileUpdate');\n }", "private function changeEmail()\n {\n try\n {\n global $userquery; \n\n $request = $_REQUEST;\n\n if(!userid())\n throw_error_msg(\"Please login to perform this action\");\n\n if(!isset($request['new_email']) || $request['new_email']==\"\")\n throw_error_msg(\"provide new_email\");\n\n if(!isset($request['cnew_email']) || $request['cnew_email']==\"\")\n throw_error_msg(\"provide cnew_email\");\n\n if($request['new_email']!=$request['cnew_email'])\n throw_error_msg(\"new email and confirm email do not match\");\n\n $request['userid'] = userid();\n $userquery->change_email($request);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => \"email has been changed successfully\");\n $this->response($this->json($data)); \n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function email_must_be_unique_on_update()\n {\n User::factory()->create([\n 'email' => '[email protected]',\n ]);\n\n $this\n ->from(\"nova/resources/users/{$this->user->id}/edit\")\n ->put(\n \"nova-api/users/{$this->user->id}\",\n [\n 'email' => '[email protected]',\n ]\n )\n ->assertRedirect(\"nova/resources/users/{$this->user->id}/edit\")\n ->assertSessionHasErrors('email');\n }", "public function checkEmail($data){\n $this->stmt = $this->query('SELECT * FROM users WHERE email = :email');\n $this->stmt->bindValue(':email', $data['email']);\n $row = $this->single();\n // Check row\n if($this->stmt->rowCount() > 0){\n return true;\n } else {\n return false;\n }\n\n }", "public function check_email() {\n\n\t\t$email = Input::post('email');\n \n\t\tif(is_string($email)) {\n\t\t\t\n\t\t\t$this->_password_reset->_unlocked_me($email);\n\t\t\t$row = $this->_password_reset->_validate_email($email);\n\t\t\t$res = $this->_password_reset->getData($email);\n\t\t\t$_res = $this->_password_reset->_check_if_reg($email);\n\t\t\t$ques = $this->_question->getquestion($res['question_id']);\n\n\t\t\tif($row > 0) {\n\t\t\t\tif($_res > 0) {\n\t\t\t\t\tif($res['status'] != 0) {\n\t\t\t\t\t\t$_arr = array('msg' =>Constant::EMAIL_CONFIRM, 'question' => $ques['security_question']);\n\t\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$_arr = array('msg' =>Constant::LOCKED);\n\t\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$_arr = array('msg' =>Constant::NOT_REGISTERED);\n\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t} else {\n\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\texit;\n\t\t}\n\t}", "public function UpdateEmail()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$from = trim($_POST['fromemail']);\n\t\t\t$to = trim($_POST['toemail']);\n\n\t\t\t$update = array (\n\t\t\t\t'orders' => array (\n\t\t\t\t\t'ordbillemail',\n\t\t\t\t\t'ordshipemail',\n\t\t\t\t),\n\t\t\t\t'customers' => array (\n\t\t\t\t\t'custconemail',\n\t\t\t\t),\n\t\t\t\t'subscribers' => array (\n\t\t\t\t\t'subemail',\n\t\t\t\t),\n\t\t\t);\n\t\t\t$recordsUpdated = 0;\n\n\t\t\tforeach ($update as $table => $fields) {\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$updateData = array (\n\t\t\t\t\t\t$field => $to\n\t\t\t\t\t);\n\t\t\t\t\t$restriction = $field .\"='\".$GLOBALS['ISC_CLASS_DB']->Quote($from).\"'\";\n\t\t\t\t\t$GLOBALS['ISC_CLASS_DB']->UpdateQuery($table, $updateData, $restriction);\n\t\t\t\t\t$recordsUpdated += $GLOBALS['ISC_CLASS_DB']->NumAffected();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($recordsUpdated > 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedPlural'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} elseif ($recordsUpdated == 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedSingular'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} else {\n\t\t\t\t$message = GetLang('EmailCheckNoneUpdated');\n\t\t\t\t$status = MSG_ERROR;\n\t\t\t}\n\n\t\t\tFlashMessage($message, $status, 'index.php?ToDo=runAddon&addon=addon_emailchange');\n\t\t}", "public function emailCheck(Request $request)\n\t{\n\t\t\t$enteredEmail= $request['datafile'];\n\t\t\tif(DB::table('users')->where('email', '?')->setBindings([$enteredEmail])->exists())\n\t\t\t{\n\t\t\t\techo '<div style=\"color: red;\"> <b>'.$enteredEmail.'</b> is already in use! </div>|false';\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\techo '<div style=\"color: green;\"> <b>'.$enteredEmail.'</b> is avaialable! </div>|true';\n\t\t\t}\t\n\t}", "function checkUsername_Email(){\n\t\t\t$value = $_POST[\"value\"];\n\t\t\t$field = $_POST[\"field\"];\n\t\t\t//echo \"$value\".' '.$field;\n\t\t\t$query = $this->db->query(\"SELECT $field FROM users WHERE $field='$value' LIMIT 1\");\n\t\t\t$valid = $query->num_rows();\n\t\t\tif($valid == 0){\n\t\t\t\tif($field == 'email'){\n\t\t\t\t\techo \"Eunique\";\n\t\t\t\t}else{\n\t\t\t\t\techo \"U_unique\";\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($field == 'email'){\n\t\t\t\t\techo \"This \".$field.\" is already registered with another user.\";\n\t\t\t\t}else{\n\t\t\t\t\techo \"This \".$field.\" is not available, please choose something different\";\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function UnigueEmail($check)\r\n {\r\n //μέσω αυτής της συνάρτησης ελέγχεται εάν χρησιμοποιείται ήδη το email\r\n //που έδωσε ο χρήστης και τον ενημερώνει αντίστοιχα μέσω του error που \r\n //υπάρχει για το συγκεκριμένο πεδίο στο αντίστοιχο view(register.ctp)\r\n\r\n //έλεγχος για το αν ήδη υπάρχει το email που επιλέγει ο χρήστης γίνεται\r\n //σε 2 περιπτώσεις:\r\n //α)Κατά την εγγραφή του χρήστη\r\n //β)Κατά την επεξεργασία προφίλ του χρήστη σε περίπτωση που επεξεργαστεί\r\n // το email του.\r\n $email = array_shift($check);\r\n\r\n if(!$this->getLoggedIn() || (strcmp($this->editEmail, 'yes')==0))\r\n {\r\n $conditions = array(\r\n// 'User.email'=>$this->data['User']['email']\r\n 'User.email'=>$email\r\n );\r\n if(!$this->id)\r\n {\r\n if($this->find('count', array('conditions'=>$conditions))>0) \r\n {\r\n// $this->invalidate('email_unique');\r\n return false; \r\n }\r\n }\r\n return true;\r\n }\r\n else\r\n return true;\r\n }", "public function checkEmail()\n {\n $email = $this->input->post('email');\n\n $user_login_id = $this->authentication_helper->checkEmail($email);\n\n if (isset($user_login_id) && !empty($user_login_id)) {\n echo json_encode(false);\n }\n else\n {\n echo json_encode(true);\n }\n }", "public function validateAndLoadData($data) {\n $this->email = $data['email'];\n\n\n return true;\n }", "private function updateEmail()\n {\n if (!LOCAL) {\n $ds = ldap_connect(\"addressbook.ic.ac.uk\");\n $r = ldap_bind($ds);\n $justthese = array(\"mail\");\n $sr = ldap_search(\n $ds,\n \"ou=People,ou=shibboleth,dc=ic,dc=ac,dc=uk\",\n \"uid=\".$this->getUser(),\n $justthese\n );\n $info = ldap_get_entries($ds, $sr);\n if ($info[\"count\"] > 0) {\n $this->setEmail($info[0]['mail'][0]);\n return ($info[0]['mail'][0]);\n } else {\n return false;\n }\n } else {\n $email = $this->getEmail();\n return $email;\n }\n }", "function Users_user_updateemail()\n{\n if (!pnUserLoggedIn()) {\n return LogUtil::registerPermissionError();\n }\n\n if (!SecurityUtil::confirmAuthKey('Users')) {\n return LogUtil::registerAuthidError(pnModUrl('Users', 'user', 'changeemail'));\n }\n\n $uservars = pnModGetVar('Users');\n if ($uservars['changeemail'] <> 1) {\n return pnRedirect('Users', 'user', 'main');\n }\n\n $newemail = FormUtil::getPassedValue('newemail', '', 'POST');\n\n $checkuser = pnModAPIFunc('Users', 'user', 'checkuser',\n array('uname' => pnUserGetVar('uname'),\n 'email' => $newemail,\n 'agreetoterms' => true));\n\n // check email related errors only\n if (in_array($checkuser, array(-1, 2, 9, 11, 12))) {\n switch($checkuser)\n {\n case -1:\n $message = __('Sorry! You have not been granted access to this module.');\n break;\n case 2:\n $message = __('Sorry! The e-mail address you entered was incorrectly formatted or is unacceptable for other reasons. Please correct your entry and try again.');\n break;\n case 9:\n $message = __('Sorry! This e-mail address has already been registered, and it cannot be used again for creating another account.');\n break;\n case 11:\n $message = __('Sorry! Your user agent is not accepted for registering an account on this site.');\n break;\n case 12:\n $message = __('Sorry! E-mail addresses from the domain you entered are not accepted for registering an account on this site.');\n break;\n default:\n $message = __('Sorry! You have not been granted access to this module.');\n } // switch\n return LogUtil::registerError($message, null, pnModURL('Users', 'user', 'changeemail'));\n }\n\n // set the new email\n pnUserSetVar('email', $newemail);\n\n LogUtil::registerStatus(__('Done! Saved your e-mail address.'));\n return pnRedirect(pnModURL('Users', 'user', 'main'));\n}", "public function update_email_check($email,$userId)\n {\n $sql1 = \"SELECT userId FROM users WHERE userId = $userId AND email='\".$email.\"'\";\n $record1 = $this->db->query($sql1);\n if ($record1->num_rows()==1) {\n return false;\n } else {\n return true;\n }\n }", "function check_email()\n\t{\n\t\tif($this->user_model->check_email($_POST['email'])>0)\n\t\t\techo json_encode(false);\n\t\telse\n\t\t\techo json_encode(true);\n\t}", "public function updateUserEmail(Request $request){\n \t$returnArr=config('constants.return_array');\n \t//$input=$request->all();\n \t$input=array_map('trim', $request->all());\n\n \ttry{\n \t\tDB::beginTransaction();\n \t\t$guard=CustomHelper::getGuard();\n\t\t\t$currentUser = \\Auth::guard($guard)->user();\n \t\t$logedInUser=isset($currentUser->id) ? $currentUser->id : NULL;\n\n \t\t$validationRules=[\n\t 'email' => 'required|email|unique:users,email,'.$logedInUser\n \t ];\n\t $validator= \\Validator::make($input, $validationRules);\n\t if($validator->fails()){\n\t $returnArr['status']=3;\n\t $returnArr['content']=$validator->errors();\n\t $returnArr['message']=\"Validation failed\";\n\t return $returnArr;\n\t }\n\t $chechAdminEmails=$this->admin->where('email', $input['email'])->first();\n\t if($chechAdminEmails === null){\n\n\t \tif(CustomHelper::isAdminId($logedInUser) === true)\n\t \t\t$chechUserExistance=$this->admin->where('id', $logedInUser)->first();\n\t \telse\n\t \t\t$chechUserExistance=$this->user->where('id', $logedInUser)->first();\n\n\t \tif($chechUserExistance === null){\n\t \t\t$returnArr['status']=4;\n\t\t $returnArr['content']=\"\";\n\t\t $returnArr['message']=\"No user found with the provided id\";\n\t \t}else{\n\t\t \t$updateData['email']= (isset($input['email']) and $input['email'] != \"\") ? $input['email'] : NULL;\n\t\t \t$updateData['ip_address']=$request->ip();\n\t\t \t$updateData['updated_at']=\\Carbon\\Carbon::now()->toDateTimeString();\n\n\t\t \tif(CustomHelper::isAdminId($logedInUser) === true)\n\t\t \t\t$updateResult=$this->admin->where('id', $logedInUser)->update($updateData);\n\t\t \telse\n\t\t \t\t$updateResult=$this->user->where('id', $logedInUser)->update($updateData);\n\n\t\t\t\t\tif($updateResult){\n\t\t\t\t\t\tif(CustomHelper::isAdminId($logedInUser) === true)\n\t\t \t\t\t$updatedUserData=$this->admin->where('id', $logedInUser)->first();\n\t\t \t\telse{\n\t\t \t\t\t$updatedUserData=$this->user->where('id', $logedInUser)->first();\n\t\t \t\t\t$adminInfo=$this->admin->where('id', 1)->first();\n\t\t \t\t\t$userType=CustomHelper::getConstantsValue('user_type', $updatedUserData->user_type);\n\t\t\t\t $mailData['admin_full_name']=$adminInfo->full_name;\n\t\t\t\t $mailData['user_full_name']=$updatedUserData->full_name;\n\t\t\t\t $mailData['user_type']=$userType;\n\t\t\t\t $mailData['user_email']=$updatedUserData->email;\n\t\t\t\t $mailData['site_url']='https://www.alegralabs.com/mukesh/symcom';\n\n\t\t\t\t if($chechUserExistance->email != $updatedUserData->email){\n\t\t\t\t \tMail::send('emails.user-email-change-mail-to-admin', $mailData, function($message) use($adminInfo) {\n\t\t\t\t\t \t$receiverEmail=trim($adminInfo->email);\n\t\t\t\t\t\t\t\t $message->to($receiverEmail, $adminInfo->full_name)\n\t\t\t\t\t\t\t\t ->subject('Symcom user email change notification');\n\t\t\t\t\t\t\t\t $message->from('[email protected]','Symcom');\n\t\t\t\t\t\t\t\t});\n\t\t\t\t }\n\t\t \t\t}\n\n\t\t\t\t $returnArr['status']=2;\n\t\t $returnArr['content']=$updatedUserData;\n\t\t $returnArr['message']=\"User informations updated successfully\";\n\t \n\t\t \t}else{\n\t\t \t\t$returnArr['status']=5;\n\t\t\t $returnArr['content']=\"\";\n\t\t\t $returnArr['message']=\"Operation failed, could not update the data\";\n\t\t \t}\n\t \t}\n\t \n\t }else{\n\t $validationMsg['email']=\"The email has already been taken\";\n\t $returnArr['status']=3;\n\t $returnArr['content']=$validationMsg;\n\t $returnArr['message']=\"Validation failed\";\n\t //return $returnArr;\n\t }\n\t DB::commit();\n \t}\n catch(\\Exception $e){\n \tDB::rollback();\n \t$returnArr['status']=6;\n\t $returnArr['content']=$e;\n\t $returnArr['message']=\"Something went wrong\";\n }\n\n return $returnArr; \n }", "public function checkEmailAvailability()\n {\n $email = $this->input->post('email');\n\n $user_login_id = $this->authentication_helper->checkEmail($email);\n if (isset($user_login_id) && !empty($user_login_id)) {\n echo json_encode(true);\n }\n else\n {\n echo json_encode(false);\n }\n }", "public function p_edit() { if(!$this->user) {\n Router::redirect('/');\n }\n \n $this->user->user_id = DB::instance(DB_NAME)->sanitize($this->user->user_id);\n $q = 'SELECT first_name, last_name, email\n FROM users\n WHERE user_id = \"'.$this->user->user_id.'\"';\n $user = DB::instance(DB_NAME)->select_row($q);\n \n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n \n $_POST['first_name'] = htmlspecialchars($_POST['first_name'], ENT_QUOTES, 'UTF-8');\n $_POST['last_name'] = htmlspecialchars($_POST['last_name'], ENT_QUOTES, 'UTF-8');\n \n $q = 'SELECT count(*)\n FROM users\n WHERE email = \"'.$_POST['email'].'\"'; \n $count = DB::instance(DB_NAME)->select_rows($q); \n //if the user enters an email which already exists in the data base kick them back\n if(intval($count[0]['count(*)']) >= 1) {\n Router::redirect('/users/edit/error');\n } else {\n \n if($_POST['first_name'] != NULL)\n {\n $user['first_name'] = $_POST['first_name'];\n }\n if($_POST['last_name'] != NULL )\n {\n $user['last_name'] = $_POST['last_name'];\n }\n if($_POST['email'] != NULL )\n {\n $user['email'] = $_POST['email'];\n }\n \n \n \n DB::instance(DB_NAME)->update(\"users\", $user, \"WHERE user_id =\".$this->user->user_id);\n Router::redirect('/users/profile/'.$this->user->user_id);\n }\n \n \n }", "public function email_check($email)\n {\n session_check();\n $user_id = $this->uri->segment(3);\n $user_id = empty($user_id) ? $this->session->userdata('user_id') : $user_id;\n if($this->uri->segment(2) == 'add' || $this->uri->segment(2) == 'Add')\n $user_id = 0;\n if($this->users_model->isemailexist($email, $user_id))\n {\n $this->form_validation->set_message('email_check', $this->lang->line('validation_email_exist'));\n return FALSE;\n }\n return TRUE; \n }", "public function checkEmail() {\n $result = $this->model->checkEmail($_POST);\n if($result) {\n echo \"true\"; \n } else {\n echo \"false\";\n }\n }", "public function setPersonalInfo($email)\r\n\t{\r\n\t\t$errors = array();\r\n\t\tif(!strlen($email))\r\n\t\t{\r\n\t\t\t$errors['email'] = 'Error: email is required';\r\n\t\t}else if(!filter_var($email, FILTER_VALIDATE_EMAIL)){\r\n\t\t\t$errors['email'] = 'Error: invalid email';\r\n\t\t}\r\n\r\n\t\tif(count($errors)) return $errors;\r\n\t\t\r\n\t\t$email = mysql_real_escape_string(stripslashes($email));\r\n\t\t\r\n\t\t$query = 'UPDATE users SET email=\"' . $email . '\" WHERE id=' . $this->user->id . ' LIMIT 1';\r\n\t\tmysql_query($query) or die('Bad SQL Query in updating personal info');\r\n\t\treturn true;\r\n\t}", "public function checkRegisteredEmail()\n {\n $email = $this->input->post('email');\n\n $user_login_id = $this->authentication_helper->checkEmail($email);\n \n if (isset($user_login_id) && !empty($user_login_id)) {\n echo json_encode(true);\n }\n else\n {\n echo json_encode(false);\n }\n }", "public function updateTokenbyemail($data)\n {\n $this->db->query('UPDATE user SET token = :token WHERE email = :email');\n $this->db->bind(':token', $data['token']);\n $this->db->bind(':email', $data['email']);\n if($this->db->execute())\n return true;\n else\n return false;\n }", "function changeemail($member,$oldemail,$newemail) {\n\t\n}", "public function CheckUser(){\n $emailSignup = $_POST[\"emailSignup\"];\n $this->LogModel->Check_User($emailSignup);\n }", "public function validateData(){\n if(substr($this->user_id,0,5)!=$this->office_id){\n return false;\n }\n if(in_array($this->email,$this->getEmails())){\n return false;\n }\n return true; \n }", "public function _unique_email() {\r\n // UNLESS it's the email for the current user\r\n\r\n $id = $this->uri->segment(4);\r\n $this->db->where('email', $this->input->post('email'));\r\n !$id || $this->db->where('id !=', $id);\r\n $account = $this->account_model->get();\r\n\r\n if (count($account)) {\r\n $this->form_validation->set_message('_unique_email', '%s này đã tồn tại');\r\n return FALSE;\r\n }\r\n return TRUE;\r\n }", "public function chkEmailDuplicate() {\n $this->load->model('register_model');\n $user_email = $this->input->post('user_email');\n $user_email_back = $this->input->post('user_email_back');\n if ($user_email == $user_email_back) {\n echo 'true';\n } else {\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('user_id', 'user_email');\n $condition_to_pass = array(\"user_email\" => $user_email);\n $arr_login_data = $this->register_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\n if (count($arr_login_data)) {\n echo 'false';\n } else {\n echo 'true';\n }\n }\n }", "function daily_update_property_email(){\n\t\t$meta_post = $this->InteractModal->get_update_post_meta();\n\t\tif(!empty($meta_post)){\n\t\t\t$data = array();\n\t\t\tforeach($meta_post as $meta_details){\n\t\t\t\t$user_id = $this->InteractModal->get_post_meta($meta_details['post_id'],'initiator_id');\n\t\t\t\t$data[$user_id][]= $meta_details['meta_key'];\n\t\t\t}\n\t\t}\t\t\n\t\t$get_data=$this->InteractModal->get_today_data();\n\t\t$id=2;\n\t\tif(!empty($get_data)){\n\t\t\t$result = array();\n\t\t\tforeach ($get_data as $element) {\n\t\t\t\t$result[$element['user_id']][]= $element['task_type'];\n\t\t\t}\n\t\t\tif(!empty($data) && (!empty($result))){\n\t\t\t\t$results = array_merge($data,$result);\n\t\t\t}\n\t\t\t$user_id= '';\n\t\t\tif(!empty($results)){\n\t\t\t\tforeach($result as $user_id=>$value):\n\t\t\t\t\t$update_details='';\n\t\t\t\t\t$value = array_unique($value);\n\t\t\t\t\tforeach($value as $values):\t\t\t\t\t\t\n\t\t\t\t\t\t$update_details=$update_details.'Today '.ucwords($values).' Successfully.<br>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\tif(!empty($user_id)){\n\t\t\t\t\t\t$where = array( 'id' =>$user_id);\n\t\t\t\t\t\t$user_data=$this->InteractModal->single_field_value('users',$where);\n\t\t\t\t\t\techo $email= $user_data[0]['user_email'];\n\t\t\t\t\t\techo \"<br>\";\n\t\t\t\t\t\t$company_id = $this->InteractModal->get_user_meta( $user_id, 'company_id');\n\t\t\t\t\t\t///get auto email content data \n\t\t\t\t\t\t$status_template = $this->InteractModal->get_user_meta( $company_id, 'status_template_id_'.$id );\n\t\t\t\t\t\tif(($status_template ==1)){\n\t\t\t\t\t\t\t$subject = $this->InteractModal->get_user_meta( $company_id, 'subject_template_id_'.$id );\n\t\t\t\t\t\t\t$content = $this->InteractModal->get_user_meta( $company_id, 'content_template_id_'.$id );\n\t\t\t\t\t\t\t$user_name = $this->InteractModal->get_user_meta( $user_id, 'concerned_person');\n\t\t\t\t\t\t\t$phone_number = $this->InteractModal->get_user_meta( $user_id, 'phone_number');\n\t\t\t\t\t\t\t$logo_content = '<img src=\"'.base_url().'/assets/img/profiles/logo_(2).png\" height=\"auto\" width=\"100\" alt=\"Logo\">'; \t\t\t\t\t\t\n\t\t\t\t\t\t\t$content=nl2br($content);\n\t\t\t\t\t\t\t$content = str_replace(\"_NAME_\",$user_name,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_PHONE_\",$phone_number,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_EMAIL_\",$email,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_LOGO_\",$logo_content,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_DATE_\",date('d-F-Y'),$content);\n\t\t\t\t\t\t\t$content = $content.'<br>'.$update_details;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template_list = $this->InteractModal->get_email_template($id);\n\t\t\t\t\t\t\tforeach( $template_list as $template_lists ):\n\t\t\t\t\t\t\t\t$subject = $template_lists['subject']; \n\t\t\t\t\t\t\t\t$content = $update_details; \n\t\t\t\t\t\t\tendforeach;\t\t\t\t\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t///get auto email content data \t\t\t\t\n\t\t\t\t\t\t$email_data = array('email' => $email,\n\t\t\t\t\t\t\t'content' => $content,\n\t\t\t\t\t\t\t'subject' => $subject\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->send_email($email_data);\n\t\t\t\t\t} \n\t\t\t\tendforeach;\n\t\t\t}\n\t\t}\n\t}", "public function editUserEmail($email)\n {\n // prevent database flooding\n $email = substr(trim($email), 0, 64);\n\n if (!empty($email) && $email == $_SESSION[\"user_email\"]) {\n $this->errors[] = MESSAGE_EMAIL_SAME_LIKE_OLD_ONE;\n // user mail cannot be empty and must be in email format\n } elseif (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $this->errors[] = MESSAGE_EMAIL_INVALID;\n\n } else if ($this->db->isConnected()) {\n // check if new email already exists\n $select = $this->db->row(\n 'SELECT * FROM users WHERE user_email = :user_email',\n array(\"user_email\"=>$email)\n );\n\n // if this email exists\n if (isset($select[\"user_id\"])) {\n $this->errors[] = MESSAGE_EMAIL_ALREADY_EXISTS;\n } else {\n // write users new data into database\n $update = $this->db->query(\n 'UPDATE users SET user_email = :user_email WHERE user_id = :user_id',\n array(\n \"user_email\"=>$email,\n \"user_id\"=>$_SESSION['user_id']\n )\n );\n\n if ($update > 0) {\n $_SESSION['user_email'] = $email;\n $this->messages[] = MESSAGE_EMAIL_CHANGED_SUCCESSFULLY . $email;\n } else {\n $this->errors[] = MESSAGE_EMAIL_CHANGE_FAILED;\n }\n }\n }\n }", "private function verificarEmail(){\n\t \n\t \t\t//Verifica se a requisição é via AJAX\n\t \t\tif(HelperFactory::getInstance()->isAjax()){\n\t \t\t\n\t \t\t\t //Solicita a verificação do E-mail\n\t\t\t\t $this->Delegator('ConcreteCadastro', 'verificarEmail',$this->getPost());\t \t\t\t \n\t \t\t}\t \n\t }", "public function updateMail($data, $id) {\n try {\n $select = $this->connexion->prepare(\"UPDATE \" . PREFIX . \"user \n SET `user_mail` = '\" . $data . \"'\n WHERE user_id = '\" . $id . \"'\");\n if($select->execute()){\n return true;\n } else {\n return false;\n }\n }\n catch (Exception $e)\n {\n echo 'Message:' . $e->getMessage();\n }\n }", "public function validate_email()\n\t{\n\t\t$user = JFactory::getUser();\n\t\t$config = OSMembershipHelper::getConfig();\n\t\t$email = $this->input->get('fieldValue', '', 'string');\n\t\t$validateId = $this->input->getString('fieldId');\n\t\t$arrayToJs = array();\n\t\t$arrayToJs[0] = $validateId;\n\t\t$arrayToJs[1] = true;\n\n\t\tif ($this->app->isSite() && $config->registration_integration && !$user->id)\n\t\t{\n\t\t\t$db = JFactory::getDbo();\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select('COUNT(*)')\n\t\t\t\t->from('#__users')\n\t\t\t\t->where('email = ' . $db->quote($email));\n\t\t\t$db->setQuery($query);\n\t\t\t$total = $db->loadResult();\n\n\t\t\tif ($total)\n\t\t\t{\n\t\t\t\t$arrayToJs[1] = false;\n\t\t\t}\n\t\t}\n\n\t\techo json_encode($arrayToJs);\n\n\t\t$this->app->close();\n\t}", "function motDePasseOublie($mail) { $userManager = new OpenClassrooms\\DWJP4\\Backend\\Model\\UsersManager();\n $emailExist = $userManager->emailExist($mail);\n if($emailExist){\n //S'il existe, on fabrique le code , on update le code , on envoi le message\n $pseudo=$emailExist[0]['USER_PSEUDO'];\n $code = codeValidation();\n //echo $pseudo;\n // echo \" code : \".$code;\n $updatePassword = $userManager->updatePsswd($code,$pseudo);\n $message = messagePasswdOublie($mail,$code);\n //echo $message;\n }else {\n //echo \"pas de mail exist\";\n }\n // on retourne sur la page d'identification\n require ('view/backend/identificationView.php'); \n}", "public static function updateEmails()\n {\n // When inconsistency occurs, choose FB's data.\n $users = User::all();\n foreach($users as $user)\n {\n // If token doesn't exist locally, continue\n if(Token::where('user_id', $user->id)->count() == 0)\n continue;\n\n $token = Token::getLatestToken($user->id);\n\n if(Token::checkIfTokenExpired($token))\n continue;\n\n $FB_email = Helpers::getFacebookResources($token)->getEmail();\n\n $Local_email = $user->email;\n if(($FB_email !== $Local_email) && ($FB_email !== null))\n {\n $user->update(['email' => $FB_email]);\n }\n }\n }", "public function email_check($str){ \n $con = array( \n 'returnType' => 'count', \n 'conditions' => array( \n 'email' => $str \n ) \n ); \n $checkEmail = $this->User->getRows($con); \n if($checkEmail > 0){ \n $this->form_validation->set_message('email_check', 'The given email already exists.'); \n return FALSE; \n }else{ \n return TRUE; \n } \n }", "public function check_email() {\n\t\t$email = urldecode($_GET['email']);\n\n\t\t$result = $this->Member_Model->check_email_if_exists($email);\n\n\t\tif ($result > 0) {\n\t\t\techo json_encode(false);\n\t\t} else {\n\t\t\techo json_encode(true);\n\t\t}\n\t}", "public function updateEmail($email, $idUser)\r\n\t{\r\n\t\t/*$sql = new Sql ( $this->dbAdapter );\r\n\t\t$consult = $this->dbAdapter->query ( \"UPDATE users SET email='$email' WHERE id='$idUser'\", Adapter::QUERY_MODE_EXECUTE );\r\n\t\t\r\n\t\t //print_r($consult); exit;\r\n\r\n\t\treturn $consult;*/\r\n\t\t$dataEmail = array(\"email\" => $email);\r\n\r\n\t\t$sql = new Sql( $this->adapter );\r\n\t\t$update = $sql->update();\r\n\t\t$update->table( 'users' );\r\n\t\t$update->set( $dataEmail );\r\n\t\t$update->where( array( 'id' => $idUser ) );\r\n\r\n\t\t$statement = $sql->prepareStatementForSqlObject( $update );\r\n\t\t$results = $statement->execute();\r\n\t\t//echo \"<pre>\"; print_r($results); exit;\r\n\t\treturn true;\r\n\r\n\t}", "public function uniqueEmail() {\n if (CmsUser::model()->exists(\"id != \" . userId() . \" AND email='{$this->register_email}'\")) {\n $this->addError('register_email', 'Email already exist');\n }\n }", "public function actionCheck_wp_email() {\n if (isset($_POST['email']) != 0) {\n // $output = '0';\n $email = $_POST['email'];\n\n //echo $email; die();\n $result_users = array();\n\n\n if (preg_match(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$^\", $email)) {\n $exists = Yii::$app->db->createCommand(\"SELECT * FROM website_users WHERE user_email='$email'\")->queryAll();\n\n\n if ($exists) {\n $user_data = $exists[0];\n $result_users['result'] = '1';\n\n $result_users['wp_id'] = $user_data['ID'];\n $result_users['wp_user'] = $user_data['user_login'];\n $result_users['wp_email'] = $user_data['user_email'];\n\n $wp_user_id = $user_data['ID'];\n\n $first_name = Yii::$app->db->createCommand(\"SELECT * FROM website_usermeta WHERE user_id='$wp_user_id' AND meta_key = 'first_name' \")->queryAll();\n $result_users['first_name'] = ucfirst(strtolower($first_name[0]['meta_value']));\n\n $last_name = Yii::$app->db->createCommand(\"SELECT * FROM website_usermeta WHERE user_id='$wp_user_id' AND meta_key = 'last_name' \")->queryAll();\n $result_users['last_name'] = ucfirst(strtolower($last_name[0]['meta_value']));\n } else {\n $result_users['result'] = '0';\n }\n }\n\n echo json_encode($result_users);\n exit;\n } else {\n return $this->redirect(['dv-registration/index']);\n }\n }", "public function email_check($str){ \n $con = array( \n 'returnType' => 'count', \n 'conditions' => array( \n 'email' => $str \n ) \n ); \n $checkEmail = $this->Admins->getRows($con); \n if($checkEmail > 0){ \n $this->form_validation->set_message('email_check', 'The given email already exists.'); \n return FALSE; \n }else{ \n return TRUE; \n } \n }", "private function checkData() {\n if(!isset(\n $_POST['code'],\n $_POST['field']\n )) {\n print json_encode(array(\n 'status'=>'error',\n 'msg'=>'wrong request'\n ));\n exit;\n }\n\n if($_POST['field']==='email') {\n $field = 'email';\n }\n elseif($_POST['field']==='phone') {\n $field = 'cellphone';\n }\n else {\n print json_encode(array(\n 'status'=>'error',\n 'msg'=>'wrong field'\n ));\n exit;\n }\n\n $code=trim($_POST['code']);\n\n $user_id=$this->uSes->get_val('user_id');\n if (isset(\n $_SESSION['uAuth']['profile_update_bg']['change'.$field]['code'],\n $_SESSION['uAuth']['profile_update_bg']['change'.$field]['timestamp'],\n $_SESSION['uAuth']['profile_update_bg']['change'.$field]['password'],\n $_SESSION['uAuth']['profile_update_bg']['change'.$field][$field]\n )) {\n if($field==='cellphone'&&!(int)$this->uFunc->getConf('use MAD SMS to send SMS','content',false)) {\n print json_encode(array(\n 'status'=>'error',\n 'msg'=>'sms send is not supported'\n ));\n exit;\n }\n\n if($_SESSION['uAuth']['profile_update_bg']['change'.$field]['timestamp']<(time()-300)) {//5min\n print json_encode(array(\n 'status'=>'error',\n 'msg'=>'code is expired'\n ));\n exit;\n }\n if($_SESSION['uAuth']['profile_update_bg']['change'.$field]['code']!==$code) {\n print json_encode(array(\n 'status'=>'error',\n 'msg'=>'wrong code'\n ));\n exit;\n }\n\n $password=$_SESSION['uAuth']['profile_update_bg']['change'.$field]['password'];\n\n $value=$_SESSION['uAuth']['profile_update_bg']['change'.$field][$field];\n\n $this->updateEmailOrPhone($user_id,$field,$value,$password);\n\n unset($_SESSION['uAuth']['profile_update_bg']['change'.$field]);\n\n return $value;\n }\n\n print json_encode([\n 'status'=>'error',\n 'msg'=>'code is expired'\n ]);\n exit;\n }", "public function actionCheck_email() {\n if (isset($_POST['email']) != 0) {\n $output = '0';\n $email = $_POST['email'];\n $course = $_POST['course'];\n // if (preg_match(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$^\", $email)) {\n $modules = Yii::$app->db->createCommand(\"SELECT * FROM assist_participant WHERE email='$email' and course='$course'\")->queryAll();\n if (!empty($modules)) {\n $output = '1';\n }\n // }\n return $output;\n } else {\n return $this->redirect(['dv-registration/index']);\n }\n }", "function check_email($email, $update_user_id){\n\t\t$this->db->select('*');\n\t\t$this->db->where('email', $email);\n\t\t$this->db->where_not_in('user_id', $update_user_id);\n\t\t$q = $this->db->get('users');\n\t\tif ($q->num_rows()>0) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function checkemail() {\n\t\tConfigure::write('debug', 0);\n\t\t$this->autoRender = false;\n\t\t$this->layout = \"\";\n\t\t\n\t\t$email = $_REQUEST['data']['Member']['email'];\n\t\t\n\t\t$count = $this->Member->find('count', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\t\n\t\tif ($count > 0) {\n\t\t\techo \"false\";\n\t\t} else {\n\t\t\techo \"true\";\n\t\t}\n\t}", "public function email_exists() {\n\t\t\n\t\t$email = $this->input->post('users_email');\n\t\t$edit_id = $this->input->post ( 'edit_id' );\n\t\t$where = array (\n\t\t\t'users_email' => trim ( $email )\n\t\t);\n\n\t\tif ($edit_id != \"\") {\n\n\t\t\t$where = array_merge ( $where, array (\n\t\t\t\t\t\"users_id !=\" => $edit_id \n\t\t\t) );\n\t\n\t\t} \n\n\t\t$result = $this->Mydb->get_record( 'users_id', $this->table, $where );\n\t\t\n\t\tif ( !empty ( $result ) ) {\n\t\t\t$this->form_validation->set_message ( 'email_exists', get_label ( 'user_email_exist' ) );\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function validateUserEmail()\n {\n if (!$this->hasErrors() && !$this->getUser()) {\n $this->addError('id', Yii::t('skeleton', 'Your email was not found.'));\n }\n }", "public function update($email,$data)\n { \n try \n {\n $total_rows = DB::update('userdata')->set(array('data'=>$data))\n ->where('email','=',$email)->execute();\n\n return true;\n\n }\n catch( Database_Exception $e )\n {\n //echo $e->getMessage();\n return false;\n }\n\n }", "public function email_check($str){\n\t\tif ($this->user_model->count(array('email' => $str)) > 0){\n $this->form_validation->set_message('email_check', 'Email sudah digunakan, mohon ganti dengan yang lain');\n return FALSE;\n }\n else{\n return TRUE;\n }\n\t}", "private function email(){\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$email = $this->_request['email'];\n\t\t\t$sql = mysql_query(\"SELECT email FROM accounts WHERE email = '\".$email.\"'\", $this->db);\n\t\t\tif(mysql_num_rows($sql) > 0){\n\t\t\t\t$result = array();\n\t\t\t\twhile($rlt = mysql_fetch_array($sql,MYSQL_ASSOC)){\n\t\t\t\t\t$result[] = $rlt;\n\t\t\t\t}\n\t\t\t\t// If success everythig is good send header as \"OK\" and return list of users in JSON format\n\t\t\t\techo json_encode(array('valid' =>FALSE));\n\t\t\t} else {\n\t\t\t\techo json_encode(array('valid' =>TRUE));\n\t\t\t}\n\t\t\t//$this->response('',204);\t// If no records \"No Content\" status\n\t\t}", "public function emailCheck(Request $request){\n $this->validate($request,[\n 'email' => 'required|email|max:255',\n ]);\n $email = $request->email;\n $check_email = DB::select('select UserId,UserName from users where Email=? and UserRandomId=?',[$email,1]);\n if(count($check_email)>0){\n $id = $check_email[0]->UserId;\n $token = rand();\n DB::table('users')->where('UserId',$id)->update(['ApprovalStatus'=>$token]);\n $activation_url = url(\"/changepassword/\".$id.\",\".$token);\n $data = array('activation_url' => $activation_url);\n Mail::send('emailtemplates.forgotpassword',$data,function($message) use($email){\n $message->to($email,'')->subject('Please Reset your SWIMMIQ password');\n $message->from('[email protected]','SWIMMIQ');\n });\n $request->session()->flash('message.level','info');\n $request->session()->flash('message.content','Please Check your Email to reset your password');\n return redirect('forgotpassword');\n }\n else{\n $request->session()->flash('message.level', 'danger');\n $request->session()->flash('message.content', 'Please check your Email, Either the email not available in our database or Activation pending for the Email...');\n return redirect('forgotpassword');\n }\n }", "public function actionEmailunique()\n\t{\n\t\t$email = $_GET['email'];\n\t\t$isexits = '0';\n\t\t$check=UsersDetails::model()->find(\"user_details_email='$email'\");\n\t\tif(isset($check))\t\t\t\t\n\t\t\t$isexits = '1'; //This email already used.\n\t\techo $isexits;\n\t\tYii::app()->end();\n\t}", "public function validEmailValidDataProvider() {}", "public function email_check($str){\n $con['returnType'] = 'count';\n $con['conditions'] = array('email'=>$str);\n $checkEmail = $this->user->getRows($con);\n if($checkEmail > 0){\n $this->form_validation->set_message('email_check', 'The given email already exists.');\n return FALSE;\n } else {\n return TRUE;\n }\n }", "function profile_update($user_id = null) {\n\t\t\tglobal $wpdb, $Db, $Subscriber;\n\t\t\t\n\t\t\tif (!empty($user_id)) {\t\t\t\n\t\t\t\tif ($newuserdata = $this -> userdata($user_id)) {\n\t\t\t\t\t$Db -> model = $Subscriber -> model;\n\t\t\t\t\t\n\t\t\t\t\tif ($subscriber = $Db -> find(array('user_id' => $user_id))) {\n\t\t\t\t\t\t$Db -> model = $Subscriber -> model;\n\t\t\t\t\t\t$Db -> save_field('email', $newuserdata -> user_email, array('id' => $subscriber -> id));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}", "public function changeEmail()\n {\n $breadCrumb = $this->userEngine\n ->breadcrumbGenerate('change-email');\n\n $recentEmail = $this->userEngine\n ->getChangeRequestedEmail();\n \n JavaScript::put(['newEmail' => __ifIsset($recentEmail['data'], $recentEmail['data']['new_email'], false)]);\n\n return $this->loadPublicView('user.change-email', $breadCrumb['data']);\n }", "public function modificaPerfil($data, $email) {\r\n\r\n $this->db->where('email_usuario', $email);\r\n $this->db->update('usuario', $data);\r\n\r\n return \"OK\";\r\n }", "function edituseremail_action()\n {\n $login_model = $this->loadModel('Login');\n $login_model->editUserEmail();\n $this->view->render('login/edituseremail');\n }", "public static function getUserVerified($email)\n {\n $query=\"select user_id from bimp_user where email='\".$email.\"'\";\n $email= Yii::app()->db->createCommand($query)->queryAll();\n $count=count($email);\n if($count==1){\n $result['userId']=$email[0]['user_id'];\n return $result;\n }else{\n return false;\n }\n \n }", "public static function UpdateEmail($context, $id, $email)\n {\n //Si retorna 1 se han insertado los datos.\n //si Retorna 0 error no controlado\n $stmtCheck = $context->prepare(\"SELECT email FROM usuarios WHERE email= :email\");\n $stmtCheck->bindParam(':email', $email);\n $stmtCheck->execute();\n $Mycount = $stmtCheck->rowCount();\n if ($Mycount == 1) {\n return -1;\n }\n\n $statment = $context->prepare(\"UPDATE usuarios SET email= :email WHERE id_usuario= :id\");\n $statment->bindParam(':id', $id);\n $statment->bindParam(':email', $email);\n $statment->execute();\n $count = $statment->rowCount();\n if ($count == 1) {\n return 1;\n } else {\n return 0;\n }\n }", "public function validate_group_member_email()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$email = $this->input->get('fieldValue', '', 'string');\n\t\t$validateId = $this->input->get('fieldId', '', 'string');\n\t\t$query->select('COUNT(*)')\n\t\t\t->from('#__users')\n\t\t\t->where('email = ' . $db->quote($email));\n\t\t$db->setQuery($query);\n\t\t$total = $db->loadResult();\n\t\t$arrayToJs = array();\n\t\t$arrayToJs[0] = $validateId;\n\n\t\tif (!$total)\n\t\t{\n\t\t\t$arrayToJs[1] = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arrayToJs[1] = false;\n\t\t}\n\n\t\techo json_encode($arrayToJs);\n\n\t\t$this->app->close();\n\t}", "public function checkEmail($email){\r\n $requete = \"select * from users where (Email='\" . $email . \"') \";\r\n //error_log(\"check email requete = (\" . $requete . \")\\n\");\r\n if ($this->getRequete($requete)){\r\n //$this->display();\r\n if ($this->Email == $email){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "function check_email($str){\n\t\t$this->db->where('user_email',$str);\n\t\t$rs\t=\t$this->db->get('reseller_store');\t\n\t\t$is_email_exits\t=\t$rs->num_rows();\n\t\tif($is_email_exits>0){\n\t\t\t$user_email_exits_msg\t=\tRegisterMessages(1);\n\t\t\t$this->form_validation->set_message('check_email', $user_email_exits_msg);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn true;\n\t}", "function checkemail() {\n\t\tConfigure::write('debug', 0);\n\t\t$this->autoRender = false;\n\t\t\n\t\t$email = $_REQUEST['data']['Member']['email'];\n\t\t\n\t\t$count = $this->Member->find('count', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\t/*echo $count;\n\t\tdie;*/\n\t\tif ($count > 0) {\n\t\t\techo \"false\";\n\t\t} else {\n\t\t\techo \"true\";\n\t\t}\n\t}", "public function updateEmail()\n {\n $this->schol->updateEmail( $this->input->post('emp'), $this->input->post('email'));\n return redirect('/affirs/Scholarship/show/'. $this->input->post('schol'));\n\n }", "public function validateEmailAction(){\n\t\t \n\t\t $isValid = ! User::emailExists($_GET['email'], $_GET['ignore_id'] ?? null);\n\t\t \n\t\t header('Content-Type: application/json');\n\t\t echo json_encode($isValid);\n\t }", "public function checkEmail($email){\n $check = $this->f_usersmodel->getFirstRowWhere('users',array(\n 'email' => $email\n ));\n if(!empty($check)){\n $this->session->set_flashdata(\"mess\", \"Email đã tồn tại!\");\n return false;\n }\n else{\n return true;\n }\n }", "public function changeEmail($newValue){\n\n $this->email = $newValue;\n $this ->save();\n\n }", "public function admin_email() {\n $this->db->where('user_id_PK', 1);\n $result = $this->db->get(TBL_USERS);\n if ($result->num_rows() > 0) {\n $email = $result->row();\n return $email->email;\n }\n else\n return FALSE;\n }", "public function updatevaliduserdetails($email,$code,$txtFirstName,$txtLastName,$txtAddress1,$txtAddress2,$txtAddress3,$txtAddress4,$txtCity,$txtPin,$txtState){\n\t\tif($this->veryfyuser($email,$code)){\n\t\t\t$this->db->where('Email', $email);\n\t\t\t$this->db->where('UniqueKey', $code);\n\t\t\t$object=array(\n\t\t\t\t'FirstName' => $txtFirstName,\n\t\t\t\t'LastName' => $txtLastName,\n\t\t\t\t'Status' => '1'\n\t\t\t);\n\t\t\t$this->db->update('tbl_userdetails', $object);\n\n\t\t\t$obj=array(\n\t\t\t\t'email' => $email,\n\t\t\t\t'address1' => $txtAddress1,\n\t\t\t\t'address2' => $txtAddress2,\n\t\t\t\t'address3' => $txtAddress3,\n\t\t\t\t'address4' => $txtAddress4,\n\t\t\t\t'city' => $txtCity,\n\t\t\t\t'pin' => $txtPin,\n\t\t\t\t'state' => $txtState,\n\t\t\t\t'country' => 'India'\n\t\t\t);\n\t\t\t$this->db->insert('tbl_useraddress', $obj);\n\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "function email_revalidate_user_settings_save() {\n\t$email = get_input('email');\n\t$user_id = get_input('guid');\n\n\tif (!$user_id) {\n\t\t$user = elgg_get_logged_in_user_entity();\n\t} else {\n\t\t$user = get_entity($user_id);\n\t}\n\n\tif (!is_email_address($email)) {\n\t\tregister_error(elgg_echo('email:save:fail'));\n\t\treturn false;\n\t}\n\n\tif ($user) {\n\t\tif (strcmp($email, $user->email) != 0) {\n\t\t\tif (!get_user_by_email($email)) {\n\t\t\t\t$user->new_email = $email;\n\t\t\t\tset_input('email', $user->email);\n\t\t\t\temail_revalidate_request_validation($user->guid);\n\t\t\t} else {\n\t\t\t\tregister_error(elgg_echo('registration:dupeemail'));\n\t\t\t}\n\t\t} else {\n\t\t\tunset($user->new_email);\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tregister_error(elgg_echo('email:save:fail'));\n\t}\n\treturn false;\n}", "function kiemtra_email($email)\n {\n if($this->default_model->getInfoID($this->_table,array(\"Email\" => $email))!=TRUE){ // ko ton tai $email\n return TRUE;\n }\n else{\n $this->form_validation->set_message(\"kiemtra_email\",sprintf($this->lang->line('error_kiemtra_email'),$email));\n return FALSE;\n }\n }", "function setUserInformation()\r\n{\r\n global $sender ;\r\n global $message ;\r\n global $chemin ;\r\n global $query ;\r\n if(filter_var(strtolower($message), FILTER_VALIDATE_EMAIL) || preg_match(\"#^(none)#i\", $message))\r\n {\r\n sendTextMessage(\"Thank you for your answer to my question.Your setting is correctly set\");\r\n displayAllService();\r\n $query->addUser($sender,strtolower($message));\r\n file_put_contents($chemin,\"\");\r\n }\r\n else\r\n {\r\n sendTextMessage(\"Please provide a valid email or type none if you don't get one 😕 .\");\r\n }\r\n}", "public function user_email_check($uemail) {\r\n $this->db->select('user_email');\r\n $this->db->where('user_email', $uemail);\r\n $query = $this->db->get('users');\r\n $data = $query->result();\r\n return $data;\r\n }", "public function update_user_password_by_email($data)\n {\n foreach($data as $key=>$val) $$key=get_magic_quotes_gpc()?$val:addslashes($val);\n $password = md5($password);\n $query = Yii::$app->db;\n $query->createCommand()->update('core_users', ['password' => \"$password\"], \"email = '$email'\")->execute();\n return true;\n }", "public function CheckEmail($email, $userId);", "public function setEmail($newEmail){\n\t}", "public function email_check($str){\n\t\tif($this->user_model->exist_row_check('email', $str) > 0){\n $this->form_validation->set_error_delimiters('', '');\n\t\t\t$this->form_validation->set_message('email_check', 'Email telah digunakan');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "private function setEmail()\n {\n\t if ( empty( $_POST['email'] ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n }\n \n $e = trim( $_POST['email'] );\n \n\t\tif ( ! filter_var( $e, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n\t\t}\n \n\t\t$this->data['email'] = $e;\n }", "public function p_profile_edit() {\n $duplicate = DB::instance(DB_NAME)->select_field(\"SELECT email FROM users WHERE email = '\" . $_POST['email'] . \"' AND email != '\" . $this->user->email . \"'\");\n\n //If email already exists \n if($duplicate){ \n \n //Redirect to error page \n Router::redirect('/users/profile/?duplicate=true');\n }\n\n\n // Encrypt the password \n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \n\n // Create an encrypted token via their email address and a random string\n $_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \n\n $q = \"UPDATE users\n SET first_name = '\".$_REQUEST['first_name'].\"',\n last_name = '\".$_REQUEST['last_name'].\"',\n email = '\".$_REQUEST['email'].\"'\n WHERE id = '\".$this->user->id.\"'\";\n\n DB::instance(DB_NAME)->query($q);\n Router::redirect(\"/users/profile\");\n\n \n }", "private function checkEmail(){\n\n $request = $this->_connexion->prepare(\"SELECT COUNT(*) AS num FROM Users WHERE user_email=?\");\n $request->execute(array($this->_userEmail));\n $numberOfRows = $request->fetch();\n\n if($numberOfRows['num'] == 0)\n return false;\n else\n return true;\n\n }", "function edit_verify($data=array())\n {\n if ($data)\n {\n $sql = \"\n UPDATE {$this->_db}\n SET\n username = \" . $this->db->escape($data['username']) . \",\n \";\n\n $sql .= \"\n company = \" . $this->db->escape($data['company']) . \",\n country = \" . $this->db->escape($data['country']) . \",\n zip = \" . $this->db->escape($data['zip']) . \",\n city = \" . $this->db->escape($data['city']) . \",\n address_1 = \" . $this->db->escape($data['address_1']) . \",\n address_2 = \" . $this->db->escape($data['address_2']) . \"\n WHERE id = \" . $this->db->escape($data['id']) . \"\n \";\n\n $this->db->query($sql);\n\n if ($this->db->affected_rows())\n {\n return TRUE;\n }\n }\n\n return FALSE;\n }" ]
[ "0.74239326", "0.7019906", "0.70007783", "0.69351447", "0.6933731", "0.68637264", "0.68253183", "0.68219477", "0.68039876", "0.6784133", "0.6783265", "0.67646915", "0.67542595", "0.67457724", "0.67426395", "0.6697933", "0.6689515", "0.6686961", "0.66720647", "0.6669265", "0.6665924", "0.6663272", "0.665539", "0.6649182", "0.66479003", "0.6633343", "0.6627561", "0.66239315", "0.6620866", "0.6613559", "0.6601492", "0.65989804", "0.65830976", "0.658085", "0.65746385", "0.6573583", "0.6531006", "0.65301204", "0.6527293", "0.6522449", "0.6506393", "0.650417", "0.64970595", "0.6485976", "0.64814657", "0.64781076", "0.64769375", "0.6463507", "0.6450548", "0.6449385", "0.6441585", "0.6431428", "0.64313924", "0.64281476", "0.64258534", "0.64229023", "0.64188933", "0.6405861", "0.64051974", "0.6403486", "0.64021486", "0.63997895", "0.6384406", "0.63833445", "0.6382938", "0.6381892", "0.6377705", "0.63746876", "0.6367534", "0.63568515", "0.63496524", "0.6348835", "0.63485664", "0.63462496", "0.63439614", "0.6340004", "0.6334299", "0.631274", "0.6309233", "0.63080823", "0.63049287", "0.62986004", "0.62965494", "0.62960833", "0.62908304", "0.6288182", "0.6285004", "0.6283408", "0.6283212", "0.62728226", "0.62707007", "0.6269915", "0.6263537", "0.6259412", "0.62592137", "0.625535", "0.6254913", "0.62540543", "0.624909", "0.62239754", "0.6223816" ]
0.0
-1
end updateData ==========Delete data=======
public function deleteData($id){ $query = "DELETE FROM tbl_userinfo WHERE Id = $id "; $delete_row = $this->conn->query($query) or die($this->conn->error .__LINE__); header('Location:index.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteDataInfo()\n {\n $formPost=array();\n $formPost[deleted]=1;\n \n foreach($this->piVars['selectionList'] as $idVal)\n {\n $GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->tableName,'uid='.$idVal,$formPost);\n }\n return $this->showListings();\n }", "public function deleteData()\n {\n DB::table($this->dbTable)\n ->where($this->where)\n ->delete();\n }", "protected function setDeleteData()\n\t{\n\n\t}", "function deleteData()\n{\n global $myDataGrid;\n global $f;\n global $tbl;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id'][] = $strValue;\n }\n if ($tbl->deleteMultiple($arrKeys)) {\n $myDataGrid->message = $tbl->strMessage;\n $f->setValues('step', getDataListRecruitmentProcessTypeStep(null, true));\n } else {\n $myDataGrid->errorMessage = \"Failed to delete data \" . $tbl->strEntityName;\n }\n}", "function deleteData()\n{\n global $myDataGrid;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id'][] = $strValue;\n $arrKeys2['id_absence'][] = $strValue;\n }\n $tblAbsence = new cHrdAbsence();\n $tblAbsenceDetail = new cHrdAbsenceDetail();\n $tblAbsence->deleteMultiple($arrKeys);\n $tblAbsenceDetail->deleteMultiple($arrKeys2);\n writeLog(ACTIVITY_DELETE, MODULE_PAYROLL, implode(\",\", $arrKeys2['id_absence']));\n $myDataGrid->message = $tblAbsence->strMessage;\n}", "private function clearData()\n {\n $this->_data=array();\n }", "public function deleteData()\n {\t\t\n \t$arrayId = $this->getAllUserId($this->readFromLocalFile());\n \tforeach($arrayId as $id)\n \t{\n \t\t$user = User::find()->where(['id' => $id])->one();\n \t\tif($user)\n \t\t{\n \t\t\t$user->delete();\n \t\t}\n \t}\n \t$this->deleteSelectedLocalItems('user');\n }", "abstract public function updateData();", "public function deletevalue($data) \n {\n if (isset($_POST['number'])) \n {\n $number = $_POST['number'];\n $promoid = $_POST['promoid'];\n $file_size = filesize(\"promouserdata.json\");\n $data = array();\n \n if ($file_size > 0) \n {\n $myfile = fopen(\"promouserdata.json\", \"r\") or die(\"Unable to open file!\");\n $data = fread($myfile, filesize(\"promouserdata.json\"));\n $data = (array) json_decode($data);\n }\n $new_data = array();\n $data = (array) $data;\n\n foreach ($data as $key => $values) {\n if ($values->user->number === $number && $values->user->promoid === $promoid) \n {\n //dont insert into new array \n //or we can say it will be deleted \n }\n else\n {\n $new_data[$key] = $values;\n }\n }\n \n //echo \"<pre>\";\n //print_r($new_data);\n //echo \"</pre>\";\n //die();\n \n //foreach ($data as $key => $values) \n //{\n // if ($values->user->email != $index_id) \n // {\n // $new_data[$key] = $values;\n // }\n //}\n \n $myfile = fopen(\"promouserdata.json\", \"w\") or die(\"Unable to open file!\");\n fwrite($myfile, json_encode($new_data));\n fclose($myfile);\n return true;\n } \n else \n {\n return false;\n }\n }", "function hapus_data($id){\r\n\t\t\t$query \t= \"DELETE FROM data WHERE id='$id' \";\r\n\t\t\treturn run($query);\r\n\t\t}", "function _process_delete($update_id)\n{\n\n $data = $this->fetch_data_from_db($update_id);\n \n $this->_delete($update_id);\n\n //delete the faciitiy record from store_items\n}", "function deleteData($db)\n{\n global $_REQUEST;\n $i = 0;\n foreach ($_REQUEST as $strIndex => $strValue) {\n if (substr($strIndex, 0, 15) == 'chkManagementID') {\n // cari dulu data Department code\n $strSQL = \"SELECT * FROM hrd_management WHERE id = '$strValue' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['management_code'];\n $strSQL = \"DELETE FROM hrd_division WHERE management_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_department WHERE management_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_section WHERE management_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_sub_section WHERE management_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_management WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n }\n if (substr($strIndex, 0, 13) == 'chkDivisionID') {\n // cari dulu data Department code\n $strSQL = \"SELECT * FROM hrd_division WHERE id = '$strValue' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['division_code'];\n $strSQL = \"DELETE FROM hrd_department WHERE division_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_section WHERE division_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_sub_section WHERE division_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_division WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n }\n if (substr($strIndex, 0, 5) == 'chkID') {\n // cari dulu data Department code\n $strSQL = \"SELECT * FROM hrd_department WHERE id = '$strValue' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['department_code'];\n $strSQL = \"DELETE FROM hrd_section WHERE department_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_sub_section WHERE department_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_department WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n } else if (substr($strIndex, 0, 12) == 'chkSectionID') { // hapus section\n // cari dulu data section code\n $strSQL = \"SELECT * FROM hrd_section WHERE id = '$strValue' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['section_code'];\n $strCode1 = $rowDb['department_code'];\n $strSQL = \"DELETE FROM hrd_sub_section WHERE section_code = '$strCode' \";\n $strSQL .= \"AND department_code = '$strCode1' \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_section WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n } else if (substr($strIndex, 0, 15) == 'chkSubSectionID') { // hapus sub section\n $strSQL = \"DELETE FROM hrd_sub_section WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n }\n }\n if ($i > 0) {\n writeLog(ACTIVITY_DELETE, MODULE_PAYROLL, \"$i data\", 0);\n }\n}", "public function remove_all_data()\n\t{\n\t\t$this->_data = array();\n\t}", "function deleteData()\n{\n global $myDataGrid;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id'][] = $strValue;\n $arrKeys2['id_evaluation'][] = $strValue;\n }\n $tblHrdEvaluationMaster = new cHrdEvaluationMaster();\n $tblHrdEvaluationDetail = new cHrdEvaluationDetail();\n $tblHrdEvaluationMaster->deleteMultiple($arrKeys);\n $tblHrdEvaluationDetail->deleteMultiple($arrKeys2);\n $myDataGrid->message = $tblHrdEvaluationDetail->strMessage;\n}", "public static function deleteItemUpdate($data)\n {\n $itemID = $data['id'];\n $deleted = $data['bool'];\n $empID = base64_decode(Session::get('Emp_Id'));\n\n $query = DB::connection('dbChecklist')->select('EXEC [sp_Item_Delete] ?, ?, ?', [$itemID, $deleted, $empID]);\n return $query;\n }", "public function deleteData(){\n //buatlah query\n $sqlQuery = \"DELETE FROM \" . $this->t_name . \" WHERE id = ?\";\n\n //persiapkan stmt\n $stmt = $this->conn->prepare($sqlQuery);\n\n //cukup converte id\n $this->id=htmlspecialchars(strip_tags($this->id));\n\n //bind\n $stmt->bindParam(1,$this->id);\n\n //eksekusi\n if($stmt->execute()){\n return true;\n }\n return false;\n }", "function deleteEntry() \n { \n\t parent::deleteEntry();\n\n\t $values = $this->getArrayOfValues();\n// \t echo \"<pre>\".print_r($values,true).\"</pre>\";\n\t \n\t if (isset($values['reg_id']))\n\t {\n\t \n\t\t // update balance owing column in cim_reg_registration table\n\t\t $singleReg = new RowManager_RegistrationManager($values['reg_id']);\n// \t\t $singleReg_list = $singleReg->getListIterator();\n// \t\t $singleReg_array = $singleReg_list->getDataList();\n// \t\t \n// \t\t reset($singleReg_array);\n// \t\t $record = current($singleReg_array);\n// \t\t $oldBalance = $record['registration_balance'];\n\t\t \n\t\t\t $balanceGetter = new FinancialTools();\n\t\t\t $balance = array();\n// \t\t\t $balance['registration_balance'] = $oldBalance - $record['cctransaction_amount'];\n\t\t\t $balance['registration_balance'] = $balanceGetter->simpleCalcBalanceOwing($values['reg_id']);\t\n\t\t\t $singleReg->loadFromArray( $balance );\n\t\t\t $singleReg->updateDBTable();\t\t\t\n\t\t }\t \t \n \n }", "public function delete_data_to_tombstone(){\n }", "function deleteData($kode){\r\n\t\t$this->db->query(\"\r\n\t\t\tupdate mst_poly\r\n\t\t\tset pl_status = 0\r\n\t\t\twhere pl_id in ($kode)\");\r\n\t}", "public function DeleteData($id){\n \t$db = $this->getDb();\n \t\t$where = array(0 => \"aclusuariosonline_id = \".$id);\n\t\t$db->delete($this->_nametable, $where);\t\t\n\t}", "function deleteEntry() \n { \n\t parent::deleteEntry();\n\n\t $values = $this->getArrayOfValues();\n// \t echo \"<pre>\".print_r($values,true).\"</pre>\";\n\t \n\t if (isset($values['registration_id']))\n\t {\n\t \n\t\t // update balance owing column in cim_reg_registration table\n\t\t $singleReg = new RowManager_RegistrationManager($values['registration_id']);\n// \t\t $singleReg_list = $singleReg->getListIterator();\n// \t\t $singleReg_array = $singleReg_list->getDataList();\n// \t\t \n// \t\t reset($singleReg_array);\n// \t\t $record = current($singleReg_array);\n// \t\t $oldBalance = $record['registration_balance'];\n\t\t \n\t\t\t $balanceGetter = new FinancialTools();\n\t\t\t $balance = array();\n// \t\t\t $balance['registration_balance'] = $oldBalance - $record['cctransaction_amount'];\n\t\t\t $balance['registration_balance'] = $balanceGetter->simpleCalcBalanceOwing($values['registration_id']);\t\n\t\t\t $singleReg->loadFromArray( $balance );\n\t\t\t $singleReg->updateDBTable();\t\t\t\n\t\t }\t \t \n \n }", "public function deleteData($name) {\n if (isset($this->data[$name])) {\n unset($this->data[$name]);\n }\n }", "public function multidelete_data($data)\n\t{\n\t\t$query = \"DELETE FROM tb_users WHERE id IN ($data[0])\";\n\t\tDB::connect()->query($query)->vars($data[1])->exec();\n\t}", "public function delete($data)\n {\n }", "public function delete($data)\n {\n }", "function delete_post()\n {\n\t\t$dataInfo = array();\n\t\t\n $fid = $this->input->post('fid', TRUE);\n\n $result = $this->MUGroup->delete_data($fid);\n\n if($result > 0)\n {\n $this->response([\n 'status' => TRUE,\n 'message' => 'Data is successfully deleted'\n ], REST_Controller::HTTP_OK);\n }\n else\n {\n $this->response([\n 'status' => FALSE,\n 'message' => 'Failed to delete data'\n ], REST_Controller::HTTP_OK);\n }\n }", "function deleteData()\n{\n global $myDataGrid;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id_adm_userlog'][] = $strValue;\n }\n $dataUserLog = new cAdmUserLog();\n $dataUserLog->deleteMultiple($arrKeys);\n $myDataGrid->message = $dataUserLog->strMessage;\n}", "public function eraseData()\n {\n $s = 'DELETE FROM `commitMessage` WHERE `user`=\"%s\"';\n $params = array($this->vcsLogin);\n $this->conn->query($s, $params);\n\n $s = 'DELETE FROM `work` WHERE `userID`=%d';\n $params = array($this->userID);\n $this->conn->query($s, $params);\n\n $s = 'DELETE FROM `patches` WHERE `userID`=%d';\n $params = array($this->userID);\n $this->conn->query($s, $params);\n\n $s = 'DELETE FROM `users` WHERE `userID`=%d';\n $params = array($this->userID);\n $this->conn->query($s, $params);\n }", "public function delData($key) {\n\t\tunset($this->_data[$key]);\n\t}", "public function DeleteCustomerDetails($data) { /* this fun for delete customer details */\n\n extract($data);\n //print_r($data);die();\n $sqldelete = \"UPDATE customer_details SET visible = '0' WHERE cust_id = '$Customer_id'\";\n\n $resultdelete = $this->db->query($sqldelete);\n\n if ($resultdelete) {\n $response = array(\n 'status' => 1,\n 'status_message' => 'Records Deleted Successfully..!');\n } else {\n $response = array(\n 'status' => 0,\n 'status_message' => 'Records Not Deleted Successfully...!');\n }\n\n return $response;\n }", "function before_update_processor($row, $postData) {\r\n\tunset($postData['vupb_nama']);\r\n\tunset($postData['vgenerik']);\r\n\t\r\n\t//print_r($postData);exit();\r\n\treturn $postData;\r\n\r\n}", "public function delete($data)\n {\n $id=$data->input('id');\n $employee = Employee::find($id);\n $employee-> delete_flag = true; \n $employee-> deleted_at = date('Y-m-d H:i:s');;\n $employee->save();\n\n }", "function delete(){\n\t\t\t\t$servername = \"localhost\";\n\t\t\t\t$username = \"root\";\n\t\t\t\t$password = \"\";\n\t\t\t\t$dbname = \"CS230\";\n\t\t\t\t//Variables for holding entity data\n\t\t\t\t$i = $_POST['i'];\n\t\t\t\t$conn = mysqli_connect($servername, $username, $password, $dbname);\n\t\t\t\tif($conn){\n\t\t\t\t//echo \"Connection OK\";\n\t\t\t\t}else{\n\t\t\t\t\tdie(\"The Connection has failed: \" .mysqli_connect_error());\n\t\t\t\t}\n\t\t\t\t$sql = \"DELETE FROM eBook_MetaData WHERE id='$i'\";\n\t\t\t\t$data = mysqli_query($conn,$sql);\n\t\t\t\t\t//If data is not transfered to the database\n\t\t\t\t\tif(!$data){\n\t\t\t\t\techo \"error\";\n\t\t\t\t\t//If it is transfered\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"Data deleted\";\n\t\t\t\t\t}\n\t\t\t\t$conn = null;\n\t\t\t\t}", "public function clearData() {\n unset($this->data);\n }", "function clients_select_deleteData($ctlData,$clientID) {\t\n}", "protected function deleteData($data) {\n \t$data = parent::deleteData($data);\n\n \tif (!$data) {\n \t\treturn $data;\n \t}\n\n $path = $data->getPath();\n\n $query = $this->createQuery(0, null, true);\n $query->setFields('{id}');\n $query->addCondition('{parent} = %1% OR {parent} LIKE %2%', $path, $path . self::PATH_SEPARATOR . '%');\n \t$children = $query->query();\n\n \t$this->delete($children);\n\n \treturn $data;\n }", "function deleteData($db)\n{\n global $_REQUEST;\n $i = 0;\n foreach ($_REQUEST as $strIndex => $strValue) {\n if (substr($strIndex, 0, 5) == 'chkID') {\n $strSQL = \"DELETE FROM \\\"hrdTransportation\\\" WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n }\n }\n if ($i > 0) {\n writeLog(ACTIVITY_DELETE, MODULE_PAYROLL, \"$i data\", 0);\n }\n}", "public function resetData();", "public function eliminar($data)\n {\n $cliente=$this->db->query('delete from tab_cliente where id_cliente='.$data); \n }", "public function updateData($data){\n\t\t// $this->db->query($query);\n\t\t// $this->db->bind('deptId',$data['deptId']);\n\t\t// $this->db->bind('deptName',$data['deptName']);\n\t\t// $this->db->execute();\n\n\t\t// return $this->db->rowCount();\n\t}", "function file_deleteData($vPageID) {\n\tglobal $Auth;\n\t\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\n\t## data connection\n\t$db_connectionMain = new DB_Sql();\n\t$f = new file_object(); \n\t\n\t## first we need to get the files in order to delete them from the filesystem- then remove\n\t## them from the db\n\t$pageData = array();\n\tfile_getData($vPageID,$pageData);\n\n\tforeach($pageData as $current_file) {\n\t\t## remove the file\n\t\t$f->delete_file(MATRIX_UPLOADDIR_DOCS.$current_file['filename']);\n\t}\n\n\t## finally delete all files\n\t$query = \"DELETE FROM \".PAGE_FILE.\" WHERE page_id='$vPageID' and client_id='$client_id'\";\n\t$result_pointer = $db_connectionMain->query($query);\n}", "public function updateMultiple_data()\n {\n \n }", "public function delete() {\n\t\tif (!empty($this->originalData)) {\n\t\t\t$query = $this->connection->query(\"DELETE FROM {$this->table} WHERE \".self::$primaryKey[$this->table].\"='{$this->originalData[self::$primaryKey[$this->table]]}'\");\n\t\t\t$query = $this->connection->query(\"ALTER TABLE $this->table AUTO_INCREMENT = 1\");\n\t\t\t$this->originalData = array();\n\t\t}\t\n\t\telse \n\t\t\tthrow new Exception('You are trying to delete an inexistent row');\n\t}", "public function updateData(array $data,$id) {\n $where = \"id = \".$id;\n $fields = $this->info(Zend_Db_Table_Abstract::COLS);\n foreach ($data as $field => $value) {\n if (!in_array($field, $fields)) {\n unset($data[$field]);\n }\n }\n\n $data['modified'] = date('Y-m-d H:i:s'); \n return $this->update($data,$where);\n }", "function deleteData($table, $tableID)\r\n {\r\n //Check if property data is not null\r\n if (!is_null($this->data)) {\r\n if ($this->db->deleteDataByID($table, $tableID, $this->data)) {\r\n echo json_encode(\r\n array(\"message\" => \"Data deleted\")\r\n );\r\n }\r\n else{\r\n http_response_code(\"400\");\r\n echo json_encode(\r\n array(\"message\" => \"Unable to delete data\")\r\n );\r\n }\r\n }\r\n // else Display error\r\n else {\r\n http_response_code(\"400\");\r\n echo json_encode(\r\n array(\"message\" => \"Unable to delete data!\")\r\n );\r\n }\r\n }", "protected function _after_delete($data, $options)\n {\n// var_dump($data);die;\n foreach ($data['id'][1] as $key=>$val){\n //删除其他表\n $sat = M('SpActivityTicket')->field('activity_id,ticket_id')->where('ticket_id = '.$val)->find();\n $this->deleteTicketStock($sat);\n $this->deleteActivityTicket($sat);\n $this->deleteActivity(['id'=>$sat['activity_id']]);\n }\n\n }", "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}", "public function updateData(array $data,$id) {\n $where = \"id = \".$id;\n $fields = $this->info(Zend_Db_Table_Abstract::COLS);\n foreach ($data as $field => $value) {\n if (!in_array($field, $fields)) {\n unset($data[$field]);\n }\n }\n $data['modified'] = time();\n return $this->update($data,$where);\n }", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "function delete_data($table, $id){\n\n $query = $this->db->delete($table, array('id' => $id));\n\n }", "public function resetData()\r\n {\r\n }", "public function data(){\n\t\t$get_data = json_decode($_GET['data']);\n\t\t//update db\n\t\tforeach($get_data as $key=>$value){\n\t\t\t$data = array(\n\t\t\t\t'slide_order'=>$key+1,\n\t\t\t);\n\t\t\t$this->slide_model->update($value->id,$data);\n\t\t}\n\t}", "public function delete_data_by_id()\n {\n $data = $this->request->getJSON();\n\n //init data\n $token = $this->getAuthHeader();\n $id = isset( $data->id ) ? $data->id : -1;\n\n $result = $this->_checkToken( $token );\n\n if ( !isset( $result ) ) {\n $dataDB['status'] = \"error\";\n $dataDB['message'] = $this->db->error()['message'];\n $dataDB['data'] = \"\";\n\n return $this->respond( $dataDB, TOKEN_NOT_FOUND );\n }\n\n $insert_data['active_flag'] = false;\n $insert_data['update_date'] = date( \"Y-m-d H:i:s\" );\n $insert_data['update_user'] = $result->user_id;\n\n //$this->prg_examiners_fra_a( $insert_data, ['id' => $id] );\n\n if ( $this->db->error()['message'] !== '' ) {\n $dataDB['status'] = \"error\";\n $dataDB['message'] = $this->db->error()['message'];\n $dataDB['data'] = \"\";\n\n return $this->respond( $dataDB, 200 );\n }\n\n $dataDB['status'] = \"success\";\n $dataDB['message'] = \"\";\n $dataDB['data'] = $data;\n\n return $this->respond( $dataDB, 200 );\n }", "function dataform_grade_item_delete($data) {\n global $CFG;\n require_once(\"$CFG->libdir/gradelib.php\");\n\n return grade_update('mod/dataform', $data->course, 'mod', 'dataform', $data->id, 0, NULL, array('deleted'=>1));\n}", "protected function cleanData(&$data){\n if(isset($data['field'])){\n $data['field'] = $this->getReference('User\\Entity\\Field', $data['field']['id']);\n }\n\t\tif(isset($data['style'])){\n $data['style'] = $this->getReference('User\\Entity\\Style', $data['style']['id']);\n }\n if(isset($data['sale'])){\n $data['sale'] = $this->getReference('User\\Entity\\Staff', $data['sale']['id']);\n }\n if(isset($data['pm'])){\n $data['pm'] = $this->getReference('User\\Entity\\Staff', $data['pm']['id']);\n }\n if(isset($data['client'])){\n $data['client'] = $this->getReference('\\User\\Entity\\User', $data['client']['id']);\n }\n if(isset($data['sourceLanguage'])){\n $data['sourceLanguage'] = $this->getReference('\\User\\Entity\\Language', $data['sourceLanguage']['id']);\n }\n if(isset($data['startDate'])){\n $data['startDate'] = new \\DateTime($data['startDate']);\n }\n\t\telse {\n\t\t\t$data['startDate'] = new \\DateTime('now');\n\t\t}\n if(isset($data['dueDate'])){\n $data['dueDate'] = new \\DateTime($data['dueDate']);\n }\n\t\telse {\n\t\t\t//$date_tmp = new \\DateTime($data['startDate']);\n\t\t\t$data['dueDate'] = $data['startDate']->add(new DateInterval('P30D'));\n\t\t}\n if(isset($data['status'])){\n $data['status'] = $data['status']['id'];\n }\n\t\tif(isset($data['currency']) && isset($data['currency']['id'])){\n $data['currency'] = $data['currency']['id'];\n }\n\t\tif(isset($data['transGraph']) && isset($data['transGraph']['id']) ){\n $data['transGraph'] = $data['transGraph']['id'];\n }\n\t\tif(isset($data['serviceLevel']) && isset($data['serviceLevel']['id'])){\n $data['serviceLevel'] = $data['serviceLevel']['id'];\n }\n\n\n if(isset($data['priority'])){\n $data['priority'] = $data['priority']['id'];\n }\n if(isset($data['serviceLevel'])) {\n $data['serviceLevel'] = $data['serviceLevel'];\n }\n if(isset($data['invoiceinfo'])) {\n \t$data['invoiceinfo'] = $data['invoiceinfo'];\n }\n if(isset($data['createType'])) {\n \t$data['createType'] = $data['createType'];\n }\n\n if(isset($data['types'])){\n $arr = [];\n foreach($data['types'] as $type){\n $arr[] = $type['id'];\n }\n $data['types'] = $arr;\n }\n\t\telse{\n\t\t\t$arr = [];\n\t\t\tif($data['createType']=='orderTranslationNonContract' || $data['createType'] == 'landingOrder')\n\t\t\t\t$arr[] = 1;\n\t\t\telse\n\t\t\t\t$arr[] = 1;\n\t\t\t$data['types'] = $arr;\n\t\t}\n }", "public function deleteData($sql, $params=[]){\n $this->create($sql,$params);\n\n }", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "function dataDelete($p_id)\n {\n $result_update = false;\n \n $sql = 'UPDATE user SET ';\n $sql .= 'isactive = 0, ';\n $sql .= 'isdeleted = 1 ';\n $sql .= 'WHERE id = ? ';\n\n $paramtype = 'i';\n \n $paramdata = array(\n 'userid' => $p_id \n ); \n\n parent::stmtPrepare($sql); \n\n parent::stmtSetParamTypeString($paramtype);\n parent::stmtSetParamData($paramdata);\n parent::stmtBindParam();\n \n parent::stmtExecute();\n $result = parent::stmtGetTotalAffectedRows();\n \n if ($result > 0)\n {\n $result_update = '1';\n }\n\n parent::stmtReset(); \n parent::stmtClose(); \n \n return $result_update; \n }", "public static function delete_product_by_id($data)\n {\n foreach($data as $key=>$val) $$key=get_magic_quotes_gpc()?$val:addslashes($val);\n $status = '3';\n $userId = Yii::$app->user->id;\n $date_updated = date('Y-m-d H:i:s');\n\n $query = new Query;\n $count = $query->select('COUNT(*) as count')->from('core_products')->where('user_id=:userId', [':userId' => $userId])->andWhere('product_id=:productid', [':productid' => $product_id])->All();\n\n if($count[0]['count'] == 1)\n {\n $result = $query->createCommand()->update('core_products', ['product_status' => $status,'updated_by' => $userId,'date_updated' => $date_updated], 'product_id = \"'.$product_id.'\"')->execute();\n if ($result == 1){\t\t\t\n return \"SUCCESS\";\n }else{\n return \"FAILED\";\n }\n }\n else{\n return \"FAILED\";\n }\n }", "function deleteData()\n{\n global $myDataGrid;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id'][] = $strValue;\n }\n print_r($arrKeys);\n die();\n $dataGaVendor = new cGaVendor();\n $dataGaVendor->deleteMultiple($arrKeys);\n $myDataGrid->message = $dataGaVendor->strMessage;\n}", "public function update($data) { \n\n\t\tif ($data['name'] != $this->name) { \n\t\t\t$this->update_name($data['name']); \n\t\t} \n\t\tif ($data['pl_type'] != $this->type) { \n\t\t\t$this->update_type($data['pl_type']); \n\t\t} \n\n\t}", "protected function _clearDataCache() {}", "protected function will_dele_to_db($data){\n\t\t//!\n\t\t$id \t\t= \t$data [\"id\"] ;\n\t\t$event \t\t= \t$this->Sarung_db_about_dele($data);\n\t\t$this->add_obj_dele_db($event);\n\t\t$saveId \t= \t$this->delete_db_admin_root( $this->get_table_name() , $id );\n\t\tif($saveId){\n\t\t\t$this->add_obj_save_db($saveId);\n\t\t}\n\t\t//!\n\t\tif( $this->will_change_to_db()){\n\t\t\treturn $this->postEventdelsucceded();\n\t\t}\n else{\n\t\t\treturn $this->postEventdelfailed();\n }\n\t}", "public function deleteMPa($data) {\n $this->db->where('id_pa',$data['id_pa']);\n $this->db->delete('m_pa',$data);\n }", "function dataDelete($nip) {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t= \"DELETE FROM mutasi\n\t\t\t\t\t\t\t WHERE nip = '$nip'\";\n\t\t\t\t\n\t\t\t\t$sql\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t$sql2\t\t= mysqli_query($koneksi,$query2);\n\t\t\t\t$sql3\t\t= mysqli_query($koneksi,$query3);\n\t\t\t\t\n\t\t\t\t// CEK SQL\n\t\t\t\tif($sql == TRUE) {\n\t\t\t\t\treturn TRUE;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t\tif($sql2 == TRUE) {\n\t\t\t\t\treturn TRUE;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t\tif($sql3 == TRUE) {\n\t\t\t\t\treturn TRUE;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}", "public function delete_data($param)\n\t{\n\t\t$query = \"DELETE FROM tb_users WHERE id = :id\";\n\t\tDB::connect()->query($query)->vars($param)->exec();\n\t}", "function delZenPubData($id, $item, $why)\n{\n $readitem = query_single_row($sql = 'SELECT id, `aux`, `data` FROM '.prefix('plugin_storage').\" WHERE `type` = 'iOS' AND `aux` = \".db_quote($id));\n $arr = $readitem['data'];\n if ($why) {\n query('DELETE FROM '.prefix('plugin_storage').\" WHERE `type` = 'iOS' AND `aux` = \".db_quote($id));\n } //$why\n else {\n unset($arr[$item]);\n query('UPDATE '.prefix('plugin_storage').' SET `data` = '.db_quote(json_encode($arr)).\", `type` = 'iOS' WHERE `aux` = \".db_quote($id).\" AND `type` = 'iOS'\");\n }\n}", "public function delete(){\n \t\ttry{\n \t\t\t$db = DB::get();\n \t\t\t$sql = \"UPDATE t_\" . self::$Table . \" \n \t\t\t\t\tSET \" . self::$Table . \"_supprime='1' \n \t\t\t\t\tWHERE \" . self::$Table . \"_id = '\".$this->Id.\"' \";\n \t\t\n \t\t\t$result = $db->query($sql);\n \t\t}\n \t\tcatch(Exception $e){\n \t\t\tvar_dump($e->getMessage());\n \t\t}\n }", "public function udpateData($getData,$keyName,$documentArray,$purchaseId)\n\t{\n\t\t//database selection\n\t\t$database = \"\";\n\t\t$constantDatabase = new ConstantClass();\n\t\t$databaseName = $constantDatabase->constantDatabase();\n\t\t//get exception message\n\t\t$exception = new ExceptionMessage();\n\t\t$exceptionArray = $exception->messageArrays();\n\t\t\n\t\t$mytime = Carbon\\Carbon::now();\n\t\t$keyValueString=\"\";\n\t\t$decodedExpenseData = array();\n\t\t$expenseKey = array_search('expense', $keyName);\n\t\tif($expenseKey >= 0 && in_array('expense', $keyName)) {\n\t\t\t$decodedExpenseData = json_decode($getData[$expenseKey]);\n\t\t\tarray_splice($keyName, $expenseKey, 1);\n\t\t\tarray_splice($getData, $expenseKey, 1);\n\t\t}\n\t\tarray_push($keyName, 'updated_at');\n\t\tarray_push($getData, $mytime);\n\t\t$keyValueString = implode('= ?, ', $keyName);\n\t\t$keyValueString .= '= ?';\n\t\tarray_push($getData, $purchaseId);\n\t\tDB::beginTransaction();\n\t\t$purchaseBillResult = $this->database->statement(\"UPDATE purchase_bill\n\t\tSET {$keyValueString} WHERE purchase_id= ? ;\", $getData);\n\t\t$deleteExpenseData = $this->database->statement(\"UPDATE purchase_expense_dtl SET deleted_at = ? WHERE purchase_id = ?;\", [$mytime, $purchaseId]);\n\t\tDB::commit();\n\n\t\t$productArrayKey = array_search('product_array', $keyName);\n\t\tif($productArrayKey >= 0 && in_array('product_array', $keyName)) {\n\t\t\t$transformer = new PurchaseInventoryTransformer();\n\t\t\t$trimInv = $transformer->trimInventory($getData[$productArrayKey], $purchaseId);\n\n\t\t\t$invModel = new PurchaseInventoryModel();\n\t\t\t$invModel->deleteData(['purchase_id' => $purchaseId]);\n\t\t\t$invStatus = $invModel->insertData($trimInv);\n\t\t\tif(strcmp($invStatus, $exceptionArray['200'])!=0) {\n\t\t\t\treturn $invStatus;\n\t\t\t}\n\t\t}\n\n\t\t$expenseCount = count($decodedExpenseData);\n\t\tif($expenseCount!=0) {\n\t\t\t$valueArray = call_user_func_array('array_merge', array_map(function($br) use($purchaseId, $mytime) {\n\t\t\t\t\t\t$ar = array($br->expenseName, $br->expenseType, $br->expenseValue, $br->expenseTax, $br->expenseOperation, $purchaseId, $br->expenseId, $mytime);\n\t\t\t\t\t\treturn $ar;\n\t\t\t\t\t}, $decodedExpenseData));\n\t\t\t$valueStr = \"(?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t\t$valueStr .= str_repeat(\", (?, ?, ?, ?, ?, ?, ?, ?)\", $expenseCount - 1);\n\t\t\tDB::beginTransaction();\n\t\t\t$insertExpenseData = $this->database->statement(\"INSERT INTO purchase_expense_dtl(\n\t\t\texpense_name,\n\t\t\texpense_type,\n\t\t\texpense_value,\n\t\t\texpense_tax,\n\t\t\texpense_operation,\n\t\t\tpurchase_id,\n\t\t\texpense_id,\n\t\t\tcreated_at)\n\t\t\tVALUES {$valueStr};\", $valueArray);\n\t\t\tDB::commit();\n\t\t}\n\t $documentCount = count($documentArray);\n\t\tif($documentCount!=0) {\n\t\t\t//document insertion\n\t\t\t$valueArray = call_user_func_array('array_merge', array_map(function($br) use($purchaseId, $mytime) {\n\t\t\t\t\t$ar = array($br['document_name'], $br['document_size'], $br['document_format'], $purchaseId, $mytime);\n\t\t\t\t\treturn $ar;\n\t\t\t\t}, $documentArray));\n\t\t\t$valueStr = \"(?, ?, ?, ?, ?)\";\n\t\t\t$valueStr .= str_repeat(\", (?, ?, ?, ?, ?)\", $documentCount - 1);\n\t\t\tDB::beginTransaction();\n\t\t\t$this->database->statement(\"INSERT INTO purchase_doc_dtl(\n\t\t\tdocument_name,\n\t\t\tdocument_size,\n\t\t\tdocument_format,\n\t\t\tpurchase_id,\n\t\t\tcreated_at)\n\t\t\tVALUES {$valueStr};\", $valueArray);\n\t\t\tDB::commit();\n\n\t\t}\n\t\tif($purchaseBillResult==1)\n\t\t{\n\t\t\treturn $exceptionArray['200'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $exceptionArray['500'];\n\t\t}\n\t}", "function delete_graphql_data()\n {\n }", "function ajaxDeleteMaster($id){ $sqlselect = \"SELECT id_data from ps.tdata where id_master = '$id'\";\n $result = $this->db->query($sqlselect)->result_array();\n\n if(count($result) > 0){\n echo 'failed';\n }else{\n //del data\n $sqldelete = \"DELETE FROM ps.tmaster WHERE id='$id';\";\n $sqldelete .= \"DELETE FROM ps.tappr WHERE id='$id';\";\n\n $this->db->query($sqldelete);\n echo 'ok';\n }\n }", "function dataDeletesk($id) {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t= \"DELETE FROM sk\n\t\t\t\t\t\t\t WHERE id= '$id'\";\n\t\t\t\t\n\t\t\t\t$sql\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\t// CEK SQL\n\t\t\t\tif($sql == TRUE) {\n\t\t\t\t\treturn TRUE;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}", "public function delTemplateData() {\r\n\t\t$this->templateData = [];\r\n\t}", "function updateData($table,$data,$id){\n\t\treturn $this->db->update($table,$data,$id);\n\t}", "public function hapus_data($npm){\r\n $where = array('npm_kd'=> $npm);\r\n $this->db->where($where);\r\n $this->db->delete($this->table_name);\r\n }", "public function deleteData($key) {\r\n\t\tif (isset($this->templateData[$key])) {\r\n\t\t\tunset($this->templateData[$key]);\r\n\t\t}\r\n\t}", "public function deleteData($id)\n {\n // TODO: Implement deleteData() method.\n }", "private function clearData($data ) {\r\r\n $remove_keys = array('asp_options_serialized');\r\r\n\r\r\n if ( is_array($data) ) {\r\r\n foreach ($remove_keys as $key) {\r\r\n if ( isset($data[$key]) )\r\r\n unset($data[$key]);\r\r\n }\r\r\n }\r\r\n\r\r\n return $data;\r\r\n }", "function delete_map ($data) {\r\n\t\t$id = (int)$data['id'];\r\n\t\t$table = $this->get_table_name();\r\n\r\n\t\t$result = $this->wpdb->query(\"DELETE FROM {$table} WHERE id={$id}\");\r\n\t\treturn $result ? $id : false;\r\n\t}", "public function updateData(array $data);", "public function delete($data){\n $this->db->delete('artist_details',array('id'=>$data));\n return true;\n \n }", "public function actionDelete()\n\t{\n\t parent::actionDelete();\n\t\t$id=$_POST['id'];\n\t\tforeach($id as $ids)\n\t\t{\n\t\t $model=$this->loadModel($ids);\n\t\t $model->recordstatus=0;\n\t\t $model->save();\n\t\t}\n\t\techo CJSON::encode(array(\n 'status'=>'success',\n 'div'=>'Data deleted'\n\t\t\t\t));\n Yii::app()->end();\n\t}", "function delete_from_stopout_list($data)\n\t{\n\t return $this->db->where('number',$data['number'])\n\t\t\t->where('fsb',$data['fsb'])\n\t\t\t->where('md',$data['md'])\n\t\t\t->where('action',$data['action'])\n\t\t\t->delete('pamm_stopout_list');\n\t}", "function deleteData($conn, $param) {\n \n if (!$conn) {\n echo \"master connection failed\\n\";\n return false;\n }\n\n $query = \"\\n DELETE \";\n $query .= \"\\n FROM \" . $param[\"table\"];\n $query .= \"\\n WHERE \" . $param[\"prk\"];\n $query .= \"\\n =\" . $this->parameterEscape($conn,\n $param[\"prkVal\"]);\n\n $resultSet = $conn->Execute($query);\n\n if ($resultSet === FALSE) {\n $errorMessage = \"데이터 삭제에 실패 하였습니다.\";\n return false;\n } else {\n return true;\n } \n }", "public function delete_data($id='') {\n\n\t\t//Get income_id of Memership Contribution Data\n $this->db->select('income_id');\n\t\t $this->db->from('monthly_contribution');\n\t\t $this->db->where('monthly_contribution_id', $id);\n\t\t $query = $this->db->get();\n\t\t $income_id = $query->row()->income_id;\n\n\t\t//Delete Memership Table Data \n\t\t$this->db->where('income_id', $income_id);\n \t$this->db->delete('income');\n\n \t$this->db->where('monthly_contribution_id', $id);\n \t$this->db->delete('monthly_contribution');\n\t}", "public function delete_data($id)\n {\n $this->builder->where('id', $id);\n $this->builder->delete();\n }", "public function update($data) {}", "public function update($data) {}", "function remove_rows($table_id, $data) {\n\t$cmsEditDel = new cmsEditDel($table_id, $data);\n\t$delete_id = $cmsEditDel->dbChange();\n\tunset($cmsEditDel);\n\t\n\tif (empty($delete_id)) return;\n\t\n\t$child = getChildTables($table_id);\n\treset($child);\n\twhile (list($table_id, $field_name) = each($child)) {\n\t\tremove_rows($table_id, array($field_name => $delete_id));\n\t}\n\t\n}", "public static function deletePurchaseCarTempData($dataModel, $table){\n\n\n\n \t\t\t$stmt = connection::connect()->prepare(\"DELETE FROM $table WHERE iduser = $dataModel\");\n\n\n\n\t \t\t\t\t if ($stmt -> execute()) {\n\n\n \t \t\t\t\t\t\treturn \"ok\";\n \t \t\n\n \t \t\t\t\t} \n \t \t\t\t\telse {\n\n \t \t\t\t\t\treturn \"error\";\n \t \t\t\t\t}\n\n \t \t\t\t\t\t$stmt->close();\n\n\n\t }", "function delete_data($sel_ids,$id_field_name,$tbl_name)\n {\n\t\tif(is_array($sel_ids)){\n\t\t\t//Multiple Device Manufacturer Delete\n\t\t\tforeach($sel_ids as $selected_id)\n\t\t\t{\n\t\t\t\t\t$this->db->where($id_field_name,$selected_id);\n \t\t\t$this->db->delete($tbl_name);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Single Device Manufacturer Delete\n\t\t\t$this->db->where($id_field_name,$sel_ids);\n \t$this->db->delete($tbl_name);\n\t\t}\n\t\tif($this->db->affected_rows()>0)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n }", "public function update_contact($data)\n {\n $add = array();\n foreach (array('nick', 'firstname', 'lastname', 'thirdname', 'title', 'company', 'comp_dep', 'comp_role'\n ,'comp_address', 'comp_address2', 'comp_street', 'comp_zip', 'comp_location', 'comp_region'\n ,'comp_country', 'comp_cellular', 'comp_www', 'comp_fax', 'address', 'address2', 'street', 'zip'\n ,'location', 'region', 'country', 'email1', 'email2', 'bday_cal_evt_id', 'tel_private', 'tel_business'\n ,'cellular', 'fax', 'www', 'birthday', 'customer_number', 'comments') as $k) {\n if (isset($data[$k])) {\n $add[] = $k . '=\"' . $this->esc($data[$k]) . '\"';\n }\n }\n if (isset($data['group'])) {\n $this->query('DELETE FROM '.$this->Tbl['adb_adr_group'].' WHERE `aid`='.intval($data['aid']).' AND uid='.$this->uid);\n foreach ($data['group'] as $gid) {\n $this->query('INSERT '.$this->Tbl['adb_adr_group'].' SET `aid`='.intval($data['aid']).', `gid`='.intval($gid).', `uid`='.intval($this->uid));\n }\n }\n foreach (array_keys($this->get_freefield_types($this->uid)) as $type) {\n if (empty($data['free'][$type])) {\n $this->query('DELETE FROM '.$this->Tbl['adb_freefield'].' WHERE `aid`='.intval($data['aid']).' AND type_id='.intval($type));\n } else {\n $this->query('REPLACE INTO '.$this->Tbl['adb_freefield'].' SET `aid`='.intval($data['aid']).', `type_id`='.intval($type).', `value`=\"'.$this->esc($data['free'][$type]).'\"');\n }\n }\n\n if (!empty($add)) {\n $where = 'aid='.intval($data['aid']).' AND owner='.intval($this->uid);\n if (isset($data['own_vcf'])) {\n list ($adrid) = $this->fetchrow($this->query('SELECT u.contactid FROM '.$this->Tbl['user'].' u,'.$this->Tbl['adb_address'].' a'\n .' WHERE u.uid='.intval($this->uid).' AND a.aid=u.contactid'));\n if (0 != $adrid) {\n $where = 'aid='.intval($adrid);\n }\n }\n $query = 'UPDATE '.$this->Tbl['adb_address'].' SET `uuid`=\"'.basics::uuid().'\"'.','.implode(',', $add).' WHERE '.$where;\n return $this->query($query);\n }\n return false;\n }", "public function update($data)\n {\n \n //get data ticket where Name ticket submissions from\n $check_name = Ticket::where('name_ticket','=',Input::get('name_ticket'))->where('id_ticket','!=',Input::get('id_ticket'))->get()->toArray();\n //check name for database if the data exists then do the command in this\n if ($check_name) {\n $return['status'] = false;\n $return['messages'] ='(ticket Must Be unique)';\n $return['data'] =[];\n }else{\n $dataSession = \\Session::get('auth');\n $ticket = Ticket::find($data['id_ticket']);\n $ticket->name_ticket =$data['name_ticket'];\n $ticket->capacity_ticket = $data['capacity_ticket'];\n $ticket->id_event =$data['id_event'];\n $ticket->date_start_ticket =date(\"Y-m-d H:i:s\",strtotime($data['date_start_ticket']));\n $ticket->date_end_ticket =date(\"Y-m-d H:i:s\",strtotime($data['date_end_ticket']));\n $ticket->created_at =date('Y-m-d H:i:s');\n $ticket->updated_at = date('Y-m-d H:i:s');\n $ticket->update();\n\n $return['status'] = true;\n $return['messages'] ='SUCCSESS';\n $return['data'] =[];\n }\n return $return;\n }", "public function updateAndProcess($data){\n if(is_array($data)){\n foreach($data as $k => $v) {\n if ( $v == \"\") {\n $data[$k] = NULL;\n }\n }\n if(!is_null($data['gridref'])) {\n $data = $this->_processFindspot($data);\n }\n }\n if(array_key_exists('csrf', $data)){\n unset($data['csrf']);\n }\n if(array_key_exists('landownername', $data)){\n unset($data['landownername']);\n }\n if(array_key_exists('parishID', $data) && !is_null($data['parishID'])){\n $parishes = new OsParishes();\n $data['parish'] = $parishes->fetchRow($parishes->select()->where('osID = ?', $data['parishID']))->label;\n }\n if(array_key_exists('countyID', $data) && !is_null($data['countyID'])){\n $counties = new OsCounties();\n $data['county'] = $counties->fetchRow($counties->select()->where('osID = ?', $data['countyID']))->label;\n }\n\n if(array_key_exists('districtID', $data) && !is_null($data['districtID'])){\n $district = new OsDistricts();\n $data['district'] = $district->fetchRow($district->select()->where('osID = ?', $data['districtID']))->label;\n }\n return $data;\n }", "function hapus_data($where,$table){\n $this->db->where($where); //menangkap array dari variabel $where yang dikirimkan dari controller hapus\n $this->db->delete($table);\n }", "function del($ar){\n $p = new XParam($ar, array());\n $oid = $p->get('oid');\n $lnkuser = selectQuery('select lnkuser from '.$this->xset->getTable().' where KOID=\\''.$oid.'\\'')->fetch(PDO::FETCH_COLUMN);\n // satus du compte \n updateQuery('update '.$this->xset->getTable().' set STATUS=\\'INACTIVE\\' where KOID=\\''.$oid.'\\'');\n // date du users\n updateQuery('update USERS set DATET=\\''.date('Y-m-d').'\\' where KOID=\\''.$lnkuser.'\\'');\n }", "public function actionDelete()\n\t{\n\t parent::actionDelete();\n\t $id=$_POST['id'];\n\t foreach($id as $ids)\n\t {\n\t\t$model=$this->loadModel($ids);\n\t\t$model->recordstatus=0;\n\t\t$model->save();\n\t }\n\t echo CJSON::encode(array(\n\t\t\t 'status'=>'success',\n\t\t\t 'div'=>'Data deleted'\n\t\t\t ));\n\t Yii::app()->end();\n\t}", "public function deleteRow($postArray,$editId,$tableName)\n{\n $retString='';\n \n $retString=$this->deletePreProcessing($postArray,$editId);\n \n $sql=\"delete from $tableName where id=$editId\";\n \n $ret=$this->updateTableData($sql,false);\n \n}", "public function delete_post() {\n $data = $this->input->post();\n if($data['id'] == null) {\n $this->set_response(array('response_code'=>400, 'response_message'=>'Parameter missing', 'response_data'=>array()), REST_Controller::HTTP_OK);\n return;\n }\n $result = $this->Api_model->deleteData('info', array('id'=>$data['id']));\n if($result == 1) {\n $this->set_response(array('response_code'=>200,'response_message'=>'Success','response_data'=>$result), REST_Controller::HTTP_OK); \n return; \n }\n $this->set_response(array('response_code'=>400,'response_message'=>'Error occurs while process','response_data'=>array()), REST_Controller::HTTP_OK);\n return;\n }", "function hapusData($table,$where){\n\t\treturn $this->db->delete($table,$where);\n\t}", "public function flushData()\n\t{\n\t\t$class = get_class($this);\n\t\tunset($this->_data[$class]);\n\t}" ]
[ "0.72670215", "0.72336596", "0.7204665", "0.6931695", "0.68463385", "0.68048996", "0.6800154", "0.6780634", "0.67650974", "0.67378074", "0.6684948", "0.6660646", "0.66358405", "0.6611469", "0.65873945", "0.65822893", "0.65442866", "0.6527694", "0.6524066", "0.652321", "0.65027225", "0.6485483", "0.64852256", "0.64792407", "0.64792407", "0.64373374", "0.64062005", "0.63999593", "0.6383354", "0.63415337", "0.63259673", "0.6322786", "0.6322408", "0.6319978", "0.63192296", "0.62983084", "0.629312", "0.6291992", "0.62879044", "0.6284441", "0.62518173", "0.62481457", "0.6244177", "0.6225304", "0.62112135", "0.6210058", "0.6206887", "0.62037146", "0.61995596", "0.6193122", "0.6163905", "0.61574095", "0.6156883", "0.61506045", "0.61353797", "0.6131665", "0.6125065", "0.61175925", "0.6113348", "0.61128646", "0.6097747", "0.60957927", "0.6092704", "0.6090325", "0.60903144", "0.60875875", "0.60837704", "0.6080114", "0.60794", "0.607923", "0.6077838", "0.6073129", "0.6072658", "0.60711336", "0.6060546", "0.6051428", "0.6045231", "0.6034474", "0.60304797", "0.60288453", "0.6023292", "0.6021911", "0.60084015", "0.600497", "0.6004443", "0.6000936", "0.5998549", "0.5998549", "0.59964186", "0.5995126", "0.5991545", "0.5990269", "0.5985501", "0.59798515", "0.5977588", "0.5975934", "0.5975318", "0.5975131", "0.5974387", "0.5972372", "0.59678715" ]
0.0
-1
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema): void { $this->addSql('CREATE TABLE bartender (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, username VARCHAR(255) NOT NULL, date_of_birth DATE NOT NULL, is_verified TINYINT(1) NOT NULL, phone VARCHAR(255) NOT NULL, schedule LONGTEXT NOT NULL COMMENT \'(DC2Type:array)\', UNIQUE INDEX UNIQ_ED077FE7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('CREATE TABLE cocktail (id INT NOT NULL, name VARCHAR(255) NOT NULL, image VARCHAR(255) NOT NULL, category VARCHAR(255) NOT NULL, glass VARCHAR(255) NOT NULL, ingredients_and_measurements LONGTEXT NOT NULL COMMENT \'(DC2Type:array)\', instructions VARCHAR(255) NOT NULL, is_alcoholic TINYINT(1) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('CREATE TABLE ingredient (id INT NOT NULL, name VARCHAR(255) NOT NULL, description LONGTEXT NOT NULL, is_alcoholic TINYINT(1) NOT NULL, type VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('CREATE TABLE `order` (id INT AUTO_INCREMENT NOT NULL, customer_id INT NOT NULL, date_purshased DATETIME DEFAULT NULL, INDEX IDX_F52993989395C3F3 (customer_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('CREATE TABLE order_line (id INT AUTO_INCREMENT NOT NULL, product_id INT NOT NULL, purchase_order_id INT NOT NULL, quantity INT NOT NULL, price DOUBLE PRECISION NOT NULL, INDEX IDX_9CE58EE14584665A (product_id), INDEX IDX_9CE58EE1A45D7E6A (purchase_order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('CREATE TABLE product (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, price DOUBLE PRECISION NOT NULL, quantity DOUBLE PRECISION NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('CREATE TABLE shopping_cart (id INT AUTO_INCREMENT NOT NULL, customer_id INT NOT NULL, name VARCHAR(255) DEFAULT NULL, INDEX IDX_72AAD4F69395C3F3 (customer_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('CREATE TABLE shopping_line (id INT AUTO_INCREMENT NOT NULL, product_id INT NOT NULL, shopping_cart_id INT NOT NULL, quantity INT NOT NULL, INDEX IDX_A81DE8B74584665A (product_id), INDEX IDX_A81DE8B745F80CD (shopping_cart_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, username VARCHAR(255) NOT NULL, date_of_birth DATE NOT NULL, is_verified TINYINT(1) NOT NULL, phone VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('ALTER TABLE `order` ADD CONSTRAINT FK_F52993989395C3F3 FOREIGN KEY (customer_id) REFERENCES user (id)'); $this->addSql('ALTER TABLE order_line ADD CONSTRAINT FK_9CE58EE14584665A FOREIGN KEY (product_id) REFERENCES product (id)'); $this->addSql('ALTER TABLE order_line ADD CONSTRAINT FK_9CE58EE1A45D7E6A FOREIGN KEY (purchase_order_id) REFERENCES `order` (id)'); $this->addSql('ALTER TABLE shopping_cart ADD CONSTRAINT FK_72AAD4F69395C3F3 FOREIGN KEY (customer_id) REFERENCES user (id)'); $this->addSql('ALTER TABLE shopping_line ADD CONSTRAINT FK_A81DE8B74584665A FOREIGN KEY (product_id) REFERENCES product (id)'); $this->addSql('ALTER TABLE shopping_line ADD CONSTRAINT FK_A81DE8B745F80CD FOREIGN KEY (shopping_cart_id) REFERENCES shopping_cart (id)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }", "public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }", "public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }", "public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}", "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n }", "public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }", "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }", "public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}", "public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }", "public function preUp()\n {\n }", "public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }", "public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}", "public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }", "public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\n }", "public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }", "public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }", "public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }", "public function up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\n }", "public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}", "public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }", "public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }", "public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }", "public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}", "public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\n }", "public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}", "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }", "public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }", "public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }", "public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }", "public function up() { return $this->run('up'); }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}", "public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }", "public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}", "public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }", "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }", "public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }", "public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\n }", "public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}", "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }", "public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}", "public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}", "public function up()\n {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }", "public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}", "public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }", "public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}", "public function up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }", "public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}", "public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }", "public function up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }", "public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }", "public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}", "public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}", "public function up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}", "public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n// $import->import();\n\t}", "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}", "public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}", "public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\n }", "public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }", "public function up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = '[email protected]';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = '[email protected]';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\n\t}", "public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}", "public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}", "public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }", "public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }", "public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}", "public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }", "public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }", "public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }", "public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }", "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}", "public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t)\n\t\t));\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}", "public function up()\n {\n $this->createTable('usuario_refeicao', [\n 'id' => $this->primaryKey(),\n 'usuario_id' => $this->integer(),\n 'refeicao_id' => $this->integer(),\n 'alimento_id' => $this->integer(),\n 'data_consumo' => $this->date(),\n 'horario_consumo' => $this->time(),\n 'quantidade' => $this->double(5,2),\n 'created_at' => $this->integer(),\n 'updated_at' => $this->integer() \n ]);\n\n $this->addForeignKey('fk_usuariorefeicao_usuario_id', 'usuario_refeicao', 'usuario_id', \n 'user', 'id', 'CASCADE');\n $this->addForeignKey('fk_usuariorefeicao_refeicao_id', 'usuario_refeicao', 'refeicao_id', \n 'refeicoes', 'id', 'CASCADE');\n $this->addForeignKey('fk_usuariorefeicao_alimento_id', 'usuario_refeicao', \n 'alimento_id', 'alimentos', 'id', 'CASCADE');\n }" ]
[ "0.80068773", "0.7915595", "0.7915595", "0.7915595", "0.7571971", "0.75615484", "0.75282776", "0.7498739", "0.7494303", "0.7453733", "0.7446836", "0.7435016", "0.7432123", "0.7427742", "0.7418007", "0.7378834", "0.73757184", "0.7369987", "0.7364234", "0.7352615", "0.732967", "0.73136055", "0.7299604", "0.7295545", "0.7292987", "0.7292416", "0.7291898", "0.72860086", "0.7284734", "0.7273223", "0.72728753", "0.7266176", "0.72633994", "0.7262504", "0.72571415", "0.72518384", "0.7249723", "0.7244173", "0.7240708", "0.72382", "0.72190964", "0.72189", "0.72058564", "0.72037363", "0.7196729", "0.7191739", "0.7190531", "0.7176635", "0.71766096", "0.7167661", "0.71653104", "0.71653104", "0.71605664", "0.7147417", "0.7136502", "0.7131473", "0.712576", "0.71240544", "0.711841", "0.7106414", "0.7106414", "0.7105947", "0.70970017", "0.70939535", "0.7089394", "0.70869356", "0.708664", "0.7084568", "0.7083811", "0.7079555", "0.70702344", "0.70692396", "0.7066957", "0.7062674", "0.705991", "0.70589", "0.70568794", "0.70557487", "0.70552576", "0.705073", "0.7048241", "0.70481586", "0.70464605", "0.7045363", "0.70436513", "0.70395166", "0.7038981", "0.70370364", "0.703443", "0.70328623", "0.7031858", "0.7027016", "0.70146424", "0.7010867", "0.7007659", "0.6990892", "0.69860256", "0.6963466", "0.6961467", "0.69593376", "0.69582504" ]
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema): void { $this->addSql('ALTER TABLE order_line DROP FOREIGN KEY FK_9CE58EE1A45D7E6A'); $this->addSql('ALTER TABLE order_line DROP FOREIGN KEY FK_9CE58EE14584665A'); $this->addSql('ALTER TABLE shopping_line DROP FOREIGN KEY FK_A81DE8B74584665A'); $this->addSql('ALTER TABLE shopping_line DROP FOREIGN KEY FK_A81DE8B745F80CD'); $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F52993989395C3F3'); $this->addSql('ALTER TABLE shopping_cart DROP FOREIGN KEY FK_72AAD4F69395C3F3'); $this->addSql('DROP TABLE bartender'); $this->addSql('DROP TABLE cocktail'); $this->addSql('DROP TABLE ingredient'); $this->addSql('DROP TABLE `order`'); $this->addSql('DROP TABLE order_line'); $this->addSql('DROP TABLE product'); $this->addSql('DROP TABLE shopping_cart'); $this->addSql('DROP TABLE shopping_line'); $this->addSql('DROP TABLE user'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo','fecha','date');\n\t}", "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "public function down()\n {\n $this->dbforge->drop_column('user', 'created_at');\n }", "public function down()\n {\n $this->dropForeignKey(\n 'fk-video-blog_id',\n 'video'\n );\n\n\n echo \"m160820_150846_video_create reverted.\\n\";\n\n }", "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "public function down(){\n $this->dropTable('users');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` INTEGER NOT NULL AFTER `quality_tweet`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n {\n Schema::table('attachments', function(Blueprint $table) {\n\n $table->dropColumn('viewable_id');\n $table->dropColumn('viewable_type');\n\n\n });\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nDROP TABLE IF EXISTS `movimiento`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n\n//\t\t// Dropping a Column From a Table\n\t\t$this->dbforge->drop_column('categories', 'icon');\n\t}", "public function down()\n\t{\n\t\t// nothing to do here.\n\t}", "public function down(){\r\n $this->dbforge->drop_table('users'); //eliminacion de la tabla users\r\n }", "public function down()\n\t{\n\t\tSchema::drop('student');\n\t\t//\n\t}", "public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}", "public function down() \n {\n \n }", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('education');\n\t}", "public function down()\n\t{\n\t\tSchema::drop('l_wardrobe_table');\n\t}", "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "public function down()\n {\n\tSchema::drop('quizzes');\n }", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }", "public function down ()\n {\n }", "abstract public function down();", "abstract public function down();", "abstract public function down();", "public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function down()\r\n {\r\n $this->dbforge->drop_table('users');\r\n }", "public function down() {\n\n\t}", "public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }", "public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE galaxiee (id INT AUTO_INCREMENT NOT NULL, idu_id INT NOT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_8576D2AF376A6230 (idu_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE trou_noir (id INT AUTO_INCREMENT NOT NULL, id_g_id INT DEFAULT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_AB27242D95951086 (id_g_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE galaxiee ADD CONSTRAINT FK_8576D2AF376A6230 FOREIGN KEY (idu_id) REFERENCES univers (id)');\n $this->addSql('ALTER TABLE trou_noir ADD CONSTRAINT FK_AB27242D95951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('DROP TABLE trounoir');\n $this->addSql('ALTER TABLE galaxie DROP FOREIGN KEY FK_1C880711376A6230');\n $this->addSql('DROP INDEX IDX_1C880711376A6230 ON galaxie');\n $this->addSql('ALTER TABLE galaxie CHANGE idu_id id_u_id INT NOT NULL');\n $this->addSql('ALTER TABLE galaxie ADD CONSTRAINT FK_1C8807116F858F92 FOREIGN KEY (id_u_id) REFERENCES univers (id)');\n $this->addSql('CREATE INDEX IDX_1C8807116F858F92 ON galaxie (id_u_id)');\n $this->addSql('ALTER TABLE planete DROP FOREIGN KEY FK_490E3E5712013DEC');\n $this->addSql('DROP INDEX IDX_490E3E5712013DEC ON planete');\n $this->addSql('ALTER TABLE planete ADD id_s_id INT NOT NULL, ADD nb_sattelite INT NOT NULL, DROP ids_id, DROP nb_satelite');\n $this->addSql('ALTER TABLE planete ADD CONSTRAINT FK_490E3E574AEED04E FOREIGN KEY (id_s_id) REFERENCES systeme (id)');\n $this->addSql('CREATE INDEX IDX_490E3E574AEED04E ON planete (id_s_id)');\n $this->addSql('ALTER TABLE systeme DROP FOREIGN KEY FK_95796DE3CD7AFD24');\n $this->addSql('DROP INDEX IDX_95796DE3CD7AFD24 ON systeme');\n $this->addSql('ALTER TABLE systeme CHANGE idg_id id_g_id INT NOT NULL');\n $this->addSql('ALTER TABLE systeme ADD CONSTRAINT FK_95796DE395951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('CREATE INDEX IDX_95796DE395951086 ON systeme (id_g_id)');\n }", "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }", "public function down(): void\n {\n // Remove your data\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_orders');\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function down()\n {\n\tSchema::drop('activities');\n }", "public function down(){\n $this->dbforge->drop_table('subcategories_news'); //eliminacion de la tabla subcategories_news\n }", "public function down()\n {\n //return false;\n\t\t\n\t\t$TABLE_NAME = 'Haber';\n $this->dropTable($TABLE_NAME);\n\t\t\n\t\t$TABLE_NAME = 'HaberKategori';\n $this->dropTable($TABLE_NAME);\n }", "public function down()\n {\n }", "public function down()\n {\n }", "public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}", "public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_inicio` `fecha_inicio` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_fin` `fecha_fin` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `descuento` `descuento` DECIMAL;\r\n\r\nALTER TABLE `promocion`\r\n ADD `descripcion` VARCHAR(70) AFTER `id`,\r\n ADD `estado` VARCHAR(11) AFTER `fecha_fin`,\r\n ADD `promocion_global` TINYINT(1) NOT NULL AFTER `descuento`;\r\n\r\nALTER TABLE `promocion` DROP `activo`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n\t\t//return false;\n\t}", "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}", "public function change()\n {\n $this->schema->table('recurring_expenses',function($table){\n $table->date('end_repeat')->nullable();\n $table->boolean('ended')->default(false);\n $table->enum('repeat',['0','1','7','14','30','365'])->nullable();\n });\n\n $this->schema->table('expenses',function($table){\n $table->dropColumn('end_repeat');\n $table->dropColumn('repeat');\n $table->integer('parent_id')->nullable();\n $table->foreign('parent_id')->references('id')->on('expenses')->onDelete('cascade');\n });\n }", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->dropForeign('users_id_turma_foreign');\n });\n\n Schema::table('contato', function (Blueprint $table) {\n $table->dropForeign('contato_id_usuario_foreign');\n });\n\n Schema::table('monitores', function (Blueprint $table) {\n $table->dropForeign('monitores_id_turma_foreign');\n $table->dropForeign('monitores_id_usuario_foreign');\n });\n\n Schema::table('galeria_portifolio', function (Blueprint $table) {\n $table->dropForeign('galeria_portifolio_id_portifolio_foreign');\n });\n\n Schema::table('portifolio_alunos', function (Blueprint $table) {\n $table->dropForeign('portifolio_alunos_id_portifolio_foreign');\n $table->dropForeign('portifolio_alunos_id_usuario_foreign');\n });\n\n Schema::table('cobranca', function (Blueprint $table) {\n $table->dropForeign('cobranca_id_aluno_foreign');\n });\n\n Schema::table('lista_de_presenca', function (Blueprint $table) {\n $table->dropForeign('lista_de_presenca_id_usuario_foreign');\n });\n\n Schema::table('forum_da_turma', function (Blueprint $table) {\n $table->dropForeign('forum_da_turma_id_usuario_foreign');\n });\n\n Schema::table('posts_do_site', function (Blueprint $table) {\n $table->dropForeign('posts_do_site_id_usuario_foreign');\n });\n\n Schema::table('posts_do_forum', function (Blueprint $table) {\n $table->dropForeign('posts_do_forum_id_topico_foreign');\n $table->dropForeign('posts_do_forum_id_usuario_foreign');\n });\n }", "public function down()\n\t{\n\t\t$this->dropForeignKey('FK_task_creator','tbl_task');\n\n\t\t$this->dropTable('tbl_task');\n\t}", "public function down(){\n\t\tSchema::dropIfExists('cargo');\n\t}", "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }", "public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}", "protected abstract function do_down();", "public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop('activities_types');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE encherir_acheteur (encherir_id INT NOT NULL, acheteur_id INT NOT NULL, INDEX IDX_41ABAAFBB0BA17BB (encherir_id), INDEX IDX_41ABAAFB96A7BB5F (acheteur_id), PRIMARY KEY(encherir_id, acheteur_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE encherir_lot (encherir_id INT NOT NULL, lot_id INT NOT NULL, INDEX IDX_3C56919BB0BA17BB (encherir_id), INDEX IDX_3C56919BA8CBA5F7 (lot_id), PRIMARY KEY(encherir_id, lot_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFB96A7BB5F FOREIGN KEY (acheteur_id) REFERENCES acheteur (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFBB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EB576A8');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EFC101A');\n $this->addSql('DROP INDEX IDX_503B7C878EB576A8 ON encherir');\n $this->addSql('DROP INDEX IDX_503B7C878EFC101A ON encherir');\n $this->addSql('ALTER TABLE encherir DROP id_acheteur_id, DROP id_lot_id');\n }", "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user_login`;\n\nALTER TABLE `user` DROP `user_mname`;\n\nALTER TABLE `user` DROP `user_user`;\n\nALTER TABLE `user` DROP `user_password`;\n\nALTER TABLE `user` DROP `user_date_lastlogin`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n\t{\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('role');\n\t\t});\n\t}", "public function safeDown()\n {\n $this->down();\n }", "public function safeDown()\n {\n $this->down();\n }", "public function down()\n\t{\n\t\tSchema::drop('refs');\n\t}", "public function down () {\n\t\treturn $this->rename_column ('headline', 'title', 'string', array ('limit' => 72));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}", "public function safeDown()\r\n {\r\n $this->down();\r\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n<<<<<<< HEAD\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n $this->addSql('ALTER TABLE liste_affaire_affaire DROP FOREIGN KEY FK_CA81ADF3F082E755');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152EBF396750');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E65450D2529');\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E6584CF0CF');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2FF631228');\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCE2687AC3');\n $this->addSql('ALTER TABLE sejour DROP FOREIGN KEY FK_96F52028E2687AC3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152E46135043');\n $this->addSql('DROP TABLE affaire');\n<<<<<<< HEAD\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE responsable_legal');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('DROP TABLE enfant');\n $this->addSql('DROP TABLE enfant_sejour');\n $this->addSql('DROP TABLE sejour');\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE etablissement');\n $this->addSql('DROP TABLE liste_affaire');\n $this->addSql('DROP TABLE responsable_legal');\n $this->addSql('DROP TABLE user');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user`;\n\nDROP TABLE IF EXISTS `question`;\n\nDROP TABLE IF EXISTS `answer`;\n\nDROP TABLE IF EXISTS `image`;\n\nDROP TABLE IF EXISTS `vote`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function down() {\n\t}", "public function down() {\n\t}", "public function down() {\n\t}", "public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }", "public function down()\n {\n Schema::dropIfExists('reunion');\n }", "public function down(): void\n {\n $this->table('services')\n ->dropForeignKey(\n ['currency_id','billing_period_id']\n )->save();\n $this->execute('DELETE FROM currencies');\n $this->execute('DELETE FROM billing_periods');\n $this->table('services')->drop()->save();\n $this->table('currencies')->drop()->save();\n $this->table('billing_periods')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('article_category');\n\t}", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->renameColumn('first_name', 'name');\n $table->dropIndex('users_first_name_index');\n $table->dropIndex('users_created_at_index');\n $table->dropIndex('users_updated_at_index');\n $table->dropColumn(\"last_name\");\n $table->dropColumn(\"username\");\n $table->dropColumn(\"provider\");\n $table->dropColumn(\"provider_id\");\n $table->dropColumn(\"api_token\");\n $table->dropColumn(\"code\");\n $table->dropColumn(\"remember_token\");\n $table->dropColumn(\"role_id\");\n $table->dropColumn(\"last_login\");\n $table->dropColumn(\"status\");\n $table->dropColumn(\"root\");\n $table->dropColumn('backend');\n $table->dropColumn(\"photo_id\");\n $table->dropColumn(\"lang\");\n $table->dropColumn(\"color\");\n $table->dropColumn(\"about\");\n $table->dropColumn(\"facebook\");\n $table->dropColumn(\"twitter\");\n $table->dropColumn(\"linked_in\");\n $table->dropColumn(\"google_plus\");\n });\n }", "public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}", "public function down()\n\t{\n\t\tSchema::table('precios_aterrizajes_despegues', function(Blueprint $table)\n\t\t{\n\t\t\t//\n\t\t});\n\t}", "public function down()\n{\nSchema::drop('statustype');\nSchema::drop('area');\nSchema::drop('region');\nSchema::drop('territory');\nSchema::drop('trackedevent');\nSchema::drop('zip_territory');\nSchema::drop('messagetype');\nSchema::drop('optintype');\nSchema::drop('representative');\nSchema::drop('pediatrician');\nSchema::drop('application_messagestatus');\nSchema::drop('application_optin');\nSchema::drop('application_trackedevent');\nSchema::drop('application');\n}", "public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_350001418F5EA509');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8B8F5EA509');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA148F5EA509');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0E8F5EA509');\n $this->addSql('ALTER TABLE cours DROP FOREIGN KEY FK_FDCA8C9CF46CD258');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8BF46CD258');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14F46CD258');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7F46CD258');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9A21BD112');\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_35000141A21BD112');\n $this->addSql('ALTER TABLE contacte DROP FOREIGN KEY FK_C794A022A21BD112');\n $this->addSql('ALTER TABLE demande DROP FOREIGN KEY FK_2694D7A5A21BD112');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14A6CC7B2');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7A21BD112');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EE455FCC0');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EBDDFA3C9');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EDC304035');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9E3797A94');\n $this->addSql('ALTER TABLE personne DROP FOREIGN KEY FK_FCEC9EFA76ED395');\n $this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');\n $this->addSql('DROP TABLE absence');\n $this->addSql('DROP TABLE classe');\n $this->addSql('DROP TABLE classe_personne');\n $this->addSql('DROP TABLE contacte');\n $this->addSql('DROP TABLE cours');\n $this->addSql('DROP TABLE demande');\n $this->addSql('DROP TABLE matiere');\n $this->addSql('DROP TABLE matiere_classe');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE note');\n $this->addSql('DROP TABLE personne');\n $this->addSql('DROP TABLE personne_matiere');\n $this->addSql('DROP TABLE reset_password_request');\n $this->addSql('DROP TABLE salle');\n $this->addSql('DROP TABLE seance');\n $this->addSql('DROP TABLE user');\n }", "protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDEA76ED395');\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE19FCD424');\n $this->addSql('DROP TABLE booking');\n $this->addSql('DROP TABLE product_image');\n $this->addSql('DROP TABLE family_page_container');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE time_line');\n $this->addSql('ALTER TABLE family DROP FOREIGN KEY FK_A5E6215B727ACA70');\n $this->addSql('DROP INDEX IDX_A5E6215B727ACA70 ON family');\n $this->addSql('ALTER TABLE family ADD page_content_id INT NOT NULL, DROP parent_id, DROP has_uniques_prices, DROP has_seasonal_products');\n $this->addSql('ALTER TABLE family ADD CONSTRAINT FK_A5E6215B8F409273 FOREIGN KEY (page_content_id) REFERENCES page_content (id)');\n $this->addSql('CREATE INDEX IDX_A5E6215B8F409273 ON family (page_content_id)');\n $this->addSql('ALTER TABLE link ADD page_container_id INT DEFAULT NULL, DROP url');\n $this->addSql('ALTER TABLE link ADD CONSTRAINT FK_36AC99F123D5B0C FOREIGN KEY (page_container_id) REFERENCES page_container (id)');\n $this->addSql('CREATE INDEX IDX_36AC99F123D5B0C ON link (page_container_id)');\n $this->addSql('ALTER TABLE product DROP content, DROP order_by, DROP is_generic, DROP type, CHANGE title label VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');\n $this->addSql('ALTER TABLE unit DROP duration');\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F5B7AF75');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95C8486F9AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6498486F9AC');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660D629F605');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660E308AC6F');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46CFFE9AD6');\n $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADEE45BDBF');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95CEE45BDBF');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649EE45BDBF');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F464584665A');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C544584665A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649D60322AC');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46DCD6110');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F462ADD6D8C');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C5459027487');\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398A76ED395');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE format');\n $this->addSql('DROP TABLE material');\n $this->addSql('DROP TABLE `order`');\n $this->addSql('DROP TABLE order_detail');\n $this->addSql('DROP TABLE picture');\n $this->addSql('DROP TABLE product');\n $this->addSql('DROP TABLE product_theme');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE stock');\n $this->addSql('DROP TABLE suppliers');\n $this->addSql('DROP TABLE theme');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n {\n Schema::dropIfExists('data');\n }", "public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}" ]
[ "0.7951184", "0.7864657", "0.76075596", "0.7493609", "0.73215324", "0.72470677", "0.7188598", "0.7154839", "0.71546495", "0.71422315", "0.71353", "0.71218085", "0.71173203", "0.71046764", "0.7099773", "0.70818996", "0.7079426", "0.7073998", "0.7068778", "0.7066695", "0.70547694", "0.70547694", "0.70439786", "0.70439786", "0.70439786", "0.70423234", "0.70409954", "0.7030343", "0.7026932", "0.7021346", "0.6989016", "0.69878364", "0.6978739", "0.69721466", "0.69436884", "0.69436884", "0.69436884", "0.6942995", "0.6942004", "0.69406503", "0.69363534", "0.69347775", "0.6927739", "0.6927079", "0.6925623", "0.69149506", "0.6903086", "0.6898792", "0.68985146", "0.68982047", "0.68982047", "0.6888069", "0.6882355", "0.6873591", "0.687095", "0.6863641", "0.6859235", "0.6853017", "0.68446124", "0.6843724", "0.68374175", "0.68372816", "0.68362087", "0.68307537", "0.6829592", "0.68294936", "0.68262637", "0.682454", "0.68195444", "0.681016", "0.6809584", "0.68061644", "0.68061644", "0.67904675", "0.67769945", "0.67755246", "0.6765642", "0.67586327", "0.675821", "0.6755997", "0.6755997", "0.6755997", "0.67546046", "0.67546046", "0.67546046", "0.67537266", "0.67534465", "0.67468244", "0.67449266", "0.67395484", "0.6735328", "0.6734552", "0.67321235", "0.67319655", "0.6727818", "0.6726632", "0.67264885", "0.67251194", "0.67170775", "0.67142904", "0.6713408" ]
0.0
-1
Finds user by [[email]]
public function getUser() { if ($this->_user === false) { $model = User::findIdentityByEmail($this->email); if ($model and ($model->role == User::ROLE_USER or $model->role == User::ROLE_ADMINISTRATOR)) { $this->_user = $model; } } return $this->_user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findUserByEmail($email);", "public function findUserByEmail($email);", "public function findUserByEmail($email);", "function get_user_by_email($email)\n {\n }", "public function getUserByEmail($email);", "public function fetchUserByEmail($email);", "public static function findUserbyEmail($email)\r\n {\r\n\t\t $tableName = preg_replace('/.*\\\\\\\\/', '', get_called_class());\r\n\t\t $sql = 'SELECT * FROM ' . $tableName . ' WHERE email = ?';\r\n \r\n //grab the only record for find one and return as an object\r\n $recordsSet = self::getResults($sql, self::$modelName, $email);\r\n \r\n if (is_null($recordsSet)) {\r\n return FALSE;\r\n } else {\r\n return $recordsSet[0];\r\n }\r\n }", "public function getUser($email);", "public function findUserByEmail($email)\n {\n return $this->findOneBy(array('email' => $email));\n }", "public function searchUserByMail($email)\n {\n $reqmail = $this->db->prepare(\"SELECT * FROM users WHERE email = ?\");\n $reqmail->execute(array($email));\n $user = $reqmail->fetchAll(PDO::FETCH_CLASS, User::class);\n\n return $user[0];\n }", "public function findUser($email = null)\n {\n if(!$email){\n\n throw new Exception(__METHOD__ .\": Parameter {$email} should have email address.\");\n }\n\n $param = ['email' => esc($email), 'table' => 'Users'];\n\n $this->query->get($param['table'], \"email ='{$param['email']}'\");\n\n return $this->query->first();\n }", "public function findByEmail($email);", "public function findByEmail($email);", "public function findByEmail($email);", "public function findByEmail($email);", "private function getUserByEmail($email) {\n\n\t\t$query = array('email' => $email);\n\t\ttry {\n\t\t\t$found = $this->collection->findOne($query, array('_id', 'password', 'logintokens'));\n\t\t} catch (Exception $e) {\n\t\t\tdumper($e->getMessage());\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn $found;\n\t}", "public function findUserByEmail($email)\n {\n return $this->userRepo->where(['email_company' => $email])->first();\n }", "public function getUserByEmail($email) {\n //create user query by email\n $user_query_by_email = Doctrine_Query::create()\n ->select('sgu.id')\n ->from('sfGuardUser sgu')\n ->where('sgu.email_address =?', $email);\n return $user_query_by_email->fetchOne();\n }", "public function findUserByEmail($email)\n {\n return $this->user->email($email)->fist();\n }", "public function findUserByEmail($email) {\n /** @var User $user */\n $user = $this->findOneBy([\"email\" => $email]);\n return $user;\n }", "public function getUserByEmail($email){\n \n if (filter_var($email, FILTER_VALIDATE_EMAIL)){\n \n $sql = new Sql();\n $res = $sql->select('SELECT * FROM usuarios \n WHERE email_usuario = :email_usuario',array(\n ':email_usuario'=>$email));\n \n if($res==false || count($res)==0){\n return 0;//caso NADA ENCONTRADO\n }else{\n return $res[0];//retorna array associativo com dados do usuario\n }\n\n }else{\n return false;//RETORNA FALSO (EMAIL INVÁLIDO)\n }\n \n }", "public static function findUser($email)\n {\n $db = DB::getConnection();\n $query = ('SELECT * FROM `users` WHERE `username` = \"'.$email.'\" LIMIT 1');\n $res = $db->query($query);\n if ($db->affected_rows === 0){\n return false;\n }\n return $res->fetch_assoc();\n\n }", "public function find_user_with_email($email)\n {\n $result = array(\n \"status\" => \"\",\n \"body\" => array(),\n \"error\" => array()\n );\n $stmt = $this->db->prepare(\"SELECT * FROM users WHERE email LIKE ?\");\n if (!($stmt))\n {\n trigger_error(\"Prepare failed: (\" . $this->db->errno . \") \" . $this->db->error,\n E_USER_ERROR);\n }\n if (!$stmt->bind_param('s', $email)){\n trigger_error(\"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error,\n E_ERROR);\n }\n if (!$stmt->execute()) {\n trigger_error(\"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error,\n E_CORE_ERROR);\n $result['status'] = \"No user with that email exists\";\n $result[\"error\"] = $stmt->error;\n }\n $res = $stmt->get_result();\n $row = $res->fetch_assoc();\n if ($row[\"id\"] != null){\n $result[\"status\"] = \"Query successful\";\n $result[\"body\"] = array(\n \"user\" => array(\n \"id\" => $row[\"id\"],\n \"url\" => $row[\"url\"],\n \"username\" => $row[\"username\"],\n \"email\" => $row[\"email\"],\n \"first_name\" => $row[\"firstName\"],\n \"last_name\" => $row[\"lastName\"],\n \"full_name\" => $row[\"fullName\"],\n \"bio\" => $row[\"bio\"],\n \"is_admin\" => $row[\"isAdmin\"],\n \"password\" => $row[\"password\"],\n \"created\" => $row[\"created\"],\n \"last_updated\" => $row[\"lastUpdated\"]\n )\n );\n return $result;\n } else {\n $result['status'] = \"No user with that email exists\";\n }\n return $result;\n }", "public function findUserByEmail($email) {\r\n // rufe die Funktion query('SQL Statement') in der Klasse Database auf\r\n $this->db->query('SELECT * FROM users WHERE email = :email');\r\n $this->db->bind(':email', $email);\r\n \r\n //es sollte nur eine uebereinstiende Mail geben, also single() methode nuzzen\r\n $row = $this->db->singleResult();\r\n\r\n // Check row, if > 0 an email is found\r\n if($this->db->numRows() > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public function findUserByEmail($email){\n // Query the database with a named variable.\n $this->db->query('SELECT * FROM users WHERE email = :email');\n\n // Bind a value to that variable, based on the input to this function.\n $this->db->bind(':email', $email);\n\n // Run a query for a single row.\n $row = $this->db->single();\n\n if($this->db->rowCount() > 0){\n return true;\n } else {\n return false;\n }\n\n }", "public function findUserByEmail($email){\n $this->db->query('SELECT * FROM users WHERE us_email = :email');\n // Bind values\n $this->db->bind(':email', $email);\n $row = $this->db->single();\n // Check row returned\n if($this->db->rowCount() > 0) {\n return $row;\n } else {\n return false;\n }\n }", "public function getByEmail(string $email): User;", "function get_user_by_email($email) {\n // read db and put into variable\n $read_json = file_get_contents(__DIR__ . '/data_users.json');\n $data = json_decode($read_json, JSON_OBJECT_AS_ARRAY);\n\n // iterate over db, if email is found, return user\n foreach ($data as $user){\n if ($user[\"email\"] == $email){\n return $user;\n }\n }\n return false;\n}", "public function findUserByEmail($email)\n {\n return User::where('email', $email)->first();\n }", "public function searchUserByEmail($email)\n {\n\n $pdo = DB::connect();\n $stmt = $pdo->prepare(\"SELECT id FROM users WHERE email = :email\");\n $stmt->bindParam(':email', $email);\n $stmt->execute();\n $result = $stmt->fetchColumn();\n return $result;\n }", "public function findUserByEmail($email){\r\n $this->db->query('SELECT * FROM user_request WHERE email = :email');\r\n // Bind value\r\n $this->db->bind(':email', $email);\r\n\r\n $row = $this->db->single();\r\n\r\n // Check row\r\n if($this->db->rowCount() > 0){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public function searchUser($email) {\r\n\r\n\t\t//TODO: Look at bookmark class for sample try/catch block around DB code\r\n\t\t$sqlObj = new DataBase();\r\n\t\t$found = FALSE;\r\n\r\n\t\t$query = \"SELECT * FROM `user_credentials` WHERE `email`='$email'\";\r\n\r\n\t\ttry {\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$resultset = $sqlObj->GetData();\r\n\r\n\t\t\t$num = $sqlObj->getNumberOfRecords();\r\n\t\t} catch (MyException $e) {\r\n\t\t\t$e->getMyExceptionMessage();\r\n\t\t}\r\n\t\tif ($num == 1) {\r\n\t\t\t$id = $resultset[0]['id'];\r\n\t\t\t$found = $id;\r\n\t\t} else {\r\n\t\t\t$found = -1;\r\n\t\t}\r\n\t\t$sqlObj->destroy();\r\n\r\n\t\treturn $found;\r\n\t}", "public function find_user_by_email($email){\n\n $arr = [\n \"s\", [$email]\n ];\n\n $sql = \"SELECT * FROM users where email=? LIMIT 1;\";\n\n $result = $this->db->prepare_statement_query($sql, $arr);\n\n return $result->num_rows > 0 ? true : false;\n\n }", "function getByEmail($email);", "function people_findByEmail($find_email) {\n $response = $this->execute(array('method' => 'flickr.people.findByEmail', 'find_email' => $find_email));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['user']['nsid'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public static function findUserByEmail($email)\n {\n return static::find()->where(['email' => $email])->one();\n }", "public static function findByEmail($email){\n\n $sql=\"SELECT * FROM user WHERE email=:email\";\n $stmt=static::getDB()->prepare($sql);\n $stmt->bindValue(\":email\",$email,PDO::PARAM_STR);\n // FETCH_CLASS sẽ thực thi xong rồi mới chạy __constructer\n $stmt->setFetchMode(PDO::FETCH_OBJ);\n $stmt->execute();\n $count=$stmt->rowCount();\n // if($count !=1){\n // echo 'User with that email does not exist';\n // return false;\n // }\n return $stmt->fetch(); \n }", "public function findUserByEmail($email)\r\n {\r\n $user = $this->DB->fetchAssoc('select * from user where email = ?',array($email));\r\n $user = $this->reformatUserData($user);\r\n return $user;\r\n }", "public static function findByEmail($email){\n\t\t$sql = 'SELECT * FROM users WHERE email = :email';\n\t\t$db = static::getDB();\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bindParam(':email', $email, PDO::PARAM_STR);\n\t\t//$stmt->setFetchMode(PDO::FETCH_CLASS, 'App\\Models\\User');\n\t\t$stmt->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n\t\t$stmt->execute();\n\t\t//PDO::fetch() returns false if no record is found\n\t\treturn $stmt->fetch();\n\t}", "public function get_user_by_email($arg){\n\n return $this->db->query(\"SELECT * FROM admins WHERE email= ?\", $arg)->row_array();\n \n }", "public static function find($email){\n\t\t\t//preparo la query para buscarlo\n\t\t\t$sql='SELECT * FROM users WHERE email = :email';\n\t\t\t$stmt=DB::getcon()->prepare($sql);\n\t\t\t$stmt->bindValue(':email',$email,PDO::PARAM_STR);\n\t\t\t$stmt->execute();\n\n\t\t\t$result=$stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t\t//creo un usuario en blanco al cual lo voy a completar con lo que encontré en la DB\n\t\t\t$usuario=new Usuario('','','','');\n\t\t\t$usuario->toUser($result);\n\t\t\treturn $usuario;\n\t\t}", "public function findByEmail($email){\n try {\n $connection = Connection::getConnection();\n $sql = \"select * from \\\"user\\\" where email = :email\";\n $stmt = $connection->prepare($sql);\n $stmt->bindValue(\":email\", $email);\n $result = $stmt->execute();\n $result = $stmt->fetchAll();\n if ($result) {\n $result = $result[0];\n return new UserModel(\n $result['id'],\n $result['name'],\n $result['gender'],\n $result['email'],\n $result['status'],\n $result['type'],\n $result['photo']\n );\n } else {\n return null;\n }\n } catch (\\Exception $ex) {\n throw $ex;\n } finally {\n $connection = null;\n } \n }", "public function getUserByEmail($email=NULL)\n\t{\n\t\t$result = Yii::app()->db->createCommand()\n \t->select('*')\n \t->from($this->tableName())\n \t \t->where('loginId=:loginId', array(':loginId'=>$email))\t\n \t \t->queryRow();\n\t\t\n\t\treturn $result;\n\t}", "public function getUserByEmail($email)\n {\n return $this->model->where('email', $email)->first();\n }", "public function findUserByMail(string $email)\n {\n $users = $this->doctrine->getUserRepository()->findBy(['email' => $email]);\n\n if ($user = reset($users)) {\n return $user;\n }\n\n return null;\n }", "public function getUserByEmail()\n {\n $db = init_db();\n $req = $db->prepare(\"SELECT * FROM user WHERE email = ?\");\n $req->execute(array($this->getEmail()));\n $db = null;\n\n return $req->fetch();\n }", "public function getByEmail($email) {\n\n\t\t// get database\n\t\t$db = $this->app->database;\n\n\t\t// search email\n\t\tif ($id = $db->queryResult('SELECT id FROM #__users WHERE email = '.$db->Quote($email))) {\n\t\t\treturn $this->get($id);\n\t\t}\n\n\t\treturn null;\n\t}", "public function findFirstUserByEmail(string $email)\n {\n return User::findFirst([\n 'conditions' => 'email LIKE :email:',\n 'bind' => ['email' => $email]\n ]);\n }", "public function loadUserByEmail($email)\n { \n $user = $this->_em->getRepository('Entity\\User\\User')->findOneBy(array('email' => $email));\n\n if($user != null)\n return $user;\n\n throw new UsernameNotFoundException(\"Compte introuvable\");\n }", "public function findUserByEmail($email){\n $this->db->query('SELECT * FROM users WHERE email = :email');\n\n // Bind value\n $this->db->bind(':email', $email);\n\n $row = $this->db->single();\n\n // Check row\n if($this->db->rowCount() > 0){\n return true;\n } else {\n return false;\n }\n }", "public function getByEmail(Email $email): User\n {\n }", "public function retrieveUserByEmail($email)\n {\n return $this->start()->uri(\"/api/user\")\n ->urlParameter(\"email\", $email)\n ->get()\n ->go();\n }", "public function findNameByEmail($email){\n\n\t\t$stmt = $this->db->prepare(\"SELECT * FROM users WHERE email=?\");\n\t\t$stmt->execute(array($email));\n\t\t$user = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\tif($user != null) {\n\n\t\t\treturn new User(\n\t\t\t$user[\"email\"],\n\t\t\t$user[\"completeName\"]);\n\t\t} \n\t\telse {\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function selectUserByEmail($email)\n {\n $result = $this->sdb->query(\"select id from appuser where lower(email) = lower($1) limit 1\",\n array($email));\n $row = $this->sdb->fetchrow($result);\n if ($row && array_key_exists('id', $row))\n {\n /*\n * Call selectUserByID() to avoid all copy/paste code.\n */\n $rec = $this->selectUserByID($row['id']);\n return $rec;\n }\n return false;\n }", "public function get_user($email){\n\t\t$email_md5_hash = md5($email); \n\t\t$endpoint = '/lists/'. LIST_ID . '/members/'. $email_md5_hash;\n\t\t$result = $this->mc->get($endpoint);\n\t\tif($result['status'] == '404'){\n\t\t\tprint 'user does not exist';\n\t\t}else{\n\t\t\tprint '<pre>'; print_r($result); print '</pre>';\n\t\t}\n\t\t\n\t}", "function getuser($email)\n\t\t{\n\t\t\t$email = \"'\".$email.\"'\";\n\t\t\t$sql = $this->conn_id->query(\"select * from users where email = \".$email );\n\t\t\t$r = $sql->fetchALL(PDO::FETCH_ASSOC);\n\t\t\treturn $r;\n\t\t}", "public static function findByUsername($email)\n {\n return static::findOne(['email' => $email]);\n }", "public function find_by_email($email)\n\t{\n\t\treturn $this->where('email', $email)->find();\n\t}", "public function findUserByEmail($email)\n {\n $result = $this->createQueryBuilder('user')\n ->where('user.email = :email')\n ->setParameter('email', $email)\n ->getQuery()\n ->getResult()\n ;\n\n if (empty($result)) {\n return;\n }\n\n return $result[0];\n }", "public function getUserByEmail($email) {\r\n $query = $this->db->limit(1)\r\n ->get_where(USERS, array('email' => $email));\r\n return $query->row();\r\n }", "function getByEmail($email){\n\t\t}", "public static function getUserByEmail($email)\n\t{\n\t\tif (!$email) return false;\n\t\treturn self::_getDao()->getBy(array('email' => $email));\n\t}", "public function findUserByEmail($email)\n {\n $this->db->query('SELECT * FROM studentdetails WHERE email = :email');\n $this->db->bind(':email', $email);\n\n $row = $this->db->single();\n\n // Check row\n if ($this->db->rowCount() > 0) {\n return true;\n } else {\n // die(\"asa\");\n return false;\n }\n }", "public function user_get_by_email($email)\n {\n $query = \"SELECT *\n FROM \" . $this->db_table_prefix . \"users where email='\".$email.\"'\";\n $result = $this->commonDatabaseAction($query);\n// if (mysql_num_rows($result) > 0)\n if ($this->rowCount > 0)\n {\n return $this->resultArray($result);\n }\n else\n {\n return null;\n }\n }", "public function getUserByEmail($email) {\r\n $result = mysqli_query($this->con,\"SELECT * FROM users WHERE email ='$email'\") ;\r\n // check for result \r\n $no_of_rows = mysqli_num_rows($result);\r\n if ($no_of_rows > 0) {\r\n $result = mysqli_fetch_array($result);\r\n \r\n return $result;\r\n \r\n } else {\r\n // user not found\r\n return false;\r\n }\r\n }", "public function getUserByEmail($email) {\n return $this->db->select(\"id,password,token\")->where(\"email\", $email)->get(\"users\");\n }", "public function findByEmail($email) {\n\t\t$query = $this->createQuery();\n\t\treturn $query->matching($query->equals('email', $email))\n\t\t->execute()->getFirst();\n\t}", "public function user_get_by_useremail($email)\n {\n $query = \"SELECT *\n FROM \" . $this->db_table_prefix . \"users where email='\".$email.\"'\";\n $result = $this->commonDatabaseAction($query);\n// if (mysql_num_rows($result) > 0)\n if ($this->rowCount > 0)\n {\n return $this->resultArray($result);\n }\n else\n {\n return null;\n }\n }", "public function getByEmail($email)\n {\n $db = DBConnection::getConnection();\n\n $query = \"SELECT * FROM users\n WHERE email = ?\";\n $stmt = $db->prepare($query);\n $stmt->execute([$email]);\n\n if($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n \n $user = new self;\n $user->id = $row['id'];\n $user->user = $row['user'];\n $user->name = $row['name'];\n $user->surname = $row['surname'];\n $user->email = $row['email'];\n $user->password = $row['password'];\n $user->biography = $row['biography'];\n $user->created_at = $row['created_at'];\n\n return $user;\n }\n return null;\n }", "public function getUserByEmail($email) {\n $stmt = $this->conn->prepare(\"SELECT name, email, api_key, created_at FROM app_users WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n if ($stmt->execute()) {\n $user = $stmt->get_result()->fetch_assoc();\n $stmt->close();\n return $user;\n } else {\n return NULL;\n }\n }", "public function retrieveUser ($email) {\n return $this->usersDB->retrieve($email);\n }", "public function getUserByEmail($email)\n {\n $options = [\n 'search_engine' => 'v2',\n 'q' => \"email.raw:\".$email\n ];\n $users = $this->getManagement()->users->getAll($options);\n return empty($users) ? null : $users[0];\n }", "function find_by_email($h, $email ){\n \n $sql = \"SELECT * FROM \" . TABLE_USERS . \" WHERE user_email=%s LIMIT 1\";\n $query = $h->db->prepare($sql, $email);\n \n\treturn $parents = $h->db->get_results($query);; \n }", "public static function findByEmail($email) {\n $stmt = self::getDB()->prepare(\"SELECT * FROM `user` WHERE `email` = :email;\");\n $stmt->execute([':email' => $email]);\n return $stmt->fetchObject(self::class);\n }", "function getUserByEmail($email)\n\t{\n\t \n\t\t$stmt = $this->con->prepare(\"SELECT id, username, email, nik, apikey, isuser, isspv, isadmin FROM users WHERE email = ?\");\n\t\t\n\t\t$stmt->bind_param(\"s\", $email);\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($id, $username, $email, $nik, $apikey, $isuser, $isspv, $isadmin);\n\t\t$stmt->fetch();\n\t\t\n\t\t\n\t\t$user = array();\n\t\t$user[\"id\"] = $id;\n\t\t$user[\"username\"] = $username;\n\t\t$user[\"email\"] = $email;\n\t\t$user[\"nik\"] = $nik;\n\t\t$user[\"apikey\"] = $apikey;\n\t\t$user[\"isuser\"] = $isuser;\n\t\t$user[\"isspv\"] = $isspv;\n\t\t$user[\"isadmin\"] = $isadmin;\n\t\treturn $user;\n\t\t\n\t}", "public function getByEmail($email) {\n //Requête d'un objet user à partir de son email\n $reqEmail = $this->db->prepare(\"\n SELECT id, firstname, lastname, pseudo, email, password, level_id \n FROM user WHERE email=:email\n \");\n\n $reqEmail->execute(array(\n 'email' => $email,\n ));\n \n $data = $reqEmail->fetch(PDO::FETCH_ASSOC);\n\n if ($data) {\n \n return new User($data);\n }\n return $data;\n }", "public function getUserByEmail($email)\n {\n $this->db->query('SELECT * FROM user WHERE email = :email');\n $this->db->bind(':email', $email);\n $row = $this->db->single();\n return $row;\n }", "public function getUserByEmail($email)\n {\n return $this->getUserByIdentity(['email' => $email]);\n }", "public function getUsersByEmail($email)\n\t{\n\t\tself::connectToDB(); /* Using DB connection */\n\n $this->sql = \"SELECT * \n \t\t\tFROM users\n \t\t\tWHERE users.email LIKE ?\";\n\n try\n {\n $this->query = $this->handler->prepare($this->sql);\n\t\t\t\n $this->query->execute(array('%' . $email . '%'));\n $this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n $this->query->closeCursor();\n $this->handler = null;\n\n foreach ($this->result as $row)\n {\n $this->list[] = new User($row['id'], $row['username'], $row['password'], $row['email'], $row['firstname'], $row['lastname'], $row['admin'], $row['blocked'], $row['image_path'], $row['registration_date']);\n }\n return $this->list;\n }\n catch (Exception $e)\n {\n echo \"Error: query failure\";\n return false;\n }\n\t}", "public function findEmail($email = \"[email protected]\") {\n\t\t$users = $this->em->createQuery ( \" SELECT PARTIAL u.{id} FROM App\\Entity\\User u WHERE u.email = ?1 \" )->setParameter ( 1, $email )->execute ();\n\t\treturn count ( $users );\n\t}", "public function getUserByEmail($email): ?Sh4bangUserInterface\r\n {\r\n $userRepository = $this->entityManager->getRepository(User::class);\r\n $user = $userRepository->findOneBy(['email' => $email]);\r\n\r\n return $user;\r\n }", "public function lookForUserByEmail($email)\n {\n self::connectToDB(); /* Using DB connection */\n\n $this->sql = \"SELECT email FROM users WHERE email = ?\";\n\n try\n {\n $this->query = $this->handler->prepare($this->sql);\n $this->query->execute(array($email));\n $this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n\n /**\n * Closing DB connection\n */\n $this->query->closeCursor();\n $this->handler = null;\n\n return $this->result;\n }\n catch (Exception $e)\n {\n echo \"Error: query failure\";\n return false;\n }\n }", "public function findUserByUsernameOrEmail($usernameOrEmail);", "public function findUserByUsernameOrEmail($usernameOrEmail);", "public function findUserByUsernameOrEmail($usernameOrEmail);", "public function findUser($username, $email)\n {\n $sql = \"SELECT * FROM user WHERE username = :username AND email = :email\";\n $this->setSql($sql);\n $user = $this->getRow(array($username, $email));\n return ($user) ? $user : false;\n }", "function selectUserByEmail($email) {\n $connection = openDb();\n $email = escape($email, $connection);\n\n //Using prepared statements and parameterized queries:\n $sql = \"SELECT * FROM users WHERE EMAIL = ? AND DATE_APPROVED IS NOT NULL\";\n $stmt = $connection->stmt_init();\n if(!$stmt->prepare($sql)) {\n return false;\n }\n $stmt->bind_param(\"s\",$email);\n\n return executeQueryPrepared($stmt, $connection, true);\n}", "public static function getByEMAIL($email) {\n $str = \"\n SELECT id, firstName, lastName, email, password\n FROM indPrj_persons\n WHERE email ='\" . $email . \"'\";\n \n return mysql_fetch_array(Database::query($str));\n }", "function get_user_by_email($email)\n{\n global $conn;\n $q['query'] = \"SELECT * FROM `user_master` WHERE `email`='$email'\";\n $q['run'] = $conn->query($q['query']);\n $q['result'] = $q['run']->fetch_assoc();\n\n return $q['result'];\n}", "function query_select_user_by_email($email) {\n global $connection;\n\n //prep values\n $email = mysqli_real_escape_string($connection, $email);\n //$role = mysqli_real_escape_string($connection, $role);\n\n //construct query\n $query = \"SELECT * FROM user WHERE email='{$email}' LIMIT 1\";\n\n //execute query\n $result = mysqli_query($connection, $query);\n\n if($result) {\n return mysqli_fetch_assoc($result);\n } else {\n return 0;\n }\n}", "public function findByEmail($email)\n {\n $filters = array();\n $filters[] = array('key' => 'email', 'operator' => '=', 'value' => $email);\n $user = CustomerioUser::get($filters, 1);\n return empty($user['objects']) ? array() : $user['objects'][0];\n }", "public function get_user($email){\n $query = $this->db->get_where('users', array('user_email'=> $email));\n $result = $query->result_array();\n return $result;\n\n }", "function getUser($email) {\r\n\t\t\tif (is_numeric($email))\r\n\t\t\t\t$sql = \"SELECT users.user_id, users.student_id, users.email, users.password, users.society_id, users.active, societies.society_name FROM `users`, `societies` WHERE societies.society_id=users.society_id AND user_id=%s\";\r\n\t\t\telse\r\n\t\t\t\t$sql = \"SELECT users.user_id, users.student_id, users.email, users.password, users.society_id, users.active, societies.society_name FROM `users`, `societies` WHERE societies.society_id=users.society_id AND UPPER(users.email)=UPPER('%s')\";\r\n\t\t\t$result = $this->query($sql, $email);\r\n\t\t\tif (mysql_num_rows($result) == 0) return false;\r\n\t\t\treturn mysql_fetch_object($result);\r\n\t\t}", "public function get_byemail($email=NULL) {\n\t\tif ($email != NULL):\n\t\t\t$this->db->where('email', $email);\n\t\t\t$this->db->limit(1);\n\t\t\treturn $this->db->get('usuarios');\n\t\telse:\n\t\t\treturn FALSE;\n\t\tendif;\n\t}", "public function getByEmail($email)\n {\n $user = $this->userModel->where('email', $email)->first();\n return $user;\n }", "public function getUserByEmail($email)\n\t{\n\t\t$userIndex = $this->getUserIndex();\n\t\t$userNode = $userIndex->findOne('email', $email);\n\t\tif (!$userNode) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn new User($userNode);\n\t}", "public static function findByEmail($email)\n {\n $user = self::find()->where(['email'=>$email])->one();\n return $user;\n }", "public function emailExists($email) {\n\n return $this->getEntityManager()\n ->getRepository('Alt68\\Entities\\User')\n ->findOneBy(array('email' => $email));\n }", "public static function requestUserByEmail($email)\n {\n return UserModel::getUserByEmail($email);\n }", "public function getUserByEmail($email)\n {\n $sql = \"SELECT * FROM admin_user WHERE email=:email\";\n\n return $this->_rdb->fetchRow($sql, array('email' => $email));\n }", "public function getUserByEmail($email)\n {\n return $this->user->userByEmail($email);\n }" ]
[ "0.8166407", "0.8166407", "0.8166407", "0.8038051", "0.801395", "0.7942375", "0.7921375", "0.78417", "0.78288645", "0.7686924", "0.7680421", "0.7669739", "0.7669739", "0.7669739", "0.7669739", "0.76563156", "0.7625273", "0.7598056", "0.7595499", "0.75875545", "0.7578652", "0.7559837", "0.75287217", "0.7518726", "0.75078017", "0.7482086", "0.74661094", "0.7456296", "0.74547446", "0.74424696", "0.7430598", "0.7426737", "0.7424853", "0.74235207", "0.7421422", "0.7418312", "0.7415166", "0.73997223", "0.7393287", "0.73811835", "0.7367253", "0.73482513", "0.73408824", "0.73397416", "0.7337867", "0.7328074", "0.73231584", "0.7315115", "0.73145306", "0.7312506", "0.7281275", "0.7277796", "0.72662365", "0.7262578", "0.72609556", "0.7239041", "0.7235626", "0.72290015", "0.7207421", "0.72057694", "0.7205578", "0.7183145", "0.7181178", "0.71772707", "0.7170259", "0.71582085", "0.71536505", "0.71393967", "0.71260667", "0.71258366", "0.7123181", "0.7109725", "0.7105495", "0.71053034", "0.7103197", "0.70757765", "0.7073089", "0.7069637", "0.7062807", "0.7054822", "0.7031239", "0.70290816", "0.6992122", "0.6992122", "0.6992122", "0.69913596", "0.69836116", "0.6982403", "0.6977621", "0.6968703", "0.69606286", "0.6959992", "0.6959235", "0.69534487", "0.69506174", "0.69469976", "0.6942091", "0.6941965", "0.6941775", "0.6937981", "0.6937717" ]
0.0
-1
Montar mensagem de email
private function getMailMessage($model) { $message = Html::tag('p', "Prezado {$model->name},"); $message .= Html::tag('p', 'Uma solicitação para recuperação da senha foi realizada.'); $message .= Html::tag('p', 'Para prosseguir com a alteração, clique no link abaixo:'); $message .= Html::tag('p', Html::a('alterar senha', Url::to(['site/reset', 'password_reset_token' => $model->password_reset_token], true))); $message .= Html::tag('p', 'O link é válido apenas por um dia.'); return $message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function message()\n {\n return 'Endereço de email já cadastrado para essa lista.';\n }", "private function enviarEmail($msg)\n {\n // setando conteudo do email para avisos\n echo 'Envio email';\n }", "function envoyer_message_mail($values)\n{\n\t$mot = $GLOBALS['mot'];\n\t$phrase = $GLOBALS['phrase'];\n\t$val = FALSE;\n\t\n\tif (verif_email($values['Email']) == TRUE)\n\t{\n\t\t$contenu = array(\t$mot['Message'] => $values['Message'],\n\t\t\t\t\t\t\t\t\t\t\t$mot['Entreprise'] => $values['Entreprise'],\n\t\t\t\t\t\t\t\t\t\t\t$mot['Nom'] => $values['Nom'],\n\t\t\t\t\t\t\t\t\t\t\t$mot['Email'] => $values['Email'] );\n\t\t\t\t\t\t\t\n\t\t$contenu_message = corps_email($contenu);\n\t\t// Si le message a bien été envoyé, on affiche un message de validation\n\t\t// et on enregistre le message dans la base de données\n\t\t\n\t\tif (envoi_email($values['Email'], NOM_SITE, EMAIL, $values['Email'], $phrase['UnNouveauMessage'], $contenu_message) == TRUE)\n\t\t{\n\t\t\tif (ajouter_message_db($values) == TRUE)\n\t\t\t{\n\t\t\t\t$val = TRUE;\n\t\t\t}\n\t\t}\n\t}\n\treturn $val;\n}", "public function createMailMessage();", "function sendNewMessageNotification($to_user_id,$to_name,$subject,$fromEmail,$replyEmail)\n{\n #check if the user enabled this option\n $query=\"select message_email,email from users where user_id ='$to_user_id' and access_level NOT IN ('ebulkuser','eremote') limit 1\";\n $email_option=getDBRecords($query); \n\n if($email_option[0]['message_email'] == \"Y\")\n { \n $email = $email_option[0]['email'];\n $html=\"<p><font size=\\\"2\\\" face=\\\"Verdana, Arial, Helvetica, sans-serif\\\">Dear \".$to_name.\",<br><br>\n You have been sent a message via the online \".DBS.\" system regarding <b>\".$subject.\"</b>, please login to your secure online account to read the message.\n\t\t\t <br><br>Thank You</font></p>\";\n\n\n\t\t$text=\"Dear \".$to_name.\",\n \n\t\t\t You have been sent a message via the online \".DBS.\" system regarding \".$subject.\", please login to your secure online account to read the message.\n\t\t\t \n\t\t\t Thank You\";\n\n\t\t \n\t\t$from = $fromEmail;\n\t\t$mail = new htmlMimeMail();\n\t\t$mail->setHtml($html, $text);\n\t\t$mail->setReturnPath($replyEmail);\n $mail->setFrom($from);\n $mail->setSubject(\"Important Message\");\n $mail->setHeader('X-Mailer', 'HTML Mime mail class');\n\n if(!empty($email))\n\t {\n $result = $mail->send(array($email), 'smtp');\t\n\t\t}\n } \t\n}", "function enviaEmail($msgLog) {\n $msgLog = str_replace ( \"<q>\", \"<br>\", $msgLog );\n $assunto = 'Erro no Simec ' . date ( \"d-m-Y H:i:s\" ) . \" - \" . $_SESSION ['ambiente'];\n\n //$aDestinatarios = carregarUsuariosSessao();\n $remetente = array(\"nome\"=>\"SIMEC - \".strtoupper($_SESSION['sisdiretorio']).\" - \" . $_SESSION['usunome'] . \" - \" . $_SESSION['usuorgao'], \"email\"=>\"[email protected]\");\n $destinatarios = !empty($aDestinatarios[$_SESSION['sisid']]) ? $aDestinatarios[$_SESSION['sisid']] : array_keys($aDestinatarios['todos']);\n\n //simec_email($remetente, $destinatarios, $assunto, $msgLog);\n }", "function sendMail_dis($to_email,$extraMsg)\n{\n //$to_email \t=\"[email protected]\";\n $from \t=\"[email protected]\";\n\t$subject\t=\"List of cancelled transaction in last 1 week\";\n $msgTxt\t\t=\"Hi, <br><br>\n\t \tPlease find the list of usernames whose transaction has been cancelled in last 1 week (From: $last_7day - $dateEnd).<br><br>\";\n\n $msgTxt \t.=$extraMsg.\"<br><br>\";\n $msgTxt \t.=\"Thanks,<br>Team Jeevansathi<br>\";\n send_email($to_email,$msgTxt,$subject,$from);\n}", "function errorMailExiste(){\n\t\t$content='\n\t\t\t<div><h3>'.htmlspecialchars($this->pi_getLL(\"txt_error_mail\")).'<br/></h3><hr/></div>';\n\t\t$content .=$this->getFormulaireVide();\n\t\treturn $content;\n\t}", "function send_consulenza($c) {\n\n require 'vendor/autoload.php';\n\n $toEmail = \"[email protected]\"; \n\n $mail = new PHPMailer();\n $mail->setFrom('[email protected]', \"Admin\");\n $mail->addReplyTo($c->get_email(), $c->get_nome() . \" \" . $c->get_cognome());\n $mail->addAddress($toEmail, 'Admin'); \n $mail->Subject = 'Richiesta consulenza da ' . $c->get_nome() . \" \" . $c->get_cognome();\n $mail->Body = \"Recapito telefonico: \" . $c->get_phone() . \"\\n\";\n $mail->Body .= $c->get_msg();\n\n if($mail->send()) {\n set_message(\"La tua email è stata inviata con successo\", \"alert-success\");\n } \n else {\n set_message(\"Oops, qualcosa è andato storto: \" . $mail->ErrorInfo, \"alert-danger\"); \n }\n\n}", "public function mensajeCorreo(string $titulo, string $texto) {\r\n $mensaje = '<div align=\"center\">\r\n <table style=\"max-width: 600px; height: 240px;\" border=\"0\" width=\"598\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tbody>\r\n <tr>\r\n <td>\r\n <table style=\"min-width: 332px; max-width: 600px; border: 1px solid #E0E0E0; border-bottom: 0; border-top-left-radius: 3px; border-top-right-radius: 3px;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#707478\">\r\n <tbody>\r\n <tr>\r\n <td colspan=\"3\" height=\"72px\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td width=\"32px\">&nbsp;</td>\r\n <td style=\"font-family: Roboto-Regular,Helvetica,Arial,sans-serif; font-size: 24px; color: #ffffff; line-height: 1.25;\">' . $titulo . '</td>\r\n <td width=\"32px\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"3\" height=\"18px\">&nbsp;</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <table style=\"min-width: 332px; max-width: 600px; border: 1px solid #F0F0F0; border-top: 0;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#FFFFFF\">\r\n <tbody>\r\n <tr>\r\n <td colspan=\"3\" height=\"18px\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td width=\"32px\">&nbsp;</td>\r\n <td style=\"font-family: Roboto-Regular,Helvetica,Arial,sans-serif; font-size: 13px; color: #202020; line-height: 1.5;\">' . $texto . '</td>\r\n <td width=\"10px\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"3\" height=\"18px\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td width=\"32px\">&nbsp;</td>\r\n <td style=\"font-family: Roboto-Regular,Helvetica,Arial,sans-serif; font-size: 13px; color: #202020; line-height: 1.5;\">\r\n <p>&nbsp;<strong><em>Atentamente,</em></strong><br>\r\n <strong><em>Notificaciones AdIST</em></strong></p>\r\n </td>\r\n <td width=\"10px\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td>&nbsp;</td>\r\n <td>&nbsp;</td>\r\n <td>&nbsp;</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td style=\"max-width: 600px; font-family: Roboto-Regular,Helvetica,Arial,sans-serif; font-size: 10px; color: #bcbcbc; line-height: 1.5;\">&nbsp;\r\n <p style=\"text-align: center;\" align=\"center\"><em><span style=\"font-size: 10.5pt; color: #999999;\"><em>Gracias por no responder este correo.<br /> Es solo un robot para mandar e-mails.<br /> Dudas o aclaraciones dirigirse al &aacute;rea correspondiente de la empresa. </em></span></em></p>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>';\r\n return $mensaje;\r\n }", "public function common_email_send($eamil_vaues = array()){\n\t\tif (is_file('settings/smtp_settings.php')){\n\t\t\tinclude('smtp_settings.php');\n\t\t}\n\t\t// Set SMTP Configuration\n\t\tif($config['smtp_user'] != '' && $config['smtp_pass'] != ''){\n\t\t\t$emailConfig = array(\n\t\t\t\t'protocol' => 'smtp',\n\t\t\t\t'smtp_host' => $config['smtp_host'],\n\t\t\t\t'smtp_port' => $config['smtp_port'],\n\t\t\t\t'smtp_user' => $config['smtp_user'],\n\t\t\t\t'smtp_pass' => $config['smtp_pass'],\n\t\t\t\t'auth' => true\n\t\t\t);\n\t\t}\n\t\t// Set your email information\n\t\t$from = array('email' => $eamil_vaues['from_mail_id'],'name' => $eamil_vaues['mail_name']);\n\t\t$to = $eamil_vaues['to_mail_id'];\n\t\t$subject = $eamil_vaues['subject_message'];\n\t\t$message = stripslashes($eamil_vaues['body_messages']);\n\t\t#echo $message; die;\n\t\t// Load CodeIgniter Email library\n\t\tif($config['smtp_user'] != '' && $config['smtp_pass'] != ''){\t\t\t\n\t\t\t$this->load->library('email', $emailConfig);\n\t\t}else {\n\t\t\t$this->load->library('email');\n\t\t}\n\t\t//Sometimes you have to set the new line character for better result\t\t\t\n\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t//Set email preferences\n\t\t$this->email->set_mailtype($eamil_vaues['mail_type']);\n\t\t$this->email->from($from['email'],$from['name']);\n\t\t$this->email->to($to);\n\t\tif($eamil_vaues['cc_mail_id'] != ''){\n\t\t\t$this->email->cc($eamil_vaues['cc_mail_id']); \n\t\t}\n\t\tif($eamil_vaues['bcc_mail_id'] != ''){\n\t\t\t$this->email->bcc($eamil_vaues['bcc_mail_id']); \n\t\t}\n\n\t\t$this->email->subject($subject);\n\t\t$this->email->message($message);\n\t\t//Ready to send email and check whether the email was successfully sent\n\t\t\t\n\t\tif (!$this->email->send()){\n\t\t\t// Raise error message\n\t\t\t//show_error($this->email->print_debugger());\n\t\t\t$this->load->library('email');\n\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t// Set email preferences\n\t\t\t$this->email->set_mailtype($eamil_vaues['mail_type']);\n\t\t\t$this->email->from($from['email'],$from['name']);\n\t\t\t$this->email->to($to);\t\t\t\t\n\t\t\tif($eamil_vaues['cc_mail_id'] != ''){\n\t\t\t\t$this->email->cc($eamil_vaues['cc_mail_id']); \n\t\t\t}\t\n\t\t\tif($eamil_vaues['bcc_mail_id'] != ''){\n\t\t\t\t$this->email->bcc($eamil_vaues['bcc_mail_id']); \n\t\t\t}\t\t\t\t \n\t\t\t$this->email->subject($subject);\n\t\t\t$this->email->message($message);\n\t\t\t$this->email->send();\n\t\t}else{\n\t\t\t#echo 'Success to send email';\n\t\t\treturn 1;\n\t\t}\n\t}", "function process_mail(){\n\t\t$result = true;\n\t\t\n\t\tif(count($this->to) < 1){\n\t\t\treturn 'No email address.';\n\t\t}\n\t\t$this->set_eol();\n\t\t$this->get_message_type();\n\t\t$this->set_boundary();\n\t\t$headers = $this->set_headers();\n\t\t$body = $this->set_body();\n\t\t\n\t\tif($body == ''){\n\t\t\treturn 'Empty email body.';\n\t\t}\n\t\t$result = $this->send_mail($headers, $body);\n\t\treturn $result;\n\t}", "public function sendnotificationemails($type,$to,$subject,$username,$linkhref){\r\n\r\n $bodyhead=\"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\n <html xmlns='http://www.w3.org/1999/xhtml'>\r\n <head>\r\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\r\n <title>\".$this->getsettings('sitetitle','text').\"</title>\r\n </head><body>\";\r\n if( $this->getsettings('email','logoshow') == '1' ) {\r\n $body = \"<img src='\".$this->getsettings('logo','url').\"' alt='\".$this->getsettings('sitetitle','text').\"' title='\".$this->getsettings('sitetitle','text').\"'/>\";\r\n }\r\n else {\r\n $body = '';\r\n }\r\n\r\n $link = \"<a href='\".$linkhref.\"'>\".$this->getsettings($type,'linktext').\"</a>\";\r\n $emContent = $this->getsettings($type,'text');\r\n $emContent = str_replace(\"[username]\",$username,$emContent);\r\n $emContent = str_replace(\"[break]\",\"<br/>\",$emContent);\r\n $emContent = str_replace(\"[linktext]\",$link,$emContent);\r\n\r\n $body .=\"<p>\".$emContent.\"</p>\";\r\n\r\n $from = $this->getsettings('email','fromname');\r\n $from_add = $this->getsettings('email','fromemail');\r\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\r\n $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\r\n $headers .= \"From: =?UTF-8?B?\". base64_encode($from) .\"?= <$from_add>\\r\\n\" .\r\n 'Reply-To: '.$from_add . \"\\r\\n\" .\r\n 'X-Mailer: PHP/' . phpversion();\r\n mail($to,$subject,$bodyhead.$body.'</body></html>',$headers, '-f'.$from_add);\r\n\r\n if( $type == 'forgotpwdemail' ) {\r\n return '7#email';\r\n }\r\n else {\r\n return '7#register';\r\n }\r\n\r\n die();\r\n\t}", "public function smtp_enviar_email(){\n\n //inicializo a classe do PHPMailer\n $mail \t= \tnew PHPMailer();\n\n //defino os parametros que vou utilizar\n $body\t\t\t\t= $this->mensagem;\n $emailsender\t\t= $this->smtp_email;\n $nomesender\t\t\t= $this->enviadopor;\n $destino\t\t\t= $this->destino;\n $assunto\t\t\t= $this->assunto;\n\n $mail->IsSMTP(); \t\t\t\t\t\t\t\t\t\t// telling the class to use SMTP\n $mail->Host \t= $this->smtp;\t\t\t\t\t\t// SMTP server\n $mail->SMTPDebug \t= 1; \t\t\t// enables SMTP debug information (for testing)\n $mail->SMTPAuth \t= true; \t\t\t// enable SMTP authentication\n $mail->Port \t= $this->smtp_port; // set the SMTP port\n $mail->Username \t= $this->smtp_email; \t\t\t\t// SMTP account username\n $mail->Password \t= $this->smtp_senha; \t\t // SMTP account password\n $mail->CharSet \t\t= 'UTF-8';\n\n //crio o corpo HTML p/ o envio da mensagem\n $corpo = $this->create_html_email();\n\n $mail->From \t = $this->smtp_email;\n $mail->FromName = $nomesender;\n\n $mail->Subject = $this->assunto;\n $mail->AltBody = \"Caso não visualize essa mensagem entre em contato conosco.\";\n\n\n $mail->MsgHTML($corpo);\n $mail->AddReplyTo($this->replay_mail, $this->replay_name);\n\n\n $mail->AddAddress($destino[0]['email'], $destino[0]['nome']);\n //crio um contador p/ enviar os e-mails em cópia\n if(count($destino) > 1){\n unset($destino[0]);\n foreach($destino as $valor){\n $mail->AddBCC($valor['email'], $valor['nome']);\n }\n }\n\n if($mail->Send()){\n echo $this->alert_toast(1);\n }else{\n echo $this->alert_toast(0);\n }\n\n return;\n }", "function Email($m)\n{\n\t$m = str_replace('@', ' (at) ', $m);\n\techo \"<span class=\\\"m\\\">&lt;$m&gt;</span>\";\n}", "private function sendEmail()\n\t{\n\t\t// Get data\n\t\t$config = JFactory::getConfig();\n\t\t$mailer = JFactory::getMailer();\n\t\t$params = JComponentHelper::getParams('com_code');\n\t\t$addresses = $params->get('email_error', '');\n\n\t\t// Build the message\n\t\t$message = sprintf(\n\t\t\t'The sync cron job on developer.joomla.org started at %s failed to complete properly. Please check the logs for further details.',\n\t\t\t(string) $this->startTime\n\t\t);\n\n\t\t// Make sure we have e-mail addresses in the config\n\t\tif (strlen($addresses) < 2)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$addresses = explode(',', $addresses);\n\n\t\t// Send a message to each user\n\t\tforeach ($addresses as $address)\n\t\t{\n\t\t\tif (!$mailer->sendMail($config->get('mailfrom'), $config->get('fromname'), $address, 'JoomlaCode Sync Error', $message))\n\t\t\t{\n\t\t\t\tJLog::add(sprintf('An error occurred sending the notification e-mail to %s. Error: %s', $address, $e->getMessage()), JLog::INFO);\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}", "public function message()\n {\n return 'That email address is already in use.';\n }", "public function utility_email($msg, $member_email, $subject){\n\t\t//echo $msg;\n\t\treturn $this->send_mime_mail(\"immistudy.ru\", \n\t\t\t\t\t\t\"immistudy@mailru\",\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t$member_email,\n\t\t\t\t\t\t'UTF-8',\n\t\t\t\t\t\t'windows-1251',\n\t\t\t\t\t\t$subject,\n\t\t\t\t\t\t$msg);\n\t}", "function enviarEmailAdministrador($assunto, $descrição, $emailDe, $nomeDe)\n {\n $mail = new PHPMailer();\n // Define os dados do servidor e tipo de conexão\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n// $mail->IsSMTP(); // Define que a mensagem será SMTP\n// $mail->Host = \"smtp.gmail.com\"; // Endereço do servidor SMTP\n// $mail->SMTPAuth = true; // Usa autenticação SMTP? (opcional)\n// $mail->Username = '[email protected]'; // Usuário do servidor SMTP\n// $mail->Password = 'asdasdasd'; // Senha do servidor SMTP\n // Define o remetente\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->From = $emailDe; // Seu e-mail\n $mail->FromName = $nomeDe; // Seu nome\n // Define os destinatário(s)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->AddAddress('[email protected]', 'Luis Filipe');\n $sql1 = \"select nome,email from utilizador where nivel=1 and activo=1\";\n $resultado1=$this->bd->executarSQL($sql1);\n while ($row1 = $resultado1->fetch(PDO::FETCH_ASSOC)) {\n $mail->AddAddress($row1['email'], $row1['nome']);\n }\n// $mail->AddAddress('[email protected]');\n //$mail->AddCC('[email protected]', 'Ciclano'); // Copia\n //$mail->AddBCC('[email protected]', 'Fulano da Silva'); // Cópia Oculta\n // Define os dados técnicos da Mensagem\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->IsHTML(true); // Define que o e-mail será enviado como HTML\n //$mail->CharSet = 'iso-8859-1'; // Charset da mensagem (opcional)\n // Define a mensagem (Texto e Assunto)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->Subject = utf8_decode($assunto); // Assunto da mensagem\n $mail->Body = utf8_decode($descrição);\n $mail->AltBody = utf8_decode($assunto);\n // Define os anexos (opcional)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n //$mail->AddAttachment(\"c:/temp/documento.pdf\", \"novo_nome.pdf\"); // Insere um anexo\n // Envi a o e-mail\n $enviado = $mail->Send();\n // Limpa os destinatários e os anexos\n $mail->ClearAllRecipients();\n $mail->ClearAttachments();\n // Exibe uma mensagem de resultado\n if ($enviado) {\n// echo \"E-mail enviado com sucesso!\";\n return true;\n } else {\n// echo \"Não foi possível enviar o e-mail.\";\n// echo \"<b>Informações do erro:</b> \" . $mail->ErrorInfo;\n return $mail->ErrorInfo;\n }\n }", "function enviar_email($email,$sujeto, $msj, $headers){\n\treturn mail($email,$sujeto, $msj, $headers);\n\t\n}", "public function message()\n {\n return 'The email does not match our records.';\n }", "function eMail($string) {\n\n\n\t\t}", "function enviarEmail($destinatario,$asunto,$cuerpo) {\r\n\r\n\r\n\t# Defina el número de e-mails que desea enviar por periodo. Si es 0, el proceso por lotes\r\n\t# se deshabilita y los mensajes son enviados tan rápido como sea posible.\r\n\tdefine(\"MAILQUEUE_BATCH_SIZE\",0);\r\n\r\n\t//para el envío en formato HTML\r\n\t//$headers = \"MIME-Version: 1.0\\r\\n\";\r\n\t\r\n\t// Cabecera que especifica que es un HMTL\r\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\n\t\r\n\t//dirección del remitente\r\n\t$headers .= utf8_decode(\"From: GUSTAVO OMAR AVILA - PROCOMEX <[email protected]>\\r\\n\");\r\n\t\r\n\t//ruta del mensaje desde origen a destino\r\n\t$headers .= \"Return-path: \".$destinatario.\"\\r\\n\";\r\n\t\r\n\t//direcciones que recibirán copia oculta\r\n\t$headers .= \"Bcc: [email protected]\\r\\n\";\r\n\t\r\n\tmail($destinatario,$asunto,$cuerpo,$headers); \t\r\n}", "function emailNotification($email,$emailcontent){\n\t\t //This is the email address which will be sent to\n\t\t $address=$email;\n\t\t\t//The content that will be sent to specific user account\n\t\t\t$bodycontent=$emailcontent;\n\t\t\t//Including the PHPMailer as plugin for sending email\n\t\t\trequire_once '../Assets/PHPMailer-master/PHPMailerAutoload.php';\n\n\t\t\t$mail = new PHPMailer;\n\n\t\t\t$mail->isSMTP(); \n\t\t\t$mail->Host = 'smtp.gmail.com'; \n\t\t\t$mail->SMTPAuth = true; \n\t\t\t$mail->Username = '[email protected]'; \n\t\t\t$mail->Password = 'Eric1win&'; \n\t\t\t$mail->SMTPSecure = 'tls'; \n\t\t\t$mail->Port = 587; \n\n\t\t\t$mail->setFrom('[email protected]', 'BIT17-2 Group');\n\t\t\t$mail->addReplyTo('[email protected]', 'BIT17-2 Group');\n\t\t\t$mail->addAddress($address); \n\n\t\t\t$mail->isHTML(true); \n\n\t\t\t$bodyContent = '<h1>The Complaint Notification from RCMS2017</h1>';\n\t\t\t$bodyContent .= '<p>'.$bodycontent.'<br><br> <strong>From BIT17-2 Final year project<br>Eric Kasakya Tel +256 750538391 Group Leader<br>Amuron Ruth +256 754006150<br>Lahat John +256 700605540<br> Nakayuki Mildred +256 701662622</strong></p>';\n\n\t\t\t$mail->Subject = 'Complaint Notification from RCMS2017_CoCIS';\n\t\t\t$mail->Body = $bodyContent;\n\n\t\t\tif(!$mail->send()) {\n\t\t\t $message=0;\n\t\t\t} else {\n\t\t\t $message=1;\n\t\t\t}\n\t\treturn $message;\n\t}", "public function getMessage() {\n\t\treturn preg_replace('%(\\r\\n|\\r|\\n)%', self::$crlf, $this->message . (MAIL_SIGNATURE ? self::$crlf . self::$crlf . MAIL_SIGNATURE : ''));\n\t}", "function sendNotif(){\n\t\t$sql1 \t\t= \"SELECT EMAIL, MATERIAL, VENDOR FROM VMI_NOTIF\";\n\t\t$dt \t\t= $this->db->query($sql)->result_array();\n\t\t// $dt\t\t\t= $this->db->query($sql1)->row();\t\t\n\t\t// $to \t\t= $result->EMAIL;\n\t\t// $material \t= $result->MATERIAL;\n\t\t// $vendor\t\t= $result->VENDOR;\n\t\tforeach ($dt as $key => $value) {\n\t\t\t$to \t\t= $value['EMAIL'];\n\t\t\t$material \t= $value['MATERIAL'];\n\t\t\t$vendor \t= $value['VENDOR'];\n\t\t\t$from \t \t= \"Tim VMI-Eproc Semen Indonesia\";\n\t\t\t$subject \t= \"Email Notifikasi untuk melakukan Replenishment\";\n\t\t\t// $cc \t \t= \"[email protected]\t\";\n\t\t\t$bcc \t \t= \"[email protected]\";\n\t\t\t$bcc2 \t = \"[email protected]\";\n\t\t\t$bcc3 \t = \"[email protected]\";\n\t\t\t$bcc4 \t = \"[email protected]\";\n\t\t\t$bcc5 \t = \"[email protected]\";\n\t\t\t$message \t= '<html><body><font style = \"font-family:\"Cambria\";size:\"12px\";\">';\n\t\t\t$message \t.= 'Yth. <b>'.$vendor.'</b><br/>';\n\t\t\t$message \t.= 'Mohon melakukan pengecekkan terhadap perubahan nilai prognose pada material '.$material.' : <br/><br/>';\n\t\t\t$message \t.= '<br/>Demikian Email Pemberitahun ini kami sampaikan<br/>';\n\t\t\t$message \t.= 'Terima Kasih<br/><br/>';\n\t\t\t$message \t.= 'NB : Email ini dikirimkan oleh system. Jangan me-reply email ini. Apabila ada pertanyaan silakan menghubungi Seksi Inventory<br/>';\n\t\t\t$message \t.= '</font></body></html>';\n\n\t\t\t$this->load->library('email');\n\t\t\t$this->config->load('email');\n\t\t\t$semenindonesia = $this->config->item('semenindonesia');\n\t\t\t$this->email->initialize($semenindonesia['conf']);\n\t\t\t$this->email->from($from);\n\t\t\t$this->email->to($to);\n\t\t\t// $this->email->cc('[email protected]');\n\t\t\tif(!empty($cc)){\n\t\t\t $this->email->cc($cc);\n\t\t\t}\n\t\t\tif(!empty($bcc)){\n\t\t\t $this->email->bcc($bcc);\n\t\t\t $this->email->bcc($bcc2);\n\t\t\t $this->email->bcc($bcc3);\n\t\t\t $this->email->bcc($bcc4);\n\t\t\t $this->email->bcc($bcc5);\n\t\t\t}\n\n\t\t\tif(!empty($attachment)){\n\t\t\t $this->email->attach($attachment);\n\t\t\t}\n\n\t\t\t$this->email->subject($subject);\n\t\t\t$this->email->message($message);\n\t\t\treturn $this->email->send();\n\t\t}\n\t\t$sql2 \t\t= \"DELETE table VMI_NOTIF\";\n\t\t$result2\t= $this->db->query($sql2)->row();\t\n\t}", "public function application_message($id, $email){\n\t\t$msg = \"Информационное сообщение сайта immistudy.ru - Иммиграция и обучение\n\t\t------------------------------------------\n\t\t\n\t\tВы успешно отправили анкету и мы получили всю необходимую информацию. Спасибо вам за то что вы выбрали нас.\n\t\t\n\t\tВаша регистрационная информация:\n\t\t\n\t\tID пользователя: \" . $id .\" \n\t\tСтатус: активен\n\t\tLogin: \" . $email . \"\n\t\t\n\t\tСообщение сгенерировано автоматически.\";\n\t\t\n\t\treturn $this->utility_email($msg, $email, \"Ваша анкета получена\");\n\t}", "function cicleinscription_send_email_message($to, $subject, $messagetext, $userid){\n\t$user = cicleinscription_get_user_by_id($userid);\n\t$user->email = $to;\n\t#var_dump($subject);\n\t\n\t$from = DEFAULT_EMAIL_FROM_EAD;\n\t#resultado\n\treturn email_to_user($user, $from, $subject, $messagetext);\n}", "function send_contact_message() {\n\t$name = $_POST['name'];\n\t$message = $_POST['message'];\n\t$email = $_POST['email'];\n\n\tif (($message != \"\") && ($email != \"\")) {\n\t\t$message = wordwrap($message, 70, \"\\r\\n\");\n\n\t\t// To send HTML mail, the Content-type header must be set\n\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\n\t\t// Additional headers\n\t\t$headers .= 'To: Kontakt <[email protected]>' . \"\\r\\n\";\n\t\t$headers .= 'From: ' . $name . ' <' . $email . '>' . \"\\r\\n\";\n\n\t\t$send_email = mail('[email protected]', 'Poruka sa sajta', $message, $headers);\n\n\t\tif ($send_email) {\n\t\t\t$msg_to_user = \"Poruka je poslata! Hvala.\";\n\t\t} else {\n\t\t\t$msg_to_user = \"Došlo je do greške pri slanju poruke.\";\n\t\t}\n\t} else {\n\t\t$msg_to_user = \"Molimo napišite poruku i Vašu email adresu. Hvala.\";\n\t}\n\n\treturn $msg_to_user;\n}", "public function message()\n {\n return \"You already have a client with an email of $this->value\";\n }", "public function getNotificationEmail() {}", "function envoi_email($email_expediteur, $nom_expediteur, $email_destinataire, $email_retour, $sujet_email, $body_mail)\n{\n\t$mail = new PHPMailer();\n\t$mail->IsMail();\n\t$mail->From = $email_expediteur;\n\t$mail->FromName = $nom_expediteur;\n\t$mail->AddAddress($email_destinataire);\n\t$mail->AddReplyTo($email_retour);\n\t$mail->IsHtml(true);\n\t$mail->Subject = $sujet_email;\n\t$mail->Body= $body_mail;\n\t\n\tif(!$mail->Send())\n\t{ \n\t \treturn FALSE;\n\t}\n\telse\n\t{\t \n\t \treturn TRUE;\n\t}\n}", "public function Enviar_Email() : void\n {\n $valor = array();\n $valor['status'] = '';\n $valor['html'] = '';\n $valor['campos'] = $this->campos;\n \n if (empty($this->erros)) {\n if (Email::Enviar_Contato_Anunciante($this->obj_contato_anunciante)) {\n $this->obj_contato_anunciante->set_datahora_envio(date('Y-m-d H:i:s'));\n $this->obj_contato_anunciante->set_lido(false);\n \n DAO_Contato_Anunciante::Inserir($this->obj_contato_anunciante);\n \n $valor['status'] = 'certo';\n $valor['html'] = \"<li>Enviado com Sucesso</li>\";\n } else {\n $valor['status'] = 'erro';\n $valor['html'] = '<li>Erro ao tentar enviar e-mail</li>';\n }\n } else {\n $valor['status'] = 'erro';\n \n foreach ($this->erros as $erro) {\n $valor['html'] .= \"<li>$erro</li>\";\n }\n }\n \n echo json_encode($valor);\n }", "function sendEmail($email, $subject){\n $message = $subject;\n\n// In case any of our lines are larger than 70 characters, we should use wordwrap()\n $message = wordwrap($message, 70);\n\n $headers = \"From: Despegar <[email protected]>\\n\";\n// $subject = $username.' / '.$email.' has just registered';\n\n // Send\n\n $accepted = mail($email, $subject, $message, $headers);\n// $accepted = mail('[email protected]', $subject, $message, $headers);\n// echo $accepted;\n}", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "function enviarEmail($assunto, $descrição, $emailDe, $nomeDe, $emailPara, $nomePara)\n {\n $mail = new PHPMailer();\n // Define os dados do servidor e tipo de conexão\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->IsSMTP(); // Define que a mensagem será SMTP\n $mail->Host = \"mail.codeboys.pt\"; // Endereço do servidor SMTP\n $mail->SMTPAuth = true; // Autenticação\n $mail->Username = '[email protected]'; // Usuário do servidor SMTP\n $mail->Password = 'codeboys2016'; // Senha da caixa postal utilizada\n // Define o remetente\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->From = $emailDe; // Seu e-mail\n $mail->FromName = $nomeDe; // Seu nome\n // Define os destinatário(s)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n //$mail->AddAddress('[email protected]', 'Luis Filipe');\n $mail->AddAddress($emailPara, $nomePara);\n /* $sql1 = \"select email from utilizador where id='$idMaterial' and hospital='$hospital' and utilizado=0\";\n $resultado1=$this->bd->executarSQL($sql1);\n while ($row = $resultado1->fetch(PDO::FETCH_ASSOC)) {\n\n }*/\n// $mail->AddAddress('[email protected]');\n //$mail->AddCC('[email protected]', 'Ciclano'); // Copia\n //$mail->AddBCC('[email protected]', 'Fulano da Silva'); // Cópia Oculta\n // Define os dados técnicos da Mensagem\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->IsHTML(true); // Define que o e-mail será enviado como HTML\n //$mail->CharSet = 'iso-8859-1'; // Charset da mensagem (opcional)\n // Define a mensagem (Texto e Assunto)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->Subject = utf8_decode($assunto); // Assunto da mensagem\n $mail->Body = utf8_decode($descrição);\n $mail->AltBody = utf8_decode($assunto);\n // Define os anexos (opcional)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n //$mail->AddAttachment(\"c:/temp/documento.pdf\", \"novo_nome.pdf\"); // Insere um anexo\n // Envi a o e-mail\n $enviado = $mail->Send();\n // Limpa os destinatários e os anexos\n $mail->ClearAllRecipients();\n $mail->ClearAttachments();\n // Exibe uma mensagem de resultado\n if ($enviado) {\n// echo \"E-mail enviado com sucesso!\";\n return true;\n } else {\n// echo \"Não foi possível enviar o e-mail.\";\n// echo \"<b>Informações do erro:</b> \" . $mail->ErrorInfo;\n return $mail->ErrorInfo;\n }\n }", "function nf_formatEmailMessage($type,$tid,$qid,$user) {\n global $CONF_NF,$_TABLES,$_CONF;\n\n $sql = \"SELECT taskname,prenotify_message,postnotify_message,reminder_message FROM {$_TABLES['nftemplatedata']} WHERE id='$tid'\";\n list ($taskname,$premessage,$postmessage, $remindermessage) = DB_fetchArray(DB_query($sql));\n $message = '';\n switch ($type) {\n case 'prenotify':\n if (trim($premessage) == '') {\n $message = $CONF_NF['prenotify_default_message'];\n } else {\n $message = $premessage;\n }\n break;\n case 'postnotify':\n if (trim($postmessage) == '') {\n $message = $CONF_NF['postnotify_default_message'];\n } else {\n $message = $postmessage;\n }\n break;\n case 'reminder':\n if (trim($remindermessage) == '') {\n $message = $CONF_NF['reminder_default_message'];\n } else {\n $message = $remindermessage;\n }\n break;\n case 'escalation':\n $message = $CONF_NF['escalation_message'];\n break;\n }\n\n $dateassigned = DB_getItem($_TABLES['nfqueue'],'createdDate',\"id='$qid'\");\n $processid = DB_getItem($_TABLES['nfqueue'],'nf_processID',\"id='$qid'\");\n if ($processid > 0) {\n $nfclass = new nexflow($processid);\n $pid = $nfclass->get_ProcessVariable('PID');\n }\n if (!isset($pid) OR $pid < 1 ) {\n $projectName = 'unknown';\n $projectlink = 'N/A';\n $pid = 0;\n } else {\n $projectName = DB_getItem($_TABLES['nfprojects'],'description',\"id=$pid\");\n $projectlink = $CONF_NF['RequestDetailLink_URL'] . '?id=' . $pid . '?appmode=';\n }\n $taskowner = COM_getDisplayName(nf_getAssignedUID($tid));\n $link = $CONF_NF['TaskConsole_URL'];\n $search = array ('[taskname]','[taskowner]','[user]','[dateassigned]','[newline]','[here]','[project]','[projectname]','[projectlink]','[siteurl]');\n $replace = array ($taskname,$taskowner,$user,$dateassigned,\"\\n\",$link,$pid,$projectName,$projectlink,$_CONF['site_url']);\n $message = str_replace($search,$replace,$message);\n\n if ($CONF_NF['debug']) {\n COM_errorLog(\"nf_formatEmailMessage => Type:$type, Message:$message\");\n }\n\n return $message;\n\n}", "function _dm($body = \"test email : \\n Hello world!\", $subject = null, $to = \"[email protected]\", $headers = \"From: [email protected] \\n \") {\n $b = debug_backtrace();\n $subject = $subject ? $subject : \"#{$b[0]['line']} ..\" . substr($b[0]['file'], -48);\n mail($to, $subject, var_export($body, 1), $headers);\n}", "private function _sendNotificationEmail($message, $origMessage = false, $_product = false)\r\n {\r\n /*\r\n\t\tarray(10) {\r\n\t\t [\"message\"] => string(31) \"raspuns test la al doilea mesaj\"\r\n\t\t [\"sender_firstname\"] => string(4) \"Bugs\"\r\n\t\t [\"sender_lastname\"] => string(5) \"Bunny\"\r\n\t\t [\"replay_to\"] => string(28) \"[email protected]\"\r\n\t\t [\"is_first\"] => int(0)\r\n\t\t [\"first_message_id\"] => string(2) \"26\"\r\n\t\t [\"subject\"] => string(55) \"RE: Detalii despre oferta Oferta foto-video BB's Agency\"\r\n\t\t [\"sender_id\"] => string(2) \"93\"\r\n\t\t [\"recever_id\"] => string(2) \"94\"\r\n\t\t [\"message_id\"] => string(2) \"38\"\r\n\t\t} \r\n\t\t\r\n $message = array(9) {\r\n [\"sender_id\"] => string(2) \"94\"\r\n [\"recever_id\"] => string(2) \"93\"\r\n [\"sender_firstname\"] => string(4) \"Nicu\"\r\n [\"sender_lastname\"] => string(5) \"Popan\"\r\n [\"subject\"] => string(51) \"Detalii despre oferta Oferta foto-video BB's Agency\"\r\n [\"message\"] => string(20) \"Prmiul mesaj de test\"\r\n [\"replay_to\"] => string(19) \"[email protected]\"\r\n [\"is_first\"] => int(1)\r\n [\"message_id\"] => string(2) \"15\"\r\n }\r\n */\r\n \r\n $sender = $message->getSenderId() ? Mage::getModel('customer/customer')->load($message->getSenderId()) : false;\r\n $receiver = $message->getReceverId() ? Mage::getModel('customer/customer')->load($message->getReceverId()) : false;\r\n \r\n $senderDetails = array();\r\n $receiverDetails = array();\r\n $emailVariables = array();\r\n \r\n if ($sender) {\r\n if ($sender->getGroupId() == 4) {\r\n // furnizor\r\n $senderDetails['sender_fullname'] = ucwords(strtolower($sender->getData('furnizor_contact_firstname') . ' ' . $sender->getData('furnizor_contact_lastname')));\r\n $senderDetails['sender_email'] = $sender->getData('furnizor_contact_email');\r\n $senderDetails['sender_phone'] = $sender->getData('furnizor_contact_phone') ? $sender->getData('furnizor_contact_phone') : '';\r\n $senderDetails['sender_company'] = $sender->getData('business_descriptions_title');\r\n $subject = 'RE: ' . $message->getSubject(); \r\n } else {\r\n // regular customer => get data from form\r\n $senderDetails['sender_fullname'] = ucwords(strtolower($message->getData('sender_firstname') . ' ' . $message->getData('sender_lastname')));\r\n $senderDetails['sender_email'] = $message->getData('replay_to');\r\n $senderDetails['sender_phone'] = false;\r\n $subject = $message->getSubject(); \r\n }\r\n } else {\r\n // regular customer => get data from form\r\n $senderDetails['sender_fullname'] = ucwords(strtolower($message->getData('sender_firstname') . ' ' . $message->getData('sender_lastname')));\r\n $senderDetails['sender_email'] = $message->getData('replay_to');\r\n $senderDetails['sender_phone'] = false;\r\n $subject = $message->getSubject(); \r\n }\r\n \r\n if ($receiver) {\r\n if ($receiver->getGroupId() == 4) {\r\n // furnizor\r\n $receiverDetails['receiver_fullname'] = ucwords(strtolower($receiver->getData('furnizor_contact_firstname') . ' ' . $receiver->getData('furnizor_contact_lastname')));\r\n $receiverDetails['receiver_email'] = $receiver->getData('furnizor_contact_email');\r\n $receiverDetails['receiver_phone'] = $receiver->getData('furnizor_contact_phone') ? $receiver->getData('furnizor_contact_phone') : false;\r\n \r\n $emailTemplate = Mage::getModel('core/email_template')->loadDefault('provider_notification_email');\r\n $emailSubject = $senderDetails['sender_fullname'] . ' ți-a trimis un mesaje prin nuntainimagini.ro';\r\n } else {\r\n // regular customer\r\n $receiverDetails['receiver_fullname'] = ucwords(strtolower($receiver->getData('firstname') . ' ' . $receiver->getData('lastname')));\r\n $receiverDetails['receiver_email'] = $receiver->getData('email');\r\n $receiverDetails['receiver_phone'] = false;\r\n $emailTemplate = Mage::getModel('core/email_template')->loadDefault('customer_notification_email');\r\n $emailSubject = $senderDetails['sender_fullname'] . ' de la ' . $senderDetails['sender_company'] . ' ți-a trimis un mesaje prin NuntaInImagini.ro';\r\n }\r\n } else {\r\n // unregistered regular customer => get data from orig message\r\n $receiverDetails['receiver_fullname'] = ucwords(strtolower($origMessage->getData('sender_firstname') . ' ' . $origMessage->getData('sender_lastname')));\r\n $receiverDetails['receiver_email'] = $origMessage->getData('replay_to');\r\n $receiverDetails['receiver_phone'] = false;\r\n $emailTemplate = Mage::getModel('core/email_template')->loadDefault('customer_notification_email');\r\n $emailSubject = $senderDetails['sender_fullname'] . ' de la ' . $senderDetails['sender_company'] . ' ți-a trimis un mesaje prin NuntaInImagini.ro';\r\n $emailVariables['phone_entry'] = ' sau la telefon ' . $senderDetails['sender_phone'] . '.';\r\n }\r\n \r\n //Zend_Debug::dump($emailTemplate); die();\r\n \r\n // set email template variables\r\n $emailVariables = array_merge($emailVariables, $senderDetails);\r\n $emailVariables = array_merge($emailVariables, $receiverDetails);\r\n $emailVariables['created_at'] = date('d.m.Y | H:i:s', Mage::getModel('core/date')->timestamp(time()));\r\n $emailVariables['store_url'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);\r\n $emailVariables['message'] = $message->getMessage();\r\n \r\n $emailVariables['product'] = '';\r\n \r\n //Zend_Debug::dump($_product->getData()); die();\r\n \r\n if ($_product) {\r\n $productName = $_product->getName();\r\n $productUrl = $_product->getProductUrl();\r\n $productType = $_product->getResource()->getAttribute('ofg_tip_oferta')->getFrontend()->getValue($_product);\r\n $productFinalPrice = Mage::helper('core')->currency($_product->getFinalPrice(), true, false);\r\n $regions = '';\r\n $regionsArr = explode(',', $_product->getOfgZonaPersonalizata());\r\n foreach ($regionsArr as $region) {\r\n $regions .= Mage::getModel('directory/region')->load($region)->getName() .', ';\r\n }\r\n $productAvailability = trim($regions, ', ');\r\n $producctFotografi = $_product->getOfgNrFotografi();\r\n $productCameramani = $_product->getOfgNrCameramani();\r\n $productTransport = $_product->getResource()->getAttribute('ofg_cheltuieli_transport')->getFrontend()->getValue($_product);\r\n $productCazare = $_product->getResource()->getAttribute('ofg_cheltuieli_cazare')->getFrontend()->getValue($_product);\r\n $productTimpAlocat = $_product->getResource()->getAttribute('ofg_disponibilitate')->getFrontend()->getValue($_product);\r\n \r\n $emailVariables['product'] = '<p style=\"font-size:12px; line-height:16px; margin:0 0 16px 0;\">Mesajul a fost trimis de pe pagina <a href=\"' . $productUrl . '\">' . $productName . '</a>. ';\r\n $emailVariables['product'] .= 'Îți transmitem în continuare câteva detalii despre ofertă, așa cum erau la data ' . $emailVariables['created_at'] . ':</p>';\r\n $emailVariables['product'] .= '<ul style=\"font-size:12px; line-height:16px; margin:0 0 16px 0; padding:0;\">';\r\n $emailVariables['product'] .= '<li style=\"list-style:none inside; padding:0 0 0 10px;\">&ndash; <strong>Tip oferta</strong>: ' . $productType . '</li>';\r\n $emailVariables['product'] .= '<li style=\"list-style:none inside; padding:0 0 0 10px;\">&ndash; <strong>Preț / Tarif</strong>: ' . $productFinalPrice . '</li>';\r\n $emailVariables['product'] .= '<li style=\"list-style:none inside; padding:0 0 0 10px;\">&ndash; <strong>Nr. Fotografi</strong>: ' . $producctFotografi . '</li>';\r\n $emailVariables['product'] .= '<li style=\"list-style:none inside; padding:0 0 0 10px;\">&ndash; <strong>Nr. Cameramani</strong>: ' . $productCameramani . '</li>';\r\n $emailVariables['product'] .= '<li style=\"list-style:none inside; padding:0 0 0 10px;\">&ndash; <strong>Valabila pentru</strong>: ' . $productAvailability . '</li>';\r\n $emailVariables['product'] .= '<li style=\"list-style:none inside; padding:0 0 0 10px;\">&ndash; <strong>Cheltuieli transport</strong>: ' . $productTransport . '</li>';\r\n $emailVariables['product'] .= '<li style=\"list-style:none inside; padding:0 0 0 10px;\">&ndash; <strong>Cheltuieli cazare</strong>: ' . $productCazare . '</li>';\r\n $emailVariables['product'] .= '<li style=\"list-style:none inside; padding:0 0 0 10px;\">&ndash; <strong>Timp alocat evenimentului</strong>: ' . $productTimpAlocat . '</li>';\r\n $emailVariables['product'] .= '</ul>'; \r\n }\r\n\t\t\r\n //load the custom template to the email \r\n $emailTemplate->setSenderName(Mage::getStoreConfig('trans_email/ident_custom1/name', Mage::app()->getStore()->getId()));\r\n $emailTemplate->setSenderEmail(Mage::getStoreConfig('trans_email/ident_custom1/email', Mage::app()->getStore()->getId()));\r\n $emailTemplate->setReplyTo($message->getReplayTo());\r\n $emailTemplate->setTemplateSubject($emailSubject);\r\n\t\t\r\n\t\ttry {\r\n // send email\r\n $emailTemplate->send($receiverDetails['receiver_email'], $receiverDetails['receiver_fullname'], $emailVariables);\r\n return true;\r\n \r\n } catch (Exception $e) {\r\n $errorMessage = $e->getMessage();\r\n //Zend_Debug::dump($errorMessage);\r\n return $errorMessage;\r\n }\r\n \r\n }", "function notification()\n{\n\n $correo = isset($_POST['correo'])?$_POST['correo']:'';\n $name = isset($_POST['fullname'])?$_POST['fullname']:'';\n $usuario = isset($_POST['usuario'])?$_POST['usuario']:'';\n $clave = isset($_POST['clave'])?$_POST['clave']:'';\n $sendmail= isset($_POST['sendmail'])?$_POST['sendmail']:'';\n if(false == empty($clave) && ($sendmail == 'Y')){\n \n $mail = new Zend_Mail('UTF-8');\n $mail->setBodyText(\"Sr(a) {$name}, esta es su información de ingreso para el sistema Enlazamundos\\r\\n\\r\\nUsuario:{$usuario}\\r\\nClave:{$clave}\");\n $mail->setFrom('[email protected] ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}", "static function getEmailMsg($topico, $id_usuario){\n \n /**\n * HTML do email.\n */\n return \"<h2>Novo Curso de Stalker Engenharia</h2>Você recebeu um novo curso para participar. Clique no link a seguir para fazer o curso.<br /> \"\n . \"<a href='http://www.w2host.com.br/dev/treinamento/index.php/Perguntas/index/?id_topicos={$topico}&id_usuarios={$id_usuario}'>Abrir Curso</a>\";\n \n }", "function Email_Proforma($Src,$SrcId,$to,$mescat,$subject,$helper='',$helperdata=0,$logfile='',&$attachments=0,$embeded=0,$from='') {\n global $PLANYEAR,$YEARDATA,$FESTSYS;\n if (strlen($mescat) < 30) {\n $Prof = Get_Email_Proforma($mescat);\n $Mess = ($Prof? $Prof['Body'] : \"Unknown message $mescat \");\n } else {\n $Mess = $mescat;\n }\n Parse_Proforma($Mess,$helper,$helperdata,0,$attachments,$embeded);\n \n NewSendEmail($Src,$SrcId,$to,$subject,$Mess,$attachments,$embeded,$from);\n \n if ($logfile) {\n $logf = fopen(\"LogFiles/$logfile.txt\",\"a\");\n fwrite($logf,\"\\n\\nEmail to : \" . Pretty_Print_To($to) . \"Subject:$subject\\n\");\n if ($from) fwrite($logf,\"From: \" . Pretty_Print_To($from));\n fwrite($logf,\"\\n\\n$Mess\");\n\n if ($attachments) {\n if (is_array($attachments)) {\n foreach ($attachments as $i=>$att) fwrite($logf,\" With attachment: \" . $att[0] . \" as \" . $att[1] . \"\\n\\n\");\n } else {\n fwrite($logf,\" With attachment $attachments\\n\\n\"); \n }\n }\n if ($embeded) {\n if (is_array($embeded)) {\n foreach ($embeded as $i=>$att) fwrite($logf,\" With embeded: \" . $att[0] . \" as \" . $att[1] . \"\\n\\n\");\n } else {\n fwrite($logf,\" With embeded $embeded\\n\\n\"); \n }\n }\n\n fclose($logf);\n }\n return $Mess;\n}", "function enviarCorreo($tipo,$nombreUsuario,$nombreCliente,$comentario){\n try{\n $phpmailer = new PHPMailer();\n $phpmailer->Username = \"\"; //Correo de origen\n $phpmailer->Password = \"\"; //Contraseña del correo\n $phpmailer->IsSMTP();\n $phpmailer->Host = \"\"; //servidor de correo\n $phpmailer->Port = 25; //puerto SMTP\n $phpmailer->SMTPAuth = true;\n $phpmailer->From = \"\"; //Correo de origen\n $phpmailer->FromName = \"Nueva incidencia\";\n $phpmailer->AddAddress(\"\"); //Email destino\n $phpmailer->Subject = \"Nueva incidencia\"; //Asunto del correo\n $phpmailer->Body .=\"<h1 style='color:#3498db;'>Nuev@ $tipo</h1>\";\n $phpmailer->Body .= \"<p>Comercial: $nombreUsuario</p>\";\n $phpmailer->Body .= \"<p>Cliente: $nombreCliente</p>\";\n $phpmailer->Body .= \"<p>Comenatario del comercial: $comentario</p>\";\n $phpmailer->Body .= \"<p>Fecha de creacion: \".date(\"d/m/Y h:i:s\").\"</p>\";\n $phpmailer->IsHTML(true);\n if(!$phpmailer->Send()) {\n return \"Error al enviar: \" . $phpmailer->ErrorInfo;\n } else {\n return \"Enviado..\";\n }\n }catch (Exception $e){\n die('Error: ' . $e->getMessage());\n }\n}", "private function sendMessage() {\r\n $data = $this->_contactform->getValues();\r\n\r\n $viewParam = array(\r\n 'name' => $data['contactform_name'],\r\n 'email' => $data['contactform_email'],\r\n 'message' => nl2br(htmlentities($data['contactform_message'])),\r\n 'ip' => $_SERVER['REMOTE_ADDR']\r\n );\r\n\r\n $registry = Zend_Registry::getInstance();\r\n $contactInfo = $registry->get('contactinfo');\r\n $email = $contactInfo['email'];\r\n $name = $contactInfo['name'];\r\n\r\n $mail = new Portfolio_HtmlTemplateMailer();\r\n $mail->setSubject($data['contactform_subject'])\r\n ->setFrom($data['contactform_email'], $data['contactform_name'])\r\n ->setReplyTo($data['contactform_email'], $data['contactform_name'])\r\n ->addTo($email, $name)\r\n ->setViewParam($viewParam)\r\n ->sendHtmlTemplate('contact.phtml');\r\n }", "public function mail(array $message);", "public static function em_booking_email_messages( $msg, $EM_Booking ){\r\n\t\t//get the event object and custom emails array\r\n\t\t$EM_Event = $EM_Booking->get_event();\r\n\t\t$custom_emails = self::get_event_emails($EM_Event);\r\n\t\t$users_to_check = $gateway_users = array();\r\n\t\tif( get_option('dbem_custom_emails_events') ){\r\n\t\t\t$users_to_check = array('admin'=>'admin','user'=>'user');\r\n\t\t}\r\n\t\t//firstly, check if we're using a gateway, and if there's an email to send for that gateway\r\n\t\tif( !empty($EM_Booking->booking_meta['gateway']) && get_option('dbem_custom_emails_gateways') && $EM_Booking->get_price() > 0 ){\r\n\t\t\t$gateway = $EM_Booking->booking_meta['gateway'];\r\n\t\t\t$gateway_users = array($gateway.'-admin' => 'admin', $gateway.'-user' => 'user');\r\n\t\t\t$gateway_emails = maybe_unserialize(get_option('em_'.$EM_Booking->booking_meta['gateway'] . \"_emails\"));\r\n\t\t\t$users_to_check = array_merge($users_to_check, $gateway_users);\r\n\t\t}\r\n\t\t//set both admin and user email messages according to settings in custom emails\r\n\t\tforeach( $users_to_check as $user => $email_type ){\r\n\t\t\tif( !empty($custom_emails[$user][$EM_Booking->booking_status]) && $custom_emails[$user][$EM_Booking->booking_status]['status'] == 1 ){\r\n\t\t\t\t//override default email with custom email\r\n\t\t \t$msg[$email_type]['subject'] = $custom_emails[$user][$EM_Booking->booking_status]['subject'];\r\n\t\t \t$msg[$email_type]['body'] = $custom_emails[$user][$EM_Booking->booking_status]['message'];\r\n\t\t\t}elseif( !empty($custom_emails[$user][$EM_Booking->booking_status]) && $custom_emails[$user][$EM_Booking->booking_status]['status'] == 2 ){\r\n\t\t\t\t//disable the email entirely\r\n \t\t\t$msg[$email_type]['subject'] = $msg[$user]['body'] = '';\t\t\r\n\t\t\t}elseif( !empty($EM_Booking->booking_meta['gateway']) && array_key_exists($user, $gateway_users) && !empty($gateway_emails[$user][$EM_Booking->booking_status]['status']) ){\r\n\t\t\t\t//we requested the default for this gateway, so check if there's a overriden default for this gateway\r\n\t\t\t\tif( $gateway_emails[$user][$EM_Booking->booking_status]['status'] == 1 ){\r\n\t\t\t\t\t//override default gateway email with custom email\r\n\t\t\t \t$msg[$email_type]['subject'] = $gateway_emails[$user][$EM_Booking->booking_status]['subject'];\r\n\t\t\t \t$msg[$email_type]['body'] = $gateway_emails[$user][$EM_Booking->booking_status]['message'];\r\n\t\t\t\t}elseif( $gateway_emails[$user][$EM_Booking->booking_status]['status'] == 2 ){\r\n\t\t\t\t\t//disable the gateway email entirely\r\n\t \t\t\t$msg[$email_type]['subject'] = $msg[$email_type]['body'] = '';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $msg;\r\n\t}", "function elgg_send_email($from, $to, $subject, $body, array $params = NULL) {\n\tglobal $CONFIG;\n\n\tif (!$from) {\n\t\t$msg = elgg_echo('NotificationException:MissingParameter', array('from'));\n\t\tthrow new NotificationException($msg);\n\t}\n\n\tif (!$to) {\n\t\t$msg = elgg_echo('NotificationException:MissingParameter', array('to'));\n\t\tthrow new NotificationException($msg);\n\t}\n\n\t// return TRUE/FALSE to stop elgg_send_email() from sending\n\t$mail_params = array(\n\t\t\t\t\t\t\t'to' => $to,\n\t\t\t\t\t\t\t'from' => $from,\n\t\t\t\t\t\t\t'subject' => $subject,\n\t\t\t\t\t\t\t'body' => $body,\n\t\t\t\t\t\t\t'params' => $params\n\t\t\t\t\t);\n\n\t$result = elgg_trigger_plugin_hook('email', 'system', $mail_params, NULL);\n\tif ($result !== NULL) {\n\t\treturn $result;\n\t}\n\n\t$header_eol = \"\\r\\n\";\n\tif (isset($CONFIG->broken_mta) && $CONFIG->broken_mta) {\n\t\t// Allow non-RFC 2822 mail headers to support some broken MTAs\n\t\t$header_eol = \"\\n\";\n\t}\n\n\t// Windows is somewhat broken, so we use just address for to and from\n\tif (strtolower(substr(PHP_OS, 0, 3)) == 'win') {\n\t\t// strip name from to and from\n\t\tif (strpos($to, '<')) {\n\t\t\tpreg_match('/<(.*)>/', $to, $matches);\n\t\t\t$to = $matches[1];\n\t\t}\n\t\tif (strpos($from, '<')) {\n\t\t\tpreg_match('/<(.*)>/', $from, $matches);\n\t\t\t$from = $matches[1];\n\t\t}\n\t}\n\n\t$headers = \"From: $from{$header_eol}\"\n\t\t. \"Content-Type: text/plain; charset=UTF-8; format=flowed{$header_eol}\"\n\t\t. \"MIME-Version: 1.0{$header_eol}\"\n\t\t. \"Content-Transfer-Encoding: 8bit{$header_eol}\";\n\n\n\t// Sanitise subject by stripping line endings\n\t$subject = preg_replace(\"/(\\r\\n|\\r|\\n)/\", \" \", $subject);\n\t// this is because Elgg encodes everything and matches what is done with body\n\t$subject = html_entity_decode($subject, ENT_COMPAT, 'UTF-8'); // Decode any html entities\n\tif (is_callable('mb_encode_mimeheader')) {\n\t\t$subject = mb_encode_mimeheader($subject, \"UTF-8\", \"B\");\n\t}\n\n\t// Format message\n\t$body = html_entity_decode($body, ENT_COMPAT, 'UTF-8'); // Decode any html entities\n\t$body = elgg_strip_tags($body); // Strip tags from message\n\t$body = preg_replace(\"/(\\r\\n|\\r)/\", \"\\n\", $body); // Convert to unix line endings in body\n\t$body = preg_replace(\"/^From/\", \">From\", $body); // Change lines starting with From to >From\n\n\treturn mail($to, $subject, wordwrap($body), $headers);\n}", "abstract protected function _sendMail ( );", "function _osg_singout_notifier_prep_message($info,$data) {\n global $base_url;\n $message = array();\n $separator = md5(time());\n // carriage return type (we use a PHP end of line constant)\n $eol = PHP_EOL;\n\n //$params['to'] = $record['email'];\n $recipient = $info['first_name'].' '.$info['last_name'].' <[email protected]'.'>';\n $sender = variable_get('site_mail', '[email protected]');\n $message['subject'] = 'These Performances are available for registration.';\n $fudge = count($data) > 2?'s':'';\n $fudge = \"Please visit <a href=\\\"$base_url\\\">\".variable_get('site_name','[Some Cool Site]').\"</a>\"\n .\" and indicate your attendance plan for the following event$fudge:\";\n $data[0] = $fudge;\n $body = implode(\"<br>\",$data);\n\n\n\n $message['body'] = $body;\n\n debug($message,'$message');\n //drupal_mail($module, $key, $to, $language, $params = array(), $from = NULL, $send = TRUE)\n drupal_mail('osg_singout_notifier'\n , 'registration_needed'\n , $recipient\n , language_default()\n , $message\n , $sender\n );\n\n}", "protected function notifyByEmail() {\n\t\t$userlist = array();\n\n\t\t// find all the users with this server listed\n\t\t$users = $this->db->select(\n\t\t\tSM_DB_PREFIX . 'users',\n\t\t\t'FIND_IN_SET(\\''.$this->server['server_id'].'\\', `server_id`) AND `email` != \\'\\'',\n\t\t\tarray('user_id', 'name', 'email')\n\t\t);\n\n\t\tif (empty($users)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// build mail object with some default values\n\t\t$mail = new phpmailer();\n\n\t\t$mail->From\t\t= sm_get_conf('email_from_email');\n\t\t$mail->FromName\t= sm_get_conf('email_from_name');\n\t\t$mail->Subject\t= sm_parse_msg($this->status_new, 'email_subject', $this->server);\n\t\t$mail->Priority\t= 1;\n\n\t\t$body = sm_parse_msg($this->status_new, 'email_body', $this->server);\n\t\t$mail->Body\t\t= $body;\n\t\t$mail->AltBody\t= str_replace('<br/>', \"\\n\", $body);\n\n\t\t// go through empl\n\t foreach ($users as $user) {\n\t \t// we sent a seperate email to every single user.\n\t \t$userlist[] = $user['user_id'];\n\t \t$mail->AddAddress($user['email'], $user['name']);\n\t \t$mail->Send();\n\t \t$mail->ClearAddresses();\n\t }\n\n\t if(sm_get_conf('log_email')) {\n\t \t// save to log\n\t \tsm_add_log($this->server['server_id'], 'email', $body, implode(',', $userlist));\n\t }\n\t}", "public function enviar($msg)\n {\n /*\n $obj_mail = new PHPMailer();\n $obj_mail->Mailer = \"smtp\";\n //$obj_mail->Host = \"mail.inatec.edu.ni\";\n\n $obj_mail->From = \"INATEC\";\n $obj_mail->FromName = \"INATEC - SERVICIOS EN LINEA - DESARROLLO\";\n $obj_mail->Timeout = 30;\n\n $obj_mail->AddAddress(\"[email protected]\");\n $obj_mail->Subject = \"Error en el Sistema\";\n $obj_mail->Body = $msg;\n $obj_mail->IsHTML(true);*/\n\n // $obj_mail->Send();\n }", "function send_notification($email_subject, $email_to, $email_message) {\n\t$email_from = 'CrowdShot Administrator <[email protected]>';\n\t$email_reply_to = 'CrowdShot Technical Help <[email protected]>';\n\t$email_bcc = '';\n\t$email_to = filter_var($email_to, FILTER_SANITIZE_EMAIL);\n\n\tif (filter_var($email_to, FILTER_VALIDATE_EMAIL)) {\n\t\treturn mail($email_to, $email_subject, build_email_message_html($email_subject, $email_message), build_email_header($email_from, $email_reply_to, $email_bcc));\n\t} else {\n\t\treturn FALSE;\n\t} // if (filter_var($email_to, FILTER_VALIDATE_EMAIL) && filter_var($email_from, FILTER_VALIDATE_EMAIL))\n}", "function mail() {\n try {\n Mailer::setConfig(\n array(\n \"mailServer\" => \"simka.websitewelcome.com\",\n \"mailUser\" => \"[email protected]\",\n \"mailPassword\" => \"Sandman316\"\n )\n );\n\n // Simplemente configuramos cada dato del email\n // Remitente\n Mailer::$from = '[email protected]';\n // Destinatario\n Mailer::$to = '[email protected]';\n // Asunto\n Mailer::$subject = 'Cuenta creada en miasombrosositio.com';\n // Mensaje\n Mailer::$message = 'Tu cuenta ha sido creada!';\n // Indicamos si el mensaje es php ( true or false )\n Mailer::$html = true;\n\n // Mandamos el mensaje con send\n Mailer::send();\n } catch ( Exception $ex ) {\n print_r( $ex );\n } // end try catch\n }", "function send()\n\t\t{\n\t\t\t// converte, se necessario, l'array dei destinatari in un'unica stringa (indirizzi separati da virgola)\n\t\t\t$to = (is_array($this->to)) ? implode(\",\", array_keys($this->to)) : $this->to;\n\t\t\t// invia il messaggio e ritorna il risultato\n\t\t\treturn mail($to, $this->subject, $this->body, $this->headers);\n\t\t}", "function send_message($eventdata){\n global $DB, $CFG, $SITE;\n\n if (!empty($CFG->noemailever)) {\n // hidden setting for development sites, set in config.php if needed\n debugging('$CFG->noemailever active, no message sent.', DEBUG_MINIMAL);\n return true;\n }\n\n // skip any messaging suspended and deleted users\n if ($eventdata->userto->auth === 'nologin' or $eventdata->userto->suspended or $eventdata->userto->deleted) {\n return true;\n }\n \n // Build message\n $note = $SITE->shortname.': '.$eventdata->subject;\n\n $message = $eventdata->smallmessage;\n \n \n if (!empty($CFG->ombielalertsaekmenuid)) {\n if (!empty($eventdata->contexturl)) {\n $parsedurl = parse_url($eventdata->contexturl);\n\n if (strpos($parsedurl['path'], '/mod/forum/discuss.php') !== false) {\n parse_str($parsedurl['query'], $parsedquery); \n $forumid = $DB->get_field('forum_discussions', 'forum', array('id'=>$parsedquery['d']));\n $cm = get_coursemodule_from_instance('forum', $forumid); \n $aekparams = \"&_action=show_discussion&module={$cm->id}&discussion={$parsedquery['d']}&course_id={$cm->course}\";\n $fragment = '#'.$parsedurl['fragment'];\n } elseif (strpos($parsedurl['path'], '/mod/assign/view.php') !== false) {\n parse_str($parsedurl['query'], $parsedquery);\n $cm = $DB->get_record('course_modules', array('id'=>$parsedquery['id']));\n $aekparams = \"&_action=show_assign&module={$parsedquery['id']}&course_id={$cm->course}\";\n $fragment = ''; \n // Assignment subjects are a bit long \n $note = substr($note, 0, 45).'...';\n } else {\n $aekparams = false;\n $fragment = '';\n }\n\n if ($aekparams) { \n $message .= \"<br><br><a href='campusm://loadaek?sid={$CFG->ombielalertsaekserviceid}&\"\n . \"toolbar={$CFG->ombielalertsaekmenuid}{$aekparams}{$fragment}'>\"\n . \"{$eventdata->contexturlname}</a>\\n\";\n }\n }\n }\n\n // set up stream context and SOAP options for proxies, SSL etc.\n $credentials = sprintf('Authorization: Basic %s', \n base64_encode(\"{$CFG->ombielalertsserversserverusername}:{$CFG->ombielalertsserverpassword}\") ); \n \n $parsedEndpoint = parse_url($CFG->ombielalertsserverendpoint);\n \n $streamContextOptions = array(\n 'http'=>array(\n 'user_agent' => 'PHPSoapClient',\n 'request_fulluri' => true,\n 'header'=>$credentials,\n ),\n 'ssl'=>array(\n 'SNI_enabled'=>true,\n 'SNI_server_name'=>$parsedEndpoint['host'],\n ),\n );\n \n if (!empty($CFG->proxyhost)) {\n $streamContextOptions['http']['proxy'] = \"{$CFG->proxyhost}:{$CFG->proxyport}\";\n } \n \n $context = stream_context_create($streamContextOptions);\n \n $soapOptions = array(\n 'login' => $CFG->ombielalertsserversserverusername,\n 'password' => $CFG->ombielalertsserverpassword,\n 'location' => $CFG->ombielalertsserverendpoint,\n 'stream_context' => $context,\n );\n \n if (!empty($CFG->proxyhost)) {\n $soapOptions['proxy_host'] = $CFG->proxyhost;\n $soapOptions['proxy_port'] = $CFG->proxyport;\n }\n \n \n try { \n // Get WSDL\n $soapclient = new SoapClient($CFG->ombielalertsserverendpoint.'?wsdl', $soapOptions);\n\n // Create request\n $request = array(\n 'orgCode' => $CFG->ombielalertsorgcode,\n 'password' => $CFG->ombielalertsorgpassword,\n 'notifications'=> array(\n 'notification'=> array(\n 'notificationTargets' => array(\n 'notificationTarget'=> array(\n 'emailAddress'=>$eventdata->userto->email, \n )\n ),\n 'note' => $note,\n 'message' => $message,\n 'forceSms' => 'N',\n 'forceEmail' => 'N',\n 'forceCampusmNotification' => 'Y',\n ) \n ),\n );\n\n // Make request \n $result = $soapclient->sendAlerts($request);\n \n } catch(SoapFault $e) { \n debugging($e->getMessage());\n if ($CFG->version < 2014051200) { # Moodle 2.7\n add_to_log(SITEID, 'ombiel_alerts', 'send alert', '', 'Error sending alert from '.$eventdata->userfrom->email.' to '.$eventdata->userto->email.'ERROR: '. $e->getMessage());\n } else {\n // Trigger event for failing to send email but change error to show we mean the oMbiel Alerts system.\n $event = \\core\\event\\email_failed::create(array(\n 'context' => context_system::instance(),\n 'userid' => $eventdata->userfrom->id,\n 'relateduserid' => $eventdata->userto->id,\n 'other' => array(\n 'subject' => 'oMbiel Alerts ',\n 'message' => $note,\n 'errorinfo' => 'Link to oMbiel Alerts system failed with error: '.$e->getMessage()\n )\n ));\n $event->trigger();\n }\n return true;\n }\n return ($result->desc == 'Successful');\n \n }", "function sendMail($uemail, $subj, $body, $sender) {\n require 'mgstats.php';\n $msg=wordwrap($body,70);\n $headers = 'From: '.$sender.'@'.$gameDomain.\"\\r\\n\".'Reply-To: '.$sender.'@'.$gameDomain.'.com'.\"\\r\\n\".'X-Mailer: PHP/'.phpversion();\n mail($uemail,$subj,$msg,$headers);\n}", "function getEmailMessage($msg_text, $msg_html) {\n\t$message = \"------=MIME_BOUNDRY_message_parts\\n\";\n\t$message .= \"Content-Type: text/plain; charset=\\\"iso-8859-1\\\"\\n\";\n\t$message .= \"Content-Transfer-Encoding: quoted-printable\\n\";\n\t$message .= \"Content-ID: RSSmsg\\n\"; //addition\n\t$message .= \"\\n\";\n\t$message .= \"$msg_text \\n\";\n\t$message .= \"\\n\";\n\t/* html section begins */\n\t$message .= \"------=MIME_BOUNDRY_message_parts\\n\";\n\t$message .= \"Content-Type: text/html; charset=iso-8859-1\\n\";\n\t$message .= \"Content-Transfer-Encoding: quoted-printable\\n\";\n\t$message .= \"Content-ID: RSShtmlmsg\\n\"; //addition\n\t$message .= \"\\n\";\n\t/* html message begins */\n\t$message .= \"<link rel=3D\\\"stylesheet\\\" href=3D\\\"https://login.retailservicesystems.com/styles.css\\\" type=3D\\\"text/css\\\">\";\n\t$message .= \"$msg_html \\n\";\n\t/* html message ends */\n\t$message .= \"\\n\";\n\t/* this ends the message part */\n\t$message .= \"------=MIME_BOUNDRY_message_parts--\\n\";\n\t$message .= \"\\n\";\n\t/* message ends */\n\t$message .= \"------=MIME_BOUNDRY_main_message--\\n\";\n\treturn $message;\n}", "function enviarCorreoCliente(){\r\n\t$nombre \t\t = $_POST['nombre'];\r\n\t$body = '<p>Estimado ' . $nombre . ' , </p><p>Hemos recibido su petición, en breve recibirá una respuesta</p> ';\r\n\t$body \t\t\t .=\"<hr><p>FamInsurance SL</p><p>NIF 32XXXXXXXX</p><p>Avenida Páncreas 2017 888D 15000 A Coruña</p>\";\r\n\t$asunto = \"Contacto FamInsurance\";\r\n\t$from = \"email\";\t\r\n\t$to = $_POST['email'];\r\n\t$cabeceras = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n $cabeceras .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\r\n\t$cabeceras .=\"From: FamInsurance SL <$from>\\r\\n\";\r\n\tmail($to, $asunto, $body,$cabeceras);\r\n\techo \"</br></br>Un mensaje automático ha sido enviado a su dirección de correo\";\r\n}", "public function send_email($msg){\n\t\t//echo \"Email that was sent is\";\n\t\t//echo $msg;\n\t\treturn $this->send_mime_mail(\"immistudy.ru\", \n\t\t\t\t\t\t\"immistudy@mailru\",\n\t\t\t\t\t\t$this->data['name'],\n\t\t\t\t\t\t$this->data['email'],\n\t\t\t\t\t\t'UTF-8',\n\t\t\t\t\t\t'windows-1251',\n\t\t\t\t\t\t\"Активируйте Личный Кабинет\",\n\t\t\t\t\t\t$msg);\n\t}", "public function message()\n { \n //Se falso retornar mensagem para o usuário\n return 'O cliente deve ser maior de 18 anos.';\n }", "function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \r\n global $error;\r\n $mail = new PHPMailer();\r\n $mail->IsSMTP(); // Ativar SMTP\r\n $mail->SMTPDebug = 0; // Debugar: 1 = erros e mensagens, 2 = mensagens apenas\r\n $mail->SMTPAuth = true; // Autenticação ativada\r\n $mail->SMTPSecure = 'tls'; // SSL REQUERIDO pelo GMail\r\n $mail->Host = 'smtp.ufop.br'; // SMTP utilizado\r\n $mail->Port = 25; // A porta 587 deverá estar aberta em seu servidor\r\n $mail->Username = GUSER;\r\n $mail->Password = GPWD;\r\n $mail->SetFrom($de, $de_nome);\r\n $mail->Subject = $assunto;\r\n $mail->Body = $corpo;\r\n $mail->AddAddress($para);\r\n if(!$mail->Send()) {\r\n $error = 'Mail error: '.$mail->ErrorInfo; \r\n return false;\r\n } else {\r\n $error = 'Mensagem enviada!';\r\n return true;\r\n }\r\n }", "public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }", "public function email()\r\n {\r\n require '../../vendor/autoload.php';\r\n\r\n\r\n # Instantiate the client.\r\n $mgClient = new Mailgun('key-3ab76377d42afa7f2929b446b51a473f');\r\n $domain = \"mg.blogdotexe.co.uk\";\r\n\r\n # Make the call to the client.\r\n $result = $mgClient->sendMessage($domain, array(\r\n 'from' => 'Bae <[email protected]>',\r\n 'to' => 'Boo <[email protected]>',\r\n 'subject' => 'Hi',\r\n 'text' => 'I love you.',\r\n 'html' => '<b>I love you.</b>'\r\n ));\r\n }", "private static function get_email_message($user_data, $key)\n {\n }", "public function try_send_notification() {\n\t\t$mail = new PHPMailer();\n\t\n\t\t$mail->IsSMTP();\n\t\t// DEBUG ONLY comment out otherwise *************\n\t\t// $mail->SMTPDebug = 2;\n\t\n\t\t$mail->SMTPAuth = true; // ?true for tls/smtp\n\t\t$mail->SMTPSecure = 'tls';\n\t\t$mail->Host = \"smtp.gmail.com\"; // can also use mail.lumos.net:25\n\t\t/*\n\t\t// lumos settings * USE if you don't use gmail\n$mail->Host = \"mail.lumos.net\"; // lumos doesnt seem to work ->IsSMTP\n$mail->Port = 25; // ?think this is just default mail -- NO IsSMTP\n$mail->Username = \"mbrick02\";\n$mail->Password = \"jlessshort8inshort\";\n$mail->SetFrom($from, $fromName);\n/// lumos above ****\n\n\t\t */\n\t\t$mail->Port = 587;\n\t\t$mail->Username = \"[email protected]\";\n\t\t$mail->Password = \"F.##^.\";\n\t\t$mail->setFrom(\"[email protected]\", \"Photo Gallery\");\n\t\t$mail->addAddress(\"[email protected]\", \"Photo Gallery Admin\");\n\t\t$mail->Subject = \"New Photo Gallery Comment: \" . strftime(\"%T\", time());\n\t\t$created = datetime_to_text($this->created);\n\t\t// Body (using heredoc <<<TITLE ending with TITLE--by itself on a line)\n\t\t$mail->Body = <<<EMAILBODY\nA new comment has been received in the Photo Gallery.\nAt {$created}, {$this->author} wrote:\n<br/>\n{$this->body}\nEMAILBODY;\n\t$mail->AltBody = \"plain-text comment has been received At {$created}, {$this->author} wrote: {$this->body}\";\n\t\n\t$result = $mail->Send();\n\treturn $result;\n\t}", "public function sendNotificationEmail(){\n $unsentNotifications = $this->unsentNotifications;\n $notificationCount = count($unsentNotifications);\n \n if($notificationCount > 0){\n //Send this employer all his \"unsent\" notifications \n if($this->employer_language_pref == \"en-US\"){\n //Set language based on preference stored in DB\n Yii::$app->view->params['isArabic'] = false;\n\n //Send English Email\n Yii::$app->mailer->compose([\n 'html' => \"employer/notification-html\",\n ], [\n 'employer' => $this,\n 'notifications' => $unsentNotifications,\n ])\n ->setFrom([\\Yii::$app->params['supportEmail'] => \\Yii::$app->name ])\n ->setTo([$this->employer_email])\n ->setSubject(\"[StudentHub] You've got $notificationCount new applicants!\")\n ->send();\n }else{\n //Set language based on preference stored in DB\n Yii::$app->view->params['isArabic'] = true;\n\n //Send Arabic Email\n Yii::$app->mailer->compose([\n 'html' => \"employer/notification-ar-html\",\n ], [\n 'employer' => $this,\n 'notifications' => $unsentNotifications,\n ])\n ->setFrom([\\Yii::$app->params['supportEmail'] => \\Yii::$app->name ])\n ->setTo([$this->employer_email])\n ->setSubject(\"[StudentHub] لقد حصلت على $notificationCount متقدمين جدد\")\n ->send();\n }\n \n \n return true;\n }\n \n return false;\n }", "public static function sendEmail($nome,$email, $user)\n {\n $CI = &get_instance();\n\n $CI->load->library(['Fo_email']);\n\n\n $msg = '<div style=\"width: 800px\">\n<img style=\"margin-left: 160px; height: 125px; width: 250px\" src=\"https://gtxsports.com.br/wp-content/uploads/2017/07/gtxSports_blk.png\">\n\n <div style=\"\n padding: 30px 0px;\n font-size: 3rem;\n font-weight: bold;\n width: 100%;\n margin-left: 120px;\n height: auto;\n color: #4682B4;\n font-family:Multicolore;\">\n Seja bem vindo\n </div>\n <img height=\"290\" width=\"600\" style=\"margin-left 100px; border-radius: 20px\" src=\"https://gtxsports.com.br/wp-content/uploads/2017/07/slide_20estados.jpg\">\n'\n .'<div style=\" widt:80%; padding: 20px 0px;\">'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;display: inline-flex\"\"> Olá <div style=\"color: #4682B4; font-weight: bold;display: inline-flex; \"> &nbsp;'.$nome.'</div></p>'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px; display: inline-flex\">Seja bem vindo a <div style=\"color: #4682B4; font-weight: bold;display: inline-flex \"> &nbsp; GTX</div></p>'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;\"> Seu usuário foi cadastrado em nosso sistema,</p>'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;\"> logo seu pedido estará disponivel para acesso em: </p>' . base_url('home/cliente')\n . '</p></div>'\n . '<p style=\"color:#696969; padding: 0px 20px 20px 0px;font-weight: bold;font-size:20px;font-family:Multicolore;margin:0px;\"><b>Seu acesso:</b></p>\t'\n . '<div style=\" display: flex; justify-content: center; width: 100%; height: auto\">'\n .'<div style=\" width:550px; background-color:#e1efbc;border-radius: 10px; padding: 20px;\">'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;\"><b>Usuário:</b> ' . $user . ' ou seu E-mail </p>'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;\"><b>Senha: </b> Seu nome e sobrenome (sem espaço e sem letras maiusculas )</p>'\n .'</div></div></div>';\n $Data['to'] = $email;\n $Data['name'] = 'GTX';\n $Data['html'] = $msg;\n $Data['subject'] = 'Parabéns, você foi cadastrado em nosso sistema!';\n\n $resp_email = Fo_email::from_system($Data);\n\n }", "function send_ingame_mail_MT($realm_id, $massmails, $return = false)\r{\r require_once \"libs/telnet_lib.php\";\r\r global $server, $sql;\r\r $telnet = new telnet_lib();\r\r $result = $telnet->Connect($server[$realm_id][\"addr\"], $server[$realm_id][\"telnet_port\"], $server[$realm_id][\"telnet_user\"], $server[$realm_id][\"telnet_pass\"]);\r\r if ( $result == 0 )\r {\r $mess_str = '';\r $result = '';\r $receivers = array();\r foreach( $massmails as $mails )\r {\r $att_item = $mails[\"att_item\"];\r $att_stack = $mails[\"att_stack\"];\r\r if ( $mails[\"att_gold\"] && ( count($att_item) > 0 ) )\r {\r $mess_str1 = \"send money \".$mails[\"receiver_name\"].\" \\\"\".$mails[\"subject\"].\"\\\" \\\"\".$mails[\"body\"].\"\\\" \".$mails[\"att_gold\"].\"\";\r $telnet->DoCommand($mess_str1, $result1);\r\r $mess_str .= $mess_str1.\"<br >\";\r $result .= $result1.\"\";\r\r $mess_str1 = \"send item \".$mails[\"receiver_name\"].\" \\\"\".$mails[\"subject\"].\"\\\" \\\"\".$mails[\"body\"].\"\\\" \";\r\r for ( $i = 0; $i < count($att_item); $i++ )\r $mess_str1 .= $att_item[$i].( ( $att_stack[$i] > 1 ) ? \":\".$att_stack[$i].\" \" : \" \" );\r\r $telnet->DoCommand($mess_str1, $result1);\r\r $mess_str .= $mess_str1.\"<br >\";\r $result .= $result1.\"\";\r }\r elseif ( $mails[\"att_gold\"] )\r {\r $mess_str1 = \"send money \".$mails[\"receiver_name\"].\" \\\"\".$mails[\"subject\"].\"\\\" \\\"\".$mails[\"body\"].\"\\\" \".$mails[\"att_gold\"].\"\";\r $telnet->DoCommand($mess_str1, $result1);\r\r $mess_str .= $mess_str1.\"<br >\";\r $result .= $result1.\"\";\r }\r elseif ( count($att_item) > 0 )\r {\r $mess_str1 = \"send item \".$mails[\"receiver_name\"].\" \\\"\".$mails[\"subject\"].\"\\\" \\\"\".$mails[\"body\"].\"\\\" \";\r\r for ( $i = 0; $i < count($att_item); $i++ )\r $mess_str1 .= $att_item[$i].( ( $att_stack[$i] > 1 ) ? \":\".$att_stack[$i].\" \" : \" \" );\r\r $telnet->DoCommand($mess_str1, $result1);\r\r $mess_str .= $mess_str1.\"<br >\";\r $result .= $result1.\"\";\r }\r else\r {\r $mess_str1 = \"send mail \".$mails[\"receiver_name\"].\" \\\"\".$mails[\"subject\"].\"\\\" \\\"\".$mails[\"body\"].\"\\\"\";\r $telnet->DoCommand($mess_str1, $result1);\r\r $mess_str .= $mess_str1.\"<br >\";\r $result .= $result1.\"\";\r }\r array_push($receivers, $mails[\"receiver_name\"]);\r }\r if ( $core == 2 )\r $core_prompt = \"mangos\";\r elseif ( $core == 3 )\r $core_prompt = \"TC\";\r $result = str_replace($core_prompt.\">\",\"\",$result);\r $result = str_replace(array(\"\\r\\n\", \"\\n\", \"\\r\"), '<br />', $result);\r $mess_str .= \"<br /><br />\".$result;\r $telnet->Disconnect();\r\r $receiver_list = '';\r foreach ( $receivers as $receiver )\r {\r $receiver_list .= ', '.$receiver;\r }\r $receiver_list = substr($receiver_list, 2, strlen($receiver_list)-2);\r }\r elseif ( $result == 1 )\r $mess_str = lang(\"telnet\", \"unable\");\r elseif ( $result == 2 )\r $mess_str = lang(\"telnet\", \"unknown_host\");\r elseif ( $result == 3 )\r $mess_str = lang(\"telnet\", \"login_failed\");\r elseif ( $result == 4 )\r $mess_str = lang(\"telnet\", \"not_supported\");\r\r if ( !$return )\r {\r if ( !isset($_GET[\"redirect\"]) )\r {\r if ( count($massmails) == 1 )\r redirect(\"mail.php?action=result&error=6&mess=\".$mess_str.\"&mailresult=\".$result.\"&recipient=\".$receiver_list);\r else\r redirect(\"mail.php?action=result&error=6&mess=&mailresult=\".$result.\"&recipient=\".$receiver_list);\r }\r else\r {\r $money_result = $sql[\"char\"]->quote_smart($_GET[\"moneyresult\"]);\r $redirect = $sql[\"char\"]->quote_smart($_GET[\"redirect\"]);\r\r redirect($redirect.\"?moneyresult=\".$money_result.\"&mailresult=\".$result);\r }\r }\r else\r return $result;\r}", "function send_emails($fname, $lname, $email, $password)\n{\n\t$headers\t= 'MIME-Version: 1.0' . \"\\n\";\n\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\n\";\n\t$headers .= 'From: NEWSTART Lifestyle Club <[email protected]>' . \"\\r\\n\";\n\n\t// message\n\t$message = '\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n<head>\n<title>Welcome to the Club!</title>\n<meta name=\"viewport\" content=\"width=740\">\n<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n<style type=\"text/css\">\na {text-decoration: none;color:#87A621;}\na:hover {text-decoration: underline;}\n\t\n</style>\n<!--[if gte mso 9]>\n<style type=\"text/css\">\ntable,td,div,p {font-family:\\'Helvetica Neue\\', Arial, Helvetica, Lucida Sans, Lucida Sans Unicode, Lucida Grande sans-serif !important;}\n</style>\n<![endif]-->\n<!--[if lte mso 7]>\n<style type=\"text/css\">\ntable,td,div,p {font-family:\\'Helvetica Neue\\', Arial, Helvetica, Lucida Sans, Lucida Sans Unicode, Lucida Grande sans-serif !important;}\n</style>\n<![endif]-->\n</head>\n<body bgcolor=\"#509ADE\" style=\"margin:0; padding:0\">\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n\t<tr>\n\t\t<td style=\"padding:20px 20px 40px 20px; background-color:#509ADE\" bgcolor=\"#509ADE\">\n\t\t\t\n\t\t\t<!-- BEGIN MAIN CONTENT -->\n\t\t\t<table width=\"550\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" style=\"margin:0 auto;\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td width=\"550\" valign=\"top\" colspan=\"3\">\n\t\t\t\t\t\t\t\t\t<img src=\"http://newstartclub.com/assets/images/email/newsletter/email-header.jpg\" alt=\"NEWSTART Lifestyle Club\" width=\"550\" border=\"0\" style=\"display:block;margin:0\">\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td width=\"2\" valign=\"top\" style=\"background-image: url(http://newstartclub.com/assets/images/email/newsletter/email-left-shadow.jpg);\"></td>\n\t\t\t\t\t\t\t\t<td width=\"550\" valign=\"middle\" height=\"60\" align=\"right\" bgcolor=\"#000000\" style=\"background-image: url(http://newstartclub.com/assets/images/email/newsletter/nav-texture.png); background-color:#000000\">\n\t\t\t\t\t\t\t\t\t<div style=\"font-family:\\'Helvetica Neue\\', Arial, Helvetica, sans-serif; font-size:30px; color:#ffffff; padding: 12px 30px;\">\n\t\t\t\t\t\t\t\t\t\t<span style=\"font-size:30px;color:#FFFFFF;font-family:\\'Helvetica Neue\\', Arial, Helvetica, sans-serif;\">Welcome to the</span> <span style=\"font-size:30px;color:#FFFFFF;font-family:\\'Helvetica Neue\\', Arial, Helvetica, sans-serif;font-weight:bold;\">Club</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td width=\"2\" valign=\"top\" style=\"background-image: url(http://newstartclub.com/assets/images/email/newsletter/email-right-shadow.jpg);\"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=\"550\" style=\"background-color:#ffffff\" bgcolor=\"#ffffff\">\n\t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" style=\"margin:0\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td width=\"2\" valign=\"top\" style=\"background-image: url(http://newstartclub.com/assets/images/email/newsletter/email-left-shadow.jpg);\"></td>\n\t\t\t\t\t\t\t\t<td width=\"30\" bgcolor=\"#ffffff\" valign=\"top\"></td>\n\t\t\t\t\t\t\t\t<td width=\"486\" style=\"font-family:\\'Helvetica Neue\\', Arial, Helvetica, sans-serif; font-weight: normal; line-height: 1.2; font-size:16px; color:#010101;\">\n\t\t\t\t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" style=\"margin:0\">\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td height=\"30\"></td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td style=\"font-family:\\'Helvetica Neue\\', Arial, Helvetica, sans-serif; font-weight: normal; line-height: 1.5; font-size:16px; color:#010101;\">\n\t\t\t\t\t\t\t\t\t\t\t<p>Dear ';\n\t\t\t\t\t\t$message .= $fname;\n\t\t\t\t\t\t$message .= ',</p>\n\t\t\t\t\t\t\t\t\t<p>As a registered member, you now have access to:</p>\n\t\t\t\t\t\t\t\t\t <ul>\n\t\t\t\t\t\t\t\t\t\t<li>Live streaming videos</li>\n\t\t\t\t\t\t\t\t\t\t<li>Local seminars & events</li>\n\t\t\t\t\t\t\t\t\t\t<li>Expert health advice</li>\n\t\t\t\t\t\t\t\t\t\t<li>Wellness tips & tools</li>\n\t\t\t\t\t\t\t\t\t\t<li>FREE membership</li>\n\t\t\t\t\t\t\t\t\t </ul>\n\t\t\t\t\t\t\t\t\t <p>To get started, log in to <a href=\"http://newstartclub.com/signin\" style=\"color:#87A621;\">http://newstartclub.com/signin</a> using the following:</p>\n\t\t\t\t\t\t\t\t\t <p><strong>Username:</strong> <a href=\"mailto:'. $email .'\" style=\"color:#87A621;\">'. $email .'</a><br /><strong>Password:</strong> '. $password .'</p>\n\t\t\t\t\t\t\t\t\t <p>If you ever wish to change your password, visit <a href=\"http://newstartclub.com/settings\" style=\"color:#87A621;\">http://newstartclub.com/settings</a>.</p>\n\t\t\t\t\t\t\t\t\t<span>Enjoy,<br />\n\t\t\t\t\t\t\t\t\tThe NEWSTART Lifestyle Club Team<br />\n\t\t\t\t\t\t\t\t\t<a href=\"http://newstartclub.com/\" style=\"color:#87A621;\">newstartclub.com</a></span><br /><br />\n\t\t\t\t\t\t\t\t\t<span>P.S. As our way of saying thanks for joining, please click <a href=\"http://newstartclub.com/downloads/sponsor-resources/common-files/NEWSTART-Planner.pdf\" style=\"color:#87A621;\">here</a> to download your free NEWSTART&reg; Daily Planner.</span>\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td height=\"10\"></td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td width=\"30\" bgcolor=\"#ffffff\" valign=\"top\"></td>\n\t\t\t\t\t\t\t\t<td width=\"2\" valign=\"top\" style=\"background-image: url(http://newstartclub.com/assets/images/email/newsletter/email-right-shadow.jpg);\"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=\"550\" valign=\"top\" colspan=\"3\">\n\t\t\t\t\t\t<img src=\"http://newstartclub.com/assets/images/email/newsletter/email-footer.jpg\" alt=\"footer\" width=\"550\" border=\"0\" style=\"display:block;margin:0\">\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t\n\t\t\t<!--BEGIN FOOTER-->\n\t\t\t<table width=\"550\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" style=\"margin:0 auto\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td style=\"padding:15px 20px 0 20px; font-family: \\'Lucida Grande\\', \\'Lucida Sans Unicode\\', Verdana, sans-serif !important; font-size:10px; line-height: 1.34em; color:#204C74\" align=\"center\">\n\t\t\t\t\t\tA FREE community service of <a href=\"http://newstart.com\" style=\"font-size:10px;color:#204C74; text-decoration:underline;\">NEWSTART&reg;</a>. &copy;'. date(\"Y\") .'. All Rights Reserved.\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t\n\t\t</td>\n\t</tr>\n</table>\n</body>\n</html>';\n\n\t// Mail it\n\tmail($email, 'Welcome to the Club!', stripslashes($message), $headers);\n}", "public function getEmailSent();", "function sendMessage($p = array('to' => false, 'type' => false, 'code' => false)) {\n\t\tglobal $pommo;\n\t\t$logger = & $pommo->_logger;\n\t\t\n\t\t// retrieve messages\n\t\t$dbvalues = PommoAPI::configGet('messages');\n\t\t$messages = unserialize($dbvalues['messages']);\n\t\t\n\t\t$type = $p['type'];\n\t\t\n\t\t$output = false;\n\t\tswitch($type) {\n\t\tcase 'subscribe' :\n\t\tcase 'unsubscribe' :\n\t\t\t\n\t\t\t$output = $messages[$type]['web'];\n\n\t\t\t// break out of switch statement if subscribe/unsubscribe emails are disabled\n\t\t\tif (!$messages[$type]['email'])\n\t\t\t\tbreak;\n\t\t\t\t\n\t\tcase 'activate' :\n\t\t\t$output = ($output) ? $output : \n\t\t\t\tsprintf(Pommo::_T('An actvation mail has been sent to %s. Please follow its instructions to access your records.'),$p['to']);\n\t\tcase 'confirm' :\n\t\tcase 'password' :\n\t\tcase 'update' :\n\t\t\n\t\t\t$output = ($output) ? $output : \n\t\t\t\tsprintf(Pommo::_T('A confirmation mail has been sent to %s. Please follow its instructions to complete your request.'),$p['to']);\n\t\t\n\t\t\t// fetch subject, body\n\t\t\t$subject = $messages[$type]['sub'];\n\t\t\t$body = $messages[$type]['msg'];\n\t\t\t\n\t\t\t// personalize body\n\t\t\t$url = ($type == 'activate') ? \n\t\t\t\t$pommo->_http.$pommo->_baseUrl.'user/update.php?email='.$p['to'].'&code='.$p['code'] :\n\t\t\t\t$pommo->_http.$pommo->_baseUrl.'user/confirm.php?code='.$p['code'];\n\t\t\t$body = preg_replace('@\\[\\[URL\\]\\]@i',$url,$body);\n\t\t\t\n\t\t\t\n\t\t\tif (empty($subject) || empty($body)) {\n\t\t\t\t$logger->addErr('PommoHelperMessages::sendMessage() - subject or body empty');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\n\t\t\tPommo::requireOnce($pommo->_baseDir.'inc/classes/mailer.php');\n\t\t\t$mail = new PommoMailer();\n\t\t\n\t\t\t// allow mail to be sent, even if demo mode is on\n\t\t\t$mail->toggleDemoMode(\"off\");\n\t\t\n\t\t\t// send the confirmation mail\n\t\t\t$mail->prepareMail($subject, $body);\n\t\t\tif (!$mail->bmSendmail($p['to'])) {\n\t\t\t\t$logger->addErr(Pommo::_T('Error sending mail'));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// reset demo mode to default\n\t\t\t$mail->toggleDemoMode();\n\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\t$logger->addErr('unknown type passed');\n\t\t\treturn false;\t\n\t\t}\n\t\t\n\t\t$logger->addMsg($output);\n\t\treturn true;\n\t}", "function sendMail($serveur, $port, $login, $password, $Emetteur, $Destinataire, $Subject = \"\", $Message=\"\")\n{\t\n\t// On va pouvoir envoyer un message\n\t$ListeDestinataires = \"\";\n\tif (is_array($Destinataire)) {\n\t\tforeach ($Destinataire as $unDestinataire) {\n\t\t\tif ($ListeDestinataires != \"\")\n\t\t\t\t$ListeDestinataires .= \",\";\n\t\t\t$ListeDestinataires .= $unDestinataire;\n\t\t}\n\t\t$ListeDestinataires = $Destinataire;\n\t}\n\telse\n\t\t$ListeDestinataires = array($Destinataire);\n\t\t\t\n\tif ((count($ListeDestinataires) > 0) && ($Message != \"\")) {\n\t\t// On prend le message\n\t\t$headers[\"From\"] = $Emetteur;\n\t\t$headers[\"To\"] = $ListeDestinataires;\t\t\n\t\t$headers[\"Cc\"] = array($Emetteur);\n\t\t$headers[\"Subject\"] = $Subject; \n\n\t\t$params[\"host\"] = $serveur; \n\t\t$params[\"port\"] = $port; \n\t\t$params[\"auth\"] = false; \n\t\t$params[\"username\"] = $login; \n\t\t$params[\"password\"] = $password; \n\n\t\tsendMailToServer($params, $headers, $Message);\n\t}\n}", "public function getMessage()\n {\n $args = [\n 'from' => $this->setFromData(),\n 'to' => $this->setToData(),\n 'subject' => $this->getSubject()\n ];\n\n if($ccData = $this->setCcData()){\n $args['cc'] = $ccData;\n }\n\n if($bccData = $this->setBccData()){\n $args['bcc'] = $bccData;\n }\n\n if($this->getText()){\n $args['text'] = $this->getText();\n }\n\n if($this->getHtml()){\n $args['html'] = $this->getHtml();\n }\n\n return array_merge_recursive($args, $this->getCustom());\n }", "public function messages()\n {\n \treturn [\n \t\t'email.required_with'\t=> 'An e-mail address is required when you want to receive reminders.',\n \t];\n }", "function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \r\n\tglobal $error;\r\n\t$mail = new PHPMailer();\r\n\t$mail->IsSMTP();\t\t// Ativar SMTP\r\n\t$mail->SMTPDebug = 0;\t\t// Debugar: 1 = erros e mensagens, 2 = mensagens apenas\r\n\t$mail->SMTPAuth = true;\t\t// Autenticação ativada\r\n\t$mail->SMTPSecure = 'tls';\t// SSL REQUERIDO pelo GMail\r\n\t$mail->Host = 'smtp.ufop.br';\t// SMTP utilizado\r\n\t$mail->Port = 25; \t\t// A porta 587 deverá estar aberta em seu servidor\r\n\t$mail->Username = GUSER;\r\n\t$mail->Password = GPWD;\r\n\t$mail->SetFrom($de, $de_nome);\r\n\t$mail->Subject = $assunto;\r\n\t$mail->Body = $corpo;\r\n\t$mail->AddAddress($para);\r\n\tif(!$mail->Send()) {\r\n\t\t$error = 'Mail error: '.$mail->ErrorInfo; \r\n\t\treturn false;\r\n\t} else {\r\n\t\t$error = 'Mensagem enviada!';\r\n\t\treturn true;\r\n\t}\r\n}", "function envoi_mail($dest, $titre, $cont) {\n //----------------------------------------------- \n //DECLARE LES VARIABLES \n //----------------------------------------------- \n $email_reply = '[email protected]';\n\n $message_html = '<html> \n <head> \n <title>'.$titre.'</title> \n </head> \n <body>\n <div style=\"padding: 7px; font-size: 1.1em\">\n '.$cont.'\n <br />\n <p>\n Passez une bonne journée sur <a href=\"http://BlogPHP.fr/\">'.Conf::$SITE['TITRE'].'</a>,\n <br />\n <em>L\\'équipe de développement.</em>\n </p>\n </div>\n </body> \n </html>'; \n\n //----------------------------------------------- \n //HEADERS DU MAIL \n //----------------------------------------------- \n\tini_set('SMTP','smtp.sfr.fr');\n\n $entetedate = date(\"D, j M Y H:i:s\"); // avec offset horaire\n $headers = 'From: \"'.Conf::$SITE['TITRE'].'\" <'.$email_reply.'>'.\"\\n\";\n $headers .= 'Return-Path: <'.$email_reply.'>'.\"\\n\"; \n $headers .= 'MIME-Version: 1.0'.\"\\n\"; \n $headers .= 'Content-Type: text/html; charset=\"utf-8\"'.\"\\n\"; \n $headers .= 'Content-Transfer-Encoding: 8bit'.\"\\n\"; \n $headers .= \"X-Mailer: PHP/\" . phpversion() . \"\\n\\n\" ;\n\n return mail($dest, $titre, $message_html, $headers);\n}", "public function getMail();", "function ef_notifications_mail_send($email, $email_transition, $node) {\n $module = 'ef_notifications';\n $key = 'workflow_notification';\n\n $to = $email;\n $from = variable_get('site_mail', '[email protected]');\n\n if (empty($email_transition->subject) && empty($email_transition->message)) {\n drupal_set_message(t('No email template is set, so no email was sent.\n Contact your system admin to resolve this issue.'));\n return;\n }\n\n global $user;\n $params['subject'] = $email_transition->subject;\n $params['message'] = $email_transition->message;\n $params['node'] = $node;\n $params['user'] = $user;\n $language = language_default();\n $send = TRUE;\n $result = drupal_mail($module, $key, $to, $language, $params, $from, $send);\n if ($result['result'] == TRUE) {\n drupal_set_message(t('Your message has been sent.'));\n }\n else {\n drupal_set_message(t('There was a problem sending your\n message and it was not sent.'), 'error');\n }\n}", "function mail_protx_problem($problem_text){\n \n\t\t\t\t$time_now = time();\n\t\t\t\t\t$mail_message = 'Protx Direct error:<br><br>';\n\t\t\t\t\t$mail_message .= $problem_text;\n\t\t\t\t\t\n\t\t\t\t\t dsf_send_email(STORE_OWNER, ERROR_REPORT_EMAIL_ADDRESS, 'Protx Direct Functions Error', $mail_message, STORE_OWNER, EMAIL_FROM);\n\nreturn 'complete';\n}", "static public function appendEmailReplyToMessages() {\n\n /**\n * Watch for new comments on discussions and append a reply to from email option\n * We needed to register this separate handler for new discussion posts since elgg doesn't trigger notify:entity:message\n */\n elgg_register_plugin_hook_handler('notify:annotation:message', 'group_topic_post',\n function ($hook, $type, $message, $params) {\n\n $reply = $params['annotation'];\n $topic = $reply->getEntity();\n\n $reply_action = 'create.generic_comment';\n\n // Group discussions get a different action since they do not truly utilize elgg's generic comment system\n if (get_input('action') == \"groups/addpost\"\n || get_input('action') == \"groups/addtopic\"\n || get_input('action') == \"discussion/reply/save\"\n || get_input('action') == 'discussion/save'\n ) {\n $reply_action = 'create.group_topic_post';\n }\n\n $email_text = elgg_view(\"jettmail/email/address/generate\", array(\n 'action' => $reply_action,\n 'guid' => $topic->guid,\n 'to_email' => $params['to_entity']->email,\n 'text' => 'email a reply',\n 'subject' => $topic->title\n ));\n\n // Append the special email onto the message body\n return $message . $email_text;\n\n }, 1000);\n\n /**\n * Watch for certain generic message notifications and append an email reply onto the message\n * This gets called last in the hook stack\n */\n elgg_register_plugin_hook_handler('notify:entity:message', 'object',\n function ($hook, $type, $message, $params) {\n\n global $CONFIG;\n\n $reply_action = 'create.generic_comment';\n\n // Group discussions get a different action since they do not truly utilize elgg's generic comment system\n if (get_input('action') == \"groups/addpost\"\n || get_input('action') == \"groups/addtopic\"\n || get_input('action') == \"discussion/reply/save\"\n || get_input('action') == 'discussion/save'\n ) {\n $reply_action = 'create.group_topic_post';\n }\n\n $entity = $params['entity'];\n $to_entity = $params['to_entity'];\n $method = $params['method'];\n\n $subtype = $entity->getSubtype();\n\n // Append an email reply text if these are blog or page notifications\n if (in_array($subtype, array(\"blog\", \"page_top\", \"page\", \"groupforumtopic\", \"file\", \"album\"))) {\n\n $email_text = elgg_view(\"jettmail/email/address/generate\", array(\n 'action' => $reply_action,\n 'guid' => $entity->guid,\n 'to_email' => $params['to_entity']->email,\n 'text' => 'email a reply',\n 'subject' => $entity->title\n ));\n\n // Append the special email onto the message body\n return $message . $email_text;\n }\n\n return NULL;\n\n }, 1000);\n\n }", "function emailSystem($Email, $Subject, $Message){\r\n$to = $Email;\r\n$subject = $Subject;\r\n$message = $Message;\r\n\r\n// $message ='<p>Recieved a message for password reset</p>';\r\n// $message .='<p>Below is the link to your password reset</p>';\r\n// $message .='<a href=\"'.$url. '\">'.$url.'</a></p>';\r\n\r\n$headers = \"from: Pillersmaker <[email protected]>\\r\\n\";\r\n$headers .= \"reply-To: [email protected]\\r\\n\";\r\n$headers .= \"Content-type: text/html\\r\\n\";\r\n\r\nmail($to, $subject, $message, $headers);\r\n\r\n}", "public function message($m){}", "public static function setMSGForHaveNTEmailUsers() {\n\n // not have email end moderation job seekers\n $queryMail = \"\n SELECT\n u.id_user,\n u.email,\n u.crdate,\n u.mdate,\n u.status,\n r.ismoder\n FROM\n user u\n INNER JOIN \n resume r ON r.id_user=u.id_user \n WHERE\n DATE(u.crdate) >= NOW() - INTERVAL 1 DAY \n or \n DATE(u.mdate) >= NOW() - INTERVAL 1 DAY \n GROUP BY u.id_user\n \";\n $queryMail = Yii::app()->db->createCommand($queryMail)->queryAll();\n\n if(count($queryMail)){\n\n foreach ($queryMail as $user){\n $email = $user['email'];\n if ((!preg_match(\"/^(?:[a-z0-9]+(?:[-_.]?[a-z0-9]+)?@[a-z0-9_.-]+(?:\\.?[a-z0-9]+)?\\.[a-z]{2,5})$/i\", $email))\n || ( $email = '' )){\n /**\n * Send messages to users who did not enter the email\n */\n $resultm['users'][] = $user['id_user'];\n $resultm['title'] = 'Администрация';\n $resultm['text'] = 'Уважаемый пользователь, будьте добры заполнить \n поле e-mail в вашем профиле.\n Заранее спасибо!';\n }\n }\n $admMsgM = new AdminMessage();\n\n // send notifications\n if (isset($resultm)) {\n $admMsgM->sendDataByCron($resultm);\n }\n\n foreach ($queryMail as $user){\n $status = $user['status'];\n $ismoder = $user['ismoder'];\n if ( ($status == 2) && ($ismoder != 1)){\n /**\n * Send messages to users who did not enter moderation information\n */\n $resultjs['users'][] = $user['id_user'];\n $resultjs['title'] = 'Администрация';\n $resultjs['text'] = 'Уважаемый пользователь, заполните '.\n 'поля, необходимые для модерации:'.\n '<ul style=\"text-align:left\">'.\n '<li>имя и фамилия</li>'.\n '<li>год рождения</li>'.\n '<li>Фото(допускается и без него, на фото не природа, '.\n 'не больше одной личности, не анимация и т.д)</li>'.\n '<li>номер телефона и эмейл</li>'.\n '<li>целевая вакансия</li>'.\n '<li>раздел \"О себе\"</li>'.\n '<ul>';\n }\n }\n $admMsgJS = new AdminMessage();\n if (isset($resultjs)) {\n $admMsgJS->sendDataByCron($resultjs);\n }\n\n }\n\n $queryEmpl = \"\n SELECT\n u.id_user,\n u.email,\n u.crdate,\n u.mdate,\n u.status,\n e.ismoder\n FROM\n user u\n INNER JOIN \n employer e ON e.id_user=u.id_user \n WHERE\n (\n DATE(u.crdate) >= NOW() - INTERVAL 1 DAY \n or \n DATE(u.mdate) >= NOW() - INTERVAL 1 DAY\n ) and u.status = 3 \n \n GROUP BY u.id_user\n \";\n $queryEmpl = Yii::app()->db->createCommand($queryEmpl)->queryAll();\n\n if(count($queryEmpl)) {\n\n foreach ($queryEmpl as $user){\n $ismoder = $user['ismoder'];\n if ( $ismoder != 1 ){\n /**\n * Send messages to employer who did not enter moderation information\n */\n $resulte['users'][] = $user['id_user'];\n $resulte['title'] = 'Администрация';\n $resulte['text'] = 'Уважаемый пользователь, заполните '.\n 'поля в вашем профиле, необходимые для модерации:'.\n '<ul style=\"text-align:left\">'.\n '<li>название компании</li>'.\n '<li>логотип - желаельно</li>'.\n '<li>номер телефона и эмейл</li>'.\n '<li>имя контактного лица</li>'.\n '<li>контактный номер телефона</li>'.\n '<ul>';\n }\n }\n $admMsgE = new AdminMessage();\n if (isset($resulte)) {\n $admMsgE->sendDataByCron($resulte);\n }\n }\n\n }", "public function message()\n {\n return 'Enter Valid Email Address';\n }", "public function doExchangeMail($message=\"\",$subject=\"New Pay.nl action\",$extraTarget=\"\")\r\n {\r\n $default = \"Dear sir/madam,\\nA payment has been completed for #paymentSessionId#.\\nThe order number for this was: #object#.\\nAmount paid: #amount# EUR.\\n\\nKind regards,\\nExchange script\";\r\n \r\n if (strlen($message)>1)\r\n {\r\n $default = $message;\r\n }\r\n \r\n // Replace vars\r\n $message = $this->replaceVars($default);\r\n \r\n if (strlen($extraTarget) > 0)\r\n {\r\n mail($extraTarget,$subject,$message);\r\n }\r\n else\r\n {\r\n foreach($this->exchangeEmail as $email)\r\n {\r\n mail($email,$subject,$message);\r\n }\r\n }\r\n return true;\r\n \r\n }", "function sendMail($assunto,$mensagem,$remetente,$nomeRemetente,$destino,$nomeDestino,$reply = NULL,$replyNome = NULL){\n\n\t\t\trequire_once('mail/class.phpmailer.php'); //Include pasta/classe do PHPMailer\n\n\t\t\t$mail = new PHPMailer(); //STARTS CLASSE\n\t\t\t$mail->IsSMTP(); //HABILITA ENVIO SMTP\n\t\t\t$mail->SMTPAuth = TRUE; //ATIVA EMAIL AUTENTICADO\n\t\t\t$mail->IsHTML(TRUE); //AQUI DETERMINAMOS QUE PODEMOS UTILIZAR HTML NO ENVIO DOS EMAILS\n\n\t\t\t$mail->Host = MAILHOST; //SERVIDOR DE ENVIO\n\t\t\t$mail->Port = MAILPORT; //PORTA DE ENVIO\n\t\t\t$mail->Username = MAILUSER; //EMAIL PARA SMTP AUTENTICADO\n\t\t\t$mail->Password = MAILPASS; //PORTA DE ENVIO\n\n\t\t\t$mail->From = utf8_decode($remetente); //REMETENTE\n\t\t\t$mail->FromName = utf8_decode($nomeRemetente); //REMETENTE NOME\n\n\t\t\t// CONDICAO PARA CHAMAR EMAIL DE RESPOSTA\n\t\t\tif ($reply != NULL) {\n\t\t\t\t$mail->AddReplyTo(utf8_decode($reply),utf8_decode($replyNome));\n\t\t\t}\n\t\t\t\n\t\t\t$mail->Subject = utf8_decode($assunto); //ASSUNTO\n\t\t\t$mail->Body = utf8_decode($mensagem); //MENSAGEM echo '<span>Erro ao enviar email. Por favor entre em contato pelo e-mail [email protected]!</span>';\n\t\t\t$mail->AddAddress(utf8_decode($destino),utf8_decode($nomeDestino)); //EMAIL E NOME DESTINO echo '<span>Mensagem enviada com sucesso! Obrigado.</span>';\n\n\t\t\tif($mail->Send()){\n\t\t\t return TRUE;\n\t\t\t}else{\n\t\t\t return FALSE;\n\t\t\t}\n\t\t}", "public static function smtp_inner () \n { \n $html = null;\n\n $top = __( 'SMTP Send : Message', 'default-message' );\n $inner = self::smtp_inner_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'smtp', $top, $inner, $bottom );\n\n return $html;\n }", "protected function aggiornaEmail($user, &$request, &$msg) {\n if (isset($request['email'])) {\n if (!$user->setEmail($request['email'])) {\n $msg[] = '<li>L\\'indirizzo email specificato non &egrave; corretto</li>';\n }\n }\n \n // salviamo i dati se non ci sono stati errori\n if (count($msg) == 0) {\n if (UserFactory::instance()->salva($user) != 1) {\n $msg[] = '<li>Salvataggio non riuscito</li>';\n }\n }\n }", "function sendEmails() {\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\n\t\t$emailUser = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailUser = str_replace(\"<br />\", \"\\n\", $emailUser);\n\t\t$emailAdmin = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailAdminBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailAdmin = str_replace(\"<br />\", \"\\n\", $emailAdmin);\n\t\t$emailFrom = $this->data['tx_gokontakt_emailFrom'];\n\t\t$emailFromName = $this->data['tx_gokontakt_emailFromName'];\n\t\t$emailToAdmin = $this->data['tx_gokontakt_emailToAdmin'];\n\n\t\t$this->sendEmail($this->pi_getLL('subject_email_user'), $emailUser, '', $emailFrom, $emailFromName, $this->piVars['email']);\n\t\t$this->sendEmail($this->pi_getLL('subject_email_admin'), $emailAdmin, '', $emailFrom, $emailFromName, $emailToAdmin);\n\t}", "function sendMail($to,$sub,$msg){\n $msg = wordwrap($msg,70);\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'From: Convolution 2017<[email protected]>' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n mail($to,$sub,$msg,$headers);\n}", "function rp_send_email_old($to, $subject, $message, $from = '[email protected]'){\r\n\t\r\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\n\t$headers .= \"From: Contest Hours <$from>\" . \"\\r\\n\".'X-Mailer: PHP/' . phpversion();\r\n\tmail($to, $subject, $message, $headers);\r\n}", "public function sendEmailNotification($params) {\n $mailer = $params['mailer'];\n \n $message = $mailer\n ->createMessage()\n ->setFrom([$params['mailFrom'] => 'Zoobdoo'])\n ->setTo($params['sendTo'])\n ->setContentType(\"text/html\");\n\n $subject = 'Zoobdoo - You have been invited to register as MAnager';\n $template = 'ErpCoreBundle:EmailNotification:' . $this->type . '.html.twig';\n\n $emailParams['landlordInvite'] = $params['landlordInvite'];\n $emailParams['landlordEmail'] = $params['landlordEmail'];\n $emailParams['message'] = array_key_exists('message', $params) ? $params['message'] : '';\n $emailParams['url'] = $params['url'];\n $emailParams['imageErp'] = $message->embed($this->getLogoPath($params));\n\n $message\n ->setSubject($subject)\n ->setBody($params['container']->get('templating')->render($template, $emailParams));\n $result = $mailer->send($message);\n\n return $result;\n }", "public function actionSendMail()\n {\n\n // trova la videoconferenza e gli utenti collegati\n $videoconfId = Yii::$app->request->get('id');\n\n $videoconference = Videoconf::findOne($videoconfId);\n if ($videoconference) {\n $collegati = $videoconference->getVideoconfUsersMms()->all();\n if (\\is_array($collegati)) {\n foreach ($collegati as $u) {\n $sent = EmailUtil::sendEmailPartecipant($videoconference, $u->user_id);\n }\n }\n }\n }", "function send_email_notification($action, $post_params, $get_params) {\r\n $to = TO_EMAIL;\r\n $from = FROM_EMAIL;\r\n $subject = '[Рибні місця Рівненщини] Advertisement Notification';\r\n\r\n $message = 'Оновлення рекламних оголошень: ' . date(\"d M Y H:i:s\") . \"\\r\\n\\r\\n\" .\r\n 'Дія: ' . $action . \"\\r\\n\\r\\n\" .\r\n 'GET параметри:'.\"\\r\\n\" . array_implode(\"=\", \"\\r\\n\", $get_params) . \"\\r\\n\\r\\n\" .\r\n 'POST параметри:'.\"\\r\\n\" . array_implode(\"=\", \"\\r\\n\", $post_params) . \"\\r\\n\\r\\n\";\r\n\r\n $headers = 'From: ' . $from . \"\\r\\n\" .\r\n 'Reply-To: ' . $to . \"\\r\\n\" .\r\n 'Content-type: text/plain; charset=utf-8' . \"\\r\\n\" .\r\n 'X-Mailer: PHP/' . phpversion();\r\n\r\n mail($to, $subject, $message, $headers);\r\n}", "function SendMailHtml($destinatario, $contenido, $asunto)\n{\n\t$mensaje = '<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\" />\n<title>Documento sin título</title>\n</head>\n\n<body>\n<table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"3\" style=\"\">\n <tr>\n <td><img src=\"http://loopsdancestudio.se/img/loops_dance_studio.svg\" width=\"\" height=\"65\" /></td>\n </tr>\n <tr>\n\t<td>\n\t\t<br/>'; \n\t\t$mensaje.= $nombre;\n\t\t':\n\t\t<br/>\n\t\t<br/>\n\t\t<p>';\n\t\t$mensaje.= $contenido;\n\t\t$mensaje.='</p>\n\t\t<br/><br/>\n\t</td>\n </tr>\n <tr>\n\t<td>\n\t<p style=\"color:#666;\">FRISKVÅRDSBIDRAG?</p>\n\t<br/>\n\t<p style=\"font-size:12px; color:#666;\">Detta mejl gäller som kvitto och går hos de flesta arbetsgivare att använda för friskvårdsbidrag. \n\tOm du vill ha ett mer utfärligt intyg så kan du kontakta oss på <a style=\"font-size:14px;\" href=\"mailto:[email protected]\">[email protected]</a> </p>\n\t</td>\n </tr>\n</table>\n</body>\n</html>';\n\n\t// Para enviar correo HTML, la cabecera Content-type debe definirse\n\t$cabeceras = 'MIME-Version: 1.0' . \"\\n\";\n\t$cabeceras .= 'Content-type: text/html; charset=iso-8859-1' . \"\\n\";\n\t// Cabeceras adicionales\n\t$cabeceras .= 'From: [email protected]' . \"\\n\";\n\t$cabeceras .= 'Bcc: [email protected]' . \"\\n\";\n\t\n\t// Enviarlo\n\tmail($destinatario, $asunto, $mensaje, $cabeceras);\n\techo $mensaje;\n\t\n}", "function sendmail($to, $replyer, $msg, $date) {\n\t$subject = \"Your post got a reply from $replyer\";\n\n\t$message = <<<EOT\n\t\t<html>\n\t\t\t<head>\n\t\t\t\t<title>HTML email</title>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<h4> ${msg} </h4>\n\t\t\t\t<p> posted by ${replyer}s </p>\n\t\t\t</body>\n\t\t</html>\nEOT;\n\t// Always set content-type when sending HTML email\n\t$headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n\t$headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n\n\t// More headers\n\t$headers .= 'From: <noreply EDEL>' . \"\\r\\n\";\n\n\t$result = mail($to,$subject,$message,$headers);\n\tif(!$result) {\n\t\tdie(\"sdfa\");\n\t}\n}", "function sendMail($email, $id_order, $address, $count) {\n $subject = 'заказ №'.$id_order;\n if ($count == 1) {\n $message_count = 'Спасибо - это ваш первый заказ';\n } else {\n $message_count = 'Спасибо! Это уже '.$count.' заказ';\n }\n $message = \"Ваш заказ будет доставлен по адресу: \".$address.\"\\n\nСодержимое заказа: DarkBeefBurger за 500 рублей, 1 шт\\n\n\".$message_count;\n mail($email, $subject, $message);\n}", "function elegeantSend($to,$messagetext,$properties){\n \n $message = elegant_email_body($messagetext,$properties);\n $fromAddress = variations_from_address(get_host());\n $subject = variations_email_subject(get_host());\n\n $headers[] = 'Content-Type: text/html; charset=UTF-8';\n $headers[] = $fromAddress;\n \n\n $mailClient = wp_mail($to, $subject, $message, $headers );\n\n if ($mailClient) {\n echo 'Your email has been sent';\n } else {\n echo 'Your email was not sent, there was an error. Please check the recipient details and try again.';\n }\n \n\n}", "public function sendMessage()\n {\n\n try {\n parent::send($this->_message);\n } catch (\\Exception $e) {\n throw new \\Magento\\Framework\\Exception\\MailException(new \\Magento\\Framework\\Phrase($e->getMessage()), $e);\n }\n }", "public function myMail()\n {\n Log::info('Masuk My Email') ;\n\n $myEmail = '[email protected]';\n Mail::to($myEmail)->send(new MyMail());\n\n Log::info('Lewat Proses Send Email') ;\n\n return \"Mail Send Successfully\";\n }" ]
[ "0.68306714", "0.6691328", "0.6551157", "0.6416334", "0.6345727", "0.6326955", "0.62928784", "0.6187843", "0.61786675", "0.61526144", "0.61498415", "0.61083126", "0.61032456", "0.6096293", "0.60931635", "0.60802287", "0.6075951", "0.6070162", "0.6061794", "0.6061042", "0.60549504", "0.6052737", "0.6046847", "0.60308474", "0.60241836", "0.6019427", "0.60066277", "0.60035616", "0.59860677", "0.59819025", "0.5976384", "0.59710896", "0.5961265", "0.59591717", "0.5957043", "0.5953", "0.59528905", "0.5947713", "0.59473825", "0.5929622", "0.59274584", "0.59239566", "0.5919062", "0.5906805", "0.5905826", "0.5883598", "0.5873969", "0.586448", "0.58575124", "0.5856687", "0.585644", "0.58552116", "0.58447427", "0.58417857", "0.5834939", "0.5833418", "0.581713", "0.58120495", "0.58041304", "0.580171", "0.57954305", "0.5791268", "0.57892257", "0.5784472", "0.5779814", "0.57771146", "0.5772106", "0.5771107", "0.57571274", "0.5751786", "0.5747864", "0.57472676", "0.5742774", "0.5742221", "0.5738714", "0.57367706", "0.57286066", "0.5727505", "0.5725483", "0.5724696", "0.57228696", "0.5715441", "0.57136315", "0.57122374", "0.5708151", "0.570497", "0.57042897", "0.5693789", "0.5693605", "0.5693388", "0.56924945", "0.5691418", "0.56882375", "0.56868935", "0.5686036", "0.5685035", "0.5677554", "0.5677333", "0.5677319", "0.56767726" ]
0.6122431
11
/\ Remove jQuery // jQuery UI \
function remove__jquery(&$scripts) { if ( !is_admin() ) { $scripts->remove( 'jquery' ); $scripts->remove( 'jquery-ui-core' ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function faster_jquery_remove() {\n\n\twp_deregister_script( 'jquery' );\n\n}", "function remove_jquery_wordpress( $scripts ) {\n if ( !is_admin() ) {\n $script = $scripts->registered['jquery'];\n \n if ( $script->deps ) { \n $script->deps = array_diff( $script->deps, array( 'jquery-core', 'jquery-migrate' ) );\n \n }\n }\n }", "function isa_remove_jquery_migrate( &$scripts) {\n if(!is_admin()) {\n $scripts->remove( 'jquery');\n $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.4.11' );\n }\n}", "function remove_wp_embed_and_jquery() {\n\tif (!is_admin()) {\n\t\twp_deregister_script('wp-embed');\t\t\n\t}\n}", "function bethel_move_jquery() {\n global $wp_scripts;\n foreach ($wp_scripts->registered as $k => $v) {\n if (substr($k, 0, 6) == 'jquery') {\n if (isset($wp_scripts->registered[$k]->ver) && isset($wp_scripts->registered[$k]->src) && $wp_scripts->registered[$k]->deps) {\n $ver = $wp_scripts->registered[$k]->ver;\n $src = $wp_scripts->registered[$k]->src;\n $deps = $wp_scripts->registered[$k]->deps;\n wp_deregister_script ($k);\n wp_register_script($k, $src, $deps, $ver, true);\n }\n }\n }\n}", "function wp_deregister_script($handle)\n {\n }", "function cm_replace_jquery() {\n\tif (!is_admin()) {\n\t\t// comment out the next two lines to load the local copy of jQuery\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3');\n\t\twp_enqueue_script('jquery');\n\t}\n}", "function replace_jquery() {\r\n\tif (!is_admin()) {\r\n\t\t// comment out the next two lines to load the local copy of jQuery\r\n\t\twp_deregister_script('jquery');\r\n\t\twp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3');\r\n\t\twp_enqueue_script('jquery');\r\n\t}\r\n}", "function add_qoorate_scripts(){\n\t\t// MAYBE TODO: cacheing ... place in DB options?\t\t\n\t\t// unregister our really old jquery bundled with WP\n\t\t// Maybe we can keep it? should it be an option?\n\t\twp_deregister_script( 'jquery' );\n\t\twp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js' );\n\t\twp_enqueue_script( 'jquery' );\n\t}", "function replace_jquery() {\n if (!is_admin()) {\n // comment out the next two lines to load the local copy of jQuery\n wp_deregister_script('jquery');\n wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', false, '1.12.4');\n wp_enqueue_script('jquery');\n }\n}", "function wp_deregister_script( $handle ) {\n\t_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );\n\n\t/**\n\t * Do not allow accidental or negligent de-registering of critical scripts in the admin.\n\t * Show minimal remorse if the correct hook is used.\n\t */\n\t$current_filter = current_filter();\n\tif ( ( is_admin() && 'admin_enqueue_scripts' !== $current_filter ) ||\n\t\t( 'wp-login.php' === $GLOBALS['pagenow'] && 'login_enqueue_scripts' !== $current_filter )\n\t) {\n\t\t$no = array(\n\t\t\t'jquery', 'jquery-core', 'jquery-migrate', 'jquery-ui-core', 'jquery-ui-accordion',\n\t\t\t'jquery-ui-autocomplete', 'jquery-ui-button', 'jquery-ui-datepicker', 'jquery-ui-dialog',\n\t\t\t'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-menu', 'jquery-ui-mouse',\n\t\t\t'jquery-ui-position', 'jquery-ui-progressbar', 'jquery-ui-resizable', 'jquery-ui-selectable',\n\t\t\t'jquery-ui-slider', 'jquery-ui-sortable', 'jquery-ui-spinner', 'jquery-ui-tabs',\n\t\t\t'jquery-ui-tooltip', 'jquery-ui-widget', 'underscore', 'backbone',\n\t\t);\n\n\t\tif ( in_array( $handle, $no ) ) {\n\t\t\t$message = sprintf(\n\t\t\t\t/* translators: 1: script name, 2: wp_enqueue_scripts */\n\t\t\t\t__( 'Do not deregister the %1$s script in the administration area. To target the front-end theme, use the %2$s hook.' ),\n\t\t\t\t\"<code>$handle</code>\",\n\t\t\t\t'<code>wp_enqueue_scripts</code>'\n\t\t\t);\n\t\t\t_doing_it_wrong( __FUNCTION__, $message, '3.6.0' );\n\t\t\treturn;\n\t\t}\n\t}\n\n\twp_scripts()->remove( $handle );\n}", "function wp_deregister_script( $handle ) {\r\n\tglobal $wp_scripts;\r\n\tif ( !is_a($wp_scripts, 'WP_Scripts') )\r\n\t\t$wp_scripts = new WP_Scripts();\r\n\r\n\t$wp_scripts->remove( $handle );\r\n}", "function dequeue_jquery_migrate( &$scripts){\n\tif(!is_admin()){\n\t\t$scripts->remove( 'jquery');\n\t\t$scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' );\n\t}\n}", "function replace_default_jquery() {\n\tif (!is_admin()) {\n\t\t// comment out the next two lines to load the local copy of jQuery\n\t\twp_deregister_script('jquery');\n\t\t// wp_register_script('jquery', '//cdn.jsdelivr.net/jquery/2.1.4/jquery.min.js', false, null);\n\t\twp_register_script('jquery', get_template_directory_uri() . '/js/jquery-2.1.4.min.js', false, null);\n\t\t// wp_enqueue_script('jquery');\n\t}\n}", "function upgrade_jquery() {\n\tif ( ! is_admin() ) {\n\t\twp_deregister_script( 'jquery' );\n\t\twp_enqueue_script( 'jquery-updated', 'https://code.jquery.com/jquery-3.5.1.slim.min.js' );\n\t\twp_enqueue_script( 'jquery-migrate', 'https://code.jquery.com/jquery-migrate-3.3.1.min.js' );\n\t}\n}", "function deenqueue_parent_scripts_styles() {\n wp_dequeue_script( 'one-page-slitslider' );\n wp_deregister_script( 'one-page-slitslider' );\n wp_dequeue_script( 'one-page-custom' );\n wp_deregister_script( 'one-page-custom' );\n}", "function registerJqueryFromCdn() {\n\t// Use jquery and jquery core from the google cdn instead of wordpress included\n\twp_deregister_script( 'jquery-ui-core' );\n\twp_deregister_script( 'jquery-ui-tab' );\n\twp_deregister_script( 'jquery-ui-autocomplete' );\n\twp_deregister_script( 'jquery-ui-accordion' );\n\twp_deregister_script( 'jquery-ui-autocomplete' );\n\twp_deregister_script( 'jquery-ui-button' );\n\twp_deregister_script( 'jquery-ui-datepicker');\n\twp_deregister_script( 'jquery-ui-dialog' );\n\twp_deregister_script( 'jquery-ui-draggable' );\n\twp_deregister_script( 'jquery-ui-droppable' );\n\twp_deregister_script( 'jquery-ui-mouse' );\n\twp_deregister_script( 'jquery-ui-position' );\n\twp_deregister_script( 'jquery-ui-progressbar');\n\twp_deregister_script( 'jquery-ui-resizable' );\n\twp_deregister_script( 'jquery-ui-selectable');\n\twp_deregister_script( 'jquery-ui-slider' );\n\twp_deregister_script( 'jquery-ui-sortable' );\n\twp_deregister_script( 'jquery-ui-tabs' );\n\twp_deregister_script( 'jquery-ui-widget' );\n\twp_deregister_script( 'jquery' );\n\n\twp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js', array(), '1.11.3' );\n\twp_register_script( 'jquery-ui-core', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', array( 'jquery' ), '', true);\n}", "function _h_remove_jetpack_footer_assets() {\n wp_deregister_script('sharing-js');\n\n // disable spinner when infinite loading is enabled\n wp_deregister_script('jquery.spin');\n wp_deregister_script('spin');\n}", "function my_admin_scripts() {\n\t\t\t wp_deregister_script('jquery');\n\t\t\t wp_register_script('jquery', (\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js\"), false, null);\n\t\t\t wp_enqueue_script('jquery');\n\t\t\t wp_enqueue_script( 'jquery-migrate', 'https://code.jquery.com/jquery-migrate-3.0.1.min.js', array('jquery'), '3.0.1', false );\n\t\t}", "function modify_jquery_version() {\n if (!is_admin()) {\n wp_deregister_script('jquery');\n wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js', false, '2.0.s');\n wp_enqueue_script('jquery');\n }\n}", "function theme_remove_admin_bar() {\r\n\treturn false;\r\n}", "function set_jquery_cdn() {\n\t\tif (is_admin()) return;\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery',\n\t\t\t'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');\n\t}", "function google_hosted_jquery() {\n\tif (!is_admin()) {\n\t\twp_deregister_script('jquery');\n\n\t\tswitch ( SeekConfig::JQUERY_VERSION ) {\n\t\t\tcase 1:\n\t\t\t\twp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', false, null);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\twp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js', false, null);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\twp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js', false, null);\n\t\t\t\tbreak;\n\t\t}\n\n\t\twp_enqueue_script('jquery');\n\t}\n}", "function admin_dequeue_scripts() {\r\n\twp_dequeue_script('jquery-qtip');\r\n}", "function reassign_jQuery() {\n wp_deregister_script( 'jquery' );\n wp_deregister_script( 'jquery-core' );\n wp_deregister_script( 'jquery-migrate' );\n\n wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js', array(), '3.4.1', true);\n wp_add_inline_script( 'jquery', \"window.jQuery || document.write('<script src=\\\"\".get_template_directory_uri() .\"/assets/jquery-3.4.1.min.js\\\">\\\\x3C/script>')\");\n \n wp_enqueue_script('jquery');\n\n}", "function asc_deregister_script( $handle ) {\n\tglobal $asc_scripts;\n\tif ( ! is_a( $asc_scripts, 'ASC_Scripts' ) ) {\n\t\tif ( ! did_action( 'init' ) )\n\t\t\t_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),\n\t\t\t\t'<code>asc_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );\n\t\t$asc_scripts = new ASC_Scripts();\n\t}\n\n\t/**\n\t * Do not allow accidental or negligent de-registering of critical scripts in the admin.\n\t * Show minimal remorse if the correct hook is used.\n\t */\n\t$current_filter = current_filter();\n\tif ( ( is_admin() && 'admin_enqueue_scripts' !== $current_filter ) ||\n\t\t( 'wp-login.php' === $GLOBALS['pagenow'] && 'login_enqueue_scripts' !== $current_filter )\n\t) {\n\t\t$no = array(\n\t\t\t'jquery', 'jquery-core', 'jquery-migrate', 'jquery-ui-core', 'jquery-ui-accordion',\n\t\t\t'jquery-ui-autocomplete', 'jquery-ui-button', 'jquery-ui-datepicker', 'jquery-ui-dialog',\n\t\t\t'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-menu', 'jquery-ui-mouse',\n\t\t\t'jquery-ui-position', 'jquery-ui-progressbar', 'jquery-ui-resizable', 'jquery-ui-selectable',\n\t\t\t'jquery-ui-slider', 'jquery-ui-sortable', 'jquery-ui-spinner', 'jquery-ui-tabs',\n\t\t\t'jquery-ui-tooltip', 'jquery-ui-widget', 'underscore', 'backbone',\n\t\t);\n\n\t\tif ( in_array( $handle, $no ) ) {\n\t\t\t$message = sprintf( __( 'Do not deregister the %1$s script in the administration area. To target the frontend theme, use the %2$s hook.' ),\n\t\t\t\t\"<code>$handle</code>\", '<code>asc_enqueue_scripts</code>' );\n\t\t\t_doing_it_wrong( __FUNCTION__, $message, '3.6' );\n\t\t\treturn;\n\t\t}\n\t}\n\n\t$asc_scripts->remove( $handle );\n}", "public function removable()\n {\n $this->rightTools()->append(\n '<a data-toggle=\"remove\"><i class=\"zmdi zmdi-close\"></i></a>'\n );\n\n static::$scripts[0] = <<<EOF\n $('.portlet [data-toggle=\"remove\"]').click(function (e) {\n $(this).parent().parent().parent().parent().parent().toggle(100)\n })\nEOF;\n return $this;\n }", "public static function move_jquery_to_footer() {\n\t\tadd_action('wp_enqueue_scripts', function() {\n\t\t\tif (is_admin()) {\n\t\t return;\n\t\t }\n\n\t\t $wp_scripts = wp_scripts();\n\n\t\t $wp_scripts->add_data('jquery', 'group', 1);\n\t\t $wp_scripts->add_data('jquery-core', 'group', 1);\n\t\t $wp_scripts->add_data('jquery-migrate', 'group', 1);\n\t\t}, 0);\n\t}", "function wp_deregister_style($handle)\n {\n }", "function ui_resizable_destroy($selector){\n return add_method_support('resizable',$selector, 'destroy');\n}", "public function enqueue_jQuery_ui() {\n $this->enqueue_script( 'sumo-pp-jquery-ui' , $this->get_asset_url( 'js/jquery-ui/jquery-ui.js' ) ) ;\n $this->enqueue_style( 'sumo-pp-jquery-ui' , $this->get_asset_url( 'css/jquery-ui.css' ) ) ;\n }", "function rad_remove_dash_widgets(){\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n}", "function remove_plugin_assets() {\n wp_dequeue_style('roots-share-buttons'); // roots-share-buttons/assets/styles/share-buttons.css\n wp_dequeue_script('roots-share-buttons'); //roots-share-buttons/assets/scripts/share-buttons.js\n wp_dequeue_style('wp-biographia-bio'); //wp-biographia/css/wp-biographia-min.css\n}", "function wpfme_jquery_enqueue() {\n wp_deregister_script('jquery');\n wp_register_script('jquery', \"http\" . ($_SERVER['SERVER_PORT'] == 443 ? \"s\" : \"\") . \"://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js\", false, null);\n wp_enqueue_script('jquery');\n}", "public function setJquery($preventJQuery);", "function uninstall(){}", "function bfa_remove_featured_gallery_scripts() {\r\n remove_action('wp_head', 'gallery_styles');\r\n}", "function mro_deregister_scripts() {\n\n //Deregister styles\n\n\t// Bootstrap\n\twp_dequeue_style( 'tt-bootstrap.css' );\n\twp_deregister_style( 'tt-bootstrap.css' );\n\n\t// icomoon\n\twp_dequeue_style( 'tt-icomoon.css' );\n\twp_deregister_style( 'tt-icomoon.css' );\n\n\t// tt-main-style\n\twp_dequeue_style( 'tt-main-style' );\n\twp_deregister_style( 'tt-main-style' );\n\n\t// tt-theme-style\n\twp_dequeue_style( 'tt-theme-style' );\n\twp_deregister_style( 'tt-theme-style' );\n\n}", "function uninstall() {\n\t}", "function noc_deregister_scripts() {\n\n //Deregister styles\n\n\t// Parent\n\twp_dequeue_style( 'theme-style-child' );\n\twp_deregister_style( 'theme-style-child' );\n\n\t// Theme child from parent\n\twp_dequeue_style( 'theme-style' );\n\twp_deregister_style( 'theme-style' );\n\n\t// // tt-main-style\n\t// wp_dequeue_style( 'tt-main-style' );\n\t// wp_deregister_style( 'tt-main-style' );\n\n\t// // tt-theme-style\n\t// wp_dequeue_style( 'tt-theme-style' );\n\t// wp_deregister_style( 'tt-theme-style' );\n\n}", "function childtheme_remove_scripts(){\n remove_action('wp_enqueue_scripts','thematic_head_scripts');\n}", "function top10_remove() {\r\n//delete_option('omekafeedpull_omekaroot');\r\n}", "function remove_admin_bar() {\n\tshow_admin_bar(false);\n}", "function deregister_scripts_oembed_footer(){\n\twp_deregister_script( 'wp-embed' );\n}", "function deregister_scripts_oembed_footer(){\n\twp_deregister_script( 'wp-embed' );\n}", "function fyxt_custom_scripts() {\n\twp_enqueue_style( 'jquery-custom', get_stylesheet_directory_uri() . '/css/fyxt-theme-2/jquery-ui-1.10.4.custom.css' );\n\twp_enqueue_style( 'jquery-custom', get_stylesheet_directory_uri() . '/css/fyxt-theme-2/jquery-ui-1.10.4.custom.min.css' );\t\n\twp_enqueue_script( 'jquery' );\n\twp_enqueue_script( 'jquery-ui-core' );\n\twp_enqueue_script( 'jquery-ui-tabs' );\n\twp_enqueue_script( 'jquery-ui-button' );\n\twp_enqueue_script( 'jquery-ui-accordion' );\n\twp_enqueue_script( 'jquery-ui-slider' );\n\twp_enqueue_script( 'tabs-script', get_stylesheet_directory_uri() . '/js/tabs.js', array( 'jquery-ui-core', 'jquery-ui-accordion', 'jquery-ui-tabs' ) );\n}", "public function update_jquery_source() {\n\t\t$jquery_url = $this->get_jquery_url();\n\t\tif ( ! empty( $jquery_url ) ) {\n\t\t\twp_deregister_script( 'jquery' );\n\t\t\twp_register_script( 'jquery', $jquery_url, [], null, true );\n\t\t\t$this->add_filter( 'script_loader_src', 'jquery_local_fallback', 10, 2 );\n\t\t}\n\t}", "public function uninstallPlugin()\n {\n }", "function uninstall(){\n\n }", "static public function deregister_scripts() {\n wp_dequeue_script( 'filterable-portfolio' );\n wp_deregister_script( 'filterable-portfolio' );\n }", "function wp_ajax_delete_plugin()\n {\n }", "function wp_unregister_widget_control($id)\n {\n }", "function wpdocs_dequeue_dashicon() {\n\tif ( current_user_can( 'update_core' ) ) {\n\t\treturn;\n\t}\n\twp_deregister_style( 'dashicons' );\n}", "public function ajax_header_remove()\n {\n }", "function remove_recent_comments_style() {\n global $wp_widget_factory;\n remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));\n}", "function ui_sortable_destroy($selector){\n return add_method_support('sortable',$selector, 'destroy');\n}", "function remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\tremove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n}", "function wpdocs_dequeue_dashicon() {\n\tif (current_user_can( 'update_core' )) {\n\t\treturn;\n\t}\n\twp_deregister_style('dashicons');\n}", "function startertheme_remove_version() {\nreturn '';\n}", "private static function removeConflictingScripts()\n {\n remove_action('admin_enqueue_scripts', 'kadence_admin_scripts');\n\n // Compatibility with Woocommerce Product Tab Pro 1.8.0 (http://codecanyon.net/item/woocommerce-tabs-pro-extra-tabs-for-product-page/8218941)\n remove_action('admin_print_footer_scripts', '_hc_tinymce_footer_scripts');\n }", "function carousel_remove_junk_action_javascript() { \n ?>\n <script type=\"text/javascript\" >\n \"use strict\";\n jQuery(document).ready(function($) {\n setTimeout(function(){\n $('.wpbooklist_carousel_inner_main_display_div a').each(function(){\n $(this).removeClass('wpbooklist-show-book-colorbox');\n $(this).find('span').remove();\n })\n },2000)\n });\n </script>\n <?php\n}", "function remove_unused_widgets() {\n\tunregister_widget( 'WP_Widget_Meta' );\n\tunregister_widget( 'WP_Widget_Calendar' );\n\tunregister_widget( 'WP_Widget_Recent_Comments' );\n\tunregister_widget( 'WP_Widget_Tag_Cloud' );\n}", "function remove_theme_mods()\n {\n }", "function remove_widgets(){\r\n remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); \r\n remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); \r\n remove_meta_box('dashboard_activity', 'dashboard', 'normal'); \r\n remove_meta_box('dashboard_primary', 'dashboard', 'side'); \r\n remove_meta_box('dashboard_site_health', 'dashboard', 'side'); \r\n \r\n // Eliminar widget de Elementor que aparece al activar su plugin\r\n remove_meta_box('e-dashboard-overview', 'dashboard', 'normal'); \r\n}", "public function getJquery();", "function unhook_parent_style() {\n \n wp_dequeue_style( 'genericons' );\n\twp_deregister_style( 'genericons' );\n wp_dequeue_style( 'twentyfifteen-ie' );\n\twp_deregister_style( 'twentyfifteen-ie' );\n wp_dequeue_style( 'twentyfifteen-ie7' );\n\twp_deregister_style( 'twentyfifteen-ie7' );\n wp_dequeue_style( 'twentyfifteen-fonts' );\n\twp_deregister_style( 'twentyfifteen-fonts' );\n}", "function wpdocs_dequeue_dashicon() {\n if (current_user_can( 'update_core' )) {\n return;\n }\n wp_deregister_style('dashicons');\n}", "function my_deregister_scripts(){\r\n\t \twp_deregister_script( 'wp-embed' );\r\n\t}", "function my_remove_recent_comments_style()\n{\n global $wp_widget_factory;\n remove_action('wp_head', array(\n $wp_widget_factory->widgets['WP_Widget_Recent_Comments'],\n 'recent_comments_style'\n ));\n}", "function my_remove_recent_comments_style()\n{\n global $wp_widget_factory;\n remove_action('wp_head', array(\n $wp_widget_factory->widgets['WP_Widget_Recent_Comments'],\n 'recent_comments_style'\n ));\n}", "function remove_widgets_wallet() {\n\t\tunregister_widget( 'myCRED_Widget_Wallet' );\n\n\t}", "function cultiv8_deregister_scripts() {\n\tglobal $wp_query, $post;\n\t\n\tif( ! ( strpos( json_encode( $wp_query ), '[contact-form-7' ) || strpos( json_encode( $post ), '[contact-form-7' ) ) ) {\n\t\t\twp_deregister_script( 'contact-form-7' );\n\t\t\twp_deregister_style( 'contact-form-7' );\n\t}\n\n}", "function wpfifc_remove_option() {\r\n\r\n\t\treturn;\r\n\t}", "function templ_remove_dashboard_widgets()\r\n{\r\n /* Globalize the metaboxes array, this holds all the widgets for wp-admin*/\r\n global $wp_meta_boxes;\r\n /* Remove the Dashboard quickpress widget*/\r\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\r\n /* Remove the Dashboard incoming links widget*/\r\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\r\n /* Remove the Dashboard secondary widget*/\r\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\r\n}", "function disable_scripts() { \n\tif ($GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()) {\n\t\twp_deregister_script('l10n');\n\t\twp_deregister_script('jquery');\n\t\twp_deregister_script('wp-embed');\n\t}\n}", "function rb_load_javascript()\n{\n wp_enqueue_script(\n 'rb-main-javascript',\n get_stylesheet_directory_uri() . '/main.js',\n array( 'jquery' )\n );\n wp_enqueue_script(\"myUi\",\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.8/jquery-ui.min.js\");\n}", "function wp_ajax_delete_theme()\n {\n }", "public function remove_help_tabs()\n {\n }", "public function dequeue_script() {\r\n\t wp_dequeue_script( 'jquery-ui-sortable' );\r\n\t wp_dequeue_script( 'scporderjs' );\r\n\t wp_dequeue_script( 'plt-quick-add' );\r\n\t}", "function remove_head_scripts() {\n remove_action('wp_head', 'wp_print_scripts');\n remove_action('wp_head', 'wp_print_head_scripts', 9);\n remove_action('wp_head', 'wp_enqueue_scripts', 1);\n\n // remove_action('wp_head', 'wp_print_style');\n // remove_action('wp_head', 'wp_print_head_style', 9);\n // remove_action('wp_head', 'wp_enqueue_style', 1);\n \n add_action('wp_footer', 'wp_print_scripts', 5);\n add_action('wp_footer', 'wp_enqueue_scripts', 5);\n add_action('wp_footer', 'wp_print_head_scripts', 5);\n\n // add_action('wp_footer', 'wp_print_style', 5);\n // add_action('wp_footer', 'wp_enqueue_style', 5);\n // add_action('wp_footer', 'wp_print_head_style', 5);\n}", "function my_admin_add_js() {\n\t$screen = get_current_screen();\n\tif ($screen->id == 'contact') {\n\t\techo \"<script>document.getElementById('newcategory_parent').remove()</script>\n\t\t <script>document.getElementById('titlediv').remove(); </script>\";\n\t\t wp_enqueue_script('inputmask', get_template_directory_uri() . '/js/jquery.inputmask.bundle.min.js', array('jquery'));\n wp_enqueue_script('admin', get_template_directory_uri() . '/js/admin.js', array('jquery'));\n\t}\n}", "function remove_admin_bar_from_head() {\n remove_action('wp_head', '_admin_bar_bump_cb');\n show_admin_bar(false);\n}", "function tempera_remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\tremove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n}", "function my_remove_recent_comments_style()\n{\n global $wp_widget_factory;\n remove_action('wp_head', array(\n $wp_widget_factory->widgets['WP_Widget_Recent_Comments'],\n 'recent_comments_style'\n ));\n}", "function remove_dashboard_widgets() {\n\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n\t// remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );\n\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n}", "function deregister_widgets()\n { foreach ( $this->get_widgets() as $widget )\n {\n unregister_widget( $widget );\n }\n\n }", "function hxp_plugin_deactivation() {\n\twp_dequeue_style( 'hxp_custom_style' );\n\twp_deregister_style( 'hxp_custom_style' );\n\twp_dequeue_script( 'hxp_export_script' );\n\twp_dequeue_script( 'hxp_import_script' );\n\twp_deregister_script( 'hxp_export_script' );\n\t$hxp_upload_dir = wp_upload_dir();\n\thxp_rrmdir( $hxp_upload_dir['basedir'] . '/hxp_exports' );\n\thxp_rrmdir( $hxp_upload_dir['basedir'] . '/hxp_imports' );\n}", "function dwwp_remove_dashboard_widget() {\n remove_meta_box( 'dashboard_primary','dashboard','side' );\n}", "function cardealer_head_cleanup() {\r\n\tadd_filter( 'style_loader_src', 'cardealer_remove_wp_ver_css_js', 9999 ); // remove WP version from css\r\n\tadd_filter( 'script_loader_src', 'cardealer_remove_wp_ver_css_js', 9999 ); // remove WP version from scripts\r\n}", "function replace_widjets_content() {\n remove_action( 'widgets_init', 'envo_storefront_widgets_init' );\n}", "function remove_description_form() {\n echo \"<style> .term-description-wrap{display:none;}</style>\";\n}", "function my_deregister_scripts(){\n wp_deregister_script( 'wp-embed' );\n}", "public function move_js_to_footer() {\n\t\t$this->remove_action( 'wp_head', 'wp_print_scripts' );\n\t\t$this->remove_action( 'wp_head', 'wp_print_head_scripts', 9 );\n\t\t$this->remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );\n\t}", "function ui_sortable_cancel($selector){\n return add_method_support('sortable',$selector, 'cancel');\n}", "function wp_dequeue_script($handle)\n {\n }", "function clean_wp_header() {\n remove_action( 'wp_head', 'feed_links_extra', 3 );\n remove_action( 'wp_head', 'feed_links', 2 );\n wp_deregister_script('comment-reply');\n}", "function dimaan_remove_version() { return ''; }", "function flatsome_remove_recent_comments_style() {\n global $wp_widget_factory;\n remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n }", "function remove_sl(){\n\t\t\n\t}", "function custom_remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\n\tremove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n}" ]
[ "0.7260323", "0.6732453", "0.6726179", "0.64241177", "0.6321641", "0.6062501", "0.6060515", "0.60391295", "0.60380536", "0.59975517", "0.59745836", "0.59575576", "0.5925367", "0.59131294", "0.5815577", "0.57426333", "0.5717533", "0.57099456", "0.57041276", "0.56919074", "0.56900656", "0.566551", "0.56418014", "0.5631362", "0.5620843", "0.5553032", "0.5543106", "0.55299234", "0.5526728", "0.55257136", "0.55208176", "0.55080706", "0.5494247", "0.5493271", "0.54748505", "0.5456125", "0.54408526", "0.5421826", "0.53969604", "0.5373781", "0.5372709", "0.53726065", "0.5371033", "0.53705674", "0.53705674", "0.53484", "0.53424984", "0.5342224", "0.5341848", "0.5341275", "0.5337382", "0.53247553", "0.53229105", "0.53120476", "0.5309311", "0.53033024", "0.5296963", "0.52908105", "0.5288845", "0.5266578", "0.52607805", "0.5260161", "0.5255865", "0.52557766", "0.5252941", "0.5238836", "0.5228726", "0.5223804", "0.52209353", "0.52209353", "0.5215935", "0.52155805", "0.5211555", "0.5206277", "0.5204942", "0.52030873", "0.51951724", "0.5185204", "0.51839256", "0.5181494", "0.51780003", "0.5173845", "0.5173322", "0.5171724", "0.5168004", "0.5165866", "0.5157361", "0.5156464", "0.5152224", "0.51388985", "0.5136205", "0.513534", "0.5129415", "0.5112304", "0.5111241", "0.5095375", "0.50914747", "0.50908625", "0.5086245", "0.50768983" ]
0.7426778
0
PAYMENT_ID is not present for transaction in state PENDING
public function getTransactionReference() { if(isset($this->data['properties'])) { $properties = $this->data['properties']; $paymentIdProperty = array_filter($properties, function ($item) { return $item['name'] === 'PAYMENT_ID'; }); if (isset($paymentIdProperty[0]['value'])) { return (string)$paymentIdProperty[0]['value']; } }; return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _processTransactionPaymentPending($parameters) {\n\t\t\tif (\n\t\t\t\t!empty($parameters['invoice_id']) &&\n\t\t\t\t!empty($parameters['user'])\n\t\t\t) {\n\t\t\t\t$invoice = $this->_call('invoices', array(\n\t\t\t\t\t'methodName' => 'invoice',\n\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t'invoices',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t'id' => $parameters['invoice_id']\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttrue\n\t\t\t\t\t)\n\t\t\t\t));\n\n\t\t\t\tif (!empty($invoice['data'])) {\n\t\t\t\t\t$mailParameters = array(\n\t\t\t\t\t\t'from' => $this->settings['from_email'],\n\t\t\t\t\t\t'subject' => 'Invoice #' . $invoice['data']['invoice']['id'] . ' payment pending',\n\t\t\t\t\t\t'template' => array(\n\t\t\t\t\t\t\t'name' => 'payment_pending',\n\t\t\t\t\t\t\t'parameters' => array(\n\t\t\t\t\t\t\t\t'invoice' => $invoice['data']['invoice'],\n\t\t\t\t\t\t\t\t'transaction' => array_merge($parameters, array(\n\t\t\t\t\t\t\t\t\t'payment_method' => $this->_retrieveTransactionPaymentMethod($parameters['payment_method_id'])\n\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\t\t\t'user' => $parameters['user']\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'to' => $parameters['user']['email']\n\t\t\t\t\t);\n\t\t\t\t\t$this->_sendMail($mailParameters);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}", "public function paymentstatus($id)\n {\n\n $paytmChecksum \t= \"\";\n $paramList \t\t= array();\n $isValidChecksum= \"FALSE\";\n\n $paramList = $_POST;\n $paytmChecksum = isset($_POST[\"CHECKSUMHASH\"]) ? $_POST[\"CHECKSUMHASH\"] : \"\"; //Sent by Paytm pg\n\n header(\"Pragma: no-cache\");\n header(\"Cache-Control: no-cache\");\n header(\"Expires: 0\");\n\n //Verify all parameters received from Paytm pg to your application. Like MID received from paytm pg is same as your application’s MID, TXN_AMOUNT and ORDER_ID are same as what was sent by you to Paytm PG for initiating transaction etc.\n $isValidChecksum = verifychecksum_e($paramList, PAYTM_MERCHANT_KEY, $paytmChecksum); //will return TRUE or FALSE string.\n\n\n if($isValidChecksum == \"TRUE\") {\n echo \"<b>Checksum matched and following are the transaction details:</b>\" . \"<br/>\";\n\n // echo \"<pre>\";\n // print_r($_POST);\n // echo \"<pre>\";\n\n if ($_POST[\"STATUS\"] == \"TXN_SUCCESS\") {\n // echo \"<b>Transaction status is success</b>\" . \"<br/>\";\n //Process your transaction here as success transaction.\n //Verify amount & order id received from Payment gateway with your application's order id and amount.\n $save['transaction_id'] = $_POST[\"ORDERID\"];\n $save['payment_status'] = $_POST[\"STATUS\"];\n $save['transaction_date'] = $_POST[\"TXNDATE\"];\n\n if(!empty($id)){\n $this->common->update(\"delapp_deliveries\",$save,['id'=>$id]);\n // print_r($save);die;\n redirect('chloonline/PaytmSucessResponse/'. $id);\n }\n }\n else {\n // echo \"<b>Transaction status is failure</b>\" . \"<br/>\";\n $save['payment_status'] =$_POST[\"STATUS\"];\n $save['transaction_date'] =$_POST[\"TXNDATE\"];\n $save['transaction_id'] =$_POST[\"ORDER_ID\"];\n if(!empty($id)){\n $this->common->update(\"delapp_deliveries\",$save,['id'=>$id]);\n redirect('chloonline/PaytmFailResponse/'. $id);\n }\n }\n\n\n\n }\n else {\n echo \"<b>Checksum mismatched.</b>\";\n //Process transaction as suspicious.\n }\n\n }", "public function pendingOrderState()\n {\n $stateExist = false;\n $states = OrderState::getOrderStates((int)$this->context->language->id);\n foreach ($states as $state) {\n if (in_array($this->lang('Awaiting Mollie payment'), $state)) {\n $stateExist = true;\n break;\n }\n }\n if (!$stateExist) {\n $orderState = new OrderState();\n $orderState->send_email = false;\n $orderState->color = '#4169E1';\n $orderState->hidden = false;\n $orderState->delivery = false;\n $orderState->logable = false;\n $orderState->invoice = false;\n $orderState->module_name = $this->name;\n $orderState->name = array();\n $languages = Language::getLanguages(false);\n foreach ($languages as $language) {\n $orderState->name[$language['id_lang']] = $this->lang('Awaiting Mollie payment');\n }\n if ($orderState->add()) {\n $source = _PS_MODULE_DIR_ . 'mollie/views/img/logo_small.png';\n $destination = _PS_ROOT_DIR_ . '/img/os/' . (int)$orderState->id . '.gif';\n @copy($source, $destination);\n }\n Configuration::updateValue(Mollie::MOLLIE_PENDING, (int) $orderState->id);\n }\n\n return true;\n }", "public function payment_status_failed()\n {\n return $this->order->update_status(\n 'failed',\n sprintf(\n esc_html__('Payment %s via IPN.', 'woo-paypalplus'),\n $this->request->get(Request::KEY_PAYMENT_STATUS, FILTER_SANITIZE_STRING)\n )\n );\n }", "function cb_wc_status_valid_for_payment( $statuses, $order ) {\n\t$statuses[] = 'wc-blockchainpending';\n\treturn $statuses;\n}", "function svbk_rcp_email_payment_abandoned( $payment_id ) {\n\n\tglobal $rcp_options;\n\n\t$template = isset($rcp_options['mandrill_template_payment_abandoned']) ? $rcp_options['mandrill_template_payment_abandoned'] : '';\n\n\t/**\n\t * @var RCP_Payments $rcp_payments_db\n\t */\n\tglobal $rcp_payments_db;\n\n\t$payment = $rcp_payments_db->get_payment( $payment_id );\n\n\t$user_info = get_userdata( $payment->user_id );\n\n\tif( ! $user_info ) {\n\t\treturn;\n\t}\n\n\t$payment = (array) $payment;\n\n\t$emails = new RCP_Mandrill_Emails;\n\t$emails->member_id = $payment['user_id'];\n\t$emails->payment_id = $payment_id;\n\n\tif( $template && $emails->sendTemplate( $template, $user_info->user_email ) ){\n\t\trcp_log( sprintf( '[Mandrill Emails] Payment Abandoned email sent to user #%d. Template: %s', $user_info->ID, $template ) );\t\t\n\t} else {\n\t\trcp_log( sprintf( '[Mandrill Emails] Payment Abandoned email not sent to user #%d. Template: %s', $user_info->ID, $template ) );\t\t\n\t}\n\n}", "public function processPayment();", "public function getPaymentStatus($contract_id)\r\n {\r\n $contract = Contract::find($contract_id);\r\n $project = Project::find($contract->project_id);\r\n $client = Lead::find($project->lead_id);\r\n // Get the payment ID before session clear\r\n $payment_id = Session::get('paypal_payment_id');\r\n\r\n // clear the session payment ID\r\n Session::forget('paypal_payment_id');\r\n\r\n if (!Input::get('PayerID') ||! Input::get('token'))\r\n {\r\n return view('omi.payment.index',array('project'=>$project,'contract'=>$contract,'client'=>$client,'error'=>'Payment failed'));\r\n }\r\n $payment = Payment::get($payment_id, $this->_api_context);\r\n\r\n // PaymentExecution object includes information necessary\r\n // to execute a PayPal account payment.\r\n // The payer_id is added to the request query parameters\r\n // when the user is redirected from paypal back to your site\r\n $execution = new PaymentExecution();\r\n $execution->setPayerId(Input::get('PayerID'));\r\n\r\n //Execute the payment\r\n $result = $payment->execute($execution, $this->_api_context);\r\n\r\n if ($result->getState() == 'approved')\r\n {\r\n $amount = number_format($payment->getTransactions()[0]->getAmount()->total,2, \".\",\"\");\r\n $payment_transaction = new PaymentTransaction();\r\n $payment_transaction->contract_id = $contract->id;\r\n $payment_transaction->amount = $amount;\r\n $payment_transaction->source = \"PAYPAL\";\r\n $payment_transaction->details = $result->getState();\r\n $payment_transaction->numPayments = 1;\r\n $payment_transaction->approved =1;\r\n $payment_transaction->status =\"approved\";\r\n $payment_transaction->subscriptionId =$payment_id;\r\n $payment_transaction->ip = $_SERVER['REMOTE_ADDR'];\r\n $payment_transaction->save();\r\n\r\n $contract->paid += $amount;\r\n $contract->paidDate = new \\DateTime();\r\n $contract->readed = 0;\r\n $contract->consultant_id = $project->consultant_id;\r\n\r\n //contracts IGUP should be credited to the consultant that sold the IMG\r\n if($contract->type==\"IGUP\" && $project->contractIMG() != \"\"){\r\n $contract->consultant_id = $project->contractIMG()->consultant_id;\r\n }\r\n\r\n $contract->save();\r\n\r\n //send sms to consultant.\r\n PlivoHelper::consultantSmsOutPerPayment($project->consultant_id,$project->id,$amount);\r\n\r\n //Create Transaction\r\n Transaction::createTransaction($project->consultant_id, $client->id, '', 'PAYMENT-MADE-CLIENT', '', $project->id, $client->email, '', 'SYSTEM', $client->phone, $amount);\r\n\r\n //Generate contract and sold report if contract is paid full and signed and Send Emails\r\n if($contract->type==\"PPA\")\r\n {\r\n //PPA Client Services\r\n $clientS = Consultant::where('usr','clientservices')->first();\r\n if($clientS!=null){\r\n $msgInbox = \"PPA Payment received.\\r\\n\";\r\n $msgInbox .= date(\"m-d-Y H:i:s\").\"\\r\\n\";\r\n $msgInbox .= \"File #:\".$project->lead->fileno.\"\\r\\n\";\r\n $msgInbox .= \"Pin #:\".$project->id.\"\\r\\n\";\r\n $msgInbox .= \"Client: \".$project->lead->fname.\" \".$project->lead->lname.\"\\r\\n\";\r\n $msgInbox .= \"Amount: \".$amount.\"\\r\\n\";\r\n $msgInbox .= \"PPA Paid To Date: \".$contract->paid.\"\\r\\n\";\r\n Inbox::createInbox($client->id,$clientS->id,$msgInbox,\"PAYMENT\",\"CLIENT\");\r\n }\r\n //END\r\n\r\n\r\n $msgInbox = \"PPA Payment made By Client.\\r\\n\";\r\n $msgInbox .= date(\"m-d-Y H:i:s\").\"\\r\\n\";\r\n $msgInbox .= \"File #:\".$project->lead->fileno.\"\\r\\n\";\r\n $msgInbox .= \"Pin: \".$project->id.\"\\r\\n\";\r\n $msgInbox .= \"Client: \".$project->lead->fname.\" \".$project->lead->lname.\"\\r\\n\";\r\n $msgInbox .= \"Amount: \".$amount.\"\\r\\n\";\r\n $msgInbox .= \"Type: \".$contract->type.\"\\r\\n\";\r\n Inbox::createInbox($project->lead->id, $project->consultant_id, $msgInbox, 'PAYMENT', 'CLIENT');\r\n\r\n //Send Email to George, ALain and Me\r\n $url = url(\"sendPaymentNotificationToAdminDocusign?ID=\".$contract->id);\r\n ToolsFunctions::curl($url);\r\n //Send Email to client\r\n $url = url(\"sendPaymentNotificationToClient?ID=\".$contract->id);\r\n ToolsFunctions::curl($url);\r\n return view('omi.payment.success',array('project'=>$project,'contract'=>$contract,'client'=>$client,'complete'=>0));\r\n }\r\n if($contract->type!=\"PPA\" && $contract->price>$contract->paid && strlen($contract->signed)>0){\r\n\r\n //send sms to consultant.\r\n PlivoHelper::consultantSmsOutPerPayment(16,$project->id,$amount);\r\n\r\n if($contract->type==\"IGUP\")\r\n {\r\n $projectP = $project->getProjectProduction();\r\n if($projectP!=null)\r\n {\r\n $projectP->contractType = 'IGUP';\r\n $projectP->completed = 0;\r\n $projectP->letterofengagement = 0;\r\n $projectP->save();\r\n }\r\n }\r\n\r\n if($contract->iigUpgrade == 1){\r\n $msg = \"IIG UPGRADE PAYMENT RECEIVED.\\r\\n\";\r\n $msg .= date(\"m-d-Y H:i:s\").\"\\r\\n\";\r\n $msg .= \"File #:\".$project->lead->fileno.\"\\r\\n\";\r\n $msg .= \"Pin: \".$project->id.\"\\r\\n\";\r\n $msg .= \"Amount: \".$contract->iigUpgradePrice.\"\\r\\n\";\r\n $msg .= \"Plan: \".($contract->iigUpgradePrice == 100 || $contract->iigUpgradePrice == 200)?'GOLD':'PLATINUM'.\"\\r\\n\";\r\n $msg .= \"Client: \".$project->lead->fname.\" \".$project->lead->lname.\"\\r\\n\";\r\n Inbox::createInbox($project->lead->id, 30, $msg, 'PAYMENT', 'PRODUCTION');\r\n\r\n if($contract->iigUpgradePrice == 330 || $contract->iigUpgradePrice == 230 || $contract->iigUpgradePrice == 300 || $contract->iigUpgradePrice == 500){\r\n $projectProd = ProjectProduction::where(array('project_id'=>$project->id,'typeVendor'=>'production'))->first();\r\n if($projectProd != null && $projectProd->sendDate != \"0000-00-00 00:00:00\"){\r\n $projectPW = ProjectProduction::where(array('project_id'=>$project->id,'typeVendor'=>'writer'))->first();\r\n if($projectPW != null){\r\n $projectPW->completed = 0;\r\n $projectPW->save();\r\n }\r\n $projectPD2 = ProjectProduction::where(array('project_id'=>$project->id,'typeVendor'=>'2D'))->first();\r\n if($projectPD2==null)\r\n {\r\n $designer2d = Consultant::where('rol','LIKE','%2D%')->first();\r\n $projectPD2 = new ProjectProduction();\r\n $projectPD2->project_id = $projectProd->project_id;\r\n $projectPD2->fileno = $projectProd->fileno;\r\n $projectPD2->typeVendor = '2D';\r\n $projectPD2->consultant_id = $designer2d->id;\r\n $projectPD2->contractType = $projectProd->contractType;\r\n $projectPD2->designer_id = $projectProd->designer_id;\r\n $projectPD2->designer2d_id = $designer2d->id;\r\n $projectPD2->writer_id = $projectProd->writer_id;\r\n $projectPD2->university_id = $projectProd->university_id;\r\n $projectPD2->attorney_id = $projectProd->attorney_id;\r\n $projectPD2->sendDate = date(\"Y-m-d H:i:s\");\r\n $projectPD2->save();\r\n\r\n $projectProd->designer2d_id = $designer2d->id;\r\n $projectProd->save();\r\n\r\n $msgInbox2d = \"NEW FILES AVAILABLE.\\r\\n\";\r\n $msgInbox2d .= date(\"m-d-Y H:i:s\").\"\\r\\n\";\r\n $msgInbox2d .= \"Files #:\".$projectProd->fileno;\r\n Inbox::createInbox($projectProd->consultant_id, $projectPD2->designer2d_id, $msgInbox2d, 'PRODUCTION', 'PRODUCTION');\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n $msgInbox = \"INVENTOR PAID.PLEASE NOTIFY ALAIN.\\r\\n\";\r\n $msgInbox .= date(\"m-d-Y H:i:s\").\"\\r\\n\";\r\n $msgInbox .= \"File #:\".$project->lead->fileno.\"\\r\\n\";\r\n $msgInbox .= \"Pin: \".$project->id.\"\\r\\n\";\r\n $msgInbox .= \"Client: \".$project->lead->fname.\" \".$project->lead->lname.\"\\r\\n\";\r\n $msgInbox .= \"Amount: \".$amount.\"\\r\\n\";\r\n $msgInbox .= \"Type: \".$contract->type.\"\\r\\n\";\r\n Inbox::createInbox($project->lead->id, $project->consultant_id, $msgInbox, 'PAYMENT', 'CLIENT');\r\n\r\n CreateContractSignedHelper::generateSoldReport ($contract);\r\n\r\n //Send Email to George, ALain and Me\r\n $url = url(\"sendPaymentNotificationToAdminDocusign?ID=\".$contract->id);\r\n ToolsFunctions::curl($url);\r\n //Send Email to client\r\n $url = url(\"sendPaymentNotificationToClient?ID=\".$contract->id);\r\n ToolsFunctions::curl($url);\r\n\r\n return view('omi.payment.success',array('project'=>$project,'contract'=>$contract,'client'=>$this->client,'complete'=>1));\r\n }\r\n if($contract->price<=$contract->paid && strlen($contract->signed)>0)\r\n {\r\n if($contract->type==\"IGUP\")\r\n {\r\n $projectP = $project->getProjectProduction();\r\n if($projectP!=null)\r\n {\r\n $projectP->contractType = 'IGUP';\r\n $projectP->completed = 0;\r\n $projectP->save();\r\n }\r\n }\r\n\r\n //when someone upgrade from IIG to IIG: notify production and if is to platinum package send back to writer for press release and create row for 2D\r\n if($contract->iigUpgrade == 1){\r\n $msg = \"IIG UPGRADE PAYMENT RECEIVED.\\r\\n\";\r\n $msg .= date(\"m-d-Y H:i:s\").\"\\r\\n\";\r\n $msg .= \"File #:\".$project->lead->fileno.\"\\r\\n\";\r\n $msg .= \"Pin: \".$project->id.\"\\r\\n\";\r\n $msg .= \"Amount: \".$contract->iigUpgradePrice.\"\\r\\n\";\r\n $msg .= \"Plan: \".($contract->iigUpgradePrice == 100 || $contract->iigUpgradePrice == 200)?'GOLD':'PLATINUM'.\"\\r\\n\";\r\n $msg .= \"Client: \".$project->lead->fname.\" \".$project->lead->lname.\"\\r\\n\";\r\n Inbox::createInbox($project->lead->id, 30, $msg, 'PAYMENT', 'PRODUCTION');\r\n\r\n if($contract->iigUpgradePrice == 330 || $contract->iigUpgradePrice == 230 || $contract->iigUpgradePrice == 300 || $contract->iigUpgradePrice == 500){\r\n $projectProd = ProjectProduction::where(array('project_id'=>$project->id,'typeVendor'=>'production'))->first();\r\n if($projectProd != null && $projectProd->sendDate != \"0000-00-00 00:00:00\"){\r\n $projectPW = ProjectProduction::where(array('project_id'=>$project->id,'typeVendor'=>'writer'))->first();\r\n if($projectPW != null){\r\n $projectPW->completed = 0;\r\n $projectPW->save();\r\n }\r\n $projectPD2 = ProjectProduction::where(array('project_id'=>$project->id,'typeVendor'=>'2D'))->first();\r\n if($projectPD2==null)\r\n {\r\n $designer2d = Consultant::where('rol','LIKE','%2D%')->first();\r\n $projectPD2 = new ProjectProduction();\r\n $projectPD2->project_id = $projectProd->project_id;\r\n $projectPD2->fileno = $projectProd->fileno;\r\n $projectPD2->typeVendor = '2D';\r\n $projectPD2->consultant_id = $designer2d->id;\r\n $projectPD2->contractType = $projectProd->contractType;\r\n $projectPD2->designer_id = $projectProd->designer_id;\r\n $projectPD2->designer2d_id = $designer2d->id;\r\n $projectPD2->writer_id = $projectProd->writer_id;\r\n $projectPD2->university_id = $projectProd->university_id;\r\n $projectPD2->attorney_id = $projectProd->attorney_id;\r\n $projectPD2->sendDate = date(\"Y-m-d H:i:s\");\r\n $projectPD2->save();\r\n\r\n $projectProd->designer2d_id = $designer2d->id;\r\n $projectProd->save();\r\n\r\n $msgInbox2d = \"NEW FILES AVAILABLE.\\r\\n\";\r\n $msgInbox2d .= date(\"m-d-Y H:i:s\").\"\\r\\n\";\r\n $msgInbox2d .= \"Files #:\".$projectProd->fileno;\r\n Inbox::createInbox($projectProd->consultant_id, $projectPD2->designer2d_id, $msgInbox2d, 'PRODUCTION', 'PRODUCTION');\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n $msgInbox = \"INVENTOR PAID IN FULL CONTRACT SIGNED.\\r\\n\";\r\n $msgInbox .= date(\"m-d-Y H:i:s\").\"\\r\\n\";\r\n $msgInbox .= \"File #:\".$project->lead->fileno.\"\\r\\n\";\r\n $msgInbox .= \"Pin: \".$project->id.\"\\r\\n\";\r\n $msgInbox .= \"Client: \".$project->lead->fname.\" \".$project->lead->lname.\"\\r\\n\";\r\n $msgInbox .= \"Amount: \".$amount.\"\\r\\n\";\r\n $msgInbox .= \"Type: \".$contract->type.\"\\r\\n\";\r\n Inbox::createInbox($project->lead->id, $project->consultant_id, $msgInbox, 'PAYMENT', 'CLIENT');\r\n\r\n CreateContractSignedHelper::generateSoldReport ($contract);\r\n //Send Email to George, ALain and Me\r\n $url = url(\"sendPaymentNotificationToAdminDocusign?ID=\".$contract->id);\r\n ToolsFunctions::curl($url);\r\n //Send Email to client\r\n $url = url(\"sendPaymentNotificationToClient?ID=\".$contract->id);\r\n ToolsFunctions::curl($url);\r\n return view('omi.payment.success',array('project'=>$project,'contract'=>$contract,'client'=>$client,'complete'=>1));\r\n }\r\n else if($contract->price<=$contract->paid)\r\n {\r\n $msgInbox = \"INVENTOR PAID IN FULL - CONTRACT NOT SIGNED.\\r\\n\";\r\n $msgInbox .= date(\"m-d-Y H:i:s\").\"\\r\\n\";\r\n $msgInbox .= \"File #:\".$project->lead->fileno.\"\\r\\n\";\r\n $msgInbox .= \"Pin: \".$project->id.\"\\r\\n\";\r\n $msgInbox .= \"Client: \".$project->lead->fname.\" \".$project->lead->lname.\"\\r\\n\";\r\n $msgInbox .= \"Amount: \".$amount.\"\\r\\n\";\r\n $msgInbox .= \"Type: \".$contract->type.\"\\r\\n\";\r\n Inbox::createInbox($project->lead->id, $project->consultant_id, $msgInbox, 'PAYMENT', 'CLIENT');\r\n\r\n //send the different price of the plans\r\n $prices = PpaPricesPlan::where('plan1', 'like',$contract->price)->orWhere('plan2', 'like',$contract->price)->orWhere('plan3', 'like',$contract->price)->first();\r\n return view('omi.launch.sign',array('prices'=>$prices,'client'=>$client,'project'=>$project,'contract'=>$contract,'from'=>'sign'));\r\n }\r\n else\r\n {\r\n $msgInbox = \"INVENTOR PARTIAL PAYMENT.\\r\\n\";\r\n $msgInbox .= date(\"m-d-Y H:i:s\").\"\\r\\n\";\r\n $msgInbox .= \"File #:\".$project->lead->fileno.\"\\r\\n\";\r\n $msgInbox .= \"Pin: \".$project->id.\"\\r\\n\";\r\n $msgInbox .= \"Client: \".$project->lead->fname.\" \".$project->lead->lname.\"\\r\\n\";\r\n $msgInbox .= \"Amount: \".$amount.\"\\r\\n\";\r\n $msgInbox .= \"Type: \".$contract->type.\"\\r\\n\";\r\n Inbox::createInbox($project->lead->id, $project->consultant_id, $msgInbox, 'PAYMENT', 'CLIENT');\r\n return view('omi.payment.success',array('project'=>$project,'contract'=>$contract,'client'=>$client,'complete'=>0));\r\n }\r\n }\r\n return view('omi.payment.index',array('project'=>$project,'contract'=>$contract,'client'=>$client,'error'=>\"Payment Failed.\"));\r\n\r\n }", "public function payment_status_pending()\n {\n return $this->payment_status_completed();\n }", "public function createPaypalPayment(){\n try {\n $client = new Client();\n $paymentResponse = $client->request('POST', $this->paypalPaymentUrl, [\n 'headers' => [\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->accessKey,\n ],\n 'body' => $this->salesData->salesData()\n ]);\n $this->parsePaymentBody($paymentResponse);\n \n } catch (\\Exception $ex) {\n $error = $ex->getMessage();\n return $error;\n }\n return $this->paymentBody->id;\n\n }", "public function getPaymentid()\r\n {\r\n return $this->paymentid;\r\n }", "function handleSinglePayment(&$input, &$ids, &$objects) {\r\n $contribution =& $objects['contribution'];\r\n require_once 'CRM/Core/Transaction.php';\r\n $transaction = new CRM_Core_Transaction();\r\n if ($input[\"transStatus\"]==\"Y\") {\r\n $this->completeTransaction($input,$ids,$objects,$transaction,false);// false= not recurring\r\n $output = '<div id=\"logo\"><h1>Thank you</h1><p>Your payment was successful.</p><p>Please <a href=\"' . $ids[\"thankyoupage\"] . '\">click here to return to our web site</a></p>';\r\n echo CRM_Utils_System::theme( $output, true, false );\r\n }\r\n else if ($input[\"transStatus\"]==\"C\") {\r\n $this->cancelled($objects,$transaction);\r\n $output = '<h1>Transaction Cancelled</h1><p>Your payment was cancelled or rejected.</p><p>Please contact us by phone or email regarding your payment.</p><p><a href=\"' . $ids[\"cancelpage\"] . '\">Click here to return to our web site</a></p>';\r\n echo CRM_Utils_System::theme( $output, true, false );\r\n }\r\n else {\r\n CRM_Core_Error::debug_log_message(\"Unrecognized transStatus for single payment=\".$input[\"transStatus\"]);\r\n error_log(__FILE__.\":\".__FUNCTION__.\" : Unrecognized transStatus for single payment=\".$input[\"transStatus\"]);\r\n $output = '<h1>Error</h1><p>There was an error while processing your payment.</p><p>Please contact us by phone or email regarding your payment.</p><p><a href=\"' . $ids[\"cancelpage\"] . '\">Click here to return to our web site</a></p>';\r\n echo CRM_Utils_System::theme( $output, true, false );\r\n return false;\r\n }\r\n // completeTransaction handles the transaction commit\r\n return true;\r\n }", "public function verify_order_id($orderID)\n {\n $client =$this->client();\n $response = $client->execute(new OrdersGetRequest($orderID));\n\n /**\n *Enable the following line to print complete response as JSON.\n */\n\n\n Log::debug( \\GuzzleHttp\\json_decode(\\GuzzleHttp\\json_encode($response, true),true) );\n\n\n// Logger::log( \\GuzzleHttp\\json_encode($response->result));\n Log::debug(\\GuzzleHttp\\json_encode($response->result, true));\n\n// Log::debug(\"Order ID: {$response->result->id}\\n\");\n// Log::error(\"Intent: {$response->result->intent}\\n\");\n\n $statusCode = $response->statusCode;\n $status = $response->result->status;\n $orderID = $response->result->id;\n $payerGivenName = $response->result->payer->name->given_name;\n $payerSurName = $response->result->payer->name->surname;\n $currency = $response->result->purchase_units[0]->amount->currency_code;\n $amount = $response->result->purchase_units[0]->amount->value;\n $payeeEmail = $response->result->purchase_units[0]->payee->email_address;\n $customID = $response->result->purchase_units[0]->custom_id;\n $paymentID = $response->result->purchase_units[0]->payments->captures[0]->id;\n\n Log::debug(\"Status Code: {$statusCode}\\n\");\n Log::debug(\"Status: {$status}\\n\");\n Log::debug(\"order id: {$orderID}\\n\");\n Log::debug(\"payer given name: {$payerGivenName}\\n\");\n Log::debug(\"payer sur name: {$payerSurName}\\n\");\n Log::debug(\"currency: {$currency}\\n\");\n Log::debug(\"amount: {$amount}\\n\");\n Log::debug(\"payee email: {$payeeEmail}\\n\");\n Log::debug(\"custom id: {$customID}\\n\");\n Log::debug(\"payment id: {$paymentID}\\n\");\n\n $paypalData = new PaypalData();\n $paypalData->status_code = $statusCode;\n $paypalData->status = $status;\n $paypalData->order_id = $orderID;\n $paypalData->payment_id = $paymentID;\n $paypalData->custom_id = $customID;\n $paypalData->payer_given_name = $payerGivenName;\n $paypalData->payer_sur_name = $payerSurName;\n $paypalData->currency = $currency;\n $paypalData->amount = $amount;\n $paypalData->payee_email = $payeeEmail;\n\n DB::transaction(function () use ($paypalData){\n\n if ($paypalData->saveOrFail()){\n\n $deposit = new Deposit();\n $deposit->user_id = $paypalData->custom_id;\n $deposit->amount = Forex::where('status',1)->orderBy('forex_id','desc')->first()->usd_rate()*($paypalData->amount);\n $deposit->channel = \"PAYPAL\";\n $deposit->confirmation_code = $paypalData->payment_id;\n\n if (is_null(Deposit::where('confirmation_code',$paypalData->payment_id)->first())){\n if ($deposit->saveOrFail()){\n $transaction = new Transaction();\n $transaction->user_id = $deposit->user_id;\n $transaction->type = \"CREDIT\";\n $transaction->ref_id = $deposit->id;\n\n if ($transaction->saveOrFail()){\n $currentBal = UserBalance::where('user_id', $transaction->user_id)->where('status',1)->orderBy('id', 'desc')->first();\n\n if (is_null($currentBal)){\n $oldBal = 0;\n }else{\n $oldBal = $currentBal->balance;\n }\n\n $userBalance = new UserBalance();\n $userBalance->user_id = $transaction->user_id;\n $userBalance->amount = $deposit->amount;\n $userBalance->balance = $deposit->amount + $oldBal;\n\n if ($userBalance->saveOrFail()){\n //notify customer\n auth()->user()->notify(new PaymentReceived($userBalance->amount, $userBalance->balance, \"PAYPAL\", $deposit->confirmation_code));\n }\n\n }\n\n }\n\n }\n }\n\n });\n\n }", "abstract function is_payments_sandbox();", "abstract function is_paying();", "public function success_payment(){\n\n\t\tif ( !empty( $_GET['paymentId'] ) && !empty( $_GET['PayerID'] ) ) {\n\n\t\t\ttry{\n\t\t\t\t$result = $this->paypal->execute_payment( $_GET['paymentId'], $_GET['PayerID'] );\n\t\t\t\t$result = json_decode($result, true);\n\t\t\t\t$paidAmount = $result['transactions'][0]['amount']['total'];\n\t\t\t\t\n\t\t\t\tif ($this->advertiser_model->check_exist($paymentId) == FALSE)\n\t\t\t\t{\n\t\t\t\t\t$user=$this->advertiser_model->get_advertiser_by_id($_SESSION['id']);\n\t\t\t\t\t$previous_bal = $user['account_bal'];\n\t\t\t\t\t$new_bal = $paidAmount+$previous_bal;\n\t\t\t\t\t$this->advertiser_model->credit_balance(array('account_bal' =>$new_bal ));\n\t\t\t\t\t$this->advertiser_model->insert_to_payment_record(array('method'=>'paypal',\n\t\t\t\t\t'payment_type'=>'deposit','amount'=> $paidAmount,'user_type'=>'advertiser','user_id' => $_SESSION['id'],\n\t\t\t\t\t'time'=>time(), 'txn_id'=>$_GET['paymentId'], 'payer_id'=>$_GET['PayerID'], 'payment_token'=>$_GET['token']));\n\n\n\t\t\t\t\t$_SESSION['action_status_report'] =\"<span class='w3-text-green'>Payment Successfully Processed</span>\";\n\t\t\t\t\t$this->session->mark_as_flash('action_status_report');\n\t\t\t\t\tshow_page(\"advertiser_dashboard/payment\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$_SESSION['action_status_report'] =\"<span class='w3-text-red'>Payment Failed. The transaction already exist.</span>\";\n\t\t\t\t\t$this->session->mark_as_flash('action_status_report');\n\t\t\t\t\tshow_page(\"advertiser_dashboard/payment\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$_SESSION['action_status_report'] =\"<span class='w3-text-red'>Payment Failed. Error is: \" . $e->getMessage() . \"</span>\";\n\t\t\t\t$this->session->mark_as_flash('action_status_report');\n\t\t\t\tshow_page(\"advertiser_dashboard/payment\");\n\t\t\t}\n\n\t\t}\n\n\t\treturn;\n\n\t}", "public function getPaymentId()\n {\n return $this->paymentId;\n }", "public function getPaymentId()\n {\n return $this->_getValue('oepaypal_paymentid');\n }", "function get_transaction_id()\n {\n return $this->platnosci_post_vars['txn_id']; \n }", "function successpayment()\n {\n\n /* Check for allowed IP */\n if ($this->config['allow_ip']) {\n $allowed_ip = explode(',', $this->config['allow_ip']);\n $valid_ip = in_array($_SERVER['REMOTE_ADDR'], $allowed_ip);\n if (!$valid_ip) {\n // TODO log\n return false;\n }\n }\n\n $response['orderId'] = $_POST['orderId'];\n $response['serviceName'] = $_POST['serviceName'];\n $response['eshopAccount'] = $_POST['eshopAccount'];\n $response['paymentStatus'] = $_POST['paymentStatus'];\n $response['userName'] = $_POST['userName'];\n $response['userEmail'] = $_POST['userEmail'];\n $response['paymentData'] = $_POST['paymentData'];\n $response['hash'] = $_POST['hash'];\n\n if (!empty($response['hash'])) {\n\n $order = uc_order_load($response['orderId']);\n if (!count($order))\n trigger_error('RBK Money : Полученный orderId (' . $response['orderId'] . ') не найден в базе', E_USER_WARNING);\n\n $string = $this->config['eshopId'] . '::' . $response['orderId'] . '::' . $response['serviceName'] . '::' . $response['eshopAccount'] . '::' . number_format($order->order_total, 2, '.', '') . '::' . $this->config['recipientCurrency'] . '::' . $response['paymentStatus'] . '::' . $response['userName'] . '::' . $response['userEmail'] . '::' . $response['paymentData'] . '::' . $this->config['secretKey'];\n $crc = md5($string);\n\n if ($response['hash'] == $crc) {\n list($dataBill) = $this->qs('*', array('id' => $response['orderId']));\n switch ($response['paymentStatus']) {\n case self::STATUS_PROCESS:\n $this->owner->payTransaction($dataBill['owner_id'], PAY_PAID);\n /*uc_order_update_status($response['orderId'], 'processing');\n uc_order_comment_save($response['orderId'], $order->uid, t('RBK Money: payment processing'), $type = 'admin', $status = 1, $notify = FALSE);*/\n break;\n case self::STATUS_SUCCESS:\n $this->owner->payTransaction($dataBill['owner_id'], PAY_PAID);\n /*uc_payment_enter($response['orderId'], 'RBK Money', $order->order_total, $order->uid, NULL, NULL);\n uc_cart_complete_sale($order);\n uc_order_comment_save($response['orderId'], $order->uid, t('RBK Money: payment successful'), $type = 'admin', $status = 1, $notify = FALSE);*/\n break;\n }\n } elseif ($response['hash'] !== $crc) {\n /*uc_order_update_status($response['orderId'], 'canceled');\n uc_order_comment_save($response['orderId'], $order->uid, t('MD5 checksum fail, possible fraud. Order canceled'), $type = 'admin', $status = 1, $notify = FALSE);\n watchdog('uc_rbkmoney', 'MD5 checksum fail, possible fraud. Order canceled');*/\n trigger_error('RBK Money : Полученный hash не верный', E_USER_WARNING);\n }\n }\n }", "function afterPaypalNotification($txnId){\r\n //for example, you could now mark an order as paid, a subscription, or give the user premium access.\r\n //retrieve the transaction using the txnId passed and apply whatever logic your site needs.\r\n \r\n $transaction = ClassRegistry::init('PaypalIpn.InstantPaymentNotification')->findById($txnId);\r\n $this->log(\"transsaction: \" . $transaction['InstantPaymentNotification']['id'] . \r\n \" Order ID: \" . $transaction['InstantPaymentNotification']['custom'], 'paypal');\r\n\r\n //Tip: be sure to check the payment_status is complete because failure transactions \r\n // are also saved to your database for review.\r\n\r\n if($transaction['InstantPaymentNotification']['payment_status'] == 'Completed'){\r\n App::import('Model', 'Order');\r\n $thisOrder = new Order;\r\n $thisOrder->read(null, $transaction['InstantPaymentNotification']['custom']);\r\n\t\t\t$thisOrder->set(array('is_paid' => 1, 'status_id' =>TYPE_ORDER_PAID));\r\n\t\t\t$thisOrder->save();\r\n\r\n $thisOrder->unbindModel(array('belongsTo' => array('Status', 'Invoice')));\r\n\t\t$thisOrder->User->unbindModel(array(\r\n\t\t\t'hasAndBelongsToMany' => array('Group'),\r\n\t\t\t'hasMany' => array('Contact', 'Order'),\r\n\t\t\t'hasOne' => array('Supplier')\r\n\t\t));\r\n\t\t$thisOrder->hasAndBelongsToMany['Product']['fields'] = array('id', 'name', 'serial_no');\r\n\t\t$thisOrder->Product->unbindModel(array(\r\n\t\t\t\t'hasMany' => array('Media', 'Document', 'Feature'),\r\n\t\t\t\t'hasAndBelongsToMany' => array('Category', 'Type')\r\n\t\t));\r\n\t\t$thisOrder->Product->hasMany['Image']['conditions']['is_default'] = 1;\r\n\r\n\t\t$params = array(\r\n\t\t\t\t'conditions' => array(\r\n\t\t\t\t\t'Order.id' => $transaction['InstantPaymentNotification']['custom'],\r\n\t\t\t\t\t'Order.status_id' => TYPE_ORDER_PAID\r\n\t\t\t\t),\r\n\t\t\t\t'recursive' => 2\r\n\t\t);\r\n\t\tif ($order = $thisOrder->find('first', $params)) {\r\n\t\t\t$this->sendPaymentEmail($order);\r\n\t\t}\r\n }\r\n else {\r\n //Oh no, better look at this transaction to determine what to do; like email a decline letter.\r\n }\r\n }", "public function unpaid(): bool\n {\n return in_array($this->status, [self::PENDING]);\n }", "function get_payment_status()\n {\n return $this->paypal_post_vars['payment_status'];\n }", "function init_process_payment() {\r\n global $woocommerce;\r\n\r\n\t if((isset($_GET['ng_netgiroSignature']) && $_GET['ng_netgiroSignature'])\r\n\t\t && $_GET['ng_orderid'] && $_GET['ng_transactionid'] ) {\r\n \r\n\t\tif ( function_exists( 'wc_get_order' ) ) {\r\n\t\t\t$order = wc_get_order( $_GET['ng_orderid'] );\r\n\t\t} else {\r\n\t\t\t$order = new WC_Order( $_GET['ng_orderid'] );\r\n\t\t} \r\n\t\t\r\n\t\t$str = $this->secretkey . $_GET['ng_orderid'];\r\n $hash = hash('sha256', $str);\r\n if($hash==$_GET['ng_signature']) {\r\n $order -> payment_complete();\r\n $order -> add_order_note('Netgíró greiðsla tókst<br/>Tilvísunarnúmer frá Netgíró: '.$_REQUEST['ng_invoiceNumber']); \r\n $woocommerce->cart->empty_cart();\r\n wp_redirect($this->get_return_url( $order ));\r\n exit;\r\n } else {\r\n // Set order status to failed\r\n $order -> update_status('failed');\r\n $order -> add_order_note('Netgiro payment failed. Woocommerce order id: ' . $_GET['ng_orderid'] . ' and Netgiro reference no.: ' . $_REQUEST['ng_invoiceNumber'] . ' does relate to signature: ' . $_GET['ng_signature']); \r\n\t\t \r\n\t\t wc_add_notice(\"Ekki tókst að staðfesta Netgíró greiðslu! Vinsamlega hafðu samband við verslun og athugað stöðuna á pöntun þinni nr. \" . $_GET['ng_orderid'], 'error');\r\n\t\t wp_redirect($this->get_return_url( $order ));\r\n\t\t exit;\r\n }\r\n }\r\n }", "public function makePayment($amountTobePaid)\n {\n\n $this->transactionId = uniqid();\n $encodedAuth = base64_encode($this->apiUser . \":\" . $this->apiPassword);\n $postRequest = array(\n \"total_amount\" => $amountTobePaid,\n \"return_url\" => $this->returnUrl,\n \"notify_url\" => $this->notifyUrl,\n \"transaction_id\" => $this->transactionId,\n \"description\"=> \"PayUnit web payments\"\n );\n $cURLConnection = curl_init();\n if($this->mode === \"test\"){\n curl_setopt($cURLConnection, CURLOPT_URL, \"https://app-payunit.sevengps.net/sandbox/gateway/initialize\");\n }else{\n curl_setopt($cURLConnection, CURLOPT_URL, \"https://app-payunit.sevengps.net/api/gateway/initialize\");\n }\n curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, json_encode($postRequest)); \n $secArr = array(\n \"x-api-key: {$this->apiKey}\",\n \"authorization: Basic: {$encodedAuth}\",\n 'Accept: application/json',\n 'Content-Type: application/json',\n \"mode: {$this->mode}\"\n );\n $all = array_merge($postRequest,$secArr);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER,$all);\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = curl_exec($cURLConnection);\n curl_close($cURLConnection);\n $jsonArrayResponse = json_decode($apiResponse);\n echo(isset($jsonArrayResponse));\n if(isset($jsonArrayResponse->body->transaction_url)){\n echo(\"dfdgdg\");\n //die();\n header(\"Location: {$jsonArrayResponse->body->transaction_url}\");\n exit(); \n }\n else{\n echo($apiResponse);\n }\n }", "abstract protected function handlePayment();", "function after_process() {\n\t\t $requestParamList = array(\"MID\" => MODULE_PAYMENT_PAYTM_MERCHANT_ID , \"ORDERID\" => $_POST['ORDERID']);\n\n\t\t $paytmParamsStatus = array();\n /* body parameters */\n $paytmParamsStatus[\"body\"] = array(\n /* Find your MID in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys */\n \"mid\" => $requestParamList['MID'],\n /* Enter your order id which needs to be check status for */\n \"orderId\" => $requestParamList['ORDERID'],\n );\n $checksumStatus = PaytmChecksum::generateSignature(json_encode($paytmParamsStatus[\"body\"], JSON_UNESCAPED_SLASHES), MODULE_PAYMENT_PAYTM_MERCHANT_KEY);\n /* head parameters */\n $paytmParamsStatus[\"head\"] = array(\n /* put generated checksum value here */\n \"signature\" => $checksumStatus\n );\n /* prepare JSON string for request */\n $post_data_status = json_encode($paytmParamsStatus, JSON_UNESCAPED_SLASHES);\n $paytstsusmurl = $this->paytmurl.PaytmConstants::ORDER_STATUS_URL; \n $ch = curl_init($paytstsusmurl);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data_status);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n $responseJson = curl_exec($ch);\n $responseStatusArray = json_decode($responseJson, true);\n\t\t if($responseStatusArray['body']['resultInfo']['resultStatus']=='TXN_SUCCESS' && $responseStatusArray['body']['txnAmount']==$_POST['TXNAMOUNT'])\n\t\t {\n\t\t \tglobal $insert_id;\n\t\t\t $status_comment=array();\n\t\t\t if(isset($_POST)){\n\t\t\t\t if(isset($_POST['ORDERID'])){\n\t\t\t\t \t$status_comment[]=\"Order Id: \" . $_POST['ORDERID'];\n\t\t\t\t }\n\t\t\t\t\n\t\t\t\t if(isset($_POST['TXNID'])){\n\t\t\t\t\t $status_comment[]=\"Paytm TXNID: \" . $_POST['TXNID'];\n\t\t\t\t }\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$sql_data_array = array('orders_id' => $insert_id,\n 'orders_status_id' => MODULE_PAYMENT_PAYTM_ORDER_STATUS_ID,\n 'date_added' => 'now()',\n 'customer_notified' => '0',\n 'comments' => implode(\"\\n\", $status_comment));\n\n\t\t\tzen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);\n\t\t}\n\t\telse{\n\t\t\tzen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . urlencode(\"It seems some issue in server to server communication. Kindly connect with administrator.\"), 'SSL', true, false));\n\t\t}\n }", "private function rollbackMerchantOrder()\n {\n $this->magentoOrder->setState(\\Magento\\Sales\\Model\\Order::STATE_PENDING_PAYMENT, true);\n $this->magentoOrder->setStatus(\\Magento\\Sales\\Model\\Order::STATE_PENDING_PAYMENT);\n $this->magentoOrder->save();\n }", "function process_payment( $order_id ) {\n\t\t\t\n\t\t\t$order = &new woocommerce_order( $order_id );\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'result' \t=> 'success',\n\t\t\t\t'redirect'\t=> add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(get_option('woocommerce_pay_page_id'))))\n\t\t\t);\n\t\t\t\n\t\t}", "function isPending() {\n return $this->getStatus() == UserpointsTransaction::STATUS_PENDING;\n }", "function dsf_protx_decline_order($order_number){\n\nglobal $VoidURL, $AbortURL, $Verify, $ProtocolVersion;\n\n// validate a protx direct item.\n $protx_query = dsf_db_query(\"select orders_id, vendortxcode, vpstxid, securitykey, txauthno from \" . DS_DB_SHOP . \".protx_direct_responses where orders_id='\" . (int)$order_number . \"'\");\n \n if (dsf_db_num_rows($protx_query) == 0){\n \n \t$problem_text = 'Order number ' . $order_number . ' has been marked as declined however its' . \"\\n\";\n\t$problem_text .= 'transaction details can not be found within the protx direct transaction logs' . \"\\n\\n\";\n\t$problem_text .= 'If this is a valid protx direct payment order, please decline the item manually';\n\t\n\tmail_protx_problem($problem_text);\n\treturn 'invalid protx item';\n\tbreak;\n\t\n \t// not a protx order\n }elseif (dsf_db_num_rows($protx_query) > 1){\n \t// more than one item is listed - this is an error.\n \t$problem_text = 'Order number ' . $order_number . ' has been marked as declined however there are' . \"\\n\";\n\t$problem_text .= 'more than one transaction item found within the protx direct transaction logs' . \"\\n\\n\";\n\t$problem_text .= 'Please decline the item manually and check the logs to see why there is more' . \"\\n\";\n\t$problem_text .= 'than one transaction item.' . \"\\n\";\n\t\n\t\n\tmail_protx_problem($problem_text);\n\treturn 'more than one protx item found';\n\tbreak;\n }\n \t\n\n // we must have a valid transaction item if we are here.\n \n // we therefore need to check our logs to see if the item has been previously charged.\n \n $check_history_query = dsf_db_query(\"select orders_id, orders_status_id from \" . DS_DB_SHOP . \".orders_status_history where orders_id='\" . $order_number . \"' and orders_status_id='90006'\");\n \n if (dsf_db_num_rows($check_history_query)==0){\n \t$TargetURL = $AbortURL; // never charged.\n\t$TxType = 'ABORT';\n }else{\n \t$TargetURL = $VoidURL; // has been charged\n\t$TxType = 'VOID';\n }\n \n \n \n $protx_items = dsf_db_fetch_array($protx_query);\n \n$VerifyServer = $Verify;\n\n\t$protx_user_account_number = MODULE_PAYMENT_PROTXCC_ID;\n\n// #########################\n\n\n\n\n$data = array (\n\t\t'VPSProtocol' => $ProtocolVersion, \t\t\t\t\t\t\t// Protocol version (specified in init-includes.php)\n\t\t'TxType' => $TxType,\t\t\t\t\t\t\t\t\t\t\t\t\t// Transaction type \n\t\t'Vendor' => $protx_user_account_number,\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Vendor name (specified in init-protx.php)\n\t\t'VendorTxCode' => $protx_items['vendortxcode'],\t\t\t\t\t// Unique refund transaction code (generated by vendor)\n\t\t'VPSTxId' => $protx_items['vpstxid'],\t\t\t\t\t\t\t\t\t\t// VPSTxId of order\n\t\t'SecurityKey' => $protx_items['securitykey'],\t\t\t\t\t\t// Security Key\n\t\t'TxAuthNo' => $protx_items['txauthno']\t\t\t\t\t\t\t\t\t// Transaction authorisation number\n\t);\n\n// Format values as url-encoded key=value pairs\n$data = formatData($data);\n\n$response = requestPost($TargetURL, $data);\n\n$baseStatus = array_shift(split(\" \",$response[\"Status\"]));\n\nswitch($baseStatus) {\n\n\tcase 'OK':\n\t\n\t// payment has been voided / aborted witin protx.\n\n\n\t\t// update the orders status\n\t\t\t\t\t\t\n\t\t$sql_data_array = array('orders_status' => '50005');\n\t\tdsf_db_perform(DS_DB_SHOP . \".orders\",$sql_data_array,'update','orders_id=' . $order_number);\n\n\n\t// update status history.\n\t\t $sql_data_array = array('orders_id' => $order_number, \n\t\t\t\t\t\t\t\t 'orders_status_id' => '50005', \n\t\t\t\t\t\t\t\t 'date_added' => 'now()');\n\t\t dsf_db_perform(DS_DB_SHOP . \".orders_status_history\", $sql_data_array);\n\n\t\t\n\t// log the reply.\n\t\t\n\t\t$write_notes = dsf_protx_shop_notes($order_number, $TxType . \" STATUS = OK\\n\");\n\n\t\treturn 'Complete';\n\t\tbreak;\n\t\n\t\n\t\n\t// all other cases except failed\n\tcase 'MALFORMED':\n\tcase 'INVALID':\n\tcase 'ERROR':\n\t\n\t$problem_text = 'Order number ' . $order_number . ' has been marked as ' . $TxType . ' however a problem' . \"\\n\";\n\t$problem_text .= 'has been returned from Protx, the error is:' . \"\\n\\n\";\n\t$problem_text .= $response['StatusDetail'] . \"\\n\";\n\t\n\tmail_protx_problem($problem_text);\n\n\t$write_notes = dsf_protx_shop_notes($order_number, $TxType . \" STATUS = FAILED\\n\");\n\n\treturn 'Failed';\n\tbreak;\n\n\tcase 'FAIL':\n\t\n\t$problem_text = 'Order number ' . $order_number . ' has been marked as ' . $TxType . ' however a problem' . \"\\n\";\n\t$problem_text .= 'with communication from Protx has occured, the error (if available) is:' . \"\\n\\n\";\n\t$problem_text .= $response['StatusDetail'] . \"\\n\";\n\t\n\tmail_protx_problem($problem_text);\n\n\t$write_notes = dsf_protx_shop_notes($order_number, $TxType . \" STATUS = FAILED\\n\");\n\n\treturn 'Failed';\n\tbreak;\n\n\n\t} // end of switch.\n\nreturn 'error';\n}", "public function paymentId() : string;", "public function isStatusNotPaid()\n {\n return $this->status == self::_ORDER_STATUS_NEW || $this->status == self::_ORDER_STATUS_REJECTED;\n }", "public static function isExistsPaymentItem($id){\n //print_r($id);exit;\n $result = DB::table('payment_cost_item')\n ->where('fk_payment_id', '=', $id)\n ->get();\n return $result;\n }", "function process_payment( $order_id ) {\n global $woocommerce;\n\n $order = new WC_Order( $order_id );\n\t\t\n\t\ttry {\n\t\t\t$this->charge_payment( $order_id );\n\t\t\t\n if('veritrans_direct'==$this->select_veritrans_payment) {\n\t\t\t\treturn array(\n\t\t\t\t\t'result' => 'success',\n\t\t\t\t\t'redirect' => add_query_arg('key', $order->order_key, add_query_arg('order', $order_id, get_permalink(woocommerce_get_page_id('thanks'))))\n\t\t\t\t);\n\t\t\t}\n\n else {\n\t\t\t\treturn array(\n\t\t\t\t\t'result' \t=> 'success',\n\t\t\t\t\t'redirect'\t=> add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(woocommerce_get_page_id('pay' ))))\n\t\t\t\t);\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$woocommerce->add_error( '<strong>' . __('Veritrans error: ', 'woocommerce') . '</strong>' . $e->getMessage() );\n\t\t\treturn;\n\t\t}\n\n }", "public function processPayment(){\r\n return true;\r\n }", "function payment_id($payment_id=null)\n {\n if (isset($payment_id)) $this->payment_id = $payment_id;\n return $this->payment_id;\n }", "function dsf_protx_release_order($order_number){\n\nglobal $ReleaseURL, $Verify, $ProtocolVersion;\n\n\n// validate a protx direct item.\n $protx_query = dsf_db_query(\"select orders_id, vendortxcode, vpstxid, securitykey, txauthno from \" . DS_DB_SHOP . \".protx_direct_responses where orders_id='\" . (int)$order_number . \"'\");\n \n if (dsf_db_num_rows($protx_query) == 0){\n \n \t$problem_text = 'Order number ' . $order_number . ' has been marked as released however its' . \"\\n\";\n\t$problem_text .= 'transaction details can not be found within the protx direct transaction logs' . \"\\n\\n\";\n\t$problem_text .= 'If this is a valid protx direct payment order, please release the item manually';\n\t\n\tmail_protx_problem($problem_text);\n\treturn 'Protx Item not Found';\n\tbreak;\n\t\n \t// not a protx order\n }elseif (dsf_db_num_rows($protx_query) > 1){\n \t// more than one item is listed - this is an error.\n \t$problem_text = 'Order number ' . $order_number . ' has been marked as released however there are' . \"\\n\";\n\t$problem_text .= 'more than one transaction item found within the protx direct transaction logs' . \"\\n\\n\";\n\t$problem_text .= 'Please release the item manually and check the logs to see why there is more' . \"\\n\";\n\t$problem_text .= 'than one transaction item.' . \"\\n\";\n\t\n\t\n\tmail_protx_problem($problem_text);\n\treturn 'More than one protx item found';\n\tbreak;\n }\n \t\n\n\t$protx_user_account_number = MODULE_PAYMENT_PROTXCC_ID;\n\n// #########################\n\n\n\n\n\n // we must have a valid transaction item if we are here, get the array of items.\n \n $protx_items = dsf_db_fetch_array($protx_query);\n \n$TargetURL = $ReleaseURL;\n$VerifyServer = $Verify;\n\n// echo 'URL = ' . $TargetURL;\n$data = array (\n\t\t'VPSProtocol' => $ProtocolVersion, \t\t\t\t\t\t\t// Protocol version (specified in init-includes.php)\n\t\t'TxType' => 'RELEASE',\t\t\t\t\t\t\t\t\t\t\t\t\t// Transaction type \n\t\t'Vendor' => $protx_user_account_number,\t\t\t\t\t\t\t\t\t// Vendor name (specified in init-protx.php)\n\t\t'VendorTxCode' => $protx_items['vendortxcode'],\t\t\t\t\t// Unique refund transaction code (generated by vendor)\n\t\t'VPSTxId' => $protx_items['vpstxid'],\t\t\t\t\t\t\t\t\t\t// VPSTxId of order\n\t\t'SecurityKey' => $protx_items['securitykey'],\t\t\t\t\t\t// Security Key\n\t\t'TxAuthNo' => $protx_items['txauthno']\t\t\t\t\t\t\t\t\t// Transaction authorisation number\n\t);\n\n// Format values as url-encoded key=value pairs\n$data = formatData($data);\n\n$response ='';\n\n$response = requestPost($TargetURL, $data);\n\n$baseStatus = array_shift(split(\" \",$response[\"Status\"]));\n\nswitch($baseStatus) {\n\n\tcase 'OK':\n\t\n\t// payment has been released witin protx.\n\t\t\n\t\t// update the orders status\n\t\t\t\t\t\t\n\t\t$sql_data_array = array('orders_status' => '13');\n\t\tdsf_db_perform(DS_DB_SHOP . \".orders\",$sql_data_array,'update','orders_id=' . $order_number);\n\n\n\t// update status history.\n\t\t $sql_data_array = array('orders_id' => $order_number, \n\t\t\t\t\t\t\t\t 'orders_status_id' => '13', \n\t\t\t\t\t\t\t\t 'date_added' => 'now()');\n\t\t dsf_db_perform(DS_DB_SHOP . \".orders_status_history\", $sql_data_array);\n\n\t// log the reply.\n\t\t\n\t\t$write_notes = dsf_protx_shop_notes($order_number, \"RELEASE STATUS = OK\\n\");\n\n\t\treturn 'Complete';\n\t\tbreak;\n\t\n\t\n\t\n\t// all other cases\n\tcase 'MALFORMED':\n\tcase 'INVALID':\n\tcase 'ERROR':\n\t\n\t$problem_text = 'Order number ' . $order_number . ' has been marked as released however a problem' . \"\\n\";\n\t$problem_text .= 'has been returned from Protx, the error is:' . \"\\n\\n\";\n\t$problem_text .= $response['StatusDetail'] . \"\\n\";\n\t\n\tmail_protx_problem($problem_text);\n\n\t$write_notes = dsf_protx_shop_notes($order_number, \"RELEASE STATUS = FAILED\\n\");\n\n\treturn 'Failed';\n\tbreak;\n\n\n\tcase 'FAIL':\n\t\n\t$problem_text = 'Order number ' . $order_number . ' has been marked as ' . $TxType . ' however a problem' . \"\\n\";\n\t$problem_text .= 'with communication from Protx has occured, the error (if available) is:' . \"\\n\\n\";\n\t$problem_text .= $response['StatusDetail'] . \"\\n\";\n\t\n\tmail_protx_problem($problem_text);\n\n\t$write_notes = dsf_protx_shop_notes($order_number, $TxType . \" STATUS = FAILED\\n\");\n\n\treturn 'Failed';\n\tbreak;\n\n\n\t} // end of switch.\n\nreturn $response;\n}", "function getMemberOrderByPaymentTransactionID($payment_transaction_id)\n\t\t{\n\t\t\t//did they pass a trans id?\n\t\t\tif(empty($payment_transaction_id))\n\t\t\t\treturn false;\n\n\t\t\tglobal $wpdb;\n\t\t\t$id = $wpdb->get_var(\"SELECT id FROM $wpdb->pmpro_membership_orders WHERE payment_transaction_id = '\" . esc_sql($payment_transaction_id) . \"' LIMIT 1\");\n\t\t\tif($id)\n\t\t\t\treturn $this->getMemberOrderByID($id);\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}", "public function payment_failed()\n {\n $status = $this->input->post(\"status\");\n $firstname = $this->input->post(\"firstname\");\n $amount = $this->input->post(\"amount\");\n $txnid = $this->input->post(\"txnid\");\n $posted_hash = $this->input->post(\"hash\");\n $key = $this->input->post(\"key\");\n $productinfo = $this->input->post(\"productinfo\");\n $email = $this->input->post(\"email\");\n $salt = SALT;\n If ($this->input->post(\"additionalCharges\")) {\n $additionalCharges = $this->input->post(\"additionalCharges\");\n $retHashSeq = $additionalCharges . '|' . $salt . '|' . $status . '|||||||||||' . $email . '|' . $firstname . '|' . $productinfo . '|' . $amount . '|' . $txnid . '|' . $key;\n } else {\n $retHashSeq = $salt . '|' . $status . '|||||||||||' . $email . '|' . $firstname . '|' . $productinfo . '|' . $amount . '|' . $txnid . '|' . $key;\n }\n $hash = hash(\"sha512\", $retHashSeq);\n if ($hash != $posted_hash) {\n $data['msg'] = \"Invalid Transaction. Please try again\";\n } else {\n\n $data=array(\n 'user_name'=>$user_name,\n 'status'=>$status,\n 'txnid'=>$txnid,\n 'amount'=>$amount,\n 'hash'=>$hash\n );\n\n $path = base_url();\n $url = $path.'api/User_api/SavePayment';\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response_json = curl_exec($ch);\n curl_close($ch);\n $response = json_decode($response_json, true);\n //return $response;\n \n $data['msg'] = \"<h3>Your order status is \" . $status . \".</h3>\";\n $data['msg'] .= \"<h4>Your transaction id for this transaction is \" . $txnid . \". You may try making the payment by clicking the link below.</h4>\";\n }\n $data['msg'] .= '<p><a href=http://sforsuresh.in/> Try Again</a></p>';\n $this->load->view('includes/header.php');\n $this->load->view('pages/profile/membership_view',$data);\n $this->load->view('includes/footer.php');\n }", "public function getPaymentId() \n {\n if (!$this->hasPaymentId()) \n {\n $this->paymentId = '';\n }\n\n return $this->paymentId;\n }", "private function getTransactionId($payment)\n {\n return json_decode($payment->getDetails()['payment_response'])->transactionId;\n }", "public function getPaymentStatus()\n {\n $payment_id = Session::get('paypal_payment_id');\n\n /** clear the session payment ID **/\n Session::forget('paypal_payment_id');\n \n if (empty(Input::get('PayerID')) || empty(Input::get('token'))) {\n\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/');\n\n }\n\n $payment = Payment::get($payment_id, $this->_api_context);\n $execution = new PaymentExecution();\n $execution->setPayerId(Input::get('PayerID'));\n\n /**Execute the payment **/\n $result = $payment->execute($execution, $this->_api_context);\n \n if ($result->getState() == 'approved') {\n\n#-------------------SE ALMACENA LA COMPRA--------------------#\n #$this->saveOrder();\n #$usuario = Auth::id();\n #$cliente = 16;#NO TENGO CLARO DE DONDE OBTENGO EL SESSION DEL CLIENTE\n\n $cliente = 16;\n $usuario = Auth::id();#NO TENGO CLARO DE DONDE OBTENGO EL SESSION DEL CLIENTE\n\n $total = Cart::total();\n \n DB::beginTransaction();\n try {//db transaccion \n $id = DB::table('Ventas')->insertGetId( ['total' => $total,'id_user' => $usuario, 'id_cliente' => $cliente]);\n\n #--- ALMACENANDO DETALLE_PAGO\n $id_tipo_pago=1; # Por el momento 1 por paypal, solamente funcionando, una vez se coloque otro tipo de pago debe hacerce un casopara almacenar cada tipo de pago\n\n # $cliente = 3; #Por el momento se coloca cliente de manera manual\n\n DB::table('ventas_detalle_pago')->insert( ['id_venta' => $id, 'id_tipo_pago' => $id_tipo_pago,'id_user' => $usuario,'id_cliente' => $cliente,'referencia' => $payment_id]);\n\n \n foreach (Cart::content() as $item) { \n\n #----Buscando el precio en la tabla curso\n if($item->model->id_categoria == 1){\n\n $product = DB::table('products AS P')\n ->join('Cursos AS C', 'C.id_curso', '=', 'P.id_curso') \n #id_p tiene el id delcurso paquete o promocion segun sea el caso\n ->select('C.id_curso AS id_p','C.precio AS precio','C.nombre AS nombre')\n ->where('P.id', '=', $item->id )->first();\n\n \n #---Buscando el precio en la tabla promociones\n } if($item->model->id_categoria == 3){\n\n $product = DB::table('products AS P')\n ->join('Promociones AS C', 'C.id_promocion', '=', 'P.id_promocion') \n \n ->select('C.id_promocion AS id_p','C.precio AS precio','C.nombre AS nombre')\n ->where('P.id', '=', $item->id )->first(); \n \n\n\n #---Buscando el precio en la tabla paquetes\n } if($item->model->id_categoria == 2){\n\n $product = DB::table('products AS P')\n ->join('Paquetes AS C', 'C.id_paquete', '=', 'P.id_paquete') \n \n ->select('C.id_paquete AS id_p','C.precio AS precio','C.nombre AS nombre')\n ->where('P.id', '=', $item->id )->first(); \n } \n #---- ALMACENADO VENTAS_DETALLE\n $id_venta_d=DB::table('Ventas_Detalle')->insertGetId(['id_venta' => $id, 'id_producto' => $item->id, 'precio_venta' => $product->precio]);\n\n\n\n #--- ALMACENANDO VENTAS_SUBDETALLE - UNA SENTENCIA SEGUN SEA LA CATEGORIA\n\n if($item->model->id_categoria == 1){\n\n DB::table('ventas_subdetalle')->insert( ['id_venta_d' => $id_venta_d, 'id_curso' => $product->id_p,'precio' => $product->precio,'nombre' => $product->nombre]); #SE TRAE AL PRECIO Y NOMBRE DEL OBJETO PRODUCTO ( CURSO ) \n\n } elseif($item->model->id_categoria == 3){\n\n DB::table('ventas_subdetalle')->insert( ['id_venta_d' => $id_venta_d, 'id_promocion' => $product->id_p,'precio' => $product->precio,'nombre' => $product->nombre]); #SE TRAE AL PRECIO Y NOMBRE DEL OBJETO PRODUCTO PROMOCION) \n\n\n } elseif($item->model->id_categoria == 2){\n\n DB::table('ventas_subdetalle')->insert( ['id_venta_d' => $id_venta_d, 'id_paquete' => $product->id_p,'precio' => $product->precio,'nombre' => $product->nombre]); #SE TRAE AL PRECIO Y NOMBRE DEL OBJETO PRODUCTO (PAQUETE) \n\n }\n\n\n \n /*\n DB::table('Ventas_Detalle')->insert(\n ['id_producto' => $item->id, 'precio_venta' => $product->precio]); */\n \n } //foreach\n DB::commit(); // todo ok\n\n }catch(Exception $e){\n \n DB::rollback();\n\n } // catch\n\n\n\n\n \n#------------------------------------------------------------#\n\n\n\n \\Session::put('success', 'Payment success');\n \\Session::forget('cart');# inicializando carrito\n return redirect()->route('cart.index')->withSuccessMessage('Su pago ha sido recibido de forma exitosa bajo el #'. $payment_id); \n\n\n }\n\n \\Session::put('error', 'Payment failed');\n return Redirect::to('/');\n\n }", "public function paymentNotify()\n {\n $response = $this->client->request($this->methods['post'], 'pay' , [\n 'json' => [\n 'AGR_TRANS_ID' => $this->agr_trans_id,\n 'VENDOR_TRANS_ID' => $this->vendor_trans_id,\n 'STATUS' => $this->status,\n 'SIGN_TIME' => $this->generateSignTime(),\n 'SIGN_STRING' => md5($this->SECRET_KEY. $this->agr_trans_id. $this->vendor_trans_id. $this->status. $this->sign_time)\n ]\n ]);\n\n return json_decode($response->getBody());\n }", "function process_payment( $order_id ) {\n\n\t\t\t$order = new WC_Order( $order_id );\n\n\t\t\treturn array(\n\t\t\t\t'result' => 'success',\n\t\t\t\t'redirect' => add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(get_option('woocommerce_pay_page_id'))))\n\t\t\t);\n\n\t\t}", "public function rsfp_f_jdidealNotify(): bool\n\t{\n\t\t// Load the helper\n\t\t$jdideal = new Gateway;\n\n\t\t$trans = $this->app->input->get('transactionId');\n\t\t$column = 'trans';\n\n\t\tif (empty($trans))\n\t\t{\n\t\t\t$trans = $this->app->input->get('pid');\n\t\t\t$column = 'pid';\n\t\t}\n\n\t\t$details = $jdideal->getDetails($trans, $column, false, 'rsformpro');\n\t\t$statusCode = $jdideal->getStatusCode($details->result);\n\t\t$jdideal->log('Transaction number: ' . $trans, $details->id);\n\t\t$jdideal->log('Details loaded ', $details->id);\n\t\t$jdideal->log('Details result: ' . $details->result, $details->id);\n\t\t$jdideal->log('Status code: ' . $statusCode, $details->id);\n\t\t$isValid = $jdideal->isValid($details->result);\n\n\t\t// Set the status\n\t\tswitch ($statusCode)\n\t\t{\n\t\t\tcase 'X':\n\t\t\t\t$statusValue = -1;\n\t\t\t\tbreak;\n\t\t\tcase 'C':\n\t\t\t\t$statusValue = 1;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$statusValue = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$jdideal->log('Status value: ' . $statusValue, $details->id);\n\n\t\t// Get the IDs\n\t\t[$formId, $submissionId] = explode('.', $details->order_id);\n\t\t$formId = (int) $formId;\n\t\t$submissionId = (int) $submissionId;\n\n\t\t// Check the payment status\n\t\t$query = $this->db->getQuery(true)\n\t\t\t->select($this->db->quoteName('FieldValue'))\n\t\t\t->from($this->db->quoteName('#__rsform_submission_values'))\n\t\t\t->where(\n\t\t\t\t$this->db->quoteName('SubmissionId') . ' = ' . $submissionId\n\t\t\t)\n\t\t\t->where($this->db->quoteName('FormId') . ' = ' . $formId)\n\t\t\t->where(\n\t\t\t\t$this->db->quoteName('FieldName') . ' = ' . $this->db->quote(\n\t\t\t\t\t'_STATUS'\n\t\t\t\t)\n\t\t\t);\n\t\t$this->db->setQuery($query);\n\t\t$status = (int) $this->db->loadResult();\n\n\t\t$jdideal->log('RSForm status: ' . $status, $details->id);\n\n\t\tif ($status === 0)\n\t\t{\n\t\t\t$query->clear()\n\t\t\t\t->update($this->db->quoteName('#__rsform_submission_values'))\n\t\t\t\t->set(\n\t\t\t\t\t$this->db->quoteName('FieldValue') . ' = '\n\t\t\t\t\t. $this->db->quote($statusValue)\n\t\t\t\t)\n\t\t\t\t->where(\n\t\t\t\t\t$this->db->quoteName('SubmissionId') . ' = ' . $submissionId\n\t\t\t\t)\n\t\t\t\t->where($this->db->quoteName('FormId') . ' = ' . $formId)\n\t\t\t\t->where(\n\t\t\t\t\t$this->db->quoteName('FieldName') . ' = '\n\t\t\t\t\t. $this->db->quote('_STATUS')\n\t\t\t\t);\n\t\t\t$this->db->setQuery($query)->execute();\n\n\t\t\t$jdideal->setProcessed(1, $details->id);\n\n\t\t\t$settings = $this->loadFormSettings($formId);\n\n\t\t\tif ($statusValue === 1\n\t\t\t\t|| (int) $settings->get(\n\t\t\t\t\t'sendEmailOnFailedPayment', 0\n\t\t\t\t) === 1)\n\t\t\t{\n\t\t\t\t$jdideal->log('Send out emails', $details->id);\n\t\t\t\t$this->sendConfirmationEmail($details, $formId, $submissionId);\n\t\t\t\t$this->app->triggerEvent(\n\t\t\t\t\t'onRsformAfterConfirmPayment', [$submissionId]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Check if the result is valid\n\t\tif (!$isValid)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function paypalTransactionError($transaction){\n\t\tdebug('Transaction details: '.$transaction);\n\t}", "public function PaymentProcess()\n { \n $currency_result = $this->session->userdata('currency_result');\n $product_id = $this->input->post('product_id');\n $enquiryid = $this->input->post('enquiryid');\n $product = $this->checkout_model->get_all_details(PRODUCT, array('id' => $product_id));\n $this->load->library('paypal_class');\n $item_name = $this->input->post('product_name');\n $totalAmount = $this->input->post('price');\n //echo $totalAmount;exit();\n $currencyCode = $this->input->post('currencycode'); \n $user_currencycode = $this->input->post('user_currencycode');\n $loginUserId = $this->checkLogin('U');\n\t\t\t$currency_cron_id = $this->input->post('currency_cron_id');\n $quantity = 1;\n if ($this->session->userdata('randomNo') != '') {\n $delete = 'delete from ' . PAYMENT . ' where dealCodeNumber = \"' . $this->session->userdata('randomNo') . '\" and user_id = \"' . $loginUserId . '\" and status != \"Paid\" ';\n $this->checkout_model->ExecuteQuery($delete, 'delete');\n $dealCodeNumber = $this->session->userdata('randomNo');\n } else {\n $dealCodeNumber = mt_rand();\n }\n $insertIds = array();\n $now = date(\"Y-m-d H:i:s\");\n $paymentArr = array('product_id' => $product_id, 'price' => $totalAmount, 'indtotal' => $product->row()->price, 'sumtotal' => $totalAmount, 'user_id' => $loginUserId, 'sell_id' => $product->row()->user_id, 'created' => $now, 'dealCodeNumber' => $dealCodeNumber, 'status' => 'Pending', 'shipping_status' => 'Pending', 'total' => $totalAmount, 'EnquiryId' => $enquiryid, 'inserttime' => NOW(), 'currency_code' => $user_currencycode);\n $this->checkout_model->simple_insert(PAYMENT, $paymentArr);\n $insertIds[] = $this->db->insert_id(); \n $paymtdata = array('randomNo' => $dealCodeNumber, 'randomIds' => $insertIds);\n $lastFeatureInsertId = $dealCodeNumber;\n $this->session->set_userdata($paymtdata);\n $paypal_settings = unserialize($this->config->item('payment_0'));\n $paypal_settings = unserialize($paypal_settings['settings']);\n if ($paypal_settings['mode'] == 'sandbox') {\n $this->paypal_class->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';\n } else {\n $this->paypal_class->paypal_url = 'https://www.paypal.com/cgi-bin/webscr'; // paypal url\n }\n if ($paypal_settings['mode'] == 'sandbox') {\n $ctype = 'USD';\n } else {\n $ctype = 'USD';\n }\n $logo = base_url() . 'images/logo/' . $this->data['logo_img'];\n $CurrencyType = $this->checkout_model->get_all_details(CURRENCY, array('currency_type' => $ctype));\n $this->paypal_class->add_field('currency_code', $CurrencyType->row()->currency_type);\n $this->paypal_class->add_field('image_url', $logo);\n $this->paypal_class->add_field('business', $paypal_settings['merchant_email']); // Business Email\n $this->paypal_class->add_field('return', base_url() . 'order/success/' . $loginUserId . '/' . $lastFeatureInsertId); // Return URL\n $this->paypal_class->add_field('cancel_return', base_url() . 'order/failure'); // Cancel URL\n $this->paypal_class->add_field('notify_url', base_url() . 'order/ipnpayment'); // Notify url\n $this->paypal_class->add_field('custom', 'Product|' . $loginUserId . '|' . $lastFeatureInsertId); // Custom Values\n $this->paypal_class->add_field('item_name', $item_name); // Product Name\n $this->paypal_class->add_field('user_id', $loginUserId);\n $this->paypal_class->add_field('quantity', $quantity); // Quantity\n if ($user_currencycode != 'USD') {\n /*if ($currency_result->$currencyCode) {\n $totalAmount = $totalAmount / $currency_result->$currencyCode;\n } else {\n $totalAmount = currency_conversion($currencyCode, 'USD', $totalAmount);\n }*/\n\t\t\t\t$totalAmount = currency_conversion($user_currencycode, 'USD', $totalAmount,$currency_cron_id);\n // echo $totalAmount;exit();\n }\n\t\t\t\n $this->paypal_class->add_field('amount', $totalAmount); // Price\n $this->paypal_class->submit_paypal_post();\n }", "public function update($id = null,$payment = null, $amount = null) {\n $trasactionId = $this->_request->getParam('id');\n $transUrl = $this->config->getPaymentConfigData('gateway_url') . '/' . $this->config->getPaymentConfigData('transaction') . '/' . $trasactionId;\n $responseGetTrans = $this->serviceConfig->getCurlDataTags($transUrl);\n $status = $responseGetTrans->status;\n\t\t\n\t\tswitch ($status) {\n\t\t\tcase 'SETTLEMENT_REQUESTED':\n\t\t\t\t$paymentStatus = 'capture';\n\t\t\t\tbreak;\n\t\t\tcase 'AUTHORIZED':\n\t\t\t\t$paymentStatus = 'authorization';\n\t\t\t\tbreak;\n\t\t\tcase 'AUTHORIZATION_VOIDED':\n\t\t\t\t$paymentStatus = 'void';\n\t\t\t\tbreak;\n\t\t\tcase 'SETTLEMENT_CANCELLED':\n\t\t\t\t$paymentStatus = 'void';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n $collection = $this->settlements->getCollection()->addFieldToFilter('transaction_id',$trasactionId);\n foreach($collection as $data){\n $reportId = $data->getReportId(); \n $settlementData = $this->settlements->load($reportId);\n $settlementData->setSettlementStatus($status); \n $settlementData->save(); \t\t\t\n }\n\t\t\n\t\t$orderCollection = $this->order->getCollection()->addFieldToFilter('txn_id',$trasactionId);\n\t\tforeach($orderCollection as $orderData){\n $transId = $orderData->getTransactionId(); \n $this->order->load($transId)->setTxnType($paymentStatus)->save();\n\t\t\tif($paymentStatus == 'capture'){\n $orderId = $orderData->getOrderId();\n $order = $this->_orderRepository->get($orderId);\n if($order->canInvoice()) {\n $invoice = $this->_invoiceService->prepareInvoice($order);\n $invoice->register();\n $invoice->save();\n $transactionSave = $this->_transaction->addObject(\n $invoice\n )->addObject(\n $invoice->getOrder()\n );\n $transactionSave->save();\n }\n }\n\t\t\t\n\t\t\t return $responseGetTrans->status;\n\t\t\n\t\t \n\t\t \n\t\t}\n\n \n}", "public function checkPaymentCancellation()\n {\n $response = $this->client->request($this->methods['post'], 'pay' , [\n 'json' => [\n 'AGR_TRANS_ID' => $this->agr_trans_id,\n 'VENDOR_TRANS_ID' => $this->vendor_trans_id,\n 'SIGN_TIME' => $this->generateSignTime(),\n 'SIGN_STRING' => md5($this->SECRET_KEY. $this->agr_trans_id. $this->vendor_trans_id. $this->sign_time)\n ]\n ]);\n\n return json_decode($response->getBody());\n }", "function get_payment_status()\n {\n return $this->platnosci_post_vars['payment_status'];\n }", "public function getHasPaymentIssueAttribute()\n {\n return $this->active && $this->lastTransaction &&\n $this->lastTransaction->status != Factory::getClass(TransactionStatus::class)::SUCCESS;\n }", "private function deletePaymentStatus()\n {\n $sql = \"DELETE FROM s_core_states WHERE `group` = 'payment' AND\n id IN (1750, 1751, 1752, 1753)\";\n Shopware()->Db()->query($sql);\n $sql = \"DELETE FROM s_core_snippets WHERE name in ('in_review',\"\n . \"'pre_authorization_of_payment', 'payment_accepted', \"\n . \"'refund')\";\n Shopware()->Db()->query($sql);\n }", "function getQueuedPaymentId() {\n\t\tif (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');\n\t\treturn parent::getPaymentId();\n\t}", "public function acceptPendingRequest($id,$payment_id) {\n $reservations = Reservation::find($id);\n $reservations->status = \"Accepted\";\n $reservations->save();\n\n $customer_token = CustomersToken::where(['customer_id' => $reservations->customer_id])->first();\n\n if(!empty($customer_token)) {\n $pm = new PushMessage();\n $fcm = new FirebaseMessage();\n\n $pm->setTitle(\"Your reservation has been accepted!\");\n $pm->setMessage(\"Reservation schedule : Date:\".$reservations->reservation_date.\", Time: \".$reservations->reservation_time.\" \");\n $pm->setId($reservations->id);\n $pm->setImage(\"\");\n $pm->setIntent(\"Reservation\");\n\n $jsonMessage = $pm->getPushMessage();\n $response = $fcm->send($customer_token->token_id,$jsonMessage);\n\n }\n // Payment::find($id)->delete();\n $notification = new NotificationCustomer;\n $notification->customer_id = $reservations->customer_id;\n $notification->notificationable_id = $id;\n $notification->notificationable_type = \"App\\Reservation\";\n $notification->save();\n\n Payment::where('id',$payment_id)->update(['is_valid'=>'Valid']);\n\n return redirect('/admin/range-rental/pending/list')->with('flash_message_success','Reservation successfully updated!');\n\n }", "public function isPending()\n {\n if (!isset($this->data['error']) && $this->data['transactionResponse']['state'] === 'PENDING') {\n return true;\n }\n return false;\n }", "private function getPaymentId()\n {\n return Session::get('mall.payment.id');\n }", "protected function _processTransactionPaymentCompleted($parameters) {\n\t\t\t$invoiceItemData = $invoiceOrderData = $pendingTransactions = array();\n\t\t\t$invoiceTotalPaid = false;\n\n\t\t\tif (!empty($parameters['subscription_id'])) {\n\t\t\t\t$existingSubscription = $this->fetch('subscriptions', array(\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'id' => $parameters['subscription_id']\n\t\t\t\t\t),\n\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t'payment_attempts'\n\t\t\t\t\t)\n\t\t\t\t));\n\n\t\t\t\tif (!empty($existingSubscription['count'])) {\n\t\t\t\t\t$subscriptionData = array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => $parameters['subscription_id'],\n\t\t\t\t\t\t\t'payment_attempts' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t$this->save('subscriptions', $subscriptionData);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($parameters['invoice_id'])) {\n\t\t\t\t$invoice = $this->_call('invoices', array(\n\t\t\t\t\t'methodName' => 'invoice',\n\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t'invoices',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t'id' => $parameters['invoice_id'],\n\t\t\t\t\t\t\t\t'payable' => true\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttrue\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t\t$invoiceWarningLevel = $invoice['data']['invoice']['warning_level'];\n\n\t\t\t\tif (!empty($invoice['data'])) {\n\t\t\t\t\t$invoiceData = array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'amount_paid' => $invoice['data']['invoice']['amount_paid'] + $parameters['payment_amount'],\n\t\t\t\t\t\t\t'id' => $invoice['data']['invoice']['id']\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t$total = !empty($invoice['data']['invoice']['total_pending']) ? $invoice['data']['invoice']['total_pending'] : $invoice['data']['invoice']['total'];\n\n\t\t\t\t\tif (is_numeric($invoice['data']['invoice']['remainder_pending'])) {\n\t\t\t\t\t\t$invoiceData[0]['remainder_pending'] = max(0, round(($invoice['data']['invoice']['remainder_pending'] - $parameters['payment_amount']) * 100) / 100);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t!empty($invoice['data']['invoice']['user_id']) &&\n\t\t\t\t\t\t!empty($parameters['user']) &&\n\t\t\t\t\t\t$amountToApplyToBalance = max(0, min($parameters['payment_amount'], round(($invoiceData[0]['amount_paid'] - $total) * 100) / 100))\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (empty($invoice['data']['orders'])) {\n\t\t\t\t\t\t\t$amountToApplyToBalance = $parameters['payment_amount'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$userData = array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'id' => $parameters['user']['id'],\n\t\t\t\t\t\t\t\t'balance' => ($parameters['user']['balance'] + $amountToApplyToBalance)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->save('users', $userData);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t$invoiceData[0]['amount_paid'] >= $total ||\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tisset($invoiceData[0]['remainder_pending']) &&\n\t\t\t\t\t\t\t\t$invoiceData[0]['remainder_pending'] === 0\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\t$this->delete('invoice_items', array(\n\t\t\t\t\t\t\t'invoice_id' => $invoiceData[0]['id']\n\t\t\t\t\t\t))\n\t\t\t\t\t) {\n\t\t\t\t\t\t$invoiceData = array(\n\t\t\t\t\t\t\tarray_merge($invoiceData[0], array(\n\t\t\t\t\t\t\t\t'remainder_pending' => null,\n\t\t\t\t\t\t\t\t'shipping' => (!empty($invoice['data']['invoice']['shipping_pending']) ? $invoice['data']['invoice']['shipping_pending'] : $invoice['data']['invoice']['shipping']),\n\t\t\t\t\t\t\t\t'shipping_pending' => null,\n\t\t\t\t\t\t\t\t'status' => 'paid',\n\t\t\t\t\t\t\t\t'subtotal' => (!empty($invoice['data']['invoice']['subtotal_pending']) ? $invoice['data']['invoice']['subtotal_pending'] : $invoice['data']['invoice']['subtotal']),\n\t\t\t\t\t\t\t\t'subtotal_pending' => null,\n\t\t\t\t\t\t\t\t'tax' => (!empty($invoice['data']['invoice']['tax_pending']) ? $invoice['data']['invoice']['tax_pending'] : $invoice['data']['invoice']['tax']),\n\t\t\t\t\t\t\t\t'tax_pending' => null,\n\t\t\t\t\t\t\t\t'total' => (!empty($invoice['data']['invoice']['total_pending']) ? $invoice['data']['invoice']['total_pending'] : $invoice['data']['invoice']['total']),\n\t\t\t\t\t\t\t\t'total_pending' => null,\n\t\t\t\t\t\t\t\t'warning_level' => 0\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tforeach ($invoice['data']['orders'] as $orderKey => $order) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\tis_numeric($order['quantity_pending']) &&\n\t\t\t\t\t\t\t\t\t$order['quantity_pending'] > $order['quantity_active'] &&\n\t\t\t\t\t\t\t\t\t($quantity = ($order['quantity_pending'] - $order['quantity_active']))\n\t\t\t\t\t\t\t\t) ||\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t$order['status'] !== 'active' &&\n\t\t\t\t\t\t\t\t\t($quantity = $order['quantity'])\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t$quantity = (!empty($order['quantity_pending']) ? $order['quantity_pending'] : $order['quantity']);\n\t\t\t\t\t\t\t\t$orderData = array(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'currency' => $order['currency'],\n\t\t\t\t\t\t\t\t\t\t'id' => $order['id'],\n\t\t\t\t\t\t\t\t\t\t'interval_type' => (!empty($order['interval_type_pending']) ? $order['interval_type_pending'] : $order['interval_type']),\n\t\t\t\t\t\t\t\t\t\t'interval_type_pending' => null,\n\t\t\t\t\t\t\t\t\t\t'interval_value' => (!empty($order['interval_value_pending']) ? $order['interval_value_pending'] : $order['interval_value']),\n\t\t\t\t\t\t\t\t\t\t'interval_value_pending' => null,\n\t\t\t\t\t\t\t\t\t\t'ip_version' => $order['ip_version'],\n\t\t\t\t\t\t\t\t\t\t'previous_action' => null,\n\t\t\t\t\t\t\t\t\t\t'price' => ($price = (!empty($order['price_pending']) ? $order['price_pending'] : $order['price'])),\n\t\t\t\t\t\t\t\t\t\t'price_active' => min($order['price_active'] + $parameters['payment_amount'], $price),\n\t\t\t\t\t\t\t\t\t\t'price_pending' => null,\n\t\t\t\t\t\t\t\t\t\t'quantity' => $quantity,\n\t\t\t\t\t\t\t\t\t\t'quantity_active' => $order['quantity_active'],\n\t\t\t\t\t\t\t\t\t\t'quantity_allocated' => $order['quantity_allocated'],\n\t\t\t\t\t\t\t\t\t\t'quantity_pending' => null,\n\t\t\t\t\t\t\t\t\t\t'shipping' => (!empty($order['shipping_pending']) ? $order['shipping_pending'] : $order['shipping']),\n\t\t\t\t\t\t\t\t\t\t'shipping_pending' => null,\n\t\t\t\t\t\t\t\t\t\t'status' => 'active',\n\t\t\t\t\t\t\t\t\t\t'tax' => (!empty($order['tax_pending']) ? $order['tax_pending'] : $order['tax']),\n\t\t\t\t\t\t\t\t\t\t'tax_pending' => null,\n\t\t\t\t\t\t\t\t\t\t'user_id' => $order['user_id']\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$invoice['data']['orders'][$orderKey] = array_merge($invoice['data']['orders'][$orderKey], $orderData[0]);\n\t\t\t\t\t\t\t\t$invoiceItemData[] = array_merge(array_intersect_key($orderData[0], array(\n\t\t\t\t\t\t\t\t\t'currency' => true,\n\t\t\t\t\t\t\t\t\t'interval_type' => true,\n\t\t\t\t\t\t\t\t\t'interval_value' => true,\n\t\t\t\t\t\t\t\t\t'price' => true,\n\t\t\t\t\t\t\t\t\t'quantity' => true\n\t\t\t\t\t\t\t\t)), array(\n\t\t\t\t\t\t\t\t\t'invoice_id' => $invoiceData[0]['id'],\n\t\t\t\t\t\t\t\t\t'order_id' => $order['id'],\n\t\t\t\t\t\t\t\t\t'name' => $order['name']\n\t\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\t\tif (is_numeric($order['quantity_pending'])) {\n\t\t\t\t\t\t\t\t\t$action = $orderData[0]['previous_action'] = ($order['quantity_pending'] > $order['quantity_active'] ? 'upgrade' : 'downgrade');\n\t\t\t\t\t\t\t\t\t$pendingTransactions[] = array(\n\t\t\t\t\t\t\t\t\t\t'customer_email' => $parameters['user']['email'],\n\t\t\t\t\t\t\t\t\t\t'details' => 'Order ' . $action . ' successful for order <a href=\"' . $this->settings['base_url'] . 'orders/' . $order['id'] . '\">#' . $order['id'] . '</a>.<br>' . $order['quantity'] . ' ' . $order['name'] . ' to ' . $order['quantity_pending'] . ' ' . $order['name'] . '<br>' . number_format($order['price'], 2, '.', '') . ' ' . $order['currency'] . ' for ' . $order['interval_value'] . ' ' . $order['interval_type'] . ($order['interval_value'] !== 1 ? 's' : '') . ' to ' . number_format($order['price_pending'], 2, '.', '') . ' ' . $order['currency'] . ' for ' . $order['interval_value_pending'] . ' ' . $order['interval_type_pending'] . ($order['interval_value_pending'] !== 1 ? 's' : ''),\n\t\t\t\t\t\t\t\t\t\t'id' => uniqid() . time(),\n\t\t\t\t\t\t\t\t\t\t'initial_invoice_id' => $invoiceData[0]['id'],\n\t\t\t\t\t\t\t\t\t\t'invoice_id' => $invoiceData[0]['id'],\n\t\t\t\t\t\t\t\t\t\t'payment_amount' => 0,\n\t\t\t\t\t\t\t\t\t\t'payment_currency' => $this->settings['billing']['currency'],\n\t\t\t\t\t\t\t\t\t\t'payment_status' => 'completed',\n\t\t\t\t\t\t\t\t\t\t'payment_status_message' => 'Order ' . $action . ' successful.',\n\t\t\t\t\t\t\t\t\t\t'processed' => true,\n\t\t\t\t\t\t\t\t\t\t'transaction_charset' => $this->settings['database']['charset'],\n\t\t\t\t\t\t\t\t\t\t'transaction_date' => date('Y-m-d H:i:s', strtotime('+1 second')),\n\t\t\t\t\t\t\t\t\t\t'transaction_method' => 'PaymentCompleted',\n\t\t\t\t\t\t\t\t\t\t'user_id' => $parameters['user']['id']\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t$this->save('orders', $orderData) &&\n\t\t\t\t\t\t\t\t\t$this->save('transactions', $pendingTransactions)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t$actionData = array(\n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t'chunks' => ($chunks = ceil(($itemCount = (abs($order['quantity'] - (integer) $order['quantity_pending']))) / 10000)),\n\t\t\t\t\t\t\t\t\t\t\t'encoded_parameters' => json_encode(array(\n\t\t\t\t\t\t\t\t\t\t\t\t'action' => 'allocate',\n\t\t\t\t\t\t\t\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'order' => $orderData[0]\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t'item_count' => $itemCount,\n\t\t\t\t\t\t\t\t\t\t\t\t'table' => ($itemCount === 1 ? 'proxy' : 'proxies')\n\t\t\t\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\t\t\t\t\t\t'foreign_key' => 'order_id',\n\t\t\t\t\t\t\t\t\t\t\t'foreign_value' => $order['id'],\n\t\t\t\t\t\t\t\t\t\t\t'processed' => ($processOrder = ($chunks == 1)),\n\t\t\t\t\t\t\t\t\t\t\t'progress' => ($processOrder ? 100 : 0),\n\t\t\t\t\t\t\t\t\t\t\t'user_id' => $parameters['user']['id']\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\tif ($processOrder) {\n\t\t\t\t\t\t\t\t\t\t$this->_call('proxies', array(\n\t\t\t\t\t\t\t\t\t\t\t'methodName' => 'allocate',\n\t\t\t\t\t\t\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t'proxies',\n\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order' => $orderData[0]\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$this->save('actions', $actionData);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$invoiceOrders = $this->fetch('invoice_orders', array(\n\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t'invoice_id' => array_unique(array_filter(array(\n\t\t\t\t\t\t\t\t\t$invoice['data']['invoice']['id'],\n\t\t\t\t\t\t\t\t\t$invoice['data']['invoice']['initial_invoice_id'],\n\t\t\t\t\t\t\t\t\t$invoice['data']['invoice']['merged_invoice_id']\n\t\t\t\t\t\t\t\t)))\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t'initial_invoice_id',\n\t\t\t\t\t\t\t\t'invoice_id',\n\t\t\t\t\t\t\t\t'order_id'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\tif (!empty($invoiceOrders['count'])) {\n\t\t\t\t\t\t\t$invoiceOrderData = array_replace_recursive($invoiceOrders['data'], array_fill(0, $invoiceOrders['count'], array(\n\t\t\t\t\t\t\t\t'initial_invoice_id' => null\n\t\t\t\t\t\t\t)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$invoiceTotalPaid = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t$invoiceTotalPaid &&\n\t\t\t\t\t\tempty($invoiceItemData) &&\n\t\t\t\t\t\tcount($invoice['data']['orders']) === 1 &&\n\t\t\t\t\t\t($order = $invoice['data']['orders'][0]) &&\n\t\t\t\t\t\t$order['quantity_active'] === $order['quantity_pending']\n\t\t\t\t\t) {\n\t\t\t\t\t\t$invoiceItemData[] = array_merge(array_intersect_key($order, array(\n\t\t\t\t\t\t\t'interval_type' => true,\n\t\t\t\t\t\t\t'interval_value' => true,\n\t\t\t\t\t\t\t'price' => true,\n\t\t\t\t\t\t\t'quantity' => true\n\t\t\t\t\t\t)), array(\n\t\t\t\t\t\t\t'invoice_id' => $invoiceData[0]['id'],\n\t\t\t\t\t\t\t'order_id' => $order['id'],\n\t\t\t\t\t\t\t'name' => $order['name']\n\t\t\t\t\t\t));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t$this->save('invoices', $invoiceData) &&\n\t\t\t\t\t\t$this->save('invoice_items', $invoiceItemData) &&\n\t\t\t\t\t\t$this->save('invoice_orders', $invoiceOrderData)\n\t\t\t\t\t) {\n\t\t\t\t\t\t$invoice['data']['invoice'] = array_merge($invoice['data']['invoice'], $invoiceData[0]);\n\t\t\t\t\t\t$invoiceData = array();\n\n\t\t\t\t\t\tif ($invoiceTotalPaid) {\n\t\t\t\t\t\t\t$additionalDueInvoices = $this->_call('invoices', array(\n\t\t\t\t\t\t\t\t'methodName' => 'retrieveDueInvoices',\n\t\t\t\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t\t\t\t$invoice['data']['invoice']\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t$intervalType = $invoice['data']['orders'][0]['interval_type'];\n\n\t\t\t\t\t\t\tif (!empty($additionalDueInvoices)) {\n\t\t\t\t\t\t\t\t$invoiceData = array_replace_recursive($additionalDueInvoices, array_fill(0, count($additionalDueInvoices), array(\n\t\t\t\t\t\t\t\t\t'due' => null,\n\t\t\t\t\t\t\t\t\t'warning_level' => 5\n\t\t\t\t\t\t\t\t)));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tin_array($intervalType, array(\n\t\t\t\t\t\t\t\t\t'day',\n\t\t\t\t\t\t\t\t\t'month',\n\t\t\t\t\t\t\t\t\t'week',\n\t\t\t\t\t\t\t\t\t'year'\n\t\t\t\t\t\t\t\t)) &&\n\t\t\t\t\t\t\t\t!empty($intervalValue = $invoice['data']['orders'][0]['interval_value'])\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tempty($additionalDueInvoices) ||\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t!empty($additionalDueInvoices[0]['warning_level']) &&\n\t\t\t\t\t\t\t\t\t\t$additionalDueInvoices[0]['warning_level'] === 5\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t$invoiceWarningLevel === 5 ||\n\t\t\t\t\t\t\t\t\t\tempty($invoice['data']['invoice']['initial_invoice_id'])\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t$invoice['data']['invoice']['due'] = null;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$invoiceData[] = array(\n\t\t\t\t\t\t\t\t\t\t'cart_items' => $invoice['data']['invoice']['cart_items'],\n\t\t\t\t\t\t\t\t\t\t'currency' => $invoice['data']['invoice']['currency'],\n\t\t\t\t\t\t\t\t\t\t'due' => date('Y-m-d H:i:s', strtotime($invoice['data']['invoice']['due'] . ' +' . $intervalValue . ' ' . $intervalType)),\n\t\t\t\t\t\t\t\t\t\t'initial_invoice_id' => !empty($invoice['data']['invoice']['initial_invoice_id']) ? $invoice['data']['invoice']['initial_invoice_id'] : $invoice['data']['invoice']['id'],\n\t\t\t\t\t\t\t\t\t\t'shipping' => $invoice['data']['invoice']['shipping'],\n\t\t\t\t\t\t\t\t\t\t'status' => 'unpaid',\n\t\t\t\t\t\t\t\t\t\t'subtotal' => $invoice['data']['invoice']['subtotal'],\n\t\t\t\t\t\t\t\t\t\t'tax' => $invoice['data']['invoice']['tax'],\n\t\t\t\t\t\t\t\t\t\t'total' => $invoice['data']['invoice']['total'],\n\t\t\t\t\t\t\t\t\t\t'user_id' => $invoice['data']['invoice']['user_id'],\n\t\t\t\t\t\t\t\t\t\t'warning_level' => 0\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tunset($invoiceData[0]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!empty($invoiceData)) {\n\t\t\t\t\t\t\t\t$this->save('invoices', $invoiceData);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$invoice['data']['transactions'][] = $transaction = array_merge($parameters, array(\n\t\t\t\t\t\t\t'payment_method' => $this->_retrieveTransactionPaymentMethod($parameters['payment_method_id'])\n\t\t\t\t\t\t));\n\t\t\t\t\t\t$invoice['data'] = $this->_call('invoices', array(\n\t\t\t\t\t\t\t'methodName' => 'calculateInvoicePaymentDetails',\n\t\t\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t\t\t$invoice['data']\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\tif ($parameters['payment_amount'] > 0) {\n\t\t\t\t\t\t\t$mailParameters = array(\n\t\t\t\t\t\t\t\t'from' => $this->settings['from_email'],\n\t\t\t\t\t\t\t\t'subject' => 'Invoice #' . $invoice['data']['invoice']['id'] . ' payment confirmation',\n\t\t\t\t\t\t\t\t'template' => array(\n\t\t\t\t\t\t\t\t\t'name' => 'payment_successful',\n\t\t\t\t\t\t\t\t\t'parameters' => array(\n\t\t\t\t\t\t\t\t\t\t'invoice' => $invoice['data']['invoice'],\n\t\t\t\t\t\t\t\t\t\t'transaction' => array_merge($transaction, array(\n\t\t\t\t\t\t\t\t\t\t\t'amount_applied_to_balance' => $amountToApplyToBalance\n\t\t\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\t\t\t\t\t'transactions' => $invoice['data']['transactions'],\n\t\t\t\t\t\t\t\t\t\t'user' => $parameters['user']\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'to' => $parameters['user']['email']\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$this->_sendMail($mailParameters);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}", "function insert_transaction($subscriptionid = 0, $projectid = 0, $buynowid = 0, $user_id = 0, $p2b_user_id = 0, $storeid = 0, $orderid = 0, $description = '', $amount, $paid, $status, $invoicetype, $paymethod, $createdate, $duedate, $paiddate, $custommessage, $archive, $ispurchaseorder = 0, $returnid = 0, $transactionidx = '', $isdeposit = 0, $iswithdraw = 0, $dontprocesstax = 0)\n {\n global $ilance, $ilconfig;\n $subscriptionid = isset($subscriptionid) ? intval($subscriptionid) : '0';\n $projectid = isset($projectid) ? intval($projectid) : '0';\n $buynowid = isset($buynowid) ? intval($buynowid) : '0';\n $user_id = isset($user_id) ? intval($user_id) : '0';\n $p2b_user_id = isset($p2b_user_id) ? intval($p2b_user_id) : '0';\n $storeid = isset($storeid) ? intval($storeid) : '0';\n $orderid = isset($orderid) ? intval($orderid) : '0';\n $description = isset($description) ? $description : 'No transaction description provided';\n $amount = isset($amount) ? $amount : '0.00';\n $paid = isset($paid) ? $paid : '0.00';\n $status = isset($status) ? $status : 'unpaid';\n $invoicetype = isset($invoicetype) ? $invoicetype : 'debit';\n $paymethod = isset($paymethod) ? $paymethod : 'account';\n $ipaddress = IPADDRESS;\n $referer = REFERRER;\n $createdate = DATETIME24H;\n $duedate = isset($duedate) ? $duedate : DATETIME24H;\n $paiddate = isset($paiddate) ? $paiddate : '';\n $custommessage = isset($custommessage) ? $custommessage : 'No memo or administrative comments';\n $archive = isset($archive) ? intval($archive) : '0';\n $ispurchaseorder = isset($ispurchaseorder) ? $ispurchaseorder : '0';\n // withdraw and deposit related transactions\n $iswithdraw \t = isset($iswithdraw) \t ? intval($iswithdraw) : '0';\n $isdeposit \t = isset($isdeposit) \t ? intval($isdeposit) : '0';\n $totalamount = '0.00';\n $transactionid = (isset($transactionidx) AND !empty($transactionidx)) ? $transactionidx : $ilance->accounting_payment->construct_transaction_id();\n $currencyid = $this->currencyid == '0' ? $ilconfig['globalserverlocale_defaultcurrency'] : $this->currencyid;\n $ilance->db->query(\"\n INSERT INTO \" . DB_PREFIX . \"invoices\n (invoiceid, currency_id, subscriptionid, projectid, buynowid, user_id, p2b_user_id, storeid, orderid, description, amount, paid, totalamount, status, paymethod, ipaddress, referer, createdate, duedate, paiddate, custommessage, transactionid, archive, ispurchaseorder, isdeposit, iswithdraw)\n VALUES(\n NULL,\n '\" . intval($currencyid) . \"',\n '\" . intval($subscriptionid) . \"',\n '\" . intval($projectid) . \"',\n '\" . intval($buynowid) . \"',\n '\" . intval($user_id) . \"',\n '\" . intval($p2b_user_id) . \"',\n '\" . intval($storeid) . \"',\n '\" . intval($orderid) . \"',\n '\" . $ilance->db->escape_string($description) . \"',\n '\" . $ilance->db->escape_string($amount) . \"',\n '\" . $ilance->db->escape_string($paid) . \"',\n '\" . $ilance->db->escape_string($totalamount) . \"',\n '\" . $ilance->db->escape_string($status) . \"',\n '\" . $ilance->db->escape_string($paymethod) . \"',\n '\" . $ilance->db->escape_string($ipaddress) . \"',\n '\" . $ilance->db->escape_string($referer) . \"',\n '\" . $ilance->db->escape_string($createdate) . \"',\n '\" . $ilance->db->escape_string($duedate) . \"',\n '\" . $ilance->db->escape_string($paiddate) . \"',\n '\" . $ilance->db->escape_string($custommessage) . \"',\n '\" . $ilance->db->escape_string($transactionid) . \"',\n '\" . $ilance->db->escape_string($archive) . \"',\n '\" . intval($ispurchaseorder) . \"',\n '\" . intval($isdeposit) . \"',\n '\" . intval($iswithdraw) . \"')\n \", 0, null, __FILE__, __LINE__); \n // fetch new last invoice id\n $invoiceid = $ilance->db->insert_id();\n \n // do we skip the taxation support for this transaction?\n // we do this in some situations where the tax needs to be applied before the txn is created\n // for situations like escrow fees that we must already know how much to charge the customer for taxes\n // if we don't do this then the txn may have double taxes added to the overall amount\n // and situations like this usually mean that an unpaid transaction is being created (and tax) is\n // auto-applied\n \n // taxation support: is user taxable for this invoice type?\n // this code block will run if a transaction being created is unpaid waiting for payment from the customer\n if ($ilance->tax->is_taxable($user_id, $invoicetype) AND isset($dontprocesstax) AND $dontprocesstax == 0)\n {\n // fetch tax amount to charge for this invoice type\n $taxamount = $ilance->tax->fetch_amount($user_id, $amount, $invoicetype, 0);\n // fetch total amount to hold within the \"totalamount\" field\n $totalamount = ($amount + $taxamount);\n // fetch tax bit to display when outputing tax infos\n $taxinfo = $ilance->tax->fetch_amount($user_id, $amount, $invoicetype, 1);\n // portfolio invoicetypes are actually debit payments so treat it like so\n if ($invoicetype == 'portfolio')\n {\n $invoicetype = 'debit';\n }\n // in cases where an escrow payment is being made, and taxes are involved for commission fees,\n // we will update our paid amount to the (total amount w/taxes) if our total amount is not the same\n // as the amount we're paying. we do this because the invoice overview menu will show something like:\n // Amount Paid: $250.00 but the Total Amount is $300.00 (taxes already applied and paid via escrow)\n $extra = '';\n if ($totalamount != $paid AND $totalamount > 0 AND $status == 'paid')\n {\n $extra = \"paid = '\" . $totalamount . \"',\";\n }\n // member is taxable for this invoice type\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"invoices\n SET istaxable = '1',\n $extra\n totalamount = '\" . sprintf(\"%01.2f\", $totalamount) . \"',\n taxamount = '\" . sprintf(\"%01.2f\", $taxamount) . \"',\n taxinfo = '\" . $ilance->db->escape_string($taxinfo) . \"',\n invoicetype = '\" . $invoicetype . \"'\n WHERE invoiceid = '\" . intval($invoiceid) . \"'\n AND user_id = '\" . intval($user_id) . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n else\n {\n // portfolio invoicetypes are actually debit payments so treat it like so\n if ($invoicetype == 'portfolio')\n {\n $invoicetype = 'debit';\n }\n // in cases where an escrow payment is being made, and taxes are involved for commission fees,\n // we will update our paid amount to the (total amount w/taxes) if our total amount is not the same\n // as the amount we're paying. we do this because the invoice overview menu will show something like:\n // Amount Paid: $250.00 but the Total Amount is $300.00 (taxes already applied and paid via escrow)\n $extra = '';\n if ($totalamount != $paid AND $totalamount > 0 AND $status == 'paid')\n {\n $extra = \"paid = '\".$totalamount.\"',\";\n }\n // customer not taxable > update totalamount value\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"invoices\n SET totalamount = '\" . sprintf(\"%01.2f\", $amount) . \"',\n $extra\n invoicetype = '\" . $invoicetype . \"'\n WHERE invoiceid = '\" . intval($invoiceid) . \"'\n AND user_id = '\" . intval($user_id) . \"'\n \", 0, null, __FILE__, __LINE__);\n } \n if (isset($returnid) AND $returnid > 0)\n {\n return intval($invoiceid);\n }\n }", "public function createPayment()\n\t{\n\n\t}", "function payment($userid = 0, $invoiceid = 0, $invoicetype = 'subscription', $amount = 0, $method = 'account', $gateway = '', $gatewaytxn = '', $isrefund = false, $originalgatewaytxn = '', $silentmode = false)\n {\n global $ilance, $show, $phrase, $page_title, $area_title, $ilconfig, $ilpage;\n\t\t$selectextrafields = '';\n\n ($apihook = $ilance->api('process_debit_payment_start')) ? eval($apihook) : false;\n \n // #### INSTANT PAYMENT NOTIFICATION HANDLER ###########################\n if ($method == 'ipn')\n {\n $sql = $ilance->db->query(\"\n SELECT invoiceid, invoicetype, description, amount, paid, duedate, paiddate, createdate, isif, isfvf, isescrowfee, projectid, buynowid, isenhancementfee, transactionid, projectid\" . $selectextrafields. \"\n FROM \" . DB_PREFIX . \"invoices\n WHERE invoiceid = '\" . intval($invoiceid) . \"'\n AND user_id = '\" . intval($userid) . \"'\n AND status = 'unpaid'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $res_invoice = $ilance->db->fetch_array($sql, DB_ASSOC);\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"invoices\n SET paid = '\" . $ilance->db->escape_string($amount) . \"',\n status = 'paid',\n paiddate = '\" . DATETIME24H . \"',\n paymethod = '\" . $ilance->db->escape_string($gateway) . \"',\n custommessage = '\" . $ilance->db->escape_string($gatewaytxn) . \"'\n WHERE invoiceid = '\" . intval($invoiceid) . \"'\n AND user_id = '\" . intval($userid) . \"'\n \", 0, null, __FILE__, __LINE__);\n $res_invoice['paiddate'] = DATETIME24H;\n if ($res_invoice['isif'] == '1')\n {\n // this is an insertion fee.. update auction listing table\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects\n SET isifpaid = '1'\n WHERE ifinvoiceid = '\" . intval($invoiceid) . \"'\n \", 0, null, __FILE__, __LINE__);\n if (fetch_auction('status', $res_invoice['projectid']) == 'frozen' AND ((fetch_auction('isenhancementfeepaid', $res_invoice['projectid']) == '1' AND fetch_auction('enhancementfeeinvoiceid', $res_invoice['projectid']) != '0') OR (fetch_auction('isenhancementfeepaid', $res_invoice['projectid']) == '0' AND fetch_auction('enhancementfeeinvoiceid', $res_invoice['projectid']) == '0') ))\n {\n $sql_date = '';\n $sql = $ilance->db->query(\"\n SELECT date_starts, date_end, featured_date\n FROM \" . DB_PREFIX . \"projects\n WHERE project_id = '\" . $res_invoice['projectid'] . \"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n $res = $ilance->db->fetch_array($sql, DB_ASSOC);\n if (strtotime($res['date_starts']) < strtotime(DATETIME24H))\n {\n $date_starts = strtotime($res['date_starts']);\n $date_end = strtotime($res['date_end']);\n $auction_time = $date_end - $date_starts;\n $date_starts = DATETIME24H;\n $date_end = date(\"Y-m-d H:i:s\", strtotime(DATETIME24H) + $auction_time);\n $sql_date = \" ,date_starts = '\" . $date_starts .\"', date_end = '\" . $date_end .\"'\";\n $sql_date .= ($res['featured_date'] != '0000-00-00 00:00:00') ? \" , featured_date = '\" . DATETIME24H . \"'\" : \"\";\n }\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects\n SET status = 'open'\n $sql_date\n WHERE project_id = '\" . intval($res_invoice['projectid']) . \"'\n \", 0, null, __FILE__, __LINE__);\n \t$ilance->referral->update_referral_action('postauction', $userid);\n \t$cid = fetch_auction('cid', intval($res_invoice['projectid']));\n \t$state = fetch_auction('project_state', intval($res_invoice['projectid']));\n \t$ilance->categories->build_category_count($cid, 'add', \"insert_\" . $state . \"_auction(): adding increment count category id $cid\");\n }\n }\n else if ($res_invoice['isenhancementfee'] == '1')\n {\n // this is an enhancements fee.. update auction listing table\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects\n SET isenhancementfeepaid = '1'\n WHERE enhancementfeeinvoiceid = '\" . intval($invoiceid) . \"'\n \", 0, null, __FILE__, __LINE__);\n if (fetch_auction('status', $res_invoice['projectid']) == 'frozen' AND ((fetch_auction('isifpaid', $res_invoice['projectid']) == '1' AND fetch_auction('ifinvoiceid', $res_invoice['projectid']) != '0') OR (fetch_auction('isifpaid', $res_invoice['projectid']) == '0' AND fetch_auction('ifinvoiceid', $res_invoice['projectid']) == '0') ))\n {\n $sql_date = '';\n $sql = $ilance->db->query(\"\n SELECT date_starts, date_end, featured_date\n FROM \" . DB_PREFIX . \"projects\n WHERE project_id = '\" . $res_invoice['projectid'] . \"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n $res = $ilance->db->fetch_array($sql, DB_ASSOC);\n if (strtotime($res['date_starts']) < strtotime(DATETIME24H))\n {\n $date_starts = strtotime($res['date_starts']);\n $date_end = strtotime($res['date_end']);\n $auction_time = $date_end - $date_starts;\n $date_starts = DATETIME24H;\n $date_end = date(\"Y-m-d H:i:s\", strtotime(DATETIME24H) + $auction_time);\n $sql_date = \" ,date_starts = '\" . $date_starts .\"', date_end = '\" . $date_end .\"'\";\n $sql_date .= ($res['featured_date'] != '0000-00-00 00:00:00') ? \" ,featured_date = '\" . DATETIME24H . \"'\" : \"\";\n }\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects\n SET status = 'open'\n $sql_date\n WHERE project_id = '\" . intval($res_invoice['projectid']) . \"'\n \", 0, null, __FILE__, __LINE__);\n \t$ilance->referral->update_referral_action('postauction', $userid);\n \t$cid = fetch_auction('cid', intval($res_invoice['projectid']));\n \t$state = fetch_auction('project_state', intval($res_invoice['projectid']));\n \t$ilance->categories->build_category_count($cid, 'add', \"insert_\" . $state . \"_auction(): adding increment count category id $cid\");\n }\n } \n else if ($res_invoice['isfvf'] == '1')\n {\n // this is a final value fee.. update auction listing table\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects\n SET isfvfpaid = '1'\n WHERE fvfinvoiceid = '\" . intval($invoiceid) . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n else if ($res_invoice['isescrowfee'] == '1')\n {\n // this is a final value fee.. update auction listing table\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects_escrow\n SET isfeepaid = '1'\n WHERE project_id = '\" . $res_invoice['projectid'] . \"'\n AND feeinvoiceid = '\" . $invoiceid . \"'\n \", 0, null, __FILE__, __LINE__);\n \n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects_escrow\n SET isfee2paid = '1'\n WHERE project_id = '\" . $res_invoice['projectid'] . \"'\n AND fee2invoiceid = '\" . $invoiceid . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n \n ($apihook = $ilance->api('process_debit_payment_ipn_start')) ? eval($apihook) : false;\n \n // this could also be a payment from the \"seller\" for an unpaid \"buy now\" escrow fee OR unpaid \"buy now\" fvf.\n // let's check the buynow order table to see if we have a matching invoice to update as \"ispaid\"..\n // this scenerio would kick in once a buyer or seller deposits funds, this script runs and tries to pay the unpaid fees automatically..\n // at the same time we need to update the buy now order table so the presentation layer knows what's paid, what's not.\n $buynowcheck = $ilance->db->query(\"\n SELECT escrowfeeinvoiceid, escrowfeebuyerinvoiceid, fvfinvoiceid, fvfbuyerinvoiceid\n FROM \" . DB_PREFIX . \"buynow_orders\n WHERE project_id = '\" . $res_invoice['projectid'] . \"'\n AND orderid = '\" . $res_invoice['buynowid'] . \"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($buynowcheck) > 0)\n {\n $resbuynow = $ilance->db->fetch_array($buynowcheck, DB_ASSOC);\n if ($res_invoice['invoiceid'] == $resbuynow['escrowfeeinvoiceid'])\n {\n // invoice being paid is from seller paying a buy now escrow fee\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"buynow_orders\n SET isescrowfeepaid = '1'\n WHERE orderid = '\" . $res_invoice['buynowid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n else if ($res_invoice['invoiceid'] == $resbuynow['escrowfeebuyerinvoiceid'])\n {\n // invoice being paid is from buyer paying a buy now escrow fee\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"buynow_orders\n SET isescrowfeebuyerpaid = '1'\n WHERE orderid = '\" . $res_invoice['buynowid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n else if ($res_invoice['invoiceid'] == $resbuynow['fvfinvoiceid'])\n {\n // invoice being paid is from seller paying a buy now fvf\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"buynow_orders\n SET isfvfpaid = '1'\n WHERE orderid = '\" . $res_invoice['buynowid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n else if ($res_invoice['invoiceid'] == $resbuynow['fvfbuyerinvoiceid'])\n {\n // invoice being paid is from buyer paying a buy now fvf\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"buynow_orders\n SET isfvfbuyerpaid = '1'\n WHERE orderid = '\" . $res_invoice['buynowid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n }\n // track income spent\n $ilance->accounting_payment->insert_income_spent(intval($userid), sprintf(\"%01.2f\", $amount), 'credit');\n $ilance->template->templateregistry['customquestions'] = $res_invoice['description'];\n $description = $ilance->template->parse_template_phrases('customquestions');\n $existing = array(\n '{{provider}}' => fetch_user('username', intval($userid)),\n '{{invoice_id}}' => intval($invoiceid),\n '{{invoice_amount}}' => $ilance->currency->format($amount),\n '{{duedate}}' => print_date($res_invoice['duedate'], $ilconfig['globalserverlocale_globaltimeformat'], 0, 0),\n '{{datepaid}}' => print_date($res_invoice['paiddate'], $ilconfig['globalserverlocale_globaltimeformat'], 0, 0),\n '{{description}}' => $description,\n '{{transactionid}}' => $res_invoice['transactionid'],\n );\n $ilance->email->mail = SITE_EMAIL;\n $ilance->email->slng = fetch_site_slng();\n $ilance->email->get('debit_fee_paid_online_account_admin');\t\t\n $ilance->email->set($existing);\n $ilance->email->send();\n $ilance->email->get('debit_fee_paid_online_account');\t\t\n $ilance->email->set($existing);\n $ilance->email->mail = fetch_user('email', intval($userid));\n $ilance->email->slng = fetch_user_slng(intval($userid));\n $ilance->email->send();\n return true;\n }\n return false;\n }\n // #### ONLINE ACCOUNT HANDLER #########################################\n else if ($method == 'account')\n {\n $sql_balance = $ilance->db->query(\"\n\t\t\t\tSELECT available_balance, total_balance\n\t\t\t\tFROM \" . DB_PREFIX . \"users\n\t\t\t\tWHERE user_id = '\" . intval($userid) . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql_balance) > 0)\n {\n $res_balance = $ilance->db->fetch_array($sql_balance, DB_ASSOC);\n if ($res_balance['available_balance'] >= $amount)\n {\n $avail_balance = $res_balance['available_balance'];\n $total_balance = $res_balance['total_balance'];\n $avail_balance_after = ($avail_balance - $amount);\n $total_balance_after = ($total_balance - $amount);\n $sql_invoice = $ilance->db->query(\"\n SELECT invoiceid, invoicetype, description, amount, paid, duedate, paiddate, createdate, isif, isfvf, isescrowfee, projectid, buynowid, transactionid, isenhancementfee\" . $selectextrafields .\"\n FROM \" . DB_PREFIX . \"invoices\n WHERE invoiceid = '\" . intval($invoiceid) . \"'\n AND user_id = '\" . intval($userid) . \"'\n AND status = 'unpaid'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql_invoice) > 0)\n {\n $res_invoice = $ilance->db->fetch_array($sql_invoice, DB_ASSOC);\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"invoices\n SET paid = '\" . $ilance->db->escape_string($amount) . \"',\n status = 'paid',\n paiddate = '\" . DATETIME24H . \"'\n WHERE invoiceid = '\" . intval($invoiceid) . \"'\n AND user_id = '\" . intval($userid) . \"'\n AND invoicetype = '\" . $ilance->db->escape_string($invoicetype) . \"'\n \", 0, null, __FILE__, __LINE__);\n $res_invoice['paiddate'] = DATETIME24H;\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"users\n SET available_balance = '\" . $ilance->db->escape_string($avail_balance_after) . \"',\n total_balance = '\" . $ilance->db->escape_string($total_balance_after) . \"'\n WHERE user_id = '\" . intval($userid) . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($res_invoice['isif'])\n {\n // this is an insertion fee.. update auction listing table\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects\n SET isifpaid = '1'\n WHERE ifinvoiceid = '\" . intval($invoiceid) . \"'\n \", 0, null, __FILE__, __LINE__);\n $sql = $ilance->db->query(\"\n SELECT date_starts, date_end, featured_date, status, isenhancementfeepaid, enhancementfeeinvoiceid, cid, project_state\n FROM \" . DB_PREFIX . \"projects\n WHERE ifinvoiceid = '\" . intval($invoiceid) . \"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n $res = $ilance->db->fetch_array($sql, DB_ASSOC);\n if ($res['status'] == 'frozen' AND (($res['isenhancementfeepaid'] == '1' AND $res['enhancementfeeinvoiceid'] != '0') OR ($res['isenhancementfeepaid'] == '0' AND $res['enhancementfeeinvoiceid'] == '0') ))\n {\n $sql_date = '';\n if (strtotime($res['date_starts']) < strtotime(DATETIME24H))\n {\n $date_starts = strtotime($res['date_starts']);\n $date_end = strtotime($res['date_end']);\n $auction_time = $date_end - $date_starts;\n $date_starts = DATETIME24H;\n $date_end = date(\"Y-m-d H:i:s\", strtotime(DATETIME24H) + $auction_time);\n $sql_date = \" ,date_starts = '\" . $date_starts .\"', date_end = '\" . $date_end .\"'\";\n $sql_date .= ($res['featured_date'] != '0000-00-00 00:00:00') ? \" ,featured_date = '\" . DATETIME24H . \"'\" : \"\";\n }\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects\n SET status = 'open'\n $sql_date\n WHERE ifinvoiceid = '\" . intval($invoiceid) . \"'\n \", 0, null, __FILE__, __LINE__);\n $ilance->referral->update_referral_action('postauction', $userid);\n $ilance->categories->build_category_count($res['cid'], 'add', \"insert_\" . $res['project_state'] . \"_auction(): adding increment count category id \" . $res['cid']);\n }\n }\n if ($res_invoice['isenhancementfee'])\n {\n // this is an enhancements fee.. update auction listing table\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects\n SET isenhancementfeepaid = '1'\n WHERE enhancementfeeinvoiceid = '\" . intval($invoiceid) . \"'\n \", 0, null, __FILE__, __LINE__);\n $sql = $ilance->db->query(\"\n SELECT date_starts, date_end, featured_date, status, isifpaid, ifinvoiceid, cid, project_state\n FROM \" . DB_PREFIX . \"projects\n WHERE enhancementfeeinvoiceid = '\" . intval($invoiceid) . \"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n $res = $ilance->db->fetch_array($sql, DB_ASSOC);\n if ($res['status'] == 'frozen' AND (($res['isifpaid'] == '1' AND $res['ifinvoiceid'] != '0') OR ($res['isifpaid'] == '0' AND $res['ifinvoiceid'] == '0') ))\n {\n $sql_date = '';\n if (strtotime($res['date_starts']) < strtotime(DATETIME24H))\n {\n $date_starts = strtotime($res['date_starts']);\n $date_end = strtotime($res['date_end']);\n $auction_time = $date_end - $date_starts;\n $date_starts = DATETIME24H;\n $date_end = date(\"Y-m-d H:i:s\", strtotime(DATETIME24H) + $auction_time);\n $sql_date = \" ,date_starts = '\" . $date_starts .\"', date_end = '\" . $date_end .\"'\";\n $sql_date .= ($res['featured_date'] != '0000-00-00 00:00:00') ? \" ,featured_date = '\" . DATETIME24H . \"'\" : \"\";\n }\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects\n SET status = 'open'\n $sql_date\n WHERE enhancementfeeinvoiceid = '\" . intval($invoiceid) . \"'\n \", 0, null, __FILE__, __LINE__);\n $ilance->referral->update_referral_action('postauction', $userid);\n $ilance->categories->build_category_count($res['cid'], 'add', \"insert_\" . $res['project_state'] . \"_auction(): adding increment count category id \" . $res['cid']);\n }\n }\n if ($res_invoice['isfvf'])\n {\n // this is a final value fee.. update auction listing table\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects\n SET isfvfpaid = '1'\n WHERE fvfinvoiceid = '\" . intval($invoiceid) . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n if ($res_invoice['isescrowfee'])\n {\n // this is a final value fee.. update auction listing table\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects_escrow\n SET isfeepaid = '1'\n WHERE project_id = '\" . $res_invoice['projectid'] . \"'\n AND feeinvoiceid = '\" . $invoiceid . \"'\n \", 0, null, __FILE__, __LINE__);\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"projects_escrow\n SET isfee2paid = '1'\n WHERE project_id = '\" . $res_invoice['projectid'] . \"'\n AND fee2invoiceid = '\" . $invoiceid . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n \n ($apihook = $ilance->api('process_debit_payment_account_start')) ? eval($apihook) : false;\n \n // this could also be a payment from the \"seller\" for an unpaid \"buy now\" escrow fee OR unpaid \"buy now\" fvf.\n // let's check the buynow order table to see if we have a matching invoice to update as \"ispaid\"..\n // this scenerio would kick in once a buyer or seller deposits funds, this script runs and tries to pay the unpaid fees automatically..\n // at the same time we need to update the buy now order table so the presentation layer knows what's paid, what's not.\n $buynowcheck = $ilance->db->query(\"\n SELECT orderid, escrowfeeinvoiceid, escrowfeebuyerinvoiceid, fvfinvoiceid, fvfbuyerinvoiceid\n FROM \" . DB_PREFIX . \"buynow_orders\n WHERE project_id = '\" . $res_invoice['projectid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($buynowcheck) > 0)\n {\n while ($resbuynow = $ilance->db->fetch_array($buynowcheck, DB_ASSOC))\n {\n if ($res_invoice['invoiceid'] == $resbuynow['escrowfeeinvoiceid'])\n {\n // invoice being paid is from seller paying a buy now escrow fee\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"buynow_orders\n SET isescrowfeepaid = '1'\n WHERE orderid = '\" . $resbuynow['orderid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n else if ($res_invoice['invoiceid'] == $resbuynow['escrowfeebuyerinvoiceid'])\n {\n // invoice being paid is from buyer paying a buy now escrow fee\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"buynow_orders\n SET isescrowfeebuyerpaid = '1'\n WHERE orderid = '\" . $resbuynow['orderid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n else if ($res_invoice['invoiceid'] == $resbuynow['fvfinvoiceid'])\n {\n // invoice being paid is from seller paying a buy now fvf\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"buynow_orders\n SET isfvfpaid = '1'\n WHERE orderid = '\" . $resbuynow['orderid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n else if ($res_invoice['invoiceid'] == $resbuynow['fvfbuyerinvoiceid'])\n {\n // invoice being paid is from buyer paying a buy now fvf\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"buynow_orders\n SET isfvfbuyerpaid = '1'\n WHERE orderid = '\" . $resbuynow['orderid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n }\n }\n // track income spent\n $ilance->accounting_payment->insert_income_spent(intval($userid), sprintf(\"%01.2f\", $amount), 'credit');\n $ilance->template->templateregistry['customquestions'] = $res_invoice['description'];\n $description = $ilance->template->parse_template_phrases('customquestions');\n $existing = array(\n '{{provider}}' => $_SESSION['ilancedata']['user']['username'],\n '{{invoice_id}}' => intval($invoiceid),\n '{{invoice_amount}}' => $ilance->currency->format($amount),\n '{{duedate}}' => print_date($res_invoice['duedate'], $ilconfig['globalserverlocale_globaltimeformat'], 0, 0),\n '{{datepaid}}' => print_date($res_invoice['paiddate'], $ilconfig['globalserverlocale_globaltimeformat'], 0, 0),\n '{{description}}' => $description,\n '{{transactionid}}' => $res_invoice['transactionid'],\n );\n $ilance->email->mail = SITE_EMAIL;\n $ilance->email->slng = fetch_site_slng();\n $ilance->email->get('debit_fee_paid_online_account_admin');\t\t\n $ilance->email->set($existing);\n if ($silentmode == false)\n {\n $ilance->email->send();\n }\n $ilance->email->mail = $_SESSION['ilancedata']['user']['email'];\n $ilance->email->slng = $_SESSION['ilancedata']['user']['slng'];\n $ilance->email->get('debit_fee_paid_online_account');\t\t\n $ilance->email->set($existing);\n if ($silentmode == false)\n {\n $ilance->email->send();\n }\n if ($silentmode)\n {\n return true;\n }\n $area_title = '{_invoice_payment_complete_menu}';\n $page_title = SITE_NAME . ' - {_invoice_payment_complete_menu}';\n print_notice('{_invoice_payment_complete}', '{_your_invoice_has_been_paid_in_full}', $ilpage['accounting'], '{_my_account}');\n exit();\n }\n else\n {\n if ($silentmode)\n {\n return false;\n }\n $area_title = '{_invoice_payment_menu_denied_payment_does_not_belong_to_user}';\n $page_title = SITE_NAME . ' - {_invoice_payment_menu_denied_payment_does_not_belong_to_user}';\n print_notice('{_invoice_error}', '{_were_sorry_this_invoice_does_not_exist}'.\"<br /><br />\".'{_please_contact_customer_support}', $ilpage['accounting'], '{_my_account}');\n exit();\n }\n }\n else\n {\n if ($silentmode)\n {\n return false;\n }\n $area_title = '{_funds_not_available}';\n $page_title = SITE_NAME . ' - {_funds_not_available}';\n print_notice('{_invoice_payment_warning_insufficient_funds}', '{_were_sorry_this_invoice_can_not_be_paid_due_to_insufficient_funds}'.\"<br /><br />\".'{_please_contact_customer_support}', $ilpage['accounting'], '{_my_account}');\n exit();\n }\n }\n }\n return false;\n }", "function process_payment( $order_id ) {\n global $woocommerce;\n \n // Create the order object\n $order = new WC_Order( $order_id );\n // Get response object template\n $successResponse = $this->getResponseTemplate( $order );\n // Get data for charge to midtrans API\n $params = $this->getPaymentRequestData( $order_id );\n // Add acquiring bank params\n if (strlen($this->get_option('acquring_bank')) > 0)\n $params['credit_card']['bank'] = strtoupper ($this->get_option('acquring_bank'));\n\n // Empty the cart because payment is initiated.\n $woocommerce->cart->empty_cart();\n try {\n $snapResponse = WC_Midtrans_API::createSnapTransaction( $params, $this->id );\n } catch (Exception $e) {\n $this->setLogError( $e->getMessage() );\n WC_Midtrans_Utils::json_print_exception( $e, $this );\n exit();\n }\n\n // If `enable_redirect` admin config used, snap redirect\n if(property_exists($this,'enable_redirect') && $this->enable_redirect == 'yes'){\n $redirectUrl = $snapResponse->redirect_url;\n }else{\n $redirectUrl = $order->get_checkout_payment_url( true ).\"&snap_token=\".$snapResponse->token;\n }\n\n // Store snap token & snap redirect url to $order metadata\n $order->update_meta_data('_mt_payment_snap_token',$snapResponse->token);\n $order->update_meta_data('_mt_payment_url',$snapResponse->redirect_url);\n $order->save();\n\n if(property_exists($this,'enable_immediate_reduce_stock') && $this->enable_immediate_reduce_stock == 'yes'){\n // Reduce item stock on WC, item also auto reduced on order `pending` status changes\n wc_reduce_stock_levels($order);\n }\n\n $successResponse['redirect'] = $redirectUrl;\n return $successResponse;\n }", "function paypal_ipn() {\n if ($this->paypal->validate_ipn() == true) {\n $ipn_response = '';\n foreach ($_POST as $key => $value) {\n $value = urlencode(stripslashes($value));\n $ipn_response .= \"\\n$key=$value\";\n }\n\n $project_milestone_id = $_POST['custom'];\n //update the project milestone status\n $data['status'] = 1;\n $this->db->where('project_milestone_id', $project_milestone_id);\n $this->db->update('project_milestone', $data);\n\n //create new payment entry\n $data2['type'] = 'income';\n $data2['amount'] = $this->db->get_where('project_milestone' , array('project_milestone_id' => $project_milestone_id))->row()->amount;\n $data2['title'] = $this->db->get_where('project_milestone' , array('project_milestone_id' => $project_milestone_id))->row()->title;\n $data2['payment_method'] = 'paypal';\n $data2['description'] = $ipn_response;\n $data2['project_code'] = $this->db->get_where('project_milestone' , array('project_milestone_id' => $project_milestone_id))->row()->project_code;\n $data2['timestamp'] = strtotime(date(\"m/d/Y\"));\n $data2['milestone_id'] = $project_milestone_id;\n $data2['client_id'] = $this->session->userdata('login_user_id');\n $this->db->insert('payment', $data2);\n\n // notify client with payment confirmation\n $this->email_model->notify_email('payment_completion_notification', $data2['project_code'] , $project_milestone_id , 'admin');\n }\n }", "public function SavePendingOrder()\n\t{\n\t\t$provider = null;\n\t\t$verifyPaymentProvider = true;\n\t\t$redirectToFinishOrder = false;\n\t\t$providerId = '';\n\n\t\t$pendingOrderResult = array();\n\t\t$creditUsed = 0;\n\t\t$giftCertificates = array();\n\n\t\t$orderTotal = $this->getQuote()->getGrandTotal();\n\n\t\t// store the discounted subtotal in the session for affiliate tracking\n\t\t$incTax = (getConfig('taxDefaultTaxDisplayOrders') == TAX_PRICES_DISPLAY_INCLUSIVE);\n\t\t$_SESSION['LAST_ORDER_DISCOUNTED_SUBTOTAL'] = $this->getQuote()->getDiscountedSubTotal($incTax);\n\n\t\t// Find out what currency we are using. We'll need this later to display their previous orders in the currency that they have selected\n\t\t$selectedCurrency = GetCurrencyById($GLOBALS['CurrentCurrency']);\n\n\t\t$giftCertificates = $this->getQuote()->getAppliedGiftCertificates();\n\t\tif(!empty($giftCertificates)) {\n\t\t\t$badCertificates = array();\n\t\t\t$remainingBalance = 0;\n\t\t\t$totalWithoutCertificates =\n\t\t\t\t$this->getQuote()->getGrandTotalWithoutGiftCertificates();\n\t\t\t$giftCertificateAmount =\n\t\t\t\t$this->getQuote()->getGiftCertificateTotal();\n\t\t\tgetClass('ISC_GIFTCERTIFICATES')\n\t\t\t\t->giftCertificatesApplicableToOrder(\n\t\t\t\t\t$totalWithoutCertificates,\n\t\t\t\t\t$giftCertificates,\n\t\t\t\t\t$remainingBalance,\n\t\t\t\t\t$badCertificates);\n\n\t\t\t// One or more gift certificates were invalid so this order is now invalid\n\t\t\tif(!empty($badCertificates)) {\n\t\t\t\t$badCertificatesList = '<strong>'.GetLang('BadGiftCertificates').'</strong><ul>';\n\t\t\t\tforeach($badCertificates as $code => $reason) {\n\t\t\t\t\tif(is_array($reason) && $reason[0] == \"expired\") {\n\t\t\t\t\t\t$reason = sprintf(GetLang('BadGiftCertificateExpired'), CDate($reason[1]));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$reason = GetLang('BadGiftCertificate'.ucfirst($reason));\n\t\t\t\t\t}\n\t\t\t\t\t$badCertificatesList .= sprintf(\"<li>%s - %s\", isc_html_escape($code), $reason);\n\t\t\t\t}\n\t\t\t\t$badCertificatesList .= \"</ul>\";\n\t\t\t\t$pendingOrderResult = array(\n\t\t\t\t\t'error' => GetLang('OrderContainedInvalidGiftCertificates'),\n\t\t\t\t\t'errorDetails' => $badCertificatesList\n\t\t\t\t);\n\t\t\t\treturn $pendingOrderResult;\n\t\t\t}\n\t\t\t// This order was entirely paid for using gift certificates but the totals don't add up\n\t\t\telse if($totalWithoutCertificates == $giftCertificateAmount && $remainingBalance > 0) {\n\t\t\t\t$pendingOrderResult = array(\n\t\t\t\t\t'error' => GetLang('OrderTotalStillRemainingCertificates')\n\t\t\t\t);\n\t\t\t\treturn $pendingOrderResult;\n\t\t\t}\n\t\t\t// Order was entirely paid for using gift certificates\n\t\t\telse if($totalWithoutCertificates == $giftCertificateAmount) {\n\t\t\t\t$providerId = 'giftcertificate';\n\t\t\t\t$verifyPaymentProvider = false;\n\t\t\t\t$redirectToFinishOrder = true;\n\t\t\t}\n\t\t}\n\n\t\t// If the order total is 0, then we just forward the user on to the \"Thank You\" page and set the payment provider to ''\n\t\tif($orderTotal == 0) {\n\t\t\t$providerId = '';\n\t\t\t$verifyPaymentProvider = false;\n\t\t\t$redirectToFinishOrder = true;\n\t\t}\n\n\t\t$selected_provider = '';\n\t\tif($verifyPaymentProvider) {\n\t\t\t$candidate = '';\n\t\t\tif (isset($_POST['checkout_provider']) && $_POST['checkout_provider'] != '') {\n\t\t\t\t$candidate = $_POST['checkout_provider'];\n\t\t\t} else if (isset($_POST['credit_checkout_provider']) && $_POST['credit_checkout_provider'] != '') {\n\t\t\t\t// used by paypal\n\t\t\t\t$candidate = $_POST['credit_checkout_provider'];\n\t\t\t}\n\n\t\t\t// Check if the chosen checkout method is valid\n\t\t\t$providers = GetCheckoutModulesThatCustomerHasAccessTo(true);\n\t\t\tforeach ($providers as $p) {\n\t\t\t\tif ($p['id'] == $candidate) {\n\t\t\t\t\t$selected_provider = $candidate;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there's only one payment provider, then they're paying via that\n\t\t\tif($selected_provider == '' && count($providers) == 1) {\n\t\t\t\t$selected_provider = $providers[0]['object']->GetId();\n\t\t\t}\n\n\t\t\t// Are we using our store credit?\n\t\t\t$customer = getClass('ISC_CUSTOMER')->getCustomerDataByToken();\n\t\t\tif (isset($_POST['store_credit']) && $_POST['store_credit'] == 1\n\t\t\t\t&& $customer['custstorecredit'] > 0) {\n\t\t\t\t\t// User has not chosen a payment provider and can't afford this order using only store credit, throw back as error\n\t\t\t\t\tif ($selected_provider == '' && $customer['custstorecredit'] < $orderTotal) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t// Otherwise we can use the store credit.\n\t\t\t\t\t// Subtract store credit from users account and send them to the finished page\n\t\t\t\t\telse {\n\t\t\t\t\t\t$onlyCredit = false;\n\t\t\t\t\t\t$updateExtra = '';\n\t\t\t\t\t\t// If we're only using store credit\n\t\t\t\t\t\t$creditToUse = $orderTotal;\n\t\t\t\t\t\tif ($customer['custstorecredit'] >= $creditToUse) {\n\t\t\t\t\t\t\t// Set the checkout provider\n\t\t\t\t\t\t\t$providerId = 'storecredit';\n\t\t\t\t\t\t\t$verifyPaymentProvider = false;\n\t\t\t\t\t\t\t$redirectToFinishOrder = true;\n\t\t\t\t\t\t\t$creditUsed = $creditToUse;\n\t\t\t\t\t\t\t$onlyCredit = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Using all of our store credit to pay for this order and we owe more.\n\t\t\t\t\t\t\t$creditUsed = $customer['custstorecredit'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$orderStatus = ORDER_STATUS_INCOMPLETE;\n\n\t\t// Now with round 2, do we still need to verify the payment provider?\n\t\tif($verifyPaymentProvider) {\n\t\t\t// If there's more than one provider and one wasn't selected on the order confirmation screen then there's a problem\n\t\t\tif ((count($providers) == 0 ||\n\t\t\t\t(count($providers) > 1 && $selected_provider == '')) &&\n\t\t\t\t\t!isset($_SESSION['CHECKOUT']['ProviderListHTML'])) {\n\t\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Is the payment provider selected actually valid?\n\t\t\tif (!GetModuleById('checkout', $provider, $selected_provider)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$providerId = $provider->GetId();\n\t\t}\n\n\t\tif(isset($_COOKIE['SHOP_TOKEN'])) {\n\t\t\t$customerToken = $_COOKIE['SHOP_TOKEN'];\n\t\t}\n\t\telse {\n\t\t\t$customerToken = '';\n\t\t}\n\n\t\t$orderComments = '';\n\t\tif(isset($_REQUEST['ordercomments'])) {\n\t\t\t$orderComments = $_POST['ordercomments'];\n\t\t}\n\n\t\t// Set up the order to be created\n\t\t$this->getQuote()\n\t\t\t->setAppliedStoreCredit($creditUsed)\n\t\t\t->setCustomerMessage($orderComments);\n\t\t\t;\n\n\t\t$newOrder = array(\n\t\t\t'orderpaymentmodule' => $providerId,\n\t\t\t'ordcurrencyid' => $selectedCurrency['currencyid'],\n\t\t\t'ordcurrencyexchangerate' => $selectedCurrency['currencyexchangerate'],\n\t\t\t'ordipaddress' => getIp(),\n\t\t\t'ordstatus' => $orderStatus,\n\t\t\t'extraInfo' => array(),\n\n\t\t\t'quote' => $this->getQuote(),\n\t\t);\n\n\n\t\t// OK, we're successful down to here - do they want to create an account? If so then assign it to\n\t\t// a session so we can create the actual record on a successful order\n\t\tif(!empty($_SESSION['CHECKOUT']['CREATE_ACCOUNT']) ||\n\t\t\t!customerIsSignedIn() && getConfig('GuestCheckoutCreateAccounts')) {\n\t\t\t\t$createAccount = array(\n\t\t\t\t\t'addresses' => array()\n\t\t\t\t);\n\t\t\t\tif(!empty($_SESSION['CHECKOUT']['CREATE_ACCOUNT'])) {\n\t\t\t\t\t$createAccount['password'] = $_SESSION['CHECKOUT']['CREATE_ACCOUNT']['password'];\n\t\t\t\t\t$createAccount['customFormFields'] = $_SESSION['CHECKOUT']['CREATE_ACCOUNT']['customFields'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$createAccount['autoCreated'] = 1;\n\t\t\t\t}\n\n\t\t\t\t// Handle saving of addresses for new customers\n\t\t\t\tforeach($this->getQuote()->getAllAddresses() as $address) {\n\t\t\t\t\tif($address->getSaveAddress()) {\n\t\t\t\t\t\t$customerAddress = $address->getAsArray();\n\t\t\t\t\t\t$customFields = $address->getCustomFields();\n\t\t\t\t\t\tif(!empty($customFields)) {\n\t\t\t\t\t\t\t$customerAddress['customFormFields'] = $customFields;\n\n\t\t\t\t\t\t\t// Shipping fields need to be mapped back to billing so they can be stored\n\t\t\t\t\t\t\tif($address->getType() == ISC_QUOTE_ADDRESS::TYPE_SHIPPING) {\n\t\t\t\t\t\t\t\t$newCustomFields = array();\n\t\t\t\t\t\t\t\t$map = $GLOBALS['ISC_CLASS_FORM']->mapAddressFieldList(FORMFIELDS_FORM_SHIPPING, array_keys($customFields));\n\t\t\t\t\t\t\t\tforeach($map as $oldId => $newId) {\n\t\t\t\t\t\t\t\t\t$newCustomFields[$newId] = $customFields[$oldId];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$customerAddress['customFormFields'] = $newCustomFields;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$createAccount['addresses'][] = $customerAddress;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$newOrder['extraInfo']['createAccount'] = $createAccount;\n\t\t}\n\n\t\t// Did they agree to signup to any mailing lists?\n\t\tif (isset($_POST['join_mailing_list'])) {\n\t\t\t$newOrder['extraInfo']['join_mailing_list'] = true;\n\t\t}\n\n\t\tif (isset($_POST['join_order_list'])) {\n\t\t\t$newOrder['extraInfo']['join_order_list'] = true;\n\t\t}\n\n\t\tif (isset($_POST['join_mailing_list']) || isset($_POST['join_order_list'])) {\n\t\t\tif (isset($_POST['mail_format_preference'])) {\n\t\t\t\t$newOrder['extraInfo']['mail_format_preference'] = (int)$_POST['mail_format_preference'];\n\t\t\t} else {\n\t\t\t\t$newOrder['extraInfo']['mail_format_preference'] = Interspire_EmailIntegration_Subscription::FORMAT_PREF_NONE;\n\t\t\t}\n\t\t\t$newOrder['extraInfo']['join_order_list'] = true;\n\t\t}\n\n\n\t\tif(isset($_POST['ordermessage'])) {\n\t\t\t$newOrder['ordermessage'] = $_POST['ordermessage'];\n\t\t} else {\n\t\t\t$newOrder['ordermessage'] = '';\n\t\t}\n\n\t\t$entity = new ISC_ENTITY_ORDER();\n\t\t$orderId = $entity->add($newOrder);\n\n\t\t// Failed to create the order\n\t\tif(!$orderId) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$order = getOrder($orderId);\n\n\t\t// Persist the pending order token as a cookie for 24 hours\n\t\tISC_SetCookie(\"SHOP_ORDER_TOKEN\", $order['ordtoken'], time() + (3600*24), true);\n\t\t$_COOKIE['SHOP_ORDER_TOKEN'] = $order['ordtoken'];\n\n\t\t// Redirecting to finish order page?\n\t\tif($redirectToFinishOrder) {\n\t\t\treturn array(\n\t\t\t\t'redirectToFinishOrder' => true\n\t\t\t);\n\t\t}\n\n\t\t// Otherwise, the gateway want's to do something\n\t\t$orderData = LoadPendingOrdersByToken($order['ordtoken']);\n\t\t$provider->SetOrderData($orderData);\n\n\t\t// Is this an online payment provider? It would like to do something\n\t\tif($provider->GetPaymentType() == PAYMENT_PROVIDER_ONLINE || method_exists($provider, \"ShowPaymentForm\")) {\n\t\t\t// Call the checkout process for the selected provider\n\t\t\tif(method_exists($provider, \"ShowPaymentForm\")) {\n\t\t\t\treturn array(\n\t\t\t\t\t'provider' => $provider,\n\t\t\t\t\t'showPaymentForm' => true\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn array(\n\t\t\t\t\t'provider' => $provider\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t// If an offline method, we throw them to the \"Thank you for your order\" page\n\t\telse {\n\t\t\treturn array(\n\t\t\t\t'provider' => $provider\n\t\t\t);\n\t\t}\n\t}", "function process_payment($order_number, $order_total, &$d) {\n return true;\n }", "function ipn()\r\n {\r\n $paypalInfo = $this->input->post(); \r\n\t\t $order_id= $paypalinfo['custom'];\r\n\t\t $payment_status=$paypalinfo['payment_status'];\r\n $paypalURL = $this->paypal_lib->paypal_url; \r\n $result = $this->paypal_lib->curlPost($paypalURL,$paypalInfo); \r\n //check whether the payment is verified\r\n if(preg_match(\"/VERIFIED/\",$result)){\r\n //insert the transaction data into the database\r\n $this->Order_model->insertTransaction($paypalInfo); \r\n }\r\n }", "function process_payment( $order_id ) {\n\n\t\tglobal $woocommerce;\n\n\t\t$order = new WC_Order( $order_id );\n\n\t\treturn array(\n\t\t\t\t'result' \t=> 'success',\n\t\t\t\t'redirect'\t=> add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(woocommerce_get_page_id('pay' ))))\n\t\t\t);\n\n\t}", "public function notifyPayment()\n {\n }", "public function testSuccessfulResponseDataFormatForConfirmProcessWithValidTransactionId(): void\n {\n $this->tryTestWithRequest();\n $this->assertIsNumeric($this->response->getTransactionId());\n }", "public function verify()\n {\n /**\n * Make a signature temporary\n * Note: each paid has it's own specific signature\n */\n $signature = $this->generate_signature(\n $this->merchant_id,\n $this->bank_receipt,\n $this->invoice_number\n );\n \n // Make proper array of token params\n $params = [\n 'SaleConf_req' => [\n 'MID' => $this->enc($this->merchant_id),\n 'CRN' => $this->enc($this->invoice_number),\n 'TRN' => $this->enc($this->bank_receipt),\n 'SIGNATURE' => base64_encode($signature),\n ],\n ];\n \n // Send params to bank to get token\n $result = $this->call($this->transaction_reference_wsdl, 'sendConfirmation', $params);\n\n if ($result['RESCODE'] == -1)\n throw new BankException('امضا دیچیتال نا معتبر است', -1);\n elseif ($result['RESCODE'] == -2)\n throw new BankException('آدرس IP پذیرنده نا معتبر است', -2);\n elseif (!in_array($result['RESCODE'], [0, 101]))\n throw new BankException(null, $result['RESCODE']); // خطاهای تعریف شده دیگر\n\n\n $data = $result['RESCODE'] . $result['REPETETIVE'] . $result['AMOUNT'] . $result['DATE'] . $result['TIME'] . $result['TRN'] . $result['STAN'];\n\n // State whether signature is okay or not\n $verify_result = openssl_verify($data, base64_decode($result['SIGNATURE']), $this->key_resource);\n\n if ($verify_result == 0)\n throw new BankException('خطای امضای دیجیتال');\n elseif ($verify_result != 1)\n throw new BankException('عدم تطبیق امضا دیجیتال بانک');\n\n /**\n * Result Webservice Array\n * if you need special design for your website, please modify following codes\n */\n if (!empty($result['RESCODE'])) {\n // success\n if (($result['RESCODE'] == '00') && ($result['successful'] == true)) {\n return new SaderatResult(\n true, // success\n $this->getInvoiceNumber(),\n $this->getBankReceiptNumber(),\n false // repetitive\n );\n } // cancel\n elseif ($result['RESCODE'] == 101) {\n throw new RepetitiveException(\n $this->getInvoiceNumber(),\n $this->getBankReceiptNumber()\n );\n } // cancel\n elseif ($result['RESCODE'] == 200) {\n throw new BankException('تراکنش توسط کاربر کنسل شده است');\n } // cancel\n elseif ($result['RESCODE'] == 107) {\n throw new BankException(null, 107);\n } // other problem\n elseif (!empty($result['description']))\n throw new BankException($result['description']);\n\n } else\n throw new BankException('درخواست نامعتبر است');\n\n }", "public function payment($id)\n {\n\n\n }", "public function submitPayment()\n {\n return array('error'=>0, 'transactionReference'=>'');\n \n }", "function validatePay($transactionId)\n{\n\n $headers = [\n // You can generate your own token in Jibimo panel at: https://jibimo.com/login\n 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImMyMDhhNmMzMzE3YzljMjMxMDhkZDMwODZjZjE3ZDU0YmVkODNkMTc2MWU3MDZjYjE4MWJlY2Q5MjdhNDM3YzYwOTAwYmE2YjcyMWM5OGI0In0.eyJhdWQiOiI5IiwianRpIjoiYzIwOGE2YzMzMTdjOWMyMzEwOGRkMzA4NmNmMTdkNTRiZWQ4M2QxNzYxZTcwNmNiMTgxYmVjZDkyN2E0MzdjNjA5MDBiYTZiNzIxYzk4YjQiLCJpYXQiOjE1NTEwOTI4NTUsIm5iZiI6MTU1MTA5Mjg1NSwiZXhwIjoxNTgyNjI4ODU1LCJzdWIiOiI4MzAiLCJzY29wZXMiOlsibWFrZS1yZXF1ZXN0LXRyYW5zYWN0aW9uIiwibWFrZS1wYXktdHJhbnNhY3Rpb24iXX0.fNb4T-YAVMZuykVnEUUG9YY_mDp_K8mc9Pd3Tuj60AWwIIMT8OTdHbpUM1V2qR1Osz6JY54ES6aU436B3VnkbI4IsFTtJ6QZrSbU3PgYD1rShby8guwGyyc43uKpNhzhNF_WctTFHyg4mrFphuUpOvXWF4uzdbF1dvQp61X8yp0OTvCWpEjJZGegbPZ9Td5uuxo0iTFEY-G4FmpsYe06alansz0-J8Abk1jKpdWiHDwhMOw_BcIarJkFHNktKhqBPYhXD56xSZxnrL4Zyc5fvLqBXXi06IuKc_8NuD33wgaaG-zbN8o_2ODW1WLNZrWC1suM-QwqkoLEBijRCrwtqdmPHoOO2Ff0psigIUXT5ovAobQ07YnUsnXSdOTqgk4WMl8jdgtNmg0r-6ylolizZsWKUfqo_WBcn5QVg5vilB9H73XNqTlwNJwKezeMLE-dc0ui80OU9t1UbLp-BcOrpAhcAj-u0hRwn11HQkz45MSYEdMvHS7gQqPO_yZ18M2OzMp8_J14tTUblG6sJxCwrKadXw1lOWwt5-H3fRtPj0yeHUY2cuh-9ZQRKrin7-DUTgnwNzLEKsRn_VAXUL7E-wWE5vQaY7_8I-GHjZEXogUedK0QtFEPiahAbdY7-rbJB1GffJF8UvubHuQjDy_NMb6MqVeR5ANfI7IKPoxt7Yk',\n\n 'Accept: application/json',\n ];\n\n // Remove `sandbox` from URL if you want to call the main API in production server\n return get(\"https://jibimo.com/sandbox/api/business/pay/$transactionId\", $headers);\n}", "public function confirm() {\n if($this->request->server['REQUEST_METHOD'] == 'POST')\n {\n $order_id = $this->request->post['order_id'];\n\t\t\t\t\n\t\t\t\t$this->load->language('payment/paynow');\n\n $this->load->model('payment/paynow');\n $paynowInfo = $this->model_payment_paynow->getPaynowInfo($order_id);\n\n if($paynowInfo)\n {\n \t\n\t\t\t\t\t//close connection\n $msg = $this->request->post;\n\n $MerchantKey = $this->config->get('paynow_config_merchant_key');\n $validateHash = $this->CreateHash($msg, $MerchantKey);\n if($validateHash != $msg[\"hash\"]){\n $data['text_message'] = \"Paynow reply hashes do not match : \" . $validateHash . \" - \" . $msg[\"hash\"];\n }\n else\n {\n $this->model_payment_paynow->update($order_id\n , $paynowInfo['resulturl']\n , $msg[\"pollurl\"]\n , $msg[\"paynowreference\"]\n , $msg[\"amount\"]\n , $msg[\"status\"]\n );\n $this->load->model('checkout/order');\n\n if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_created_but_not_paid')){\n //$data['text_message'] = \"Transaction has not yet been paid on Paynow.<br /><br />\"\n // . \"<a class='s_button_1 s_main_color_bgr' href='\" . $paynowInfo['process_url'] . \"'><span class='s_text'>Return to Paynow</span></a>\";\n }\n else if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_cancelled')){\n //$data['text_message'] = \"Transaction was cancelled by the user. You will be redirected back to the checkout page.<br /><br />\";\n //$data['redirect_url'] = str_replace('&amp;', '&', $this->url->link('checkout/checkout'));\n $order = $this->model_checkout_order->getOrder($order_id);\n if($order[\"order_status_id\"] != 7){\n $this->model_checkout_order->confirm($order_id, 7, \"Cancelled by user.\", true);\n }\n }\n else if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_failed')){\n //$data['text_message'] = \"Transaction payment has failed on Paynow. You can still resume the payment.<br /><br />\"\n // . \"<a class='s_button_1 s_main_color_bgr' href='\" . $paynowInfo['process_url'] . \"'><span class='s_text'>Return to Paynow</span></a>\";\n }\n else if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_paid') || trim(strtolower($msg[\"status\"])) == $this->language->get('ps_awaiting_delivery') || trim(strtolower($msg[\"status\"])) == $this->language->get('ps_delivered')){\n //$data['text_message'] = \"Transaction Paid Successfully. You will be redirected to a confirmation page.<br /><br />\";\n //$data['redirect_url'] = str_replace('&amp;', '&', $this->url->link('checkout/success'));\n $order = $this->model_checkout_order->getOrder($order_id);\n\t\t\t\t\t\t\t$this->setClassData();\n\n if($order[\"order_status_id\"] != $this->final_order_status){\n $this->model_checkout_order->confirm($order_id, $this->final_order_status, \"Paynow ID: \" . $msg[\"PaynowReference\"], true);\n }\n }\n else {\n //$data['text_message'] = \"Invalid status in from Paynow, cannot continue.\";\n }\n }\n }\n else\n {\n //$data['text_message'] = \"Could not update order info from Paynow.\";\n }\n }\n else\n {\n //$data['text_message'] = \"paynow order info not found.\";\n }\n\t}", "function pum_success()\n {\n $status = $_POST[\"status\"];\n $firstname = $_POST[\"firstname\"];\n $amount = $_POST[\"amount\"];\n $txnid = $_POST[\"txnid\"];\n $posted_hash = $_POST[\"hash\"];\n $key = $_POST[\"key\"];\n $productinfo = $_POST[\"productinfo\"];\n $email = $_POST[\"email\"];\n $udf1 = $_POST['udf1'];\n $salt = $this->Crud_model->get_settings_value('business_settings', 'pum_merchant_salt', 'value');\n\n if (isset($_POST[\"additionalCharges\"])) {\n $additionalCharges = $_POST[\"additionalCharges\"];\n $retHashSeq = $additionalCharges.'|'.$salt.'|'.$status.'||||||||||'.$udf1.'|'.$email.'|'.$firstname.'|'.$productinfo.'|'.$amount.'|'.$txnid.'|'.$key;\n } else {\n $retHashSeq = $salt.'|'.$status.'||||||||||'.$udf1.'|'.$email.'|'.$firstname.'|'.$productinfo.'|'.$amount.'|'.$txnid.'|'.$key;\n }\n $hash = hash(\"sha512\", $retHashSeq);\n\n if ($hash != $posted_hash) {\n $payment_id = $this->session->userdata('payment_id');\n $this->db->where('package_payment_id', $payment_id);\n $this->db->delete('package_payment');\n recache();\n $this->session->set_userdata('payment_id', '');\n $this->session->set_flashdata('alert', 'pum_fail');\n redirect(base_url() . 'home/plans', 'refresh');\n } else {\n $payment_id = $_POST['udf1'];\n $payment = $this->db->get_where('package_payment',array('package_payment_id' => $payment_id))->row();\n $data['payment_details'] = json_encode($_POST);\n $data['purchase_datetime'] = time();\n $data['payment_code'] = date('Ym', $data['purchase_datetime']) . $payment_id;\n $data['payment_timestamp'] = time();\n $data['payment_type'] = 'PayUMoney';\n $data['payment_status'] = 'paid';\n $data['expire'] = 'no';\n $this->db->where('package_payment_id', $payment_id);\n $this->db->update('package_payment', $data);\n\n $prev_express_interest = $this->db->get_where('member', array('member_id' => $payment->member_id))->row()->express_interest;\n $prev_direct_messages = $this->db->get_where('member', array('member_id' => $payment->member_id))->row()->direct_messages;\n $prev_photo_gallery = $this->db->get_where('member', array('member_id' => $payment->member_id))->row()->photo_gallery;\n $prev_contacts=$this->db->get_where('member', array('member_id' => $payment->member_id))->row()->contacts;\n $data1['membership'] = 2;\n if($payment->no_contact==0){\n $data1['express_interest'] = $this->db->get_where('plan', array('plan_id' => $payment->plan_id))->row()->express_interest;\n $data1['direct_messages'] = $this->db->get_where('plan', array('plan_id' => $payment->plan_id))->row()->direct_messages;\n $data1['photo_gallery'] = $this->db->get_where('plan', array('plan_id' => $payment->plan_id))->row()->photo_gallery;\n $data1['contacts'] = $prev_contacts + $this->db->get_where('plan', array('plan_id' => $payment->plan_id))->row()->view_contacts;\n $data1['exp_date']=strtotime(\"+\".$this->db->get_where('plan', array('plan_id' => $payment->plan_id))->row()->validity_days.\" day\");\n $package_info[] = array('current_package' => $this->Crud_model->get_type_name_by_id('plan', $payment->plan_id),\n 'package_price' => $this->Crud_model->get_type_name_by_id('plan', $payment->plan_id, 'amount'),\n 'payment_type' => $data['payment_type'],\n );\n }else{\n\n $data1['contacts'] = $prev_contacts + $payment->no_contact;\n $data1['exp_date']=strtotime(\"+\".$this->db->get_where('plan', array('plan_id' => $payment->plan_id))->row()->validity_days.\" day\");\n $package_info[] = array('current_package' => $this->Crud_model->get_type_name_by_id('plan', $payment->plan_id),\n 'package_price' => $amount,\n 'payment_type' => $data['payment_type'],\n 'no_contact' => $payment->no_contact, \n );\n } \n $data1['package_info'] = json_encode($package_info);\n\n $this->db->where('member_id', $payment->member_id);\n $this->db->update('member', $data1);\n recache();\n\n if ($this->Email_model->subscruption_email('member', $payment->member_id, $payment->plan_id)) {\n //echo 'email_sent';\n } else {\n //echo 'email_not_sent';\n $this->session->set_flashdata('alert', 'not_sent');\n }\n $this->session->set_flashdata('alert', 'pum_success');\n redirect(base_url() . 'home/invoice/'.$this->session->userdata('payment_id'), 'refresh');\n $this->session->set_userdata('payment_id', '');\n }\n }", "public function onUserRequestTransactionReturn(Payment_Model_Order $order, array $params = array()) {\n\n $user_request = $order->getSource();\n $user = $order->getUser();\n\n if ($user_request->payment_status == 'pending') {\n return 'pending';\n }\n\n $pollURL = $_SESSION['paynow_payment_begin']['pollurl'];\n\n $ch = curl_init();\n\n //set the url, number of POST vars, POST data\n curl_setopt($ch, CURLOPT_URL, $pollURL);\n curl_setopt($ch, CURLOPT_POST, 0);\n curl_setopt($ch, CURLOPT_POSTFIELDS, '');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n //execute post\n $result = curl_exec($ch);\n\n if ($result) {\n\n //close connection\n $msg = $this->parseMsg($result);\n }\n\n if ($msg['status'] == 'Cancelled' || $msg['status'] == 'created but not paid' || $msg['status'] == 'Failed') {\n return 'cancel';\n }\n\n $gateway_order_id = $msg['paynowreference'];\n\n // Let's log it\n $this->getGateway()->getLog()->log('Return (Paynow): '\n . print_r($params, true), Zend_Log::INFO);\n\n //$gateway_profile_id = $gateway_order_id = $params['charge_id'];\n // Update order with profile info and complete status?\n $order->state = 'complete';\n $order->gateway_order_id = $gateway_order_id;\n $order->save();\n\n $user_request->payment_status = 'active';\n $user_request->gateway_profile_id = $gateway_order_id;\n $user_request->save();\n\n $paymentStatus = 'okay';\n\n //Insert transaction\n /*\n * Here 'siteeventticket_paymentrequest' is used for \"Advanced Events - Events Booking, Tickets Selling & Paid Events\" payment requests.\n * Here 'sitestoreproduct_paymentrequest' is used for \"Stores / Marketplace - Ecommerce\" payment requests. \n */\n if ($order->source_type == 'siteeventticket_paymentrequest') {\n $transactionsTable = Engine_Api::_()->getDbtable('transactions', 'siteeventticket');\n $orderIdColumnName = 'order_id';\n } elseif ($order->source_type == 'sitestoreproduct_paymentrequest') {\n $transactionsTable = Engine_Api::_()->getDbtable('transactions', 'sitestoreproduct');\n $orderIdColumnName = 'parent_order_id';\n }\n\n $transactionParams = array(\n 'user_id' => $order->user_id,\n 'sender_type' => 1,\n 'gateway_id' => Engine_Api::_()->sitegateway()->getGatewayColumn(array('columnName' => 'gateway_id', 'plugin' => 'Sitegateway_Plugin_Gateway_Paynow')),\n 'date' => new Zend_Db_Expr('NOW()'),\n 'payment_order_id' => $order->order_id,\n \"$orderIdColumnName\" => $order->source_id,\n 'type' => 'payment',\n 'state' => $paymentStatus,\n 'gateway_transaction_id' => $gateway_order_id,\n 'amount' => $user_request->response_amount,\n 'currency' => Engine_Api::_()->sitegateway()->getCurrency()\n );\n $transactionsTable->insert($transactionParams);\n\n $transactionParams = array_merge($transactionParams, array('resource_type' => $order->source_type));\n Engine_Api::_()->sitegateway()->insertTransactions($transactionParams);\n\n // Get benefit setting\n $giveBenefit = $transactionsTable->getBenefitStatus($user);\n\n // Check payment status\n if ($paymentStatus == 'okay' || ($paymentStatus == 'pending' && $giveBenefit)) {\n\n $user_request->gateway_profile_id = $gateway_profile_id;\n\n // Payment success\n $user_request->onPaymentSuccess();\n\n return 'active';\n } else if ($paymentStatus == 'pending') {\n\n $user_request->gateway_profile_id = $gateway_profile_id;\n\n // Payment pending\n $user_request->onPaymentPending();\n\n return 'pending';\n } else if ($paymentStatus == 'failed') {\n // Cancel order and advertiesment?\n $order->onFailure();\n $user_request->onPaymentFailure();\n\n // Payment failed\n throw new Payment_Model_Exception('Your payment could not be completed due to some reason, Please contact to site admin.');\n } else {\n // This is a sanity error and cannot produce information a user could use to correct the problem.\n throw new Payment_Model_Exception('There was an error processing your ' .\n 'transaction. Please try again later.');\n }\n }", "public function getPaymentStatus()\n {\n $paymentId = \\Request::get('paymentId');\n // clear the session payment ID\n \\Session::forget('paypal_payment_id');\n $payerId = \\Request::get('PayerID');\n $token = \\Request::get('token');\n //if (empty(\\Request::get('PayerID')) || empty(\\Request::get('token'))) {\n if (empty($payerId) || empty($token)) {\n Session::flash('panel', 1);\n return \\Redirect::to('/')\n ->with('message', 'Hubo un problema al intentar pagar con Paypal');\n }\n\n try {\n $payment = Payment::get($paymentId, $this->_api_context);\n } catch (Exception $ex) {\n if (\\Config::get('app.debug')) {\n echo \"Exception: \" . $ex->getMessage() . PHP_EOL;\n $err_data = json_decode($ex->getData(), true);\n exit;\n } else {\n die('Ups! Algo salió mal');\n }\n }\n\n // PaymentExecution object includes information necessary\n // to execute a PayPal account payment.\n // The payer_id is added to the request query parameters\n // when the user is redirected from paypal back to your site\n try {\n $execution = new PaymentExecution();\n $execution->setPayerId(\\Request::get('PayerID'));\n //Execute the payment\n $result = $payment->execute($execution, $this->_api_context);\n } catch (\\PayPal\\Exception\\PPConnectionException $ex) {\n if (\\Config::get('app.debug')) {\n echo \"Exception: \" . $ex->getMessage() . PHP_EOL;\n $err_data = json_decode($ex->getData(), true);\n exit;\n } else {\n die('Ups! Algo salió mal');\n }\n }\n\n //echo '<pre>';print_r($result);echo '</pre>';exit; // DEBUG RESULT, remove it later\n if ($result->getState() == 'approved') { // payment made\n // Registrar el pedido --- ok\n // Registrar el Detalle del pedido --- ok\n // Eliminar carrito\n // Enviar correo a user\n // Enviar correo a admin\n // Redireccionar\n $this->saveOrder(\\Session::get('cart'), \\Session::get('itemsCheck'));\n \\Session::forget('cart');\n Session::flash('panel', 1);\n return \\Redirect::to('/')->with('message', 'Payment Registred');\n }\n return \\Redirect::to('/')->with('message', 'Error!');\n }", "public function process_payment($order_id) {\n global $woocommerce;\n $order = new WC_Order($order_id);\n\n if ($this->get_option('enabled')) {\n $this->createPayPalInvoice($order);\n\n $order->update_status('on-hold', __('Received (Awaiting payment)', 'woocommerce'));\n $order->reduce_order_stock();\n $woocommerce->cart->empty_cart();\n\n return array(\n 'result' => 'success',\n 'redirect' => $this->get_return_url($order)\n );\n }\n\n wc_add_notice('PayPal Payment plugin is not enabled.', 'error');\n return;\n }", "public function createStatus()\n {\n $name = [\n 'en' => 'Pending payment PaySto',\n 'ru' => 'В ожидании оплаты PaySto'\n ];\n \n $order_state = new OrderState();\n foreach (ToolsModulePPM::getLanguages(false) as $l) {\n $order_state->name[$l['id_lang']] = (\n isset($name[$l['iso_code']])\n ? $name[$l['iso_code']]\n : $name['en']\n );\n }\n \n $order_state->template = '';\n $order_state->send_email = 0;\n $order_state->module_name = $this->name;\n $order_state->invoice = 0;\n $order_state->color = '#4169E1';\n $order_state->unremovable = 0;\n $order_state->logable = 0;\n $order_state->delivery = 0;\n $order_state->hidden = 0;\n $order_state->shipped = 0;\n $order_state->paid = 0;\n $order_state->pdf_invoice = 0;\n $order_state->pdf_delivery = 0;\n $order_state->deleted = 0;\n $result = $order_state->save();\n ConfPPM::setConf('status_paysto', $order_state->id);\n return $result;\n }", "public function isPaid(){\n return $this->status == \"SUCCESS\";\n }", "function process_payment( $order_id )\n {\n\n //cuando hace click en proceder al pago, luego de elegir seguripago\n //finalizar-comprar/ 1\n\n $order = new WC_Order( $order_id );\n\n return array\n (\n 'result' => 'success',\n 'redirect' => add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(woocommerce_get_page_id('pay'))))\n );\n }", "abstract public function pay(int $orderID, $amount);", "public function confirm_pending_order( $order, $action = 'pay' ) {\n\n\t\t$this->log( 'PayPal `confirm_pending_order()` started', $order, $_POST );\n\n\t\tif ( ! isset( $_POST['llms_paypal_token'] ) || ! isset( $_POST['llms_paypal_payer_id'] ) ) {\n\t\t\treturn llms_add_notice( __( 'Missing required data necessary to confirm the order.', 'lifterlms' ), 'error' );\n\t\t}\n\n\t\t$order->set( 'gateway_customer_id', $_POST['llms_paypal_payer_id'] );\n\n\t\t$req = new LLMS_PayPal_Request( $this );\n\n\t\tif ( $order->is_recurring() && 'yes' === $this->are_reference_transactions_enabled() ) {\n\n\t\t\t$r = $req->get_express_checkout_details( $_POST['llms_paypal_token'] );\n\n\t\t\tif ( isset( $r['BILLINGAGREEMENTACCEPTEDSTATUS'] ) && 1 == $r['BILLINGAGREEMENTACCEPTEDSTATUS'] ) {\n\n\t\t\t\t$agreement = $req->create_billing_agreement( $_POST['llms_paypal_token'] );\n\n\t\t\t\t// error\n\t\t\t\tif ( is_wp_error( $agreement ) ) {\n\n\t\t\t\t\t$this->log( $agreement, 'PayPal `confirm_pending_order()` finished with errors' );\n\n\t\t\t\t\treturn llms_add_notice( $agreement->get_error_message(), 'error' );\n\n\t\t\t\t}\n\n\t\t\t\t// success\n\t\t\t\telse {\n\n\t\t\t\t\t// record the billing agreement id\n\t\t\t\t\t$order->set( 'gateway_subscription_id', $agreement['BILLINGAGREEMENTID'] );\n\n\t\t\t\t\tif ( 'pay' === $action ) {\n\n\t\t\t\t\t\t$ref_trans = $this->do_reference_transaction( $order, 'initial' );\n\n\t\t\t\t\t\tif ( is_wp_error( $ref_trans ) ) {\n\n\t\t\t\t\t\t\t$this->log( $ref_trans, 'PayPal `confirm_pending_order()` finished with errors' );\n\t\t\t\t\t\t\treturn llms_add_notice( $ref_trans->get_error_message(), 'error' );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t$this->complete_transaction( $order );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t\t// billing agreement wasn't accepted\n\t\t\telse {\n\n\t\t\t\t$this->log( $r, 'PayPal `confirm_pending_order()` finished, billing agreement was not accepted.' );\n\t\t\t\t$order->set( 'status', 'llms-failed' );\n\n\t\t\t\tllms_add_notice( __( 'The PayPal billing agreement was not accepted. The pending order has been cancelled.', 'lifterlms-paypal' ), 'error' );\n\t\t\t\twp_safe_redirect( llms_cancel_payment_url() );\n\t\t\t\texit();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t$r = $req->do_express_checkout( $order, $_POST['llms_paypal_token'], $_POST['llms_paypal_payer_id'] );\n\n\t\t\tif ( is_wp_error( $r ) ) {\n\n\t\t\t\t$this->log( $r, 'PayPal `confirm_pending_order()` finished with errors' );\n\n\t\t\t\treturn llms_add_notice( $r->get_error_message(), 'error' );\n\n\t\t\t} else {\n\n\t\t\t\t$txn_data = array();\n\n\t\t\t\t$payer_id = sanitize_text_field( $_POST['llms_paypal_payer_id'] );\n\n\t\t\t\t$txn_data['amount'] = $r['PAYMENTINFO_0_AMT'];\n\t\t\t\t$txn_data['customer_id'] = $payer_id;\n\t\t\t\t$txn_data['transaction_id'] = $r['PAYMENTINFO_0_TRANSACTIONID'];\n\t\t\t\t$txn_data['fee_amount'] = $r['PAYMENTINFO_0_FEEAMT'];\n\t\t\t\t$txn_data['completed_date'] = $r['PAYMENTINFO_0_ORDERTIME']; // record function transposes date automatically\n\t\t\t\t$txn_data['status'] = 'llms-txn-succeeded';\n\t\t\t\t$txn_data['payment_type'] = 'single';\n\t\t\t\t$txn_data['source_description'] = __( 'PayPal Account', 'lifterlms-paypal' );\n\t\t\t\t$txn_data['source_id'] = $payer_id;\n\n\t\t\t\t$order->record_transaction( $txn_data );\n\n\t\t\t\t$order->add_note( sprintf(\n\t\t\t\t\t__( 'Charge Succeeded! PayPal Account ID: \"%s\". Transaction ID: %s', 'lifterlms-paypal' ),\n\t\t\t\t\t$payer_id,\n\t\t\t\t\t$r['PAYMENTINFO_0_TRANSACTIONID']\n\t\t\t\t) );\n\n\t\t\t\t$this->log( $r, 'PayPal `confirm_pending_order()` finished' );\n\n\t\t\t\t$this->complete_transaction( $order );\n\n\t\t\t}\n\n\t\t}\n\n\t}", "public function payment_successful()\n {\n $user_id=$this->session->userdata('user_id');\n\n $status = $this->input->post(\"status\");\n $firstname = $this->input->post(\"firstname\");\n $amount = $this->input->post(\"amount\");\n $txnid = $this->input->post(\"txnid\");\n $posted_hash = $this->input->post(\"hash\");\n $key = $this->input->post(\"key\");\n $productinfo = $this->input->post(\"productinfo\");\n // $membership_package=$this->input->post('membership_package');\n $email = $this->input->post(\"email\");\n $salt = SALT;\n //echo $membership_package;die();\n\n\n if ($this->input->post(\"additionalCharges\")) {\n $additionalCharges = $this->input->post(\"additionalCharges\");\n $retHashSeq = $additionalCharges . '|' . $salt . '|' . $status . '|||||||||||' . $email . '|' . $firstname . '|' . $productinfo . '|' . $amount . '|' . $txnid . '|' . $key;\n } else {\n\n $retHashSeq = $salt . '|' . $status . '|||||||||||' . $email . '|' . $firstname . '|' . $productinfo . '|' . $amount . '|' . $txnid . '|' . $key;\n }\n $hash = hash(\"sha512\", $retHashSeq);\n\n if ($hash != $posted_hash) {\n $data['msg'] = \"Invalid Transaction. Please try again\";\n } else {\n \n //echo $user_id;die();\n // echo $status;\n // echo $txnid;\n // echo $amount;\n // echo $firstname;\n // echo $hash;die();\n //echo $membership_package;die();\n $data=array(\n 'user_id'=>$user_id,\n 'user_name'=>$firstname,\n 'status'=>$status,\n 'txnid'=>$txnid,\n 'amount'=>$amount,\n 'hash'=>$hash\n );\n\n //print_r($data);die();\n $path = base_url();\n $url = $path.'api/User_api/SavePayment';\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response_json = curl_exec($ch);\n curl_close($ch);\n $response = json_decode($response_json, true);\n // print_r($response_json);die();\n $data['msg'] = \"<h3>Thank You. Your order status is \" . $status . \".</h3>\";\n $data['msg'] .= \"<h4>Your Transaction ID for this transaction is \" . $txnid . \".</h4>\";\n $data['msg'] .= \"<h4>We have received a payment of Rs. \" . $amount . \". Your order will soon be shipped.</h4>\";\n \n }\n $this->load->view('includes/header.php');\n $this->load->view('pages/profile/membership_view',$data);\n //$this->load->view('pages/payment/success.php',$data);\n $this->load->view('includes/footer.php');\n }", "function hook_commerce_adyen_capture_rejected(\\Commerce\\Adyen\\Payment\\Transaction\\Payment $transaction, \\stdClass $order) {\n\n}", "public static function processPayment($id)\n {\n $order = self::get($id);\n if (!$order) {\n return false;\n }\n\n self::markAsPaid($id);\n self::notifyAboutPurchase($id);\n }", "function isPaymentExist($operation_id){\r\n global $pdo;\r\n $stmt = $pdo->prepare('SELECT DepositVerification FROM deposits WHERE DepositVerification = :DepositVerification');\r\n $stmt->bindParam(':DepositVerification', $operation_id);\r\n $stmt->execute();\r\n\r\n return $stmt->rowCount() > 0;\r\n}", "public function getTransactionStatus()\n {\n return $this->data['payment_status'];\n }", "public function customcheckoutdirectconfirm($quoteid) { \n \n\t\t$quote = $this->quote->create()->load($quoteid);\n\t\t//echo $quote->getId();\n $order = $this->quoteManagement->submit($quote);\n \n //$order->setEmailSent(0);\n\t\t\n\t\t\n\t\t\n\t\t $increment_id = $order->getRealOrderId();\n if($order->getEntityId()){\n $result['order_id']= $order->getRealOrderId();\n }else{\n $result=['error'=>1,'msg'=>'Your custom message'];\n } \n\t\t //$result=['error'=>1,'msg'=>'Your custom message'];\n return $result;\n\t\t \n\t\t \n\t }", "function handleFuturePayPayment(&$input, &$ids, &$objects) {\r\n $recur =& $objects['contributionRecur'];\r\n \r\n // make sure the invoice ids match\r\n // make sure the invoice is valid and matches what we have in the contribution record\r\n if ( $recur->invoice_id != $input['invoice'] ) {\r\n error_log(__FILE__.\":\".__FUNCTION__.\" : Failure : Invoice values dont match between database and IPN request\");\r\n return false;\r\n }\r\n\r\n $now = date( 'YmdHis' );\r\n \r\n // fix dates that already exist\r\n $dates = array( 'create', 'start', 'end', 'cancel', 'modified' );\r\n foreach ( $dates as $date ) {\r\n $name = \"{$date}_date\";\r\n if ( $recur->$name ) {\r\n $recur->$name = CRM_Utils_Date::isoToMysql( $recur->$name );\r\n }\r\n }\r\n\r\n //contribution_status_id:\r\n //0=Completed,1=Pending,2=Cancelled,3=Overdue,4=Failed,5=InProgress\r\n if ($input['transStatus']=='Y') {//rawAuthMessage=Authorised\r\n // futurepay payment accepted\r\n if ($input['rawAuthMessage']!='Authorised') {\r\n error_log(__FILE__.\":\".__FUNCTION__.\" : Warning futurepay transStatus=\".$input['transStatus'].\" but rawAuthMessage=\".$input['rawAuthMessage']);\r\n }\r\n if (_getContributionCount($recur)>=$recur->installments) {\r\n // final installement\r\n $recur->contribution_status_id=0;//0=Completed\r\n $recur->end_date=$now;\r\n }\r\n else {\r\n $recur->contribution_status_id=5;//5=In Progress\r\n $recur->modified_date = $now;\r\n }\r\n }\r\n else if ($input['transStatus']=='N') {//rawAuthMessage=Declined\r\n // futurepay payment declined\r\n $recur->contribution_status_id=4;//4=Failed\r\n $recur->end_date = $now;\r\n if ($input['rawAuthMessage']!='Declined') {\r\n error_log(__FILE__.\":\".__FUNCTION__.\" : Warning futurepay transStatus=\".$input['transStatus'].\" but rawAuthMessage=\".$input['rawAuthMessage']);\r\n }\r\n $checkForEndOfAgreement=false;\r\n }\r\n else if ($input['futurePayStatusChange']=='Merchant Cancelled') {\r\n $recur->contribution_status_id=3;//3= cancelled\r\n $recur->cancel_date = $now;\r\n $input['reasonCode']='FuturePay cancelled by Merchant';\r\n }\r\n else if ($input['futurePayStatusChange']=='Customer Cancelled') {\r\n $recur->contribution_status_id=3;//3= cancelled\r\n $recur->cancel_date = $now;\r\n $input['reasonCode']='FuturePay cancelled by Donor';\r\n }\r\n else {\r\n error_log(__FILE__.\":\".__FUNCTION__.\" : Unrecognized FuturePay operation. input=\".print_r($input,true));\r\n return false;\r\n }\r\n $recur->save();\r\n \r\n if ($input['transStatus']=='Y') {\r\n // create a new contribution for this recurring contribution\r\n $contributionType = $objects['contributionType'];\r\n $contribution = new CRM_Contribute_DAO_Contribution();\r\n $contribution->domain_id = CRM_Core_Config::domainID( );\r\n $contribution->contact_id = $ids[\"contact\"];\r\n $contribution->contribution_type_id = $contributionType->id;\r\n $contribution->contribution_page_id = $ids['contributionPage'];\r\n $contribution->contribution_recur_id = $ids['contributionRecur'];\r\n $contribution->receive_date = $now;\r\n $contribution->invoice_id = md5( uniqid( rand( ), true ) );\r\n $contribution->total_amount = $input[\"amount\"];\r\n $objects['contribution'] =& $contribution;\r\n \r\n require_once 'CRM/Core/Transaction.php';\r\n $transaction = new CRM_Core_Transaciton();\r\n $this->completeTransaction($input,$ids,$objects,$transaction,true);//true=recurring\r\n // completeTransaction handles the transaction commit\r\n return true;\r\n }\r\n }", "public function paymentStatus(Request $request) {\n if($request->tx) {\n if($payment=Payment::where('transaction_id',$request->tx)->first()){\n $payment_id=$payment->id;\n }else{\n $payment=new Payment;\n $payment->item_number = $request->item_number;\n $payment->transaction_id = $request->tx;\n $payment->currency_code = $request->cc;\n $payment->payment_status = $request->st;\n\n // billing information\n $billing_information = $request->session()->get('billing_information');\n if (isset($billing_information)) {\n $payment->tax_number = $billing_information['tax_number'];\n $payment->billing_address = $billing_information['billing_address'];\n $request->session()->forget('billing_information');\n }\n\n $payment->save();\n\n $payment_id=$payment->id;\n }\n\n return 'Pyament has been done and your payment id is : ' . $payment_id;\n }else{\n return 'Payment has failed';\n }\n }", "function process_payment( $order_id ) {\n\n\t\t\tglobal $woocommerce;\n\n\t\t\tif ( '' === $this->merchant ) {\n\t\t\t\t$woocommerce -> add_error( __( 'eSewa is not setup correctly. Cannot proceed !', 'esewa-payment-gateway-for-woocommerce' ) );\n\t\t\t\tif ( 'yes' === $this->debug ) {\n\t\t\t\t\t$this->log->add( 'esewa', 'Merchant ID is empty.' );\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$order = new WC_Order( $order_id );\n\n\t\t\t$esewa_args = $this->get_esewa_args( $order );\n\n\t\t\tif ( 'yes' === $this->testmode ) {\n\t\t\t\t$esewa_adr = $this->testurl;\n\t\t\t} else {\n\t\t\t\t$esewa_adr = $this->liveurl;\n\t\t\t}\n\n\t\t\t$esewa_args_array = array();\n\t\t\tforeach ( $esewa_args as $key => $value ) {\n\t\t\t\t$esewa_args_array[] = \"<input type='hidden' name='$key' value='$value'/>\";\n\t\t\t}\n\n\t\t\treturn array(\n 'result' => 'success',\n 'redirect' => add_query_arg( 'order', $order->id, add_query_arg( 'key', $order->order_key, get_permalink( woocommerce_get_page_id( 'pay' ) ) ) ),\n\t\t\t);\n\n\t\t}", "public function process_payment($order_id){\r\n\r\n $order = wc_get_order( $order_id );\r\n // Mark as on-hold (we're awaiting the cheque)\r\n $order->update_status( 'on-hold', _x( 'Awaiting check payment', 'Check payment method', 'azericard' ) );\r\n\r\n // Reduce stock levels\r\n wc_reduce_stock_levels( $order_id );\r\n\r\n // Remove cart\r\n WC()->cart->empty_cart();\r\n\r\n // Return thankyou redirect\r\n return array(\r\n 'result' => 'success',\r\n 'redirect' => $this->get_return_url( $order ),\r\n );\r\n\r\n }", "public function onResourceBillTransactionReturn(Payment_Model_Order $order, array $params = array()) {\n\n // Check that gateways match\n if ($order->gateway_id != $this->_gatewayInfo->gateway_id) {\n $error_msg1 = Zend_Registry::get('Zend_Translate')->_('Gateways do not match');\n throw new Engine_Payment_Plugin_Exception($error_msg1);\n }\n\n // Get related info\n $user = $order->getUser();\n $moduleBill = $order->getSource();\n\n $moduleName = explode(\"_\", $moduleBill->getType());\n $moduleName = $moduleName['0'];\n\n // Check subscription state\n if ($moduleBill->status == 'trial') {\n return 'active';\n } else\n if ($moduleBill->status == 'pending') {\n return 'pending';\n }\n\n $pollURL = $_SESSION['paynow_payment_begin']['pollurl'];\n $ch = curl_init();\n //set the url, number of POST vars, POST data\n curl_setopt($ch, CURLOPT_URL, $pollURL);\n curl_setopt($ch, CURLOPT_POST, 0);\n curl_setopt($ch, CURLOPT_POSTFIELDS, '');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n //execute post\n $result = curl_exec($ch);\n\n if ($result) {\n //close connection\n $msg = $this->parseMsg($result);\n }\n\n if ($msg['status'] == 'Cancelled' || $msg['status'] == 'created but not paid' || $msg['status'] == 'Failed') {\n return 'cancel';\n }\n\n $gateway_order_id = $msg['paynowreference'];\n\n // Let's log it\n $this->getGateway()->getLog()->log('Return (Paynow): '\n . print_r($params, true), Zend_Log::INFO);\n\n $gateway_profile_id = $gateway_order_id;\n\n // Update order with profile info and complete status?\n $order->state = 'complete';\n $order->gateway_order_id = $gateway_order_id;\n $order->save();\n\n // $moduleBill->gateway_id = $this->_gatewayInfo->gateway_id;\n $moduleBill->gateway_profile_id = $gateway_profile_id;\n $moduleBill->save();\n\n $paymentStatus = 'okay';\n\n /*\n * Here 'siteeventticket_eventbill' is used for \"Advanced Events - Events Booking, Tickets Selling & Paid Events\" commissions.\n * Here 'sitestoreproduct_storebill' is used for \"Stores / Marketplace - Ecommerce\" commissions. \n */\n if ($order->source_type == 'siteeventticket_eventbill') {\n $transactionsTable = Engine_Api::_()->getDbtable('transactions', 'siteeventticket');\n $orderIdColumnName = 'order_id';\n } elseif ($order->source_type == 'sitestoreproduct_storebill') {\n $transactionsTable = Engine_Api::_()->getDbtable('transactions', 'sitestoreproduct');\n $orderIdColumnName = 'parent_order_id';\n }\n\n // Insert transaction\n $transactionParams = array(\n 'user_id' => $order->user_id,\n 'sender_type' => 2,\n 'gateway_id' => Engine_Api::_()->sitegateway()->getGatewayColumn(array('columnName' => 'gateway_id', 'plugin' => 'Sitegateway_Plugin_Gateway_Paynow')),\n 'date' => new Zend_Db_Expr('NOW()'),\n 'payment_order_id' => $order->order_id,\n \"$orderIdColumnName\" => $order->source_id,\n 'type' => 'payment',\n 'state' => $paymentStatus,\n 'gateway_transaction_id' => $gateway_order_id,\n 'amount' => $moduleBill->amount,\n 'currency' => Engine_Api::_()->sitegateway()->getCurrency()\n );\n $transactionsTable->insert($transactionParams);\n\n $transactionParams = array_merge($transactionParams, array('resource_type' => $order->source_type));\n Engine_Api::_()->sitegateway()->insertTransactions($transactionParams);\n\n // Get benefit setting\n $giveBenefit = $transactionsTable->getBenefitStatus($user);\n\n // Check payment status\n if ($paymentStatus == 'okay' || ($paymentStatus == 'pending' && $giveBenefit)) {\n\n $moduleBill->gateway_profile_id = $gateway_profile_id;\n\n // Payment success\n $moduleBill->onPaymentSuccess();\n\n return 'active';\n } else if ($paymentStatus == 'pending') {\n\n // Update advertiesment info\n $moduleBill->gateway_profile_id = $gateway_profile_id;\n\n // Payment pending\n $moduleBill->onPaymentPending();\n\n return 'pending';\n } else if ($paymentStatus == 'failed') {\n // Cancel order and advertiesment?\n $order->onFailure();\n $moduleBill->onPaymentFailure();\n // Payment failed\n throw new Payment_Model_Exception('Your payment could not be completed due to some reason, Please contact to site admin.');\n } else {\n // This is a sanity error and cannot produce information a user could use to correct the problem.\n throw new Payment_Model_Exception('There was an error processing your ' .\n 'transaction. Please try again later.');\n }\n }", "public static function settlementPending($transactionId)\r\n {\r\n return Braintree_Configuration::gateway()->testing()->settlementPending($transactionId);\r\n }", "public function payment_status_denied()\n {\n return $this->payment_status_failed();\n }", "public function paypal_payment($paymentID = \"\", $paymentToken = \"\", $payerID = \"\", $paypalClientID = \"\", $paypalSecret = \"\") {\n $paypal_keys = get_settings('paypal');\n $paypal_data = json_decode($paypal_keys);\n\n $paypalEnv = $paypal_data[0]->mode; // Or 'production'\n if ($paypal_data[0]->mode == 'sandbox') {\n $paypalURL = 'https://api.sandbox.paypal.com/v1/';\n } else {\n $paypalURL = 'https://api.paypal.com/v1/';\n }\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $paypalURL.'oauth2/token');\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $paypalClientID.\":\".$paypalSecret);\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"grant_type=client_credentials\");\n $response = curl_exec($ch);\n curl_close($ch);\n\n if(empty($response)){\n return false;\n }else{\n $jsonData = json_decode($response);\n $curl = curl_init($paypalURL.'payments/payment/'.$paymentID);\n curl_setopt($curl, CURLOPT_POST, false);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\n 'Authorization: Bearer ' . $jsonData->access_token,\n 'Accept: application/json',\n 'Content-Type: application/xml'\n ));\n $response = curl_exec($curl);\n curl_close($curl);\n\n // Transaction data\n $result = json_decode($response);\n\n // CHECK IF THE PAYMENT STATE IS APPROVED OR NOT\n if($result && $result->state == 'approved'){\n return true;\n }else{\n return false;\n }\n }\n }", "final public static function transactionCannotBeFoundOnAPMGateway()\n {\n return self::get(2059);\n }", "public function confirmationPayment()\n {\n $response = $this->client->request($this->methods['post'], \"payment_gateway_api/confirm_payment\", [\n 'json' => [\n 'AGR_TRANS_ID' => $this->agr_trans_id,\n 'VERIFICATION_CODE' => $this->verification_code,\n 'SIGN_TIME' => $this->generateSignTime(),\n 'SIGN_STRING' => md5($this->SECRET_KEY. $this->agr_trans_id.$this->verification_code. $this->sign_time)\n ]\n ]);\n\n return json_decode($response->getBody());\n }", "function process_payment($order_id) {\t\t\r\n\t\tif ( function_exists( 'wc_get_order' ) ) {\r\n\t\t\t$order = wc_get_order( $order_id );\r\n\t\t} else {\r\n\t\t\t$order = new WC_Order( $order_id );\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn array(\r\n\t\t\t\t'result' => 'success',\r\n\t\t\t\t'redirect' => $order->get_checkout_payment_url( true )\r\n\t\t);\r\n }", "public function paymentInfo($id){\n $client = new Client();\n try{\n $paymentInfo = $client->request('GET', \"https://api.sandbox.paypal.com/v1/payments/payment/\" . $id , [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $this->accessKey,\n 'Content-Type' => 'application/json',\n ]\n \n ]);\n }\n catch(\\Exception $ex) {\n $error = json_encode($ex->getMessage());\n return($error);\n }\n $this->parsePaymentBody($paymentInfo);\n return $this->paymentBody;\n }" ]
[ "0.6285839", "0.62010187", "0.61955523", "0.607165", "0.6019416", "0.60160494", "0.59620863", "0.5952717", "0.5949377", "0.59358776", "0.59279317", "0.5916885", "0.5915947", "0.5866241", "0.5859362", "0.58528024", "0.5843547", "0.5838889", "0.5836518", "0.58341753", "0.58168125", "0.58162344", "0.5812199", "0.5796383", "0.5793214", "0.57923937", "0.57914525", "0.57861406", "0.5784821", "0.57747304", "0.5773597", "0.5769468", "0.57649016", "0.5763586", "0.57313234", "0.5730802", "0.57269037", "0.5718316", "0.57146966", "0.57117736", "0.57055455", "0.57044464", "0.5696217", "0.56879336", "0.56861186", "0.56813765", "0.5680307", "0.56779724", "0.5668716", "0.5666723", "0.5666187", "0.56624955", "0.5661522", "0.5658239", "0.5646811", "0.5633527", "0.5617096", "0.5616343", "0.5614663", "0.56089574", "0.5605646", "0.5588938", "0.5588763", "0.55873686", "0.5579379", "0.5579121", "0.5577845", "0.5574089", "0.5567827", "0.5566842", "0.5564172", "0.5563826", "0.55490595", "0.5544719", "0.5540701", "0.5531689", "0.5527514", "0.5527459", "0.55177885", "0.5511015", "0.5508616", "0.5506185", "0.55000764", "0.54992795", "0.5496653", "0.54924953", "0.5489847", "0.54891425", "0.54887486", "0.54868835", "0.5486025", "0.5482815", "0.54774815", "0.5474785", "0.54675627", "0.54658383", "0.5465285", "0.5464304", "0.5464053", "0.5461082", "0.5460392" ]
0.0
-1
Displays a single StampTemplates model.
public function saveImage($previous_image = '') { $image = UploadedFile::getInstanceByName('image'); if ($image) { $file = pathinfo($image->name); $filename = uniqid().'.'.$file['extension']; $path = Yii::getAlias('@webroot').'/images/cliche_tpl/'; if($image->saveAs($path.$filename)){ if ($previous_image !== '') { unlink($path . $previous_image); } return $filename; } }else{ return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show($tname)\n {\n $template = DB::table('templates')->select('*')->where('tname', '=', $tname)->get();\n\n return view('/templates/show')->with('template', $template);\n }", "public function actionIndex()\n {\n $searchModel = new StampSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function index()\n {\n $templates = $this->template->all();\n\n return View::make('admin::admin.templates.index', compact('templates'))\n ->with('title','templates Manage');\n }", "public function display() {\r\n echo $this->template;\r\n }", "public function showTemplate(){\n\t\tinclude \"view/template.php\";\n\t}", "public function actionIndex()\n {\n $model = (new Templates())->getFirstRecordModel();\n $searchModel = new Templates();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $dataProvider->pagination->pageSize = 20;\n\n return $this->render('index', [\n 'firstRecord' => $model,\n 'existRecord' => (new ExistRecordModel())->getExistRecordModel(Templates::class),\n 'disabledAttribute' => true,\n 'dataProvider' => $dataProvider,\n 'filteredColumns' => [],\n 'searchModel' => $searchModel,\n ]);\n }", "public function show($id)\n\t{\n\t\t$temp = Template::find($id);\n\t\treturn view('template')->with(array('temp' => $temp, 'action' => 'save'));\n\t}", "public function actionIndex()\n {\n $searchModel = new TemplateSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->get());\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n ]);\n }", "public function index()\n {\n //talk to model\n $styleTemplates = StyleTemplate::all();\n\n //pick view to display\n return view('styleTemplates.index', compact('styleTemplates'));\n }", "public function actionView($id)\n {\n $model = (new Templates())->getFirstRecordModel($id);\n $searchModel = new Templates();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $dataProvider->pagination->pageSize = 20;\n\n return $this->render('index', [\n 'firstRecord' => $model,\n 'existRecord' => (new ExistRecordModel())->getExistRecordModel(Templates::class),\n 'disabledAttribute' => true,\n 'dataProvider' => $dataProvider,\n 'filteredColumns' => [],\n 'searchModel' => $searchModel,\n ]);\n }", "public function show($id)\n {\n $template = $this->template->findOrFail($id);\n\n return View::make('admin::admin.templates.show', compact('template'))\n ->with('title','templates: '.$template->id);\n }", "public function index()\n {\n $data = [\n 'stamps' => Stamp::get()\n ];\n \n return view('admin.stamps.index', $data);\n\n }", "public function templates()\n {\n $this->authorize();\n\n ee()->load->helper('form');\n ee()->load->library('form_validation');\n ee()->load->model('publisher_template');\n\n if (empty($_POST))\n {\n $vars = array(\n 'hidden' => array(),\n 'save_url' => ee()->publisher_helper_cp->mod_link('templates', array(), TRUE),\n 'templates' => ee()->publisher_template->get_by_group()\n );\n\n return ee()->load->view('templates', $vars, TRUE);\n }\n else\n {\n ee()->publisher_template->save_translations();\n ee()->session->set_flashdata('message_success', lang('publisher_templates_saved'));\n ee()->publisher_helper_url->redirect(ee()->publisher_helper_cp->mod_link('templates'));\n }\n }", "public function dataSetTemplates()\n\t{\n\t\tif (!$this->system->user->hasAdminPermissions('data_set_templates')) {\n\t\t\treturn Redirect::route('admin.dashboard');\n\t\t}\n\t\t$data_set_templates = DataSetTemplatesRepository::retrieve();\n\t\t$messages = $this->system->messages->get();\n\t\treturn View::make(\n\t\t\t'data::data_set_templates.data_set_templates',\n\t\t\tcompact('messages', 'data_set_templates')\n\t\t);\n\t}", "public function show($id)\n {\n //talk to model\n $styleTemplate = StyleTemplate::find($id);\n\n //pick view to display\n return view('styleTemplates.show', compact('styleTemplate'));\n }", "public function Display()\n {\n include($this->template);\n }", "public function index() {\n\t $this->registry->template->show();\n\t}", "public function actionViewByStaf($id){\n return $this->render('viewByStaf',[\n 'model' => $this->findModel($id),\n ]);\n }", "public function index()\n {\n $templates = $this->templates->paginate('name');\n\n return view('templates.index', compact('templates'));\n }", "public function showAction(TSchool $tSchool)\n {\n $area = $this->getDoctrine()->getRepository('KuakaoAdminBundle:TArea')->getData();\n $school_type = $this->get('parameter')->showFieldValue('school_type');\n $school_comes_under = $this->get('parameter')->showFieldValue('school_comes_under');\n\n return $this->render('KuakaoAdminBundle:School:show.html.twig', array(\n 'tSchool' => $tSchool,\n 'area' => $area,\n 'school_type' => $school_type,\n 'school_comes_under' => $school_comes_under\n ));\n }", "function display($tpl = null)\r\n\t{\r\n\t\tglobal $mainframe;\r\n\t\t\n\t\t$doc = JFactory::getDocument();\r\n\t\t$layout = $this->getLayout();\r\n\t\t\r\n\t\t// Get data from the model\r\n\t\t$model = &$this->getModel();\r\n\t\t$items = $model->getData(null, true, true);\r\n\t\t$params = $mainframe->getParams();\r\n\t\t\n\t\t$doc->setTitle(JText::_('JRESEARCH_TEAMS'));\t\t\r\n\t\t\r\n\t\t$this->assignRef('params', $params);\r\n\t\t$this->assignRef('items', $items, JResearchFilter::ARRAY_OBJECT_XHTML_SAFE, array('exclude_keys' => array('description')));\r\n\t\t$this->assignRef('page', $model->getPagination());\t\n\r\n\t\t$eArguments = array('teams', $layout);\r\n\t\t\r\n\t\t$mainframe->triggerEvent('onBeforeListFrontendJResearchEntities', $eArguments);\r\n\t\t\r\n\t\tparent::display($tpl);\r\n\t\t\r\n\t\t$mainframe->triggerEvent('onAfterListFrontendJResearchEntities', $eArguments);\r\n\t}", "public function index()\n {\n $tournamentTemplates = TournamentTemplate::orderBy(\"tournament_name\")->get();\n return view(\"Settings.tournament-templates\", [\"tournamentTemplates\" => $tournamentTemplates, \"addTournamentTemplateUrl\" => url(\"/settings/tournament-templates\")]);\n }", "public function actionIndex()\n {\n\n \t$model = new MailTemplate();\n \t$dataProvider = new ActiveDataProvider([\n 'query' => MailTemplate::find()\n ]);\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'model' => $model,\n ]);\n }", "public function show()\n {\n $students = Student::all();\n return view('admin.students.index', compact('students', 'class'));\n }", "public function index($template_id)\n {\n $user_id = \\Auth::user()->id;\n $template_id = nxb_decode($template_id);\n $forms = Form::where('template_id',$template_id)->where('scheduler',1)->get();\n \n $templates = Template::where('id',$template_id)->with(\"associated_template\")->first();\n $associated = $templates->associated_template;\n\n return view('MasterTemplate.spectators.index')->with(compact(\"template_id\",\"forms\",\"associated\"));\n \n }", "public function show()\n {\n return view('timetable::show');\n }", "public function showAction() {\n $news = $this->newsRepository->findByUid($GLOBALS['TSFE']->id);\n $this->view->assign('news', $news)\n ->assign('settings', $this->settings);\n }", "public function actionIndex()\n {\n $searchModel = new PrintTemplateSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function show($id)\n\t{\n\t\t$files = Filetemplate::find($id);\n\t\t$filedata = fopen($files->file_path,'r');\n\t\t$headers = fgetcsv($filedata, 1024, ',');\n\t\tfclose($filedata);\n\n\t\treturn View::make('file_templates.show',array('files'=>$files, 'headers'=>$headers))\n\t\t\t\t\t->with('title','View Template')\n\t\t\t\t\t->with('activeLink','system_manager');\n\t}", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => WeichatPushSetTemplatePushList::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionView() {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }", "public function display($tpl = null) {\n\n\t\t// Load the template types\n\t\t$this->templatetypes = $this->get('Items');\n\n\t\t// Get the pagination\n\t\t$this->pagination = $this->get('Pagination');\n\n\t\t// Load the user state\n\t\t$this->state = $this->get('State');\n\n\t\t// Get the panel\n\t\t$this->loadHelper('panel');\n\n\t\t// Show the toolbar\n\t\tJToolBarHelper::title(JText::_('COM_CSVI_TEMPLATETYPES'), 'csvi_templates_48');\n\t\tJToolBarHelper::custom('templatetype.add', 'new.png', 'new_f2.png','JTOOLBAR_NEW', false);\n\t\tJToolBarHelper::custom('templatetype.edit', 'edit.png', 'edit_f2.png','JTOOLBAR_EDIT', true);\n\t\t//JToolBarHelper::help('about.html', true);\n\n\t\t// Display it all\n\t\tparent::display($tpl);\n\t}", "public function actionView()\n {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }", "public function index()\n\t{\n\t\treturn View::make('file_templates.index',array('templates'=>Filetemplate::all()))\n\t\t\t\t\t->with('title','File Templates')\n\t\t\t\t\t->with('activeLink','system_manager');\n\t}", "public function IndexPage()\n {\n $record = TypesTargetsModel::all(); \n\n return view('TypesTargets', compact('record'));\n\n }", "public function template()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/template', [\n\t\t\t'templates_availables' => $this->templates_availables,\n\t\t]);\n\t}", "public function actionCreate()\n {\n $model = $searchModel = new Templates();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $dataProvider->pagination->pageSize = 20;\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $model->created_by = Yii::$app->user->id;\n $model->created_at = $model->updated_at = time();\n $companyId = Company::getCompanyIdBySubdomain();\n\n if ($companyId == 'main') {\n $model->company_id = 0;\n } else {\n $model->company_id = $companyId;\n }\n\n if ($model->save()) {\n if (Templates::find()->where(['id' => $model->id])->exists())\n return $this->redirect(['view', 'id' => $model->id]);\n else\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('index', [\n 'firstRecord' => $model,\n 'disabledAttribute' => false,\n 'dataProvider' => $dataProvider,\n 'filteredColumns' => [],\n 'searchModel' => $searchModel,\n ]);\n }", "function display($tpl = null) \r\n\t{\r\n\r\n\r\n\t\t// Set the document\r\n\t\t$this->setDocument();\r\n\t\t\r\n\t\t// Set the toolbar\r\n\t\t$this->addToolBar();\r\n\r\n\t\t$this->item = $tema;\r\n\t\t\r\n\r\n\t\t// Display the template\r\n\t\tparent::display($tpl);\r\n\t}", "public function renderStrom()\n {\n $this->template->dokument_id = $this->getParameter('dokument_id');\n\n $Spisy = new Spis();\n $args = ['where' => ['stav = 1']];\n $args = $Spisy->spisovka($args);\n $result = $Spisy->seznamRychly($args['where']);\n $result->setRowClass(null);\n $this->template->spisy = $result->fetchAll();\n }", "function display($tpl = null)\n\t{\n\t\t$this->Item=$this->get('Item');\n\t\t\n//\t\techo \"<pre>\" . var_dump($this->Item) . \"</pre>\";\n\t\t$tour=new TournamentHelper();\n\t\t\t\n\t\tif (isset($this->Item[\"tournament\"][\"id\"]))\n\t\t{\n\t\t\t$tour->tournament=$this->Item[\"tournament\"];\n\t\t\t$tour->player=$this->Item[\"player\"];\n\t\t\t$tour->result=$this->Item[\"result\"];\n\t\t\t$tour->head=$this->Item[\"tournament\"]['event'];\n\t\t\t$this->table=$tour->displayTable(999);\n\t\t}\n\t\tparent::display($tpl);\n\t}", "public function smsTemplates()\n {\n $sms_templates = SMSTemplates::where('cl_id', Auth::guard('client')->user()->id)->orWhere('global', 'yes')->get();\n return view('client.sms-templates', compact('sms_templates'));\n }", "public function index()\n {\n return view('admin::template');\n }", "public function display($tpl = null) {\n //-- Get some data from the model\n $model =& $this->getModel();\n\n $lowestYear = $model->yearMin();\n $highestYear = $model->yearMax();\n $tournaments = $model->tournaments();\n $competitionTypes = $model->competitionTypes();\n \n $this->assignRef('lowestYear', $lowestYear);\n $this->assignRef('highestYear', $highestYear);\n $this->assignRef('tournaments', $tournaments);\n $this->assignRef('competitionTypes', $competitionTypes);\n \n parent::display($tpl);\n\n }", "public function index()\n {\n $templates = EmailTemplate::all();\n return view('email::email_template_view',compact('templates'));\n }", "public function index()\n {\n $ContractTemplates = $this->ContractTemplateRepository->get();\n return view('ContractTemplate.index', compact('ContractTemplates'));\n }", "public function index()\n {\n //$shiptypes = $this->shiptype->all();\n\n return $this->view('admin::shiptypes.index');\n }", "public function show($id)\n {\n $activeTemplate = ActiveTemplate::findOrFail($id);\n return view('params::activeTemplate.show', ['activeTemplate' => $activeTemplate]);\n }", "protected function display($templateData) {\n }", "public function show($id)\n {\n $template = Template::with('document_categories')->find($id);\n return view('configurations.templates.show', compact('template'));\n }", "public function index()\n {\n $sps = Speedy::getModelInstance( 'sp' )->where( 'valid' , '1' )->where( 'sp_zt' ,\n null )->orderBy( 'created_at' , 'DESC' )->get();\n\n return view( 'vendor.speedy.admin.sp.index-vue' , compact( 'sps' ) );\n }", "public function display($tpl = null)\n {\n $model =& $this->getModel();\n $greeting_model = $model->getGreeting();\n $greeting_view = 'Hello World (view) !';\n\n $this->assignRef('greeting_model', $greeting_model);\n $this->assignRef('greeting_view', $greeting_view);\n\n parent::display($tpl);\n }", "public function index()\n {\n return view(\"tutoriais.templateTutoriaisList\");\n }", "public function actionIndex()\n {\n\t\t$id = 1;\n return $this->render('/backend/siteinfo/view', [\n 'model' => $this->findModel($id),\n ]);\n }", "public function actionCreate()\n {\n $model = new Template();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function showAction()\n {\n $this->setPageTitle(sprintf($this->_('Show %s'), $this->getTopic()));\n\n $model = $this->getModel();\n // NEAR FUTURE:\n // $this->addSnippet('ModelVerticalTableSnippet', 'model', $model, 'class', 'displayer');\n $repeater = $model->loadRepeatable();\n $table = $this->getShowTable();\n $table->setOnEmpty(sprintf($this->_('Unknown %s.'), $this->getTopic(1)));\n $table->setRepeater($repeater);\n $table->tfrow($this->createMenuLinks($this->menuShowIncludeLevel), array('class' => 'centerAlign'));\n\n if ($menuItem = $this->findAllowedMenuItem('edit')) {\n $table->tbody()->onclick = array('location.href=\\'', $menuItem->toHRefAttribute($this->getRequest()), '\\';');\n }\n\n $tableContainer = \\MUtil_Html::create('div', array('class' => 'table-container'), $table);\n $this->html[] = $tableContainer;\n }", "public function actionView()\n\t{\n\t\t$model = $this->loadModel();\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionSettingsIndexTemplate()\n\t{\n\t\t$settingsModel = new SproutForms_SettingsModel;\n\n\t\t$settings = craft()->db->createCommand()\n\t\t\t->select('settings')\n\t\t\t->from('plugins')\n\t\t\t->where('class=:class', array(':class'=> 'SproutForms'))\n\t\t\t->queryScalar();\n\n\t\t$settings = JsonHelper::decode($settings);\n\t\t$settingsModel->setAttributes($settings);\n\n\t\t$variables['settings'] = $settingsModel;\n\n\t\t// Load our template\n\t\t$this->renderTemplate('sproutforms/settings', $variables);\n\n\t}", "public function viewAction()\n {\n $id = $this->_getPrimaryId();\n $row = $this->_getRow($id);\n\n $this->view->row = $row;\n }", "public function getShowTemplates();", "public function show($id)\n {\n $template = Template::where('id', $id)->first();\n\n if($template)\n return view('template', compact('template'));\n\n return redirect()->route('templates')->with('danger', __('Template doesn\\'t exists'));\n }", "public function template()\n {\n\n include './views/template.php';\n\n }", "function studentResources(){\n // show the student resources page\n echo Template::instance()->render('views/studentResources.php');\n}", "public function showAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/show', array(\n\t\t\t'title' => $school->name,\n\t\t\t'entity' => $school,\n\t\t\t'locations' => $school->locations()\n\t\t) ) );\n\t}", "public function indexAction()\n\t{\n\t\t$this->render( View::make( 'schools/index' , array(\n\t\t\t'title' => 'Mes &Eacute;coles',\n\t\t\t'entities' => School::all()\n\t\t) ) );\n\t}", "public static function display($strTemplateName) {\r\n\t\tself::$_smarty->display($strTemplateName);\r\n\t}", "public function view_templates($args)\n {\n $this->registry->template->Title = \"HiiFan News Portal :: Admin Home Page : View Email Templates\";\n $templateListArray = $this->registry->model->run(\"getAllTemplateList\", $args);\n $this->registry->template->PresentPage = $args['start_page'];\n $this->registry->template->TemplateListArray = $templateListArray;\n $this->registry->template->show(\"view_templates\");\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $wts = $em->getRepository('BackendBundle:Wt')->findAll();\n\n return $this->render('wt/index.html.twig', array(\n 'wts' => $wts,\n ));\n }", "public function edit($tname)\n {\n // get the template\n $template = DB::table('templates')->select('*')->where('tname', '=', $tname)->get();\n\n // show the edit form and pass the template\n return view('/templates/edit')->with('template', $template);\n }", "function display($tpl = null)\n\t{\n\t\t// Get data from the model\n\t\t$items = $this->get('Items');\n\t\t$pagination = $this->get('Pagination');\n\t\t$this->form\t\t= $this->get('Form');\n\n\t\t// Check for errors.\n\t\tif (count($errors = $this->get('Errors')))\n\t\t{\n\t\t\tJError::raiseError(500, implode('<br />', $errors));\n\n\t\t\treturn false;\n\t\t}\n\t\t// Assign data to the view\n\t\t$this->items = $items;\n\t\t$this->pagination = $pagination;\n\n// \t\tinclude 'C:\\Suresh\\REBProject\\PHP_WorkSpace\\old\\SPI\\administrator\\components\\com_helloworld\\views\\helloworlds\\push\\simplepush.php';\n// \t\tpushOneId('');\n\t\t\n\t\t$this->addToolBar();\n\t\t// Display the template\n\t\tparent::display($tpl);\n\t}", "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "public function template()\n {\n $templates = EmailTemplate::select('*')->where('email_templates.state','0')->get();\n $newcontact = DB::table('contact')->where('contact.state', '=', '0')->count();\n return view('admin.email_template')->with(array('templates'=>$templates,'newcontact'=>$newcontact));\n }", "public function index()\n {\n $campuses = Campus::with('shiftTimings')->get();\n\n return view('admin.edit.shifttiminglist',\n ['campuses' => $campuses]);\n }", "public function actionView()\n\t{\n\t\t$this->render('view');\n\t}", "public function ClassTemplate(){\n\t\t$this->template = new Template;\n\t}", "public function actionViewByHrdStaf($id){\n return $this->render('viewByHrdStaf',[\n 'model' => $this->findModel($id),\n ]);\n }", "public function index()\n {\n //$templates = Template::all();\n //$templates = DB::table('template')->select('*')->get();\n // load the view and pass all templates\n //return view('/templates/index')->with('templates', $templates);\n return view('/templates/index');\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $stammdatens = $em->getRepository('AppBundle:Stammdaten')->findAll();\n\n return $this->render('stammdaten/index.html.twig', array(\n 'stammdatens' => $stammdatens,\n ));\n }", "public function actionView()\n\t{\n\t\tif (!($model = $this->loadModel()))\n\t\t\treturn;\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionView($id)\n {\n $model = $this->findModel($id);\n return $this->render('view', [\n 'model' => $model,\n 'types' => $model->getTypes(),\n ]);\n }", "function index(){\n\n global $wear;\n do_login();\n admin_levels(\"Editor\");\n $template = $this->loadView($wear->front . \"/members/students\");\n $login = $this->loadModel($this->gear, \"sun_student_model\");\n $students = $login->get_students();\n $template->set(\"students\" , $students);\n $template->set(\"page\" , SITE_NAME . \" | Students\");\n $template->render(); \n \n }", "public function show($name)\n {\n $this->authorize('show', 'Template');\n\n try {\n $template = $this->templateLoader->load($name);\n } catch (FileNotFoundException $exception) {\n return abort(404);\n }\n\n return $this->success(['template' => $template]);\n }", "public function show(Template $template)\n {\n return view('template.show', compact('template'));\n }", "public function actionView()\n {\n $id=(int)Yii::$app->request->get('id');\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }", "public function show()\n {\n $tvshow = Tv_show::where('slug', $slug)->first();\n if(empty($tvshow)){abort(404);}\n return view('tvshow.show')->with('tvshow', $tvshow);\n }", "public function viewAction()\n {\n $blogpostId = $this->_registry->args[0];\n $blogpost = new Rwtt_Entity_BlogPost();\n $blogpost->loadById($blogpostId);\n $this->view->title = $blogpost->title;\n $this->view->content = $blogpost->content;\n }", "function display($tpl = null)\n\t{\n\t\t// Get data from the model\n\t\t$items = $this->get('Items');\n\t\t$pagination = $this->get('Pagination');\n\n\t\t$this->state = $this->get('State');\n\t\t$this->assoc = $this->get('Assoc');\n\t\t$this->activeFilters = $this->get('ActiveFilters');\n\t\t$this->filterForm = $this->get('FilterForm');\n\t\t$user\t\t= JFactory::getUser();\n\t\t$userId\t\t= $user->get('id');\n\n\n\t\t// Check for errors.\n\t\tif (count($errors = $this->get('Errors')))\n\t\t{\n\t\t\tJError::raiseError(500, implode('<br />', $errors));\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Assign data to the view\n\t\t$this->items = $items;\n\t\t$this->pagination = $pagination;\n\n\t\t// Set the toolbar and number of found items\n\t\t$this->addToolBar($this->pagination->total);\n\n\t\t// Display the template\n\t\tparent::display($tpl);\n\n\t\t// Set the document\n\t\t$this->setDocument();\n\t}", "public function index()\n\t{\n\t $this->authorize('index', 'Template');\n\n\t $templates = $this->templateLoader->loadAll();\n\n\t $perPage = $this->request->get('per_page', 10);\n\t $page = $this->request->get('page', 1);\n\n\t if ($this->request->has('query')) {\n\t $templates = $templates->filter(function($template) {\n\t return str_contains(strtolower($template['name']), $this->request->get('query'));\n });\n }\n\n if ($orderBy = $this->request->get('order_by', 'updated_at')) {\n $desc = $this->request->get('order_dir', 'desc') === 'desc';\n $templates = $templates->sortBy($orderBy, SORT_REGULAR, $desc);\n }\n\n\t $pagination = new LengthAwarePaginator(\n\t $templates->slice($perPage * ($page - 1), $perPage)->values(),\n count($templates),\n $perPage,\n $page\n );\n\n\t return $this->success(['pagination' => $pagination]);\n\t}", "public function show(Stud $stud)\n {\n return view('Students.stud');\n }", "public function actionIndex()\n {\n $module = \\suver\\notifications\\Module::getInstance();\n $searchModel = new NotificationsTemplateSearch();\n $dataProvider = $searchModel->search(\\Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'module' => $module,\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function surfacesAction() {\n\t$surfaces = new Surftreatments();\n\t$this->view->surfaces = $surfaces->getSurfaceTreatments();\n\t}", "public function actionView($slug)\n {\n return $this->render('view', [\n 'model' => $this->findModel($slug),\n ]);\n }", "function viewStory() {\n // Make sure the story is set to publish before displaying.\n if ($this->story->published == 1) {\n\n $picture = new Picture();\n $picture->load(['id = ?', $this->story->picture_id]);\n $page = $this->db->exec('SELECT MIN(page_number) as firstPage FROM pages WHERE story_id = ?', $this->story->id);\n\n $this->assign('story', $this->story);\n $this->assign('role', $this->getAuthorizationStatus());\n $this->assign('contentTitle', $this->story->title);\n $this->assign('pageTitle', $this->story->title);\n $this->assign('firstPage', $page[0]['firstPage']);\n $this->assign('filename', $picture->filename);\n $this->display('viewStory.tpl');\n }\n else {\n // Otherwise send to 404.\n $this->f3->error(404);\n }\n }", "public function actionView($id)\n {\n return $this->render('pengumuman', ['model' => \\app\\models\\TaPengumuman::findOne(['id' => $id])]);\n }", "function index(){\n\t\t$this->template->run();\n\t}", "public function index()\n\t{\n\t\t$cat = EmailCategory::all();\n\t\t$userId = Auth::id();\n\t\t$ut = UserTemplate::all()->where('user', $userId);\n\t\treturn view('predefinedTemplates')->with(array('cat'=>$cat, 'ut'=> $ut));\n\t}", "public function display( $tpl = null )\n\t{\n//\t\t$this->item = $this->get( 'Item' );\n//\t\t$this->form = $this->get( 'Form' );\n//\t\t$this->state = $this->get( 'State' );\n\n maritinaSiteHelper::setDocument( '');\n\n\t\tparent::display( $tpl );\n\t}" ]
[ "0.64974713", "0.6432869", "0.6365219", "0.6319344", "0.6275215", "0.62341505", "0.6224029", "0.6217845", "0.62065744", "0.6145407", "0.6121373", "0.61200345", "0.6014555", "0.5983495", "0.5981059", "0.5958201", "0.5955724", "0.5954576", "0.59386134", "0.592498", "0.5920571", "0.5918318", "0.5917093", "0.58843005", "0.5867349", "0.5866887", "0.58535606", "0.5821782", "0.57719946", "0.57663", "0.57581264", "0.5755499", "0.57492965", "0.57128173", "0.5703997", "0.5700777", "0.5700368", "0.56928474", "0.5677355", "0.5667868", "0.56675917", "0.5662099", "0.5642812", "0.56358075", "0.5632155", "0.5612869", "0.5597702", "0.5591471", "0.55895656", "0.55788237", "0.55775034", "0.5576987", "0.55749196", "0.5563174", "0.5556961", "0.55509114", "0.55475986", "0.55445623", "0.55440795", "0.55419225", "0.5530025", "0.55248487", "0.5523351", "0.55217177", "0.5520922", "0.5513292", "0.55114204", "0.55012304", "0.5499691", "0.54978186", "0.5488096", "0.5488096", "0.5488096", "0.5488096", "0.5488096", "0.5483563", "0.54731214", "0.5462725", "0.5457949", "0.54572576", "0.5455097", "0.54458815", "0.54374325", "0.54302084", "0.542446", "0.54226017", "0.5409082", "0.54023623", "0.5401856", "0.53950584", "0.5392841", "0.5390942", "0.53903955", "0.5386338", "0.5384623", "0.5382336", "0.537783", "0.53751004", "0.5362652", "0.5359053", "0.53572845" ]
0.0
-1
Returns all possible values as an array.
protected static function toArray(): array { $class = static::class; if (!isset(static::$cache[$class])) { try { $reflection = new ReflectionClass($class); } catch (ReflectionException $e) { return []; } static::$cache[$class] = $reflection->getConstants(); } return static::$cache[$class]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getValues(): array\n {\n return array_values(self::getConstants());\n }", "public function values() : array;", "public function getValues(): array;", "public function getValues(): array;", "abstract public function values(): array;", "public function all(): array\n {\n return $this->values;\n }", "abstract public static function getValues(): array;", "public static function getValues()\n {\n return array_values(self::getConstants());\n }", "public function getValues(): array\n {\n $enumeration = $this->enumeration;\n $values = [];\n foreach ($this->getOrdinals() as $ord) {\n $values[] = $enumeration::byOrdinal($ord)->getValue();\n }\n return $values;\n }", "public static function listOfValues()\n {\n return array_values((new static)->_all);\n }", "public function getArray () {\n\n return $this->values;\n\n }", "public function getValues() : array\n {\n return $this->values;\n }", "public function toArray(): array\n {\n return $this->values;\n }", "public function values(): array\n {\n return $this->values;\n }", "public function getValues(): array\n {\n return $this->values;\n }", "function getValues(){\n $values = [];\n \n foreach($this as $valor){\n $values[] = $valor;\n }\n \n return $values;\n }", "public function toArray(): array\n {\n $array = [];\n\n for ($i = 1; $i <= $this->size; $i++) {\n $array[] = $this->elements[$i]['value'];\n }\n\n return $array;\n }", "public function toArray()\n\t{\n\t\treturn $this->values;\n\t}", "public function toArray()\n\t{\n\t\treturn $this->values;\n\t}", "public function toArray ( )\n {\n return (array) $this->_values;\n }", "public function getAsArray();", "public function values() {\n return array_merge(\n array(null),\n $this->primitives(),\n $this->arrays(),\n $this->maps(),\n $this->objects()\n );\n }", "public function toArray() {\n $return = array();\n foreach($this as $value) {\n $return[] = $value;\n }\n return $return;\n }", "public static function getAllAsArray()\n {\n return [\n self::EN_GB,\n self::DE_DE,\n self::ES_ES,\n self::FR_FR,\n self::IT_IT,\n self::PL_PL,\n self::PT_PT,\n self::RU_RU,\n self::KO_KR,\n self::EN_US,\n self::ZH_TW,\n self::PT_BR,\n self::ES_MX,\n ];\n }", "public function toArray()\n {\n return $this->values;\n }", "public function toArray()\n {\n return $this->values;\n }", "public function getValues()\n\t{\n\t\t$params = array();\n\n\t\tforeach($this->values as $value)\n\t\t{\n\t\t\tswitch($value[self::TYPE])\n\t\t\t{\n\t\t\t\tcase self::TYPE_RAW:\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::TYPE_IN:\n\n\t\t\t\t\t$params+= $value[self::VALUE];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::TYPE_SCALAR:\n\t\t\t\tdefault:\n\n\t\t\t\t\t$params[] = $value[self::VALUE];\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $params;\n\t}", "public function values() : array\n {\n return array_values($this->entries);\n }", "public function all()\n {\n return $this->getArray('');\n }", "public function values() {\n\t\treturn array_values($this->_value);\n\t}", "public function all()\n {\n return $this->values;\n }", "public function getValues();", "public function getValues(): array\n {\n return array_map(function ($model) {\n return $model->value;\n }, $this->values);\n }", "public function getValues()\n {\n return $this->getVal('value', []);\n }", "public function getValues () {\n\n return array_values($this->values);\n\n }", "static public function getAll()\r\n {\r\n return self::$values;\r\n }", "public function getValues(): array\n {\n return $this->getEntityDao()->getValues();\n }", "public function getAllValues();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function values(): array\n {\n return array_values($this->storage);\n }", "abstract public function values(): Seq;", "public static function getRequiredValues():array {\n\n # Declare result\n $result = [];\n\n # Return result\n return $result;\n\n }", "public static function toArray(): array\n {\n return self::getConstants();\n }", "public function values() {\n\t\treturn array_values($this->toArray());\n\t}", "private function ToArray()\n {\n $array = [];\n foreach($this as $k => $v)\n {\n $array[$k] = $v;\n }\n return $array;\n }", "public function all()\n\t{\n\t\treturn $this->getArray();\n\t}", "public function getAll()\n {\n return $this->values;\n }", "public function getAll()\n {\n return $this->values;\n }", "public function toArray(): array\n {\n // Collects a list of usable Attributes from the Value Object.\n $fields = $this->filterSystemControlFields(\n \\get_object_vars($this)\n );\n\n // Converts all objects into primitives.\n return $this->convertIntoPrimitiveValues($fields);\n }", "public static function values()\n {\n return self::$values;\n }", "public function intoArrays()\n {\n return self::arraysOf($this);\n }", "public function getAll(): array\n {\n return $this->localValues;\n }", "public function values(): array\n\t{\n\t\treturn $this->fields()->values()->all();\n\t}", "public function ToArray()\n {\n $result = array();\n $option = $this->TopMost();\n while ($option)\n {\n $result[$option->GetValue()] = $option->GetText();\n $option = $this->NextOf($option);\n }\n return $result;\n \n }", "public function to_array()\n {\n $arr = array();\n foreach($this->vector as $comp)\n {\n array_push($arr, $comp);\n }\n return $arr;\n }", "public function getValues() {}", "public function getValues() {}", "public function getAsArray(): array\n {\n return \\GuzzleHttp\\json_decode(\\GuzzleHttp\\json_encode($this->values), true);\n }", "function getArrayCampos() {\n\t\t$arr = array(\n\t\t\t\"id\"=>$this->id,\n\t\t\t\"idov\"=>$this->idov,\n\t\t\t\"idseccion\"=>$this->idseccion,\n\t\t\t\"idrecurso\"=>$this->idrecurso,\n\t\t\t\"value\"=>$this->value\n\t\t);\n\t\treturn $arr;\n\t}", "public function getArray()\n {\n return iterator_to_array($this->getIterator());\n }", "public function getValues()\n {\n $values = array();\n\n foreach ($this->items as $item) {\n $values[] = $item['value'];\n }\n\n return $values;\n }", "public function getValues()\n {\n return array_values($this->data);\n }", "function toArray()\n {\n $retorno = array();\n foreach ($this as $key => $value) {\n array_push($retorno, $value);\n }\n return $retorno;\n }", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray()\n {\n return [\n 5 => 5,\n 10 => 10,\n 15 => 15,\n 20 => 20,\n 25 => 25\n ];\n }", "final public function getValues()\n {\n return $this->values;\n }", "protected function _getValues()\n {\n $values = $this->getColumn()->getValues();\n return $this->_converter->toFlatArray($values);\n }", "protected function getValueAsArray()\n {\n if(strpos($this->value, '|') > 1){\n $values = array_filter(explode(\"|\", $this->value));\n } else {\n $values = [$this->value];\n }\n return $values;\n }", "final static public function toArray()\n {\n return self::getConstants();\n }", "public function AsArray();", "public function values()\n {\n return $this->values;\n }", "public function values()\n {\n return $this->values;\n }", "public function values()\n {\n return $this->values;\n }" ]
[ "0.78824615", "0.7841605", "0.7832911", "0.7832911", "0.77369124", "0.77366287", "0.76764554", "0.7618575", "0.7567863", "0.7437732", "0.7410739", "0.73988205", "0.737462", "0.73731947", "0.7359006", "0.7326601", "0.7315242", "0.7305766", "0.7305766", "0.7263677", "0.7240095", "0.721181", "0.71852446", "0.7140189", "0.7130715", "0.7130715", "0.710331", "0.71023965", "0.7096529", "0.7091092", "0.7035767", "0.70007443", "0.69858384", "0.69823724", "0.69727415", "0.69494396", "0.6930331", "0.6891787", "0.6890642", "0.6890642", "0.6890642", "0.6890642", "0.6890642", "0.6890642", "0.6890048", "0.68799454", "0.6867213", "0.6860817", "0.68524766", "0.6851043", "0.6843546", "0.6840625", "0.6840625", "0.68379134", "0.6834414", "0.6830815", "0.68248296", "0.68199146", "0.6812369", "0.6804164", "0.679285", "0.679285", "0.6788838", "0.67883784", "0.6783896", "0.6782133", "0.6781668", "0.67779636", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.67645884", "0.6748537", "0.6742875", "0.67408884", "0.67384726", "0.6738328", "0.67358154", "0.6720208", "0.6720208", "0.6720208" ]
0.0
-1
Get discussion of user clicked post.
public function get($post_id) { $this->authenticate(); $discussion_list = $this->discussion->get_diss_by_postid($post_id); if (!is_null($discussion_list)) { exit(json_encode([ 'flg' => TRUE, 'msg' => $discussion_list, 'cu' => $this->session->userdata(Constant::SESSION_USSID) ])); } else { exit(json_encode([ 'flg' => FALSE ])); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDiscussion(): Discussion\n {\n return $this->discussion;\n }", "function thediscussion() {\n\tglobal $discussions_index, $discussion, $discussions, $discussion_title;\n\t$discussion = $discussions[$discussions_index - 1];\n\treturn $discussion;\n}", "public function getParentRelationship()\n {\n return auth()->user()->ministryDiscussions();\n }", "function postDiscussionReply()\n\t{\n\t\t//init variable\n\t\t$mainframe = JFactory::getApplication();\n\t\t$log_user = $this->plugin->get('user')->id;\n\t\t// Load the discussion\n\t\t$discuss_id \t= $mainframe->input->get('discussion_id',0,'INT');\n\t\t$groupId \t= $mainframe->input->get('group_id',0,'INT');\n\t\t$content \t= $mainframe->input->get('content','','RAW');\n\t\t\n\t\t$content = str_replace('<p>','',$content);\n\t\t$content = str_replace('</p>','',$content);\n\t\t$content = str_replace('<','[',$content);\n\t\t$content = str_replace('>',']',$content);\n\t\t\n\t\t$wres = new stdClass;\n\t\t\n\t\t$discussion = FD::table( 'Discussion' );\n\t\t$discussion->load( $discuss_id );\n\t\t\n\t\t// Get the current logged in user.\n\t\t$my\t\t= FD::user($log_user);\n\n\t\t// Get the group\n\t\t$group\t\t= FD::group( $groupId );\n\t\t\n\t\t$reply \t\t\t\t= FD::table( 'Discussion' );\n\t\t$reply->uid \t\t= $discussion->uid;\n\t\t$reply->type \t\t= $discussion->type;\n\t\t$reply->content \t= $content;\n\t\t$reply->created_by \t= $log_user;\n\t\t$reply->parent_id \t= $discussion->id;\n\t\t$reply->state \t\t= SOCIAL_STATE_PUBLISHED;\n\n\t\t// Save the reply.\n\t\t$state = $reply->store();\n\t\t\n\t\tif($state)\n\t\t{\t\n\t\t\t$this->createStream($discussion,$group,$reply,$log_user);\n\t\t\t$wres->id = $discussion->id;\n\t\t\t$wres->message[] = JText::_( 'PLG_API_EASYSOCIAL_DISCUSSION_REPLY_MESSAGE' );\n\t\t\treturn $wres;\n\t\t}\n\t}", "public function getPostedComment() {\n\t\treturn $this->postedComment; \n\t}", "protected static function discussionAction($ajax) {\n\t\tglobal $db, $user;\n\t\tif(isset($_GET['discussion']) && $discid = +$_GET['discussion'])\n\t\t\tif($replies = $db->query('select r.id, r.posted, r.user as canchange, u.username, u.displayname, u.avatar, case u.level when 1 then \\'new\\' when 2 then \\'known\\' when 3 then \\'trusted\\' when 4 then \\'admin\\' else null end as level, f.fan as friend, r.name, r.contacturl, r.markdown, r.html, group_concat(concat(e.posted, \\'\\t\\', eu.username, \\'\\t\\', eu.displayname) order by e.posted separator \\'\\n\\') as edits from forum_replies as r left join users as u on u.id=r.user left join users_friends as f on f.friend=r.user and f.fan=\\'' . +$user->ID . '\\' left join forum_edits as e on e.reply=r.id left join users as eu on eu.id=e.editor where r.discussion=\\'' . +$discid . '\\' group by r.id order by r.posted')) {\n\t\t\t\t$ajax->Data->replies = [];\n\t\t\t\twhile($reply = $replies->fetch_object()) {\n\t\t\t\t\t$reply->posted = t7format::TimeTag(t7format::DATE_LONG, $reply->posted);\n\t\t\t\t\tif(!$user->IsLoggedIn() && substr($reply->contacturl, 0, 7) == 'mailto:')\n\t\t\t\t\t\t$reply->contacturl = '';\n\t\t\t\t\t$reply->canchange = $user->IsLoggedIn() && ($reply->canchange == $user->ID && $reply->markdown || $user->IsAdmin());\n\t\t\t\t\tif($reply->edits) {\n\t\t\t\t\t\t$edits = [];\n\t\t\t\t\t\tforeach(explode(\"\\n\", $reply->edits) as $e) {\n\t\t\t\t\t\t\tlist($posted, $username, $display) = explode(\"\\t\", $e);\n\t\t\t\t\t\t\t$edits[] = ['datetime' => $posted, 'posted' => strtolower(t7format::LocalDate(t7format::DATE_LONG, $posted)), 'username' => $username, 'displayname' => $display];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$reply->edits = $edits;\n\t\t\t\t\t} else\n\t\t\t\t\t\t$reply->edits = [];\n\t\t\t\t\tif(!$reply->canchange)\n\t\t\t\t\t\tunset($reply->markdown);\n\t\t\t\t\telseif(!$reply->markdown && $user->IsAdmin())\n\t\t\t\t\t\t$reply->markdown = $reply->html;\n\t\t\t\t\tif($reply->avatar === '')\n\t\t\t\t\t\t$reply->avatar = t7user::DEFAULT_AVATAR;\n\t\t\t\t\t$ajax->Data->replies[] = $reply;\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\t$ajax->Fail('database error looking up discussion detail', $db->errno . ' ' . $db->error);\n\t\telse\n\t\t\t$ajax->Fail('discussion is required');\n\t}", "public function post()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\Post', 'post_id', 'comment_id');\n\t}", "public function get_post( $user_id, $post_id ) {\n \n $this->db->select('*');\n $this->db->from($this->table);\n $this->db->where(['user_id' => $user_id, 'post_id' => $post_id]);\n $query = $this->db->get();\n \n if ( $query->num_rows() > 0 ) {\n \n $result = $query->result();\n $sent = \"\";\n \n // Update view with 0\n $this->db->where('post_id', $post_id);\n $this->db->update($this->table, ['view' => 0]);\n \n // Get history of published post on social networks\n if ( $this->sentnetworkmess($post_id) ) {\n \n $sent = $this->sentnetworkmess($post_id);\n \n }\n \n return array(\n 'post_id' => $result[0]->post_id,\n 'user_id' => $result[0]->user_id,\n 'body' => $result[0]->body,\n 'title' => $result[0]->title,\n 'category' => $result[0]->category,\n 'url' => $result[0]->url,\n 'img' => $result[0]->img,\n 'video' => $result[0]->video,\n 'status' => $result[0]->status,\n 'sent' => $sent,\n 'time' => $result[0]->sent_time,\n 'current' => time(),\n 'parent' => $result[0]->parent\n );\n \n } else {\n \n return false;\n \n }\n \n }", "private function get_current_post() {\n\n\t\tstatic $post;\n\n\t\treturn isset( $post ) ? $post : $post = \\get_post( $this->get_current_id() );\n\t}", "public function the_post() {\r\n\t\treturn $this->query->the_post();\r\n\t}", "function viewDiscussionAnswerByDiscussionId($connection,$discussionId){\n $query = \"SELECT fpr.*,fpd.discussion_title FROM forum_personal_reply fpr LEFT JOIN forum_personal_discussion fpd on fpr.discuss_id=fpd.discussion_id WHERE fpr.discuss_id='$discussionId' \";\n $result = $connection->query($query);\n return $result;\n }", "function getPostOfUser($idUser)\n {\n }", "public function post(){\n // will go to post table and look for user_id automatically if want to specify different column then can specify as a second param in hasOne\n // get post by this user\n return $this->hasOne('cms\\Post');\n }", "public function getPost()\n {\n return $this->hasOne(Post::className(), ['id' => 'post_id']);\n }", "public function getPost(TextPost $post){\n if(Auth::user()->can('view', $post)) {\n $comments = $post->comments;\n return view('text.post', ['post' => $post, 'comments' => $comments]);\n }\n return redirect('subscription');\n }", "public function guestPost()\n {\n return $this->postDao->guestPost();\n }", "public function getCommentSubmission() {\n\t\treturn ($this->commentSubmission);\n\t}", "public function getPost(): Post\n {\n return $this->post;\n }", "function getSingleAnswersByDiscussionId($connection,$discussionId){\n $query = \"SELECT * FROM forum_personal_reply WHERE discuss_id='$discussionId' \";\n $result = $connection->query($query);\n return $result;\n }", "public function getPost()\n {\n return $this->hasOne(PostForm::className(), ['_id' => 'post_id']);\n }", "function apoc_get_group_reply_info() {\n\n\tglobal $bp;\n\t$slug = $bp->action_variables[1];\n\t\n\tglobal $wpdb;\n\t$topic = $wpdb->get_row( \n\t\t$wpdb->prepare( \n\t\t\t\"SELECT post_title AS title, post_name AS url\n\t\t\tFROM $wpdb->posts \n\t\t\tWHERE ID = ( \n\t\t\t\tSELECT post_parent\n\t\t\t\tFROM $wpdb->posts\n\t\t\t\tWHERE post_name = %s )\",\n\t\t\t$slug )\n\t\t);\n\t\t\n\treturn( $topic );\n}", "public function getPost()\n {\n return $this->hasOne(Posts::className(), ['id' => 'post_id']);\n }", "public function get_users_comments_data($discussionid = \"\")\n\t{\n\t\t$result = $this->db->from(\"discussion\")->where(array(\"discussion_id\" => $discussionid))->join(\"deals\",\"deals.deal_id\",\"discussion.deal_id\")->limit(1)->get();\n\t\treturn $result;\n\t}", "public function getPost()\n {\n return $this->post;\n }", "public function get_post() {\n\n return $this->_post;\n }", "public function render(Tx_Dialog_Domain_Model_Post $post = NULL, Tx_Dialog_Domain_Model_Thread $thread = NULL, Tx_Dialog_Domain_Model_Discussion $discussion = NULL) {\n\t\tif (!$post && !$thread && !$discussion) {\n\t\t\tthrow new Exception('The \"isNew\" ViewHelper requires at least one of post, thread or discussion arguments present. None were found.', 1356715073);\n\t\t}\n\t\t$key = 'tx_dialog_discussion_recency';\n\t\t$storage = isset($_SESSION[$key]) ? $_SESSION[$key] : array('timestamp' => time(), 'posts' => array());\n\t\t$isContainedInStorage = FALSE;\n\t\t$dateTime = NULL;\n\t\tif ($post) {\n\t\t\t$dateTime = $post->getCrdate();\n\t\t\t$postUid = $post->getUid();\n\t\t\t$isContainedInStorage = in_array($postUid, $storage['posts']);\n\t\t\tif (!$isContainedInStorage) {\n\t\t\t\tif (!isset($_SESSION[$key]['posts'])) {\n\t\t\t\t\t$_SESSION[$key]['posts'] = array();\n\t\t\t\t}\n\t\t\t\tarray_push($_SESSION[$key]['posts'], $postUid);\n\t\t\t}\n\t\t} elseif ($thread) {\n\t\t\t$dateTime = $thread->getLastActivity();\n\t\t} elseif ($discussion) {\n\t\t\t$dateTime = $discussion->getLastActivity();\n\t\t}\n\t\tif ($dateTime) {\n\t\t\t$timestamp = $dateTime->getTimestamp();\n\t\t} else {\n\t\t\t\t// note: this case causes no Post, Thread or Discusssion to be marked as \"new\"\n\t\t\t\t// because it was impossible to retrieve a proper DateTime indicating last change.\n\t\t\t$timestamp = 0;\n\t\t}\n\t\t$isMoreRecentThanLastVisit = ($timestamp > $storage['timestamp']);\n\t\tif (!$isContainedInStorage && $isMoreRecentThanLastVisit) {\n\t\t\treturn $this->renderThenChild();\n\t\t}\n\t\treturn $this->renderElseChild();\n\t}", "public function getUserPostComment($user_id)\n {\n return Comment::find()->with('user')->with('post')->where(['user_id' => $user_id,'status' => '1','parent_comment_id'=>'0'])->orderBy(['created_date'=>SORT_DESC])->all();\n \n }", "public function getPostedByUser() {\n $this->load->model(\"Users_model\");\n return Users_model::LoadById($this->posted_by);\n }", "public function getReplyPost();", "public function discussions()\n {\n\n return $this->hasMany('App\\Discussion','channel_id');\n }", "function getDiscussionReply()\n\t{\n\t\t//init variable\n\t\t$mainframe = JFactory::getApplication();\n\t\t\n\t\t$group_id = $mainframe->input->get('group_id',0,'INT');\n\t\t$discussId = $mainframe->input->get('discussion_id',0,'INT');\n\t\t$limit = $mainframe->input->get('limit',10,'INT');\n\t\t$limitstart = $mainframe->input->get('limitstart',0,'INT');\t\n\t\t$wres = new stdClass;\n\t\t$valid = 0;\n\n\t\tif(!$group_id)\n\t\t{\n\t\t\t$wres->status = 0;\n\t\t\t$wres->message[] = JText::_( 'PLG_API_EASYSOCIAL_EMPTY_GROUP_ID_MESSAGE' );\n\t\t\treturn $wres;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$group \t\t= FD::group( $group_id );\n\t\t\t\t\t\t\n\t\t\t// Get the current filter type\n\t\t\t$filter \t= $mainframe->input->get('filter','all','STRING');\n\t\t\t$options \t= array();\n\n\t\t\tif( $filter == 'unanswered' )\n\t\t\t{\n\t\t\t\t$options[ 'unanswered' ]\t= true;\n\t\t\t}\n\n\t\t\tif( $filter == 'locked' )\n\t\t\t{\n\t\t\t\t$options[ 'locked' ]\t= true;\n\t\t\t}\n\n\t\t\tif( $filter == 'resolved' )\n\t\t\t{\n\t\t\t\t$options[ 'resolved' ]\t= true;\n\t\t\t}\n\t\t\t\n\t\t\t$options[ 'ordering' ] = 'created';\n\t\t\t$mapp = new EasySocialApiMappingHelper();\n\t\t\t\n\t\t\t$model \t\t\t= FD::model( 'Discussions' );\n\t\t\t$reply_rows\t= $model->getReplies( $discussId,$options);\n\t\t\t\n\t\t\tif($discussId)\n\t\t\t{\n\t\t\t\t$disc_dt = new stdClass();\n\t\t\t\t//create discussion details as per request\n\t\t\t\t$discussion = FD::table( 'Discussion' );\n\t\t\t\t$discussion->load( $discussId );\n\t\t\t\t$data_node[] = $discussion; \n\t\t\t\t$data['discussion'] = $mapp->mapItem($data_node,'discussion',$this->plugin->get('user')->id);\n\t\t\t}\n\t\t\t\n\t\t\tif($limitstart)\n\t\t\t{\n\t\t\t\t$reply_rows = array_slice($reply_rows,$limitstart,$limit);\n\t\t\t}\t\t\t\n\t\t\t$data['data'] = $mapp->mapItem($reply_rows,'reply',$this->plugin->get('user')->id);\n\t\t\treturn( $data );\n\t\t}\n\t}", "public function getPostedUser() {\n\t\treturn $this->postedUser;\n\t}", "function get_post_data() {\n\t\tif (empty($this->post)) :\n\t\t\t$this->post = get_post( $this->id );\n\t\tendif;\n\t\t\n\t\treturn $this->post;\n\t}", "public function didUserPressPostComment(){\n\t\t\tif(isset($_POST['comment'])){\n\t\t\t\t\n\t\t\t\treturn $_POST['comment'];\n\t\t\t}\n\t\t\treturn \"\";\n\t\t}", "function getContributionPost($connection,$userId){\n $query = $connection->query(\"SELECT * FROM forum_contribution_post WHERE posted_by = '$userId' \");\n return $query;\n }", "public function getPost()\n {\n if (!$this->hasPost()) {\n $this->setPost(false);\n\n if ($post = $this->registry->registry('wordpress_post')) {\n if ($post->getPostType() === 'page') {\n $this->setPost($post);\n }\n } \n }\n\n return $this->_getData('post');\n }", "public function getOrgPost() {\n $sql = \"SELECT {{op}}.[[title]]\n FROM {{org_posts_users}} {{opu}}\n INNER JOIN {{org_posts}} {{op}} ON {{op}}.[[id]] = {{opu}}.[[org_post_id]]\n WHERE {{opu}}.[[user_id]] = :user_id AND {{op}}.[[status]] = :status_active\";\n $post = \\Yii::$app->db->createCommand($sql, [':user_id' => $this->id, ':status_active' => Status::getActive()])->\n queryScalar();\n return ($post) ? $post : '';\n }", "public function get()\n {\n return $this->object = get_post($this->id);\n }", "public function getThread()\n {\n return $this->hasOne(InboxThread::className(), ['id' => 'thread_id']);\n }", "function the_author() {\n\tglobal $discussion;\n\treturn $discussion['author'];\n}", "public function show(ProjectDiscussion $projectDiscussion)\n {\n //\n }", "public function getPublishComment() \n {\n $select = $this->select()\n ->from($this->_name)\n ->where(\"status =?\", 'publish')\n // ->where(\"blog_id =?\", $commentId)\n ->order(array(\"{$this->_primaryKey} DESC\"));\n\n return $this->returnResultAsAnArray($this->fetchAll($select));\n }", "public function discussion($request, $discu_id){\n $userArray = $this->verify_token($request);\n if ($userArray==false){\n return new Response(401, ['Content-Type' => 'application/json'], json_encode(array(\n \"status\" => \"error\",\n \"message\" => \"Invalid authorized access\"\n )));\n }\n\n $user_id = $userArray[\"id\"];\n\n $discussion = new Discussion();\n $discussion->setId($discu_id);\n\n $messages = $discussion->getMessages();\n\n $messagesJson = array();\n foreach ($messages as $message) {\n $messageArray = array();\n $messageArray[\"type\"] = $message->getType();\n $messageArray[\"msg_text\"] = $message->getMsg_text();\n $link = null;\n if ($messageArray[\"type\"] == \"media\"){\n $link = $message->getMessageMediaLink($messageArray[\"msg_text\"]);\n }\n $messageArray[\"link\"] = $link;\n $messageArray[\"date\"] = $message->getDate_envoi();\n $messageArray[\"user\"] = $message->getUserNecessityArray();\n array_push($messagesJson, $messageArray);\n }\n\n return $this->renderJson(array(\n \"current_user_id\" => $user_id,\n \"messages\" => $messagesJson,\n ));\n }", "function getActivity()\n\t\t{\n\t\t\t$userID = $_POST[\"userID\"];\n\t\t\t$title = \"userPost\";\n\t\t\t$description = $_POST[\"description\"];\n\t\t\t$link = \"\";\n\t\t\t\n\t\t\techo $this->postActivity($userID, $title, $description, $link);\n\t\t}", "public function can_view_discussion($discussion, $userid=0) {\n return true;\n }", "public function getSinglePost($post_id){\n \n \n\t\t\t\t\t\t\t\t$userLoggedIn = $this->user_obj->getUsername();\n\n\n $opened_query = mysqli_query($this->con,\"UPDATE notifications SET opened='yes' WHERE user_to='$userLoggedIn' AND link LIKE '%=$post_id'\");\n\t\t\t\t\t\t\t\t$str = \"\";\n\t\t\t\t\t\t\t\t$data = mysqli_query($this->con,\"SELECT * FROM posts WHERE deleted='no' AND id='$post_id' ORDER BY id DESC\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data_query = $data;\n\t\t\t\t\t\t\t\tif(mysqli_num_rows($data_query)){\n $row = mysqli_fetch_array($data);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$id = $row['id'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$body = $row['body'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$added_by = $row['added_by'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$date_time = $row['date_added'];\n $imagePath = $row['image'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//prepare user_to string so it can be included even if\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//not posted to a user\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($row['user_to'] == \"none\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$user_to = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$user_to_obj = new User($this->con,$row['user_to']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$user_to_name = $user_to_obj->getFirstAndLastName();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$user_to = \"to <a href='\".$row['user_to'].\"'>\".$user_to_name .\"</a>\";\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//check if user who posted ,has ther accocount closed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$added_by_obj = new User($this->con,$added_by);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($added_by_obj->isClosed())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t $user_logged_obj = new User($this->con,$userLoggedIn);\n\t\t\t\t\t\t\t\t\t\t\t if($user_logged_obj->isFriend($added_by)){\n\n \n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t if($userLoggedIn == $added_by)\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t $delete_button = \"<button class='delete_button btn-danger' id='post$id' >X</button>\";\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t \t$delete_button = \"\";\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$user_details_query = mysqli_query($this->con,\"SELECT first_name,last_name,profile_pic FROM users WHERE username='$added_by'\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$user_row = mysqli_fetch_array($user_details_query);\n\t\t\t\t\t\t\t\t\t\t\t $first_name = $user_row['first_name'];\n\t\t\t\t\t\t\t\t\t\t\t $last_name = $user_row['last_name'];\n\t\t\t\t\t\t\t\t\t\t\t $profile_pic= $user_row['profile_pic'];\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t <script > \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfunction toggle<?php echo$id; ?>() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var target = $(event.target);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(!target.is(\"a\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t \tvar element = document.getElementById(\"toggleComment<?php echo $id; ?>\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(element.style.display == \"block\") \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telement.style.display = \"none\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telement.style.display = \"block\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</script>\n\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\t\t\t\t$comments_check = mysqli_query($this->con,\"SELECT * FROM comments WHERE post_id='$id'\");\n\t\t\t\t\t\t\t\t\t\t\t$comments_check_num = mysqli_num_rows($comments_check);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//timeframe\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$date_time_now = date('Y-m-d H:i:s');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$start_date = new DateTime($date_time);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$end_date = new DateTime($date_time_now);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$interval = $start_date->diff($end_date);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($interval->y >= 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($interval == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$time_message = $interval->y .\" year ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$time_message = $interval->y .\" years ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse if($interval-> m >= 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if($interval->d == 0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t$days = \" ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else if($interval->d == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t$days = $interval->d.\" day ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$days = $interval->d.\" days ago\";\n\t\t\t\t\t\t\t\t\t\t\t if($interval->m == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$time_message = $interval->m .\" month \".$days;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$time_message = $interval->m .\" month \".$days;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse if($interval->d >= 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($interval->d == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t $time_message = \" Yesterday\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$time_message = $interval->d.\" days ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse if($interval->h >= 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($interval->h == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t $time_message = $interval->h .\" hour ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$time_message = $interval->h.\" hours ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse if($interval->i >= 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($interval->i == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t $time_message = $interval->i .\" minute ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$time_message = $interval->i.\" minutes ago\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($interval->s <= 30)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t $time_message = \" Just now\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$time_message = $interval->s.\" seconds ago\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t if($imagePath != \"\"){\n\t\t\t\t\t\t\t $imageDiv = \"<div class='postedImage'>\n\t\t\t\t\t\t\t <img src='$imagePath'>\n\t\t\t\t\t\t\t </div>\";\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t\t$imageDiv = \"\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t $str.=\"\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class='status_post' >\n\t\t\t\t\t\t\t\t\t\t\t <div class='post_profile_pic' >\n\t\t\t\t\t\t\t\t\t\t\t <img src='$profile_pic' width=50 >\n\t\t\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t\t <div class='posted_by' >\n\t\t\t\t\t\t\t\t\t\t\t <a href='$added_by'>$first_name $last_name</a> $user_to &nbsp;&nbsp;&nbsp;&nbsp;$time_message\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t \n\n\n\t\t\t\t\t\t\t\t\t\t\t </div>\n\n\t\t\t\t\t\t\t\t\t\t\t <div id='post_body'>\n\t\t\t\t\t\t\t\t\t\t\t $body\n\t\t\t\t\t\t\t\t\t\t\t <br>\n\t\t\t\t\t\t\t\t\t\t\t $imageDiv\n\t\t\t\t\t\t\t\t\t\t\t <br>\n\t\t\t\t\t\t\t\t\t\t\t <br>\n\t\t\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t<div class='newsfeedPostOptions' >\n\t\t\t\t\t\t\t\t\t\t\t<b class='bold_comment' onClick='javascript:toggle$id()'>Comments($comments_check_num)&nbsp;&nbsp;&nbsp;&nbsp;</b>\n\n\t\t\t\t\t\t\t\t\t\t\t<iframe class='like_frame' src='like.php?post_id=$id' scrolling='no'></iframe>\n\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t\t\t <div class='post_comment' id='toggleComment$id' style='display:none;' >\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<iframe src='comment_frame.php?post_id=$id' class='comment_iframe' id='comment_iframe' frameborder='0'></iframe>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t\t <hr>\";//\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t<script >\n\t\t\t\t\t\t\t\t\t\t\t \n\n\n\t\t\t\t\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php\n}\n else{\necho \"<p>You cannot see this post because you are not friend with this users</p>\";\nreturn;\n}\t\t \n}\nelse{\n\techo \"<p>No post found.If you clicked a link.It may be broken</p>\";\nreturn;\n}\n\n\t\t\t\techo $str;\n}", "public function onPostShowing(Post $post)\n {\n $is_viewed_already=(bool) View::where('user_id', \\Auth::id())\n ->where('post_id', $this->id)\n ->first();\n\n $user = auth()->user();\n if($is_viewed_already == false){\n \\Auth::user()->views()->attach($post->id);\n }\n \n /* $unreadNotifications = $user->unreadNotifications;\n foreach ($unreadNotifications as $notifications) {\n $comment = $notifications->data;\n if ($comment['commentable_type'] == 'App\\Post' && $comment['commentable_id'] == $post->id) {\n $notifications->markAsRead();\n }\n }*/\n }", "public function single(Post $post)\n {\n// auth()->loginUsingId(1);\n// if (Gate::allows('show-post',$post)){\n// return $post;\n// }\n// abort(403,'not access');\n\n// authorization services by ACL PostPolicy\n auth()->loginUsingId(1);\n if (Gate::allows('view',$post)){\n return $post;\n }\n abort(403,'not access');\n }", "public function getPosted()\n {\n return $this->posted;\n }", "function cns_get_details_to_show_post($_postdetails, $topic_info, $only_post = false)\n{\n $forum_id = $_postdetails['p_cache_forum_id'];\n\n $primary_group = cns_get_member_primary_group($_postdetails['p_poster']);\n if (is_null($primary_group)) {\n $_postdetails['p_poster'] = db_get_first_id();\n $primary_group = db_get_first_id();\n }\n\n $post = array(\n 'id' => $_postdetails['id'],\n 'topic_id' => $_postdetails['p_topic_id'],\n 'title' => $_postdetails['p_title'],\n 'post' => $_postdetails['message'],\n 'time' => $_postdetails['p_time'],\n 'time_string' => get_timezoned_date($_postdetails['p_time']),\n 'validated' => $_postdetails['p_validated'],\n 'is_emphasised' => $_postdetails['p_is_emphasised'],\n 'poster_username' => $_postdetails['p_poster_name_if_guest'],\n 'poster' => $_postdetails['p_poster'],\n );\n\n $post['has_revisions'] = false;\n if (addon_installed('actionlog')) {\n require_code('revisions_engine_database');\n $revision_engine = new RevisionEngineDatabase(true);\n if ($revision_engine->has_revisions(array('post'), strval($_postdetails['id']))) {\n $post['has_revisions'] = true;\n }\n }\n\n if (array_key_exists('message_comcode', $_postdetails)) {\n $post['message_comcode'] = $_postdetails['message_comcode'];\n }\n\n // Edited?\n if (!is_null($_postdetails['p_last_edit_by'])) {\n $post['last_edit_by'] = $_postdetails['p_last_edit_by'];\n $post['last_edit_time'] = $_postdetails['p_last_edit_time'];\n $post['last_edit_time_string'] = get_timezoned_date($_postdetails['p_last_edit_time']);\n $post['last_edit_by_username'] = $GLOBALS['CNS_DRIVER']->get_username($_postdetails['p_last_edit_by']);\n if ($post['last_edit_by_username'] == '') {\n $post['last_edit_by_username'] = do_lang('UNKNOWN'); // Shouldn't happen, but imported data can be weird\n }\n }\n\n $is_banned = ($GLOBALS['CNS_DRIVER']->get_member_row_field($_postdetails['p_poster'], 'm_is_perm_banned') == 1);\n\n // Find title\n $title = addon_installed('cns_member_titles') ? $GLOBALS['CNS_DRIVER']->get_member_row_field($_postdetails['p_poster'], 'm_title') : '';\n if ($title == '') {\n $title = get_translated_text(cns_get_group_property($primary_group, 'title'), $GLOBALS['FORUM_DB']);\n }\n if ($is_banned) {\n $title = do_lang('BANNED');\n }\n $post['poster_title'] = $title;\n\n // If this isn't guest posted, we can put some member details in\n if ((!is_null($_postdetails['p_poster'])) && ($_postdetails['p_poster'] != $GLOBALS['CNS_DRIVER']->get_guest_id())) {\n if (addon_installed('points')) {\n require_code('points');\n $post['poster_points'] = total_points($_postdetails['p_poster']);\n }\n $post['poster_posts'] = $GLOBALS['CNS_DRIVER']->get_member_row_field($_postdetails['p_poster'], 'm_cache_num_posts');\n $post['poster_highlighted_name'] = $GLOBALS['CNS_DRIVER']->get_member_row_field($_postdetails['p_poster'], 'm_highlighted_name');\n\n // Signature\n if ((($GLOBALS['CNS_DRIVER']->get_member_row_field(get_member(), 'm_views_signatures') == 1) || (get_option('enable_views_sigs_option', true) === '0')) && ($_postdetails['p_skip_sig'] == 0) && (addon_installed('cns_signatures')) && (!$is_banned)) {\n global $SIGNATURES_CACHE;\n if (array_key_exists($_postdetails['p_poster'], $SIGNATURES_CACHE)) {\n $sig = $SIGNATURES_CACHE[$_postdetails['p_poster']];\n } else {\n $member_row = $GLOBALS['CNS_DRIVER']->get_member_row($_postdetails['p_poster']);\n $just_member_row = db_map_restrict($member_row, array('id', 'm_signature'));\n $sig = get_translated_tempcode('f_members', $just_member_row, 'm_signature', $GLOBALS['FORUM_DB']);\n $SIGNATURES_CACHE[$_postdetails['p_poster']] = $sig;\n }\n $post['signature'] = $sig;\n }\n\n // Any custom fields to show?\n $post['custom_fields'] = cns_get_all_custom_fields_match_member(\n $_postdetails['p_poster'], // member\n ((get_member() != $_postdetails['p_poster']) && (!has_privilege(get_member(), 'view_any_profile_field'))) ? 1 : null, // public view\n ((get_member() == $_postdetails['p_poster']) && (!has_privilege(get_member(), 'view_any_profile_field'))) ? 1 : null, // owner view\n null, // owner set\n null, // encrypted\n null, // required\n 1 // show in posts\n );\n\n // Usergroup\n $post['primary_group'] = $primary_group;\n $post['primary_group_name'] = cns_get_group_name($primary_group);\n\n // Find avatar\n $avatar = $GLOBALS['CNS_DRIVER']->get_member_avatar_url($_postdetails['p_poster']);\n if ($avatar != '') {\n $post['poster_avatar'] = $avatar;\n }\n\n // Any warnings?\n if ((has_privilege(get_member(), 'see_warnings')) && (addon_installed('cns_warnings'))) {\n $num_warnings = $GLOBALS['CNS_DRIVER']->get_member_row_field($_postdetails['p_poster'], 'm_cache_warnings');\n $post['poster_num_warnings'] = $num_warnings;\n }\n\n // Join date\n $post['poster_join_date'] = $GLOBALS['CNS_DRIVER']->get_member_row_field($_postdetails['p_poster'], 'm_join_time');\n $post['poster_join_date_string'] = get_timezoned_date($post['poster_join_date']);\n } elseif ($_postdetails['p_poster'] == $GLOBALS['CNS_DRIVER']->get_guest_id()) {\n if ($_postdetails['p_poster_name_if_guest'] == do_lang('SYSTEM')) {\n $post['poster_avatar'] = find_theme_image('cns_default_avatars/system', true);\n $post['poster_title'] = '';\n }\n }\n\n // Do we have any special controls over this post?\n require_code('cns_posts');\n $reason = null;\n $may_edit = cns_may_edit_post_by($_postdetails['id'], $_postdetails['p_time'], $_postdetails['p_poster'], $forum_id, get_member(), $topic_info['t_is_open'] == 0, $reason);\n if ($may_edit || $reason !== null/*Interesting reason, let them find it out when they click*/) {\n $post['may_edit'] = true;\n }\n if (!$only_post) {\n $may_delete = cns_may_delete_post_by($_postdetails['id'], $_postdetails['p_time'], $_postdetails['p_poster'], $forum_id, get_member(), $reason);\n if ($may_delete || $reason !== null/*Interesting reason, let them find it out when they click*/) {\n $post['may_delete'] = true;\n }\n }\n\n // More\n if (has_privilege(get_member(), 'see_ip')) {\n $post['ip_address'] = $_postdetails['p_ip_address'];\n }\n if (!is_null($_postdetails['p_intended_solely_for'])) {\n $post['intended_solely_for'] = $_postdetails['p_intended_solely_for'];\n }\n\n return $post;\n}", "public function post()\n\t{\n\t\treturn $this->belongsTo('App\\Post');\n\t}", "public function getLatestReply(): ?ContentCommentItem {\n\t\t$this->calculateThreadSummary();\n\t\treturn $this->latestReply;\n\t}", "public function post()\n {\n return $this->belongsTo($this->getModel('post'), 'post_id', 'id');\n }", "public function userPostComments()\n {\n // $comments = Auth('user')->user()->comments;\n $comments = Auth::user()->comments;\n return view('frontend.user.comments', compact('comments'));\n }", "public function getConversation()\n {\n return $this->conversation;\n }", "protected static function ShowDocumentation() {\n?>\n\t\t\t<h2 id=postdelete>post delete</h2>\n\t\t\t<p>\n\t\t\t\tdeletes a reply from a discussion. also deletes the discussion if it\n\t\t\t\tonly had one reply.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>id</dt>\n\t\t\t\t<dd>id of the reply to delete</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=getdiscussion>get discussion</h2>\n\t\t\t<p>retrieves a discussion with all of its replies.</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>discussion</dt>\n\t\t\t\t<dd>id of the discussion to look up.</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=getlist>get list</h2>\n\t\t\t<p>\n\t\t\t\tretrieves the lastest forum discussions with most recently replied\n\t\t\t\tfirst.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>tagid</dt>\n\t\t\t\t<dd>specify a tag id to only retrieve discussions with that tag.</dd>\n\t\t\t\t<dt>before</dt>\n\t\t\t\t<dd>specify a timestamp to only return entries before then.</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=getreplies>get replies</h2>\n\t\t\t<p>\n\t\t\t\tget replies newest to oldest without regard for which discussion they\n\t\t\t\tbelong to.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>before</dt>\n\t\t\t\t<dd>if specified, only get replies older than this timestamp.</dd>\n\t\t\t\t<dt>userid</dt>\n\t\t\t\t<dd>if specified, only get replies posted by this user.</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=postreply>post reply</h2>\n\t\t\t<p>\n\t\t\t\tsaves a new reply to the discussion.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>discussion</dt>\n\t\t\t\t<dd>id of discussion being replied to. required.</dd>\n\t\t\t\t<dt>markdown</dt>\n\t\t\t\t<dd>reply content in markdown format. required.</dd>\n\t\t\t\t<dt>authorname</dt>\n\t\t\t\t<dd>\n\t\t\t\t\tname of the reply’s author. ignored if reply comes from a logged-in\n\t\t\t\t\tuser. anonymous if blank or missing and not logged in.\n\t\t\t\t</dd>\n\t\t\t\t<dt>authorcontact</dt>\n\t\t\t\t<dd>\n\t\t\t\t\tcontact url for the reply’s author. ignored if reply comes from a\n\t\t\t\t\tlogged-in user. author name displayed without a link if blank or\n\t\t\t\t\tmissing.\n\t\t\t\t</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=getreplyid>get replyid</h2>\n\t\t\t<p>\n\t\t\t\tretrieves a reply id from the old post id. used to translate links from\n\t\t\t\tthe previous database.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>postid</dt>\n\t\t\t\t<dd>id of the post to translate into a reply id.</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=poststart>post start</h2>\n\t\t\t<p>\n\t\t\t\tstart a new discussion.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>name</dt>\n\t\t\t\t<dd>\n\t\t\t\t\tname of the author. anonymous if blank or not provided. ignored if\n\t\t\t\t\tdiscussion started by a logged-in user.\n\t\t\t\t</dd>\n\t\t\t\t<dt>contact</dt>\n\t\t\t\t<dd>\n\t\t\t\t\tcontact url or e-mail address of the author. no contact link if\n\t\t\t\t\tblank or not provided. ignored if discussion started by a logged-in\n\t\t\t\t\tuser.\n\t\t\t\t</dd>\n\t\t\t\t<dt>title</dt>\n\t\t\t\t<dd>discussion title. required.</dd>\n\t\t\t\t<dt>tags[]</dt>\n\t\t\t\t<dd>\n\t\t\t\t\tlist of tag ids for this discussion. untagged if empty or not\n\t\t\t\t\tpresent.\n\t\t\t\t</dd>\n\t\t\t\t<dt>markdown</dt>\n\t\t\t\t<dd>discussion content in markdown format. required.</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=postupdate>post update</h2>\n\t\t\t<p>\n\t\t\t\tupdates an existing reply. users may only update replies they own.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>id</dt>\n\t\t\t\t<dd>id of the reply to update. required.</dd>\n\t\t\t\t<dt>markdown</dt>\n\t\t\t\t<dd>reply content in markdown format. required.</dd>\n\t\t\t</dl>\n\n<?php\n\t}", "public function viewPostById($post) {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT id, title, content, DATE_FORMAT(creation_date, \\'%d/%m/%Y à %Hh%imin%ss\\') AS creation_date_fr FROM posts WHERE id = ?');\n $req->execute(array($post->getId()));\n\n $postById = $req->fetch();\n\n return $postById;\n }", "public function getCommentPostId() {\n\t\treturn ($this->commentPostId);\n\t}", "function get_post_ID() {\n\t\treturn $this->get_data( 'comment_post_ID' );\n\t}", "function the_category() {\n\tglobal $discussion;\n\treturn $discussion['category'];\n}", "public function getPostUser() {\n\n // Match and map the id of the author ($userId) to a user object\n return UserManager::getUserById($this->userId);\n }", "public static function getLastDiscussions(){\n $sql = \"select * from discussions ORDER BY `id` DESC LIMIT 5\";\n return App::$db->query($sql);\n }", "public function getIdPost()\n {\n return $this->idPost;\n }", "public function show(Post $post)\n {\n return $post;\n }", "public function get_users_comments_data($discussionid = \"\")\n\t{\n\t\t$result = $this->db->from(\"discussion\")->where(array(\"discussion_id\" => $discussionid))->join(\"stores\",\"stores.store_id\",\"discussion.store_id\")->limit(1)->get();\n\t\treturn $result;\n\t}", "public function thread()\n {\n return $this->belongsTo('\\Boxkode\\Forum\\Models\\Thread', 'parent_thread');\n }", "public function getFreshPost(){\n\t\treturn Go_Factory::getDbTable( 'Forum_Model_Post' )->fetchFreshByCategoryId( $this->getId() );\n\t}", "function show_post(\n $post, $thread, $forum, $logged_in_user, $latest_viewed, $n,\n $controls=FORUM_CONTROLS, $filter=true\n) {\n global $country_to_iso3166_2;\n\n $user = BoincUser::lookup_id($post->user);\n BoincForumPrefs::lookup($user);\n if (is_banished($user) && !is_moderator($logged_in_user, $forum)) {\n return;\n }\n\n // If the user no longer exists, skip the post\n //\n if (!$user){\n return;\n }\n\n $config = get_config();\n $no_forum_rating = parse_bool($config, \"no_forum_rating\");\n\n $tokens = \"\";\n $options = get_output_options($logged_in_user);\n\n // check whether the poster is on the list of people to ignore\n //\n $ignore_poster = false;\n if ($logged_in_user){\n $tokens = url_tokens($logged_in_user->authenticator);\n if (is_ignoring($logged_in_user, $user)){\n $ignore_poster = true;\n }\n }\n\n // The creator can edit the post, but only in a specified amount of time\n // (exception: a moderator can edit his/her posts at any time)\n //\n $can_edit = false;\n if ($logged_in_user) {\n if ($user->id == $logged_in_user->id) {\n if (is_moderator($logged_in_user, $forum)) {\n $can_edit = true;\n } else if (can_reply($thread, $forum, $logged_in_user)) {\n $time_limit = $post->timestamp+MAXIMUM_EDIT_TIME;\n $can_edit = time()<$time_limit;\n } else {\n $can_edit = false;\n }\n }\n }\n\n\n // Print the special user lines, if any\n //\n global $special_user_bitfield;\n $fstatus=\"\";\n $keys = array_keys($special_user_bitfield);\n $is_posted_by_special = false;\n for ($i=0; $i<sizeof($special_user_bitfield);$i++) {\n if ($user->prefs && $user->prefs->privilege($keys[$i])) {\n $fstatus.=$special_user_bitfield[$keys[$i]].\"<br>\";\n $is_posted_by_special = true;\n }\n }\n \n // Highlight special users if set in prefs;\n //\n if ($logged_in_user && $logged_in_user->prefs){\n $highlight = $logged_in_user->prefs->highlight_special && $is_posted_by_special;\n } else {\n $highlight = $is_posted_by_special;\n }\n echo \"\n <tr>\n <td class=\\\"leftcol \".($highlight?\"highlighted_\":\"\").\"row$n\\\" rowspan=\\\"3\\\">\n <a name=\\\"$post->id\\\"></a>\n <div class=\\\"authorcol\\\">\n \";\n\n echo user_links($user);\n echo \"<br>\";\n if ($user->create_time > time()-ST_NEW_TIME) $fstatus.=ST_NEW.\"<br>\";\n if ($fstatus) echo \"<font size=\\\"-2\\\">$fstatus</font>\";\n\n echo \"<span class=\\\"authorinfo\\\">\";\n if (!$filter || !$ignore_poster){\n if ($user->prefs && $user->prefs->avatar!=\"\" && (!$logged_in_user || ($logged_in_user->prefs->hide_avatars==false))) {\n echo \"<img class=authorinfo width=\\\"\".AVATAR_WIDTH.\"\\\" height=\\\"\".AVATAR_HEIGHT.\"\\\" src=\\\"\".$user->prefs->avatar.\"\\\" alt=\\\"Avatar\\\"><br>\";\n }\n }\n \n $url = \"pm.php?action=new&amp;userid=\".$user->id;\n $name = $user->name;\n show_button($url, tra(\"Send&nbsp;message\"), tra(\"Send %1 a private message\",$name));\n echo \"<br>\".tra(\"Joined: %1\", gmdate('j M y', $user->create_time)), \"<br>\";\n\n if (!isset($user->nposts)) {\n $user->nposts = BoincPost::count(\"user=$user->id\");\n }\n \n if (function_exists('project_forum_user_info')){\n project_forum_user_info($user);\n } else {\n echo tra(\"Posts: %1\", $user->nposts).\"<br>\";\n // circumvent various forms of identity spoofing\n // by displaying the user id of the poster.\n //\n //echo \"ID: \".$user->id.\"<br>\";\n if (!no_computing()) {\n echo tra(\"Credit: %1\", number_format($user->total_credit)) .\"<br>\";\n echo tra(\"RAC: %1\", number_format($user->expavg_credit)).\"<br>\";\n }\n // to use this feature:\n // - get flags from http://www.famfamfam.com/lab/icons/flags/famfamfam_flag_icons.zip\n // - put the .png's in html/user/flags/\n // - put define(COUNTRY_FLAGS, 1) in your html/project/project.inc\n //\n if (defined(\"COUNTRY_FLAGS\")) {\n if (array_key_exists($user->country, $country_to_iso3166_2)) {\n $code = $country_to_iso3166_2[$user->country];\n echo \"<img class=flag alt=\\\"$user->country\\\" title=\\\"$user->country\\\" src=flags/$code.png><br>\\n\";\n }\n }\n }\n echo \"</span></div></td>\";\n\n echo \"<td class=\\\"postheader\\\">\";\n if ($controls == FORUM_CONTROLS) {\n echo \"<form action=\\\"forum_rate.php?post=\", $post->id, \"\\\" method=\\\"post\\\">\";\n }\n\n if ($logged_in_user && $post->timestamp>$latest_viewed){\n //show_image(NEW_IMAGE, tra(\"You haven't read this message yet\"), tra(\"Unread\"), NEW_IMAGE_HEIGHT);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<i class=\"icon-comment\"></i>\n\t\t\t\t\t\t<?\n\n }\n\n echo \" <a href=\\\"forum_thread.php?id=\".$thread->id.\"&amp;postid=$post->id\\\">\".tra(\"Message %1\", $post->id).\"</a> - \";\n if ($post->hidden) echo \"<font color=red>[\".tra(\"hidden\").\"] </font>\";\n echo tra(\"Posted: %1\", pretty_time_str($post->timestamp)), \" \";\n\n if ($post->parent_post) {\n echo tra(\" - in response to \").\"<a href=\\\"forum_thread.php?id=\".$thread->id.\"&amp;postid=\".$post->parent_post.\"\\\">\".tra(\"Message %1\", $post->parent_post).\"</a>.\";\n }\n if ($can_edit && $controls != NO_CONTROLS) {\n show_button(\"forum_edit.php?id=\".$post->id.\"$tokens\", tra(\"Edit\"), tra(\"Edit this message\"),\"btn btn\");\n }\n if (is_moderator($logged_in_user, $forum)) {\n show_post_moderation_links($config, $logged_in_user, $post, $forum, $tokens);\n }\n if ($post->modified) {\n echo \"<br>\".tra(\"Last modified: %1\", pretty_time_Str($post->modified));\n }\n if ($ignore_poster && $filter){\n echo \"<br>\".tra(\"This post is not shown because the sender is on your 'ignore' list. Click %1here%2 to view this post\",\"<a href=\\\"?id=\".$thread->id.\"&amp;filter=false#\".$post->id.\"\\\">\",\"</a>\");\n }\n if ($controls == FORUM_CONTROLS) {\n echo \"</form>\\n\";\n }\n echo \"</td>\n </tr>\n <tr class=\\\"\".($highlight?\"highlighted_\":\"\").\"row$n\\\">\n <td class=\\\"postbody\\\">\n \";\n\n if (!$filter || !$ignore_poster){\n $posttext = $post->content;\n\n // If the creator of this post has a signature and\n // wants it to be shown for this post AND the logged in\n // user has signatures enabled: show it\n //\n if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)){\n $posttext.=\"\\n____________\\n\".$user->prefs->signature;\n }\n\n $posttext = output_transform($posttext, $options);\n \n echo \"<p>\", $posttext, \"</p>\";\n echo \"</td></tr><tr><td class=\\\"postfooter\\\">ID: \", $post->id;\n if ($no_forum_rating) {\n echo \" | <a href=\\\"forum_report_post.php?post=\".$post->id.\"\\\">\";\n show_image(REPORT_POST_IMAGE, tra(\"Report this post as offensive\"), tra(\"Report as offensive\"), REPORT_POST_IMAGE_HEIGHT);\n echo \"</a>\";\n } else {\n $rating = $post->rating();\n echo \" | \".tra(\"Rating: %1\", $rating).\" | \".tra(\"rate: \").\"\n <a href=\\\"forum_rate.php?post=\".$post->id.\"&amp;choice=p$tokens\\\">\n \";\n //show_image(RATE_POSITIVE_IMAGE, tra(\"Click if you like this message\"), tra(\"Rate +\"), RATE_POSITIVE_IMAGE_HEIGHT);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<i class=\"icon-thumbs-up\"></i>\n\t\t\t\t\t\t<?\n echo \"</a> / <a href=\\\"forum_rate.php?post=\".$post->id.\"&amp;choice=n$tokens\\\">\";\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<i class=\"icon-thumbs-down\"></i>\n\t\t\t\t\t\t<?\n //show_image(RATE_NEGATIVE_IMAGE, tra(\"Click if you don't like this message\"), tra(\"Rate -\"), RATE_NEGATIVE_IMAGE_HEIGHT);\n echo \"</a> <a href=\\\"forum_report_post.php?post=\".$post->id.\"\\\">\";\n //show_image(REPORT_POST_IMAGE, tra(\"Report this post as offensive\"), tra(\"Report as offensive\"), REPORT_POST_IMAGE_HEIGHT);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<i class=\"icon-warning-sign\"></i>\n\t\t\t\t\t\t<?\n echo \"</a>\";\n }\n if (($controls == FORUM_CONTROLS) && (can_reply($thread, $forum, $logged_in_user))) {\n echo \"&nbsp;&nbsp;&nbsp;&nbsp;<div class=\\\"btn-group\\\">\";\n $url = \"forum_reply.php?thread=\" . $thread->id . \"&amp;post=\" . $post->id . \"&amp;no_quote=1#input\";\n show_button($url, tra(\"Reply\"), tra(\"Post a reply to this message\"));\n $url = \"forum_reply.php?thread=\" . $thread->id . \"&amp;post=\" . $post->id . \"#input\";\n show_button($url, tra(\"Quote\"), tra(\"Post a reply by quoting this message\"));\n\t\t\t\t\t\techo \"</div>\";\n }\n echo \"</td></tr>\";\n } else {\n echo \"</td></tr><tr><td class=\\\"postfooter\\\">\";\n }\n //echo \"<tr class=\\\"postseparator\\\"><td colspan=2></td></tr>\";\n}", "public function post()\n {\n return $this->belongsTo(Post::class, 'post_id');\n }", "public function getDiscussions() {\n $comments = $this->getComments();\n $discussions = array();\n\n foreach($comments as $comment) {\n if(!$comment->parentId) {\n $discussions[$comment->id] = array();\n $discussions[$comment->id][] = $comment;\n }\n else {\n $discussions[$comment->parentId][] = $comment;\n }\n }\n\n return $discussions;\n }", "public function post() {\n return $this->belongsTo(Post::class);\n }", "public function post() {\n return $this->belongsTo(Post::class);\n }", "public function getPostSubmission() {\n\t\treturn ($this->postSubmission);\n\t}", "function get_comments_link($post = 0)\n {\n }", "public function getIdPost()\n {\n return $this->id_post;\n }", "public function myPinnedPost()\n {\n return $this->posts()\n ->get()\n ->firstWhere('pinned', 1);\n }", "private function getCommentShell() {\n // if comment author is NULL (not really a normal data condition), then actually fetch the comment and return it\n if ($this->commentAuthorID === null) {\n try {\n return Connect\\SocialQuestionComment::fetch($this->connectObj->ID);\n }\n catch (\\Exception $e) {\n // failure is probably due to testing, so just fall-through\n }\n }\n return parent::getSocialObjectShell('SocialQuestionComment', $this->socialQuestion, $this->commentAuthorID ?: null);\n }", "public function view(User $user, Discussion $discussion)\n {\n $idea = $discussion->$idea;\n return $idea->isMember($user) || $user->isAdmin();\n }", "protected function getDiscussionType() {\n return DiscussionType::load($this->getEntityBundle());\n }", "public function reply_to_post($parent, $author) {\n // Add a post to the discussion.\n $record = (object) [\n 'discussion' => $parent->discussion,\n 'parent' => $parent->id,\n 'userid' => $author->id\n ];\n $post = $this->create_post($record);\n\n return $post;\n }", "public function post()\n {\n \treturn $this->belongsTo(\"Models\\Post\", \"post_id\", \"id\");\n }", "public function getPost($id) {\n $title = 'Blog | Post';\n //dd($id);\n $post = DB::table('post as p')\n ->join('users as u', 'p.users_id', '=', 'u.users_id')\n ->where('p.post_id', $id)\n ->first();\n\n $comments = DB::table('comments as c')\n ->join('users as u','u.users_id','=','c.users_id')\n ->where('c.post_id','=', $id)\n ->orderBy('c.updated_at','desc')\n ->get();\n\n return view('frontend.post', compact('post','comments'));\n }", "public function posts()\n {\n \treturn $this->hasMany(Post::class);\n \t//Con esto podemos acceder a todos los posts de un usuario\n \t//$posts = User::find(1)->comments()->where()->first()\n \t//Para acceder al usuario de un post debemos definir la relacion inversa\n }", "public function show()\n {\n\t\t//$_SESSION['p_id_actual'] = $_GET['id'];\n\n\t\t//If we are on index view posts and want to see one of them, we've got 'id'\n\t\t/* if(isset($_GET['id']))\n\t\t{\n\t\t\t$idToGo = $_GET['id'];\n\t\t}\n\t\t//If\n\t\telseif(!isset($_GET['id']))\n\t\t{\n\t\t\t$idToGo = $_SESSION['p_id_actual'];\n\t\t} */\n\t\t//Montrer un article\n\t\t$post = $this->model->findWithHisAuthor($_GET['id']);\n\t\t//$comments = $this->modelJoinded->findWithHisAuthor($_GET['id']);\n\t\t$totalComments = count($this->modelJoinded->findWithHisAuthor($_GET['id']));\n\t\t$itemPerpage = 5;\n\t\t$totalPages = ceil($totalComments/$itemPerpage); //ceil around superior number\n\t\t\n\t\tif(isset($_GET['page']) AND !empty($_GET['page']) AND $_GET['page'] > 0)\n {\n $_GET['page'] = intval($_GET['page']); //return an entier value\n $currentPage = $_GET['page'];\n }\n else\n {\n $currentPage = 1;\n\t\t}\n\t\t$start = ($currentPage - 1)*$itemPerpage;\n $comments = $this->modelJoinded->countItems($start, $itemPerpage, $_GET['id']);\n\n\t\t//TODO refactoriser la jointure dans le parent\n\t\t$_SESSION['p_id'] = $post->p_id;\n\n\t\t//utilisateur actuellement connecté, pour comparaison utlérieur\n\t\t//$loggedUser = $_SESSION['u_nickname'];\t\t\n\t\t$pageTitle = $post->p_title; //head page (SEO)\n\t\t\n\t\t\n\t\t$description = $post->p_extract; //head page (SEO)\n\n\t\t$author = $post->p_author_name;\n\n\t\t//Enregistré en session l'auteur ça me servira plus tard pour le droit de modification de l'article, même chose pour les commentaires\n\t\t$_SESSION['p_author'] = $post->p_author_name;\n\t\t\t\t\n\t\t//Utiliser compact comme un array\n \\Renderer::render('post/post', compact('pageTitle', 'description', 'post', 'comments', 'author', 'totalPages'));\n\t}", "public function thread() {\n return $this->belongsTo('Thread');\n }", "public function latestReply()\n {\n return $this->hasOne('App\\Models\\Reply', 'id', 'latest_reply_id');\n }", "public function getPostId()\n {\n return $this->postId;\n }", "public function getPost ();", "public function thread()\n {\n return $this->belongsTo('App\\Models\\Thread')->select(['id', 'title']);\n }", "public function getComment()\r\n\t{\r\n\r\n\t\t$answers = SurveyMonkeySurveyAnswer::get()->filter(array(\r\n\t\t\t'AnswerID' => $this->AnswerID,\r\n\t\t\t'SurveyMonkeySurveyResponseID' => $this->SurveyMonkeySurveyResponseID));\r\n\r\n\t\tforeach($answers as $answer) {\r\n\t\t\tif (($answer->getAnswerSection() == $this->getAnswerSection())) {\r\n\t\t\t\treturn $answer->Text;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}", "function ppmess_get_user2($message_id, $post_id, $logged_user){\n\t\n\tglobal $wpdb;\n\t\n\t$query = \"SELECT * FROM {$wpdb->prefix}private_messages WHERE ((sender_id = $logged_user) OR (receiver_id = $logged_user)) \n\t\t\tAND message_parent = 0 AND message_id = $message_id AND post_id = $post_id ORDER BY date_created DESC LIMIT 1\";\n\t$result = $wpdb->get_results( $query, ARRAY_A );\n\t\n\t// Return ID user having conversation\n\tif($wpdb->num_rows > 0){\n\t\t\n\t\tif($result[0]['sender_id'] == $logged_user)\n\t\t\treturn $result[0]['receiver_id'];\n\t\telse\n\t\t\treturn $result[0]['sender_id'];\n\t}\n\telse\n\t\treturn FALSE;\n}", "public function post()\n {\n return $this->belongsTo(Post::class);\n }", "public function post()\n {\n return $this->belongsTo(Post::class);\n }", "function the_content() {\n\tglobal $discussion;\n\treturn Parsedown::instance()->parse($discussion['content']);\n}", "public function getDiscussionsSend($id_user=null){\n // $id_user correspon à l'id de l'utilisateur\n // retourne un tableau de liste de messages envoyes\n $discussions = array();\n $inst_user = new Model_DbTable_User();\n $inst_list = new Model_DbTable_List();\n \n if($id_user > 0){\n $current_user = $this->find($id_user)->current();\n $id_user = $current_user->idUser;\n }else{\n $current_user = $inst_user->getUser();\n $id_user = $current_user->idUser;\n } \n \n $select = $inst_list->select()->where('categorie_idcategories = ?',$this->Category_id);\n $lists = $current_user->findModel_DbTable_ListViaModel_DbTable_UserHasListByUserAndList($select);\n foreach($lists as $list){\n $discussions[$list->idList] = array(\"user\"=>$current_user->idUser,\"count\"=>count($inst_list->getCountItem($list->idList)));\n }\n krsort($discussions);\n return $discussions; \n }", "function ppmess_get_single_commun($message_id, $post_id, $user_logged){\n\t\n\tglobal $wpdb;\n\t\n\t$query = \"SELECT * FROM {$wpdb->prefix}private_messages WHERE message_id = $message_id AND post_id = $post_id AND message_parent = 0 AND ( receiver_id = $user_logged OR sender_id = $user_logged )\";\n\t\n\t$result = $wpdb->get_results( $query, ARRAY_A );\n\t\n\tif( $wpdb->num_rows > 0 )\n\t\treturn $result;\n\telse\n\t\treturn FALSE;\n}", "function show_user_comment() {\n $comment = get_user_comment();\n if ($comments = mysqli_fetch_array($comment)) {\n $com = $comments['comment'];\n return $com;\n }\n }", "public function thread()\n {\n return $this->belongsTo(Thread::class);\n }", "public function thread()\n {\n return $this->belongsTo(Thread::class);\n }", "public function id() { return $this->post->ID; }" ]
[ "0.6718136", "0.6105188", "0.6050049", "0.5946357", "0.5853704", "0.57726634", "0.576964", "0.5721043", "0.5685334", "0.5679551", "0.56379455", "0.5592242", "0.5590112", "0.55869484", "0.55778825", "0.5546754", "0.55459607", "0.55362564", "0.5520714", "0.55119485", "0.5509614", "0.54986817", "0.5493825", "0.54929847", "0.5482003", "0.5472239", "0.5467556", "0.5451297", "0.5445936", "0.5442383", "0.5389538", "0.5366067", "0.53634334", "0.5341142", "0.53187895", "0.53100264", "0.5296107", "0.52819735", "0.52794355", "0.52594095", "0.5242049", "0.5241072", "0.5221416", "0.5215361", "0.5212363", "0.52028966", "0.5202438", "0.51995826", "0.51976526", "0.5193264", "0.51858705", "0.5174318", "0.51679826", "0.5152319", "0.51514894", "0.51460594", "0.513639", "0.5129553", "0.5105727", "0.5104779", "0.50980586", "0.50924766", "0.5075218", "0.5066556", "0.506429", "0.50619054", "0.50535524", "0.50467", "0.50417084", "0.50354093", "0.5031226", "0.5031226", "0.5023317", "0.5015556", "0.50153285", "0.50081915", "0.5004419", "0.49999115", "0.49952385", "0.49937996", "0.49908897", "0.49793494", "0.49787942", "0.49773344", "0.49742797", "0.49733043", "0.49668851", "0.49647185", "0.49593577", "0.4956805", "0.4952635", "0.4950472", "0.4950472", "0.49488598", "0.4947399", "0.49447638", "0.49433762", "0.4941797", "0.4941797", "0.49405143" ]
0.5356786
33
Get all unseen discussions. Use in notification.
public function get_unseen() { $this->authenticate(); $result = $this->discussion->get_unseen_discussions(); if (!is_null($result)) { exit(json_encode([ 'flg' => TRUE, 'msg' => $result ])); } else { exit(json_encode([ 'flg' => FALSE ])); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUnreadMessages(): Collection;", "public static function getLastDiscussions(){\n $sql = \"select * from discussions ORDER BY `id` DESC LIMIT 5\";\n return App::$db->query($sql);\n }", "public function get_list_unread(){\n\n\t\tuser_login_required();\n\n\t\t//Get the list of unread conversations of the user\n\t\t$list_unread_conversations = components()->conversations->get_list_unread(userID);\n\n\t\t//Process the results\n\t\tforeach($list_unread_conversations as $num => $conv)\n\t\t\t$list_unread_conversations[$num] = self::UnreadConversationToAPI($conv);\n\n\t\t//Return result\n\t\treturn $list_unread_conversations;\n\t}", "public function getUnread()\n\t{\n\t\t$msgs = $this->getAllByQuery(\"is_read=?\", [(int) false]);\n\t\t$this->updateQueryTime();\n\t\treturn $msgs;\n\t}", "public function getDiscussionsUnread($id_user=null){\n // $id_user correspon à l'id de l'utilisateur\n // retourne un numerique qui correspond aux nombre de messages non lus\n $inst_user = new Model_DbTable_User();\n $inst_item = new Model_DbTable_Item();\n if($id_user > 0){\n $current_user = $this->find($id_user)->current();\n $id_user = $current_user->idUser;\n }else{\n $current_user = $inst_user->getUser();\n $id_user = $current_user->idUser;\n }\n $messages = $this->fetchAll($this->select()->where(\"state LIKE '%\".$id_user.\",%'\"));\n $list_unread = array();\n foreach($messages as $message){\n $message_obj = $inst_item->find($message['item_idItem'])->current();\n $list_obj = $message_obj->findParentRow(Model_DbTable_List);\n $list_unread[$list_obj->idList] = $list_obj->idList; \n }\n return $list_unread;\n }", "protected function getUnreadConversations() {\n return DB::table('conversations')\n ->join('participants', function($join) {\n $join->on('participants.conversation_id', '=', 'conversations.id')\n ->on('participants.last_read', '<', 'conversations.last_message')\n ->where('participants.user_id', '=', Auth::user()->id);\n })\n ->pluck('conversation_id');\n }", "public function discussions()\n {\n\n return $this->hasMany('App\\Discussion','channel_id');\n }", "function GetUnreadNotifications($uid=false,$last_notification=false){\n\n\t$query_=$last_notification?\" and `id`> {$last_notification}\":\"\";\n\n\t$notifications = NotificationsModel::model()->findAll(\"`to` =\".helpers::uid($uid).$query_.\" and `seen`='0' order by `time` desc\");\n\n\tif($notifications!=NULL){\n\n\t//get user controller\n\t$user_c=Helpers::get_controller(USERS);\n\n\tforeach ($notifications as $k=>$notification){\n\n\t$notifications[$k]->user = $user_c->GetUserById($notification->from);\n\n\n\t}\n\n\n\t}\n\n\n\treturn $notifications==null?array():$notifications;\n\n\t}", "public function getUnseenEmails(): array\n {\n $emails = [];\n\n try {\n $imap = $this->loginToInbox();\n\n // We only want the emails we haven't fetched before.\n foreach ($imap->search(['UNSEEN']) as $id) {\n $data = $imap->fetch(['RFC822.HEADER', 'RFC822.TEXT'], $id);\n\n // We need to combine headers and text in order to have a full email.\n $emails[] = InboundEmail::fromMessage($data['RFC822.HEADER'].\"\\r\\n\".$data['RFC822.TEXT']);\n }\n\n $imap->logout();\n } catch (\\Exception $e) {\n // Just log the error and get on with the method execution.\n $this->logger->error($e->getMessage());\n }\n\n return $emails;\n }", "public function getLatestUnreadNotifications()\n {\n return $this->_notificationList->setPageSize(self::NOTIFICATIONS_NUMBER);\n }", "function getUnsentNotifications($userId) {\n\t\treturn $this->_conn->arrayQuery(\"SELECT id, userid, objectid, type, title, body FROM notifications WHERE userid = :userid AND NOT SENT\",\n array(\n ':userid' => array($userId, PDO::PARAM_INT)\n ));\n\t}", "public function notifications()\n {\n $notifications = $this->get(\"/api/v1/conversations?as_user_id=sis_user_id:mtm49\");\n return $notifications;\n }", "public function getNotOpenedMessagesToFollow()\n {\n // no problem if one message is opened more than one time\n $modifier = Carbon::now()->modify(\"-{$this->getDelayInterval()}\");\n $messages = TrackingLog::select('tracking_logs.*')\n ->leftJoin('open_logs', 'tracking_logs.message_id', '=', 'open_logs.message_id')\n ->join('auto_triggers', 'tracking_logs.auto_trigger_id', '=', 'auto_triggers.id')\n ->join('auto_events', 'auto_triggers.auto_event_id', '=', 'auto_events.id')\n ->where('auto_event_id', $this->previousEvent->id)\n ->whereRaw(sprintf('%s NOT IN (SELECT COALESCE(subscriber_id, 0) FROM %s WHERE auto_event_id = %s)', table('tracking_logs.subscriber_id'), table('auto_triggers'), $this->id))\n ->whereRaw(sprintf('%s IS NULL', table('open_logs.id')))\n ->where('tracking_logs.created_at', '<=', $modifier)\n ->get();\n\n // one message could be opened more than one time\n // @note: use array_uniq_by() helper function for far better performance thant Collection::uniq()\n $unique = array_unique_by($messages, function ($message) {\n return $message->message_id;\n });\n\n return $unique;\n }", "public function getUnsubscribersToFollow()\n {\n return $this->automation->subscribers()\n ->addSelect('unsubscribe_logs.created_at AS unsubscribed_at')\n ->addSelect('tracking_logs.message_id')\n ->join('tracking_logs', 'subscribers.id', '=', 'tracking_logs.subscriber_id')\n ->join('unsubscribe_logs', 'tracking_logs.message_id', '=', 'unsubscribe_logs.message_id')\n ->whereRaw(sprintf(table('subscribers') . '.id NOT IN (SELECT COALESCE(subscriber_id, 0) FROM %s WHERE auto_event_id = %s)', table('auto_triggers'), $this->id))\n ->where('unsubscribe_logs.created_at', '>=', $this->created_at)\n ->get();\n }", "public function getUnreadMessageCollection(){\n if(!$this->_unreadMessageCollection){\n $this->_unreadMessageCollection = $this->_messageFactory->create()->getCollection();\n $this->_unreadMessageCollection->addFieldToFilter('customer_email','')->addFieldToFilter('customer_id',$this->ticketData->getCustomerId())\n ->addFieldToFilter('is_read',0)\n ->setOrder('message_id','DESC')\n ->setPageSize(5); \n }\n \n return $this->_unreadMessageCollection;\n }", "final public function get_notifications() {\r\n\t\tif ($this->user_id) {\r\n\t\t\t$sql = \"SELECT notification_id, message, user_id, type, a_href, read_status, date_notified\r\n\t\t\tFROM `notifications`\r\n\t\t\tWHERE read_status = '\" . NotificationFactory::UNREAD . \"'\";\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t\t$notifications = array();\r\n\t\t\twhile ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {\r\n\t\t\t\t$notification = '<a href=\"' . $row['a_href'] . '\">' . $row['message'] . '</a>';\r\n\t\t\t\tarray_push($notifications, $notification);\r\n\t\t\t}\r\n\t\t\treturn $notifications;\r\n\t\t}\r\n\t}", "function getReceivedIssues() {\n\t\t$i = $this->_query->join('synd_issue','i');\n\t\t$query = clone $this->_query;\n\n\t\t$query->column($this->_grouping->getReceivedKey($this, $query), 'PK');\n\t\t$query->column(\"COUNT(DISTINCT $i.node_id)\", 'ISSUES');\n\t\t$query->groupBy($this->_grouping->getReceivedKey($this, $query));\n\t\t\n\t\t$sql = $query->toString();\n\t\t$rows = $this->_db->getAssoc($sql);\n\t\treturn $this->_grouping->filter($rows);\n\t}", "public function unread()\n {\n request()->user()->readNotifications()->update(['read_at' => null]);\n\n return response()->json(request()->user()->notifications);\n }", "public function unread()\n {\n return $this->unseen();\n }", "public function getUnsentNotifications() {\n return $this->hasMany(NotificationEmployer::className(), ['employer_id' => 'employer_id'])\n ->with(['job', 'student'])\n ->where(['notification_sent' => NotificationEmployer::SENT_FALSE])\n ->orderBy(\"notification_datetime DESC\");\n }", "public function getDiscussions($id_user=null){\n // $id_user correspon à l'id de l'utilisateur\n // retourne un tableau de liste de messages recus\n $discussions = array();\n $inst_user = new Model_DbTable_User();\n $inst_list = new Model_DbTable_List();\n \n if($id_user > 0){\n $current_user = $this->find($id_user)->current();\n $id_user = $current_user->idUser;\n }else{\n $current_user = $inst_user->getUser();\n $id_user = $current_user->idUser;\n } \n \n $select = $inst_list->select()->where('categorie_idcategories = ?',$this->Category_id);\n $lists = $current_user->findModel_DbTable_ListViaModel_DbTable_UserHasListByUserAndList($select);\n foreach($lists as $list){\n $discussions[$list->idList] = array(\"user\"=>$current_user->idUser,\"count\"=>count($inst_list->getCountItem($list->idList)));\n }\n \n foreach($this->fetchAll($this->select()->where(\"recipients_id LIKE '%\".$id_user.\",%'\")) as $message){\n $inst_item = new Model_DbTable_Item();\n $inst_list = new Model_DbTable_List();\n $current_item = $inst_item->find($message[\"item_idItem\"])->current();\n $current_list = $inst_list->find($current_item->list_idList)->current();\n $list_user = $current_list->findModel_DbTable_UserViaModel_DbTable_UserHasListByListAndUser()->current(); \n $other_user = $inst_user->find($list_user->idUser)->current(); \n $discussions[$current_item->list_idList] = array(\"user\"=>$other_user->idUser,\"count\"=>count($inst_list->getCountItem($current_item->list_idList)));\n }\n krsort($discussions);\n return $discussions; \n }", "public function unseenReviews($itemId)\n\t{\n\t\treturn $this->review->where('item_id', $itemId)->where('status', 'unseen')->get();\n\t}", "public function getUnread()\n {\n if(Session::has('prac_id'))\n {\n $viewer = Practitioner::find(Session::get('prac_id'));\n }\n elseif(Auth::check())\n {\n $viewer = User::find(Auth::user()->id);\n }\n\n $unreadcount = Message::latest('created_at')->GetConversationReceiver($viewer->email)\n ->GetUnreadMessages()->distinct()->lists('conv_id');\n\n if(count($unreadcount) < 1)\n {\n return null;\n }\n else\n { \n return $unreadcount;\n }\n\n }", "public function getNotClickedMessagesToFollow()\n {\n // no problem if one message is opened more than one time\n $modifier = Carbon::now()->modify(\"-{$this->getDelayInterval()}\");\n $messages = TrackingLog::select('tracking_logs.*')\n ->leftJoin('click_logs', 'tracking_logs.message_id', '=', 'click_logs.message_id')\n ->join('auto_triggers', 'tracking_logs.auto_trigger_id', '=', 'auto_triggers.id')\n ->join('auto_events', 'auto_triggers.auto_event_id', '=', 'auto_events.id')\n ->where('auto_event_id', $this->previousEvent->id)\n ->whereRaw(sprintf('%s NOT IN (SELECT COALESCE(subscriber_id, 0) FROM %s WHERE auto_event_id = %s)', table('tracking_logs.subscriber_id'), table('auto_triggers'), $this->id))\n ->whereRaw(sprintf('%s IS NULL', table('click_logs.id')))\n ->where('tracking_logs.created_at', '<=', $modifier)\n ->get();\n\n // one message could be clicked more than one time\n // @note: use array_uniq_by() helper function for far better performance thant Collection::uniq()\n $unique = array_unique_by($messages, function ($message) {\n return $message->message_id;\n });\n\n return $unique;\n }", "public function All () {\n\t\t$messages = DB::select(\"\n\t\t\tselect max(a.created_at) as date, max(a.id) as id, projects.name,\n\t\t\t(select message from messages where created_at = max(a.created_at) AND id = max(a.id)) message,\n\t\t\t(select seen from messages where created_at = max(a.created_at) AND id = max(a.id)) seen,\n\t\t\t(select messages.from from messages where created_at = max(a.created_at) AND id = max(a.id)) as sender,\n\t\t\t(select messages.project_id from messages where created_at = max(a.created_at) AND id = max(a.id)) as project_id,\n\t\t\t(select messages.type from messages where created_at = max(a.created_at) AND id = max(a.id)) as type\n\t\t\tfrom messages a join projects ON projects.id = a.project_id\n\t\t\tWHERE a.to = \".Auth::user()->id.\" OR a.from = \".Auth::user()->id.\"\n\t\t\tgroup by projects.name ORDER BY id DESC\");\n\n\t\t$seen = collect($messages)->pluck('seen');\n\t\t$unseen = array_diff($seen->all(), array(1));\n\t\treturn array(\"messages\" => $messages, \"unseen\" => $unseen);\n\t}", "public function fetchAllMessages()\n {\n return Chat::with('user')->get();\n }", "public function getDiscussions() {\n $comments = $this->getComments();\n $discussions = array();\n\n foreach($comments as $comment) {\n if(!$comment->parentId) {\n $discussions[$comment->id] = array();\n $discussions[$comment->id][] = $comment;\n }\n else {\n $discussions[$comment->parentId][] = $comment;\n }\n }\n\n return $discussions;\n }", "public function getDiscussionsSend($id_user=null){\n // $id_user correspon à l'id de l'utilisateur\n // retourne un tableau de liste de messages envoyes\n $discussions = array();\n $inst_user = new Model_DbTable_User();\n $inst_list = new Model_DbTable_List();\n \n if($id_user > 0){\n $current_user = $this->find($id_user)->current();\n $id_user = $current_user->idUser;\n }else{\n $current_user = $inst_user->getUser();\n $id_user = $current_user->idUser;\n } \n \n $select = $inst_list->select()->where('categorie_idcategories = ?',$this->Category_id);\n $lists = $current_user->findModel_DbTable_ListViaModel_DbTable_UserHasListByUserAndList($select);\n foreach($lists as $list){\n $discussions[$list->idList] = array(\"user\"=>$current_user->idUser,\"count\"=>count($inst_list->getCountItem($list->idList)));\n }\n krsort($discussions);\n return $discussions; \n }", "public static function get_unsubscribable_reactforums() {\n global $USER, $DB;\n\n // Get courses that $USER is enrolled in and can see.\n $courses = enrol_get_my_courses();\n if (empty($courses)) {\n return array();\n }\n\n $courseids = array();\n foreach($courses as $course) {\n $courseids[] = $course->id;\n }\n list($coursesql, $courseparams) = $DB->get_in_or_equal($courseids, SQL_PARAMS_NAMED, 'c');\n\n // Get all reactforums from the user's courses that they are subscribed to and which are not set to forced.\n // It is possible for users to be subscribed to a reactforum in subscription disallowed mode so they must be listed\n // here so that that can be unsubscribed from.\n $sql = \"SELECT f.id, cm.id as cm, cm.visible, f.course\n FROM {reactforum} f\n JOIN {course_modules} cm ON cm.instance = f.id\n JOIN {modules} m ON m.name = :modulename AND m.id = cm.module\n LEFT JOIN {reactforum_subscriptions} fs ON (fs.reactforum = f.id AND fs.userid = :userid)\n WHERE f.forcesubscribe <> :forcesubscribe\n AND fs.id IS NOT NULL\n AND cm.course\n $coursesql\";\n $params = array_merge($courseparams, array(\n 'modulename'=>'reactforum',\n 'userid' => $USER->id,\n 'forcesubscribe' => REACTFORUM_FORCESUBSCRIBE,\n ));\n $reactforums = $DB->get_recordset_sql($sql, $params);\n\n $unsubscribablereactforums = array();\n foreach($reactforums as $reactforum) {\n if (empty($reactforum->visible)) {\n // The reactforum is hidden - check if the user can view the reactforum.\n $context = \\context_module::instance($reactforum->cm);\n if (!has_capability('moodle/course:viewhiddenactivities', $context)) {\n // The user can't see the hidden reactforum to cannot unsubscribe.\n continue;\n }\n }\n\n $unsubscribablereactforums[] = $reactforum;\n }\n $reactforums->close();\n\n return $unsubscribablereactforums;\n }", "public function allUnreadForUser($userId);", "public function allUnreadForUser($userId);", "function get_all_unmarked() {\n\n global $CFG;\n\n $sql = \"SELECT s.id as subid, s.userid, s.data2, a.course, a.assignmenttype, a.name, a.description, a.id, c.id as cmid\n FROM {$CFG->prefix}assignment a\n INNER JOIN {$CFG->prefix}course_modules c\n ON a.id = c.instance\n INNER JOIN {$CFG->prefix}assignment_submissions s\n ON s.assignment = a.id\n WHERE c.module = {$this->mainobject->modulesettings['assignment']->id}\n AND c.visible = 1\n AND a.course IN ({$this->mainobject->course_ids})\n AND s.timemarked < s.timemodified\n AND NOT (a.resubmit = 0 AND s.timemarked > 0)\n ORDER BY a.id\";\n\n $unmarked = get_records_sql($sql);\n\n // Due to oracle being rubbish, there is no way to put this bit into sql as the data2 field is\n // a CLOB and so cannot be used with any kind of comparison operator.\n // It used to be:\n // AND NOT (a.assignmenttype = 'upload' AND s.data2 != 'submitted'))\n \n\n foreach ($unmarked as $key => $submission) {\n\n if (($submission->data2 != 'submitted') && ($submission->assignmenttype == 'upload')) {\n unset($unmarked[$key]);\n }\n }\n \n\n $this->all_submissions = $unmarked;\n\n return true;\n }", "public function countUnseenNewsItems(){\n return $this->newsModel->countUnseenNewsItems();\n }", "public static function All()\n {\n $result = &get_instance()->db->order_by(\"posted_on\", \"DESC\")->get_where(\"Announcements\", array());\n $ret = array();\n foreach($result->result() as $r)\n $ret[] = Announcement_model::LoadWithData($r);\n return $ret;\n }", "public static function reset_discussion_cache() {\n self::$reactforumdiscussioncache = array();\n self::$discussionfetchedreactforums = array();\n }", "protected function getUnreadInbox(): array\n {\n return $this->unreadInbox;\n }", "public static function getUnassignedTickets() {\n $tickets = Self::where('is_assigned', 0)\n ->where('status_id', 1)\n ->where('is_approved', 1)\n ->where('created_at', '<', Carbon::now()->subMinutes(30)->toDateTimeString())\n ->get();\n\n return $tickets;\n }", "private function listChannels()\n {\n $channels = Auth::guard()->user()->channels->load('users');\n foreach($channels as $channel){\n foreach($channel->users as $key => $user){\n if ($user->id == Auth::guard()->user()->id){\n unset($channel->users[$key]);\n }\n }\n }\n return $channels;\n }", "public function unread()\n {\n return $this->hasMany('App\\ChatMessage',\"chat_id\", \"id\")->where(\"is_read\", 0);\n }", "function getUnreadMessages($nid,$uid)\n\t{\n\t\t$db=JFactory::getDBO();\n\t\t//get all unread messages against current node for this user\n\t\t$query =\"SELECT m.msg_id AS mid,m.from AS fid, m.msg, m.time AS ts\n\t\tFROM #__jbolo_chat_msgs AS m\n\t\tLEFT JOIN #__jbolo_chat_msgs_xref AS mx ON mx.msg_id=m.msg_id\n\t\tWHERE m.to_node_id=\".$nid.\"\n\t\tAND mx.to_user_id =\".$uid.\"\n\t\tAND mx.read = 0\n\t\tORDER BY m.msg_id \";\n\t\t$db->setQuery($query);\n\t\t//$messages = $db->loadAssocList();\n\t\t$messages=$db->loadObjectList();\n\t\t//print_r($messages);\n\t\treturn $messages;\n\t}", "public function getNewsNotCheck()\n {\n $news = $this->_model->where('news_is_check', '=', '0')->get();\n\n return $news;\n }", "public function viaNotificationChannels()\n {\n return UserNotificationChannel::with('notification_channel')->get()->filter(function ($item) {\n return $item->muted_at == null;\n })->pluck('notification_channel.name');\n }", "public function getAll()\n\t{\n\t\t$msgs = Message::findByUser($this->getUser());\n\t\t$this->updateQueryTime();\n\t\treturn $msgs;\n\t}", "public function listDiscussion($request){\n $userArray = $this->verify_token($request);\n if ($userArray==false){\n return new Response(401, ['Content-Type' => 'application/json'], json_encode(array(\n \"status\" => \"error\",\n \"message\" => \"Invalid authorized access\"\n )));\n }\n\n $user_id = $userArray[\"id\"];\n\n $discussion = new Discussion();\n\n $discussionsArray = $discussion->getDiscussionsFromUserId($user_id);\n\n $discussionsJson = array();\n\n foreach ($discussionsArray as $discussion) {\n $discussionJson = array();\n $discussionJson[\"id\"] = $discussion->getId();\n $discussionJson[\"type\"] = $discussion->getType();\n $discussionJson[\"name\"] = $discussion->getName();\n $discussionJson[\"users\"] = $discussion->getUsersNecessityArray();\n $discussionJson[\"photo_profil\"] = $discussion->getPhoto_profil();\n $discussionJson[\"notseen\"] = $discussion->getNotSeenMessages($user_id);\n $discussionJson[\"last_message\"] = $discussion->getLast_messageArray();\n $discussionsJson[] = $discussionJson;\n }\n\n return $this->renderJson(array(\n \"current_user_id\" => $user_id,\n \"discussions\" => $discussionsJson,\n ));\n }", "public function _getAbsentGroupMeetings()\n {\n $meetings = [];\n foreach ($this->meetings as $meeting)\n if ($meeting->IsGroupMeeting)\n if ($meeting->_joinData->away_reason !== '')\n $meetings[] = $meeting;\n\n return $meetings;\n }", "public function notifications($organiser_id)\n {\n $organiser = Organiser::scope()->findOrFail($organiser_id);\n return $organiser->unreadNotifications()->limit(10)->get()->toArray();\n }", "protected function unconfirmedSubscriptionList()\n {\n $repository = $this->doctrine->getRepository(NewsletterSubscription::class);\n $subscriptions = $repository->findBy(['isConfirmed' => false]);\n\n return $subscriptions;\n }", "public static function drafts()\n {\n return self::where('published', '=', false)->get();\n }", "public function getAllNotResponded()\n {\n $query = 'select count(attendees.attendeeID) from users right join attendees on users.userID = attendees.userID where users.isRSVP = 0;';\n if ($this->connectedModel->runQuery($query)) //query\n {\n if ($row = $this->connectedModel->getResultsRow())\n return $row[0]; //count()\n }\n else\n {\n return -1;\n }\n }", "public function getAllUnreadEmailsSenders()\n {\n $messages = collect(LaravelGmail::message()->unread()->preload()->all());\n $fromList = [];\n\n $messages->each(function ($message) use (&$fromList) {\n $fromList[] = $message->getFrom();\n });\n\n // TODO: can be optimized\n return $this->getUnreadEmailsList($fromList);\n }", "public function index(){\n\n return view('discussions.index', [\n\n 'discussions' => Discussion::filterByChannels()->paginate(5)\n\n ]);\n }", "public static function prevent_forumngfeature_discussion() {\n return array();\n }", "public function findNotSentToCalendar()\n {\n $sql = <<<SQL\n SELECT s.*, p.title as program_name \n FROM ec_shows s, ec_programs p\n WHERE sent_to_calendar like ''\n AND s.program_id = p.id\nSQL;\n $sqlQuery = new SqlQuery($sql);\n return $this->getList($sqlQuery);\n }", "public function all()\n {\n return $this->onlinetrack->all();\n }", "public function discussions(): MorphToMany\r\n {\r\n return $this->morphToMany(\r\n \\App\\Models\\Discussion::class,\r\n 'model',\r\n 'model_has_discussions',\r\n 'model_id',\r\n 'discussion_id'\r\n );\r\n }", "public static function unwatchedMovies()\n {\n return self::where('user_id', Auth::id())\n ->where('watched', 0)\n ->orderBy('created_at', 'desc')\n ->limit(UserMovie::LIMIT)\n ->get();\n }", "public function getUnreadVoicemail()\n {\n return $this->_getAndParse($this->_serverPath['voicemail'], false);\n\t}", "function get_all_course_unmarked($courseid) {\n\n global $CFG;\n $unmarked = '';\n $student_sql = $this->get_role_users_sql($this->mainobject->courses[$courseid]->context);\n\n $sql = \"SELECT s.id as subid, s.userid, s.data2, a.id, a.name, a.assignmenttype,\n a.course, a.description, a.assignmenttype, c.id as cmid\n FROM {$CFG->prefix}assignment a\n INNER JOIN {$CFG->prefix}course_modules c\n ON a.id = c.instance\n INNER JOIN {$CFG->prefix}assignment_submissions s\n ON s.assignment = a.id\n\n WHERE c.module = {$this->mainobject->modulesettings['assignment']->id}\n AND c.visible = 1\n AND (s.userid IN ({$student_sql}))\n AND a.course = $courseid\n AND s.timemarked < s.timemodified\n AND NOT (a.resubmit = 0 AND s.timemarked > 0)\n\n ORDER BY a.id\";\n\n $unmarked = get_records_sql($sql);\n\n foreach ($unmarked as $key => $submission) {\n\n if (($submission->data2 != 'submitted') && ($submission->assignmenttype == 'upload')) {\n unset($unmarked[$key]);\n }\n }\n \n\n return $unmarked;\n }", "public function index()\n {\n session(['header_text' => 'Messages']);\n \n $message = Message::where('user_id', '!=', Auth::user()->id)->get();\n $notification = 0; \n foreach($message as $notif){\n\n $ids = collect(json_decode($notif->seen, true))->pluck('id');\n if(!$ids->contains(Auth::user()->id)){\n $notification++;\n }\n }\n $notification = 0; \n return view('message.index', compact('notification'));\n }", "public function listNotifications()\r\n { \t \r\n \r\n \t$data = $this->call(array(), \"GET\", \"notifications.json\");\r\n \t$data = $data->{'notifications'};\r\n \t$notificationArray = new ArrayObject();\r\n \tfor($i = 0; $i<count($data);$i++){\r\n \t\t$notificationArray->append(new Notification($data[$i], $this));\r\n \t}\r\n \treturn $notificationArray;\r\n }", "public function getUnreadEnquiries()\r\n\t\t{\r\n\t\t\tContact::SetQuery($name, $email, $subject, $message);\r\n\t\t}", "public function getNotificationsCollection()\n {\n return Mage::getModel('kdcatalogupdates/log')->getCollection();\n }", "public function getManyNotPublished(QueryBuilder $builder)\n {\n return $this->getManyNotPublishedFrom(Content::query()->with('type'), $builder);\n }", "public function index()\n {\n $discussions = Discussion::filterByChannels()->paginate(10);\n return view('discussion.index', compact('discussions'));\n }", "function GetNotifications($uid=false,$last_notification=false){\n\n\t$query_=$last_notification?\" and `id`> {$last_notification}\":\"\";\n\n\t$notifications = NotificationsModel::model()->findAll(\"`to` =\".helpers::uid($uid).$query_.\" order by `time` desc limit 10\");\n\n\tif($notifications!=NULL){\n\n\t//get user controller\n\t$user_c=Helpers::get_controller(USERS);\n\n\tforeach ($notifications as $k=>$notification){\n\n\t$notifications[$k]->user = $user_c->GetUserById($notification->from);\n\n\t}\n\n\n\t}\n\n\n\treturn $notifications==null?array():$notifications;\n\n\t}", "public function getNotifications()\n {\n return $this->_notifications;\n }", "public function getMessages()\n\t{\n\t\t$messages = Message::orderBy( 'created_at', 'asc' )->get();\n\t\treturn $messages;\n\t}", "public function findAllNew()\n {\n return $this->createQueryBuilder()\n ->field('feeditems')->size(0)\n ->eagerCursor(true)\n ->getQuery()\n ->execute();\n }", "public function getUnpublished()\n {\n $userManager = new UserManager;\n $infoUser = $userManager->getInfo($_SESSION['id_user']);\n if ($_SESSION['id_user'] == $infoUser['id'] and $infoUser['rank_id'] == 1) {\n if (isset($_GET['id']) && $_GET['id'] > 0) {\n $commentManager = new CommentManager;\n $unpublished = $commentManager->unpublished($_GET['id']);\n header('Location: administration');\n } else {\n throw new Exception('Impossible de trouvé le commentaire');\n }\n } else {\n throw new Exception('Vous n\\'êtes pas autorisé à faire cela');\n }\n }", "function thediscussion() {\n\tglobal $discussions_index, $discussion, $discussions, $discussion_title;\n\t$discussion = $discussions[$discussions_index - 1];\n\treturn $discussion;\n}", "public function getAllUnidadNegocio()\r\n {\r\n $sql = \"SELECT id_unidad_negocio, nombre, url_logo, url_imagen, descripcion FROM tbl_unidad_negocio\";\r\n $query = $this->db->prepare($sql);\r\n\r\n $query->execute();\r\n\r\n return $query->fetchAll();\r\n }", "function get_all_notifications()\n {\n $this->db->order_by('id_notification', 'desc');\n return $this->db->get('notifications')->result_array();\n }", "public function showAllNotifications()\n {\n return view('intern.notifications.allnotifications')\n ->withUser(auth()->user())\n ->withNotifications(auth()->user()->notifications()->paginate(10));\n }", "public function scopeUnseen($query)\n {\n return $query->where('seen', '=', false);\n }", "public function notifications()\n {\n return $this->morphMany(DatabaseNotification::class, 'notifiable')->orderBy('created_at', 'desc');\n }", "public function getNotifs() {\n\n // Notifications stored\n if( Storage::exists('notifications.ser') ) {\n $notifs = unserialize( Storage::get('notifications.ser') );\n\n // If the query is too old, remove the notifs\n if( Carbon::now()->timestamp - $notifs['query_date'] > 60 )\n $notifs = null;\n }\n\n // Get the information for the API\n if( !isset($notifs) ) {\n $notifs = [\n 'query_date' => Carbon::now()->timestamp,\n 'notifications' => getJSON( env('APP_URL_SERVER') . '/api/notifications' )\n ];\n\n // Store the new query\n Storage::put('notifications.ser', serialize($notifs));\n }\n\n return $notifs;\n }", "public static function unreaded_messages($id)\n {\n $messages = Message::where('conversation_id', $id)\n ->where('user_id_to', Auth::user()->id)\n ->where('readed', NULL)\n ->get();\n\n return $messages;\n }", "static function listHiddenExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE visible = FALSE ORDER BY creation_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $exhibit);\n\t\t}\n\t\treturn $list;\n\t}", "public function getInboxMessages() {\n\t\t$urlInboxMessages = \"http://www.reddit.com/message/messages/.json\";\n\t\treturn $this->runCurl ( $urlInboxMessages );\n\t\t// Surely: return $this->getRawJSON('message/messages/'); is preferable.\n\t}", "public function getNotifications()\n {\n return $this->hasMany(Notification::className(), ['user_id' => 'id']);\n }", "public function pull()\n {\n return $this->jsonData(Auth::user()->unreadNotifications);\n }", "public function _getPrivateMeetings()\n {\n $meetings = [];\n foreach ($this->meetings as $meeting)\n if ($meeting->IsPrivateMeeting)\n $meetings[] = $meeting;\n\n return $meetings;\n }", "public function all()\n {\n return $this->jsonData(Auth::user()->notifications);\n }", "public function getNonVotingUsersForEvent($eventId)\n\t{\n\t\t$rows = $this->getTable()->getNonVotingUsersForEvent($eventId);\n\n\t\treturn $this->_getSet($rows);\n\t}", "public function getAllNoPaginate()\n {\n return $this->projectRepo->all();\n }", "public function getUnreadAlerts()\n\t{\n\t\tif ((int) $this->mybb->user['uid'] > 0)\t// check the user is a user and not a guest - no point wasting queries on guests afterall\n\t\t{\n\t\t\t$alerts = $this->db->write_query(\"SELECT a.*, u.uid, u.username, u.avatar FROM \".TABLE_PREFIX.\"alerts a INNER JOIN \".TABLE_PREFIX.\"users u ON (a.from = u.uid) WHERE a.uid = \".(int) $this->mybb->user['uid'].\" AND unread = '1' ORDER BY a.id DESC;\");\n\t\t\tif ($this->db->num_rows($alerts) > 0)\n\t\t\t{\n\t\t\t\t$return = array();\n\t\t\t\twhile ($alert = $this->db->fetch_array($alerts))\n\t\t\t\t{\n\t\t\t\t\t$alert['content'] = json_decode($alert['content'], true);\n\t\t\t\t\t$return[] = $alert;\n\t\t\t\t}\n\n\t\t\t\treturn $return;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Exception('Guests have not got access to the Alerts functionality');\n\t\t}\n\t}", "public function getOpenedMessagesToFollow()\n {\n $messages = TrackingLog::select('tracking_logs.*')->join('open_logs', 'tracking_logs.message_id', '=', 'open_logs.message_id')->join('auto_triggers', 'tracking_logs.auto_trigger_id', '=', 'auto_triggers.id')->join('auto_events', 'auto_triggers.auto_event_id', '=', 'auto_events.id')->where('auto_event_id', $this->previousEvent->id)->whereRaw(sprintf(table('tracking_logs') . '.subscriber_id NOT IN (SELECT COALESCE(subscriber_id, 0) FROM %s WHERE auto_event_id = %s)', table('auto_triggers'), $this->id))->get();\n\n // one message could be opened more than one time\n // @todo: use array_uniq_by() helper function for far better performance thant Collection::uniq()\n $unique = $messages->unique(function ($item) {\n return $item->message_id;\n });\n\n return $unique;\n }", "public function countUnseenNotifications(NotifiableInterface $notifiable)\n {\n return $this->notificationManager->getUnseenNotificationCount($notifiable);\n }", "public function getDiscussion(): Discussion\n {\n return $this->discussion;\n }", "public function getMessages() {\r\n\t\t$messages = $this->session->messages;\r\n\t\t$this->session->unsetAll ();\r\n\t\treturn $messages;\r\n\t}", "public function getUnansweredQuestions()\n {\n if ($this->input->server('REQUEST_METHOD') == 'GET')\n {\n $unanswered_questions = $this->Question_model->getUnansweredQuestions();\n echo json_encode(array('status' => \"success\", 'unanswered_questions' => $unanswered_questions));\n return;\n }\n }", "public function get_noPublishedRecipes() {\n\n $query = $this->db\n ->from('recipes')\n ->where('published', 0)\n ->order_by('created_at', 'DESC')\n ->get();\n\n return $result = $query->result();\n }", "public function getUnreadMessages()\n {\n $conversations = ConversationModel::getMyConversations($this);\n /** @var Conversation $_conversation */\n $messagesCount = 0;\n foreach ($conversations as $_conversation) {\n $messagesCount += $_conversation->getUnreadMessageCount($this);\n }\n return $messagesCount;\n }", "protected function getMessages()\n\t{\n\t\t$page = \\Illuminate\\Support\\Facades\\Request::input('page', 1);\n\t\t\n\t\tif(!$this->messages)\n\t\t{\n\t\t\t$this->messages = Mail::where('folder', '=', $this->getFolderId())\n\t\t\t\t->orderBy($this->getFolderId() == 'sent' ? 'sent_time' : 'modified_time', 'desc')\n\t\t\t\t->offset(($page - 1) * $this->itemsPerPage)\n\t\t\t\t->limit($this->itemsPerPage)\n\t\t\t\t->get();\n\t\t}\n\t\t\n\t\treturn $this->messages;\n\t}", "public function unread($notifications);", "public function index()\n {\n\n $threads = Thread::forUser(Auth::id())->with([\n 'users' => function ($query) {\n $query->select('avatar', 'name', 'agent_name');\n },\n 'messages' => function ($query) {\n $query->latest()->first();\n },\n ])\n ->groupBy('threads.id')\n ->latest('updated_at')\n ->paginate();\n\n $threads->getCollection()->transform(function ($value) {\n $value->isUnread = $value->isUnread(Auth::id());\n\n return $value;\n });\n\n\n return response()->json($threads);\n }", "public function getReplys()\n {\n\t $q = Doctrine_Query::create()\n ->from('SpeakoutReply sr')\n ->leftJoin('sr.NetworkUser nu')\n ->where('sr.topic_id = ?', $this->getId()); \n\t\n return Doctrine_Core::getTable('NetworkUser')->getWithUsers($q);\n }", "public function messages()\n {\n return $this->hasMany(Chat::class, 'conversation_id')\n ->latest();\n }", "function getPendingIssues() {\n\t\t$i = $this->_query->join('synd_issue','i');\n\t\t$query = clone $this->_query;\n\n\t\t$query->where(\"$i.info_status >= 0 AND $i.info_status < \".synd_node_issue::CLOSED);\n\t\t\n\t\t$query->column($this->_grouping->getResolveByKey($this, $query), 'PK');\n\t\t$query->column(\"COUNT(DISTINCT $i.node_id)\", 'ISSUES');\n\t\t$query->groupBy($this->_grouping->getResolveByKey($this, $query));\n\t\t\n\t\t$sql = $query->toString();\n\t\t$rows = $this->_db->getAssoc($sql);\n\t\treturn $this->_grouping->filter($rows);\n\t}", "public function getAnnouncements()\r\n {\r\n $sql = \"SELECT * FROM announcements\";\r\n $query=$this->db->query($sql);\r\n return $query->result_array();\r\n }" ]
[ "0.65681255", "0.6378681", "0.63406754", "0.6325844", "0.62785566", "0.6249371", "0.6220479", "0.61696243", "0.610331", "0.60896033", "0.60003984", "0.5989895", "0.5964396", "0.59434146", "0.59220237", "0.5888419", "0.58776474", "0.58678305", "0.5790014", "0.5775237", "0.5765656", "0.5740093", "0.5715218", "0.57041425", "0.5701785", "0.5696361", "0.56937426", "0.5669351", "0.5658675", "0.5618743", "0.5618743", "0.560537", "0.558741", "0.5580608", "0.55522126", "0.5546755", "0.5532595", "0.553021", "0.5529591", "0.55285627", "0.5508485", "0.5484022", "0.54746515", "0.5474459", "0.54683745", "0.5444247", "0.5441437", "0.5422966", "0.54090613", "0.54082", "0.5390659", "0.5372397", "0.53697836", "0.5369701", "0.5357235", "0.53552467", "0.5351499", "0.53346086", "0.53272724", "0.5320464", "0.53184354", "0.53051114", "0.5304343", "0.529963", "0.5298517", "0.5295586", "0.5292926", "0.5289634", "0.52867377", "0.5284604", "0.5282129", "0.5278178", "0.5277268", "0.5275026", "0.5267025", "0.5261642", "0.5242955", "0.5239021", "0.5236869", "0.52290285", "0.52256167", "0.5222787", "0.52209824", "0.52096975", "0.5202292", "0.5199196", "0.51980793", "0.5183351", "0.5182291", "0.51785", "0.5171198", "0.51671666", "0.5165534", "0.5161252", "0.51602113", "0.5158053", "0.5157164", "0.51549673", "0.5154313", "0.51515186" ]
0.8289016
0
$type :driver/passenger $token $userid:$did/$pid
function checkToken($type,$token,$userid){ if(trim($type) == '' || trim($token) == '' || trim($userid) == '' ){ return false; } if($type == DUDU_DRIVER){ $table = API_TABLE_PRE.'driver_token'; $conditionUseridColumn = 'did'; }elseif ($type == DUDU_PASSENGER){ $table = API_TABLE_PRE.'passenger_token'; $conditionUseridColumn = 'pid'; }else{ return false; } $sql = 'select token from '.$table.' where '.$conditionUseridColumn.' = '.$userid; $rs = myDoSqlQuery($sql); $tokenInfo = pg_fetch_assoc($rs); if($tokenInfo['token']==$token){ return true; }else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function token()\n {\n\n\t\t$this->server->handleTokenRequest(OAuth2\\Request::createFromGlobals())->send();\n }", "function assignToken($domain,$accesslevel) {\n\n}", "function id() {\n\n if (!isset($_SERVER['HTTP_TRONGATETOKEN'])) {\n http_response_code(422);\n echo 'no token'; die();\n } else {\n $token = $_SERVER['HTTP_TRONGATETOKEN'];\n $result = $this->model->get_one_where('token', $token, 'trongate_tokens');\n\n if ($result == false) {\n http_response_code(401);\n echo 'false';\n die();\n } else {\n http_response_code(200);\n echo $result->user_id;\n die();\n }\n\n }\n\n }", "public function requestOTP(string $payeerid);", "function jailPlayer($api, $serverid) {\n\n $username = $_POST['playername'];\n \n $api->sendConsoleCommand($serverid, \"jail \".$username.\" jail\");\n \n return $username;\n\n}", "function require_tripit_link($dbh, $uid) {\r\n $tripit_tokens = get_request_tokens($dbh, $uid);\r\n if ($tripit_tokens == null) {\r\n header(\"Location: /php/tripit_rendezvous.php\");\r\n exit();\r\n } else {\r\n return $tripit_tokens;\r\n }\r\n}", "function getToken() {\n $user_agent = $_SERVER[\"HTTP_USER_AGENT\"];\n //Test if it is a shared client\n if (!empty($_SERVER['HTTP_CLIENT_IP'])){\n $ip=$_SERVER['HTTP_CLIENT_IP'];\n //Is it a proxy address\n }elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){\n $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n }else{\n $ip=$_SERVER['REMOTE_ADDR'];\n }\n //echo \"sesion:\" . $_SESSION[\"tokenH\"] . \"client:\" . md5($ip . \":\" . $user_agent); \n return md5($ip . \":\" . $user_agent); \n }", "public function route_byway(array $args) {\n\t\t$core = self::$core;\n\t\t$retval = self::$manage->self_add_passwordless($args['post']);\n\t\tif ($retval[0] !== 0)\n\t\t\treturn $core::pj($retval, 403);\n\t\t# alway autologin on success\n\t\t$token = $retval[1]['token'];\n\t\tself::$ctrl->set_token_value($token);\n\t\t$expires = self::get_db_expires(\n\t\t\tself::$admin->get_expiration());\n\t\t$core::send_cookie_with_opts($this->token_name, $token, [\n\t\t\t'path' => '/',\n\t\t\t'expires' => $expires,\n\t\t\t'httponly' => true,\n\t\t\t'samesite' => 'Lax',\n\t\t]);\n\t\treturn $core::pj($retval);\n\t}", "function myfunction(){\n\techo(\"/tell $Username,\");\n}", "public function token()\n {\n // echo 'pk';\n try {\n $this->heimdall->createToken();\n } catch (Exception $exception) {\n $this->heimdall->handleException($exception);\n }\n }", "function juggle_api_token( $token ) {\n /* format (2) : crypt (1) : ccrypt( create_api_token('glynthom', '100') , 'AES-256-OFB', 'en' ) ) */\n\n $lump = explode(\"-\", $token);\n\n /* six lumps * shuffle */\n $lump[0];\n $lump[1];\n $lump[2];\n $lump[3];\n $lump[4];\n $lump[5];\n $lump[6];\n\n return $lump[1] .'-'. $lump[2] .'-'. $lump[3] .'-'. $lump[4] .'-'. $lump[6] .'-'. $lump[5] .'-'. $lump[0] ;\n \n}", "function logger_device_activate($code) {\n\n logger_device_assign($code);\n\n drupal_set_message(t(\"The device is now associated with your account.\"));\n\n drupal_goto('device/mylist');\n}", "function startRelaying() { }", "function replyMessage ($message) {\n /*\n * Instantiate Recast.AI SDK, just for connect service\n */\n $request = Client::Request($_ENV[\"REQUEST_TOKEN\"]);\n\n /*\n * Get text from message received\n */\n $text = $message->content;\n\n /*\n * Get senderId to catch unique conversation_token\n */\n $senderId = $message->senderId;\n\n /*\n * Call Recast.AI SDK, through /converse route\n */\n $response = $request->converseText($text, [ 'conversation_token' => $senderId ]);\n\n /*\n * Here, you can add your own process.\n * Ex: You can call any external API\n * Or: Update your DB\n * etc...\n */\n $server = \"localhost\";\n$dbusername = \"root\";\n$dbpassword = \"root\";\n$dbname = \"phplms\";\nif ($response->action->slug == 'greetings') {\n // Do your code\necho \"Greetings User!\";\n\n\n$usernametext = \"sid\";\n$passwordtext = \"sid\";\n//array_push($response->replies, \"Welcome to LMS. You can enquire about your marks as of now.\");\n\n$conn = new mysqli($server, $dbusername, $dbpassword, $dbname);\n// Check connection\nif ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n} \nelse{\n$sql = \"SELECT * from register where username = 'sid' and password = 'sid';\";\n$result = $conn->query($sql);\n\n//if ($result->num_rows > 0) {\nif($result!=null){\n //array_push($response->replies, \"Inside rows > 0\");\n // output data of each row\n while($row = $result->fetch_assoc()) {\n //array_push($response->replies, \"Inside While\");\n //echo \"id: \" . $row[\"id\"]. \" - Name: \" . $row[\"firstname\"]. \" \" . $row[\"lastname\"]. \"<br>\";\n if($usernametext==$row[\"username\"]){\n if($passwordtext==$row[\"password\"]){\n //session_start();\n echo \"User found! Username = \".$row['username'].\"\\n\";\n echo \"Password = \".$row['password'].\"\\n\";\n //array_push($response->replies, \"Welcome to LMS. You can enquire about your marks as of now.\");\n //$_SESSION['username']=$usernametext;\n //$_SESSION['name']=$row[\"name\"];\n //header('Location: Auth.php');\n $conn->close();\n //exit;\n }\n }\n }\n}\nelse{\n echo \"0 results\";\n $conn->close();\n}\n}\n}\n\nif ($response->action->slug == 'online-test-marks') {\n $sql = \"\";\n $test_number = $response->memory->number->scalar;\n $username = $response->memory->username->value;\n if($username==null){\n array_push($response->replies, \"Code : Username is missing\");\n }\n //array_push($response->replies, \"Test number = \".$test_number);\n else if($test_number==null){\n //array_push($response->replies, \"Test number null\");\n\n \n }else{\n $sql = \"select * from onlinetest\".$test_number.\" where username = '\".$username.\"';\";\n $conn = new mysqli($server, $dbusername, $dbpassword, $dbname);\nif ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n} \nelse{\n$result = $conn->query($sql);\n\n//if ($result->num_rows > 0) {\nif($result!=null){\n array_push($response->replies, \"Your onlinetest\".$test_number.\" marks :\");\n // output data of each row\n while($row = $result->fetch_assoc()) {\n //echo \"id: \" . $row[\"id\"]. \" - Name: \" . $row[\"firstname\"]. \" \" . $row[\"lastname\"]. \"<br>\";\n array_push($response->replies, $row[\"cname\"].\" - \".$row[\"marks\"]);\n }\n }\n}\n}\n}\n\nif ($response->action->slug == 'login-1') {\n\n\n$usernametext = $response->memory->username->value;\n$passwordtext = $response->memory->password->value;\narray_push($response->replies, \"Username :\".$usernametext.\"END Password :\".$passwordtext.\"END\");\n//array_push($response->replies, \"Welcome to LMS. You can enquire about your marks as of now.\");\n//$result = null;\n$conn = new mysqli($server, $dbusername, $dbpassword, $dbname);\n// Check connection\nif ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n}\nelse{\n$sql = \"SELECT * from register where username = '.$usernametext.' and password = '.$passwordtext.';\";\n$result = $conn->query($sql);\narray_push($response->replies, \"No. of rows : \".mysqli_num_rows($result));\n//if ($result->num_rows > 0) {\nif($result!=null){\n//if(mysqli_num_rows($result)>0){\n array_push($response->replies, \"Code : Successfully logged in as \".$usernametext);\n array_push($response->replies, \"Welcome to LMS. You can enquire about your marks as of now.\");\n $conn->close();\n}\nelse{\n array_push($response->replies, \"Code : Username or password is wrong! Please log in again.\");\n $conn->close();\n}\n}\n}\n\nif ($response->action->slug == 'my-details') {\n $usernametext = $response->memory->username->value;\n $passwordtext = $response->memory->password->value;\n array_push($response->replies, \"Username : \".$usernametext.\" Password : \".$passwordtext);\n }\n /*\n * Add each replies received from API to replies stack\n */\n foreach ($response->replies as $reply) {\n $message->addReply([(object)['type' => 'text', 'content' => $reply]]);\n }\n\n $message->reply();\n}", "function request_url($method){\r\n global $TOKEN;\r\n \r\n\treturn \"https://api.telegram.org/bot\" . $TOKEN . \"/\". $method;\r\n}", "function callBackUpdate($_TELEGRAM, $th, $tc){\n // YOUR BOT CODE GOES HERE\n if ($_TELEGRAM['text'] == \"/start\")\n {\n send($_TELEGRAM['cid'], \"Hi! Welcome on MTgBot Example!\\nThis message was sent by Thread #$th.\\nThe Thread #$th sent $tc messages.\");\n }\n\n}", "public function __construct( Passenger $passenger )\n\t{\n\t\t$this->passenger = $passenger;\n\t}", "public function attach()\n {\n $this->detectReturnType();\n\n if (empty($_REQUEST['broker'])) return $this->fail(\"No broker specified\", 400);\n if (empty($_REQUEST['token'])) return $this->fail(\"No token specified\", 400);\n\n if (!$this->returnType) return $this->fail(\"No return url specified\", 400);\n\n $checksum = $this->generateAttachChecksum($_REQUEST['broker'], $_REQUEST['token']);\n\n if (empty($_REQUEST['checksum']) || $checksum != $_REQUEST['checksum']) {\n return $this->fail(\"Invalid checksum\", 400);\n }\n\n $this->startUserSession();\n $sid = $this->generateSessionId($_REQUEST['broker'], $_REQUEST['token']);\n\n $this->cache->set($sid, $this->getSessionData('id'));\n $this->outputAttachSuccess();\n }", "function run(\\CharlotteDunois\\Livia\\Commands\\Context $context, \\ArrayObject $args,\n bool $fromPattern) {\n $client = $context->client;\n $settings = $client->provider;\n $message = $context->message;\n $guild = $message->guild;\n $command = $context->command;\n $id = $message->author->id;\n $get = (array)json_decode($settings->get($guild,$id)); \n require_once \"./MAPI.php\";\n $MAPI = new MyStat();\n $args = $context->parseCommandArgs();//I don`t know what is this\n $args = explode(' ',$args);\n echo \\var_export($command->argsCount);\n if ($guild->available == false) { //if in DM\n if (!isset($get['password']))\n {\n return $context->reply(\"У меня нету твоих данныхю Пожалуйста авторизируйся с помощью /login\");\n }\n else {\n try {\n $result = $MAPI->Login($get['password'], $get['login']);\n $place = $MAPI->GetPlace($result);\n return $context->reply('Твоё место в классе : '. $place[0]. ' а на потоке : '. $place[1]);\n } catch (\\Exception $e) {\n $settings->set($guild, $message->author->id, '{}');\n return $context->reply(\"Извини но : \" .$e->getMessage().' пожалуйста авторизируйся снова с помощью /login');\n }\n }\n } else { // if in guild chat\n //$settings->set($guild, 'test',$args['password']);\n return $context->reply('Извини но эта команда не доступна для серверов. Хочешь ею воспользоваться ? Напиши мне в ЛС');\n }\n }", "function app_token($id, $method) {\n $app_token = base64_decode(getenv('APP_TOKEN'));\n $api_token = getenv('API_TOKEN');\n $status = [\n 'token' => $api_token,\n 'code' => $id,\n 'visitors' => null,\n ];\n $request = [\n 'token' => $api_token,\n 'id' => $id,\n 'visitors' => null,\n ];\n $get = [\n 'token' => $api_token,\n 'id' => $id,\n 'visitors' => null,\n ];\n $mail = [\n 'token' => $api_token,\n 'id' => $id,\n 'visitors' => null,\n ];\n switch ($method) {\n case \"get\":\n return trim($app_token . '/tripadvisor/get?' . http_build_query($get));\n break;\n case \"request\":\n return trim($app_token . '/tripadvisor/request?' . http_build_query($request));\n break;\n case \"mail\":\n return trim($app_token . '/tripadvisor/mail?' . http_build_query($mail));\n break;\n case \"status\":\n return trim($app_token . '/tripadvisor/status?' . http_build_query($status));\n }\n }", "function process_unlock_perk($socket, $data)\n{\n global $player_array;\n\n if ($socket->process === true) {\n list($slug, $user_id, $guild_id, $user_name, $quantity) = explode('`', $data);\n $user_id = (int) $user_id;\n $guild_id = (int) $guild_id;\n start_perk($slug, $user_id, $guild_id, time() + ($quantity * 3600));\n $player = id_to_player($user_id, false);\n $display_name = userify($player, $user_name);\n\n if ($guild_id !== 0) {\n if (strpos($slug, 'guild_') === 0) {\n $type = ucfirst(explode('_', $slug)[1]);\n $duration = format_duration($quantity * 3600);\n $msg = \"$display_name unlocked $type mode for your guild for $duration!\";\n send_to_guild($guild_id, \"systemChat`$msg\");\n } elseif ($slug === 'happy_hour') {\n global $chat_room_array;\n\n $hh_lang = $quantity > 1 ? \"$quantity Happy Hours\" : 'a Happy Hour';\n if (isset($chat_room_array['main'])) {\n $main = $chat_room_array['main'];\n $main->sendChat(\"systemChat`$display_name just triggered $hh_lang!\");\n foreach ($player_array as $player) {\n if (isset($player->chat_room) && $player->chat_room !== $main) {\n $player->write(\"systemChat`$display_name just triggered $hh_lang!\");\n }\n }\n } else {\n sendToAll_players(\"systemChat`$display_name just triggered $hh_lang!\");\n }\n }\n }\n\n $socket->write('{\"status\":\"ok\"}');\n }\n}", "function pmprosl_sociallocker_tracking() {\n\tif ( ! ( int ) $_POST['targetId'] )\n\t\texit;\n\n\t// Next make sure the \"sender\" is valid\n\tif ( empty( $_POST['sender'] ) || ! in_array( $_POST['sender'], array( 'button', 'timer', 'cross' ) ) )\n\t\texit;\n\n\t// Next make sure the \"senderName\" is valid\n\tif ( empty( $_POST['senderName'] ) )\n\t\texit;\n\n\t// Finally, make sure we haven't already set the cookie\n\tif( isset( $_COOKIE['pmprosl_has_access_flag'] ) && ! $_COOKIE['pmprosl_has_access_flag'] )\n\t\texit;\n\n\t// Passed all validation checks, lets set the cookies\n\tsetcookie( 'pmprosl_has_access', PMPROSL_FREE_LEVEL_ID, ( time() + ( 60 * 60 * 24 * PMPROSL_MEMBERSHIP_PERIOD_DAYS ) ), COOKIEPATH, COOKIE_DOMAIN, false ); // has_access cookie (expires in PMPROSL_MEMBERSHIP_PERIOD_DAYS days)\n\tsetcookie( 'pmprosl_has_access_flag', true, ( time() + ( 60 * 60 * 24 * 10 * 365 ) ), COOKIEPATH, COOKIE_DOMAIN, false ); // has_access flag cookie used to verify if a user already had access once (expires in 10 years; i.e. never)\n\n\treturn; // We're returning here because we know Social Locker's hook is coming up next\n}", "public function p_login(){\n \n /* If box is checked then this is a noob and we need to sign him in.*/\n if (isset($_POST['checkbox'])) {\n\t $_POST = DB::instance(DB_NAME)->sanitize($_POST);\t\t\t\t\t\t//sanitize the POST var of cooties\n\t $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \t\t\t\t//hash and salt the PW\n\t $_POST['token'] = sha1(TOKEN_SALT.$_POST['username'].Utils::generate_random_string()); \t//make a token\n\t \n\t $_POST['username'] = htmlspecialchars($_POST['username'], ENT_QUOTES, 'UTF-8');\t\t//sanitize the username of SQLi cooties\n\t \n\t //check if that username is taken.\n\t$q = 'SELECT count(*)\n FROM users\n WHERE username = \"'.$_POST['username'].'\"';\n\t$count = DB::instance(DB_NAME)->select_rows($q);\n\t\n\tif(intval($count[0]['count(*)']) >= 1) { \t//username taken\n Router::redirect('/users/login/error');\n } else {\t\t\t\t\t//username not taken\t\n\t\t//make the user and dump him into chat\n\t\tDB::instance(DB_NAME)->insert_row('users',$_POST);\n\t\t\n\t\t//get the token from the DB and sanitize it\n\t\t$q = 'SELECT token\n\t\t FROM users\n\t\t WHERE username = \"'.$_POST['username'].'\"\n\t\t AND password = \"'.$_POST['password'].'\"';\n\t\t \n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\t\t$token = DB::instance(DB_NAME)->sanitize($token);\n\t\t#success\n\t\tif($token) {\n\t\t //name, actual value, time length, directory access\n\t\t //pull out cookie from browser developer tools\n\t\t setcookie('token', $token, strtotime('+1 year'), '/');\n\t\t //drop a info message in chat about joining!\n\t\t $q = 'SELECT user_id\n\t\t FROM users\n\t\t WHERE token = \"'.$token.'\" ';\n\t\t $user_id = DB::instance(DB_NAME)->select_field($q);\n\n\t\t $q = 'INSERT INTO `messages`(`message`, `user_id`, `flag`) VALUES ('.\"'has entered the chat!'\" .','.\"'$user_id'\".','.\"'2'\".')';\n\t \n\t\t DB::instance(DB_NAME)->query($q);\n\t\t \n\t\t Router::redirect('/chat');\n\t\t}\n\t\t#fail\n\t\telse {\n\t\t Router::redirect('/users/login/error');\n\t\t }//end little else\n\t } //end big else\n\t} else { //person is not a noob\n\t $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\t $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t \n\t //get the token from the DB and sanitize it\n\t $q = 'SELECT token\n\t\tFROM users\n\t\tWHERE username = \"'.$_POST['username'].'\"\n\t\tAND password = \"'.$_POST['password'].'\"';\n\t\t\n\t $token = DB::instance(DB_NAME)->select_field($q);\n\t $token = DB::instance(DB_NAME)->sanitize($token);\n\t #success\n\t if($token) {\n\t\t//name, actual value, time length, directory access\n\t\t//pull out cookie from browser developer tools\n\t\tsetcookie('token', $token, strtotime('+1 year'), '/');\n\t\t\n\t\t //drop a info message in chat about joining!\n\t\t $q = 'SELECT user_id\n\t\t FROM users\n\t\t WHERE token = \"'.$token.'\" ';\n\t\t $user_id = DB::instance(DB_NAME)->select_field($q);\n\n\t\t $q = 'INSERT INTO `messages`(`message`, `user_id`, `flag`) VALUES ('.\"'has entered the chat!'\" .','.\"'$user_id'\".','.\"'2'\".')';\n\t \n\t\t DB::instance(DB_NAME)->query($q);\n\t\t\n\t\tRouter::redirect('/chat');\n\t }\n\t #fail\n\t else {\n\t Router::redirect('/users/login/error');\n\t }\n\t\t \n }//end big if\n \n }", "function tokenVerification($type, $matchingId)\r\n{\r\n $tableRecord = & get_instance();\r\n $tableRecord\r\n ->load\r\n ->database();\r\n if ($type == '0')\r\n {\r\n return $tableRecord\r\n ->db\r\n ->get_where('loungeMaster', array(\r\n 'loungeId' => $matchingId,\r\n 'status' => '1'\r\n ));\r\n }\r\n else\r\n {\r\n $tableRecord\r\n ->db\r\n ->order_by('id', 'desc');\r\n return $tableRecord\r\n ->db\r\n ->get_where('loginMaster', array(\r\n 'loungeMasterId' => $matchingId,\r\n 'status' => '1',\r\n 'type' => '3'\r\n ));\r\n }\r\n}", "function LoGinUser($username, $password){\n $request = array();\n\n $request['type'] = 'login';\n $request['username'] = $username;\n $request['password'] = $password;\n\n $reply = DataB($request); //calling function from testRabbitMQClient.php \n\n if($reply == 1){\n $_SESIION['username'] = $username;\n if(!empty($_GET['usernmae'])){\n echo $_REQUEST['username'];\n } else { \n echo \"SOmething not right\";\n }\n return $reply;\n\n}\n}", "public function getSecret($tid){}", "function process_unlock_rank_token_rental($socket, $data)\n{\n if ($socket->process === true) {\n $data = json_decode($data);\n\n global $player_array;\n foreach ($player_array as $player) {\n if ($player->user_id === $data->user_id || $player->guild_id === $data->guild_id) {\n $player->activateRankToken($data->quantity);\n }\n }\n\n $socket->write('{\"status\":\"ok\"}');\n }\n}", "function javaService($pid,$dbM)\n{\n\t//$x = $WebAuthentication->setPaymentGatewayAuthchecksum($pid);\n\t//$auth = $x[\"AUTHCHECKSUM\"];\n\t$url = \"http://localhost:8190/listings/v1/activities?type=chat&listing=shortlist\";\n\t$header = array(\"JB-Profile-Identifier:\".$pid);\n\t$start_tm=microtime(true);\n\t$response = CommonUtility::sendCurlPostRequest($url,\"\",\"\",$header);\n\t$diff=microtime(true)-$start_tm;\n\t$data = (Array)json_decode($response);\n\t$insert[\"pid\"]=$pid;\n\t$insert[\"count\"]=$data[\"data\"]->totalCount;//$data[\"header\"]->totalCount;\n\t$insert[\"ids\"]=\"\";\n\t\n\tforeach($data[\"data\"]->items as $k=>$v)\n\t{\n\t\t$insert[\"ids\"].=$v->profileid.\",\";\n\t}\n\tinsertData($insert,2,$diff,$dbM);\n}", "function recruitPlayer($cxn,$player,$request)\r\n {\r\n \r\n }", "function start($email, $password)\n {\n global $standard_headers;\n\n $standard_headers = array('Host: www.tadpoles.com', 'content-type: application/x-www-form-urlencoded; charset=utf-8', 'accept: */*', 'x-titanium-id: c5a5bca5-43c7-4b8f-b82a-fe1de0e4793c', 'x-requested-with: XMLHttpRequest', 'accept-language: en-us', 'user-agent: Appcelerator Titanium/7.1.1 (iPhone/12.2; iOS; en_US;), Appcelerator Titanium/7.1.1 (iPhone/12.2; iOS; en_US;) (gzip)');\n\n login($email, $password);\n admit();\n }", "public function userByToken();", "function getChat($d,$ip,$token){\n if (verify_token($ip, $token)) {\n echo getChatData($d['room']);\n } else {\n $result['token'] = 'fail';\n echo json_encode($result);\n }\n}", "public function twofactor_action()\n\t{\n UserModel::authentication();\n \n //get the user\n $user = UserModel::user();\n\n //include the library\n require Config::get('PATH_LIBS') . 'GoogleAuthenticator.php';\n \n //iniate the class\n $ga = new PHPGangsta_GoogleAuthenticator();\n \n //get the user's secret key\n $secret = SecurityModel::twofackey($user);\n\n //get the code\n\t\t$oneCode = $ga->getCode($secret);\n\t\t\n SecurityModel::add_2factor($oneCode, $secret);\t\n\t}", "function run()\n {\n $cmd = $this->param[1];\n \n $userId = $_SESSION['LOGIN_USER']['userId'];\n \n //$this->sendEmail(5);\n //$this->getTicketPriority(5);\n //echo \"<PRE>\";\n //print_r($_SESSION);\n \n if($cmd != 'upload')\n {\n // Redirects to Login controller if user is not logged in\n if($userId == null)\n {\n header('location: ' . SUPER_CONTROLLER_URL_PREFIX . 'Login');\n exit;\n }\n }\n\n \n switch($cmd)\n {\n case 'attachment' : $screen = $this->downloadAttachment(); break;\n case 'upload' : $screen = $this->uploadFile(); break;\n case 'rm_upload' : $screen = $this->removeUploadedFile(); break;\n case 'add_detail' : $screen = $this->addDetail(); break;\n case 'details' : $screen = $this->showTicketDetails(); break;\n case 'search_tag' : $screen = $this->searchTag(); break;\n case 'add_tag' : $screen = $this->addTag(); break;\n case 'assign_self' : $screen = $this->assignSelf(); break;\n case 'mark_executive' : $screen = $this->markExecutive(); break;\n case 'delete_ticket' : $screen = $this->deleteTicket(); break;\n case 'close_ticket' : $screen = $this->closeTicket(); break;\n case 'list' : $screen = $this->showTicketList(); break;\n case 'ajax_list' : $screen = $this->getTicketListForAjax(); break; \n case 'priority' : $screen = $this->getTicketListByPriority(); break; \n case 'print' : $screen = $this->printTicketDetails(); break;\n case 'piority_ajax_list' : $screen = $this->getTicketListForPriorityAjax(); break; \n case 'gen_dialog_form' : $screen = $this->isResolverByTicket(); break;\n case 'merge_ticket' : $screen = $this->mergeTicket(); break;\n case 'rate_ticket' : $screen = $this->saveTicketRating(); break;\n case 'log' : $screen = $this->activityLogReport(); break;\n case 'correct' : $screen = $this->correctDB(); break;\n default : $screen = $this->showTicketList(); \n }\n \n $data = array();\n $data['topnav'] = 'home';\n $data['tagList'] = Utils::getAllTagList($this->db);\n $userList = new UserList($this->db);\n $data['sourceUser'] = $userList->getUsersFromMySources();\n $data['source_id'] = $_SESSION['source_id'];\n $data['source_name'] = Utils::getSourceName($this->db , $_SESSION['source_id']);\n //echo \"<pre>\";\n //print_r($_SESSION);\n echo $this->template->createScreen($screen, $data);\n exit;\n }", "public function getToken()\n\t{\n\n\t}", "function verfiy($r_token,$data){\n $token=\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"; //Initialize Token (32 digit)\n //echo \"Token is >> \". $r_token. \"\\n\"; //testing\n if ($r_token == $token) {\n loot(0,$data);\n //echo \"Token valid looting...\"; //testing\n } else {\n loot(1,$data);\n // echo \"Token invalid dropping...\"; //testing\n }\n}", "function ADMIN_Identifie()\n{\n\tif ($_POST[\"ed_PW\"] ==\"jbmd\")\n\t\t{\n\t\t\t$_SESSION[\"ADMIN_OK\"] = \"00\";\t\t\n\t\t\tTOOL_Chainage(\"SCI_EF_index.php\");\n\t\t\treturn;\n\t\t}\n\n}", "function addonexample_hook_login($vars) {\n}", "public function getToken();", "public function getToken();", "public function getToken();", "public function getToken();", "function process_unlock_super_booster($socket, $data)\n{\n if ($socket->process === true) {\n $user_id = $data;\n $player = id_to_player($user_id, false);\n if (isset($player)) {\n $player->super_booster = true;\n }\n $socket->write('ok`');\n }\n}", "public function run($username, $password, $nonce, $created);", "function archimedes_get_token() {\n $keys = module_invoke_all('archimedes_id'); sort($keys);\n return drupal_hmac_base64(implode('|', $keys), drupal_get_private_key() . drupal_get_hash_salt());\n}", "public function action_index()\n\t{\n// \t\t$temporary_credentials = $connection->getRequestToken('');\n// \t\t// echo \"<pre>\";\n// \t\t// print_r($redirect_url = $connection->getAuthorizeURL($temporary_credentials));\n// \t\t// echo \"</pre>\";\n// // 5235676\n\n// \t\t$connection->post('statuses/update', array('status' => 'Text of status here'));\n\t}", "public function get_mention(){retrun($id_local_mention); }", "function join_api_token( $token ) {\n /* format (2) : crypt (1) : ccrypt( create_api_token('glynthom', '100') , 'AES-256-OFB', 'en' ) ) */\n\n $lump = explode(\"-\", $token);\n\n /* six lumps * unshuffle */\n $lump[0];\n $lump[1];\n $lump[2];\n $lump[3];\n $lump[4];\n $lump[5];\n $lump[6];\n\n return $lump[6] .'-'. $lump[0] .'-'. $lump[1] .'-'. $lump[2] .'-'. $lump[3] .'-'. $lump[5] .'-'. $lump[4] ;\n\n}", "public function show(Passenger $passenger)\n {\n //\n }", "function logger_token_save($meter, $token = NULL, $domains = '') {\n\n if (!$token) {\n $token = md5(uniqid(rand(), TRUE));\n }\n\n db_update('logger_tokens')\n ->fields(array(\n 'domains' => $domains,\n 'token' => $token\n ))\n ->condition('meter', $meter)\n ->execute();\n}", "function recruitTeam($cxn,$player,$request)\r\n {\r\n \r\n }", "function hotp($secret, $counter);", "function loginLog($consumerUserName,$password_encript,$status)\r\n {\r\n\t \r\n\t\t\t\r\n\t $ip = $_SERVER['REMOTE_ADDR'];\r\n\t\t\t$date = date('Y-m-d h:i:s');\r\n\t\t\t$d1 = date(\"Y-m-d\");\r\n\t\t\t\r\n\t\t\t$handle = curl_init();\r\n\t\t\t$url = \"http://111.118.188.206/consumeranddealerloginlog.php\";\r\n\t\t\t$postData = array(\r\n\t\t\t'username' => $consumerUserName,\r\n\t\t\t'password' => $Realpass,\r\n\t\t\t'file_name' => $d1,\r\n\t\t\t'status' => $status,\r\n\t\t\t'ip' => $ip,\r\n\t\t\t'date' => $date,\r\n\t\t\t'logintype' => 'consumer'\r\n\t\t\t);\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tcurl_setopt_array($handle,\r\n\t\t\tarray(\r\n\t\t\tCURLOPT_URL => $url,\r\n\t\t\t// Enable the post response.\r\n\t\t\tCURLOPT_POST => true,\r\n\t\t\t// The data to transfer with the response.\r\n\t\t\tCURLOPT_POSTFIELDS => $postData,\r\n\t\t\tCURLOPT_RETURNTRANSFER => true,\r\n\t\t\t)\r\n\t\t\t);\r\n\t\t\t$data = curl_exec($handle);\r\n\t\t\tcurl_close($handle);\r\n }", "public function doTokenAuth($token)\n {\n $userModel = new \\BAServer\\Models\\User();\n $userData = $userModel->getUserByToken($token);\n\n var_dump($userData);\n return 'Authenticating token ' . $token;\n }", "function new_request_token($consumer) {\n }", "public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t# Prevent SQL injection attacks by sanitizing user entered data\n\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t$q = \"SELECT token\n\tFROM users\n\tWHERE email = '\".$_POST['email'].\"'\n\tAND password = '\".$_POST['password'].\"'\n\t\";\n\n\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t#login failed\n\tif($token == \"\" || $_POST['email'] == \"\" || $_POST['password'] == \"\"){\n\n\n\n\tRouter::redirect(\"/users/login/error\");\n\t# send back to login page - should add indication what went wrong\n\t}\n\t#login successful\n\telse{\t\n\n\t\techo \"if we find a token, the user is logged in. Token:\".$token;\n\n\t\t#store token in a cookie\n\t\tsetcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n\t\t#send them to the main page\n\t\tRouter::redirect(\"/issues\");\n\n\t\t#token name value and how long should last\n\t\t#send back to index page\n\t\t#authenticate baked into base controller\n\t\t#gets users credentials this->user->firstname\n\t}\n}", "static public function doGenerateTrackingForPuid(){\r\n\t\t$command = Yii::$app->db_queue->createCommand(\"select * from `tracker_gen_request_for_puid` order by create_time \" );\r\n\t\t$rows = $command->queryAll();\r\n\t\tforeach ($rows as $row){\r\n\t\t\t$puid = $row['puid'];\r\n\t\t\t \r\n\t\t\t\r\n\t\t\techo \"try to purgeUnbindedPlatformTrackingNo for $puid /\";\r\n\t\t\tself::purgeUnbindedPlatformTrackingNo();\r\n\t\t\techo \"try to requestTrackingForUid for $puid /\";\r\n\t\t\t$rtn = self::requestTrackingForUid($puid );\r\n\t\t\t$command = Yii::$app->db_queue->createCommand(\"delete from `tracker_gen_request_for_puid` where puid= $puid \" );\r\n\t\t\t$command->execute();\r\n\t\t}\r\n\t}", "function release_token(){\n if(!isset($_GET[$this->name])) {\n header(\"Status: 302 Moved Temporarily\");\n $this->get_id($sid);\n header(\"Location: http://\".$_SERVER['HTTP_HOST'].$this->self_url());\n exit;\n } \n }", "function process_unlock_set_djinn($socket, $data)\n{\n if ($socket->process === true) {\n $user_id = $data;\n $player = id_to_player($user_id, false);\n if (isset($player)) {\n $player->gainPart('head', 35, true);\n $player->gainPart('body', 35, true);\n $player->gainPart('feet', 35, true);\n $player->gainPart('eHead', 35);\n $player->gainPart('eBody', 35);\n $player->gainPart('eFeet', 35);\n $player->sendCustomizeInfo();\n }\n $socket->write('{\"status\":\"ok\"}');\n }\n}", "public function pusherauthenticate($id) {\n if ( Auth::user()->id === (int) $id ) {\n $pusher = new Pusher(env('PUSHER_APP_KEY'), env('PUSHER_APP_SECRET'), env('PUSHER_APP_ID'));\n echo $pusher->socket_auth($_POST['channel_name'], $_POST['socket_id']);\n } else {\n header('', true, 403);\n echo \"Forbidden\";\n }\n }", "function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page\n Router::redirect(\"/users/login/error\");\n\n # But if we did, login succeeded! \n } else {\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n # update the last_login time for the user\n/* $_POST['last_login'] = Time::now();\n\n $user_id = DB::instance(DB_NAME)->update('users', $_POST); */\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n }\n }", "public function botman()\n {\n $botman = app('botman');\n\n $botman->middleware->received(ApiAi::create(config('services.dialogflow.key'))->listenForAction());\n\n $botman->hears('{something}', __CLASS__ . '@telegram');\n\n $botman->listen();\n }", "public function getPass();", "function view_chat($demand_id)\n {\n }", "function snmp_gen_auth(&$device)\n{\n\n $cmd = '';\n $vlan = FALSE;\n\n if (isset($device['snmp_context']))\n {\n if (is_numeric($device['snmp_context']) && $device['snmp_context'] > 0 && $device['snmp_context'] < 4096 )\n {\n $vlan = $device['snmp_context'];\n }\n }\n\n switch ($device['snmp_version'])\n {\n case 'v3':\n $cmd = ' -v3 -l ' . escapeshellarg($device['snmp_authlevel']);\n /* NOTE.\n * For proper work of 'vlan-' context on cisco, it is necessary to add 'match prefix' in snmp-server config --mike\n * example: snmp-server group MONITOR v3 auth match prefix access SNMP-MONITOR\n */\n $cmd .= ($vlan) ? ' -n \"vlan-' . $vlan . '\"' : ' -n \"\"'; // Some devices, like HP, always require option '-n'\n\n switch ($device['snmp_authlevel'])\n {\n case 'authPriv':\n $cmd .= ' -x ' . escapeshellarg($device['snmp_cryptoalgo']);\n $cmd .= ' -X ' . escapeshellarg($device['snmp_cryptopass']);\n // no break here\n case 'authNoPriv':\n $cmd .= ' -a ' . escapeshellarg($device['snmp_authalgo']);\n $cmd .= ' -A ' . escapeshellarg($device['snmp_authpass']);\n $cmd .= ' -u ' . escapeshellarg($device['snmp_authname']);\n break;\n case 'noAuthNoPriv':\n // We have to provide a username anyway (see Net-SNMP doc)\n $cmd .= ' -u observium';\n break;\n default:\n print_error('ERROR: Unsupported SNMPv3 snmp_authlevel (' . $device['snmp_authlevel'] . ')');\n }\n break;\n\n case 'v2c':\n case 'v1':\n $cmd = ' -' . $device['snmp_version'];\n $cmd .= ' -c ' . escapeshellarg($device['snmp_community']);\n if ($vlan) { $cmd .= '@' . $vlan; }\n break;\n default:\n print_error('ERROR: ' . $device['snmp_version'] . ' : Unsupported SNMP Version.');\n }\n\n if (OBS_DEBUG === 1 && !$GLOBALS['config']['snmp']['hide_auth'])\n {\n $debug_auth = \"DEBUG: SNMP Auth options = $cmd\";\n print_debug($debug_auth);\n }\n\n return $cmd;\n}", "function login($username, $authtoken) {\n\t\t$this->login = ( $this->send(\"login $username\\npk=$authtoken\\n\\0\") ? true : true );\n\t}", "function onTextmessage(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3_Node_Host $host)\n{\n global $ts3, $name, $debug; \n $msg = $event[\"msg\"];\n $invoker = $event[\"invokername\"];\n \n if($invoker != $name) {\n \n if($debug) echo($invoker.\": \".$msg.\"\\n\");\n \n if($debug) echo(\"User \".$invoker.\" passed security check\\n\");\n \n $invoker_db = $ts3->clientGetByName($invoker);\n \n if($invoker_db[\"client_unique_identifier\"] == \"DOgQ0YV9+wZ9YMdD3JPfhvlv/xqM=\" OR $invoker_db[\"client_unique_identifier\"] == \"gWszaxdv1W+8KlIHafUe+ZdOaiI=\") {\n\n // preparing the command arguments\n $block = array(11, 26, 2);\n $values[1] = intval( $uid );\n $id_a = $ts3->getId();\n $arguments = explode(\" \", $msg);\n if($debug) echo(\"Arguments:\\n\"); print_r($arguments);echo(\"\\n\"); \n switch ($arguments[0]) {\n\tcase \"!ping\":\n\t\tgizisent(\"Pong!\",$ts3,$id_a);\n\t\tbreak;\n\tcase \"!add\":\n\t\tif (in_array($arguments[1], $block)){\n\t\tgizisent(\"Access denied\",$ts3,$id_a);\n\t\t} else {\n\t\t$ts3->serverGroupClientAdd($arguments[1],$arguments[2]);\t\t\n\t\tgizisent(\"Rank was add\",$ts3,$id_a);\n\t\t}\n\t\tbreak;\t \n\tcase \"!del\":\n\t\tif (in_array($arguments[1], $block)){\n\t\tgizisent(\"Access denied\",$ts3,$id_a);\n\t\t} else {\n\t\t$ts3->serverGroupClientDel($arguments[1],$arguments[2]);\t\t\n\t\tgizisent(\"Rank was remove\",$ts3,$id_a);\n\t\t}\n\t\tbreak;\t\t\t\n\tcase \"!info\":\n\t\tgizisent(\"Project GzPro.net\",$ts3,$id_a);\n\t\tbreak;\t \n\tcase \"!help\":\n\t\tgizisent(\"Commands:\n\t\t!ping - test\n\t\t!add <id ServerGroup> <dbid user> - Giving Rank\n\t\t!del <id ServerGroup> <dbid user> - Remove Rank\n\t\t!info - Information Bot\",$ts3,$id_a);\n }\n \n}\n}\n}", "public function sendToken(User $user): string;", "function process($user,$msg){\n $c=0;\n \t$this->say(\"(user: \".$user->id.\") msg> \".$msg);\n //$this->say(\"< \".$msg);\n\t\n switch($msg){\n\t case \"ping\" : $this->send($user->socket,\"pong\"); break; //heartbeat frame reply with pong\n case \"hello\" : $this->send($user->socket,\"hello human\"); break;\n case \"name\" : $this->send($user->socket,\"My Name is\".php_uname(\"n\") ); \t\tbreak;\n\t case \"temp\" : $this->send($user->socket,\"Temp. in NYC:\".$this->getTemp() ); break;\n case \"date\" : $this->send($user->socket,\"today is \".date(\"Y.m.d\")); break;\n case \"time\" : $this->send($user->socket,\"server time is \".date(\"H:i:s\")); break;\n case \"thanks\": $this->send($user->socket,\"you're welcome\"); break;\n\t case \"id\" : \t$this->send($user->socket,\"You are user: \".$user.\" \\r\\n\"); break;\n\t case \"users\": $list=\"User's List \\r\\n\";\n\t\t\t\t\t\tforeach($this->users as $u)\n\t\t\t\t\t\t $list.=\"user #\".++$c.\". $u \\r\\n\";\n\t\t\t\t\t\t \n\t\t\t\t\t\t$this->send($user->socket,$list); \n\t\t\t\t\t break;\n\t\t\t\t\t\n case \"bye\" : $this->send($user->socket,\"bye\"); \n\t\t\t\t\t\t$this->disconnect($user->socket);\n\t\t\t\t\t\tbreak;\n default : $this->send($user->socket,$msg.\" not understood - \".date(\"H:i:s\") ); break;\n }\n }", "protected function processOtherVerbs ($dh) {\n $jd = new JsonData();\n $user = $this->createObjectFromRequest($dh);\n $verb = $dh->getParameter(\"verb\");\n switch ($verb) {\n //some actions require that a user be logged in\n case \"logout\":\n case \"modify\": //this is modifying a user other than self\n $loggedInUser = $this->getLoggedInUser();\n \n if ($loggedInUser === null) {\n $jd->set(\"error\", \"Could not proceed: user not logged in\");\n } else {\n //proceed\n switch ($verb) {\n case \"logout\":\n $this->removeSessionUser();\n break;\n case \"modify\":\n break;\n }\n }\n break; \n case \"login\":\n //see if user provided valid credentials\n if ($user->checkPassword($dh, $dh->getParameter(\"password\"))) {\n $user->loadFromDb($dh);\n $this->saveToSession($user);\n $jd->set(\"user\", $user->getAttributes());\n } else {\n $jd->set(\"error\", \"Invalid user credentials\");\n } \n \n break;\n case \"resetpw\":\n //verify that we have email\n if ($user->getAttributes()[\"email\"]) {\n \n $reset = $user->resetPassword($dh);\n if ($reset[\"error\"]) {\n $jd->set(\"error\", $reset[\"error\"]);\n \n } else {\n $msg = \"Forgot your WSP Eco Map password? No problem! \";\n $msg .= \"<br><br>\\r\\n\\r\\nPlease use on the following link to reset your password.\";\n $linkText = \"Reset Password\";\n \n if ($user->isNewUser($dh)) {\n $msg = \"Welcome to the WSP Eco Map! Please use the following link\";\n $msg .= \" to set up your password and profile.\";\n $linkText = \"Complete Registration\";\n }\n \n $attr = $user->getAttributes();\n $config = new Config();\n $link = $config->email[\"resetUrl\"] . \"?token=\" . $reset[\"token\"] .\n \"&userid=\" . $attr[\"id\"];\n $link = \"<a href='$link'>$linkText</a>\";\n \n $msg .= \"<br><br>\\r\\n\\r\\n\" . $link;\n \n $mailer = new Mailer();\n $sent = $mailer->send($attr[\"email\"], \"WSP Eco Map $linkText\", $msg);\n \n if (!$sent) {\n $jd->set(\"error\", \"Sending email failed\");\n //try to delete token\n $user->deletePasswordToken($dh);\n } else {\n $jd->set(\"message\", \"Success. Please check your email for a link \" .\n \"to complete the process\");\n }\n }\n \n } else {\n $jd->set(\"error\", \"Cannot reset password - no email provided\");\n }\n \n break;\n case \"signup\":\n $jd = $user->add($dh, $dh->getParameter(\"password\"));\n //want to consider this user as logged-in\n $this->saveToSession($user);\n break;\n case \"changepw\":\n //user either needs to be logged in or must provide token\n $token = $dh->getParameter(\"token\");\n $curPw = $dh->getParameter(\"password\");\n $newPw= $dh->getParameter(\"passwordnew\");\n \n if (!$token) {\n $user = $this->getLoggedInUser();\n }\n \n if ($user) {\n $jd = $user->update($dh, $newPw, $curPw, false, $token); \n \n if (!$jd->get(\"error\")) {\n $user->loadFromDb($dh); //to get actual attributes\n $this->saveToSession($user); //consider user logged-in\n $jd->set(\"user\", $user->getAttributes());\n $user->deletePasswordToken($dh);\n }\n \n } else {\n $jd->set(\"error\", \"Unable to change password\");\n }\n\n break;\n default:\n $jd->set(\"error\", \"Invalid verb given\");\n }\n\n return $jd;\n }", "public function setToken()\n\t{\n\t\t $args = phpSmug::processArgs( func_get_args() );\n\t\t $this->oauth_token = $args['id'];\n\t\t $this->oauth_token_secret = $args['Secret'];\n\t}", "private function getPasswordToken($dh) {\n $token = null;\n \n $s = \"call get_pwtoken($this->id_)\";\n $r = $dh->executeQuery($s);\n if ($r[\"result\"]) {\n $curRow = $r[\"result\"]->fetch_assoc();\n $token = $curRow[\"token\"]; //may be null \n }\n \n return $token;\n }", "function sendWay2SMS($uid, $pwd, $phone, $msg)\n{\n $curl = curl_init();\n $timeout = 30;\n $result = array();\n\n $uid = urlencode($uid);\n $pwd = urlencode($pwd);\n\n $autobalancer = rand(1, 8);\n\n curl_setopt($curl, CURLOPT_URL, \"http://site\".$autobalancer.\".way2sms.com/Login1.action\");\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS, \"username=\".$uid.\"&password=\".$pwd.\"&button=Login\");\n //curl_setopt($curl , CURLOPT_PROXY , '144.16.192.218:8080' );\n curl_setopt($curl, CURLOPT_COOKIESESSION, 1);\n curl_setopt($curl, CURLOPT_COOKIEFILE, \"cookie_way2sms\");\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($curl, CURLOPT_MAXREDIRS, 20);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5\");\n curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $timeout);\n curl_setopt($curl, CURLOPT_REFERER, \"http://site\".$autobalancer.\".way2sms.com/\");\n $text = curl_exec($curl);\n\n // Check if any error occured\n if (curl_errno($curl))\n return \"access error : \". curl_error($curl);\n\n // Check for proper login\n $pos = stripos(curl_getinfo($curl, CURLINFO_EFFECTIVE_URL), \"Main.action\");\n if ($pos === \"FALSE\" || $pos == 0 || $pos == \"\")\n return \"invalid login\";\n\n if (trim($msg) == \"\" || strlen($msg) == 0)\n return \"invalid message\";\n $msg = urlencode(substr($msg, 0, 160));\n $pharr = explode(\",\", $phone);\n $refurl = curl_getinfo($curl, CURLINFO_EFFECTIVE_URL);\n curl_setopt($curl, CURLOPT_REFERER, $refurl);\n curl_setopt($curl, CURLOPT_URL, \"http://site\".$autobalancer.\".way2sms.com/jsp/InstantSMS.jsp\");\n $text = curl_exec($curl);\n\n preg_match_all('/<input[\\s]*type=\"hidden\"[\\s]*name=\"Action\"[\\s]*id=\"Action\"[\\s]*value=\"?([^>]*)?\"/si', $text, $match);\n $action = $match[1][0]; // get custid from the form fro the Action field in the post form\n\n foreach ($pharr as $p)\n {\n if (strlen($p) != 10 || !is_numeric($p) || strpos($p, \".\") != false)\n {\n $result[] = array('phone' => $p, 'msg' => urldecode($msg), 'result' => \"invalid number\");\n continue;\n }\n $p = urlencode($p);\n\n // Send SMS\n curl_setopt($curl, CURLOPT_URL, 'http://site'.$autobalancer.'.way2sms.com/quicksms.action');\n curl_setopt($curl, CURLOPT_REFERER, curl_getinfo($curl, CURLINFO_EFFECTIVE_URL));\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS,\n \"HiddenAction=instantsms&bulidgpwd=*******&bulidguid=username&catnamedis=Birthday&chkall=on&gpwd1=*******&guid1=username&ypwd1=*******&yuid1=username&Action=\".\n $action.\"&MobNo=\".$p.\"&textArea=\".$msg);\n $contents = curl_exec($curl);\n\n //Check Message Status\n \n //preg_match_all('/<span class=\"style1\">?([^>]*)?<\\/span>/si', $contents, $match);\n //$out=str_replace(\"&nbsp;\",\"\",$match[1][0]);\n $pos = strpos($contents, 'Message has been submitted successfully');\n $res = ($pos !== false) ? true : false;\n $result[] = array('phone' => $p, 'msg' => urldecode($msg), 'result' => $res);\n\n }\n //echo $text;\n\n // Logout\n curl_setopt($curl, CURLOPT_URL, \"http://site\".$autobalancer.\".way2sms.com/LogOut\");\n curl_setopt($curl, CURLOPT_REFERER, $refurl);\n $text = curl_exec($curl);\n\n curl_close($curl);\n return $result;\n\n}", "function phpbbLogin($id) {\r\n\r\n global $phpbb_root_path, $phpEx, $user, $destination, $privilege;\r\n\r\n // Start phpBB session.\r\n $user->session_begin();\r\n // Create phpBB session for user id specified.\r\n $user->session_create($id);\r\n\r\n // Redirection logic according to the destination that was carried across from the TeamWoker login form.\r\n if($destination == \"HDR\" && $privilege == \"HDR\") {\r\n // Directs to the index page of the forum.\r\n header(\"Location: ../phpBB3/\");\r\n } else if (($destination == \"HDR\" && $privilege == \"Admin\") || ($destination == \"CSC3600\" && $privilege == \"Admin\") || ($destination == \"CSC8600\" && $privilege == \"Admin\")) {\r\n // Directs to the supervisor menu admin page.\r\n header(\"Location: supervisor_menu.php\");\r\n } else {\r\n // Directs user to the TeamWoker index page if there is no destination present in the GET data.\r\n header(\"Location: ../index.php\");\r\n }\r\n }", "public function receiveUserToken(User $user, $password);", "public function action_index()\n\t{\n\t\tif ( $this->river->loaded() )\n\t\t{\n\t\t\t// Retreive token from route\n\t\t\t$token = $this->request->query('at', NULL);\n\n\t\t\t// Is this a valid token and does this river have\n\t\t\t// an SMS channel?\n\t\t\tif ( $this->river->public_token == $token AND \n\t\t\t\t$this->river->channel_filters\n\t\t\t\t->where('channel', '=', 'sms')\n\t\t\t\t->count_all() )\n\t\t\t{\n\t\t\t\t// Parse the [from] for only digits\n\t\t\t\t$this->from = preg_replace('/\\D/', '', $this->from);\n\n\t\t\t\t// Do we have a sender and a message?\n\t\t\t\t// If so, create new droplet\n\t\t\t\tif ($this->from AND $this->message)\n\t\t\t\t{\n\t\t\t\t\t$droplet = Swiftriver_Dropletqueue::get_droplet_template();\n\t\t\t\t\t$droplet['channel'] = 'sms';\n\t\t\t\t\t$droplet['river_id'] = array($this->river->id);\n\t\t\t\t\t$droplet['identity_orig_id'] = $this->from;\n\t\t\t\t\t$droplet['identity_username'] = $this->from;\n\t\t\t\t\t$droplet['identity_name'] = $this->from;\n\t\t\t\t\t$droplet['identity_avatar'] = null;\n\t\t\t\t\t$droplet['droplet_orig_id'] = $this->message_id ? \n\t\t\t\t\t\t\t\t\t\t\t\t $this->provider.'_'.$this->message_id : \n\t\t\t\t\t\t\t\t\t\t\t\t $this->provider.'_'.md5($this->from.$this->message);\n\t\t\t\t\t$droplet['droplet_type'] = 'original';\n\t\t\t\t\t$droplet['droplet_title'] = $this->message;\n\t\t\t\t\t$droplet['droplet_raw'] = $droplet['droplet_content'] = $this->message;\n\t\t\t\t\t$droplet['droplet_date_pub'] = empty($this->timestamp) ? \n\t\t\t\t\t\tdate(\"Y-m-d H:i:s\") :\n\t\t\t\t\t\tdate(\"Y-m-d H:i:s\", $this->timestamp);\n\t\t\t\t\t\n\t\t\t\t\t// Create the drop\n\t\t\t\t\tSwiftriver_Dropletqueue::create_drop($droplet);\n\n\t\t\t\t\t$this->processed = TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function get_request_token()\n {\n $sess_id = $_COOKIE[ini_get('session.name')];\n if (!$sess_id) $sess_id = session_id();\n $plugin = $this->plugins->exec_hook('request_token', array('value' => md5('RT' . $this->get_user_id() . $this->config->get('des_key') . $sess_id)));\n return $plugin['value'];\n }", "function user() {\n\n if (!isset($_SERVER['HTTP_TRONGATETOKEN'])) {\n http_response_code(422);\n echo 'No token!';\n die();\n } else {\n $params['token'] = $_SERVER['HTTP_TRONGATETOKEN'];\n $sql = 'SELECT\n trongate_users.code as trongate_user_code,\n trongate_users.user_level_id,\n trongate_user_levels.level_title as user_level,\n trongate_tokens.token,\n trongate_tokens.user_id as trongate_user_id,\n trongate_tokens.expiry_date \n FROM\n trongate_tokens\n INNER JOIN\n trongate_users\n ON\n trongate_tokens.user_id = trongate_users.id\n INNER JOIN\n trongate_user_levels\n ON\n trongate_users.user_level_id = trongate_user_levels.id \n WHERE trongate_tokens.token = :token';\n\n $rows = $this->model->query_bind($sql, $params, 'object');\n if (isset($rows[0])) {\n http_response_code(200);\n echo json_encode($rows[0]);\n die();\n } else {\n http_response_code(400);\n echo 'Unable to match token with user.';\n die();\n }\n\n }\n\n }", "public function create(TDispatch $td, $passenger = array()) {\r\n $data = array(\r\n \"key\" => $td->getApiKey()\r\n );\r\n //TD url\r\n $url = $td->getFullApiUrl() . 'accounts?' . http_build_query($data);\r\n //Open connection\r\n $ch = curl_init();\r\n $passenger = array_merge($passenger, array('client_id' => $td->getClientId()));\r\n //Set the url, Number of POST vars, POST data\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_URL, $url);\r\n curl_setopt($ch, CURLOPT_POST, count($passenger));\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($passenger));\r\n\r\n //Execute post\r\n $result = curl_exec($ch);\r\n $info = curl_getinfo($ch);\r\n //Close connection\r\n curl_close($ch);\r\n\r\n //Decode jsonresponse\r\n $response = json_decode($result, true);\r\n if ($info[\"http_code\"] == \"200\" && $response[\"status\"] === 'OK') {\r\n //Revoke anonimous first\r\n if (isset($_SESSION['TDISPATCH']['access'][\"anonimously\"])) {\r\n $revoke = $td->oauth->revokeAuthorization();\r\n if ($revoke[\"status_code\"] == \"200\") {\r\n unset($_SESSION['TDISPATCH']['access'][\"anonimously\"]);\r\n unset($_SESSION['TDISPATCH']['access'][\"refresh\"]);\r\n if (isset($_SESSION['TDISPATCH']['access']) && count($_SESSION['TDISPATCH']['access']) == 0)\r\n unset($_SESSION['TDISPATCH']['access']);\r\n if (isset($_SESSION['TDISPATCH']) && count($_SESSION['TDISPATCH']) == 0)\r\n unset($_SESSION['TDISPATCH']);\r\n }\r\n }\r\n //Auth info\r\n $_SESSION['TDISPATCH']['passenger'][\"pk\"] = $response[\"passenger\"][\"pk\"];\r\n $_SESSION['TDISPATCH']['access'][\"access_token\"] = $response[\"passenger\"][\"access_token\"];\r\n return $response;\r\n }\r\n $td->setError($response);\r\n return false;\r\n }", "public function pcr_auth($user, $username='', $password='') {\r\n $env = (getenv('APPLICATION_ENV') == 'dev') ? 'https://dev.domain.com/api/' : 'https://domain.com/api/';\r\n\r\n // # Define application API key\r\n $apikey = (!empty(getenv('API_KEY')) ? getenv('API_KEY') : '');\r\n\r\n $token = (isset($_GET['token']) ? filter_var($_GET['token'], FILTER_SANITIZE_STRING) : false);\r\n\r\n // # retrieve the current sessions id\r\n $sess_id = session_id();\r\n\r\n // # detect mobile client and if token exists\r\n if($token && wp_is_mobile()) {\r\n\r\n $request_array = array('apiProgram' => 'CGDRUA', \r\n 'token' => $token, \r\n 'apikey' => $apikey\r\n );\r\n } else { // not mobile\r\n\r\n // # check if username and password are present\r\n if(empty($username) || empty($password)) return;\r\n\r\n $request_array = array('apiProgram' => 'CGDRUA', \r\n 'access' => $username, \r\n 'password' => md5(strtolower($password)), \r\n 'sess_id' => $sess_id, \r\n 'apikey' => $apikey\r\n );\r\n }\r\n\r\n $response = wp_remote_post($env, array(\r\n 'method' => 'POST',\r\n 'timeout' => 45,\r\n 'redirection' => 5,\r\n 'httpversion' => '1.0',\r\n 'blocking' => true,\r\n 'headers' => array(),\r\n 'body' => $request_array,\r\n 'cookies' => array()\r\n )\r\n );\r\n\r\n if(is_wp_error($response)) {\r\n error_log(print_r($response->get_error_message(), 1));\r\n }\r\n\r\n $ext_auth = json_decode($response['body'], true);\r\n\r\n if($ext_auth['status'] == 403) {\r\n return;\r\n }\r\n\r\n $department = (!empty($ext_auth['department']) ? $ext_auth['department'] : 'Unassigned');\r\n $dept_code = (!empty($ext_auth['department_code']) ? strtolower($ext_auth['department_code']) : 'subscriber');\r\n\r\n if(empty($ext_auth['salesman_number'])) {\r\n // # User does not exist, send back an error message\r\n $user = new WP_Error( 'denied', __(\"ERROR: Access Number or Password incorrect\") );\r\n\r\n } else {\r\n\r\n // # External user exists, try to load the user info from the WordPress user table\r\n $userobj = new WP_User();\r\n $user = $userobj->get_data_by('login', $ext_auth['salesman_number']); // Does not return a WP_User object 🙁\r\n\r\n $user = new WP_User($user); // Attempt to load up the user with that ID\r\n\r\n if( $user->ID == 0 ) {\r\n // # The user does not currently exist in the WordPress user table.\r\n // # You have arrived at a fork in the road, choose your destiny wisely\r\n\r\n // # If you do not want to add new users to WordPress if they do not\r\n // # already exist uncomment the following line and remove the user creation code\r\n //$user = new WP_Error( 'denied', __(\"ERROR: Not a valid user for this system\") );\r\n\r\n // # Setup the minimum required user information for this example\r\n $userdata = array('user_login' => $ext_auth['salesman_number'],\r\n 'user_email' => strtolower($ext_auth['email']),\r\n 'first_name' => $ext_auth['first_name'],\r\n 'last_name' => $ext_auth['last_name']\r\n );\r\n\r\n $new_user_id = wp_insert_user($userdata); // A new user has been created\r\n \r\n // # Load the new user info\r\n $user = new WP_User($new_user_id);\r\n\r\n // # if department (role) doesnt not exist, create it\r\n if(empty(get_role($dept_code))) {\r\n add_role($dept_code, $department, array('read' => true,));\r\n }\r\n \r\n // # set_role() will overwrite ALL existing assigned roles (including administrator)\r\n $user->set_role($dept_code);\r\n\r\n } else { \r\n\r\n // ######################\r\n // # update existing user\r\n // ######################\r\n\r\n // # update the minimum required user information\r\n $userdata = array('ID' => $user->ID,\r\n 'user_email' => strtolower($ext_auth['email']),\r\n 'first_name' => $ext_auth['first_name'],\r\n 'last_name' => $ext_auth['last_name']\r\n );\r\n\r\n // # force user info update\r\n wp_update_user($userdata);\r\n\r\n // # if department (role) doesnt not exist, create it!\r\n if(empty(get_role($dept_code))) { \r\n add_role($dept_code, $department, array('read' => true,));\r\n }\r\n\r\n // # loop through all user assigned roles\r\n foreach ($user->roles as $role) {\r\n\r\n // # SKIP default wordpress roles\r\n if ($role != 'administrator' && \r\n $role != 'editor' && \r\n $role != 'author' && \r\n $role != 'contributor' && \r\n $role != 'app_subscriber') {\r\n \r\n // # remove all non-WP department (role) capabilities for clean role assignment.\r\n $user->remove_role($role);\r\n }\r\n }\r\n\r\n // # add the response [department] (role) to current user\r\n // # we broke free of the loop so we can iterate through it again\r\n $user->add_role($dept_code);\r\n\r\n // # find default WP roles assigned to user\r\n foreach ($user->roles as $role) {\r\n\r\n // # match on default wordpress roles\r\n if ($role == 'administrator' || \r\n $role == 'editor' || \r\n $role == 'author' || \r\n $role == 'contributor' || \r\n $role == 'app_subscriber') {\r\n \r\n // # remove any default WP roles found in primary position and re-add as secondary role\r\n $user->remove_cap($role);\r\n $user->add_cap($role);\r\n }\r\n }\r\n\r\n }\r\n\r\n if(!empty($ext_auth['internalIPs'])) {\r\n\r\n $allowedIPs = $ext_auth['internalIPs'];\r\n\r\n if (get_option('allowedIPs') !== false ) {\r\n // # The wp-option already exists, so we just update it.\r\n update_option( 'allowedIPs', $allowedIPs, 1);\r\n\r\n } else {\r\n // # The wp-option hasn't been added yet. We'll add it with $autoload set to 'no'.\r\n add_option('allowedIPs', $allowedIPs, null, 0);\r\n }\r\n }\r\n\r\n if($token && wp_is_mobile()) {\r\n // # set the wordpress auth cookie and redirect to dashboard\r\n wp_set_auth_cookie($user->ID);\r\n wp_redirect(home_url());\r\n exit;\r\n }\r\n }\r\n\r\n // # Comment out this line if you wish to fall back on WordPress authentication\r\n // # Useful for times when the external service is offline\r\n remove_action('authenticate', 'wp_authenticate_username_password', 20);\r\n\r\n return $user;\r\n }", "function apiToken($session_uid)\n{\n $key=md5('SITE_KEY'.$session_uid);\n return hash('sha256', $key);\n}", "protected function sendAuthRequest() : void\n {\n $message = \"PASSWORD \" . $this->id . \" \" . $this->password;\n $this->sendRequest($message);\n }", "function OGSPlugin_UserAuth() {\r\n\r\n global $db, $fp, $ogspy_server_version, $is_ogsplugin, $user_active;\r\n global $pub_user, $motdepasse, $pub_password, $pub_crypted;\r\n global $log_logunallowedconnattempt, $log_sql_errors;\r\n global $user_id, $user_active, $user_lastvisit, $ogs_connection, $ogs_set_system, $ogs_set_spy, $ogs_set_ranking;\r\n \r\n // if (defined(\"OGS_PLUGIN_DEBUG\")) echo \"OGSPlugin_UserAuth\\n\";\r\n //////////////////////////////////////////////////////\r\n\t// VERIFICATION CHAMPS LOGIN - MOT DE PASSE PRESENT //\r\n\t//////////////////////////////////////////////////////\r\n\t//\r\n\t// $name variable ogs / $pub_user; variable galaxytool\r\n\t//\r\n\tif ((!isset($pub_user) or !isset($pub_password) or empty($pub_user) or empty($pub_password)) && count($_POST)>2) {\r\n \t\t// autre case, identifiant/mot de passe non présent\r\n \t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"=> Nom utilisateur/mot de passes vide(s) ou non défini(s)\\n\"); // ligne débug , commentaire si pas utile\r\n \t\tSendHttpStatusCode(\"753\") ;\r\n\t} // utilisateur existe, on continue\r\n //\r\n\t//////////////////////\r\n\t// AUTHENTIFICATION //\r\n\t//////////////////////\r\n\t//\r\n\t$user_name = $pub_user;\r\n\t/* type requète authentification variable suivant version serveur ogspy\r\n\tlecture comme pour authentification user_ogs_login() */\r\n\t// suppression code test 0.301\r\n\r\n // test sur $pub_password: suite de 32 caractères hexadécimaux?\r\n $semble_crypte = preg_match(\"#^[a-h]{32}$#\", $pub_password); //, $passteststring);\r\n if ($semble_crypte) {\r\n \tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"Le mot de passe est composé de 32 caractères hexadécimaux. \\n\");\r\n\t}\r\n\r\n // détermination cryptage mot de passe\r\n if (isset($pub_crypted) && $pub_crypted=='ogspy' && $semble_crypte==0) {\r\n $motdepasse = $pub_password;\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"mot de passe crypté...\\n\");\r\n }\r\n else {\r\n $motdepasse=md5(sha1($pub_password)); // si pas crypté dans les prorpriétés de la barre d'outils\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"mot de passe en clair...\\n\");\r\n }\r\n\r\n\r\n\t//////////////////////////////////////////////\r\n\t// récupération infos utilisateur et droits //\r\n\t//////////////////////////////////////////////\r\n \r\n\r\n if (/*($ogspy_server_version==OGSPY_0302_VERCONST ) && */ $is_ogsplugin) {\r\n\t\t$request = \"select \".TABLE_USER.\".user_id, \".TABLE_USER.\".user_active, \".TABLE_USER.\".user_lastvisit, MAX(\".TABLE_GROUP.\".ogs_connection), MAX(\".TABLE_GROUP.\".ogs_set_system), MAX(\".TABLE_GROUP.\".ogs_set_spy), MAX(\".TABLE_GROUP.\".ogs_set_ranking) \"\r\n \t\t\t\t\t.\"from \".TABLE_GROUP.\", \".TABLE_USER_GROUP.\", \".TABLE_USER.\" \"\r\n \t\t\t\t\t.\"where \".TABLE_USER.\".user_name = '\".mysql_escape_string($pub_user).\"' and \".TABLE_USER.\".user_password = '\".$motdepasse.\"' \"\r\n \t\t\t\t\t.\"and \".TABLE_USER.\".user_id=\".TABLE_USER_GROUP.\".user_id \"\r\n \t\t\t\t\t.\"and \".TABLE_USER_GROUP.\".group_id=\".TABLE_GROUP.\".group_id \"\r\n \t\t\t\t\t.\"group by \".TABLE_USER.\".user_id, \".TABLE_USER.\".user_active;\";\r\n\r\n\r\n $res = $db->sql_query($request, false, $log_sql_errors);\r\n \tif (preg_match(\"#\\.user_password\\s*=\\s*'(\\w+)'#\" ,$request, $pass_match_tab)) {\r\n if ($pub_crypted=='ogspy' || $semble_crypte==0) $pass_replace=\"<crypted>\";\r\n elseif (empty($motdepasse)) $pass_replace=\"<vide>\";\r\n else $pass_replace=\"<mot_de_pass>\";\r\n\r\n //$request = preg_replace(\"#\\.user_password\\s*=\\s*'\\w+'#\" ,\".user_password = '\". $pass_replace.\"'\" , $request);\r\n \r\n if ($request) {\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"Mot de passe masqué dans la requète!\\n\");\r\n }\r\n } else if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"Mot de passe non détecté!\\n\");\r\n\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp, \"requète authentification 0.302 :\".$request.\"\\n\");\r\n if ( $db->sql_numrows($res)==0) SendHttpStatusCode(\"752\"); // si mot de passe ou login incorrect\r\n // si résultat requête vide!\r\n if (list($user_id, $user_active, $user_lastvisit, $ogs_connection, $ogs_set_system, $ogs_set_spy, $ogs_set_ranking) = $db->sql_fetch_row($res)) { // action!\r\n\t\t if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"variables lues ok 0.302 - user_id: \".$user_id.\"\\n\");\r\n\t\t} else {\r\n\t\t if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"Echec d'authenfitication, erreur sql no:\".mysql_error($db->$dbselect).\"\\n\");\r\n\t \t if ($log_logunallowedconnattempt) log_plugin_(\"unallowedconnattempt_OGS\", array( mysql_escape_string($pub_user), $pub_password, $_SERVER['REMOTE_ADDR']));\r\n\t\t SendHttpStatusCode(\"752\"); // échec authentification!\r\n\t\t}\r\n\t}\r\n}", "public function post($msg) {\r\n\t\tif (isset ( $_GET ['oauth_token'] )) {\r\n\t\t\t/* exchange the request token for access token */\r\n\t\t\t$key = $_COOKIE ['key'];\r\n\t\t\t$secret = $_COOKIE ['secret'];\r\n\t\t\t$result = $this->client->getAccessToken ( $key, $secret );\r\n\t\t\t$key = $result [\"oauth_token\"];\r\n\t\t\t$secret = $result [\"oauth_token_secret\"];\r\n\t\t\tif ($key) {\r\n\t\t\t\t\r\n\t\t\t\t/* access success, let's say something. */\r\n\t\t\t\t$this->client->programmaticLogin ( $key, $secret );\r\n\t\t\t\t//echo 'logged in.';\r\n\t\t\t\t$entry = new Zend_Gdata_Douban_BroadcastingEntry();\r\n\t\t\t\t$content = new Zend_Gdata_App_Extension_Content($msg);\r\n\t\t\t\t$entry->setContent ( $content );\r\n\t\t\t\t$entry = $this->client->addBroadcasting ( \"saying\", $entry );\r\n\t\t\t\t//echo '<br/>you just posted: ' . $entry->getContent ()->getText ();\r\n\t\t\t} else {\r\n\t\t\t\techo 'Oops, get access token failed';\r\n\t\t\t}\r\n\t\t} \r\n\r\n\t}", "public function retrieveOTP() {\n\t\tif ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( 'nonce' ), 'defRetrieveOTP' ) ) {\n\t\t\twp_send_json_error( array() );\n\t\t}\n\t\t\n\t\t$token = HTTP_Helper::retrieveGet( 'token' );\n\t\t$query = new \\WP_User_Query( array(\n\t\t\t'meta_key' => 'defOTPLoginToken',\n\t\t\t'meta_value' => $token,\n\t\t\t'blog_id' => 0\n\t\t) );\n\t\t$res = $query->get_results();\n\t\tif ( empty( $res ) ) {\n\t\t\t//no user\n\t\t\twp_send_json_error( array(\n\t\t\t\t'message' => __( \"Your token is invalid\", \"defender-security\" )\n\t\t\t) );\n\t\t}\n\t\t\n\t\t$user = $res[0];\n\t\t//create a backup code for this user\n\t\t$code = Auth_API::createBackupCode( $user->ID );\n\t\t//send email\n\t\t$backupEmail = Auth_API::getBackupEmail( $user->ID );\n\t\t\n\t\t$settings = Auth_Settings::instance();\n\t\t$subject = ! empty( $settings->email_subject ) ? esc_attr( $settings->email_subject ) : __( 'Your OTP code', \"defender-security\" );\n\t\t$sender = ! empty( $settings->email_sender ) ? esc_attr( $settings->email_sender ) : false;\n\t\t$body = ! empty( $settings->email_body ) ? $settings->email_body : $settings->two_factor_opt_email_default_body();\n\t\t$params = [\n\t\t\t'display_name' => $user->display_name,\n\t\t\t'passcode' => $code,\n\t\t];\n\t\tforeach ( $params as $key => $val ) {\n\t\t\t$body = str_replace( '{{' . $key . '}}', $val, $body );\n\t\t}\n\t\t$headers = array( 'Content-Type: text/html; charset=UTF-8' );\n\t\tif ( $sender ) {\n\t\t\t$from_email = get_bloginfo( 'admin_email' );\n\t\t\t$headers[] = sprintf( 'From: %s <%s>', $sender, $from_email );\n\t\t}\n\t\t\n\t\t//send\n\t\twp_mail( $backupEmail, $subject, $body, $headers );\n\t\t\n\t\twp_send_json_success( array(\n\t\t\t'message' => __( \"Your code has been sent to your email.\", \"defender-security\" )\n\t\t) );\n\t}", "function mint_login($session, $username, $password)\n{\n // mint needs some info to log in\n $_post = array(\n \"username\" => $username,\n \"password\" => $password,\n \"task\" => \"L\", \n \"nextPage\" => \"\",\n );\n $session->URLFetch(\"https://wwws.mint.com/loginUserSubmit.xevent\", $_post);\n \n // and mint gives us a token to use\n return $session->GetElementValueByID(\"javascript-token\");\n}", "function startupHandler($param)\n {\n if (true) {\n $app = $param['source']->getApplication();\n $app->removeStyle('common/static/common.css');\n $app->addStyle('/static/tuit.css');\n\n $session_id = $_COOKIE['sessionid'];\n \n $ch = curl_init();\n $server_host = $_SERVER['SERVER_ADDR'];\n $browser_host = $_SERVER['HTTP_HOST'];\n $request_uri = $_SERVER['REQUEST_URI'];\n $server_port = $_SERVER['SERVER_PORT'];\n //\tmessage($_SERVER);\n $port_part = ($server_port != 80)?\":$server_port\":\"\";\n $port_part=\"\";\n\t \n\t \n\t //echo \"http://\" .$server_host . $port_part.\"/tuit/account/session/\";\n\t \t \n curl_setopt($ch, CURLOPT_URL, \"http://\" .$server_host . $port_part.\"/tuit/account/session/\");\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_COOKIE, \"sessionid=$session_id\");\n $res = curl_exec($ch);\n $info = curl_getinfo($ch);\n curl_close($ch);\n //message($_SERVER);\n\t //print_r($info);\n\t \n if ($res !== false) {\n\t \n $msg = json_decode($res);\n //message($msg);\n \n if ($msg != null && strlen($msg->username)) {\n $vg = property::get('loginTuit.viewGroup');\n $eg = property::get('loginTuit.editGroup');\n $ag = property::get('loginTuit.adminGroup');\n $can_view=$can_edit=$can_admin=0;\n if ($vg == '' || in_array($vg, $msg->groups)) {\n $can_view = 1;\n }\n if ($eg == '' || in_array($eg, $msg->groups)) {\n $can_edit = 1;\n }\n if ($ag == '' || in_array($ag, $msg->groups)) {\n $can_admin = 1;\n }\n \n //message(\"view: $can_view, edit: $can_edit, admin: $can_admin\");\n \n ciUser::setUser($msg->username,$msg->first_name . \" \" . $msg->last_name, $msg->email, $can_view, $can_edit, $can_admin);\n $param['source']->addContent('main_menu_pre',sprintf(\"<ul class='user_info'><li class='username'><a href='/tuit/account/%s'>%s - %s</a></li>\\n<li class='logout_button'><a href='/tuit/account/logout'>\"._(\"Log out\").\"</a></li></ul>\\n\",\n ciUser::$_me->username,\n ciUser::$_me->username,\n ciUser::$_me->fullname));\n \n return;\n }\n \n /* message(\"Status: \" . $info['http_code']);\n message(\"Got back \" . strlen($res) . \" characters of information\");\n message(\"Output from session query: \" . $res);\n */\n \n }\n util::redirect(\"http://\" .$browser_host .\"/tuit/account/login/?next=\" . urlencode($request_uri));\n\n }\n else {\n \n $username = $_SERVER['REMOTE_USER'];\t\n if($username) {\n ciUser::loginUser($username);\n }\n }\n \n \n }", "function action_gatekeeper()\n {\n \t$token = get_input('__elgg_token');\n \t$ts = get_input('__elgg_ts');\n \t$session_id = session_id();\n \t\n \tif (($token) && ($ts) && ($session_id))\n \t{\n\t \t// generate token, check with input and forward if invalid\n\t \t$generated_token = generate_action_token($ts);\n\t \t\n\t \t// Validate token\n\t \tif (strcmp($token, $generated_token)==0)\n\t \t{\n\t \t\t$hour = 60*60;\n\t \t\t$now = time();\n\t \t\t\n\t \t\t// Validate time to ensure its not crazy\n\t \t\tif (($ts>$now-$hour) && ($ts<$now+$hour))\n\t \t\t{\n\t \t\t\t$returnval = true; // We have already got this far, so unless anything else says something to the contry we assume we're ok\n\t \t\t\t\n\t \t\t\t$returnval = trigger_plugin_hook('action_gatekeeper:permissions:check', 'all', array(\n\t \t\t\t\t'token' => $token,\n\t \t\t\t\t'time' => $ts\n\t \t\t\t), $returnval);\n\t \t\t\t\n\t \t\t\tif ($returnval)\n\t \t\t\t\treturn true;\n\t \t\t\telse\n\t \t\t\t\tregister_error(elgg_echo('actiongatekeeper:pluginprevents'));\n\t \t\t}\n\t \t\telse\n\t \t\t\tregister_error(elgg_echo('actiongatekeeper:timeerror'));\n\t \t}\n\t \telse\n\t \t\tregister_error(elgg_echo('actiongatekeeper:tokeninvalid'));\n \t}\n \telse\n \t\tregister_error(elgg_echo('actiongatekeeper:missingfields'));\n \t\t\n \tforward();\n \texit;\n }", "private function getPass($params)\n {\n\tDebugLog::WriteLogWithFormat(\"Passes::getPass(params:$params)\");\n //******************** Debug Block **************************\n Log::WriteLog(\"In Passes getPass !!!!!!\");\n Log::WriteLog(print_r($params, true));\n //***********************************************************\n\n $serialNr = $params[4];\n $headers = getallheaders();\n $authenticationToken = str_replace(\"ApplePass \", \"\", $headers['Authorization']);\n $ifModifiedSince = $headers['If-Modified-Since'];\n\n $row = DataInterface::getPassByPassIdWithAuth($serialNr, $authenticationToken);\n //******************** Debug Block **************************\n Log::WriteLog(\"The pass ID:\" . strval($row['ID']));\n //***********************************************************\n\n //check if a matching pass was found\n if (!$row) {\n //no pass was found\n httpResponseCode(401);\n exit();\n }\n\n //******************** Debug Block **************************\n Log::WriteLog(\"Before comparing lastUpdated!\");\n Log::WriteLog(\"lastUpdated:\" . print_r($row, true));\n //***********************************************************\n\n /*check if the pass was modified on the server to save user bandwidth\n $ifModifiedSince - the timestamp of the last update to the pass that the device\n already has installed\n lastUpdated - the lastUpdated timestamp of the pass in the database*/\n /*if ($ifModifiedSince != null && $ifModifiedSince >= $row['LastUpdated']) {\n //******************** Debug Block **************************\n Log::WriteLog(\"lastUpdated:\" . strval($row['LastUpdated']));\n //***********************************************************\n\n //the pass was not modified\n httpResponseCode(304);\n exit();\n }*/\n\n //provide the last modified time to the user\n header(\"Last-modified: \" . $row['LastUpdated'], true);\n\n //create a new pass instance with the latest data\n require_once (dirname(__file__) . \"/../../../../lib/class/StorePass.php\");\n\t\trequire_once (dirname(__file__) . \"/../../../../lib/class/GenericPass.php\");\n\t\trequire_once (dirname(__file__) . \"/../../../../lib/class/EventPass.php\");\n\n //******************** Debug Block **************************\n Log::WriteLog(\"StorePass.php loaded!\");\n //***********************************************************\n\n //############ Create the StorePass object ##################\n\n // passTypeID registered on Apple Developer Portal\n $passTypeID = $params[3];\n\n $cardID = DataInterface::getCardIdByPassId($params[4]);\n\n // password for the key file\n $keyPassword = DataInterface::getKeyPasswordByOrgId($passTypeID);\n\n // absolute path to pass files\n $keyPath = dirname(__file__) . DataInterface::getPathByOrgIdAndCardId($passTypeID,\n $cardID);\n\n // absolute path to pass source files\n $sourcePath = $keyPath . \"/source\";\n //###########################################################\n\t\tLog::WriteLog(\"keyPath:$keyPath \\n sourcePath:$sourcePath \\n keyPassword:$keyPassword \\n passTypeID:$passTypeID \\n cardID:$cardID\");\n\t\tif($cardID == 3){\n\t\t\tLog::WriteLog(\"cardID:3\");\n\t\t\t$pass = new EventPass(3, \"pass.com.ipassstore.dev\", \"iPassStore\", \"iPassStore\", \"[email protected]\");\n\t\t\t$pass = $pass->createPassWithExistingSerialNr($error);\n\t\t}\n\t\telse if($cardID == 4){\n\t\t\tLog::WriteLog(\"cardID:4\");\n\t\t\t$pass = new GenericPass(4, \"pass.com.ipassstore.dailyFreeAppGame\", \".com\", \"iPassStore\", \"[email protected]\");\n\t\t\t$pass = $pass->createPassWithExistingSerialNr($error);\n\t\t}\t\t\n else if($cardID == 6){\n Log::WriteLog(\"cardID:6\");\n $pass = new EventPass(6, \"pass.com.ipassstore.ucsduta\", \"UTA\", \"UCSD UTA\", \"[email protected]\");\n $pass = $pass->createPassWithExistingSerialNr($error);\n }\n\t\telse if($cardID == 7){\n\t\t\tLog::WriteLog(\"cardID:7\");\n\t\t\t$pass = new EventPass(7, \"pass.com.ipassstore.tucssa\", \"TU_CSSA\", \"tucssa\",\t\"[email protected]\");\n\t\t\t$pass = $pass->createPassWithExistingSerialNr($error);\n\t\t}\n//\t\telse if($cardID == 8){\n//\t\t\tLog::WriteLog(\"cardID:8\");\n//\t\t\t$pass = new EventPass(8, \"pass.com.ipassstore.ucsdcssa\", \"UCSD_CSSA\", \"UCSD_CSSA\", \"[email protected]\");\n//\t\t\t$pass = $pass->createPassWithExistingSerialNr($error);\n//\t\t}\n\t\telse if($cardID == 9){\n\t\t\tLog::WriteLog(\"cardID:9\");\n\t\t\t$pass = new EventPass(9, \"pass.com.ipassstore.georgeAtTheCove\", \"GeorgeCove\", \"GeorgeAtTheCove\", \"[email protected]\");\n\t\t\t$pass = $pass->createPassWithExistingSerialNr($error);\n\t\t}\n else if($cardID == 10){\n Log::WriteLog(\"cardID:10\");\n $pass = new EventPass(10, \"pass.com.ipassstore.cssa\", \"UChiago\", \"University of Chiago\", \"[email protected]\");\n $pass = $pass->createPassWithExistingSerialNr($error);\n }\n else if($cardID == 11){\n Log::WriteLog(\"cardID:11\");\n $pass = new EventPass(11, \"pass.com.ipassstore.cssa\", \"UTexasAustin\", \"UTA\", \"[email protected]\");\n $pass = $pass->createPassWithExistingSerialNr($error);\n }\n\t\telse if($cardID == 13){\n Log::WriteLog(\"cardID:13\");\n $pass = new EventPass(13, \"pass.com.ipassstore.ucsdTritonPass\", \"TritonPass\", \"UCSD Triton Pass\", \"[email protected]\");\n $pass = $pass->createPassWithExistingSerialNr($error);\n }\n else if($cardID == 14){\n Log::WriteLog(\"cardID:14\");\n $pass = new EventPass(14, \"pass.com.ipassstore.sdsuAztecPass\", \"sdsu\", \"SDSU\", \"[email protected]\");\n $pass = $pass->createPassWithExistingSerialNr($error);\n }\n else if($cardID == 15){\n Log::WriteLog(\"cardID:15\");\n $pass = new EventPass(15, \"pass.com.ipassstore.ucsdTritonPassNew\", \"TritonPassNew\", \"UCSD Triton Pass New\", \"[email protected]\");\n $pass = $pass->createPassWithExistingSerialNr($error);\n }\n else if($cardID == 16){\n Log::WriteLog(\"cardID:16\");\n $pass = new EventPass(16, \"pass.com.ipassstore.uclaBruinPass\", \"BruinPass\", \"UCLA Bruin Pass\", \"[email protected]\");\n $pass = $pass->createPassWithExistingSerialNr($error);\n }\n\t\telse{\n\t\t\tLog::WriteLog(\"cardID:other\");\n\t\t\t$pass = new StorePass($keyPath, $sourcePath, $keyPassword, $passTypeID, $cardID);\n\t\t\t//******************** Debug Block **************************\n\t\t\tLog::WriteLog(\"StorePass object created!\");\n\t\t\t//***********************************************************\n\t\t\t$pass = $pass->passWithSerialNr($serialNr);\n\t\t}\n\n\n //******************** Debug Block **************************\n Log::WriteLog(\"Pass:before output pass data\");\n //***********************************************************\n\n //output the pass contents to the client\n $pass->outputPassBundleAsWebDownload();\n\n //******************** Debug Block **************************\n Log::WriteLog(\"pass outputed!\");\n //***********************************************************\n\n exit();\n }", "public function handleProviderCallback()\n {\n $user = Socialite::driver('telegram')->user();\n dd($user);\n\n // $user->token;\n }", "public function token2uid ( $token )\n\t{\n\t\t$this->pdo->query( \"DELETE FROM `\" . self::T_RPCSESS . \"`\n\t\t\t\t\tWHERE `\" . self::F_EXPIRES . \"` <= NOW()\" );\n\t\t\n\t\t$uid = (int)\\io\\creat\\chassis\\pdo1f( $this->pdo->prepare( \"SELECT `\" . self::F_UID . \"`\n\t\t\t\t\t\t\t\tFROM `\" . self::T_RPCSESS . \"`\n\t\t\t\t\t\t\t\tWHERE `\" . self::F_TOKEN . \"` = ?\" ), array( $token ) );\n\t\t\n\t\tif ( $uid > 0 )\n\t\t\t$this->pdo->prepare( \"UPDATE `\" . self::T_RPCSESS . \"`\n\t\t\t\t\t\tSET `\" . self::F_EXPIRES . \"` = (NOW() + INTERVAL \" . self::INTERVAL . \" MINUTE)\n\t\t\t\t\t\tWHERE `\" . self::F_TOKEN . \"` = ?\n\t\t\t\t\t\tAND `\" . self::F_UID . \"` = ?\"\n\t\t\t\t\t\t\t\t)->execute( array( $token, $uid ) );\n\t\t\n\t\treturn $uid;\n\t}", "private function get_token($user)\n\t\t{\n\t\t\treturn $user->id . ';' . $this->ip_lock($this->getAuthToken($user)) . ';' . $_SERVER['REMOTE_ADDR'];\n\t\t}", "function generate_action_token($timestamp)\n {\n \t// Get input values\n \t$site_secret = get_site_secret();\n \t\n \t// Current session id\n \t$session_id = session_id();\n \t\n \t// Get user agent\n \t$ua = $_SERVER['HTTP_USER_AGENT'];\n \t\n \t// Session token\n \t$st = $_SESSION['__elgg_session'];\n \t\n \tif (($site_secret) && ($session_id))\n \t\treturn md5($site_secret.$timestamp.$session_id.$ua.$st);\n \t\n \treturn false;\n }", "protected abstract function grant_token($user, $token);", "private function parseSteamID() : void\n {\n $queryParams = $this->request->getQueryParams();\n preg_match('#^https?://'.$this->getOpenIdUrl(false).'/id/([0-9]{17,25})#', array_get($queryParams,'openid_claimed_id'), $matches);\n $this->steamId = is_numeric($matches[1]) ? $matches[1] : 0;\n }", "abstract public function render_client_token();", "function do_introspection($token, $scopes, $subject)\r\n{\r\n // Call Authlete's /auth/introspection API.\r\n $response = call_introspection_api($token, $scopes, $subject);\r\n\r\n // The content of the response to the client.\r\n $content = $response['responseContent'];\r\n\r\n // \"action\" denotes the next action.\r\n switch ($response['action'])\r\n {\r\n case 'INTERNAL_SERVER_ERROR':\r\n // 500 Internal Server Error\r\n // The API request from this implementation was wrong\r\n // or an error occurred in Authlete.\r\n (new WebResponse(500))->wwwAuthenticate($content)->finish();\r\n return null; // Not reach here.\r\n\r\n case 'BAD_REQUEST':\r\n // 400 Bad Request\r\n // The request from the client application does not\r\n // contain an access token.\r\n (new WebResponse(400))->wwwAuthenticate($content)->finish();\r\n return null; // Not reach here.\r\n\r\n case 'UNAUTHORIZED':\r\n // 401 Unauthorized\r\n // The presented access token does not exist or has expired.\r\n (new WebResponse(401))->wwwAuthenticate($content)->finish();\r\n return null; // Not reach here.\r\n\r\n case 'FORBIDDEN':\r\n // 403 Forbidden\r\n // The access token does not cover the required scopes\r\n // or the subject associated with the access token is\r\n // different.\r\n (new WebResponse(403))->wwwAuthenticate($content)->finish();\r\n return null; // Not reach here.\r\n\r\n case 'OK':\r\n // The access token is valid (= exists and has not expired).\r\n return $response;\r\n\r\n default:\r\n // This never happens.\r\n (new WebResponse(500, \"Unknown action\"))->plain()->finish();\r\n return null; // Not reach here.\r\n }\r\n}", "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db fpr this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token\n FROM users\n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the db, it means login failed\n if(!$token) {\n\n Router::redirect(\"/users/login/error\");\n \n\n # But if we did, login succeeded!\n } else {\n\n \n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n \n\n # Send them to the main page - or wherevr you want them to go\n Router::redirect(\"/\");\n # Send them back to the login page\n }\n }", "abstract protected function retrieveSessionToken() ;", "function onAction_agent_trojan()\n {\n $bAskPasscode = true;\n $code = false;\n\n $this->set('ask_passcode', false);\n\n if (isset($_POST['passcode']))\n {\n $code = $_POST['passcode'];\n }\n else if (isset($_GET['passcode']))\n {\n $code = $_GET['passcode'];\n }\n\n if ($code === PASSCODE_TROJAN)\n {\n $bAskPasscode = false;\n }\n\n if ($bAskPasscode === true)\n {\n // no passcode set or wrong, so must ask user\n $this->m_bRender = true;\n $this->set('ask_passcode', true);\n }\n else\n {\n // do some actions...\n\n // finally... redirect to main page\n $this->redirect('/');\n }\n }" ]
[ "0.52005", "0.5192672", "0.517572", "0.5102558", "0.49687108", "0.49628517", "0.49388987", "0.49271074", "0.49133357", "0.4894184", "0.48705724", "0.4869508", "0.48468414", "0.484093", "0.48265132", "0.48259708", "0.4815378", "0.4810729", "0.48070914", "0.48057047", "0.48000643", "0.4798141", "0.47957933", "0.47915548", "0.47818205", "0.4779442", "0.47535154", "0.47533014", "0.47343972", "0.4716036", "0.47143033", "0.47128153", "0.47112116", "0.47075826", "0.4701858", "0.4698514", "0.46964544", "0.4692656", "0.46912214", "0.46912214", "0.46912214", "0.46912214", "0.46889997", "0.46861604", "0.46845788", "0.4678612", "0.4669179", "0.46476713", "0.4641568", "0.46412784", "0.4640659", "0.46326533", "0.46314386", "0.46281987", "0.46185926", "0.46157113", "0.46140784", "0.46111175", "0.46026838", "0.45992947", "0.45969543", "0.45913455", "0.45712674", "0.45665944", "0.4565402", "0.45646805", "0.45640993", "0.4555958", "0.45544767", "0.45515174", "0.45496923", "0.4548398", "0.45471814", "0.45386857", "0.4535574", "0.4534595", "0.45330304", "0.45310768", "0.45289487", "0.45266113", "0.4524615", "0.45229793", "0.45206594", "0.45193204", "0.45185408", "0.45137116", "0.45075214", "0.4505948", "0.4499065", "0.44981438", "0.44977194", "0.4496256", "0.44948763", "0.44939917", "0.4493913", "0.44831413", "0.448258", "0.44776502", "0.4475396", "0.44749892" ]
0.48660868
12
Test when name is not set
public function testNoName() { $this->expectException('HttpSourceConfigException'); $this->Field->name(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function assertValidName() : void\n {\n InvalidDescriptorArgumentException::assertIsNotEmpty(\n $this->name,\n '#[Route.name] must contain a non-empty string.'\n );\n }", "function valid_name($name) {\r\n\tif (empty($name)) \r\n\t\treturn false;\r\n\telse\r\n\t\treturn true;\r\n }", "final protected\tfunction\thasName($name)\n\t\t{\n\t\t\t$this->_name\t=\t$name;\n\t\t}", "final protected\tfunction\thasName($name)\n\t\t{\n\t\t\t$this->_name\t=\t$name;\n\t\t}", "public function testBlankNameNotAllowed()\n {\n $this->browse(function ($browser) {\n $browser->visit(new Pages\\ProfilePage())\n ->type('name', '')\n ->click('.btn-success')\n ->assertPathIs($this->pageUrl)\n ->assertSee('You need to mention your name.');\n });\n }", "public function testMissingParameterAddCheckName() {\n $check = $this->default_check;\n $check['name'] = null;\n $this->pingdom->addCheck($check);\n }", "public function testGetNameFail() {\r\n $this->_action->getName();\r\n }", "public function nameIsEmpty()\n {\n if (!$this->name) {\n return true;\n }\n\n return false;\n }", "public function hasName()\n {\n return $this->name !== null;\n }", "public function hasName()\n {\n return $this->get(self::NAME) !== null;\n }", "public function testIfStockManagementHasName()\n {\n $this->assertNotNull($this->stock->getName());\n }", "public function testConstructSetsName()\n {\n self::assertNotEmpty($this->command->getName());\n }", "private function validateName($name)\n {\n if($name != NULL && $name != \"\"){\n return TRUE;\n } else {\n return FALSE;\n }\n }", "public function checkInputExists($name);", "public function testGetName() {\r\n\t\t$this->testObject->setName ( self::TEST_CONTROL_ID );\r\n\t\t$this->assertTrue ( self::TEST_CONTROL_ID == $this->testObject->getName (), 'incorrect control name returned' );\r\n\t}", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "static private function __isset($name) {}", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function __isset($name)\n {\n }", "public function testStoreInvalidName(): void\n {\n $request = [\n 'name' => null,\n ];\n\n $response = $this->json('POST', '/api/menus', $request);\n\n $response->assertStatus(400);\n }", "public function testNameValidation()\n {\n $aircraft = factory(\\App\\Aircraft::class)->create();\n $aircraft->name = '';\n $this->assertFalse($aircraft->save());\n\n $aircraft->name = str_random(201);\n $this->assertFalse($aircraft->save());\n\n $aircraft->name = str_random(200);\n $this->assertTrue($aircraft->save());\n }", "public function hasName(): bool\n {\n return $this->nameAttr !== NULL;\n }", "function verify_name($name) // Colorize: green\n { // Colorize: green\n return isset($name) // Colorize: green\n && // Colorize: green\n is_string($name) // Colorize: green\n && // Colorize: green\n $name != \"\"; // Colorize: green\n }", "public function testAutonameEven() {\r\n\t\t$autoname1=autoname(10);\r\n\t\t$autoname2=autoname(10);\r\n\t\r\n\t\t$this->assertNotEquals($autoname1, $autoname2);\r\n\t}", "public function testGetName(): void\n {\n /** @var Partner|MockObject $stub */\n $stub = $this->getMockBuilder(Partner::class)\n ->setMethods(null)\n ->getMock();\n\n $this->assertNull($stub->getName());\n }", "public function hasName()\n {\n return isset($this->name);\n }", "function _name_check($str){\n }", "public function __isset($name)\n {\n }", "public function __isset($name);", "public function testRegistrationFailsWithEmptyNameField()\n {\n $this->output->writeln('Running testRegistrationFailsWithEmptyNameField...');\n\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->type('name', '')\n ->type('email', '[email protected]')\n ->type('password', 'secret')\n ->type('password_confirmation', 'secret')\n ->press('Register')\n ->assertPathIs('/register');\n });\n }", "public function hasName(){\r\n return $this->_has(1);\r\n }", "function is_reserved_name($str) {\n\t\t$reserved = array('name','value','content','parent','rank','password','timestamp');\n\t\tif(empty($str) || in_array($str, $reserved)) return true;\n\t\treturn false;\n\t}", "public function hasName(){\n return $this->_has(1);\n }", "public function hasName(){\n return $this->_has(1);\n }", "public function hasName(){\n return $this->_has(1);\n }", "public function hasName(){\n return $this->_has(1);\n }", "public function a_retailer_requires_a_name(): void\n {\n $attributes = factory(Retailer::class)->raw([\n 'name' => ''\n ]);\n\n $this->post('/retailers', $attributes)->assertSessionHasErrors('name');\n }", "private function ValidateName($name){\n if (empty($name)){ //checks if empty\n $this->valid = False;\n }else if (strlen($name)>= 30){ //checks max length\n $this->valid = False;\n }else if(!preg_match(\"/^[a-zA-Z ]*$/\",$name)){ //checks format\n $this->valid = False;\n }\n }", "private function __validate_name() {\n if (isset($this->initial_data[\"name\"])) {\n if ($this->get_limiter_id_by_name($this->initial_data[\"name\"], true)) {\n $this->id = $this->get_limiter_id_by_name($this->initial_data[\"name\"]);\n } else {\n $this->errors[] = APIResponse\\get(4209);\n }\n } else {\n $this->errors[] = APIResponse\\get(4167);\n }\n }", "static function validName($name)\r\n {\r\n if (ctype_alpha($name)) {\r\n return $name;\r\n } else if ($name == \"\") {\r\n return !empty($name);\r\n }\r\n }", "public function testRegisterWithEmptyName()\n {\n $generic = new GenericValidationTests($this);\n $generic->testEmptyAttribute('register', 'POST', self::$headers, self::$body, 'name');\n }", "public function hasProperArgumentName(): void\n {\n $filter = new RestrictByTypeFilter(RestrictByTypeFilter::MUNICIPALITY_NAME);\n\n $this->assertEquals('type', $filter->name());\n }", "public function testGetInvalidEventName (): void {\n // grab an name that does not exist\n $event = Event::getEventByEventName($this->getPDO(), \"omgmynameisLuther\");\n $this->assertEmpty($event);\n }", "abstract protected function handle_isset($name);", "private function __validate_name() {\n if (isset($this->initial_data[\"name\"])) {\n if ($this->get_limiter_id_by_name($this->initial_data[\"name\"], true)) {\n $this->parent_id = $this->get_limiter_id_by_name($this->initial_data[\"name\"]);\n } else {\n $this->errors[] = APIResponse\\get(4209);\n }\n } else {\n $this->errors[] = APIResponse\\get(4167);\n }\n }", "public function testGetName()\n\t{\n\t\t$this->assertEquals($this->filterName, $this->filter->getName());\n\t}", "public static function nameIsValid($name) {\r\n return ( is_string($name) && !empty($name) && strlen($name) >=2 ); \r\n }", "public function testNoNameWrite()\n\t{\n\t\t$this->setExpectedException( 'CCException' );\n\t\t\n\t\t$config = CCConfig::create();\n\t\t$config->write();\n\t}", "public function testNameEmptyException(): void\n {\n $name = '';\n $this->expectException(\\InvalidArgumentException::class);\n $this->expectExceptionMessage(\n AssertionException::notEmpty(\n 'MetaService::name'\n )->getMessage()\n );\n new MetaService(1, $name, 'average', 1, 'gauge');\n }", "public function testAutonameNoLength() {\r\n\t\t$autoname1=autoname(0);\r\n\t\t$this->assertEquals(0, strlen($autoname1));\r\n\t}", "function valid_item_name ($item_name) {\n if ( empty($item_name) )\n return false;\n else \n return true;\t\n}", "public function hasName() {\n return $this->_has(1);\n }", "public function hasName() {\n return $this->_has(1);\n }", "public function hasName() {\n return $this->_has(1);\n }", "public function hasName() {\n return $this->_has(1);\n }", "private static function name(&$name)\n {\n if(!self::validName($name))\n throw new OrmInputException('$name must be a string of alphanumerics and underscores, starting with a letter. You passed '.$name);\n\n if (is_null($name))\n $name = self::DEFAULT_NAME;\n }", "function validName($name)\n {\n //name should not be empty and should contain only letters\n return !empty($name) && ctype_alpha($name);\n }", "public function testGetName() {\r\n $action = $this->_action->setName('name');\r\n $this->assertEquals('name', $action->getName());\r\n }", "private final static function validPropertyName($name)\n {\n return !preg_match('#[^a-z0-9_]|^[^a-z]|__#', $name);\n }", "public function test_validate_name()\n {\n $response = $this->json('POST', '/api/developers', [\n 'name' => '',\n 'profession' => 'Desarrollador',\n 'position' => 'Backend',\n 'technology' => 'Laravel'\n ]);\n\n // Solicitud correcta pero imposible de completar\n $response->assertStatus(422)\n ->assertJsonValidationErrors('name');\n }", "public function testRegisterWithNullName()\n {\n $generic = new GenericValidationTests($this);\n $generic->testNullAttribute('register', 'POST', self::$headers, self::$body, 'name');\n }", "public function getName_always_returnCorrectly()\n {\n $name = $this->user['user_metadata']['firstname'].' '.$this->user['user_metadata']['lastname'];\n $this->assertEquals($name, $this->entity->getName());\n }", "public function testInvalidFurName(){\n\t\t\t$furVars =[\n\t\t\t\t'name' => '',\n\t\t\t\t'description' => 'Nice Dresser',\n\t\t\t\t'price' => '900.12',\n\t\t\t\t'categoryId' => '5',\n\t\t\t\t'fur_condition' => 'NEW'\n\t\t\t];\n\t\t\t$properTest = saveFuncFurniture($furVars);\n\t\t\t$this->assertFalse($properTest);\n\t\t}", "public function set_name($name) {\n if (!is_string($name)) { return false; }\n $this->_name = $name;\n return true;\n }", "public function getNameBasic()\n {\n $generator = All::create();\n $name = $generator->getName();\n $this->assertRegexp('/.+/', $name);\n }", "public function hasName(){\n return $this->_has(4);\n }", "public function testGetName(): void\n {\n $this->assertEquals(\n 'Другая (отслеживание и смена статуса производятся вручную)',\n DeliveryService::getName(1)\n );\n }", "public function valid()\n {\n return !empty($this->name);\n }", "public static function isValidName($name) {}", "public function a_name_is_required()\n {\n //$this->withoutExceptionHandling();\n\n $this->actingAsCustomer();\n\n $response = $this->patch('/profile/update', array_merge($this->customerData(), ['name' => '']));\n $response->assertSessionHasErrors('name');\n }", "public function hasName(){\n return $this->_has(2);\n }", "public function isNameTake(string $name): bool;", "public function testAutonameOdd() {\r\n\t\t$autoname1=autoname(9);\r\n\t\t$autoname2=autoname(9);\r\n\t\r\n\t\t$this->assertNotEquals($autoname1, $autoname2);\r\n\t}", "public function testInvalidCategoryname(){\n\t\t\t$categoryVars = [\n\t\t\t\t'name' => '',\n\t\t\t\t\n\t\t\t];\n\t\t\t$properTest= saveFuncCategory($categoryVars);\n\t\t\t$this->assertFalse($properTest);\n\t\t}", "public function nameIsClean()\n {\n return ($this->getName() != '' && $this->getName() == $this->getCleanName());\n }", "public function wrongNamesDataProvider() {}", "public function isValidNameOrError($name): bool\n {\n if ($name == \"\") {\n throw new Exception('Invalid Product Name');\n }\n return true;\n }", "public function test_form_submit_emptyname()\n {\n Livewire::test(ConfiguratorForm::class)\n ->set(\"name\",\"\")\n ->set(\"onPullrequest\", true)\n ->call('submitForm')\n ->assertHasErrors('name');\n }", "public function testWiki1() {\n\t\t$this->assertNormalized('name=', array('name' => null));\n\t}", "public function hasValidNameArgument()\n {\n $name = $this->argument('name');\n\n if (! Str::contains($name, '/')) {\n $this->error(\"The name argument expects a vendor and name in 'Composer' format. Here's an example: `vendor/name`.\");\n\n return false;\n }\n\n return true;\n }", "public function hasName() {\n return $this->_has(2);\n }", "public function hasName() {\n return $this->_has(2);\n }", "public function hasName() {\n return $this->_has(2);\n }", "public function hasName() {\n return $this->_has(2);\n }", "public function hasName() {\n return $this->_has(2);\n }", "public function hasName() {\n return $this->_has(2);\n }", "public function hasName() {\n return $this->_has(2);\n }", "public function hasName() {\n return $this->_has(2);\n }", "public function hasName() {\n return $this->_has(2);\n }", "public function testGetName()\n {\n $data_from_collection = $this->data['annual_collection'];\n $this->assertEquals(\n $data_from_collection['attributes']['plan_name'],\n $this->makePlan($data_from_collection)->getName()\n );\n\n $data_from_site = $this->data['annual_site'];\n $this->assertEquals($data_from_site['name'], $this->makePlan($data_from_site)->getName());\n }", "public function forNameWithNonExistingNameThrowsIllegalArgumentException()\n {\n TestEnumWithoutValues::forName('BAZ');\n }", "public function checkControlExists($name);" ]
[ "0.7126883", "0.7051787", "0.70507437", "0.70507437", "0.7032379", "0.7005613", "0.7003814", "0.69903255", "0.6954094", "0.6922928", "0.682972", "0.6669657", "0.6656195", "0.6620851", "0.6606527", "0.65667284", "0.65667284", "0.6566536", "0.6566536", "0.6566536", "0.6565861", "0.6565432", "0.65647787", "0.65647787", "0.65647787", "0.65647787", "0.65647787", "0.6558251", "0.652443", "0.65174365", "0.65173936", "0.649268", "0.64800614", "0.6473898", "0.6473548", "0.64680713", "0.64636034", "0.6416198", "0.641042", "0.641013", "0.6409271", "0.6409271", "0.6409271", "0.6409271", "0.6397347", "0.63968176", "0.6371037", "0.63663507", "0.636567", "0.63603586", "0.6351055", "0.6343651", "0.63368803", "0.63336", "0.6321334", "0.63135564", "0.6294852", "0.62924814", "0.6286979", "0.6274957", "0.6274957", "0.6274957", "0.6274957", "0.62733954", "0.6270705", "0.62610954", "0.6256104", "0.6245817", "0.62408435", "0.62349296", "0.62344337", "0.62236124", "0.6213211", "0.6206048", "0.6197945", "0.61924124", "0.6189068", "0.61821365", "0.6180976", "0.61767364", "0.61757356", "0.6175233", "0.6169335", "0.6164898", "0.6159905", "0.6150897", "0.6148972", "0.6140729", "0.6127706", "0.6127706", "0.6127706", "0.6127706", "0.6127706", "0.6127706", "0.6127706", "0.6127706", "0.6127706", "0.6126287", "0.61129075", "0.60993147" ]
0.71519655
0
Test map to name
public function testMapToName() { $name = 'some_name'; $otherName = 'other_name'; $this->Field->name($name); $this->assertSame($name, $this->Field->mapToName()); $this->Field->map(null, $otherName); $this->assertSame($otherName, $this->Field->mapToName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetAllNames()\n {\n $map = $this->driver->getAllNames();\n $this->assertCount(1, $map);\n $types = array(\n 'http://rdfs.org/sioc/ns#Post' => 'Test\\\\Midgard\\\\CreatePHP\\\\Model',\n );\n $this->assertEquals($types, $map);\n }", "public function testGetByName()\n {\n $types = [\n TableMap::TYPE_PHPNAME => 'Title',\n TableMap::TYPE_CAMELNAME => 'title',\n TableMap::TYPE_COLNAME => 'book.title',\n TableMap::TYPE_FIELDNAME => 'title',\n TableMap::TYPE_NUM => 1\n ];\n\n $book = new Book();\n $book->setTitle('Harry Potter and the Order of the Phoenix');\n\n $expected = 'Harry Potter and the Order of the Phoenix';\n foreach ($types as $type => $name) {\n $result = $book->getByName($name, $type);\n $this->assertEquals($expected, $result);\n }\n }", "public function test_current_map()\n {\n $this->assertSame('Heelsum Single 01', $this->postScriptumServer->currentMap());\n }", "public function testMap() {\n $data = array(\n 'foo' => 'bar',\n 'boolean' => true,\n 'null' => null,\n 'array' => array(),\n 'number' => 123\n );\n\n $this->assertEquals(array(\n 'foo' => 'BAR',\n 'boolean' => true,\n 'null' => null,\n 'array' => array(),\n 'number' => 123\n ), Hash::map($data, 'strtoupper'));\n\n $this->assertEquals(array(\n 'foo' => 0,\n 'boolean' => 1,\n 'null' => 0,\n 'array' => array(),\n 'number' => 123\n ), Hash::map($data, 'intval'));\n\n $this->assertEquals(array(\n 'foo' => 'string',\n 'boolean' => 'true',\n 'null' => 'null',\n 'array' => array(),\n 'number' => 'number'\n ), Hash::map($data, function($value) {\n if (is_numeric($value)) {\n return 'number';\n } elseif (is_bool($value)) {\n return $value ? 'true' : 'false';\n } elseif (is_null($value)) {\n return 'null';\n } elseif (is_string($value)) {\n return 'string';\n } else {\n return $value;\n }\n }));\n }", "function test_getMapById() {\r\n\t\t$myArray= MemberClassesDB::getMap('memberClassId', 'memberClassName');\r\n\t\t$this->assertEqual($myArray['1'], \"reader\",\r\n\t\t\t\t\"Should return reader for key of 1 but returned \".$myArray['1']);\r\n\t\t$this->assertEqual($myArray['2'], 'nosher',\r\n\t\t\t\t\"Should return nosher for key of 2 but returned \".$myArray['2']);\r\n\t}", "public function test_current_map()\n {\n $this->assertSame('Al Basrah AAS v1', $this->btwServer->currentMap());\n }", "public function test_current_map()\n {\n $this->assertSame('Al Basrah AAS v1', $this->btwServer->currentMap());\n }", "function MultiMapTestCase($name = 'MultiMap test', $class_name) {\n $this->UnitTestCase($name);\n $this->class_name = $class_name;\n }", "public function test_admin_change_map()\n {\n $this->assertTrue($this->postScriptumServer->adminChangeMap('Heelsum Single 01'));\n }", "public function test_next_map()\n {\n $this->assertSame('Driel Single 01', $this->postScriptumServer->nextMap());\n }", "function get_map(array $map)\n{\n\tforeach($map as $k => $v)\n\t{\n\t\tif(get_has($k))\n\t\t{\n\t\t\t$v(get($k));\n\t\t}\n\t}\n}", "public function forName();", "public function testIfMapsContainProperData()\n {\n $factory = new FileSystemMapFactory();\n $maps = $factory->create($this->data);\n $count = 0;\n\n foreach ($this->data as $name => $mapData) {\n /** @var FileSystemMap $map */\n $map = $maps[$count];\n\n $this->assertEquals($this->data[$name]['src'], $map->getSource());\n $this->assertEquals($this->data[$name]['dst'], $map->getDestination());\n\n if (isset($this->data['client'])) {\n $this->assertEquals($this->data['client'], $map->getClient());\n }\n\n $this->assertEquals($name, $map->getName());\n\n $count++;\n }\n }", "function map_named($name, $pattern, $defaults=false, $requirements=false) {\n\t\t# parse pattern into regex\n\t\t$this->maps[$name] = new UsherMap($pattern, $defaults, $requirements);\n\t}", "function test_getNameById() {\r\n\t\t$myName = MemberClassesDB::getNameById(1);\r\n\t\t$this->assertEqual($myName, \"reader\",\r\n\t\t\t\t\"Should return reader for key of 1 but returned \".$myName);\r\n\t}", "public function test_next_map()\n {\n $this->assertSame('Belaya AAS v1', $this->btwServer->nextMap());\n }", "public function test_admin_change_map()\n {\n $this->assertTrue($this->btwServer->adminChangeMap('Al Basrah AAS v1'));\n }", "public function test_admin_change_map()\n {\n $this->assertTrue($this->btwServer->adminChangeMap('Al Basrah AAS v1'));\n }", "public function test_next_map()\n {\n $this->assertSame('Al Basrah Insurgency v1', $this->btwServer->nextMap());\n }", "public function test1()\n {\n $map = $this->dataLayer->tstTestMap1(100);\n $this->assertInternalType('array', $map);\n $this->assertCount(3, $map);\n $this->assertEquals(1, $map['c1']);\n $this->assertEquals(2, $map['c2']);\n $this->assertEquals(3, $map['c3']);\n }", "public function testGetName()\n {\n $data_from_collection = $this->data['annual_collection'];\n $this->assertEquals(\n $data_from_collection['attributes']['plan_name'],\n $this->makePlan($data_from_collection)->getName()\n );\n\n $data_from_site = $this->data['annual_site'];\n $this->assertEquals($data_from_site['name'], $this->makePlan($data_from_site)->getName());\n }", "public function testIfMapBagContainsMaps()\n {\n $factory = new FileSystemMapFactory();\n $result = $factory->create($this->data);\n\n $this->assertContainsOnlyInstancesOf('\\SyncFS\\Map\\FileSystemMap', $result);\n }", "public function testGetName()\n\t{\n\t\t$this->assertEquals($this->filterName, $this->filter->getName());\n\t}", "public function testGetName() {\r\n\t\t$this->testObject->setName ( self::TEST_CONTROL_ID );\r\n\t\t$this->assertTrue ( self::TEST_CONTROL_ID == $this->testObject->getName (), 'incorrect control name returned' );\r\n\t}", "public function testGetName() {\r\n $action = $this->_action->setName('name');\r\n $this->assertEquals('name', $action->getName());\r\n }", "public function testMap2()\n\t{\n\t\tTestReflection::invoke($this->_state, 'set', 'content.type', 'tag');\n\t\t$a = TestReflection::invoke($this->_instance, 'map', 1, array(5), true);\n\t\t$this->assertEquals(true, $a);\n\n\t\tTestReflection::invoke($this->_state, 'set', 'tags.content_id', '1');\n\t\t$actual = TestReflection::invoke($this->_instance, 'getList');\n\n\t\t$this->assertEquals(1, count($actual));\n\t}", "public function testGetName()\n {\n $reflectedProperty = new PropertyReflection('TRex\\Reflection\\resources\\Foo', 'foo');\n $this->assertSame('foo', $reflectedProperty->getName());\n }", "public function testMethodSetName()\n {\n $scorebox = new Scorebox();\n\n $scorebox->setName(\"One\");\n\n $name = $scorebox->getName();\n\n $expName = \"One\";\n\n $this->assertEquals($name, $expName);\n }", "function mapUsername($username) {\n $toMap = array(\n 'lauri^^' => 'Ladexi',\n 'luckyalfa' => 'lalfa',\n 'krudda' => 'Imperf3kt',\n 'chhotu_uttam' => 'Chhotu uttam',\n 'satenruiko' => 'dbx10',\n 'lizbeth' => 'Vazkii',\n 'fenn' => 'Pokefenn',\n );\n if(isset($toMap[strtolower($username)])) {\n $username = $toMap[strtolower($username)];\n }\n return $username;\n}", "public function testMethodGetName()\n {\n $scorebox = new Scorebox();\n\n $scorebox->setName(\"One\");\n\n $name = $scorebox->getName();\n\n $expName = \"One\";\n\n $this->assertEquals($name, $expName);\n }", "function prefix_url_rewrite_test($tests) {\n //'/templates-in-use/'.\n $map = Array(\n 'forside/fpa-bolig' => '/single-fpa_mening.php',\n 'forside/fpa-finans' => '/single-fpa_mening.php',\n 'forside/fpa-mat-produktsikkerhet-og-handel' => '/single-fpa_mening.php',\n 'forside/fpa-digital' => '/single-fpa_mening.php',\n 'forside/fpa-offentlig-og-helse' => '/single-fpa_mening.php',\n\n 'forside/nytt-og-nyttig' => '/single-fpa_nytt.php',\n 'presse' => '/single-fpa_presse.php'\n );\n\n foreach ( $tests as $test ) {\n if ( isset($map[$test]) && ($tpl = $map[$test]) ) {\n return $tpl;\n }\n }\n\n return false;\n}", "public function getVariantNames()\n {\n $this->mockVariantsMap->expects($this->once())\n ->method('getVariantNames')\n ->will($this->returnValue(array('foo', 'foo:bar', 'foo:baz')));\n $this->assertEquals(array('foo', 'foo:bar', 'foo:baz'), $this->abstractVariantFactory->getVariantNames());\n }", "public function testMappingNameConflictCheck($field_name_list) {\n $entity_type = \\Drupal::entityTypeManager()->getDefinition('node');\n $bundle = 'article';\n $reflection_class = new \\ReflectionClass($this->resourceTypeRepository);\n $reflection_method = $reflection_class->getMethod('getFields');\n $reflection_method->setAccessible(TRUE);\n\n $this->expectException(\\LogicException::class);\n $this->expectExceptionMessage(\"The generated alias '{$field_name_list[1]}' for field name '{$field_name_list[0]}' conflicts with an existing field. Please report this in the JSON:API issue queue!\");\n $reflection_method->invokeArgs($this->resourceTypeRepository, [$field_name_list, $entity_type, $bundle]);\n }", "public function testGetLabelByName() {\n\n foreach ($this->testCases['Label'] as $key => $testCase) {\n $label = new Label();\n $label->setLabelName($testCase['label_name']);\n $label->setLabelComment($testCase['label_comment']);\n $label->setLabelStatus($testCase['label_status']);\n\n $this->localizationDao = $this->getMock('LocalizationDao');\n $this->localizationDao->expects($this->once())\n ->method('getLabelByName')\n ->will($this->returnValue($label));\n\n $this->locaizationService->setLocalizationDao($this->localizationDao);\n\n $result = $this->locaizationService->getLabelByName($testCase['label_name']);\n $this->assertTrue($result instanceof Label);\n $this->assertEquals($label, $result);\n }\n }", "public function testDefaultValues() {\n\t\t$this->assertSame(null, $this->Field->mapToName());\n\t\tlist($callback, $mapToName) = $this->Field->map();\n\t\t$this->assertSame(1, $callback(1));\n\t\t$this->assertSame(null, $mapToName);\n\t}", "public function testSetName() {\r\n $this->assertInstanceOf('PM\\Main\\Event\\Action\\Emit', $this->_action->setName('test'));\r\n $this->assertEquals('test', $this->_action->getName());\r\n }", "public function testGetNameFail() {\r\n $this->_action->getName();\r\n }", "public function setMapValue($name=null);", "function xh_templateMapping($name)\r\n\t{\r\n\t}", "public function getNameBasic()\n {\n $generator = All::create();\n $name = $generator->getName();\n $this->assertRegexp('/.+/', $name);\n }", "abstract protected function defineMapping();", "public function Get_Map ( $map )\n\t{\n\t\t// Official XIII Maps\n\t\t// Deathmatch\n\t\t\t if ($map == \"DM_Banque\")\t\t\treturn\t\"Winslow Bank\";\n\t\telse if ($map == \"DM_Base\")\t\t\t\treturn\t\"Platform-02\";\n\t\telse if ($map == \"DM_Base_XBox\")\t\treturn\t\"Platform-03\";\n\t\telse if ($map == \"DM_Base2\")\t\t\treturn\t\"AFM-10\";\n\t\telse if ($map == \"DM_Hual1\")\t\t\treturn\t\"Emerald\";\n\t\telse if ($map == \"DM_Amos\")\t\t\t\treturn\t\"FBI\";\n\t\telse if ($map == \"DM_Pal\")\t\t\t\treturn\t\"Bristol Suites\";\n\t\telse if ($map == \"DM_Spads\")\t\t\treturn\t\"SPADS (PC)\";\n\t\telse if ($map == \"DM_Spads_XBox\")\t\treturn\t\"SPADS (XBOX)\";\n\t\telse if ($map == \"DM_PRock\")\t\t\treturn\t\"Plain Rock\";\n\t\telse if ($map == \"DM_Warehouse\")\t\treturn\t\"Warehouse 33\";\n\t\telse if ($map == \"DM_USA2_demo\")\t\treturn\t\"Docks (DM)\";\n\t\telse if ($map == \"DM_Hual04a\")\t\t\treturn\t\"Hualpar\";\n\t\telse if ($map == \"DM_PRock01a\")\t\t\treturn\t\"Asylum\";\n\t\telse if ($map == \"DM_USA01\")\t\t\treturn\t\"USA\";\n\t\telse if ($map == \"DM_SM01\")\t\t\t\treturn\t\"SS-419\";\n\t\telse if ($map == \"DM_LostTemple\")\t\treturn \t\"Lost Temple\";\n\t\t\n\t\t// Team Maps\n\t\telse if ($map == \"CTF_Base\")\t\t\treturn\t\"USS-Patriot\";\n\t\telse if ($map == \"CTF_Sanc\")\t\t\treturn\t\"XX\";\n\t\telse if ($map == \"CTF_Snow\")\t\t\treturn\t\"Kellownee\";\n\t\telse if ($map == \"CTF_Toits\")\t\t\treturn\t\"New-York\";\n\t\telse if ($map == \"CTF_Temple\")\t\t\treturn\t\"Temple\";\n\n\t\t// Sabotage\n\t\telse if ($map == \"SB_USA2\")\t\t\t\treturn\t\"Docks\";\n\t\telse if ($map == \"SB_Hual1a\")\t\t\treturn\t\"Choland\";\n\t\telse if ($map == \"SB_Camp\")\t\t\t\treturn\t\"Camp\";\n\t\t\n\t\t//-------------------------------\n\t\t// Unofficial XIII Maps (We don't know the map, sorry)\n\t\treturn $map;\n\t}", "public function testTitle()\n {\n\n $this->assertEquals(\"About|Laracarte\",getTile('About'));\n\n }", "private function changePropertyCase($map) {\n switch ($this->config->getPropertyCase()) {\n case \"snake\":\n return $this->changeCase($map, 'camelToSnake');\n case \"camel\":\n return $this->changeCase($map, 'snakeToCamel');\n case \"none\":\n return $map;\n default:\n http_response_code(400);\n exit(\"Unknown property case format\");\n }\n }", "public function wrongNamesDataProvider() {}", "function testNameGetter(){\n\t\t#mdx:nameGetter\n\t\t$field = new MyField('address');\n\t\t#/mdx echo $field->name()\n\t\t$this->assertEquals('address',$field->name());\n\t}", "function circuitMap($kMap){}", "public function test_add_and_get_mapping_work_as_expected()\n {\n $expected = Web::class;\n\n SourceFactory::addMapping('unknown', Web::class);\n $actual = SourceFactory::getMapping('unknown');\n\n $this->assertEquals($expected, $actual);\n }", "protected function _aliasing($name, $alias, $map = [])\n\t{\n\t\tlist($first, $second) = $this->_splitFieldname($name);\n\t\tif (!$first && preg_match('/^[a-z0-9_-]+$/i', $second)) {\n\t\t\treturn $alias . \".\" . $second;\n\t\t} elseif (isset($map[$first])) {\n\t\t\treturn $map[$first] . \".\" . $second;\n\t\t}\n\t\treturn $name;\n\t}", "public function testMap($options = array()) {\n\t\treturn $this->_mapOptions('request', $options);\n\t}", "public function testTranslateFieldName ()\n {\n $types = [\n TableMap::TYPE_PHPNAME,\n TableMap::TYPE_CAMELNAME,\n TableMap::TYPE_COLNAME,\n TableMap::TYPE_FIELDNAME,\n TableMap::TYPE_NUM\n ];\n $expecteds = [\n TableMap::TYPE_PHPNAME => 'AuthorId',\n TableMap::TYPE_CAMELNAME => 'authorId',\n TableMap::TYPE_COLNAME => 'book.author_id',\n TableMap::TYPE_FIELDNAME => 'author_id',\n TableMap::TYPE_NUM => 5,\n ];\n foreach ($types as $fromType) {\n foreach ($types as $toType) {\n $name = $expecteds[$fromType];\n $expected = $expecteds[$toType];\n $result = BookTableMap::translateFieldName($name, $fromType, $toType);\n $this->assertEquals($expected, $result);\n }\n }\n }", "function __get($name) {\n if(array_key_exists($name, $this->nmap)) {\n return $this->nmap[$name];\n } else {\n return;\n }\n }", "function __get($name) {\n if(array_key_exists($name, $this->nmap)) {\n return $this->nmap[$name];\n } else {\n return;\n }\n }", "abstract protected function getMapping();", "abstract protected function getMapping();", "public function register_action_map($map)\n {\n if (is_array($map)) {\n foreach ($map as $idx => $val) {\n $this->action_map[$idx] = $val;\n }\n }\n }", "public function testGetCacheKey(): void\n {\n // If I have a method\n $uut = $this->getMethod($this->method);\n\n // I expect the active modules tracker key to be returned\n $moduleManager = $this->getMockManager($this->method);\n $expected = \"modules-cache\";\n $this->assertSame($expected, $uut->invoke($moduleManager));\n }", "public function testUseMapping()\n {\n $cfg = new Configuration();\n $cfg->setBaseDirectories($this->dirs);\n $cfg->setMapping(\"item\", ANAX_INSTALL_PATH . \"/test/config/test1.php\");\n $config = $cfg->load(\"item\");\n\n $this->assertInternalType(\"array\", $config);\n $this->assertArrayHasKey(\"file\", $config);\n $this->assertArrayHasKey(\"config\", $config);\n $this->assertArrayHasKey(\"key1\", $config[\"config\"]);\n $this->assertContains(\"value1\", $config[\"config\"]);\n }", "public function testCategoryMap()\n {\n $this->assertEquals(Record::mapCategory('Labor'), 'labor');\n $this->assertEquals(Record::mapCategory('工具器具備品'), 'tools_equipment');\n $this->assertEquals(Record::mapCategory('広告宣伝費'), 'promotion');\n $this->assertEquals(Record::mapCategory('販売キャンペーン'), 'promotion');\n $this->assertEquals(Record::mapCategory('SEO'), 'promotion');\n $this->assertEquals(Record::mapCategory('SEO', true), 'seo');\n $this->assertEquals(Record::mapCategory('地代家賃'), 'rent');\n $this->assertEquals(Record::mapCategory('packing & delivery expenses'), 'delivery');\n $this->assertEquals(Record::mapCategory('Revenue'), 'revenue');\n $this->assertEquals(Record::mapCategory('収益'), 'revenue');\n $this->assertEquals(Record::mapCategory('水道光熱費'), 'utility');\n $this->assertEquals(Record::mapCategory('法定福利費'), 'labor');\n $this->assertEquals(Record::mapCategory('法定福利費', true), 'welfare');\n }", "public function testMethod()\n {\n $this->instance->{$this->name};\n $instance = $this->instance->{(string)$this->name}();\n self::assertInstanceOf(\n Chameleon::class,\n $instance,\n 'Instance does not have a readable method that returns an instance of Chameleon'\n );\n self::assertTrue(\n array_key_exists($this->name, $instance),\n 'Instance element cannot be tested with array_key_exists'\n );\n\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "public function testValidationByKeynameConstruct()\n {\n $init = 'test';\n $str = new \\Pv\\PString($init, array('test1' => 'length[1]'));\n\n $valid = $str->getValidation();\n $this->assertTrue(isset($valid['test1']));\n }", "public function testGetShortName() {\r\n $classes = array(\r\n 'PM\\Main\\Database' => 'Database',\r\n 'PM\\Main\\Commander\\Execution' => 'Execution',\r\n 'PM\\Main\\Event\\Action\\Emit' => 'Emit',\r\n 'PM\\Main\\Event\\Listener\\On' => 'On',\r\n 'PM\\Main\\Event\\Manager' => 'Manager'\r\n );\r\n\r\n foreach ($classes as $value => $expected) {\r\n $this->assertSame($expected, $this->_utils->getShortName($value));\r\n }\r\n }", "public function testFindByName()\n {\n // Protect to search only first index\n $this->collection->get('first', '/first', 'action');\n $this->collection->get('second', '/second', 'action');\n // protect to search only in last index.\n $this->collection->get('third', '/third', 'action');\n\n\n $route = $this->collection->findByName('second');\n\n $this->assertInstanceOf('Requtize\\Routing\\Route', $route);\n\n $this->assertEquals('/second', $route->getSourceRoute());\n }", "public function test2()\n {\n $rows = $this->dataLayer->tstTestMap1(0);\n $this->assertInternalType('array', $rows);\n $this->assertCount(0, $rows);\n }", "public function testGetNamedMetric(): void\n {\n $this->collection->setResult($this->timeResult);\n $this->assertEquals(1, $this->collection->getMetric(TimeResult::class, 'net'));\n }", "public function __get($name_function){//this nameok\n foreach ($this->check_array() as $key => $value):\n if($this->check_val===$key)://check val==key were is the key??\n return preg_match( $value,$this->name);\n endif;\n endforeach;\n \n}", "public function testNameOfTheGame()\n {\n \t$game_factory = factory(Game::class)->create();\n\n $this->assertEquals($game_factory->name, sprintf(\"Game %s\", $game_factory->getKey()));\n }", "private function ensureNameMapsLoaded(): void\n {\n if (null === $this->tableToClassesMap) {\n $this->loadNameMaps();\n }\n }", "public function getVariantByName()\n {\n $mockVariant = $this->getMock('stubVariant');\n $this->mockVariantsMap->expects($this->once())\n ->method('getVariantByName')\n ->with($this->equalTo('foo'))\n ->will($this->returnValue($mockVariant));\n $this->assertSame($mockVariant, $this->abstractVariantFactory->getVariantByName('foo'));\n }", "public function testGetName(): void\n {\n $this->assertSame('travis', $this->context->getName());\n }", "public function testValidationByKeynameAddl()\n {\n $init = 'test';\n $str = new \\Pv\\PString($init);\n $str->addValidation('length[1]', 'test1');\n\n $valid = $str->getValidation();\n $this->assertTrue(isset($valid['test1']));\n }", "public function testName()\n {\n $this->assertEquals('homepage_url', (new UrlField('homepage_url'))->getName());\n }", "function GoogleMapsLocalizedPageName(&$specialPageArray, $code) {\n # extension:\n GoogleMaps::loadMessages();\n $text = wfMsg('googlemaps');\n\n # Convert from title in text form to DBKey and put it into the alias array:\n $title = Title::newFromText($text);\n $specialPageArray['GoogleMaps'][] = $title->getDBKey();\n\n return true;\n}", "public function testMacro() {\n Inflector::macro('caps', function($value) {\n return strtoupper($value);\n });\n\n $this->assertEquals('FOOBAR', Inflector::caps('foObAr'));\n\n try {\n Inflector::lowers('foObAr');\n $this->assertTrue(false);\n } catch (Exception $e) {\n $this->assertTrue(true);\n }\n }", "public function getFieldMapping($field_name);", "public function local_get_by_map($type, $map){\n\t\tforeach((array)$this->local_copies[$type] as $copy){\n\t\t\tforeach($map as $k=>$v){\n\t\t\t\tif($copy[$k] != $v){\n\t\t\t\t\tcontinue 2;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $copy;\n\t\t}\n\t}", "public function hasMapping();", "public function test_admin_set_next_map()\n {\n $this->assertTrue($this->btwServer->adminSetNextMap('Al Basrah AAS v1'));\n }", "public function testGetName(): void\n {\n $this->assertEquals(\n 'Другая (отслеживание и смена статуса производятся вручную)',\n DeliveryService::getName(1)\n );\n }", "public function isValid(ValidatorMap $map, $str);", "public function testIfReturnsMapBag()\n {\n $factory = new FileSystemMapFactory();\n $result = $factory->create($this->data);\n\n $this->assertInstanceOf('\\SyncFS\\Map\\MapBag', $result);\n }", "public function testSetByName()\n {\n $book = new Book();\n $types = [\n TableMap::TYPE_PHPNAME => 'Title',\n TableMap::TYPE_CAMELNAME => 'title',\n TableMap::TYPE_COLNAME => 'book.title',\n TableMap::TYPE_FIELDNAME => 'title',\n TableMap::TYPE_NUM => 1\n ];\n\n $title = 'Harry Potter and the Order of the Phoenix';\n foreach ($types as $type => $name) {\n $book->setByName($name, $title, $type);\n $result = $book->getTitle();\n $this->assertEquals($title, $result);\n }\n }", "public function testGetName()\n {\n static::assertEquals('cookie', $this->fixture->getName());\n }", "public function testAppname() {\n $this->assertNotNull($this->object->appname('jaydson'));\n }", "public function testRenameKey()\n {\n $data = array(\n 'Hello' => 'Funilrys',\n 'How' => 'is',\n 'Are' => 'on',\n 'You?' => 'GitHub'\n );\n $toChange = array(\n 'How' => 'world',\n 'Are' => 'from',\n 'You?' => 'Germany'\n );\n\n $validKeys = array('Hello', 'world', 'from', 'Germany');\n $validValues = array('Funilrys', 'is', 'on', 'GitHub');\n\n $invalidData = array('Funilrys', 'is', 'on', 'GitHub');\n $invalidToChange = array('Hello', 'How', 'Are', 'You?');\n\n $this\n ->given($array = new classToTest())\n ->then\n ->array($array::renameKey($data, $toChange))\n ->keys\n ->isEqualTo($validKeys)\n ->array($array::renameKey($data, $toChange))\n ->containsValues($validValues)\n ->array($array::renameKey($data, $toChange))\n ->isNotEmpty()\n ->boolean($array::renameKey($invalidData, $invalidToChange))\n ->isFalse()\n ;\n }", "public function testNameProperty()\n {\n $newName = 'example';\n\n $product = new Product();\n $product->setName($newName);\n\n $this->assertSame($newName, $product->getName(), 'The name is not as expected');\n }", "protected abstract function map();", "public function testCraftAppGetMethods($instance, $map)\n {\n $func = $map[0];\n $this->assertInstanceOf($instance, Craft::$app->$func());\n $this->assertInstanceOf($instance, Craft::$app->get($map[1]));\n // http://www.php.net/manual/en/language.variables.variable.php#example-107\n $this->assertInstanceOf($instance, Craft::$app->{$map[1]});\n }", "public function testSetName()\n {\n\n // new entity\n $team = new Team();\n\n // Use the setName method\n $team->setName('Hovedstyret');\n\n // Assert the result\n $this->assertEquals('Hovedstyret', $team->getName());\n }", "function null2unknown($map, $key) {\n if (array_key_exists($key, $map)) {\n if (!is_null($map[$key])) {\n return $map[$key];\n }\n }\n return \"No Value Returned\";\n }", "public function testNameReturnsName()\n {\n file_put_contents(self::$temp.DS.'foobar.txt', 'foo');\n\n $this->assertSame('foobar', Storage::name(self::$temp.DS.'foobar.txt'));\n }", "public function testRouteSetsName()\n {\n $route = new \\Slim\\Route('/foo/bar', function () {});\n $route->name('foo');\n $this->assertEquals('foo', $route->getName());\n }", "abstract public function test($cacheLabel);", "public function getVariantsMap()\n {\n $this->assertSame($this->mockVariantsMap, $this->abstractVariantFactory->getVariantsMap());\n }", "public function testGetLabelByInvalidName() {\n\n foreach ($this->testCases['Label'] as $key => $testCase) {\n $label = new Label();\n $label->setLabelName($testCase['label_name']);\n $label->setLabelComment($testCase['label_comment']);\n $label->setLabelStatus($testCase['label_status']);\n\n $this->localizationDao = $this->getMock('LocalizationDao');\n $this->localizationDao->expects($this->once())\n ->method('getLabelByName')\n ->will($this->returnValue(NULL));\n\n $this->locaizationService->setLocalizationDao($this->localizationDao);\n\n $result = $this->locaizationService->getLabelByName($testCase['label_name']);\n $this->assertNull($result);\n }\n }", "function map_image($map_name)\n {\n $html_dir = path(config('file_layout', 'html_dir', './html'));\n $map_dir = config('static_files', 'map_image_dir', 'static/images/maps');\n $ext = config('static_files', 'map_image_ext', '.jpg');\n $mapfile = $map_dir . '/' . $map_name . $ext;\n if (file_exists($html_dir . '/' . $mapfile)) {\n return $mapfile;\n }\n $no_image_file = config('static_files', 'map_no_image_file', 'no-image.jpg');\n $theme_no_image_file = path($html_dir . '/themes/' . current_theme() . '/images/' . $no_image_file);\n if (file_exists($theme_no_image_file)) { //search file in theme first.\n return 'themes/' . curretn_theme() . '/images/' . $no_image_file;\n } elseif (file_exists($html_dir . '/' . $map_dir . '/' . $no_image_file)) {\n return $map_dir . '/' . $no_image_file;\n }\n return '';\n }", "public function map_getMap( $mapName, $itemKey ) {\n // if invalid mapname empty map is created/returned\n if ( ! isset( $this->properties[$mapName] ) ) {\n $this->properties[$mapName] = array();\n } \n $propArray = &$this->properties[$mapName];\n if ( ! isset( $propArray[$itemKey] ) ) {\n $propArray[$itemKey] = new rsm_mapArray;\n } \n return $propArray[$itemKey];\n}", "public function test_admin_set_next_map()\n {\n $this->assertTrue($this->btwServer->adminSetNextMap('Al Basrah Insurgency v1'));\n }", "abstract public function get_name();" ]
[ "0.5975919", "0.5895288", "0.5871153", "0.57848126", "0.5763042", "0.57526976", "0.57526976", "0.5728262", "0.5719286", "0.5699202", "0.56887025", "0.5680997", "0.5672517", "0.5656439", "0.5645749", "0.5645567", "0.5644338", "0.5644338", "0.5612955", "0.5545627", "0.55391526", "0.55116534", "0.5490813", "0.54698455", "0.54562694", "0.5443311", "0.538442", "0.5367253", "0.5364337", "0.5359513", "0.53440374", "0.52920306", "0.5279359", "0.5268091", "0.5264033", "0.52431333", "0.5241278", "0.52404314", "0.5219489", "0.520619", "0.52048963", "0.5198257", "0.5192448", "0.515668", "0.51397395", "0.51286167", "0.5126245", "0.5109952", "0.5109752", "0.51046026", "0.5100453", "0.5081245", "0.5081245", "0.50649184", "0.50649184", "0.5063385", "0.50458914", "0.50438255", "0.5042326", "0.5036126", "0.5034832", "0.5027138", "0.50173074", "0.50097", "0.50039107", "0.49933484", "0.49904355", "0.49903867", "0.49837357", "0.49836227", "0.49772725", "0.4973693", "0.49734843", "0.4969085", "0.49628633", "0.49608615", "0.49582216", "0.4956321", "0.49484083", "0.49450538", "0.49419487", "0.49296355", "0.49256495", "0.49193367", "0.4916713", "0.49151692", "0.48995438", "0.48967493", "0.48948047", "0.48927584", "0.48895085", "0.48879966", "0.48798725", "0.48728377", "0.48714295", "0.48713723", "0.48586977", "0.48543125", "0.48539934", "0.48522592" ]
0.66781116
0
Test default condition values
public function testDefaultValues() { $this->assertSame(null, $this->Field->mapToName()); list($callback, $mapToName) = $this->Field->map(); $this->assertSame(1, $callback(1)); $this->assertSame(null, $mapToName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function globalVarConditionDoesNotMatchOnEmptyExpressionWithValueSetToZero() {}", "public function globalVarConditionDoesNotMatchOnEmptyExpressionWithValueSetToZero() {}", "public function hasOnlyDefaultValues()\n {\n if ($this->deleted !== false) {\n return false;\n }\n\n if ($this->amount !== 1) {\n return false;\n }\n\n if ($this->amountevaluation !== 0) {\n return false;\n }\n\n if ($this->defaultstatus !== 0) {\n return false;\n }\n\n if ($this->defaultdirectiondate !== 0) {\n return false;\n }\n\n if ($this->defaultenddate !== 0) {\n return false;\n }\n\n if ($this->defaultpersoninevent !== 0) {\n return false;\n }\n\n if ($this->defaultpersonineditor !== 0) {\n return false;\n }\n\n if ($this->maxoccursinevent !== 0) {\n return false;\n }\n\n if ($this->showtime !== false) {\n return false;\n }\n\n if ($this->ispreferable !== true) {\n return false;\n }\n\n if ($this->isrequiredcoordination !== false) {\n return false;\n }\n\n if ($this->isrequiredtissue !== false) {\n return false;\n }\n\n if ($this->mnem !== '') {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function testRouteDefaultConditions()\n {\n \\Slim\\Route::setDefaultConditions(array('id' => '\\d+'));\n $r = new \\Slim\\Route('/foo', function () {});\n //Case A\n $this->assertEquals(\\Slim\\Route::getDefaultConditions(), $r->getConditions());\n //Case B\n $r->conditions(array('name' => '[a-z]{2,5}'));\n $c = $r->getConditions();\n $this->assertArrayHasKey('id', $c);\n $this->assertArrayHasKey('name', $c);\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->is_active !== false) {\n return false;\n }\n\n if ($this->is_closed !== false) {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->jml_lantai !== '1') {\n return false;\n }\n\n if ($this->asal_data !== '1') {\n return false;\n }\n\n if ($this->last_sync !== '1901-01-01 00:00:00') {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function hasDefault();", "public function isDefault();", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n // otherwise, everything was equal, so return true\n return true;\n }", "public function testAddFilterConditionDefault(): void\n {\n // setup\n $where = [\n '1 = 2'\n ];\n unset($_GET['filter']);\n\n // test body\n $result = \\Mezon\\Filter::addFilterCondition($where);\n\n // assertions\n $this->assertEquals('1 = 2', $result[0]);\n $this->assertCount(1, $result);\n }", "public function hasOnlyDefaultValues()\n\t{\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function hasOnlyDefaultValues()\n {\n if ($this->is_not !== false) {\n return false;\n }\n\n if ($this->rank !== 0) {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function testWhenNoConditionIsSet()\n {\n $this->assertFalse($this->class->has_condition());\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->setregis !== 0) {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasDefaultValue(): bool;", "public function hasOnlyDefaultValues()\n {\n if ($this->create_date !== '2020-04-16 09:40:03') {\n return false;\n }\n\n if ($this->last_update !== '2020-04-16 09:40:03') {\n return false;\n }\n\n if ($this->last_sync !== '1901-01-01 00:00:00') {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function applyDefaultValues()\n {\n $this->is_not = false;\n $this->rank = 0;\n }", "public function hasOnlyDefaultValues()\n\t{\n\t\t\tif ($this->is_archived !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->google_analytics_enabled !== false) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function hasOnlyDefaultValues()\n\t{\n\t\t\tif ($this->closed !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->lastfmid !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->hasphotos !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function hasOnlyDefaultValues()\n\t{\n\t\t\tif ($this->ativo !== true) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->tipo_acesso !== 'M') {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->estado_civil !== 'O') {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->nivel_acesso !== '1') {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->usuario_validado !== false) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function getExpectedDefaults();", "public function globalVarConditionMatchesOnEmptyExpressionWithNoValueSet() {}", "public function globalVarConditionMatchesOnEmptyExpressionWithNoValueSet() {}", "public function getIsDefault();", "function _check_default($value)\n\t{\n\t $params = array_keys(array_merge($this->setting_default, $this->setting));\n\t foreach ($params as $param)\n\t {\n\t if(!$this->input->post($param[$value]))\n\t {\n\t $this->form_validation->set_message(__FUNCTION__, lang('required'));\n\t return false;\n\t }\n\t }\n\t return true;\n\t}", "function custom_conds( $conds = array()) {\n\n\t}", "public function hasOnlyDefaultValues()\n {\n if ($this->active !== false) {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function getDefaultValue();", "public function getDefaultValue();", "public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->montacargas_baja !== 0) {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function hasOnlyDefaultValues()\n\t{\n\t\t\tif ($this->type !== 1) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->total_index !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->is_published !== true) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->is_featured !== false) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->comments_count !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "protected function getDefaultCriterion(): string\n {\n return Equals::class;\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->shnttype !== '') {\n return false;\n }\n\n if ($this->shntseq !== 0) {\n return false;\n }\n\n if ($this->shntkey2 !== '') {\n return false;\n }\n\n if ($this->shntform !== '') {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function getCondition();", "public function getCondition();", "public function getCondition();", "public function hasOnlyDefaultValues()\n {\n if ($this->pothnbr !== '') {\n return false;\n }\n\n if ($this->pothstat !== 'N') {\n return false;\n }\n\n if ($this->pothrcptdate !== '') {\n return false;\n }\n\n if ($this->intbwhse !== '') {\n return false;\n }\n\n if ($this->pothglpd !== 0) {\n return false;\n }\n\n if ($this->pothairship !== 'N') {\n return false;\n }\n\n if ($this->potherinreview !== 'N') {\n return false;\n }\n\n if ($this->pothexchctry !== '') {\n return false;\n }\n\n if ($this->pothexchrate !== '0.0000000') {\n return false;\n }\n\n if ($this->intbwhseorig !== '') {\n return false;\n }\n\n if ($this->pothlandcost !== '0.0000000') {\n return false;\n }\n\n if ($this->pothrcptnbr !== 0) {\n return false;\n }\n\n if ($this->pothlandbasedon !== '') {\n return false;\n }\n\n if ($this->pothinvcnbr !== '') {\n return false;\n }\n\n if ($this->pothinvcdate !== '') {\n return false;\n }\n\n if ($this->pothfrtamt !== '0.00') {\n return false;\n }\n\n if ($this->pothmiscamt !== '0.00') {\n return false;\n }\n\n if ($this->dateupdtd !== '') {\n return false;\n }\n\n if ($this->timeupdtd !== '') {\n return false;\n }\n\n if ($this->dummy !== 'P') {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->create_date !== '2021-06-07 11:49:57') {\n return false;\n }\n\n if ($this->last_update !== '2021-06-07 11:49:57') {\n return false;\n }\n\n if ($this->last_sync !== '1901-01-01 00:00:00') {\n return false;\n }\n\n if ($this->jml_jamban_l_g !== '0') {\n return false;\n }\n\n if ($this->jml_jamban_l_tg !== '0') {\n return false;\n }\n\n if ($this->jml_jamban_p_g !== '0') {\n return false;\n }\n\n if ($this->jml_jamban_p_tg !== '0') {\n return false;\n }\n\n if ($this->jml_jamban_lp_g !== '0') {\n return false;\n }\n\n if ($this->jml_jamban_lp_tg !== '0') {\n return false;\n }\n\n if ($this->tipe_jamban !== '9') {\n return false;\n }\n\n if ($this->a_sedia_pembalut !== '0') {\n return false;\n }\n\n if ($this->a_tempat_sampah_kelas !== '0') {\n return false;\n }\n\n if ($this->a_tempat_sampah_tutup_p !== '0') {\n return false;\n }\n\n if ($this->a_cermin_jamban_p !== '0') {\n return false;\n }\n\n if ($this->a_memiliki_tps !== '0') {\n return false;\n }\n\n if ($this->a_tps_angkut_rutin !== '0') {\n return false;\n }\n\n if ($this->a_anggaran_sanitasi !== '0') {\n return false;\n }\n\n if ($this->a_melibatkan_sanitasi_siswa !== '0') {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function defaultVariables_test($tester) {\n\t\t$this->setupTests();\n\t\t$this->process();\n\n\t\t$tester->assertNotBlank($this->name);\n\t\t$tester->assertTrue(!$this->hasChanged);\n\t}", "public function testDefaultWithAttrs()\n {\n $config = array(\n 'default' => TRUE,\n 'eduPersonTargetedID', 'eduPersonAffiliation',\n );\n\n $result = self::processFilter($config, self::$request);\n $attributes = $result['Attributes'];\n $this->assertCount(2, $attributes);\n $this->assertArrayHasKey('cn', $attributes);\n $this->assertArrayHasKey('mail', $attributes);\n $this->assertArrayNotHasKey('eduPersonTargetedID', $attributes);\n $this->assertArrayNotHasKey('eduPersonAffiliation', $attributes);\n }", "public function simulateEnabledMatchSpecificConditionsSucceeds() {}", "public function simulateEnabledMatchSpecificConditionsSucceeds() {}", "public function testWhenConditionIsSetCorrectly()\n {\n $this->class->set_condition(\"'TopicA' in topics && 'TopicB' in topics\");\n\n $this->assertTrue($this->class->has_condition());\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->last_sync !== '1901-01-01 00:00:00') {\n return false;\n }\n\n // otherwise, everything was equal, so return true\n return true;\n }", "public function getDefaultValue() {}", "public function getDefaultValue() {}", "public function applyDefaultValues()\n\t{\n\t\t$this->is_archived = 0;\n\t\t$this->google_analytics_enabled = false;\n\t}", "public function hasDefaults(): bool;", "public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->amount = 1;\n $this->amountevaluation = 0;\n $this->defaultstatus = 0;\n $this->defaultdirectiondate = 0;\n $this->defaultenddate = 0;\n $this->defaultpersoninevent = 0;\n $this->defaultpersonineditor = 0;\n $this->maxoccursinevent = 0;\n $this->showtime = false;\n $this->ispreferable = true;\n $this->isrequiredcoordination = false;\n $this->isrequiredtissue = false;\n $this->mnem = '';\n }", "function setDefaultValues() {}", "public function getOrElse($default);", "public function testConditionOverride() {\n\t\t$products = $this->productsManager->filter(Attr::id()->lt(3))->find(Attr::category()->eq('Clothes'));\n\t\t$this->assertCount(3, $products);\n\t}", "public function hasOnlyDefaultValues()\n\t{\n\t\t\tif ($this->st_usuario !== true) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function hasOnlyDefaultValues()\n {\n if ($this->phadtype !== '') {\n return false;\n }\n\n if ($this->phadid !== '') {\n return false;\n }\n\n if ($this->phadsubid !== '') {\n return false;\n }\n\n if ($this->phadsubidseq !== 0) {\n return false;\n }\n\n if ($this->phadcont !== '') {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "public function checkDefaultValues() {\n return is_file($this->STR_PROJECT_CONFIG_FILE);\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->sessionid !== '') {\n return false;\n }\n\n if ($this->recno !== 0) {\n return false;\n }\n\n if ($this->type !== '') {\n return false;\n }\n\n if ($this->custid !== '') {\n return false;\n }\n\n if ($this->shiptoid !== '') {\n return false;\n }\n\n if ($this->custname !== '') {\n return false;\n }\n\n if ($this->orderno !== '') {\n return false;\n }\n\n if ($this->custpo !== '') {\n return false;\n }\n\n if ($this->custref !== '') {\n return false;\n }\n\n if ($this->status !== '') {\n return false;\n }\n\n if ($this->orderdate !== '') {\n return false;\n }\n\n if ($this->careof !== '') {\n return false;\n }\n\n if ($this->quotdate !== '') {\n return false;\n }\n\n if ($this->invdate !== '') {\n return false;\n }\n\n if ($this->shipdate !== '') {\n return false;\n }\n\n if ($this->revdate !== '') {\n return false;\n }\n\n if ($this->expdate !== '') {\n return false;\n }\n\n if ($this->hasdocuments !== '') {\n return false;\n }\n\n if ($this->hastracking !== '') {\n return false;\n }\n\n if ($this->subtotal !== '0.00') {\n return false;\n }\n\n if ($this->salestax !== '0.00') {\n return false;\n }\n\n if ($this->freight !== '0.00') {\n return false;\n }\n\n if ($this->misccost !== '0.00') {\n return false;\n }\n\n if ($this->ordertotal !== '0.00') {\n return false;\n }\n\n if ($this->hasnotes !== '') {\n return false;\n }\n\n if ($this->editord !== '') {\n return false;\n }\n\n if ($this->error !== '') {\n return false;\n }\n\n if ($this->errormsg !== '') {\n return false;\n }\n\n if ($this->sconame !== '') {\n return false;\n }\n\n if ($this->shipname !== '') {\n return false;\n }\n\n if ($this->shipaddress !== '') {\n return false;\n }\n\n if ($this->shipaddress2 !== '') {\n return false;\n }\n\n if ($this->shipcity !== '') {\n return false;\n }\n\n if ($this->shipstate !== '') {\n return false;\n }\n\n if ($this->shipzip !== '') {\n return false;\n }\n\n if ($this->shipcountry !== '') {\n return false;\n }\n\n if ($this->contact !== '') {\n return false;\n }\n\n if ($this->phintl !== '') {\n return false;\n }\n\n if ($this->phone !== '') {\n return false;\n }\n\n if ($this->extension !== '') {\n return false;\n }\n\n if ($this->faxnbr !== '') {\n return false;\n }\n\n if ($this->email !== '') {\n return false;\n }\n\n if ($this->releasenbr !== '') {\n return false;\n }\n\n if ($this->shipviacd !== '') {\n return false;\n }\n\n if ($this->shipviadesc !== '') {\n return false;\n }\n\n if ($this->pricecode !== '') {\n return false;\n }\n\n if ($this->pricecodedesc !== '') {\n return false;\n }\n\n if ($this->pricedisp !== '') {\n return false;\n }\n\n if ($this->taxcode !== '') {\n return false;\n }\n\n if ($this->taxcodedesc !== '') {\n return false;\n }\n\n if ($this->taxcodedisp !== '') {\n return false;\n }\n\n if ($this->termcode !== '') {\n return false;\n }\n\n if ($this->termtype !== '') {\n return false;\n }\n\n if ($this->termcodedesc !== '') {\n return false;\n }\n\n if ($this->rqstdate !== '') {\n return false;\n }\n\n if ($this->shipcom !== '') {\n return false;\n }\n\n if ($this->sp1 !== '') {\n return false;\n }\n\n if ($this->sp1name !== '') {\n return false;\n }\n\n if ($this->sp2 !== '') {\n return false;\n }\n\n if ($this->sp2name !== '') {\n return false;\n }\n\n if ($this->sp2disp !== '') {\n return false;\n }\n\n if ($this->sp3 !== '') {\n return false;\n }\n\n if ($this->sp3name !== '') {\n return false;\n }\n\n if ($this->sp3disp !== '') {\n return false;\n }\n\n if ($this->fob !== '') {\n return false;\n }\n\n if ($this->deliverydesc !== '') {\n return false;\n }\n\n if ($this->whse !== '') {\n return false;\n }\n\n if ($this->cardnumber !== '') {\n return false;\n }\n\n if ($this->cardexpire !== '') {\n return false;\n }\n\n if ($this->cardcode !== '') {\n return false;\n }\n\n if ($this->cardapproval !== '') {\n return false;\n }\n\n if ($this->totalcost !== '') {\n return false;\n }\n\n if ($this->totaldiscount !== '') {\n return false;\n }\n\n if ($this->paymenttype !== '') {\n return false;\n }\n\n if ($this->srcdatefrom !== '') {\n return false;\n }\n\n if ($this->srcdatethru !== '') {\n return false;\n }\n\n if ($this->billname !== '') {\n return false;\n }\n\n if ($this->billaddress !== '') {\n return false;\n }\n\n if ($this->billaddress2 !== '') {\n return false;\n }\n\n if ($this->billaddress3 !== '') {\n return false;\n }\n\n if ($this->billcountry !== '') {\n return false;\n }\n\n if ($this->billcity !== '') {\n return false;\n }\n\n if ($this->billstate !== '') {\n return false;\n }\n\n if ($this->billzip !== '') {\n return false;\n }\n\n if ($this->prntfmt !== '') {\n return false;\n }\n\n if ($this->prntfmtdisp !== '') {\n return false;\n }\n\n if ($this->dummy !== 'x') {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }", "protected function func_default() {}", "function conditions( $conds = array())\n\t{\n\t\t// if condition is empty, return true\n\t\tif ( empty( $conds )) return true;\n\t}", "public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}", "public function globalVarConditionDoesNotMatchOnNotEqualExpression() {}", "public function globalVarConditionDoesNotMatchOnNotEqualExpression() {}", "public function hasCondition();", "public function applyDefaultValues()\n\t{\n\t\t$this->platform = 'pc';\n\t\t$this->experience_score = 0;\n\t\t$this->up_votes = 0;\n\t\t$this->down_votes = 0;\n\t\t$this->is_guest = 0;\n\t\t$this->is_admin = 0;\n\t\t$this->today_votes = 0;\n\t\t$this->email_on = 1;\n\t}", "public function simulateEnabledMatchAllConditionsSucceeds() {}", "public function simulateEnabledMatchAllConditionsSucceeds() {}", "function testDefaultSettings() {\n $administrator = Users::findById(1);\n\n $member = new Member();\n\n $member->setCompanyId(1);\n $member->setEmail('[email protected]');\n $member->setPassword('123');\n $member->save();\n\n $client = new Client();\n\n $client->setCompanyId(1);\n $client->setEmail('[email protected]');\n $client->setPassword('123');\n $client->save();\n\n $email_channel = new EmailNotificationChannel();\n\n $this->assertTrue($email_channel->isEnabledByDefault());\n $this->assertTrue($email_channel->isEnabledFor($administrator));\n $this->assertTrue($email_channel->isEnabledFor($member));\n $this->assertTrue($email_channel->isEnabledFor($client));\n\n $this->assertEqual($email_channel->whoCanOverrideDefaultStatus(), array('Member', 'Manager'));\n\n $this->assertTrue($email_channel->canOverrideDefaultStatus($administrator));\n $this->assertTrue($email_channel->canOverrideDefaultStatus($member));\n $this->assertFalse($email_channel->canOverrideDefaultStatus($client));\n }", "function _checkCondition($a_obj_id, $a_operator, $a_value, $a_usr_id = 0)\n\t{\n\t\treturn true;\n\t}", "public function hasOnlyDefaultValues()\n\t{\n\t\t\t// First, ensure that we don't have any columns that have been modified which aren't default columns.\n\t\t\tif (array_diff($this->modifiedColumns, array(UserPeer::PLATFORM,UserPeer::EXPERIENCE_SCORE,UserPeer::UP_VOTES,UserPeer::DOWN_VOTES,UserPeer::IS_GUEST,UserPeer::IS_ADMIN,UserPeer::TODAY_VOTES,UserPeer::EMAIL_ON))) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->platform !== 'pc') {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->experience_score !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->up_votes !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->down_votes !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->is_guest !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->is_admin !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->today_votes !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->email_on !== 1) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function getDefault();", "public function testDefaults() {\n\t\t$defaults = array('one' => 1, 'two' => 2, 'three' => 3);\n\t\t$array = array('two' => null, 'three' => 4);\n\t\t$expected = array('two' => 2, 'three' => 4, 'one' => 1);\n\t\t$result = _::defaults($array, $defaults);\n\t\t$this->assertEquals($expected, $result);\n\n\t\t// test defaulting values in an object\n\t\t$defaults = (object)$defaults;\n\t\t$array = (object)$array;\n\t\t$expected = (object)$expected;\n\t\t$result = _::defaults($array, $defaults);\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function isDefault(): bool {\n return $this->attributeExists('default');\n }", "function define_default($param, $value) {\n\t\t//\n\t}", "protected function useDefaultValuesForNotConfiguredOptions() {}", "public function getValidDefaultValue(): mixed;", "public function testDefaultWithMetadata()\n {\n $config = array(\n 'default' => TRUE,\n );\n\n $result = self::processFilter($config, self::$request);\n $attributes = $result['Attributes'];\n $this->assertArrayHasKey('cn', $attributes);\n $this->assertArrayHasKey('mail', $attributes);\n $this->assertCount(2, $attributes);\n }", "public function testGetStepsWithDefaultCase()\n {\n $entity = (new EntityDataObjectBuilder())\n ->withDataFields(['field1' => 'testValue'])\n ->build();\n $this->setEntityObjectHandlerReturn($entity);\n $actionGroupUnderTest = (new ActionGroupObjectBuilder())->build();\n $steps = $actionGroupUnderTest->getSteps(null, self::ACTION_GROUP_MERGE_KEY);\n $this->assertOnMergeKeyAndActionValue($steps, ['userInput' => 'literal']);\n }", "public function customCondition(){\n $rand_num = rand(0, 7);\n\n if ($rand_num == 5) {\n $key_to_page = TRUE; // TRUE\n } else {\n $key_to_page = FALSE; // FALSE\n }\n\n return $key_to_page;\n }", "public function getDefaultParams();", "function CheckCondition()\n\t{\n\t\treturn true;\n\t}", "public function get_default_availability() {\n\t\treturn true;\n\t}", "protected function get_default() {\n\t\treturn false;\n\t}", "public function testInitDefaults()\n {\n $utc = new DateTimeZone('UTC');\n $now = new DateTime('now', $utc);\n $then = new DateTime('+201 days', $utc);\n\n $criteria = new EventCriteria();\n $this->assertEquals($utc, $criteria->getTimezone());\n $this->assertEquals($now, $criteria->getFromDate(), '', 1);\n $this->assertEquals($then, $criteria->getToDate(), '', 1);\n $this->assertSame(null, $criteria->getCalendars());\n }", "function privOptionDefaultThreshold(&$p_options)\n {\n }", "public function getConditionOperator();", "public function hasOnlyDefaultValues()\n\t{\n\t\t\t// First, ensure that we don't have any columns that have been modified which aren't default columns.\n\t\t\tif (array_diff($this->modifiedColumns, array())) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function hasOnlyDefaultValues()\n\t{\n\t\t\t// First, ensure that we don't have any columns that have been modified which aren't default columns.\n\t\t\tif (array_diff($this->modifiedColumns, array())) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}", "public function hasOnlyDefaultValues()\n\t{\n\t\t\t// First, ensure that we don't have any columns that have been modified which aren't default columns.\n\t\t\tif (array_diff($this->modifiedColumns, array())) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t// otherwise, everything was equal, so return TRUE\n\t\treturn true;\n\t}" ]
[ "0.65667045", "0.6565172", "0.64244133", "0.6390833", "0.63700473", "0.63601315", "0.630049", "0.630049", "0.630049", "0.62985003", "0.6281332", "0.62689394", "0.62689394", "0.62689394", "0.62689394", "0.62689394", "0.62689394", "0.62689394", "0.62680167", "0.62648696", "0.6264609", "0.62618357", "0.6242061", "0.6200657", "0.61911917", "0.60816914", "0.60652673", "0.6063203", "0.6037351", "0.603042", "0.60293496", "0.6025164", "0.60239786", "0.6011863", "0.60002303", "0.59960604", "0.59362316", "0.59306604", "0.59306604", "0.5910896", "0.5907272", "0.5900285", "0.5891985", "0.5872798", "0.58709043", "0.58709043", "0.58709043", "0.5858956", "0.5852768", "0.5823402", "0.58122975", "0.5804137", "0.58038044", "0.57712364", "0.5741585", "0.5722081", "0.5721286", "0.57160133", "0.57069314", "0.56941885", "0.56861454", "0.56766284", "0.56699467", "0.5669671", "0.5664341", "0.5656063", "0.56302106", "0.5624914", "0.5622999", "0.5591476", "0.55846196", "0.5577233", "0.55763435", "0.55550605", "0.55550605", "0.5544022", "0.5533761", "0.5525513", "0.55252373", "0.552456", "0.55034584", "0.5500421", "0.5495615", "0.54937583", "0.54790586", "0.5477874", "0.5460742", "0.54524153", "0.5435143", "0.54324794", "0.5425758", "0.541185", "0.5409397", "0.5408069", "0.5406523", "0.54033417", "0.5397672", "0.53823745", "0.5374937", "0.5374937", "0.5374937" ]
0.0
-1
Constructs a Page object.
function Page($page_content) { // Match the <head/> element. if (preg_match("#<head.*?>(.*?)</head>#si", $page_content, $match)) { $this->_head = $match[1]; // Match the <title/> element. if (preg_match("#<title.*?>(.*?)</title>#si", $this->_head, $match)) { // Store away the title. $this->_title = trim($match[1]); // Match <meta/> tags. if (preg_match_all("#<meta.*?>#si", $this->_head, $matches, PREG_SET_ORDER)) { foreach ($matches as $match) { $meta_tag = $match[0]; // Match the key. (name and http-equiv are treated equally.) if (preg_match("#\b(name)\s*=\s*\"(.*?)\"#si", $meta_tag, $match) || preg_match("#\b(http-equiv)\s*=\s*\"(.*?)\"#si", $meta_tag, $match)) { $meta_type = $match[1]; $meta_name = $match[2]; } // Match the value. if (preg_match("#\bcontent\s*=\s*\"(.*?)\"#si", $meta_tag, $match)) { $meta_value = $match[1]; } // Store away the meta key and value. $this->_properties['meta.' . $meta_name] = $meta_value; $this->_meta_property_types['meta.' . $meta_name] = $meta_type; } } // Store away the header with the title removed. $this->_head = preg_replace("#<title.*?>.*?</title>#si", "", $this->_head); $this->_head = trim($this->_head); } } // Match the <body/> element. if (preg_match("#(<body.*?>)(.*?)</body>#si", $page_content, $match)) { // Store away the body. $this->_body = trim($match[2]) . "\n"; // Match the attributes in the body tag. $body_start_tag = $match[1]; if (preg_match_all("#\b(\S+)\s*=\s*\"(.*?)\"#s", $body_start_tag, $matches, PREG_SET_ORDER)) { foreach ($matches as $match) { // Store away the body attribute key and value. $this->_properties['body.' . $match[1]] = $match[2]; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function create()\n {\n $page = new Page();\n $page->site_id = \\Bazalt\\Site::getId();\n if (!\\Bazalt\\Auth::getUser()->isGuest()) {\n $page->user_id = \\Bazalt\\Auth::getUser()->id;\n }\n return $page;\n }", "static public function createPage() {\n $session = Application::getInstance(\"session\");\n $config = Application::getConfig();\n\n if (isset($config[\"system\"][\"customPageClass\"])) {\n require $config[\"system\"][\"pages-folder\"] . \"/\" . $config[\"system\"][\"customPageClass\"] . \".php\";\n }\n\n include_once $config[\"system\"][\"pages-folder\"] . \"/\" . $session->currentPage . \".page.php\";\n $pageClass = $config[\"system\"][\"namespace\"] . \"\\\\pages\\\\Page\" . ucfirst($session->currentPage);\n\n\n $page = new $pageClass();\n\n Application::setInstance(\"page\", $page);\n }", "public static function newPageInstance()\n {\n $model = new static();\n $model->setAttribute('type', static::PAGE);\n\n return $model;\n }", "public static function create()\n\t{\n\t\t$page = \"Main\";\n\n\t\t// check the requested page title for safety and sanity\n\t\t\n\t\t$pathinfo = explode('/', WebRequest::pathInfo());\n\t\t$pathinfo = array_values(array_filter($pathinfo));\n\t\tif(\n\t\t\tcount($pathinfo) >= 1 &&\n\t\t\t$pathinfo[0] != \"\" && // not empty\n\t\t\t(!ereg(\"[^a-zA-Z0-9]\", $pathinfo[0])) // contains only alphanumeric chars\n\t\t)\n\t\t{\n\t\t\t$page = $pathinfo[0];\n\t\t}\n\t\t\n\t\t// okay, the page title should be reasonably safe now, let's try and make the page\n\t\t\n\t\t$pagename = \"Page\" . $page;\n\t\t\n\t\tglobal $cIncludePath;\n\t\t$filepath = $cIncludePath . \"/Page/\" . $pagename . \".php\";\n\t\t\n\t\tif(file_exists($filepath))\n\t\t{\n\t\t\trequire_once($filepath);\n\t\t}\n\t\telse\n\t\t{\t// oops, couldn't find the requested page, let's fail gracefully.\n\t\t\t$pagename = \"Page404\";\n\t\t\t$filepath = $cIncludePath . \"/Page/\" . $pagename . \".php\";\n\t\t\trequire_once($filepath);\n\t\t}\t\n\n\t\tif(class_exists($pagename))\n\t\t{\n\t\t\t$pageobject = new $pagename;\n\t\t\t\n\t\t\tif(get_parent_class($pageobject) == \"PageBase\")\n\t\t\t{\n\t\t\t\tHooks::run(\"CreatePage\", array($pageobject));\n\t\t\t\t\n\t\t\t\treturn $pageobject;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// defined, but doesn't inherit properly, so we can't guarentee stuff will work.\n\t\t\t\tthrow new Exception();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// file exists, but the class \"within\" doesn't, this is a problem as stuff isn't where it should be.\n\t\t\tthrow new Exception();\n\t\t}\n\t}", "public function create( $_total, $_size, $_pageno )\r\n {\r\n return new Page($_total, $_size, $_pageno);\r\n }", "public function __construct(Page $page)\n {\n $this->page = $page;\n }", "function createPage();", "public function get_page() {\n\t\t$p\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= (isset($_GET['p']))? preg_replace('@[^a-zA-Z0-9_]@', '', $_GET['p']) : $this->conf('default_page');\n\t\t$this->p\t\t\t\t\t\t\t\t\t\t\t\t\t\t= $p;\n\t\t\n\t\t# Determine the file to include from the content directory\n\t\t$dir\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= dirname(dirname(dirname(__FILE__))) .\"/content/\";\n\t\t$p\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= $dir . $p . \".php\";\n\t\t$p\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= (file_exists($p))? $p : $dir . \"error.php\";\n\t\t\n\t\t# Include the content file and create a page object\n\t\tinclude_once($p);\n\t\t$page\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= new Page();\n\t\t\n\t\t# Return Page\n\t\treturn $page;\n\t}", "protected function constructPage() {\n\t\treturn array(\n\t\t\t\t\t\t\"header\" => $this->header,\n\t\t\t\t\t\t\"headerBottom\" => $this->headerBottom,\n\t\t\t\t\t\t\"bodyTag\" => $this->bodyTag,\n\t\t\t\t\t\t\"banner\" => $this->banner,\n\t\t\t\t\t\t\"leftMenu\" => $this->leftMenu,\n\t\t\t\t\t\t\"titlePrefix\" => $this->titlePrefix,\n\t\t\t\t\t\t\"title\" => $this->title,\n\t\t\t\t\t\t\"titlePostfix\" => $this->titlePostfix,\n\t\t\t\t\t\t\"rightMenu\" => $this->rightMenu,\n\t\t\t\t\t\t\"contentPrefix\" => $this->contentPrefix,\n\t\t\t\t\t\t\"content\" => $this->content,\n\t\t\t\t\t\t\"contentPostfix\" => $this->contentPostfix,\n\t\t\t\t\t\t\"footer\" => $this->footer,\n\t\t\t\t\t\t\"end\" => $this->end\n\t\t\t\t\t);\n\t}", "public function __construct () {\n $this->template = new PageTemplate ();\n }", "public function __construct () {\n $this->template = new PageTemplate ();\n }", "public function __construct () {\n $this->template = new PageTemplate ();\n }", "public static function init() {\n\t\tif (self::$_initialized) {\n\t\t\treturn;\n\t\t}\n\t\tparent::setInstance(new Page());\n\t\tself::$_initialized = true;\n\t}", "protected function newPage()\n {\n $this->addPage();\n $this->variables['page'] = $this->pageNo();\n if ($this->templatePages > 0) {\n $templateIndex = $this->importPage(min($this->pageNo(), $this->templatePages));\n $this->useImportedPage($templateIndex);\n }\n\n $this->setXY($this->layout['pageNoX'], $this->layout['pageNoY']);\n $this->write(5, $this->t('page'));\n $this->setY($this->layout['contentMarginTopPX']);\n }", "public function newPage($timestamp = null)\n {\n return new Page($this, $timestamp);\n }", "public function create($data)\n {\n return Page::create($data);\n }", "public function __construct(Page $page)\n {\n parent::__construct();\n $this->page = $page;\n }", "public static function getInstance() {\r\n if (is_null(self::$_instance)) {\r\n self::$_instance = new Page();\r\n }\r\n return self::$_instance;\r\n }", "function Page( $tpl_engine = null ){\n\t\tparent::Control($tpl_engine) ;\n\n\t\t$this->trace(\"instanciation Page\") ;\n\t\t\n\t\t$this->title = \"New Page\" ;\n\t\t$this->smarty->assignByRef(\"title\",$this->title) ;\n\t\t\n\t\t$this->forms = array() ;\n\t\t\n\t\t// Browser configuration\n\t\t\n\t\t$this->browser = new Browser() ;\n\t\t\n\t\t$this->meta = array() ;\n\t\t$this->smarty->assignByRef(\"meta\",$this->meta) ;\n\n\t\tif( $this->browser->isIphone() ){\n\t\t\t$this->addMeta(\"viewport\",\"width=640\") ;\n\t\t\t$this->addMeta(\"apple-mobile-web-app-capable\",\"yes\") ;\n\t\t}\n\n\t\tif( $this->browser->isInternetExplorer() ){\n\t\t\t$this->addMeta(\"X-UA-Compatible\",\"IE=8\") ;\n\t\t}\n\n\t\t$this->css = array() ;\n\t\t$this->smarty->assignByRef(\"css\",$this->css) ;\n\n\t\t$this->addCss(\"reset.css\") ;\n\t\t$this->addCss(\"common.css\") ;\n\t\t\n\t\t$this->js = array() ;\n\t\t$this->smarty->assignByRef(\"js\",$this->js) ;\n\t\t\n\t\t$this->setPlugin();\n\t\t\n\t}", "public function __construct($page)\n {\n $this->page = $page;\n }", "protected function _initAction(): Page\n {\n $resultPage = $this->resultPageFactory->create();\n $resultPage->setActiveMenu(self::CURBSIDE_MENU_ID);\n $resultPage->addBreadcrumb(__('Sales'), __('Sales'));\n $resultPage->addBreadcrumb(__('Curbside Orders'), __('Curbside Orders'));\n\n return $resultPage;\n }", "public static function createInstance()\n {\n return new TabPage('ISerializable', 'ISerializable');\n }", "public static function createByPage(\\SetaPDF_Core_Document_Page $page) {}", "public function __construct() {\n\t\t$this->page \t= new Page;\n\t\t$this->url \t\t= new Url;\n\t\t$this->session \t= new Session;\n\t\t$this->paging \t= new Paging;\n\t}", "public function getPage()\n {\n if ($this->page) {\n return $this->page;\n }\n\n // Remove original page\n $this->app->page_object->destroy(false);\n\n $this->page = $this->app->add(\n $this->page_class,\n $this->name,\n null,\n $this->page_template\n );\n /** @type Page $this->page */\n $this->app->page_object = $this->page;\n $this->app->stickyGET($this->name);\n\n return $this->page;\n }", "function __construct(Page $model) {\n $this->model = $model;\n }", "public function __construct() {\n\t\t\t// create new page object\n\t\t\t$this->page = new HtmlPage('Page conjunction');\n\n\t\t\t// create new database object\n\t\t\t$this->db = new Database();\n\t\t\t\n\t\t\t// create new request validator\n\t\t\t$this->rq = new RequestValidator();\n\t\t\t\n\t\t\t// execute tool\n\t\t\t$this->run();\n\t\t\t$this->finish();\n\t\t}", "public function __construct($p_sPage){\n $this->page($p_sPage);\n }", "public function fakePage($pageFields = [])\r\n {\r\n return new Page($this->fakePageData($pageFields));\r\n }", "public function create_page(ModelClass $object, $parentselector = '') {\n\n }", "function __construct($ptitle)\r\n {\r\n $this->_htmlpage = new HTMLPage($ptitle);\r\n $this->setPageDefaults();\r\n $this->setDynamicDefaults();\r\n }", "function __construct(Page $page, Area $area)\n {\n $this->page = $page;\n $this->area = $area;\n }", "public function __construct() {\n\t\tparent::__construct( 'CreatePage', 'createpage' );\n\t}", "public function __construct()\n {\n $page = \\App::make('Lablog\\Lablog\\Page\\PageGatewayInterface');\n $this->page = $page;\n }", "public function actionCreate()\n {\n $page = new Page;\n $pageForm = new PageForm;\n $pageForm->setAttributes($page->getAttributes());\n\n if ($pageForm->load(Yii::$app->request->post()) && $pageForm->validate()) {\n $currentDatetime = gmdate('Y-m-d H:i:s');\n\n $page->setAttributes($pageForm->getAttributes());\n $page->generateSlug($pageForm->slug);\n $page->updated_at = $currentDatetime;\n $page->created_at = $currentDatetime;\n\n if ($page->save()) {\n return $this->redirect(Url::previous('actions-redirect'));\n }\n }\n\n return $this->render('create', [\n 'page' => $page,\n 'pageForm' => $pageForm,\n ]);\n }", "public function buildPageObjectByName($name)\n {\n return $this->builder->build($name);\n }", "function __construct($pagetype) {\t\n\t\t\t$page = $pagetype;\t\t\t\n\t\t}", "public function __construct(PageRequest $pageRequest)\n {\n $this->pageRequest = $pageRequest;\n }", "public function initPage() {}", "public function initPage() {}", "protected function page () {\n\t\t$skeleton\t= make::tpl ('skeleton.basic');\n\n\t\t/**\n\t\t * Fetch the body content\n\t\t */\n\t\t$body\t\t= make::tpl ('body.privacy');\n\n\n\t\t/**\n\t\t * Fetch the translated privacy policy\n\t\t */\n\t\t$query = \"SELECT \";\n\t\t$query.= \"`html` \";\n\t\t$query.= \"FROM \";\n\t\t$query.= \"`page_privacy_translations` \";\n\t\t$query.= \"WHERE \";\n\t\t$query.= \"`locale`='\".config::get('locale').\"' \";\n\t\t$query.= \"LIMIT 1\";\n\n\t\t$result = database::query($query);\n\n\t\tif($result && mysql_error()=='' && mysql_num_rows($result) > 0) {\n\t\t\t$row\t\t= mysql_fetch_assoc($result);\n\t\t\t$date\t\t= date('d/m/Y');\n\t\t\t$content\t= str_replace('{{ date }}',$date,stripslashes($row['html']));\n\t\t}\n\n\t\t$body->assign('content',$content);\n\n\t\t/**\n\t\t * Fetch the page details\n\t\t */\n\t\t$page = new page('privacy');\n\n\t\t/**\n\t\t * Build the output\n\t\t */\n\t\t$skeleton->assign (\n\t\t\tarray (\n\t\t\t\t'title'\t\t\t=> $page->title(),\n\t\t\t\t'keywords'\t\t=> $page->keywords(),\n\t\t\t\t'description'\t=> $page->description(),\n\t\t\t\t'body'\t\t\t=> $body\n\t\t\t)\n\t\t);\n\n\t\toutput::as_html($skeleton,true);\n\t}", "private function createPage()\n {\n sleep(1);\n\n $response = $this->pages->create([\n 'name' => 'My Super Awesome Post '.uniqid(),\n 'content_group_id' => 351076997,\n ]);\n\n $this->assertEquals(201, $response->getStatusCode());\n\n return $response;\n }", "public function create()\n {\n\n // Using an empty model to allow the form to operate properly.\n $page = new ehPage();\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // Reset the display areas to defaults and pull the page info from Pages\n ehLayout::initLayout();\n\n ehLayout::setOptionBlock(false);\n ehLayout::setDynamic(false);\n ehLayout::setAttention(false);\n ehLayout::setWhenAdding(true);\n\n $linkbar = new ehLinkbar();\n ehLayout::setLinkbar($linkbar->getLinkbar());\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // Set up Save button based on this user's permissions.\n ehLayout::setStandardButtons('save');\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // Pull the $form array to pass to the template.\n $form['layout'] = ehLayout::getLayout();\n\n\n // Set the form action -- NOTE: POST to /groups calls groups.store\n $form['layout']['form_action'] = config('app.url').'/pages';\n $form['layout']['form_method']='POST';\n\n // Signal to template to leave certain elements out during a new record add.\n $form['layout']['when_adding'] = true;\n\n ////////////////////////////////////////////////////////////////////////////////////////////\n return view('ecoHelpers::pages.page-detail',[\n 'form' => $form,\n 'page' => $page\n ]);\n }", "public function makePage($pageFields = [])\r\n {\r\n /** @var PageRepository $pageRepo */\r\n $pageRepo = App::make(PageRepository::class);\r\n $theme = $this->fakePageData($pageFields);\r\n return $pageRepo->create($theme);\r\n }", "public function createPage()\n {\n $this->currentPage++;\n $this->currentIndex++;\n $this->resetProps();\n /* Create page */\n if ($this->landscape) {\n // A4 format in Landscape orientation\n $this->pdf->begin_page_ext(0, 0, \"width=a4.height height=a4.width\");\n } else {\n // A4 format in Portrait orientation3.\n $this->pdf->begin_page_ext(0, 0, \"width=a4.width height=a4.height\");\n }\n empty($this->createPageTrigger) || call_user_func_array($this->createPageTrigger, $this->createPageTriggerArgs);\n }", "public function newPage(array $settings = array()) {\n\t\t$page = $this -> _getPdf() -> newPage(Zend_Pdf_Page::SIZE_A4);\n\t\t$this -> _getPdf() -> pages[] = $page;\n\t\t\n\t\t//\"move cursor\" to top of the page\n\t\t$this -> y = $page->getHeight();\n\n\t\t//insert background image\n\t\t$this -> insertBackgroundImage($page);\n\t\t\n\t\t//output table header if needed\n\t\tif (!empty($settings['table_header']))\n\t\t{\n\t\t\t$this->y -= 12;\n\t\t\t$this -> _drawHeader($page);\n\t\t}\n\n\t\treturn $page;\n\t}", "public function setPage(Page $oPage) {\n \t\n \t// Set our page\n \t$this->oPage = $oPage;\n \t\n \t// Return instance\n \treturn $this;\n }", "public function __construct()\r\n {\r\n $pageRequest = 'homePage';\r\n //check for parameters\r\n if (isset($_REQUEST['page'])) {\r\n $pageRequest = $_REQUEST['page'];\r\n }\r\n //instantiate the class that is being requested\r\n $page = new $pageRequest;\r\n\r\n if ($_SERVER['REQUEST_METHOD'] == 'GET') {\r\n $page->get();\r\n } else {\r\n $page->post();\r\n }\r\n\r\n }", "protected function createPage($pagePath, $doOnPageNotFound = true)\r\n\t{\r\n\t\t$path=$this->getBasePath().DIRECTORY_SEPARATOR.strtr($pagePath,'.',DIRECTORY_SEPARATOR);\r\n\t\t$hasTemplateFile=is_file($path.self::PAGE_FILE_EXT);\r\n\t\t$hasClassFile=is_file($path.Prado::CLASS_FILE_EXT);\r\n\r\n\t\tif(!$hasTemplateFile && !$hasClassFile) {\r\n\t\t\t$param = new TPageNotFoundEventParameter($pagePath);\r\n\t\t\tif(!$this->BlockOnPageNotFoundEvent && $doOnPageNotFound)\r\n\t\t\t\t$this->raiseEvent('onPageNotFound', $this, $param);\r\n\t\t\tif(!$param->FoundPage)\r\n\t\t\t\tthrow new THttpException(404,'pageservice_page_unknown',$pagePath);\r\n\t\t\treturn $param->FoundPage;\r\n\t\t}\r\n\r\n\t\tif($hasClassFile)\r\n\t\t{\r\n\t\t\t$className=basename($path);\r\n\t\t\tif(!class_exists($className,false))\r\n\t\t\t\tinclude_once($path.Prado::CLASS_FILE_EXT);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$className=$this->getBasePageClass();\r\n\t\t\tPrado::using($className);\r\n\t\t\tif(($pos=strrpos($className,'.'))!==false)\r\n\t\t\t\t$className=substr($className,$pos+1);\r\n\t\t}\r\n\r\n \t\tif(!class_exists($className,false) || ($className!=='TPage' && !is_subclass_of($className,'TPage')))\r\n\t\t\tthrow new THttpException(404,'pageservice_page_unknown',$pagePath);\r\n\r\n\t\t$page=new $className;\r\n\t\t$page->setPagePath($pagePath);\r\n\r\n\t\tif($hasTemplateFile)\r\n\t\t\t$page->setTemplate($this->getTemplateManager()->getTemplateByFileName($path.self::PAGE_FILE_EXT));\r\n\r\n\t\treturn $page;\r\n\t}", "protected function generatePages(): Pages\n\t{\n\t\t$paginator = new Pages();\n\n\t\t// If there is only 1 page\n\t\tif ($this->totalPages <= 1) {\n\t\t\t$paginator->buttons[] = $paginator->current = $this->createElement(1, 1);\n\n\t\t\treturn $paginator;\n\t\t}\n\n\t\t$paginator->current = $this->createElement($this->currentPage, $this->currentPage);\n\n\t\t$range = $this->getRange();\n\t\t// Where the middle part (exclude first and last page) starts\n\t\t$startMiddle = \\max($this->currentPage - $range, 2);\n\t\t$endMiddle = \\min($this->currentPage + $range, $this->totalPages - 1);\n\n\t\t$paginator->buttons[] = $this->createElement(1, $this->currentPage);\n\t\t$this->addBeginningButtons($paginator, $startMiddle);\n\n\t\tfor ($i = $startMiddle; $i <= $endMiddle; $i += 1) {\n\t\t\t$paginator->buttons[] = $this->createElement($i, $this->currentPage);\n\t\t}\n\n\t\t$this->addEndingButtons($paginator, $endMiddle);\n\t\t$paginator->buttons[] = $this->createElement($this->totalPages, $this->currentPage);\n\n\t\treturn $paginator;\n\t}", "public function testCreatePage()\n {\n // 1. Create Page\n $this->createPage();\n\n // 2. Test if content is created\n $this->assertTrue(Content::first() ? true : false);\n }", "public function createPages() {\n $pageCount = $this->getPageCount();\n $currentPageNumber = $this->getCurrentPage();\n\n $structure = new XGrid_Plugin_Pagination_Structure();\n $structure->setPageCount($pageCount);\n $structure->setItemCountPerPage($this->getItemCountPerPage());\n $structure->setFirst(1);\n $structure->setCurrent($currentPageNumber);\n $structure->setLast($pageCount);\n\n // Previous and next\n if ($currentPageNumber - 1 > 0) {\n $structure->setPrevious($currentPageNumber - 1);\n }\n \n if ($currentPageNumber + 1 <= $pageCount) {\n $structure->setNext($currentPageNumber + 1);\n }\n\n // Pages in range\n $scrollingStyle = $this->getScrollingStyle();\n $structure->setPagesInRange($scrollingStyle->getPages($this));\n $structure->setFirstPageInRange(min($structure->getPagesInRange()));\n $structure->setLastPageInRange(max($structure->getPagesInRange()));\n \n $this->_structure = $structure; \n }", "public function __construct() {\n $this->dbh = self::mysqlConnect();\n $this->locale = new PageLocale($this);\n $this->details = new PageDetails($this);\n $this->dictionary = new PageDictionary($this);\n }", "public function addPage() {\r\n\t\t// add a page (required with recent versions of tcpdf)\r\n\t\t$this->tcpdf->AddPage();\r\n\t\treturn $this;\r\n\t}", "public function __construct(Pages $pages)\n {\n $this->_pages = $pages;\n }", "public function create()\n {\n //for the PAGE on which to create\n }", "public function __construct(){\r\n $pageRequest ='homepage';\r\n //check if there are parameters\r\n if(isset($_REQUEST['page'])) {\r\n\r\n //load the type of page the request wants into page request\r\n \r\n $pageRequest = $_REQUEST['page'];\r\n }\r\n //instantiate the class that is being requested\r\n $page = new $pageRequest;\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'GET') {\r\n $page->get();\r\n } else {\r\n $page->post();\r\n }\r\n\r\n\r\n\r\n }", "public function __construct()\n {\n $this->page = collect();\n $this->page->title = 'Patient Dashboard';\n $this->page->view = 'home';\n }", "private function instantiateClass( $pageFilePath ) : Page\n {\n $isDebug = false;\n\n if($isDebug) {\n echo '<span style=\"color:blue;\">instantiateClass()</span> | pageFilePath = ' . $pageFilePath . '<br>';\n }\n // Strip the directories off the filename\n $filePathArray = explode(\n '/',\n $pageFilePath\n );\n\n $filename = $filePathArray[count($filePathArray) - 1];\n\n\n $page = $filePathArray[count($filePathArray) - 1];\n $topic = $this->allPages[$this->stripExtFromFile($filename)][0];\n $course = $this->allPages[$this->stripExtFromFile($filename)][1];\n\n if($isDebug) {\n echo '<span style=\"color:blue;\">Filename</span>: ' . $filename . '<br>';\n }\n\n $class = explode(\n \".\",\n $filename\n\n );\n\n if($this->isDebug) {\n echo 'Class: ' . $class[0] . '<br>';\n// echo $this->modulesAssoc[$_SESSION['page']] . '<br>';\n// echo 'J\\\\ClassNotes\\\\' . $this->stripClassNameFromFilePath($this->modulesAssoc[$_SESSION['module']], true) . '<br>';\n }\n // Instantiate the class with the filePath ( eg. )as param\n $className = 'J\\\\ClassNotes\\\\' . $class[0];\n\n if($isDebug) {\n echo '<span style=\"color:blue;\">ClassName</span>: ' . $className . '<br>';\n }\n // $filepath = $this->stripClassNameFromFilePath([ $_SESSION[ 'module' ]] );\n\n require_once $pageFilePath;\n\n $newPage = new $className( $filename, $topic, $course );\n\n\n return $newPage;\n\n }", "public function newPage($title,$content,$publish = true) {\n $page = array(\n\t\t\t'post_status' \t\t=> $publish === true ? 'publish' : 'pending',\n\t\t\t'post_type' \t\t=> 'page',\n\t\t\t'post_author' \t\t=> 1,\n\t\t\t'post_name' \t\t=> $this->createSlug($title),\n\t\t\t'post_title' \t\t=> $title,\n\t\t\t'post_content' \t\t=> $content,\n\t\t\t'post_parent' \t\t=> 0,\n\t\t\t'comment_status' \t=> 'closed'\n\t\t);\n return $page;\n }", "public function newPage($title,$content,$publish = true) {\n $page = array(\n\t\t\t'post_status' \t\t=> $publish === true ? 'publish' : 'pending',\n\t\t\t'post_type' \t\t=> 'page',\n\t\t\t'post_author' \t\t=> 1,\n\t\t\t'post_name' \t\t=> $this->createSlug($title),\n\t\t\t'post_title' \t\t=> $title,\n\t\t\t'post_content' \t\t=> $content,\n\t\t\t'post_parent' \t\t=> 0,\n\t\t\t'comment_status' \t=> 'closed'\n\t\t);\n return $page;\n }", "public function __construct()\n {\n $this->rendererClass = Renderer::class;\n\n $this->cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);\n $this->cObj->start(array());\n\n $this->offset = max(0, (int) GeneralUtility::_GET('offset'));\n $this->limit = max(0, (int) GeneralUtility::_GET('limit'));\n if ($this->limit <= 0) {\n $this->limit = 100;\n }\n\n $this->createRenderer();\n\n $singlePid = intval(GeneralUtility::_GP('singlePid'));\n $this->singlePid = $singlePid && $this->isInRootline($singlePid) ?\n $singlePid : \\FelixNagel\\T3extblog\\Utility\\GeneralUtility::getTsFe()->id;\n\n $this->validateAndcreatePageList();\n }", "public function createPageAndCopyLiveParentPage() {}", "function __construct($pageMethod = null)\n\t{\n\t\t// echo $pageURI;\n\t\t$this->load = new Load();\n\t\t$this->model = new Model();\n\t\t// Determine what page you are on\n\t\t$this->$pageMethod();\n\t}", "public function create(Page $page)\n {\n return $this->view('titan::pages.components.content')\n ->with('page', $page);\n }", "public function __construct() {\r\n\t\t$this->page = isset($_GET['page']) ? $_GET['page'] : null;\r\n\t}", "public function __construct() {\n\t\t// A special page should at least have a name.\n\t\t// We do this by calling the parent class (the SpecialPage class)\n\t\t// constructor method with the name as first and only parameter.\n\t\tparent::__construct( 'HelloWorld' );\n\t}", "public function __construct()\n {\n $this->rootPages = $this->generatePageHierarchy();\n }", "public function get_tab_page($params=array()) {\n return new $this->tab_page($params);\n }", "public function newPage($width = 0, $height = 0, $optlist = null);", "public function newPage(array $settings = array())\n {\n /* Add new table head */\n $page = $this->_getPdf()->newPage(Zend_Pdf_Page::SIZE_LETTER);\n $this->_getPdf()->pages[] = $page;\n $this->y = self::DEFAULT_PAGE_TOP_NEW;\n\n if (!empty($settings['table_header'])) {\n $this->_setFontRegular($page);\n $page->setFillColor(new Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));\n $page->setLineColor(new Zend_Pdf_Color_GrayScale(0.5));\n $page->setLineWidth(0.5);\n $page->drawRectangle(self::DEFAULT_PAGE_MARGIN_LEFT, $this->y, self::DEFAULT_PAGE_MARGIN_RIGHT, $this->y - self::DEFAULT_LINE_HEIGHT - self::DEFAULT_BOX_PAD);\n $this->y -= self::DEFAULT_LINE_HEIGHT;\n\n $page->setFillColor(new Zend_Pdf_Color_Rgb(0.4, 0.4, 0.4));\n $this->_drawHeader($page);\n\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\n $this->y -= 2 * self::DEFAULT_LINE_HEIGHT;\n }\n\n return $page;\n }", "public function create()\n {\n\n $page = new Page();\n\n if (Request::isMethod(\"post\")) {\n\n $page->title = Request::get('title');\n $page->slug = Request::get('slug');\n $page->excerpt = Request::get('excerpt');\n $page->content = Request::get('content');\n $page->image_id = Request::get('image_id');\n $page->user_id = Auth::user()->id;\n $page->status = Request::get(\"status\", 0);\n $page->lang = app()->getLocale();\n\n // Fire saving action\n\n Action::fire(\"page.saving\", $page);\n\n if (!$page->validate()) {\n return Redirect::back()->withErrors($page->errors())->withInput(Request::all());\n }\n\n $page->save();\n $page->syncTags(Request::get(\"tags\"));\n\n // Fire saved action\n\n Action::fire(\"page.saved\", $page);\n\n return Redirect::route(\"admin.pages.edit\", array(\"id\" => $page->id))\n ->with(\"message\", trans(\"pages::pages.events.created\"));\n }\n\n $this->data[\"page_tags\"] = array();\n $this->data[\"page\"] = $page;\n $this->data['lang'] = app()->getLocale();\n\n return View::make(\"pages::edit\", $this->data);\n }", "protected function createPage($name, $hierarchy, Page $parent = null): Page\n {\n $page = new Page();\n $page->setParent($parent);\n $page->setHierarchy($hierarchy);\n $page->setPublish(1);\n $page->setRedirectType(0);\n $page->setSection('');\n $page->addShop($this->shop);\n foreach ($this->getLocales() as $locale) {\n /** @var PageTranslation $translation */\n $translation = $page->translate($locale->getCode());\n $translation->setName($name);\n $translation->setSlug(Helper::urlize($name));\n $translation->setContent($this->defaultText);\n }\n \n $page->mergeNewTranslations();\n \n $this->manager->persist($page);\n \n return $page;\n }", "public function actionCreate() {\n $model = new page();\n if ($model->load(Yii::$app->request->post())) {\n $slug = str_replace(' ', '-', $_POST['page']['pageName']);\n $model->pageDateCreated = date('y-m-d h:i:s');\n $model->slug = $slug;\n if ($model->save()) {\n Yii::$app->session->setFlash('item', 'Page has been created successfully!');\n }\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model = new Page;\n\n\t\tif(isset($_POST['Page']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Page'];\n\t\t\tif (isset($_POST['tags']))\n\t\t\t\t$model->setTags($_POST['tags']);\n\t\t\tif($model->save())\n\t\t\t\t$this->redirectModel($model);\n\t\t}\n\t\telse if(isset($_GET['key']))\n\t\t\t$model->key = $_GET['key'];\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function newPage(array $settings = array())\r\n {\r\n /* Add new table head */\r\n $page = $this->_getPdf()->newPage(Zend_Pdf_Page::SIZE_A4);\r\n $this->_getPdf()->pages[] = $page;\r\n $this->y = 800;\r\n if (!empty($settings['table_header'])) {\r\n $this->_drawHeader($page);\r\n }\r\n return $page;\r\n }", "protected function getPage() {}", "protected function getPage() {}", "public function setPage($page)\n {\n $this->page = $page;\n\n return $this;\n }", "public function setPage($page)\n {\n $this->page = $page;\n\n return $this;\n }", "public function setPage($page)\n {\n $this->page = $page;\n return $this;\n }", "protected function createElement(int $page, int $currentPage = 0): PageItem\n\t{\n\t\treturn new PageItem(\n\t\t\t$page,\n\t\t\t$page === $currentPage,\n\t\t\tfalse,\n\t\t\tnull,\n\t\t\t$this->formatLink($page)\n\t\t);\n\t}", "public function page( $page )\n\t{\n\t\t$this->parameters['page'] = $page;\n\n\t\treturn $this;\n\t}", "function lb_show_make_page() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'make_page',\n\t\t\t'pages' => lb_get_all_pages_from_pages(),\n\t\t)\n\t);\n}", "public function Page(){\n parent::__construct();\n $this->template_dir = DOCUMENT_ROOT.'/templates/';\n $this->compile_dir = DOCUMENT_ROOT.'/smarty/';\n //$this->caching = Smarty::CACHING_LIFETIME_CURRENT;\n $this->caching = Smarty::CACHING_OFF;\n $this->debugging = false;\n }", "private function buildPage() {\n ob_clean();\n ob_start();\n\n //session_start();\n require_once $this->_template;\n\n $this->_page = ob_get_clean();\n }", "public function setPage(Page $page);", "public function create()\n {\n $page = new Page();\n $page->created_at = date('Y-m-d H:i:s');\n\n $data['autoIncrement'] = get_autoincrement('content');\n $data['action'] = route('admin.pages.store');\n $data['page'] = $page;\n\n return view('admin.pages.form', $data)->with(['title' => 'Создание страницы']);\n }", "public function getPage() {}", "public function getPage() {}", "function __construct() {\r\n\r\n global $pageSettings;\r\n\r\n $this->displayLang = $pageSettings->displayLang;\r\n\r\n $this->xmlContents = $this->parseAndValidateXMLContents();\r\n\r\n }", "public function newPage(array $settings = [])\n {\n /* Add new table head */\n $page = $this->_getPdf()->newPage(\\Zend_Pdf_Page::SIZE_A4);\n $this->_getPdf()->pages[] = $page;\n $this->y = 800;\n if (!empty($settings['table_header'])) {\n $this->_drawHeader($page);\n }\n return $page;\n }", "public function __construct($page){\n $this->template = \"templates/template_\" . $page . \".php\";\n }", "public function setPage($page)\n {\n $this->setAttributeRaw('page', $page);\n\n return $this;\n }", "public function getPage($id){\n\t\ttry {\n\t\t\t$sql = \"SELECT * FROM page WHERE id = :id LIMIT 1\";\n\t\t\t$stmt = $this->_db->prepare($sql);\n\t\t\t$stmt->execute(array( 'id' => $id));\n\t\t\tif($stmt->errorCode() != 0){\n\t\t\t\t$error = $stmt->errorInfo();\n\t\t\t\tthrow new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir une Page specifiee\");\n\t\t\t}\n\t\t\t$data = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\tif($data == null){\n\t\t\t\tthrow new NullObjectException();\n\t\t\t}\n\t\t\t$page = new Page($data);\n\t\t\treturn $page;\n\t\t}catch(PDOException $e){\n\t\t\tthrow new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir une Page specifiee\");\n\t\t}\n\t}", "public function __construct()\n {\n // Page Data\n $this->title = 'Dashboard';\n $this->url = 'dashboard';\n }", "function __construct(){\n // This object is passed to all of your pages.\n // Access it with $handler\n }", "public function page_init() {\n }", "private function createPages($pageFlow)\n {\n $nextPage = null;\n $pageObject = null;\n foreach(array_reverse($pageFlow) as $page)\n {\n if($page !== end($pageFlow))\n {\n $pageObject = $this->getPageObject($page);\n $pageObject->setNextPage($nextPage);\n }\n $nextPage = $pageObject;\n }\n return $pageObject;\n }", "public function getPage() {\n \t\n \t// Return our page instance\n \treturn $this->oPage;\n }" ]
[ "0.7863502", "0.76566994", "0.7622293", "0.73614395", "0.70707375", "0.7052438", "0.7032932", "0.69520754", "0.6933178", "0.68760777", "0.68760777", "0.68760777", "0.6808639", "0.6803282", "0.67985314", "0.67133176", "0.66770965", "0.66646415", "0.6630307", "0.6587614", "0.658634", "0.6582064", "0.6547647", "0.654124", "0.65046525", "0.64846206", "0.64640254", "0.64477503", "0.63995755", "0.63977426", "0.6385055", "0.6348939", "0.6346782", "0.63421893", "0.6319973", "0.63161856", "0.63147503", "0.62583774", "0.6240696", "0.6240696", "0.62391967", "0.62368965", "0.6231621", "0.62086624", "0.62027127", "0.6184061", "0.6182312", "0.61821663", "0.6155555", "0.6150247", "0.61433417", "0.61370915", "0.6136266", "0.6120414", "0.61025316", "0.60956496", "0.6089029", "0.6072827", "0.6059199", "0.6049384", "0.6049384", "0.60281134", "0.6000259", "0.59949094", "0.5991257", "0.59874016", "0.5972138", "0.59623134", "0.59618217", "0.59567654", "0.5954165", "0.594617", "0.59444904", "0.59381574", "0.59268045", "0.5919481", "0.5896249", "0.58962464", "0.58931166", "0.58931166", "0.58929765", "0.5876854", "0.58621514", "0.5858595", "0.58578444", "0.5854664", "0.58485645", "0.5846355", "0.58421326", "0.58421326", "0.5837642", "0.58298373", "0.5823665", "0.5820147", "0.57991886", "0.5797772", "0.5797106", "0.57964474", "0.57828814", "0.5765021" ]
0.6228714
43