query
stringlengths
9
43.3k
document
stringlengths
17
1.17M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
/ create Create A New Environment Usage Environment.create Parameters ParameterData TypeComments new_valueshashmapSee required attributes list1 below. Required attributes: isactive and product_id Result environment_id
function Environment_create($isactive, $product_id, $name = NULL) { $varray = array("isactive" => "int", "product_id" => "int", "name" => "string"); foreach($varray as $key => $val) { if (isset(${$key})) { $carray[$key] = new xmlrpcval(${$key}, $val); } } // Create call $call = new xmlrpcmsg('Environment.create', array(new xmlrpcval($carray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create(Environment $environment);", "public function create( array $parameters );", "public function create( array $parameters );", "public function formEnvironment()\n {\n\n // Todo\n // - add : define params : ports, id, dockerfile, passwords (+ check & error message -> ex : ports)\n // - edit (warning : volumes erased and add copy source if first delete then reconstruct => check commented \"formEnvironment\" method)\n\n if (\n //(!isset($_POST['webserverTrigger']) || empty($_POST['webserverTrigger'])) && // Todo : when webserver not embedded in php\n (!isset($_POST['phpTrigger']) || empty($_POST['phpTrigger'])) &&\n (!isset($_POST['mysqlTrigger']) || empty($_POST['mysqlTrigger'])) &&\n (!isset($_POST['sftp']) || empty($_POST['sftp']))\n ) {\n // Todo : proper error (display error flash ?!)\n exit ('no options choosen');\n }\n\n\n // Todo more params setable\n // Todo Errors\n // Todo Mails (params env.php)\n // Todo Facto\n // Todo : Warning session problem (db empty & exemple : no logout)\n // Todo : Warning ion_auth_users_groups delete cascade (+check all)\n\n\n // Load models\n $this->load->model('Environments_model');\n $this->load->model('Mysqlversions_model');\n $this->load->model('Phpversions_model');\n\n // Load helpers\n $this->load->helpers('Security_helper');\n\n // Load libs\n $this->load->library('zip');\n\n // User id\n $userId = $this->ion_auth->user()->row()->id;\n if (!isset($userId) || empty($userId)) {\n // Todo : proper error (display error flash ?!)\n exit ('no user id');\n }\n\n // 1. Instantiate environment\n $environment = new stdClass();\n\n // 2. Set userId\n $environment->{Environments_model::userId} = $userId;\n\n // 3. Set folder uniqId\n $phpUniqueId = uniqid();\n $environment->{Environments_model::folder} = $phpUniqueId;\n //Custom id management $environment->{Environments_model::folder} = (isset($_POST['customId']) && !empty($_POST['customId'])) ? strtolower(str_replace(' ', '_', trim($_POST['customId']))) : uniqid();\n\n // 4. Get $_POST params\n // Set name\n $environment->{Environments_model::name} = (isset($_POST['name']) && !empty($_POST['name'])) ? trim($_POST['name']) : $phpUniqueId;\n // Set webserver\n // Todo : $_POST['webserverTrigger']\n\n\n // Set php\n $environment->{Environments_model::phpVersionId} = (isset($_POST['phpTrigger']) && !empty($_POST['phpTrigger']) && isset($_POST['phpVersion']) && !empty($_POST['phpVersion']) && $_POST['phpVersion'] != \"--\" && $_POST['phpVersion'] != \"custom\") ? $_POST['phpVersion'] : null;\n if (isset($environment->{Environments_model::phpVersionId}) && !empty($environment->{Environments_model::phpVersionId})) {\n $environment->{Environments_model::phpPort} = (isset($_POST['phpPort']) && !empty($_POST['phpPort'])) ? /*$this->TODOchekAvailablePort($_POST['phpPort'])*/ $_POST['phpPort'] : $this->getAvailablePort();// Todo\n $environment->{Environments_model::phpSSLPort} = (isset($_POST['phpSSLPort']) && !empty($_POST['phpSSLPort'])) ? /*$this->TODOchekAvailablePort($_POST['phpSSLPort'])*/ $_POST['phpSSLPort'] : $this->getAvailablePort();// Todo\n // Todo : $environment->{Environments_model::phpDockerfile} = (isset($_POST['phpDockerfile']) && !empty($_POST['phpDockerfile'])) ? $_POST['phpDockerfile'] : null;\n }\n\n\t\tif (isset($environment->{Environments_model::phpVersionId}) && !empty($environment->{Environments_model::phpVersionId}) && $environment->{Environments_model::phpVersionId} == 1) {\n\t\t\t$environment->{Environments_model::webserver} = \"nginx\";\n\t\t} else {\n\t\t\t$environment->{Environments_model::webserver} = \"apache\";\n\t\t}\n\n // Set mysql\n $environment->{Environments_model::mysqlVersionId} = (isset($_POST['mysqlTrigger']) && !empty($_POST['mysqlTrigger']) && isset($_POST['mysqlVersion']) && !empty($_POST['mysqlVersion']) && $_POST['mysqlVersion'] != \"--\" && $_POST['mysqlVersion'] != \"custom\") ? $_POST['mysqlVersion'] : null;\n if (isset($environment->{Environments_model::mysqlVersionId}) && !empty($environment->{Environments_model::mysqlVersionId})) {\n $environment->{Environments_model::mysqlUser} = (isset($_POST['mysqlUser']) && !empty($_POST['mysqlUser'])) ? $_POST['mysqlUser'] : 'root';// Todo\n $environment->{Environments_model::mysqlPassword} = (isset($_POST['mysqlPassword']) && !empty($_POST['mysqlPassword'])) ? $_POST['mysqlPassword'] : randomPassword();// Todo\n $environment->{Environments_model::mysqlPort} = (isset($_POST['mysqlPort']) && !empty($_POST['mysqlPort'])) ? /*$this->TODOchekAvailablePort($_POST['mysqlPort'])*/ $_POST['mysqlPort'] : $this->getAvailablePort();// Todo\n // Todo : $environment->{Environments_model::mysqlDockerfile} = (isset($_POST['mysqlDockerfile']) && !empty($_POST['mysqlDockerfile'])) ? $_POST['mysqlDockerfile'] : null;\n }\n\n // Set phpmyadmin\n $environment->{Environments_model::hasPma} = (isset($_POST['mysqlTrigger']) && !empty($_POST['mysqlTrigger']) && isset($_POST['mysqlVersion']) && !empty($_POST['mysqlVersion']) && isset($_POST['pma']) && !empty($_POST['pma'])) ? true : false;\n if (isset($environment->{Environments_model::hasPma}) && !empty($environment->{Environments_model::hasPma})) {\n $environment->{Environments_model::pmaPort} = (isset($_POST['pmaPort']) && !empty($_POST['pmaPort'])) ? /*$this->TODOchekAvailablePort($_POST['pmaPort'])*/ $_POST['pmaPort'] : $this->getAvailablePort();// Todo\n }\n\n // Set sftp\n $environment->{Environments_model::hasSftp} = (isset($_POST['sftp']) && !empty($_POST['sftp'])) ? true : false;\n if (isset($environment->{Environments_model::hasSftp}) && !empty($environment->{Environments_model::hasSftp})) {\n //$environment->{Environments_model::sftpUser} = (isset($_POST['sftpUser']) && !empty($_POST['sftpUser'])) ? $_POST['sftpUser'] : $environment->{Environments_model::folder};// Todo\n $environment->{Environments_model::sftpUser} = strtolower(str_replace(' ', '_', trim($environment->{Environments_model::name})));\n $environment->{Environments_model::sftpPassword} = (isset($_POST['sftpPassword']) && !empty($_POST['sftpPassword'])) ? $_POST['sftpPassword'] : randomPassword();// Todo\n $environment->{Environments_model::sftpPort} = (isset($_POST['sftpPort']) && !empty($_POST['sftpPort'])) ? /*$this->TODOchekAvailablePort($_POST['sftpPort'])*/ $_POST['sftpPort'] : $this->getAvailablePort();// Todo\n }\n\n // Set xDebug\n if ($_POST['xDebugTrigger']) {\n $environment->{Environments_model::xDebugRemoteHost} = (isset($_POST['xDebugRemoteHost']) && !empty($_POST['xDebugRemoteHost'])) ? $_POST['xDebugRemoteHost'] : '0.0.0.0';\n }\n\n // 5. Generate docker compose\n $isProjectDockerFolderCreated = $this->generateProjectDockerFolder($environment);\n\n // Steps 6/7\n if ($isProjectDockerFolderCreated) {\n\n\t\t\t// 6. Check git\n\t\t\tif (isset($_POST['repositoryGit']) && !empty($_POST['repositoryGit'])) {\n\n\t\t\t\t$repositoryGit = $_POST['repositoryGit'];\n\n\t\t\t\t// 1a (optional). Check if repo has credentials (then add it in url)\n\t\t\t\tif (isset($_POST['gitCredentialsUsername']) && !empty($_POST['gitCredentialsUsername'])) {\n\n\t\t\t\t\tif (isset($_POST['gitCredentialsPass']) && !empty($_POST['gitCredentialsPass'])) {\n\n\t\t\t\t\t\t$tagOne = \"https://\";\n\t\t\t\t\t\t$tagTwo = \"@\";\n\n\t\t\t\t\t\t$repositoryGit = preg_replace('#('.preg_quote($tagOne).')(.*?)('.preg_quote($tagTwo).')#si', '$1'. $_POST['gitCredentialsUsername'] . ':' . $_POST['gitCredentialsPass'] .'$3', $repositoryGit);\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// todo error\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\ttry {\n\n\t\t\t\t\trequire(APPPATH . 'third_party/czproject/git-php/src/GitRepository.php');\n\n\t\t\t\t\t$folderName = strtolower(str_replace(' ', '_', trim($environment->{Environments_model::name})));\n\n\t\t\t\t\tunlink(ABSOLUTE_ENVS_FOLDER . \"/\" . $folderName . \"/src/index.php\");\n\t\t\t\t\t$dockerComposePath = ABSOLUTE_ENVS_FOLDER . \"/\" . $folderName . \"/src\";\n\n\t\t\t\t\t$repo = Cz\\Git\\GitRepository::cloneRepository($repositoryGit, $dockerComposePath);\n\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t// todo error\n\t\t\t\t\t//var_dump($e);\n\t\t\t\t}\n\n\n\t\t\t\t$environment->{Environments_model::repositoryGit} = $repositoryGit;\n\n\t\t\t}\n\n\t\t\t// 7. Add environment\n\t\t\t$environmentId = $this->Environments_model->insertEnvironment($environment);\n\n if (isset($environmentId) && $environmentId != -1) {\n\n // 7. Start docker compose\n $folderName = strtolower(str_replace(' ', '_', trim($environment->{Environments_model::name})));\n $dockerComposePath = INNER_ENVS_FOLDER . \"/\" . $folderName . \"/\";\n $this->startEnvironment($dockerComposePath);\n\n // Todo send admin mail ?!\n redirect('environments');\n\n } else {\n // Todo : proper error (display error flash ?!)\n exit('Error insert env add || update !');\n }\n } else {\n // Todo : proper error (display error flash ?!)\n exit('Error docker compose file !');\n }\n\n }", "public function addEnvironment()\n {\n\n $data['phpVersions'] = $this->getPhpVersions();\n $data['mysqlVersions'] = $this->getMysqlVersions();\n\n $this->load->view('elements/header');\n $this->load->view('environments/create', $data);\n\n }", "function add_new_product($product_info) {\r\n try {\r\n $params = array(\r\n array('name' => ':product_name', 'value' => $product_info['product_name']),\r\n array('name' => ':product_number', 'value' => &$product_info['product_number']),\r\n array('name' => ':product_type', 'value' => &$product_info['product_type']),\r\n array('name' => ':notes', 'value' => &$product_info['notes']),\r\n array('name' => ':category_id', 'value' => &$product_info['category_id']),\r\n array('name' => ':width', 'value' => &$product_info['width']),\r\n array('name' => ':height', 'value' => &$product_info['height']),\r\n array('name' => ':h_length', 'value' => &$product_info['h_length']),\r\n array('name' => ':re_demand_border', 'value' => &$product_info['re_demand_border']),\r\n array('name' => ':primary_unit_name', 'value' => &$product_info['primary_unit_name']),\r\n array('name' => ':secondary_unit_name', 'value' => &$product_info['secondary_unit_name']),\r\n array('name' => ':primary_unit_quantity', 'value' => &$product_info['primary_unit_quantity']),\r\n array('name' => ':secondary_unit_quantity', 'value' => &$product_info['secondary_unit_quantity']),\r\n array('name' => ':quantity_status', 'value' => &$product_info['quantity_status']),\r\n array('name' => ':res', 'value' => &$result)\r\n );\r\n\r\n $conn = $this->db->conn_id;\r\n $stmt = oci_parse($conn, \"begin :res := product_actions.add_new_product(:product_name,:product_number,:product_type,:notes,:category_id,:width,:height,:h_length,:re_demand_border,:primary_unit_name,:secondary_unit_name,:primary_unit_quantity,:secondary_unit_quantity,:quantity_status); end;\");\r\n foreach ($params as $variable) {\r\n oci_bind_by_name($stmt, $variable[\"name\"], $variable[\"value\"]);\r\n }\r\n oci_execute($stmt);\r\n return $result;\r\n } catch (Exception $ex) {\r\n return $ex;\r\n }\r\n }", "public function actionProductCreate()\n\t{\n\n\t\t$data = $_POST;\n\t\t$merchantId=$data['merchant_id'];\n\t\t$logFIle = 'product/create/'.$data['merchant_id'];\n\t\tData::createLog('Data : '.json_encode($data),$logFIle,'a');\n\t\n\t\t$connection = Yii::$app->getDb();\n\t\t$result = Jetproductinfo::saveNewRecords($data['data'],$data['merchant_id'],$connection);\n\t}", "public function actionCreate(array $attributes)\n {\n $input = new XInputFilter($attributes);\n $param = $input->getModel('Setting');\n\n if ($param->module == 'System') {\n $param->module = '';\n }\n\n // Get max ordering in a group\n $sql = \"\n SELECT MAX(ordering)\n FROM \" . SITE_ID . \"_setting\n WHERE module=:Module AND setting_group=:GroupName\n \";\n $con = Yii::app()->db;\n $command = $con->createCommand($sql);\n $maxOrdering = $command->queryScalar(array(':Module' => $param->module, ':GroupName' => $param->setting_group));\n $param->ordering = $maxOrdering + 1;\n\n $temp = Setting::model()->findByPk(array('name' => $param->Name, 'module' => $param->module));\n if (!is_null($temp)) {\n errorHandler()->log(Yii::t('Settings.Api', 'PARAMETER_EXISTS'));\n } else {\n if (!$param->save()) {\n errorHandler()->log($this->normalizeModelErrors($param->Errors));\n } else {\n $this->actionDb2php();\n }\n }\n $this->result = $param;\n }", "public function createConfigProduct($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\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'] = [];\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['categories'], $data['website_ids'], $data['description'], $data['short_description'], $data['tax_class_id'], $data['associated_skus'], $data['price'], $data['price_changes'], $data['configurable_attributes'], $data['stock_data'] );\n\n $result = $this->curlRequest(\"/rest/V1/products/\", 1, json_encode([\"product\" => $data]));\n\n return $result;\n \n \n }", "public function CreateAttribute($attribute_data,$attribute_set_id){\n\n $attribute_code = $attribute_data['attribute_code'];\n $attribute_name = $attribute_data['attribute_name'];\n $field_type_id = $attribute_data['field_type_id'];\n $input_type = 'text';\n if($field_type_id == 1){\n $input_type = 'select';\n }else if($field_type_id ==4){\n $input_type = 'multiselect';\n }\n\n $result = $this->curlRequest(\"/rest/V1/products/attributes/\".$attribute_code,0);\n\n if(isset($result['message'])){\n\n $data['attribute'] = array(\n \"attribute_code\" => $attribute_code,\n \"frontend_input\" => $input_type,\n \"scope\" => \"global\",\n \"is_unique\" => 0,\n \"is_required\" => 0,\n \"is_searchable\" => 0,\n \"is_visible_in_advanced_search\" => 0,\n \"is_comparable\" => 0,\n \"is_used_for_promo_rules\" => 0,\n \"is_visible_on_front\" => 0,\n \"used_in_product_listing\" => 0,\n \"default_frontend_label\" => $attribute_name,\n \"frontend_labels\" => array(array(\"store_id\" => \"0\", \"label\" => $attribute_name))\n );\n\n $result = $this->curlRequest(\"/rest/V1/products/attributes/\",1,json_encode($data));\n\n $attribute_id = $result['attribute_id'];\n\n }else{\n $attribute_id = $result['attribute_id'];\n }\n\n $result2 = $this->curlRequest(\"/rest/V1/products/attribute-sets/attributes\",1,json_encode([\n \"attributeSetId\" => $attribute_set_id,\n \"attributeCode\" => $attribute_code,\n \"attributeGroupId\" => 130,\n \"sortOrder\" => 0\n ]) );\n\n return $attribute_id;\n\n }", "function createProduct($params = array()){\n\t\t\n\t\t//echo json_encode($params['data']); die();\n\t\tMpApi::sleep(); \n\t\treturn json_decode($this->callCurl(MpApi::POST , '/multivendor/product/create/product.json' , false, $params['data'] ),true);\n\t}", "function Build_create($product_id, $name, $description = NULL, $milestone = NULL, $isactive = TRUE) {\n\t$varray = array(\"product_id\" => \"int\", \"name\" => \"string\", \"description\" => \"string\", \"milestone\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('Build.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function actionCreate()\n\t{\n\t\t$model=new TestContext;\n\t\t$model->id_user = Yii::app()->user->getId();\n\n\t\t$modelsApps= App::model()->findAll();\n\t\t$appsArray = CHtml::listData($modelsApps, 'id', 'name');\n\n\t\t$modelsPlatforms= Platforms::model()->findAll();\n\t\t$platformsArray = CHtml::listData($modelsPlatforms, 'id', 'name');\n\n\t\t$user_name = Yii::app()->user->getName();\n\n\t\t$users = Users::model()->findAllByAttributes(\n\t\t\tarray('user_name'=>$user_name)\n\t\t);\n\n\t\t$name=\"\";\n\t\tforeach ($users as $user) {\n\t\t\t$name = $user->name;\n\t\t}\n\n\t\t$devicesArray = array();\n\t\t\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t\n\t\tif (isset($_POST['buttonCancel'])) {\n\t\t\t\t\n\t\t\t\t$this->redirect(array('admin'/*,'id'=>$model->ID*/));\n\t }\n\n\t\tif (isset($_POST['TestContext'])) {\n\t\t\t\n\n\t\t\t//$_SESSION['flag-test-context-form']=null;\n\t\t\t$model->attributes=$_POST['TestContext'];\n\t\t\tif ($model->save()) {\n\t\t\t\tYii::app()->user->setState('idTestContext', $model->id);\n\t\t\t\tYii::app()->user->setState('idDevice', $model->id_device);\n\t\t\t\t\n\t\t\t\t$this->redirect(\"/mtcontrool/index.php/elementInst/create1\");\n\t\t\t}\n\n\t\t}\n\t\t\t \n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t\t'appsArray'=>$appsArray,\n\t\t\t'platformsArray'=>$platformsArray,\n\t\t\t'devicesArray'=>$devicesArray,\n\t\t\t'name'=>$name\n\t\t));\n\t}", "function TestPlan_create($author_id, $product_id, $default_product_version, $type_id, $name, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "abstract public function create (ParameterBag $data);", "public function create($attributes){\n }", "public function createAction()\n {\n $this->createEditParameters = $this->createEditParameters + $this->_createExtraParameters;\n\n parent::createAction();\n }", "public static function get_parameters() {\n $r = array_merge(\n parent::get_parameters(),\n array(\n array(\n 'name' => 'transect_count_attr_ids',\n 'caption' => 'Transect count attribute IDs',\n 'description' => 'Comma separated list of sample attribute IDs. Specify each attribute that can contain a count of transects surveyed '.\n '(e.g. low shore, middle shore, high shore). For each attribute, n transects will be available for data input.',\n 'type' => 'textfield',\n 'required' => true,\n 'group' => 'Big Sea setup'\n ), array(\n 'name' => 'transect_captions',\n 'caption' => 'Transect captions',\n 'description' => 'Comma separated list of captions to use for each of the above attributes, in the same order.',\n 'type' => 'textfield',\n 'required' => true,\n 'group' => 'Big Sea setup'\n ),\n array(\n 'name' => 'child_sample_zone_attr_id',\n 'caption' => 'Child sample zone attribute ID',\n 'description' => 'A text attribute used to store the zone in the child sample.',\n 'type' => 'select',\n 'table' => 'sample_attribute',\n 'valueField' => 'id',\n 'captionField' => 'caption',\n 'group' => 'Big Sea setup'\n ), array(\n 'name' => 'child_sample_transect_attr_id',\n 'caption' => 'Child sample transect attribute ID',\n 'description' => 'An integer attribute used to store the transect in the child sample.',\n 'type' => 'select',\n 'table' => 'sample_attribute',\n 'valueField' => 'id',\n 'captionField' => 'caption',\n 'group' => 'Big Sea setup'\n ), array(\n 'name' => 'search_species_transect_attr_id',\n 'caption' => 'Parent sample search species attribute ID',\n 'description' => 'An integer multivalut attribute used to store the search species list in the parent attribute.',\n 'type' => 'select',\n 'table' => 'sample_attribute',\n 'valueField' => 'id',\n 'captionField' => 'caption',\n 'group' => 'Big Sea setup'\n ),\n array(\n 'name' => 'front_page_path',\n 'caption' => 'Front page path',\n 'description' => 'Path to the front page input form.',\n 'type' => 'textfield',\n 'required' => true,\n 'group' => 'Big Sea setup'\n ),\n array(\n 'name' => 'parent_sample_method_id',\n 'caption' => 'Parent Sample Method',\n 'type' => 'select',\n 'table' => 'termlists_term',\n 'captionField' => 'term',\n 'valueField' => 'id',\n 'extraParams' => array('termlist_external_key' => 'indicia:sample_methods'),\n 'required' => false,\n 'helpText' => 'The sample method that will be used for created visit samples.',\n 'group' => 'Big Sea setup'\n )\n )\n );\n return $r;\n }", "public function postCreate()\n {\n \tLog::info(\"postCreate in AttributeController\");\n\n \t$product_id = Input::get('product_id');\n \t\n \t$form = $this->attribute->getForm();\n \n \tLog::info(\"111111111111111111\");\n \tif (! $form->isValid()) {\n \t\tLog::info(\"22222222\");\n \t\treturn $this->redirectRoute('admin.attribute.index')\n \t\t->withErrors($form->getErrors())\n \t\t->withInput();\n \t}\n \tLog::info(\"3333333333333333333\");\n \n \t$attribute = $this->attribute->create($form->getInputData());\n \t\n \t$product = $this->product->findById($product_id);\n \t$product->attributes()->attach($attribute->id);\n \t\n \t$attributes = $this->product->findAttributesById($product_id);\n \t\n \t//var_dump($attributes);\n //\t$attributes = $this->product\n \n \treturn $attributes;\n }", "public function createProduct($data);", "public function actionCreate()\n {\n $product_id = Yii::$app->request->get('product_id');\n $product = Product::findOne($product_id);\n if (!$product) {\n throw new HttpException(400);\n }\n /** @var \\common\\models\\AttributeValue $model */\n $model = new $this->model(['product_id' => $product_id]);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['product/update', 'id' => $product_id]);\n } else {\n return $this->render($this->create_view, [\n 'model' => $model,\n ]);\n }\n }", "public function _getParamsCreate()\n {\n extract($this->modelOptions);\n $model = $this->modelOptions;\n\n $params['modeloptions'] = $this->modelOptions;\n $referenceValues = array();\n $mapValues = array();\n foreach ($this->modelOptions['modelfield'] as $key => $value) {\n if (array_key_exists('reference', $value)) {\n $ref = $value['reference'];\n if (array_key_exists('type', $ref) && $ref['type'] == 'reference_table') {\n $getValues = $this->db->query('SELECT * from '.$ref['table_name'].' where is_delete = 0')->result_array();\n $referenceValues[$key] = $getValues;\n\n $getMap = $this->db->query('SELECT * from '.$ref['reference_table'].' order by id ASC')->result_array();\n $mapValues[$key] = $getMap;\n } elseif ((array_key_exists('type', $ref) && $ref['type'] == 'master_table') || !array_key_exists('type', $ref)) {\n $source = 'name';\n if (array_key_exists('source_key', $ref)) $source = $ref['source_key'];\n\n $getValues = $this->db->query('SELECT * from '.$ref['table_name'].' where is_delete = 0 ORDER by '.$source.' ASC')->result_array();\n $referenceValues[$key] = $getValues;\n } \n }\n\n if (array_key_exists('values', $value)) {\n $referenceValues[$key] = $value['values'];\n }\n\n if (count($referenceValues) > 0) $params['referencevalues'] = $referenceValues;\n if (count($mapValues) > 0) $params['mapValues'] = $mapValues;\n }\n \n $params['activemenu'] = $model['modulename'];\n $params['pagetitle'] = 'Create New '.$model['modulename'];\n $params['modulename'] = $model['modulename'];\n $params['breadcrumb'] = array(\n $modulename => base_url().$route,\n 'Create new '.$modulename => ''\n );\n if (isset($parentmenu)) $params['parentmenu'] = $parentmenu;\n return $params;\n }", "function createEquipment($post,$deviceType,$appVersion,$OSVersion,$browserVersion)\n{\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\n\tsession_start();\n $OrgID=$_SESSION['OrgID'];\n\t$Equipment=$post['Equipment'];\n\t$Description=$post['Description'];\n\t$StatusID='1';\n\t$CreatedDateTime = date('Y-m-d H:i:s');\n\t$ModifyDateTime = date('Y-m-d H:i:s');\n\t\n\t\n\t\n $result = mysql_query(\"INSERT INTO `SCP_Equipments` (`Equipment`, `Description`, `OrgID`, `StatusID`,`CreatedDateTime`, `ModifyDateTime`) VALUES ('$Equipment', '$Description', '$OrgID', '$StatusID','$CreatedDateTime', '$ModifyDateTime')\");\n if (!$result) die('Invalid query: ' . mysql_error());\n\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Equipments create sucessfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = \"No Equipments Found\";\n $data['responseCode'] = \"201\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "public function create($scope, $name, $description);", "public function create($table, $parameters)\n {\n\n }", "private function setParams()\n {\n $this->params['MERCHANTNUMBER'] = $this->merchantNumber;\n $this->params['OPERATION'] = 'CREATE_ORDER';\n $this->params['ORDERNUMBER'] = $this->operation->getOrderNumber();\n $this->params['AMOUNT'] = $this->operation->getAmount();\n $this->params['CURRENCY'] = $this->operation->getCurrency();\n $this->params['DEPOSITFLAG'] = $this->depositFlag;\n if($this->operation->getMerOrderNum())\n $this->params['MERORDERNUM'] = $this->operation->getMerOrderNum();\n $this->params['URL'] = $this->url;\n\n if($this->operation->getDescription())\n $this->params['DESCRIPTION'] = $this->operation->getDescription();\n if($this->operation->getMd())\n $this->params['MD'] = $this->operation->getMd();\n\n }", "public function createSystemType()\r\n{\r\n $query_string = \"INSERT INTO system_type \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"systemtypename = :systemtypename, \";\r\n $query_string .= \"systemtypedesc = :systemtypedesc\";\r\n\r\n return $query_string;\r\n}", "public function addNewStructureRow(){\n\t\t$map_id = $this->Generic_model->general_fetch_array_return_row('map_attributes_values', array('attribute_id'=>$this->input->post('newStructureAttr'), 'value'=>$this->input->post('newStructureValue')))->map_id;\n\t\t$onSale = '1';\n\t\tif($this->input->post('onSaleStruct') == ''){\n\t\t\t$onSale = '0';\n\t\t}\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'retail_price' => $this->input->post('price'),\n\t\t\t'retail_price_tax' => $this->input->post('priceTax'),\n\t\t\t'cost_price' => $this->input->post('costPrice'),\n\t\t\t'on_sale_status' => $onSale\n\t\t);\n\t\t$response = $this->Generic_model->general_insert('pricing_structure', $details);\n\t\tif($response){\n\t\t\t$this->session->set_flashdata('success', 'Product Updated successfully with new pricing structure.');\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}", "private function XML_getXSSVulnerableParams() {\n\t\t$vulnerableParamsEntity = $this->xmlHandler->createElement('vulnerableparams');\n\n\t\t$vulnerableFormsEntity = $this->xmlHandler->createElement('vulnerableforms');\n\n\t\tforeach($this->XSSReport->getVulnerableDataInfo() as $formDataSet ) {\n\n\t\t\t$formEntity = $this->xmlHandler->createElement('form');\n\t\t\t$formIDAttrEntity = $this->xmlHandler->createAttribute('form_id');\n\t\t\t$formIDAttrEntity->appendChild(\n\t\t\t\t$this->xmlHandler->createTextNode($formDataSet->getFormID()));\n\n\t\t\t$formEntity->appendChild($formIDAttrEntity);\n\n\t\t\tforeach($formDataSet->getVulnerableParams() as $paramDataSet) {\n\n\t\t\t\t$vulnerableParamEntity = $this->xmlHandler->createElement('vulnerableparam');\n\n\t\t\t\t$paramNameEntity = $this->xmlHandler->createElement('paramname');\n\t\t\t\t$paramNameEntity->appendChild($this->xmlHandler->createTextNode($this->filtrateData( $paramDataSet->getParamName() )));\n\n\t\t\t\t$vulnerableParamEntity->appendChild($paramNameEntity);\n\n\t\t\t\t$xssTypeEntity = $this->xmlHandler->createElement('xsstype');\n\t\t\t\t$xssTypeEntity->appendChild($this->xmlHandler->createTextNode($this->filtrateData( $paramDataSet->getXSSType() )));\n\n\t\t\t\t$vulnerableParamEntity->appendChild($xssTypeEntity);\n\n\t\t\t\t// check values = vulnerable values ($paramValuesEntity)\n\t\t\t\t// inject values = exploits ($exploitsEntity)\n\t\t\t\tif(count($paramDataSet->vulnerableParamValues['check']) !== 0) {\n\t\t\t\t\t$paramValuesEntity = $this->xmlHandler->createElement('vulnerablevalues');\n\n\t\t\t\t\tforeach($paramDataSet->vulnerableParamValues['check'] as $techniqueName => $paramValues) {\n\n\t\t\t\t\t\t$techniqueEntity = $this->xmlHandler->createElement('checktechnique');\n\t\t\t\t\t\t$techniqueNameAttrEntity = $this->xmlHandler->createAttribute('technique_name');\n\t\t\t\t\t\t$techniqueNameAttrEntity->appendChild($this->xmlHandler->createTextNode($techniqueName));\n\t\t\t\t\t\t$techniqueEntity->appendChild($techniqueNameAttrEntity);\n\n\n\t\t\t\t\t\tforeach($paramValues as $paramValueSet) {\n\t\t\t\t\t\t\t$valueEntity = $this->xmlHandler->createElement('value');\n\t\t\t\t\t\t\t$valueEntity->appendChild($this->xmlHandler->createTextNode($this->filtrateData($paramValueSet['vulnerableValue']) ));\n\n\t\t\t\t\t\t\t$techniqueEntity->appendChild($valueEntity);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$paramValuesEntity->appendChild($techniqueEntity);\n\t\t\t\t\t}\n\n\t\t\t\t\t$vulnerableParamEntity->appendChild($paramValuesEntity);\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tif(count($paramDataSet->vulnerableParamValues['inject']) !== 0) {\n\t\t\t\t\t$exploitsEntity = $this->xmlHandler->createElement('exploits');\n\n\t\t\t\t\tforeach($paramDataSet->vulnerableParamValues['inject'] as $techniqueName => $exploits) {\n\t\t\t\t\t\t$techniqueEntity = $this->xmlHandler->createElement('exploittechnique');\n\t\t\t\t\t\t$techniqueNameAttrEntity = $this->xmlHandler->createAttribute('technique_name');\n\t\t\t\t\t\t$techniqueNameAttrEntity->appendChild($this->xmlHandler->createTextNode($techniqueName));\n\t\t\t\t\t\t$techniqueEntity->appendChild($techniqueNameAttrEntity);\n\n\t\t\t\t\t\tforeach($exploits as $exploitValueSet) {\n\t\t\t\t\t\t\t//'resultQueue' => array stepID -> value\n\t\t\t\t\t\t\t//'resultData' => string\n\t\t\t\t\t\t\t$techniqueExploitKindEntity = $this->xmlHandler->createElement('exploitkind');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$techniqueValueQueueEntity = $this->xmlHandler->createElement('valuesqueue');\n\t\t\t\t\t\t\t$techniqueValueQueueEntity->appendChild($this->xmlHandler->createTextNode(implode(' ->-> ', $this->filtrateData($exploitValueSet['resultQueue']) )));\n\n\t\t\t\t\t\t\t$techniqueDataEntity = $this->xmlHandler->createElement('exploitdata');\n\t\t\t\t\t\t\t$techniqueDataEntity->appendChild($this->xmlHandler->createTextNode($this->filtrateData($exploitValueSet['resultData']) ));\n\n\t\t\t\t\t\t\t$techniqueExploitKindEntity->appendChild($techniqueValueQueueEntity);\n\t\t\t\t\t\t\t$techniqueExploitKindEntity->appendChild($techniqueDataEntity);\n\n\t\t\t\t\t\t\t$techniqueEntity->appendChild($techniqueExploitKindEntity);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$exploitsEntity->appendChild($techniqueEntity);\n\t\t\t\t\t}\n\n\t\t\t\t\t$vulnerableParamEntity->appendChild($exploitsEntity);\n\t\t\t\t}\n\n\t\t\t\t$formEntity->appendChild($vulnerableParamEntity);\n\t\t\t}\n\n\t\t\t$vulnerableFormsEntity->appendChild($formEntity);\n\t\t}\n\n\t\t$vulnerableParamsEntity->appendChild($vulnerableFormsEntity);\n\n\t\treturn $vulnerableParamsEntity;\n\t}", "public function create()\n {\n if (! Gate::allows('users_manage') && ! Gate::allows('users_development')) {\n return abort(401);\n }\n\n $dev_applications = DB::table('dev_applications')\n ->select('dev_applications.id','dev_applications.application_name', 'dev_applications.dev_by', 'param_vendor.vendor_name')\n ->join('param_vendor', 'dev_applications.dev_by', '=', 'param_vendor.id')\n ->orderBy('application_name', 'asc')\n ->get();\n\n $pic = DB::table('param_pic')\n ->select('param_pic.id','param_pic.pic_name', 'param_pic.pic_telephone', 'param_pic.vendor_id', 'param_vendor.vendor_name')\n ->join('param_vendor', 'param_pic.vendor_id', '=', 'param_vendor.id')\n ->orderBy('param_pic.pic_name', 'asc')\n ->get();\n //DevelopmentApplication::all(['id','application_name', 'dev_by']);\n return view('dev.applications_enhancement.create', compact('dev_applications', 'pic'));\n }" ]
[ "0.56144077", "0.54544616", "0.54544616", "0.5444383", "0.5355432", "0.5300797", "0.5252146", "0.52487355", "0.5236939", "0.52295166", "0.51514196", "0.51509947", "0.50971925", "0.50869226", "0.5079855", "0.5049992", "0.50429094", "0.50075537", "0.5000582", "0.49999797", "0.4982056", "0.49785158", "0.4969113", "0.49555567", "0.49471167", "0.49364218", "0.49349114", "0.49323633", "0.4923161", "0.49224162" ]
0.67015433
0
/ update Update An Existing Environment Usage Environment.update Parameters ParameterData TypeComments environment_idinteger new_valueshashmapenvironment_id can not be modified. Result Array [environment_id] [product_id] [isactive] [name]
function Environment_update($environment_id, $isactive, $product_id = NULL, $name = NULL) { $varray = array("isactive" => "int", "product_id" => "int", "name" => "string"); foreach($varray as $key => $val) { if (isset(${$key})) { $carray[$key] = new xmlrpcval(${$key}, $val); } } // Create call $call = new xmlrpcmsg('Environment.update', array(new xmlrpcval($environment_id, "int"), new xmlrpcval($carray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateEnvironment($id, $name)\n {\n\t\t$data = $this->call(array(\"name\"=>$name), \"PUT\", \"environments/\".$id.\".json\");\n\t\treturn $data;\n }", "function update_product($product_info) {\r\n try {\r\n $params = array(\r\n array('name' => ':product_id', 'value' => $product_info['product_id']),\r\n array('name' => ':product_name', 'value' => &$product_info['product_name']),\r\n array('name' => ':product_number', 'value' => &$product_info['product_number']),\r\n array('name' => ':product_type', 'value' => &$product_info['product_type']),\r\n array('name' => ':notes', 'value' => &$product_info['notes']),\r\n array('name' => ':category_id', 'value' => &$product_info['category_id']),\r\n array('name' => ':width', 'value' => &$product_info['width']),\r\n array('name' => ':height', 'value' => &$product_info['height']),\r\n array('name' => ':h_length', 'value' => &$product_info['h_length']),\r\n array('name' => ':re_demand_border', 'value' => &$product_info['re_demand_border']),\r\n array('name' => ':primary_unit_name', 'value' => &$product_info['primary_unit_name']),\r\n array('name' => ':secondary_unit_name', 'value' => &$product_info['secondary_unit_name']),\r\n array('name' => ':primary_unit_quantity', 'value' => &$product_info['primary_unit_quantity']),\r\n array('name' => ':secondary_unit_quantity', 'value' => &$product_info['secondary_unit_quantity']),\r\n array('name' => ':quantity_status', 'value' => &$product_info['quantity_status']),\r\n array('name' => ':res', 'value' => &$result)\r\n );\r\n\r\n $conn = $this->db->conn_id;\r\n $stmt = oci_parse($conn, \"begin :res := product_actions.update_product(:product_id,:product_name,:product_number,:product_type,:notes,:category_id,:width,:height,:h_length,:re_demand_border,:primary_unit_name,:secondary_unit_name,:primary_unit_quantity,:secondary_unit_quantity,:quantity_status); end;\");\r\n\r\n foreach ($params as $variable)\r\n oci_bind_by_name($stmt, $variable[\"name\"], $variable[\"value\"]);\r\n\r\n oci_execute($stmt);\r\n return $result;\r\n } catch (Exception $ex) {\r\n return $ex;\r\n }\r\n }", "public function update_application($arr_data,$arr_where){\n\n\t\t$this->db->where($arr_where);\n\t\treturn $this->db->update($this->_table,$arr_data);\n\n\t}", "function editApp($appid, $usertype, $date, $projtitle, $princinvest, $coprincinvest1, $princinvestdept, $princinvestphone, $email, $deadline, $grant, $exemption, $numA, $numB, $numC, $numD, $numF, $numG\n , $risks, $conA, $conB, $conC1, $conC2, $conC3, $desc, $benf, $reas, $ids) {\n $strQuery = \"update `irb-application` set Status='$usertype',DateSubmitted='$date', TitleOfProject='$projtitle',\n\t\t\t\t\t\tPrincipalInvestigator='$princinvest',CoPrincipalInvestigator='$coprincinvest1',\n PIDepartment='$princinvestdept',PIPhoneNo='$princinvestphone',Email='$email',\n GrantSource='$grant',GrantDeadline='$deadline',Exemption='$exemption',\n NumCharOfSubjects='$numA',SpecialClasses='$numB',HowRecruited='$numC',\n HowResProc='$numD',ReseachMethodClass='$numF',DataSources='$numG',\n ReseachIndepthProcedure='$risks',ExtentOfConf='$conA',PorcForHandlingData='$conB',\n HowDisseminated='$conC1',HowInformed='$conC2',HowConfProtected='$conC3',\n WillSubjectReward='$desc',WhatIntrinsicBenefits='$benf',FailedAppReason='$reas',CheckBoxArray='$ids'\" . \" where ApplicationID=$appid\";\n echo \"$strQuery\";\n return $this->query($strQuery);\n }", "function updateEquipments($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\t\t\n $Equipment=$post['Equipment'];\n\t$Description=$post['Description'];\n\t$ModifyDateTime=date('Y-m-d H:i:s');\n\t$EquipmentID=$post['EquipmentID'];\n\t$sql2=\"UPDATE `SCP_Equipments` SET `Equipment` = '\".$Equipment.\"',`Description` = '\".$Description.\"',`ModifyDateTime` = '\".$ModifyDateTime.\"' WHERE `EquipmentID` = '\".$EquipmentID.\"'\";\t \n $result = mysql_query($sql2) or die(mysql_error());\n\t\n\t\n //CHECK FOR ERROR\n if (!$result) die('Invalid query: ' . mysql_error());\n\t\t\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Updated successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = \"Error in Updation\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "public function update(array $data, array $where);", "public function update(UpdateApplicationsEnhancementsRequest $request, $id)\n {\n if (! Gate::allows('users_manage') && ! Gate::allows('users_development')) {\n return abort(401);\n }\n\n /*$applications = DevelopmentApplicationEnhancement::findOrFail($id);\n $applications->update($dev_applications_enhacement->all());*/\n\n $values = array('title' => $request->title, \n 'cr_number' => $request->cr_number, \n 'application_id' => $request->application_id, \n 'request_date' => $request->request_date, \n 'submit_date' => ($request->submit_date ? $request->submit_date : '0000-00-00'), \n 'live_date' => ($request->live_date ? $request->live_date : '0000-00-00'), \n 'user_owner' => $request->user_owner,\n 'pic' => $request->pic, \n 'application_information' => $request->application_information, \n 'created_at' => date('Y-m-d H:i:s'), \n 'updated_at' => date('Y-m-d H:i:s')\n );\n\n DB::table('dev_applications_enhancement')->where('id', $id)->update($values);\n\n return redirect()->route('dev.applications_enhancement.index')->with('success','Data berhasil diperbarui.');\n }", "function adv_update($table, array $data, array $where);", "public function alamat_detail_pro_update($data){\n\t\t$query = $this->db->query(\"update human_pa_md_emp_address set status_process = '$data[status_process]', \n\t\t\t\t\t\t\taddress_type = '$data[address_type]',\n\t\t\t\t\t\t\tstreet = '$data[street]',\n\t\t\t\t\t\t\tneighborhood1 = '$data[neighborhood1]',\n\t\t\t\t\t\t\tneighborhood2 = '$data[neighborhood2]',\n\t\t\t\t\t\t\tsub_district = '$data[sub_district]',\n\t\t\t\t\t\t\tdistrict = '$data[district]',\n\t\t\t\t\t\t\tcity = '$data[city]',\n\t\t\t\t\t\t\tprovince = '$data[province]',\n\t\t\t\t\t\t\tcountry = '$data[country]',\n\t\t\t\t\t\t\tpostalcode = '$data[postalcode]',\n\t\t\t\t\t\t\tcontact_person = '$data[contact_person]',\n\t\t\t\t\t\t\tcontact_phone_country = '$data[contact_phone_country]',\t\n\t\t\t\t\t\t\tcontact_phone_area = '$data[contact_phone_area]',\n\t\t\t\t\t\t\tcontact_phone_no = '$data[contact_phone_no]',\n\t\t\t\t\t\t\tmobile_phone_country = '$data[mobile_phone_country]',\n\t\t\t\t\t\t\tmobile_phone_area = '$data[mobile_phone_area]',\n\t\t\t\t\t\t\tmobile_phone_no = '$data[mobile_phone_no]'\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\twhere personnel_id = '$data[personnel_id]' \n\t\t\t\t\t\t\tAND start_date = '$data[start_date]' \n\t\t\t\t\t\t\tAND end_date = '$data[end_date]'\");\n\t\treturn $query;\n\t}", "public function update($parameters,$id)\n {\n \t $this->db->update('product', $parameters, array('product_id' => $id));\n return true;\n }", "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 }", "public function update_capacity()\n {\n $capacity_id=@cmm_decode($this->input->post('encoded_id',TRUE));\n if($capacity_id==''){\n redirect(SITE_URL);\n exit;\n }\n // GETTING INPUT TEXT VALUES\n $data = array( \n 'name' =>$this->input->post('name',TRUE),\n 'unit_id' =>$this->input->post('unit',TRUE), \n 'modified_by' => $this->session->userdata('user_id'),\n 'modified_time' => date('Y-m-d H:i:s') \n );\n\n $where = array('capacity_id'=>$capacity_id);\n $res = $this->Common_model->update_data('capacity',$data,$where);\n if ($res)\n {\n $this->session->set_flashdata('response','<div class=\"alert alert-success alert-dismissable\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\"></button>\n <strong>Success!</strong> capacity has been updated successfully! </div>');\n }\n else\n {\n $this->session->set_flashdata('response','<div class=\"alert alert-danger alert-dismissable\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\"></button>\n <strong>Error!</strong> Something went wrong. Please check. </div>'); \n }\n\n redirect(SITE_URL.'capacity'); \n }", "public function actionUpdate() {\n $data = $this->data;\n $model = $this->findModel($data['employee_id']);\n if ($model) {\n $model->employee_code = $data['employee_code'];\n $model->employee_name = $data['employee_name'];\n $model->employee_email = $data['employee_email'];\n $model->status = $data['status'];\n $model->department_id = $data['department_id'];\n\n $errors = $this->EmpDetailsvalidate($data['address']);\n if ($model->validate() && empty($errors)) {\n $model->save();\n $this->InsertUpdateEmpAddress($model->id, $data['address']);\n echo $this->messageReturn(\"success\", 200);\n exit;\n } else {\n $error = $model->getErrors();\n echo $this->messageReturn(\"error\", 404, \"\", $error);\n exit;\n }\n } else {\n echo $this->messageReturn(\"failed\", 201, \"\", \"Please sent correct parameter\");\n exit;\n }\n }", "public function update($request_data){\n $c_id = $request_data['c_id'];\n\n //getting data from $request_data\n $c_name = $request_data['c_name'];\n $c_cont_no = $request_data['c_cont_no'];\n $c_food_pref = $request_data['c_food_pref'];\n\n $dbs = new DatabaseControls();\n $qry = \"update \".$this->table_name.\" set c_name = '\".$c_name.\"',c_cont_no = '\".$c_cont_no.\"',c_food_preference = '\".$c_food_pref.\"' where c_id = \".$c_id;\n $result = $dbs->run_update_qry($qry); \n \n \n return json_encode($result);\n }", "#[Route(path: '/{id}', name: 'calllog_siteparameters_update', methods: ['PUT'])]\n #[Template('AppUserdirectoryBundle/SiteParameters/edit.html.twig')]\n public function updateAction(Request $request, $id)\n {\n return $this->updateParameters($request,$id,'ROLE_CALLLOG_PATHOLOGY_ATTENDING');\n }", "function updateResourceElement($table, $input_fields, $input_types, $input_values, $element_key, $key_value){\n // Load the appropriate helpers\n $ci =& get_instance(); $ci->load->helper('database'); $ci->load->helper('error_code');\n $input_fields_count = count($input_fields);\n $input_values_count = count($input_fields);\n\n if ($input_fields_count != $input_values_count)\n return array(\n \"code\" => BAD_DATA,\n \"message\"=>\"The number of values provided does not match the number of fields.\"\n );\n\n $input_fields_squashed = implode(\"=?, \", $input_fields).\"=?\";\n $input_values[] = $key_value;\n\n return database_query(\n \"UPDATE \".$table.\" SET \".$input_fields_squashed.\" WHERE \".$element_key.\"=?\",\n $input_types.\"s\", $input_values,\n \"UPDATE\"\n );\n}", "public function update( int $expenseId, array $parameters );", "public\n\n function updateelectricitycnxnavailinschl()\n {\n $emis_loggedin = $this->session->userdata('emis_loggedin');\n if ($emis_loggedin)\n {\n $value = $this->input->post('value');\n if ($value == \"1\" || $value == \"2\" || $value == \"3\")\n {\n $data = array(\n \"elecon_avail\" => $value\n );\n $school_id = $this->session->userdata('emis_school_id');\n if ($this->Udise_assetmodel->updatedata($data, $school_id))\n {\n $result_arr['response_code'] = 1;\n }\n else\n {\n $result_arr['response_code'] = 0;\n $result_arr['error_msg'] = \"Unable to update the database. Kindly re-try\";\n }\n }\n else\n {\n $result_arr['response_code'] = - 1;\n $result_arr['error_msg'] = \"Electricity Connection Availability \" . \" is not in the correct format.Re-check and submit again \";\n }\n\n echo json_encode($result_arr);\n }\n else\n {\n redirect('/', 'refresh');\n }\n }", "public function updating_business_programs($post_data) {\n $updated_data = array(\n 'service_id' => $post_data['service'],\n 'program' => $post_data['package_name'],\n 'type' => $post_data['type']\n );\n $this->db->where('id', $post_data['service_id']);\n $this->db->update('business_programs', $updated_data);\n\n\n\n return true;\n }", "public function update_product() {\n\t\t$values=array(\"product_name\"=>$_POST['product_name'],\"description\"=>$_POST['description']);\t\t\t\t\n\t\t$where =array(\"id\"=>$_POST['product_id']);\n\t\tif($this->update(\"products\",$values,$where)) {\t\t\t\n\t\t\techo true;\n\t\t}\n\t\telse\n\t\t\techo 'Error while updating';\n\t}", "public function update( array $params );", "public function editDepartmentUpdate()\n {\n if($this::check_session()){\n $this->form_validation->set_rules('updtdepartment', 'Department', 'required');\n $this->form_validation->set_rules('updtdepartmentCode', 'Department Code', 'required');\n $this->form_validation->set_rules('departmentId', 'Department ID', 'required');\n \n $id = $this->input->post('departmentId');\n $dept = $this->input->post('updtdepartment');\n $deptcode = $this->input->post('updtdepartmentCode');\n \n if($this->form_validation->run()) { \n $this->Admin_model->editDepartmentUpdate($id, $dept, $deptcode);\n $this->addRemoveDepartments();\n }else{\n $this->addRemoveDepartments();\n }\n }\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\n\n function updateseproomsforheadtchrandpriciavail()\n {\n $emis_loggedin = $this->session->userdata('emis_loggedin');\n if ($emis_loggedin)\n {\n $value = $this->input->post('value');\n if ($value == \"1\" || $value == \"2\")\n {\n $data = array(\n \"seprom_headteach\" => $value\n );\n $school_id = $this->session->userdata('emis_school_id');\n if ($this->Udise_assetmodel->updatedata($data, $school_id))\n {\n $result_arr['response_code'] = 1;\n }\n else\n {\n $result_arr['response_code'] = 0;\n $result_arr['error_msg'] = \"Unable to update the database. Kindly re-try\";\n }\n }\n else\n {\n $result_arr['response_code'] = - 1;\n $result_arr['error_msg'] = \"Room avail data \" . \" is not in the correct format.Re-check and submit again \";\n }\n\n echo json_encode($result_arr);\n }\n else\n {\n redirect('/', 'refresh');\n }\n }", "public\n\n function updateschoolequipmntfacavailsciencekit()\n {\n $emis_loggedin = $this->session->userdata('emis_loggedin');\n if ($emis_loggedin)\n {\n $value = $this->input->post('value');\n if ($value == \"1\" || $value == \"2\")\n {\n $data = array(\n \"scince_kit\" => $value\n );\n $school_id = $this->session->userdata('emis_school_id');\n if ($this->Udise_assetmodel->updatedata($data, $school_id))\n {\n $result_arr['response_code'] = 1;\n }\n else\n {\n $result_arr['response_code'] = 0;\n $result_arr['error_msg'] = \"Unable to update the database. Kindly re-try\";\n }\n }\n else\n {\n $result_arr['response_code'] = - 1;\n $result_arr['error_msg'] = \"Update Science Kit \" . \" is not in the correct format.Re-check and submit again \";\n }\n\n echo json_encode($result_arr);\n }\n else\n {\n redirect('/', 'refresh');\n }\n }", "public function updateproduct()\n{\n $productcode = $this->input->post('iproductcode');\n $dataprod['category_id'] = $this->input->post('selcategory');\n $dataprod['product_name'] = $this->input->post('iproductname');\n $dataprod['product_brand'] = $this->input->post('iproductbrand');\n $dataprod['unit'] = $this->input->post('iunit');\n return $this->db->update('product', $dataprod, array('product_code' => $productcode)); \n\n}", "public function update_equipment($data)\n\t {\n\t }", "public function update() {\n if (get_user_permission('assign_assets') === false) {\n redirect(base_url('user_login'));\n }\n\n $user_info = $this->session->userdata('user_session');\n $user_id = $user_info['user_id']; // session user id\n $assign_assets_id = trim($this->input->post('id'));\n $assets_info_id = trim($this->input->post('assets_info_id'));\n $quantity = (int) trim($this->input->post('quantity'));\n $assign_assets_information = $this->Assign_assets_Model->get_assign_assets($assign_assets_id);\n $assets_information = $this->Assets_info_Model->get_assets_info($assets_info_id);\n $assets_quantity = (int) $assets_information->assets_quantity;\n if (($assets_quantity) >= ($quantity)) {\n $data = array(\n 'id' => $assign_assets_id,\n 'assets_info_id' => $assign_assets_information->assets_info_id,\n 'quantity' => $quantity,\n 'employee_id' => $assign_assets_information->employee_id,\n 'assign_date' => $assign_assets_information->assign_date,\n 'user_id' => $user_id,\n );\n $this->db->where('id', $data['id']);\n $this->Assign_assets_Model->db->update('assign_assets', $data);\n $this->update_assigned_assets_quantity_in_assets_info($assets_info_id);\n $this->session->set_flashdata('assign_assets_update_success', 'Successfully Updated.');\n $assign_assets_update_success = $this->session->flashdata('assign_assets_update_success');\n $current_url_session = $this->session->userdata('current_url_session');\n redirect($current_url_session);\n } else {\n $this->session->set_flashdata('assign_assets_update_error', 'Update Failed.');\n $assign_assets_update_error = $this->session->flashdata('assign_assets_update_error');\n $current_url_session = $this->session->userdata('current_url_session');\n redirect($current_url_session);\n }\n }", "public\n\n function updateschoolbuildingtype()\n {\n $emis_loggedin = $this->session->userdata('emis_loggedin');\n if ($emis_loggedin)\n {\n $value = $this->input->post('value');\n if ($value == \"1\" || $value == \"2\" || $value == \"3\" || $value == \"4\")\n {\n $data = array(\n \"buil_type\" => $value\n );\n $school_id = $this->session->userdata('emis_school_id');\n if ($this->Udise_assetmodel->updatedata($data, $school_id))\n {\n $result_arr['response_code'] = 1;\n }\n else\n {\n $result_arr['response_code'] = 0;\n $result_arr['error_msg'] = \"Unable to update the database. Kindly re-try\";\n }\n }\n else\n {\n $result_arr['response_code'] = - 1;\n $result_arr['error_msg'] = \"school type \" . \" is not in the correct format.Re-check and submit again \";\n }\n\n echo json_encode($result_arr);\n }\n else\n {\n redirect('/', 'refresh');\n }\n }", "public function update($data = array (), $condition = array())\n {\n return DB::table('hawthorne_configuration')->where($condition)->update($data);\n }" ]
[ "0.5957238", "0.5590864", "0.5563672", "0.5559229", "0.5531152", "0.5480236", "0.53883547", "0.5376321", "0.53376335", "0.5328483", "0.53188425", "0.53093684", "0.5306204", "0.52796876", "0.52737284", "0.524651", "0.5224582", "0.5222799", "0.522058", "0.52197003", "0.52173316", "0.51925766", "0.517852", "0.5177661", "0.5148573", "0.5148473", "0.51446384", "0.51413697", "0.51353925", "0.5128026" ]
0.7230824
0
/ get_runs Get A List of TestRuns For An Existing Environment Usage Environment.get_runs Parameters ParameterData Type environment_idinteger Result Array [0] Array [build_id] [plan_text_version] [manager_id] [stop_date] [run_id] [plan_id] [product_version] [environment_id] [summary] [notes] [start_date] [1] Array ...
function Environment_get_runs($environment_id) { // Create call $call = new xmlrpcmsg('Environment.get_runs', array(new xmlrpcval($environment_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRuns() {\n\t\tif(!$data = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/run_list.jsp?_plus=true')) {\n\t\t\tthrow new ErrorException($this->feedErrorMessage);\n\t\t}\n\t\treturn $data->runList;\n\t}", "function TestRun_get_test_case_runs($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_case_runs', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getRuns()\n {\n return $this->runs;\n }", "function TestPlan_get_test_runs($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_runs', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"plan\":\n\t\t\t\tunset($va);\n\t\t\t\tforeach($key as $k => $v) {\n\t\t\t\t\t$va[$k] = new xmlrpcval($v, \"string\");\n\t\t\t\t}\n\t\t\t\t$val = $va;\n\t\t\t\t$type = \"struct\";\n\t\t\t\tbreak;\n\t\t\tcase \"build_id\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"manager_id\":\n\t\t\tcase \"plan_id\":\n\t\t\tcase \"plan_text_version\":\n\t\t\tcase \"product_version\":\n\t\t\tcase \"run_id\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"notes\":\n\t\t\tcase \"start_date\":\n\t\t\tcase \"stop_date\":\n\t\t\tcase \"summary\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function testLastRuns()\n {\n LastRun::truncate();\n LastRun::factory()->count(30)->create();\n\n $headers['Accept'] = 'application/json';\n\n $response = $this->get('/api/v1/runner/1/form-data', $headers);\n\n $response->assertStatus(200)->assertJsonStructure(['success', 'data' => ['last_runs'], 'status']);\n }", "function TestCaseRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"assignee\":\n\t\t\tcase \"build_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_run_id\":\n\t\t\tcase \"case_run_status_id\":\n\t\t\tcase \"case_text_version\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"iscurrent\":\n\t\t\tcase \"run_id\":\n\t\t\tcase \"sortkey\":\n\t\t\tcase \"testedby\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"close_date\":\n\t\t\tcase \"notes\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function setRuns($runs)\n {\n $this->runs = $runs;\n\n return $this;\n }", "function TestRun_get_test_cases($run_id) {\n\t// Create call\n\t// FIXME: not working\n\t$call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function _runs()\n {\n $runs = $this->db->pq(\"SELECT runid,run \n FROM v_run \n WHERE startdate < CURRENT_TIMESTAMP\n ORDER BY startdate DESC\");\n $this->_output($runs);\n }", "public function run()\n {\n //populate the runs table with test data\n //userid, rundate, run_distance, pace_min, pace_sec\n $runs = [\n ['1', '2018-11-03', '3.0', '8', '22'],\n ['1', '2018-11-07', '3.2', '8', '15'],\n ['1', '2018-11-07', '3.5', '8', '21'],\n ['2', '2018-11-04', '2.1', '7', '47'],\n ];\n $count = count($runs);\n\n foreach ($runs as $key => $runData) {\n $run = new Runs();\n\n $run->created_at = Carbon\\Carbon::now()->subDays($count)->toDateTimeString();\n $run->updated_at = Carbon\\Carbon::now()->subDays($count)->toDateTimeString();\n $run->user_id = $runData[0];\n $run->run_date = $runData[1];\n $run->run_distance = $runData[2];\n $run->pace_min = $runData[3];\n $run->pace_sec = $runData[4];\n\n $run->save();\n $count--;\n }\n\n }", "function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}", "function run ($parameters) {\n\n\t\trequire_once(SQL_LIB_DIR .\"application.func.php\");\n\t\trequire_once(SQL_LIB_DIR .\"fetch_status_map.func.php\");\n\t\trequire_once(SQL_LIB_DIR .\"scheduling.func.php\");\n\t\trequire_once(SQL_LIB_DIR .\"util.func.php\");\n\n\t\t// Yes, I threw in everything but the kitchen sink in here.\n\t\t$application_id = $parameters->application_id;\n\t\t\n\t\t$data = Get_Transactional_Data($application_id);\n\t\t$holidays = Fetch_Holiday_List();\n\n\t\t$parameters->log = get_log(\"scheduling\");\n\t\t$parameters->info = $data->info;\n\t\t$parameters->rules = Prepare_Rules($data->rules, $data->info);\n\t\t$parameters->schedule = Fetch_Schedule($application_id);\n\t\t$parameters->verified = Analyze_Schedule($parameters->schedule, true);\n\t\t$parameters->grace_periods = Get_Grace_Periods();\n\t\t$parameters->pd_calc = new Pay_Date_Calc_3($holidays);\n\t\t$parameters->arc_map = Fetch_ACH_Return_Code_Map();\n\t\t$parameters->event_transaction_map = Load_Transaction_Map(ECash::getCompany()->company_id);\t\n\t\t$parameters->app_status_map = Fetch_Status_Map();\n\t\t$parameters->application_status_id = $data->info->application_status_id;\n\t\t$parameters->application_status_chain = $parameters->app_status_map[$parameters->application_status_id]['chain'];\n\t\t$parameters->is_watched = $data->info->is_watched;\n\t\t$parameters->most_recent_failure = Grab_Most_Recent_Failure($application_id, $parameters->schedule);\n\n\t\tif (!$parameters->company_id) $parameters->company_id = ECash::getCompany()->company_id;\n\n\t\t// Get the app status\n\t\t$app_status = Fetch_Application_Status($application_id);\n\t\tforeach ($app_status as $key => $value) $parameters->$key = $value;\n\n\t\t$parameters->status = Analyze_Schedule($parameters->schedule);\n\n\t\treturn parent::run($parameters);\n\t}", "public static function apiList(Request $r) {\n\t\t\n\t\t// Authenticate request\n\t\tself::authenticateRequest($r);\n\t\t\n\t\tself::validateList($r);\n\t\t\n\t\t$runs_mask = null;\n\n\t\t// Get all runs for problem given \n\t\t$runs_mask = new Runs(array(\t\t\t\t\t\n\t\t\t\t\t\"status\" => $r[\"status\"],\n\t\t\t\t\t\"veredict\" => $r[\"veredict\"],\n\t\t\t\t\t\"problem_id\" => !is_null($r[\"problem\"]) ? $r[\"problem\"]->getProblemId() : null,\n\t\t\t\t\t\"language\" => $r[\"language\"],\n\t\t\t\t\t\"user_id\" => !is_null($r[\"user\"]) ? $r[\"user\"]->getUserId() : null,\n\t\t\t\t));\n\t\t\n\t\t// Filter relevant columns\n\t\t$relevant_columns = array(\"run_id\", \"guid\", \"language\", \"status\", \"veredict\", \"runtime\", \"memory\", \"score\", \"contest_score\", \"time\", \"submit_delay\", \"Users.username\", \"Problems.alias\");\n\n\t\t// Get our runs\n\t\ttry {\n\t\t\t$runs = RunsDAO::search($runs_mask, \"time\", \"DESC\", $relevant_columns, $r[\"offset\"], $r[\"rowcount\"]);\n\t\t} catch (Exception $e) {\n\t\t\t// Operation failed in the data layer\n\t\t\tthrow new InvalidDatabaseOperationException($e);\n\t\t}\n\t\t\n\t\t$relevant_columns[11] = 'username';\n\t\t$relevant_columns[12] = 'alias';\n\n\t\t$result = array();\n\n\t\tforeach ($runs as $run) {\n\t\t\t$filtered = $run->asFilteredArray($relevant_columns);\n\t\t\t$filtered['time'] = strtotime($filtered['time']);\n\t\t\t$filtered['score'] = round((float) $filtered['score'], 4);\n\t\t\t$filtered['contest_score'] = round((float) $filtered['contest_score'], 2);\n\t\t\tarray_push($result, $filtered);\n\t\t}\n\n\t\t$response = array();\n\t\t$response[\"runs\"] = $result;\n\t\t$response[\"status\"] = \"ok\";\n\n\t\treturn $response;\n\t}", "public function runsAction()\n {\n $this->validateRunManager();\n $class1 = $this->container->getParameter('dtc_queue.class_run');\n $class2 = $this->container->getParameter('dtc_queue.class_run_archive');\n $label1 = 'Live Runs';\n $label2 = 'Archived Runs';\n\n $params = $this->getDualGridParams($class1, $class2, $label1, $label2);\n\n return $this->render('@DtcQueue/Queue/grid.html.twig', $params);\n }", "function TestRun_create($build_id, $environment_id, $manager_id, $plan_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "public function index()\n {\n $runTypes = RunType::all();\n\n return $runTypes;\n }", "public function getRun($runId) {\n if(!$data = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_run.jsp?_plus=true&id='.$runId)) {\n throw new Exception($this->feedErrorMessage);\n }\n return $data;\n }", "function rest_get()\n{\n global $build;\n $response = array();\n\n // Are we looking for what went wrong with this build?\n if (isset($_GET['getproblems'])) {\n $response['hasErrors'] = false;\n $response['hasFailingTests'] = false;\n\n // Lookup some details about this build.\n $buildtype = $build->Type;\n $buildname = $build->Name;\n $siteid = $build->SiteId;\n $starttime = $build->StartTime;\n $projectid = $build->ProjectId;\n\n // Check if this build has errors.\n $buildHasErrors = $build->BuildErrorCount > 0;\n if ($buildHasErrors) {\n $response['hasErrors'] = true;\n // Find the last occurrence of this build that had no errors.\n $no_errors_result = pdo_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime' AND parentid<1 AND builderrors<1\n ORDER BY starttime DESC LIMIT 1\");\n\n if (pdo_num_rows($no_errors_result) > 0) {\n $no_errors_row = pdo_fetch_array($no_errors_result);\n $gmtdate = strtotime($no_errors_row['starttime'] . ' UTC');\n } else {\n // Find the first build\n $firstbuild = pdo_single_row_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime'\n ORDER BY starttime ASC LIMIT 1\");\n $gmtdate = strtotime($firstbuild['starttime'] . ' UTC');\n }\n $response['daysWithErrors'] =\n round((strtotime($starttime) - $gmtdate) / (3600 * 24));\n $response['failingSince'] = date(FMT_DATETIMETZ, $gmtdate);\n $response['failingDate'] = substr($response['failingSince'], 0, 10);\n }\n\n // Check if this build has failed tests.\n $buildHasFailingTests = $build->TestFailedCount > 0;\n if ($buildHasFailingTests) {\n $response['hasFailingTests'] = true;\n // Find the last occurrence of this build that had no test failures.\n $no_fails_result = pdo_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime' AND parentid<1 AND testfailed<1\n ORDER BY starttime DESC LIMIT 1\");\n\n if (pdo_num_rows($no_fails_result) > 0) {\n $no_fails_row = pdo_fetch_array($no_fails_result);\n $gmtdate = strtotime($no_fails_row['starttime'] . ' UTC');\n } else {\n // Find the first build\n $firstbuild = pdo_single_row_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime' AND parentid<1\n ORDER BY starttime ASC LIMIT 1\");\n $gmtdate = strtotime($firstbuild['starttime'] . ' UTC');\n }\n $response['daysWithFailingTests'] =\n round((strtotime($starttime) - $gmtdate) / (3600 * 24));\n $response['testsFailingSince'] = date(FMT_DATETIMETZ, $gmtdate);\n $response['testsFailingDate'] =\n substr($response['testsFailingSince'], 0, 10);\n }\n echo json_encode(cast_data_for_JSON($response));\n }\n}", "private function getNumbersForRuns($g_repo, $runs) {\n /** @var GeneralRepository $g_repo */\n $run_number_assessed = $run_number_total = array();\n foreach ($runs as $run) {\n $run_number_assessed[] =$g_repo->assessmentByRun('assessed', $run);\n $run_number_total[] = $g_repo->assessmentByRun('total', $run);\n }\n return array(\n 'assessed' => $run_number_assessed,\n 'total' => $run_number_total,\n );\n }", "function TestRun_get($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function run (array $parameters);", "public function getRaceRunnersAction()\n {\n $this->_helper->layout()->disableLayout();\n\n $raceUid = $this->_request->getParam('raceUid');\n\n /** @var Hrm_Model_ResultMaintenance $model */\n $model = RP::getModel(static::MDL_HRM_RESULT_MAINT);\n\n $runnerList = $model->getRaceRunners($raceUid);\n\n return $this->_helper->json($this->view->partial('_partials/add-horse-result-runners-list.phtml', 'hrm', [\n 'runnerList' => $runnerList,\n ]));\n }", "public function get_run($run_id, $type, &$run_desc);", "public function runs()\n {\n $this->validateRunManager();\n $this->checkDtcGridBundle();\n $class1 = $this->container->getParameter('dtc_queue.class.run');\n $class2 = $this->container->getParameter('dtc_queue.class.run_archive');\n $label1 = 'Live Runs';\n $label2 = 'Archived Runs';\n\n $params = $this->getDualGridParams($class1, $class2, $label1, $label2);\n\n return $this->render('@DtcQueue/Queue/grid.html.twig', $params);\n }", "public function runTests() {\n $results = \"\";\n for ($i = 0; $i < sizeof($this->tests); $i++) {\n $results .= \"Test \" . ($i + 1) . \": \" . $this->tests[$i]->runTest() . \"<br>\";\n }\n return $results;\n }", "function get_all_scheduled_tests()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('scheduled_tests')->result_array();\n }", "function TestPlan_get_builds($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_builds', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getDraftTeams_post() {\n $this->form_validation->set_rules('SeriesGUID', 'SeriesGUID', 'trim|callback_validateEntityGUID[Series,SeriesID]');\n $this->form_validation->set_rules('ContestGUID', 'ContestGUID', 'trim|required|callback_validateEntityGUID[Contest,ContestID]');\n $this->form_validation->set_rules('GameType', 'GameType', 'trim|required');\n $this->form_validation->set_rules('WeekID', 'WeekID', 'trim');\n $this->form_validation->set_rules('UserGUID', 'UserGUID', 'trim|callback_validateEntityGUID[User,UserID]');\n $this->form_validation->validation($this); /* Run validation */\n /* Validation - ends */\n $Teams = $this->SnakeDrafts_model->getDraftTeams(@$this->Post['Params'], array_merge($this->Post, array(\"SeriesID\" => @$this->SeriesID, \"ContestID\" => @$this->ContestID, 'UserID' => @$this->UserID)), TRUE);\n $this->Return['Data'] = $Teams['Data'];\n $this->Return['Message'] = \"Teams successfully found.\";\n }" ]
[ "0.66514456", "0.6530732", "0.6352171", "0.62279356", "0.5635294", "0.5561226", "0.55493635", "0.54905957", "0.54762316", "0.5294503", "0.52178794", "0.5175206", "0.51585954", "0.510961", "0.51091856", "0.5073981", "0.5069371", "0.50624406", "0.49796304", "0.49647915", "0.49556363", "0.49476546", "0.4940457", "0.49088642", "0.4902961", "0.48815098", "0.48630628", "0.48386103", "0.48042622", "0.4743947" ]
0.7151789
0
/ lookup_name_by_id Lookup A Product Name By Its ID Usage Product.lookup_name_by_id Parameters ParameterData TypeComments product_idintegerCannot be 0 Return name
function Product_lookup_name_by_id($product_id) { // Create call $call = new xmlrpcmsg('Product.lookup_name_by_id', array(new xmlrpcval($product_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Product_lookup_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('Product.lookup_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getProductNameFromId($dbc, $id)\n{\n\t$id = cleanString($dbc, $id);\n\t\n\t$q = \"SELECT NAME FROM PRODUCTS WHERE ID = '$id'\";\n\t$r = mysqli_query($dbc, $q);\n\t\n\tif(mysqli_num_rows($r) == 1)\n\t{\n\t\tlist($productName) = mysqli_fetch_array($r);\n\t\treturn $productName;\n\t}else{\n\t\treturn false;\n\t}\n}", "function GetProductName ( $whichProduct )\n{\n\n\tmysql_select_db ( 'products' );\n\t$query = 'SELECT * FROM products where ID like '.$whichProduct;\n\n\t$result = mysql_query($query );\n\n\tif ( $result )\n\t{\n\t\t$num_results = mysql_num_rows ( $result );\n\t\tif ( $num_results == 1 )\n\t\t{\n\t\t\t$row = mysql_fetch_object ( $result );\n\t\t\t$productName = $row->name;\n\t\t}\n\t\telse\n\t\t\t$productName = 'General';\n\t}\n\n\treturn $productName;\n}", "function tep_get_products_name($product_id, $language = '') {\n global $languages_id;\n\n if (empty($language)) $language = $languages_id;\n\n $product_query = tep_db_query(\"select products_name from \" . TABLE_PRODUCTS_DESCRIPTION . \" where products_id = '\" . (int)$product_id . \"' and language_id = '\" . (int)$language . \"'\");\n $product = tep_db_fetch_array($product_query);\n\n return $product['products_name'];\n }", "public function findNameProd($id){\n return Product::where('id',$id)->first()->name;\n }", "public function listProductname($id){\n try{\n $sql = \"select id_product, product_name from product where id_product = ?\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute([$id]);\n\n $result = $stm->fetch();\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), 'Inventory|listProduct');\n $result = 2;\n }\n return $result;\n }", "function productNameHint()\n{\n\t$query = $_POST['query'];\n\t$productManager = new productManager();\n\treturn $productManager->getNameHint($query);\n}", "public function productdata($prod_id)\n {\n $prodname = $this->Dbmodel->getproduct($prod_id); \n return $prodname;\n }", "function get_product_name($pid){\n\t\tglobal $connection;\n\t\t\n\t\t\t$query = \"SELECT name FROM products WHERE id=\" .$pid;\n\t\t\t$result = mysql_query($query, $connection);\n\t\t\tconfirm_query($result);\n\t\t\t$row = mysql_fetch_array($result);\n\t\t\n\t\treturn $row['name'];\n\t}", "function get_products_id_name($product_type) {\r\n $params[0] = array(\"name\" => \":product_type\", \"value\" => &$product_type);\r\n return $this->DBObject->readCursor(\"product_actions.get_products_id_name(:product_type)\", $params);\r\n }", "protected function getProductName(): ?string\n\t{\n\t\tstatic $cache = [];\n\n\t\t$productId = $this->getProductId();\n\t\tif (!$productId)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!array_key_exists($productId, $cache))\n\t\t{\n\t\t\tLoader::includeModule('iblock');\n\n\t\t\t$row = ElementTable::getRow([\n\t\t\t\t'select' => [\n\t\t\t\t\t'NAME',\n\t\t\t\t],\n\t\t\t\t'filter' => [\n\t\t\t\t\t'=ID' => $productId,\n\t\t\t\t],\n\t\t\t]);\n\t\t\t$cache[$productId] = $row ? (string)$row['NAME'] : null;\n\t\t}\n\n\t\treturn $cache[$productId];\n\t}", "function Build_lookup_name_by_id($build_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_name_by_id', array(new xmlrpcval($build_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getProductName($id=''){\r\n if($id != ''){\r\n $res = $this->CI->DatabaseModel->access_database('ts_products','select','',array('prod_id'=>$id));\r\n if(!empty($res)) {\r\n $prodd = $res[0]['prod_urlname'] != '' ? $res[0]['prod_urlname'] : $res[0]['prod_name'] ;\r\n $p = strtolower($prodd);\r\n $p = str_replace(' ','-',$p);\r\n $p = preg_replace('!-+!', '-', $p);\r\n return $p.'/';\r\n }\r\n else {\r\n return '/';\r\n }\r\n }\r\n else {\r\n return '/';\r\n }\r\n die();\r\n\t}", "function get_product_name($pid){\n\t$products = \"scart_products\"; // products table\n\t$serial = \"bookid\"; // products key\n\t$name = \"book_name\"; // products name\n\t$result=mysql_query(\"select $name from $products where $serial=$pid\")\n or die (\"Query $products and pid - $pid - failed error message: \\\"\" . mysql_error () . '\"');\n\t$row=mysql_fetch_array($result);\n\treturn $row[$name];\n}", "function getProductObjectFromId( $id, $productname ) {\r\n\treturn new Product ($id, $productname );\r\n}", "function getProductId($product_name)\n\t{\n\t\tglobal $log;\n $log->info(\"in getProductId \".$product_name);\n\t\tglobal $adb;\n\t\tif($product_name != '')\n\t\t{\n\t\t\t$sql = \"select productid from ec_products where productname='\".$product_name.\"'\";\n\t\t\t$result = $adb->query($sql);\n\t\t\t$productid = $adb->query_result($result,0,\"productid\");\n\t\t}\n\t\treturn $productid;\n\t}", "function entityName( $id ) ;", "function Build_lookup_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getNameFromId($id='') {\n\t\tif(!$id) return '';\n\t\t$result = $this->select('name',\"`store_id` = '\".$this->store_id.\"' AND id = '$id'\");\n\t\tif($result) return $result[0]['name'];\n\t\treturn '';\n\t}", "function getItemNameByStockId($id,$d = 1){\n\t\t$sql = \"SELECT * FROM `item` WHERE `id` = $id\";\n\t \t$result = $this->conn->query($sql);\n\t \twhile($row = mysqli_fetch_assoc($result)){\n\t\t\t\n\t\t\t$sqlItemType = \"SELECT * FROM `item_type` WHERE `id` = \".$row['itemTypeId'].\"\";\n\t\t\t$resultItemType = $this->conn->query($sqlItemType);\n\t\t\t$rowItn = mysqli_fetch_assoc($resultItemType);\n\t\t $name =$rowItn['name'].\"-\".$row['name'];\n\t \t}\n\t\tif($d == 0){\n\t\t\treturn($name);\n\t\t}else{\n\t\t\techo($name);\n\t\t}\n\t\t\n\t}", "function getProdId($product){\r\n require '../../model/dbconnect.php';\r\n $prod = $db->quote($product);\r\n $rows_prod = $db->query(\"SELECT id FROM product WHERE name = $prod\");\r\n if ($rows_prod) {\r\n foreach($rows_prod as $row)\r\n return $row['id'];\r\n }\r\n }", "public function getName($id)\n\t{\n\t\t// iterate over the data until we find the one we want\n\t\tforeach ($this->data as $record)\n\t\t\tif ($record['code'] == $id)\n\t\t\t\treturn $record['name'];\n\t\treturn null;\n\t}", "public function product_name($name,$category)\n {\n $pro_name = $this->Dbmodel->get_product_name($name,$category); \n return $pro_name;\n }", "function get_product_by_id($product_id) {\r\n try {\r\n $params[0] = array(\"name\" => \":prod_id\", \"value\" => &$product_id);\r\n return $this->DBObject->readCursor(\"product_actions.get_product_by_id(:prod_id)\", $params);\r\n } catch (Exception $ex) {\r\n echo \">>\" . ex;\r\n }\r\n }", "function GetAllDataProductName($param = [])\n {\n if (isset($param['search_value']) && $param['search_value'] != '') {\n $this->db->group_start();\n $i = 0;\n foreach ($param['search_field'] as $row => $val) {\n if ($val['searchable'] == 'true') {\n if ($i == 0) {\n $this->db->like('LCASE(`'.$val['data'].'`)', strtolower($param['search_value']));\n } else {\n $this->db->or_like('LCASE(`'.$val['data'].'`)', strtolower($param['search_value']));\n }\n $i++;\n }\n }\n $this->db->group_end();\n }\n if (isset($param['row_from']) && isset($param['length'])) {\n $this->db->limit($param['length'], $param['row_from']);\n }\n if (isset($param['order_field'])) {\n if (isset($param['order_sort'])) {\n $this->db->order_by($param['order_field'], $param['order_sort']);\n } else {\n $this->db->order_by($param['order_field'], 'desc');\n }\n } else {\n $this->db->order_by('a.id', 'desc');\n }\n $data = $this->db\n ->select('*, a.id, b.Device_SP_Name')\n ->where('a.is_delete', 0)\n ->join('t2_device_sp_name_ b', 'b.id = a.id_t2', 'left')\n ->get('t6_product_name a')\n ->result_array();\n\n return $data;\n }", "public function getProduct_name () {\n\t$preValue = $this->preGetValue(\"product_name\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->product_name;\n\treturn $data;\n}", "function select_by_nameproduct($name_product= NULL, $slug_product= NULL) {\t\n\t\t$this->db->select('*'); \n\t\t$this->db->from($this->table_name);\n\t\t$this->db->join('ac_brand', 'ac_brand.id_brand = ac_product.id_brand','left');\n\t\t$this->db->where(array('name_product'=>$name_product));\n\t\t$this->db->or_where(array('slug_product'=>$name_product));\n\t\t$query = $this->db->get();\n\t\treturn $query ->row();\n\t}", "public function getProductName(){\n return $this->product_name;\n }", "function getName( $ID)\r\n{\r\n global $db;\r\n\r\n list( $temp, $hidden) = $db->getItems( array( \"name\", \"HIDE\"), $ID);\r\n\r\n if ( ANIMALPEDIGREE)\r\n $temp = $db->changeBrack( $temp);\r\n else\r\n $temp = str_replace( \"/\", \"\", $temp);\r\n if ( $hidden == \"Yes\")\r\n $temp = $db->obstr( $temp, 1);\r\n\r\n if ( $temp == UNDEFINED) {\r\n return UNDEFINED;\r\n } else {\r\n if ( trim( $temp) == \"\")\r\n $temp = \"(no name specified)\";\r\n return $temp;\r\n } \r\n}", "function TestCase_lookup_category_name_by_id($category_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_name_by_id', array(new xmlrpcval($category_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}" ]
[ "0.7178362", "0.66577846", "0.6485393", "0.6482692", "0.6375426", "0.62492466", "0.62138605", "0.61443514", "0.61374253", "0.6128023", "0.6103813", "0.6097341", "0.60834724", "0.6050711", "0.6010956", "0.59964454", "0.5903476", "0.5893793", "0.5862327", "0.58465964", "0.584068", "0.58313406", "0.5794104", "0.5782358", "0.5779968", "0.5777846", "0.5751669", "0.57389224", "0.5712336", "0.57070047" ]
0.82212865
0
/ get_milestones Get a list of milestones for the given Product Usage Product.get_milestones Parameters ParameterData TypeComments product_idintegerCannot be 0 Result Array [0] Array [name] [id] [1] Array ...
function Product_get_milestones($product_id) { // Create call $call = new xmlrpcmsg('Product.get_milestones', array(new xmlrpcval($product_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMilestones()\n\t{\n\t\tif ($this->milestones == null) {\n\t\t\t$this->milestones = $this->getProjects(false, 1);\n\t\t}\n\n\t\treturn $this->milestones;\n\t}", "private function _get_milestones( $project ) {\n\n\t\t$request = new Gitlab();\n\t\t$gitlab = $request->init_request();\n\n\t\t$milestones = [];\n\t\t$page_index = 1;\n\t\t$total = 0;\n\n\t\tdo {\n\n\t\t\t$response = $gitlab->get( 'projects/' . $project['id'] . \"/milestones?per_page=50&page=$page_index&sort=asc\" );\n\t\t\t$response_arr = json_decode( $response->body, true );\n\n\t\t\t$milestones = array_merge( $milestones, $response_arr );\n\n\t\t\t$page_index ++;\n\t\t\t$total += count( $response_arr );\n\n\t\t} while ( count( $response_arr ) > 0 );\n\n\t\treturn $milestones;\n\n\t}", "public function getContainedMilestones()\n\t{\n\t\tif ($this->containedMilestones == null) {\n\t\t\t$this->containedMilestones = $this->getProjects(true, 1);\n\t\t}\n\n\t\treturn $this->containedMilestones;\n\t}", "public function milestones()\n {\n return new Milestones($this->getClient());\n }", "public function milestone(): Collection\n {\n return $this->get('api/blocks/getMilestone');\n }", "public function milestones()\n {\n return $this->hasMany(Milestones::class, 'project_milestone_id');\n }", "public function milestones()\n {\n return $this->hasMany(ProjectMilestone::class);\n }", "private function getAllMilestones(){\n\n $query = \"select * from types_milestone\";\n\n $stmt = $this->db->prepare( $query );\n $stmt->execute( );\n\n $result = $stmt->fetchAll(PDO::FETCH_CLASS, \"Milestone_A\");\n\n $returnValue = array();\n foreach($result as $milestone)\n {\n array_push($returnValue,$milestone);\n }\n\n $this->all_milestones = $returnValue;\n\n return $returnValue;\n }", "protected function getPublicMilestonesRequest()\n {\n\n $resourcePath = '/Destiny2/Milestones/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-API-Key');\n if ($apiKey !== null) {\n $headers['X-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function testDestiny2GetPublicMilestones()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function listMilestones($repository, array $options = [])\n {\n return $this->request()->get('repos/' . $repository . '/milestones', $options);\n }", "private function _create_milestones( $project, $repo_name ) {\n\n\t\t$this->_write_log( PHP_EOL . sprintf( 'Creating Milestone(s) for %s', $repo_name ) . PHP_EOL );\n\n\t\t$milestone_map = [];\n\n\t\t$github = new Github();\n\t\t$milestones = $this->_get_milestones( $project );\n\n\t\tforeach ( $milestones as $milestone ) {\n\n\t\t\t$milestone_map[] = $github->create_milestone( $milestone, $this->github_organisation, $repo_name );\n\n\t\t}\n\n\t\t$this->_write_log( PHP_EOL . sprintf( 'Total %1$s Milestone(s) created for %2$s', count( $milestones ), $repo_name ) . PHP_EOL );\n\n\t\treturn $milestone_map;\n\n\t}", "function createMilestone($postData)\n\t\t{\n\t\t\t$milestone_id = uniqid('mil');\n\t\t\t\n\t\t\t//setting column name\n\t\t\t$column_name = array('milestone_id','milestone_name','workroom_id','amount','note','start_date','end_date','funding_status','funding_date','release_status','funding_method');\n\t\t\t$column_value = array($milestone_id,$postData['milestone_name'],$postData['wid'],$postData['amount'],$postData['description'],$postData['start_date'],$postData['end_date'],0,0,0,'N.A.');\n\t\t\t//inserting values to database\n\t\t\t$insert = $this->manageContent->insertValue(\"milestone_info\",$column_name,$column_value);\n\t\t\treturn $insert;\n\t\t}", "public function setMilestones(){\n\n //Unset all the milestones that already exist\n foreach($this->milestones as $milestone){\n foreach($this->all_milestones as $aM){\n if($aM->Id == $milestone->Id) {\n array_push($this->thisMilestones, $this->rowMilestone($milestone, $aM));\n unset($this->all_milestones[(int)$aM->Id]);\n break;\n }\n }\n }\n }", "public function get_milestones_by_workstream($workstream_id)\n\t{\n\t\t$this->json['data'] = $this->milestone_model->get_many_by('timeline_workstream_id', $workstream_id);\n\t\t\n\t\treturn $this->ajax_response();\n\t}", "public function get_milestone($milestone_id)\n\t{\n\t\t$this->content['row'] = $this->milestone_model->get($milestone_id);\n\t\t\n\t\t$this->json['content'] = $this->load->view('timeline/milestones/milestone', $this->content, TRUE);\n\t\t\n\t\treturn $this->ajax_response();\n\t}", "public function milestone($repository, $number, array $options = [])\n {\n return $this->request()->get('repos/' . $repository . '/milestones/' . $number, $options);\n }", "function canSeeMilestones($project) {\n $project_id = $project->getId();\n \tif(!isset($this->can_see_milestones[$project_id])) {\n \t $this->can_see_milestones[$project_id] = $this->getProjectPermission('milestone', $project) >= PROJECT_PERMISSION_ACCESS;\n \t} // if\n \treturn $this->can_see_milestones[$project_id];\n }", "private function rowMilestone($milestone, $milestone_a){\n\n $m = new Milestone_B();\n\n $m->Id = $milestone->ID;\n\n $m->Name = $milestone_a->Name;\n $m->Good = $milestone_a->Good;\n $m->Adequet = $milestone_a->Adequet;\n $m->Semester = $milestone->Semester;\n $m->Year = $milestone->Year;\n\n return $m;\n }", "public function index()\n {\n $data = DB::table('milestones')\n ->join('users','milestones.user_id','=','users.id')\n ->select('milestones.id as id', 'milestones.name as fname','users.name as uname','milestones.created_at')\n ->get();\n //dd($data);\n return view('admin/milestone/list',compact('data'));\n }", "function milestone($stepID) {\r\n GLOBAL $mysqlID;\r\n\t\r\n$stg=$_SESSION[\"stage\"];\r\n$thismlstn=$_SESSION[\"milestone\"];\r\n\t\r\n\r\n \r\n $allMilestones1=array(//pre\r\n1=>array(\"Body guy\",'011',\"Personal Health Profile\",'012'),\r\n2=>array(\"Are you dependent\",121,\"People and Places\",231),\r\n3=>array(\"Why think about quitting\",131,\"What are your worries?\",'132'),\r\n4=>array(\"Why think about quitting\",131,\"Some small steps\",142),\r\n5=>array(\"Friends and family\",151,\"Relaxation tips\",152),\r\n6=>array(\"positive thinking\",161),\r\n7=>array(\"Barriers\",171),\r\n8=>array(),\r\n9=>array());\r\n \r\n \r\n $allMilestones2=array(//con\r\n \t1=>array(\"Body guy\",'011',\"Personal Health Profile\",'012'),\r\n\t2=>array(\"Are you dependent\",221,\"What are your worries\",'023'),\r\n 3=>array(\"People and Places\",231),\r\n 4=>array(\"Why think about quitting\",241,\"Some small steps\",142),\r\n 5=>array(\"Friends and family\",251,\"Relaxation tips\",152),\r\n 6=>array(\"What gets in way\",261,\"What are your worries\",262),\r\n 7=>array(\"Barriers tracking\",271),\r\n 8=>array(\"what's good, what's bad\",281),\r\n 9=>array()\r\n );\r\n \r\n \r\n $allMilestones3=array(//prep\r\n \t1=>array(\"Body guy\",'011',\"Personal Health Profile\",'012',\"Pharmaco DA\",313,\"Addiction info\",314),\r\n\t2=>array(\"Kicking old habits\",324,\"When, where, why?\",325),\r\n 3=>array(\"Small steps\",331,\"Cutting out cravings\",332,\"What are your worries\",333),\r\n 4=>array(\"Update goals\",341,\"Avoid triggers\",342),\r\n 5=>array(\"Quitting game plan\",351,\"Why think about quitting\",352),\r\n 6=>array(),\r\n 7=>array(),\r\n 8=>array(),\r\n 9=>array()\r\n );\r\n\r\n \r\n\t\r\n\t\r\n\t$doRun=false;\r\n\t\r\n\tif(in_array($stepID, ${allMilestones.$stg}[$thismlstn])){\r\n\t\t$doRun=true;\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\tif($doRun){\r\n\t\r\n\t $mstnContent=array();\r\n\t \t \r\n\t $mstnContent= $_SESSION[\"mstnContent\"];\r\n\t\r\n\t \r\n\t \r\n\tif(!in_array($stepID, $mstnContent)){ \r\n\t \r\n\t $sqla=\"UPDATE PFHMilestones SET steps=CONCAT(steps, ', ', '$stepID') WHERE userID={$_SESSION[\"userID\"]} AND stageID={$_SESSION[\"stageID\"]} AND id={$_SESSION[\"milestoneID\"]}\"; \r\n\t \r\n\t \r\n\t $result=mysql_query($sqla, $mysqlID);\r\n\t \r\n\t $sqlb=\"SELECT steps FROM PFHMilestones WHERE userID={$_SESSION[\"userID\"]} AND stageID={$_SESSION[\"stageID\"]} AND id={$_SESSION[\"milestoneID\"]}\";\r\n\t \r\n\t $result=mysql_query($sqlb, $mysqlID);\r\n\t \r\n\t $stepz=mysql_fetch_row($result);\r\n\t \r\n\t $_SESSION[\"mstnContent\"]=explode(\", \", $stepz[0]);\r\n\t \r\n\t\r\n\t\t\t}\r\n\t\t\t\r\n\t }\r\n\t\t\t \r\n}", "public function hasMilestones()\n\t{\n\t\tif ($this->hasMilestones === null) {\n\t\t\t$children = $this->getMilestones();\n\t\t\t$this->hasMilestones = count($children) > 0;\n\t\t}\n\t\t\n\t\treturn $this->hasMilestones;\n\t}", "public function api_view($id = null) {\n\t\t$this->layout = 'ajax';\n\n\t\t$this->Milestone->recursive = -1;\n\t\t$this->Milestone->Task->recursive = -1;\n\n\t\t$data = array();\n\n\t\tif ($id == null) {\n\t\t\t$this->response->statusCode(400);\n\t\t\t$data['error'] = 400;\n\t\t\t$data['message'] = 'Bad request, no project id specified.';\n\t\t}\n\n\t\tif ($id == 'all') {\n\t\t\t$this->api_all();\n\t\t\treturn;\n\t\t}\n\n\t\tif (is_numeric($id)) {\n\t\t\t$this->Milestone->id = $id;\n\n\t\t\tif (!$this->Milestone->exists()) {\n\t\t\t\t$this->response->statusCode(404);\n\t\t\t\t$data['error'] = 404;\n\t\t\t\t$data['message'] = 'No milestone found of that ID.';\n\t\t\t\t$data['id'] = $id;\n\t\t\t} else {\n\t\t\t\t$milestone = $this->Milestone->read();\n\n\t\t\t\t$this->Milestone->Project->id = $milestone['Milestone']['project_id'];\n\n\t\t\t\t$partOfProject = $this->Milestone->Project->hasRead($this->Auth->user('id'));\n\t\t\t\t$publicProject\t= $this->Milestone->Project->field('public');\n\t\t\t\t$isAdmin = ($this->_apiAuthLevel() == 1);\n\n\t\t\t\tif ($publicProject || $isAdmin || $partOfProject) {\n\t\t\t\t\t$milestone['Milestone']['tasks'] = array_values($this->Milestone->Task->find('list', array('conditions' => array('milestone_id' => $id))));\n\n\t\t\t\t\t$data = $milestone['Milestone'];\n\t\t\t\t} else {\n\t\t\t\t\t$data['error'] = 401;\n\t\t\t\t\t$data['message'] = 'Milestone found, but is not public.';\n\t\t\t\t\t$data['id'] = $id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->set('data',$data);\n\t\t$this->render('/Elements/json');\n\t}", "public function testAddMilestone()\n {\n \t$property_flip_id = $this->createPropertyFlip('Test address line 1000');\n \t$milestone_type_description = 'Test Milestone Type 1';\n \t$milestone_type = $this->createTestMilestoneType($milestone_type_description);\n \t$this->visit('/')\n\t \t->visit('/login')\n\t \t->type('[email protected]', 'email')\n\t \t->type('password', 'password')\n\t \t->press('Login')\n\t \t->see('Home')\n\t \t->visit('/search-property')\n\t \t \n\t \t->type($property_flip_id, 'property_flip_id')\n\t \t->press('Search')\n\t \t->click('View') //View Property\n\t \t \n\t \t->click('View') //View Property Flip\n\t \t->see('View Property Flip')\n\t \t->see('General')\n\t \t->see('Investors')\n\t \t\n\t \t->click('milestones-tab')\n \t\t->see('Milestones')\n \t\t->press('Add Milestone')\n \t\t->select($milestone_type->id, 'milestone_type_id')\n \t\t->type('2016-11-30', 'effective_date')\n \t\t->press('Add Milestone')\n \t\t\n \t\t->see('View Property Flip')\n \t\t->see('Milestone')\n \t\t->see($milestone_type_description);\n }", "public function badMilestoneProvider() {\n // all of which were tripping over the same code\n\n return [\n ['offices/qa'],\n ['49018/Data.json'],\n ['48027/Data.json'],\n ['48027/digitalstrategy.json'],\n ['48112/Data.json'],\n ['49015/%252527?highlight=edi'],\n ['49015/e.g'],\n ['49015/http%3a%2f%2fr87.com%2fn%3f%00.php?highlight=edi']\n ];\n\n }", "public function api_all() {\n\t\t$this->layout = 'ajax';\n\n\t\t$this->Milestone->recursive = -1;\n\t\t$data = array();\n\n\t\tswitch ($this->_apiAuthLevel()) {\n\t\t\tcase 1:\n\t\t\t\tforeach ($this->Milestone->find(\"all\") as $milestone) {\n\t\t\t\t\t$milestone['Milestone']['tasks'] = array_values($this->Milestone->Task->find('list', array('conditions' => array('milestone_id' => $milestone['Milestone']['id']))));\n\n\t\t\t\t\t$data[] = $milestone['Milestone'];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->response->statusCode(403);\n\t\t\t\t$data['error'] = 403;\n\t\t\t\t$data['message'] = 'You are not authorised to access this.';\n\t\t}\n\n\t\t$this->set('data',$data);\n\t\t$this->render('/Elements/json');\n\t}", "function getDetailAllMileStone($groupo_id_local,$DbConnection)\n{\n $query=\"SELECT milestone_id,milestone_name,milestone_type FROM milestone_assignment USE INDEX(mass_gid_status) WHERE group_id='$groupo_id_local' AND status=1\"; \t\t\t\t\n if($DEBUG==1){print $query;}\n $result=mysql_query($query,$DbConnection); \t\t\t\t\t\t\t\n while($row=mysql_fetch_object($result))\n {\n /*$ms_id=$row->milestone_id; \n $ms_name=$row->milestone_name;\n $ms_type=$row->milestone_type;*/\n $data[]=array('ms_id'=>$row->milestone_id,'ms_name'=>$row->milestone_name,'ms_type'=>$row->milestone_type);\t\n }\n return $data;\n}", "function view_projects_info(){\n \t$details = array();\n\n \t$link = mysql_connect(DN_HOST, DB_USER, DB_PASS);\n \tmysql_select_db(DB_NAME, $link);\n \t$query = \"select `id`, name from healingcrystals_projects where completed_on is null order by starts_on desc\";\n \t$result = mysql_query($query);\n \twhile($project = mysql_fetch_assoc($result)){\n \t\t$details[] = array('project_name' => $project['name'],\n \t\t\t\t\t\t\t'project_url' => assemble_url('project_overview', array('project_id' => $project['id'])),\n\t\t\t \t\t\t\t\t'project_id' => $project['id']);\n\n\t\t\t$query_1 = \"select id, name from healingcrystals_project_objects\n\t\t\t\t\t\twhere type='Milestone' and\n\t\t\t\t\t\tproject_id='\" . $project['id'] . \"' and\n\t\t\t\t\t\tcompleted_on is null order by created_on desc\";\n\t\t\t$result_1 = mysql_query($query_1);\n\t\t\twhile($milestone = mysql_fetch_assoc($result_1)){\n\t\t\t\t$details[count($details)-1]['milestones'][] = array('milestone_id' => $milestone['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'milestone_url' => assemble_url('project_milestone', array('project_id' => $project['id'], 'milestone_id' => $milestone['id'])),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'milestone_name' => $milestone['name']);\n\n\t\t\t\t$query_2 = \"select id, name, integer_field_1 from healingcrystals_project_objects\n\t\t\t\t\t\t\twhere type='Ticket' and\n\t\t\t\t\t\t\tproject_id='\" . $project['id'] . \"' and\n\t\t\t\t\t\t\tmilestone_id='\" . $milestone['id'] . \"' and\n\t\t\t\t\t\t\tcompleted_on is null order by created_on desc\";\n\t\t\t\t$result_2 = mysql_query($query_2);\n\t\t\t\twhile($ticket = mysql_fetch_assoc($result_2)){\n\t\t\t\t\t$index = count($details[count($details)-1]['milestones']) - 1;\n\t\t\t\t\t$details[count($details)-1]['milestones'][$index]['tickets'][] = array('ticket_id' => $ticket['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ticket_url' => assemble_url('project_ticket', array('project_id' => $project['id'], 'ticket_id' => $ticket['integer_field_1'])),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ticket_name' => $ticket['name']);\n\n\t \t\t$query_3 = \"select id, body\n\t\t \t\t \t\t\t\tfrom healingcrystals_project_objects\n\t\t\t\t \t\t\t\twhere parent_id='\" . $ticket['id'] . \"' and\n\t\t\t\t\t\t\t\tparent_type = 'Ticket'\n\t\t\t\t\t\t\t\torder by created_on desc\";\n\t\t\t\t\t$result_3 = mysql_query($query_3);\n\t\t\t\t\twhile($task = mysql_fetch_assoc($result_3)){\n\t\t\t\t\t\t$index_1 = count($details[count($details)-1]['milestones'][$index]['tickets']) - 1;\n\t\t\t\t\t\t$details[count($details)-1]['milestones'][$index]['tickets'][$index_1]['tasks'][] = array('task_body' => $task['body'],\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'task_id' => $task['id']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \t}\n\n \tmysql_close($link);\n\n \t$this->smarty->assign('details', $details);\n }", "function portal_milestones_module_url($portal) {\n\t\treturn assemble_url('portal_milestones', array('portal_name' => $portal->getSlug()));\n\t}", "public function addmilestoneAction(){\n\t \ttry{\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\tif($request->isPost()){\n\t\t\t\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t$current_milestone_id = $posts['current_milestone_id'];\n\t\t\t\t$job_id = $posts['job_id'];\n\t\t\t\t$milestone_type_id = $posts['milestone_type_id'];\n\t\t\t\t\n\t\t\t\t$jobPacketTable = $sm->get('Order\\Model\\JobPacketTable');\n\t\t\t\t\n\t\t\t\tif($jobPacketTable->checkMilestoneCanBeAdded($current_milestone_id)){\n\t\t\t\t\techo $jobPacketTable->addMilestone($current_milestone_id, $job_id, $milestone_type_id);\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\techo 0;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\texit;\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n\t }" ]
[ "0.6835149", "0.6470424", "0.62225914", "0.6153769", "0.61184657", "0.5972696", "0.5938339", "0.5881205", "0.56848204", "0.5615282", "0.5485549", "0.54305017", "0.53756505", "0.5338885", "0.5283532", "0.5132731", "0.51034516", "0.5058648", "0.49429423", "0.4931226", "0.49217114", "0.48844656", "0.48407128", "0.4798392", "0.47537494", "0.47299224", "0.47007456", "0.46765238", "0.46322262", "0.45805874" ]
0.7951722
0
/ lookup_login_by_id Lookup A Login By Its ID Usage User.lookup_login_by_id Parameters ParameterData TypeComments user_idintegerCannot be 0 Return login
function User_lookup_login_by_id($user_id) { // Create call $call = new xmlrpcmsg('User.lookup_login_by_id', array(new xmlrpcval($user_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function User_lookup_id_by_login($login) {\n\t// Create call\n\t$call = new xmlrpcmsg('User.lookup_id_by_login', array(new xmlrpcval($login, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function login($data) {\n $query = $this->get_by($data, TRUE);\n\n if ($query) {\n return $query->user_id;\n } else {\n return false;\n }\n }", "function getUser(Login $login);", "public function get_login_user($id_user)\n {\n $query = $this->db->get_where(\"tb_login_user\", [\"id_user\" => $id_user]);\n return $query->row();\n }", "function get_userdatabylogin($user_login)\n {\n }", "function getLoginByID($ID)\r\n\t{\r\n\t\t// get the items in the list\r\n\t\t$items = $this->getUserNameList();\r\n\r\n\t\t// for each item returned\r\n\t\tforeach($items as $item)\r\n\t\t{\r\n\t\t\t// is this the ID we are looking for\r\n\t\t\tif($item[0] == $ID)\r\n\t\t\t{\r\n\t\t\t\t// save the output\r\n\t\t\t\t$name = $item[2];\r\n\r\n\t\t\t\t// no need to continue\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// return to the caller\r\n\t\treturn $name;\r\n\t}", "function lfl_login($userName, $userPass)\n{\n $userId = null;\n $link = lfl_connect();\n if($link)\n {\n $sql = \"SELECT * FROM \" . TABLE_USER . \" WHERE username='\" . mysqli_real_escape_string($link, $userName) . \"'\";\n $result = mysqli_query($link, $sql);\n if($result !== false)\n {\n if(($array = mysqli_fetch_assoc($result)) != null)\n {\n if(password_verify($userPass, $array['password']))\n {\n $userId = $array['userId'];\n $_SESSION['user'] = $array;\n $_SESSION['user']['password'] = null;\n }\n }\n mysqli_free_result($result);\n }\n }\n return $userId;\n}", "public function getUserLogin($userid)\n {\n $user = R::findOne('user', 'id = ?', [$userid]);\n return $user->login;\n }", "public function getUserByLogin(string $login);", "function getLoginFromId ( $id)\r\n{\r\n $sql = \"SELECT username\r\n\t\t\tFROM \" . dropbox_cnf(\"tbl_user\") . \"\r\n\t\t\tWHERE user_id='\" . addslashes( $id) . \"'\";\r\n $result =api_sql_query($sql,__FILE__,__LINE__);\r\n $res = mysql_fetch_array( $result);\r\n if ( $res == FALSE) return FALSE;\r\n return stripslashes( $res[\"username\"]);\r\n}", "function get_login_user_id()\n\t{\n\t\treturn $this->login_user_id;\n\t}", "function getUserDetailsByID($user_id, $dataHelper) {\n if (!is_object($dataHelper))\n {\n throw new Exception(\"cm_authfunc.inc.php : getUserDetailsByID : DataHelper Object did not instantiate\", 104);\n }\n try\n {\n $strSqlStatement = \"SELECT uld.user_id, uld.user_name , uld.client_id, uld.partner_id, uld.email_address, ud.nick_name, ud.first_name, ud.last_name, ud.country_name, ud.timezones, ud.gmt, ud.phone_number, ud.idd_code, ud.mobile_number FROM user_details AS ud, user_login_details AS uld, client_login_details AS cld, client_details AS cd WHERE uld.user_id ='\" . trim($user_id) . \"' AND uld.user_id = ud.user_id AND cld.client_id = cd.client_id AND cld.client_id = uld.client_id AND client_login_enabled ='1' AND uld.login_enabled = '1'; \";\n\n //$strSqlStatement = \"SELECT lu.user_id, lu.user_name , nick_name , first_name , last_name , country_name , timezones , gmt , phone_number , idd_code , mobile_number \"\n // . \"FROM user_details AS ud, user_login_details AS lu, client_details AS cd \"\n // . \"WHERE lu.user_name ='\" . trim($email_address) . \"' \"\n //. \"ANd lu.user_id = ud.user_id AND cd.client_id = lu.client_id AND lu.login_enabled = '1'; \";\n $arrAuthResult = $dataHelper->fetchRecords(\"QR\", $strSqlStatement);\n return $arrAuthResult;\n }\n catch (Exception $e)\n {\n throw new Exception(\"cm_authfunc.inc.php : getUserDetailsByID : Could not fetch records : \" . $e->getMessage(), 144);\n }\n}", "function heateor_ss_filter_login($user, $username, $password){\r\n\t$tempUser = get_user_by('login', $username);\r\n\tif(isset($tempUser->data->ID)){\r\n\t\t$id = $tempUser->data->ID;\r\n\t\tif($id != 1 && get_user_meta($id, 'thechamp_key', true) != ''){\r\n\t\t\tglobal $heateorSsLoginAttempt;\r\n\t\t\t$heateorSsLoginAttempt = 1;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\treturn $user;\r\n}", "function idlogin($kohdeid, $realname='IDLogged') {\n // Haetaan kirjautumisliitetieto\n $kohde_liite = qry(\"\n SELECT kohde_liite.kohde_liiteid AS klid,\n kohde_liite.kohdeid AS kohdeid,\n kohde_liite.data AS login\n FROM kohde_liite\n WHERE kohde_liite.liiteid = 0 AND\n kohde_liite.kohdeid = $kohdeid\");\n // Haetaan ensimmäistä löytynyttä kirjautumisliitetietoa vastaavat\n // oikeudet\n $login = qry_login($kohde_liite[0]);\n\n // Tallennetaan tiedot istuntomuuttujiin\n sessionvar_set('uid', $login['kohdeid']);\n sessionvar_set('uname', $login['uname']);\n sessionvar_set('read', $login['read']);\n sessionvar_set('write', $login['write']);\n sessionvar_set('ryhma_rights', $login['ryhma']);\n sessionvar_set('realname', $realname);\n}", "function get_logmuser($loginID, $debug = false) {\n\t\t$q = (new QueryBuilder())->table('logm');\n\t\t$q->where('loginid', $loginID);\n\t\t$sql = DplusWire::wire('database')->prepare($q->render());\n\n\t\tif ($debug) {\n\t\t\treturn $q->generate_sqlquery($q->params);\n\t\t} else {\n\t\t\t$sql->execute($q->params);\n\t\t\t$sql->setFetchMode(PDO::FETCH_CLASS, 'LogmUser');\n\t\t\treturn $sql->fetch();\n\t\t}\n\t}", "function find_logged_in_user() {\n\tglobal $loggedInUser;\t\n\tif (isset($_POST[\"logId\"])) {\n\t\t$loggedInUser=get_user((int)$_POST[\"logId\"]);\n\t} elseif (isset($_SESSION[\"logId\"])) {\n\t\t$loggedInUser=get_user((int)$_SESSION[\"logId\"]);\t\t\t\t\t\n\t} else {\n\t\t$loggedInUser=null;\t\n\t}\n}", "function cek_login($tabel,$where) {\n\t\t$login = $this->db->get_where('user',$where);\n\t\treturn $login;\n\t}", "function getIdUser($a_s_login) {\n\t$connect = connectDB();\n\t$select = \"SELECT id FROM guichetdb.utilisateur WHERE \";\n\t$select .= \"login = '\".$a_s_login['login'].\"'\";\n\t\n\t$result = mysqli_query($connect, $select);\n\t\n\tif ( $row = mysqli_fetch_assoc($result) ){\n\t\tmysqli_free_result($result);\n\t\tdisconnectDB($connect);\n\t\treturn $row['id'];\n\t}\n}", "public function getLoginById($id) {\n $result = Db::queryOne('SELECT `login` FROM `users` WHERE `id` = ?', [$id]);\n\n return isset($result['login']) ? $result['login'] : $result;\n }", "public function userLogin($userModel) {\n // Making a variable for the username\n $username = $userModel->getUsername();\n $password = $userModel->getPassword();\n\n $query = \"SELECT * FROM user WHERE username = ?\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $username);\n if ($stmt->execute()) {\n // Getting the user\n $result = $stmt->fetch(PDO::FETCH_OBJ);\n var_dump($result);\n\n // Checking if passwords match\n if (password_verify($password, $result->password)) {\n // Gettint the userID and returning it\n $userID = $result->id;\n\n return $userID;\n } else {\n return null;\n }\n } else {\n return null;\n }\n }", "function doLogin($username, $password, $location=false) {\n//\tfunction doLogin($user_id, $nickname, $location=false) {\n\n\t\tif($this->sql(\"SELECT id, nickname FROM \".UT_USE.\" WHERE status > 0 AND (email = '$username' OR mobile = '$username') AND password = '\".sha1($password).\"'\")) {\n\t\n\t\t\tif($this->getQueryCount() == 1) {\n\t\t\t\t$this->user_id = $this->getQueryResult(0, \"id\");\n\t\t\t\t$this->nickname = $this->getQueryResult(0, \"nickname\");\n\t\t\t\tPage::addLog(\"Login success, U:$username \". UT_USE);\n\n\t\t\t\t$this->translater = new Translation(LOCAL_PATH.\"/templates/menu.summary.php\");\n\t\t\t\t//$this->compileMenu();\n\n\t\t\t\t$forward = Session::getLoginForward();\n\t\t\t\t$location = $forward ? $forward : ($location ? $location : \"/index.php\");\n\t\t\t\theader(\"Location: $location\");\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tPage::addLog(\"Login failure, U:$username \". UT_USE);\n\t\t}\n\n\t\t// if($this->sql(\"SELECT id, access_level_id FROM \".UT_USE.\" WHERE user_id = '$user_id'\")) {\n\t\t// \t$this->user_id = $this->getQueryResult(0, \"id\");\n\t\t// \t$this->nickname = $nickname;\n\t\t// \t$this->access_level_id = $this->getQueryResult(0, \"access_level_id\");\n\t\t// \n\t\t// \tPage::addLog(\"Login success, U:\".$this->user_id);\n\t\t// \n\t\t// \t$this->translater = new Translation(LOCAL_PATH.\"/templates/menu.summary.php\");\n\t\t// \t//$this->compileMenu();\n\t\t// \n\t\t// \t$forward = Session::getLoginForward();\n\t\t// \t$location = $forward ? $forward : ($location ? $location : \"/front/index.php\");\n\t\t// \theader(\"Location: $location\");\n\t\t// \texit();\n\t\t// }\n\t\t// else {\n\t\t// \tPage::addLog(\"Login failure, U:$user_id \". UT_USE);\n\t\t// }\n\t}", "function login() {\n\t $login_parameters = array(\n\t\t \"user_auth\" => array(\n\t\t \"user_name\" => $this->username,\n\t\t \"password\" => $this->hash,\n\t\t \"version\" => \"1\"\n\t\t ),\n\t\t \"application_name\" => \"mCasePortal\",\n\t\t \"name_value_list\" => array(),\n\t );\n\n\t $login_result = $this->call(\"login\", $login_parameters);\n\t $this->session = $login_result->id;\n\t return $login_result->id;\n\t}", "function GetUserInfo($intUser=null,$strField='name',$oSEC=null)\n{\n global $oDB;\n\n if ( is_string($intUser) )\n {\n if ( $intUser=='A' || $intUser=='S' )\n {\n $lst = array();\n $oDB->Query('SELECT '.$strField.' FROM '.TABUSER.' WHERE role=\"'.$intUser.'\"');\n while( $row=$oDB->Getrow() )\n {\n $lst[] = $row[$strField];\n }\n return $lst;\n }\n if ( is_numeric($intUser) )\n {\n if ( !isset($oSEC) ) $oSEC = new cSection(intval($intUser));\n $oDB->Query('SELECT '.$strField.' FROM '.TABUSER.' WHERE id='.$oSEC->modid);\n $row=$oDB->Getrow();\n return $row[$strField];\n }\n }\n if ( is_int($intUser) )\n {\n if ( $intUser<0 ) { if ( isset($onerror) ) return $onerror; die ('GetUserInfo: Missing user id'); }\n $oDB->Query('SELECT '.$strField.' FROM '.TABUSER.' WHERE id='.$intUser);\n $row = $oDB->Getrow();\n return $row[$strField];\n }\n die ('GetUserInfo: Invalid argument #1 '.var_dump($intUser));\n}", "function loginRadiusLoginUser($user_id, $social_id)\n{\n\t$db_obj = Db::getInstance()->ExecuteS('SELECT * FROM '.pSQL(_DB_PREFIX_.'customer').' as c WHERE c.id_customer='.\" '$user_id' \".' LIMIT 0,1');\n\t$arr = array();\n\t$arr['id'] = $db_obj['0']['id_customer'];\n\t$arr['fname'] = $db_obj['0']['firstname'];\n\t$arr['lname'] = $db_obj['0']['lastname'];\n\t$arr['email'] = $db_obj['0']['email'];\n\t$arr['pass'] = $db_obj['0']['passwd'];\n\t$arr['loginradius_id'] = $social_id;\n\tloginRedirect($arr);\n}", "static function userIdentifying($login, $password)\n\t{\n\t\t$dataBase = self::dbConnect();\n\t\t$request = $dataBase->prepare('SELECT password FROM users WHERE login = ?');\n\t\t$request->execute(array($login));\n\t\t$dbPassword = $request->fetch();\n\t\t$dbPassword = $dbPassword['password'];\n\t\t$request->closeCursor();\n\t\tif (password_verify($password, $dbPassword))\n\t\t{\n\t\t\t$request = $dataBase->prepare('SELECT id FROM users WHERE login = ?');\n\t\t\t$request->execute(array($login));\n\t\t\t$id = $request->fetch();\n\t\t\treturn $id['id'];\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function userLogin($data)\n\t\t{\n\t\t\t$result = $this->query($data);\n\t\t\tif ($this->getRows($result) > 0) {\n\t\t\t\t$row = $this->getArray($result);\n\t\t\t\treturn $row;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 'false';\n\t\t\t}\n\t\t}", "public function findByLoginAndPassword($data);", "function resolveLogin($login) {\n\t\tif (null != $login) {\n\t\t\tforeach ($this->_config['user_class_ids'] as $clsid) {\n\t\t\t\tif (null != ($user = call_user_func(array(SyndNodeLib::loadClass($clsid), 'resolveLogin'), $login)))\n\t\t\t\t\treturn $user;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "function get_login_data($id, $ip_address)\n {\n // 1. Connect to the database.\n $link = connect();\n\n // 2. Protect variables to avoid any SQL injection\n $id = mysqli_real_escape_string($link, $id);\n $ip_address = mysqli_real_escape_string($link, $ip_address);\n\n // 3. Generate a query and return the result.\n $result = mysqli_query($link, \"\n SELECT\n a.id,\n a.email,\n b.name,\n b.surname,\n c.auth_code,\n c.expiration\n FROM\n tbl_users a\n LEFT JOIN\n tbl_user_details b\n ON\n a.id = b.user_id\n LEFT JOIN\n tbl_user_auth c\n ON\n a.id = c.user_id\n WHERE\n a.id = {$id} AND c.ip_address = '{$ip_address}'\n \");\n\n // 4. Disconnect from the database.\n disconnect($link);\n\n // 5. There should only be one row, or FALSE if nothing.\n return mysqli_fetch_assoc($result) ?: FALSE;\n }", "function userLogin($userData)\n\t\t{\n\t\t\t//at first we are checking that the input value is username or email id\n\t\t\t$presenceChar = strpos($userData['username'],'@');\n\t\t\tif(empty($presenceChar))\n\t\t\t{\n\t\t\t\t$column_name = 'username';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$column_name = 'email_id';\n\t\t\t}\n\t\t\t//getting the password from database\n\t\t\t$userCreden = $this->manageContent->getValue_where('user_credentials','*',$column_name,$userData['username']);\n\t\t\tif(!empty($userCreden[0]))\n\t\t\t{\n\t\t\t\t//checking for password field\n\t\t\t\tif($userCreden[0]['password'] == md5($userData['password']))\n\t\t\t\t{\n\t\t\t\t\tif($userCreden[0]['status'] == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t//setting cookie expiry time\n\t\t\t\t\t\tif($userData['loggedin_time'] == 'on')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$cookie_exp_time = time() + (2*7*24*3600);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$cookie_exp_time = time() + (24*3600);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//creating the cookie\n\t\t\t\t\t\t$set_cookie = $this->createCookie('uid',$userCreden[0]['user_id'],$cookie_exp_time);\n\t\t\t\t\t\t//calculating total number of sign in\n\t\t\t\t\t\t$sign_in = $userCreden[0]['sign_in_count'] + 1;\n\t\t\t\t\t\t//getting last sign in ip\n\t\t\t\t\t\t$last_sign_in_ip = $this->manageUtility->getIpAddress();\n\t\t\t\t\t\t//updating the values\n\t\t\t\t\t\t$update1 = $this->manageContent->updateValueWhere(\"user_credentials\",\"sign_in_count\",$sign_in,\"user_id\",$userCreden[0]['user_id']);\n\t\t\t\t\t\t$update2 = $this->manageContent->updateValueWhere(\"user_credentials\",\"last_sign_in_ip\",$last_sign_in_ip,\"user_id\",$userCreden[0]['user_id']);\n\t\t\t\t\t\t$update1 = $this->manageContent->updateValueWhere(\"user_credentials\",\"date\",date(\"Y-m-d g:i:s\"),\"user_id\",$userCreden[0]['user_id']);\n\t\t\t\t\t\treturn array(1,'Login Successfull!!',$userCreden[0]['user_id'],$userCreden[0]['category']);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn array(0,'You Have Been Deactivated By Admin.. Please Contact To The Admin!!');\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\treturn array(0,'Username or Password Is Incorrect!!');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array(0,'Username or Password Is Incorrect!!');\n\t\t\t}\n\t\t\t\n\t\t}" ]
[ "0.7167765", "0.6750275", "0.6593426", "0.64549726", "0.64490974", "0.64006805", "0.63803285", "0.6372195", "0.63387126", "0.63269997", "0.63049275", "0.6251948", "0.6170427", "0.6160253", "0.6155888", "0.6150391", "0.61252797", "0.6121571", "0.6091345", "0.6085696", "0.60825104", "0.6070345", "0.60695106", "0.60631543", "0.6059249", "0.6058272", "0.6039017", "0.6036568", "0.6029443", "0.6023746" ]
0.771242
0
/ list Get A List of TestPlans Based on A Query Usage TestPlan.list Parameters ParameterData TypeComments queryhashmapCan not be null. See Query Examples. See Return Array [0] Array [author_id] => 4813 [name] => Testopia phplib Testplan3 [default_product_version] => Alpha 2 [plan_id] => 543 [product_id] => 332 [creation_date] => 20070629 03:45:40 [type_id] => 8 [isactive] [1] Array ...
function TestPlan_list($query) { // Create array foreach($query as $key => $val) { switch($key) { case "author_id": case "isactive": case "plan_id": case "product_id": case "type_id": $type = "int"; break; case "default_product_version": case "creation_date": case "name": default: $type = "string"; } $qarray[$key] = new xmlrpcval($val, $type); } // Create call $call = new xmlrpcmsg('TestPlan.list', array(new xmlrpcval($qarray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_plan($parameters){\n try {\n $planList = Plan::all(array_filter($parameters), $this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLANS'] = $planList->toArray();\n $returnArray['RAWREQUEST']= json_encode($parameters);\n $returnArray['RAWRESPONSE']=$planList->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n } \n }", "function TestCase_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"plans\":\n\t\t\t\tunset($va);\n\t\t\t\tforeach($key as $k => $v) {\n\t\t\t\t\t$va[$k] = new xmlrpcval($v, \"string\");\n\t\t\t\t}\n\t\t\t\t$val = $va;\n\t\t\t\t$type = \"struct\";\n\t\t\t\tbreak;\n\t\t\tcase \"author_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_status_id\":\n\t\t\tcase \"category_id\":\n\t\t\tcase \"default_tester_id\":\n\t\t\tcase \"isautomated\":\n\t\t\tcase \"priority_id\":\n\t\t\tcase \"sortkey\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"alias\":\n\t\t\tcase \"arguments\":\n\t\t\tcase \"creation_date\":\n\t\t\tcase \"requirement\":\n\t\t\tcase \"script\":\n\t\t\tcase \"summary\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"plan\":\n\t\t\t\tunset($va);\n\t\t\t\tforeach($key as $k => $v) {\n\t\t\t\t\t$va[$k] = new xmlrpcval($v, \"string\");\n\t\t\t\t}\n\t\t\t\t$val = $va;\n\t\t\t\t$type = \"struct\";\n\t\t\t\tbreak;\n\t\t\tcase \"build_id\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"manager_id\":\n\t\t\tcase \"plan_id\":\n\t\t\tcase \"plan_text_version\":\n\t\t\tcase \"product_version\":\n\t\t\tcase \"run_id\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"notes\":\n\t\t\tcase \"start_date\":\n\t\t\tcase \"stop_date\":\n\t\t\tcase \"summary\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getsAListOfPlans()\n {\n // Arrange\n // Act\n $plans = Ezypay::getPlans();\n\n // Assert\n //$this->assertEquals(3, sizeof($plans->data)); // Causing issues as there are aditional plans\n $this->assertNotNull($plans);\n\n $this->plans = $plans;\n }", "public function planes_listar(){\n\t\t$params = array();\n\t\ttry {\n\t\t\t$flow = $this->send('plans/list', $params, 'GET');\t \t\t\t\n\t\t\treturn $flow;\n\t\t} catch (Exception $e) { return $e->getCode().\" - \".$e->getMessage(); }\n\t}", "public function get_plans() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n // extract passed parameters from jtable\n $query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);\n parse_str($query, $params);\n \n\n // count all records query\n $q = \"SELECT COUNT(*) as count\n FROM plans AS p inner join\n users as u on p.modified_by=u.user_id\n inner JOIN contacts AS c ON u.user_id=c.user_id\n and c.modified_date = (select max(modified_date) from\n contacts as c where c.user_id=p.modified_by)\n \";\n // run query\n $count = DB::instance(DB_NAME)->select_row($q);\n $order = isset($params['jtSorting']) ? $params['jtSorting'] : 'plan_id DESC';\n \n # Set up query\n $q = \"SELECT\n p.plan_id, p.description,p.time,p.public, c.first_name, c.last_name, p.modified_date, p.show\n FROM plans AS p inner join\n users as u on p.modified_by=u.user_id\n inner JOIN contacts AS c ON u.user_id=c.user_id\n and c.modified_date = (select max(modified_date) from\n contacts as c where c.user_id=p.modified_by)\n ORDER BY {$order} \n LIMIT {$params['jtStartIndex']}, {$params['jtPageSize']}\n \";\n \n # Run query\n $plans = DB::instance(DB_NAME)->select_rows($q);\n $items = array();\n $i = 0;\n foreach($plans as $plan) {\n $items[] = array(\n \"plan_id\" => $plan[\"plan_id\"],\n \"modified_date\" => Time::display($plan['modified_date'],'Y-m-d H:m:s'),\n \"first_name\" => $plan[\"first_name\"],\n \"last_name\" => $plan[\"last_name\"],\n \"public\" => $plan[\"public\"],\n \"show\" => $plan[\"show\"],\n \"description\" => $plan[\"description\"],\n \"time\" => $plan[\"time\"]\n );\n }\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n $jTableResult['TotalRecordCount'] = $count['count'];\n $jTableResult['Records'] = $items;\n print json_encode($jTableResult);\n }", "static function getAllPlans(){\n global $configClass;\n if($configClass['integrate_membership'] == 1){\n $db = JFactory::getDbo();\n $nullDate = $db->quote($db->getNullDate());\n $nowDate = $db->quote(JHtml::_('date', 'now', 'Y-m-d H:i:s', false));\n $query = $db->getQuery(true);\n $query->select('tbl.*')->from('#__osmembership_plans as tbl');\n $query->where('tbl.published = 1')\n ->where('tbl.access IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')')\n ->where('(tbl.publish_up = ' . $nullDate . ' OR tbl.publish_up <= ' . $nowDate . ')')\n ->where('(tbl.publish_down = ' . $nullDate . ' OR tbl.publish_down >= ' . $nowDate . ')');\n $db->setQuery($query);\n $allPlans = $db->loadObjectList();\n return $allPlans;\n }\n }", "function TestCaseRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"assignee\":\n\t\t\tcase \"build_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_run_id\":\n\t\t\tcase \"case_run_status_id\":\n\t\t\tcase \"case_text_version\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"iscurrent\":\n\t\t\tcase \"run_id\":\n\t\t\tcase \"sortkey\":\n\t\t\tcase \"testedby\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"close_date\":\n\t\t\tcase \"notes\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function plan_list( $count = 10, $offset = 0 ) {\r\n\t\t$params['count'] = $count;\r\n\t\t$params['offset'] = $offset;\r\n\t\t$vars = http_build_query( $params, NULL, '&' );\r\n\t\t\r\n\t\treturn $this->_send_request( 'plans?'.$vars );\r\n\t}", "public function getPlans()\n {\n return response()->json(Spark::plans());\n }", "public function index()\n {\n $user = \\Auth::guard('api')->user();\n \n // authorize\n if (!$user->can('read', new \\Acelle\\Model\\Plan())) {\n return \\Response::json(array('message' => 'Unauthorized'), 401);\n }\n \n $rows = \\Acelle\\Model\\Plan::getAll()->limit(100)\n ->get();\n \n $plans = $rows->map(function ($plan) {\n return [\n 'uid' => $plan->uid, \n 'name' => $plan->name,\n 'price' => $plan->price,\n 'currency_code' => $plan->currency->code,\n 'frequency_amount' => $plan->frequency_amount,\n 'frequency_unit' => $plan->frequency_unit,\n 'options' => $plan->getOptions(),\n 'status' => $plan->status,\n 'color' => $plan->color,\n 'quota' => $plan->quota,\n 'custom_order' => $plan->custom_order,\n 'created_at' => $plan->created_at,\n 'updated_at' => $plan->updated_at,\n ];\n });\n\n return \\Response::json($plans, 200);\n }", "public function listPlans()\n\t{\n\t\t\n\t\t/* If 1.4 and no backward, then leave */\n\t\tif (!$this->backward)\n\t\t\treturn;\n\t\t\t\n\t include_once(dirname(__FILE__).'/lib/Stripe.php');\n\t\t\\Stripe\\Stripe::setApiKey(Configuration::get('STRIPE_MODE') ? Configuration::get('STRIPE_PRIVATE_KEY_LIVE') : Configuration::get('STRIPE_PRIVATE_KEY_TEST'));\n\n\t\t/* Try to process the capture and catch any error message */\n\t\ttry\n\t\t{\n\t\t\t$result_json = \\Stripe\\Plan::all();\n\t\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\n\t\t\t$this->_errors['stripe_subscription_error'] = $e->getMessage();\n\t\t\tif (class_exists('Logger'))\n\t\t\t\tLogger::addLog($this->l('Stripe - Plans list update failed').' '.$e->getMessage(), 1, null, 'Customer', (int)Tools::getIsset('id_customer'), true);\n\t\t}\n\t\t\n\t\tif(!isset($this->_errors['stripe_subscription_error'])){\n\t\t\tDb::getInstance()->Execute('TRUNCATE TABLE '._DB_PREFIX_.'stripepro_plans');\n\t\t\tfor($i=0;$i<count($result_json->data); $i++){\n\t\t\t Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'stripepro_plans (`stripe_plan_id`, `name`, `interval`, `amount`, `currency`, `interval_count`, `trial_period_days`) VALUES (\\''.$result_json->data[$i]->id.'\\', \\''.$result_json->data[$i]->name.'\\', \\''.$result_json->data[$i]->interval.'\\','.sprintf(\"%.2f\", $result_json->data[$i]->amount / 100).', \\''.$result_json->data[$i]->currency.'\\', '.(int)$result_json->data[$i]->interval_count.','.(int)$result_json->data[$i]->trial_period_days.')');\n\t\t\t }\n\t\t\t}\n\t\n\treturn true;\n\t\n\t}", "public function getPlans()\n {\n try{\n \n $aPlans = $this->request('plans', 'GET');\n if( $aPlans->status ){\n throw new Exception( $aPlans->status.'-'.$aPlans->details[0]->message );\n }else{\n return $aPlans;\n }\n }catch(Exception $e){\n $this->exception($e);\n }\n }", "public function listar(){\n $rol= $this->db->select('*')->from('versions')->join('plans', 'plans.PLAN_PK = versions.VRSN_FK_plans');\n return $rol->get();\n }", "public function getPlanData(){\n\t\t$sql = \"SELECT * FROM plan\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t}", "public function list(array $parameters): ListResponse;", "public function get_listing_plans($id, $type)\n {\n header('Content-Type: application/json');\n $output['token'] = $this->security->get_csrf_hash();\n $data = $this->database->_get_row_data('tbl_purchases', array('plan_id' => $id, 'listing_type' => $type));\n if (!empty($data)) {\n $output['response'] = $data;\n } else {\n $output['response'] = false;\n }\n\n exit(json_encode($output));\n }", "public function getAllPlans($paramArray = [])\n {\n $ret = $this->exec($this->uri.$this->toHttpQueryParameter($paramArray), null);\n\n $prjs = $this->json_mapper->mapArray(\n json_decode($ret, false), new \\ArrayObject(), '\\BambooRestApi\\Plan\\Plan'\n );\n\n return $prjs;\n }", "public function testlistAction() \n {\n $model = new Application_Model_Mapper_Server($vars);\n $result = $model->getTestDetails();\n $data = array();\n $result = json_encode($result);\n $this->view->assign('result', $result);\n $this->_helper->viewRenderer('index');\n }", "public function getPlan();", "public function getParametersList(){\n return $this->_get(2);\n }", "public function get_wp_list_table( $args ) {\n\n\t\t$plans = $this->get_plans( $args );\n\n\t\t$plan_collection = [];\n\n\t\tif ( ! empty( $plans ) ) {\n\n\t\t\tforeach ( $plans as $plan ) {\n\t\t\t\t$p = [];\n\t\t\t\t$p['id'] = $plan->get_id();\n\t\t\t\t$p['name'] = $plan->get_name();\n\t\t\t\t$p['sku'] = $plan->get_sku();\n\t\t\t\t$p['amount'] = $plan->get_price();\n\t\t\t\t$p['description'] = $plan->get_description();\n\t\t\t\t$p['type'] = $plan->get_type();\n\t\t\t\t$p['status'] = $plan->get_status();\n\t\t\t\t$p['date_created'] = $plan->get_date_created();\n\t\t\t\t$p['date_updated'] = $plan->get_date_updated();\n\t\t\t\t$plan_collection[] = $p;\n\t\t\t}\n\n\t\t}\n\n\t\treturn $plan_collection;\n\t}", "public function run()\n {\n $plans =\n array(\n array(\n \"product_id\"=>1,\n \"title\" => \"Basic\",\n \"pricing\" => 6850,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 5 User accounts;\n 1 Free system admin account;\n 500 SMS notifications in a month;\n A maximum of 500,000 customer records;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>1,\n \"title\" => \"Standard\",\n \"pricing\" => 11800,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 15 User accounts;\n 1 Free system admin account;\n 1000 SMS notifications in a month;\n A maximum of 1,500,000 customer records;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>1,\n \"title\" => \"Enterprise\",\n \"pricing\" => 21550,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 100 User accounts;\n 1 Free system admin account;\n 5000 SMS notifications in a month;\n A maximum of 500,000 customer records;\n Organization with multiple receptions\n All reports;\",\n \"note\" => \"Extra functionality will be charged at 2% of the Basic\"\n ),\n\n /******************module 2*****************/\n\n array(\n \"product_id\"=>2,\n \"title\" => \"Basic\",\n \"pricing\" => 18000,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 5 User accounts;\n 1 Free system admin account;\n A maximum of 500,000 customer records;\n Free end user android mobile application on 5 devices;\n A maximum of 5 E-Security desk;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>2,\n \"title\" => \"Standard\",\n \"pricing\" => 25800,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 15 User accounts;\n 1 Free system admin account;\n A maximum of 1,500,000 customer records;\n Free end user android mobile application on 15 devices;\n A maximum of 15 E-Security desk;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>2,\n \"title\" => \"Enterprise\",\n \"pricing\" => 50550,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 100 User accounts;\n 1 Free system admin account;\n A maximum of 5,000,000 customer records;\n Free end user android mobile application on 100 devices;\n A maximum of 100 E-Security desk;\n All reports;\",\n \"note\" => \"Extra functionality will be charged at 2% of the Basic\"\n )\n );\n\n DB::table('plans')->delete();\n DB::table('plans')->insert($plans);\n\n }", "function ambil_paket_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? $_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$result=$this->m_master_ambil_paket->ambil_paket_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "public function getAllPlans()\n {\n try {\n return $this->plan->all();\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return false;\n }\n }", "public function getPlansData()\n {\n if (isset($this->data)) {\n return $this->data;\n }\n\n return [];\n }", "public function index()\n\t{\n\t\t$query = Parameter::query()->with('module');\n\t\t\n\t\tif(Input::query('keyword'))\n\t\t{\n\t\t\t$query->where('name', 'like', '%' . Input::query('keyword') . '%');\n\t\t}\n\t\t\n\t\tif(Input::query('module_id'))\n\t\t{\n\t\t\t$query->where('module_id', Input::query('module_id'));\n\t\t}\n\n\t\t$page = Input::query('page') ? Input::query('page') : 1;\n\t\t\n\t\t$per_page = Input::query('per_page') ? Input::query('per_page') : false;\n\t\t\n\t\t$list_total = $query->count();\n\t\t\n\t\tif($per_page)\n\t\t{\n\t\t\t$query->skip(($page - 1) * $per_page)->take($per_page);\n\t\t\t$list_start = ($page - 1) * $per_page + 1;\n\t\t\t$list_end = ($page - 1) * $per_page + $per_page;\n\t\t\tif($list_end > $list_total)\n\t\t\t{\n\t\t\t\t$list_end = $list_total;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$list_start = 1; $list_end = $list_total;\n\t\t}\n\t\t\n\t\t$results = $query->get();\n\t\t\n\t\treturn response($results)->header('Items-Total', $list_total)->header('Items-Start', $list_start)->header('Items-End', $list_end);\n\t}", "public function getAdsPlans()\r\n {\r\n /*$content_type = [];\r\n $objectManager = $this->blockObjectManager();\r\n $customerSession = $objectManager->create('Magento\\Customer\\Model\\Session');\r\n $customerid = $customerSession->getCustomerId();\r\n $model = $objectManager->create('Webkul\\MpAdvertisementManager\\Model\\Block')->getCollection();\r\n $data = $model->addFieldToFilter('seller_id', array('eq'=> $customerid));\r\n foreach ($data as $collections) {\r\n $content_type[] = $collections->getContentType();\r\n }\r\n $dataCollection = $this->_adsHelper->getAdsPlans()->addFieldToFilter('content_type', array('in'=> array_unique($content_type)));*/\r\n return $this->_adsHelper->getAdsPlans();\r\n // return $dataCollection;\r\n }", "public function get_plans()\n {\n //\n\n \n $user_id = Auth::user()->id;\n\n $listing_code = Session::get('listing_code');\n\n\n $listing = Listing::where('listing_code', $listing_code)->where('agent_id', $user_id)->first();\n\n try {\n //code...\n\n $floor_plans = ListingFloorPLan::where('listing_id', $listing->id)->latest()->get();\n\n } catch (\\Throwable $th) {\n //throw $th;\n\n return $th;\n }\n\n \n\n\n\n return $floor_plans;\n }", "function listarPlanArb()\n {\n $node = $this->objParam->getParametro('node');\n\n //$clasificacion = $this->objParam->getParametro('clasificacion');\n $id_plan = $this->objParam->getParametro('id_plan');\n //\n $tipo_nodo = $this->objParam->getParametro('tipo_nodo');\n\n\n if ($node == 'id') {\n $this->objParam->addParametro('id_padre', '%');\n } else {\n $this->objParam->addParametro('id_padre', $id_plan);\n }\n\n\n //$this->objParam->addParametro('clasificacion', $clasificacion);\n\n //creamos el modelo\n $this->objFunc = $this->create('MODPlan');\n $this->res = $this->objFunc->listarPlanArb();\n\n $this->res->setTipoRespuestaArbol();\n\n $arreglo = array();\n\n //$arreglo_valores=array();\n\n //para cambiar un valor por otro en una variable\n // array_push($arreglo_valores,array('variable'=>'checked','val_ant'=>'true','val_nue'=>true));\n // array_push($arreglo_valores,array('variable'=>'checked','val_ant'=>'false','val_nue'=>false));\n // $this->res->setValores($arreglo_valores);\n\n\n array_push($arreglo, array('nombre' => 'id', 'valor' => 'id_plan'));\n array_push($arreglo, array('nombre' => 'id_p', 'valor' => 'id_plan_padre'));\n\n array_push($arreglo, array('nombre' => 'text', 'valores' => '#nombre_plan# <font color=\"blue\">PESO:#peso#%</font> #porcentaje_acum# #porcentaje_rest#'));\n array_push($arreglo, array('nombre' => 'cls', 'valor' => 'peso'));\n array_push($arreglo, array('nombre' => 'qtip', 'valores' => '<b>ID PLAN:</b> #id_plan# <br><b>NOMBRE:</b> #nombre_plan#<br/><b>PESO:</b> #peso# %'));\n\n /*Estas funciones definen reglas para los nodos en funcion a los tipo de nodos que contenga cada uno*/\n $this->res->addNivelArbol('tipo_nodo', 'raiz', array('leaf' => false, 'draggable' => false, 'allowDelete' => true, 'allowEdit' => true, 'cls' => 'folder', 'tipo_nodo' => 'raiz', 'icon' => '../../../lib/imagenes/orga32x32.png'), $arreglo);\n\n $this->res->addNivelArbol('tipo_nodo', 'hijo', array('leaf' => false, 'draggable' => false, 'allowDelete' => true, 'allowEdit' => true, 'tipo_nodo' => 'hijo', 'icon' => '../../../lib/imagenes/alma32x32.png'), $arreglo);\n\n $this->res->addNivelArbol('tipo_nodo', 'hoja', array('leaf' => true, 'draggable' => false, 'allowDelete' => true, 'allowEdit' => true, 'tipo_nodo' => 'hoja', 'icon' => '../../../lib/imagenes/a_form.png'), $arreglo);\n \n\n //Se imprime el arbol en formato JSON\n //var_dump($this->res->generarJson());exit;\n $this->res->imprimirRespuesta($this->res->generarJson());\n }" ]
[ "0.7136406", "0.67542243", "0.67111814", "0.64812684", "0.637033", "0.6253718", "0.60476285", "0.603434", "0.6025123", "0.6012494", "0.6008581", "0.5982291", "0.594686", "0.5917289", "0.5886587", "0.58222854", "0.5779504", "0.5763884", "0.575542", "0.57278067", "0.5724589", "0.5681366", "0.5647884", "0.5646026", "0.5614814", "0.5521661", "0.55047673", "0.5492905", "0.54844505", "0.5468049" ]
0.7754514
0
/ create Create A New TestPlan Usage TestPlan.create Parameters ParameterData TypeComments new_valueshashmapSee required attributes list below. Required attributes: author_id, product_id, default_product_version, type_id, and name. Result plan_id
function TestPlan_create($author_id, $product_id, $default_product_version, $type_id, $name, $creation_date = NULL, $isactive = TRUE) { $varray = array("author_id" => "int", "product_id" => "int", "default_product_version" => "string", "type_id" => "int", "name" => "string", "creation_date" => "string", "isactive" => "int"); foreach($varray as $key => $val) { if (isset(${$key})) { $carray[$key] = new xmlrpcval(${$key}, $val); } } // Create call $call = new xmlrpcmsg('TestPlan.create', array(new xmlrpcval($carray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createPlan(){\n if(!$this->request->plan_name || !$this->request->plan_description) {\n return false;\n }\n $this->plan = Planes::create([\n 'name' => $this->request->plan_name,\n 'description' => $this->request->plan_description,\n 'price' => $this->request->price,\n 'product_id' => $this->request->product_id,\n 'balance' => $this->request->balance,\n ]);\n $this->plan = new PlanesFormatter($this->plan);\n }", "public function create($plan, array $properties = array());", "public function create($planData)\n {\n \t$planPurchase \t\t\t\t = new PlanPurchase();\n\t\t$planPurchase->user_id \t\t = $this->user->id;\n\t\t$planPurchase->plan_id \t\t = $planData->plan_id;\n\t\t$planPurchase->country_code = $planData->country_code;\n\t\t$planPurchase->gold_price = (float)$this->plan->gold_price;\n\t\t$planPurchase->transaction_id = $planData->transaction_id;\n\t\t$planPurchase->save();\n\n \t/** Add Chest Capacity value in user's table **/\n \t(new ChestService)->setUser($this->user)->expand($this->plan->bucket);\n \t\n /** Deduct User Gold **/\n $goldBalance = (new UserRepository($this->user))->deductGold($this->plan->gold_price);\n\n \t/** return the available skeleton keys **/\n \treturn ['chest_bucket'=> $this->user->buckets['chests'], 'available_gold_balance'=> $goldBalance];\n }", "function TestCase_create($author_id, $case_status_id, $category_id, $isautomated, $plan_id, $alias = NULL, $arguments = NULL, $canview = NULL, $creation_date = NULL, $default_tester_id = NULL, $priority_id = NULL, $requirement = NULL, $script = NULL, $summary = NULL, $sortkey = NULL) {\n\t$varray = array(\"author_id\" => \"int\", \"case_status_id\" => \"int\", \"category_id\" => \"int\", \"isautomated\" => \"int\", \"plan_id\" => \"int\", \"alias\" => \"string\", \"arguments\" => \"string\", \"canview\" => \"int\", \"creation_date\" => \"string\", \"default_tester_id\" => \"int\", \"priority_id\" => \"int\", \"requirement\" => \"string\", \"script\" => \"string\", \"summary\" => \"string\", \"sortkey\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function create_plan($requestData){\n \n // ### Create Plan\n try {\n // Create a new instance of Plan object\n $plan = new Plan();\n if(isset($requestData['plan'])){\n $this->setArrayToMethods($this->checkEmptyObject($requestData['plan']), $plan);\n } \n // # Payment definitions for this billing plan.\n $paymentDefinition = new PaymentDefinition(); \n $paymentDefinition\n ->setAmount(new Currency($requestData['paymentDefinition']['Amount']));\n array_pop($requestData['paymentDefinition']);\n if(!empty($this->checkEmptyObject((array)$paymentDefinition))){\n $this->setArrayToMethods(array_filter($requestData['paymentDefinition']), $paymentDefinition); \n }\n \n // Charge Models\n $chargeModel = new ChargeModel();\n $chargeModel->setAmount(new Currency($requestData['chargeModel']['Amount']));\n array_pop($requestData['chargeModel']);\n if(!empty($this->checkEmptyObject((array)$chargeModel))){\n $this->setArrayToMethods(array_filter($requestData['chargeModel']), $chargeModel); \n $paymentDefinition->setChargeModels(array($chargeModel));\n }\n \n $merchantPreferences = new MerchantPreferences();\n $baseUrl = $requestData['baseUrl'];\n\n $merchantPreferences->setReturnUrl($baseUrl.$requestData['ReturnUrl'])\n ->setCancelUrl($baseUrl.$requestData['CancelUrl']);\n if(!empty($this->checkEmptyObject($requestData['merchant_preferences']['SetupFee']))){\n $merchantPreferences->setSetupFee(new Currency($requestData['merchant_preferences']['SetupFee']));\n }\n array_pop($requestData['merchant_preferences']);\n \n if(isset($requestData['merchant_preferences'])){\n $this->setArrayToMethods($this->checkEmptyObject($requestData['merchant_preferences']), $merchantPreferences);\n }\n if(!empty($this->checkEmptyObject((array)$paymentDefinition))){\n $plan->setPaymentDefinitions(array($paymentDefinition));\n }\n if(!empty($this->checkEmptyObject((array)$merchantPreferences))){\n $plan->setMerchantPreferences($merchantPreferences);\n } \n $requestArray= clone $plan;\n $output = $plan->create($this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $output->toArray();\n $returnArray['RAWREQUEST']=$requestArray->toJSON();\n $returnArray['RAWRESPONSE']=$output->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }", "function TestRun_create($build_id, $environment_id, $manager_id, $plan_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function createPlan(array $parameters = array())\n {\n /**\n * @var \\Omnipay\\Vindicia\\Message\\CreatePlanRequest\n */\n return $this->createRequest('\\Omnipay\\Vindicia\\Message\\CreatePlanRequest', $parameters);\n }", "public function create_plan() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n # Set up query\n $q = \"INSERT INTO plans SET\n\t\t\t description='\".$_POST['description'].\"', time='\".$_POST['time'].\"', public='\".(!empty($_POST['public'])?1:0).\"',\n\t\t\t modified_date='\".Time::now().\"', modified_by='\".$this->user->user_id.\"'\";\n $plans = DB::instance(DB_NAME)->query($q);\n\n # Set up query\n $q = \"SELECT\n\t\t\t p.plan_id, p.description,p.time,p.public, c.first_name, c.last_name, p.modified_date, p.show\n\t\t\t FROM plans AS p inner join\n\t\t\t users as u on p.modified_by=u.user_id\n \t\t inner JOIN contacts AS c ON u.user_id=c.user_id\n\t\t\t and c.modified_date = (select max(modified_date) from\n\t\t\t contacts as c where c.user_id=p.modified_by) and p.plan_id = LAST_INSERT_ID()\n \";\n\n # Run query\n $result = DB::instance(DB_NAME)->select_row($q);\n $result[\"posted_on\"] = Time::display($result['modified_date'],'Y-m-d H:m:s');\n\n #Adding action to System Log\n $data3 = Array (\n\n \"modified_date\" => Time::now(),\n \"FK_id\" => $result[\"plan_id\"],\n \"FK_table\" => 'plans',\n \"login\" => false,\n \"modified_by\" => $this->user->user_id\n );\n DB::instance(DB_NAME)->insert('logs',$data3);\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n $jTableResult['Record'] = $result;\n print json_encode($jTableResult);\n }", "public function creating(Plan $plan)//troquei o created por creating\n {\n $plan->url = Str::kebab($plan->name);\n }", "public function create( array $parameters );", "public function create( array $parameters );", "public static function data_for_user_competency_summary_in_plan_parameters() {\n $competencyid = new external_value(\n PARAM_INT,\n 'Data base record id for the competency',\n VALUE_REQUIRED\n );\n $planid = new external_value(\n PARAM_INT,\n 'Data base record id for the plan',\n VALUE_REQUIRED\n );\n\n $params = array(\n 'competencyid' => $competencyid,\n 'planid' => $planid,\n );\n return new external_function_parameters($params);\n }", "function TestCaseRun_create($assignee, $build_id, $case_id, $case_text_version, $environment_id, $run_id, $canview = NULL, $close_date = NULL, $iscurrent = NULL, $notes = NULL, $sortkey = NULL, $testedby = NULL) {\n\t$varray = array(\"assignee\" => \"int\", \"build_id\" => \"int\", \"case_id\" => \"int\", \"case_text_version\" => \"int\", \"environment_id\" => \"int\", \"run_id\" => \"int\", \"canview\" => \"int\", \"close_date\" => \"string\", \"iscurrent\" => \"int\", \"notes\" => \"string\", \"sortkey\" => \"int\", \"testedby\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public static function data_for_plan_page_parameters() {\n $planid = new external_value(\n PARAM_INT,\n 'The plan id',\n VALUE_REQUIRED\n );\n $params = array('planid' => $planid);\n return new external_function_parameters($params);\n }", "public function CreateNewTicketForPlan(CreateNewTicketForPlan $parameters)\n {\n return $this->__soapCall('CreateNewTicketForPlan', array($parameters));\n }", "public function createAction() {\n $this->_helper->layout->setLayout('admin-simple');\n\n //GENERATE FORM\n $form = $this->view->form = new Sitestorereview_Form_Admin_Ratingparameter_Create();\n $form->setAction($this->getFrontController()->getRouter()->assemble(array()));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues();\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n //ADD REVIEW CATEGORY TO THE DATABASE\n $tableReviewParams = Engine_Api::_()->getDbtable('reviewcats', 'sitestorereview');\n\n //INSERT THE REVIEW CATEGORY IN TO THE DATABASE\n $row = $tableReviewParams->createRow();\n $row->category_id = $this->_getParam('category_id');\n $row->reviewcat_name = $values[\"reviewcat_name\"];\n $row->save();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('')\n ));\n }\n\n $this->renderScript('admin-ratingparameter/create.tpl');\n }", "public static function data_for_plans_page_parameters() {\n $userid = new external_value(\n PARAM_INT,\n 'The user id',\n VALUE_REQUIRED\n );\n $params = array('userid' => $userid);\n return new external_function_parameters($params);\n }", "public function create($params);", "public function created(PlanSubscription $planSubscription)\n {\n //\n }", "public function create_simple($data) {\n\n $plan = $this->csmplan->get($data['plan_id']);\n if (empty($plan)) {\n throw new Exception('Something went wrong. Membership plan does not exist');\n } else {\n $this->gump->validation_rules(array(\n 'user_id' => 'required|max_len,100',\n 'plan_id' => 'required|numeric',\n 'plan_start' => 'required|date',\n 'vat' => 'required|numeric'\n ));\n\n $validated_data = $this->gump->run($data);\n if ($validated_data === false) {\n $errArr = $this->gump->get_readable_errors();\n $errString = \"\";\n foreach ($errArr as $k => $err) {\n $errString .= $err . '<br>';\n }\n throw new Exception($errString);\n } else {\n $response = $this->create(array(\n 'user_id' => $data['user_id'],\n 'plan_id' => $plan['plan_id'],\n 'plan_start' => $data['plan_start'],\n 'plan_end' => date('Y-m-d', (strtotime($data['plan_start']) + ($plan['days'] * 60 * 60 * 24))),\n 'approved' => $data['approved'] ? 1 : 0,\n 'payment' => $data['payment'] ? 1 : 0,\n 'payment_method' => $data['payment_method'],\n 'payment_at' => $data['payment_at'],\n 'price' => $plan['price'],\n 'vat' => $plan['vat'],\n 'price_total' => $plan['price'] + (($plan['price'] / 100) * $data['vat'])\n ));\n if ($response !== 1) {\n throw new Exception('Something went wrong');\n } else {\n return $response;\n }\n }\n }\n }", "public function actionCreate(array $attributes)\n {\n $input = new XInputFilter($attributes);\n $param = $input->getModel('Setting');\n\n if ($param->module == 'System') {\n $param->module = '';\n }\n\n // Get max ordering in a group\n $sql = \"\n SELECT MAX(ordering)\n FROM \" . SITE_ID . \"_setting\n WHERE module=:Module AND setting_group=:GroupName\n \";\n $con = Yii::app()->db;\n $command = $con->createCommand($sql);\n $maxOrdering = $command->queryScalar(array(':Module' => $param->module, ':GroupName' => $param->setting_group));\n $param->ordering = $maxOrdering + 1;\n\n $temp = Setting::model()->findByPk(array('name' => $param->Name, 'module' => $param->module));\n if (!is_null($temp)) {\n errorHandler()->log(Yii::t('Settings.Api', 'PARAMETER_EXISTS'));\n } else {\n if (!$param->save()) {\n errorHandler()->log($this->normalizeModelErrors($param->Errors));\n } else {\n $this->actionDb2php();\n }\n }\n $this->result = $param;\n }", "abstract public function create (ParameterBag $data);", "public function create($params)\n {\n }", "public function test_calledCreateMethod_withValidParameters_argumentsHasBeenSetted()\n {\n $dataContainerMock = $this->getDataConteinerMock();\n\n $sut = DataWrapper::create(\n 200,\n \"Ok\",\n \"copyright\",\n \"attribution text\",\n \"attribution HTML\",\n $dataContainerMock,\n \"etag\"\n );\n\n $this->assertEquals(200, $sut->getCode());\n $this->assertEquals(\"Ok\", $sut->getStatus());\n $this->assertEquals(\"copyright\", $sut->getCopyright());\n $this->assertEquals(\"attribution text\", $sut->getAttributionText());\n $this->assertEquals(\"attribution HTML\", $sut->getAttributionHTML());\n $this->assertEquals(\"etag\", $sut->getEtag());\n }", "public function createAction() {\n\n $this->validateUser();\n\n $form = new Yourdelivery_Form_Testing_Create();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->getRequest()->getPost())) {\n if ($form->getValue('tag') && $this->getRequest()->getParam('proceed') == 'false') {\n $tags = Yourdelivery_Model_Testing_TestCase::searchForTags($form->getValue('tag'));\n\n if ($tags) {\n foreach ($tags as $tag) {\n $ids .= sprintf('<a href=\"/testing_cms/overview/id/%s\" target=\"blank\">%s</a> ', $tag['id'], $tag['id']);\n }\n $this->warn('Tag already in use for testcase ' . $ids);\n $this->_redirect(vsprintf('testing_cms/create/title/%s/author/%s/description/%s/priority/%s/tag/%s/proceed/true', $form->getValues()));\n }\n }\n\n $testCase = new Yourdelivery_Model_Testing_TestCase();\n $testCase->setData($form->getValues());\n $id = $testCase->save();\n $this->success('Testcase successfully created.');\n $this->_redirect('testing_cms/add/id/' . $id);\n } else {\n $this->error($form->getMessages());\n }\n }\n $this->view->post = $this->getRequest()->getParams();\n }", "public function create($table, $parameters)\n {\n\n }", "public function updatePlan(array $parameters = array())\n {\n /**\n * @var \\Omnipay\\Vindicia\\Message\\CreatePlanRequest\n */\n return $this->createRequest('\\Omnipay\\Vindicia\\Message\\CreatePlanRequest', $parameters, true);\n }", "public function testAddPackingPlan()\n {\n }", "public function savePlan($plan)\n {\n return Stripe\\Plan::create(array(\n \"amount\" => $plan->price,\n \"interval\" => $plan->interval,\n \"name\" => $plan->name,\n \"currency\" => \"usd\",\n 'id' => $plan->level\n ));\n }", "function TestPlan_update($plan_id, $author_id, $product_id = NULL, $default_product_version = NULL, $type_id = NULL, $name = NULL, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.update', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}" ]
[ "0.63898385", "0.6344703", "0.623954", "0.60590345", "0.601717", "0.59760976", "0.5635571", "0.56178933", "0.56029963", "0.55716574", "0.55716574", "0.5557935", "0.55564094", "0.55440366", "0.5477087", "0.53945255", "0.5374685", "0.52334315", "0.52220476", "0.5214651", "0.52145237", "0.5207759", "0.51779735", "0.51663405", "0.5156508", "0.51455086", "0.51004", "0.5095241", "0.5056435", "0.5053047" ]
0.6840818
0
/ update Update An Existing TestPlan Usage TestPlan.update Parameters ParameterData TypeComments plan_idinteger new_valueshashmapplan_id can not be modified. Result Array [author_id] [test_case_count] [name] [default_product_version] [test_run_count] [plan_id] [product_id] [creation_date] [type_id] [isactive] [product] Array [defaultmilestone] [votesperuser] [disallownew] [name] [maxvotesperbug] [milestoneurl] [classification_id] [description] [votestoconfirm] [id]
function TestPlan_update($plan_id, $author_id, $product_id = NULL, $default_product_version = NULL, $type_id = NULL, $name = NULL, $creation_date = NULL, $isactive = TRUE) { $varray = array("author_id" => "int", "product_id" => "int", "default_product_version" => "string", "type_id" => "int", "name" => "string", "creation_date" => "string", "isactive" => "int"); foreach($varray as $key => $val) { if (isset(${$key})) { $carray[$key] = new xmlrpcval(${$key}, $val); } } // Create call $call = new xmlrpcmsg('TestPlan.update', array(new xmlrpcval($plan_id, "int"), new xmlrpcval($carray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update_plan() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n # Set up query\n $q = \"UPDATE plans SET\n\t\t\t description='\".$_POST['description'].\"', time='\".$_POST['time'].\"', public='\".(!empty($_POST['public'])?1:0).\"'\n\t\t\t WHERE plan_id=\".$_POST['plan_id'];\n $plans = DB::instance(DB_NAME)->query($q);\n\t\t\n\t\t#Adding action to System Log\n $data3 = Array (\n\n \"modified_date\" => Time::now(),\n \"FK_id\" => $_POST['plan_id'],\n \"FK_table\" => 'plans',\n \"login\" => false,\n \"modified_by\" => $this->user->user_id\n );\n DB::instance(DB_NAME)->insert('logs',$data3);\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n print json_encode($jTableResult);\n }", "function TestRun_update($run_id, $build_id, $environment_id, $manager_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.update', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function update_predefined_innovation_plan($id, $params)\n {\n $this->db->where('id', $id);\n $status = $this->db->update('predefined_innovation_plan', $params);\n $db_error = $this->db->error();\n if (! empty($db_error['code'])) {\n echo 'Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message'];\n exit();\n }\n return $status;\n }", "public function update_plan($planId,$items,$state){ \n try {\n \n $createdPlan = new Plan();\n $createdPlan->setId($planId);\n\n $patch = new Patch();\n $value = new PayPalModel('{\n \"state\":\"'.$state.'\"\n }');\n $this->setArrayToMethods(array_filter($items), $patch);\n $patch->setValue($value); \n \n $patchRequest = new PatchRequest();\n $patchRequest->addPatch($patch);\n $requestArray = clone $createdPlan;\n $createdPlan->update($patchRequest, $this->_api_context);\n $plan = Plan::get($planId, $this->_api_context);\n \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $plan->toArray();\n $returnArray['RAWREQUEST'] =$requestArray;\n $returnArray['RAWRESPONSE']=$plan->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }", "public function updatePlan(array $parameters = array())\n {\n /**\n * @var \\Omnipay\\Vindicia\\Message\\CreatePlanRequest\n */\n return $this->createRequest('\\Omnipay\\Vindicia\\Message\\CreatePlanRequest', $parameters, true);\n }", "function TestCase_update($case_id, $case_status_id, $category_id, $isautomated, $alias = NULL, $arguments = NULL, $default_tester_id = NULL, $priority_id = NULL, $requirement = NULL, $script = NULL, $summary = NULL, $sortkey = NULL) {\n\t$varray = array(\"case_id\" => \"int\", \"case_status_id\" => \"int\", \"category_id\" => \"int\", \"isautomated\" => \"int\", \"alias\" => \"string\", \"arguments\" => \"string\", \"default_tester_id\" => \"int\", \"priority_id\" => \"int\", \"requirement\" => \"string\", \"script\" => \"string\", \"summary\" => \"string\", \"sortkey\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.update', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function update(Request $request, Plan $plan)\n {\n //\n }", "public function update($id, Request $request)\n {\n $customMessages = [\n 'name' => 'The Plan Name field is required.',\n 'description' => 'The description field is required.',\n ];\n $this->validate($request, [\n 'name' => 'required|unique:plans,name,'.$request->id.',id',\n 'description' => 'required',\n ], $customMessages);\n \n $plan = Plan::findOrFail($id);\n $plan->name = $request->get('name');\n $plan->description = $request->get('description');\n if($request->has('status')) $plan->status = $request->get('status');\n $plan->save();\n $mainmodules = MainModule::all();\n try{\n $datetime = date('Y-m-d H:i:s');\n $has_tally_integration = $request->has('tally');\n DB::beginTransaction();\n $plans_has_modules = DB::table('plan_has_modules')->where('plan_id', $plan->id)->first();\n if($plans_has_modules) DB::table('plan_has_modules')->where('plan_id', $plan->id)->delete();\n\n $insertData = array();\n $clientSettingUpdatedArray = array();\n foreach($mainmodules as $module){\n $field = $module->field;\n $enabled = $request->$field ? 1 : 0;\n $clientSettingUpdatedArray[$field] = $enabled;\n $data = array(\n 'plan_id'=>$plan->id,\n 'module_id'=>$module->id,\n 'enabled'=>$enabled\n ); \n array_push($insertData, $data);\n }\n if(!empty($insertData)) DB::table('plan_has_modules')->insert($insertData);\n $companiesIDs = DB::table('company_plan')->where('plan_id',$plan->id)->pluck('company_id');\n \n if(!empty($companiesIDs)){\n $clientSettings = ClientSetting::whereIn('company_id',$companiesIDs)->get();\n \n foreach($clientSettings as $clientSetting){\n $clientSetting->update($clientSettingUpdatedArray);\n $company_id = $clientSetting->company_id;\n // AssignFullAccessPermission::dispatch($company_id, $clientSetting);\n // $limited_access_assign_permission_name = array('PartyVisit-view', 'PartyVisit-create');\n \n // AssignLimitedAccessPermission::dispatch($company_id, $limited_access_assign_permission_name);\n\n $tallyInt = DB::table('tally_schedule')->where('company_id', $company_id)->first();\n $companyname = Company::find($company_id);\n \n $domain = $companyname ? $companyname->domain : NULL;\n if($domain){\n if (!$has_tally_integration && !empty($tallyInt)) {\n $affected = DB::table('tally_schedule')\n ->where('company_id', $company_id)\n ->update(['updated_at' => $datetime, 'deleted_at' => $datetime]);\n } elseif ($has_tally_integration) {\n if($tallyInt) $affected = DB::table('tally_schedule')->where('company_id', $company_id)->update(['updated_at' => $datetime, 'deleted_at' => NULL]);\n else $affected = DB::table('tally_schedule')->insert([\n 'company_id' => $company_id,\n 'company_name' => $domain,\n 'created_at' => $datetime]);\n }\n }\n }\n }\n DB::commit();\n if(isset($clientSettings)){\n foreach($clientSettings as $clientSetting){\n $fbIDs = DB::table('employees')->where(array(array('company_id', $clientSetting->company_id), array('status', 'Active')))->whereNotNull('firebase_token')->pluck('firebase_token');\n $dataPayload = array(\"data_type\" => \"company_setting\", \"company_setting\" => json_encode($clientSetting), \"action\" => \"update\");\n sendPushNotification_($fbIDs, 12, null, $dataPayload); \n }\n }\n return redirect()->route('app.plan')->with('success', 'Information has been Updated');\n }catch(\\Exception $e){\n DB::rollback();\n dd($e->getMessage());\n Log::error($e->getMessage());\n }\n }", "public function testUpdatePackingPlan()\n {\n }", "public function update() {\n\n\t\tif (!empty($this->plan_model->return_plan_by_id($this->input->post('id_plan')))) {\n\t\t\t\n\t\t\t$this->data['plansUpdate'] = $this->plan_model->return_plan_by_id($this->input->post('id_plan'));\n\n\t\t\t$this->session->set_flashdata('succes_msg','Registered Plan Health!');\n\n\t\t}else {\n\n\t\t\t$this->session->set_flashdata('error_msg','Fail Register!');\n\t\t}\n\n\t\t$this->index();\n\n\t}", "public function update(Request $request, TestResult $testResult)\n {\n //\n }", "function TestCaseRun_update($run_id, $case_id, $build_id, $environment_id, $assignee = NULL, $case_run_status_id = NULL, $notes = NULL, $update_bugs = NULL) {\n\t$varray = array(\"assignee\" => \"int\", \"case_run_status_id\" => \"int\", \"notes\" => \"string\", \"update_bugs\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.update', array(new xmlrpcval($run_id, \"int\"),new xmlrpcval($case_id, \"int\"),new xmlrpcval($build_id, \"int\"),new xmlrpcval($environment_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function updateTestSuite(&$tsuiteMgr,&$argsObj,$container,&$hash)\r\n{\r\n $msg = 'ok';\r\n $ret = $tsuiteMgr->update($argsObj->testsuiteID,$container['container_name'],$container['details']);\r\n if($ret['status_ok'])\r\n {\r\n $tsuiteMgr->deleteKeywords($argsObj->testsuiteID);\r\n if(trim($argsObj->assigned_keyword_list) != \"\")\r\n {\r\n $tsuiteMgr->addKeywords($argsObj->testsuiteID,explode(\",\",$argsObj->assigned_keyword_list));\r\n }\r\n writeCustomFieldsToDB($tsuiteMgr->db,$argsObj->tprojectID,$argsObj->testsuiteID,$hash);\r\n }\r\n else\r\n {\r\n $msg = $ret['msg'];\r\n }\r\n return $msg;\r\n}", "public function testUpdatePackingPlanCustomFields()\n {\n }", "public function update(Request $request, $id)\n {\n $this->authorize('update', Plan::class);\n\n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'duration' => 'required',\n ]);\n\n $plan = Plan::findOrFail($id);\n // Generate plan slug from plan name\n $slug = str_replace(' ','-', $request->input('name'));\n $gateway_id = str_replace(' ','_', $request->input('name'));\n $team_enable = !empty($request->input('teams_limit')) ? 1 : 0;\n $teams_limit = !empty($request->input('teams_limit')) ? $request->input('teams_limit') : NULL;\n $price = (float) $request->input('price') * 100;\n \n // Delete the plan on stripe \n $stripe_plan = \\Stripe\\Plan::retrieve($plan->gateway_id);\n $stripe_plan->delete();\n\n $interval=explode(',',$request->duration);\n //Add the Stripe Api key to\n // Recrete a new plan on stripe\n \\Stripe\\Plan::create([\n \"amount\" => $price,\n \"interval\" => $interval[1],\n \"interval_count\"=>$interval[0], \n \"product\" => [\n \"name\" => $request->input('name'),\n ],\n \"currency\" => \"usd\",\n \"id\" => $gateway_id,\n \"trial_period_days\" => $request->input('trial'),\n ]);\n\n $plan->name = $request->input('name');\n $plan->gateway_id = $gateway_id;\n $plan->price = $request->input('price');\n $plan->brand = $request->input('brand');\n $plan->contest = $request->input('contest');\n $plan->duration = $request->input('duration');\n $plan->other_info_1 =$request->input('plan_info_1');\n $plan->other_info_2 = $request->input('plan_info_2');\n //$plan->teams_enabled = $team_enable;\n //$plan->teams_limit = $teams_limit;\n $plan->active =1;\n $plan->slug = $slug;\n //$plan->trial_period_days = $request->input('trial');\n $plan->save();\n\n return redirect()->back()->with(\"status\", \"Your plan has been updated.\");\n }", "public function update(Request $request, $id)\n {\n $data = Plan::findOrFail($id);\n $data->user_type = $request->user_type;\n $data->name = $request->name;\n $data->update();\n }", "public function update($id)\n {\n if ($this->plan->validate()) {\n $plan = Testplan::find($id);\n $subjects = Input::get('subjects');\n\n //dd($subjects);\n\n if ($plan->update(Input::except(['_token', '_method', 'subjects']))) {\n $plan->items_by_subject = json_encode($subjects);\n \n if ($plan->save()) {\n return Redirect::route('testplans.edit', [$id])->with('success', 'Testplan Updated.');\n }\n }\n }\n \n Session::flash('danger', 'There were error(s) updating the testplan. Please fix below.');\n return Redirect::back()->withInput()->withErrors($this->plan->errors);\n }", "function update_product($product_info) {\r\n try {\r\n $params = array(\r\n array('name' => ':product_id', 'value' => $product_info['product_id']),\r\n array('name' => ':product_name', 'value' => &$product_info['product_name']),\r\n array('name' => ':product_number', 'value' => &$product_info['product_number']),\r\n array('name' => ':product_type', 'value' => &$product_info['product_type']),\r\n array('name' => ':notes', 'value' => &$product_info['notes']),\r\n array('name' => ':category_id', 'value' => &$product_info['category_id']),\r\n array('name' => ':width', 'value' => &$product_info['width']),\r\n array('name' => ':height', 'value' => &$product_info['height']),\r\n array('name' => ':h_length', 'value' => &$product_info['h_length']),\r\n array('name' => ':re_demand_border', 'value' => &$product_info['re_demand_border']),\r\n array('name' => ':primary_unit_name', 'value' => &$product_info['primary_unit_name']),\r\n array('name' => ':secondary_unit_name', 'value' => &$product_info['secondary_unit_name']),\r\n array('name' => ':primary_unit_quantity', 'value' => &$product_info['primary_unit_quantity']),\r\n array('name' => ':secondary_unit_quantity', 'value' => &$product_info['secondary_unit_quantity']),\r\n array('name' => ':quantity_status', 'value' => &$product_info['quantity_status']),\r\n array('name' => ':res', 'value' => &$result)\r\n );\r\n\r\n $conn = $this->db->conn_id;\r\n $stmt = oci_parse($conn, \"begin :res := product_actions.update_product(:product_id,:product_name,:product_number,:product_type,:notes,:category_id,:width,:height,:h_length,:re_demand_border,:primary_unit_name,:secondary_unit_name,:primary_unit_quantity,:secondary_unit_quantity,:quantity_status); end;\");\r\n\r\n foreach ($params as $variable)\r\n oci_bind_by_name($stmt, $variable[\"name\"], $variable[\"value\"]);\r\n\r\n oci_execute($stmt);\r\n return $result;\r\n } catch (Exception $ex) {\r\n return $ex;\r\n }\r\n }", "public function update(UpdateStripePlanRequest $request)\n {\n\n Log::debug(\"UPDATE PLAN\");\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->createPlan($request->amount, $request->name, $request->product, $request->interval);\n\n if ($result['message'] == 'Success'){\n\n session()->flash('success', 'Plan updated successfully.');\n \n return redirect( route ('plans.index') );\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n\n return redirect()->back();\n\n }\n\n }", "public function updateJudgeParametersDB($data){\n $this->db->select('id');\n $this->db->from('user_contest_report');\n $this->db->where('userSmuleID',$data['userSmuleID']);\n $q = $this->db->get();\n $row = $q->result();\n $userContestReportID = $row[0]->id;\n $this->db->set(\"userContestReportID\",$userContestReportID);\n $this->db->where('userSmuleID',$data['userSmuleID']);\n $this->db->update('users_judge');\n /** this is after payment */\n\n //print_r($data);die(\"ddddd\");\n $this->db->set('sur', $data['sur']);\n $this->db->set('Taal', $data['Taal']);\n $this->db->set('Emotion_Feel', $data['Emotion_Feel']);\n $this->db->set('Voice_Quality_Nasal', $data['Voice_Quality_Nasal']);\n $this->db->set('Soothing_Level', $data['Soothing_Level']);\n $this->db->set('Copy_Or_Originality', $data['Copy_Or_Originality']);\n $this->db->set('Variation', $data['Variation']);\n $this->db->set('Diction', $data['Diction']);\n $this->db->set('Murki_Vibratos', $data['Murki_Vibratos']);\n $this->db->set('Alaap', $data['Alaap']);\n $this->db->set('Sargam', $data['Sargam']);\n $this->db->set('Judge_Score', $data['Judge_Score']);\n $this->db->set('parameter1', $data['parameter1']);\n $this->db->set('parameter2', $data['parameter2']);\n $this->db->set('parameter3', $data['parameter3']);\n $this->db->set('parameter4', $data['parameter4']);\n $this->db->set('parameter5', $data['parameter5']);\n $this->db->where('userSmuleID',$data['userSmuleID']);\n return $this->db->update('user_contest_report');\n }", "public function edit(Plan $plan) {\n \n }", "public function edit(Plan $plan)\n {\n //\n }", "public function update(Request $request, VendorSubscriptionPlans $vendorSubscriptionPlan)\n {\n $request->validate(\n [\n 'title' => 'required|max:100',\n 'price' => 'numeric|nullable',\n 'duration' => 'required|numeric',\n 'product_limitation' => 'required|numeric',\n 'description' => 'max:200',\n 'status' => 'required',\n\n ],\n [\n 'product_limitation.required' => 'No. of Product is required',\n 'product_limitation.numeric' => 'No. of Product must be a numeric value',\n ]\n );\n\n $vendorSubscriptionPlan->title = $request->title;\n $vendorSubscriptionPlan->price = $request->price ?? 0;\n $vendorSubscriptionPlan->duration = $request->duration;\n $vendorSubscriptionPlan->product_limitation = $request->product_limitation;\n $vendorSubscriptionPlan->description = $request->description;\n $vendorSubscriptionPlan->status = $request->status;\n\n if ($vendorSubscriptionPlan->save()){\n Session::flash('success','Vendor Subscription Plan Added');\n return redirect()->route('vendor-subscription-plan.index');\n }else{\n Session::flash('error','Vendor Subscription Plan Not Added');\n return redirect()->back()->withInput();\n }\n }", "function update_scheduled_test($id,$params)\n {\n $this->db->where('id',$id);\n return $this->db->update('scheduled_tests',$params);\n }", "public function updateTrainingPlanExercise($aData, $iTrainingPlanExerciseId) \n {\n return $this->update($aData, 'training_plan_x_exercise_id = ' . $iTrainingPlanExerciseId);\n }", "public function update($id, Request $request)\n\t{\n\t\t$validator = \\Validator::make($request->all(), array(\n\t\t\t'description' => 'required',\n\t\t\t'expected_result' => 'required'\n\t\t\t));\n\t\tif ($validator->fails())\n\t\t{\n\t\t\tforeach ($validator->errors()->toArray() as $key => $value) {\n\t\t\t\t$error[]=$value[0];\n\t\t\t} \n\t\t}\n\t\telse{\n\t\t\tif( session()->has('email')){\n\t\t\t\t//Process when validations pass\n\n\t\t\t\t$level = $request->update_level; \t\n\t\t\t\t$content['description'] = $request->description;\n\t\t $content['expected_result'] = $request->expected_result;\n\t\t $item = \\App\\TestStep::find($id);\n\t\t $item->update($content);\n\t\t \n\t\t $execution_content['scroll']\t\t= $request->scroll;\n\t\t $execution_content['resource_id']\t= $request->resource_id;\n\t\t $execution_content['text']\t\t\t= $request->text;\n\t\t $execution_content['content_desc']\t= $request->content_desc;\n\t\t $execution_content['class']\t\t\t= $request->class;\n\t\t $execution_content['index']\t\t\t= $request->index;\n\t\t $execution_content['sendkey']\t\t= $request->sendkey;\n\t\t $execution_content['screenshot']\t= $request->screenshot;\n\t\t $execution_content['checkpoint']\t= $request->checkpoint;\n\t\t $execution_content['wait']\t\t\t= $request->wait;\t\t \n\t\t\t\t$tc_id\t\t\t\t\t\t\t\t= $request->tc_id;\n\n\t\t $result = \\App\\Execution::where(['ts_id' => $id, 'tl_id' => 0])->update($execution_content);\n\n\t\t\t\t$del_obj = new DeleteQueryHandler();\t\t\t\t\n\t \t$condition = $del_obj->getCondition($item, $level);\n\t \t$condition['soft_delete'] = false;\n\t \t$all_steps = \\App\\TestStep::where($condition)->get();\n\t \tforeach ($all_steps as $step_value) {\n\t \t\tif($step_value->ts_id != $id)\n\t \t\t{\n\t \t\t\t$step_value->update($content);\n\t \t\t\t//exit;\n\t \t\t\t\\App\\Execution::where(['ts_id' => $step_value->ts_id, 'tl_id' => 0])->update($execution_content);\n\t \t\t}\n\t \t}\n\t \t$message = $this->getMessage('messages.success');\n\t \t$message.= \" Total Steps updated = \".count($all_steps);\n\t\t\t\tToast::success($message);\n\n\t\t\t\treturn redirect()->route('testcase.show', ['id' => $tc_id]);\n\n\t\t\t \t//return redirect()->route('teststep.show', ['id' => $id]);\n\t\t \t}else\n\t\t \t{\n\t\t \t\t$error[] = \"Session expired. Please login to continue\";\n\t\t \t}\n\t \t}/*\n\t \t$message = $this->getMessage('messages.update_failed');\n \tToast::message($message, 'danger');*/\n\t \treturn redirect()->route('teststep.edit', ['id' => $id, 'message' => $error])->withInput();\n\t}", "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }", "function test_update($urabe, $body)\n{\n $values = $body->update_params;\n $column_name = $body->column_name;\n $column_value = $body->column_value;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->update($table_name, $values, \"$column_name = $column_value\");\n}", "public function update(UpdatePlan $request, string $id)\n {\n $plan = Plan::findOrFail(id_decode($id), ['id', 'price', 'months', 'type', 'status']);\n\n $plan->fill($request->validated());\n\n if ($plan->save()) {\n flash(trans('common.updatedSuccessfully'))->success();\n\n return redirect()->route('plans.index');\n }\n\n flash(trans('common.error'))->error();\n\n return back();\n }", "public function UpdatePayment($data)\n { \n \n \n $metadata=$data['data']['metadata']; \n $type_id=Subscription::where('user_id',$metadata['user_id'])\n ->orderBy('id', 'desc')\n ->first(); \n \n \n // Store Payment \n $payment= Payment::create([\n 'user_id'=>$metadata['user_id'],\n 'type'=> 'Subscription',\n 'type_id'=>$type_id->id,\n 'reference'=>$data['data']['reference'],\n 'currency'=>$data['data']['currency'],\n 'channel'=>$data['data']['channel'],\n 'amount'=>$data['data']['amount'],\n 'status'=>$data['data']['status'], \n 'gateway'=>\"PAYSTACK\", \n 'transaction_date'=>$data['data']['transaction_date'],\n ]);\n \n // update the subscribtion plan previously created with active status\n Subscription::where('user_id',$metadata['user_id'])\n ->where('id',$type_id->id)\n ->update([\n 'status'=>'active'\n ]); \n }" ]
[ "0.6166466", "0.6118606", "0.60295296", "0.5886314", "0.58602405", "0.5843375", "0.5680671", "0.5615461", "0.5605777", "0.5561695", "0.5532795", "0.55183804", "0.55179137", "0.5506187", "0.54960245", "0.54194474", "0.5358295", "0.5357298", "0.5343264", "0.5324659", "0.5319459", "0.5312203", "0.5294374", "0.5290355", "0.528753", "0.5270128", "0.52248734", "0.5206514", "0.5198078", "0.51703316" ]
0.7121966
0
/ get_categories Get A List of Categories For An Existing Test Plan Usage TestPlan.get_categories Parameters ParameterData TypeComments plan_idinteger Return Array [0] Array [category_id] [product_id] [name] [description] [1] Array ...
function TestPlan_get_categories($plan_id) { // Create call $call = new xmlrpcmsg('TestPlan.get_categories', array(new xmlrpcval($plan_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategories(){\n\t\t// preapres the request\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: ' . TOKEN));\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . IP . \"/bde_site/api/category/\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\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\t// decode the answer into a php object\n\t\t$categories = json_decode($output, true);\n\n\t\treturn $categories;\n\t}", "function GetCategories()\n\t{\n\t\t$result = $this->sendRequest(\"GetCategories\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getCategoryList() {\n $categories = $this->couponServices_model->fetchCategories();\n\n $category_options = array();\n $category_options[\"\"] = \"-- Select category --\";\n foreach ($categories as $item) {\n $category_options[$item['categoryId']] = $item['categoryName'];\n }\n return $category_options;\n }", "public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public function getCategories(){\n\t\t$stmt = $this->db->query(\"SELECT * FROM products_categories WHERE clientId = '{$this->clientId}'\");\n\t\treturn $stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function GetCategories()\n {\n \n \n global $PAGE;\n $output = '';\n \n \n if ($this->Is_Instructor) {\n $type = \" AND `type_instructor`=1\";\n } else {\n $type = \" AND `type_customer`=1\";\n }\n \n \n # GET THE CURRENTLY SELECTED CATEGORY\n # ============================================================================\n $default_selected_cid = ($this->Use_Common_Category) ? $this->Common_Category_Id : $this->Default_Category_Id;\n $eq_cat = (Get('eq')) ? GetEncryptQuery(Get('eq'), false) : null;\n $selected_cid = (isset($eq_cat['cid'])) ? $eq_cat['cid'] : $default_selected_cid;\n \n if ($this->Use_Common_Category) {\n $selected_common = (isset($eq_cat['special']) && $eq_cat['special'] == 'common') ? true : false;\n $selected_common = ($selected_cid == $this->Common_Category_Id) ? true : $selected_common;\n } else {\n $selected_common = ($selected_cid == $this->Common_Category_Id) ? true : false;\n }\n \n if ($this->Use_Display_All_Category) {\n $selected_all = (isset($eq_cat['special']) && $eq_cat['special'] == 'all') ? true : false;\n $selected_all = ($selected_cid == $this->All_Category_Id) ? true : $selected_all;\n }\n //$selected_all = true;\n \n \n # GET ALL THE CATEGORIES\n # ============================================================================\n $records = $this->SQL->GetArrayAll(array(\n 'table' => $GLOBALS['TABLE_helpcenter_categories'],\n 'keys' => '*',\n 'where' => \"`active`=1 $type\",\n ));\n if ($this->Show_Query) echo \"<br />LAST QUERY = \" . $this->SQL->Db_Last_Query;\n \n \n \n # OUTPUT THE CATEGORIES MENU\n # ============================================================================\n $output .= '<div class=\"orange left_header\">HELP CENTER TOPICS</div><br />';\n $output .= '<div class=\"left_content\">';\n \n # OUTPUT COMMON CATEGORY\n if ($this->Use_Common_Category) {\n $eq = EncryptQuery(\"cat=Most Common;cid=0;special=common\");\n $link = \"{$PAGE['pagelink']};eq=$eq\";\n $class = ($selected_common) ? 'faq_selected_category' : '';\n $output .= \"<div class='$class'><a href='{$link}' class='link_arrow' >Most Common</a></div><br />\";\n }\n \n # OUTPUT ALL DATABASE CATEGORIES\n foreach ($records as $record) {\n \n # MAKE LINKS\n if ($this->Use_Seo_Urls) {\n $title = ProcessStringForSeoUrl($record['title']);\n $query_link = '/' . EncryptQuery(\"cid={$record['helpcenter_categories_id']}\");\n $link = \"{$PAGE['pagelink']}/{$title}\" . $query_link;\n } else {\n $eq = EncryptQuery(\"cat={$record['title']};cid={$record['helpcenter_categories_id']}\");\n $link = \"{$PAGE['pagelink']};eq=$eq\";\n }\n \n $class = ($record['helpcenter_categories_id'] == $selected_cid) ? 'faq_selected_category' : '';\n $output .= \"<div class='$class'><a href='{$link}' class='link_arrow' >{$record['title']}</a></div>\";\n }\n \n # OUTPUT DISPLAY ALL CATEGORY\n if ($this->Use_Display_All_Category) {\n \n # MAKE LINKS\n if ($this->Use_Seo_Urls) {\n $title = ProcessStringForSeoUrl('View All');\n $query_link = '/' . EncryptQuery(\"cid={$this->All_Category_Id}\");\n $link = \"{$PAGE['pagelink']}/{$title}\" . $query_link;\n } else {\n $eq = EncryptQuery(\"cat=View All;cid={$this->All_Category_Id};special=all\");\n $link = \"{$PAGE['pagelink']};eq=$eq\";\n }\n \n $class = ($selected_all) ? 'faq_selected_category' : '';\n $output .= \"<br /><div class='$class'><a href='{$link}' class='link_arrow' >View All</a></div>\";\n }\n \n $output .= '</div>';\n \n \n AddStyle(\"\n .faq_selected_category {\n background-color:#F2935B;\n color:#fff;\n }\n \");\n \n return $output;\n \n\n }", "public function getCategories()\n {\n return $this->request(\"core_course_get_categories\");\n }", "public function getCategories();", "public function getCategories();", "public function getCategories() : array;", "public function getCategories(){\n $sql = \"SELECT DISTINCT cat.id, cat.name, cat.idnumber FROM {$this->table_prefix}course_categories cat\n INNER JOIN {$this->table_prefix}course c ON cat.id = c.category\";\n $result = $this->conn->query($sql);\n $categories;\n if($result->num_rows > 0){\n while($row = $result->fetch_assoc()){\n $categories[] = $row;\n }\n return array(\"erro\" => false, \"description\" => \"Categories found\", \"categories\" => $categories);\n }else{\n return array(\"erro\" => false, \"description\" => \"No categories with course found\", \"categories\" => $categories);\n }\n }", "function getAllCategories() {\n\t\t$url = $this->apiURL . \"categories/\" . $this->yourID . \"/\" . $this->yourAPIKey;\n\t\treturn $this->_curl_get($url);\n\t}", "public function getAllCategories();", "public function listCategories(){\n\t\t$lab = new lelabDB();\n\t\t$query = \"select * from $this->tableName order by id\";\n\t\t$result = $lab->getArray($query);\n\t\treturn $result;\n\t}", "public function categories($params)\r\n {\r\n \t$_query = array('page' => isset($params['page']) ? $params['page'] : 1);\r\n\r\n return $this->curl_execute($method = 'categories', $_query);\r\n }", "public static function getCategoriesArray() {\n global $lC_CategoryTree;\n \n $result = lC_Products_Admin::getCategoriesArray($_GET['cid']);\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n\n echo json_encode($result);\n }", "public function getCategory() {\n $productModel = new productModel();\n $categories = $productModel->getCategoryList();\n $this->JsonCall($categories);\n }", "public function getCategories()\n\t{\n\t\t$categoryId = $this->input->get_post('category_id');\n\t\ttry{\n\t\t\t\t$category = $this->userModel->getCategory();\n\t\t\t\t$this->_jsonData['status']=\"SUCCESS\";\n\t\t\t\t$this->_jsonData['message']=\"Categories Data\";\n\t\t\t\t$this->_jsonData['data']=$category;\n\t\t}catch(Exception $e){\n\t\t\t\t$this->_jsonData['status']=\"FAILURE\";\n\t\t\t\t$this->_jsonData['message']=\"Error Occured\";\n\t\t\t\t$this->_jsonData['data']='';\n\t\t}\n\t\t\techo json_encode($this->_jsonData);\n\t\t\t$this->ServicesModel->createService($_REQUEST,$this->_jsonData,$_SERVER['SERVER_ADDR'],'getCategories',$_FILES);\n\t}", "function getAllCategories()\n {\n return $this->data->getAllCategories();\n }", "function get_categories_by_channel()\n\t{\n\t\t// get variables\n\t\t$vars = $this->_get_vars('get', array('channel_id'), array(\n\t\t\t'select' => array(),\n\t\t\t'where' => array(),\n\t\t\t'order_by' => 'cat_order',\n\t\t\t'sort' => 'asc',\n\t\t\t'limit' => FALSE,\n\t\t\t'offset' => 0\n\t\t));\n\n\t\t// prepare variables for sql\n\t\t$vars = $this->_prepare_sql($vars);\n\t\t\n\t\t// start hook\n\t\t$vars = $this->_hook('get_categories_by_channel_start', $vars);\n\n\t\t// load channel data library\n\t\t$this->_load_library('channel_data');\n\n\t\t$data = $this->EE->channel_data_lib->get_channel_categories($vars['channel_id'], $vars['select'], $vars['where'], $vars['order_by'], $vars['sort'], $vars['limit'], $vars['offset'])->result();\n\n\t\t// end hook\n\t\t$data = $this->_hook('get_categories_by_channel_end', $data);\n\n\t\t$this->response($data);\n\t}", "function getCategories($monographId, $pressId = null) {\n\t\t$params = array((int) $monographId);\n\t\tif ($pressId) $params[] = (int) $pressId;\n\n\t\t$categoryDao = DAORegistry::getDAO('CategoryDAO');\n\t\t$result = $this->retrieve(\n\t\t\t'SELECT\tc.*\n\t\t\tFROM\tcategories c,\n\t\t\t\tsubmission_categories sc,\n\t\t\t\tsubmissions s\n\t\t\tWHERE\tc.category_id = sc.category_id AND\n\t\t\t\ts.submission_id = ? AND\n\t\t\t' . ($pressId?' c.press_id = s.context_id AND s.context_id = ? AND':'') . '\n\t\t\t\ts.submission_id = sc.submission_id',\n\t\t\t$params\n\t\t);\n\n\t\t// Delegate category creation to the category DAO.\n\t\treturn new DAOResultFactory($result, $categoryDao, '_fromRow');\n\t}", "public function get_categories()\n {\n $param = array(\n 'delete_flg' => $this->config->item('not_deleted','common_config')\n );\n $groups = $this->get_tag_group();\n\n if (empty($groups)) return array();\n\n $group_id = array_column($groups, 'tag_group_id');\n $param = array_merge($param, array('group_id' => $group_id));\n\n $tags = $this->Logic_tag->get_list($param);\n\n return $this->_generate_categories_param($groups, $tags);\n }", "public function GetCategories() {\n // Setup the Query\n $this->sql = \"SELECT *\n FROM categories\";\n \n // Run the query \n $this->RunBasicQuery();\n }", "private function getCategories() {\r\n $data['categories'] = array();\r\n\r\n $this->load->model('catalog/category');\r\n\r\n $categories_1 = $this->model_catalog_category->getCategories(0);\r\n\r\n foreach ($categories_1 as $category_1) {\r\n $level_2_data = array();\r\n\r\n $categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']);\r\n\r\n foreach ($categories_2 as $category_2) {\r\n $level_3_data = array();\r\n\r\n $categories_3 = $this->model_catalog_category->getCategories($category_2['category_id']);\r\n\r\n foreach ($categories_3 as $category_3) {\r\n $level_3_data[] = array(\r\n 'category_id' => $category_3['category_id'],\r\n 'name' => $category_3['name'],\r\n );\r\n }\r\n\r\n $level_2_data[] = array(\r\n 'category_id' => $category_2['category_id'],\r\n 'name' => $category_2['name'],\r\n 'children' => $level_3_data\r\n );\r\n }\r\n\r\n $data['categories'][] = array(\r\n 'category_id' => $category_1['category_id'],\r\n 'name' => $category_1['name'],\r\n 'children' => $level_2_data\r\n );\r\n }\r\n return $data['categories'];\r\n }", "public function getCategoryList()\n {\n// return $this->categoryList = DB::table('categories')->get();\n return $this->categoryList = Categories::all();\n }", "public function get_category_list()\n\t{\n\t\t$result = $this->db->from(\"category\")->where(array(\"category_status\" => 1,\"main_category_id\"=>0))->orderby(\"category_name\",\"ASC\")->get();\n\t\treturn $result;\n\t}", "public function get_categories() {\n global $DB;\n $categories = array();\n $results = $DB->get_records('course_categories', array('parent' => '0', 'visible' => '1', 'depth' => '1'));\n if (!empty($results)) {\n foreach ($results as $value) {\n $categories[$value->id] = $value->name;\n }\n }\n return $categories;\n }", "public static function getCategoryListing() {\n global $lC_Database, $lC_Language, $lC_Products, $lC_CategoryTree, $lC_Vqmod, $cPath, $cPath_array, $current_category_id;\n \n include_once($lC_Vqmod->modCheck('includes/classes/products.php'));\n \n if (isset($cPath) && strpos($cPath, '_')) {\n // check to see if there are deeper categories within the current category\n $category_links = array_reverse($cPath_array);\n for($i=0, $n=sizeof($category_links); $i<$n; $i++) {\n $Qcategories = $lC_Database->query('select count(*) as total from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $category_links[$i]);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n\n if ($Qcategories->valueInt('total') < 1) {\n // do nothing, go through the loop\n } else {\n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $category_links[$i]);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n break; // we've found the deepest category the customer is in\n }\n }\n } else {\n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.categories_mode, c.categories_link_target, c.categories_custom_url from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id and c.categories_status = 1 order by sort_order, cd.categories_name');\n $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);\n $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);\n $Qcategories->bindInt(':parent_id', $current_category_id);\n $Qcategories->bindInt(':language_id', $lC_Language->getID());\n $Qcategories->execute();\n }\n $number_of_categories = $Qcategories->numberOfRows();\n $rows = 0;\n $output = '';\n while ($Qcategories->next()) {\n $rows++;\n $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';\n $exists = ($Qcategories->value('categories_image') != null) ? true : false;\n $output .= ' <td style=\"text-align:center;\" class=\"categoryListing\" width=\"' . $width . '\" valign=\"top\">';\n if ($Qcategories->value('categories_custom_url') != '') {\n $output .= lc_link_object(lc_href_link($Qcategories->value('categories_custom_url'), ''), ( ($exists === true) ? lc_image(DIR_WS_IMAGES . 'categories/' . $Qcategories->value('categories_image'), $Qcategories->value('categories_name')) : lc_image(DIR_WS_TEMPLATE_IMAGES . 'no-image.png', $lC_Language->get('image_not_found')) ) . '<br />' . $Qcategories->value('categories_name'), (($Qcategories->value('categories_link_target') == 1) ? 'target=\"_blank\"' : null));\n } else {\n $output .= lc_link_object(lc_href_link(FILENAME_DEFAULT, 'cPath=' . $lC_CategoryTree->buildBreadcrumb($Qcategories->valueInt('categories_id'))), ( ($exists === true) ? lc_image(DIR_WS_IMAGES . 'categories/' . $Qcategories->value('categories_image'), $Qcategories->value('categories_name')) : lc_image(DIR_WS_TEMPLATE_IMAGES . 'no_image.png', $lC_Language->get('image_not_found')) ) . '<br />' . $Qcategories->value('categories_name'), (($Qcategories->value('categories_link_target') == 1) ? 'target=\"_blank\"' : null));\n }\n $output .= '</td>' . \"\\n\";\n if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {\n $output .= ' </tr>' . \"\\n\";\n $output .= ' <tr>' . \"\\n\";\n } \n } \n \n return $output;\n }", "public function get_categories() {\n\t\treturn [ 'basic' ];\n\t}", "public static function getCategoryList()\n {\n\n $db = Db::getConnection();\n\n $serviceList = array();\n\n $result = $db->query('SELECT id, name FROM categories '\n . 'ORDER BY id ASC');\n\n $i = 0;\n while ($row = $result->fetch()) {\n $serviceList[$i]['id'] = $row['id'];\n $serviceList[$i]['name'] = $row['name'];\n $i++;\n }\n\n return $serviceList;\n\n }" ]
[ "0.7023594", "0.70183516", "0.6910598", "0.68797314", "0.68406343", "0.6793022", "0.6789604", "0.67532563", "0.67532563", "0.6706946", "0.6667311", "0.6618062", "0.65233845", "0.65219927", "0.6498289", "0.6494239", "0.6490908", "0.64651865", "0.64576906", "0.64351", "0.6410043", "0.6395635", "0.6390726", "0.6385881", "0.63846934", "0.63774383", "0.6372089", "0.6349574", "0.63472027", "0.63240504" ]
0.7539736
0
/ get_builds Get A List of Builds For An Existing Test Plan Usage TestPlan.get_builds Parameters ParameterData TypeComments plan_idinteger Result Array [0] Array [build_id] [product_id] [name] [milestone] [isactive] [description] [1] Array ...
function TestPlan_get_builds($plan_id) { // Create call $call = new xmlrpcmsg('TestPlan.get_builds', array(new xmlrpcval($plan_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBuilds()\n {\n return $this->builds;\n }", "private function apiGetBuild($data)\n {\n $output = array();\n for($i=0; $i<count($data); $i++){\n $output = array(\n\n );\n }\n\n return $output;\n }", "function rest_get()\n{\n global $build;\n $response = array();\n\n // Are we looking for what went wrong with this build?\n if (isset($_GET['getproblems'])) {\n $response['hasErrors'] = false;\n $response['hasFailingTests'] = false;\n\n // Lookup some details about this build.\n $buildtype = $build->Type;\n $buildname = $build->Name;\n $siteid = $build->SiteId;\n $starttime = $build->StartTime;\n $projectid = $build->ProjectId;\n\n // Check if this build has errors.\n $buildHasErrors = $build->BuildErrorCount > 0;\n if ($buildHasErrors) {\n $response['hasErrors'] = true;\n // Find the last occurrence of this build that had no errors.\n $no_errors_result = pdo_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime' AND parentid<1 AND builderrors<1\n ORDER BY starttime DESC LIMIT 1\");\n\n if (pdo_num_rows($no_errors_result) > 0) {\n $no_errors_row = pdo_fetch_array($no_errors_result);\n $gmtdate = strtotime($no_errors_row['starttime'] . ' UTC');\n } else {\n // Find the first build\n $firstbuild = pdo_single_row_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime'\n ORDER BY starttime ASC LIMIT 1\");\n $gmtdate = strtotime($firstbuild['starttime'] . ' UTC');\n }\n $response['daysWithErrors'] =\n round((strtotime($starttime) - $gmtdate) / (3600 * 24));\n $response['failingSince'] = date(FMT_DATETIMETZ, $gmtdate);\n $response['failingDate'] = substr($response['failingSince'], 0, 10);\n }\n\n // Check if this build has failed tests.\n $buildHasFailingTests = $build->TestFailedCount > 0;\n if ($buildHasFailingTests) {\n $response['hasFailingTests'] = true;\n // Find the last occurrence of this build that had no test failures.\n $no_fails_result = pdo_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime' AND parentid<1 AND testfailed<1\n ORDER BY starttime DESC LIMIT 1\");\n\n if (pdo_num_rows($no_fails_result) > 0) {\n $no_fails_row = pdo_fetch_array($no_fails_result);\n $gmtdate = strtotime($no_fails_row['starttime'] . ' UTC');\n } else {\n // Find the first build\n $firstbuild = pdo_single_row_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime' AND parentid<1\n ORDER BY starttime ASC LIMIT 1\");\n $gmtdate = strtotime($firstbuild['starttime'] . ' UTC');\n }\n $response['daysWithFailingTests'] =\n round((strtotime($starttime) - $gmtdate) / (3600 * 24));\n $response['testsFailingSince'] = date(FMT_DATETIMETZ, $gmtdate);\n $response['testsFailingDate'] =\n substr($response['testsFailingSince'], 0, 10);\n }\n echo json_encode(cast_data_for_JSON($response));\n }\n}", "private function getList()\n\t{\n\t\t// Get the correct billboards collection to display from the parameters\n\t\t$collection = (int) $this->params->get('collection', 1);\n\n\t\t// Grab all the buildboards associated with the selected collection\n\t\t// Make sure we only grab published billboards\n\t\t$rows = Billboard::whereEquals('published', 1)\n\t\t ->whereEquals('collection_id', $collection)\n\t\t ->order('ordering', 'asc')\n\t\t ->rows();\n\n\t\treturn $rows;\n\t}", "public function getBuildings(){\n $buildings = Edificiosauditorios::getAll();\n //$auditorio = Auditorios::getID_AUDIENCE($inuId);\n if (!empty($buildings) || is_array($buildings)) {\n print json_encode($buildings);\n \n } else {\n print json_encode($buildings->toArray());\n }\n }", "public function getAllBuildings() {\n\t\t$query = $this->db->select('\n\t\t\tBuildingName,\n\t\t\tBuildingAbbr\n\t\t')->\n\t\tfrom('Building')\n\t\t->get();\n\n\t\treturn $query->result_array();\n\t}", "function getBuildingList() {\n return getAll(\"SELECT * FROM building\");\n}", "function Build_get($build_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.get', array(new xmlrpcval($build_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function builds($project_id, $scope = null)\n {\n return $this->get($this->getProjectPath($project_id, 'builds'), array(\n 'scope' => $scope\n ));\n }", "function Buildings_get() {\n\n $model = M('Buildings');\n if ($id = $this->_get('id')) {\n $data = $model->find($id);\n if ($data) {\n $this->response($data);\n } else {\n //NOT FOUND\n $this->response(NULL, NULL, 404);\n }\n }\n else if($name=$this->_get('name')){\n $data = $model->where(array(\"name\"=>$name))->select();\n if($data){\n $this->response($data);\n }else{\n $this->response(NULL,NULL,404);\n }\n }\n else {\n $data = $model->select();\n $this->response($data);\n }\n }", "public function getBuildData($deviceName) {\r\n return $this->con->query(\"SELECT * FROM build WHERE device='\" . $deviceName . \"' ORDER BY dt_added DESC LIMIT 3\");\r\n }", "public static function get_build()\n {\n }", "private function getProjects() {\r\n if (!$this->requestParameters['fields']) {\r\n $this->db->select('lpc.landingpage_collectionid, lpc.testtype, lpc.name, lpc.config, lpc.creation_date, lpc.start_date, ' .\r\n ' lpc.end_date, lpc.restart_date, lpc.status, lpc.progress, lpc.autopilot, lpc.allocation, lpc.last_sample_date, lpc.sample_time, ' .\r\n ' lpc.personalization_mode, lpc.smartmessage, lpc.ignore_ip_blacklist, lpc.device_type, lp.rule_id, ' .\r\n ' lp.originalid, lp.lp_url, lp.canonical_url, stat.impressions, stat.conversions, stat.cr ');\r\n } else {\r\n $this->requestParameters['fields'] = rtrim($this->requestParameters['fields'], ',');\r\n }\r\n\r\n $lp = \"(SELECT landingpage_collectionid, landing_pageid AS originalid, lp_url, canonical_url, rule_id, allocation \" .\r\n \" FROM landing_page WHERE pagetype = 1 AND page_groupid = -1 \" .\r\n \" GROUP BY landingpage_collectionid ORDER BY landing_pageid ASC ) lp \";\r\n\r\n $stat = \"(SELECT landingpage_collectionid, SUM(impressions) AS impressions, \" .\r\n \" SUM(conversions) AS conversions, CAST(AVG(cr) AS DECIMAL(8,6)) AS cr \" .\r\n \" FROM landing_page GROUP BY landingpage_collectionid) stat \";\r\n\r\n $this->db->from('landingpage_collection lpc')\r\n ->join($lp, 'lp.landingpage_collectionid = lpc.landingpage_collectionid', 'INNER')\r\n ->join($stat, 'stat.landingpage_collectionid = lpc.landingpage_collectionid', 'INNER');\r\n\r\n if ($this->usertype == 'api-tenant') {\r\n $this->db->join('api_client ac', 'ac.clientid = lpc.clientid', 'INNER')\r\n ->where('lpc.clientid', $this->account)\r\n ->where('(ac.api_tenant = ' . $this->apiclientid . ' OR ac.api_clientid = ' . $this->apiclientid . ')');\r\n } else {\r\n $this->db->where('lpc.clientid', $this->clientid);\r\n }\r\n\r\n parent::addParametersToQuery();\r\n\r\n $validtypes = array(OPT_TESTTYPE_SPLIT, OPT_TESTTYPE_VISUALAB, OPT_TESTTYPE_TEASER, OPT_TESTTYPE_MULTIPAGE);\r\n $query = $this->db->where_in('testtype', $validtypes)\r\n ->group_by('lpc.landingpage_collectionid')\r\n ->get();\r\n\r\n $res = array();\r\n foreach ($query->result() as $q) {\r\n $r = self::returnPojectFields($q, FALSE);\r\n $res[] = $r;\r\n }\r\n return $this->successResponse(200, $res);\r\n }", "public function get_jamf_buildings()\n {\n $obj = new View();\n $jamf = new Jamf_model;\n $obj->view('json', array('msg' => $jamf->get_jamf_buildings()));\n }", "protected function betaTestersBuildsGetToManyRelatedRequest($id, $fields_builds = null, $limit = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling betaTestersBuildsGetToManyRelated'\n );\n }\n if ($limit !== null && $limit > 200) {\n throw new \\InvalidArgumentException('invalid value for \"$limit\" when calling BetaTestersApi.betaTestersBuildsGetToManyRelated, must be smaller than or equal to 200.');\n }\n\n\n $resourcePath = '/v1/betaTesters/{id}/builds';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($fields_builds)) {\n $fields_builds = ObjectSerializer::serializeCollection($fields_builds, 'csv', true);\n }\n if ($fields_builds !== null) {\n $queryParams['fields[builds]'] = ObjectSerializer::toQueryValue($fields_builds);\n }\n // query params\n if ($limit !== null) {\n $queryParams['limit'] = ObjectSerializer::toQueryValue($limit);\n }\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires Bearer (JWT) authentication (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function build($project_id, $build_id)\n {\n return $this->get($this->getProjectPath($project_id, 'builds/'.$this->encodePath($build_id)));\n }", "public static function getShopBuildingList()\n {\n\t\t$key = 'BuildingList';\n\t\t$cache = Hapyfish_Cache_Memcached::getInstance();\n\t\t$list = $cache->get($key);\n\t\tif ($list === false) {\n\t\t\t//load from database\n\t\t\t$db = Hapyfish_Island_Dal_Shop::getDefaultInstance();\n\t\t\t$list = $db->getBuildingList();\n\t\t\tif ($list) {\n\t\t\t\t$cache->add($key, $list, Hapyfish_Cache_Memcached::LIFE_TIME_ONE_MONTH);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $list;\n }", "private function buildBuildHistory()\n {\n foreach ($this->xml->entry as $entry) {\n $infos = $this->extractBuildInfos((string) $entry->title);\n $uri = (string) $entry->link['href'];\n $date = (string) $entry->published;\n\n $build = new Build($infos['number'], $infos['status'], $uri, $date, $this->isBuildSuccessfull($infos['status']));\n\n $this->builds[] = $build;\n }\n }", "public function findBuildingDetails($id){\n\t\t$details = array();\n\t\t\n\t\t$details['building'] = $this->db->q(\"select building.name as building_name, user.name as user_name, user.id as user_id, building.id as building_id, building.*, user.* from Building building join User user on building.fk_user = user.id where building.id = \".$id);\n\t\t$details['comments'] = $this->db->q(\"select comment.*, user.name as user_name, user.id as user_id from Comment comment join User user on comment.fk_user = user.id where fk_building = \".$id.\" order by id desc\");\n\t\t$details['ratings'] = $this->db->q(\"select rating.* from Rating rating where fk_building = \". $id);\n\t\t$details['media'] = $this->db->q(\"select media.* from Media media where fk_building = \". $id);\n\t\t\n\t\treturn $details;\n\t\t\n\t}", "public function get_plans() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n // extract passed parameters from jtable\n $query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);\n parse_str($query, $params);\n \n\n // count all records query\n $q = \"SELECT COUNT(*) as count\n FROM plans AS p inner join\n users as u on p.modified_by=u.user_id\n inner JOIN contacts AS c ON u.user_id=c.user_id\n and c.modified_date = (select max(modified_date) from\n contacts as c where c.user_id=p.modified_by)\n \";\n // run query\n $count = DB::instance(DB_NAME)->select_row($q);\n $order = isset($params['jtSorting']) ? $params['jtSorting'] : 'plan_id DESC';\n \n # Set up query\n $q = \"SELECT\n p.plan_id, p.description,p.time,p.public, c.first_name, c.last_name, p.modified_date, p.show\n FROM plans AS p inner join\n users as u on p.modified_by=u.user_id\n inner JOIN contacts AS c ON u.user_id=c.user_id\n and c.modified_date = (select max(modified_date) from\n contacts as c where c.user_id=p.modified_by)\n ORDER BY {$order} \n LIMIT {$params['jtStartIndex']}, {$params['jtPageSize']}\n \";\n \n # Run query\n $plans = DB::instance(DB_NAME)->select_rows($q);\n $items = array();\n $i = 0;\n foreach($plans as $plan) {\n $items[] = array(\n \"plan_id\" => $plan[\"plan_id\"],\n \"modified_date\" => Time::display($plan['modified_date'],'Y-m-d H:m:s'),\n \"first_name\" => $plan[\"first_name\"],\n \"last_name\" => $plan[\"last_name\"],\n \"public\" => $plan[\"public\"],\n \"show\" => $plan[\"show\"],\n \"description\" => $plan[\"description\"],\n \"time\" => $plan[\"time\"]\n );\n }\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n $jTableResult['TotalRecordCount'] = $count['count'];\n $jTableResult['Records'] = $items;\n print json_encode($jTableResult);\n }", "public static function marshal($data, $buildid, $projectid, $projectshowtesttime, $testtimemaxstatus, $testdate): array\n {\n require_once 'include/common.php';\n $marshaledStatus = self::marshalStatus($data['status']);\n if ($data['details'] === 'Disabled') {\n $marshaledStatus = array('Not Run', 'disabled-test');\n }\n $marshaledData = [\n 'id' => $data['id'],\n 'buildid' => $buildid,\n 'buildtestid' => $data['buildtestid'],\n 'status' => $marshaledStatus[0],\n 'statusclass' => $marshaledStatus[1],\n 'name' => $data['name'],\n 'execTime' => time_difference($data['time'], true, '', true),\n 'execTimeFull' => floatval($data['time']),\n 'details' => $data['details'],\n 'summaryLink' => \"testSummary.php?project=$projectid&name=\" . urlencode($data['name']) . \"&date=$testdate\",\n 'summary' => 'Summary', /* Default value later replaced by AJAX */\n 'detailsLink' => \"test/{$data['buildtestid']}\"\n ];\n\n if ($data['newstatus']) {\n $marshaledData['new'] = '1';\n }\n\n if ($projectshowtesttime && array_key_exists('timestatus', $data)) {\n if ($data['timestatus'] == 0) {\n $marshaledData['timestatus'] = 'Passed';\n $marshaledData['timestatusclass'] = 'normal';\n } elseif ($data['timestatus'] < $testtimemaxstatus) {\n $marshaledData['timestatus'] = 'Warning';\n $marshaledData['timestatusclass'] = 'warning';\n } else {\n $marshaledData['timestatus'] = 'Failed';\n $marshaledData['timestatusclass'] = 'error';\n }\n }\n\n if (config('database.default') == 'pgsql' && $marshaledData['id']) {\n $buildtest = BuildTest::where('id', '=', $data['buildtestid'])->first();\n if ($buildtest) {\n $marshaledData['labels'] = $buildtest->getLabels()->keys()->all();\n }\n } else {\n if (!empty($data['labels'])) {\n $labels = explode(',', $data['labels']);\n $marshaledData['labels'] = $labels;\n }\n }\n\n if (isset($data['subprojectid'])) {\n $marshaledData['subprojectid'] = $data['subprojectid'];\n }\n\n if (isset($data['subprojectname'])) {\n $marshaledData['subprojectname'] = $data['subprojectname'];\n }\n\n return $marshaledData;\n }", "public function GetProjectContent($params)\n {\n $pjtId = $this->db->real_escape_string($params['pjtId']);\n $verId = $this->db->real_escape_string($params['verId']);\n\n /* $qry = \"SELECT * \n FROM ctt_projects_content AS pc\n INNER JOIN ctt_version AS vr ON vr.ver_id = pc.ver_id\n INNER JOIN ctt_projects AS pj ON pj.pjt_id = vr.pjt_id\n INNER JOIN ctt_products AS pd ON pd.prd_id = pc.prd_id\n WHERE pc.ver_id = $verId;\"; */\n\n $qry = \"SELECT * \n FROM ctt_projects_content AS pc\n INNER JOIN ctt_version AS vr ON vr.ver_id = pc.ver_id\n INNER JOIN ctt_projects AS pj ON pj.pjt_id = vr.pjt_id\n INNER JOIN ctt_products AS pd ON pd.prd_id = pc.prd_id\n WHERE pc.ver_id = $verId;\";\n return $this->db->query($qry);\n }", "public function getSelectedBuild($data) {\n\t\tif (isset($data['SelectRelease']) && !empty($data[$data['SelectRelease']])) {\n\t\t\t// Filter out the tag/branch name if required\n\t\t\t$array = explode('-', $data[$data['SelectRelease']]);\n\t\t\treturn reset($array);\n\t\t}\n\t\tif (isset($data['FilteredCommits']) && !empty($data['FilteredCommits'])) {\n\t\t\treturn $data['FilteredCommits'];\n\t\t}\n\t}", "public function fetch()\n {\n return response()->json(Building::getAllBuildings());\n }", "public function build() {\n return array();\n }", "function get($params = array('os' => 'any', 'arch' => 'any',\n 'submissiontype' => 'any', 'packagetype' => 'any',\n 'slicer_revision' => 'any', 'revision' => 'any',\n 'productname' => 'any', 'codebase' => 'any',\n 'release' => 'any'))\n {\n $sql = $this->database->select();\n foreach(array('os', 'arch', 'submissiontype', 'packagetype', 'revision', 'slicer_revision', 'productname', 'codebase', 'release') as $option)\n {\n if(array_key_exists($option, $params) && $params[$option] != 'any')\n {\n $sql->where('slicerpackages_extension.'.$option.' = ?', $params[$option]);\n }\n }\n if(array_key_exists('order', $params))\n {\n $direction = array_key_exists('direction', $params) ? strtoupper($params['direction']) : 'ASC';\n $sql->order($params['order'].' '.$direction);\n }\n if(array_key_exists('limit', $params) && is_numeric($params['limit']) && $params['limit'] > 0)\n {\n $sql->limit($params['limit']);\n }\n $rowset = $this->database->fetchAll($sql);\n $rowsetAnalysed = array();\n foreach($rowset as $keyRow => $row)\n {\n $tmpDao = $this->initDao('Extension', $row, 'slicerpackages');\n $rowsetAnalysed[] = $tmpDao;\n }\n return $rowsetAnalysed;\n }", "public function get_plans()\n {\n //\n\n \n $user_id = Auth::user()->id;\n\n $listing_code = Session::get('listing_code');\n\n\n $listing = Listing::where('listing_code', $listing_code)->where('agent_id', $user_id)->first();\n\n try {\n //code...\n\n $floor_plans = ListingFloorPLan::where('listing_id', $listing->id)->latest()->get();\n\n } catch (\\Throwable $th) {\n //throw $th;\n\n return $th;\n }\n\n \n\n\n\n return $floor_plans;\n }", "protected function build($data)\n {\n return $this->manager->createData($data)->toArray();\n }", "public function getBuildingsWithBudgets()\n {\n $buildings_budgets = $this->find('all', [\n 'contain' => ['Budgets' =>\n function ($q) {\n return $q\n ->select(['id', 'building_id']);\n }],\n 'conditions' => ['Buildings.softland_id IS NOT NULL', 'Buildings.omit' => false]\n ]);\n $buildingsWithBudget = array();\n foreach ($buildings_budgets as $buildings_budget) {\n if (!empty($buildings_budget['budget'])) {\n $buildingsWithBudget[$buildings_budget['softland_id']]['budget_id'] = $buildings_budget['budget']['id'];\n $buildingsWithBudget[$buildings_budget['softland_id']]['active'] = $buildings_budget['active'];\n }\n }\n return $buildingsWithBudget;\n }", "public function index()\n {\n\n return view('admin.builds.index', ['types' => TypeBuild::all()]);\n }" ]
[ "0.6970138", "0.6321939", "0.60619986", "0.5916022", "0.580895", "0.54925334", "0.54792744", "0.54359037", "0.54095626", "0.54090226", "0.53863144", "0.53846043", "0.53477234", "0.5313178", "0.528326", "0.5213525", "0.51795745", "0.51718163", "0.5078645", "0.506695", "0.5052793", "0.50215334", "0.50136054", "0.49893633", "0.4989164", "0.49839553", "0.49780804", "0.49710342", "0.49498966", "0.49158192" ]
0.75121933
0
/ get_components Get A List of Components For An Existing Test Plan Usage TestPlan.get_components Parameters ParameterData TypeComments plan_idinteger Result Array [0] Array [initialowner] [disallownew] [product_id] [name] [id] [description] [initialqacontact] [1] Array ...
function TestPlan_get_components($plan_id) { // Create call $call = new xmlrpcmsg('TestPlan.get_components', array(new xmlrpcval($plan_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getComponents()\n {\n return $this->result->getComponents();\n }", "function TestCase_get_components($case_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.get_components', array(new xmlrpcval($case_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "abstract protected function getResultComponents();", "public function compoList(){\n\t\t\n\t\t/*Load all components data from the status page via the curl req function in this class */\n\t\t\n\t\t$req = $this -> curl_req(\"GET\", \"api/v1/components\"); \n\t\t\n\t\t/* Check if the transaction was successfull and pass the data else return false */\n\t\t\n\t\treturn ($req[1]['http_code'] === 200) ? $req[0] : false;\t\t\n\t}", "function getPlanComponents($conn, $planID){\n\t$sql = \"SELECT * FROM plancomponent WHERE planId = :planID\";\n\t\n\t$sth = $conn->prepare($sql);\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t$sth->execute();\n\t\n\t$rows = array();\n\t\n\twhile($r = $sth->fetch(PDO::FETCH_ASSOC)) {\n\t\t$rows[] = $r;\n\t}\n\treturn $rows;\n}", "public function getComponents();", "public function getComponents();", "public function components() {\r\n\t\t$components = new Dbi_Model_QueryComponents();\r\n\t\t$components->table = $this->name();\r\n\t\t$components->where = $this->_wheres;\r\n\t\t$components->fields = $this->_fields;\r\n\t\t$components->subqueries = $this->_subqueries;\r\n\t\t$components->innerJoins = $this->_innerJoins;\r\n\t\t$components->leftJoins = $this->_leftJoins;\r\n\t\t$components->rightJoins = $this->_rightJoins;\r\n\t\t$components->orders = $this->_orders;\r\n\t\t$components->limit = $this->_limit;\r\n\t\t$components->groups = $this->_group;\r\n\t\t$components->having = $this->_haves;\r\n\t\t$components->calculated = $this->_calculated;\r\n\t\treturn $components;\r\n\t}", "public function getComponents()\n {\n $this->parseResponse();\n\n return $this->components;\n }", "public function testComponentReturnsComponentArray() {\n $node = self::nodeStub();\n $webform = new Webform($node);\n $component = $webform->component(6);\n $this->assertEqual('email_subject', $component['form_key']);\n }", "public static function getAllComponents()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true)\n\t\t\t->select('element')\n\t\t\t->from('#__extensions')\n\t\t\t->where('type = ' . $db->quote('component'))\n\t\t\t->where('enabled = 1');\n\t\t$db->setQuery($query);\n\t\t$result = $db->loadColumn();\n\n\t\treturn $result;\n\t}", "function components_list()\n\t{\n\t\t$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Manage Components' );\n\t\t$this->ipsclass->admin->page_title = \"Components Manager\";\n\t\t$this->ipsclass->admin->page_detail = \"This section will allow you to manage your components.\";\n\n\t\t//-------------------------------\n\t\t// INIT\n\t\t//-------------------------------\n\n\t\t$content = \"\";\n\t\t$seen_count = 0;\n\t\t$total_items = 0;\n\t\t$rows = array();\n\n\t\t//-------------------------------\n\t\t// Get components\n\t\t//-------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'order' => 'com_position ASC' ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$total_items++;\n\t\t\t$rows[] = $r;\n\t\t}\n\n\t\tforeach( $rows as $r )\n\t\t{\n\t\t\t//-------------------------------\n\t\t\t// Version...\n\t\t\t//-------------------------------\n\n\t\t\t$r['_fullname'] = $r['com_title'];\n\n\t\t\tif ( $r['com_version'] )\n\t\t\t{\n\t\t\t\t$r['_fullname'] .= ' v'.$r['com_version'];\n\t\t\t}\n\n\t\t\t//-------------------------------\n\t\t\t// Author...\n\t\t\t//-------------------------------\n\n\t\t\t$r['_fullauthor'] = $r['com_author'];\n\n\t\t\tif ( $r['com_url'] )\n\t\t\t{\n\t\t\t\t$r['_fullauthor'] = \"<a href='{$r['com_url']}' title='{$r['com_url']}' target='_blank'>{$r['_fullauthor']}</a>\";\n\t\t\t}\n\n\t\t\t//-------------------------------\n\t\t\t// (Alex) Cross\n\t\t\t//-------------------------------\n\n\t\t\t$r['_enabled_img'] = $r['com_enabled'] ? 'aff_tick.png' : 'aff_cross.png';\n\n\t\t\t//-------------------------------\n\t\t\t// Work out position images\n\t\t\t//-------------------------------\n\n\t\t\t$r['_pos_up'] = $this->html->components_position_blank($r['com_id']);\n\t\t\t$r['_pos_down'] = $this->html->components_position_blank($r['com_id']);\n\n\t\t\t//-------------------------------\n\t\t\t// Work out position images\n\t\t\t//-------------------------------\n\n\t\t\tif ( ($seen_count + 1) == $total_items )\n\t\t\t{\n\t\t\t\t# Show up only\n\t\t\t\t$r['_pos_up'] = $this->html->components_position_up($r['com_id']);\n\t\t\t}\n\t\t\telse if ( $seen_count > 0 AND $seen_count < $total_items )\n\t\t\t{\n\t\t\t\t# Show both...\n\t\t\t\t$r['_pos_up'] = $this->html->components_position_up($r['com_id']);\n\t\t\t\t$r['_pos_down'] = $this->html->components_position_down($r['com_id']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Show down only\n\t\t\t\t$r['_pos_down'] = $this->html->components_position_down($r['com_id']);\n\t\t\t}\n\n\t\t\t$seen_count++;\n\n\t\t\t//-------------------------------\n\t\t\t// Is there an uninstall script\n\t\t\t//-------------------------------\n\t\t\tif ( file_exists( ROOT_PATH.'/resources/'.$r['com_section'].'/uninstall.xml' ) )\n\t\t\t{\n\t\t\t\t$r['com_hasuninstall'] = TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$r['com_hasuninstall'] = FALSE;\n\t\t\t}\n\n\t\t\t$content .= $this->html->component_row($r);\n\t\t}\n\n\t\t$this->ipsclass->html .= $this->html->component_overview( $content );\n\n\t\t$this->ipsclass->admin->output();\n\t}", "function loadComponents($ar=NULL){\n $p = new XParam($ar, array());\n\n $what = $p->get('what');\n\n $clearbefore = $p->get('clearbefore');\n\n if ($what == 'all' or $what == $this->tapool)\n $this->loadPools($clearbefore);\n\n elseif ($what == 'all' or $what == $this->tapersontype)\n $this->loadPersonTypes($clearbefore);\n\n elseif ($what == 'all' or $what == $this->tatickettype)\n $this->loadTicketTypes($clearbefore);\n \n else\n XShell::setNextData('message', 'unknown component '.$what);\n\n }", "private static function get_components_options() {\n\n $return = [];\n $options_placement = apply_filters( 'dustpress/components/options_placement', 'top' );\n\n\n if ( is_array( self::$components ) && count( self::$components ) > 0 ) {\n foreach ( apply_filters( 'dustpress/components', self::$components ) as $component ) {\n\n $tab_label = __( $component->label, $component->textdomain );\n\n if ( method_exists( $component, 'options' ) ) {\n\n $component_options = apply_filters( 'dustpress/components/options=' . $component->name, $component->options() );\n\n if ( $component_options instanceof \\Geniem\\ACF\\Field\\Tab ) {\n $component_options = \\array_map( function( $field ) { return $field->export(); }, $component_options->get_fields() );\n }\n\n // if options were found add tab to component settings page\n if ( ! empty( $component_options ) && is_array( $component_options ) ) {\n if ( method_exists( $component_options, 'get_label' ) ) {\n $label = $component_options->get_label();\n }\n else {\n $label = $component->label;\n }\n\n $component_tab = array (\n 'key' => 'field_dpc_settings_' . $component->name,\n 'label' => $label,\n 'name' => 'dpc_' . $component->name . '_tab',\n 'type' => 'tab',\n 'instructions' => '',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array (\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'placement' => $options_placement,\n 'endpoint' => 0,\n );\n\n $component_tab = apply_filters( 'dustpress/components/component_tab=' . $component->name, $component_tab );\n $return[] = $component_tab;\n\n // merge component options\n $return = array_merge( $return, $component_options );\n\n }\n }\n }\n }\n\n ksort( $return );\n\n return $return;\n }", "public function getComponents () : array\n {\n return $this->components;\n }", "public function getComponents(): array\n {\n return $this->components;\n }", "function getProjectComponents($project_id)\n\t{\n\t\t\n\t\t$compArray = array();\n\t\t\n\t\tif($project_id <> '')\n\t\t{\n\t\t\t$sq_data = \"SELECT\n `mrfc_app_project_component`.`published`\n , `mrfc_app_project_component`.*\n , `mrfc_app_location`.`name` AS `location`\n , `mrfc_app_location`.`lon` AS `longitude`\n , `mrfc_app_location`.`lat` AS `latitude`\nFROM\n `mrfc_app_project_component`\n LEFT JOIN `mrfc_app_location` \n ON (`mrfc_app_project_component`.`location_id` = `mrfc_app_location`.`location_id`)\nWHERE (`mrfc_app_project_component`.`published` =1 AND `mrfc_app_project_component`.`project_id` = \".quote_smart($project_id).\"); \";\n\t\t//echo $sq_data;\n\t\t\t$rs_data = $this->dbQuery($sq_data);\n\t\t\tif($this->recordCount($rs_data)) \n\t\t\t{\n\t\t\t\twhile($cn_data = $this->fetchRow($rs_data, 'assoc'))\n\t\t\t\t{ $compArray[] = (object) array_map(\"clean_output\",$cn_data); }\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t\treturn $compArray;\n\t}", "abstract protected function get_plugin_components();", "function _getXMLComponents(& $iCal, & $component) {\n\t$compName = $component->getName();\n\t$comp = & $iCal->newComponent($compName);\n\t$subComponents = array('valarm', 'standard', 'daylight');\n\tforeach ($component->children() as $compPart) { // properties and (opt) subComponents\n\t\tif (1 > $compPart->count())\n\t\t\tcontinue;\n\t\tif (in_array($compPart->getName(), $subComponents))\n\t\t\t_getXMLComponents($comp, $compPart);\n\t\telseif ('properties' == $compPart->getName()) {\n\t\t\tforeach ($compPart->children() as $property) // properties as single property\n\t\t\t\t_getXMLProperties($comp, $property);\n\t\t}\n\t} // end foreach( $component->children() as $compPart )\n}", "public function getComponents($type);", "public function getComponents() {\n return $this->components;\n }", "private function _initComponents()\n {\n $componentsFolder = 'Components';\n $directory = dirname(__FILE__) . '/' . $componentsFolder;\n $components = array();\n foreach (@glob($directory . '/*', GLOB_ONLYDIR) as $folder) {\n $componentName = basename($folder);\n $components[$folder] = array(\n 'componentName' => $componentName,\n 'namespace' =>\n '\\H22\\Plugins\\VisualComposer\\\\' .\n $componentsFolder .\n '\\\\' .\n $componentName .\n '\\\\' .\n $componentName,\n );\n }\n return $components;\n }", "protected function getModuleComponents() {\n\t return [\n\t ];\n\t}", "public static function listComponent($getDefaultComponent,$type=null){\n if($getDefaultComponent) $list=PayrollComponent::where('component_type',$type)->get();\n else $list=PayrollComponent::where('default_flag',0)->get();\n $result='';\n foreach($list as $row){\n\n $result.='<option value=\"'.$row->id.'\" data-amount=\"'.$row->component_amount.'\" data-type=\"'.$row->component_type.'\">'.$row->component_name.'</option>';\n }\n return $result;\n }", "function getIncompleteComponents($conn, $planID){\n\n\t$sql = \"SELECT * FROM incompletecomponents WHERE planId = :planId\";\n\t\n\t$sth = $conn->prepare($sql);\n\t$sth->bindParam(':planId', $planID, PDO::PARAM_INT, 11);\n\t$sth->execute();\n\t\n\t$rows = array();\n\t\n\twhile($r = $sth->fetch(PDO::FETCH_ASSOC)) {\n\t\t$rows[] = $r;\n\t}\n\t\n\t//deleteUnfinishedModules($conn, $planID);\n\treturn $rows;\n}", "public function getAllComponents($listFormat = 1) {\n $components = Component::getAllComponents($listFormat);\n return \\Response::json($components);\n }", "function getComponents(){\r\n mysql_connect(mysql_server, mysql_username, mysql_password) or die(mysql_error()); \r\n mysql_select_db(mysql_database) or die(mysql_error()); \r\n $data = mysql_query(\"SELECT id, slug, component_type FROM components ORDER BY slug DESC LIMIT 20\") \r\n or die(mysql_error());\r\n //grab those vars\r\n global $comp_args;\r\n while($info = mysql_fetch_assoc($data)){\r\n $comp_args[] = $info;\r\n }\r\n \r\n return;\r\n}", "public function publiGetComponents($input) {\n return $this->getComponents($input);\n }", "function getComponents(int $roomId){\n $query = \"SELECT\n id, name, description, pin, last_update, board_id, room_id, type_id\n FROM components WHERE room_id = ? LIMIT 0,1\";\n\n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n\n $stmt->bindParam(1, $roomId);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n }", "public function componentDetails()\n {\n return [\n 'name' => 'List Component',\n 'description' => 'No description provided yet...'\n ];\n }" ]
[ "0.6494637", "0.6238811", "0.6187192", "0.61047935", "0.60542053", "0.605051", "0.605051", "0.59817153", "0.59047675", "0.5894762", "0.58025056", "0.57242537", "0.5719642", "0.5705561", "0.5677475", "0.56536394", "0.5619825", "0.56045634", "0.559661", "0.55813766", "0.55457276", "0.55323255", "0.5484101", "0.54719895", "0.5471257", "0.54396045", "0.5426069", "0.5392861", "0.53917986", "0.5388782" ]
0.7225317
0
/ get_test_cases Get A List of Test Cases For An Existing Test Plan Usage TestPlan.get_test_cases Parameters ParameterData TypeComments plan_idinteger Result Array [0] Array [author_id] [script] [sortkey] [case_id] [estimated_time] [case_status_id] [default_tester_id] [priority_id] [requirement] [category_id] [creation_date] [summary] [isautomated] [arguments] [alias] [1] Array ...
function TestPlan_get_test_cases($plan_id) { // Create call $call = new xmlrpcmsg('TestPlan.get_test_cases', array(new xmlrpcval($plan_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "function TestRun_get_test_cases($run_id) {\n\t// Create call\n\t// FIXME: not working\n\t$call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTestCases ()\n {\n return $this->_testCases;\n }", "function TestCase_get_plans($case_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.get_plans', array(new xmlrpcval($case_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_get_test_runs($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_runs', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTestIterationData()\n {\n $cases = [];\n\n // Case #0 Standard iterator.\n $cases[] = [\n [\n 'hits' => [\n 'total' => 1,\n 'hits' => [\n [\n '_type' => 'content',\n '_id' => 'foo',\n '_score' => 0,\n '_source' => ['header' => 'Test header'],\n ],\n ],\n ],\n ],\n [\n [\n '_type' => 'content',\n '_id' => 'foo',\n '_score' => 0,\n '_source' => ['header' => 'Test header'],\n ],\n ],\n ];\n\n return $cases;\n }", "function TestRun_get_test_case_runs($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_case_runs', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTestcases() {\n if ($this->graded_testcases === null) {\n $this->loadTestcases();\n }\n return $this->graded_testcases;\n }", "function deleteTestCasesViewer(&$dbHandler,&$smartyObj,&$tprojectMgr,&$treeMgr,&$tsuiteMgr,\r\n &$tcaseMgr,$argsObj,$feedback = null)\r\n{\r\n\r\n $guiObj = new stdClass();\r\n $guiObj->main_descr = lang_get('delete_testcases');\r\n $guiObj->system_message = '';\r\n\r\n\r\n $tables = $tprojectMgr->getDBTables(array('nodes_hierarchy','node_types','tcversions'));\r\n $testcase_cfg = config_get('testcase_cfg');\r\n $glue = $testcase_cfg->glue_character;\r\n\r\n $containerID = isset($argsObj->testsuiteID) ? $argsObj->testsuiteID : $argsObj->objectID;\r\n $containerName = $argsObj->tsuite_name;\r\n if( is_null($containerName) )\r\n {\r\n $dummy = $treeMgr->get_node_hierarchy_info($argsObj->objectID);\r\n $containerName = $dummy['name'];\r\n }\r\n\r\n $guiObj->testCaseSet = $tsuiteMgr->get_children_testcases($containerID);\r\n $guiObj->exec_status_quo = null;\r\n $tcasePrefix = $tprojectMgr->getTestCasePrefix($argsObj->tprojectID);\r\n $hasExecutedTC = false;\r\n\r\n if( !is_null($guiObj->testCaseSet) && count($guiObj->testCaseSet) > 0)\r\n {\r\n foreach($guiObj->testCaseSet as &$child)\r\n {\r\n $external = $tcaseMgr->getExternalID($child['id'],null,$tcasePrefix);\r\n $child['external_id'] = $external[0];\r\n \r\n // key level 1 : Test Case Version ID\r\n // key level 2 : Test Plan ID\r\n // key level 3 : Platform ID\r\n $getOptions = array('addExecIndicator' => true);\r\n $dummy = $tcaseMgr->get_exec_status($child['id'],null,$getOptions);\r\n $child['draw_check'] = $argsObj->grants->delete_executed_testcases || (!$dummy['executed']);\r\n\r\n $hasExecutedTC = $hasExecutedTC || $dummy['executed'];\r\n unset($dummy['executed']);\r\n $guiObj->exec_status_quo[] = $dummy;\r\n }\r\n }\r\n // Need to understand if platform column has to be displayed on GUI\r\n if( !is_null($guiObj->exec_status_quo) )\r\n {\r\n // key level 1 : Test Case Version ID\r\n // key level 2 : Test Plan ID\r\n // key level 3 : Platform ID\r\n\r\n $itemSet = array_keys($guiObj->exec_status_quo);\r\n foreach($itemSet as $mainKey)\r\n {\r\n $guiObj->display_platform[$mainKey] = false;\r\n if(!is_null($guiObj->exec_status_quo[$mainKey]) )\r\n {\r\n $versionSet = array_keys($guiObj->exec_status_quo[$mainKey]);\r\n $stop = false;\r\n foreach($versionSet as $version_id)\r\n {\r\n $tplanSet = array_keys($guiObj->exec_status_quo[$mainKey][$version_id]);\r\n foreach($tplanSet as $tplan_id)\r\n {\r\n if( ($guiObj->display_platform[$mainKey] = !isset($guiObj->exec_status_quo[$mainKey][$version_id][$tplan_id][0])) )\r\n {\r\n $stop = true;\r\n break;\r\n }\r\n }\r\n \r\n if($stop)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // check if operation can be done\r\n $guiObj->user_feedback = $feedback;\r\n if(!is_null($guiObj->testCaseSet) && (sizeof($guiObj->testCaseSet) > 0) )\r\n {\r\n $guiObj->op_ok = true;\r\n $guiObj->user_feedback = '';\r\n }\r\n else\r\n {\r\n $guiObj->children = null;\r\n $guiObj->op_ok = false;\r\n $guiObj->user_feedback = is_null($guiObj->user_feedback) ? lang_get('no_testcases_available') : $guiObj->user_feedback;\r\n }\r\n\r\n if(!$argsObj->grants->delete_executed_testcases && $hasExecutedTC)\r\n {\r\n $guiObj->system_message = lang_get('system_blocks_delete_executed_tc');\r\n }\r\n\r\n $guiObj->objectID = $containerID;\r\n $guiObj->object_name = $containerName;\r\n $guiObj->refreshTree = $argsObj->refreshTree;\r\n\r\n $smartyObj->assign('gui', $guiObj);\r\n}", "public function provideTestCases()\n {\n return [\n ['time', ['time'], false],\n ['bar', null, true],\n ];\n }", "function TestCase_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"plans\":\n\t\t\t\tunset($va);\n\t\t\t\tforeach($key as $k => $v) {\n\t\t\t\t\t$va[$k] = new xmlrpcval($v, \"string\");\n\t\t\t\t}\n\t\t\t\t$val = $va;\n\t\t\t\t$type = \"struct\";\n\t\t\t\tbreak;\n\t\t\tcase \"author_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_status_id\":\n\t\t\tcase \"category_id\":\n\t\t\tcase \"default_tester_id\":\n\t\t\tcase \"isautomated\":\n\t\t\tcase \"priority_id\":\n\t\t\tcase \"sortkey\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"alias\":\n\t\t\tcase \"arguments\":\n\t\t\tcase \"creation_date\":\n\t\t\tcase \"requirement\":\n\t\t\tcase \"script\":\n\t\t\tcase \"summary\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_create($author_id, $case_status_id, $category_id, $isautomated, $plan_id, $alias = NULL, $arguments = NULL, $canview = NULL, $creation_date = NULL, $default_tester_id = NULL, $priority_id = NULL, $requirement = NULL, $script = NULL, $summary = NULL, $sortkey = NULL) {\n\t$varray = array(\"author_id\" => \"int\", \"case_status_id\" => \"int\", \"category_id\" => \"int\", \"isautomated\" => \"int\", \"plan_id\" => \"int\", \"alias\" => \"string\", \"arguments\" => \"string\", \"canview\" => \"int\", \"creation_date\" => \"string\", \"default_tester_id\" => \"int\", \"priority_id\" => \"int\", \"requirement\" => \"string\", \"script\" => \"string\", \"summary\" => \"string\", \"sortkey\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "protected function _getCasesList() {\n if (Pi::service('module')->isActive(CASES)) {\n try {\n $cases = Pi::api('api', CASES)->caseList();\n return $cases;\n } catch (\\Exception $exception) {\n return array();\n }\n }\n }", "public function testCreateTestCaseWithDetails()\n {\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->visit('/library')\n ->click('#newCase')\n ->seePageIs('/library/testcase/create')\n ->type('TestCase2', 'name1')\n ->select('1', 'testSuite1')\n ->type('someDecription','description1')\n ->type('somePrefixes','prefixes1')\n ->type('someSteps','steps1')\n ->type('someResult','expectedResult1')\n ->type('someSuffixes','suffixes1')\n ->press('submit');\n\n $this->seeInDatabase('TestCaseHistory', [\n 'TestCaseDescription' => 'someDecription',\n 'TestCasePrefixes' => 'somePrefixes',\n 'TestSteps' => 'someSteps',\n 'ExpectedResult' => 'someResult',\n 'TestCaseSuffixes' => 'someSuffixes'\n ]);\n }", "function getTestCasesInsideACategory($testCategoryID, $theSubjectID, $roundID, $clientID) {\n global $definitions;\n\n $categoriesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n $categoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n $testCasesArray = array();\n\n //First, get the internal structure of testCategories\n $tcatTree = getItemsTree($categoriesItemTypeID, $clientID, $categoryParentPropertyID, $testCategoryID);\n\n $idsToRetrieve = array();\n\n //Store all testCategories ids found in a plain array\n foreach ($tcatTree as $tc) {\n for ($j = 0; $j < count($tc); $j++) {\n if (!(in_array($tc[$j]['parent'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['parent'];\n }\n if (!(in_array($tc[$j]['ID'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['ID'];\n }\n }\n }\n\n //Get the relations item\n $relations = getRelations($roundID, $theSubjectID, $clientID);\n\n if ((count($relations) - 1) == 0) {\n //Get the test cases ids inside an array\n $idsToSearch = explode(',', $relations[0]['testCasesIDs']);\n for ($i = 0; $i < count($idsToRetrieve); $i++) {\n //Get the test cases and filter\n $availableTestCases = array();\n $availableTestCases = getFilteredTestCasesInsideCategory($idsToRetrieve[$i], $idsToSearch, $clientID);\n //And add to results\n for ($j = 0; $j < count($availableTestCases); $j++) {\n $partRes = array();\n $partRes['ID'] = $availableTestCases[$j]['ID'];\n $testCasesArray[] = $partRes;\n }\n }\n }\n\n return $testCasesArray;\n}", "public function getCasesByType($type_cases) {\n if($type_cases == 1)\n {\n $sql = \"SELECT `pk_cases`, `id_cases`, `sub_type_cases`, `comment_cases`, `date_cases`, `config_json_cases`, `fk_users`, `symbol_users` FROM `cases`, `users` WHERE `type_cases` = :type_cases AND `fk_users` = `pk_users`\";\n $query = $this->db->prepare($sql);\n $query->execute(array(':type_cases' => $type_cases));\n }\n\n if($type_cases == 4)\n {\n $sql = \"SELECT `pk_cases`, `id_cases`, `sub_type_cases`, `comment_cases`, `date_cases`, `config_json_cases`, `fk_users`, `symbol_users` FROM `cases`, `users` WHERE `type_cases` = :type_cases AND `fk_users` = `pk_users`\";\n $query = $this->db->prepare($sql);\n $query->execute(array(':type_cases' => $type_cases));\n }\n\n if($type_cases == 2)\n {\n $sql = \"SELECT `pk_cases`, `id_cases`, `sub_type_cases`, `comment_cases`, `date_cases`, `config_json_cases`, `fk_users`, `symbol_users`, `latest_research`, `time_score`, `calculated_score` FROM `cases`, `users` WHERE `type_cases` = :type_cases AND `fk_users` = `pk_users`\";\n $query = $this->db->prepare($sql);\n $query->execute(array(':type_cases' => $type_cases));\n }\n\n return $query->fetchAll();\n }", "public function getTests();", "function TestRun_get_test_plan($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_plan', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function runTests()\n {\n $this->testCase(1, array (1, 1));\n $this->testCase(2, array (1, 2));\n $this->testCase(3, array (2, 2));\n $this->testCase(4, array (2, 2));\n $this->testCase(5, array (2, 3));\n $this->testCase(6, array (2, 3));\n $this->testCase(7, array (3, 3));\n $this->testCase(8, array (3, 3));\n $this->testCase(9, array (3, 3));\n $this->testCase(10, array(2, 5));\n $this->testCase(11, array(3, 4));\n $this->testCase(12, array(3, 4));\n $this->testCase(13, array(4, 4));\n $this->testCase(14, array(4, 4));\n $this->testCase(15, array(4, 4));\n $this->testCase(16, array(4, 4));\n $this->testCase(17, array(3, 6));\n $this->testCase(18, array(3, 6));\n $this->testCase(19, array(4, 5));\n $this->testCase(20, array(4, 5));\n $this->testCase(21, array(3, 7));\n $this->testCase(22, array(5, 5));\n $this->testCase(23, array(5, 5));\n $this->testCase(24, array(5, 5));\n $this->testCase(25, array(5, 5));\n $this->testCase(26, array(4, 7));\n $this->testCase(27, array(4, 7));\n $this->testCase(28, array(4, 7));\n $this->testCase(29, array(5, 6));\n $this->testCase(30, array(5, 6));\n $this->testCase(31, array(4, 8));\n $this->testCase(32, array(4, 8));\n $this->testCase(33, array(6, 6));\n $this->testCase(34, array(6, 6));\n $this->testCase(35, array(6, 6));\n $this->testCase(36, array(6, 6));\n $this->testCase(37, array(5, 8));\n $this->testCase(38, array(5, 8));\n $this->testCase(39, array(5, 8));\n $this->testCase(40, array(5, 8));\n $this->testCase(41, array(6, 7));\n $this->testCase(42, array(6, 7));\n $this->testCase(43, array(5, 9));\n $this->testCase(44, array(5, 9));\n $this->testCase(45, array(5, 9));\n $this->testCase(46, array(7, 7));\n $this->testCase(47, array(7, 7));\n $this->testCase(48, array(7, 7));\n $this->testCase(49, array(7, 7));\n $this->testCase(50, array(5, 10));\n $this->testCase(51, array(6, 9));\n $this->testCase(52, array(6, 9));\n $this->testCase(53, array(6, 9));\n $this->testCase(54, array(6, 9));\n $this->testCase(55, array(7, 8));\n $this->testCase(56, array(7, 8));\n $this->testCase(57, array(6, 10));\n $this->testCase(58, array(6, 10));\n $this->testCase(59, array(6, 10));\n $this->testCase(60, array(6, 10));\n $this->testCase(61, array(8, 8));\n $this->testCase(62, array(8, 8));\n $this->testCase(63, array(8, 8));\n $this->testCase(64, array(8, 8));\n $this->testCase(65, array(6, 11));\n $this->testCase(66, array(6, 11));\n $this->testCase(67, array(7, 10));\n $this->testCase(68, array(7, 10));\n $this->testCase(69, array(7, 10));\n $this->testCase(70, array(7, 10));\n $this->testCase(71, array(8, 9));\n $this->testCase(72, array(8, 9));\n $this->testCase(73, array(7, 11));\n $this->testCase(74, array(7, 11));\n $this->testCase(75, array(7, 11));\n $this->testCase(76, array(7, 11));\n $this->testCase(77, array(7, 11));\n $this->testCase(78, array(9, 9));\n $this->testCase(79, array(9, 9));\n $this->testCase(80, array(9, 9));\n $this->testCase(81, array(9, 9));\n $this->testCase(82, array(7, 12));\n $this->testCase(83, array(7, 12));\n $this->testCase(84, array(7, 12));\n $this->testCase(85, array(8, 11));\n $this->testCase(86, array(8, 11));\n $this->testCase(87, array(8, 11));\n $this->testCase(88, array(8, 11));\n $this->testCase(89, array(9, 10));\n $this->testCase(90, array(9, 10));\n $this->testCase(91, array(7, 13));\n $this->testCase(92, array(8, 12));\n $this->testCase(93, array(8, 12));\n $this->testCase(94, array(8, 12));\n $this->testCase(95, array(8, 12));\n $this->testCase(96, array(8, 12));\n $this->testCase(97, array(10, 10));\n $this->testCase(98, array(10, 10));\n $this->testCase(99, array(10, 10));\n $this->testCase(100, array(10, 10));\n }", "abstract protected function getTestData() : array;", "public function getContestsByType_post() {\n $this->form_validation->set_rules('SessionKey', 'SessionKey', 'trim|required|callback_validateSession');\n $this->form_validation->set_rules('Privacy', 'Privacy', 'trim|required|in_list[Yes,No,All]');\n $this->form_validation->set_rules('UserGUID', 'UserGUID', 'trim|callback_validateEntityGUID[User,UserID]');\n $this->form_validation->set_rules('MatchGUID', 'MatchGUID', 'trim|callback_validateEntityGUID[Matches,MatchID]');\n $this->form_validation->set_rules('Keyword', 'Search Keyword', 'trim');\n $this->form_validation->set_rules('Filter', 'Filter', 'trim|in_list[Normal]');\n $this->form_validation->set_rules('OrderBy', 'OrderBy', 'trim');\n $this->form_validation->set_rules('Sequence', 'Sequence', 'trim|in_list[ASC,DESC]');\n $this->form_validation->validation($this); /* Run validation */\n\n /* Get Contests Data */\n\n $ContestData = array();\n\n $ContestTypes[] = array('Key' => 'Hot Contest', 'TagLine' => 'Filling Fast. Join Now!', 'Where' => array('ContestType' => 'Hot'));\n $ContestTypes[] = array('Key' => 'Contests for Champions', 'TagLine' => 'High Entry Fees, Intense Competition', 'Where' => array('ContestType' => 'Champion'));\n $ContestTypes[] = array('Key' => 'Head To Head Contest', 'TagLine' => 'The Ultimate Face Off', 'Where' => array('ContestType' => 'Head to Head'));\n $ContestTypes[] = array('Key' => 'Practice Contest', 'TagLine' => 'Hone Your Skills', 'Where' => array('ContestType' => 'Practice'));\n $ContestTypes[] = array('Key' => 'More Contest', 'TagLine' => 'Keep Winning!', 'Where' => array('ContestType' => 'More'));\n $ContestTypes[] = array('Key' => 'Mega Contest', 'TagLine' => 'Get ready for mega winnings!', 'Where' => array('ContestType' => 'Mega'));\n $ContestTypes[] = array('Key' => 'Winner Takes All', 'TagLine' => 'Everything To Play For', 'Where' => array('ContestType' => 'Winner Takes All'));\n $ContestTypes[] = array('Key' => 'Only For Beginners', 'TagLine' => 'Play Your First Contest Now', 'Where' => array('ContestType' => 'Only For Beginners'));\n\n foreach ($ContestTypes as $key => $Contests) {\n\n array_push($ContestData, $this->SnakeDrafts_model->getContests(@$this->Post['Params'], array_merge($this->Post, array('MatchID' => @$this->MatchID, 'UserID' => @$this->UserID, 'SessionUserID' => $this->SessionUserID), $Contests['Where']), TRUE, @$this->Post['PageNo'], @$this->Post['PageSize'])['Data']);\n $ContestData[$key]['Key'] = $Contests['Key'];\n $ContestData[$key]['TagLine'] = $Contests['TagLine'];\n }\n\n $Statics = $this->db->query('SELECT (SELECT COUNT(*) AS `NormalContest` FROM `nba_sports_contest` C, `tbl_entity` E WHERE C.ContestID = E.EntityID AND E.StatusID IN (1,2,5) AND C.MatchID = \"' . $this->MatchID . '\" AND C.ContestType=\"Normal\" AND C.ContestFormat=\"League\" AND C.ContestSize != (SELECT COUNT(*) from nba_sports_contest_join where nba_sports_contest_join.ContestID = C.ContestID)\n )as NormalContest,\n ( SELECT COUNT(*) AS `ReverseContest` FROM `nba_sports_contest` C, `tbl_entity` E WHERE C.ContestID = E.EntityID AND E.StatusID IN(1,2,5) AND C.MatchID = \"' . $this->MatchID . '\" AND C.ContestType=\"Reverse\" AND C.ContestFormat=\"League\" AND C.ContestSize != (SELECT COUNT(*) from nba_sports_contest_join where nba_sports_contest_join.ContestID = C.ContestID)\n )as ReverseContest,(\n SELECT COUNT(*) AS `JoinedContest` FROM `nba_sports_contest_join` J, `nba_sports_contest` C WHERE C.ContestID = J.ContestID AND J.UserID = \"' . $this->SessionUserID . '\" AND C.MatchID = \"' . $this->MatchID . '\"\n )as JoinedContest,(\n SELECT COUNT(*) AS `TotalTeams` FROM `nba_sports_users_teams`WHERE UserID = \"' . $this->SessionUserID . '\" AND MatchID = \"' . $this->MatchID . '\"\n ) as TotalTeams,(SELECT COUNT(*) AS `H2HContest` FROM `nba_sports_contest` C, `tbl_entity` E, `nba_sports_contest_join` CJ WHERE C.ContestID = E.EntityID AND E.StatusID IN (1,2,5) AND C.MatchID = \"' . $this->MatchID . '\" AND C.ContestFormat=\"Head to Head\" AND E.StatusID = 1 AND C.ContestID = CJ.ContestID AND C.ContestSize != (SELECT COUNT(*) from nba_sports_contest_join where nba_sports_contest_join.ContestID = C.ContestID )) as H2HContests')->row();\n\n if (!empty($ContestData)) {\n $this->Return['Data']['Results'] = $ContestData;\n $this->Return['Data']['Statics'] = $Statics;\n }\n }", "public function getCases(): array{\n return $this->cases;\n}", "function getTests($accountId) {\n $ret = array();\n $sql = \"select landingpage_collectionid from landingpage_collection lc,client c\n\t\t\twhere c.clientid_hash = '$accountId'\n\t\t\tand c.clientid = lc.clientid order by landingpage_collectionid desc\";\n $res = mysql_query($sql);\n trackMysqlError(__function__);\n //echo $sql;\n while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) {\n $ret[] = $row['landingpage_collectionid'];\n }\n return($ret);\n }", "public function getTestResults()\n\t{\n\t\t/*\n\t\t * Wenn die Tests noch nicht ausgeführt wurden, dies nun tun\n\t\t */\n\t\tif ($this->_needRun === true)\n\t\t{\n\t\t\t$this->run();\n\t\t}\n\t\tforeach ($this->_testCases as $key => $testCase)\n\t\t{\n\t\t\t/*\n\t\t\t * Zusicherung nicht erfüllt\n\t\t\t*/\n\t\t\tif ($testCase['assert'] !== $testCase['result'])\n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": fehlgeschlagen \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" != \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_failedTests++;\n\t\t\t}\n\t\t\t/*\n\t\t\t * Zusicherung erfüllt\n\t\t\t*/\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": erfolgreich \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" == \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_passedTests++;\n\t\t\t}\n\t\t} \n\t\treturn $this->_testResults;\t\n\t}", "function getMetrics(&$db,$userObj,$args, $result_cfg, $labels)\n{\n $debug = true;\n $begin_time = microtime(true);\n $user_id = $args->currentUserID;\n $tproject_id = $args->tproject_id;\n $linked_tcversions = array();\n $metrics = array();\n $tplan_mgr = new testplan($db);\n $show_platforms = false;\n $platforms = array();\n\n // get all tesplans accessibles for user, for $tproject_id\n $options = array('output' => 'map');\n $options['active'] = $args->show_only_active ? ACTIVE : TP_ALL_STATUS; \n $test_plans = $userObj->getAccessibleTestPlans($db,$tproject_id,null,$options);\n\n // Get count of testcases linked to every testplan\n // Hmm Count active and inactive ?\n $linkedItemsQty = $tplan_mgr->count_testcases(array_keys($test_plans),null,array('output' => 'groupByTestPlan'));\n \n \n $metricsMgr = new tlTestPlanMetrics($db);\n $show_platforms = false;\n \n $metrics = array('testplans' => null, 'total' => null);\n $mm = &$metrics['testplans'];\n $metrics['total'] = array('active' => 0,'total' => 0, 'executed' => 0);\n foreach($result_cfg['status_label_for_exec_ui'] as $status_code => &$dummy)\n {\n $metrics['total'][$status_code] = 0; \n } \n \n $codeStatusVerbose = array_flip($result_cfg['status_code']);\n if($debug){\n echo 'test_plans_count:'.count($test_plans).\"<br/>\";\n $index = 0;\n foreach($test_plans as $key => &$dummy)\n {\n $item_begin_time = microtime(true);\n // We need to know if test plan has builds, if not we can not call any method \n // that try to get exec info, because you can only execute if you have builds.\n //\n // 20130909 - added active filter\n $buildSet = $tplan_mgr->get_builds($key,testplan::ACTIVE_BUILDS);\n if( is_null($buildSet) )\n {\n continue;\n }\n\n $platformSet = $tplan_mgr->getPlatforms($key);\n if (isset($platformSet)) \n {\n $platforms = array_merge($platforms, $platformSet);\n } \n $show_platforms_for_tplan = !is_null($platformSet);\n $show_platforms = $show_platforms || $show_platforms_for_tplan;\n if( !is_null($platformSet) )\n {\n $neurus = $metricsMgr->getExecCountersByPlatformExecStatus($key,null,\n array('getPlatformSet' => true,\n 'getOnlyActiveTCVersions' => true));\n $mm[$key]['overall']['active'] = $mm[$key]['overall']['executed'] = 0;\n foreach($neurus['with_tester'] as $platform_id => &$pinfo)\n {\n $xd = &$mm[$key]['platforms'][$platform_id];\n $xd['tplan_name'] = $dummy['name'];\n $xd['platform_name'] = $neurus['platforms'][$platform_id];\n $xd['total'] = $xd['active'] = $neurus['total'][$platform_id]['qty'];\n $xd['executed'] = 0;\n \n foreach($pinfo as $code => &$elem)\n {\n $xd[$codeStatusVerbose[$code]] = $elem['exec_qty'];\n if($codeStatusVerbose[$code] != 'not_run')\n {\n $xd['executed'] += $elem['exec_qty'];\n }\n if( !isset($mm[$key]['overall'][$codeStatusVerbose[$code]]) )\n {\n $mm[$key]['overall'][$codeStatusVerbose[$code]] = 0;\n }\n $mm[$key]['overall'][$codeStatusVerbose[$code]] += $elem['exec_qty'];\n $metrics['total'][$codeStatusVerbose[$code]] += $elem['exec_qty']; \n }\n $mm[$key]['overall']['executed'] += $xd['executed'];\n $mm[$key]['overall']['active'] += $xd['active'];\n } \n unset($neurus);\n $mm[$key]['overall']['total'] = $mm[$key]['overall']['active']; \n $metrics['total']['executed'] += $mm[$key]['overall']['executed'];\n $metrics['total']['active'] += $mm[$key]['overall']['active'];\n }\n else\n {\n if($key == 764205){$my_begin_time = microtime(true);}\n $mm[$key]['overall']['builds'] = $metricsMgr->getBuildExecCountersByExecStatus($key,null,null);\n if($key == 764205){$my_end_time = microtime(true);echo 'my_diff:'.($my_end_time - $my_begin_time).\"<br/>\";}\n $mm[$key]['overall']['active'] = 0;\n foreach ($mm[$key]['overall']['builds'] as $build_id => $status_column)\n {\n $mm[$key]['overall']['active'] += $status_column['total'];\n foreach ($status_column as $status_code => $qty)\n {\n if(!isset($metrics['total'][$status_code]))\n {\n $metrics['total'][$status_code] = 0;\n }\n $metrics['total'][$status_code] += $qty;\n \n if (!isset($mm[$key]['overall'][$status_code]))\n {\n $mm[$key]['overall'][$status_code] = 0;\n }\n $mm[$key]['overall'][$status_code] += $qty;\n }\n }\n\n //$metrics['total']['executed'] += $mm[$key]['overall']['executed'];\n $metrics['total']['active'] += $mm[$key]['overall']['active'];\n \n $mm[$key]['platforms'][0] = $mm[$key]['overall'];\n $mm[$key]['platforms'][0]['tplan_name'] = $dummy['name'];\n $mm[$key]['platforms'][0]['platform_name'] = $labels['not_aplicable'];\n } \n $item_end_time = microtime(true);\n echo \"key:$key,diff_time:\".($item_end_time - $item_begin_time).\"<br/>\";\n $index ++;\n if($index > 2){\n break;\n }\n }\n}\n \n // remove duplicate platform names\n $platformsUnique = array();\n foreach($platforms as $platform) \n {\n if(!in_array($platform['name'], $platformsUnique)) \n {\n $platformsUnique[] = $platform['name'];\n }\n }\n \n $end_time = microtime(true);\n echo 'diff_time'.($end_time - $begin_time);\n return array($metrics, $show_platforms, $platformsUnique);\n}", "public function testContent($testId)\n\t{\n\t\t$test_id = ( int ) $testId;\n\t\t$testName = '';\n\t\t$status = 0;\n\t\t\n\t\t$where = new Where ();\n\t\t//$where(array('assignedQuesTabl.test_id'=>$test_id));\n\t\t\n\t\t$sql = new Sql ( $this->adapter );\n\t\t$select = $sql->select ()\n\t\t\t\t\t ->from ( array ('assignedQuesTabl' => 'assigned_questions' ) )\n\t\t\t\t\t ->columns ( array ('testId' => 'test_id',\n\t\t\t\t\t\t\t\t\t\t 'testQuesId' => 'id',\n\t\t\t\t\t\t\t\t\t\t 'quesId' => 'ques_id',\n\t\t\t\t\t\t\t\t\t\t 'quesStatus' => 'status' ) )\n\t\t\t\t\t ->join ( array ('questionTabl' => 'questions' ), 'ques_id = questionTabl.id',\n\t\t\t\t\t\t array ('questionStatus' => 'status','questionCreatedOn' => 'created_on') )\n\t\t\t\t\t ->where ( array('assignedQuesTabl.test_id'=>$test_id,\n\t\t\t\t\t\t\t \t\t 'assignedQuesTabl.status'=>$status) )\n\t\t\t\t\t ->order('questionTabl.created_on DESC');\n\t\t$statement = $sql->prepareStatementForSqlObject ( $select );\n\t $result = $this->resultSetPrototype->initialize ( $statement->execute () )->toArray ();\n\t return $result;\n\t}", "public function getContests_post() {\n $this->form_validation->set_rules('SessionKey', 'SessionKey', 'trim|required|callback_validateSession');\n $this->form_validation->set_rules('Privacy', 'Privacy', 'trim|required|in_list[Yes,No,All]');\n $this->form_validation->set_rules('UserGUID', 'UserGUID', 'trim|callback_validateEntityGUID[User,UserID]');\n $this->form_validation->set_rules('SeriesGUID', 'SeriesGUID', 'trim|callback_validateEntityGUID[Series,SeriesID]');\n $this->form_validation->set_rules('MatchGUID', 'MatchGUID', 'trim|required|callback_validateEntityGUID[Matches,MatchID]');\n $this->form_validation->set_rules('Keyword', 'Search Keyword', 'trim');\n $this->form_validation->set_rules('Filter', 'Filter', 'trim|in_list[Normal]');\n $this->form_validation->set_rules('OrderBy', 'OrderBy', 'trim');\n $this->form_validation->set_rules('Sequence', 'Sequence', 'trim|in_list[ASC,DESC]');\n $this->form_validation->set_rules('StatusID', 'StatusID', 'trim');\n $this->form_validation->set_rules('AuctionStatus', 'AuctionStatus', 'trim|callback_validateStatus');\n $this->form_validation->validation($this); /* Run validation */\n\n /* Get Contests Data */\n $ContestData = $this->SnakeDrafts_model->getContests(@$this->Post['Params'], array_merge($this->Post, array('SeriesID' => @$this->SeriesID,'MatchID' => $this->MatchID, 'UserID' => @$this->UserID, 'SessionUserID' => $this->SessionUserID, 'AuctionStatusID' => @$this->StatusID)), TRUE, @$this->Post['PageNo'], @$this->Post['PageSize']);\n\n if (!empty($ContestData)) {\n $this->Return['Data'] = $ContestData['Data'];\n }\n }", "public function getResults($studId, $overviewId) {\n global $ilDB, $lng;\n $average;\n $maxPoints;\n\n $data = array();\n \n $query = \"SELECT ref_id_test FROM rep_robj_xtov_t2o WHERE obj_id_overview = %s\";\n $result = $ilDB->queryF($query, array('integer'), array($overviewId));\n $tpl = new ilTemplate(\"tpl.stud_view.html\", true, true, \"Customizing/global/plugins/Services/Repository/RepositoryObject/TestOverview\");\n //Internationalization\n $lng->loadLanguageModule(\"assessment\");\n $lng->loadLanguageModule(\"certificate\");\n $lng->loadLanguageModule(\"rating\");\n $lng->loadLanguageModule(\"common\");\n $lng->loadLanguageModule(\"trac\");\n $tpl->setCurrentBlock(\"head_row\");\n $tpl->setVariable(\"test\", $lng->txt(\"rep_robj_xtov_testOverview\"));\n $tpl->setVariable(\"exercise\", $lng->txt(\"rep_robj_xtov_ex_overview\"));\n $tpl->setVariable(\"testTitle\", $lng->txt(\"certificate_ph_testtitle\"));\n $tpl->setVariable(\"score\", $lng->txt(\"toplist_col_score\"));\n $tpl->parseCurrentBlock();\n $tpl->setVariable(\"average\", $lng->txt('rep_robj_xtov_avg_points'));\n $tpl->setVariable(\"averagePercent\", $lng->txt(\"trac_average\"));\n $tpl->setVariable(\"exerciseTitle\", $lng->txt(\"certificate_ph_exercisetitle\"));\n $tpl->setVariable(\"mark\", $lng->txt(\"tst_mark\"));\n $tpl->setVariable(\"studentRanking\", $lng->txt(\"toplist_your_result\"));\n //Baut aus den Einzelnen Zeilen Objekte\n while ($testObj = $ilDB->fetchObject($result)) {\n array_push($data, $testObj);\n }\n\n\n foreach ($data as $set) {\n $result = $this-> getTestData($studId,$set->ref_id_test);\n $timestamp = time();\n //$datum = (float) date(\"YmdHis\", $timestamp);\n\n $testTime = (float) $result->ending_time;\n \n \n\n /* Checks if the test has been finished or if no end time is given */\n if ((($testTime - $timestamp) < 0 || $result->timeded == 0) && $this->isTestDeleted($set->ref_id_test) == null && $result != null ) {\n $tpl->setCurrentBlock(\"test_results\");\n $tpl->setVariable(\"Name\", $result->title);\n $average += $result->points;\n $maxPoints += $result->maxpoints;\n if ($result->points > ($result->maxpoints / 2)) {\n $pointsHtml = \"<td class='green-result'>\" . $result->points . \"</td>\";\n } else {\n $pointsHtml = \"<td class='red-result'>\" . $result->points . \"</td>\";\n }\n $tpl->setVariable(\"Point\", $pointsHtml);\n\n $tpl->parseCurrentBlock();\n }\n }\n ////Exercise Part ////\n require_once ilPlugin::getPluginObject(IL_COMP_SERVICE, 'Repository', 'robj', 'TestOverview')\n ->getDirectory() . '/classes/mapper/class.ilExerciseMapper.php';\n $excMapper = new ilExerciseMapper();\n $grades = $this->getExerciseMarks($studId, $overviewId);\n $totalGrade = 0;\n\n foreach ($grades as $grade) {\n if ($this->isExerciseDeleted($grade->obj_id) == null) {\n $gradeName = $excMapper->getExerciseName($grade->obj_id);\n $totalGrade += $grade->mark;\n $tpl->setCurrentBlock(\"exercise_results\");\n $tpl->setVariable(\"Exercise\", $gradeName);\n $tpl->setVariable(\"Mark\", $grade->mark);\n $tpl->parseCurrentBlock();\n }\n }\n\n //// general Part /////\n if ($this->getNumTests($overviewId) == 0) {\n $averageNum = 0;\n } else {\n $averageNum = round($average / $this->getNumTests($overviewId), 2);\n }\n $tpl->setVariable(\"AveragePoints\", $averageNum);\n if ($maxPoints == 0) {\n $Prozentnum = 0;\n } else {\n $Prozentnum = (float) ($average / $maxPoints) * 100;\n }\n $lng->loadLanguageModule(\"crs\");\n $tpl->setVariable(\"averageMark\", $lng->txt('rep_robj_xtov_average_mark'));\n\n if (count($grades) > 0) {\n\n $tpl->setVariable(\"AverageMark\", $totalGrade / count($grades));\n }\n $tpl->setVariable(\"totalMark\", $lng->txt('rep_robj_xtov_total_mark'));\n $tpl->setVariable(\"TotalMark\", $totalGrade);\n\n $tpl->setVariable(\"Average\", round($Prozentnum, 2));\n /// ranking part /////\n $ilOverviewMapper = new ilOverviewMapper();\n $rank = $ilOverviewMapper->getRankedStudent($overviewId, $studId);\n $count = $ilOverviewMapper->getCount($overviewId);\n $date = $ilOverviewMapper->getDate($overviewId);\n if (!$rank == '0') {\n $tpl->setVariable(\"toRanking\", $rank . \" \" . $lng->txt('rep_robj_xtov_out_of') . \" \" . $count . \"<br> \".$lng->txt('rep_robj_xtov_lastupdate').\": \" . $date);\n } else {\n $tpl->setVariable(\"toRanking\", $lng->txt('links_not_available'));\n }\n $ilExerciseMapper = new ilExerciseMapper();\n $rank = $ilExerciseMapper->getRankedStudent($overviewId, $studId);\n $count = $ilExerciseMapper->getCount($overviewId);\n $date = $ilExerciseMapper->getDate($overviewId);\n if (!$rank == '0') {\n $tpl->setVariable(\"eoRanking\", $rank . \" \" . $lng->txt('rep_robj_xtov_out_of') . \" \" . $count . \"<br> \".$lng->txt('rep_robj_xtov_lastupdate').\": \" . $date);\n } else {\n $tpl->setVariable(\"eoRanking\", $lng->txt('links_not_available'));\n }\n\n return $tpl->get();\n }", "function cases_by_account($account_id) {\n\t $this->login();\n\t\tif ($this->ensure_portal() != -1) {\n\t\t\t$gel_parameters = array(\n\t\t\t\t\"session\" => $this->session,\n\t\t\t\t\"module_name\" => \"Cases\",\n\t\t\t\t\"query\" => \" cases.account_id = '\" . $account_id . \"' \",\n\t\t\t\t\"order_by\" => \" cases.case_number DESC \",\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"select_fields\" => array(),\n\t\t\t\t\"link_name_to_fields_array\" => array(),\n\t\t\t\t\"max_results\" => 100,\n\t\t\t\t\"deleted\" => 0,\n\t\t\t\t\"favorites\" => false,\n\t\t );\n\n\t\t $gel_results = $this->call(\"get_entry_list\", $gel_parameters);\n\n\t\t $cases = [];\n\n\t\t foreach($gel_results->entry_list as $entry) {\n\t\t $id = $entry->name_value_list->id->value;\n\t\t $name = $entry->name_value_list->name->value;\n\t\t $number = $entry->name_value_list->case_number->value;\n\t\t $cases[]= array(\"id\" => $id, \"name\" => $name, \"number\" => $number);\n\t\t }\n\n usort($cases, \"sort_cases\");\n\n\t\t return $cases;\n\t\t} else {\n\t\t\t$this->kick();\t\n\t\t}\n\t}", "function TestCaseRun_create($assignee, $build_id, $case_id, $case_text_version, $environment_id, $run_id, $canview = NULL, $close_date = NULL, $iscurrent = NULL, $notes = NULL, $sortkey = NULL, $testedby = NULL) {\n\t$varray = array(\"assignee\" => \"int\", \"build_id\" => \"int\", \"case_id\" => \"int\", \"case_text_version\" => \"int\", \"environment_id\" => \"int\", \"run_id\" => \"int\", \"canview\" => \"int\", \"close_date\" => \"string\", \"iscurrent\" => \"int\", \"notes\" => \"string\", \"sortkey\" => \"int\", \"testedby\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}" ]
[ "0.6492425", "0.64314806", "0.6285868", "0.58160394", "0.5789204", "0.56480044", "0.5642701", "0.5549096", "0.5523325", "0.5502683", "0.5456672", "0.5411015", "0.53852075", "0.53776026", "0.53773576", "0.53762895", "0.5369151", "0.5355081", "0.53198475", "0.53126186", "0.5309912", "0.5291851", "0.52425516", "0.5233963", "0.52081656", "0.51972437", "0.51888335", "0.5152614", "0.51489145", "0.5145048" ]
0.71293825
0
/ get_test_runs Get A List of Test Runs For An Existing Test Plan Usage TestPlan.get_test_runs Parameters ParameterData Type plan_idinteger Result Array [0] Array [build_id] [plan_text_version] [manager_id] [stop_date] [run_id] [plan_id] [product_version] [environment_id] [summary] [notes] [start_date] [1] Array ...
function TestPlan_get_test_runs($plan_id) { // Create call $call = new xmlrpcmsg('TestPlan.get_test_runs', array(new xmlrpcval($plan_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_get_test_case_runs($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_case_runs', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"plan\":\n\t\t\t\tunset($va);\n\t\t\t\tforeach($key as $k => $v) {\n\t\t\t\t\t$va[$k] = new xmlrpcval($v, \"string\");\n\t\t\t\t}\n\t\t\t\t$val = $va;\n\t\t\t\t$type = \"struct\";\n\t\t\t\tbreak;\n\t\t\tcase \"build_id\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"manager_id\":\n\t\t\tcase \"plan_id\":\n\t\t\tcase \"plan_text_version\":\n\t\t\tcase \"product_version\":\n\t\t\tcase \"run_id\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"notes\":\n\t\t\tcase \"start_date\":\n\t\t\tcase \"stop_date\":\n\t\t\tcase \"summary\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_get_test_cases($run_id) {\n\t// Create call\n\t// FIXME: not working\n\t$call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getRuns() {\n\t\tif(!$data = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/run_list.jsp?_plus=true')) {\n\t\t\tthrow new ErrorException($this->feedErrorMessage);\n\t\t}\n\t\treturn $data->runList;\n\t}", "function TestPlan_get_test_cases($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_cases', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_get_test_plan($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_plan', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getRuns()\n {\n return $this->runs;\n }", "function TestCaseRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"assignee\":\n\t\t\tcase \"build_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_run_id\":\n\t\t\tcase \"case_run_status_id\":\n\t\t\tcase \"case_text_version\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"iscurrent\":\n\t\t\tcase \"run_id\":\n\t\t\tcase \"sortkey\":\n\t\t\tcase \"testedby\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"close_date\":\n\t\t\tcase \"notes\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getMetrics(&$db,$userObj,$args, $result_cfg, $labels)\n{\n $debug = true;\n $begin_time = microtime(true);\n $user_id = $args->currentUserID;\n $tproject_id = $args->tproject_id;\n $linked_tcversions = array();\n $metrics = array();\n $tplan_mgr = new testplan($db);\n $show_platforms = false;\n $platforms = array();\n\n // get all tesplans accessibles for user, for $tproject_id\n $options = array('output' => 'map');\n $options['active'] = $args->show_only_active ? ACTIVE : TP_ALL_STATUS; \n $test_plans = $userObj->getAccessibleTestPlans($db,$tproject_id,null,$options);\n\n // Get count of testcases linked to every testplan\n // Hmm Count active and inactive ?\n $linkedItemsQty = $tplan_mgr->count_testcases(array_keys($test_plans),null,array('output' => 'groupByTestPlan'));\n \n \n $metricsMgr = new tlTestPlanMetrics($db);\n $show_platforms = false;\n \n $metrics = array('testplans' => null, 'total' => null);\n $mm = &$metrics['testplans'];\n $metrics['total'] = array('active' => 0,'total' => 0, 'executed' => 0);\n foreach($result_cfg['status_label_for_exec_ui'] as $status_code => &$dummy)\n {\n $metrics['total'][$status_code] = 0; \n } \n \n $codeStatusVerbose = array_flip($result_cfg['status_code']);\n if($debug){\n echo 'test_plans_count:'.count($test_plans).\"<br/>\";\n $index = 0;\n foreach($test_plans as $key => &$dummy)\n {\n $item_begin_time = microtime(true);\n // We need to know if test plan has builds, if not we can not call any method \n // that try to get exec info, because you can only execute if you have builds.\n //\n // 20130909 - added active filter\n $buildSet = $tplan_mgr->get_builds($key,testplan::ACTIVE_BUILDS);\n if( is_null($buildSet) )\n {\n continue;\n }\n\n $platformSet = $tplan_mgr->getPlatforms($key);\n if (isset($platformSet)) \n {\n $platforms = array_merge($platforms, $platformSet);\n } \n $show_platforms_for_tplan = !is_null($platformSet);\n $show_platforms = $show_platforms || $show_platforms_for_tplan;\n if( !is_null($platformSet) )\n {\n $neurus = $metricsMgr->getExecCountersByPlatformExecStatus($key,null,\n array('getPlatformSet' => true,\n 'getOnlyActiveTCVersions' => true));\n $mm[$key]['overall']['active'] = $mm[$key]['overall']['executed'] = 0;\n foreach($neurus['with_tester'] as $platform_id => &$pinfo)\n {\n $xd = &$mm[$key]['platforms'][$platform_id];\n $xd['tplan_name'] = $dummy['name'];\n $xd['platform_name'] = $neurus['platforms'][$platform_id];\n $xd['total'] = $xd['active'] = $neurus['total'][$platform_id]['qty'];\n $xd['executed'] = 0;\n \n foreach($pinfo as $code => &$elem)\n {\n $xd[$codeStatusVerbose[$code]] = $elem['exec_qty'];\n if($codeStatusVerbose[$code] != 'not_run')\n {\n $xd['executed'] += $elem['exec_qty'];\n }\n if( !isset($mm[$key]['overall'][$codeStatusVerbose[$code]]) )\n {\n $mm[$key]['overall'][$codeStatusVerbose[$code]] = 0;\n }\n $mm[$key]['overall'][$codeStatusVerbose[$code]] += $elem['exec_qty'];\n $metrics['total'][$codeStatusVerbose[$code]] += $elem['exec_qty']; \n }\n $mm[$key]['overall']['executed'] += $xd['executed'];\n $mm[$key]['overall']['active'] += $xd['active'];\n } \n unset($neurus);\n $mm[$key]['overall']['total'] = $mm[$key]['overall']['active']; \n $metrics['total']['executed'] += $mm[$key]['overall']['executed'];\n $metrics['total']['active'] += $mm[$key]['overall']['active'];\n }\n else\n {\n if($key == 764205){$my_begin_time = microtime(true);}\n $mm[$key]['overall']['builds'] = $metricsMgr->getBuildExecCountersByExecStatus($key,null,null);\n if($key == 764205){$my_end_time = microtime(true);echo 'my_diff:'.($my_end_time - $my_begin_time).\"<br/>\";}\n $mm[$key]['overall']['active'] = 0;\n foreach ($mm[$key]['overall']['builds'] as $build_id => $status_column)\n {\n $mm[$key]['overall']['active'] += $status_column['total'];\n foreach ($status_column as $status_code => $qty)\n {\n if(!isset($metrics['total'][$status_code]))\n {\n $metrics['total'][$status_code] = 0;\n }\n $metrics['total'][$status_code] += $qty;\n \n if (!isset($mm[$key]['overall'][$status_code]))\n {\n $mm[$key]['overall'][$status_code] = 0;\n }\n $mm[$key]['overall'][$status_code] += $qty;\n }\n }\n\n //$metrics['total']['executed'] += $mm[$key]['overall']['executed'];\n $metrics['total']['active'] += $mm[$key]['overall']['active'];\n \n $mm[$key]['platforms'][0] = $mm[$key]['overall'];\n $mm[$key]['platforms'][0]['tplan_name'] = $dummy['name'];\n $mm[$key]['platforms'][0]['platform_name'] = $labels['not_aplicable'];\n } \n $item_end_time = microtime(true);\n echo \"key:$key,diff_time:\".($item_end_time - $item_begin_time).\"<br/>\";\n $index ++;\n if($index > 2){\n break;\n }\n }\n}\n \n // remove duplicate platform names\n $platformsUnique = array();\n foreach($platforms as $platform) \n {\n if(!in_array($platform['name'], $platformsUnique)) \n {\n $platformsUnique[] = $platform['name'];\n }\n }\n \n $end_time = microtime(true);\n echo 'diff_time'.($end_time - $begin_time);\n return array($metrics, $show_platforms, $platformsUnique);\n}", "function TestPlan_get_builds($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_builds', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Environment_get_runs($environment_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Environment.get_runs', array(new xmlrpcval($environment_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}", "public function runTests() {\n $results = \"\";\n for ($i = 0; $i < sizeof($this->tests); $i++) {\n $results .= \"Test \" . ($i + 1) . \": \" . $this->tests[$i]->runTest() . \"<br>\";\n }\n return $results;\n }", "public function getTests();", "function TestRun_create($build_id, $environment_id, $manager_id, $plan_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function get_all_tests()\n\t{\n\t\treturn $this->db->get('test')->result();\n\t}", "function get_all_scheduled_tests()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('scheduled_tests')->result_array();\n }", "public function testLastRuns()\n {\n LastRun::truncate();\n LastRun::factory()->count(30)->create();\n\n $headers['Accept'] = 'application/json';\n\n $response = $this->get('/api/v1/runner/1/form-data', $headers);\n\n $response->assertStatus(200)->assertJsonStructure(['success', 'data' => ['last_runs'], 'status']);\n }", "function get_scheduled_test($id)\n {\n return $this->db->get_where('scheduled_tests',array('id'=>$id))->row_array();\n }", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "public function list_plan($parameters){\n try {\n $planList = Plan::all(array_filter($parameters), $this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLANS'] = $planList->toArray();\n $returnArray['RAWREQUEST']= json_encode($parameters);\n $returnArray['RAWRESPONSE']=$planList->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n } \n }", "public function getTestResults()\n\t{\n\t\t/*\n\t\t * Wenn die Tests noch nicht ausgeführt wurden, dies nun tun\n\t\t */\n\t\tif ($this->_needRun === true)\n\t\t{\n\t\t\t$this->run();\n\t\t}\n\t\tforeach ($this->_testCases as $key => $testCase)\n\t\t{\n\t\t\t/*\n\t\t\t * Zusicherung nicht erfüllt\n\t\t\t*/\n\t\t\tif ($testCase['assert'] !== $testCase['result'])\n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": fehlgeschlagen \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" != \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_failedTests++;\n\t\t\t}\n\t\t\t/*\n\t\t\t * Zusicherung erfüllt\n\t\t\t*/\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": erfolgreich \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" == \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_passedTests++;\n\t\t\t}\n\t\t} \n\t\treturn $this->_testResults;\t\n\t}", "function GetTestResults($testID)\n {\n try\n {\n $db = GetDBConnection();\n \n $query = 'SELECT * FROM ' . GetTestEntriesIdentifier() . ' WHERE'\n . ' ' . GetTestIdIdentifier()\n . ' = :' . GetTestIdIdentifier() . ';';\n \n $statement = $db->prepare($query);\n $statement->bindValue(':' . GetTestIdIdentifier(), $testID);\n \n $statement->execute();\n \n $row = $statement->fetch();\n \n $statement->closeCursor();\n \n return $row;\n }\n catch (PDOException $ex)\n {\n LogError($ex);\n }\n }", "function TestRun_get($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTests()\n {\n $tests = array();\n foreach ($this->benchmarks as $benchmark) {\n $tests += $benchmark->getTests();\n }\n\n return $tests;\n }", "public function getsAListOfPlans()\n {\n // Arrange\n // Act\n $plans = Ezypay::getPlans();\n\n // Assert\n //$this->assertEquals(3, sizeof($plans->data)); // Causing issues as there are aditional plans\n $this->assertNotNull($plans);\n\n $this->plans = $plans;\n }", "function getTests(){\n $listOfAvailableTests = parent::getTests();\n $url = get_instance()->uri->uri_string();\n $listOfSubTests = trim(Text::getSubstringAfter($url, '/subtests/'));\n if($listOfSubTests){\n $listOfSubTests = explode(',', $listOfSubTests);\n foreach($listOfSubTests as $key => &$subTest){\n $subTest = trim($subTest);\n if(!in_array($subTest, $listOfAvailableTests)){\n unset($listOfSubTests[$key]);\n echo \"Test '$subTest' does not exist as a test within \" . $this->getLabel() . \"<br/>\";\n }\n }\n $listOfSkippedTests = array_diff($listOfAvailableTests, $listOfSubTests);\n $this->reporter->paintSkip(count($listOfSkippedTests) . \" tests not run.\");\n $listOfAvailableTests = $listOfSubTests;\n }\n return $listOfAvailableTests;\n }", "public function setRuns($runs)\n {\n $this->runs = $runs;\n\n return $this;\n }", "public function run()\n {\n //populate the runs table with test data\n //userid, rundate, run_distance, pace_min, pace_sec\n $runs = [\n ['1', '2018-11-03', '3.0', '8', '22'],\n ['1', '2018-11-07', '3.2', '8', '15'],\n ['1', '2018-11-07', '3.5', '8', '21'],\n ['2', '2018-11-04', '2.1', '7', '47'],\n ];\n $count = count($runs);\n\n foreach ($runs as $key => $runData) {\n $run = new Runs();\n\n $run->created_at = Carbon\\Carbon::now()->subDays($count)->toDateTimeString();\n $run->updated_at = Carbon\\Carbon::now()->subDays($count)->toDateTimeString();\n $run->user_id = $runData[0];\n $run->run_date = $runData[1];\n $run->run_distance = $runData[2];\n $run->pace_min = $runData[3];\n $run->pace_sec = $runData[4];\n\n $run->save();\n $count--;\n }\n\n }", "public function getTests()\n\t{\n\t\t# code...\n\t\treturn $this->tests;\n\t}" ]
[ "0.70765567", "0.6252271", "0.6214779", "0.6209625", "0.6151228", "0.6066624", "0.60599697", "0.59579855", "0.5889547", "0.5845966", "0.57033396", "0.5693012", "0.56823015", "0.566761", "0.5627117", "0.5614166", "0.5563458", "0.54918855", "0.54554266", "0.5428114", "0.5391957", "0.53639394", "0.5298802", "0.5278006", "0.5268782", "0.5245381", "0.5236983", "0.5219983", "0.52060425", "0.5204769" ]
0.78091127
0
/ add_tag Add a tag to the given TestPlan Usage TestPlan.add_tag Parameters ParameterData TypeComments plan_idinteger tag_namestringCreates tag if it does not exist Result !== FALSE
function TestPlan_add_tag($plan_id, $tag_name) { // Create call $call = new xmlrpcmsg('TestPlan.add_tag', array(new xmlrpcval($plan_id, "int"), new xmlrpcval($tag_name, "string")), "array"); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_add_tag($run_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.add_tag', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_add_tag($case_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.add_tag', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function add_tag($tag) {\n if (!is_object($tag)) {\n return false;\n }\n if (!isset($tag->name) or\n !isset($tag->value) or\n !isset($tag->ticketid) or\n isset($tag->id)){\n\n return false;\n }\n\n if (!insert_record('helpdesk_ticket_tag', $tag)) {\n return false;\n }\n\n // Lets make an update saying we added this tag.\n $dat = new stdClass;\n $dat->ticketid = $this->id;\n $dat->notes = get_string('tagaddedwithnameof', 'block_helpdesk') . $tag->name;\n $dat->status = HELPDESK_NATIVE_UPDATE_TAG;\n $dat->type = HELPDESK_UPDATE_TYPE_DETAILED;\n\n if(!$this->add_update($dat)) {\n notify(get_string('cantaddupdate', 'block_helpdesk'));\n }\n\n // Update modified time and refresh the ticket.\n $this->store();\n $this->fetch();\n return true;\n }", "private function addTag()\n {\n $params = array();\n $params['db_link'] = $this->db;\n $params['ticket_id'] = $_REQUEST['ticket_id'];\n \n $data = array();\n $tagTitle = stripslashes(trim($_REQUEST['tag']));\n $tag = Utils::sanitize($tagTitle);\n \n $Tickets = new Tickets($params);\n $Tickets->addTag($tag, $tagTitle);\n \n echo '[{\"isError\":0, \"message\":\"Successfully added tag\"}]';\n exit;\n }", "public function addTag( $data = array() ) { \t\n\n $url = $this->_base_url . 'tags';\n $options['data']['tag'] = $data;\n $options['post'] = true;\n $this->_callAPI($url, $options);\n }", "public function addTag($tag) {\n $this->init(); //it would actually work without it\n\n if (!in_array($tag,$this->tags)) {\n $tag = trim($tag);\n\n $this->tags['new'][] = $tag;\n return true;\n }\n\n return false;\n }", "public function addTag($tagData)\n {\n $this->clickButton('add_new_tag');\n $this->fillTagSettings($tagData);\n $this->saveForm('save_tag');\n }", "public function addNewTag($tagName) {\n $sql = \"INSERT INTO t_tags VALUES(?)\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"s\", $tagName);\n $select->execute();\n $select->close();\n }", "function add_tag($tag) {\n array_push($this->tags, $tag);\n }", "public function createTag($tag){\n\t\t$user = $this->getUser();\n\t\tif(!isset($user[\"id\"]))return false;\n\t\tif(is_array($tag)){\n\t\t\t$success = true;\n\t\t\tforeach($tag as $t){\n\t\t\t\tif(!$this->createTag($t)){\n\t\t\t\t\t$success = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $success;\n\t\t}else{\n\t\t\t$tags = $this->getTag($tag);\n\t\t\tif(isset($tags[\"tagid\"])){\n\t\t\t\treturn $tags[\"tagid\"];\n\t\t\t}\n\t\t\tif(strlen(trim($tag))<3)return false;\n\t\t\t$tag = strtolower($tag);\n\t\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") creates tag '\".$tag.\"'\");\n\t\t\t$query = Queries::createtag($tag);\n\t\t\treturn $this->query($query);\n\t\t}\n\t}", "public function add_tag($tag, $message = null) {\n\t\t\tif ($message === null) {\n\t\t\t\t$message = $tag;\n\t\t\t}\n\t\t\treturn $this->run(\"tag -a $tag -m \" . escapeshellarg($message));\n\t\t}", "public function addTag($tag_name)\n\t{\n\t\t$tag = PortfolioTag::getTagByName($tag_name, true);\n\n\t\t$command = Yii::app()->db->createCommand('INSERT INTO {{portfolio_portfolio_tag}} SET portfolio_id = :model_id, tag_id = :tag_id');\n\n\t\t$command->bindValues(\n\t\t\tarray(\n\t\t\t\t':model_id' => $this->id,\n\t\t\t\t':tag_id' => $tag->id,\n\t\t\t)\n\t\t);\n\n\t\treturn $command->execute();\n\t}", "function addIndusTag($indus_tag_details){\n\t if ($this->db->insert('vc_indus_tag',$indus_tag_details))\n\t\t\t{ \n\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\treturn FALSE;\n\t\t\t}\n }", "public function testAddPackingPlanTag()\n {\n }", "public function addTag($tag)\n {\n $this->tags[] = $tag;\n $this->processTags();\n }", "public function add() {\n\t\t$this->display ( 'admin/tag/add.html' );\n\t}", "public function addTag($imageId, $tag) {\n $dataToInsert = [\n 'image_id' => $imageId,\n 'tag' => filter_var($tag, FILTER_SANITIZE_STRING)\n ];\n $result = Db::insert('tags', $dataToInsert);\n\n return $result;\n }", "public function addTag($tag)\r\n {\r\n if (!empty($this->data['props']['taglist'])) {\r\n $this->data['props']['taglist'] .= ',' . $tag;\r\n } else {\r\n $this->data['props']['taglist'] = $tag;\r\n }\r\n }", "function addFuncTag($func_tag_details){\n\t if ($this->db->insert('vc_func_tag',$func_tag_details))\n\t\t\t{ \n\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\treturn FALSE;\n\t\t\t}\n }", "public static function add_tag($name) {\n global $wpdb;\n $data = array(\n 'name' => $name\n );\n\n // Si no se inserta nada, retornamos false\n if (!$wpdb->insert('XTB_TAGS', $data, array('%s'))) {\n return null;\n }\n\n return $wpdb->insert_id;\n //return true;\n }", "public function tagged( $tag );", "public function insert(Tag $tag);", "public function addTagToImage($imageID, $tagName) {\n $sql = \"INSERT INTO t_tags_included VALUES(?,?)\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"ss\", $tagName, $imageID);\n $select->execute();\n $select->close();\n }", "public function addTag($tag, $entryid, $user){\n\t\t$tag = preg_replace('/[^a-zA-Z0-9äöüßÄÖÜ]/i', \"\", $tag);\n\t\tif(!isset($user)){\n\t\t\t$user = $this->getUser();\n\t\t}\n\t\tif(!isset($entryid[\"id\"])){\n\t\t\t$entry = $this->getEntry($entryid);\n\t\t}else{\n\t\t\t$entry = $entryid;\n\t\t}\n\t\tif(!$user\n\t\t\t||!$entry\n\t\t\t||($entry[\"userid\"]!=$user[\"id\"] && $user[\"status\"]!=DBConfig::$userStatus[\"admin\"])){\n\t\t\treturn false;\n\t\t}\n\n\t\tif(is_array($tag)){\n\t\t\t$success = true;\n\t\t\tforeach($tag as $t){\n\t\t\t\tif(!$this->addTag($t, $entry, $user)){\n\t\t\t\t\t$success = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $success;\n\t\t}else{\n\t\t\t$tagid = $this->createTag($tag);\n\t\t\tif($tagid == false)return false;\n\t\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") adds the tag '$tag' to #\".$entry[\"id\"].\" (\".$entry[\"title\"].\")\");\n\t\t\t$query = Queries::addTag($tagid, $entry[\"id\"]);\n\t\t\treturn $this->query($query);\n\t\t}\n\t}", "public function addTag(string $name, TagInterface $tag, string $placement = null);", "public function addTag(Tag $tag)\n {\n throw new \\RuntimeException('Adding a tag on an ImageVariant is not supported.', 1371237593);\n }", "public function attachTag(Tag $tag)\n {\n $elementTagClass = $this->getElementTagClass();\n\n $transaction = static::getDb()->beginTransaction();\n try {\n // open space to add composite\n $elementTag = Yii::createObject($elementTagClass);\n $elementTag->{$this->getElementIdColumn()} = $this->id;\n $elementTag->{$this->getTagIdColumn()} = $tag->id;\n $status = $elementTag->save();\n $transaction->commit();\n } catch(\\Exception $e) {\n $transaction->rollBack();\n $status = false;\n }\n return $status;\n }", "public function addSingleTag($tag, $id = null)\n {\n try {\n if (!empty($id)) {\n $result = $this->database->prepare('UPDATE tags SET name = :name WHERE id = :id');\n } else {\n $result = $this->database->prepare('INSERT INTO tags (name) VALUES (:name)');\n }\n $result->bindParam('name', $tag);\n if (!empty($id)) {\n $result->bindParam('id', $id);\n }\n if ($result->execute()) {\n if (!empty($id)) {\n return true;\n } else {\n $tag_id = $this->database->lastInsertId();\n return $tag_id;\n }\n } \n } catch (Exception $e) {\n $e->getMessage();\n }\n return false;\n }", "public function is_tag($tag = '')\n {\n }", "function addATag() {\n $query = \"INSERT INTO PushpinTags SET tags = '$this->tag', pushpin_ID = LAST_INSERT_ID();\";\n\n // prepare query\n $stmt = $this->conn->prepare($query);\n\n // execute query\n if($stmt->execute()){\n return true;\n }\n return false;\n }" ]
[ "0.7013257", "0.69613725", "0.6899585", "0.6730745", "0.64557195", "0.63438064", "0.6153227", "0.6112832", "0.60972506", "0.60134345", "0.59356517", "0.5838106", "0.5820083", "0.5806055", "0.5781202", "0.57768214", "0.5764412", "0.57588005", "0.57407546", "0.57354724", "0.5735387", "0.5709878", "0.56883913", "0.566755", "0.56563014", "0.56562907", "0.5641535", "0.5626369", "0.56009954", "0.5587806" ]
0.75357324
0
/ remove_tag Remove a tag from the given TestPlan Usage TestPlan.remove_tag Parameters ParameterData Type plan_idinteger tag_namestring Result 0
function TestPlan_remove_tag($plan_id, $tag_name) { // Create call // $call = new xmlrpcmsg('TestPlan.remove_tag', array(new xmlrpcval(array("plan_id" => new xmlrpcval($plan_id, "int"), "tag_name" => new xmlrpcval($tag_name, "string")), "struct"))); $call = new xmlrpcmsg('TestPlan.remove_tag', array(new xmlrpcval($plan_id, "int"), new xmlrpcval($tag_name, "string"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_remove_tag($run_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.remove_tag', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_remove_tag($case_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.remove_tag', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function delete_tag($tag);", "public function removeTag(string $name);", "public function remove($tag) { //+\n\t\tunset($this->arShortcodes[$tag]);\n\t}", "public function removeTag()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_tag]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_tag]);\n\t\t}\n\t}", "private function removeTag($tagName)\n\t{\n\t\tif (is_null($tagName) || $tagName == '') return;\n\n $tag = Tag::where('tag', '=', $tagName)->first();\n\n\t\tif (is_object($tag))\n\t\t{\n\t\t\tif ($tag->count > 0) TagUtil::decrementCount($tagName, 1, $tag);\n\n\t\t\t// return collection object\n\t\t\t$tagPivot = $this->tags()->wherePivot('tag_id', '=', $tag->id)->get();\n\t\t\t\n\t if ($tagPivot->count()) $this->tags()->detach($tag->id);\n\t\t}\n\t}", "public function removeTag($tag_name)\n\t{\n\t\t$tag = PortfolioTag::getTagByName($tag_name);\n\n\t\tif (!empty($tag)) // Это не должно произойти, тэг должен быть всегда найден\n\t\t{\n\t\t\t$command = Yii::app()->db->createCommand('DELETE FROM {{portfolio_portfolio_tag}} WHERE portfolio_id = :model_id AND tag_id = :tag_id');\n\n\t\t\t$command->bindValues(\n\t\t\t\tarray(\n\t\t\t\t\t':model_id' => $this->id,\n\t\t\t\t\t':tag_id' => $tag->id,\n\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn $command->execute();\n\t\t}\n\n\t\treturn false;\n\t}", "public function removeByTag($tag, $force = false);", "public function removeTags()\n\t{\n\t\tforeach ($this->argsArray(func_get_args()) as $tag) {\n\t\t\t$this->removed_tags[] = $tag;\n\t\t}\n\t}", "public function delTag($id, $tag)\n {\n $this->db->update(array('id'=>$id), array('$pull'=>array('tags'=>$tag)));\n }", "public function unTag($objid, $tag);", "public function removeShortCode($tag)\n {\n remove_shortcode($tag);\n }", "function remove_tag($id) {\n global $CFG;\n if (!is_numeric($id)) {\n return false;\n }\n\n $tag = get_record('helpdesk_ticket_tag', 'id', $id);\n\n $result = delete_records('helpdesk_ticket_tag', 'id', $id);\n if (!$result) {\n return false;\n }\n // Lets make an update!\n\n $dat = new stdClass;\n $dat->ticketid = $this->id;\n $dat->notes = get_string('tagremovewithnameof', 'block_helpdesk') . $tag->name;\n $dat->status = HELPDESK_NATIVE_UPDATE_UNTAG;\n $dat->type = HELPDESK_UPDATE_TYPE_DETAILED;\n\n if(!$this->add_update($dat)) {\n notify(get_string('cantaddupdate', 'block_helpdesk'));\n }\n\n $this->store();\n return true;\n }", "public function deleteTag($imageID, $tagName) {\n $sql = \"DELETE FROM t_tags_included WHERE fk_pk_tags=? AND fk_pk_bild_id=?\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"ss\", $tagName, $imageID);\n $select->execute();\n $select->close();\n }", "public function deleteTag($tag){\n\t\tif(is_array($tag)){\n\t\t\t$success = true;\n\t\t\tforeach($tag as $t){\n\t\t\t\tif(!$this->deleteTag($t)){\n\t\t\t\t\t$success = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $success;\n\t\t}else{\n\t\t\t$user = $this->getUser();\n\t\t\t$singletag = $this->getTag($tag);\n\t\t\tif(!isset($user[\"id\"])||!isset($singletag[\"tagid\"])){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif($user[\"status\"] == DBConfig::$userStatus[\"admin\"]){\n\t\t\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") deletes tag '\".$tag.\"'\");\n\t\t\t\t$query = Queries::deletetag($singletag[\"tagid\"]);\n\t\t\t\tif(!$this->query($query))return false;\n\t\t\t\t$query = Queries::removetag($singletag[\"tagid\"]);\n\t\t\t\treturn $this->query($query);\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "function photos_removeTag ($tag_id) {\n\t\t$response = $this->execute(array('method' => 'flickr.photos.removeTag', 'tag_id' => $tag_id));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function testRemoveTag_UsingCleanTags() {\n foreach ($this->photo->getTags() as $tag) {\n $this->photo->removeTag($tag);\n }\n $this->photo->addTags(array('something', 'another', '2004'));\n sleep(1);\n\n $this->photo->removeTag('another');\n\n $result = $this->photo->getTags();\n $this->assertEquals(array('something', '2004'), $result);\n }", "public function destroy(Tag $tag)\n {\n //\n }", "public function destroy(Tag $tag)\n {\n //\n }", "private static function DeleteTag($tag)\n {\n global $SESSDB;\n \n // First delete entries in sdat\n $q = $SESSDB->prepare(\"DELETE FROM `sdat` WHERE sdat.id IN(SELECT smap.id FROM `smap` WHERE tag=:tag)\");\n $q->bindParam(':tag', $tag);\n $q->execute();\n\n // Now smap...\n $q = $SESSDB->prepare(\"DELETE FROM `smap` WHERE tag=:tag\");\n $q->bindParam(':tag', $tag);\n $q->execute();\n }", "public function setRemoveTag($tag) {\n\t\t$this->removeTags[] = $this->trimTags($tag);\n\t}", "function testRemoveTag_UsingMessyTags() {\n foreach ($this->photo->getTags() as $tag) {\n $this->photo->removeTag($tag);\n }\n $this->photo->addTags(array('some thing!', 'a-nother.', '2004'));\n sleep(1);\n\n $this->photo->removeTag('another');\n\n $result = $this->photo->getTags();\n $this->assertEquals(array('something', '2004'), $result);\n }", "public function removeTag($tagName)\n\t{\n\t\t$tagName = (string)$tagName;\n\n\t\tif ( $this->hasTag($tagName) ) {\n\t\t\treturn $this->tags[ $tagName ];\n\t\t}\n\t}", "public function removeTag($tag){\n\n if (!$tag){\n return false;\n }\n if (is_string($tag)) {\n $tag = array($tag);\n }\n if (!count($tag)) {\n return false;\n }\n $deleteTags = array();\n\n foreach ($tag as $t) {\n $deleteTags[] = $this->_keyFromTag($t);\n $deleteKeys = $this->getKeysByTag($t);\n $this->remove($deleteKeys);\n }\n if ($deleteTags && count($deleteTags)) {\n $this->getAdapter()->delete($deleteTags);\n }\n return true;\n }", "public function removeTag($tag) {\n $this->init(); //we actually may do without it\n\n if (in_array($tag, $this->tags)) {\n $key = array_search($tag, $this->tags);\n $this->tags['del'][] = $key;\n unset($this->tags[$key]);\n\n return true;\n } else if (in_array($tag, $this->tags['new'])) {\n $key = array_search($tag, $this->tags['new']);\n unset($this->tags['new'][$key]);\n\n return true;\n }\n\n return false;\n }", "protected function _linkRemoveTag($tag)\n {\n return Horde::url('browse.php')\n ->add(array('actionID' => 'remove', 'tag' => $tag));\n }", "public function deleteRefTag($id_tag){\n $index = -1;\n foreach ($this->_id_tags_arr as $index_temp => $id_tag_temp){\n if($id_tag_temp == $id_tag){\n $index= $index_temp;\n break;\n }\n }\n if ($index!=-1){\n unset ($this->_id_tags_arr[$index]);\n //reindexo para evitar que me queden posiciones vacias en el array\n $this->_id_tags_arr = array_values($this->_id_tags_arr);\n }else{\n throw new Exception('deleteRefTag');\n }\n }", "function deleteTag( $iTag ){\n $oSql = Sql::getInstance( );\n clearCache( 'tags' );\n $oSql->query( 'DELETE FROM tags WHERE iTag = \"'.$iTag.'\" ' );\n $oSql->query( 'DELETE FROM pages_tags WHERE iTag = \"'.$iTag.'\" ' );\n\n generateTagsLinks( );\n}", "private function removeTag(int $currentTagPtr, int $tagEndPtr): void\n {\n $this->phpcsFile->fixer->beginChangeset();\n\n for ($tokenPtr = $currentTagPtr; $tokenPtr < $tagEndPtr; $tokenPtr++) {\n $this->phpcsFile->fixer->replaceToken($tokenPtr, '');\n }\n\n $this->phpcsFile->fixer->endChangeset();\n }" ]
[ "0.75707465", "0.7439514", "0.7064744", "0.6694994", "0.66887045", "0.6523577", "0.6402688", "0.6340344", "0.6178724", "0.615465", "0.6148705", "0.60942864", "0.60791975", "0.60257965", "0.59780383", "0.59307677", "0.59295577", "0.5886967", "0.58473504", "0.58473504", "0.58355385", "0.58338505", "0.58217096", "0.5778687", "0.57766825", "0.5776026", "0.576481", "0.5730443", "0.572661", "0.5698321" ]
0.81295854
0
/ get_tags Get a list of tags for the given TestPlan Usage TestPlan.get_tags Parameters ParameterData Type plan_idinteger Result Array [0] [plan_count] [tag_name] [case_count] [run_count] [tag_id] [1] Array ...
function TestPlan_get_tags($plan_id) { // Create call $call = new xmlrpcmsg('TestPlan.get_tags', array(new xmlrpcval($plan_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCase_get_tags($case_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.get_tags', array(new xmlrpcval($case_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_get_tags($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_tags', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTags() {\n try {\n $getTagsOperation = new GetTags();\n\n $getTagsResponse = $this->apiCall($getTagsOperation);\n $tagsList = $getTagsResponse->getData();\n\n if ($getTagsResponse->isSuccess()) {\n\n $response = [];\n\n if(is_array($tagsList) && count($tagsList) > 0) {\n foreach ($tagsList as $item) {\n $response[] = [\n 'id' => $item['tagId'],\n 'name' => $item['name']\n ];\n }\n }\n return $response;\n }\n }catch (\\Exception $e){\n throw new \\Exception($e->getMessage());\n }\n }", "public function getTags() {}", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags();", "private function _getAllTags() {\n\n\t\t$param = [\n\t\t\t'table' => 'tags',\n\t\t\t'select' => '*'\n\t\t];\n\n\t\tif($this->CI->input->get()) {\n\t\t\tif(isset($this->CI->input->get['fields'])) { $param['select'] = $this->CI->input->get['fields']; }\n\t\t\tif(isset($this->CI->input->get['type'])) { $param['where'] = ['type' => $this->CI->input->get['type']]; }\n\t\t}\n\n\t\t$data = $this->CI->model->get($param);\n\t\tif(count($data)) { $this->CI->exitCode = 200; }\n\t\treturn ['data' => $data];\n\t}", "public function getTags() {\n\t\t$tags = array();\n\n\t\ttry {\n\t\t\t/** @var Thrive_Dash_Api_KlickTipp $api */\n\t\t\t$api = $this->get_api();\n\t\t\t$tags = $api->getTags();\n\t\t} catch ( Exception $e ) {\n\n\t\t}\n\n\t\treturn $tags;\n\t}", "public function tag_list()\n {\n $this->pushpin_id = $_GET['pushpinId'];\n\n $query = \"SELECT tags\nFROM PushpinTags\nWHERE pushpin_ID= '$this->pushpin_id'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n }", "function getTags($tag) {\n \n \t$tags_request_url = sprintf($this->api_urls['tags'], $tag, $this->access_token);\n \t\n \treturn $this->__apiCall($tags_request_url);\n \n }", "public function testTags()\n\t{\n\t\t$this->call('GET', '/api/tags');\n\t}", "function getTags() {\n\t\t$db = Database::getInstance();\n\t\t$mysqli = $db->getConnection();\n\t\t\n\t\t$tagsArray = array();\n\t\t\t$sql_query = \"select tagnaam,tagid from tag where status=6\";\n\t\t\t$result = $mysqli->query($sql_query);\n\t\t\t\n\t\t\twhile ( $row = $result->fetch_object () ) {\n\t\t\t\t$Tag = new Tag();\n\t\t\t\t$Tag->tagId = $row->tagid;\n\t\t\t\t$Tag->tagName = $row->tagnaam;\n\t\t\t\tarray_push($tagsArray, $Tag);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$result->close();\n\t\t\treturn $tagsArray;\n\t}", "public function getTags($param){\n\tif(!isset($param['type']) OR !isset($param['tag_group_id']) OR !isset($param['account_id'])){\n\t return false;\n\t}\n\t$this->load->model('Logic_tag_relation');\n\t$result = $this->Logic_tag_relation->getTags($param);\n\treturn $result;\n }", "public function testGetTags()\n {\n $helix = new Helix(self::$tokenProvider);\n $tagsApi = $helix->tags;\n $tags = $tagsApi->getTags();\n \n $this->assertNotNull($tags);\n $this->assertIsArray($tags);\n\n // Twitch should have more than 20 available tags, so we check that the cursor is available\n $hasMoreResults = $tagsApi->hasMoreTags();\n $this->assertTrue($hasMoreResults);\n\n // Try to get a specific tag by its ID, using the previous results to get the ID.\n $firstTag = reset($tags);\n $onlyTag = $tagsApi->getTags([$firstTag->tag_id]);\n\n $this->assertCount(1, $onlyTag);\n $this->assertEquals($firstTag, reset($onlyTag));\n\n return $firstTag->tag_id;\n }", "public function getTags():array;", "private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "function getTags($talentID)\r\n\t{\r\n\t\t$db = Database::getInstance ();\r\n\t\t$mysqli = $db->getConnection ();\r\n\t\t$tagArray = array();\r\n\t\t$sql_query = \"select * from talent_has_tag where talent_talentid = \".$talentID;\r\n\t\t$result = $mysqli->query ( $sql_query );\r\n\t\twhile ( $row = $result->fetch_object () ) {\r\n\t\t\t$sql_query2 = \"select * from tag where tagid = \" . $row->tag_tagid;\r\n\t\t\t$result2 = $mysqli->query ( $sql_query2 );\r\n\t\t\t\r\n\t\t\twhile ( $row2 = $result2->fetch_object () ) {\r\n\t\t\tarray_push ( $tagArray, $row2->tagnaam);\r\n\t\t\t}\t\t\t\r\n\t\t}\t\r\n\t\t\r\n\t\t// return an array with tags\r\n\t\treturn $tagArray;\r\n\t}", "public function getTagList();", "public function getTags()\n {\n $response = $this->client->post('tags', $this->config);\n\n $tags = new IntegrationTagsCollection;\n if ($response->getStatusCode() == 200 and $result = @json_decode($response->getBody())) {\n\n if (is_array($result) && count($result) > 0) {\n foreach ($result as $key => $tag) {\n $tags->push(new IntegrationTag([\n 'id' => $tag->tag_id,\n 'name' => $tag->tag_name,\n ]));\n }\n }\n }\n\n return $tags;\n }", "public function tags();", "public static function get_tags() {\n global $wpdb;\n $query = \"SELECT * FROM XTB_TAGS\";\n return $wpdb->get_results($query);\n }", "public function getTags()\n {\n try {\n $statement = $this->database->prepare('SELECT name FROM tags ORDER BY name');\n $statement->execute();\n $tags = array_map(function($t) { return $t['name'];}, $statement->fetchAll());\n } catch (Exception $e) {\n $e->getMessage();\n }\n \n return $tags;\n }", "public function get_tags()\r\n\t{\r\n\t\t$xml = $this->call(PicasaAPI::$QUERY_URLS['picasa'] . \"?kind=tag\");\r\n\t\treturn $xml;\r\n\t}", "protected function getTagsInfo() {\n $smapFilter = '';\n if(!empty($this->filterId)) {\n $smapFilter = ' AND ct.smap_id = ' . $this->filterId;\n }\n $result = $this->dbh->select('SELECT COUNT(ctl.' . $this->bindedBlock->getPK() . ') as frq,ctl.tag_id FROM '\n . $this->dbh->getTagsTablename($this->bindedBlock->getTableName())\n . ' ctl INNER JOIN ' . $this->bindedBlock->getTableName() . ' ct '\n . 'WHERE ctl.' . $this->bindedBlock->getPK() . ' = ct.' . $this->bindedBlock->getPK()\n . $smapFilter\n . ' GROUP BY tag_id');\n return $result;\n }", "public function getTagList() {\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tThe tags table as a multi-dimensional array\n\t\t$sql = <<<EOD\n\t\tSELECT\n\t\t\t{$this->wpdb->prefix}topspin_tags.name\n\t\tFROM {$this->wpdb->prefix}topspin_tags\n\t\tWHERE\n\t\t\t{$this->wpdb->prefix}topspin_tags.artist_id = %d\nEOD;\n\t\t$data = $this->wpdb->get_results($this->wpdb->prepare($sql,array($this->artist_id)),ARRAY_A);\n\t\t##\tSet Default Status\n\t\tforeach($data as $key=>$row) {\n\t\t\t$data[$key]['status'] = 0;\n\t\t}\n\t\treturn $data;\n\t}", "public function getTags(){\n\t\tif (!is_array($this->_known_tags)){\n\t\t\t$desc = $this->getDescription();\n\t\t}\n\t\treturn $this->_known_tags;\n\t}" ]
[ "0.67220074", "0.6638129", "0.64278823", "0.64063376", "0.6349138", "0.6349138", "0.6349138", "0.6349138", "0.6349138", "0.627948", "0.62348557", "0.6130197", "0.6099638", "0.6064537", "0.6059622", "0.60344124", "0.6018167", "0.6015275", "0.59855944", "0.59855944", "0.59673715", "0.5961063", "0.5848316", "0.58464736", "0.58364195", "0.58057576", "0.58054656", "0.5775838", "0.577566", "0.57719964" ]
0.7773918
0
/ lookup_type_id_by_name Lookup A TestPlan Type ID By Its Name Usage TestPlan.lookup_type_id_by_name Parameters ParameterData TypeComments namestringCannot be null or empty string Result type_id
function TestPlan_lookup_type_id_by_name($name) { // Create call $call = new xmlrpcmsg('TestPlan.lookup_type_id_by_name', array(new xmlrpcval($name, "string"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestPlan_lookup_type_name_by_id($type_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_name_by_id', array(new xmlrpcval($type_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getResourceTypeId($name){\n return sqlSelectOne(\"SELECT * FROM types WHERE type_name='$name'\", 'type_id');\n}", "function getTypeName($id){\n return sqlSelectOne(\"SELECT * FROM types WHERE type_id={$id}\", 'type_name');\n}", "function getResourceTypeName($id){\n return sqlSelectOne(\"SELECT * FROM types WHERE type_id='$id'\", 'type_name');\n}", "private function resolveType(string $typeString): ?int\n {\n foreach ($this->billTypes as $type) {\n if ($type->name === $typeString || $type->label === $typeString) {\n return $type->id;\n }\n }\n\n return null;\n }", "public function getMatchingTypeName();", "abstract protected function get_typeid();", "public function getTypeIdentifier();", "public static function lookupTypeID($typeName)\n {\n if (isset(self::$things[$typeName]))\n {\n return (self::$things[$typeName]);\n }\n else\n {\n foreach (self::$things as $key => $thing)\n {\n $trimmedKey = preg_replace(\"/[^A-Za-z0-9]/\", '', $key);\n $things[$trimmedKey] = $thing;\n }\n if (isset($things[$typeName]))\n {\n return ($things[$typeName]);\n }\n return FALSE;\n }\n }", "private function getTypeID($typeName)\n {\n $getTypeIDQuery = 'SELECT questionTypeID FROM question_types WHERE typeName = ?';\n $getTypeID = mysqli_stmt_init($this->link);\n mysqli_stmt_prepare($getTypeID, $getTypeIDQuery);\n mysqli_stmt_bind_param($getTypeID, 's', $typeName);\n mysqli_stmt_execute($getTypeID); //Executes the statement\n $result = mysqli_stmt_get_result($getTypeID)->fetch_row(); //Retrieves the first rows results\n return $result[0]; //Returns result value\n }", "function get_type_name_by_id_custom1($type,$type_id='',$field='name')\n \t{ $type1='surgery'; //table field name\n \t return $this->db->get_where($type,array($type1.'_id'=>$type_id))->row()->$field; \n \t}", "function getDbTypeID($connect, $type_name)\n {\n $type_id = \"\";\n $sql = \"SELECT ID FROM qpkg_type WHERE Name LIKE '$type_name'\";\n $result = mysqli_query($connect, $sql);\n while ($row = mysqli_fetch_array($result)) {\n $type_id = $row['ID'];\n }\n \n\t\treturn $type_id;\n }", "protected function _lookup($type, $src) {}", "function culturefeed_get_searchable_type($name) {\n $options = culturefeed_get_searchable_types();\n return isset($options[$name]) ? $options[$name] : NULL;\n}", "function get_type_name($type_name) {\nglobal $db;\n$query = 'SELECT * FROM types\n WHERE typeID = :type_id';\n$statement = $db->prepare($query);\n$statement->bindValue(':type_id', $type_id);\n$statement->execute();\n$type = $statement->fetch();\n$type_name = $type['vehicleTypes'];\n$statement->closeCursor();\nreturn $type_name;\n}", "public function get_type(string $type_name)\n {\n }", "abstract protected function get_typestring();", "function get_test_type()\n{\n return do_test_get_test_type((int)getreq('type'));\n}", "public function findByName(Type $var = null)\n {\n # code...\n }", "public static function getTypeIdByTypeName($type_name) {\n\t\t$mapping = [\n\t\t\t'dbl' => ITEM_VALUE_TYPE_FLOAT,\n\t\t\t'str' => ITEM_VALUE_TYPE_STR,\n\t\t\t'log' => ITEM_VALUE_TYPE_LOG,\n\t\t\t'uint' => ITEM_VALUE_TYPE_UINT64,\n\t\t\t'text' => ITEM_VALUE_TYPE_TEXT\n\t\t];\n\n\t\tif (array_key_exists($type_name, $mapping)) {\n\t\t\treturn $mapping[$type_name];\n\t\t}\n\n\t\t// Fallback to float.\n\t\treturn ITEM_VALUE_TYPE_FLOAT;\n\t}", "function TestCase_lookup_category_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function local_get_by_string($type, $string){\n\t\tif(Tool::is_int($string)){\n\t\t\treturn $this->local_get_by_id($type, $string);\n\t\t}else{\n\t\t\treturn $this->local_get_by_map($type, ['name'=>$string]);\n\t\t}\n\t}", "function Build_lookup_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getCreateSampleTypeID($parameters){\n\t$idSampleType = '0';\n\t$sampleTypeName = '';\n\t\n\t$ownConnection = false;\n\t//Make a connection to the DB if none is given.\n\tif(isset($parameters['connection'])){\n\t\t\t$connection = $parameters['connection'];\n\t}\n\telse{\n\t\t$connection = makeConnectionToDIAMONDS();\n\t\t$ownConnection = true;\n\t}\n\t\n\t//Check if all the required fields are given.\n\tif(isset($parameters['name'])){\n\t\t$sampleTypeName = $parameters['name'];\n\t}\n\t\n\tif(isset($parameters['idSampleType'])){\n\t\t$idSampleType = $parameters['idSampleType'];\n\t}\n\t\n\t//Check if sampleType already exist, if yes return that id\n\t$query = \"SELECT idSampleType FROM tSampleType WHERE idSampleType = \".$idSampleType.\" OR name = '$sampleTypeName'\";\n\t\n\t$id = '';\n\t\n\tif ($result = mysqli_query($connection, $query)) {\n\t\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t\t$id = $row['idSampleType'];\n\t\t}\n\t}\n\t\n\t//Create the sampleType if it does not yet exist\n\tif($id == ''){\n\t\n\t\t$sqlStatement = \"INSERT INTO tSampleType (name) VALUES(?)\";\n\t\t\t\n\t\t$sqlQuery = prepareSQLStatement($connection, $sqlStatement);\n\t\t\n\t\t//Bind the variables to the SQL parameters\n\t\t$sqlQuery->bind_param('s',\n\t\t$sampleTypeName\n\t\t);\n\t\t\n\t\t$id = executeSQLStatementGetID($connection, $sqlQuery);\n\t\t$connection->commit();\n\t\t\n\t\techo \"<p><font color=orange>SampleType: \".$sampleTypeName. \" created in DIAMONDS DB</font></p>\";\n\t}\n\t\n\tif($ownConnection == true){\n\t\tcloseConnectionDB($connection);\n\t}\n\t\n\treturn $id;\n\t\n}", "static function getLookupValueDescription($lookuptype, $lookuptypevalue) {\n\t\t$sql = \"SELECT lv.lookupvaluedescription FROM lookuptypevalue lv INNER JOIN lookuptype l ON (lv.lookuptypeid = l.id AND l.`name` = '\".$lookuptype.\"' AND lv.lookuptypevalue = '\".$lookuptypevalue.\"')\";\n\t\t$conn = Doctrine_Manager::connection(); \n\t\t\n\t\treturn $conn->fetchOne($sql); \n\t}", "public static function getFilterTypeIdByName($name)\n\t\t{\n\t\t\t$connection = Connection::getConnection();\n\n\t\t\t$statement = $connection->prepare(\"SELECT id FROM filter_type WHERE name=?\");\n\t\t\t$statement->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\t$statement->bindParam(1, $name);\n\n\t\t\t$statement->execute();\n\n\t\t\t$content = 0;\n\n\t\t\tif ($row = $statement->fetch()) {\n\t\t\t\t$content = $row[\"id\"];\n\t\t\t}\n\n\t\t\treturn $content;\n\t\t}", "function TestCase_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function createTxType( $type=null ){\n global $mysqli;\n $type = $mysqli->real_escape_string($type);\n $results = $mysqli->query(\"SELECT id FROM index_tx_types WHERE type='{$type}' LIMIT 1\");\n if($results){\n if($results->num_rows){\n $row = $results->fetch_assoc();\n return $row['id'];\n } else {\n $results = $mysqli->query(\"INSERT INTO index_tx_types (type) values ('{$type}')\");\n if($results){\n return $mysqli->insert_id;\n } else {\n byeLog('Error while trying to create record in index_tx_types table');\n }\n }\n } else {\n byeLog('Error while trying to lookup record in index_tx_types table');\n }\n}", "function TestCaseRun_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getType($name);" ]
[ "0.7421397", "0.6190803", "0.59614736", "0.5895053", "0.5858142", "0.57572645", "0.57376987", "0.56600744", "0.5582025", "0.55709976", "0.5565953", "0.55370265", "0.5520199", "0.5491447", "0.54888475", "0.54776335", "0.5468804", "0.5457587", "0.5452804", "0.54514426", "0.542727", "0.54238546", "0.5416972", "0.5406473", "0.54014724", "0.53832597", "0.5365218", "0.5358745", "0.53511953", "0.53176844" ]
0.7782259
0
/ lookup_type_name_by_id Lookup A TestPlan Type Name By Its ID Usage TestPlan.lookup_type_name_by_id Parameters ParameterData TypeComments idintegerCannot be 0 Result name
function TestPlan_lookup_type_name_by_id($type_id) { // Create call $call = new xmlrpcmsg('TestPlan.lookup_type_name_by_id', array(new xmlrpcval($type_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestPlan_lookup_type_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getTypeName($id){\n return sqlSelectOne(\"SELECT * FROM types WHERE type_id={$id}\", 'type_name');\n}", "function getResourceTypeName($id){\n return sqlSelectOne(\"SELECT * FROM types WHERE type_id='$id'\", 'type_name');\n}", "public function getMatchingTypeName();", "abstract protected function get_typestring();", "public static function getTypeName($id){\n return Types::findOne($id);\n }", "public function getTypeIdentifier();", "function getResourceTypeId($name){\n return sqlSelectOne(\"SELECT * FROM types WHERE type_name='$name'\", 'type_id');\n}", "function get_type_name_by_id_custom1($type,$type_id='',$field='name')\n \t{ $type1='surgery'; //table field name\n \t return $this->db->get_where($type,array($type1.'_id'=>$type_id))->row()->$field; \n \t}", "abstract protected function get_typeid();", "protected function getTypeName($id) {\n\t\t$beerType = M('beer_type', 'ac_')->where(array('id' => $id))->find();\n\t\treturn $beerType;\n\t}", "function get_type_name_by_id_custom($type,$type_id='',$field='name')\n\t{\t$type1='comp_type'; //table field name\n\t\treturn\t$this->db->get_where($type,array($type1.'_id'=>$type_id))->row()->$field;\t\n\t}", "function project_type($id)\n{\n\t$name=mysql_fetch_array(mysql_query(\"select type_name from manage_property_type where ptype='$id'\"));\n\treturn $name['type_name'];\n\t}", "function get_type_name_by_id($type, $type_id = '', $field = 'name')\n {\n if ($type_id != '') {\n $l = $this->db->get_where($type, array(\n $type . '_id' => $type_id\n ));\n $n = $l->num_rows();\n if ($n > 0) {\n return $l->row()->$field;\n }\n }\n }", "abstract public function getTypeName();", "function get_type_name_by_id($type, $type_id = null, $field = 'name') {\n $this->db->where($type . '_id', $type_id);\n $query = $this->db->get($type);\n $result = $query->result_array();\n\n foreach ($result as $key => $row)\n return $row [$field];\n }", "public function getTypeName(): string;", "function get_type_name($type_name) {\nglobal $db;\n$query = 'SELECT * FROM types\n WHERE typeID = :type_id';\n$statement = $db->prepare($query);\n$statement->bindValue(':type_id', $type_id);\n$statement->execute();\n$type = $statement->fetch();\n$type_name = $type['vehicleTypes'];\n$statement->closeCursor();\nreturn $type_name;\n}", "function get_test_type()\n{\n return do_test_get_test_type((int)getreq('type'));\n}", "private function getType($id) {\n \n $this->loadTypes();\n \n foreach ($this->types as $type) {\n \n if ($type->getId() === $id) return $type;\n }\n \n return NULL;\n }", "public static function getTypeName($typeId)\n {\n $type = ModelRegistry::getById($typeId);\n if ($type === null) { \n throw new Exception('type name not found for id ' . $typeId);\n }\n return $type->label;\n }", "private function get_type() {\n\n\t}", "protected function getTypeName($data) {\n return $data['type'];\n }", "public function get_type(): string;", "public function findByName(Type $var = null)\n {\n # code...\n }", "abstract public function getTypeName(): string;", "static function getLookupValueDescription($lookuptype, $lookuptypevalue) {\n\t\t$sql = \"SELECT lv.lookupvaluedescription FROM lookuptypevalue lv INNER JOIN lookuptype l ON (lv.lookuptypeid = l.id AND l.`name` = '\".$lookuptype.\"' AND lv.lookuptypevalue = '\".$lookuptypevalue.\"')\";\n\t\t$conn = Doctrine_Manager::connection(); \n\t\t\n\t\treturn $conn->fetchOne($sql); \n\t}", "function get_type_name_by_where($type, $where_column = 'id', $type_id = '', $field = 'name')\n {\n if ($type_id != '') {\n $l = $this->db->get_where($type, array($where_column => $type_id));\n $n = $l->num_rows();\n if ($n > 0) {\n return $l->row()->$field;\n }else{\n return FALSE;\n }\n }\n }", "public function getTypeHint(): string;", "private function resolveType(string $typeString): ?int\n {\n foreach ($this->billTypes as $type) {\n if ($type->name === $typeString || $type->label === $typeString) {\n return $type->id;\n }\n }\n\n return null;\n }" ]
[ "0.7389198", "0.67203516", "0.64954567", "0.6297093", "0.6145256", "0.6142308", "0.6095954", "0.60878116", "0.60630536", "0.60397166", "0.5975286", "0.5875637", "0.58328414", "0.577685", "0.57606", "0.5742371", "0.5734694", "0.5706241", "0.56936705", "0.5679431", "0.5664206", "0.56620014", "0.5648792", "0.56108934", "0.5602318", "0.55911845", "0.55591494", "0.55549663", "0.55536693", "0.55498683" ]
0.81439537
0
/ list Get A List of TestCases Based on A Query Usage TestCase.list Parameters ParameterData TypeComments queryhashmapCan not be null. See Query Examples. Other attributes available for use with query include: run_id Result Array [0] Array [author_id] [script] [sortkey] [case_id] [estimated_time] [case_status_id] [default_tester_id] [priority_id] [requirement] [category_id] [creation_date] [summary] [isautomated] [arguments] [alias] [1] Array ...
function TestCase_list($query) { // Create array foreach($query as $key => $val) { switch($key) { case "plans": unset($va); foreach($key as $k => $v) { $va[$k] = new xmlrpcval($v, "string"); } $val = $va; $type = "struct"; break; case "author_id": case "canview": case "case_id": case "case_status_id": case "category_id": case "default_tester_id": case "isautomated": case "priority_id": case "sortkey": $type = "int"; break; case "alias": case "arguments": case "creation_date": case "requirement": case "script": case "summary": default: $type = "string"; } $qarray[$key] = new xmlrpcval($val, $type); } // Create call $call = new xmlrpcmsg('TestCase.list', array(new xmlrpcval($qarray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCaseRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"assignee\":\n\t\t\tcase \"build_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_run_id\":\n\t\t\tcase \"case_run_status_id\":\n\t\t\tcase \"case_text_version\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"iscurrent\":\n\t\t\tcase \"run_id\":\n\t\t\tcase \"sortkey\":\n\t\t\tcase \"testedby\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"close_date\":\n\t\t\tcase \"notes\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"plan\":\n\t\t\t\tunset($va);\n\t\t\t\tforeach($key as $k => $v) {\n\t\t\t\t\t$va[$k] = new xmlrpcval($v, \"string\");\n\t\t\t\t}\n\t\t\t\t$val = $va;\n\t\t\t\t$type = \"struct\";\n\t\t\t\tbreak;\n\t\t\tcase \"build_id\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"manager_id\":\n\t\t\tcase \"plan_id\":\n\t\t\tcase \"plan_text_version\":\n\t\t\tcase \"product_version\":\n\t\t\tcase \"run_id\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"notes\":\n\t\t\tcase \"start_date\":\n\t\t\tcase \"stop_date\":\n\t\t\tcase \"summary\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"author_id\":\n\t\t\tcase \"isactive\":\n\t\t\tcase \"plan_id\":\n\t\t\tcase \"product_id\":\n\t\t\tcase \"type_id\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"default_product_version\":\n\t\t\tcase \"creation_date\":\n\t\t\tcase \"name\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTests();", "public function testlistAction() \n {\n $model = new Application_Model_Mapper_Server($vars);\n $result = $model->getTestDetails();\n $data = array();\n $result = json_encode($result);\n $this->view->assign('result', $result);\n $this->_helper->viewRenderer('index');\n }", "protected function getTestList() \n {\n $invalid = 'invalid';\n $description = 'text';\n $empty_description = '';\n $testlist = [];\n $testlist[] = new ArgumentTestConfig($this->empty_argument, $empty_description,CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n \n $testlist[] = new ArgumentTestConfig($this->argument_name, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid, $this->argument_name, $invalid, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_empty_need_optional, $empty_description, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n $testlist[] = new ArgumentTestConfig($this->argument_empty_need_required, $empty_description, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n $testlist[] = new ArgumentTestConfig($this->argument_empty_need_invalid, $empty_description, $invalid, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_string, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_string, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_string, $this->argument_name, $invalid, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_string, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_empty, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_array, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::ARRAY, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_array, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::ARRAY, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_array, $this->argument_name, $invalid, CreateModuleCommandArgument::ARRAY, $empty_description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_invalid, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, $invalid, $empty_description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_invalid, $this->argument_name, CreateModuleCommandArgument::REQUIRED, $invalid, $empty_description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_string_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_string_description, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_string_description, $this->argument_name, $invalid, CreateModuleCommandArgument::STRING, $description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_array_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::ARRAY, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_array_description, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::ARRAY, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_array_description, $this->argument_name, $invalid, CreateModuleCommandArgument::ARRAY, $description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_empty_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_empty_description_empty, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_invalid_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, $invalid, $description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_invalid_description, $this->argument_name, CreateModuleCommandArgument::REQUIRED, $invalid, $description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_invalid_description, $this->argument_name, $invalid, $invalid, $description, \\InvalidArgumentException::class);\n \n return $testlist;\n }", "public function testGetList()\n {\n $result = $this->getQueryBuilderConnection()\n ->select('field')\n ->from('querybuilder_tests')\n ->where('id', '>', 7)\n ->getList();\n\n $expected = [\n 'iiii',\n 'jjjj',\n ];\n\n $this->assertEquals($expected, $result);\n }", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "public function get_all_tests()\n\t{\n\t\treturn $this->db->get('test')->result();\n\t}", "public function getTestCases ()\n {\n return $this->_testCases;\n }", "function TestRun_get_test_cases($run_id) {\n\t// Create call\n\t// FIXME: not working\n\t$call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTestResults()\n\t{\n\t\t/*\n\t\t * Wenn die Tests noch nicht ausgeführt wurden, dies nun tun\n\t\t */\n\t\tif ($this->_needRun === true)\n\t\t{\n\t\t\t$this->run();\n\t\t}\n\t\tforeach ($this->_testCases as $key => $testCase)\n\t\t{\n\t\t\t/*\n\t\t\t * Zusicherung nicht erfüllt\n\t\t\t*/\n\t\t\tif ($testCase['assert'] !== $testCase['result'])\n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": fehlgeschlagen \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" != \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_failedTests++;\n\t\t\t}\n\t\t\t/*\n\t\t\t * Zusicherung erfüllt\n\t\t\t*/\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": erfolgreich \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" == \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_passedTests++;\n\t\t\t}\n\t\t} \n\t\treturn $this->_testResults;\t\n\t}", "function TestRun_get_test_case_runs($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_case_runs', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public static function get_tests()\n {\n }", "public function overviewallAction() {\n\n $this->validateUser();\n\n $testCase = new Yourdelivery_Model_Testing_TestCase();\n $this->view->testcases = $testCase->getTable()->fetchAll()->toArray();\n $this->view->exp = $testCase->getExpectations();\n }", "public function list(array $parameters): ListResponse;", "function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}", "public function tests()\n {\n $this->authCheck();\n\n /*$testData = DB::table('diagnostic_tests')\n ->get();*/\n\n $testData = DB::table('diagnostic_tests')\n ->join('categories', 'diagnostic_tests.category_id', '=', 'categories.id')\n ->select('diagnostic_tests.*', 'categories.name as catName')\n ->get();\n \n $tests=view('admin.test_list')\n ->with('testData',$testData);\n\n return view('admin.master')\n ->with('main_content',$tests);\n\n }", "private function testCollect() {\n $custom_data = array();\n\n // Collect all custom data provided by hook_insight_custom_data().\n $collections = \\Drupal::moduleHandler()->invokeAll('acquia_connector_spi_test');\n\n foreach ($collections as $test_name => $test_params) {\n $status = new TestStatusController();\n $result = $status->testValidate(array($test_name => $test_params));\n\n if ($result['result']) {\n $custom_data[$test_name] = $test_params;\n }\n }\n\n return $custom_data;\n }", "public function getResults();", "public function unitTests($unit) {\n\t\techo \"<p>Search Results Tests:</p><ul>\";\n\t\t\n\t\techo \"<li>Known Valid Search\";\n\t\t$searchStr = $this->search(\"motrin\");\n\t\t$searchObj = $this->search(\"motrin\", true);\n\n\t\techo $unit->run($searchStr,'is_string', 'String Requested, String Returned');\n\t\techo $unit->run($searchObj,'is_object', 'Object Requested, Object Returned');\n\t\techo $unit->run($searchObj->error,'is_null', 'Error object is null');\n\t\techo $unit->run(count($searchObj->results) > 0, true, \"Result object results array has contents.\");\n\n\t\techo \"</li>\";\n\n\t\techo \"<li>Known Invalid Search\";\n\t\t$searchStr = $this->search(\"wallbutrin\");\n\t\t$searchObj = $this->search(\"wallbutrin\", true);\n\n\t\techo $unit->run($searchStr,'is_string', \"String Requested, String Returned\");\n\t\techo $unit->run($searchObj,'is_object', \"Object Requested, Object Returned\");\n\t\techo $unit->run($searchObj->error, 'is_object', \"Error object is valid\");\n\t\techo $unit->run($searchObj->error->code, 'NOT_FOUND', \"Error object contains code NOT_FOUND\");\n\n\t\techo \"</li>\";\n\n\t\techo \"<li>Empty Search\";\n\t\t$searchStr = $this->search(\"\");\n\t\t$searchObj = $this->search(\"\", true);\n\n\t\techo $unit->run($searchStr, 'is_string', \"String Requested, String Returned\");\n\t\techo $unit->run($searchObj, 'is_object', \"Object Requested, Object Returned\");\n\t\techo $unit->run($searchObj->error, 'is_object', \"Error object is valid\");\n\t\techo $unit->run($searchObj->error->code, 'NOT_FOUND', \"Error object contains code NOT_FOUND\");\n\n\t\techo \"</li>\";\n\n\t\techo \"</ul>\";\n\n\t\techo \"<p>Cache Results Tests</p><ul>\";\n\t\t$cacheTerm = \"testingTerm\";\n\t\t$cacheDataIn = json_encode(array('test' => true, 'error' => false));\n\n\t\techo \"<li>Cache sanity\";\n\t\t$this->_setCache($cacheTerm, $cacheDataIn);\n\t\t$cacheDataOut = $this->_getCache($cacheTerm);\n\n\t\techo $unit->run($cacheDataOut, $cacheDataIn, \"Cache returns the same values it was given\");\n\n\t\t$this->_invalidateCache($cacheTerm);\n\t\t$fetchResult = $this->_getCache($cacheTerm);\n\n\t\techo $unit->run($fetchResult, 'is_false', \"Invalidated cache entry does not return a result\");\n\n\t\techo \"</li>\";\n\n\t\techo \"<li>Cache actually used and updated by search\";\n\t\t$cacheTerm = 'motrin';\n\t\t$this->_invalidateCache($cacheTerm);\n\t\t$fetchResult = $this->_getCache($cacheTerm);\n\n\t\techo $unit->run($fetchResult, 'is_false', \"Known Search cache invalidated\");\n\t\t$searchResult = $this->search($cacheTerm);\n\n\t\techo $unit->run($searchResult, 'is_string', \"Known Search returns string\");\n\n\t\t$fetchResult = $this->_getCache($cacheTerm);\n\t\techo $unit->run($searchResult, $fetchResult, \"Known search and cache entry match\");\n\n\t\t$searchResult2 = $this->search($cacheTerm);\n\t\techo $unit->run($searchResult2, $searchResult, \"Search returns same on cache miss and hit\");\n\n\t\techo \"</li>\";\n\t\techo \"</ul>\";\n\t}", "function drush_test_list($groups) {\n foreach ($groups as $group_name => $group_tests) {\n foreach ($group_tests as $test_class => $test_info) {\n $rows[] = array('group' => $group_name, 'class' => $test_class, 'name' => $test_info['name']);\n }\n }\n return $rows;\n}", "public function getTestResultsData()\n {\n $out = [];\n\n // Case #0, sorted in default acceding\n $out[] = [\n [\n 'green',\n 'yellow',\n 'red',\n 'blue',\n ],\n 'sc'\n ];\n\n // Case #1, sorted in descending order by term, blue is prioritized.\n $out[] = [\n [\n 'acme',\n 'bar',\n 'foo',\n ],\n 'sc_zero_choices'\n ];\n\n // Case #2, all items prioritized, so sorting shouldn't matter.\n $out[] = [\n [\n 'blue',\n 'green',\n ],\n 'sc_sort_term_a'\n ];\n\n // Case #3, sort items by count, red prioritized.\n $out[] = [\n [\n 'yellow',\n ],\n 'sc_sort_term_d'\n ];\n\n // Case #4\n $out[] = [\n [\n 'blue',\n 'red',\n 'green',\n 'yellow'\n ],\n 'sc_sort_count'\n ];\n\n // Case #5 with selected man\n $out[] = [\n [\n 'yellow',\n 'red',\n 'blue',\n ],\n 'sc',\n ['manufacturer' => 'a']\n ];\n\n // Case #6 with selected man with zero choices\n $out[] = [\n [\n 'acme',\n 'foo',\n 'bar',\n ],\n 'sc_zero_choices',\n ['manufacturer' => 'a']\n ];\n\n // Case #7 with selected man with zero choices\n $out[] = [\n [\n 'yellow',\n 'red',\n 'blue',\n 'green',\n ],\n 'sc_zero_choices_color',\n ['manufacturer' => 'a']\n ];\n\n return $out;\n }", "function listTestCategory() {\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->test_category_table);\n\t\t$this->db->where('status !=', 0);\n $query = $this->db->get();\n\t\treturn $query->result();\n\t}", "public function getLabTests()\n {\n $labTests = null;\n\n try\n {\n $query = DB::table('labtest as lt')->select('lt.id', 'lt.test_name')->where('lt.test_status', '=', 1);\n $labTests = $query->get();\n }\n catch(QueryException $queryEx)\n {\n throw new HospitalException(null, ErrorEnum::LAB_LIST_ERROR, $queryEx);\n }\n catch(Exception $exc)\n {\n throw new HospitalException(null, ErrorEnum::LAB_LIST_ERROR, $exc);\n }\n\n return $labTests;\n }", "public function providertestRequest()\r\n {\r\n return array(array(\"list\",\"course\"),array(\"list\",\"teacher\"));\r\n }", "public function listAction()\n {\n//\n $request = $this->getRequest();\n\n $routeMatch = $this->getEvent()->getRouteMatch();\n $id = $routeMatch->getParam('workout_id', 0);\n\n if ($id <= 0) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n /**\n * Grid FORM\n */\n $form = new WorkoutExerciseGrid(\n array(\n 'view' => $this->_view,\n )\n );\n\n /**\n * BUILDING LIST\n */\n $list = new WorkoutExerciseResultSet(\n array(\n 'model' => $this->_exercise,\n 'view' => $this->_view,\n )\n );\n\n $list->setFieldOptions('type_id', array(\n 'values' => $types = $this->_exerciseType->getBehaviour('nestedSet')->getResultSetForText(),\n ));\n\n $typesTemp = $this->_exerciseType->getResultSet()->toArray();\n $types = array();\n foreach ( $typesTemp as $key => $type) {\n $types[$type['type_id']] = $type;\n }\n\n\n $list->addField(\n 'results',\n 'custom',\n array(\n 'label' => 'results',\n 'sortable' => false,\n 'values' => $types,\n 'viewScript' => 'workout-exercise/_field_result.phtml',\n )\n );\n\n $list->setDbWhere('workout_id = ' . (int)$id);\n\n //\n $list->processRequest($this->getRequest());\n\n //\n $list->build();\n\n //\n $form->addSubForm($list, $list->getName());\n\n// //\n $this->_view->headScript()->appendScript(\n $this->_view->render(\n 'workout-exercise/list.js',\n array(\n 'back' => $this->url()->fromRoute('hi-training/workout/list'),\n 'delete' => $this->url()->fromRoute('hi-training/workout-exercise/delete/wildcard', array('exercise_id' => '')),\n 'edit' => $this->url()->fromRoute('hi-training/workout-exercise/edit/wildcard', array('exercise_id' => '')),\n 'add' => $this->url()->fromRoute('hi-training/workout-exercise/add/wildcard', array('workout_id' => $id)),\n )\n )\n );\n\n /**\n * POST\n */\n if ($this->getRequest()->isPost()) {\n\n $formData = $this->getRequest()->post()->toArray();\n\n\n if ($form->isValid($formData)) {\n \\Zend\\Debug::dump($formData);\n if ( isset($formData['header']['formId'])\n && $formData['header']['formId'] == 'WorkoutExerciseGridForm') {\n\n if (isset($formData['WorkoutExerciseResultSet']['actions']['saveSelected'])) {\n $allBox = $formData['WorkoutExerciseResultSet']['header']['all'];\n $rows = $formData['WorkoutExerciseResultSet']['rows'];\n\n foreach ($rows as $key => $row) {\n if ($row['id'] || $allBox) {\n $exercise = $this->_exercise->getRow(array('exercise_id' => $key));\n $exercise->populate($row['row']);\n $exercise->save();\n\n }\n }\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n }\n\n if (isset($formData['WorkoutExerciseResultSet']['actions']['deleteSelected'])) {\n\n $allBox = $formData['WorkoutExerciseResultSet']['header']['all'];\n $rows = $formData['WorkoutExerciseResultSet']['rows'];\n\n foreach ($rows as $key => $row) {\n if ($row['id'] || $allBox) {\n\n $exercise = $this->_exercise->getRow(array('exercise_id' => $key));\n $exercise->delete();\n\n }\n }\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n//\n }\n }\n }\n }\n\n return array(\n 'form' => $form,\n 'workout' => $this->_workout->getRow(array('workout_id'=>$id)),\n );\n\n }", "public function testList()\n {\n //Tests list by date\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03-06');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by month\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by date and status\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03-06/payed');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by month and status\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03/payed');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by year and status\n $this->clientAuthenticated->request('GET', '/transaction/list/2019/payed');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by date and person\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03-06/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by month and person\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by year and person\n $this->clientAuthenticated->request('GET', '/transaction/list/2019/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by status and person\n $this->clientAuthenticated->request('GET', '/transaction/list/payed/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n }", "public function getAllReadinessChecklistSurveys($parameters) {\n error_log(implode(\"--\", $parameters));\n\n $aColumns = array('readiness_checklist_id', 'start_date', 'end_date', 'created_at', 'created_by');\n\n /* Indexed column (used for fast and accurate table cardinality) */\n $sIndexColumn = $this->_primary;\n\n\n /*\n * Paging\n */\n $sLimit = \"\";\n if (isset($parameters['iDisplayStart']) && $parameters['iDisplayLength'] != '-1') {\n $sOffset = $parameters['iDisplayStart'];\n $sLimit = $parameters['iDisplayLength'];\n }\n\n /*\n * Ordering\n */\n $sOrder = \"\";\n if (isset($parameters['iSortCol_0'])) {\n $sOrder = \"\";\n for ($i = 0; $i < intval($parameters['iSortingCols']); $i++) {\n if ($parameters['bSortable_' . intval($parameters['iSortCol_' . $i])] == \"true\") {\n $sOrder .= $aColumns[intval($parameters['iSortCol_' . $i])] . \"\n\t\t\t\t \t\" . ($parameters['sSortDir_' . $i]) . \", \";\n }\n }\n\n $sOrder = substr_replace($sOrder, \"\", -2);\n }\n\n /*\n * Filtering\n * NOTE this does not match the built-in DataTables filtering which does it\n * word by word on any field. It's possible to do here, but concerned about efficiency\n * on very large tables, and MySQL's regex functionality is very limited\n */\n $sWhere = \"\";\n if (isset($parameters['sSearch']) && $parameters['sSearch'] != \"\") {\n $searchArray = explode(\" \", $parameters['sSearch']);\n $sWhereSub = \"\";\n foreach ($searchArray as $search) {\n if ($sWhereSub == \"\") {\n $sWhereSub .= \"(\";\n } else {\n $sWhereSub .= \" AND (\";\n }\n $colSize = count($aColumns);\n\n for ($i = 0; $i < $colSize; $i++) {\n if ($i < $colSize - 1) {\n $sWhereSub .= $aColumns[$i] . \" LIKE '%\" . ($search) . \"%' OR \";\n } else {\n $sWhereSub .= $aColumns[$i] . \" LIKE '%\" . ($search) . \"%' \";\n }\n }\n $sWhereSub .= \")\";\n }\n $sWhere .= $sWhereSub;\n }\n\n /* Individual column filtering */\n for ($i = 0; $i < count($aColumns); $i++) {\n if (isset($parameters['bSearchable_' . $i]) && $parameters['bSearchable_' . $i] == \"true\" && $parameters['sSearch_' . $i] != '') {\n if ($sWhere == \"\") {\n $sWhere .= $aColumns[$i] . \" LIKE '%\" . ($parameters['sSearch_' . $i]) . \"%' \";\n } else {\n $sWhere .= \" AND \" . $aColumns[$i] . \" LIKE '%\" . ($parameters['sSearch_' . $i]) . \"%' \";\n }\n }\n }\n\n\n /*\n * SQL queries\n * Get data to display\n */\n\n $sQuery = $this->getAdapter()->select()->from(array('a' => $this->_name));\n\n if (isset($sWhere) && $sWhere != \"\") {\n $sQuery = $sQuery->where($sWhere);\n }\n\n if (isset($sOrder) && $sOrder != \"\") {\n $sQuery = $sQuery->order($sOrder);\n }\n\n if (isset($sLimit) && isset($sOffset)) {\n $sQuery = $sQuery->limit($sLimit, $sOffset);\n }\n\n //error_log($sQuery);\n\n $rResult = $this->getAdapter()->fetchAll($sQuery);\n\n\n /* Data set length after filtering */\n $sQuery = $sQuery->reset(Zend_Db_Select::LIMIT_COUNT);\n $sQuery = $sQuery->reset(Zend_Db_Select::LIMIT_OFFSET);\n $aResultFilterTotal = $this->getAdapter()->fetchAll($sQuery);\n $iFilteredTotal = count($aResultFilterTotal);\n\n /* Total data set length */\n $sQuery = $this->getAdapter()->select()->from($this->_name, new Zend_Db_Expr(\"COUNT('\" . $sIndexColumn . \"')\"));\n $aResultTotal = $this->getAdapter()->fetchCol($sQuery);\n $iTotal = $aResultTotal[0];\n\n /*\n * Output\n */\n $output = array(\n \"sEcho\" => intval($parameters['sEcho']),\n \"iTotalRecords\" => $iTotal,\n \"iTotalDisplayRecords\" => $iFilteredTotal,\n \"aaData\" => array()\n );\n\n\n foreach ($rResult as $aRow) {\n $row = array();\n $row[] = $aRow['readiness_checklist_id'];\n $row[] = $aRow['start_date'];\n $row[] = $aRow['end_date'];\n $row[] = $aRow['created_at'];\n $creator = new Application_Service_SystemAdmin();\n $creatorDetails = $creator->getSystemAdminDetails($aRow['created_by']);\n $row[] = $creatorDetails['first_name'] . \" \" . $creatorDetails['last_name'];\n $row[] = '<a href=\"/admin/readiness-checklist/viewresponse/id/' . $aRow['id'] \n . '\" class=\"btn btn-warning btn-xs\" style=\"margin-right: 2px;\">'\n .'<i class=\"icon-pencil\"></i> View Response</a> ';\n\n $output['aaData'][] = $row;\n }\n\n echo json_encode($output);\n }", "protected function get_tests() {\r\n return array(\r\n \"connect\",\r\n \"select\"\r\n );\r\n }" ]
[ "0.73588735", "0.6700278", "0.609043", "0.58794177", "0.5794498", "0.5709883", "0.5706995", "0.54925615", "0.54916203", "0.5437936", "0.540896", "0.5393096", "0.5361569", "0.5312176", "0.52716345", "0.5269639", "0.52318835", "0.5198291", "0.5198043", "0.5192719", "0.5170799", "0.5167566", "0.5165088", "0.5126879", "0.51175106", "0.5087771", "0.5082621", "0.5080724", "0.50779617", "0.506893" ]
0.7259313
1
/ create Create A New TestCase Usage TestCase.create Parameters ParameterData TypeComments new_valueshashmapSee required attributes list below. Required attributes: author_id, case_status_id, category_id, isautomated, and plan_id. Result case_id
function TestCase_create($author_id, $case_status_id, $category_id, $isautomated, $plan_id, $alias = NULL, $arguments = NULL, $canview = NULL, $creation_date = NULL, $default_tester_id = NULL, $priority_id = NULL, $requirement = NULL, $script = NULL, $summary = NULL, $sortkey = NULL) { $varray = array("author_id" => "int", "case_status_id" => "int", "category_id" => "int", "isautomated" => "int", "plan_id" => "int", "alias" => "string", "arguments" => "string", "canview" => "int", "creation_date" => "string", "default_tester_id" => "int", "priority_id" => "int", "requirement" => "string", "script" => "string", "summary" => "string", "sortkey" => "int"); foreach($varray as $key => $val) { if (isset(${$key})) { $carray[$key] = new xmlrpcval(${$key}, $val); } } // Create call $call = new xmlrpcmsg('TestCase.create', array(new xmlrpcval($carray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCaseRun_create($assignee, $build_id, $case_id, $case_text_version, $environment_id, $run_id, $canview = NULL, $close_date = NULL, $iscurrent = NULL, $notes = NULL, $sortkey = NULL, $testedby = NULL) {\n\t$varray = array(\"assignee\" => \"int\", \"build_id\" => \"int\", \"case_id\" => \"int\", \"case_text_version\" => \"int\", \"environment_id\" => \"int\", \"run_id\" => \"int\", \"canview\" => \"int\", \"close_date\" => \"string\", \"iscurrent\" => \"int\", \"notes\" => \"string\", \"sortkey\" => \"int\", \"testedby\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_create($build_id, $environment_id, $manager_id, $plan_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_create($author_id, $product_id, $default_product_version, $type_id, $name, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function createAction() {\n\n $this->validateUser();\n\n $form = new Yourdelivery_Form_Testing_Create();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->getRequest()->getPost())) {\n if ($form->getValue('tag') && $this->getRequest()->getParam('proceed') == 'false') {\n $tags = Yourdelivery_Model_Testing_TestCase::searchForTags($form->getValue('tag'));\n\n if ($tags) {\n foreach ($tags as $tag) {\n $ids .= sprintf('<a href=\"/testing_cms/overview/id/%s\" target=\"blank\">%s</a> ', $tag['id'], $tag['id']);\n }\n $this->warn('Tag already in use for testcase ' . $ids);\n $this->_redirect(vsprintf('testing_cms/create/title/%s/author/%s/description/%s/priority/%s/tag/%s/proceed/true', $form->getValues()));\n }\n }\n\n $testCase = new Yourdelivery_Model_Testing_TestCase();\n $testCase->setData($form->getValues());\n $id = $testCase->save();\n $this->success('Testcase successfully created.');\n $this->_redirect('testing_cms/add/id/' . $id);\n } else {\n $this->error($form->getMessages());\n }\n }\n $this->view->post = $this->getRequest()->getParams();\n }", "public function create( array $parameters );", "public function create( array $parameters );", "private static function createSampleData()\n\t{\n\t\tself::createSampleObject(1, \"Issue 1\", 1);\n\t\tself::createSampleObject(2, \"Issue 2\", 1);\n\t}", "public function create($params)\n {\n }", "public function test_calledCreateMethod_withValidParameters_argumentsHasBeenSetted()\n {\n $dataContainerMock = $this->getDataConteinerMock();\n\n $sut = DataWrapper::create(\n 200,\n \"Ok\",\n \"copyright\",\n \"attribution text\",\n \"attribution HTML\",\n $dataContainerMock,\n \"etag\"\n );\n\n $this->assertEquals(200, $sut->getCode());\n $this->assertEquals(\"Ok\", $sut->getStatus());\n $this->assertEquals(\"copyright\", $sut->getCopyright());\n $this->assertEquals(\"attribution text\", $sut->getAttributionText());\n $this->assertEquals(\"attribution HTML\", $sut->getAttributionHTML());\n $this->assertEquals(\"etag\", $sut->getEtag());\n }", "public function testCreateTestCaseWithDetails()\n {\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->visit('/library')\n ->click('#newCase')\n ->seePageIs('/library/testcase/create')\n ->type('TestCase2', 'name1')\n ->select('1', 'testSuite1')\n ->type('someDecription','description1')\n ->type('somePrefixes','prefixes1')\n ->type('someSteps','steps1')\n ->type('someResult','expectedResult1')\n ->type('someSuffixes','suffixes1')\n ->press('submit');\n\n $this->seeInDatabase('TestCaseHistory', [\n 'TestCaseDescription' => 'someDecription',\n 'TestCasePrefixes' => 'somePrefixes',\n 'TestSteps' => 'someSteps',\n 'ExpectedResult' => 'someResult',\n 'TestCaseSuffixes' => 'someSuffixes'\n ]);\n }", "public function createAction()\n {\n $this->createEditParameters = $this->createEditParameters + $this->_createExtraParameters;\n\n parent::createAction();\n }", "public function create($table, $parameters)\n {\n\n }", "public function createAction() {\n $this->_helper->layout->setLayout('admin-simple');\n\n //GENERATE FORM\n $form = $this->view->form = new Sitestorereview_Form_Admin_Ratingparameter_Create();\n $form->setAction($this->getFrontController()->getRouter()->assemble(array()));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues();\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n //ADD REVIEW CATEGORY TO THE DATABASE\n $tableReviewParams = Engine_Api::_()->getDbtable('reviewcats', 'sitestorereview');\n\n //INSERT THE REVIEW CATEGORY IN TO THE DATABASE\n $row = $tableReviewParams->createRow();\n $row->category_id = $this->_getParam('category_id');\n $row->reviewcat_name = $values[\"reviewcat_name\"];\n $row->save();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('')\n ));\n }\n\n $this->renderScript('admin-ratingparameter/create.tpl');\n }", "public function create($params);", "abstract public function create (ParameterBag $data);", "public function create()\n {\n $postInformation = $this->input->post();\n $dataArray = array();\n foreach ($postInformation as $key => $value) {\n if ($key != \"moduleId\" && $key != \"lessonId\" && $key != \"file\") {\n $dataArray[\"dataToCreate\"][$key] = $value;\n }\n }\n $dataArray[\"moduleId\"] = $this->input->post(\"moduleId\");\n $resultCreateLesson = $this->Lesson_Model->create($dataArray);\n echo json_encode($resultCreateLesson);\n }", "public function create($params = array()) {\n\n }", "public static function get_parameters() {\n $r = array_merge(\n parent::get_parameters(),\n array(\n array(\n 'name' => 'transect_count_attr_ids',\n 'caption' => 'Transect count attribute IDs',\n 'description' => 'Comma separated list of sample attribute IDs. Specify each attribute that can contain a count of transects surveyed '.\n '(e.g. low shore, middle shore, high shore). For each attribute, n transects will be available for data input.',\n 'type' => 'textfield',\n 'required' => true,\n 'group' => 'Big Sea setup'\n ), array(\n 'name' => 'transect_captions',\n 'caption' => 'Transect captions',\n 'description' => 'Comma separated list of captions to use for each of the above attributes, in the same order.',\n 'type' => 'textfield',\n 'required' => true,\n 'group' => 'Big Sea setup'\n ),\n array(\n 'name' => 'child_sample_zone_attr_id',\n 'caption' => 'Child sample zone attribute ID',\n 'description' => 'A text attribute used to store the zone in the child sample.',\n 'type' => 'select',\n 'table' => 'sample_attribute',\n 'valueField' => 'id',\n 'captionField' => 'caption',\n 'group' => 'Big Sea setup'\n ), array(\n 'name' => 'child_sample_transect_attr_id',\n 'caption' => 'Child sample transect attribute ID',\n 'description' => 'An integer attribute used to store the transect in the child sample.',\n 'type' => 'select',\n 'table' => 'sample_attribute',\n 'valueField' => 'id',\n 'captionField' => 'caption',\n 'group' => 'Big Sea setup'\n ), array(\n 'name' => 'search_species_transect_attr_id',\n 'caption' => 'Parent sample search species attribute ID',\n 'description' => 'An integer multivalut attribute used to store the search species list in the parent attribute.',\n 'type' => 'select',\n 'table' => 'sample_attribute',\n 'valueField' => 'id',\n 'captionField' => 'caption',\n 'group' => 'Big Sea setup'\n ),\n array(\n 'name' => 'front_page_path',\n 'caption' => 'Front page path',\n 'description' => 'Path to the front page input form.',\n 'type' => 'textfield',\n 'required' => true,\n 'group' => 'Big Sea setup'\n ),\n array(\n 'name' => 'parent_sample_method_id',\n 'caption' => 'Parent Sample Method',\n 'type' => 'select',\n 'table' => 'termlists_term',\n 'captionField' => 'term',\n 'valueField' => 'id',\n 'extraParams' => array('termlist_external_key' => 'indicia:sample_methods'),\n 'required' => false,\n 'helpText' => 'The sample method that will be used for created visit samples.',\n 'group' => 'Big Sea setup'\n )\n )\n );\n return $r;\n }", "public function create($attributes){\n }", "function _civicrm_api3_custom_value_create_spec(&$params) {\n $params['entity_id']['api.required'] = 1;\n}", "private static function createSampleObject($id, $title, $projectId, $text = '', $version = '', $authorId = 0,\n\t\t$created = null, $status = 0, $classification = 0)\n\t{\n\t\tself::$data[$id] = new stdClass;\n\t\tself::$data[$id]->id = $id;\n\t\tself::$data[$id]->title = $title;\n\t\tself::$data[$id]->project_id = $projectId;\n\t\tself::$data[$id]->text = $text;\n\t\tself::$data[$id]->version = $version;\n\t\tself::$data[$id]->author_id = $authorId;\n\t\tself::$data[$id]->created = $created;\n\t\tself::$data[$id]->status = $status;\n\t\tself::$data[$id]->classification = $classification;\n\t}", "function create()\n {\n $query = \"INSERT INTO \n \" . $this->table_name . \"\n SET \n is_bug=:is_bug,id_startup=:id_startup ,more_info=:more_info, email=:email\";\n \n // prepare query\n $stmt = $this->conn->prepare($query);\n \n // posted values\n $this->is_bug=json_decode(utf8_decode($this->is_bug));\n $this->id_startup=json_decode(utf8_decode($this->id_startup));\n $this->more_info=json_decode(utf8_decode($this->more_info));\n $this->email=json_decode(utf8_decode($this->email));\n \n // bind values\n $stmt->bindParam(\":is_bug\", $this->is_bug);\n $stmt->bindParam(\":id_startup\", $this->id_startup);\n $stmt->bindParam(\":more_info\", $this->more_info);\n $stmt->bindParam(\":email\", $this->email);\n \n // execute query\n if($stmt->execute()) {\n return true;\n } else {\n echo \"<pre>\";\n print_r($stmt->errorInfo());\n echo \"</pre>\";\n \n return false;\n }\n }", "function Build_create($product_id, $name, $description = NULL, $milestone = NULL, $isactive = TRUE) {\n\t$varray = array(\"product_id\" => \"int\", \"name\" => \"string\", \"description\" => \"string\", \"milestone\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('Build.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function create($data);", "public function create($data);", "public function create($data);", "public function create($data);", "public function create($data);", "public function _getParamsCreate()\n {\n extract($this->modelOptions);\n $model = $this->modelOptions;\n\n $params['modeloptions'] = $this->modelOptions;\n $referenceValues = array();\n $mapValues = array();\n foreach ($this->modelOptions['modelfield'] as $key => $value) {\n if (array_key_exists('reference', $value)) {\n $ref = $value['reference'];\n if (array_key_exists('type', $ref) && $ref['type'] == 'reference_table') {\n $getValues = $this->db->query('SELECT * from '.$ref['table_name'].' where is_delete = 0')->result_array();\n $referenceValues[$key] = $getValues;\n\n $getMap = $this->db->query('SELECT * from '.$ref['reference_table'].' order by id ASC')->result_array();\n $mapValues[$key] = $getMap;\n } elseif ((array_key_exists('type', $ref) && $ref['type'] == 'master_table') || !array_key_exists('type', $ref)) {\n $source = 'name';\n if (array_key_exists('source_key', $ref)) $source = $ref['source_key'];\n\n $getValues = $this->db->query('SELECT * from '.$ref['table_name'].' where is_delete = 0 ORDER by '.$source.' ASC')->result_array();\n $referenceValues[$key] = $getValues;\n } \n }\n\n if (array_key_exists('values', $value)) {\n $referenceValues[$key] = $value['values'];\n }\n\n if (count($referenceValues) > 0) $params['referencevalues'] = $referenceValues;\n if (count($mapValues) > 0) $params['mapValues'] = $mapValues;\n }\n \n $params['activemenu'] = $model['modulename'];\n $params['pagetitle'] = 'Create New '.$model['modulename'];\n $params['modulename'] = $model['modulename'];\n $params['breadcrumb'] = array(\n $modulename => base_url().$route,\n 'Create new '.$modulename => ''\n );\n if (isset($parentmenu)) $params['parentmenu'] = $parentmenu;\n return $params;\n }", "function new_parameters() {\r\n\r\n }" ]
[ "0.63676244", "0.6100476", "0.60443294", "0.5995129", "0.5654538", "0.5654538", "0.56476873", "0.55578876", "0.5553562", "0.5500357", "0.54719555", "0.54484975", "0.5436853", "0.54297185", "0.5414682", "0.5357996", "0.5353401", "0.53182584", "0.53149956", "0.5291626", "0.5265763", "0.5265123", "0.5245406", "0.52120835", "0.52120835", "0.52120835", "0.52120835", "0.52120835", "0.5205327", "0.5171637" ]
0.70292515
0
/ update Update An Existing TestCase Usage TestCase.update Parameters ParameterData TypeComments case_idinteger new_valueshashmapauthor_id and case_id can not be modified. Result Array [case_id] [case_status_id] [default_tester_id] [plan_id] [priority_id] [category_id] [summary] [creation_date] [isautomated]
function TestCase_update($case_id, $case_status_id, $category_id, $isautomated, $alias = NULL, $arguments = NULL, $default_tester_id = NULL, $priority_id = NULL, $requirement = NULL, $script = NULL, $summary = NULL, $sortkey = NULL) { $varray = array("case_id" => "int", "case_status_id" => "int", "category_id" => "int", "isautomated" => "int", "alias" => "string", "arguments" => "string", "default_tester_id" => "int", "priority_id" => "int", "requirement" => "string", "script" => "string", "summary" => "string", "sortkey" => "int"); foreach($varray as $key => $val) { if (isset(${$key})) { $carray[$key] = new xmlrpcval(${$key}, $val); } } // Create call $call = new xmlrpcmsg('TestCase.update', array(new xmlrpcval($carray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCaseRun_update($run_id, $case_id, $build_id, $environment_id, $assignee = NULL, $case_run_status_id = NULL, $notes = NULL, $update_bugs = NULL) {\n\t$varray = array(\"assignee\" => \"int\", \"case_run_status_id\" => \"int\", \"notes\" => \"string\", \"update_bugs\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.update', array(new xmlrpcval($run_id, \"int\"),new xmlrpcval($case_id, \"int\"),new xmlrpcval($build_id, \"int\"),new xmlrpcval($environment_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_update($run_id, $build_id, $environment_id, $manager_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.update', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function updateTestSuite(&$tsuiteMgr,&$argsObj,$container,&$hash)\r\n{\r\n $msg = 'ok';\r\n $ret = $tsuiteMgr->update($argsObj->testsuiteID,$container['container_name'],$container['details']);\r\n if($ret['status_ok'])\r\n {\r\n $tsuiteMgr->deleteKeywords($argsObj->testsuiteID);\r\n if(trim($argsObj->assigned_keyword_list) != \"\")\r\n {\r\n $tsuiteMgr->addKeywords($argsObj->testsuiteID,explode(\",\",$argsObj->assigned_keyword_list));\r\n }\r\n writeCustomFieldsToDB($tsuiteMgr->db,$argsObj->tprojectID,$argsObj->testsuiteID,$hash);\r\n }\r\n else\r\n {\r\n $msg = $ret['msg'];\r\n }\r\n return $msg;\r\n}", "function TestPlan_update($plan_id, $author_id, $product_id = NULL, $default_product_version = NULL, $type_id = NULL, $name = NULL, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.update', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function update($id, Request $request)\n\t{\n\t\t$validator = \\Validator::make($request->all(), array(\n\t\t\t'description' => 'required',\n\t\t\t'expected_result' => 'required'\n\t\t\t));\n\t\tif ($validator->fails())\n\t\t{\n\t\t\tforeach ($validator->errors()->toArray() as $key => $value) {\n\t\t\t\t$error[]=$value[0];\n\t\t\t} \n\t\t}\n\t\telse{\n\t\t\tif( session()->has('email')){\n\t\t\t\t//Process when validations pass\n\n\t\t\t\t$level = $request->update_level; \t\n\t\t\t\t$content['description'] = $request->description;\n\t\t $content['expected_result'] = $request->expected_result;\n\t\t $item = \\App\\TestStep::find($id);\n\t\t $item->update($content);\n\t\t \n\t\t $execution_content['scroll']\t\t= $request->scroll;\n\t\t $execution_content['resource_id']\t= $request->resource_id;\n\t\t $execution_content['text']\t\t\t= $request->text;\n\t\t $execution_content['content_desc']\t= $request->content_desc;\n\t\t $execution_content['class']\t\t\t= $request->class;\n\t\t $execution_content['index']\t\t\t= $request->index;\n\t\t $execution_content['sendkey']\t\t= $request->sendkey;\n\t\t $execution_content['screenshot']\t= $request->screenshot;\n\t\t $execution_content['checkpoint']\t= $request->checkpoint;\n\t\t $execution_content['wait']\t\t\t= $request->wait;\t\t \n\t\t\t\t$tc_id\t\t\t\t\t\t\t\t= $request->tc_id;\n\n\t\t $result = \\App\\Execution::where(['ts_id' => $id, 'tl_id' => 0])->update($execution_content);\n\n\t\t\t\t$del_obj = new DeleteQueryHandler();\t\t\t\t\n\t \t$condition = $del_obj->getCondition($item, $level);\n\t \t$condition['soft_delete'] = false;\n\t \t$all_steps = \\App\\TestStep::where($condition)->get();\n\t \tforeach ($all_steps as $step_value) {\n\t \t\tif($step_value->ts_id != $id)\n\t \t\t{\n\t \t\t\t$step_value->update($content);\n\t \t\t\t//exit;\n\t \t\t\t\\App\\Execution::where(['ts_id' => $step_value->ts_id, 'tl_id' => 0])->update($execution_content);\n\t \t\t}\n\t \t}\n\t \t$message = $this->getMessage('messages.success');\n\t \t$message.= \" Total Steps updated = \".count($all_steps);\n\t\t\t\tToast::success($message);\n\n\t\t\t\treturn redirect()->route('testcase.show', ['id' => $tc_id]);\n\n\t\t\t \t//return redirect()->route('teststep.show', ['id' => $id]);\n\t\t \t}else\n\t\t \t{\n\t\t \t\t$error[] = \"Session expired. Please login to continue\";\n\t\t \t}\n\t \t}/*\n\t \t$message = $this->getMessage('messages.update_failed');\n \tToast::message($message, 'danger');*/\n\t \treturn redirect()->route('teststep.edit', ['id' => $id, 'message' => $error])->withInput();\n\t}", "function update_sample($edit_sample,$sample_manual_id, $sample_name, $sample_unit, $sample_result, $client_id, $sample_type, $pay_status, $sample_image, $date_taken, $result_taken, $comment, $lab_scientist, $sample_description) {\r\n\t\tglobal $db;\r\n\t\t$query = \"UPDATE samples SET\r\n\t\t\tsample_manual_id='\".$sample_manual_id.\"',\r\n\t\t\tsample_name='\".$sample_name.\"',\r\n\t\t\tsample_unit='\".$sample_unit.\"',\r\n\t\t\tsample_result='\".$sample_result.\"',\r\n\t\t\tclient_id='\".$client_id.\"',\r\n\t\t\tsample_type='\".$sample_type.\"',\r\n\t\t\tpay_status='\".$pay_status.\"',\r\n\t\t\tsample_image='\".$sample_image.\"',\r\n\t\t\tsample_type='\".$sample_type.\"',\r\n\t\t\tdate_taken='\".$date_taken.\"',\r\n\t\t\tresult_taken='\".$result_taken.\"',\r\n\t\t\tcomment='\".$comment.\"',\r\n\t\t\tlab_scientist='\".$lab_scientist.\"',\r\n\t\t\tsample_description='\".$sample_description.\"'\r\n\t\t\tWHERE sample_id='\".$edit_sample.\"'\r\n\t\t\";\r\n\t\t$result = $db->query($query) or die($db->error);\r\n\t\t\r\n\t\treturn 'Sample was updated successfuly.';\t\r\n\t}", "public function update_details($param) {\n \n }", "function update_scheduled_test($id,$params)\n {\n $this->db->where('id',$id);\n return $this->db->update('scheduled_tests',$params);\n }", "public function updateJudgeParametersDB($data){\n $this->db->select('id');\n $this->db->from('user_contest_report');\n $this->db->where('userSmuleID',$data['userSmuleID']);\n $q = $this->db->get();\n $row = $q->result();\n $userContestReportID = $row[0]->id;\n $this->db->set(\"userContestReportID\",$userContestReportID);\n $this->db->where('userSmuleID',$data['userSmuleID']);\n $this->db->update('users_judge');\n /** this is after payment */\n\n //print_r($data);die(\"ddddd\");\n $this->db->set('sur', $data['sur']);\n $this->db->set('Taal', $data['Taal']);\n $this->db->set('Emotion_Feel', $data['Emotion_Feel']);\n $this->db->set('Voice_Quality_Nasal', $data['Voice_Quality_Nasal']);\n $this->db->set('Soothing_Level', $data['Soothing_Level']);\n $this->db->set('Copy_Or_Originality', $data['Copy_Or_Originality']);\n $this->db->set('Variation', $data['Variation']);\n $this->db->set('Diction', $data['Diction']);\n $this->db->set('Murki_Vibratos', $data['Murki_Vibratos']);\n $this->db->set('Alaap', $data['Alaap']);\n $this->db->set('Sargam', $data['Sargam']);\n $this->db->set('Judge_Score', $data['Judge_Score']);\n $this->db->set('parameter1', $data['parameter1']);\n $this->db->set('parameter2', $data['parameter2']);\n $this->db->set('parameter3', $data['parameter3']);\n $this->db->set('parameter4', $data['parameter4']);\n $this->db->set('parameter5', $data['parameter5']);\n $this->db->where('userSmuleID',$data['userSmuleID']);\n return $this->db->update('user_contest_report');\n }", "public function update(Request $request, $id)\n {\n $data=Test::find($id);\n\n $request->validate([\n 'name'=>'required',\n 'price'=>'required',\n 'details'=>'required',\n 'spiceman'=>'required',\n 'tester_name'=>'required',\n 'test'=>'required'\n\n\n ]);\n\n\n $data->name=$request->name;\n $data->price=$request->price;\n $data->details=$request->details;\n $data->spiceman=$request->spiceman;\n $data->tested_by=$request->tester_name;\n $data->type=$request->test;\n $data->save();\n Toastr::success('Test successfully Updated',' Updated');\n return redirect()->route('admin.test.index');\n\n }", "protected function update($tableName, $data, $params=null) {\n $condition = \"\";\n if(!is_array($data) || !array_key_exists($tableName, $data))return FALSE;\n $data = $this->ignoreBlankValueFields($data);\n $data = $this->processData($tableName, $data);\n foreach ($data[$tableName] as $field => $value) {\n if ($field == 'id' || 'ID' === $field) continue;\n $temp[] = $field . \" = \" . $value;\n }\n\t\t\t\t\n if(is_array($params) && array_key_exists('condition', $params)){\n $arrFields = $this->formatWhereCondition($tableName, $params['condition']);\n $condition = $this->where($tableName,$arrFields);\n//\t\t\tpr($arrFields);\n $sql = \"update {$tableName} set \" . implode(',', $temp) . \" {$condition} ;\";\n if(isset($data[$tableName]['id'])) $sql .= \" AND id = \".$data[$tableName]['id'];\n if(isset($data[$tableName]['ID']) and !isset($arrFields['ID'])) $sql .= \" AND {$tableName}.ID = \".$data[$tableName]['ID'];\n }\n else{\n $sql = \"update {$tableName} set \" . implode(',', $temp) . \" where \";//id=\" . $data[$tableName]['id'] . \";\";\n\t\t\tif(isset($data[$tableName]['id'])) $sql .= \" id = \".$data[$tableName]['id'];\n if(isset($data[$tableName]['ID'])) $sql .= \" {$tableName}.ID = \".$data[$tableName]['ID'];\n }\n\n\t $result = $this->query($sql);\n if(!$result){\n pr($sql);\n return FALSE;\n }\n return $this->countAffecetedRows($result);\n }", "function test_update($urabe, $body)\n{\n $values = $body->update_params;\n $column_name = $body->column_name;\n $column_value = $body->column_value;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->update($table_name, $values, \"$column_name = $column_value\");\n}", "public function update( array $params );", "public static function Update( $params ) {\n clude( 'models/submission.php' );\n global $user;\n $user[ 'rights' ] < 40 && die( 'hard' );\n \n Controller::RequiredParameters( $params, 'userid', 'assignmentid', 'validationid' ) or die( 'hard' );\n if( Submission::Update( $params[ 'userid' ], $params[ 'assignmentid' ], $params[ 'validationid' ] ) == 0 ){\n Submission::Create( $params[ 'assignmentid' ], $params[ 'userid' ], $params[ 'validationid' ] );\n }\n $res = Submission::UserResults( $params[ 'userid' ], $params[ 'assignmentid' ] );\n //TODO: write a view to output the description.\n echo $res[ 0 ][ 'description' ];\n }", "public function update(Request $request, TestResult $testResult)\n {\n //\n }", "function update_predefined_innovation_plan($id, $params)\n {\n $this->db->where('id', $id);\n $status = $this->db->update('predefined_innovation_plan', $params);\n $db_error = $this->db->error();\n if (! empty($db_error['code'])) {\n echo 'Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message'];\n exit();\n }\n return $status;\n }", "public function updateTicketById() {\n if (func_num_args() > 0):\n $ticketId = func_get_arg(0);\n $edit = func_get_arg(1);\n $where = \"ticket_id = \" . $ticketId;\n $check = $this->update($edit, $where);\n\n if ($check):\n return 1;\n endif;\n else:\n throw new Exception('Argument Not Passed');\n endif;\n }", "function update() {\n $col_names = array('first_name', 'last_name', 'category_id', 'active');\n $dat_param = array(':fn', ':ln', ':ci', ':ac');\n $sani_type = array('str', 'str', 'int', 'flag');\n $sub_check = array(false, false, false, false);\n $dat_types = array(PDO::PARAM_STR, PDO::PARAM_STR, PDO::PARAM_INT, PDO::PARAM_INT);\n\n $any_sub = false;\n\n //make sure non-optional data is set\n if (!isset($this->id)) throw new Exception('id must be provided');\n if (!isset($this->updated_by)) throw new Exception('updated_by must be provided'); \n\n $update_string = \"updated_by=:ub\";\n \n //check if updateable data exists, sanitize it, build up the update string:\n //a) loop through the updateable parameters\n for ($i = 0; $i < count($col_names); $i++) {\n\n //b) if it is set, attempt to sanitize/check it for update\n if (isset($this->{$col_names[$i]})) {\n $any_sub = true;\n $sub_check[$i] = true;\n $update_string .= \", {$col_names[$i]}={$dat_param[$i]}\";\n\n //c) sanitize/check by type\n if ($sani_type[$i] === 'str') {\n $this->{$col_names[$i]} = htmlspecialchars(strip_tags($this->{$col_names[$i]}));\n\n } elseif ($sani_type[$i] === 'flag') {\n if ( !($this->{$col_names[$i]} === 0 || $this->{$col_names[$i]} === 1) ) {\n throw new Exception(\"{$col_names[$i]} must be either 0 or 1\");\n }\n } elseif ($sani_type[$i] === 'int') {\n if (filter_var($this->{$col_names[$i]}, FILTER_VALIDATE_INT) === false) {\n throw new Exception('category_id does not conform');\n }\n }\n }\n } \n\n if (!$any_sub) throw new Exception('no data was submitted for staff member update.');\n \n $sql = \"UPDATE \n {$this->table_name}\n SET\n {$update_string}\n WHERE\n id=:id\";\n\n $stmt = $this->conn->prepare($sql);\n \n //bind the non-optional data to the query\n $stmt->bindParam(':id', $this->id, PDO::PARAM_INT);\n $stmt->bindParam(':ub', $this->updated_by, PDO::PARAM_STR);\n\n //if the data was found and sanitized, then bind the data to the parameter\n for ($i=0; $i < count($col_names); $i++) { \n if ($sub_check[$i] === true) {\n $stmt->bindParam($dat_param[$i], $this->{$col_names[$i]}, $dat_types[$i]);\n }\n }\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }", "public function adminEditUserProfile($id,$title,$full_name,$dob,$gender,$address,$phone)\n {\n $title = $this->secureInput($title);\n $full_name = $this->secureInput($full_name);\n $dob = $this->secureInput($dob);\n $gender = $this->secureInput($gender);\n $address = $this->secureInput($address);\n //$city = $this->secureInput($city);\n //$state = $this->secureInput($state);\n //$country = $this->secureInput($country);\n $phone = $this->secureInput($phone);\n\n//$sql = \"UPDATE users SET title = '\" . $title . \"', full_name = '\" . $full_name . \"', dob = '\" . $dob . \"', gender = '\" . $gender . \"', address = '\" . $address . \"', city = '\" . $city . \"', state = '\" . $state . \"', country = '\" . $country . \"', phone = '\" . $phone . \"', level_access = '\" . $level_access . \"' WHERE id = '\" . $id . \"'\";\n\n$sql = \"UPDATE users SET title = '\" . $title . \"', full_name = '\" . $full_name . \"', dob = '\" . $dob . \"', gender = '\" . $gender . \"', address = '\" . $address . \"', phone = '\" . $phone . \"' WHERE id = '\" . $id . \"'\";\n\n $res = $this->processSql($sql);\n if(!$res) return 4;\n return 99;\n }", "public function Update($data) {\n\n }", "public function update($id,$data)\n\t{\n\t\t$this->db->db_debug = false;\n\t\t$this->db->where('id', $id);\n\t\t$this->db->update('specifications', $data);\n\t\t$this->db->db_debug = true;\n\t\t$error = $this->db->error();\n\t\tif ( $error['code'] == 0 ){\n\t\t\treturn ['error'=>false,'msg'=>''];\n\t\t}\n\t\telse{\n\t\t\treturn ['error'=>true,'msg'=>$error['message']];\n\t\t}\t\n\t}", "public function testUpdateExperiment()\n {\n echo \"\\nTesting experiment update...\";\n $id = \"0\";\n \n //echo \"\\n-----Is string:\".gettype ($id);\n $input = file_get_contents('exp_update.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/experiments/\".$id.\"?owner=wawong\";\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context.\"/experiments/\".$id.\"?owner=wawong\";\n \n //echo \"\\nURL:\".$url;\n $params = json_decode($input);\n $data = json_encode($params); \n $response = $this->curl_put($url,$data);\n \n $json = json_decode($response);\n $this->assertTrue(!$json->success);\n \n }", "function update_finish_trip_detail($finish_id,$params)\n {\n $this->db->where('finish_id',$finish_id);\n $response = $this->db->update('Finish_trip_details',$params);\n if($response)\n {\n return \"finish_trip_detail updated successfully\";\n }\n else\n {\n return \"Error occuring while updating finish_trip_detail\";\n }\n }", "public function update(Request $request, Cases $cases)\n {\n //\n }", "public function update(TestRequest $request, $id)\n {\n $test = $this->testService->getById($id); \n $this->authorize('update',$test);\n $validatedData = $request->validated(); \n $validatedData['id']=$id;\n $this->testService->createOrUpdate($validatedData); \n Session::flash('message','Information updated successfully!!!!');\n return redirect()->route('tests.index');\n }", "public static function Test()\n {\n //---------------------------------------------------------------\n // DB Types\n //---------------------------------------------------------------\n $db_types = [\n 'mysql',\n 'pgsql',\n 'oracle',\n 'sqlsrv'\n ];\n\n //---------------------------------------------------------------\n // Build SQL Update Statements for each database type\n //---------------------------------------------------------------\n foreach ($db_types as $db_type) {\n\n //----------------------------------------------------------------\n // Test Header\n //----------------------------------------------------------------\n $disp_db_type = ucfirst($db_type);\n print \"\\n-------------------------------------------------------\";\n print \"\\n*** {$disp_db_type} Update Statements\";\n print \"\\n-------------------------------------------------------\\n\\n\";\n\n //---------------------------------------------------------------\n // Test Values\n //---------------------------------------------------------------\n $values = [\n ['field_1', 'value_1'],\n ['field_2', 'value_2']\n ];\n\n //---------------------------------------------------------------\n // Create / Start SQL Update Statement\n //---------------------------------------------------------------\n $query = SQL::Update('cases')\n ->SetDbType($db_type)\n ->Values($values)\n ->Value('field_2', 22, 'i')\n ->Value('field_3', 'value_3')\n ->Value('field_4', null)\n ->Where('field_id', '=', 4);\n\n //---------------------------------------------------------------\n // Output Query / Bind Parameters\n //---------------------------------------------------------------\n print $query . \"\\n\";\n print_r($query->GetBindParams());\n }\n }", "public function updateCampaign($params)\r\n {\r\n }", "public static function updateByBesttjTmps($data, $params) {\n\t\treturn self::_getBesttjTmpDao()->updateBy($data, $params);\n\t}", "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}" ]
[ "0.6722942", "0.632598", "0.6219471", "0.6124479", "0.59990466", "0.57119644", "0.5664092", "0.565906", "0.56297535", "0.5605479", "0.55991024", "0.5564807", "0.5548596", "0.5547686", "0.5542058", "0.55404466", "0.55161804", "0.5507624", "0.5500474", "0.54761904", "0.5453469", "0.5449521", "0.5445034", "0.54374045", "0.5425307", "0.5421345", "0.53923994", "0.53756416", "0.53734875", "0.53695583" ]
0.740405
0
/ get_text Get TestCase's Current Action/Effect Document Usage TestCase.get_text Parameters ParameterData Type case_idinteger Result Array [author_id] [breakdown] [setup] [version] [effect] [action]
function TestCase_get_text($case_id) { // Create call $call = new xmlrpcmsg('TestCase.get_text', array(new xmlrpcval($case_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function textus_get_text($id, $type) {\n $request = new get_text_controller();\n $text = $request->ol_get_text($id, $type);\n\n if ($text['error']) {\n return $text['error'];\n }\n else{\n return $text['data'];\n }\n}", "function TestCase_store_text($case_id, $author_id = NULL, $action = NULL, $effect = NULL, $setup = NULL, $breakdown = NULL) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.store_text', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($author_id, \"int\"), new xmlrpcval($action, \"string\"), new xmlrpcval($effect, \"string\"), new xmlrpcval($setup, \"string\"), new xmlrpcval($breakdown, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function get_text()\n {\n }", "public function getText()\n {\n $parameters = func_get_args();\n\n //set parameter values\n if (count($parameters) > 0) {\n $pageNumber = $parameters[0];\n }\n\n\n $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName() .\n ((isset($parameters[0])) ? '/pages/' . $pageNumber . '/TextItems' : '/TextItems');\n\n $signedURI = Utils::sign($strURI);\n\n $responseStream = Utils::processCommand($signedURI, 'GET', '', '');\n\n $json = json_decode($responseStream);\n\n $rawText = '';\n foreach ($json->TextItems->List as $textItem) {\n $rawText .= $textItem->Text;\n }\n return $rawText;\n }", "function get_post_result($id, $text)\n {\n }", "function get_post_result($id, $text)\n {\n }", "function get_post_result($id, $text)\n {\n }", "public function get($text);", "public function getTextContent();", "public function getTextItems()\n {\n $parameters = func_get_args();\n\n //set parameter values\n if (count($parameters) == 1) {\n $pageNumber = $parameters[0];\n } else if (count($parameters) == 2) {\n $pageNumber = $parameters[0];\n $fragmentNumber = $parameters[1];\n }\n\n\n $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName();\n if (isset($parameters[0])) {\n $strURI .= '/pages/' . $pageNumber;\n if (isset($parameters[1])) {\n $strURI .= '/fragments/' . $fragmentNumber;\n }\n }\n $strURI .= '/TextItems';\n $signedURI = Utils::sign($strURI);\n\n $responseStream = Utils::processCommand($signedURI, 'GET', '', '');\n\n $json = json_decode($responseStream);\n\n return $json->TextItems->List;\n }", "public static function text() {}", "public function text() {}", "public function text() {}", "public function text() {}", "function get_test_solution($testtype, $wo_record, $nosent, $wo_text)\n{\n if ($testtype == 1) {\n $trans = repl_tab_nl($wo_record['WoTranslation']) . \n getWordTagList($wo_record['WoID'], ' ', 1, 0);\n return $nosent ? $trans : \"[$trans]\";\n }\n return $wo_text;\n}", "public function getText();", "public function getText();", "public function getText();", "function textus_get_control()\n{\n global $urllink;\n\n if (is_server()) {\n \n // Load the relevant controller that contains the methods/\n \n switch($_SERVER['REQUEST_METHOD']) {\n case 'GET':\n $request = new get_text_controller();\n //$parse = parse_parameters();\n if ( $_GET['type'] == 'annotation' ) {\n if (intval($_GET['text'])) {\n return_response(textus_get_annotations($_GET['text']));\n #return_response(array(\"status\"=>200, \"notes\"=>textus_get_annotations($_GET['text'])));\n } else {\n return_response(array(\"status\" => 403, \"error\"=>\"You need to specify a text\"));\n }\n }\n break;\n case 'POST':\n $textid = json_decode(file_get_contents(\"php://input\"), TRUE);\n if (isset($textid['textid'])) {\n if ( ! is_user_logged_in()) {\n return_response(array(\"status\" => 403, \"note\"=>\"This user is not logged in\"));\n } else {\n\t\t $current_user = wp_get_current_user();\n\t\t $noteid = textus_insert_annotation(\n\t\t $current_user->ID, $textid['textid'], \n\t\t $textid['start'], $textid['end'], \n\t\t $textid['private'], \n\t\t $textid['payload']['language'], $textid['payload']['text']\n\t\t );\n\n\t\t if (intval($noteid) > 0) {\n\t\t return_response(array(\"status\" => 200, \"note\"=>\"The note has been stored\" + intval($noteid)));\n\t\t } else {\n\t\t return_response(array(\"status\" => 403, \"note\"=>\"The note could not updated\"));\n\t\t }\n\t\t \n\t\t break;\n }\n } else {\n break;\n }\n case 'PUT':\n $textid = json_decode(file_get_contents(\"php://input\"), TRUE);\n print \"PUT\";\n if (isset($textid['textid'])) {\n\t\t // returns the new noteid\n if ( ! is_user_logged_in()) {\n return_response(array(\"status\" => 403, \"note\"=>\"This user is not logged in\"));\n } else {\n $current_user = wp_get_current_user();\n\t\t $noteid = textus_updates_annotation(\n\t\t $current_user->ID, $textid['textid'], \n\t\t $textid['start'], $textid['end'], \n\t\t $textid['private'], \n\t\t $textid['payload']['language'], $textid['payload']['text'], $textid['id']);\n\t\t \n\t\t if (intval($noteid) > 0 ) {\n\t\t return_response(array(\"status\"=> 200, \"notes\" => $textid['id'] + \" has been updated\"));\n\t\t }\n\t\t break;\n }\n } else {\n break;\n }\n case 'DELETE':\n \n //@todo get the vars which the textus viewer sets\n $textid = json_decode(file_get_contents(\"php://input\"), TRUE);\n if ( ! is_user_logged_in()) {\n return_response(array(\"status\" => 403, \"note\"=>\"This user is not logged in\"));\n } else {\n $current_user = wp_get_current_user();\n\t\t $noteid = textus_delete_annotation($textid['id']);\n\t\t if (intval($noteid) > 0 ) {\n\t\t return_response(array(\"status\"=> 200, \"notes\" => $textid['id'] + \" has been deleted\"));\n\t\t }\n\t\t break;\n }\n\n default:\n $parse = parse_parameters();\n if ($parse['action'] == 'json') {\n return wp_send_json( array ('error' => 'Method is unsupported') );\n }\n break;\n }\n }\n}", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "public abstract function get($text);", "function sensei_custom_lesson_quiz_text () {\n\t$text = \"Report What You Have Learned\";\n\treturn $text;\n}", "function get_comment_text($comment_id = 0, $args = array())\n {\n }", "function do_test_get_test_sql($selection, $sess_testsql, $lang, $text)\n{\n if (isset($selection) && isset($sess_testsql)) {\n $testsql = do_test_test_from_selection($selection, $sess_testsql);\n } else if (isset($lang) && is_numeric($lang)) {\n $testsql = do_test_test_get_projection(2, (int)$lang);\n } else if (isset($text) && is_numeric($text)) {\n $testsql = do_test_test_get_projection(3, (int)$text);\n } else {\n my_die(\"do_test_test.php called with wrong parameters\"); \n }\n return $testsql;\n\n}", "function get_test_sql()\n{\n return do_test_get_test_sql(\n $_REQUEST['selection'], $_SESSION['testsql'], \n $_REQUEST['lang'], $_REQUEST['text']\n );\n}", "public function getTextEntity();", "private function _getTextContent($arguments) {\n $result = '';\n foreach ($arguments as $value) {\n if (is_array($value)) {\n $result .= $this->_getTextContent_recursive($value);\n } else {\n $result .= $value;\n }\n }\n\n return $result;\n }", "public function parseActionTextFromWiki(string $wikiText): array;", "private function extractGettextStrings()\n {\n $translation = null;\n $translationObjects = array();\n $lookupDirectories = array(\n Strata::getVendorPath() . 'strata-mvc' . DIRECTORY_SEPARATOR . 'strata' . DIRECTORY_SEPARATOR . 'src',\n Strata::getSrcPath(),\n Strata::getThemesPath(),\n );\n\n foreach ($lookupDirectories as $directory) {\n $translationObjects = $this->recurseThroughDirectory($directory);\n\n // Merge all translation objects into a bigger one\n foreach ($translationObjects as $t) {\n if (is_null($translation)) {\n $translation = $t;\n } else {\n $translation->mergeWith($t);\n }\n }\n }\n\n return $translation;\n }", "function do_text_text_content($textid, $only_body=true): void\n{\n // Text settings\n $record = get_text_data($textid);\n $title = $record['TxTitle'];\n $langid = (int)$record['TxLgID'];\n $ann = $record['TxAnnotatedText'];\n $pos = $record['TxPosition'];\n \n // Language settings\n $record = get_language_settings($langid);\n $wb1 = isset($record['LgDict1URI']) ? $record['LgDict1URI'] : \"\";\n $wb2 = isset($record['LgDict2URI']) ? $record['LgDict2URI'] : \"\";\n $wb3 = isset($record['LgGoogleTranslateURI']) ? $record['LgGoogleTranslateURI'] : \"\";\n $textsize = $record['LgTextSize'];\n $removeSpaces = $record['LgRemoveSpaces'];\n $rtlScript = (bool)$record['LgRightToLeft'];\n \n // User settings\n $showAll = getSettingZeroOrOne('showallwords', 1);\n $showLearning = getSettingZeroOrOne('showlearningtranslations', 1);\n \n /**\n * @var int $mode_trans \n * Annotation position between 0 and 4\n */\n $mode_trans = (int) getSettingWithDefault('set-text-frame-annotation-position');\n /**\n * @var bool $ruby \n * Ruby annotations\n */\n $ruby = $mode_trans==2 || $mode_trans==4;\n\n if (!$only_body) {\n // Start the page with a HEAD and opens a BODY tag \n pagestart_nobody($title);\n }\n ?>\n <script type=\"text/javascript\" src=\"js/jquery.hoverIntent.js\" charset=\"utf-8\"></script>\n <?php \n $visit_status = getSettingWithDefault('set-text-visit-statuses-via-key');\n if ($visit_status == '') {\n $visit_status = '0';\n }\n $var_array = array(\n // Change globals from jQuery hover\n 'ANN_ARRAY' => json_decode(annotation_to_json($ann)),\n 'DELIMITER' => tohtml(\n str_replace(\n array('\\\\',']','-','^'), \n array('\\\\\\\\','\\\\]','\\\\-','\\\\^'), \n getSettingWithDefault('set-term-translation-delimiters')\n )\n ),\n 'WBLINK1' => $wb1,\n 'WBLINK2' => $wb2,\n 'WBLINK3' => $wb3,\n 'RTL' => $rtlScript,\n 'TID' => $textid,\n 'ADDFILTER' => makeStatusClassFilter((int)$visit_status),\n 'JQ_TOOLTIP' => getSettingWithDefault('set-tooltip-mode') == 2 ? 1 : 0,\n // Add new globals\n 'ANNOTATIONS_MODE' => $mode_trans,\n 'POS' => $pos\n );\n do_text_text_javascript($var_array);\n do_text_text_style($showLearning, $mode_trans, $textsize, strlen($ann) > 0);\n ?>\n\n <div id=\"thetext\" <?php echo ($rtlScript ? 'dir=\"rtl\"' : '') ?>>\n <p style=\"margin-bottom: 10px;\n <?php echo $removeSpaces ? 'word-break:break-all;' : ''; ?>\n font-size: <?php echo $textsize; ?>%; \n line-height: <?php echo $ruby?'1':'1.4'; ?>;\"\n >\n <!-- Start displaying words -->\n <?php main_word_loop($textid, $showAll); ?></span>\n </p>\n <p style=\"font-size:<?php echo $textsize; ?>%;line-height: 1.4; margin-bottom: 300px;\">&nbsp;</p>\n </div>\n <?php \n if (!$only_body) { \n pageend(); \n }\n flush();\n}" ]
[ "0.633306", "0.63069797", "0.611637", "0.6106155", "0.57421637", "0.57421637", "0.57421637", "0.5738834", "0.5727041", "0.5650954", "0.56212974", "0.5558869", "0.5558869", "0.5558869", "0.5532755", "0.55106664", "0.55106664", "0.55106664", "0.55104756", "0.5506447", "0.5470867", "0.53800166", "0.5341837", "0.53416497", "0.5334212", "0.52985", "0.5295598", "0.5292847", "0.52819926", "0.527539" ]
0.67922986
0
/ store_text Add A New TestCase Action/Effect Document Usage TestCase.store_text Parameters ParameterData Type case_idinteger author_idinteger actionstring effectstring setupstring breakdownstring Result version
function TestCase_store_text($case_id, $author_id = NULL, $action = NULL, $effect = NULL, $setup = NULL, $breakdown = NULL) { // Create call $call = new xmlrpcmsg('TestCase.store_text', array(new xmlrpcval($case_id, "int"), new xmlrpcval($author_id, "int"), new xmlrpcval($action, "string"), new xmlrpcval($effect, "string"), new xmlrpcval($setup, "string"), new xmlrpcval($breakdown, "string"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function writeToFile($text) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('writeToFile', func_get_args()));\n }", "function updateTestSuite(&$tsuiteMgr,&$argsObj,$container,&$hash)\r\n{\r\n $msg = 'ok';\r\n $ret = $tsuiteMgr->update($argsObj->testsuiteID,$container['container_name'],$container['details']);\r\n if($ret['status_ok'])\r\n {\r\n $tsuiteMgr->deleteKeywords($argsObj->testsuiteID);\r\n if(trim($argsObj->assigned_keyword_list) != \"\")\r\n {\r\n $tsuiteMgr->addKeywords($argsObj->testsuiteID,explode(\",\",$argsObj->assigned_keyword_list));\r\n }\r\n writeCustomFieldsToDB($tsuiteMgr->db,$argsObj->tprojectID,$argsObj->testsuiteID,$hash);\r\n }\r\n else\r\n {\r\n $msg = $ret['msg'];\r\n }\r\n return $msg;\r\n}", "function TestCase_create($author_id, $case_status_id, $category_id, $isautomated, $plan_id, $alias = NULL, $arguments = NULL, $canview = NULL, $creation_date = NULL, $default_tester_id = NULL, $priority_id = NULL, $requirement = NULL, $script = NULL, $summary = NULL, $sortkey = NULL) {\n\t$varray = array(\"author_id\" => \"int\", \"case_status_id\" => \"int\", \"category_id\" => \"int\", \"isautomated\" => \"int\", \"plan_id\" => \"int\", \"alias\" => \"string\", \"arguments\" => \"string\", \"canview\" => \"int\", \"creation_date\" => \"string\", \"default_tester_id\" => \"int\", \"priority_id\" => \"int\", \"requirement\" => \"string\", \"script\" => \"string\", \"summary\" => \"string\", \"sortkey\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function run()\n {\n $count = CountString::$countTests;\n $ar = $this->getAr();\n for ($i = 1, $ii = 1; $i <= $count; $i++, $ii++) {\n if ($ii > 3) {\n $ii = 1;\n }\n\n if ((Test::where('id', '=', $i)->first()) === null) {\n $Test = Test::create([\n 'user_id' => '1',\n 'grade_id' => $ii ,\n 'subject_id' => $ii,\n 'page_id' => $ii,\n 'name' => ($i) . '-й тест',\n 'slug' => str_slug(($i) . '-й тест', '_', 'en'),\n\n\n 'text_input' => $ar['input'][$ii-1],\n 'text_html' => $ar['html'][$ii-1],\n\n 'difficulty' => 0,\n 'difficulty_2' => 0,\n 'difficulty_3' => 0,\n\n\n 'comment' => 'comment - ' . $i,\n 'description' => 'description - ' . $i,\n\n\n 'active' => 1,\n 'published_at' => now()\n\n ]);\n\n $Test->save();\n }\n }\n }", "public function add_text($text)\n {\n }", "public static function insert($title, $text, $storyID, $additionalFields = array()) {\n $keys = $values = '';\n foreach ($additionalFields as $key => $value) {\n $keys .= ',' . $key;\n $values .= \",'\" . escapeString($value) . \"'\";\n }\n if (CHAPTER_IN_FILE) {\n $sql = \"INSERT INTO\tsls\" . SLS_N . \"_chapter\n\t\t\t\t\t(storyID, title\n\t\t\t\t\t\" . $keys . \")\n\t\t\tVALUES\t\t(\" . $storyID . \", '\" . escapeString($title) . \"'\n\t\t\t\t\t\" . $values . \")\";\n } else {\n $sql = \"INSERT INTO\tsls\" . SLS_N . \"_chapter\n\t\t\t\t\t(storyID, title, text\n\t\t\t\t\t\" . $keys . \")\n\t\t\tVALUES\t\t(\" . $storyID . \", '\" . escapeString($title) . \"', '\" . escapeString($text) . \"'\n\t\t\t\t\t\" . $values . \")\";\n }\n WCF::getDB()->sendQuery($sql);\n $chapterID = WCF::getDB()->getInsertID();\n if (CHAPTER_IN_FILE) {\n $file = CHAPTER_FILE_PATH . \"/\" . $authorID . \"/\" . $chapterID . \"_cache.txt\";\n file_put_contents($file, escapeString($text));\n }\n return $chapterID;\n }", "function addTestSuite(&$tsuiteMgr,&$argsObj,$container,&$hash)\r\n{\r\n $new_order = null;\r\n\r\n // compute order\r\n //\r\n // $nt2exclude=array('testplan' => 'exclude_me','requirement_spec'=> 'exclude_me','requirement'=> 'exclude_me');\r\n // $siblings = $tsuiteMgr->tree_manager->get_children($argsObj->containerID,$nt2exclude);\r\n // if( !is_null($siblings) )\r\n //{\r\n // $dummy = end($siblings);\r\n // $new_order = $dummy['node_order']+1;\r\n //}\r\n $ret = $tsuiteMgr->create($argsObj->containerID,$container['container_name'],\r\n $container['details'],\r\n $new_order,config_get('check_names_for_duplicates'),'block');\r\n \r\n $op['messages']= array('msg' => $ret['msg'], 'user_feedback' => '');\r\n $op['status']=$ret['status_ok'];\r\n\r\n if($ret['status_ok'])\r\n {\r\n $op['messages']['user_feedback'] = lang_get('testsuite_created');\r\n if($op['messages']['msg'] != 'ok')\r\n {\r\n $op['messages']['user_feedback'] = $op['messages']['msg'];\r\n }\r\n\r\n if(trim($argsObj->assigned_keyword_list) != \"\")\r\n {\r\n $tsuiteMgr->addKeywords($ret['id'],explode(\",\",$argsObj->assigned_keyword_list));\r\n }\r\n writeCustomFieldsToDB($tsuiteMgr->db,$argsObj->tprojectID,$ret['id'],$hash);\r\n }\r\n return $op;\r\n}", "public function store() {\n if (!Auth::check()) {\n return;\n }\n $data = Paragraph::find(Input::get(\"id\"));\n if (!$data) {\n $data = new Paragraph;\n $data->type = Input::get(\"t\");\n $data->uid_create = 1;\n $data->uid_edit = 1;\n }\n $data->title = Input::get(\"title\");\n $data->content = Input::get(\"content\");\n $data->save();\n /* update paragraph type = row custum parameters */\n if ('R' == Input::get(\"t\")) {\n Paragraph_attrs::where('par_id', Input::get(\"id\"))\n ->where('name', 'ROW_URL_TEXT')\n ->update(['value' => Input::get(\"urlText\")]);\n Paragraph_attrs::where('par_id', Input::get(\"id\"))\n ->where('name', 'ROW_URL')\n ->update(['value' => Input::get(\"url\")]);\n }\n return $data->id;\n }", "public function store()\n\t{\n\t\treturn 'add the new bottle given the post data';\n\t}", "public function createAction() {\n\n $this->validateUser();\n\n $form = new Yourdelivery_Form_Testing_Create();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->getRequest()->getPost())) {\n if ($form->getValue('tag') && $this->getRequest()->getParam('proceed') == 'false') {\n $tags = Yourdelivery_Model_Testing_TestCase::searchForTags($form->getValue('tag'));\n\n if ($tags) {\n foreach ($tags as $tag) {\n $ids .= sprintf('<a href=\"/testing_cms/overview/id/%s\" target=\"blank\">%s</a> ', $tag['id'], $tag['id']);\n }\n $this->warn('Tag already in use for testcase ' . $ids);\n $this->_redirect(vsprintf('testing_cms/create/title/%s/author/%s/description/%s/priority/%s/tag/%s/proceed/true', $form->getValues()));\n }\n }\n\n $testCase = new Yourdelivery_Model_Testing_TestCase();\n $testCase->setData($form->getValues());\n $id = $testCase->save();\n $this->success('Testcase successfully created.');\n $this->_redirect('testing_cms/add/id/' . $id);\n } else {\n $this->error($form->getMessages());\n }\n }\n $this->view->post = $this->getRequest()->getParams();\n }", "function TestCaseRun_create($assignee, $build_id, $case_id, $case_text_version, $environment_id, $run_id, $canview = NULL, $close_date = NULL, $iscurrent = NULL, $notes = NULL, $sortkey = NULL, $testedby = NULL) {\n\t$varray = array(\"assignee\" => \"int\", \"build_id\" => \"int\", \"case_id\" => \"int\", \"case_text_version\" => \"int\", \"environment_id\" => \"int\", \"run_id\" => \"int\", \"canview\" => \"int\", \"close_date\" => \"string\", \"iscurrent\" => \"int\", \"notes\" => \"string\", \"sortkey\" => \"int\", \"testedby\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function perform()\n {\n // init template array to fill with node data\n $this->viewVar['title'] = '';\n // Init template form field values\n $this->viewVar['error'] = array();\n\n $this->viewVar['htmlTitle'] .= ' Add new simple text';\n\n $addtext = $this->httpRequest->getParameter('addtext', 'post', 'alnum');\n $cancel = $this->httpRequest->getParameter('cancel', 'post', 'alpha');\n\n if(false !== $cancel)\n {\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/default/cntr/advancedMain');\n }\n\n\n // add node\n if( !empty($addtext) )\n {\n if(false !== ($id_text = $this->addText()))\n {\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/misc/cntr/editText/id_text/'.$id_text);\n }\n }\n }", "function addText($text);", "function addText($key, $text);", "function log_act($text, $name, $detail) {\n\n\tglobal $zurich;\t\n\t\n\t$text = addslashes($text);\n\tdb_write(\"INSERT INTO log (name, action, detail, time) \n\t\t\t\tVALUES ('$name', '$text', '$detail', '$zurich->time')\");\n}", "public function testAddActionPostDescriptionAndReviewersParams()\n {\n // create some records we need for testing\n $change = $this->createChange();\n $user = new User;\n $user->setId('user1')->setEmail('[email protected]')->setFullName('user1')->save();\n\n // test adding a new change\n $postData = new Parameters(\n array(\n 'change' => $change->getId(),\n 'description' => \"Give it a lick, \\r\\n it tastes just like raisins. \",\n 'reviewers' => array('nonadmin', 'user1'),\n )\n );\n $this->getRequest()\n ->setMethod(\\Zend\\Http\\Request::METHOD_POST)\n ->setPost($postData);\n\n // dispatch and check output\n $this->dispatch('/review/add');\n\n $result = $this->getResult();\n $this->assertRoute('add-review');\n $this->assertRouteMatch('reviews', 'reviews\\controller\\indexcontroller', 'add');\n $this->assertResponseStatusCode(200);\n $this->assertInstanceOf('Zend\\View\\Model\\JsonModel', $result);\n $this->assertSame(true, $result->getVariable('isValid'));\n\n // process queue (so we can check activity, etc.)\n $this->getRequest()->getQuery()->set('debug', 1)->set('retire', 1);\n $this->dispatch('/queue/worker');\n\n $changeReview = Review::fetchAll(array(Review::FETCH_BY_CHANGE => $change->getId()), $this->p4);\n $this->assertSame(1, $changeReview->count());\n\n $changeReview = $changeReview->first();\n $this->assertSame(2, $changeReview->getId());\n $this->assertSame(array('nonadmin', 'user1'), $changeReview->getReviewers());\n $this->assertSame(\"Give it a lick, \\n it tastes just like raisins.\", $changeReview->get('description'));\n }", "public function store()\n {\n // If the user is logged in...\n if (Auth::check()) {\n // validate\n // read more on validation at http://laravel.com/docs/validation\n $rules = array(\n 'title' => 'required',\n );\n $validator = Validator::make(Input::all(), $rules);\n\n // process the login\n if ($validator->fails()) {\n return Redirect::to('texts/create')\n ->withErrors($validator)\n ->withInput(Input::except('password'));\n } else {\n // store\n $text = new Text;\n $text->title = Input::get('title');\n $text->author = Input::get('author');\n $text->year = Input::get('year');\n $text->description = Input::get('description');\n $text->content = Input::get('content');\n $text->publication = Input::get('publication');\n $text->publication_date = Input::get('publication_date');\n\n $text->save();\n\n // redirect\n Session::flash('message', 'Successfully created text');\n return Redirect::to('texts');\n }\n } else {\n // User is not logged in\n Session::flash('message', 'Please log in');\n return Redirect::to('/');\n }\n }", "public function storePost($title,$description);", "public function testValidateDocumentTxtValidation()\n {\n }", "public function testSendText()\n {\n // workflow, rule, action and object\n $workflow = factory(WorkflowEloquent::class)->create([\n 'user_id' => $this->user->getKey(),\n ]);\n $action1 = factory(ActionEloquent::class)->create([\n 'action_type' => ActionEloquent::ACTION_TYPE_EXECUTE,\n 'target_class' => 'sms',\n 'target_field' => 'sendPrimary',\n 'value' => 'Greetings from KW!',\n ]);\n $workflow->actions()->sync([$action1->getKey() ]); //, $action2->getKey()\n $object = factory(ObjectEloquent::class)->create([\n 'workflow_id' => $workflow->getKey(),\n 'object_class' => 'tags.id',\n 'object_type' => $this->tag->getKey(),\n ]);\n\n\n // rule\n $rule1 = factory(RuleEloquent::class)->create([\n 'name' => 'do email to client person',\n 'workflow_id' => $workflow->getKey(),\n 'rule_type' => RuleEloquent::FIELD_TYPE_NUMBER,\n 'operator' => RuleEloquent::OPERATOR_EQUAL,\n 'field_name' => 'person_contexts.stage_id',\n 'value' => $this->stageId,\n 'runnable_once' => 1, // only once\n ]);\n\n $action1->rules()->sync( [ $rule1->getKey() ] );\n\n // run action runner\n $kernel = $this->app->make(Kernel::class);\n $status = $kernel->handle(\n $input = new ArrayInput(array(\n 'command' => 'workflow:action-run',\n 'workflow' => $workflow->getKey(),\n 'action' => $action1->getKey(),\n )),\n $output = new BufferedOutput\n );\n //echo $output->fetch();\n $this->assertEquals($status, 0);\n\n // check status\n $this->seeInDatabase('action_logs',[\n 'action_id' => $action1->getKey(),\n 'workflow_id' => $workflow->getKey(),\n 'status' => LogInterface::LOG_STATUS_SUCCESS,\n 'object_class' => $this->person->getLoggableType(), //$leadContext->getLoggableType(),\n 'object_id' => $this->person->getKey(), //$leadContext->getKey(),\n 'user_id' => $this->user->getKey(),\n ]);\n\n $this->cleanUpRecords(new PersonObserver, $this->person);\n }", "function TestRun_create($build_id, $environment_id, $manager_id, $plan_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function addnotesAction() {\n\t\t$this->_helper->viewRenderer->setNoRender();\n\t\t$this->_helper->layout()->disableLayout();\n\t\t$id = $this->_getParam('taid');\n\t\t$taFinder = new TeachingActivities();\n\t\t$ta = $taFinder->getTa($id);\n\t\t$notes = stripslashes(strip_tags($this->_getParam('value')));\n\t\t$ta->notes = preg_replace('/[\\r\\n]+/', ' ', $notes);\n\t\t$ta->save();\n\t\techo $ta->notes;\n\t}", "public function createQuestion($examID, $text){\n \n $data = array(\n 'examID' => $examID,\n 'text' => $text\n );\n \n return $this->insert($data);\n }", "public function updateText($text, $additionalData = array()) {\n $additionalSql = '';\n foreach ($additionalData as $key => $value) {\n $additionalSql .= ',' . $key . \"='\" . escapeString($value) . \"'\";\n }\n\n if (CHAPTER_IN_FILE) {\n $this->file = CHAPTER_FILE_PATH . \"/\" . $this->authorID . \"/\" . $this->chapterID . \"_cache.txt\";\n if (file_exists($this->file)) {\n file_put_contents($this->file, $text);\n }\n } else {\n $updateText = \"text_cache = '\" . escapeString($text) . \"',\";\n }\n // save chapter in database\n $sql = \"UPDATE \tsls\" . SLS_N . \"_chapter\n\t\t\tSET\t\" . $updateText . \"\n updateTime = date(),\n\t\t\t\t\" . $additionalSql . \"\n\t\t\tWHERE \tchapterID = \" . $this->chapterID;\n WCF::getDB()->sendQuery($sql);\n\n\n\n\n // update chapter cache\n require_once(WCF_DIR . 'lib/data/message/bbcode/MessageParser.class.php');\n MessageParser::getInstance()->setOutputType('text/html');\n $sql = \"UPDATE\twbb\" . SLS_N . \"_chapter_cache\n\t\t\tSET\tmessageCache = '\" . escapeString(MessageParser::getInstance()->parse($message, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes, false)) . \"'\n\t\t\tWHERE\tchapterID = \" . $this->chapterID;\n WCF::getDB()->sendQuery($sql);\n }", "public function addDBData()\n {\n\n if ( Title::newFromText( 'Checklist', NS_TEMPLATE )->exists() ) {\n return;\n }\n\n $title = Title::newFromText( \"Checklist\", NS_TEMPLATE );\n\n $user = User::newFromName( 'UTSysop' );\n $comment = __METHOD__ . ': Sample page for unit test.';\n\n $page = WikiPage::factory( $title );\n $page->doEditContent( ContentHandler::makeContent(\n \" [[Category:Checklist]]\"\n , $title ), $comment, 0, false, $user );\n\n $result = $this->insertPage( \"UTChecklist\", \"{{Checklist||Checklist name=UTChecklist||Checklist items=* Test item 1}}\" );\n\n self::$_checklistId = $result['id'];\n\n }", "function SaveItems() \n {\n global $Core;\n \n $name = $Core->GetVar($_POST, 'name', NULL);\n if (isset($_POST['content']) && !empty($_POST['content']))\n {\n $text = $_POST['content'];\n }\n \n $text = stripslashes($text);\n \n if (!empty($name) && !empty($text))\n {\n $name = $this->AddFileExtension($name, 'txt');\n $file = SB_SITE_DATA_DIR . \"ads/\" . $name;\n $Core->ExitEvent($Core->WriteFile($file, $text, 1), $this->redirect);\n }\n else\n {\n $Core->ExitEvent(0, $this->redirect);\n }\n }", "function get_test_solution($testtype, $wo_record, $nosent, $wo_text)\n{\n if ($testtype == 1) {\n $trans = repl_tab_nl($wo_record['WoTranslation']) . \n getWordTagList($wo_record['WoID'], ' ', 1, 0);\n return $nosent ? $trans : \"[$trans]\";\n }\n return $wo_text;\n}", "public function addTextflow($textflow, $title, $optlist = null);", "public function saveTechReviewAction()\n\t{\n\t\tif($this->_request-> isPost() && $this->adminLogin->userId)\n\t\t{\n\t\t\t$tech_params=$this->_request->getParams();\n\n\t\t\t//echo \"<pre>\";print_r($tech_params);exit;\n\n\t\t\t$quote_id=$tech_params['quote_id'];\n\n\t\t\tif(isset($tech_params['review_skip'])) $status='skipped';\n\t\t\telse if(isset($tech_params['review_challenge'])) $status='challenged';\n\t\t\telse if(isset($tech_params['review_save'])) $status='challenged';\n\t\t\telse if(isset($tech_params['review_validate'])) $status='validated';\n\n\t\t\tif($quote_id)\n\t\t\t{\t\n\t\t\t\t\n\t\t\t\t//get Quote version\n\t\t\t\t$quote_obj=new Ep_Quote_Quotes();\n\t\t\t\t$version=$quote_obj->getQuoteVersion($quote_id);\n\t\t\t\n\n\t\t\t\t//Insert Quote log\n\t\t\t\t$log_params['quote_id']\t= $quote_id;\n\t\t\t\t$log_params['bo_user']\t= $this->adminLogin->userId;\t\t\t\t\t\n\t\t\t\t$log_params['version']\t= $version;\n\t\t\t\t$log_params['action']\t= 'tech_'.$status;\t\t\n\n\t\t\t\t\n\n\t\t\t\tif(isset($tech_params['review_skip'])|| isset($tech_params['review_challenge']))\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$quote_obj=new Ep_Quote_Quotes();\n\t\t\t\t\t$update_quote['tec_review']=$status;\n\n\t\t\t\t\tif(isset($tech_params['review_challenge']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$quoteDetails=$quote_obj->getQuoteDetails($quote_id);\t\t\t\t\t\n\t\t\t\t\t\t/* $tech_params['tech_timeline']=str_replace(\"/\",\"-\",$tech_params['tech_timeline']);\n\t\t\t\t\t\t$tech_params['tech_timeline']=$tech_params['tech_timeline'].\" \".$tech_params['tech_time']; */\n\t\t\t\t\t\t$tech_params['tech_timeline']=$quoteDetails[0]['response_time'];\n\t\t\t\t\t\t$update_quote['tech_timeline']=date(\"Y-m-d H:i:s\",strtotime($tech_params['tech_timeline']));\n\t\t\t\t\t\t$update_quote['tech_challenge_comments']=$tech_params['tech_challenge_comments'];\n\t\t\t\t\t\t$update_quote['tech_challenge']='no';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$log_params['challenge_time']=dateDiffHours(time(),strtotime($tech_params['tech_timeline']));\n\t\t\t\t\t\t$log_params['comments']=$update_quote['tech_challenge_comments'];\n\t\t\t\t\t\t$quiteActionId=3;\n\n\t\t\t\t\t\t$challenge_hours=round($log_params['challenge_time']);\n\t\t\t\t\t\t$update_quote['quote_delivery_hours'] = new Zend_Db_Expr('quote_delivery_hours+'.$challenge_hours);//Quote delivery time update\n\n\t\t\t\t\t\t//echo \"<pre>\";print_r($update_quote);exit;\n\n\t\t\t\t\t\t//send notifcation email to sales\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$mail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t$receiver_id=$quoteDetails[0]['quote_by'];\n\t\t\t\t\t\t$mail_parameters['sales_user']=$quoteDetails[0]['quote_by'];\n\t\t\t\t\t\t$mail_parameters['bo_user']=$this->adminLogin->userId;\n\t\t\t\t\t\t$mail_parameters['quote_title']=$quoteDetails[0]['title'];\n\t\t\t\t\t\t//$mail_parameters['challenge_time']=$update_quote['tech_timeline'];\t\t\t\t\t\t\n\t\t\t\t\t\t$mail_parameters['followup_link_en']='/quote/quote-followup?quote_id='.$quoteDetails[0]['identifier'];\n\t\t\t\t\t\t$mail_obj->sendQuotePersonalEmail($receiver_id,136,$mail_parameters); \t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$update_quote[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\n\t\t\t\t\t\t$log_params['skip_date']\t= date(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t$log_params['comments']=$tech_params['skip_comments'];\n\n\t\t\t\t\t\t$quiteActionId=2;\n\t\t\t\t\t}\n\n\t\t\t\t\t$log_obj=new Ep_Quote_QuotesLog();\n\t\t\t\t\t$log_obj->insertLog($quiteActionId,$log_params);\n\t\t\t\t\t//echo \"<pre>\";print_r($log_params);exit;\t\n\t\t\t\t\t$quote_obj->updateQuote($update_quote,$quote_id);\n\n\t\t\t\t\tif($status=='skipped')\n\t\t\t\t\t\t$this->_redirect(\"/quote/sales-quotes-list?submenuId=ML13-SL2\");\n\t\t\t\t\telse if($status=='challenged')\n\t\t\t\t\t\t$this->_redirect(\"/quote/tech-quote-review?quote_id=\".$quote_id.\"&submenuId=ML13-SL2\");\t\n\t\t\t\t}\n\t\t\t\telseif(isset($tech_params['review_save'])|| isset($tech_params['review_validate']))\n\t\t\t\t{\t\t\t\t\t\n\n\t\t\t\t\t//echo \"<pre>\";print_r($tech_params);exit;\n\n\t\t\t\t\tif(count($tech_params['mission_title'])>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$j=0;\n\t\t\t\t\t\tforeach($tech_params['mission_title'] as $mission)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tech_obj=new Ep_Quote_TechMissions();\n\n\t\t\t\t\t\t\t$tech_data['title']=$tech_params['mission_title'][$j];\n\t\t\t\t\t\t\t$tech_data['delivery_time']=$tech_params['delivery_time'][$j];\n\t\t\t\t\t\t\t$tech_data['delivery_option']=$tech_params['delivery_option'][$j];\n\t\t\t\t\t\t\t$tech_data['cost']=$tech_params['mission_cost'][$j];\n\t\t\t\t\t\t\t$tech_data['comments']=$tech_params['comments'][$j];\n\t\t\t\t\t\t\t$tech_data['currency']=$tech_params['currency'];\n\t\t\t\t\t\t\t$tech_data['before_prod']=$tech_params['before_prod_'.($j+1)]?'yes':'no';\n\t\t\t\t\t\t\t$tech_data['version']=$version;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!$tech_params['tech_mission_id'][$j])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$tech_data['created_by']=$this->adminLogin->userId;\n\t\t\t\t\t\t\t\t$tech_obj->insertTechMission($tech_data);\n\t\t\t\t\t\t\t\t$missionIdentifier = $techmissions_assigned[]=$tech_obj->getIdentifier();\n\t\t\t\t\t\t\t\t//$prod_timeupdate=true;\n\t\t\t\t\t\t\t\t//echo \"<pre>\";print_r($tech_data);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($tech_params['tech_mission_id'][$j])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$missionIdentifier=$tech_params['tech_mission_id'][$j];\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$techmissions_assigned[]=$tech_params['tech_mission_id'][$j];\n\t\t\t\t\t\t\t\t$tech_data['updated_at']=date(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t\t\t$tech_obj->updateTechMission($tech_data,$missionIdentifier);\n\n\t\t\t\t\t\t\t\t$updated_tech_missions=TRUE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//uploading mission document\n\t\t\t\t\t\t\t$update = false;\n\t\t\t\t\t\t\t$uploaded_documents = array();\n\t\t\t\t\t\t\t$uploaded_document_names = array();\n\t\t\t\t\t\t\t$k = 0;\n\t\t\t\t\t\t\tforeach($_FILES['tech_documents_'.($j+1)]['name'] as $row):\n\n\t\t\t\t\t\t\tif($_FILES['tech_documents_'.($j+1)]['name'][$k])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$missionDir=$this->mission_documents_path.$missionIdentifier.\"/\";\n\t\t\t\t\t\t\t\tif(!is_dir($missionDir))\n\t\t\t\t\t\t\t\t\tmkdir($missionDir,TRUE);\n\t\t\t\t\t\t\t\t\tchmod($missionDir,0777);\n\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t$document_name=frenchCharsToEnglish($_FILES['tech_documents_'.($j+1)]['name'][$k]);\n\t\t\t\t\t\t\t\t$document_name=str_replace(' ','_',$document_name);\n\t\t\t\t\t\t\t\t$pathinfo = pathinfo($document_name);\n\t\t\t\t\t\t\t\t$document_name =$pathinfo['filename'].rand(100,1000).\".\".$pathinfo['extension'];\n\t\t\t\t\t\t\t\t$document_path=$missionDir.$document_name;\n\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tif(move_uploaded_file($_FILES['tech_documents_'.($j+1)]['tmp_name'][$k],$document_path))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tchmod($document_path,0777);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//$seo_mission_data['documents_path']=$missionIdentifier.\"/\".$document_name;\n\t\t\t\t\t\t\t\t$uploaded_documents[] = $missionIdentifier.\"/\".$document_name;\n\t\t\t\t\t\t\t\t$uploaded_document_names[] = str_replace('|',\"_\",$tech_params['document_name'.($j+1)][$k]);\n\t\t\t\t\t\t\t\t$update = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$k++;\n\t\t\t\t\t\t\tendforeach;\n\n\t\t\t\t\t\t\tif($update)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$result =$tech_obj->getTechMissionDetails(array('identifier'=>$missionIdentifier));\n\t\t\t\t\t\t\t\t$uploaded_documents1 = explode(\"|\",$result[0]['documents_path']);\n\t\t\t\t\t\t\t\t$uploaded_documents =array_merge($uploaded_documents,$uploaded_documents1);\n\t\t\t\t\t\t\t\t$seo_mission_data['documents_path'] = implode(\"|\",$uploaded_documents);\n\t\t\t\t\t\t\t\t$document_names =explode(\"|\",$result[0]['documents_name']);\n\t\t\t\t\t\t\t\t$document_names =array_merge($uploaded_document_names,$document_names);\n\t\t\t\t\t\t\t\t$seo_mission_data['documents_name'] = implode(\"|\",$document_names);\n\t\t\t\t\t\t\t\t$tech_obj->updateTechMission($seo_mission_data,$missionIdentifier);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$j++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//updating tehcmissions assigned in quote table\n\t\t\t\t\tif(count($techmissions_assigned)>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$update_quote_tech['techmissions_assigned']=implode(\",\",$techmissions_assigned);\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\tif($status=='challenged')\n\t\t\t\t\t{\n\t\t\t\t\t\t$quote_obj->updateQuote($update_quote_tech,$quote_id);\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$log_params['action']= 'tech_saved';\n\t\t\t\t\t\tif($tech_params['quote_updated_comments'])\n\t\t\t\t\t\t\t$log_params['comments']=$tech_params['quote_updated_comments'];\n\n\t\t\t\t\t\t$quiteActionId=4;\t\n\t\t\t\t\t\t$log_obj=new Ep_Quote_QuotesLog();\n\t\t\t\t\t\t$log_obj->insertLog($quiteActionId,$log_params);\n\n\n\t\t\t\t\t\t//sending email to tech managers\n\t\t\t\t\t\t$techManager_holiday=$this->configval[\"tech_manager_holiday\"];\n\t\t\t\t\t\t$user_type=$this->adminLogin->type;\n\t\t\t\t\t\tif($techManager_holiday=='no' && $user_type=='techuser')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!$updated_tech_missions)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$client_obj=new Ep_Quote_Client();\n\t\t\t\t\t\t\t\t$email_users=$get_head_prods=$client_obj->getEPContacts('\"techmanager\"');\n\n\t\t\t\t\t\t\t\tif(count($email_users)>0)\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\tforeach($email_users as $user=>$name)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$mail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t\t\t\t\t$receiver_id=$user;\n\t\t\t\t\t\t\t\t\t\t$mail_parameters['bo_user']=$user;\n\t\t\t\t\t\t\t\t\t\t$mail_parameters['sales_user']=$this->adminLogin->userId;\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$mail_parameters['followup_link']='/quote/tech-quote-review?quote_id='.$quote_id.'&submenuId=ML13-SL2';\n\n\t\t\t\t\t\t\t\t\t\t$mail_obj->sendQuotePersonalEmail($receiver_id,152,$mail_parameters); \t\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\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$this->_redirect(\"/quote/sales-quotes-list?submenuId=ML13-SL2\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$this->_redirect(\"/quote/tech-quote-review?quote_id=\".$quote_id.\"&submenuId=ML13-SL2\");\n\t\t\t\t\t}\n\t\t\t\t\telseif($status=='validated')\n\t\t\t\t\t{\n\t\t\t\t\t\t$quoteDetails=$quote_obj->getQuoteDetails($quote_id);\n\t\t\t\t\t\tif($quoteDetails[0]['tech_timeline'])\n\t\t\t\t\t\t\t$tech_time_line=strtotime($quoteDetails[0]['tech_timeline']);\n\n\t\t\t\t\t\tif($tech_time_line>time())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$log_params['action']= 'tech_validated_ontime';\n\t\t\t\t\t\t\t$quiteActionId=5;\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\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$delay_hours=dateDiffHours($tech_time_line,time());\n\n\t\t\t\t\t\t\t$log_params['action']= 'tech_validated_delay';\n\t\t\t\t\t\t\t$log_params['delay_hours']=$delay_hours;\n\t\t\t\t\t\t\t$quiteActionId=6;\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif($tech_params['quote_updated_comments'])\n\t\t\t\t\t\t\t$log_params['comments']=$tech_params['quote_updated_comments'];\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t$log_obj=new Ep_Quote_QuotesLog();\n\t\t\t\t\t\t$log_obj->insertLog($quiteActionId,$log_params);\n\t\t\t\t\t\t//exit;\n\n\t\t\t\t\t\t$quoteDetailsNew=$quote_obj->getQuoteDetails($quote_id);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$update_quote_tech[\"prod_timeline\"]=time()+($this->configval['prod_timeline']*60*60);\n\t\t\t\t\t\tif(isset($tech_params['review_validate']))\n\t\t\t\t\t\t\t$update_quote_tech['tec_review']=$status;\n\n\t\t\t\t\t\tif($quoteDetailsNew[0]['prod_review']=='auto_skipped')\n\t\t\t\t\t\t\t$update_quote_tech[\"sales_validation_expires\"]=time()+($this->configval['sales_validation_timeline']*60*60);\n\n\t\t\t\t\t\t//echo \"<pre>\";print_r($update_quote_tech);exit;\n\n\t\t\t\t\t\t$quote_obj->updateQuote($update_quote_tech,$quote_id);\n\n\n\t\t\t\t\t\t//sending email to sales user(Quote is finalized )\n\t\t\t\t\t\t$mail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t$receiver_id=$quoteDetails[0]['quote_by'];\n\t\t\t\t\t\t$mail_parameters['sales_user']=$quoteDetails[0]['quote_by'];\n\t\t\t\t\t\t$mail_parameters['bo_user']=$this->adminLogin->userId;\n\t\t\t\t\t\t$mail_parameters['bo_user_type']='tech';\n\t\t\t\t\t\t$mail_parameters['quote_title']=$quoteDetails[0]['title'];\n\t\t\t\t\t\t$mail_parameters['followup_link']='/quote/quote-followup?quote_id='.$quoteDetails[0]['identifier'];\n\t\t\t\t\t\t$mail_obj->sendQuotePersonalEmail($receiver_id,134,$mail_parameters);\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t//send notifcation email to sales (Quote arrives to prod)\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(($quoteDetailsNew[0]['tec_review']=='skipped' || $quoteDetailsNew[0]['tec_review']=='auto_skipped' ||$quoteDetailsNew[0]['tec_review']=='validated') \n\t\t\t\t\t\t\t\t&& ($quoteDetailsNew[0]['seo_review']=='skipped' || $quoteDetailsNew[0]['seo_review']=='auto_skipped' ||$quoteDetailsNew[0]['seo_review']=='validated') && $quoteDetailsNew[0]['prod_review']!='auto_skipped')\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$mail_obj=new Ep_Message_AutoEmails();\n\t\t\t\t\t\t\t\t$receiver_id=$quoteDetailsNew[0]['quote_by'];\n\t\t\t\t\t\t\t\t$mail_parameters['sales_user']=$quoteDetailsNew[0]['quote_by'];\n\t\t\t\t\t\t\t\t$mail_parameters['bo_user']=$this->adminLogin->userId;\n\t\t\t\t\t\t\t\t$mail_parameters['quote_title']=$quoteDetailsNew[0]['title'];\n\t\t\t\t\t\t\t\t$mail_parameters['challenge_time']=date(\"Y-m-d H:i:s\",$update_quote_tech[\"prod_timeline\"]);\n\t\t\t\t\t\t\t\t$mail_parameters['followup_link']='/quote/quote-followup?quote_id='.$quoteDetailsNew[0]['identifier'];\n\t\t\t\t\t\t\t\t$mail_obj->sendQuotePersonalEmail($receiver_id,137,$mail_parameters);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//sending intimation emails when quote edited\n\t\t\t\t $update_comments= $tech_params['quote_updated_comments'];\n\t\t\t\t if($update_comments)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$bo_user_type='tech';\t\t\t\t\n\t\t\t\t\t\t\t\t$this->sendIntimationEmail($quote_id,$bo_user_type,$update_comments,$newmissionAdded);\n\t\t\t\t\t\t\t\t//exit;\n\t\t\t\t\t\t\t}\t\n\n\t\t\t\t\t\t$this->_redirect(\"/quote/sales-quotes-list?submenuId=ML13-SL2\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n $course = Course::firstOrFail();\n\n $model = new Content([\n \"title\" => \"Use Case Model\",\n \"content\" => \"A use-case model consists of a number of model elements. The most important model elements are: use cases, actors and the relationships between them.\",\n \"url_attachment\" => \"http://www.utm.mx/~caff/doc/OpenUPWeb/openup/guidances/concepts/use_case_model_CD178AF9.html\"\n ]);\n\n $analysis = new Content([\n \"title\" => \"Use Case Analysis\",\n \"content\" => \"A use case analysis is the primary form for gathering usage requirements for a new software program or task to be completed.\",\n \"url_attachment\" => \"https://www.cusb.ac.in/images/cusb-files/2020/el/cs/L5_use_case_tutorial.pdf\"\n ]);\n\n $design = new Content([\n \"title\" => \"Use-Cases Realizations\",\n \"content\" => \"A use-case realization represents how a use case will be implemented in terms of collaborating objects. The realizations reside within the design. By walking through a design exercise of showing how the design elements will perform the use case, the team gets confirmation that the design is robust enough to perform the required behavior.\",\n \"url_attachment\" => \"http://www.utm.mx/~caff/doc/OpenUPWeb/openup/guidances/guidelines/uc_realizations_448DDA77.html\"\n ]);\n\n $course->contents()->saveMany([\n $model,\n $analysis,\n $design\n ]);\n }" ]
[ "0.56957084", "0.5582253", "0.54377145", "0.5406256", "0.53799206", "0.52853596", "0.5223548", "0.5188291", "0.51837397", "0.51555973", "0.51511234", "0.51382744", "0.51119083", "0.5089855", "0.50552285", "0.50433093", "0.50107825", "0.5003055", "0.49742386", "0.49674568", "0.49581978", "0.49506363", "0.49304545", "0.49225098", "0.48914886", "0.48847604", "0.4882917", "0.4881157", "0.48722368", "0.4859535" ]
0.72202
0
/ get_bugs Get a list of bugs for the given TestCase Usage TestCase.get_bugs Parameters ParameterData TypeComments case_idinteger Result Array [0] Array [priority] [cf_nts_priority] [bug_id] [qa_contact_id] [cclist_accessible] [cf_foundby] [infoprovider_id] [short_desc] [everconfirmed] [bug_severity] [isunconfirmed] [cf_nts_support_num] [reporter_id] [estimated_time] [isopened] [remaining_time] [cf_partnerid] [reporter_accessible] [resolution] [alias] [op_sys] [bug_file_loc] [product_id] [rep_platform] [creation_ts] [status_whiteboard] [bug_status] [delta_ts] [version] [deadline] [component_id] [assigned_to_id] [target_milestone] [1] Array ...
function TestCase_get_bugs($case_id) { // Create call $call = new xmlrpcmsg('TestCase.get_bugs', array(new xmlrpcval($case_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCaseRun_get_bugs($case_run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.get_bugs', array(new xmlrpcval($case_run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function printBugData($bugData){\r\n\t//echo \"build = \", $bugData->build;\r\n\t//echo \"platform = \", $bugData->platform;\r\n\techo \"os = \", $bugData->os;\r\n\techo \"os_build = \", $bugData->os_build;\r\n\techo \"version = \", $bugData->version;\r\n\t//echo \"profile_id = \", $bugData->profile_id;\r\n\t//echo \"handler_id = \", $bugData->handler_id;\r\n\techo \"view_state = \", $bugData->view_state;\r\n\techo \"category = \", $bugData->category;\r\n\t//echo \"severity = \", $bugData->severity;\r\n\t//echo \"priority = \",$bugData->priority;\r\n\techo \"summary = \", $bugData->summary;\r\n\techo \"description = \", $bugData->description;\r\n\techo \"steps_to_reproduce = \", $bugData->steps_to_reproduce;\r\n\techo \"additional_information = \", $bugData->additional_information;\r\n\t//echo \"f_file = \", \"\";\r\n\t//echo \"f_report_stay = \", ;\r\n\techo \"project_id = \", $bugData->project_id;\r\n\t//echo \"target_version = \", $bugData->target_version;\r\n}", "public function test_getMantisBugs_CalledWithCorrectParameters_returnCorrectAnswer()\n {\n $bug1 = $this->prepareBug(1,\n \"No me funciona el extintor\",\n \"Si pongo boca a bajo el extintor no me funciona\",\n 'Pepito',\n \"new\");\n\n $bug2 = $this->prepareBug(2,\n \"Estoy en brasil\",\n \"O pais mais grande du mundo\",\n 'Caio',\n \"new\");\n $expected = array($bug1, $bug2);\n\n $fc = new FakeConector();\n $bugsController = new bugsController($fc);\n $this->assertEquals($expected, $bugsController->getMantisBugs(NULL));\n }", "function getBugByID ($bug_id)\n {\n return DBUtil::selectObjectByID ('mantis_bug_table', $bug_id);\n }", "function display_bug_list($utype, $uid) {\n $mysqli = $this->mysqli;\n if ($utype == \"Developer\") {\n $sql = \"SELECT * from bug_report WHERE tested_by IN (SELECT app_tester from application where app_dev='$uid');\";\n }\n else if ($utype == \"Tester\") {\n $sql = \"SELECT * from bug_report WHERE tested_by ='$uid';\";\n }\n else if ($utype == \"admin\") {\n $sql = \"SELECT * from bug_report\";\n }\n if ($result = $mysqli->query($sql)) {\n return $result;\n }\n else {\n echo $mysqli->error;\n }\n }", "function listPatches($bugid)\n\t{\n\t\t$query = '\n\t\t\tSELECT patch, revision, developer\n\t\t\tFROM bugdb_patchtracker\n\t\t\tWHERE bugdb_id = ?\n\t\t\tORDER BY revision DESC\n\t\t';\n\n\t\treturn $this->_dbh->prepare($query)->execute([$bugid])->fetchAll(PDO::FETCH_NUM, true, false, true);\n\t}", "public function getForumTopicCommentList($debug_to_pass = '') {\n\n $this->db->select('ft.topic_id,ft.topic_title,ft.category_id,ft.topic_short_description,ft.topic_content,ft.posted_by,ft.posted_on,ft.status as ft_status,fc.category_id,fc.category_name,fc.page_description,u.user_name,u.user_id');\n $this->db->from('mst_forum_topics as ft');\n $this->db->join('mst_forum_categories as fc', 'ft.category_id = fc.category_id', 'inner');\n $this->db->join('mst_users as u', 'ft.posted_by=u.user_id', 'inner');\n// $this->db->join('trans_forum_comments as tfc', 'tfc.topic_id=ft.topic_id', 'inner');\n $this->db->where('ft.status', '1');\n// $this->db->where('tfc.status','1');\n $this->db->order_by('ft.topic_id desc');\n $query = $this->db->get();\n if ($debug_to_pass)\n echo $this->db->last_query();\n return $query->result_array();\n }", "function bug_list_print($p_bug_ids, $p_columns, $p_table_class = ''){\n\t/* cache bugs */\n\tbug_cache_array_rows($p_bug_ids);\n\n\t/* prepare table header */\n\t$t_header = array();\n\n\tfor($i=0; $i<count($p_columns); $i++){\n\t\t$t_title = column_title($p_columns[$i]);\n\n\t\tif($t_title === false){\n\t\t\t$t_title = '[invalid \\'' . $p_columns[$i] . '\\']';\n\t\t\t$p_columns[$i] = 'invalid';\n\t\t}\n\n\t\t$t_header[] = $t_title;\n\t}\n\n\t/* print table */\n\ttable_begin($t_header, $p_table_class);\n\n\tforeach($p_bug_ids as $t_bug_id){\n\t\t$t_bug = bug_get($t_bug_id);\n\t\t$t_row = array();\n\n\t\tforeach($p_columns as $t_col){\n\t\t\t$t_title = column_title($t_col);\n\t\t\t$t_cf_id = custom_field_get_id_from_name($t_title);\n\n\t\t\tif($t_cf_id != null){\n\t\t\t\tif(custom_field_is_linked($t_cf_id, $t_bug->project_id)){\n\t\t\t\t\t$t_def = custom_field_get_definition($t_cf_id);\n\t\t\t\t\t$t_row[] = string_custom_field_value($t_def, $t_cf_id, $t_bug_id);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$t_row[] = format_content_notlinked($t_bug);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$t_func = 'format_content_' . $t_col;\n\t\t\t\t$t_row[] = $t_func($t_bug);\n\t\t\t}\n\t\t}\n\n\t\ttable_row($t_row);\n\t}\n\n\ttable_end();\n}", "function updateBug($bug_id, $bug_data) {\r\n\techo \"update the bug -- bug_id = $bug_id by adding a test note\";\r\n\taddBugNote($bug_id, $bug_data);\r\n}", "function db_query_roadmap_info($p_project_id, $p_version, $p_version_type, &$p_issues_resolved){\n\t$p_issues_resolved = 0;\n\n\t$t_can_view_private = access_has_project_level(config_get('private_bug_threshold'), $p_project_id);\n\t$t_limit_reporters = config_get('limit_reporters');\n\t$t_user_access_level_is_reporter = (config_get('report_bug_threshold', null, null, $p_project_id) == access_get_project_level($p_project_id));\n\n\t$t_query = 'SELECT id,view_state from {bug} WHERE project_id=' . db_param() . ' AND ' . $p_version_type . '=' . db_param();\n\n\t$t_result = db_query($t_query, array($p_project_id, $p_version));\n\n\t$t_issue_ids = array();\n\n\twhile($t_row = db_fetch_array($t_result)){\n\t\t$t_issue_id = $t_row['id'];\n\n\t\t# hide private bugs if user doesn't have access to view them.\n\t\tif(!$t_can_view_private && ($t_row['view_state'] == VS_PRIVATE))\n\t\t\tcontinue;\n\n\t\t# check limit_Reporter (Issue #4770)\n\t\t# reporters can view just issues they reported\n\t\tif(ON === $t_limit_reporters && $t_user_access_level_is_reporter && !bug_is_user_reporter($t_issue_id, auth_get_current_user_id()))\n\t\t\tcontinue;\n\n\t\tif(!helper_call_custom_function('roadmap_include_issue', array($t_issue_id)))\n\t\t\tcontinue;\n\n\t\t$t_issue_ids[] = $t_issue_id;\n\n\t\tif(bug_is_resolved($t_issue_id))\n\t\t\t$p_issues_resolved++;\n\t}\n\n\treturn $t_issue_ids;\n}", "function listBugFixes( ){\n global $config, $lang;\n\n if( !isset( $_SESSION['mBugFixes'] ) ){\n $_SESSION['mBugFixes'] = getContentFromUrl( 'http://opensolution.org/bugfixes.html' );\n }\n\n if( !empty( $_SESSION['mBugFixes'] ) ){\n if( $_SESSION['mBugFixes'] == 'no-bugs' )\n return true;\n\n $aBugs = unserialize( $_SESSION['mBugFixes'] );\n $i = 0;\n $content = null;\n foreach( $aBugs as $iBug => $aData ){\n $aData['sStatus'] = $lang['Cant_check'];\n if( isset( $aData['aSteps'] ) || isset( $aData['bDontVerifySteps'] ) ){\n if( isset( $aData['sPluginVerify'] ) && verifyCodeInFile( $aData['sPluginVerify'] ) === false ){\n $aData['sName'] = null;\n }\n if( isset( $aData['sName'] ) && isset( $aData['aSteps'] ) ){\n $iCount = count( $aData['aSteps'] );\n $iOk = 0;\n foreach( $aData['aSteps'] as $aSteps ){\n $mReturn = checkFileToUpgrade( $aSteps );\n if( isset( $mReturn ) && $mReturn === true ){\n $iOk++;\n }\n else\n break;\n } // end foreach\n $aData['sStatus'] = ( $iOk == $iCount ) ? $lang['Fixed'] : ( ( $iOk > 0 ) ? $lang['Uncompleted'] : '<strong>'.$lang['Fix_it'].'</strong>' );\n }\n }\n\n if( isset( $aData['sName'] ) ){\n $content .= '<tr class=\"level-'.$aData['iLevel'].'\"><td class=\"name\">'.$aData['sName'].'</td><td class=\"status\">'.( isset( $aData['sStatus'] ) ? $aData['sStatus'] : null ).'</td><td class=\"options\"><a href=\"'.$config['bugfixes_link'].'?sBug='.base64_encode( $config['version'].'-'.$iBug ).'\" target=\"_blank\" class=\"manual\" title=\"'.$lang['More'].'\">'.$lang['More'].'</a></td></tr>';\n }\n } // end foreach\n\n if( isset( $content ) )\n return $content;\n }\n}", "function process_ch8bt_bug() {\r\n\t// Check if user has proper security level\r\n\tif ( !current_user_can( 'manage_options' ) ) {\r\n\t\twp_die( 'Not allowed' );\r\n\t}\r\n\r\n\t// Check if nonce field is present for security\r\n\tcheck_admin_referer( 'ch8bt_add_edit' );\r\n\tglobal $wpdb;\r\n\r\n\t// Place all user submitted values in an array\r\n\t$bug_data = array();\r\n\t$bug_data['bug_title'] = ( isset( $_POST['bug_title'] ) ? sanitize_text_field( $_POST['bug_title'] ) : '' );\r\n\t$bug_data['bug_description'] = ( isset( $_POST['bug_description'] ) ? sanitize_text_field( $_POST['bug_description'] ) : '' );\r\n\t$bug_data['bug_version'] = ( isset( $_POST['bug_version'] ) ? sanitize_text_field( $_POST['bug_version'] ) : '' );\r\n\r\n\t// Set bug report date as current date\r\n\t$bug_data['bug_report_date'] = date( 'Y-m-d' );\r\n\r\n\t// Set status of all new bugs to 0 (Open)\r\n\t$bug_data['bug_status'] = ( isset( $_POST['bug_status'] ) ? intval( $_POST['bug_status'] ) : 0 );\r\n\r\n\t// Call the wpdb insert or update method based on value\r\n\t// of hidden bug_id field\r\n\tif ( isset( $_POST['bug_id'] ) && 0 == $_POST['bug_id'] ) {\r\n\t\t$wpdb->insert($wpdb->get_blog_prefix() . 'ch8_bug_data', $bug_data );\r\n\t} elseif ( isset( $_POST['bug_id'] ) && $_POST['bug_id'] > 0 ) {\r\n\t\t$wpdb->update( $wpdb->get_blog_prefix() . 'ch8_bug_data', $bug_data, array( 'bug_id' => $_POST['bug_id'] ) );\r\n\t}\r\n\r\n\t// Redirect the page to the admin form\r\n\twp_redirect( add_query_arg( 'page', 'ch8bt-bug-tracker', admin_url( 'options-general.php' ) ) );\r\n\texit;\r\n}", "function getIssueComments($issue_id, $jira_user, $jira_token, $jira_space) {\n $ch = curl_init(); \n curl_setopt($ch,CURLOPT_URL,\"https://$jira_space.atlassian.net/rest/api/2/issue/$issue_id/comment\");\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n curl_setopt($ch, CURLOPT_USERPWD, \"$jira_user:$jira_token\");\n curl_setopt($ch, CURLOPT_USERAGENT, \"$jira_user\");\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n\n $output=json_decode(curl_exec($ch), TRUE);\n curl_close($ch);\n return $output;\n}", "public static function var_dump($bugs) {\n echo \"<pre>\";\n if (!count($bugs)>1 && is_array($bugs)) {\n echo \"<br/>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br/>\";\n foreach ($bugs as $bug) {\n var_dump($bug);\n echo \"<br/>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br/>\";\n }\n } else {\n var_dump($bugs);\n }\n echo \"</pre>\";\n \n die;\n }", "public function details() {\n try {\n $details = $this->operationsModel->details($_POST['bugId']);\n if($details) {\n $this->response($details,200,'Success');\n } else {\n $this->response('',204,'Error');\n }\n } catch(Exception $ex) {\n $this->response('',500,'Error');\n } \n }", "function section_bugs() {\r\n\t\tprint \"<ul id='admin-section-bug-wrap'>\";\r\n\t\tprint \"<li><p>If you have found a bug in this plugin, please open a new <a id='framework-bug' href='https://github.com/OneManOneLaptop/\" . $this->slug . \"/issues/' target='_blank' style=''>Github Issue</a>.</p><p>Describe the problem clearly and where possible include a reduced test case.</p></li>\";\r\n\t\tprint \"</ul>\"; \r\n\t}", "public function bugs()\n {\n return $this->hasMany('App\\Bug');\n }", "function delete_ch8bt_bug() {\r\n\t// Check that user has proper security level\r\n\tif ( !current_user_can( 'manage_options' ) ) {\r\n\t\twp_die( 'Not allowed' );\r\n\t}\r\n\r\n\t// Check if nonce field is present\r\n\tcheck_admin_referer( 'ch8bt_deletion' );\r\n\r\n\t// If bugs are present, cycle through array and call SQL\r\n\t// command to delete entries one by one\r\n\tif ( !empty( $_POST['bugs'] ) ) {\r\n\t\t// Retrieve array of bugs IDs to be deleted\r\n\t\t$bugs_to_delete = $_POST['bugs'];\r\n\r\n\t\tglobal $wpdb;\r\n\r\n\t\tforeach ( $bugs_to_delete as $bug_to_delete ) {\r\n\t\t\t$query = 'DELETE from ' . $wpdb->get_blog_prefix() . 'ch8_bug_data ';\r\n\t\t\t$query .= 'WHERE bug_id = %d';\r\n\t\t\t$wpdb->query( $wpdb->prepare( $query, intval( $bug_to_delete ) ) );\r\n\t\t}\r\n\t}\r\n\r\n\t// Redirect the page to the admin form\r\n\twp_redirect( add_query_arg( 'page', 'ch8bt-bug-tracker', admin_url( 'options-general.php' ) ) );\r\n\texit;\r\n}", "public static function create($projectID, $description, $bugs)\n {\n $query = \"INSERT INTO changelog (userID, projectID, description, changeDate) VALUES ('\" . unserialize($_SESSION['user'])->getID() . \"', '\" . $projectID . \"', '\" . mysql_real_escape_string($description) . \"', NOW())\";\n $res = mysql_query($query)or die(Helper::SQLErrorFormat(mysql_error(), $query, __METHOD__, __FILE__, __LINE__));\n \n $changeID = mysql_insert_id();\n\n foreach($bugs as $key => $value)\n {\n $query = \"INSERT INTO changelog_bug_relation (changeID, bugID) VALUES ('$changeID', '$value')\";\n $res = mysql_query($query)or die(Helper::SQLErrorFormat(mysql_error(), $query, __METHOD__, __FILE__, __LINE__));\n\n $bug = Bug::getBugByID((int) $value);\n\n Bug::change($bug->getID(), $bug->getPriority()->getID(), $bug->getTitle(), $bug->getDescription(), $bug->getAssignedToUser()->getID(), 100, Status::FIXED, true);\n }\n return $changeID;\n }", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "public function test_getMantisBugs_CalledWithNullParameters__ReturnEmptyArray()\n {\n $fc = new FakeConector(array());\n $bugsController = new bugsController($fc);\n $this->assertEquals($bugsController->getMantisBugs(NULL), array());\n }", "protected function file_these(array $bugs_to_file, $form_input) {\n $success = array();\n $filing = array();\n foreach ($bugs_to_file as $bug_to_file) {\n try {\n $filing = Filing::factory($bug_to_file, $form_input, $this->bugzilla_client);\n $filing->file();\n $bug_link = sprintf(\"<a href=\\\"%s/show_bug.cgi?id=%d\\\" target=\\\"_blank\\\">bug %d</a>\",\n $this->bugzilla_client->config('bugzilla_url'),\n $filing->bug_id,\n $filing->bug_id\n );\n Client::messageSend(\n str_replace(\n array('{label}','{bug}'),\n array($filing->label, $bug_link),\n $filing->success_message),\n E_USER_NOTICE\n );\n $success[] = $filing->bug_id;\n } catch (Exception $e) {\n /**\n * Timed out session most likely\n */\n if($e->getCode()==Filing::EXCEPTION_AUTHENTICATION_FAILED) {\n client::messageSend('Authentication Failed, need to re-login', E_USER_ERROR);\n $this->request->redirect('authenticate/login');\n /**\n * either the supplied $submitted_data to the Filing instance\n * was missing or construct_content() method of the Filing\n * instance tried to access a submitted content key that did\n * not exist.\n */\n } else if($e->getCode()==Filing::EXCEPTION_MISSING_INPUT) {\n Kohana_Log::instance()->add('error',__METHOD__.\" {$e->getMessage()}\");\n Client::messageSend('Missing required input to build this Bug', E_USER_ERROR);\n /**\n * bug was constructed successfully but we got an error back\n * when we sent it to Bugzilla\n */\n } else if($e->getCode()==Filing::EXCEPTION_BUGZILLA_INTERACTION) {\n Kohana_Log::instance()->add('error',__METHOD__.\" {$e->getMessage()}\");\n Client::messageSend(\"There was an error communicating \"\n .\"with the Bugzilla server for Bug \\\"{$filing->label}\\\": {$e->getMessage()}\", E_USER_ERROR);\n /**\n * something happend, log it and toss it\n */\n } else {\n Kohana_Log::instance()->add('error',__METHOD__.\" {$e->getMessage()}\\n{$e->getTraceAsString()}\");\n Client::messageSend('Unknown exception when filing this bug', E_USER_ERROR);\n throw $e;\n }\n }\n }\n return $success;\n }", "function rest_get()\n{\n global $build;\n $response = array();\n\n // Are we looking for what went wrong with this build?\n if (isset($_GET['getproblems'])) {\n $response['hasErrors'] = false;\n $response['hasFailingTests'] = false;\n\n // Lookup some details about this build.\n $buildtype = $build->Type;\n $buildname = $build->Name;\n $siteid = $build->SiteId;\n $starttime = $build->StartTime;\n $projectid = $build->ProjectId;\n\n // Check if this build has errors.\n $buildHasErrors = $build->BuildErrorCount > 0;\n if ($buildHasErrors) {\n $response['hasErrors'] = true;\n // Find the last occurrence of this build that had no errors.\n $no_errors_result = pdo_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime' AND parentid<1 AND builderrors<1\n ORDER BY starttime DESC LIMIT 1\");\n\n if (pdo_num_rows($no_errors_result) > 0) {\n $no_errors_row = pdo_fetch_array($no_errors_result);\n $gmtdate = strtotime($no_errors_row['starttime'] . ' UTC');\n } else {\n // Find the first build\n $firstbuild = pdo_single_row_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime'\n ORDER BY starttime ASC LIMIT 1\");\n $gmtdate = strtotime($firstbuild['starttime'] . ' UTC');\n }\n $response['daysWithErrors'] =\n round((strtotime($starttime) - $gmtdate) / (3600 * 24));\n $response['failingSince'] = date(FMT_DATETIMETZ, $gmtdate);\n $response['failingDate'] = substr($response['failingSince'], 0, 10);\n }\n\n // Check if this build has failed tests.\n $buildHasFailingTests = $build->TestFailedCount > 0;\n if ($buildHasFailingTests) {\n $response['hasFailingTests'] = true;\n // Find the last occurrence of this build that had no test failures.\n $no_fails_result = pdo_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime' AND parentid<1 AND testfailed<1\n ORDER BY starttime DESC LIMIT 1\");\n\n if (pdo_num_rows($no_fails_result) > 0) {\n $no_fails_row = pdo_fetch_array($no_fails_result);\n $gmtdate = strtotime($no_fails_row['starttime'] . ' UTC');\n } else {\n // Find the first build\n $firstbuild = pdo_single_row_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime' AND parentid<1\n ORDER BY starttime ASC LIMIT 1\");\n $gmtdate = strtotime($firstbuild['starttime'] . ' UTC');\n }\n $response['daysWithFailingTests'] =\n round((strtotime($starttime) - $gmtdate) / (3600 * 24));\n $response['testsFailingSince'] = date(FMT_DATETIMETZ, $gmtdate);\n $response['testsFailingDate'] =\n substr($response['testsFailingSince'], 0, 10);\n }\n echo json_encode(cast_data_for_JSON($response));\n }\n}", "function getTicketData($id)\n {\n \n if((int)$id != 0)\n return DB::queryFirstRow(\"SELECT t.id,t.subject,t.ticket_status,t.description,t.image_name,t.image_title,t.image_alt,t.sort_order,t.status,t.user_id,t.region_id,t.helpdesk_id,t.engineer_id,t.problem_type,t.serial_no,t.attach_report,t.other_serial_no,t.product_model FROM \".CFG::$tblPrefix.\"ticket as t where t.id=%d\",$id);\n //return DB::queryFirstRow(\"SELECT p.id,p.category_name,s.slug,p.description,p.image_name,p.image_title,p.image_alt,p.sort_order,p.status,p.meta_title,p.meta_description,p.meta_keyword FROM \".CFG::$tblPrefix.\"category as p left join \".CFG::$tblPrefix.\"slug as s on p.id=s.entity_id and s.module_key = '\".APP::$moduleName.\"' where p.id=%d\",$id);\n \n }", "private function getTicketListByPriority()\n {\n $settings = Utils::getPersonalizedSettings($this->db); \n $params['priority'] = isset($this->param[2]) ? $this->param[2] : 3 ; \n $params['source_id'] = isset($this->param[3]) ? $this->param[3] : 0 ; \n \n $params['start'] = 0;\n $params['size'] = 1; \n \n \n // $param = array(\n // 'user_id' => null,\n // 'source_id' => null,\n // 'start' => 0,\n // 'size' => 1\n // );\n // \n $TicketListRenderer = new TicketListRenderer($this->db, $this->template);\n $sql = $this->getTicketListSQL($params);\n \n $total_ticket = $TicketListRenderer->countTicketList($sql);\n \n $data = array();\n $data['pagger_action_url'] = 'Ticket/piority_ajax_list/'.$this->param[2].\"/\".$this->param[3];\n $data['total_ticket'] = $total_ticket;\n \n $html = $TicketListRenderer->getTicketListView($data);\n \n return $html;\n }", "public function getTickets(){\n $sql = \"SELECT idChap, chapter, titleChap, DATE_FORMAT(dateChap, 'Le %d-%m-%Y à %k:%i') AS dateChap, DATE_FORMAT(dateChapUpdate, 'Le %d-%m-%Y à %k:%i') AS dateChapUpdate, contentChap FROM chapitres ORDER BY chapter DESC\";\n $tickets = $this->executeRequest($sql);\n return $tickets;\n }", "public function getForumTopicList($debug_to_pass = '') {\n\n $this->db->select('ft.topic_id,ft.topic_title,ft.category_id,ft.topic_short_description,ft.topic_content,ft.posted_by,ft.posted_on,ft.status as ft_status,fc.category_id,fc.category_name,fc.page_description,u.user_name,u.user_id');\n $this->db->from('mst_forum_topics as ft');\n $this->db->join('mst_forum_categories as fc', 'ft.category_id = fc.category_id', 'inner');\n $this->db->join('mst_users as u', 'ft.posted_by=u.user_id', 'inner');\n// $this->db->join('trans_forum_comments as tfc', 'tfc.topic_id=ft.topic_id', 'inner');\n $this->db->where('ft.status', '1');\n// $this->db->where('tfc.status','1');\n $this->db->order_by('ft.topic_id desc');\n $query = $this->db->get();\n if ($debug_to_pass)\n echo $this->db->last_query();\n return $query->result_array();\n }", "public function show(bugget $bugget)\n {\n //\n }", "protected function getComments()\n\t{\n\t\t$options = new JRegistry;\n\n\t\t// Ask if the user wishes to authenticate to GitHub. Advantage is increased rate limit to the API.\n\t\t$this->out('Do you wish to authenticate to GitHub? [y]es / [n]o :', false);\n\n\t\t$resp = trim($this->in());\n\n\t\tif ($resp == 'y' || $resp == 'yes')\n\t\t{\n\t\t\t// Get the username\n\t\t\t$this->out('Enter your GitHub username :', false);\n\t\t\t$username = trim($this->in());\n\n\t\t\t// Get the password\n\t\t\t$this->out('Enter your GitHub password :', false);\n\t\t\t$password = trim($this->in());\n\n\t\t\t// Set the options\n\t\t\t$options->set('api.username', $username);\n\t\t\t$options->set('api.password', $password);\n\t\t}\n\n\t\t// Instantiate JGithub\n\t\t$this->github = new JGithub($options);\n\n\t\ttry\n\t\t{\n\t\t\tforeach ($this->issues as $issue)\n\t\t\t{\n\t\t\t\t$id = $issue->gh_id;\n\t\t\t\t$this->out('Retrieving comments for issue #' . $id . ' from GitHub.', true);\n\n\t\t\t\t$this->comments[$id] = $this->github->issues->getComments('joomla', 'joomla-cms', $id);\n\t\t\t}\n\t\t}\n\t\t// Catch any DomainExceptions and close the script\n\t\tcatch (DomainException $e)\n\t\t{\n\t\t\t$this->out('Error ' . $e->getCode() . ' - ' . $e->getMessage(), true);\n\t\t\t$this->close();\n\t\t}\n\n\t\t// Retrieved items, report status\n\t\t$this->out('Finished retrieving comments for all issues.', true);\n\t}", "function listRevisions($bugid, $patch)\n\t{\n\t\t$query = '\n\t\t\tSELECT revision FROM bugdb_patchtracker\n\t\t\tWHERE bugdb_id = ? AND patch = ?\n\t\t\tORDER BY revision DESC\n\t\t';\n\t\treturn $this->_dbh->prepare($query)->execute([$bugid, $patch])->fetchAll(PDO::FETCH_NUM);\n\t}" ]
[ "0.72148156", "0.6197531", "0.61807907", "0.58833885", "0.5693056", "0.56701475", "0.54894394", "0.5483322", "0.5463169", "0.54592943", "0.54367006", "0.5390502", "0.533141", "0.531662", "0.5144456", "0.5137915", "0.50853443", "0.5059517", "0.50571764", "0.505424", "0.5047713", "0.50361174", "0.5026427", "0.50222355", "0.5009945", "0.49991006", "0.49728385", "0.49696428", "0.49657235", "0.4962176" ]
0.72335374
0
/ add_component Add a component to the given TestCase Usage TestCase.add_component Parameters ParameterData TypeComments case_idinteger component_idinteger Result 0
function TestCase_add_component($case_id, $component_id) { // Create call $call = new xmlrpcmsg('TestCase.add_component', array(new xmlrpcval($case_id, "int"), new xmlrpcval($component_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addComponent($data);", "public function addComponent($component);", "public function add_component($p_itservice_id, $p_component_id)\n {\n if ($this->get_assigned_object($p_itservice_id, $p_component_id)\n ->num_rows() <= 0\n )\n {\n return $this->create(\n $p_itservice_id,\n C__RECORD_STATUS__NORMAL,\n $p_component_id,\n \"\"\n );\n } // if\n\n return false;\n }", "public function addComponent($component) {\n if(!array_key_exists($component->getId(), $this->components)) {\n $this->components[$component->getId()] = $component;\n }\n else {\n Logger::getInstance()->writeMessage('Duplicate id found in form: ' . $this->id);\n }\n }", "public function addComponent(ComponentInterface $component);", "public function add(ComponentInterface $component);", "public function addComponentToAssemblage( $component, $assemblage )\r\n\t{\r\n\t\t$this->debug->guard( );\r\n\r\n\t\t$sql = \"INSERT INTO game_assemblage_components(assemblagecomponent_component, assemblagecomponent_assemblage) \";\r\n\t\t$sql .= \"VALUES('\" . $component . \"', '\" . $assemblage . \"')\";\r\n\t\t$res = $this->database->query( $sql );\r\n\t\tif ( !$res )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem adding a new component to an assemblage: could not insert data into database', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem adding a new component to an assemblage: could not insert data into database', 'warning' );\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$this->debug->unguard( true );\r\n\t\treturn true;\r\n\t}", "function insertComponent($acomponent)\r\n {\r\n //Adds a component to the components list\r\n $acomponent->owner=$this;\r\n\r\n $this->_childnames[ $acomponent->_name ] = $acomponent;\r\n\r\n $this->components->add($acomponent);\r\n }", "public function addComponents($components);", "public function register_component( sn\\base\\component\\I_Component $component );", "private static function newComponent($component){\r\n\t\t\r\n\t $return = new script_component(self::$xml_file);\r\n $return->setFilename($component->jsfile);\r\n $return->setTitle($component->title);\r\n\t\t\t\t$return->setIntjs($component->intjs);\r\n $return->setDashboard($component['dashboard']);\r\n $return->setId($component['id']);\r\n $return->setIntmarkup($component->intmarkup);\r\n $return->setName($component->name);\r\n \r\n $ary = array();\r\n \r\n if (count($return->dependenicies) > 0) {\r\n foreach ($return->dependenicies->dependent as $dependent) {\r\n array_push($ary, array('filename'=>$dependent->filename, 'name'=>$dependent->name));\r\n }\r\n $return->dependicies($ary);\r\n }\r\n\t\treturn $return;\r\n\t\t\r\n\t}", "public function addComponent(Base $component) {\n $this->_components[] = $component;\n }", "public function addComponent($component, $name) {\n $this->components[$name] = $component;\n }", "public function AddComponent(Writable $component) {\n \t\t$this->_components[] = $component;\n \t}", "public function aclAdapterMemoryAddComponentObject(UnitTester $I)\n {\n $I->wantToTest('Acl\\Adapter\\Memory - addComponent() - object');\n\n $acl = new Memory();\n $component = new Component('Customer', 'Customer component');\n $actual = $acl->addComponent($component, ['index']);\n\n $I->assertTrue($actual);\n }", "public function component(Component $component)\n {\n }", "public function addnew()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'component', 'create')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\tif (!empty($_FILES['fupload']['tmp_name'])) {\n\t\t\t\t$exp = explode('.', $_FILES['fupload']['name']);\n\t\t\t\t$componentName = $this->postring->seo_title($exp[0]).'-'.rand(000000,999999).'-popoji.'.$exp[1];\n\t\t\t\t$componentType = $this->postring->valid($_POST['type'], 'xss');\n\t\t\t\tif ($componentType == 'component') {\n\t\t\t\t\t$folderinstall = 'component';\n\t\t\t\t} else {\n\t\t\t\t\t$folderinstall = 'widget';\n\t\t\t\t}\n\t\t\t\tif (in_array($exp[1], array('zip'))) {\n\t\t\t\t\tmove_uploaded_file($_FILES['fupload']['tmp_name'], '../'.DIR_CON.'/uploads/'.$componentName);\n\t\t\t\t\tif (file_exists('../'.DIR_CON.'/'.$folderinstall.'/'.strtolower($this->postring->valid($_POST['component'], 'xss')))) {\n\t\t\t\t\t\tunlink('../'.DIR_CON.'/uploads/'.$componentName);\n\t\t\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_3'], 'admin.php?mod=component');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$archive = new PoPclZip('../'.DIR_CON.'/uploads/'.$componentName);\n\t\t\t\t\t\tif ($archive->extract(PCLZIP_OPT_PATH, '../'.DIR_CON.'/'.$folderinstall.'/'.strtolower($this->postring->valid($_POST['component'], 'xss'))) == 0) {\n\t\t\t\t\t\t\tunlink('../'.DIR_CON.'/uploads/'.$componentName);\n\t\t\t\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_3'], 'admin.php?mod=component');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'component' => strtolower($this->postring->valid($_POST['component'], 'xss')),\n\t\t\t\t\t\t\t'type' => $this->postring->valid($_POST['type'], 'xss'),\n\t\t\t\t\t\t\t'datetime' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$query_component = $this->podb->insertInto('component')->values($data);\n\t\t\t\t\t\t$query_component->execute();\n\t\t\t\t\t\tunlink('../'.DIR_CON.'/uploads/'.$componentName);\n\t\t\t\t\t\tif (file_exists('../'.DIR_CON.'/'.$folderinstall.'/'.strtolower($this->postring->valid($_POST['component'], 'xss')).'/install.php')) {\n\t\t\t\t\t\t\t$this->poflash->success($GLOBALS['_']['component_message_1'], 'admin.php?mod=component&act=install&folder='.strtolower($this->postring->valid($_POST['component'], 'xss')));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->poflash->success($GLOBALS['_']['component_message_1'], 'admin.php?mod=component');\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->poflash->error($GLOBALS['_']['component_message_3'], 'admin.php?mod=component');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_3'], 'admin.php?mod=component');\n\t\t\t}\n\t\t}\n\t\t?>\n\t\t<div class=\"block-content\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<?=$this->pohtml->headTitle($GLOBALS['_']['component_addnew']);?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<?=$this->pohtml->formStart(array('method' => 'post', 'action' => 'route.php?mod=component&act=addnew', 'enctype' => true, 'autocomplete' => 'off'));?>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t\t\t\t\t\t<?=$this->pohtml->inputText(array('type' => 'text', 'label' => $GLOBALS['_']['component_title'], 'name' => 'component', 'id' => 'component', 'mandatory' => true, 'options' => 'required'));?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t$item = array();\n\t\t\t\t\t\t\t\t\t\t\t$item[] = array('value' => 'component', 'title' => 'Component');\n\t\t\t\t\t\t\t\t\t\t\t$item[] = array('value' => 'widget', 'title' => 'Widget');\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<?=$this->pohtml->inputSelect(array('id' => 'type', 'label' => $GLOBALS['_']['component_type'], 'name' => 'type', 'mandatory' => true), $item);?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t\t\t\t<?=$this->pohtml->inputText(array('type' => 'file', 'label' => $GLOBALS['_']['component_browse_file'], 'name' => 'fupload', 'id' => 'fupload', 'mandatory' => true));?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?=$this->pohtml->formAction();?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?=$this->pohtml->formEnd();?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "protected function postAddComponents(Component $compModel, Request $request){\n\n $valid = Validator::make($request->all(), [\n 'title' => 'required|max:100',\n 'price' => 'numeric',\n ]);\n\n if($valid->fails())\n return redirect()->back()->with('errorsadmin', 'Incorrectly filleds!');\n\n\n if($request->hasFile('add_component_image') && $request->file('add_component_image')->isValid()){\n\n $data['image'] = $request->file('add_component_image');\n $data['image'] = $data['image']->getClientOriginalName();\n\n $request->file('add_component_image')->move(public_path('assets/images/'), $data['image']);\n\n\n }else{\n\n return redirect()->back()->with('errorsadmin', 'No select image!');\n }\n\n $data['title'] = htmlspecialchars($request->input('title'), ENT_QUOTES);\n $data['price'] = htmlspecialchars($request->input('price'), ENT_QUOTES);\n $data['id'] = $request->input('id');\n\n $compModel->addComponents($data);\n\n return redirect()->back()->with('successadmin', 'Add Component!');\n }", "public function install()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'component', 'create')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\t$component = $this->podb->from('component')->where('id_component', $this->postring->valid($_GET['id'], 'sql'))->limit(1)->fetch();\n\t\t$componentType = $component['type'];\n\t\tif ($componentType == 'component') {\n\t\t\t$folderinstall = 'component';\n\t\t} else {\n\t\t\t$folderinstall = 'widget';\n\t\t}\n\t\tif (file_exists('../'.DIR_CON.'/'.$folderinstall.'/'.$_GET['folder'].'/install.php')) {\n\t\t\tinclude_once '../'.DIR_CON.'/'.$folderinstall.'/'.$_GET['folder'].'/install.php';\n\t\t} else {\n\t\t\t$dir_ori = realpath(dirname(__FILE__));\n\t\t\t$dir_exp = explode('component', $dir_ori);\n\t\t\t$dir_ren = reset($dir_exp).$folderinstall.DIRECTORY_SEPARATOR.'_'.$_GET['folder'];\n\t\t\t$dir_new = reset($dir_exp).$folderinstall.DIRECTORY_SEPARATOR.$_GET['folder'];\n\t\t\tif (rename($dir_ren, $dir_new)) {\n\t\t\t\t$query_component = $this->podb->update('component')\n\t\t\t\t\t->set(array('active' => 'Y'))\n\t\t\t\t\t->where('id_component', $this->postring->valid($_GET['id'], 'sql'));\n\t\t\t\t$query_component->execute();\n\t\t\t\t$this->poflash->success($GLOBALS['_']['component_message_5'], 'admin.php?mod=component');\n\t\t\t} else {\n\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_6'], 'admin.php?mod=component');\n\t\t\t}\n\t\t}\n\t}", "public function aclAdapterMemoryAddComponentString(UnitTester $I)\n {\n $I->wantToTest('Acl\\Adapter\\Memory - addComponent() - string');\n\n $acl = new Memory();\n\n $actual = $acl->addComponent('Customer', ['index']);\n $I->assertTrue($actual);\n }", "public function addComponent($name, ComponentInterface $component) {\n if(isset($this->components[$name])) throw new Exception(\"Component $name exists\");\n if(!$component->isLoaded()) $component->createDefaults();\n $this->components[$name] = $component;\n }", "function addNewOutputComponent()\n {\n if($this->isManager() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n \n $this->global['pageTitle'] = 'Talend Job Seeker : Add New Output Component';\n\n $this->loadViews(\"addNewOutputComponent\", $this->global, $data, NULL);\n }\n }", "public function addComponent($component, $value)\n {\n // We need to make sure the value we're given isn't empty before adding it into our components.\n if (! empty($value)) {\n $component = strtoupper($component);\n if ($this->validateComponent($component)) {\n $this->components[$component][] = $value;\n } else {\n throw new \\UnexpectedValueException(\"The RDN component '$component' is invalid.\");\n }\n } else {\n throw new \\InvalidArgumentException('The $value cannot be empty');\n }\n\n return $this;\n }", "function TestCase_remove_component($case_id, $component_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.remove_component', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($component_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function addComponents() {\n require_once('connectvars.php');\n \n $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)\n or die('Error connecting to MySQL server.');\n \n //Insert form values and created story into database \n $queryInsert = \"INSERT INTO mad_lib_data (noun, verb, adjective, adverb, story)\" . \n \"VALUES ('$this->noun', '$this->verb', '$this->adjective', '$this->adverb', '$this->story')\";\n //echo($this->getAdverb());\n //echo ($queryInsert); \n mysqli_query ($dbc, $queryInsert)\n or die('Error querying database.');\n \n mysqli_close($dbc);\n }", "function add(){\n\n $this->layout = 'ajax';\n $comptypeId = $this->params['form']['comptypeId'];\n $distroId = $this->params['form']['distroId'];\n\n $updsource = '';\n $keyring = '';\n $u_keyring = '';\n $common = '';\n $specific = '';\n \n\n if(array_key_exists('updateSource',$this->params['form'])){\n $updsource = $this->params['form']['updateSource'];\n $keyring = $this->params['form']['updateKeyring'];\n $u_keyring = $this->params['form']['updateUdebKeyring'];\n }else{ //We assume it is a network type\n $common = $this->params['form']['updateCommon'];\n $specific = $this->params['form']['updateSpecific'];\n }\n\n //Get the name of the component\n $name_q = $this->Componenttype->find('first',array('conditions' => array('Componenttype.id' => $comptypeId),'fields'=>array('Componenttype.name')));\n $name = $name_q['Componenttype']['name'];\n\n //---------------------------------------------------\n //Add the component\n $d = array();\n $d['Distrocomponent']['id'] = '';\n $d['Distrocomponent']['componenttype_id'] = $comptypeId;\n $d['Distrocomponent']['distribution_id'] = $distroId;\n $d['Distrocomponent']['updsource'] = $updsource;\n $d['Distrocomponent']['dir_common'] = $common;\n $d['Distrocomponent']['dir_specific'] = $specific;\n $d['Distrocomponent']['keyring'] = $keyring;\n $d['Distrocomponent']['u_keyring'] = $u_keyring;\n\n $this->Distrocomponent->save($d);\n $comp_id = $this->Distrocomponent->id;\n //----------------------------------------------------------\n\n\n //----Specific for the Reprepro component---\n //Get the repository name + arch of the repoarch\n $distro_ret = $this->Distribution->find('first',array('conditions'=>array('Distribution.id' =>$distroId),'fields'=>array('Repoarches.id','Distribution.name')));\n $ra_id = $distro_ret['Repoarches']['id'];\n $distro_name = $distro_ret['Distribution']['name']; //Need this\n\n $repoarch_ret = $this->Repoarch->find('first',array('conditions'=>array('Repoarch.id' =>$ra_id),'fields' =>array('Repository.name','Architecture.name')));\n $repo_name = $repoarch_ret['Repository']['name']; //Need this\n $arch_name = $repoarch_ret['Architecture']['name']; //Need this\n //---------------------------------------------------------\n\n\n //------------------------------------------------------\n $udeb = false;\n if(array_key_exists('updateInstaller',$this->params['form'])){\n\n $udeb = true;\n }\n\n $compdata = array('repo' => $repo_name,'arch' =>$arch_name,'distro' =>$distro_name,'comp' => $name,'source' => $updsource,'udeb' =>$udeb);\n $this->Reprepro->compAdd($compdata);\n //-------------------------------------------------------\n\n\n //--------------------------------------------\n $json_return = array();\n $json_return['json']['status'] = 'ok'; \n //$json_return['json']['status'] = 'error';\n //$json_return['json']['detail'] = \"UP Source $updsource CD $common_dir SP $specific_dir\";\n $json_return['component']['name'] = $name;\n $json_return['component']['id'] = $comp_id;\n $this->set('json_return',$json_return);\n //--------------------------------------------\n\n }", "function modComponent($id, $data);", "function add($c){\n\t\tif($c=='jUI')return $this->add('jJoomla');\n\t\t$args=func_get_args();\n\t\treturn call_user_func_array(array('parent','add'), $args);\n\t}", "public function setComponent($component);", "public function createComponent( $name, $description = '' )\r\n\t{\r\n\t\t$this->debug->guard( );\r\n\r\n\t\t$sql = \"INSERT INTO game_components(component_name, component_description) \";\r\n\t\t$sql .= \"VALUES('\" . $name . \"', '\" . $description . \"')\";\r\n\t\t$res = $this->database->query( $sql );\r\n\t\tif ( !$res )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem creating new component: could not insert component into database', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem creating new component: could not insert component into database', 'warning' );\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$componentid = $this->database->insertId( );\r\n\t\tif ( !$componentid )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem creating new component: could not get component id', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem creating new component: could not get component id', 'warning' );\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$sql = \"CREATE TABLE game_component_\" . $componentid . \" \";\r\n\t\t$sql .= \"(`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE = InnoDB\";\r\n\t\t$res = $this->database->query( $sql );\r\n\t\tif ( !$res )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem creating new component: could not create component table', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem creating new component: could not create component table', 'warning' );\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$this->debug->unguard( $componentid );\r\n\t\treturn $componentid;\r\n\t}" ]
[ "0.73572206", "0.7240562", "0.6543635", "0.6334305", "0.6200288", "0.6167846", "0.61632276", "0.61606604", "0.6036006", "0.59674", "0.5959234", "0.58870053", "0.58458203", "0.5838367", "0.58226794", "0.5755679", "0.5675369", "0.5536426", "0.5518403", "0.54784036", "0.53902584", "0.53562075", "0.53291243", "0.53236556", "0.5289509", "0.52847797", "0.5282822", "0.5267384", "0.52466995", "0.5241122" ]
0.787598
0
/ remove_component Remove a component from the given TestCase Usage TestCase.remove_component Parameters ParameterData TypeComments case_idinteger component_idinteger Result O
function TestCase_remove_component($case_id, $component_id) { // Create call $call = new xmlrpcmsg('TestCase.remove_component', array(new xmlrpcval($case_id, "int"), new xmlrpcval($component_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteComponent( $component )\r\n\t{\r\n\t\t$this->debug->guard( );\r\n\r\n\r\n\t\t$sql = \"DELETE FROM game_components WHERE component_id='\" . $component . \"'\";\r\n\t\t$res = $this->database->query( $sql );\r\n\t\tif ( !$res )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem deleting component: could not delete component from database', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem deleting component: could not delete component from database', 'warning' );\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$sql = \"DROP TABLE game_component_\" . $component . \" \";\r\n\t\t$res = $this->database->query( $sql );\r\n\t\tif ( !$res )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem deleting component: could not delete component table', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem deleting component: could not delete component table', 'warning' );\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$this->debug->unguard( true );\r\n\t\treturn true;\r\n\t}", "function removeComponent($acomponent)\r\n {\r\n //Removes a component from the component's list\r\n $this->components->remove($acomponent);\r\n\r\n unset( $this->_childnames[ $acomponent->_name ] );\r\n }", "public function delete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'component', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$component = $this->podb->from('component')->where('id_component', $this->postring->valid($_POST['id'], 'sql'))->limit(1)->fetch();\n\t\t\t$componentType = $component['type'];\n\t\t\tif ($componentType == 'component') {\n\t\t\t\t$folderinstall = 'component';\n\t\t\t} else {\n\t\t\t\t$folderinstall = 'widget';\n\t\t\t}\n\t\t\tif (file_exists('../'.DIR_CON.'/'.$folderinstall.'/'.$component['component'].'/uninstall.php')) {\n\t\t\t\theader('location:admin.php?mod=component&act=uninstall&folder='.$component['component']);\n\t\t\t} else {\n\t\t\t\t$delete_dir = new PoDirectory();\n\t\t\t\tif ($component['active'] == 'Y') {\n\t\t\t\t\t$delete_folder = $delete_dir->deleteDir('../'.DIR_CON.'/'.$folderinstall.'/'.$component['component']);\n\t\t\t\t} else {\n\t\t\t\t\t$delete_folder = $delete_dir->deleteDir('../'.DIR_CON.'/'.$folderinstall.'/_'.$component['component']);\n\t\t\t\t}\n\t\t\t\tif ($delete_folder) {\n\t\t\t\t\t$query = $this->podb->deleteFrom('component')->where('id_component', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t\t\t$query->execute();\n\t\t\t\t\t$this->poflash->success($GLOBALS['_']['component_message_2'], 'admin.php?mod=component');\n\t\t\t\t} else {\n\t\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_4'], 'admin.php?mod=component');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function uninstall()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'component', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\t$component = $this->podb->from('component')->where('id_component', $this->postring->valid($_GET['id'], 'sql'))->limit(1)->fetch();\n\t\t$componentType = $component['type'];\n\t\tif ($componentType == 'component') {\n\t\t\t$folderinstall = 'component';\n\t\t} else {\n\t\t\t$folderinstall = 'widget';\n\t\t}\n\t\tif (file_exists('../'.DIR_CON.'/'.$folderinstall.'/'.$_GET['folder'].'/uninstall.php')) {\n\t\t\tinclude_once '../'.DIR_CON.'/'.$folderinstall.'/'.$_GET['folder'].'/uninstall.php';\n\t\t} else {\n\t\t\t$dir_ori = realpath(dirname(__FILE__));\n\t\t\t$dir_exp = explode('component', $dir_ori);\n\t\t\t$dir_ren = reset($dir_exp).$folderinstall.DIRECTORY_SEPARATOR.$_GET['folder'];\n\t\t\t$dir_new = reset($dir_exp).$folderinstall.DIRECTORY_SEPARATOR.'_'.$_GET['folder'];\n\t\t\tif (rename($dir_ren, $dir_new)) {\n\t\t\t\t$query_component = $this->podb->update('component')\n\t\t\t\t\t->set(array('active' => 'N'))\n\t\t\t\t\t->where('id_component', $this->postring->valid($_GET['id'], 'sql'));\n\t\t\t\t$query_component->execute();\n\t\t\t\t$this->poflash->success($GLOBALS['_']['component_message_7'], 'admin.php?mod=component');\n\t\t\t} else {\n\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_8'], 'admin.php?mod=component');\n\t\t\t}\n\t\t}\n\t}", "public function removeComponentFromAssemblage( $component, $assemblage )\r\n\t{\r\n\t\t$this->debug->guard( );\r\n\r\n\t\t$sql = \"DELETE FROM game_assemblage_components WHERE \";\r\n\t\t$sql .= \"assemblagecomponent_component='\" . $component . \"' AND \";\r\n\t\t$sql .= \"assemblagecomponent_assemblage='\" . $assemblage . \"'\";\r\n\t\t$res = $this->database->query( $sql );\r\n\t\tif ( !$res )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem removing a component from an assemblage: could not delete component data', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem removing a component from an assemblage: could not delete component data', 'warning' );\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$this->debug->unguard( true );\r\n\t\treturn true;\r\n\t}", "function delComponent($id);", "public function removeComponent($component, $value)\n {\n $component = strtoupper($component);\n if ($this->validateComponent($component)) {\n $this->components[$component] = array_diff($this->components[$component], [$value]);\n } else {\n throw new \\UnexpectedValueException(\"The RDN component '$component' is invalid.\");\n }\n\n return $this;\n }", "protected static function removeComponent()\n {\n (new Filesystem)->deleteDirectory(\n resource_path('assets/js/components')\n );\n }", "public function detach($component)\n\t{\n\t}", "public function detach($component);", "public function remove($parameter);", "final public function delete() {\n $db = Database::getInstance();\n $mysqli = $db->getConnection();\n\t\n $sql_query = 'DELETE FROM fresco_costing_component_array WHERE component_id ='.$this->_component_id;\n \n $result = $mysqli->query($sql_query);\n if (!$result) {\n trigger_error('Unable to delete from database : SQL query : ' . $sql_query);\n }\n\treturn;\n }", "function _webform_delete_file($data, $component) {\r\n // Delete an individual submission file.\r\n $filedata = unserialize($data['value']['0']);\r\n if (isset($filedata['filepath']) && is_file($filedata['filepath'])) {\r\n unlink($filedata['filepath']);\r\n db_query(\"DELETE FROM {files} WHERE filepath = '%s'\", $filedata['filepath']);\r\n }\r\n}", "function webform_confirm_email_webform_component_delete($component) {\n $nid = (int) $component['nid'];\n $cid = (int) $component['cid'];\n if (!$nid || !$cid) {\n return;\n }\n\n $results = db_query(\n 'SELECT eid ' .\n ' FROM {webform_emails} ' .\n ' WHERE nid = :nid ' .\n ' AND email = :email ',\n array(\n ':nid' => $nid,\n ':email' => $cid\n )\n );\n foreach ($results as $wfemail) {\n if (empty($wfemail->eid)) {\n continue;\n }\n $eid = (int) $wfemail->eid;\n db_delete('webform_confirm_email')\n ->condition('nid', $nid)\n ->condition('eid', $eid)\n ->execute();\n\n // the webform module should take care of the following but since it doesn't...\n db_delete('webform_emails')\n ->condition('nid', $nid)\n ->condition('eid', $eid)\n ->execute();\n }\n}", "public function removeAction() {\r\n if (empty($_POST['photo_id']))\r\n die('error');\r\n //GET PHOTO ID AND ITEM\r\n $photo_id = (int) $this->_getParam('photo_id');\r\n $photo = Engine_Api::_()->getItem('sesvideo_chanelphoto', $photo_id);\r\n $db = Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->getAdapter();\r\n $db->beginTransaction();\r\n try {\r\n $photo->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n }", "public function removeAction()\n {\n $modules = $this->module->fetchAll(\" groupmodule_id = \".$this->_getParam('id'));\n foreach($modules as $key=>$row)\n { \n $this->module->removemodule(APPLICATION_PATH.\"/modules/\".$row->module_name);\n }\n \n $current = $this->gmodule->find($this->_getParam('id'))->current();\n $current->delete(); \n \n $message = \"Data Deleted Successfully\";\n \n $this->_helper->flashMessenger->addMessage($message);\n die;\n }", "public function doRemove(SectionComponent $component) {\n if (!$this->isTemporary() && $this->exoComponentManager->entityAllowCleanup($this->entity)) {\n $configuration = $component->get('configuration');\n if (!empty($configuration['block_revision_id'])) {\n $entity_for_removal = $this->exoComponentManager->entityLoadByRevisionId($configuration['block_revision_id']);\n if ($entity_for_removal) {\n $entity_for_removal->delete();\n }\n }\n }\n return $this;\n }", "function remove($eid=array())\r\r\n\t{\r\r\n\t\tglobal $mainframe;\r\r\n\r\r\n\t\t// Initialize variables\r\r\n\t\t$failed = array ();\r\r\n\r\r\n\t\t/*\r\r\n\t\t * Ensure eid is an array of extension ids in the form id => client_id\r\r\n\t\t * TODO: If it isn't an array do we want to set an error and fail?\r\r\n\t\t */\r\r\n\t\tif (!is_array($eid)) {\r\r\n\t\t\t$eid = array($eid => 0);\r\r\n\t\t}\r\r\n\r\r\n\t\t// Get a database connector\r\r\n\t\t$db =& JFactory::getDBO();\r\r\n\r\r\n\t\t// Get an installer object for the extension type\r\r\n\t\t//jimport('joomla.installer.installer');\r\r\n\t\trequire_once( JPATH_COMPONENT .DS. 'installer' .DS. 'installer.php' );\r\r\n\t\t$installer = & JCEInstaller::getInstance();\r\r\n\r\r\n\t\t// Uninstall the chosen extensions\r\r\n\t\tforeach ($eid as $id => $clientId)\r\r\n\t\t{\r\r\n\t\t\t$id\t\t= trim( $id );\r\r\n\t\t\t$result\t= $installer->uninstall($this->_type, $id, $clientId );\r\r\n\r\r\n\t\t\t// Build an array of extensions that failed to uninstall\r\r\n\t\t\tif ($result === false) {\r\r\n\t\t\t\t$failed[] = $id;\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\r\r\n\t\tif (count($failed)) {\r\r\n\t\t\t// There was an error in uninstalling the package\r\r\n\t\t\t$msg = JText::sprintf('UNINSTALLEXT', JText::_($this->_type), JText::_('Error'));\r\r\n\t\t\t$result = false;\r\r\n\t\t} else {\r\r\n\t\t\t// Package uninstalled sucessfully\r\r\n\t\t\t$msg = JText::sprintf('UNINSTALLEXT', JText::_($this->_type), JText::_('Success'));\r\r\n\t\t\t$result = true;\r\r\n\t\t}\r\r\n\r\r\n\t\t$mainframe->enqueueMessage($msg);\r\r\n\t\t$this->setState('action', 'remove');\r\r\n\t\t$this->setState('name', $installer->get('name'));\r\r\n\t\t$this->setState('message', $installer->message);\r\r\n\t\t$this->setState('extension.message', $installer->get('extension.message'));\r\r\n\r\r\n\t\treturn $result;\r\r\n\t}", "public function removeWidget($params)\r\n {\r\n $dashboardId = $params['dashboardId'];\r\n $dwid = $params['dwid'];\r\n \r\n if($dwid)\r\n {\r\n $dashObj = CAntObject::factory($this->ant->dbh, \"dashboard\", $dashboardId, $this->user); \r\n $ret = $dashObj->removeWidget($dwid);\r\n }\r\n else\r\n $ret = array(\"error\" => \"Widget Id is a required params.\");\r\n \r\n $this->sendOutput($ret);\r\n return $ret;\r\n }", "public function destroy(Component $component)\n {\n $component->delete();\n return redirect()->route('components.index');\n }", "public function removeAction() {\n\t\t$unitModelId = $this->getRequest()->getParam('unitModelId');\n\n\t\t$model = new Unit_Model_UnitModel();\n\t\t$result = $model->delete( $unitModelId );\t\t\t\t\n\n $this->setFlashMessage('recordDeleted'); \n $this->_helper->redirector('viewallunitmodels', 'unitmodel', 'unit');\t\t\n\t}", "function TestCase_add_component($case_id, $component_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.add_component', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($component_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function removeElement($element);", "protected function flagForRemoval(SectionComponent $component) {\n $this->appendTemporaryValue('remove', $component);\n return $this;\n }", "protected function postDelComponents(Component $compModel, Request $request){\n\n $data['id'] = $request->get('id');\n\n if(Auth::check()){\n\n $compModel->delComponents($data);\n return redirect()->back()->with('successadmin', 'Component!');\n }\n\n return redirect()->back()->with('errorsadmin', 'Error!');\n\n }", "function capabilities_cleanup($component, $newcapdef=NULL) {\n\n $removedcount = 0;\n\n if ($cachedcaps = get_cached_capabilities($component)) {\n foreach ($cachedcaps as $cachedcap) {\n if (empty($newcapdef) ||\n array_key_exists($cachedcap->name, $newcapdef) === false) {\n\n // Remove from capabilities cache.\n if (!delete_records('capabilities', 'name', $cachedcap->name)) {\n error('Could not delete deprecated capability '.$cachedcap->name);\n } else {\n $removedcount++;\n }\n // Delete from roles.\n if($roles = get_roles_with_capability($cachedcap->name)) {\n foreach($roles as $role) {\n if (!unassign_capability($cachedcap->name, $role->id)) {\n error('Could not unassign deprecated capability '.\n $cachedcap->name.' from role '.$role->name);\n }\n }\n }\n } // End if.\n }\n }\n return $removedcount;\n}", "public function remove($element);", "public function deleted(Component $component): void\n {\n $this->componentService->calculateVendorSummaryData($component);\n }", "function remove() {\n\t\t$option = JRequest::getCmd('option');\n\t\t// Se obtienen los ids de los registros a borrar\n\t\t$cids = JRequest::getVar('cid', array(0), 'post', 'array');\n $product_type_code = JRequest::getVar('product_type_code');\n\n\t\t// Lanzar error si no se ha seleccionado al menos un registro a borrar\n if (count($cids) < 1 || !$product_type_code) {\n\t\t\tJError::raiseError(500, JText::_('CP.SELECT_AN_ITEM_TO_DELETE'));\n\t\t}\n\n\t\t// Se obtiene el modelo\n\t\t$model = $this->getModel('comments');\n\t\t// Se intenta el borrado\n\t\tif ($model->delete($cids, $product_type_code)) {\n\t\t\t$msg = JText::_('CP.DATA_DELETED');\n\t\t\t$type = 'message';\n\t\t} else {\n\t\t\t// Si hay algún error se ajusta el mensaje\n\t\t\t$msg = $model->getError();\n\t\t\tif (!$msg) {\n\t\t\t\t$msg = JText::_('CP.ERROR_ONE_OR_MORE_DATA_COULD_NOT_BE_DELETED');\n\t\t\t}\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$this->setRedirect('index.php?option=' . $option . '&view=comments', $msg, $type);\n\t}", "public function Remove($data) {\r\n if($this->root != null)\r\n return null;\r\n return $this->removeHelper($data, $this->root);\r\n }" ]
[ "0.6643116", "0.66267246", "0.6484359", "0.64223915", "0.6389927", "0.6244896", "0.60293466", "0.59798956", "0.5687217", "0.5681282", "0.5623479", "0.5537693", "0.54159874", "0.5347666", "0.5068751", "0.5057937", "0.49938563", "0.499214", "0.49784014", "0.49515176", "0.49120992", "0.4859647", "0.48541772", "0.48528156", "0.48479605", "0.4847367", "0.4833219", "0.47975606", "0.4795797", "0.47597218" ]
0.7962813
0
/ get_components Get a list of components for the given TestCase Usage TestCase.get_components Parameters ParameterData TypeComments case_idinteger Result [0] Array [disallownew] [name] [description] [initialqacontact] [initialowner] [product_id] [id] [product_name] [1] Array ...
function TestCase_get_components($case_id) { // Create call $call = new xmlrpcmsg('TestCase.get_components', array(new xmlrpcval($case_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestPlan_get_components($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_components', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getComponents()\n {\n return $this->result->getComponents();\n }", "function loadComponents($ar=NULL){\n $p = new XParam($ar, array());\n\n $what = $p->get('what');\n\n $clearbefore = $p->get('clearbefore');\n\n if ($what == 'all' or $what == $this->tapool)\n $this->loadPools($clearbefore);\n\n elseif ($what == 'all' or $what == $this->tapersontype)\n $this->loadPersonTypes($clearbefore);\n\n elseif ($what == 'all' or $what == $this->tatickettype)\n $this->loadTicketTypes($clearbefore);\n \n else\n XShell::setNextData('message', 'unknown component '.$what);\n\n }", "public function compoList(){\n\t\t\n\t\t/*Load all components data from the status page via the curl req function in this class */\n\t\t\n\t\t$req = $this -> curl_req(\"GET\", \"api/v1/components\"); \n\t\t\n\t\t/* Check if the transaction was successfull and pass the data else return false */\n\t\t\n\t\treturn ($req[1]['http_code'] === 200) ? $req[0] : false;\t\t\n\t}", "public function getComponents()\n {\n $this->parseResponse();\n\n return $this->components;\n }", "public function testComponentReturnsComponentArray() {\n $node = self::nodeStub();\n $webform = new Webform($node);\n $component = $webform->component(6);\n $this->assertEqual('email_subject', $component['form_key']);\n }", "public function getComponents();", "public function getComponents();", "private static function get_components_options() {\n\n $return = [];\n $options_placement = apply_filters( 'dustpress/components/options_placement', 'top' );\n\n\n if ( is_array( self::$components ) && count( self::$components ) > 0 ) {\n foreach ( apply_filters( 'dustpress/components', self::$components ) as $component ) {\n\n $tab_label = __( $component->label, $component->textdomain );\n\n if ( method_exists( $component, 'options' ) ) {\n\n $component_options = apply_filters( 'dustpress/components/options=' . $component->name, $component->options() );\n\n if ( $component_options instanceof \\Geniem\\ACF\\Field\\Tab ) {\n $component_options = \\array_map( function( $field ) { return $field->export(); }, $component_options->get_fields() );\n }\n\n // if options were found add tab to component settings page\n if ( ! empty( $component_options ) && is_array( $component_options ) ) {\n if ( method_exists( $component_options, 'get_label' ) ) {\n $label = $component_options->get_label();\n }\n else {\n $label = $component->label;\n }\n\n $component_tab = array (\n 'key' => 'field_dpc_settings_' . $component->name,\n 'label' => $label,\n 'name' => 'dpc_' . $component->name . '_tab',\n 'type' => 'tab',\n 'instructions' => '',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array (\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'placement' => $options_placement,\n 'endpoint' => 0,\n );\n\n $component_tab = apply_filters( 'dustpress/components/component_tab=' . $component->name, $component_tab );\n $return[] = $component_tab;\n\n // merge component options\n $return = array_merge( $return, $component_options );\n\n }\n }\n }\n }\n\n ksort( $return );\n\n return $return;\n }", "abstract protected function getResultComponents();", "function components_list()\n\t{\n\t\t$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Manage Components' );\n\t\t$this->ipsclass->admin->page_title = \"Components Manager\";\n\t\t$this->ipsclass->admin->page_detail = \"This section will allow you to manage your components.\";\n\n\t\t//-------------------------------\n\t\t// INIT\n\t\t//-------------------------------\n\n\t\t$content = \"\";\n\t\t$seen_count = 0;\n\t\t$total_items = 0;\n\t\t$rows = array();\n\n\t\t//-------------------------------\n\t\t// Get components\n\t\t//-------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'order' => 'com_position ASC' ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$total_items++;\n\t\t\t$rows[] = $r;\n\t\t}\n\n\t\tforeach( $rows as $r )\n\t\t{\n\t\t\t//-------------------------------\n\t\t\t// Version...\n\t\t\t//-------------------------------\n\n\t\t\t$r['_fullname'] = $r['com_title'];\n\n\t\t\tif ( $r['com_version'] )\n\t\t\t{\n\t\t\t\t$r['_fullname'] .= ' v'.$r['com_version'];\n\t\t\t}\n\n\t\t\t//-------------------------------\n\t\t\t// Author...\n\t\t\t//-------------------------------\n\n\t\t\t$r['_fullauthor'] = $r['com_author'];\n\n\t\t\tif ( $r['com_url'] )\n\t\t\t{\n\t\t\t\t$r['_fullauthor'] = \"<a href='{$r['com_url']}' title='{$r['com_url']}' target='_blank'>{$r['_fullauthor']}</a>\";\n\t\t\t}\n\n\t\t\t//-------------------------------\n\t\t\t// (Alex) Cross\n\t\t\t//-------------------------------\n\n\t\t\t$r['_enabled_img'] = $r['com_enabled'] ? 'aff_tick.png' : 'aff_cross.png';\n\n\t\t\t//-------------------------------\n\t\t\t// Work out position images\n\t\t\t//-------------------------------\n\n\t\t\t$r['_pos_up'] = $this->html->components_position_blank($r['com_id']);\n\t\t\t$r['_pos_down'] = $this->html->components_position_blank($r['com_id']);\n\n\t\t\t//-------------------------------\n\t\t\t// Work out position images\n\t\t\t//-------------------------------\n\n\t\t\tif ( ($seen_count + 1) == $total_items )\n\t\t\t{\n\t\t\t\t# Show up only\n\t\t\t\t$r['_pos_up'] = $this->html->components_position_up($r['com_id']);\n\t\t\t}\n\t\t\telse if ( $seen_count > 0 AND $seen_count < $total_items )\n\t\t\t{\n\t\t\t\t# Show both...\n\t\t\t\t$r['_pos_up'] = $this->html->components_position_up($r['com_id']);\n\t\t\t\t$r['_pos_down'] = $this->html->components_position_down($r['com_id']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Show down only\n\t\t\t\t$r['_pos_down'] = $this->html->components_position_down($r['com_id']);\n\t\t\t}\n\n\t\t\t$seen_count++;\n\n\t\t\t//-------------------------------\n\t\t\t// Is there an uninstall script\n\t\t\t//-------------------------------\n\t\t\tif ( file_exists( ROOT_PATH.'/resources/'.$r['com_section'].'/uninstall.xml' ) )\n\t\t\t{\n\t\t\t\t$r['com_hasuninstall'] = TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$r['com_hasuninstall'] = FALSE;\n\t\t\t}\n\n\t\t\t$content .= $this->html->component_row($r);\n\t\t}\n\n\t\t$this->ipsclass->html .= $this->html->component_overview( $content );\n\n\t\t$this->ipsclass->admin->output();\n\t}", "public static function getAllComponents()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true)\n\t\t\t->select('element')\n\t\t\t->from('#__extensions')\n\t\t\t->where('type = ' . $db->quote('component'))\n\t\t\t->where('enabled = 1');\n\t\t$db->setQuery($query);\n\t\t$result = $db->loadColumn();\n\n\t\treturn $result;\n\t}", "function _getXMLComponents(& $iCal, & $component) {\n\t$compName = $component->getName();\n\t$comp = & $iCal->newComponent($compName);\n\t$subComponents = array('valarm', 'standard', 'daylight');\n\tforeach ($component->children() as $compPart) { // properties and (opt) subComponents\n\t\tif (1 > $compPart->count())\n\t\t\tcontinue;\n\t\tif (in_array($compPart->getName(), $subComponents))\n\t\t\t_getXMLComponents($comp, $compPart);\n\t\telseif ('properties' == $compPart->getName()) {\n\t\t\tforeach ($compPart->children() as $property) // properties as single property\n\t\t\t\t_getXMLProperties($comp, $property);\n\t\t}\n\t} // end foreach( $component->children() as $compPart )\n}", "public function componentDetails()\n {\n return [\n 'name' => 'List Component',\n 'description' => 'No description provided yet...'\n ];\n }", "function getComponents(){\r\n mysql_connect(mysql_server, mysql_username, mysql_password) or die(mysql_error()); \r\n mysql_select_db(mysql_database) or die(mysql_error()); \r\n $data = mysql_query(\"SELECT id, slug, component_type FROM components ORDER BY slug DESC LIMIT 20\") \r\n or die(mysql_error());\r\n //grab those vars\r\n global $comp_args;\r\n while($info = mysql_fetch_assoc($data)){\r\n $comp_args[] = $info;\r\n }\r\n \r\n return;\r\n}", "abstract protected function get_plugin_components();", "public function getComponents () : array\n {\n return $this->components;\n }", "public function getComponents($type);", "public function getComponents(): array\n {\n return $this->components;\n }", "function TestCase_add_component($case_id, $component_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.add_component', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($component_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function get_content() {\n\t\t$content = array();\n\t\tforeach ( $this->component as $item ) {\n\t\t\tif ( is_array( $item ) AND isset( $item['name'] ) AND isset( $item['val'] ) ) {\n\t\t\t\tif (\n\t\t\t\t\t$item['val'] !== ''\n\t\t\t\t\tAND $item['name'] != 'Name'\n\t\t\t\t\t AND $item['name'] != 'Thumbnail'\n\t\t\t\t\t AND $item['name'] != 'Preview'\n\t\t\t\t\t AND $item['name'] != 'Global Component Rules'\n\t\t\t\t) {\n\t\t\t\t\tarray_push( $content, $item );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $content;\n\t}", "public function getAllComponents($listFormat = 1) {\n $components = Component::getAllComponents($listFormat);\n return \\Response::json($components);\n }", "public function fetch(array $components = []);", "public function getComponents() {\n return $this->components;\n }", "public function components() {\r\n\t\t$components = new Dbi_Model_QueryComponents();\r\n\t\t$components->table = $this->name();\r\n\t\t$components->where = $this->_wheres;\r\n\t\t$components->fields = $this->_fields;\r\n\t\t$components->subqueries = $this->_subqueries;\r\n\t\t$components->innerJoins = $this->_innerJoins;\r\n\t\t$components->leftJoins = $this->_leftJoins;\r\n\t\t$components->rightJoins = $this->_rightJoins;\r\n\t\t$components->orders = $this->_orders;\r\n\t\t$components->limit = $this->_limit;\r\n\t\t$components->groups = $this->_group;\r\n\t\t$components->having = $this->_haves;\r\n\t\t$components->calculated = $this->_calculated;\r\n\t\treturn $components;\r\n\t}", "protected function extract_components($data) {\n\t\t\n\t\t$components = array();\n\t\t\n\t\t// Extract the token/secret\n\t\t$parts = explode(\"&\", $data);\n\t\t\n\t\tforeach ($parts as $part) {\n\t\t\tlist($var, $value) = explode(\"=\", $part, 2);\n\t\t\t\n\t\t\tif ($var === \"oauth_token\") $components[\"token\"] = urldecode($value);\n\t\t\telse if ($var === \"oauth_token_secret\") $components[\"secret\"] = urldecode($value);\n\t\t}\n\t\t\n\t\t\n\t\treturn $components;\n\t}", "public function publiGetComponents($input) {\n return $this->getComponents($input);\n }", "function Component_get($component_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Component.get', array(new xmlrpcval($component_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function get_lista_componentes( $tipo_componente )\n\t{\n\t\t$proyecto = $this->db->quote($this->get_id());\n\t\t$comp_sano = $this->db->quote($tipo_componente);\n\t\tif ($tipo_componente == 'toba_item' ) {\n\t\t\t$sql = \"SELECT \tproyecto as \t\tproyecto,\n\t\t\t\t\t\t\titem as \t\t\tcomponente\n\t\t\t\t\tFROM apex_item\n\t\t\t\t\tWHERE proyecto = $proyecto\n\t\t\t\t\tORDER BY 2 ASC;\";\n\t\t} elseif(strpos($tipo_componente,'toba_asistente') !== false) {\n\t\t\t$sql = \"SELECT \to.proyecto as \t\tproyecto,\n\t\t\t\t\t\t\to.molde as \t\t\tcomponente,\n\t\t\t\t\t\t\tt.clase\n\t\t\t\t\tFROM \tapex_molde_operacion o,\n\t\t\t\t\t\t\tapex_molde_operacion_tipo t\n\t\t\t\t\tWHERE \to.operacion_tipo = t.operacion_tipo\n\t\t\t\t\tAND\t\tt.clase = $comp_sano\n\t\t\t\t\tAND\t\tproyecto = $proyecto\n\t\t\t\t\tORDER BY 2 ASC;\";\n\t\t} else {\n\t\t\t$sql = \"SELECT \tproyecto as \t\tproyecto,\n\t\t\t\t\t\t\tobjeto as \t\t\tcomponente\n\t\t\t\t\tFROM apex_objeto\n\t\t\t\t\tWHERE proyecto = $proyecto\n\t\t\t\t\tAND clase = $comp_sano\n\t\t\t\t\tORDER BY 2 ASC;\";\n\t\t}\n\t\t$datos = $this->db->consultar( $sql );\n\t\treturn $datos;\n\t}", "private function _initComponents()\n {\n $componentsFolder = 'Components';\n $directory = dirname(__FILE__) . '/' . $componentsFolder;\n $components = array();\n foreach (@glob($directory . '/*', GLOB_ONLYDIR) as $folder) {\n $componentName = basename($folder);\n $components[$folder] = array(\n 'componentName' => $componentName,\n 'namespace' =>\n '\\H22\\Plugins\\VisualComposer\\\\' .\n $componentsFolder .\n '\\\\' .\n $componentName .\n '\\\\' .\n $componentName,\n );\n }\n return $components;\n }" ]
[ "0.6280599", "0.61939204", "0.6064108", "0.6061863", "0.59492856", "0.59365493", "0.59077984", "0.59077984", "0.5857067", "0.5852395", "0.5740613", "0.56816244", "0.5629186", "0.56114566", "0.55614805", "0.55325663", "0.55216295", "0.5505523", "0.5504567", "0.5465273", "0.5433194", "0.5426145", "0.54239434", "0.53885996", "0.5377995", "0.5350761", "0.53364885", "0.53089815", "0.5307916", "0.5306989" ]
0.7088103
0
/ add_tag Add a tag to the given TestCase Usage TestCase.add_tag Parameters ParameterData TypeComments case_idinteger tag_namestringCreates tag if it does not exist Result 0
function TestCase_add_tag($case_id, $tag_name) { // Create call $call = new xmlrpcmsg('TestCase.add_tag', array(new xmlrpcval($case_id, "int"), new xmlrpcval($tag_name, "string"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_add_tag($run_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.add_tag', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "private function addTag()\n {\n $params = array();\n $params['db_link'] = $this->db;\n $params['ticket_id'] = $_REQUEST['ticket_id'];\n \n $data = array();\n $tagTitle = stripslashes(trim($_REQUEST['tag']));\n $tag = Utils::sanitize($tagTitle);\n \n $Tickets = new Tickets($params);\n $Tickets->addTag($tag, $tagTitle);\n \n echo '[{\"isError\":0, \"message\":\"Successfully added tag\"}]';\n exit;\n }", "public function addTag( $data = array() ) { \t\n\n $url = $this->_base_url . 'tags';\n $options['data']['tag'] = $data;\n $options['post'] = true;\n $this->_callAPI($url, $options);\n }", "function TestPlan_add_tag($plan_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.add_tag', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($tag_name, \"string\")), \"array\");\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function add_tag($tag) {\n if (!is_object($tag)) {\n return false;\n }\n if (!isset($tag->name) or\n !isset($tag->value) or\n !isset($tag->ticketid) or\n isset($tag->id)){\n\n return false;\n }\n\n if (!insert_record('helpdesk_ticket_tag', $tag)) {\n return false;\n }\n\n // Lets make an update saying we added this tag.\n $dat = new stdClass;\n $dat->ticketid = $this->id;\n $dat->notes = get_string('tagaddedwithnameof', 'block_helpdesk') . $tag->name;\n $dat->status = HELPDESK_NATIVE_UPDATE_TAG;\n $dat->type = HELPDESK_UPDATE_TYPE_DETAILED;\n\n if(!$this->add_update($dat)) {\n notify(get_string('cantaddupdate', 'block_helpdesk'));\n }\n\n // Update modified time and refresh the ticket.\n $this->store();\n $this->fetch();\n return true;\n }", "function add_tag($tag) {\n array_push($this->tags, $tag);\n }", "public function addTag($tagData)\n {\n $this->clickButton('add_new_tag');\n $this->fillTagSettings($tagData);\n $this->saveForm('save_tag');\n }", "public function add_tag($tag, $message = null) {\n\t\t\tif ($message === null) {\n\t\t\t\t$message = $tag;\n\t\t\t}\n\t\t\treturn $this->run(\"tag -a $tag -m \" . escapeshellarg($message));\n\t\t}", "public function addTag($imageId, $tag) {\n $dataToInsert = [\n 'image_id' => $imageId,\n 'tag' => filter_var($tag, FILTER_SANITIZE_STRING)\n ];\n $result = Db::insert('tags', $dataToInsert);\n\n return $result;\n }", "private function _addTags()\n {\n $metadata = $this->getRecordMetadata();\n $this->_record->addTags($metadata[self::TAGS]);\n }", "public function actionAdd()\n\t{\n\t\t$tag = array(\n\t\t\t'tag_id' => 0\n\t\t);\n\n\t\treturn $this->_getTagAddEditResponse($tag);\n\t}", "public function addTag($key, $data)\n {\n $this->tags[$key] = $data;\n //echo $key.'=>'.$data.'<br />';\n }", "public function createTag($tag){\n\t\t$user = $this->getUser();\n\t\tif(!isset($user[\"id\"]))return false;\n\t\tif(is_array($tag)){\n\t\t\t$success = true;\n\t\t\tforeach($tag as $t){\n\t\t\t\tif(!$this->createTag($t)){\n\t\t\t\t\t$success = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $success;\n\t\t}else{\n\t\t\t$tags = $this->getTag($tag);\n\t\t\tif(isset($tags[\"tagid\"])){\n\t\t\t\treturn $tags[\"tagid\"];\n\t\t\t}\n\t\t\tif(strlen(trim($tag))<3)return false;\n\t\t\t$tag = strtolower($tag);\n\t\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") creates tag '\".$tag.\"'\");\n\t\t\t$query = Queries::createtag($tag);\n\t\t\treturn $this->query($query);\n\t\t}\n\t}", "public function insert(Tag $tag);", "public function add() {\n\t\t$this->display ( 'admin/tag/add.html' );\n\t}", "public function tagged( $tag );", "public function addNewTag($tagName) {\n $sql = \"INSERT INTO t_tags VALUES(?)\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"s\", $tagName);\n $select->execute();\n $select->close();\n }", "public function testAddOrderTag()\n {\n }", "static function addTag($tags){\n\t\t//fetch corresponding tagids\n\t\t$length = count($tags);\n\t\t$db = (new Database)->connectToDatabase();\n\t\tfor($i=0;$i<$length;$i++){\n\t\t\t$db->query(\"SELECT * FROM tag_table WHERE tag_name='$tags[i]'\");\n\t\t\tif($db->returned_rows==0){\n\t\t\t\t//no tag found in tag table... so add it\n\t\t\t\t$db->query(\"INSERT INTO tag_table (tag_name) VALUES ('$tag[i]')\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//check if tag already there with post?\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t\n\t}", "public static function insert_tag_item($tagname, $image=null, $default_topic_id=0) {\n try {\n $new_tag_id = 0;\n \n $newtagname = '';\n #$tagname = eregi_replace(\" \", \"\", $tagname);\n $words = str_word_count($tagname, 1, \".\");\n foreach ($words as $word) {\n $newtagname .= $word;\n }\n $tagname = $newtagname;\n\n //Clean Tag Name\n $tagname = ADODB::dbclean(Tag::clean_tag($tagname));\n \n if ($tagname != '') {\n $db = ADODB::connect();\n \n //Check if tag exists first\n $tag = new Tbl_tag;\n $tag = Tbl_tag::get_tag($tagname);\n \n if (!isset($tag->tag_id)) {\n if (!$default_topic_id || $default_topic_id == 0) $default_topic_id = 'null';\n if (is_null($image)) {\n $query = \"INSERT INTO tbl_tag_item (tag, default_topic_id, topic_count) VALUES ('$tagname', $default_topic_id, 0)\";\n } else {\n $query = \"INSERT INTO tbl_tag_item (tag, default_topic_id, image, topic_count) VALUES ('$tagname', $default_topic_id, '$image', 0)\";\n }\n $rs = $db->Execute($query);\n $new_tag_id = $db->Insert_ID();\n } else {\n $new_tag_id = $tag->tag_id;\n }\n }\n return $new_tag_id;\n } catch (exception $e) {\n Info::exception_handler($e, __file__, get_class($this), __FUNCTION__, __LINE__);\n } \n }", "public function addTag($tag) {\n $this->init(); //it would actually work without it\n\n if (!in_array($tag,$this->tags)) {\n $tag = trim($tag);\n\n $this->tags['new'][] = $tag;\n return true;\n }\n\n return false;\n }", "public function addTagToImage($imageID, $tagName) {\n $sql = \"INSERT INTO t_tags_included VALUES(?,?)\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"ss\", $tagName, $imageID);\n $select->execute();\n $select->close();\n }", "public function test_createTagRequest() {\n\n }", "public function test_addOrderLineActivityTag() {\n\n }", "public function test_addItemCategoryTag() {\n\n }", "function addIndusTag($indus_tag_details){\n\t if ($this->db->insert('vc_indus_tag',$indus_tag_details))\n\t\t\t{ \n\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\treturn FALSE;\n\t\t\t}\n }", "public static function add_tag($name) {\n global $wpdb;\n $data = array(\n 'name' => $name\n );\n\n // Si no se inserta nada, retornamos false\n if (!$wpdb->insert('XTB_TAGS', $data, array('%s'))) {\n return null;\n }\n\n return $wpdb->insert_id;\n //return true;\n }", "public function testAddReplenishmentTag()\n {\n }", "public function addTag($tag)\n {\n $this->tags[] = $tag;\n $this->processTags();\n }", "public function testPostTag() : void\n {\n $request = [\n 'name' => static::$tagName\n ];\n\n $response = $this->actingAs(static::$user, 'api')\n ->post('/api/tag', $request);\n\n $response->assertStatus(201);\n\n $response->assertJsonStructure([\n 'id',\n 'name'\n ]);\n }" ]
[ "0.7205172", "0.7026904", "0.6807183", "0.6741576", "0.6458758", "0.6184237", "0.6107188", "0.61002827", "0.60792", "0.6046511", "0.604646", "0.6045151", "0.60332066", "0.6028586", "0.60108775", "0.60029495", "0.5978484", "0.59694946", "0.59231997", "0.5879363", "0.5875255", "0.5797868", "0.5778471", "0.5764804", "0.5763548", "0.5749983", "0.5733798", "0.572464", "0.5723492", "0.57170504" ]
0.7798072
0
/ remove_tag Remove a tag from the given TestCase Usage TestCase.remove_tag Parameters ParameterData TypeComments case_idinteger tag_namestring Result 0
function TestCase_remove_tag($case_id, $tag_name) { // Create call $call = new xmlrpcmsg('TestCase.remove_tag', array(new xmlrpcval($case_id, "int"), new xmlrpcval($tag_name, "string"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_remove_tag($run_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.remove_tag', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function delete_tag($tag);", "function TestPlan_remove_tag($plan_id, $tag_name) {\n\t// Create call\n//\t$call = new xmlrpcmsg('TestPlan.remove_tag', array(new xmlrpcval(array(\"plan_id\" => new xmlrpcval($plan_id, \"int\"), \"tag_name\" => new xmlrpcval($tag_name, \"string\")), \"struct\")));\n\t$call = new xmlrpcmsg('TestPlan.remove_tag', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function testRemoveTag_UsingCleanTags() {\n foreach ($this->photo->getTags() as $tag) {\n $this->photo->removeTag($tag);\n }\n $this->photo->addTags(array('something', 'another', '2004'));\n sleep(1);\n\n $this->photo->removeTag('another');\n\n $result = $this->photo->getTags();\n $this->assertEquals(array('something', '2004'), $result);\n }", "function testRemoveTag_UsingMessyTags() {\n foreach ($this->photo->getTags() as $tag) {\n $this->photo->removeTag($tag);\n }\n $this->photo->addTags(array('some thing!', 'a-nother.', '2004'));\n sleep(1);\n\n $this->photo->removeTag('another');\n\n $result = $this->photo->getTags();\n $this->assertEquals(array('something', '2004'), $result);\n }", "public function removeTag(string $name);", "public function removeTags()\n\t{\n\t\tforeach ($this->argsArray(func_get_args()) as $tag) {\n\t\t\t$this->removed_tags[] = $tag;\n\t\t}\n\t}", "public function removeTag()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_tag]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_tag]);\n\t\t}\n\t}", "public function remove($tag) { //+\n\t\tunset($this->arShortcodes[$tag]);\n\t}", "public function removeByTag($tag, $force = false);", "public function deleteTag($imageID, $tagName) {\n $sql = \"DELETE FROM t_tags_included WHERE fk_pk_tags=? AND fk_pk_bild_id=?\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"ss\", $tagName, $imageID);\n $select->execute();\n $select->close();\n }", "public function delTag($id, $tag)\n {\n $this->db->update(array('id'=>$id), array('$pull'=>array('tags'=>$tag)));\n }", "private function removeTag($tagName)\n\t{\n\t\tif (is_null($tagName) || $tagName == '') return;\n\n $tag = Tag::where('tag', '=', $tagName)->first();\n\n\t\tif (is_object($tag))\n\t\t{\n\t\t\tif ($tag->count > 0) TagUtil::decrementCount($tagName, 1, $tag);\n\n\t\t\t// return collection object\n\t\t\t$tagPivot = $this->tags()->wherePivot('tag_id', '=', $tag->id)->get();\n\t\t\t\n\t if ($tagPivot->count()) $this->tags()->detach($tag->id);\n\t\t}\n\t}", "public function unTag($objid, $tag);", "function photos_removeTag ($tag_id) {\n\t\t$response = $this->execute(array('method' => 'flickr.photos.removeTag', 'tag_id' => $tag_id));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function deleteTag($tag){\n\t\tif(is_array($tag)){\n\t\t\t$success = true;\n\t\t\tforeach($tag as $t){\n\t\t\t\tif(!$this->deleteTag($t)){\n\t\t\t\t\t$success = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $success;\n\t\t}else{\n\t\t\t$user = $this->getUser();\n\t\t\t$singletag = $this->getTag($tag);\n\t\t\tif(!isset($user[\"id\"])||!isset($singletag[\"tagid\"])){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif($user[\"status\"] == DBConfig::$userStatus[\"admin\"]){\n\t\t\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") deletes tag '\".$tag.\"'\");\n\t\t\t\t$query = Queries::deletetag($singletag[\"tagid\"]);\n\t\t\t\tif(!$this->query($query))return false;\n\t\t\t\t$query = Queries::removetag($singletag[\"tagid\"]);\n\t\t\t\treturn $this->query($query);\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "function deleteTag( $iTag ){\n $oSql = Sql::getInstance( );\n clearCache( 'tags' );\n $oSql->query( 'DELETE FROM tags WHERE iTag = \"'.$iTag.'\" ' );\n $oSql->query( 'DELETE FROM pages_tags WHERE iTag = \"'.$iTag.'\" ' );\n\n generateTagsLinks( );\n}", "public function testDeleteReplenishmentTag()\n {\n }", "function remove_tag($id) {\n global $CFG;\n if (!is_numeric($id)) {\n return false;\n }\n\n $tag = get_record('helpdesk_ticket_tag', 'id', $id);\n\n $result = delete_records('helpdesk_ticket_tag', 'id', $id);\n if (!$result) {\n return false;\n }\n // Lets make an update!\n\n $dat = new stdClass;\n $dat->ticketid = $this->id;\n $dat->notes = get_string('tagremovewithnameof', 'block_helpdesk') . $tag->name;\n $dat->status = HELPDESK_NATIVE_UPDATE_UNTAG;\n $dat->type = HELPDESK_UPDATE_TYPE_DETAILED;\n\n if(!$this->add_update($dat)) {\n notify(get_string('cantaddupdate', 'block_helpdesk'));\n }\n\n $this->store();\n return true;\n }", "public function removeTag($tag){\n\n if (!$tag){\n return false;\n }\n if (is_string($tag)) {\n $tag = array($tag);\n }\n if (!count($tag)) {\n return false;\n }\n $deleteTags = array();\n\n foreach ($tag as $t) {\n $deleteTags[] = $this->_keyFromTag($t);\n $deleteKeys = $this->getKeysByTag($t);\n $this->remove($deleteKeys);\n }\n if ($deleteTags && count($deleteTags)) {\n $this->getAdapter()->delete($deleteTags);\n }\n return true;\n }", "private function removeTag(int $currentTagPtr, int $tagEndPtr): void\n {\n $this->phpcsFile->fixer->beginChangeset();\n\n for ($tokenPtr = $currentTagPtr; $tokenPtr < $tagEndPtr; $tokenPtr++) {\n $this->phpcsFile->fixer->replaceToken($tokenPtr, '');\n }\n\n $this->phpcsFile->fixer->endChangeset();\n }", "private static function DeleteTag($tag)\n {\n global $SESSDB;\n \n // First delete entries in sdat\n $q = $SESSDB->prepare(\"DELETE FROM `sdat` WHERE sdat.id IN(SELECT smap.id FROM `smap` WHERE tag=:tag)\");\n $q->bindParam(':tag', $tag);\n $q->execute();\n\n // Now smap...\n $q = $SESSDB->prepare(\"DELETE FROM `smap` WHERE tag=:tag\");\n $q->bindParam(':tag', $tag);\n $q->execute();\n }", "public function setRemoveTag($tag) {\n\t\t$this->removeTags[] = $this->trimTags($tag);\n\t}", "public function delete($tag)\n {\n $builder = $this->git->getProcessBuilder()\n ->add('tag')\n ->add('-d');\n\n if (!is_array($tag) && !($tag instanceof \\Traversable)) {\n $tag = [$tag];\n }\n\n foreach ($tag as $value) {\n $builder->add($value);\n }\n\n $this->git->run($builder->getProcess());\n }", "public function removeTag($tag_name)\n\t{\n\t\t$tag = PortfolioTag::getTagByName($tag_name);\n\n\t\tif (!empty($tag)) // Это не должно произойти, тэг должен быть всегда найден\n\t\t{\n\t\t\t$command = Yii::app()->db->createCommand('DELETE FROM {{portfolio_portfolio_tag}} WHERE portfolio_id = :model_id AND tag_id = :tag_id');\n\n\t\t\t$command->bindValues(\n\t\t\t\tarray(\n\t\t\t\t\t':model_id' => $this->id,\n\t\t\t\t\t':tag_id' => $tag->id,\n\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn $command->execute();\n\t\t}\n\n\t\treturn false;\n\t}", "public function destroy(Tag $tag)\n {\n //\n }", "public function destroy(Tag $tag)\n {\n //\n }", "public function delete($tag)\n {\n getAuthentication()->requireAuthentication();\n $res = $this->tag->delete($tag);\n if($res)\n return $this->noContent('Tag deleted successfully', true);\n else\n return $this->error('Tag could not be deleted', false);\n }", "public function removeTag($tag) {\n $this->init(); //we actually may do without it\n\n if (in_array($tag, $this->tags)) {\n $key = array_search($tag, $this->tags);\n $this->tags['del'][] = $key;\n unset($this->tags[$key]);\n\n return true;\n } else if (in_array($tag, $this->tags['new'])) {\n $key = array_search($tag, $this->tags['new']);\n unset($this->tags['new'][$key]);\n\n return true;\n }\n\n return false;\n }", "public function test_detachTagRequest() {\n\n }" ]
[ "0.7552478", "0.7444143", "0.6979681", "0.6720517", "0.6682423", "0.6610774", "0.66077524", "0.65597653", "0.65393895", "0.64629847", "0.61659944", "0.61081994", "0.60849184", "0.60739094", "0.60364014", "0.6021707", "0.5998572", "0.5995792", "0.59446037", "0.5868411", "0.5866124", "0.5865859", "0.5819241", "0.58104545", "0.58071285", "0.57921743", "0.57921743", "0.57643944", "0.5761271", "0.5756495" ]
0.8024185
0
/ get_tags Get a list of tags for the given TestCase Usage TestCase.get_tags Parameters ParameterData TypeComments case_idinteger Result [0] Array [plan_count] [tag_name] [case_count] [run_count] [tag_id] [1] Array ...
function TestCase_get_tags($case_id) { // Create call $call = new xmlrpcmsg('TestCase.get_tags', array(new xmlrpcval($case_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_get_tags($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_tags', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTags() {}", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags();", "private function _getAllTags() {\n\n\t\t$param = [\n\t\t\t'table' => 'tags',\n\t\t\t'select' => '*'\n\t\t];\n\n\t\tif($this->CI->input->get()) {\n\t\t\tif(isset($this->CI->input->get['fields'])) { $param['select'] = $this->CI->input->get['fields']; }\n\t\t\tif(isset($this->CI->input->get['type'])) { $param['where'] = ['type' => $this->CI->input->get['type']]; }\n\t\t}\n\n\t\t$data = $this->CI->model->get($param);\n\t\tif(count($data)) { $this->CI->exitCode = 200; }\n\t\treturn ['data' => $data];\n\t}", "function TestPlan_get_tags($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_tags', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTags() {\n try {\n $getTagsOperation = new GetTags();\n\n $getTagsResponse = $this->apiCall($getTagsOperation);\n $tagsList = $getTagsResponse->getData();\n\n if ($getTagsResponse->isSuccess()) {\n\n $response = [];\n\n if(is_array($tagsList) && count($tagsList) > 0) {\n foreach ($tagsList as $item) {\n $response[] = [\n 'id' => $item['tagId'],\n 'name' => $item['name']\n ];\n }\n }\n return $response;\n }\n }catch (\\Exception $e){\n throw new \\Exception($e->getMessage());\n }\n }", "public function testTags()\n\t{\n\t\t$this->call('GET', '/api/tags');\n\t}", "public function testGetTags()\n {\n $helix = new Helix(self::$tokenProvider);\n $tagsApi = $helix->tags;\n $tags = $tagsApi->getTags();\n \n $this->assertNotNull($tags);\n $this->assertIsArray($tags);\n\n // Twitch should have more than 20 available tags, so we check that the cursor is available\n $hasMoreResults = $tagsApi->hasMoreTags();\n $this->assertTrue($hasMoreResults);\n\n // Try to get a specific tag by its ID, using the previous results to get the ID.\n $firstTag = reset($tags);\n $onlyTag = $tagsApi->getTags([$firstTag->tag_id]);\n\n $this->assertCount(1, $onlyTag);\n $this->assertEquals($firstTag, reset($onlyTag));\n\n return $firstTag->tag_id;\n }", "public function testGetTags()\n {\n $objects = $this->loadTestFixtures(['@AppBundle/DataFixtures/ORM/Test/Tag/CrudData.yml']);\n\n // Test scope\n $this->restScopeTestCase('/api/tags', [\n 'list' => $this->getScopeConfig('tag/list.yml')\n ], true);\n\n // Test filters\n $listFilterCaseHandler = new ListFilterCaseHandler([\n 'tag-1' => $objects['tag-1']\n ]);\n \n $listFilterCaseHandler->addCase('name', '=Some name', 'tag-1', true);\n\n $this->restListFilterTestCase('/api/tags', $listFilterCaseHandler->getCases());\n }", "function getTags($tag) {\n \n \t$tags_request_url = sprintf($this->api_urls['tags'], $tag, $this->access_token);\n \t\n \treturn $this->__apiCall($tags_request_url);\n \n }", "public function getTags() {\n\t\t$tags = array();\n\n\t\ttry {\n\t\t\t/** @var Thrive_Dash_Api_KlickTipp $api */\n\t\t\t$api = $this->get_api();\n\t\t\t$tags = $api->getTags();\n\t\t} catch ( Exception $e ) {\n\n\t\t}\n\n\t\treturn $tags;\n\t}", "public function getTags($param){\n\tif(!isset($param['type']) OR !isset($param['tag_group_id']) OR !isset($param['account_id'])){\n\t return false;\n\t}\n\t$this->load->model('Logic_tag_relation');\n\t$result = $this->Logic_tag_relation->getTags($param);\n\treturn $result;\n }", "private function _getTags($tagID = null, $getParams = []) {\n\n\t\t$param = [\n\t\t\t'table' => 'tags',\n\t\t\t'select' => 'tagID as id, name, type, relatedTo, description'\n\t\t];\n\n\t\t# $param['limit'][0] contains pageSize & $param['limit'][1] contains page starting offset value\n\t\tif (isset($getParams['page'])) {\n\t\t\t$param['limit'] = apiGetOffset(['page' => $getParams['page']]);\n\t\t}\n\t\t/*if(!isset($getParams['all'])) {\n\t\t\t$param['limit'] = '20';\n\t\t}*/\n\n\t\tif ($tagID) {\n\t\t\t$param['where'] = ['tagID' => $tagID];\n\t\t}\n\n\t\t$data = ['data' => $this->CI->model->get($param)];\n\n\t\tif (!$tagID && isset($getParams['meta'])) {\n\t\t\t$getParams['meta'] = json_decode($getParams['meta'], true);\n\t\t\t$data['meta'] = ['pageSize' => $param['limit'][0]];\n\t\t\tif (isset($getParams['meta']['count'])) {\n\t\t\t\t# count of no. of records ['all', gmat', 'gre']\n\t\t\t\t$data['meta']['count'] = $this->_countTags($param);\n\t\t\t}\n\t\t}\n\t\t$this->CI->exitCode = ($data) ? 200 : 404;\n\t\treturn $data;\n\t}", "function retrieve_tags($data)\n\t {\n\t\t $text = $data['text'];\n\t\t $lang_code = $data['lang_code'] ? $data['lang_code']:$this->language_translate->check($text);\n\t\t $retArr = array(); \n\t\t \n\t\t switch($lang_code)\n\t\t {\n\t\t case 'zh':\n $retArr = $this->tag_extract->retrieve_zh($text);\n break;\n case 'en':\n $retArr = $this->tag_extract->retrieve_en($text);\n break;\n default:\n\t\t $retArr = $this->tag_extract->retrieve_en($text);\n break;\n\t\t }//switch\n\t\t return $retArr;\n\t }", "function getTags ( $params=array() )\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/tags.json\",$params);\n return $this->createResponse($result,'get Tags');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "function getTags() {\n\t\t$db = Database::getInstance();\n\t\t$mysqli = $db->getConnection();\n\t\t\n\t\t$tagsArray = array();\n\t\t\t$sql_query = \"select tagnaam,tagid from tag where status=6\";\n\t\t\t$result = $mysqli->query($sql_query);\n\t\t\t\n\t\t\twhile ( $row = $result->fetch_object () ) {\n\t\t\t\t$Tag = new Tag();\n\t\t\t\t$Tag->tagId = $row->tagid;\n\t\t\t\t$Tag->tagName = $row->tagnaam;\n\t\t\t\tarray_push($tagsArray, $Tag);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$result->close();\n\t\t\treturn $tagsArray;\n\t}", "public function getTags():array;", "public function getTagList();", "function getTags($talentID)\r\n\t{\r\n\t\t$db = Database::getInstance ();\r\n\t\t$mysqli = $db->getConnection ();\r\n\t\t$tagArray = array();\r\n\t\t$sql_query = \"select * from talent_has_tag where talent_talentid = \".$talentID;\r\n\t\t$result = $mysqli->query ( $sql_query );\r\n\t\twhile ( $row = $result->fetch_object () ) {\r\n\t\t\t$sql_query2 = \"select * from tag where tagid = \" . $row->tag_tagid;\r\n\t\t\t$result2 = $mysqli->query ( $sql_query2 );\r\n\t\t\t\r\n\t\t\twhile ( $row2 = $result2->fetch_object () ) {\r\n\t\t\tarray_push ( $tagArray, $row2->tagnaam);\r\n\t\t\t}\t\t\t\r\n\t\t}\t\r\n\t\t\r\n\t\t// return an array with tags\r\n\t\treturn $tagArray;\r\n\t}", "public function getTagsTable() {}", "public static function get_tags() {\n global $wpdb;\n $query = \"SELECT * FROM XTB_TAGS\";\n return $wpdb->get_results($query);\n }", "public function tags();", "private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "public function tag_list()\n {\n $this->pushpin_id = $_GET['pushpinId'];\n\n $query = \"SELECT tags\nFROM PushpinTags\nWHERE pushpin_ID= '$this->pushpin_id'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n }", "public function getTagsValues() {}" ]
[ "0.67127764", "0.6656249", "0.66115916", "0.66115916", "0.66115916", "0.66115916", "0.66115916", "0.6575484", "0.6560344", "0.6529912", "0.6464139", "0.64217526", "0.64037085", "0.63616747", "0.63390094", "0.6327005", "0.63245773", "0.62942845", "0.626255", "0.6215496", "0.62036717", "0.6160575", "0.6089756", "0.5987668", "0.59760284", "0.59650564", "0.59559554", "0.59559554", "0.59517825", "0.59431785" ]
0.73537296
0
/ get_plans Get a list of TestPlans for the given TestCase Usage TestCase.get_plans Parameters ParameterData TypeComments case_idinteger Result [0] Array [author_id] [name] [default_product_version] [plan_id] [product_id] [creation_date] [type_id] [isactive] [1] Array ...
function TestCase_get_plans($case_id) { // Create call $call = new xmlrpcmsg('TestCase.get_plans', array(new xmlrpcval($case_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getsAListOfPlans()\n {\n // Arrange\n // Act\n $plans = Ezypay::getPlans();\n\n // Assert\n //$this->assertEquals(3, sizeof($plans->data)); // Causing issues as there are aditional plans\n $this->assertNotNull($plans);\n\n $this->plans = $plans;\n }", "public function getPlans()\n {\n try{\n \n $aPlans = $this->request('plans', 'GET');\n if( $aPlans->status ){\n throw new Exception( $aPlans->status.'-'.$aPlans->details[0]->message );\n }else{\n return $aPlans;\n }\n }catch(Exception $e){\n $this->exception($e);\n }\n }", "public function listPlans()\n\t{\n\t\t\n\t\t/* If 1.4 and no backward, then leave */\n\t\tif (!$this->backward)\n\t\t\treturn;\n\t\t\t\n\t include_once(dirname(__FILE__).'/lib/Stripe.php');\n\t\t\\Stripe\\Stripe::setApiKey(Configuration::get('STRIPE_MODE') ? Configuration::get('STRIPE_PRIVATE_KEY_LIVE') : Configuration::get('STRIPE_PRIVATE_KEY_TEST'));\n\n\t\t/* Try to process the capture and catch any error message */\n\t\ttry\n\t\t{\n\t\t\t$result_json = \\Stripe\\Plan::all();\n\t\t\t\t\t\t\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\n\t\t\t$this->_errors['stripe_subscription_error'] = $e->getMessage();\n\t\t\tif (class_exists('Logger'))\n\t\t\t\tLogger::addLog($this->l('Stripe - Plans list update failed').' '.$e->getMessage(), 1, null, 'Customer', (int)Tools::getIsset('id_customer'), true);\n\t\t}\n\t\t\n\t\tif(!isset($this->_errors['stripe_subscription_error'])){\n\t\t\tDb::getInstance()->Execute('TRUNCATE TABLE '._DB_PREFIX_.'stripepro_plans');\n\t\t\tfor($i=0;$i<count($result_json->data); $i++){\n\t\t\t Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'stripepro_plans (`stripe_plan_id`, `name`, `interval`, `amount`, `currency`, `interval_count`, `trial_period_days`) VALUES (\\''.$result_json->data[$i]->id.'\\', \\''.$result_json->data[$i]->name.'\\', \\''.$result_json->data[$i]->interval.'\\','.sprintf(\"%.2f\", $result_json->data[$i]->amount / 100).', \\''.$result_json->data[$i]->currency.'\\', '.(int)$result_json->data[$i]->interval_count.','.(int)$result_json->data[$i]->trial_period_days.')');\n\t\t\t }\n\t\t\t}\n\t\n\treturn true;\n\t\n\t}", "public function get_listing_plans($id, $type)\n {\n header('Content-Type: application/json');\n $output['token'] = $this->security->get_csrf_hash();\n $data = $this->database->_get_row_data('tbl_purchases', array('plan_id' => $id, 'listing_type' => $type));\n if (!empty($data)) {\n $output['response'] = $data;\n } else {\n $output['response'] = false;\n }\n\n exit(json_encode($output));\n }", "public function list_plan($parameters){\n try {\n $planList = Plan::all(array_filter($parameters), $this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLANS'] = $planList->toArray();\n $returnArray['RAWREQUEST']= json_encode($parameters);\n $returnArray['RAWRESPONSE']=$planList->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n } \n }", "public function get_plans() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n // extract passed parameters from jtable\n $query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);\n parse_str($query, $params);\n \n\n // count all records query\n $q = \"SELECT COUNT(*) as count\n FROM plans AS p inner join\n users as u on p.modified_by=u.user_id\n inner JOIN contacts AS c ON u.user_id=c.user_id\n and c.modified_date = (select max(modified_date) from\n contacts as c where c.user_id=p.modified_by)\n \";\n // run query\n $count = DB::instance(DB_NAME)->select_row($q);\n $order = isset($params['jtSorting']) ? $params['jtSorting'] : 'plan_id DESC';\n \n # Set up query\n $q = \"SELECT\n p.plan_id, p.description,p.time,p.public, c.first_name, c.last_name, p.modified_date, p.show\n FROM plans AS p inner join\n users as u on p.modified_by=u.user_id\n inner JOIN contacts AS c ON u.user_id=c.user_id\n and c.modified_date = (select max(modified_date) from\n contacts as c where c.user_id=p.modified_by)\n ORDER BY {$order} \n LIMIT {$params['jtStartIndex']}, {$params['jtPageSize']}\n \";\n \n # Run query\n $plans = DB::instance(DB_NAME)->select_rows($q);\n $items = array();\n $i = 0;\n foreach($plans as $plan) {\n $items[] = array(\n \"plan_id\" => $plan[\"plan_id\"],\n \"modified_date\" => Time::display($plan['modified_date'],'Y-m-d H:m:s'),\n \"first_name\" => $plan[\"first_name\"],\n \"last_name\" => $plan[\"last_name\"],\n \"public\" => $plan[\"public\"],\n \"show\" => $plan[\"show\"],\n \"description\" => $plan[\"description\"],\n \"time\" => $plan[\"time\"]\n );\n }\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n $jTableResult['TotalRecordCount'] = $count['count'];\n $jTableResult['Records'] = $items;\n print json_encode($jTableResult);\n }", "public function getPlansData()\n {\n if (isset($this->data)) {\n return $this->data;\n }\n\n return [];\n }", "function TestPlan_get_test_cases($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_cases', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getPlans()\n {\n return response()->json(Spark::plans());\n }", "static function getAllPlans(){\n global $configClass;\n if($configClass['integrate_membership'] == 1){\n $db = JFactory::getDbo();\n $nullDate = $db->quote($db->getNullDate());\n $nowDate = $db->quote(JHtml::_('date', 'now', 'Y-m-d H:i:s', false));\n $query = $db->getQuery(true);\n $query->select('tbl.*')->from('#__osmembership_plans as tbl');\n $query->where('tbl.published = 1')\n ->where('tbl.access IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')')\n ->where('(tbl.publish_up = ' . $nullDate . ' OR tbl.publish_up <= ' . $nowDate . ')')\n ->where('(tbl.publish_down = ' . $nullDate . ' OR tbl.publish_down >= ' . $nowDate . ')');\n $db->setQuery($query);\n $allPlans = $db->loadObjectList();\n return $allPlans;\n }\n }", "public function getAllPlans($paramArray = [])\n {\n $ret = $this->exec($this->uri.$this->toHttpQueryParameter($paramArray), null);\n\n $prjs = $this->json_mapper->mapArray(\n json_decode($ret, false), new \\ArrayObject(), '\\BambooRestApi\\Plan\\Plan'\n );\n\n return $prjs;\n }", "public function getPlan();", "public function plans( $pluginId, $currentPlan )\n\t\t{\n\t\t\t$plans = array ();\n\t\t\t$rows = Table::_( 'plans' )->getByPlugin( $pluginId, $currentPlan );\n\t\t\tif ( $rows ) {\n\t\t\t\tforeach ( $rows as $_plan ) {\n\t\t\t\t\t$optionsText = '';\n\t\t\t\t\tif ( $options = $this->optionsForPlan( $_plan->id ) ) {\n\t\t\t\t\t\tforeach ( $options as $_option ) {\n\t\t\t\t\t\t\t$optionsText .= '<p>'. $_option->name .': '. $_option->value .' '. $_option->unit .'</p>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$products = $this->productsForPlan( $_plan->payment_plan_id, $pluginId );\n\t\t\t\t\t$plans[] = array (\n\t\t\t\t\t\t'plan' => $_plan,\n\t\t\t\t\t\t'products' => $products,\n\t\t\t\t\t\t'options' => $options,\n\t\t\t\t\t\t'optionsText' => $optionsText\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $plans;\n\t\t}", "public function index()\n {\n $user = \\Auth::guard('api')->user();\n \n // authorize\n if (!$user->can('read', new \\Acelle\\Model\\Plan())) {\n return \\Response::json(array('message' => 'Unauthorized'), 401);\n }\n \n $rows = \\Acelle\\Model\\Plan::getAll()->limit(100)\n ->get();\n \n $plans = $rows->map(function ($plan) {\n return [\n 'uid' => $plan->uid, \n 'name' => $plan->name,\n 'price' => $plan->price,\n 'currency_code' => $plan->currency->code,\n 'frequency_amount' => $plan->frequency_amount,\n 'frequency_unit' => $plan->frequency_unit,\n 'options' => $plan->getOptions(),\n 'status' => $plan->status,\n 'color' => $plan->color,\n 'quota' => $plan->quota,\n 'custom_order' => $plan->custom_order,\n 'created_at' => $plan->created_at,\n 'updated_at' => $plan->updated_at,\n ];\n });\n\n return \\Response::json($plans, 200);\n }", "public function plans() {\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Verify if account is confirmed\n $this->_check_unconfirmed_account();\n \n if ( $this->session->userdata( 'member' ) ) {\n show_404();\n }\n \n // Get all plans\n $get_plans = $this->plans->get_all_plans();\n \n // Get user plan\n $user_plan = $this->plans->get_user_plan($this->user_id);\n \n // Check if user plan expires soon\n $check_plan = $this->plans->check_if_plan_ended($this->user_id);\n \n $expires_soon = 0;\n \n if ( $check_plan ) {\n \n if ( $check_plan < time() + 432000 ) {\n \n $expires_soon = 1;\n \n }\n \n }\n \n $upgrade = '';\n \n if ( $this->session->flashdata('upgrade') ) {\n \n $upgrade = $this->session->flashdata('upgrade');\n \n }\n \n // Load view/user/plans.php file\n $this->body = 'user/plans';\n $this->content = ['plans' => $get_plans, 'user_plan' => $user_plan, 'expires_soon' => $expires_soon, 'upgrade' => $upgrade];\n $this->user_layout();\n \n }", "public function getPaymentplans() {\n return $this->paymentPlans;\n }", "public function getPlanData(){\n\t\t$sql = \"SELECT * FROM plan\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t}", "public function run()\n {\n $plans =\n array(\n array(\n \"product_id\"=>1,\n \"title\" => \"Basic\",\n \"pricing\" => 6850,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 5 User accounts;\n 1 Free system admin account;\n 500 SMS notifications in a month;\n A maximum of 500,000 customer records;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>1,\n \"title\" => \"Standard\",\n \"pricing\" => 11800,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 15 User accounts;\n 1 Free system admin account;\n 1000 SMS notifications in a month;\n A maximum of 1,500,000 customer records;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>1,\n \"title\" => \"Enterprise\",\n \"pricing\" => 21550,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 100 User accounts;\n 1 Free system admin account;\n 5000 SMS notifications in a month;\n A maximum of 500,000 customer records;\n Organization with multiple receptions\n All reports;\",\n \"note\" => \"Extra functionality will be charged at 2% of the Basic\"\n ),\n\n /******************module 2*****************/\n\n array(\n \"product_id\"=>2,\n \"title\" => \"Basic\",\n \"pricing\" => 18000,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 5 User accounts;\n 1 Free system admin account;\n A maximum of 500,000 customer records;\n Free end user android mobile application on 5 devices;\n A maximum of 5 E-Security desk;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>2,\n \"title\" => \"Standard\",\n \"pricing\" => 25800,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 15 User accounts;\n 1 Free system admin account;\n A maximum of 1,500,000 customer records;\n Free end user android mobile application on 15 devices;\n A maximum of 15 E-Security desk;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>2,\n \"title\" => \"Enterprise\",\n \"pricing\" => 50550,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 100 User accounts;\n 1 Free system admin account;\n A maximum of 5,000,000 customer records;\n Free end user android mobile application on 100 devices;\n A maximum of 100 E-Security desk;\n All reports;\",\n \"note\" => \"Extra functionality will be charged at 2% of the Basic\"\n )\n );\n\n DB::table('plans')->delete();\n DB::table('plans')->insert($plans);\n\n }", "function TestPlan_get($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function get_plans($fields = null, $where = array(), $offset = null, $limit = null) {\n\n\t\t/*if($fields){\n\t\t\t$this->db->select($fields);\n\t\t}*/\n $concat_result = \"CONCAT('{', GROUP_CONCAT( CONCAT( CONCAT('\\\"', cs.setting_id, '\\\"'), ':{\\\"', cs.setting_name, '\\\":\\\"', cpm.feature_value, '\\\",', '\\\"setting_id\\\":\\\"',cs.setting_id, '\\\"}') ), '}') AS plan_features \";\n $this->db->select('cb_plans.*, '. $concat_result);\n $this->db->join('cb_plan_meta AS cpm', 'cpm.plan_id = cb_plans.plan_id', 'left');\n $this->db->join('cb_setting AS cs', \"cs.setting_id = cpm.feature_type AND cs.setting_status\", 'left');\n\n $this->db->order_by(\"cb_plans.plan_id\", \"ASC\");\n $this->db->group_by(\"cb_plans.plan_id\");\n\t\treturn $this->db->get_where($this->table, $where, $limit, $offset)->result();\n // echo $this->db->last_query();\n }", "public function get_plans()\n {\n //\n\n \n $user_id = Auth::user()->id;\n\n $listing_code = Session::get('listing_code');\n\n\n $listing = Listing::where('listing_code', $listing_code)->where('agent_id', $user_id)->first();\n\n try {\n //code...\n\n $floor_plans = ListingFloorPLan::where('listing_id', $listing->id)->latest()->get();\n\n } catch (\\Throwable $th) {\n //throw $th;\n\n return $th;\n }\n\n \n\n\n\n return $floor_plans;\n }", "public function getAllPlans()\n {\n try {\n return $this->plan->all();\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return false;\n }\n }", "function TestRun_get_test_plan($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_plan', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function index()\n {\n\n Log::debug(\"INDEX PLAN\");\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->listPlans();\n\n if ($result['message'] == 'Success'){\n\n $plan = $result['plans'];\n\n for ( $i = 0; $i < count($plan->data); $i++) {\n \n // determine length of stripe amount field so we can add a deciaml point and display it correctly as currency\n $amountLen = strlen($plan->data[$i]['amount_decimal']); \n $amount = substr_replace( $plan->data[$i]['amount_decimal'], '.', $amountLen - 2, 0 ); \n\n $planArray[$i]['id'] = $plan->data[$i]['id'];\n $planArray[$i]['product'] = $plan->data[$i]['product'];\n $planArray[$i]['interval'] = $plan->data[$i]['interval'];\n $planArray[$i]['amount_decimal'] = $amount;\n $planArray[$i]['nickname'] = $plan->data[$i]['nickname'];\n \n }\n\n Log::debug($planArray);\n\n $plans = json_decode(json_encode($planArray), FALSE);\n \n return view('stripe.plan.index', ['plans' => $plans ]);\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n\n return redirect()->back();\n\n }\n\n }", "function TestPlan_get_test_runs($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_runs', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function get_plan($planId){\n try {\n $plan = Plan::get($planId, $this->_api_context);\n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $plan->toArray();\n $returnArray['RAWREQUEST']='{id:'.$planId.'}';\n $returnArray['RAWRESPONSE']=$plan->toJSON();\n return $returnArray;\n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }", "public function GetPlanDetails($planID) {\n\t\t$planID = mysqli_real_escape_string($this->db, $planID);\n\t\tif ($this->CheckPlanExist($planID) == '1') {\n\t\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_premium_plans WHERE plan_id = '$planID'\") or die(mysqli_error($this->db));\n\t\t\t$data = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\t\treturn $data;\n\t\t} else {return false;}\n\t}", "public static function data_for_plans_page_returns() {\n return new external_single_structure(array (\n 'userid' => new external_value(PARAM_INT, 'The learning plan user id'),\n 'plans' => new external_multiple_structure(\n plan_exporter::get_read_structure()\n ),\n 'pluginbaseurl' => new external_value(PARAM_LOCALURL, 'Url to the tool_lp plugin folder on this Moodle site'),\n 'navigation' => new external_multiple_structure(\n new external_value(PARAM_RAW, 'HTML for a navigation item that should be on this page')\n ),\n 'canreaduserevidence' => new external_value(PARAM_BOOL, 'Can the current user view the user\\'s evidence'),\n 'canmanageuserplans' => new external_value(PARAM_BOOL, 'Can the current user manage the user\\'s plans'),\n ));\n }", "public function getBillingPlans(User $user, StandardProduct $product);", "public function getPlanById()\n {\n // Arrange\n // Act\n if (! isset($this->plans)) {\n $this->getsAListOfPlans();\n }\n $plans = $this->plans;\n $plan = $plans['data'][0];\n\n $plan = Ezypay::getPlan($plan['id']);\n\n // Assert\n $this->assertNotNull($plan);\n $this->assertEquals($plan['id'], $plan['id']);\n }" ]
[ "0.7138137", "0.6970016", "0.66493464", "0.66306055", "0.6586662", "0.6571491", "0.64354855", "0.640759", "0.63740456", "0.63374037", "0.63153744", "0.62836945", "0.6252519", "0.6251668", "0.6228654", "0.62095773", "0.61987257", "0.61944085", "0.61515206", "0.6140581", "0.61041564", "0.6051426", "0.6047529", "0.6027212", "0.6024845", "0.6024265", "0.60207754", "0.59861046", "0.5967956", "0.59352756" ]
0.7417273
0
/ lookup_category_id_by_name Lookup A TestCase Category ID By Its Name Usage TestCase.lookup_category_id_by_name Parameters ParameterData TypeComments namestringCannot be null or empty string Result category_id
function TestCase_lookup_category_id_by_name($name) { // Create call $call = new xmlrpcmsg('TestCase.lookup_category_id_by_name', array(new xmlrpcval($name, "string"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCase_lookup_category_name_by_id($category_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_name_by_id', array(new xmlrpcval($category_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function find_category_id($category_name)\n {\n $result = array(\n \"status\" => \"\" ,\n \"body\" => array(\n \"category\" => array(\n \"id\" => 0,\n \"category_name\" => \"\"\n ),\n \"count\" => 0\n ),\n \"error\" => array()\n );\n $stmt = $this->db->prepare(\"SELECT * FROM categories WHERE categoryName 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', $category_name)){\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[\"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 \"category\" => array(\n \"id\" => $row[\"id\"],\n \"category_name\" => $row[\"categoryName\"]\n )\n );\n return $result;\n } else {\n $result['status'] = \"No category with that name exists\";\n }\n return $result;\n }", "function findByName($name) {\n \t$str_len = strlen($name);\n \ttrim($name);\n \t$name = str_replace('category', '', strtolower($name));\n \t\n\t\t$conn = Doctrine_Manager::connection();\n\t\t// query for check if location exists\n\t\t$unique_query = \"SELECT id FROM commoditycategory WHERE LOWER(name) LIKE LOWER('%\".$name.\"%') OR LOWER(name) LIKE LOWER('%\".$name.\"%') OR LOWER(name) LIKE LOWER('%\".$name.\"%') \";\n\t\t$result = $conn->fetchOne($unique_query);\n\t\t// debugMessage($unique_query);\n\t\t// debugMessage($result);\n\t\treturn $result; \n\t}", "public function getCategoryId()\r\n{\r\n $query_string = \"SELECT categoryid FROM categories \";\r\n $query_string .= \"WHERE categoryname = :categoryname\";\r\n\r\n return $query_string;\r\n}", "function getCategoryNameById($id = null){\n\t}", "function detect_category_name($name){\n \tglobal $db;\n \t$query = \n ' SELECT cat_categoryName \n FROM categories \n WHERE cat_categoryName = :name'; \t\n $statement = $db->prepare($query);\n $statement->bindValue(':name', $name);\n \t$statement->execute();\n $testValue = $statement->fetch();\n $statement->closeCursor();\n return $testValue;\n}", "public function testCategorySearchByName()\n {\n echo \"\\n testCategorySearchByName...\";\n $url = TestServiceAsReadOnly::$elasticsearchHost.$this->context.\"/category_search\";\n $query = \"{\\\"query\\\": { \".\n \"\\\"term\\\" : { \\\"Name\\\" : \\\"Cell Death\\\" } \". \n \"}}\";\n $response = $this->just_curl_get_data($url, $query);\n $response = $this->handleResponse($response);\n //echo \"\\n testCategorySearchByName response:\".$response.\"---\";\n if(is_null($response))\n {\n echo \"\\n testCategorySearchByName response is empty\";\n $this->assertTrue(false);\n }\n \n $result = json_decode($response);\n if(is_null($result))\n {\n echo \"\\n testCategorySearchByName json is invalid\";\n $this->assertTrue(false);\n }\n \n if(isset($result->hits->total) && $result->hits->total > 0)\n $this->assertTrue(true);\n else \n $this->assertTrue(false);\n \n }", "function getCategoryById($categoryId){\n\n\t\tglobal $conn;\n\n\t\t$query = \"SELECT name FROM Category WHERE id='\". $categoryId . \"'\";\n\n\t\t$result = $conn->query($query);\n\n\t\tif($result->num_rows != 1){\n\t\t\techo \"Error selecting \" . $categoryId . \" details\";\n\t\t}else{\n\t\t\treturn $result->fetch_assoc()['name'];\n\t\t}\n\n\t}", "function get_cat_ID($cat_name)\n {\n }", "function get_category_name($category_id) {\n global $db;\n $query = \n ' SELECT * FROM categories\n WHERE cat_categoryID = :category_id'; \n $statement = $db->prepare($query);\n $statement->bindValue(':category_id', $category_id);\n $statement->execute(); \n $category = $statement->fetch();\n $statement->closeCursor(); \n $category_name = $category['cat_categoryName'];\n return $category_name;\n}", "public function category_search_get($category_name=\"cell_process\")\n {\n $sutil = new CILServiceUtil();\n $query = file_get_contents('php://input', 'r');\n $json = $sutil->searchCategory($category_name, $query);\n $this->response($json);\n }", "private function parseCategoryUrl() {\n $sql = \"SELECT\n id,\n name\n FROM\n categories\";\n if(!$stmt = $this->db->prepare($sql)){return $this->db->error;}\n if(!$stmt->execute()) {return $result->error;}\n $stmt->bind_result($id, $name);\n while($stmt->fetch()) {\n $name = lowerCat($name);\n if($this->cat == $name) {\n $this->catId = $id;\n break;\n }\n }\n $stmt->close();\n if($this->catId !== -1) {\n $this->parsedUrl = '/'.$this->catId.'/'.$this->cat;\n }\n }", "function getCategoryID($name){\r\n $query=\"SELECT id FROM categorias WHERE nombre='$name'\";\r\n $sql= mysqli_query($_SESSION['connection'], $query);\r\n $categoryID= mysqli_fetch_assoc($sql);\r\n return $categoryID['id'];\r\n }", "public function getCategory()\r\n{\r\n $query_string = \"SELECT categoryname, categorydescription FROM categories \";\r\n $query_string .= \"WHERE categoryid = :categoryid\";\r\n\r\n return $query_string;\r\n}", "public function lookupNameFilter($id, $categoryName)\n {\n return Lookup::getInstance()->findById($categoryName, $id)->getName();\n }", "function fs_get_category_id( $cat_name ) {\r\n\t$term = get_term_by( 'name', $cat_name, 'category' );\r\n\treturn $term->term_id;\r\n}", "public function getStoriesByCategory($category_name){\n\n\n }", "function getCategoryNameById($cat_id) {\n $ci = & get_instance();\n $category = $ci->crud->get(ES_PRODUCT_CATEGORIES, array('id' => $cat_id));\n if (count($category) > 0) {\n return $category['name'];\n } else {\n return \"Not available\";\n }\n}", "function getCategoryId($cname) {\n $ci = & get_instance();\n $ci->load->database();\n $sql = \"SELECT * FROM gm_category Where category_name='\" . $cname . \"'\";\n $query = $ci->db->query($sql);\n $result = $query->row();\n // echo $sql; die;\n return $result;\n}", "public static function addCategoryResult ($data)\n\t{\n\t\t$category_id = (int)$data['category_id'];\n\t\t$language_id = (int)$data['language_id'];\n\t\t\n\t\tif ($category_id && $language_id && isset($data['category_name'], $data['description'])) {\n\t\t\t$data['category_name'] = geoString::fromDB($data['category_name']);\n\t\t\t$data['description'] = geoString::fromDB($data['description']);\n\t\t\tself::$_getInfoCache[$category_id][$language_id] = $data;\n\t\t}\n\t}", "public function categoryFindOrSave($name){\n\t\t$table_data=array();\n\t\t$this->db->select('id'); \n\t\t$this->db->where('name',$name);\n\t\t$query = $this->db->get('categories');\n\t\t$res = $query->row();\n\t\tif(!empty($res))\n\t\t{\n\t\t\treturn $res->id;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$table_data=array(\n\t\t\t'created'=>date('Y-m-d h:i:s'),\n\t\t\t'name'=>$name,\n\t\t\t'is_active'=>0,\n\t\t\t);\n $this->db->insert('categories', $table_data);\t\t\t\n\t\t return $this->db->insert_id();\n\t\t}\n\t}", "public function checkCategoryByName($name){\r\n\t \t\t$name = $this->clearEbayTag($name);\r\n\t\t\t$id = Mage::getModel('catalog/category')->loadByAttribute('name',$name); \r\n\t\t\tif ($id){\r\n\t\t\t\treturn $id;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t} \r\n }", "function retrieve_category_id($name) {\n\tglobal $wpdb;\n\t\n\t// Query the term_id of the category needed\n\t$query = \"SELECT wpt.term_id FROM `wp_terms` AS wpt\"\n \t\t. \" JOIN `wp_term_taxonomy` AS wptt\"\n \t\t. \"\t\tON wpt.term_id = wptt.term_id\"\n \t\t. \" WHERE wptt.taxonomy = 'category' AND name = %s\";\n\t$sql = $wpdb->prepare($query, $name);\n\t$id = $wpdb->get_results($sql)[0]->term_id;\n\treturn $id;\n\t\n}", "public function testCategoryNameSorting()\n {\n echo \"\\n testCategoryNameSorting...\";\n $url = TestServiceAsReadOnly::$elasticsearchHost.$this->context.\"/category/cell_process/Name/asc/0/10000\";\n $response = $this->curl_get($url);\n //echo $response;\n $result = json_decode($response);\n if(isset($result->error))\n {\n echo \"\\nError in testCategoryNameSorting\";\n $this->assertTrue(false);\n }\n \n if(isset($result->hits->total) && $result->hits->total > 0)\n $this->assertTrue(true);\n else \n {\n $this->assertTrue(false);\n }\n }", "public function adj_get_brand_category_name($parameter){\n // print_r($parameter);\n $storedProcedure='adj_get_brand_category_name';\n $this -> dbmodel = new DBModel();\n $retrieval = $this -> dbmodel -> call_dbFunction($storedProcedure, $parameter);\n \n $i=0;\n $data=array();\n while($row=mysql_fetch_array($retrieval)){\n $data[$i]['category_id'] = $row['id'];\n $data[$i]['b_category_name'] = $row['b_category_name'];\n $data[$i]['check_val'] = $row['check_val'];\n \n $i++;\n }\n $retrieval = $this -> dbmodel -> make_result($data);\n \n return $retrieval;\n }", "function category($categoryName, $categoryId, $page)\n {\n $sort = Input::get('sortOrder') == null ? \"BestMatch\" : Input::get('sortOrder');\n $checkedInput = $this->checkedChecked(Input::get());\n $breadCramb = $this->model->getBreadCramb($categoryId);\n\n $filterUrl = $this->generateFilterUrl(Input::get());\n $ebayData = $this->model->getProductsByCategory(\n $categoryId, 42, $page, Input::get(), $sort\n );\n $similarCategories = $this->model->getSimilarCategory($categoryId);\n $filterData = $this->model->getFiltersForCategory($categoryId);\n\n $resultsAmount = $ebayData->totalEntries;\n if ($ebayData->totalPages > 100) {\n $totalPages = 100;\n } else {\n $totalPages = $ebayData->totalPages;\n }\n $pagesAvailable = Util::getPaginationList($page, $totalPages);\n $paginationResult = Util::getLinksForPagination($pagesAvailable, \"category\", $categoryName, $page, $this->siteslug, $filterUrl, $categoryId);\n $filtersForTitle = $this->model->getFiltersForTitle($checkedInput);\n $pages = $paginationResult['pages'];\n $pageNext = $paginationResult['pageNext'];\n\n $categoryData['page'] = $page;\n $categoryData['id'] = $categoryId;\n $categoryData['title'] = $categoryName;\n $categoryData['totalResults'] = $resultsAmount;\n\n if ($page == 1) {\n $pageForTitle = '';\n } else {\n $pageForTitle = ' ' . 'עמוד' . ' ' . $page;\n }\n// $this->title = $categoryData['title'] . ' ' . $filtersForTitle . $pageForTitle . '- ' . \"אמזון בעברית\" . ' - ' . 'צי\\'פי קניות ברשת';\n /*if (is_null($sort)) {\n $sortForTitle = '';\n } else {\n $sortForTitle = '-' . $sort;\n }*/\n if (Lang::getLocale() == 'he') {\n $this->shopName = Lang::get('general.amazon');\n } elseif (Lang::getLocale() == 'en') {\n $this->shopName = 'amazon';\n };\n //dd($filtersForTitle);\n $this->title = $categoryData['title'] . ' - ' . $breadCramb['category'] . $filtersForTitle . ' - ' . $categoryData['page'] . ' - ' . $this->shopName;\n $this->description = $categoryData['title'] . ' ' . $filtersForTitle . $pageForTitle . '- ' . \"אמזון בעברית\" . ' - ' . \"שירות לקוחות בעברית,תשלום ללא כ.א בינלאומי,למעלה ממיליארד מוצרים בעברית\";\n //dd($categoryData);\n $productBaseRoute = \"/{$this->siteslug}/product\";\n return view(\"ebay.category\", [\n 'pagination' => $pages,\n 'pageNext' => $pageNext,\n 'categoryData' => $categoryData,\n 'categories' => $this->categories,\n 'productBase' => $productBaseRoute,\n 'siteslug' => $this->siteslug,\n 'ebayData' => $ebayData->products,\n 'filterData' => $filterData,\n 'checkedInput' => $checkedInput,\n 'breadCramb' => $breadCramb,\n 'title' => $this->title,\n 'description' => $this->description,\n 'page' => $page,\n 'similarCategories' => $similarCategories,\n ]);\n }", "function get_category_id( $cat_name ){\n\t$term = get_term_by( 'name', $cat_name, 'category' );\n\treturn $term->term_id;\n}", "function get_category_id( $cat_name ){\n\t$term = get_term_by( 'name', $cat_name, 'category' );\n\treturn $term->term_id;\n}", "function Build_lookup_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function get($category_id);" ]
[ "0.7160179", "0.6867353", "0.6342754", "0.5949888", "0.5941568", "0.58853006", "0.5867522", "0.57617426", "0.56686515", "0.56031376", "0.5567174", "0.55584663", "0.552631", "0.54595035", "0.54547024", "0.5447088", "0.5429014", "0.5405734", "0.54014707", "0.53637546", "0.5362071", "0.53607136", "0.53353465", "0.5331508", "0.5330562", "0.53181916", "0.53162134", "0.53162134", "0.5309239", "0.53088975" ]
0.75927955
0
/ lookup_category_name_by_id Lookup A TestCase Category Name By Its ID Usage TestCase.lookup_category_name_by_id Parameters ParameterData TypeComments category_idintegerCannot be 0 Result name
function TestCase_lookup_category_name_by_id($category_id) { // Create call $call = new xmlrpcmsg('TestCase.lookup_category_name_by_id', array(new xmlrpcval($category_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCase_lookup_category_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getCategoryNameById($id = null){\n\t}", "public function find_category_id($category_name)\n {\n $result = array(\n \"status\" => \"\" ,\n \"body\" => array(\n \"category\" => array(\n \"id\" => 0,\n \"category_name\" => \"\"\n ),\n \"count\" => 0\n ),\n \"error\" => array()\n );\n $stmt = $this->db->prepare(\"SELECT * FROM categories WHERE categoryName 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', $category_name)){\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[\"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 \"category\" => array(\n \"id\" => $row[\"id\"],\n \"category_name\" => $row[\"categoryName\"]\n )\n );\n return $result;\n } else {\n $result['status'] = \"No category with that name exists\";\n }\n return $result;\n }", "function getCategoryNameById($cat_id) {\n $ci = & get_instance();\n $category = $ci->crud->get(ES_PRODUCT_CATEGORIES, array('id' => $cat_id));\n if (count($category) > 0) {\n return $category['name'];\n } else {\n return \"Not available\";\n }\n}", "function getCategoryById($categoryId){\n\n\t\tglobal $conn;\n\n\t\t$query = \"SELECT name FROM Category WHERE id='\". $categoryId . \"'\";\n\n\t\t$result = $conn->query($query);\n\n\t\tif($result->num_rows != 1){\n\t\t\techo \"Error selecting \" . $categoryId . \" details\";\n\t\t}else{\n\t\t\treturn $result->fetch_assoc()['name'];\n\t\t}\n\n\t}", "function get_category_name($category_id) {\n global $db;\n $query = \n ' SELECT * FROM categories\n WHERE cat_categoryID = :category_id'; \n $statement = $db->prepare($query);\n $statement->bindValue(':category_id', $category_id);\n $statement->execute(); \n $category = $statement->fetch();\n $statement->closeCursor(); \n $category_name = $category['cat_categoryName'];\n return $category_name;\n}", "public function testCategorySearchByName()\n {\n echo \"\\n testCategorySearchByName...\";\n $url = TestServiceAsReadOnly::$elasticsearchHost.$this->context.\"/category_search\";\n $query = \"{\\\"query\\\": { \".\n \"\\\"term\\\" : { \\\"Name\\\" : \\\"Cell Death\\\" } \". \n \"}}\";\n $response = $this->just_curl_get_data($url, $query);\n $response = $this->handleResponse($response);\n //echo \"\\n testCategorySearchByName response:\".$response.\"---\";\n if(is_null($response))\n {\n echo \"\\n testCategorySearchByName response is empty\";\n $this->assertTrue(false);\n }\n \n $result = json_decode($response);\n if(is_null($result))\n {\n echo \"\\n testCategorySearchByName json is invalid\";\n $this->assertTrue(false);\n }\n \n if(isset($result->hits->total) && $result->hits->total > 0)\n $this->assertTrue(true);\n else \n $this->assertTrue(false);\n \n }", "function get_catname($cat_id)\n {\n }", "public function getCategoryName() {\n try {\n // connect to db\n $pdo = $this->_db->connect();\n\n // set up SQL\n $sql = \"SELECT categoryName FROM category WHERE categoryId = \" . $_GET[\"categoryId\"];\n $stmt = $pdo->prepare($sql);\n\n // execuet SQL\n $rows = $this->_db->executeSQL($stmt);\n\n return $rows;\n } catch (PDOException $e) {\n throw $e;\n }\n }", "function get_cat_name($cat_id)\n {\n }", "public function lookupNameFilter($id, $categoryName)\n {\n return Lookup::getInstance()->findById($categoryName, $id)->getName();\n }", "public function testCategoryNameSorting()\n {\n echo \"\\n testCategoryNameSorting...\";\n $url = TestServiceAsReadOnly::$elasticsearchHost.$this->context.\"/category/cell_process/Name/asc/0/10000\";\n $response = $this->curl_get($url);\n //echo $response;\n $result = json_decode($response);\n if(isset($result->error))\n {\n echo \"\\nError in testCategoryNameSorting\";\n $this->assertTrue(false);\n }\n \n if(isset($result->hits->total) && $result->hits->total > 0)\n $this->assertTrue(true);\n else \n {\n $this->assertTrue(false);\n }\n }", "function findByName($name) {\n \t$str_len = strlen($name);\n \ttrim($name);\n \t$name = str_replace('category', '', strtolower($name));\n \t\n\t\t$conn = Doctrine_Manager::connection();\n\t\t// query for check if location exists\n\t\t$unique_query = \"SELECT id FROM commoditycategory WHERE LOWER(name) LIKE LOWER('%\".$name.\"%') OR LOWER(name) LIKE LOWER('%\".$name.\"%') OR LOWER(name) LIKE LOWER('%\".$name.\"%') \";\n\t\t$result = $conn->fetchOne($unique_query);\n\t\t// debugMessage($unique_query);\n\t\t// debugMessage($result);\n\t\treturn $result; \n\t}", "function detect_category_name($name){\n \tglobal $db;\n \t$query = \n ' SELECT cat_categoryName \n FROM categories \n WHERE cat_categoryName = :name'; \t\n $statement = $db->prepare($query);\n $statement->bindValue(':name', $name);\n \t$statement->execute();\n $testValue = $statement->fetch();\n $statement->closeCursor();\n return $testValue;\n}", "function getCategoryName($id = null) {\n\t\t// import Category db\n\t\tApp::import('Model','Category');\n\t\t$this->Category = & new Category();\n\t\t# fetch list of active departments \n\t\t$category_name = $this->Category->find('all',array('conditions'=>array('Category.status'=>'1' , 'Category.id'=>$id),'fields'=>array('id','cat_name')));\n\t\treturn $category_name;\n\t}", "private function categoryName($categoryPK) //*\n\t{\n\t$this->errorLogging->logInfo(__CLASS__, __METHOD__, \"Called.\");\n\t\t\n\t$select_array = array(\n\t\"table\" => 'categories', \n\t\"where\" => 'WHERE', \n\t\"columns\" => array(\n\t\"category_name\"),\n\t\"returns\" => array(\n\t\"categoryName\"),\n\t\"conditions\" => array(\n\t\tarray(\n\t\t\"column\" => \"category_pk\",\n\t\t\"operator\" => \"=\",\n\t\t\"value\" => \"$categoryPK\",\n\t\t\"concat\" => \"\")\t\t\n\t),\n\t\"endingQuery\" => \"\"\n\t);\n\t\t\n\t$returnedArray = $this->dbConnection->ConstructSelect($select_array);\n\t$categoryName = $returnedArray[0][\"categoryName\"];\n\t\n\treturn $categoryName;\n\t}", "function getCategoryName($catId) {\n\t\t\n // Function to connect to the DB\n $link = connectToDB();\n\n\t//Retrieve the data\n\t$strSQL = \"SELECT CategoryName FROM FC_Categories where CategoryID=\" . $catId;\n $result = mysql_query($strSQL) or die(mysql_error());\n if ($result) {\n if (mysql_num_rows($result) > 0) {\n $ors = mysql_fetch_array($result);\n $category = $ors['CategoryName'];\n } else {\n $category = \" \";\n }\n }\n mysql_close($link);\n\n return $category;\n}", "function getname($category_id){\n\t\t\t\t\n\n\t\t\t\t$Q = $this->db->query('SELECT name\n\t\t\t\t\t\t\t\tFROM customize_apparel_category\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tWHERE apparel_category_id = '.$category_id.'');\n\t\t\t\tif ($Q-> num_rows() > 0){\n\t\t\t\tforeach ($Q->result_array() as $row){\n\t\t\t\t$type_name= $row['name'];\n\t\t\t\t}\n\t\t\t\treturn $type_name;\n\t\t\t\t}\n\t\t\t\t}", "public function getCategoryId()\r\n{\r\n $query_string = \"SELECT categoryid FROM categories \";\r\n $query_string .= \"WHERE categoryname = :categoryname\";\r\n\r\n return $query_string;\r\n}", "function getName($category_id)\n {\n $query = \"SELECT name FROM categories WHERE active = '1' and categories_id = '$category_id' \";\n $data = $this->db->select($query);\n $result = [];\n if (!empty($data)) {\n $result = $data->fetch_assoc();\n }\n // $cat = new category($result[0],$result[1],$result[2],$result[3],$result[4],$result[5]);\n return $result;\n }", "function getCategoryName($id){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn -> prepare(\"\tSELECT name\n\t\t\t\t\t\t\t\t\t\tFROM `category`\n\t\t\t\t\t\t\t\t\t\tWHERE `id` = ?\");\n\t\t$sth \t-> execute(array($id));\n\n\t\treturn \t$sth;\n\t}", "public function getCategory()\r\n{\r\n $query_string = \"SELECT categoryname, categorydescription FROM categories \";\r\n $query_string .= \"WHERE categoryid = :categoryid\";\r\n\r\n return $query_string;\r\n}", "function get_linkcatname($id = 0)\n {\n }", "function readCategoryName ()\n {\n $query = \"SELECT name FROM \" . $this->table_name . \" WHERE id = ? limit 0,1\";\n $stmt = $this->connection->prepare($query);\n $stmt->bindParam(1, $this->id);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->name = $row['name'];\n }", "function get_category_by_id($category_id)\n\t\t{\n\t\t\tif(!$category_id)\n\t\t\t\treturn \"\";\n\t\t\t$query = \" SELECT id,name,name_display,is_comment, alias, display_tags,display_title,display_sharing,display_comment,display_category,display_created_time,display_related,updated_time\n\t\t\t\t\t\tFROM \".$this->table_category .\" \n\t\t\t\t\t\tWHERE id = $category_id \";\n\t\t\tglobal $db;\n\t\t\t$sql = $db->query($query);\n\t\t\t$result = $db->getObject();\n\t\t\treturn $result;\n\t\t}", "function cah_news_get_category_name($cat_ID) {\r\n $response = cah_news_get_rest_body('categories/' . $cat_ID);\r\n if ($response) {\r\n return $response->name;\r\n }\r\n}", "function cat_id_to_name($id) {\r\n\tforeach((array)(get_categories()) as $category) {\r\n \tif ($id == $category->cat_ID) { return $category->cat_name; break; }\r\n\t}\r\n}", "function get_cat_ID($cat_name)\n {\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 }", "function getCategoryName($categoryId)\n {\n // include the name retriever class and retrieve the category name\n require_once(\"class_libraries/NameRetriever.php\");\n $nameRetriever = new NameRetriever(\"category_id\");\n \n // retrieve the name\n $categoryName = $nameRetriever -> getName($categoryId);\n \n return $categoryName;\n }" ]
[ "0.71113163", "0.6772378", "0.6366587", "0.6259872", "0.6182745", "0.6145261", "0.6110528", "0.602032", "0.59891933", "0.59827125", "0.59341234", "0.59138685", "0.5904187", "0.5866459", "0.58642334", "0.58339703", "0.57989204", "0.57778704", "0.5769718", "0.5725404", "0.57159233", "0.5689514", "0.5662505", "0.5597384", "0.5597266", "0.55817324", "0.556388", "0.5545542", "0.55362093", "0.55258566" ]
0.7798885
0
/ lookup_priority_id_by_name Lookup A TestCase Priority ID By Its Name Usage TestCase.lookup_priority_id_by_name Parameters ParameterData TypeComments namestringCannot be null or empty string Result priority_id
function TestCase_lookup_priority_id_by_name($name) { // Create call $call = new xmlrpcmsg('TestCase.lookup_priority_id_by_name', array(new xmlrpcval($name, "string"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCase_lookup_priority_name_by_id($priority_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_priority_name_by_id', array(new xmlrpcval($priority_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_category_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Product_lookup_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('Product.lookup_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Build_lookup_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function GetPriority($priorityId)\n\t{\n\t\t$result = $this->sendRequest(\"GetPriority\", array(\"PriorityId\"=>$priorityId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function TestPlan_lookup_type_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function get( $id=-1 )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n \r\n if ( $id != \"\" )\r\n {\r\n $db->array_query( $priority_array, \"SELECT * FROM eZBug_Priority WHERE ID='$id'\" );\r\n if ( count( $priority_array ) > 1 )\r\n {\r\n die( \"Error: Priority's with the same ID was found in the database. This shouldent happen.\" );\r\n }\r\n else if ( count( $priority_array ) == 1 )\r\n {\r\n $this->ID = $priority_array[0][ $db->fieldName( \"ID\" ) ];\r\n $this->Name = $priority_array[0][ $db->fieldName( \"Name\" ) ];\r\n }\r\n }\r\n }", "function get( $id )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n if ( $id != \"\" )\r\n {\r\n $db->array_query( $priority_array, \"SELECT * FROM eZTodo_Priority WHERE ID='$id'\" );\r\n if ( count( $priority_array ) > 1 )\r\n {\r\n die( \"Error: Priority's with the same ID was found in the database. This shouldent happen.\" );\r\n }\r\n else if ( count( $priority_array ) == 1 )\r\n {\r\n $this->ID = $priority_array[0][$db->fieldName( \"ID\" )];\r\n $this->Name = $priority_array[0][$db->fieldName( \"Name\" )];\r\n\r\n $ret = true;\r\n }\r\n }\r\n return $ret;\r\n }", "private function findPriority(): void {\n $priority = $this->get(\"x_priority\");\n\n $priority = match ((int)\"$priority\") {\n IMAP::MESSAGE_PRIORITY_HIGHEST => IMAP::MESSAGE_PRIORITY_HIGHEST,\n IMAP::MESSAGE_PRIORITY_HIGH => IMAP::MESSAGE_PRIORITY_HIGH,\n IMAP::MESSAGE_PRIORITY_NORMAL => IMAP::MESSAGE_PRIORITY_NORMAL,\n IMAP::MESSAGE_PRIORITY_LOW => IMAP::MESSAGE_PRIORITY_LOW,\n IMAP::MESSAGE_PRIORITY_LOWEST => IMAP::MESSAGE_PRIORITY_LOWEST,\n default => IMAP::MESSAGE_PRIORITY_UNKNOWN,\n };\n\n $this->set(\"priority\", $priority);\n }", "public function getPriority(int $priorityId): Priority\n {\n $ret = $this->exec(\"priority/$priorityId\", null);\n\n $this->log->info('Result='.$ret);\n\n return $this->json_mapper->map(\n json_decode($ret),\n new Priority()\n );\n }", "function TestRun_lookup_environment_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.lookup_environment_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Product_lookup_name_by_id($product_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Product.lookup_name_by_id', array(new xmlrpcval($product_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function priority($demand_id, $sort)\n {\n }", "public function getPriority() : int;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function TestPlan_lookup_type_name_by_id($type_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_name_by_id', array(new xmlrpcval($type_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_lookup_status_name_by_id($case_run_status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_name_by_id', array(new xmlrpcval($case_run_status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getPriorityid()\n {\n return $this->priorityid;\n }", "public function getPriority();", "public function getPriority();", "public function getPriority();", "public function getPriority();" ]
[ "0.74880236", "0.5550067", "0.55420035", "0.5514388", "0.550246", "0.5467389", "0.5428711", "0.5361302", "0.53130263", "0.5226204", "0.5208256", "0.5127456", "0.5092752", "0.508328", "0.5060286", "0.50571", "0.50480455", "0.50480455", "0.50480455", "0.5046017", "0.5045915", "0.5045915", "0.5045915", "0.50083613", "0.49809268", "0.4945623", "0.49364886", "0.49364886", "0.49364886", "0.49364886" ]
0.7493331
0
/ lookup_priority_name_by_id Lookup A TestCase Priority Name By Its ID Usage TestCase.lookup_priority_name_by_id Parameters ParameterData TypeComments priority_idintegerCannot be 0 Result name
function TestCase_lookup_priority_name_by_id($priority_id) { // Create call $call = new xmlrpcmsg('TestCase.lookup_priority_name_by_id', array(new xmlrpcval($priority_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCase_lookup_priority_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_priority_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_lookup_status_name_by_id($case_run_status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_name_by_id', array(new xmlrpcval($case_run_status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_lookup_type_name_by_id($type_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_name_by_id', array(new xmlrpcval($type_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_category_name_by_id($category_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_name_by_id', array(new xmlrpcval($category_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_status_name_by_id($status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_name_by_id', array(new xmlrpcval($status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function get( $id=-1 )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n \r\n if ( $id != \"\" )\r\n {\r\n $db->array_query( $priority_array, \"SELECT * FROM eZBug_Priority WHERE ID='$id'\" );\r\n if ( count( $priority_array ) > 1 )\r\n {\r\n die( \"Error: Priority's with the same ID was found in the database. This shouldent happen.\" );\r\n }\r\n else if ( count( $priority_array ) == 1 )\r\n {\r\n $this->ID = $priority_array[0][ $db->fieldName( \"ID\" ) ];\r\n $this->Name = $priority_array[0][ $db->fieldName( \"Name\" ) ];\r\n }\r\n }\r\n }", "function Product_lookup_name_by_id($product_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Product.lookup_name_by_id', array(new xmlrpcval($product_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "public function getPriority() : int;", "function GetPriority($priorityId)\n\t{\n\t\t$result = $this->sendRequest(\"GetPriority\", array(\"PriorityId\"=>$priorityId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getPriority();", "public function getPriority();", "public function getPriority();", "public function getPriority();", "public function getPriority();", "public function getPriority();", "public function getPriority();", "function TestRun_lookup_environment_name_by_id($environment_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.lookup_environment_name_by_id', array(new xmlrpcval($environment_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function get_by_priority_id($id) {\n\t\treturn query(\n\t\t\t\"SELECT * \"\n\t\t\t. \"FROM db_Clients \"\n\t\t\t. \"INNER JOIN ((SELECT CaseTypeID, `Description` AS Priority \"\n\t\t\t\t. \"FROM db_CaseTypes \"\n\t\t\t\t. \"WHERE Deprecated=0) AS t1) \"\n\t\t\t. \"ON t1.CaseTypeID=db_Clients.CaseTypeID \"\n\t\t\t. \"WHERE db_Clients.CaseTypeID=?\", $id); \n\t}", "function get( $id )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n if ( $id != \"\" )\r\n {\r\n $db->array_query( $priority_array, \"SELECT * FROM eZTodo_Priority WHERE ID='$id'\" );\r\n if ( count( $priority_array ) > 1 )\r\n {\r\n die( \"Error: Priority's with the same ID was found in the database. This shouldent happen.\" );\r\n }\r\n else if ( count( $priority_array ) == 1 )\r\n {\r\n $this->ID = $priority_array[0][$db->fieldName( \"ID\" )];\r\n $this->Name = $priority_array[0][$db->fieldName( \"Name\" )];\r\n\r\n $ret = true;\r\n }\r\n }\r\n return $ret;\r\n }", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}", "public function getPriority() {}" ]
[ "0.7091863", "0.5818098", "0.579789", "0.5691586", "0.5626334", "0.554008", "0.551978", "0.5509931", "0.5509931", "0.5509931", "0.550792", "0.5507821", "0.5507821", "0.5507821", "0.55009854", "0.5491311", "0.5397507", "0.5397507", "0.5397507", "0.5397507", "0.5397507", "0.5397507", "0.5397507", "0.5393807", "0.5382826", "0.53702027", "0.5360097", "0.5360097", "0.5360097", "0.5360097" ]
0.8019638
0
/ lookup_status_id_by_name Lookup A TestCase Status ID By Its Name Usage TestCase.lookup_status_id_by_name Parameters ParameterData TypeComments namestringCannot be null or empty string Result status_id
function TestCase_lookup_status_id_by_name($name) { // Create call $call = new xmlrpcmsg('TestCase.lookup_status_id_by_name', array(new xmlrpcval($name, "string"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCaseRun_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_lookup_status_name_by_id($case_run_status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_name_by_id', array(new xmlrpcval($case_run_status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_status_name_by_id($status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_name_by_id', array(new xmlrpcval($status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_lookup_environment_name_by_id($environment_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.lookup_environment_name_by_id', array(new xmlrpcval($environment_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function lookupStatus($judge_id){\n\t$data = M('user');\n\tif((int)$judge_id>=1){\n\t\t$condition['id'] = (int)$judge_id;\n\t\t$judge = $data->where($condition)->find();\n\t\treturn $judge['reserved_1'];\n\t}\n\telse return false;\n}", "function TestRun_lookup_environment_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.lookup_environment_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function testStatusInvalidId()\n {\n\n }", "function TestPlan_lookup_type_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_lookup_type_name_by_id($type_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_name_by_id', array(new xmlrpcval($type_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function _lookupStatus($a_obj_id, $a_user_id)\r\n\t{\r\n\t\tglobal $ilDB;\r\n\r\n\t\t$set = $ilDB->queryF(\"SELECT status FROM il_wiki_contributor \".\r\n\t\t\t\"WHERE wiki_id = %s and user_id = %s\",\r\n\t\t\tarray(\"integer\", \"integer\"),\r\n\t\t\tarray($a_obj_id, $a_user_id));\r\n\t\tif($row = $ilDB->fetchAssoc($set))\r\n\t\t{\r\n\t\t\treturn $row[\"status\"];\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function TestCase_lookup_priority_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_priority_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Build_lookup_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getStatusIdByName($ticket_status_beschrijving){\n \n if ($this->checkText($ticket_status_beschrijving, $this->status_name_len) ){\n\n $query = \"SELECT `\".$this->ticket_status_id.\"`\".\n \"FROM `\".$this->ticket_status.\"`\".\n \"WHERE `\".$this->ticket_status_beschrijving .\"` = '\". $this->dbInString($ticket_status_beschrijving) . \"'\";\n\n $this->dbquery($query);\n if ( $this->checkDbErrors($query) ){\n\n return FALSE;\n }\n \n $status_array = $this->dbFetchArray();\n if ( $this->checkDbErrors($query) ){\n\n return FALSE;\n }\n } else {\n return FALSE;\n }\n \n return $status_array[$this->ticket_status_id];\n }", "function get_statusname($ret_num){\r\n\tglobal $gp_arr_status;\t\r\n\r\n\tif(!empty($gp_arr_status)){\r\n\t\treturn $gp_arr_status[$ret_num];\r\n\t}else{\r\n\t\tglobal $db_shared;\r\n\t\t$status_query\t= \"SELECT * FROM $db_shared.catalogue_status WHERE id=$ret_num LIMIT 1\";\r\n\t\t$status_result\t= mysql_query($status_query);\r\n\t\t$status_array\t= mysql_fetch_array($status_result);\t\r\n\t\treturn $status_array['status'];\r\n\t}\r\n}", "public function lead_status_unique_edit($l_t_name, $l_t_id)\n {\n \n $result = $this->db->query(\"call lead_status_unique_edit('\".$l_t_name.\"', '\".$l_t_id.\"')\")->row();\n save_query_in_log();\n \n return $result;\n }", "function TestCase_lookup_category_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getTransactionStatusName($id){\n\t\t$statusArr\t= array(1=>\"Requested\", 2=>\"Recharged\");\n\t\t$statusName\t= $statusArr[$id];\n\n\t\treturn $statusName;\n\n\t}", "public function run ()\n {\n $lookupType = array(\n [\n 'id' => 1,\n 'name' => \"Loan status\",\n 'description' => \"Different status of loan\",\n ],\n [\n 'id' => 2,\n 'name' => \"Payment Status\",\n 'description' => \"Different payment status\",\n ],\n );\n\n $lookupValue = array(\n [\n 'id' => 1,\n 'name' => \"NEW\",\n 'description' => \"NEW\",\n 'value' => 1,\n 'lookup_type_id' => 1,\n ],\n [\n 'id' => 2,\n 'name' => \"APPROVED\",\n 'description' => \"APPROVED\",\n 'value' => 1,\n 'lookup_type_id' => 1,\n ],\n [\n 'id' => 3,\n 'name' => \"CLOSED\",\n 'description' => \"CLOSED\",\n 'value' => 1,\n 'lookup_type_id' => 1,\n ],\n [\n 'id' => 4,\n 'name' => \"REJECTED\",\n 'description' => \"REJECTED\",\n 'value' => 1,\n 'lookup_type_id' => 1,\n ],\n [\n 'id' => 5,\n 'name' => \"PENDING\",\n 'description' => \"PENDING\",\n 'value' => 1,\n 'lookup_type_id' => 2,\n ],\n [\n 'id' => 6,\n 'name' => \"PAID\",\n 'description' => \"PAID\",\n 'value' => 1,\n 'lookup_type_id' => 2,\n ],\n [\n 'id' => 7,\n 'name' => \"MISSED\",\n 'description' => \"MISSED\",\n 'value' => 1,\n 'lookup_type_id' => 2,\n ],\n );\n\n LookupType::insert($lookupType);\n LookupValue::insert($lookupValue);\n }", "function findID($d) {\n\t\t$url = \"https://inpho.cogs.indiana.edu/thinker.json\";\n\t\t$data = @file_get_contents($url,o,null,null);\n\t\t$json = json_decode($data);\n\t\t$results = $json->responseData->results;\n\t\tforeach($results as $value) {\n\t\t\tif (strcasecmp($value->label,$d)==0) { \n\t\t\t\t$id = $value->ID;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//return value of $id when string matches\n\t\treturn $id;\n\t}", "function TestCase_lookup_priority_name_by_id($priority_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_priority_name_by_id', array(new xmlrpcval($priority_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function execute_test($run_id, $case_id, $test_id)\n{\n\t// triggering an external command line tool or API. This function\n\t// is expected to return a valid TestRail status ID. We just\n\t// generate a random status ID as a placeholder.\n\t\n\t\n\t$statuses = array(1, 2, 3, 4, 5);\n\t$status_id = $statuses[rand(0, count($statuses) - 1)];\n\tif ($status_id == 3) // Untested?\n\t{\n\t\treturn null;\t\n\t}\n\telse \n\t{\n\t\treturn $status_id;\n\t}\n}", "function getListID($requestStatus) {\n global $client;\n $boardsArray = json_decode(json_encode($client->getCurrentUserBoards()), true); //Get the board and convert to an array from stdClass\n $boardID = strval($boardsArray[0][\"id\"]);\n $listsArray = json_decode(json_encode($client->getBoardLists($boardID)), true);\n foreach($listsArray as $data) {\n if ($data[\"name\"] == $requestStatus) {\n return $data[\"id\"];\n }\n }\n}", "function test_getIdByName() {\r\n\t\t$myName = \"moderator\";\r\n $myId = MemberClassesDB::getIdByName($myName);\r\n\t\t$this->assertEqual($myId, \"3\",\r\n\t\t\t\t\"Should return 3 for name moderator but returned \".$myId);\r\n\t}", "function Build_lookup_name_by_id($build_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_name_by_id', array(new xmlrpcval($build_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getStatusID($Status){\r\n\t\tif(empty($Status)){return FALSE;}\r\n\t\t$Query = $this->db->query(\"SELECT `StatusID` FROM `set_status` WHERE FIND_IN_SET('\".$Status.\"',StatusName) LIMIT 1\");\t\r\n\t\tif($Query->num_rows()>0){\r\n\t\t\treturn $Query->row()->StatusID;\r\n\t\t}else{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}", "function SelectByIdFrom_UserDetails($dbhandle, $id, &$user)\n{\n $logger = LoggerSingleton::GetInstance();\t\n $logger->LogInfo(\"SelectByIdFrom_UserDetails : Enter ($id)\");\n\n global $UserDetailsTable_Id;\n global $UserDetailsTable_Name;\n global $UserDetailsTable_UserName;\n \n // select\n $query = \"SELECT * FROM $UserDetailsTable_Name\n WHERE $UserDetailsTable_Id = $id\";\n\n // execte\n $result = $dbhandle->query($query);\n\n if(FALSE == $result)\n {\n $logger->LogError(\"SelectByIdFrom_UserDetails : No records with id - $id found\");\n $status = false;\n }\n\n $num_rows = $result->num_rows;\n if($num_rows > 0)\n {\n while($row = $result->fetch_assoc())\n {\n $user = $row[\"$UserDetailsTable_UserName\"];\n }\n\n $status = true;\n } \n else\n {\n $logger->LogError(\"SelectByIdFrom_UserDetails : No records found\");\n $status = false;\n }\n\n return $status;\n}", "function lookupJudgeById($judge_id){\n\t$data = M('user');\n\tif((int)$judge_id == -1){\n\t\treturn C('STR_EVENTLIST_NOJUDGE');\n\t}\n\telseif((int)$judge_id>=1){\n\t\t$condition['id'] = (int)$judge_id;\n\t\t$judge = $data->where($condition)->find();\n\t\treturn $judge['fullname'];\n\t}\n\telse\n\t\treturn false;\n}", "public function lead_status_unique($l_s_name)\n {\n \n $result = $this->db->query(\"call lead_status_unique('\".$l_s_name.\"')\")->row();\n save_query_in_log();\n \n return $result;\n }", "public function status($id);", "public function testParse_Named()\n {\n $this->assertEquals('SELECT * FROM test WHERE status=\"ACTIVE\"', $this->conn->parse('SELECT * FROM test WHERE status=:status', array('status'=>'ACTIVE')));\n }" ]
[ "0.72671807", "0.69712067", "0.68878657", "0.5651208", "0.5644942", "0.5605518", "0.54085344", "0.53071254", "0.52922577", "0.52910477", "0.5279066", "0.5242971", "0.51980835", "0.51956415", "0.5146298", "0.51402485", "0.5137758", "0.51347125", "0.5112385", "0.50892514", "0.5082959", "0.50772595", "0.5064909", "0.5035299", "0.49717116", "0.49555266", "0.4928031", "0.4902903", "0.48932007", "0.48912364" ]
0.7244214
1
/ lookup_status_name_by_id Lookup A TestCase Status Name By Its ID Usage TestCase.lookup_status_name_by_id Parameters ParameterData TypeComments status_idintegerCannot be 0 Result name
function TestCase_lookup_status_name_by_id($status_id) { // Create call $call = new xmlrpcmsg('TestCase.lookup_status_name_by_id', array(new xmlrpcval($status_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCaseRun_lookup_status_name_by_id($case_run_status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_name_by_id', array(new xmlrpcval($case_run_status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_lookup_environment_name_by_id($environment_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.lookup_environment_name_by_id', array(new xmlrpcval($environment_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getTransactionStatusName($id){\n\t\t$statusArr\t= array(1=>\"Requested\", 2=>\"Recharged\");\n\t\t$statusName\t= $statusArr[$id];\n\n\t\treturn $statusName;\n\n\t}", "function TestPlan_lookup_type_name_by_id($type_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_name_by_id', array(new xmlrpcval($type_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function lookupStatus($judge_id){\n\t$data = M('user');\n\tif((int)$judge_id>=1){\n\t\t$condition['id'] = (int)$judge_id;\n\t\t$judge = $data->where($condition)->find();\n\t\treturn $judge['reserved_1'];\n\t}\n\telse return false;\n}", "function _lookupStatus($a_obj_id, $a_user_id)\r\n\t{\r\n\t\tglobal $ilDB;\r\n\r\n\t\t$set = $ilDB->queryF(\"SELECT status FROM il_wiki_contributor \".\r\n\t\t\t\"WHERE wiki_id = %s and user_id = %s\",\r\n\t\t\tarray(\"integer\", \"integer\"),\r\n\t\t\tarray($a_obj_id, $a_user_id));\r\n\t\tif($row = $ilDB->fetchAssoc($set))\r\n\t\t{\r\n\t\t\treturn $row[\"status\"];\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "protected static function get_internal_status_name_from_id ($id) \n\t{\n\t\t$query = tep_db_query(\"SELECT orders_status_name FROM \". TABLE_ORDERS_STATUS . \" WHERE orders_status_id = \". intval($id));\n\t\t$status = tep_db_fetch_array($query);\n\t\treturn $status['orders_status_name'];\n\t}", "function TestCase_lookup_priority_name_by_id($priority_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_priority_name_by_id', array(new xmlrpcval($priority_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function ostGetOrderStatusName( $statusID )\r\n{\r\n\tstatic $statuses;\r\n\tif(!$statuses)$statuses = array();\r\n\tif(isset($statuses[$statusID]))return $statuses[$statusID];\r\n\r\n\t$q = db_phquery('SELECT * FROM ?#ORDER_STATUSES_TABLE');\r\n\twhile($row = db_fetch_row( $q )){\r\n\t\tLanguagesManager::ml_fillFields(ORDER_STATUSES_TABLE, $row);\r\n\t\tif ($row['statusID'] == ostGetCanceledStatusId() ){\r\n\t\t\t$row[\"status_name\"] = translate(\"ordr_status_cancelled\");\r\n\t\t}\r\n\t\t$statuses[$row['statusID']] = $row[\"status_name\"];\r\n\t}\r\n\treturn $statuses[$statusID];\r\n}", "public static function getStatusDesc($status_id)\n {\n\t switch ($status_id)\n\t {\n\t\t case RowManager_RegistrationManager::STATUS_REGISTERED:\n\t\t \treturn 'Registered';\n\t\t \tbreak;\n\t\t case RowManager_RegistrationManager::STATUS_CANCELLED:\n\t\t \treturn 'Cancelled';\n\t\t \tbreak;\n\t\t case RowManager_RegistrationManager::STATUS_INCOMPLETE:\n\t\t \treturn 'Incomplete';\n\t\t \tbreak;\n\t\t case RowManager_RegistrationManager::STATUS_UNASSIGNED:\n\t\t \treturn 'Unassigned';\n\t\t \tbreak;\n\t\t default:\n\t\t \tbreak;\n \t}\n \t}", "function get_statusname($ret_num){\r\n\tglobal $gp_arr_status;\t\r\n\r\n\tif(!empty($gp_arr_status)){\r\n\t\treturn $gp_arr_status[$ret_num];\r\n\t}else{\r\n\t\tglobal $db_shared;\r\n\t\t$status_query\t= \"SELECT * FROM $db_shared.catalogue_status WHERE id=$ret_num LIMIT 1\";\r\n\t\t$status_result\t= mysql_query($status_query);\r\n\t\t$status_array\t= mysql_fetch_array($status_result);\t\r\n\t\treturn $status_array['status'];\r\n\t}\r\n}", "function Build_lookup_name_by_id($build_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_name_by_id', array(new xmlrpcval($build_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_category_name_by_id($category_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_name_by_id', array(new xmlrpcval($category_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getFMFStatusName($fmfId, $lang_id=1){\n if(!is_numeric($fmfId) or !is_numeric($lang_id)){\n return false;\n }\n $rs = tep_db_query('SELECT fmf_status_name FROM ' . TABLE_FMF_PAYPAL_STATUS . ' WHERE paypal_fmf_status_id = ' . $fmfId . ' AND language_id = ' . $lang_id . ' limit 1');\n if (tep_db_num_rows($rs) > 0){\n $row = tep_db_fetch_array($rs);\n return $row['fmf_status_name'];\n }\n // if where still here try land_id 1 if not tried\n if($lang_id != 1){\n $rs = tep_db_query('SELECT fmf_status_name FROM ' . TABLE_FMF_PAYPAL_STATUS . ' WHERE paypal_fmf_status_id = ' . $fmfId . ' AND language_id = 1 limit 1');\n if (tep_db_num_rows($rs) > 0){\n $row = tep_db_fetch_array($rs);\n return $row['fmf_status_name'];\n }\n }\n // still nada\n return false;\n }", "public function getStatusNameById($ticket_status_id){\n\n if ($this->checkId($ticket_status_id, $this->ticket_status_id)){\n\n $query = \"SELECT `\".$this->ticket_status_beschrijving.\"`\".\n \"FROM `\".$this->ticket_status.\"`\".\n \"WHERE `\".$this->ticket_status_id .\"` = '\". $ticket_status_id . \"'\";\n $this->dbquery($query);\n if ( $this->checkDbErrors($query) ){\n\n return FALSE;\n }\n $status_array = $this->dbFetchArray();\n if ( $this->checkDbErrors($query) ){\n\n return FALSE;\n }\n\n } else {\n return FALSE;\n }\n return ($status_array[$this->ticket_status_beschrijving]);\n }", "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}", "function getStatusName() {\n\t\treturn $this->data_array['status_name'];\n\t}", "public function testStatusInvalidId()\n {\n\n }", "function lookupJudgeById($judge_id){\n\t$data = M('user');\n\tif((int)$judge_id == -1){\n\t\treturn C('STR_EVENTLIST_NOJUDGE');\n\t}\n\telseif((int)$judge_id>=1){\n\t\t$condition['id'] = (int)$judge_id;\n\t\t$judge = $data->where($condition)->find();\n\t\treturn $judge['fullname'];\n\t}\n\telse\n\t\treturn false;\n}", "public function status($id);", "function getOrderStatusName($orders_status_id) {\n\t\t$sel_ord_query = tep_db_query(\"SELECT orders_status_name FROM \" . TABLE_ORDERS_STATUS . \" WHERE orders_status_id = '\".$orders_status_id.\"'\");\n\t\t$rst_arr = tep_db_fetch_array($sel_ord_query);\n\t\treturn $rst_arr['orders_status_name'];\n\t}", "public static function getNameById($id_state)\n {\n }", "abstract protected function getStatusesInfos();", "public function lookupVanityDescription( $ulID ){ return $this->APICall( array('lookupVanityDescription' => $ulID), \"Failed to get the vanity name for \" . $ulID ); }", "function getCustomStatusName() {\n\t\t$custom_status_id = $this->ArtifactType->getCustomStatusField();\n\t\tif ($custom_status_id) {\n\t\t\t$result = db_query_params ('SELECT element_name FROM artifact_extra_field_elements aefe, artifact_extra_field_data aefd\n\t\t\t\t\t\t\t\t\t\tWHERE artifact_id=$1 AND aefd.extra_field_id=$2 AND CAST(aefd.field_data AS INTEGER)=aefe.element_id',\n\t\t\t\t\t\t\t\tarray ($this->getID(), $custom_status_id)) ;\n\t\t\tif ($result) {\n\t\t\t\treturn db_result($result, 0, 'element_name');\n\t\t\t}\n\t\t}\n\t\treturn $this->data_array['status_name'];\n\t}", "public function findName($strId, &$outStrName) {\n $outStrName = $this->getNames($strId);\n if (empty($outStrName)) {\n return ResultEnum::REPLY_NONE;\n }\n return ResultEnum::REPLY_OK_ONE;\n }", "function code_CodeStatus($bdd, $CodeID)\n\t{\n\t\techo_debug('CODE code_CodeStatus | codeID='.$CodeID.'<br>');\n\t\ttry\n\t\t{ \n\t\t\t$response = $bdd->prepare('SELECT status FROM code WHERE id=:ci');\n\t\t\t$response->execute(array(\n\t\t\t\t'ci' => $CodeID\n\t\t\t));\n\t\t}\t\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tdie('Error : '.$e->getMessage());\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$nb_rows = $response->rowCount();\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t$nb_rows = 0;\n\t\t}\n\t\t\n\t\t$codeStatus=\"\";\n\t\tif($nb_rows > 0)\n\t\t{\n\t\t\twhile ($data = $response->fetch())\n\t\t\t{\n\t\t\t\t$codeStatus = $data['status']; \t\n\t\t\t}\n\t\t}\n\t\techo_debug('CODE code_CodeStatus | return codeStatus='.$codeStatus.'<br>');\n\t\treturn $codeStatus;\n\t}", "public function testGetStatusMessageWhenNotProvided()\n\t{\n\t\t// to test all the codes we have\n\t\t\n\t\t$fixture = new Apache_Solr_HttpTransport_Response(null, null, null, null, null);\n\t\t$this->assertEquals(\"Communication Error\", $fixture->getStatusMessage(), 'Did not get correct default status message for status code 0');\n\t\t\n\t\t$fixture = new Apache_Solr_HttpTransport_Response(200, null, null, null, null);\n\t\t$this->assertEquals(\"OK\", $fixture->getStatusMessage(), 'Did not get correct default status message for status code 200');\n\t\t\n\t\t$fixture = new Apache_Solr_HttpTransport_Response(400, null, null, null, null);\n\t\t$this->assertEquals(\"Bad Request\", $fixture->getStatusMessage(), 'Did not get correct default status message for status code 400');\n\t\t\n\t\t$fixture = new Apache_Solr_HttpTransport_Response(404, null, null, null, null);\n\t\t$this->assertEquals(\"Not Found\", $fixture->getStatusMessage(), 'Did not get correct default status message for status code 404');\n\t}" ]
[ "0.76614773", "0.698635", "0.6968066", "0.6022031", "0.6020799", "0.58990073", "0.5832179", "0.5750568", "0.57501787", "0.56781036", "0.5666294", "0.5635948", "0.5621425", "0.5470583", "0.5439635", "0.5389677", "0.53892606", "0.538207", "0.5377719", "0.5342773", "0.5320948", "0.5310657", "0.52791715", "0.52745545", "0.5228035", "0.52009004", "0.51862043", "0.5129514", "0.511219", "0.5107945" ]
0.760871
1
/ link_plan Link A TestPlan To An Existing TestCase Usage TestCase.link_plan Parameters ParameterData Type case_idinteger plan_idinteger Result Array [0] Array [author_id] [name] [default_product_version] [plan_id] [product_id] [creation_date] [type_id] [isactive] [1] Array ...
function TestCase_link_plan($case_id, $plan_id) { // Create call $call = new xmlrpcmsg('TestCase.link_plan', array(new xmlrpcval($case_id, "int"), new xmlrpcval($plan_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_plan($parameters){\n try {\n $planList = Plan::all(array_filter($parameters), $this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLANS'] = $planList->toArray();\n $returnArray['RAWREQUEST']= json_encode($parameters);\n $returnArray['RAWRESPONSE']=$planList->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n } \n }", "public static function data_for_plan_page_parameters() {\n $planid = new external_value(\n PARAM_INT,\n 'The plan id',\n VALUE_REQUIRED\n );\n $params = array('planid' => $planid);\n return new external_function_parameters($params);\n }", "public function create_plan($requestData){\n \n // ### Create Plan\n try {\n // Create a new instance of Plan object\n $plan = new Plan();\n if(isset($requestData['plan'])){\n $this->setArrayToMethods($this->checkEmptyObject($requestData['plan']), $plan);\n } \n // # Payment definitions for this billing plan.\n $paymentDefinition = new PaymentDefinition(); \n $paymentDefinition\n ->setAmount(new Currency($requestData['paymentDefinition']['Amount']));\n array_pop($requestData['paymentDefinition']);\n if(!empty($this->checkEmptyObject((array)$paymentDefinition))){\n $this->setArrayToMethods(array_filter($requestData['paymentDefinition']), $paymentDefinition); \n }\n \n // Charge Models\n $chargeModel = new ChargeModel();\n $chargeModel->setAmount(new Currency($requestData['chargeModel']['Amount']));\n array_pop($requestData['chargeModel']);\n if(!empty($this->checkEmptyObject((array)$chargeModel))){\n $this->setArrayToMethods(array_filter($requestData['chargeModel']), $chargeModel); \n $paymentDefinition->setChargeModels(array($chargeModel));\n }\n \n $merchantPreferences = new MerchantPreferences();\n $baseUrl = $requestData['baseUrl'];\n\n $merchantPreferences->setReturnUrl($baseUrl.$requestData['ReturnUrl'])\n ->setCancelUrl($baseUrl.$requestData['CancelUrl']);\n if(!empty($this->checkEmptyObject($requestData['merchant_preferences']['SetupFee']))){\n $merchantPreferences->setSetupFee(new Currency($requestData['merchant_preferences']['SetupFee']));\n }\n array_pop($requestData['merchant_preferences']);\n \n if(isset($requestData['merchant_preferences'])){\n $this->setArrayToMethods($this->checkEmptyObject($requestData['merchant_preferences']), $merchantPreferences);\n }\n if(!empty($this->checkEmptyObject((array)$paymentDefinition))){\n $plan->setPaymentDefinitions(array($paymentDefinition));\n }\n if(!empty($this->checkEmptyObject((array)$merchantPreferences))){\n $plan->setMerchantPreferences($merchantPreferences);\n } \n $requestArray= clone $plan;\n $output = $plan->create($this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $output->toArray();\n $returnArray['RAWREQUEST']=$requestArray->toJSON();\n $returnArray['RAWRESPONSE']=$output->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }", "public static function data_for_plan_page_returns() {\n $uc = user_competency_exporter::get_read_structure();\n $ucp = user_competency_plan_exporter::get_read_structure();\n\n $uc->required = VALUE_OPTIONAL;\n $ucp->required = VALUE_OPTIONAL;\n\n return new external_single_structure(array (\n 'plan' => plan_exporter::get_read_structure(),\n 'contextid' => new external_value(PARAM_INT, 'Context ID.'),\n 'pluginbaseurl' => new external_value(PARAM_URL, 'Plugin base URL.'),\n 'competencies' => new external_multiple_structure(\n new external_single_structure(array(\n 'competency' => competency_exporter::get_read_structure(),\n 'comppath' => competency_path_exporter::get_read_structure(),\n 'usercompetency' => $uc,\n 'usercompetencyplan' => $ucp\n ))\n ),\n 'competencycount' => new external_value(PARAM_INT, 'Count of competencies'),\n 'proficientcompetencycount' => new external_value(PARAM_INT, 'Count of proficientcompetencies'),\n 'proficientcompetencypercentage' => new external_value(PARAM_FLOAT, 'Percentage of competencies proficient'),\n 'proficientcompetencypercentageformatted' => new external_value(PARAM_RAW, 'Displayable percentage'),\n ));\n }", "public function getPlan();", "public function run()\n {\n $plans =\n array(\n array(\n \"product_id\"=>1,\n \"title\" => \"Basic\",\n \"pricing\" => 6850,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 5 User accounts;\n 1 Free system admin account;\n 500 SMS notifications in a month;\n A maximum of 500,000 customer records;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>1,\n \"title\" => \"Standard\",\n \"pricing\" => 11800,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 15 User accounts;\n 1 Free system admin account;\n 1000 SMS notifications in a month;\n A maximum of 1,500,000 customer records;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>1,\n \"title\" => \"Enterprise\",\n \"pricing\" => 21550,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 100 User accounts;\n 1 Free system admin account;\n 5000 SMS notifications in a month;\n A maximum of 500,000 customer records;\n Organization with multiple receptions\n All reports;\",\n \"note\" => \"Extra functionality will be charged at 2% of the Basic\"\n ),\n\n /******************module 2*****************/\n\n array(\n \"product_id\"=>2,\n \"title\" => \"Basic\",\n \"pricing\" => 18000,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 5 User accounts;\n 1 Free system admin account;\n A maximum of 500,000 customer records;\n Free end user android mobile application on 5 devices;\n A maximum of 5 E-Security desk;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>2,\n \"title\" => \"Standard\",\n \"pricing\" => 25800,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 15 User accounts;\n 1 Free system admin account;\n A maximum of 1,500,000 customer records;\n Free end user android mobile application on 15 devices;\n A maximum of 15 E-Security desk;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>2,\n \"title\" => \"Enterprise\",\n \"pricing\" => 50550,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 100 User accounts;\n 1 Free system admin account;\n A maximum of 5,000,000 customer records;\n Free end user android mobile application on 100 devices;\n A maximum of 100 E-Security desk;\n All reports;\",\n \"note\" => \"Extra functionality will be charged at 2% of the Basic\"\n )\n );\n\n DB::table('plans')->delete();\n DB::table('plans')->insert($plans);\n\n }", "public function create_plan() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n # Set up query\n $q = \"INSERT INTO plans SET\n\t\t\t description='\".$_POST['description'].\"', time='\".$_POST['time'].\"', public='\".(!empty($_POST['public'])?1:0).\"',\n\t\t\t modified_date='\".Time::now().\"', modified_by='\".$this->user->user_id.\"'\";\n $plans = DB::instance(DB_NAME)->query($q);\n\n # Set up query\n $q = \"SELECT\n\t\t\t p.plan_id, p.description,p.time,p.public, c.first_name, c.last_name, p.modified_date, p.show\n\t\t\t FROM plans AS p inner join\n\t\t\t users as u on p.modified_by=u.user_id\n \t\t inner JOIN contacts AS c ON u.user_id=c.user_id\n\t\t\t and c.modified_date = (select max(modified_date) from\n\t\t\t contacts as c where c.user_id=p.modified_by) and p.plan_id = LAST_INSERT_ID()\n \";\n\n # Run query\n $result = DB::instance(DB_NAME)->select_row($q);\n $result[\"posted_on\"] = Time::display($result['modified_date'],'Y-m-d H:m:s');\n\n #Adding action to System Log\n $data3 = Array (\n\n \"modified_date\" => Time::now(),\n \"FK_id\" => $result[\"plan_id\"],\n \"FK_table\" => 'plans',\n \"login\" => false,\n \"modified_by\" => $this->user->user_id\n );\n DB::instance(DB_NAME)->insert('logs',$data3);\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n $jTableResult['Record'] = $result;\n print json_encode($jTableResult);\n }", "function TestRun_get_test_plan($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_plan', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getChangePlanUrl($subscription, $plan_id, $returnUrl='/')\n {\n return action(\"\\Acelle\\Cashier\\Controllers\\\\BraintreeController@changePlan\", [\n 'subscription_id' => $subscription->uid,\n 'return_url' => $returnUrl,\n 'plan_id' => $plan_id,\n ]);\n }", "public function get_plans() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n // extract passed parameters from jtable\n $query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);\n parse_str($query, $params);\n \n\n // count all records query\n $q = \"SELECT COUNT(*) as count\n FROM plans AS p inner join\n users as u on p.modified_by=u.user_id\n inner JOIN contacts AS c ON u.user_id=c.user_id\n and c.modified_date = (select max(modified_date) from\n contacts as c where c.user_id=p.modified_by)\n \";\n // run query\n $count = DB::instance(DB_NAME)->select_row($q);\n $order = isset($params['jtSorting']) ? $params['jtSorting'] : 'plan_id DESC';\n \n # Set up query\n $q = \"SELECT\n p.plan_id, p.description,p.time,p.public, c.first_name, c.last_name, p.modified_date, p.show\n FROM plans AS p inner join\n users as u on p.modified_by=u.user_id\n inner JOIN contacts AS c ON u.user_id=c.user_id\n and c.modified_date = (select max(modified_date) from\n contacts as c where c.user_id=p.modified_by)\n ORDER BY {$order} \n LIMIT {$params['jtStartIndex']}, {$params['jtPageSize']}\n \";\n \n # Run query\n $plans = DB::instance(DB_NAME)->select_rows($q);\n $items = array();\n $i = 0;\n foreach($plans as $plan) {\n $items[] = array(\n \"plan_id\" => $plan[\"plan_id\"],\n \"modified_date\" => Time::display($plan['modified_date'],'Y-m-d H:m:s'),\n \"first_name\" => $plan[\"first_name\"],\n \"last_name\" => $plan[\"last_name\"],\n \"public\" => $plan[\"public\"],\n \"show\" => $plan[\"show\"],\n \"description\" => $plan[\"description\"],\n \"time\" => $plan[\"time\"]\n );\n }\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n $jTableResult['TotalRecordCount'] = $count['count'];\n $jTableResult['Records'] = $items;\n print json_encode($jTableResult);\n }", "private function get_plan()\n\t{\n\t\treturn $this->m_plan;\n\t}", "public static function data_for_plan_page($planid) {\n global $PAGE;\n $params = self::validate_parameters(self::data_for_plan_page_parameters(), array(\n 'planid' => $planid\n ));\n $plan = api::read_plan($params['planid']);\n self::validate_context($plan->get_context());\n\n $renderable = new output\\plan_page($plan);\n $renderer = $PAGE->get_renderer('tool_lp');\n\n $data = $renderable->export_for_template($renderer);\n\n return $data;\n }", "public static function data_for_user_competency_summary_in_plan_parameters() {\n $competencyid = new external_value(\n PARAM_INT,\n 'Data base record id for the competency',\n VALUE_REQUIRED\n );\n $planid = new external_value(\n PARAM_INT,\n 'Data base record id for the plan',\n VALUE_REQUIRED\n );\n\n $params = array(\n 'competencyid' => $competencyid,\n 'planid' => $planid,\n );\n return new external_function_parameters($params);\n }", "function TestPlan_update($plan_id, $author_id, $product_id = NULL, $default_product_version = NULL, $type_id = NULL, $name = NULL, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.update', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_unlink_plan($case_id, $plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.unlink_plan', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function UsePlan($plan_id) {\n\t\t$this->Param('plan_id', $plan_id, 'recur');\n\n\t\treturn true;\n\t}", "public static function data_for_plans_page_returns() {\n return new external_single_structure(array (\n 'userid' => new external_value(PARAM_INT, 'The learning plan user id'),\n 'plans' => new external_multiple_structure(\n plan_exporter::get_read_structure()\n ),\n 'pluginbaseurl' => new external_value(PARAM_LOCALURL, 'Url to the tool_lp plugin folder on this Moodle site'),\n 'navigation' => new external_multiple_structure(\n new external_value(PARAM_RAW, 'HTML for a navigation item that should be on this page')\n ),\n 'canreaduserevidence' => new external_value(PARAM_BOOL, 'Can the current user view the user\\'s evidence'),\n 'canmanageuserplans' => new external_value(PARAM_BOOL, 'Can the current user manage the user\\'s plans'),\n ));\n }", "function TestPlan_get($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"author_id\":\n\t\t\tcase \"isactive\":\n\t\t\tcase \"plan_id\":\n\t\t\tcase \"product_id\":\n\t\t\tcase \"type_id\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"default_product_version\":\n\t\t\tcase \"creation_date\":\n\t\t\tcase \"name\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function get_plan($planId){\n try {\n $plan = Plan::get($planId, $this->_api_context);\n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $plan->toArray();\n $returnArray['RAWREQUEST']='{id:'.$planId.'}';\n $returnArray['RAWRESPONSE']=$plan->toJSON();\n return $returnArray;\n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }", "function TestPlan_create($author_id, $product_id, $default_product_version, $type_id, $name, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_get_plans($case_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.get_plans', array(new xmlrpcval($case_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getMetrics(&$db,$userObj,$args, $result_cfg, $labels)\n{\n $debug = true;\n $begin_time = microtime(true);\n $user_id = $args->currentUserID;\n $tproject_id = $args->tproject_id;\n $linked_tcversions = array();\n $metrics = array();\n $tplan_mgr = new testplan($db);\n $show_platforms = false;\n $platforms = array();\n\n // get all tesplans accessibles for user, for $tproject_id\n $options = array('output' => 'map');\n $options['active'] = $args->show_only_active ? ACTIVE : TP_ALL_STATUS; \n $test_plans = $userObj->getAccessibleTestPlans($db,$tproject_id,null,$options);\n\n // Get count of testcases linked to every testplan\n // Hmm Count active and inactive ?\n $linkedItemsQty = $tplan_mgr->count_testcases(array_keys($test_plans),null,array('output' => 'groupByTestPlan'));\n \n \n $metricsMgr = new tlTestPlanMetrics($db);\n $show_platforms = false;\n \n $metrics = array('testplans' => null, 'total' => null);\n $mm = &$metrics['testplans'];\n $metrics['total'] = array('active' => 0,'total' => 0, 'executed' => 0);\n foreach($result_cfg['status_label_for_exec_ui'] as $status_code => &$dummy)\n {\n $metrics['total'][$status_code] = 0; \n } \n \n $codeStatusVerbose = array_flip($result_cfg['status_code']);\n if($debug){\n echo 'test_plans_count:'.count($test_plans).\"<br/>\";\n $index = 0;\n foreach($test_plans as $key => &$dummy)\n {\n $item_begin_time = microtime(true);\n // We need to know if test plan has builds, if not we can not call any method \n // that try to get exec info, because you can only execute if you have builds.\n //\n // 20130909 - added active filter\n $buildSet = $tplan_mgr->get_builds($key,testplan::ACTIVE_BUILDS);\n if( is_null($buildSet) )\n {\n continue;\n }\n\n $platformSet = $tplan_mgr->getPlatforms($key);\n if (isset($platformSet)) \n {\n $platforms = array_merge($platforms, $platformSet);\n } \n $show_platforms_for_tplan = !is_null($platformSet);\n $show_platforms = $show_platforms || $show_platforms_for_tplan;\n if( !is_null($platformSet) )\n {\n $neurus = $metricsMgr->getExecCountersByPlatformExecStatus($key,null,\n array('getPlatformSet' => true,\n 'getOnlyActiveTCVersions' => true));\n $mm[$key]['overall']['active'] = $mm[$key]['overall']['executed'] = 0;\n foreach($neurus['with_tester'] as $platform_id => &$pinfo)\n {\n $xd = &$mm[$key]['platforms'][$platform_id];\n $xd['tplan_name'] = $dummy['name'];\n $xd['platform_name'] = $neurus['platforms'][$platform_id];\n $xd['total'] = $xd['active'] = $neurus['total'][$platform_id]['qty'];\n $xd['executed'] = 0;\n \n foreach($pinfo as $code => &$elem)\n {\n $xd[$codeStatusVerbose[$code]] = $elem['exec_qty'];\n if($codeStatusVerbose[$code] != 'not_run')\n {\n $xd['executed'] += $elem['exec_qty'];\n }\n if( !isset($mm[$key]['overall'][$codeStatusVerbose[$code]]) )\n {\n $mm[$key]['overall'][$codeStatusVerbose[$code]] = 0;\n }\n $mm[$key]['overall'][$codeStatusVerbose[$code]] += $elem['exec_qty'];\n $metrics['total'][$codeStatusVerbose[$code]] += $elem['exec_qty']; \n }\n $mm[$key]['overall']['executed'] += $xd['executed'];\n $mm[$key]['overall']['active'] += $xd['active'];\n } \n unset($neurus);\n $mm[$key]['overall']['total'] = $mm[$key]['overall']['active']; \n $metrics['total']['executed'] += $mm[$key]['overall']['executed'];\n $metrics['total']['active'] += $mm[$key]['overall']['active'];\n }\n else\n {\n if($key == 764205){$my_begin_time = microtime(true);}\n $mm[$key]['overall']['builds'] = $metricsMgr->getBuildExecCountersByExecStatus($key,null,null);\n if($key == 764205){$my_end_time = microtime(true);echo 'my_diff:'.($my_end_time - $my_begin_time).\"<br/>\";}\n $mm[$key]['overall']['active'] = 0;\n foreach ($mm[$key]['overall']['builds'] as $build_id => $status_column)\n {\n $mm[$key]['overall']['active'] += $status_column['total'];\n foreach ($status_column as $status_code => $qty)\n {\n if(!isset($metrics['total'][$status_code]))\n {\n $metrics['total'][$status_code] = 0;\n }\n $metrics['total'][$status_code] += $qty;\n \n if (!isset($mm[$key]['overall'][$status_code]))\n {\n $mm[$key]['overall'][$status_code] = 0;\n }\n $mm[$key]['overall'][$status_code] += $qty;\n }\n }\n\n //$metrics['total']['executed'] += $mm[$key]['overall']['executed'];\n $metrics['total']['active'] += $mm[$key]['overall']['active'];\n \n $mm[$key]['platforms'][0] = $mm[$key]['overall'];\n $mm[$key]['platforms'][0]['tplan_name'] = $dummy['name'];\n $mm[$key]['platforms'][0]['platform_name'] = $labels['not_aplicable'];\n } \n $item_end_time = microtime(true);\n echo \"key:$key,diff_time:\".($item_end_time - $item_begin_time).\"<br/>\";\n $index ++;\n if($index > 2){\n break;\n }\n }\n}\n \n // remove duplicate platform names\n $platformsUnique = array();\n foreach($platforms as $platform) \n {\n if(!in_array($platform['name'], $platformsUnique)) \n {\n $platformsUnique[] = $platform['name'];\n }\n }\n \n $end_time = microtime(true);\n echo 'diff_time'.($end_time - $begin_time);\n return array($metrics, $show_platforms, $platformsUnique);\n}", "private function createPlan(){\n if(!$this->request->plan_name || !$this->request->plan_description) {\n return false;\n }\n $this->plan = Planes::create([\n 'name' => $this->request->plan_name,\n 'description' => $this->request->plan_description,\n 'price' => $this->request->price,\n 'product_id' => $this->request->product_id,\n 'balance' => $this->request->balance,\n ]);\n $this->plan = new PlanesFormatter($this->plan);\n }", "public function testRunFulfillmentPlan()\n {\n }", "public static function data_for_plans_page_parameters() {\n $userid = new external_value(\n PARAM_INT,\n 'The user id',\n VALUE_REQUIRED\n );\n $params = array('userid' => $userid);\n return new external_function_parameters($params);\n }", "public function GetPlanDetails($planID) {\n\t\t$planID = mysqli_real_escape_string($this->db, $planID);\n\t\tif ($this->CheckPlanExist($planID) == '1') {\n\t\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_premium_plans WHERE plan_id = '$planID'\") or die(mysqli_error($this->db));\n\t\t\t$data = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\t\treturn $data;\n\t\t} else {return false;}\n\t}", "function copy_plan($userId,$planId,$new_name=\"\"){\n if( is_numeric($userId) && is_numeric($planId) ){\n \n if($new_name == \"\" ){\n // Retrive plan from plan table.\n $query = \"select * from plan where plan_id = '{$planId}' \";\n $result = @mysql_query($query);\n $row = @mysql_fetch_array($result);\n $new_name = $row['plan_name'];\n }\n \n // Create array for inserting record.\n $insertArr = array(\n 'plan_name'=> $new_name,\n 'parent_template_id' => NULL,\n 'user_id' => $userId,\n 'patient_id' => NULL,\n 'user_type' => 2,\n 'is_public' => NULL,\n 'creation_date' => $row['creation_date'], \n 'status' => 1\n );\n \n // Insert record.\n $result = $this->insert('plan',$insertArr);\n \n //Get new plan id\n $newlyPlanId = $this->insert_id();\n \n // Copy treatments associated with planId.\n if(is_numeric($newlyPlanId)){\n // copy treatments in the plan.\n $this->copy_plan_treatment($newlyPlanId,$planId);\n // copy articles in the plan.\n $this->copy_article($newlyPlanId,$planId);\n }\n } \n \n }", "public function getPlanById()\n {\n // Arrange\n // Act\n if (! isset($this->plans)) {\n $this->getsAListOfPlans();\n }\n $plans = $this->plans;\n $plan = $plans['data'][0];\n\n $plan = Ezypay::getPlan($plan['id']);\n\n // Assert\n $this->assertNotNull($plan);\n $this->assertEquals($plan['id'], $plan['id']);\n }", "public function creating(Plan $plan)//troquei o created por creating\n {\n $plan->url = Str::kebab($plan->name);\n }" ]
[ "0.5994216", "0.5923225", "0.5799302", "0.5647582", "0.5645016", "0.5526816", "0.55247986", "0.55002356", "0.5411066", "0.54051507", "0.53483784", "0.53231686", "0.5297678", "0.52940696", "0.52838415", "0.52699685", "0.5261083", "0.52534527", "0.5241447", "0.5235863", "0.52082723", "0.5194038", "0.5192557", "0.5190226", "0.51886314", "0.51721245", "0.51341456", "0.5128299", "0.51116526", "0.51025933" ]
0.724028
0
/ unlink_plan Unlink A TestPlan From An Existing TestCase Usage TestCase.unlink_plan Parameters ParameterData Type case_idinteger plan_idinteger Result Array [0] Array [author_id] [name] [default_product_version] [plan_id] [product_id] [creation_date] [type_id] [isactive] [1] Array ...
function TestCase_unlink_plan($case_id, $plan_id) { // Create call $call = new xmlrpcmsg('TestCase.unlink_plan', array(new xmlrpcval($case_id, "int"), new xmlrpcval($plan_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_plan()\n {\n #check user access\n check_user_access($this, 'delete_procurement_plan', 'redirect');\n\n # Get the passed details into the url data array if any\n $urldata = $this->uri->uri_to_assoc(3, array('m', 's'));\n\n # Pick all assigned data\n $data = assign_to_data($urldata);\n\n if(!empty($data['i'])){\n $result = $this->db->query($this->Query_reader->get_query_by_code('deactivate_item', array('item'=>' procurement_plans', 'id'=>decryptValue($data['i'])) ));\n \n #deactivate the entries\n if($result)\n {\n $this->db->where('procurement_plan_id', decryptValue($data['i']));\n $this->db->update('procurement_plan_entries', array('isactive'=>'N'));\n }\n }\n\n if(!empty($result) && $result){\n $this->session->set_userdata('dbid', \"The plan and it's entries have been successfully deleted.\");\n }\n else if(empty($data['msg']))\n {\n $this->session->set_userdata('dbid', \"ERROR: The procurement plan could not be deleted or were not deleted correctly.\");\n }\n\n if(!empty($data['t']) && $data['t'] == 'super'){\n $tstr = \"/t/super\";\n }else{\n $tstr = \"\";\n }\n redirect(base_url().\"procurement/page/m/dbid\".$tstr);\n }", "public function delete_plan() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n # Set up query\n $q = \"DELETE FROM plans\n\t\t\t WHERE plan_id=\".$_POST['plan_id'];\n $plans = DB::instance(DB_NAME)->query($q);\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n print json_encode($jTableResult);\n }", "public function delete_plan($planId){\n try {\n $createdPlan = new Plan();\n $createdPlan->setId($planId);\n $result = $createdPlan->delete($this->_api_context);\n $returnArray['RESULT'] = 'Success';\n $returnArray['DELETE_PLAN'] = $result->toArray();\n $returnArray['RAWREQUEST']='{id:'.$planId.'}';\n $returnArray['RAWRESPONSE']=$result->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }", "public function plan_delete( $plan_id ) {\r\n\t\treturn $this->_send_request( 'plans/'.$plan_id, array(), STRIPE_METHOD_DELETE );\r\n\t}", "public function deletePlan(Plan $plan){\n $this->open();\n\n $result = $this->query('DELETE FROM '.$this->TABLE_NAME.' WHERE id=:id', array(\n new QueryParam(':id', $plan->id, PDO::PARAM_INT)\n )\n );\n\n $this->close();\n\n return $result;\n }", "function deletePlanModules($conn, $planID){\n\n\t\n\t$sql = \"DELETE FROM plancomponent WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n\n}", "function delete($id_plan) {\r\n $sql = \"DELETE FROM planes WHERE planes.id_plan ='\" . $id_plan . \"'\";\r\n\r\n $response = getResultSQL($sql);\r\n if (!$response) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }", "function deleteInspectedBy($conn, $planID){\n\t$sql = \"DELETE FROM inspectedby WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n}", "public function deletePlan($plan)\n {\n Stripe\\Plan::retrieve($plan->level)->delete();\n }", "function TestCase_link_plan($case_id, $plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.link_plan', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function deletePlan($conn){\n\n\tsession_start();\n\t\t$planID = $_SESSION['planID'];\n\tsession_write_close();\n\t\n\tdeletePlanModules($conn, $planID);\n\t\n\t$sql = \"DELETE FROM plan WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n\t\n\tsession_start();\n\t\tunset($_SESSION['planID']);\n\tsession_write_close();\n\t\n\t$return = ['message' => 'Successfully deleted the report'];\n\treturn $return;\n\n}", "public function Deleteplan() {\n $plan_id = $this->input->post('plan_id');\n $data = array(\n 'plan_id' => $plan_id\n );\n $this->load->view('admin/plan/delete_plan', $data);\n }", "public function destroy(Plan $plan)\n {\n //\n }", "public function destroy(Plan $plan) {\n \n }", "public function delinkRecords(ParameterMap $paramInstance=null)\n\t{\n\t\t$handlerInstance=new CommonAPIHandler(); \n\t\t$apiPath=\"\"; \n\t\t$apiPath=$apiPath.('/crm/v2/'); \n\t\t$apiPath=$apiPath.(strval($this->moduleAPIName)); \n\t\t$apiPath=$apiPath.('/'); \n\t\t$apiPath=$apiPath.(strval($this->recordId)); \n\t\t$apiPath=$apiPath.('/'); \n\t\t$apiPath=$apiPath.(strval($this->relatedListAPIName)); \n\t\t$handlerInstance->setAPIPath($apiPath); \n\t\t$handlerInstance->setHttpMethod(Constants::REQUEST_METHOD_DELETE); \n\t\t$handlerInstance->setCategoryMethod(Constants::REQUEST_METHOD_DELETE); \n\t\t$handlerInstance->setParam($paramInstance); \n\t\treturn $handlerInstance->apiCall(ActionHandler::class, 'application/json'); \n\n\t}", "function deleteContinueReport($conn, $planID){\n\t$sql = \"DELETE FROM temporaryreport WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n}", "public function deleted(PlanSubscription $planSubscription)\n {\n //\n }", "public function testDeletePackingPlan()\n {\n }", "function deleteUnfinishedModules($conn, $planID){\n\t$sql = \"DELETE FROM incompletecomponents WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n}", "public function unwant($planId)\n{\n $exist = $this->is_wanting($planId);\n \n\n\n if ($exist) {\n // stop following if following\n $this->wants()->detach($planId);\n return true;\n } else {\n // do nothing if not following\n return false;\n }\n}", "function delete_predefined_innovation_plan($id)\n {\n $status = $this->db->delete('predefined_innovation_plan', array(\n 'id' => $id\n ));\n $db_error = $this->db->error();\n if (! empty($db_error['code'])) {\n echo 'Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message'];\n exit();\n }\n return $status;\n }", "function deleteTestCasesViewer(&$dbHandler,&$smartyObj,&$tprojectMgr,&$treeMgr,&$tsuiteMgr,\r\n &$tcaseMgr,$argsObj,$feedback = null)\r\n{\r\n\r\n $guiObj = new stdClass();\r\n $guiObj->main_descr = lang_get('delete_testcases');\r\n $guiObj->system_message = '';\r\n\r\n\r\n $tables = $tprojectMgr->getDBTables(array('nodes_hierarchy','node_types','tcversions'));\r\n $testcase_cfg = config_get('testcase_cfg');\r\n $glue = $testcase_cfg->glue_character;\r\n\r\n $containerID = isset($argsObj->testsuiteID) ? $argsObj->testsuiteID : $argsObj->objectID;\r\n $containerName = $argsObj->tsuite_name;\r\n if( is_null($containerName) )\r\n {\r\n $dummy = $treeMgr->get_node_hierarchy_info($argsObj->objectID);\r\n $containerName = $dummy['name'];\r\n }\r\n\r\n $guiObj->testCaseSet = $tsuiteMgr->get_children_testcases($containerID);\r\n $guiObj->exec_status_quo = null;\r\n $tcasePrefix = $tprojectMgr->getTestCasePrefix($argsObj->tprojectID);\r\n $hasExecutedTC = false;\r\n\r\n if( !is_null($guiObj->testCaseSet) && count($guiObj->testCaseSet) > 0)\r\n {\r\n foreach($guiObj->testCaseSet as &$child)\r\n {\r\n $external = $tcaseMgr->getExternalID($child['id'],null,$tcasePrefix);\r\n $child['external_id'] = $external[0];\r\n \r\n // key level 1 : Test Case Version ID\r\n // key level 2 : Test Plan ID\r\n // key level 3 : Platform ID\r\n $getOptions = array('addExecIndicator' => true);\r\n $dummy = $tcaseMgr->get_exec_status($child['id'],null,$getOptions);\r\n $child['draw_check'] = $argsObj->grants->delete_executed_testcases || (!$dummy['executed']);\r\n\r\n $hasExecutedTC = $hasExecutedTC || $dummy['executed'];\r\n unset($dummy['executed']);\r\n $guiObj->exec_status_quo[] = $dummy;\r\n }\r\n }\r\n // Need to understand if platform column has to be displayed on GUI\r\n if( !is_null($guiObj->exec_status_quo) )\r\n {\r\n // key level 1 : Test Case Version ID\r\n // key level 2 : Test Plan ID\r\n // key level 3 : Platform ID\r\n\r\n $itemSet = array_keys($guiObj->exec_status_quo);\r\n foreach($itemSet as $mainKey)\r\n {\r\n $guiObj->display_platform[$mainKey] = false;\r\n if(!is_null($guiObj->exec_status_quo[$mainKey]) )\r\n {\r\n $versionSet = array_keys($guiObj->exec_status_quo[$mainKey]);\r\n $stop = false;\r\n foreach($versionSet as $version_id)\r\n {\r\n $tplanSet = array_keys($guiObj->exec_status_quo[$mainKey][$version_id]);\r\n foreach($tplanSet as $tplan_id)\r\n {\r\n if( ($guiObj->display_platform[$mainKey] = !isset($guiObj->exec_status_quo[$mainKey][$version_id][$tplan_id][0])) )\r\n {\r\n $stop = true;\r\n break;\r\n }\r\n }\r\n \r\n if($stop)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // check if operation can be done\r\n $guiObj->user_feedback = $feedback;\r\n if(!is_null($guiObj->testCaseSet) && (sizeof($guiObj->testCaseSet) > 0) )\r\n {\r\n $guiObj->op_ok = true;\r\n $guiObj->user_feedback = '';\r\n }\r\n else\r\n {\r\n $guiObj->children = null;\r\n $guiObj->op_ok = false;\r\n $guiObj->user_feedback = is_null($guiObj->user_feedback) ? lang_get('no_testcases_available') : $guiObj->user_feedback;\r\n }\r\n\r\n if(!$argsObj->grants->delete_executed_testcases && $hasExecutedTC)\r\n {\r\n $guiObj->system_message = lang_get('system_blocks_delete_executed_tc');\r\n }\r\n\r\n $guiObj->objectID = $containerID;\r\n $guiObj->object_name = $containerName;\r\n $guiObj->refreshTree = $argsObj->refreshTree;\r\n\r\n $smartyObj->assign('gui', $guiObj);\r\n}", "function TestPlan_remove_tag($plan_id, $tag_name) {\n\t// Create call\n//\t$call = new xmlrpcmsg('TestPlan.remove_tag', array(new xmlrpcval(array(\"plan_id\" => new xmlrpcval($plan_id, \"int\"), \"tag_name\" => new xmlrpcval($tag_name, \"string\")), \"struct\")));\n\t$call = new xmlrpcmsg('TestPlan.remove_tag', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function deleteDateInspected($conn, $planID){\n\t$sql = \"DELETE FROM dateinspected WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n}", "public function testThatUnlinkAccountRequestIsFormattedProperly()\n {\n $api = new MockManagementApi( [ new Response( 200, self::$headers ) ] );\n\n $api->call()->users()->unlinkAccount(\n '__test_user_id__',\n '__test_provider__',\n '__test_identity_id__'\n );\n\n $this->assertEquals( 'DELETE', $api->getHistoryMethod() );\n $this->assertEquals(\n 'https://api.test.local/api/v2/users/__test_user_id__/identities/__test_provider__/__test_identity_id__',\n $api->getHistoryUrl()\n );\n\n $headers = $api->getHistoryHeaders();\n $this->assertEquals( 'Bearer __api_token__', $headers['Authorization'][0] );\n $this->assertEquals( self::$expectedTelemetry, $headers['Auth0-Client'][0] );\n }", "static public function ctrBorrarPlan()\n\t{\n\t\tif(isset($_GET[\"idCurricular\"]))\n\t\t{\n\t\t\t$tabla = \"planes\";\n\t\t\t$datos = $_GET[\"idCurricular\"];\n\t\t\t$respuesta = ModeloPlanes::mdlBorrarPlanes($tabla,$datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo '<script> \n\t \t\t\t\t\tswal({\n\t \t\t\t\t\t\ttype: \"success\",\n\t \t\t\t\t\t\ttitle: \"Plan curricular ha sido borrado correctamente\",\n\t \t\t\t\t\t\tshowConfirmButton: true,\n\t \t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t \t\t\t\t\t\tcloseOnConfirm: false\n\t \t\t\t\t\t}).then((result)=>{\n\t \t\t\t\t\t\tif(result.value)\n\t \t\t\t\t\t\t{\n\t \t\t\t\t\t\t\twindow.location = \"PlanCurricular\";\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t\t})\n\n\t \t\t\t\t \t</script>';\n\t\t\t}\n\t\t}\n\t}", "public function destroy($id)\n {\n Log::debug(\"DESTROY PLAN\");\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->deletePlan($id);\n\n if ($result['message'] == 'Success'){\n\n //return new StripeDeletedPlanResource($result['plan']);\n\n session()->flash('success', 'Plan deleted successfully.');\n \n return redirect( route ('plans.index') );\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n\n return redirect()->back();\n\n }\n\n }", "public function eliminar($idplan)\n {\n include_once 'controlador/util/bd_conexion_pdo.php';\n\n $conexion = (new Conexion())->conectarPDO();\n\n $sentencia = $conexion->prepare(\"DELETE FROM plan WHERE idplan = :idplan\");\n $sentencia->bindParam(':idplan', $idplan);\n\n $sentencia->execute();\n\n $sentencia->closeCursor();\n\n $resultado = $sentencia->rowCount();\n\n $sentencia = null;\n $conexion = null;\n\n return $resultado;\n }", "public function destroy($id) \n {\n try {\n\n // Get plan subscribers count\n $subscribers = PlanSubscription::where(['plan_id' => $id, 'canceled_immediately' => null, 'canceled_at' => null])->count();\n $plan = Plan::find($id);\n\n // Only delete if the plan has no subscribers\n if ( $subscribers >= 1 ) {\n \n $plan->active = 0;\n $plan->save();\n\n $message = 'This plan currently have active subscribers therefore it was only disabled';\n\n } \n else {\n\n // Delete from Stripe\n if ( config('services.stripe.key') && config('services.stripe.secret') ) {\n Stripe::plans()->delete($id);\n }\n\n\n // Delete From PayPal\n if ( config('services.paypal.enable') ) {\n\n $paypalPlan = \\PayPal\\Api\\Plan::get($plan->paypal_plan_id, $this->paypalApiContext);\n $paypalPlan->delete($this->paypalApiContext);\n \n }\n\n\n // Delete DB plan\n $plan->delete();\n\n\n $message = 'The plan was successfully deleted';\n\n }\n \n\n return response(['message' => $message], 200);\n \n } catch (Exception $e) {\n return response(['message' => $e->getMessage()], 500);\n }\n }", "public function destroy($id){\n $data = UserPlan::find($id);\n\n $data->delete();\n\n return response()->json([\n 'message' => 'Delete data success'\n ]);\n }" ]
[ "0.672213", "0.65318334", "0.64861697", "0.6306115", "0.6221673", "0.6219117", "0.61291367", "0.6031907", "0.5879718", "0.58651936", "0.5819393", "0.58004856", "0.5777704", "0.57648826", "0.5710311", "0.56762874", "0.5674677", "0.563229", "0.56199324", "0.5553361", "0.5544881", "0.5537", "0.5526937", "0.54949605", "0.54603004", "0.54084045", "0.53979874", "0.5371629", "0.5360987", "0.528222" ]
0.77160954
0
/ list Get A List of TestRuns Based on A Query Usage TestRun.list Parameters ParameterData TypeComments queryhashmapCan not be null. See Query Examples. Result Array [0] Array [build_id] [plan_text_version] [manager_id] [stop_date] [run_id] [plan_id] [product_version] [environment_id] [summary] [notes] [start_date] [1] Array ...
function TestRun_list($query) { // Create array foreach($query as $key => $val) { switch($key) { case "plan": unset($va); foreach($key as $k => $v) { $va[$k] = new xmlrpcval($v, "string"); } $val = $va; $type = "struct"; break; case "build_id": case "environment_id": case "manager_id": case "plan_id": case "plan_text_version": case "product_version": case "run_id": $type = "int"; break; case "notes": case "start_date": case "stop_date": case "summary": default: $type = "string"; } $qarray[$key] = new xmlrpcval($val, $type); } // Create call $call = new xmlrpcmsg('TestRun.list', array(new xmlrpcval($qarray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCaseRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"assignee\":\n\t\t\tcase \"build_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_run_id\":\n\t\t\tcase \"case_run_status_id\":\n\t\t\tcase \"case_text_version\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"iscurrent\":\n\t\t\tcase \"run_id\":\n\t\t\tcase \"sortkey\":\n\t\t\tcase \"testedby\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"close_date\":\n\t\t\tcase \"notes\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"plans\":\n\t\t\t\tunset($va);\n\t\t\t\tforeach($key as $k => $v) {\n\t\t\t\t\t$va[$k] = new xmlrpcval($v, \"string\");\n\t\t\t\t}\n\t\t\t\t$val = $va;\n\t\t\t\t$type = \"struct\";\n\t\t\t\tbreak;\n\t\t\tcase \"author_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_status_id\":\n\t\t\tcase \"category_id\":\n\t\t\tcase \"default_tester_id\":\n\t\t\tcase \"isautomated\":\n\t\t\tcase \"priority_id\":\n\t\t\tcase \"sortkey\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"alias\":\n\t\t\tcase \"arguments\":\n\t\t\tcase \"creation_date\":\n\t\t\tcase \"requirement\":\n\t\t\tcase \"script\":\n\t\t\tcase \"summary\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"author_id\":\n\t\t\tcase \"isactive\":\n\t\t\tcase \"plan_id\":\n\t\t\tcase \"product_id\":\n\t\t\tcase \"type_id\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"default_product_version\":\n\t\t\tcase \"creation_date\":\n\t\t\tcase \"name\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public static function apiList(Request $r) {\n\t\t\n\t\t// Authenticate request\n\t\tself::authenticateRequest($r);\n\t\t\n\t\tself::validateList($r);\n\t\t\n\t\t$runs_mask = null;\n\n\t\t// Get all runs for problem given \n\t\t$runs_mask = new Runs(array(\t\t\t\t\t\n\t\t\t\t\t\"status\" => $r[\"status\"],\n\t\t\t\t\t\"veredict\" => $r[\"veredict\"],\n\t\t\t\t\t\"problem_id\" => !is_null($r[\"problem\"]) ? $r[\"problem\"]->getProblemId() : null,\n\t\t\t\t\t\"language\" => $r[\"language\"],\n\t\t\t\t\t\"user_id\" => !is_null($r[\"user\"]) ? $r[\"user\"]->getUserId() : null,\n\t\t\t\t));\n\t\t\n\t\t// Filter relevant columns\n\t\t$relevant_columns = array(\"run_id\", \"guid\", \"language\", \"status\", \"veredict\", \"runtime\", \"memory\", \"score\", \"contest_score\", \"time\", \"submit_delay\", \"Users.username\", \"Problems.alias\");\n\n\t\t// Get our runs\n\t\ttry {\n\t\t\t$runs = RunsDAO::search($runs_mask, \"time\", \"DESC\", $relevant_columns, $r[\"offset\"], $r[\"rowcount\"]);\n\t\t} catch (Exception $e) {\n\t\t\t// Operation failed in the data layer\n\t\t\tthrow new InvalidDatabaseOperationException($e);\n\t\t}\n\t\t\n\t\t$relevant_columns[11] = 'username';\n\t\t$relevant_columns[12] = 'alias';\n\n\t\t$result = array();\n\n\t\tforeach ($runs as $run) {\n\t\t\t$filtered = $run->asFilteredArray($relevant_columns);\n\t\t\t$filtered['time'] = strtotime($filtered['time']);\n\t\t\t$filtered['score'] = round((float) $filtered['score'], 4);\n\t\t\t$filtered['contest_score'] = round((float) $filtered['contest_score'], 2);\n\t\t\tarray_push($result, $filtered);\n\t\t}\n\n\t\t$response = array();\n\t\t$response[\"runs\"] = $result;\n\t\t$response[\"status\"] = \"ok\";\n\n\t\treturn $response;\n\t}", "public function getRuns() {\n\t\tif(!$data = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/run_list.jsp?_plus=true')) {\n\t\t\tthrow new ErrorException($this->feedErrorMessage);\n\t\t}\n\t\treturn $data->runList;\n\t}", "public function testlistAction() \n {\n $model = new Application_Model_Mapper_Server($vars);\n $result = $model->getTestDetails();\n $data = array();\n $result = json_encode($result);\n $this->view->assign('result', $result);\n $this->_helper->viewRenderer('index');\n }", "function TestRun_get_test_case_runs($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_case_runs', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function list(array $parameters): ListResponse;", "public function list_plan($parameters){\n try {\n $planList = Plan::all(array_filter($parameters), $this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLANS'] = $planList->toArray();\n $returnArray['RAWREQUEST']= json_encode($parameters);\n $returnArray['RAWRESPONSE']=$planList->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n } \n }", "function TestPlan_get_test_runs($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_runs', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "protected function getTestList() \n {\n $invalid = 'invalid';\n $description = 'text';\n $empty_description = '';\n $testlist = [];\n $testlist[] = new ArgumentTestConfig($this->empty_argument, $empty_description,CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n \n $testlist[] = new ArgumentTestConfig($this->argument_name, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid, $this->argument_name, $invalid, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_empty_need_optional, $empty_description, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n $testlist[] = new ArgumentTestConfig($this->argument_empty_need_required, $empty_description, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n $testlist[] = new ArgumentTestConfig($this->argument_empty_need_invalid, $empty_description, $invalid, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_string, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_string, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_string, $this->argument_name, $invalid, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_string, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_empty, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_array, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::ARRAY, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_array, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::ARRAY, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_array, $this->argument_name, $invalid, CreateModuleCommandArgument::ARRAY, $empty_description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_invalid, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, $invalid, $empty_description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_invalid, $this->argument_name, CreateModuleCommandArgument::REQUIRED, $invalid, $empty_description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_string_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_string_description, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_string_description, $this->argument_name, $invalid, CreateModuleCommandArgument::STRING, $description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_array_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::ARRAY, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_array_description, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::ARRAY, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_array_description, $this->argument_name, $invalid, CreateModuleCommandArgument::ARRAY, $description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_empty_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_empty_description_empty, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_invalid_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, $invalid, $description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_invalid_description, $this->argument_name, CreateModuleCommandArgument::REQUIRED, $invalid, $description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_invalid_description, $this->argument_name, $invalid, $invalid, $description, \\InvalidArgumentException::class);\n \n return $testlist;\n }", "function getMetrics(&$db,$userObj,$args, $result_cfg, $labels)\n{\n $debug = true;\n $begin_time = microtime(true);\n $user_id = $args->currentUserID;\n $tproject_id = $args->tproject_id;\n $linked_tcversions = array();\n $metrics = array();\n $tplan_mgr = new testplan($db);\n $show_platforms = false;\n $platforms = array();\n\n // get all tesplans accessibles for user, for $tproject_id\n $options = array('output' => 'map');\n $options['active'] = $args->show_only_active ? ACTIVE : TP_ALL_STATUS; \n $test_plans = $userObj->getAccessibleTestPlans($db,$tproject_id,null,$options);\n\n // Get count of testcases linked to every testplan\n // Hmm Count active and inactive ?\n $linkedItemsQty = $tplan_mgr->count_testcases(array_keys($test_plans),null,array('output' => 'groupByTestPlan'));\n \n \n $metricsMgr = new tlTestPlanMetrics($db);\n $show_platforms = false;\n \n $metrics = array('testplans' => null, 'total' => null);\n $mm = &$metrics['testplans'];\n $metrics['total'] = array('active' => 0,'total' => 0, 'executed' => 0);\n foreach($result_cfg['status_label_for_exec_ui'] as $status_code => &$dummy)\n {\n $metrics['total'][$status_code] = 0; \n } \n \n $codeStatusVerbose = array_flip($result_cfg['status_code']);\n if($debug){\n echo 'test_plans_count:'.count($test_plans).\"<br/>\";\n $index = 0;\n foreach($test_plans as $key => &$dummy)\n {\n $item_begin_time = microtime(true);\n // We need to know if test plan has builds, if not we can not call any method \n // that try to get exec info, because you can only execute if you have builds.\n //\n // 20130909 - added active filter\n $buildSet = $tplan_mgr->get_builds($key,testplan::ACTIVE_BUILDS);\n if( is_null($buildSet) )\n {\n continue;\n }\n\n $platformSet = $tplan_mgr->getPlatforms($key);\n if (isset($platformSet)) \n {\n $platforms = array_merge($platforms, $platformSet);\n } \n $show_platforms_for_tplan = !is_null($platformSet);\n $show_platforms = $show_platforms || $show_platforms_for_tplan;\n if( !is_null($platformSet) )\n {\n $neurus = $metricsMgr->getExecCountersByPlatformExecStatus($key,null,\n array('getPlatformSet' => true,\n 'getOnlyActiveTCVersions' => true));\n $mm[$key]['overall']['active'] = $mm[$key]['overall']['executed'] = 0;\n foreach($neurus['with_tester'] as $platform_id => &$pinfo)\n {\n $xd = &$mm[$key]['platforms'][$platform_id];\n $xd['tplan_name'] = $dummy['name'];\n $xd['platform_name'] = $neurus['platforms'][$platform_id];\n $xd['total'] = $xd['active'] = $neurus['total'][$platform_id]['qty'];\n $xd['executed'] = 0;\n \n foreach($pinfo as $code => &$elem)\n {\n $xd[$codeStatusVerbose[$code]] = $elem['exec_qty'];\n if($codeStatusVerbose[$code] != 'not_run')\n {\n $xd['executed'] += $elem['exec_qty'];\n }\n if( !isset($mm[$key]['overall'][$codeStatusVerbose[$code]]) )\n {\n $mm[$key]['overall'][$codeStatusVerbose[$code]] = 0;\n }\n $mm[$key]['overall'][$codeStatusVerbose[$code]] += $elem['exec_qty'];\n $metrics['total'][$codeStatusVerbose[$code]] += $elem['exec_qty']; \n }\n $mm[$key]['overall']['executed'] += $xd['executed'];\n $mm[$key]['overall']['active'] += $xd['active'];\n } \n unset($neurus);\n $mm[$key]['overall']['total'] = $mm[$key]['overall']['active']; \n $metrics['total']['executed'] += $mm[$key]['overall']['executed'];\n $metrics['total']['active'] += $mm[$key]['overall']['active'];\n }\n else\n {\n if($key == 764205){$my_begin_time = microtime(true);}\n $mm[$key]['overall']['builds'] = $metricsMgr->getBuildExecCountersByExecStatus($key,null,null);\n if($key == 764205){$my_end_time = microtime(true);echo 'my_diff:'.($my_end_time - $my_begin_time).\"<br/>\";}\n $mm[$key]['overall']['active'] = 0;\n foreach ($mm[$key]['overall']['builds'] as $build_id => $status_column)\n {\n $mm[$key]['overall']['active'] += $status_column['total'];\n foreach ($status_column as $status_code => $qty)\n {\n if(!isset($metrics['total'][$status_code]))\n {\n $metrics['total'][$status_code] = 0;\n }\n $metrics['total'][$status_code] += $qty;\n \n if (!isset($mm[$key]['overall'][$status_code]))\n {\n $mm[$key]['overall'][$status_code] = 0;\n }\n $mm[$key]['overall'][$status_code] += $qty;\n }\n }\n\n //$metrics['total']['executed'] += $mm[$key]['overall']['executed'];\n $metrics['total']['active'] += $mm[$key]['overall']['active'];\n \n $mm[$key]['platforms'][0] = $mm[$key]['overall'];\n $mm[$key]['platforms'][0]['tplan_name'] = $dummy['name'];\n $mm[$key]['platforms'][0]['platform_name'] = $labels['not_aplicable'];\n } \n $item_end_time = microtime(true);\n echo \"key:$key,diff_time:\".($item_end_time - $item_begin_time).\"<br/>\";\n $index ++;\n if($index > 2){\n break;\n }\n }\n}\n \n // remove duplicate platform names\n $platformsUnique = array();\n foreach($platforms as $platform) \n {\n if(!in_array($platform['name'], $platformsUnique)) \n {\n $platformsUnique[] = $platform['name'];\n }\n }\n \n $end_time = microtime(true);\n echo 'diff_time'.($end_time - $begin_time);\n return array($metrics, $show_platforms, $platformsUnique);\n}", "public function getAllReadinessChecklistSurveys($parameters) {\n error_log(implode(\"--\", $parameters));\n\n $aColumns = array('readiness_checklist_id', 'start_date', 'end_date', 'created_at', 'created_by');\n\n /* Indexed column (used for fast and accurate table cardinality) */\n $sIndexColumn = $this->_primary;\n\n\n /*\n * Paging\n */\n $sLimit = \"\";\n if (isset($parameters['iDisplayStart']) && $parameters['iDisplayLength'] != '-1') {\n $sOffset = $parameters['iDisplayStart'];\n $sLimit = $parameters['iDisplayLength'];\n }\n\n /*\n * Ordering\n */\n $sOrder = \"\";\n if (isset($parameters['iSortCol_0'])) {\n $sOrder = \"\";\n for ($i = 0; $i < intval($parameters['iSortingCols']); $i++) {\n if ($parameters['bSortable_' . intval($parameters['iSortCol_' . $i])] == \"true\") {\n $sOrder .= $aColumns[intval($parameters['iSortCol_' . $i])] . \"\n\t\t\t\t \t\" . ($parameters['sSortDir_' . $i]) . \", \";\n }\n }\n\n $sOrder = substr_replace($sOrder, \"\", -2);\n }\n\n /*\n * Filtering\n * NOTE this does not match the built-in DataTables filtering which does it\n * word by word on any field. It's possible to do here, but concerned about efficiency\n * on very large tables, and MySQL's regex functionality is very limited\n */\n $sWhere = \"\";\n if (isset($parameters['sSearch']) && $parameters['sSearch'] != \"\") {\n $searchArray = explode(\" \", $parameters['sSearch']);\n $sWhereSub = \"\";\n foreach ($searchArray as $search) {\n if ($sWhereSub == \"\") {\n $sWhereSub .= \"(\";\n } else {\n $sWhereSub .= \" AND (\";\n }\n $colSize = count($aColumns);\n\n for ($i = 0; $i < $colSize; $i++) {\n if ($i < $colSize - 1) {\n $sWhereSub .= $aColumns[$i] . \" LIKE '%\" . ($search) . \"%' OR \";\n } else {\n $sWhereSub .= $aColumns[$i] . \" LIKE '%\" . ($search) . \"%' \";\n }\n }\n $sWhereSub .= \")\";\n }\n $sWhere .= $sWhereSub;\n }\n\n /* Individual column filtering */\n for ($i = 0; $i < count($aColumns); $i++) {\n if (isset($parameters['bSearchable_' . $i]) && $parameters['bSearchable_' . $i] == \"true\" && $parameters['sSearch_' . $i] != '') {\n if ($sWhere == \"\") {\n $sWhere .= $aColumns[$i] . \" LIKE '%\" . ($parameters['sSearch_' . $i]) . \"%' \";\n } else {\n $sWhere .= \" AND \" . $aColumns[$i] . \" LIKE '%\" . ($parameters['sSearch_' . $i]) . \"%' \";\n }\n }\n }\n\n\n /*\n * SQL queries\n * Get data to display\n */\n\n $sQuery = $this->getAdapter()->select()->from(array('a' => $this->_name));\n\n if (isset($sWhere) && $sWhere != \"\") {\n $sQuery = $sQuery->where($sWhere);\n }\n\n if (isset($sOrder) && $sOrder != \"\") {\n $sQuery = $sQuery->order($sOrder);\n }\n\n if (isset($sLimit) && isset($sOffset)) {\n $sQuery = $sQuery->limit($sLimit, $sOffset);\n }\n\n //error_log($sQuery);\n\n $rResult = $this->getAdapter()->fetchAll($sQuery);\n\n\n /* Data set length after filtering */\n $sQuery = $sQuery->reset(Zend_Db_Select::LIMIT_COUNT);\n $sQuery = $sQuery->reset(Zend_Db_Select::LIMIT_OFFSET);\n $aResultFilterTotal = $this->getAdapter()->fetchAll($sQuery);\n $iFilteredTotal = count($aResultFilterTotal);\n\n /* Total data set length */\n $sQuery = $this->getAdapter()->select()->from($this->_name, new Zend_Db_Expr(\"COUNT('\" . $sIndexColumn . \"')\"));\n $aResultTotal = $this->getAdapter()->fetchCol($sQuery);\n $iTotal = $aResultTotal[0];\n\n /*\n * Output\n */\n $output = array(\n \"sEcho\" => intval($parameters['sEcho']),\n \"iTotalRecords\" => $iTotal,\n \"iTotalDisplayRecords\" => $iFilteredTotal,\n \"aaData\" => array()\n );\n\n\n foreach ($rResult as $aRow) {\n $row = array();\n $row[] = $aRow['readiness_checklist_id'];\n $row[] = $aRow['start_date'];\n $row[] = $aRow['end_date'];\n $row[] = $aRow['created_at'];\n $creator = new Application_Service_SystemAdmin();\n $creatorDetails = $creator->getSystemAdminDetails($aRow['created_by']);\n $row[] = $creatorDetails['first_name'] . \" \" . $creatorDetails['last_name'];\n $row[] = '<a href=\"/admin/readiness-checklist/viewresponse/id/' . $aRow['id'] \n . '\" class=\"btn btn-warning btn-xs\" style=\"margin-right: 2px;\">'\n .'<i class=\"icon-pencil\"></i> View Response</a> ';\n\n $output['aaData'][] = $row;\n }\n\n echo json_encode($output);\n }", "public function index()\n\t{\n\t\t$query = Parameter::query()->with('module');\n\t\t\n\t\tif(Input::query('keyword'))\n\t\t{\n\t\t\t$query->where('name', 'like', '%' . Input::query('keyword') . '%');\n\t\t}\n\t\t\n\t\tif(Input::query('module_id'))\n\t\t{\n\t\t\t$query->where('module_id', Input::query('module_id'));\n\t\t}\n\n\t\t$page = Input::query('page') ? Input::query('page') : 1;\n\t\t\n\t\t$per_page = Input::query('per_page') ? Input::query('per_page') : false;\n\t\t\n\t\t$list_total = $query->count();\n\t\t\n\t\tif($per_page)\n\t\t{\n\t\t\t$query->skip(($page - 1) * $per_page)->take($per_page);\n\t\t\t$list_start = ($page - 1) * $per_page + 1;\n\t\t\t$list_end = ($page - 1) * $per_page + $per_page;\n\t\t\tif($list_end > $list_total)\n\t\t\t{\n\t\t\t\t$list_end = $list_total;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$list_start = 1; $list_end = $list_total;\n\t\t}\n\t\t\n\t\t$results = $query->get();\n\t\t\n\t\treturn response($results)->header('Items-Total', $list_total)->header('Items-Start', $list_start)->header('Items-End', $list_end);\n\t}", "public function testGetList()\n {\n $result = $this->getQueryBuilderConnection()\n ->select('field')\n ->from('querybuilder_tests')\n ->where('id', '>', 7)\n ->getList();\n\n $expected = [\n 'iiii',\n 'jjjj',\n ];\n\n $this->assertEquals($expected, $result);\n }", "public function test_queries()\n\t{\n\t\t$this->setup_options_obj($input);\n\t\t$rpt = new Reports_Model($this->options);\n\t\t$rpt->set_option('start_time', 0);\n\t\t$rpt->set_option('end_time', time());\n\t\t$result = $rpt->test_summary_queries();\n\t\techo \"<pre>\\n\";\n\t\t$cnt = count($result);\n\t\techo $cnt . \" total different queries\\n\";\n\t\t$total_rows = 0.0;\n\t\tforeach ($result as $query => $ary) {\n\t\t\techo $query . \"\\n\";\n\t\t\tprint_r($ary);\n\t\t\t$total_rows += $ary['rows'];\n\t\t}\n\t\t$avg_rows = $total_rows / $cnt;\n\t\techo \"Average row-count: $avg_rows\\n\";\n\t\techo \"</pre>\\n\";\n\t\tdie;\n\t}", "public function getTaskList(Versionnable $versionnable);", "public function testRacaQueryList()\n {\n $racaGraphqlRequest = new RacaGraphqlRequest();\n\n $pagination = new ForwardPaginationQuery(3);\n $racas = $racaGraphqlRequest->queryList($pagination)->getResults();\n\n $this->assertIsArray($racas->edges);\n $this->assertIsObject($racas->pageInfo);\n }", "public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }", "function getList( &$pListHash ) {\n\t\tLibertyContent::prepGetList( $pListHash );\n\t\t\n\t\t$whereSql = $joinSql = $selectSql = '';\n\t\t$bindVars = array();\n// Update to more flexible date management later\n\t\tarray_push( $bindVars, 'TODAY' );\n\t\tarray_push( $bindVars, 'TOMORROW' );\n//\t\t$this->getServicesSql( 'content_list_sql_function', $selectSql, $joinSql, $whereSql, $bindVars );\n\n\t\tif ( isset($pListHash['queue_id']) ) {\n\t\t\t$whereSql .= \" AND ti.`room` = 80 + ? \";\n\t\t\tarray_push( $bindVars, $pListHash['queue_id'] );\n\t\t}\n\n// init_id and staff_id will map to creator_user_id and modifier_user_id when fully converted to LC\n// , lc.* \t\t\t\tINNER JOIN `\".BIT_DB_PREFIX.\"liberty_content` lc ON ( lc.`content_id` = ci.`content_id` )\n\n\t\t$query = \"SELECT ti.*, ci.*, tr.`title` as reason,\n\t\t\t\tuue.`login` AS modifier_user, uue.`real_name` AS modifier_real_name,\n\t\t\t\tuuc.`login` AS creator_user, uuc.`real_name` AS creator_real_name $selectSql\n\t\t\t\tFROM `\".BIT_DB_PREFIX.\"task_ticket` ti \n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"users_users` uue ON (uue.`user_id` = ti.`staff_id`)\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"users_users` uuc ON (uuc.`user_id` = ti.`init_id`)\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"citizen` ci ON (ci.`usn` = ti.`usn`)\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"task_reason` tr ON (tr.`reason` = ti.`tags`)\n\t\t\t\t$joinSql\n\t\t\t\tWHERE ti.`ticket_ref` BETWEEN ? AND ? $whereSql \n\t\t\t\torder by ti.`ticket_ref`\";\n\t\t$query_cant = \"SELECT COUNT(ti.`ticket_no`) FROM `\".BIT_DB_PREFIX.\"task_ticket` ti\n\t\t\t\t$joinSql\n\t\t\t\tWHERE ti.`ticket_ref` BETWEEN ? AND ? $whereSql\";\n\n\t\t$ret = array();\n\t\t$this->mDb->StartTrans();\n\t\t$result = $this->mDb->query( $query, $bindVars, $pListHash['max_records'], $pListHash['offset'] );\n\t\t$cant = $this->mDb->getOne( $query_cant, $bindVars );\n\t\t$this->mDb->CompleteTrans();\n\n\t\twhile ($res = $result->fetchRow()) {\n\t\t\t$res['ticket_url'] = $this->getDisplayUrlFromHasH( $res );\n\t\t\t$ret[] = $res;\n\t\t}\n\n\t\t$pListHash['cant'] = $cant;\n\t\tLibertyContent::postGetList( $pListHash );\n\t\treturn $ret;\n\t}", "public function getResults($studId, $overviewId) {\n global $ilDB, $lng;\n $average;\n $maxPoints;\n\n $data = array();\n \n $query = \"SELECT ref_id_test FROM rep_robj_xtov_t2o WHERE obj_id_overview = %s\";\n $result = $ilDB->queryF($query, array('integer'), array($overviewId));\n $tpl = new ilTemplate(\"tpl.stud_view.html\", true, true, \"Customizing/global/plugins/Services/Repository/RepositoryObject/TestOverview\");\n //Internationalization\n $lng->loadLanguageModule(\"assessment\");\n $lng->loadLanguageModule(\"certificate\");\n $lng->loadLanguageModule(\"rating\");\n $lng->loadLanguageModule(\"common\");\n $lng->loadLanguageModule(\"trac\");\n $tpl->setCurrentBlock(\"head_row\");\n $tpl->setVariable(\"test\", $lng->txt(\"rep_robj_xtov_testOverview\"));\n $tpl->setVariable(\"exercise\", $lng->txt(\"rep_robj_xtov_ex_overview\"));\n $tpl->setVariable(\"testTitle\", $lng->txt(\"certificate_ph_testtitle\"));\n $tpl->setVariable(\"score\", $lng->txt(\"toplist_col_score\"));\n $tpl->parseCurrentBlock();\n $tpl->setVariable(\"average\", $lng->txt('rep_robj_xtov_avg_points'));\n $tpl->setVariable(\"averagePercent\", $lng->txt(\"trac_average\"));\n $tpl->setVariable(\"exerciseTitle\", $lng->txt(\"certificate_ph_exercisetitle\"));\n $tpl->setVariable(\"mark\", $lng->txt(\"tst_mark\"));\n $tpl->setVariable(\"studentRanking\", $lng->txt(\"toplist_your_result\"));\n //Baut aus den Einzelnen Zeilen Objekte\n while ($testObj = $ilDB->fetchObject($result)) {\n array_push($data, $testObj);\n }\n\n\n foreach ($data as $set) {\n $result = $this-> getTestData($studId,$set->ref_id_test);\n $timestamp = time();\n //$datum = (float) date(\"YmdHis\", $timestamp);\n\n $testTime = (float) $result->ending_time;\n \n \n\n /* Checks if the test has been finished or if no end time is given */\n if ((($testTime - $timestamp) < 0 || $result->timeded == 0) && $this->isTestDeleted($set->ref_id_test) == null && $result != null ) {\n $tpl->setCurrentBlock(\"test_results\");\n $tpl->setVariable(\"Name\", $result->title);\n $average += $result->points;\n $maxPoints += $result->maxpoints;\n if ($result->points > ($result->maxpoints / 2)) {\n $pointsHtml = \"<td class='green-result'>\" . $result->points . \"</td>\";\n } else {\n $pointsHtml = \"<td class='red-result'>\" . $result->points . \"</td>\";\n }\n $tpl->setVariable(\"Point\", $pointsHtml);\n\n $tpl->parseCurrentBlock();\n }\n }\n ////Exercise Part ////\n require_once ilPlugin::getPluginObject(IL_COMP_SERVICE, 'Repository', 'robj', 'TestOverview')\n ->getDirectory() . '/classes/mapper/class.ilExerciseMapper.php';\n $excMapper = new ilExerciseMapper();\n $grades = $this->getExerciseMarks($studId, $overviewId);\n $totalGrade = 0;\n\n foreach ($grades as $grade) {\n if ($this->isExerciseDeleted($grade->obj_id) == null) {\n $gradeName = $excMapper->getExerciseName($grade->obj_id);\n $totalGrade += $grade->mark;\n $tpl->setCurrentBlock(\"exercise_results\");\n $tpl->setVariable(\"Exercise\", $gradeName);\n $tpl->setVariable(\"Mark\", $grade->mark);\n $tpl->parseCurrentBlock();\n }\n }\n\n //// general Part /////\n if ($this->getNumTests($overviewId) == 0) {\n $averageNum = 0;\n } else {\n $averageNum = round($average / $this->getNumTests($overviewId), 2);\n }\n $tpl->setVariable(\"AveragePoints\", $averageNum);\n if ($maxPoints == 0) {\n $Prozentnum = 0;\n } else {\n $Prozentnum = (float) ($average / $maxPoints) * 100;\n }\n $lng->loadLanguageModule(\"crs\");\n $tpl->setVariable(\"averageMark\", $lng->txt('rep_robj_xtov_average_mark'));\n\n if (count($grades) > 0) {\n\n $tpl->setVariable(\"AverageMark\", $totalGrade / count($grades));\n }\n $tpl->setVariable(\"totalMark\", $lng->txt('rep_robj_xtov_total_mark'));\n $tpl->setVariable(\"TotalMark\", $totalGrade);\n\n $tpl->setVariable(\"Average\", round($Prozentnum, 2));\n /// ranking part /////\n $ilOverviewMapper = new ilOverviewMapper();\n $rank = $ilOverviewMapper->getRankedStudent($overviewId, $studId);\n $count = $ilOverviewMapper->getCount($overviewId);\n $date = $ilOverviewMapper->getDate($overviewId);\n if (!$rank == '0') {\n $tpl->setVariable(\"toRanking\", $rank . \" \" . $lng->txt('rep_robj_xtov_out_of') . \" \" . $count . \"<br> \".$lng->txt('rep_robj_xtov_lastupdate').\": \" . $date);\n } else {\n $tpl->setVariable(\"toRanking\", $lng->txt('links_not_available'));\n }\n $ilExerciseMapper = new ilExerciseMapper();\n $rank = $ilExerciseMapper->getRankedStudent($overviewId, $studId);\n $count = $ilExerciseMapper->getCount($overviewId);\n $date = $ilExerciseMapper->getDate($overviewId);\n if (!$rank == '0') {\n $tpl->setVariable(\"eoRanking\", $rank . \" \" . $lng->txt('rep_robj_xtov_out_of') . \" \" . $count . \"<br> \".$lng->txt('rep_robj_xtov_lastupdate').\": \" . $date);\n } else {\n $tpl->setVariable(\"eoRanking\", $lng->txt('links_not_available'));\n }\n\n return $tpl->get();\n }", "public function getTests();", "public function shortlistResultsAction()\n {\n $datatable = $this->get('pixeloid_app.datatable.shortlist');\n $datatable->buildDatatable();\n\n $query = $this->get('sg_datatables.query')->getQueryFrom($datatable);\n\n $function = function($qb)\n {\n $qb->andWhere(\"eventregistration.shortlist = :r\");\n $qb->andWhere(\"eventregistration.created > :date\");\n $qb->setParameters(array(\n 'r' => true,\n 'date' => new \\DateTime('2016-07-01')\n ));\n };\n\n // // $query->addWhereAll($function);\n\n // // return $query->getResponse();\n $query->addWhereAll($function);\n\n // // Or add the callback function as WhereAll\n // //$query->addWhereAll($function);\n\n // // Or to the actual query\n // $query->buildQuery();\n // $qb = $query->getQuery();\n\n // //$qb->addSelect(\"eventregistration.email\");\n // //$qb->andWhere(\"moviecategories.shortlist = 1\");\n\n // var_dump($qb->getQuery()->getSQL());\n // exit;\n\n // $query->setQuery($qb);\n return $query->getResponse();\n\n }", "function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}", "protected function _executeGetList() {\n // Init\n $list = array();\n\n $pid = (int)$this->_postVar['pid'];\n $offset = (int)$this->_postVar['start'];\n $limit = (int)$this->_postVar['limit'];\n $itemsPerPage = (int)$this->_postVar['pagingSize'];\n $depth = (int)$this->_postVar['depth'];\n $sysLanguage = (int)$this->_postVar['sysLanguage'];\n $listType = (string)$this->_postVar['listType'];\n\n // Store last selected language\n $GLOBALS['BE_USER']->setAndSaveSessionData('TQSeo.sysLanguage', $sysLanguage);\n\n if (!empty($pid)) {\n $page = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord('pages', $pid);\n\n $fieldList = array();\n\n switch ($listType) {\n case 'metadata':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'keywords',\n 'description',\n 'abstract',\n 'author',\n 'author_email',\n 'lastupdated',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n\n unset($row);\n foreach ($list as &$row) {\n if (!empty($row['lastupdated'])) {\n $row['lastupdated'] = date('Y-m-d', $row['lastupdated']);\n } else {\n $row['lastupdated'] = '';\n }\n }\n unset($row);\n break;\n\n case 'geo':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_geo_lat',\n 'tx_tqseo_geo_long',\n 'tx_tqseo_geo_place',\n 'tx_tqseo_geo_region'\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'searchengines':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_canonicalurl',\n 'tx_tqseo_is_exclude',\n 'tx_tqseo_priority',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'url':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'title',\n 'url_scheme',\n 'alias',\n 'tx_realurl_pathsegment',\n 'tx_realurl_pathoverride',\n 'tx_realurl_exclude',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitle':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_pagetitle',\n 'tx_tqseo_pagetitle_rel',\n 'tx_tqseo_pagetitle_prefix',\n 'tx_tqseo_pagetitle_suffix',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitlesim':\n $buildTree = FALSE;\n $list = $this->_listPageTitleSim($page, $depth, $sysLanguage);\n break;\n\n default:\n // Not defined\n return;\n break;\n }\n }\n\n $ret = array(\n 'results' => count($list),\n 'rows' => array_values($list),\n );\n\n return $ret;\n }", "public function unitTests($unit) {\n\t\techo \"<p>Search Results Tests:</p><ul>\";\n\t\t\n\t\techo \"<li>Known Valid Search\";\n\t\t$searchStr = $this->search(\"motrin\");\n\t\t$searchObj = $this->search(\"motrin\", true);\n\n\t\techo $unit->run($searchStr,'is_string', 'String Requested, String Returned');\n\t\techo $unit->run($searchObj,'is_object', 'Object Requested, Object Returned');\n\t\techo $unit->run($searchObj->error,'is_null', 'Error object is null');\n\t\techo $unit->run(count($searchObj->results) > 0, true, \"Result object results array has contents.\");\n\n\t\techo \"</li>\";\n\n\t\techo \"<li>Known Invalid Search\";\n\t\t$searchStr = $this->search(\"wallbutrin\");\n\t\t$searchObj = $this->search(\"wallbutrin\", true);\n\n\t\techo $unit->run($searchStr,'is_string', \"String Requested, String Returned\");\n\t\techo $unit->run($searchObj,'is_object', \"Object Requested, Object Returned\");\n\t\techo $unit->run($searchObj->error, 'is_object', \"Error object is valid\");\n\t\techo $unit->run($searchObj->error->code, 'NOT_FOUND', \"Error object contains code NOT_FOUND\");\n\n\t\techo \"</li>\";\n\n\t\techo \"<li>Empty Search\";\n\t\t$searchStr = $this->search(\"\");\n\t\t$searchObj = $this->search(\"\", true);\n\n\t\techo $unit->run($searchStr, 'is_string', \"String Requested, String Returned\");\n\t\techo $unit->run($searchObj, 'is_object', \"Object Requested, Object Returned\");\n\t\techo $unit->run($searchObj->error, 'is_object', \"Error object is valid\");\n\t\techo $unit->run($searchObj->error->code, 'NOT_FOUND', \"Error object contains code NOT_FOUND\");\n\n\t\techo \"</li>\";\n\n\t\techo \"</ul>\";\n\n\t\techo \"<p>Cache Results Tests</p><ul>\";\n\t\t$cacheTerm = \"testingTerm\";\n\t\t$cacheDataIn = json_encode(array('test' => true, 'error' => false));\n\n\t\techo \"<li>Cache sanity\";\n\t\t$this->_setCache($cacheTerm, $cacheDataIn);\n\t\t$cacheDataOut = $this->_getCache($cacheTerm);\n\n\t\techo $unit->run($cacheDataOut, $cacheDataIn, \"Cache returns the same values it was given\");\n\n\t\t$this->_invalidateCache($cacheTerm);\n\t\t$fetchResult = $this->_getCache($cacheTerm);\n\n\t\techo $unit->run($fetchResult, 'is_false', \"Invalidated cache entry does not return a result\");\n\n\t\techo \"</li>\";\n\n\t\techo \"<li>Cache actually used and updated by search\";\n\t\t$cacheTerm = 'motrin';\n\t\t$this->_invalidateCache($cacheTerm);\n\t\t$fetchResult = $this->_getCache($cacheTerm);\n\n\t\techo $unit->run($fetchResult, 'is_false', \"Known Search cache invalidated\");\n\t\t$searchResult = $this->search($cacheTerm);\n\n\t\techo $unit->run($searchResult, 'is_string', \"Known Search returns string\");\n\n\t\t$fetchResult = $this->_getCache($cacheTerm);\n\t\techo $unit->run($searchResult, $fetchResult, \"Known search and cache entry match\");\n\n\t\t$searchResult2 = $this->search($cacheTerm);\n\t\techo $unit->run($searchResult2, $searchResult, \"Search returns same on cache miss and hit\");\n\n\t\techo \"</li>\";\n\t\techo \"</ul>\";\n\t}", "public function queryAll()\n {\n $sql = <<<SQL\n SELECT s.*, p.title as program_name \n FROM ec_shows s, ec_programs p\n WHERE s.program_id = p.id\nSQL;\n $sqlQuery = new SqlQuery($sql);\n return $this->getList($sqlQuery);\n }", "public function getResults();", "public function testAllList($name, $arguments)\n {\n self::executeMethod($name, $arguments);\n }", "public function getParametersList(){\n return $this->_get(2);\n }" ]
[ "0.73226017", "0.6624948", "0.6336134", "0.58861375", "0.55306727", "0.5504608", "0.54939806", "0.54709995", "0.54501486", "0.5442788", "0.5413821", "0.5352903", "0.5348716", "0.52224696", "0.5195745", "0.5179562", "0.5159386", "0.5152746", "0.50465554", "0.50460404", "0.5044701", "0.5043968", "0.5017851", "0.50161415", "0.50159705", "0.4974009", "0.49670684", "0.49661815", "0.49628198", "0.49438003" ]
0.7515194
0
/ create Create A New TestRun Usage TestRun.create Parameters ParameterData TypeComments new_valueshashmapSee required attributes list below. Required attributes: build_id, environment, manager, plan_id, plan_text_version, and summary. Result run_id
function TestRun_create($build_id, $environment_id, $manager_id, $plan_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) { $varray = array("build_id" => "int", "environment_id" => "int", "manager_id" => "int", "plan_id" => "int", "plan_text_version" => "int", "summary" => "string", "notes" => "string", "start_date" => "string", "stop_date" => "string"); foreach($varray as $key => $val) { if (isset(${$key})) { $carray[$key] = new xmlrpcval(${$key}, $val); } } // Create call $call = new xmlrpcmsg('TestRun.create', array(new xmlrpcval($carray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCaseRun_create($assignee, $build_id, $case_id, $case_text_version, $environment_id, $run_id, $canview = NULL, $close_date = NULL, $iscurrent = NULL, $notes = NULL, $sortkey = NULL, $testedby = NULL) {\n\t$varray = array(\"assignee\" => \"int\", \"build_id\" => \"int\", \"case_id\" => \"int\", \"case_text_version\" => \"int\", \"environment_id\" => \"int\", \"run_id\" => \"int\", \"canview\" => \"int\", \"close_date\" => \"string\", \"iscurrent\" => \"int\", \"notes\" => \"string\", \"sortkey\" => \"int\", \"testedby\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_create($author_id, $case_status_id, $category_id, $isautomated, $plan_id, $alias = NULL, $arguments = NULL, $canview = NULL, $creation_date = NULL, $default_tester_id = NULL, $priority_id = NULL, $requirement = NULL, $script = NULL, $summary = NULL, $sortkey = NULL) {\n\t$varray = array(\"author_id\" => \"int\", \"case_status_id\" => \"int\", \"category_id\" => \"int\", \"isautomated\" => \"int\", \"plan_id\" => \"int\", \"alias\" => \"string\", \"arguments\" => \"string\", \"canview\" => \"int\", \"creation_date\" => \"string\", \"default_tester_id\" => \"int\", \"priority_id\" => \"int\", \"requirement\" => \"string\", \"script\" => \"string\", \"summary\" => \"string\", \"sortkey\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function create( array $parameters );", "public function create( array $parameters );", "function TestPlan_create($author_id, $product_id, $default_product_version, $type_id, $name, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function test_calledCreateMethod_withValidParameters_argumentsHasBeenSetted()\n {\n $dataContainerMock = $this->getDataConteinerMock();\n\n $sut = DataWrapper::create(\n 200,\n \"Ok\",\n \"copyright\",\n \"attribution text\",\n \"attribution HTML\",\n $dataContainerMock,\n \"etag\"\n );\n\n $this->assertEquals(200, $sut->getCode());\n $this->assertEquals(\"Ok\", $sut->getStatus());\n $this->assertEquals(\"copyright\", $sut->getCopyright());\n $this->assertEquals(\"attribution text\", $sut->getAttributionText());\n $this->assertEquals(\"attribution HTML\", $sut->getAttributionHTML());\n $this->assertEquals(\"etag\", $sut->getEtag());\n }", "public function createAction() {\n\n $this->validateUser();\n\n $form = new Yourdelivery_Form_Testing_Create();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->getRequest()->getPost())) {\n if ($form->getValue('tag') && $this->getRequest()->getParam('proceed') == 'false') {\n $tags = Yourdelivery_Model_Testing_TestCase::searchForTags($form->getValue('tag'));\n\n if ($tags) {\n foreach ($tags as $tag) {\n $ids .= sprintf('<a href=\"/testing_cms/overview/id/%s\" target=\"blank\">%s</a> ', $tag['id'], $tag['id']);\n }\n $this->warn('Tag already in use for testcase ' . $ids);\n $this->_redirect(vsprintf('testing_cms/create/title/%s/author/%s/description/%s/priority/%s/tag/%s/proceed/true', $form->getValues()));\n }\n }\n\n $testCase = new Yourdelivery_Model_Testing_TestCase();\n $testCase->setData($form->getValues());\n $id = $testCase->save();\n $this->success('Testcase successfully created.');\n $this->_redirect('testing_cms/add/id/' . $id);\n } else {\n $this->error($form->getMessages());\n }\n }\n $this->view->post = $this->getRequest()->getParams();\n }", "public function create($plan, array $properties = array());", "function add_scheduled_test($params)\n {\n $this->db->insert('scheduled_tests',$params);\n return $this->db->insert_id();\n }", "public function create($params);", "public static function apiCreate(Request $r) {\n\t\t// Init\n\t\tself::initializeGrader();\n\n\t\t// Authenticate user\n\t\tself::authenticateRequest($r);\n\n\t\t// Validate request\n\t\tself::validateCreateRequest($r);\n\n\t\tLogger::log(\"New run being submitted !!\");\n\t\t$response = array();\n\n\t\tif (self::$practice) {\n\t\t\t$submit_delay = 0;\n\t\t\t$contest_id = null;\n\t\t\t$test = 0;\n\t\t} else {\n\t\t\t//check the kind of penalty_time_start for this contest\n\t\t\t$penalty_time_start = $r[\"contest\"]->getPenaltyTimeStart();\n\n\t\t\tswitch ($penalty_time_start) {\n\t\t\t\tcase \"contest\":\n\t\t\t\t\t// submit_delay is calculated from the start\n\t\t\t\t\t// of the contest\n\t\t\t\t\t$start = $r[\"contest\"]->getStartTime();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"problem\":\n\t\t\t\t\t// submit delay is calculated from the \n\t\t\t\t\t// time the user opened the problem\n\t\t\t\t\t$opened = ContestProblemOpenedDAO::getByPK(\n\t\t\t\t\t\t\t\t\t$r[\"contest\"]->getContestId(), $r[\"problem\"]->getProblemId(), $r[\"current_user_id\"]\n\t\t\t\t\t);\n\n\t\t\t\t\tif (is_null($opened)) {\n\t\t\t\t\t\t//holy moly, he is submitting a run \n\t\t\t\t\t\t//and he hasnt even opened the problem\n\t\t\t\t\t\t//what should be done here?\n\t\t\t\t\t\tLogger::error(\"User is submitting a run and he has not even opened the problem\");\n\t\t\t\t\t\tthrow new Exception(\"User is submitting a run and he has not even opened the problem\");\n\t\t\t\t\t}\n\n\t\t\t\t\t$start = $opened->getOpenTime();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"none\":\n\t\t\t\t\t//we dont care\n\t\t\t\t\t$start = null;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tLogger::error(\"penalty_time_start for this contests is not a valid option, asuming `none`.\");\n\t\t\t\t\t$start = null;\n\t\t\t}\n\n\t\t\tif (!is_null($start)) {\n\t\t\t\t//ok, what time is it now?\n\t\t\t\t$c_time = time();\n\t\t\t\t$start = strtotime($start);\n\n\t\t\t\t//asuming submit_delay is in minutes\n\t\t\t\t$submit_delay = (int) (( $c_time - $start ) / 60);\n\t\t\t} else {\n\t\t\t\t$submit_delay = 0;\n\t\t\t}\n\n\t\t\t$contest_id = $r[\"contest\"]->getContestId();\n\t\t\t$test = Authorization::IsContestAdmin($r[\"current_user_id\"], $r[\"contest\"]) ? 1 : 0;\n\t\t}\n\n\t\t// Populate new run object\n\t\t$run = new Runs(array(\n\t\t\t\t\t\"user_id\" => $r[\"current_user_id\"],\n\t\t\t\t\t\"problem_id\" => $r[\"problem\"]->getProblemId(),\n\t\t\t\t\t\"contest_id\" => $contest_id,\n\t\t\t\t\t\"language\" => $r[\"language\"],\n\t\t\t\t\t\"source\" => $r[\"source\"],\n\t\t\t\t\t\"status\" => \"new\",\n\t\t\t\t\t\"runtime\" => 0,\n\t\t\t\t\t\"memory\" => 0,\n\t\t\t\t\t\"score\" => 0,\n\t\t\t\t\t\"contest_score\" => 0,\n\t\t\t\t\t\"ip\" => $_SERVER['REMOTE_ADDR'],\n\t\t\t\t\t\"submit_delay\" => $submit_delay, /* based on penalty_time_start */\n\t\t\t\t\t\"guid\" => md5(uniqid(rand(), true)),\n\t\t\t\t\t\"veredict\" => \"JE\",\n\t\t\t\t\t\"test\" => $test\n\t\t\t\t));\n\n\t\ttry {\n\t\t\t// Push run into DB\n\t\t\tRunsDAO::save($run);\n\t\t\t\n\t\t\t// Update submissions counter++\n\t\t\t$r[\"problem\"]->setSubmissions($r[\"problem\"]->getSubmissions() + 1);\n\t\t\tProblemsDAO::save($r[\"problem\"]);\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t// Operation failed in the data layer\n\t\t\tthrow new InvalidDatabaseOperationException($e);\n\t\t}\n\n\t\ttry {\n\t\t\t// Create file for the run \n\t\t\t$filepath = RUNS_PATH . DIRECTORY_SEPARATOR . $run->getGuid();\n\t\t\tFileHandler::CreateFile($filepath, $r[\"source\"]);\n\t\t} catch (Exception $e) {\n\t\t\tthrow new InvalidFilesystemOperationException($e);\n\t\t}\n\n\t\t// Call Grader\n\t\ttry {\n\t\t\tself::$grader->Grade($run->getRunId());\n\t\t} catch (Exception $e) {\n\t\t\tLogger::error(\"Call to Grader::grade() failed:\");\n\t\t\tLogger::error($e);\n\t\t}\n\n\t\tif (self::$practice) {\n\t\t\t$response['submission_deadline'] = 0;\n\t\t} else {\n\t\t\t// Add remaining time to the response\n\t\t\ttry {\n\t\t\t\t$contest_user = ContestsUsersDAO::getByPK($r[\"current_user_id\"], $r[\"contest\"]->getContestId());\n\n\t\t\t\tif ($r[\"contest\"]->getWindowLength() === null) {\n\t\t\t\t\t$response['submission_deadline'] = strtotime($r[\"contest\"]->getFinishTime());\n\t\t\t\t} else {\n\t\t\t\t\t$response['submission_deadline'] = min(strtotime($r[\"contest\"]->getFinishTime()), strtotime($contest_user->getAccessTime()) + $r[\"contest\"]->getWindowLength() * 60);\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\t// Operation failed in the data layer\n\t\t\t\tthrow new InvalidDatabaseOperationException($e);\n\t\t\t}\n\t\t}\n\n\t\t// Happy ending\n\t\t$response[\"guid\"] = $run->getGuid();\n\t\t$response[\"status\"] = \"ok\";\n\n\t\tif (!self::$practice) {\n\t\t\t/// @todo Invalidate cache only when this run changes a user's score\n\t\t\t/// (by improving, adding penalties, etc)\n\t\t\tself::InvalidateScoreboardCache($r[\"contest\"]->getContestId());\n\t\t}\n\n\t\treturn $response;\n\t}", "private static function createSampleData()\n\t{\n\t\tself::createSampleObject(1, \"Issue 1\", 1);\n\t\tself::createSampleObject(2, \"Issue 2\", 1);\n\t}", "public function create($params)\n {\n }", "public function run()\n {\n DB::table('parameters')->insert([\n 'name' => 'Systolic Blood Pressure',\n 'unit' => 'mmHg',\n 'measurement_times' => '3',\n 'measurement_span' => 'week',\n 'threshold_max' => 120,\n 'instructions_en' => '<p><b>Be still.</b> Do not smoke, drink caffeinated beverages or exercise within 30 minutes before measuring your blood pressure. Empty your bladder and ensure at least 5 minutes of quiet rest before measurements.</p><p><b>Sit correctly.</b> Sit with your back straight and supported (on a dining chair, rather than a sofa). Your feet should be flat on the floor and your legs should not be crossed. Your arm should be supported on a flat surface (such as a table) with the upper arm at heart level. Make sure the bottom of the cuff is placed directly above the bend of the elbow. Check your monitor\\'s instructions for an illustration.</p><p><b>Measure at the same time every day.</b> It’s important to take the readings at the same time each day, such as morning and evening.</p><p><b>Do not take the measurement over clothes.</b></p>',\n 'instructions_sk' => '<p><b>Nehýbte sa.</b> Nefajčite, nepite kofeinové nápoje a necvičte aspoň 30 minút pred meraním krvného tlaku. Vyprázdnite močový mechúr a zaistite si aspoň 5 minút tichého odpočinku pred meraním.</p><p><b>Seďte správne.</b> Seďte s vystretým chrbtom a opretí (skôr na kuchynskej stoličke než na kresle). Chodidlá položte plocho na podlahu a nohy neprekladajte. Ruku položte na plochý povrch (napríklad na stôl) tak, aby Vaša horná ruka bola vo výške srdca. Uistite sa, že spodok tlakomeru je priamo nad zahnutím lakťa. Skontrolujte, či Váš tlakomer nemá inštrukcie s ilustráciami.</p><p><b>Merajte v rovnaký čas každý deň.</b> Je dôležité merať si tlak v rovnaký čas každý deň, napríklad každé ráno alebo každý večer.</p><p><b>Tlakomer nesmie byť na oblečení.</b></p>',\n ]);\n\n DB::table('parameters')->insert([\n 'name' => 'Diastolic Blood Pressure',\n 'unit' => 'mmHg',\n 'measurement_times' => '3',\n 'measurement_span' => 'week',\n 'threshold_max' => 80,\n 'instructions_en' => '<p><b>Be still.</b> Do not smoke, drink caffeinated beverages or exercise within 30 minutes before measuring your blood pressure. Empty your bladder and ensure at least 5 minutes of quiet rest before measurements.</p><p><b>Sit correctly.</b> Sit with your back straight and supported (on a dining chair, rather than a sofa). Your feet should be flat on the floor and your legs should not be crossed. Your arm should be supported on a flat surface (such as a table) with the upper arm at heart level. Make sure the bottom of the cuff is placed directly above the bend of the elbow. Check your monitor\\'s instructions for an illustration.</p><p><b>Measure at the same time every day.</b> It’s important to take the readings at the same time each day, such as morning and evening.</p><p><b>Do not take the measurement over clothes.</b></p>',\n 'instructions_sk' => '<p><b>Nehýbte sa.</b> Nefajčite, nepite kofeinové nápoje a necvičte aspoň 30 minút pred meraním krvného tlaku. Vyprázdnite močový mechúr a zaistite si aspoň 5 minút tichého odpočinku pred meraním.</p><p><b>Seďte správne.</b> Seďte s vystretým chrbtom a opretí (skôr na kuchynskej stoličke než na kresle). Chodidlá položte plocho na podlahu a nohy neprekladajte. Ruku položte na plochý povrch (napríklad na stôl) tak, aby Vaša horná ruka bola vo výške srdca. Uistite sa, že spodok tlakomeru je priamo nad zahnutím lakťa. Skontrolujte, či Váš tlakomer nemá inštrukcie s ilustráciami.</p><p><b>Merajte v rovnaký čas každý deň.</b> Je dôležité merať si tlak v rovnaký čas každý deň, napríklad každé ráno alebo každý večer.</p><p><b>Tlakomer nesmie byť na oblečení.</b></p>',\n ]);\n\n DB::table('parameters')->insert([\n 'name' => 'Heart Rate',\n 'unit' => 'bpm',\n 'measurement_times' => '3',\n 'measurement_span' => 'week',\n 'threshold_min' => 60,\n 'threshold_max' => 100,\n 'instructions_en' => '<p>Do not measure your heart rate within one to two hours after exercise or a stressful event. Your heart rate can stay elevated after strenuous activities.</p><p>Wait an hour after consuming caffeine, which can cause heart palpitations and make your heart rate rise.</p><p>Do not take the reading after you have been sitting or standing for a long period, which can affect your heart rate.</p>',\n 'instructions_sk' => '<p>Nemerajte svoj tep srdca aspoň hodinu - dve po cvičení alebo po stresujúcej udalosti. Váš tep môže ostať zvýšený po náročných aktivitách.</p><p>Počkajte hodinu po konzumovaní kofeínu, keďže môže spôsobiť búšenie srdca a zvýšiť tep.</p><p>Nemerajte sa po tom, čo ste sedeli alebo stáli dlhú dobu, čo môže ovplyvniť Váš tep srdca.</p>',\n ]);\n\n DB::table('parameters')->insert([\n 'name' => 'SpO2',\n 'unit' => '%',\n 'measurement_times' => '1',\n 'measurement_span' => 'week',\n 'threshold_min' => 95,\n 'instructions_en' => '<p>Remove any nail polish from the finger you will use to take the measurement - always use the same finger.</p><p>Place the place oximeter on the finger and start the measurement. You may feel a small amount of pressure, but no pain or pinching.</p>',\n 'instructions_sk' => '<p>Odstráňte lak z nechta, na ktorom budete vykonávať meranie - vždy používajte rovnaký prst.</p><p>Nasaďte si oxymeter na prst a začnite meranie. Môžete cítiť malý tlak, ale nemali by ste cítiť bolesť či zovretie.</p>',\n ]);\n\n DB::table('parameters')->insert([\n 'name' => 'Weight',\n 'unit' => 'kg',\n 'measurement_times' => '1',\n 'measurement_span' => 'day',\n 'instructions_en' => '<p>For the most accurate weight, weigh yourself first thing in the morning.</p><p>Be consistent when you weigh yourself. Weigh yourself at the same time. If you go to the bathroom before you weigh yourself, go before you do it again next time. You can weigh yourself naked every time or try wearing the same clothes.</p>',\n 'instructions_sk' => '<p>Pre najpresnejšiu hmotnosť sa merajte ráno po zobudení.</p><p>Buďte konzistentní keď sa vážite. Vážte sa v rovnaký čas dňa. Ak pred odvážením sa použijete toaletu, použite ju znova nabudúce pred vážením sa. Môžete sa vážiť zakaždým nahí alebo skúste mať oblečené vždy rovnaké oblečenie.</p>',\n ]);\n\n DB::table('parameters')->insert([\n 'name' => 'Weight Change',\n 'unit' => 'kg',\n 'measurement_times' => '1',\n 'measurement_span' => 'day',\n 'threshold_max' => 2,\n 'fillable' => false,\n ]);\n\n DB::table('parameters')->insert([\n 'name' => 'ECG',\n 'measurement_times' => '1',\n 'measurement_span' => 'week',\n 'unit' => 'mV',\n 'instructions_en' => 'N/A',\n 'instructions_sk' => 'N/A',\n ]);\n }", "public function run()\n {\n $parameters = array(\n array('name' => 'Мужские соц. роли'),\n array('name' => 'Женские соц. роли'),\n array('name' => 'Соц. роли')\n );\n\n // Uncomment the below to run the seeder\n DB::table('parameters')->insert($parameters);\n }", "public function createTask ($summary, $description, $project, $assignee, $type, $priority, $status, $component, $version) {\r\n\t\t$db = new DB();\r\n\t\t$db->connect();\r\n\t\t\r\n\t\t$summary = $db->esc($summary);\r\n\t\t$description = $db->esc($description);\r\n\t\t$project = $db->esc($project);\r\n\t\t$assignee = $db->esc($assignee);\r\n\t\t$type = $db->esc($type);\r\n\t\t$priority = $db->esc($priority);\r\n\t\t$status = $db->esc($status);\r\n\t\t$component = $db->esc($component);\r\n\t\t$version = $db->esc($version);\r\n\t\t\r\n\t\tif ($assignee == 0) {\r\n\t\t\t$assignee = \"null\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$assignee = \"'\".$assignee.\"'\";\r\n\t\t}\r\n\t\t\r\n\t\tif ($component == 0) {\r\n\t\t\t$component = \"null\";\r\n\t\t}\r\n\t\t\r\n\t\tif ($version == 0) {\r\n\t\t\t$version = \"null\";\r\n\t\t}\r\n\t\t\r\n\t\t$sql = \"INSERT INTO `task` (`summary`, `description`, `status_id`, `project_id`, `creator_id`, \r\n\t\t\t\t `assignee_id`, `createDate`, `tasktype_id`, `priority`, `active`, `component_id`, `version_id`) \r\n\t\t\t\tVALUES ('$summary', '$description', '$status', '$project', '\".$_SESSION['nobug'.RANDOMKEY.'userId'].\"',\r\n\t\t\t\t$assignee, '\".$db->toDate(time()).\"', '$type', '$priority', '1', $component, $version);\";\r\n\t\t$db->query($sql);\t\r\n\t}", "public function testCreateProcess () {\n $faker = \\Faker\\Factory::create();\n $process = [\n 'name' => $faker->name,\n 'description' => $faker->text,\n 'code' => $faker->text,\n 'status' => $faker->boolean\n ];\n $response = $this->json('POST', 'api/processes', $process);\n $response->assertStatus(201);\n $response->assertJsonFragment($process);\n }", "public function run()\n {\n \n // Creating Rough Reports\n factory(App\\Report::class,4)->create();\n // Adding Paramters to Reports\n\t\t$faker = Faker\\Factory::create();\n\t\tfor ( $i = 1; $i < 4; $i++) // generate same no. of records as the no. in Report above\n { \n\t\t\t$report = App\\Report::whereId($i)->first();\t\t\t\n\t\t\tfor ( $j=1; $j < 6 ; $j++) { \n\t\t\t\t$score = $faker->numberBetween($min = 1, $max = 100);\n\t\t\t \t$parameter = App\\Parameter::whereId($j)->first();\n\t\t\t \t$report->parameters()->save($parameter, ['score' => $score, 'remark' => $faker->sentence($nbWords = 4)]);\n\t\t\t} \n\t\t} \t\t\n }", "public function create($params = array()) {\n\n }", "private static function createSampleObject($id, $title, $projectId, $text = '', $version = '', $authorId = 0,\n\t\t$created = null, $status = 0, $classification = 0)\n\t{\n\t\tself::$data[$id] = new stdClass;\n\t\tself::$data[$id]->id = $id;\n\t\tself::$data[$id]->title = $title;\n\t\tself::$data[$id]->project_id = $projectId;\n\t\tself::$data[$id]->text = $text;\n\t\tself::$data[$id]->version = $version;\n\t\tself::$data[$id]->author_id = $authorId;\n\t\tself::$data[$id]->created = $created;\n\t\tself::$data[$id]->status = $status;\n\t\tself::$data[$id]->classification = $classification;\n\t}", "public function createPlan(array $parameters = array())\n {\n /**\n * @var \\Omnipay\\Vindicia\\Message\\CreatePlanRequest\n */\n return $this->createRequest('\\Omnipay\\Vindicia\\Message\\CreatePlanRequest', $parameters);\n }", "public function createAction() {\n $this->_helper->layout->setLayout('admin-simple');\n\n //GENERATE FORM\n $form = $this->view->form = new Sitestorereview_Form_Admin_Ratingparameter_Create();\n $form->setAction($this->getFrontController()->getRouter()->assemble(array()));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues();\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n //ADD REVIEW CATEGORY TO THE DATABASE\n $tableReviewParams = Engine_Api::_()->getDbtable('reviewcats', 'sitestorereview');\n\n //INSERT THE REVIEW CATEGORY IN TO THE DATABASE\n $row = $tableReviewParams->createRow();\n $row->category_id = $this->_getParam('category_id');\n $row->reviewcat_name = $values[\"reviewcat_name\"];\n $row->save();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('')\n ));\n }\n\n $this->renderScript('admin-ratingparameter/create.tpl');\n }", "public function create( array $params );", "public function actionCreate(array $attributes)\n {\n $input = new XInputFilter($attributes);\n $param = $input->getModel('Setting');\n\n if ($param->module == 'System') {\n $param->module = '';\n }\n\n // Get max ordering in a group\n $sql = \"\n SELECT MAX(ordering)\n FROM \" . SITE_ID . \"_setting\n WHERE module=:Module AND setting_group=:GroupName\n \";\n $con = Yii::app()->db;\n $command = $con->createCommand($sql);\n $maxOrdering = $command->queryScalar(array(':Module' => $param->module, ':GroupName' => $param->setting_group));\n $param->ordering = $maxOrdering + 1;\n\n $temp = Setting::model()->findByPk(array('name' => $param->Name, 'module' => $param->module));\n if (!is_null($temp)) {\n errorHandler()->log(Yii::t('Settings.Api', 'PARAMETER_EXISTS'));\n } else {\n if (!$param->save()) {\n errorHandler()->log($this->normalizeModelErrors($param->Errors));\n } else {\n $this->actionDb2php();\n }\n }\n $this->result = $param;\n }", "function _recast_analysis_api_add_run_condition($uuid, $data) {\r\n $required_keys = array(\r\n 'username',\r\n 'name',\r\n 'description',\r\n );\r\n foreach($required_keys as $key) {\r\n if(!array_key_exists($key, $data)) {\r\n return services_error('Missing recast run condition attribute ' . $key, 406);\r\n }\r\n }\r\n $query = new EntityFieldQuery();\r\n $entity = $query\r\n ->entityCondition('entity_type', 'node', '=')\r\n ->entityCondition('bundle', 'analysis')\r\n ->propertyCondition('status', 1) \r\n ->propertyCondition('uuid', $uuid) \r\n ->execute();\r\n \r\n $nid = intval((current($entity['node'])->nid));\r\n if($nid == 0) {\r\n return services_error('Invalid recast analysis uuid', 406);\r\n }\r\n $node = node_load($nid);\r\n $usr = user_load_by_name($data['username']);\r\n if($usr === FALSE) {\r\n return services_error('User authentication rejected for recast analysis', 406);\r\n }\r\n if($node->uid != $usr->uid) {\r\n return services_error('User mismatch', 406);\r\n }\r\n //ok.. if we get THIS far, we have data. let's add a run condition.\r\n $f = entity_create('field_collection_item', array('field_name' => 'field_run_condition'));\r\n $f->setHostEntity('node', $node);\r\n $f->field_run_condition_name[$node->language][]['value'] = $data['name']; \r\n $f->field_run_condition_description[$node->language][]['value'] = $data['description'];\r\n $f->save();\r\n }", "public function save_run($xhprof_data, $type, $run_id = null);", "function TestRun_update($run_id, $build_id, $environment_id, $manager_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.update', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function create($table, $parameters)\n {\n\n }", "function createPlace($workflowId, $placeDatas);", "public function testOverrideParameters(): void\n {\n $process = $this->phpbench(\n 'run --dump --progress=none --parameters=\\'{\"length\": 333}\\' benchmarks/set1/BenchmarkBench.php'\n );\n $this->assertExitCode(0, $process);\n $output = $process->getOutput();\n $this->assertXPathCount(3, $output, '//parameter[@value=333]');\n }" ]
[ "0.65801454", "0.5751001", "0.5332062", "0.5332062", "0.52351594", "0.5186725", "0.5099728", "0.5023098", "0.49879253", "0.49713808", "0.4945873", "0.4911484", "0.4899112", "0.48888296", "0.4876647", "0.4872989", "0.48704287", "0.48481122", "0.4845147", "0.484072", "0.48095858", "0.4779082", "0.47675568", "0.4755933", "0.47553796", "0.47431892", "0.47386476", "0.47378156", "0.47141585", "0.47096232" ]
0.6876163
0
/ update Update An Existing TestRun Usage TestRun.update Parameters ParameterData TypeComments run_idinteger new_valueshashmapplan_id can not be modified. Result Array [build_id] [environment_id] [manager_id] [plan_text_version] [summary] [notes] [start_date] [stop_date] [run_id]
function TestRun_update($run_id, $build_id, $environment_id, $manager_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) { $varray = array("build_id" => "int", "environment_id" => "int", "manager_id" => "int", "plan_text_version" => "int", "summary" => "string", "notes" => "string", "start_date" => "string", "stop_date" => "string"); foreach($varray as $key => $val) { if (isset(${$key})) { $carray[$key] = new xmlrpcval(${$key}, $val); } } // Create call $call = new xmlrpcmsg('TestRun.update', array(new xmlrpcval($run_id, "int"), new xmlrpcval($carray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCaseRun_update($run_id, $case_id, $build_id, $environment_id, $assignee = NULL, $case_run_status_id = NULL, $notes = NULL, $update_bugs = NULL) {\n\t$varray = array(\"assignee\" => \"int\", \"case_run_status_id\" => \"int\", \"notes\" => \"string\", \"update_bugs\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.update', array(new xmlrpcval($run_id, \"int\"),new xmlrpcval($case_id, \"int\"),new xmlrpcval($build_id, \"int\"),new xmlrpcval($environment_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_update($case_id, $case_status_id, $category_id, $isautomated, $alias = NULL, $arguments = NULL, $default_tester_id = NULL, $priority_id = NULL, $requirement = NULL, $script = NULL, $summary = NULL, $sortkey = NULL) {\n\t$varray = array(\"case_id\" => \"int\", \"case_status_id\" => \"int\", \"category_id\" => \"int\", \"isautomated\" => \"int\", \"alias\" => \"string\", \"arguments\" => \"string\", \"default_tester_id\" => \"int\", \"priority_id\" => \"int\", \"requirement\" => \"string\", \"script\" => \"string\", \"summary\" => \"string\", \"sortkey\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.update', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_update($plan_id, $author_id, $product_id = NULL, $default_product_version = NULL, $type_id = NULL, $name = NULL, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.update', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function update_scheduled_test($id,$params)\n {\n $this->db->where('id',$id);\n return $this->db->update('scheduled_tests',$params);\n }", "public static function Update( $params ) {\n clude( 'models/submission.php' );\n global $user;\n $user[ 'rights' ] < 40 && die( 'hard' );\n \n Controller::RequiredParameters( $params, 'userid', 'assignmentid', 'validationid' ) or die( 'hard' );\n if( Submission::Update( $params[ 'userid' ], $params[ 'assignmentid' ], $params[ 'validationid' ] ) == 0 ){\n Submission::Create( $params[ 'assignmentid' ], $params[ 'userid' ], $params[ 'validationid' ] );\n }\n $res = Submission::UserResults( $params[ 'userid' ], $params[ 'assignmentid' ] );\n //TODO: write a view to output the description.\n echo $res[ 0 ][ 'description' ];\n }", "function update_predefined_innovation_plan($id, $params)\n {\n $this->db->where('id', $id);\n $status = $this->db->update('predefined_innovation_plan', $params);\n $db_error = $this->db->error();\n if (! empty($db_error['code'])) {\n echo 'Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message'];\n exit();\n }\n return $status;\n }", "public function update($id, Request $request)\n\t{\n\t\t$validator = \\Validator::make($request->all(), array(\n\t\t\t'description' => 'required',\n\t\t\t'expected_result' => 'required'\n\t\t\t));\n\t\tif ($validator->fails())\n\t\t{\n\t\t\tforeach ($validator->errors()->toArray() as $key => $value) {\n\t\t\t\t$error[]=$value[0];\n\t\t\t} \n\t\t}\n\t\telse{\n\t\t\tif( session()->has('email')){\n\t\t\t\t//Process when validations pass\n\n\t\t\t\t$level = $request->update_level; \t\n\t\t\t\t$content['description'] = $request->description;\n\t\t $content['expected_result'] = $request->expected_result;\n\t\t $item = \\App\\TestStep::find($id);\n\t\t $item->update($content);\n\t\t \n\t\t $execution_content['scroll']\t\t= $request->scroll;\n\t\t $execution_content['resource_id']\t= $request->resource_id;\n\t\t $execution_content['text']\t\t\t= $request->text;\n\t\t $execution_content['content_desc']\t= $request->content_desc;\n\t\t $execution_content['class']\t\t\t= $request->class;\n\t\t $execution_content['index']\t\t\t= $request->index;\n\t\t $execution_content['sendkey']\t\t= $request->sendkey;\n\t\t $execution_content['screenshot']\t= $request->screenshot;\n\t\t $execution_content['checkpoint']\t= $request->checkpoint;\n\t\t $execution_content['wait']\t\t\t= $request->wait;\t\t \n\t\t\t\t$tc_id\t\t\t\t\t\t\t\t= $request->tc_id;\n\n\t\t $result = \\App\\Execution::where(['ts_id' => $id, 'tl_id' => 0])->update($execution_content);\n\n\t\t\t\t$del_obj = new DeleteQueryHandler();\t\t\t\t\n\t \t$condition = $del_obj->getCondition($item, $level);\n\t \t$condition['soft_delete'] = false;\n\t \t$all_steps = \\App\\TestStep::where($condition)->get();\n\t \tforeach ($all_steps as $step_value) {\n\t \t\tif($step_value->ts_id != $id)\n\t \t\t{\n\t \t\t\t$step_value->update($content);\n\t \t\t\t//exit;\n\t \t\t\t\\App\\Execution::where(['ts_id' => $step_value->ts_id, 'tl_id' => 0])->update($execution_content);\n\t \t\t}\n\t \t}\n\t \t$message = $this->getMessage('messages.success');\n\t \t$message.= \" Total Steps updated = \".count($all_steps);\n\t\t\t\tToast::success($message);\n\n\t\t\t\treturn redirect()->route('testcase.show', ['id' => $tc_id]);\n\n\t\t\t \t//return redirect()->route('teststep.show', ['id' => $id]);\n\t\t \t}else\n\t\t \t{\n\t\t \t\t$error[] = \"Session expired. Please login to continue\";\n\t\t \t}\n\t \t}/*\n\t \t$message = $this->getMessage('messages.update_failed');\n \tToast::message($message, 'danger');*/\n\t \treturn redirect()->route('teststep.edit', ['id' => $id, 'message' => $error])->withInput();\n\t}", "function updateTestSuite(&$tsuiteMgr,&$argsObj,$container,&$hash)\r\n{\r\n $msg = 'ok';\r\n $ret = $tsuiteMgr->update($argsObj->testsuiteID,$container['container_name'],$container['details']);\r\n if($ret['status_ok'])\r\n {\r\n $tsuiteMgr->deleteKeywords($argsObj->testsuiteID);\r\n if(trim($argsObj->assigned_keyword_list) != \"\")\r\n {\r\n $tsuiteMgr->addKeywords($argsObj->testsuiteID,explode(\",\",$argsObj->assigned_keyword_list));\r\n }\r\n writeCustomFieldsToDB($tsuiteMgr->db,$argsObj->tprojectID,$argsObj->testsuiteID,$hash);\r\n }\r\n else\r\n {\r\n $msg = $ret['msg'];\r\n }\r\n return $msg;\r\n}", "public function update(Request $request, Run $run)\n {\n //\n }", "public function update(Request $request, Run $run)\n {\n //\n }", "function update_numberreturnsubmission($numberReturnSubmissionId,$params)\n {\n $this->db->where('numberReturnSubmissionId',$numberReturnSubmissionId);\n $response = $this->db->update('numberreturnsubmission',$params);\n if($response)\n {\n return \"numberreturnsubmission updated successfully\";\n }\n else\n {\n return \"Error occuring while updating numberreturnsubmission\";\n }\n }", "public static function doUpdate($params=NULL) {\n\t\t$conn = parent::_initwgConnector($params, self::PRIMARY_KEY);\n\t\t$conn->update(self::TABLE_NAME);\n\t\tif (!is_a($params, 'wgConnector') && isset($params['where'])) {\n\t\t\tif (!isset($params['wherecol'])) $params['wherecol'] = self::PRIMARY_KEY;\n\t\t\t$conn->where($params['wherecol'], $params['where']);\n\t\t\tunset($params['where']);\n\t\t\tunset($params['wherecol']);\n\t\t}\n\t\tif (!empty($params) && is_array($params)) {\n\t\t\tforeach ($params as $key=>$par) {\n\t\t\t\tif (isset(self::$_tableFields[$key])) $conn->set($key, $par);\n\t\t\t\telse throw new WgException(\"Field \".self::TABLE_NAME.\".$key does not exist.\");\n\t\t\t}\n\t\t}\n\t\t$af = (int) DbModel::doAffected($conn, new ProjectsListingsModel());\n\t\tif (!(bool) $af) $af = 1;\n\t\treturn (int) $af;\n\t}", "public function update($params,$where){\n\t\t$rdata=0;\n\t\t$data=array();\n\t\t$sql=array();\n\t\tif(!empty($params)){\n\t\t\t$sql=array();\n\t\t\tforeach($params as $tname=>$cvalue){\n\t\t\t\t$data=array();\n\t\t\t\tforeach($cvalue as $field=>$value){\n\t\t\t\t\t$marray=array();\n\t\t\t\t\tif(preg_match('/^#(.*)$/',$field,$marray)){\n\t\t\t\t\t\t$field=$marray[1];\n\t\t\t\t\t\t$data[]=\"`\".trim($field,'`').\"`=\".$value;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$data[]=\"`\".trim($field,'`').\"`='\".$value.\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->query(\"UPDATE `\".$tname.\"` SET \".implode(',',$data).\" \".(!empty($where)?\"WHERE \".$where:'').\";\");\n\t\t\t\t$rdata=$this->affected_rows;\n\t\t\t}\n\t\t}\n\t\treturn $rdata;\n\t}", "public function update(Request $request, TestResult $testResult)\n {\n //\n }", "public function testUpdatePayrun()\n {\n }", "public function update( array $params );", "public function updateJudgeParametersDB($data){\n $this->db->select('id');\n $this->db->from('user_contest_report');\n $this->db->where('userSmuleID',$data['userSmuleID']);\n $q = $this->db->get();\n $row = $q->result();\n $userContestReportID = $row[0]->id;\n $this->db->set(\"userContestReportID\",$userContestReportID);\n $this->db->where('userSmuleID',$data['userSmuleID']);\n $this->db->update('users_judge');\n /** this is after payment */\n\n //print_r($data);die(\"ddddd\");\n $this->db->set('sur', $data['sur']);\n $this->db->set('Taal', $data['Taal']);\n $this->db->set('Emotion_Feel', $data['Emotion_Feel']);\n $this->db->set('Voice_Quality_Nasal', $data['Voice_Quality_Nasal']);\n $this->db->set('Soothing_Level', $data['Soothing_Level']);\n $this->db->set('Copy_Or_Originality', $data['Copy_Or_Originality']);\n $this->db->set('Variation', $data['Variation']);\n $this->db->set('Diction', $data['Diction']);\n $this->db->set('Murki_Vibratos', $data['Murki_Vibratos']);\n $this->db->set('Alaap', $data['Alaap']);\n $this->db->set('Sargam', $data['Sargam']);\n $this->db->set('Judge_Score', $data['Judge_Score']);\n $this->db->set('parameter1', $data['parameter1']);\n $this->db->set('parameter2', $data['parameter2']);\n $this->db->set('parameter3', $data['parameter3']);\n $this->db->set('parameter4', $data['parameter4']);\n $this->db->set('parameter5', $data['parameter5']);\n $this->db->where('userSmuleID',$data['userSmuleID']);\n return $this->db->update('user_contest_report');\n }", "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }", "public function testUpdateExperiment()\n {\n echo \"\\nTesting experiment update...\";\n $id = \"0\";\n \n //echo \"\\n-----Is string:\".gettype ($id);\n $input = file_get_contents('exp_update.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/experiments/\".$id.\"?owner=wawong\";\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context.\"/experiments/\".$id.\"?owner=wawong\";\n \n //echo \"\\nURL:\".$url;\n $params = json_decode($input);\n $data = json_encode($params); \n $response = $this->curl_put($url,$data);\n \n $json = json_decode($response);\n $this->assertTrue(!$json->success);\n \n }", "public function update(string $table, array $parameters, array $filters)\n {\n $sql = sprintf(\n \"UPDATE %s SET %s WHERE %s\",\n $table,\n $this->getParameters($parameters),\n $this->getFilters($filters, 'F'));\n\n $pdoStatement = $this->pdo->prepare($sql);\n $res = $pdoStatement->execute(\n $this->getParametersExecute($parameters, $filters)\n );\n\n if ($res === false)\n throw new Exception('No se ha podido ejecutar la query de actualización');\n }", "function update_sample($edit_sample,$sample_manual_id, $sample_name, $sample_unit, $sample_result, $client_id, $sample_type, $pay_status, $sample_image, $date_taken, $result_taken, $comment, $lab_scientist, $sample_description) {\r\n\t\tglobal $db;\r\n\t\t$query = \"UPDATE samples SET\r\n\t\t\tsample_manual_id='\".$sample_manual_id.\"',\r\n\t\t\tsample_name='\".$sample_name.\"',\r\n\t\t\tsample_unit='\".$sample_unit.\"',\r\n\t\t\tsample_result='\".$sample_result.\"',\r\n\t\t\tclient_id='\".$client_id.\"',\r\n\t\t\tsample_type='\".$sample_type.\"',\r\n\t\t\tpay_status='\".$pay_status.\"',\r\n\t\t\tsample_image='\".$sample_image.\"',\r\n\t\t\tsample_type='\".$sample_type.\"',\r\n\t\t\tdate_taken='\".$date_taken.\"',\r\n\t\t\tresult_taken='\".$result_taken.\"',\r\n\t\t\tcomment='\".$comment.\"',\r\n\t\t\tlab_scientist='\".$lab_scientist.\"',\r\n\t\t\tsample_description='\".$sample_description.\"'\r\n\t\t\tWHERE sample_id='\".$edit_sample.\"'\r\n\t\t\";\r\n\t\t$result = $db->query($query) or die($db->error);\r\n\t\t\r\n\t\treturn 'Sample was updated successfuly.';\t\r\n\t}", "public function testUpdateAction($puser1, $puser2, $puser3, $entryId)\r\n\t{\r\n\t\t$this->puser1 = $puser1; \r\n\t\t$this->puser2 = $puser2;\r\n\t\t$this->puser3 = $puser3;\r\n\t\t$this->entryId = $entryId;\r\n\t\t\r\n\t\tprint(\"\\nUpdate tests started\\n\");\r\n\t\t$this->startSession(KalturaSessionType::ADMIN);\r\n\t\t\r\n\t\t$entry = $this->client->baseEntry->get($entryId);\r\n\t\t$updatedEntry = $this->createEntryForUpdate($entry);\r\n\t\t\r\n\t\t$this->originalPuser = $entry->userId;\r\n\t\t\t\t\t\t\r\n\t\t$originalKuser = $this->getKuserIdFromEntry($entryId);\r\n\t\t\r\n\t\tprint (\"original puser [$this->originalPuser], original kuser [$originalKuser]\\n\");\r\n\t\t$updatedEntry = $this->switchUsers($updatedEntry);\r\n\t\t\r\n\t\tprint(\"Before update call\\n\");\r\n\t\t$result = $this->client->baseEntry->update($entryId, $updatedEntry);\r\n\t\t\r\n\t\tif(!$result instanceof KalturaMediaEntry)\r\n\t\t{\r\n\t\t\t$this->fail(\"Entry was not updated \" . var_dump($result) . \"\\n\");\r\n\t\t}\r\n\t\t\r\n\t\t$updatedEntry = $this->client->baseEntry->get($entryId);\r\n\t\t//var_dump($updatedEntry);\r\n\t\t\r\n\t\tprint(\"updatedEntry->userId [$updatedEntry->userId], originalPuser [$this->originalPuser] \\n\");\r\n\t\tif($updatedEntry->userId != $this->originalPuser) // puser was update we now check if the kuser was changed as well\r\n\t\t{\r\n\t\t\t$newKuserId = $this->getKuserIdFromPuser($updatedEntry->userId);\r\n\t\t\t$entryKuserId = $this->getKuserIdFromEntry($entryId);\r\n\t\t\tif($newKuserId == $entryKuserId)\r\n\t\t\t{\r\n\t\t\t\t//if the kusers are the same then all is okay\r\n\t\t\t\t$this->assertEquals(true, true); // insert 1 success\r\n\t\t\t\treturn; //success!!! so nothing todo\r\n\t\t\t}\r\n\t\t\telse //the kusers are not the same\r\n\t\t\t{\r\n\t\t\t\t$this->fail(\"The Kuser wasn't changed\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t$this->fail(\"The Puser wasn't changed\");\r\n\t\t}\r\n\t\t\r\n\t\t// after we did this we need to fail an update\r\n\t\t$this->failUpdate($this->puser1);\r\n\t\t$this->failUpdate($this->puser2);\r\n\t}", "public function updatePlan(array $parameters = array())\n {\n /**\n * @var \\Omnipay\\Vindicia\\Message\\CreatePlanRequest\n */\n return $this->createRequest('\\Omnipay\\Vindicia\\Message\\CreatePlanRequest', $parameters, true);\n }", "public static function doUpdate($params=NULL) {\n\t\t$conn = parent::_initwgConnector($params, self::PRIMARY_KEY);\n\t\t$conn->update(self::TABLE_NAME);\n\t\tif (!is_a($params, 'wgConnector') && isset($params['where'])) {\n\t\t\tif (!isset($params['wherecol'])) $params['wherecol'] = self::PRIMARY_KEY;\n\t\t\t$conn->where($params['wherecol'], $params['where']);\n\t\t\tunset($params['where']);\n\t\t\tunset($params['wherecol']);\n\t\t}\n\t\tif (!empty($params) && is_array($params)) {\n\t\t\tforeach ($params as $key=>$par) {\n\t\t\t\tif (isset(self::$_tableFields[$key])) $conn->set($key, $par);\n\t\t\t\telse throw new WgException(\"Field \".self::TABLE_NAME.\".$key does not exist.\");\n\t\t\t}\n\t\t}\n\t\t$af = (int) DbModel::doAffected($conn, new CampaignDefinitionsModel());\n\t\tif (!(bool) $af) $af = 1;\n\t\treturn (int) $af;\n\t}", "public function testUpdateProject()\n {\n echo \"\\nTesting project update...\";\n $id = \"P5334183\";\n //echo \"\\n-----Is string:\".gettype ($id);\n $input = file_get_contents('prj_update.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/projects/\".$id.\"?owner=wawong\";\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/projects/\".$id.\"?owner=wawong\";\n\n //echo \"\\nURL:\".$url;\n $params = json_decode($input);\n $data = json_encode($params); \n $response = $this->curl_put($url,$data);\n $json = json_decode($response);\n $this->assertTrue(!$json->success);\n \n }", "function test_update($urabe, $body)\n{\n $values = $body->update_params;\n $column_name = $body->column_name;\n $column_value = $body->column_value;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->update($table_name, $values, \"$column_name = $column_value\");\n}", "public function Update($table, array $parameters, $where = null, array $where_parameters = null){\n\t\t$sql = null;\n\t\t$binds = array();\n\t\t$total_parameters = 1;\n\t\tforeach($parameters as $key => $value){\n\t\t\tif($value instanceof \\DateTime){\n\t\t\t\t$value = $value->format('Y-m-d H:i:s');\n\t\t\t}\n\n\t\t\t$bind_key = sprintf(':parameter1%04d', $total_parameters);\n\t\t\t$sql .= (($sql === null) ? sprintf(self::$set_sql, $key, $bind_key) : ', '.sprintf(self::$set_sql, $key, $bind_key));\n\t\t\t$binds[$bind_key] = $value;\n\t\t\t$total_parameters++;\n\t\t}\n\n\t\t$query = sprintf(self::$update_template, $table, $sql);\n\t\tif($where !== null){\n\t\t\t$query .= sprintf(self::$update_where, $where);\n\n\t\t\tif($where_parameters !== null){\n\t\t\t\t$binds = array_merge($binds, $where_parameters);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->Execute($query, $binds);\n\t}", "function update($table, $params, $where)\n {\n if( empty($where) || is_null($where)){\n throw new Exception(\"Debe ingresar una condicion para actualizar\");\n }\n $changes = array();\n foreach ($params as $campo => $valor) {\n array_push($changes, \"{$campo} = '{$valor}'\");\n }\n $sql = \"UPDATE $table SET \". join(',', $changes) .\" WHERE $where \";\n $this->debug($sql);\n $this->query($sql);\n return oci_num_rows($this->result);\n}", "public function update(Request $request, RunType $runType)\n {\n request()->validate([\n 'name' => 'required|string|min:3',\n 'description' => 'required|string|min:5',\n ]);\n\n $runType->update(request(['name', 'description']));\n\n return response()->json($runType, 200);\n }", "function editApp($appid, $usertype, $date, $projtitle, $princinvest, $coprincinvest1, $princinvestdept, $princinvestphone, $email, $deadline, $grant, $exemption, $numA, $numB, $numC, $numD, $numF, $numG\n , $risks, $conA, $conB, $conC1, $conC2, $conC3, $desc, $benf, $reas, $ids) {\n $strQuery = \"update `irb-application` set Status='$usertype',DateSubmitted='$date', TitleOfProject='$projtitle',\n\t\t\t\t\t\tPrincipalInvestigator='$princinvest',CoPrincipalInvestigator='$coprincinvest1',\n PIDepartment='$princinvestdept',PIPhoneNo='$princinvestphone',Email='$email',\n GrantSource='$grant',GrantDeadline='$deadline',Exemption='$exemption',\n NumCharOfSubjects='$numA',SpecialClasses='$numB',HowRecruited='$numC',\n HowResProc='$numD',ReseachMethodClass='$numF',DataSources='$numG',\n ReseachIndepthProcedure='$risks',ExtentOfConf='$conA',PorcForHandlingData='$conB',\n HowDisseminated='$conC1',HowInformed='$conC2',HowConfProtected='$conC3',\n WillSubjectReward='$desc',WhatIntrinsicBenefits='$benf',FailedAppReason='$reas',CheckBoxArray='$ids'\" . \" where ApplicationID=$appid\";\n echo \"$strQuery\";\n return $this->query($strQuery);\n }" ]
[ "0.65834326", "0.5835751", "0.5814857", "0.57833564", "0.5730617", "0.57079107", "0.5692114", "0.56317407", "0.56041014", "0.56041014", "0.5541747", "0.55277973", "0.5524074", "0.54558575", "0.5401181", "0.5373391", "0.5366769", "0.5303786", "0.5301441", "0.52495235", "0.5226711", "0.5214595", "0.5207492", "0.51986545", "0.5177754", "0.517258", "0.5153155", "0.5149814", "0.514237", "0.51359594" ]
0.71290076
0
/ get_test_cases Get A List of TestCases For An Existing Test Run Usage TestRun.get_test_cases Parameters ParameterData Type run_idinteger Result ? FIXME
function TestRun_get_test_cases($run_id) { // Create call // FIXME: not working $call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_get_test_case_runs($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_case_runs', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_get_test_cases($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_cases', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTestCases ()\n {\n return $this->_testCases;\n }", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "public function getTests();", "public function getTestcases() {\n if ($this->graded_testcases === null) {\n $this->loadTestcases();\n }\n return $this->graded_testcases;\n }", "public function getTestResults()\n\t{\n\t\t/*\n\t\t * Wenn die Tests noch nicht ausgeführt wurden, dies nun tun\n\t\t */\n\t\tif ($this->_needRun === true)\n\t\t{\n\t\t\t$this->run();\n\t\t}\n\t\tforeach ($this->_testCases as $key => $testCase)\n\t\t{\n\t\t\t/*\n\t\t\t * Zusicherung nicht erfüllt\n\t\t\t*/\n\t\t\tif ($testCase['assert'] !== $testCase['result'])\n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": fehlgeschlagen \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" != \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_failedTests++;\n\t\t\t}\n\t\t\t/*\n\t\t\t * Zusicherung erfüllt\n\t\t\t*/\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": erfolgreich \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" == \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_passedTests++;\n\t\t\t}\n\t\t} \n\t\treturn $this->_testResults;\t\n\t}", "protected function _getCasesList() {\n if (Pi::service('module')->isActive(CASES)) {\n try {\n $cases = Pi::api('api', CASES)->caseList();\n return $cases;\n } catch (\\Exception $exception) {\n return array();\n }\n }\n }", "function TestPlan_get_test_runs($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_runs', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"assignee\":\n\t\t\tcase \"build_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_run_id\":\n\t\t\tcase \"case_run_status_id\":\n\t\t\tcase \"case_text_version\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"iscurrent\":\n\t\t\tcase \"run_id\":\n\t\t\tcase \"sortkey\":\n\t\t\tcase \"testedby\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"close_date\":\n\t\t\tcase \"notes\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_get($case_run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.get', array(new xmlrpcval($case_run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function get_all_tests()\n\t{\n\t\treturn $this->db->get('test')->result();\n\t}", "function getTestCasesInsideACategory($testCategoryID, $theSubjectID, $roundID, $clientID) {\n global $definitions;\n\n $categoriesItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['testcasescategory'], $clientID);\n $categoryParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasescategoryParentID'], $clientID);\n $testCasesArray = array();\n\n //First, get the internal structure of testCategories\n $tcatTree = getItemsTree($categoriesItemTypeID, $clientID, $categoryParentPropertyID, $testCategoryID);\n\n $idsToRetrieve = array();\n\n //Store all testCategories ids found in a plain array\n foreach ($tcatTree as $tc) {\n for ($j = 0; $j < count($tc); $j++) {\n if (!(in_array($tc[$j]['parent'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['parent'];\n }\n if (!(in_array($tc[$j]['ID'], $idsToRetrieve))) {\n $idsToRetrieve[] = $tc[$j]['ID'];\n }\n }\n }\n\n //Get the relations item\n $relations = getRelations($roundID, $theSubjectID, $clientID);\n\n if ((count($relations) - 1) == 0) {\n //Get the test cases ids inside an array\n $idsToSearch = explode(',', $relations[0]['testCasesIDs']);\n for ($i = 0; $i < count($idsToRetrieve); $i++) {\n //Get the test cases and filter\n $availableTestCases = array();\n $availableTestCases = getFilteredTestCasesInsideCategory($idsToRetrieve[$i], $idsToSearch, $clientID);\n //And add to results\n for ($j = 0; $j < count($availableTestCases); $j++) {\n $partRes = array();\n $partRes['ID'] = $availableTestCases[$j]['ID'];\n $testCasesArray[] = $partRes;\n }\n }\n }\n\n return $testCasesArray;\n}", "public function runTests()\n {\n $this->testCase(1, array (1, 1));\n $this->testCase(2, array (1, 2));\n $this->testCase(3, array (2, 2));\n $this->testCase(4, array (2, 2));\n $this->testCase(5, array (2, 3));\n $this->testCase(6, array (2, 3));\n $this->testCase(7, array (3, 3));\n $this->testCase(8, array (3, 3));\n $this->testCase(9, array (3, 3));\n $this->testCase(10, array(2, 5));\n $this->testCase(11, array(3, 4));\n $this->testCase(12, array(3, 4));\n $this->testCase(13, array(4, 4));\n $this->testCase(14, array(4, 4));\n $this->testCase(15, array(4, 4));\n $this->testCase(16, array(4, 4));\n $this->testCase(17, array(3, 6));\n $this->testCase(18, array(3, 6));\n $this->testCase(19, array(4, 5));\n $this->testCase(20, array(4, 5));\n $this->testCase(21, array(3, 7));\n $this->testCase(22, array(5, 5));\n $this->testCase(23, array(5, 5));\n $this->testCase(24, array(5, 5));\n $this->testCase(25, array(5, 5));\n $this->testCase(26, array(4, 7));\n $this->testCase(27, array(4, 7));\n $this->testCase(28, array(4, 7));\n $this->testCase(29, array(5, 6));\n $this->testCase(30, array(5, 6));\n $this->testCase(31, array(4, 8));\n $this->testCase(32, array(4, 8));\n $this->testCase(33, array(6, 6));\n $this->testCase(34, array(6, 6));\n $this->testCase(35, array(6, 6));\n $this->testCase(36, array(6, 6));\n $this->testCase(37, array(5, 8));\n $this->testCase(38, array(5, 8));\n $this->testCase(39, array(5, 8));\n $this->testCase(40, array(5, 8));\n $this->testCase(41, array(6, 7));\n $this->testCase(42, array(6, 7));\n $this->testCase(43, array(5, 9));\n $this->testCase(44, array(5, 9));\n $this->testCase(45, array(5, 9));\n $this->testCase(46, array(7, 7));\n $this->testCase(47, array(7, 7));\n $this->testCase(48, array(7, 7));\n $this->testCase(49, array(7, 7));\n $this->testCase(50, array(5, 10));\n $this->testCase(51, array(6, 9));\n $this->testCase(52, array(6, 9));\n $this->testCase(53, array(6, 9));\n $this->testCase(54, array(6, 9));\n $this->testCase(55, array(7, 8));\n $this->testCase(56, array(7, 8));\n $this->testCase(57, array(6, 10));\n $this->testCase(58, array(6, 10));\n $this->testCase(59, array(6, 10));\n $this->testCase(60, array(6, 10));\n $this->testCase(61, array(8, 8));\n $this->testCase(62, array(8, 8));\n $this->testCase(63, array(8, 8));\n $this->testCase(64, array(8, 8));\n $this->testCase(65, array(6, 11));\n $this->testCase(66, array(6, 11));\n $this->testCase(67, array(7, 10));\n $this->testCase(68, array(7, 10));\n $this->testCase(69, array(7, 10));\n $this->testCase(70, array(7, 10));\n $this->testCase(71, array(8, 9));\n $this->testCase(72, array(8, 9));\n $this->testCase(73, array(7, 11));\n $this->testCase(74, array(7, 11));\n $this->testCase(75, array(7, 11));\n $this->testCase(76, array(7, 11));\n $this->testCase(77, array(7, 11));\n $this->testCase(78, array(9, 9));\n $this->testCase(79, array(9, 9));\n $this->testCase(80, array(9, 9));\n $this->testCase(81, array(9, 9));\n $this->testCase(82, array(7, 12));\n $this->testCase(83, array(7, 12));\n $this->testCase(84, array(7, 12));\n $this->testCase(85, array(8, 11));\n $this->testCase(86, array(8, 11));\n $this->testCase(87, array(8, 11));\n $this->testCase(88, array(8, 11));\n $this->testCase(89, array(9, 10));\n $this->testCase(90, array(9, 10));\n $this->testCase(91, array(7, 13));\n $this->testCase(92, array(8, 12));\n $this->testCase(93, array(8, 12));\n $this->testCase(94, array(8, 12));\n $this->testCase(95, array(8, 12));\n $this->testCase(96, array(8, 12));\n $this->testCase(97, array(10, 10));\n $this->testCase(98, array(10, 10));\n $this->testCase(99, array(10, 10));\n $this->testCase(100, array(10, 10));\n }", "public function actionGetTests(string $id)\n {\n $exercise = $this->exercises->findOrThrow($id);\n\n // Get to da responsa!\n $this->sendSuccessResponse($exercise->getExerciseTests()->getValues());\n }", "public static function get_tests()\n {\n }", "public function getTestIterationData()\n {\n $cases = [];\n\n // Case #0 Standard iterator.\n $cases[] = [\n [\n 'hits' => [\n 'total' => 1,\n 'hits' => [\n [\n '_type' => 'content',\n '_id' => 'foo',\n '_score' => 0,\n '_source' => ['header' => 'Test header'],\n ],\n ],\n ],\n ],\n [\n [\n '_type' => 'content',\n '_id' => 'foo',\n '_score' => 0,\n '_source' => ['header' => 'Test header'],\n ],\n ],\n ];\n\n return $cases;\n }", "function GetTestResults($testID)\n {\n try\n {\n $db = GetDBConnection();\n \n $query = 'SELECT * FROM ' . GetTestEntriesIdentifier() . ' WHERE'\n . ' ' . GetTestIdIdentifier()\n . ' = :' . GetTestIdIdentifier() . ';';\n \n $statement = $db->prepare($query);\n $statement->bindValue(':' . GetTestIdIdentifier(), $testID);\n \n $statement->execute();\n \n $row = $statement->fetch();\n \n $statement->closeCursor();\n \n return $row;\n }\n catch (PDOException $ex)\n {\n LogError($ex);\n }\n }", "abstract protected function run_tests($code, $testcases);", "public function provideTestCases()\n {\n return [\n ['time', ['time'], false],\n ['bar', null, true],\n ];\n }", "abstract protected function getTestData() : array;", "function TestCase_get($case_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.get', array(new xmlrpcval($case_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}", "function TestCase_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"plans\":\n\t\t\t\tunset($va);\n\t\t\t\tforeach($key as $k => $v) {\n\t\t\t\t\t$va[$k] = new xmlrpcval($v, \"string\");\n\t\t\t\t}\n\t\t\t\t$val = $va;\n\t\t\t\t$type = \"struct\";\n\t\t\t\tbreak;\n\t\t\tcase \"author_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_status_id\":\n\t\t\tcase \"category_id\":\n\t\t\tcase \"default_tester_id\":\n\t\t\tcase \"isautomated\":\n\t\t\tcase \"priority_id\":\n\t\t\tcase \"sortkey\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"alias\":\n\t\t\tcase \"arguments\":\n\t\t\tcase \"creation_date\":\n\t\t\tcase \"requirement\":\n\t\t\tcase \"script\":\n\t\t\tcase \"summary\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getById($id) {\r\n return $this->testcaseEntity->find($id);\r\n }", "public function getTests()\n\t{\n\t\t# code...\n\t\treturn $this->tests;\n\t}", "public function getCasesByType($type_cases) {\n if($type_cases == 1)\n {\n $sql = \"SELECT `pk_cases`, `id_cases`, `sub_type_cases`, `comment_cases`, `date_cases`, `config_json_cases`, `fk_users`, `symbol_users` FROM `cases`, `users` WHERE `type_cases` = :type_cases AND `fk_users` = `pk_users`\";\n $query = $this->db->prepare($sql);\n $query->execute(array(':type_cases' => $type_cases));\n }\n\n if($type_cases == 4)\n {\n $sql = \"SELECT `pk_cases`, `id_cases`, `sub_type_cases`, `comment_cases`, `date_cases`, `config_json_cases`, `fk_users`, `symbol_users` FROM `cases`, `users` WHERE `type_cases` = :type_cases AND `fk_users` = `pk_users`\";\n $query = $this->db->prepare($sql);\n $query->execute(array(':type_cases' => $type_cases));\n }\n\n if($type_cases == 2)\n {\n $sql = \"SELECT `pk_cases`, `id_cases`, `sub_type_cases`, `comment_cases`, `date_cases`, `config_json_cases`, `fk_users`, `symbol_users`, `latest_research`, `time_score`, `calculated_score` FROM `cases`, `users` WHERE `type_cases` = :type_cases AND `fk_users` = `pk_users`\";\n $query = $this->db->prepare($sql);\n $query->execute(array(':type_cases' => $type_cases));\n }\n\n return $query->fetchAll();\n }", "function getAllTestCasesInsideAGroup($groupID, $clientID) {\n\n global $definitions;\n\n //get item type\n $itemTypeTestCasesID = getClientItemTypeID_RelatedWith_byName($definitions['testcases'], $clientID);\n\n //get property\n $testCasesParentPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n //get all categories inside group\n $onlyIds = getAllTestCategoriesInsideAGroup($groupID, $clientID);\n\n //Next, create a string with all the categories inside the group\n $toFilter = implode(',', $onlyIds);\n\n //Create the filter\n // build return properties array\n $returnProperties = array();\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $testCasesParentPropertyID, 'value' => $toFilter, 'mode' => '<-IN');\n\n $allTestCases = getFilteredItemsIDs($itemTypeTestCasesID, $clientID, $filters, $returnProperties);\n\n //Get only the testCategories ids\n $onlyIds = array();\n\n foreach ($allTestCases as $tcas) {\n $onlyIds[] = $tcas['ID'];\n }\n\n return $onlyIds;\n}", "public function get_tests_by_codes($codes)\n\t{\n\t\t$this->db->where_in('code', $codes);\n\t\t$this->db->order_by('code');\n\t\treturn $this->db->get('test')->result();\n\t}", "protected function get_tests() {\r\n return array(\r\n \"connect\",\r\n \"select\"\r\n );\r\n }" ]
[ "0.72527474", "0.7165374", "0.6962424", "0.6728685", "0.66380197", "0.6450637", "0.6154032", "0.61522484", "0.6142634", "0.61293393", "0.6099982", "0.5939742", "0.5939434", "0.5923006", "0.5910579", "0.590026", "0.587145", "0.5856608", "0.5835159", "0.5753841", "0.5726204", "0.5723281", "0.5655071", "0.56380355", "0.5636775", "0.55781126", "0.5567314", "0.5557074", "0.55479276", "0.55472356" ]
0.7916793
0
/ get_test_case_runs Get A List of TestCase Runs For An Existing Test Run Usage TestRun.get_test_case_runs Parameters ParameterData Type run_idinteger Result Array [0] Array [build_id] [case_text_version] [running_date] [sortkey] [case_id] [run_id] [testedby] [assignee] [environment_id] [close_date] [notes] [case_run_id] [iscurrent] [case_run_status_id] [1] Array ...
function TestRun_get_test_case_runs($run_id) { // Create call $call = new xmlrpcmsg('TestRun.get_test_case_runs', array(new xmlrpcval($run_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_get_test_cases($run_id) {\n\t// Create call\n\t// FIXME: not working\n\t$call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_get_test_runs($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_runs', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"assignee\":\n\t\t\tcase \"build_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_run_id\":\n\t\t\tcase \"case_run_status_id\":\n\t\t\tcase \"case_text_version\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"iscurrent\":\n\t\t\tcase \"run_id\":\n\t\t\tcase \"sortkey\":\n\t\t\tcase \"testedby\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"close_date\":\n\t\t\tcase \"notes\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getTestCaseData($testCaseID, $theSubjectID, $roundID, $studyID, $clientID) {\n global $definitions;\n\n $testCaseParentTestCategoryPropertyID = getClientPropertyID_RelatedWith_byName($definitions['testcasesFolderID'], $clientID);\n\n $theTestCase = array();\n $theTestCase['TC_ID'] = $testCaseID;\n $theTestCase['ROUND_ID'] = $roundID;\n $theTestCase['STUDY_ID'] = $studyID;\n $theTestCase['SUBJECT_ID'] = $theSubjectID;\n\n //Also, get the parent testCategory for the test case\n $theTestCase['PARENT_TC_ID'] = getItemPropertyValue($testCaseID, $testCaseParentTestCategoryPropertyID, $clientID);\n\n //Get the steps for this testCase\n $theSteps = array();\n\n $theSteps = getStepsScriptsForTestCase($testCaseID, $theSubjectID, $roundID, $studyID, $clientID);\n //print(\"Steps scritps details for testCase $testCaseID and subject $theSubjectID\\n\\r\" );\n //print_r($theSteps);\n $stepsCount = 0;\n //Only returns the testcase if any step of the test case is automated and has the type passed (TODO this last)\n $hasAutomatedSteps = \"NO\";\n\n //Add the steps to the result\n for ($i = 0; $i < count($theSteps); $i++) {\n if ($theSteps[$i]['scriptAppValue'] == 'steps.types.php') {\n //print(\"found automated step\\n\\r\");\n $theTestCase['STEP_ID_' . $stepsCount] = $theSteps[$i]['ID'];\n $theTestCase['STEP_TYPE_' . $stepsCount] = $theSteps[$i]['stepType'];\n $theTestCase['STEP_APPTYPE_' . $stepsCount] = $theSteps[$i]['scriptAppValue'];\n $theTestCase['STEP_RESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_Result_ID'];\n //Get the stepUnits values\n\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_DESCRIPTION_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_DESCRIPTION_ID'];\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULT_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUM_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTDESCRIPTION_LASTRESULT_ID_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMDESCRIPTION_LASTRESULT_ID'];\n\n }\n if (isset($theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'])) {\n $theTestCase['STEP_STEPUNITS_SELENIUMRESULTEXECVALUE_' . $stepsCount] = $theSteps[$i]['stepUnit_SELENIUMRESULT_EXECVALUE'];\n\n }\n\n $stepsCount++;\n $hasAutomatedSteps = \"YES\";\n }\n }\n\n if ($hasAutomatedSteps == \"YES\") {\n //And return the test case\n //print (\"Return automated testCase: $testCaseID\\n\\r\");\n return $theTestCase;\n } else {\n //print (\"Not automated testCase $testCaseID. Return null\\n\\r\");\n return null;\n }\n\n}", "function Environment_get_runs($environment_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Environment.get_runs', array(new xmlrpcval($environment_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_get($case_run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.get', array(new xmlrpcval($case_run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getRuns() {\n\t\tif(!$data = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/run_list.jsp?_plus=true')) {\n\t\t\tthrow new ErrorException($this->feedErrorMessage);\n\t\t}\n\t\treturn $data->runList;\n\t}", "function TestRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"plan\":\n\t\t\t\tunset($va);\n\t\t\t\tforeach($key as $k => $v) {\n\t\t\t\t\t$va[$k] = new xmlrpcval($v, \"string\");\n\t\t\t\t}\n\t\t\t\t$val = $va;\n\t\t\t\t$type = \"struct\";\n\t\t\t\tbreak;\n\t\t\tcase \"build_id\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"manager_id\":\n\t\t\tcase \"plan_id\":\n\t\t\tcase \"plan_text_version\":\n\t\t\tcase \"product_version\":\n\t\t\tcase \"run_id\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"notes\":\n\t\t\tcase \"start_date\":\n\t\t\tcase \"stop_date\":\n\t\t\tcase \"summary\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getRuns()\n {\n return $this->runs;\n }", "function TestPlan_get_test_cases($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_cases', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}", "function TestRun_get($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTestResults()\n\t{\n\t\t/*\n\t\t * Wenn die Tests noch nicht ausgeführt wurden, dies nun tun\n\t\t */\n\t\tif ($this->_needRun === true)\n\t\t{\n\t\t\t$this->run();\n\t\t}\n\t\tforeach ($this->_testCases as $key => $testCase)\n\t\t{\n\t\t\t/*\n\t\t\t * Zusicherung nicht erfüllt\n\t\t\t*/\n\t\t\tif ($testCase['assert'] !== $testCase['result'])\n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": fehlgeschlagen \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" != \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_failedTests++;\n\t\t\t}\n\t\t\t/*\n\t\t\t * Zusicherung erfüllt\n\t\t\t*/\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": erfolgreich \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" == \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_passedTests++;\n\t\t\t}\n\t\t} \n\t\treturn $this->_testResults;\t\n\t}", "public function getTests();", "function TestCaseRun_create($assignee, $build_id, $case_id, $case_text_version, $environment_id, $run_id, $canview = NULL, $close_date = NULL, $iscurrent = NULL, $notes = NULL, $sortkey = NULL, $testedby = NULL) {\n\t$varray = array(\"assignee\" => \"int\", \"build_id\" => \"int\", \"case_id\" => \"int\", \"case_text_version\" => \"int\", \"environment_id\" => \"int\", \"run_id\" => \"int\", \"canview\" => \"int\", \"close_date\" => \"string\", \"iscurrent\" => \"int\", \"notes\" => \"string\", \"sortkey\" => \"int\", \"testedby\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTestCases ()\n {\n return $this->_testCases;\n }", "function TestPlan_get_builds($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_builds', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function runTests() {\n $results = \"\";\n for ($i = 0; $i < sizeof($this->tests); $i++) {\n $results .= \"Test \" . ($i + 1) . \": \" . $this->tests[$i]->runTest() . \"<br>\";\n }\n return $results;\n }", "function getSeleniumResultsForTestCase($testCaseID, $relationID, $studyID, $subjectID, $clientID) {\n\n global $definitions;\n $stepsItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['steps'], $clientID);\n\n $stepParentTestCasePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsTestCaseParentID'], $clientID);\n $stepOrderPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsOrder'], $clientID);\n $stepCheckedStepUnitsPropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsCheckedStepUnits'], $clientID);\n $stepRoundSubjectTestCasePropertyID = getClientPropertyID_RelatedWith_byName($definitions['stepsRoundSubjectRelationID'], $clientID);\n\n //First, we need the steps for this testCase\n\n //Next, get the results fo the step\n // get checked values\n // build return properties array\n $returnProperties = array();\n $returnProperties[] = array('ID' => $stepOrderPropertyID, 'name' => 'order');\n $returnProperties[] = array('ID' => $stepCheckedStepUnitsPropertyID, 'name' => 'checkedValues');\n\n //build the filter\n $filters = array();\n $filters[] = array('ID' => $stepParentTestCasePropertyID, 'value' => $testCaseID);\n $filters[] = array('ID' => $stepRoundSubjectTestCasePropertyID, 'value' => $relationID);\n\n // get steps\n $orderedSteps = getFilteredItemsIDs($stepsItemTypeID, $clientID, $filters, $returnProperties, 'order');\n\n $totalOK = 0;\n $totalNOK = 0;\n $hasSeleniumResults = False;\n\n for ($i = 0; $i < count($orderedSteps); $i++) {\n\n $markedStepsUnitsIDs = explode(',', $orderedSteps[$i]['checkedValues']);\n\n $params = getParamsAndResultsForAStep($orderedSteps[$i], $studyID, $subjectID, $markedStepsUnitsIDs, $clientID);\n\n //Add every parameter to the results\n foreach ($params as $p) {\n\n //Check if the systemConversion value is a Selenium type\n\n if (base64_decode($p['systemConversionValue']) == 'stepUnit.type.seleniumResult') {\n $hasSeleniumResults = True;\n $theResult = base64_decode($p['executionValue']);\n if ($theResult == 'OK') {\n $totalOK++;\n } elseif ($theResult == 'NOK') {\n $totalNOK++;\n }\n }\n\n }\n }\n if ($hasSeleniumResults == True) {\n if ($totalOK > 0 && $totalNOK == 0) {\n return 'OK';\n } elseif ($totalNOK > 0) {\n return 'NOK';\n } elseif ($totalOK == 0 && $totalNOK == 0) {\n return 'NOT_EXECUTED';\n }\n } else {\n return 'NOSELENIUM';\n }\n\n}", "function TestRun_create($build_id, $environment_id, $manager_id, $plan_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_get_bugs($case_run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.get_bugs', array(new xmlrpcval($case_run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function GetTestResults($testID)\n {\n try\n {\n $db = GetDBConnection();\n \n $query = 'SELECT * FROM ' . GetTestEntriesIdentifier() . ' WHERE'\n . ' ' . GetTestIdIdentifier()\n . ' = :' . GetTestIdIdentifier() . ';';\n \n $statement = $db->prepare($query);\n $statement->bindValue(':' . GetTestIdIdentifier(), $testID);\n \n $statement->execute();\n \n $row = $statement->fetch();\n \n $statement->closeCursor();\n \n return $row;\n }\n catch (PDOException $ex)\n {\n LogError($ex);\n }\n }", "function execute_test($run_id, $case_id, $test_id)\n{\n\t// triggering an external command line tool or API. This function\n\t// is expected to return a valid TestRail status ID. We just\n\t// generate a random status ID as a placeholder.\n\t\n\t\n\t$statuses = array(1, 2, 3, 4, 5);\n\t$status_id = $statuses[rand(0, count($statuses) - 1)];\n\tif ($status_id == 3) // Untested?\n\t{\n\t\treturn null;\t\n\t}\n\telse \n\t{\n\t\treturn $status_id;\n\t}\n}", "public function get_all_tests()\n\t{\n\t\treturn $this->db->get('test')->result();\n\t}", "function get_scheduled_test($id)\n {\n return $this->db->get_where('scheduled_tests',array('id'=>$id))->row_array();\n }", "public function get_run($run_id, $type, &$run_desc);", "public function runTests()\n {\n $this->testCase(1, array (1, 1));\n $this->testCase(2, array (1, 2));\n $this->testCase(3, array (2, 2));\n $this->testCase(4, array (2, 2));\n $this->testCase(5, array (2, 3));\n $this->testCase(6, array (2, 3));\n $this->testCase(7, array (3, 3));\n $this->testCase(8, array (3, 3));\n $this->testCase(9, array (3, 3));\n $this->testCase(10, array(2, 5));\n $this->testCase(11, array(3, 4));\n $this->testCase(12, array(3, 4));\n $this->testCase(13, array(4, 4));\n $this->testCase(14, array(4, 4));\n $this->testCase(15, array(4, 4));\n $this->testCase(16, array(4, 4));\n $this->testCase(17, array(3, 6));\n $this->testCase(18, array(3, 6));\n $this->testCase(19, array(4, 5));\n $this->testCase(20, array(4, 5));\n $this->testCase(21, array(3, 7));\n $this->testCase(22, array(5, 5));\n $this->testCase(23, array(5, 5));\n $this->testCase(24, array(5, 5));\n $this->testCase(25, array(5, 5));\n $this->testCase(26, array(4, 7));\n $this->testCase(27, array(4, 7));\n $this->testCase(28, array(4, 7));\n $this->testCase(29, array(5, 6));\n $this->testCase(30, array(5, 6));\n $this->testCase(31, array(4, 8));\n $this->testCase(32, array(4, 8));\n $this->testCase(33, array(6, 6));\n $this->testCase(34, array(6, 6));\n $this->testCase(35, array(6, 6));\n $this->testCase(36, array(6, 6));\n $this->testCase(37, array(5, 8));\n $this->testCase(38, array(5, 8));\n $this->testCase(39, array(5, 8));\n $this->testCase(40, array(5, 8));\n $this->testCase(41, array(6, 7));\n $this->testCase(42, array(6, 7));\n $this->testCase(43, array(5, 9));\n $this->testCase(44, array(5, 9));\n $this->testCase(45, array(5, 9));\n $this->testCase(46, array(7, 7));\n $this->testCase(47, array(7, 7));\n $this->testCase(48, array(7, 7));\n $this->testCase(49, array(7, 7));\n $this->testCase(50, array(5, 10));\n $this->testCase(51, array(6, 9));\n $this->testCase(52, array(6, 9));\n $this->testCase(53, array(6, 9));\n $this->testCase(54, array(6, 9));\n $this->testCase(55, array(7, 8));\n $this->testCase(56, array(7, 8));\n $this->testCase(57, array(6, 10));\n $this->testCase(58, array(6, 10));\n $this->testCase(59, array(6, 10));\n $this->testCase(60, array(6, 10));\n $this->testCase(61, array(8, 8));\n $this->testCase(62, array(8, 8));\n $this->testCase(63, array(8, 8));\n $this->testCase(64, array(8, 8));\n $this->testCase(65, array(6, 11));\n $this->testCase(66, array(6, 11));\n $this->testCase(67, array(7, 10));\n $this->testCase(68, array(7, 10));\n $this->testCase(69, array(7, 10));\n $this->testCase(70, array(7, 10));\n $this->testCase(71, array(8, 9));\n $this->testCase(72, array(8, 9));\n $this->testCase(73, array(7, 11));\n $this->testCase(74, array(7, 11));\n $this->testCase(75, array(7, 11));\n $this->testCase(76, array(7, 11));\n $this->testCase(77, array(7, 11));\n $this->testCase(78, array(9, 9));\n $this->testCase(79, array(9, 9));\n $this->testCase(80, array(9, 9));\n $this->testCase(81, array(9, 9));\n $this->testCase(82, array(7, 12));\n $this->testCase(83, array(7, 12));\n $this->testCase(84, array(7, 12));\n $this->testCase(85, array(8, 11));\n $this->testCase(86, array(8, 11));\n $this->testCase(87, array(8, 11));\n $this->testCase(88, array(8, 11));\n $this->testCase(89, array(9, 10));\n $this->testCase(90, array(9, 10));\n $this->testCase(91, array(7, 13));\n $this->testCase(92, array(8, 12));\n $this->testCase(93, array(8, 12));\n $this->testCase(94, array(8, 12));\n $this->testCase(95, array(8, 12));\n $this->testCase(96, array(8, 12));\n $this->testCase(97, array(10, 10));\n $this->testCase(98, array(10, 10));\n $this->testCase(99, array(10, 10));\n $this->testCase(100, array(10, 10));\n }", "public function getTestcases() {\n if ($this->graded_testcases === null) {\n $this->loadTestcases();\n }\n return $this->graded_testcases;\n }", "function TestRun_get_test_plan($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_plan', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function _runs()\n {\n $runs = $this->db->pq(\"SELECT runid,run \n FROM v_run \n WHERE startdate < CURRENT_TIMESTAMP\n ORDER BY startdate DESC\");\n $this->_output($runs);\n }" ]
[ "0.7123005", "0.693919", "0.6542017", "0.6291592", "0.6216954", "0.6189323", "0.61443627", "0.6084027", "0.598333", "0.59583414", "0.5842502", "0.573529", "0.5719392", "0.56678206", "0.5650013", "0.5589184", "0.5556902", "0.5556358", "0.5491285", "0.5486298", "0.54728687", "0.5420667", "0.54046214", "0.54027987", "0.5395982", "0.53959095", "0.5393277", "0.5384994", "0.5378635", "0.53676283" ]
0.78560793
0
/ get_test_plan Get A TestPlan For An Existing Test Run Usage TestRun.get_test_plan Parameters ParameterData Type run_idinteger Result Array [author_id] [name] [default_product_version] [plan_id] [product_id] [creation_date] [type_id] [isactive]
function TestRun_get_test_plan($run_id) { // Create call $call = new xmlrpcmsg('TestRun.get_test_plan', array(new xmlrpcval($run_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestPlan_get($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_get_test_runs($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_runs', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getPlan();", "function TestPlan_get_test_cases($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_cases', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function get_plan($planId){\n try {\n $plan = Plan::get($planId, $this->_api_context);\n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $plan->toArray();\n $returnArray['RAWREQUEST']='{id:'.$planId.'}';\n $returnArray['RAWRESPONSE']=$plan->toJSON();\n return $returnArray;\n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }", "private function get_plan()\n\t{\n\t\treturn $this->m_plan;\n\t}", "public function GetPlanDetails($planID) {\n\t\t$planID = mysqli_real_escape_string($this->db, $planID);\n\t\tif ($this->CheckPlanExist($planID) == '1') {\n\t\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_premium_plans WHERE plan_id = '$planID'\") or die(mysqli_error($this->db));\n\t\t\t$data = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\t\treturn $data;\n\t\t} else {return false;}\n\t}", "public function getPlanById()\n {\n // Arrange\n // Act\n if (! isset($this->plans)) {\n $this->getsAListOfPlans();\n }\n $plans = $this->plans;\n $plan = $plans['data'][0];\n\n $plan = Ezypay::getPlan($plan['id']);\n\n // Assert\n $this->assertNotNull($plan);\n $this->assertEquals($plan['id'], $plan['id']);\n }", "public function getPlanData(){\n\t\t$sql = \"SELECT * FROM plan\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t}", "function TestCase_get_plans($case_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.get_plans', array(new xmlrpcval($case_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_link_plan($case_id, $plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.link_plan', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function list_plan($parameters){\n try {\n $planList = Plan::all(array_filter($parameters), $this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLANS'] = $planList->toArray();\n $returnArray['RAWREQUEST']= json_encode($parameters);\n $returnArray['RAWRESPONSE']=$planList->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n } \n }", "public function getPlan()\n {\n return Saas::getPlan($this->getPlanIdentifier());\n }", "function getMetrics(&$db,$userObj,$args, $result_cfg, $labels)\n{\n $debug = true;\n $begin_time = microtime(true);\n $user_id = $args->currentUserID;\n $tproject_id = $args->tproject_id;\n $linked_tcversions = array();\n $metrics = array();\n $tplan_mgr = new testplan($db);\n $show_platforms = false;\n $platforms = array();\n\n // get all tesplans accessibles for user, for $tproject_id\n $options = array('output' => 'map');\n $options['active'] = $args->show_only_active ? ACTIVE : TP_ALL_STATUS; \n $test_plans = $userObj->getAccessibleTestPlans($db,$tproject_id,null,$options);\n\n // Get count of testcases linked to every testplan\n // Hmm Count active and inactive ?\n $linkedItemsQty = $tplan_mgr->count_testcases(array_keys($test_plans),null,array('output' => 'groupByTestPlan'));\n \n \n $metricsMgr = new tlTestPlanMetrics($db);\n $show_platforms = false;\n \n $metrics = array('testplans' => null, 'total' => null);\n $mm = &$metrics['testplans'];\n $metrics['total'] = array('active' => 0,'total' => 0, 'executed' => 0);\n foreach($result_cfg['status_label_for_exec_ui'] as $status_code => &$dummy)\n {\n $metrics['total'][$status_code] = 0; \n } \n \n $codeStatusVerbose = array_flip($result_cfg['status_code']);\n if($debug){\n echo 'test_plans_count:'.count($test_plans).\"<br/>\";\n $index = 0;\n foreach($test_plans as $key => &$dummy)\n {\n $item_begin_time = microtime(true);\n // We need to know if test plan has builds, if not we can not call any method \n // that try to get exec info, because you can only execute if you have builds.\n //\n // 20130909 - added active filter\n $buildSet = $tplan_mgr->get_builds($key,testplan::ACTIVE_BUILDS);\n if( is_null($buildSet) )\n {\n continue;\n }\n\n $platformSet = $tplan_mgr->getPlatforms($key);\n if (isset($platformSet)) \n {\n $platforms = array_merge($platforms, $platformSet);\n } \n $show_platforms_for_tplan = !is_null($platformSet);\n $show_platforms = $show_platforms || $show_platforms_for_tplan;\n if( !is_null($platformSet) )\n {\n $neurus = $metricsMgr->getExecCountersByPlatformExecStatus($key,null,\n array('getPlatformSet' => true,\n 'getOnlyActiveTCVersions' => true));\n $mm[$key]['overall']['active'] = $mm[$key]['overall']['executed'] = 0;\n foreach($neurus['with_tester'] as $platform_id => &$pinfo)\n {\n $xd = &$mm[$key]['platforms'][$platform_id];\n $xd['tplan_name'] = $dummy['name'];\n $xd['platform_name'] = $neurus['platforms'][$platform_id];\n $xd['total'] = $xd['active'] = $neurus['total'][$platform_id]['qty'];\n $xd['executed'] = 0;\n \n foreach($pinfo as $code => &$elem)\n {\n $xd[$codeStatusVerbose[$code]] = $elem['exec_qty'];\n if($codeStatusVerbose[$code] != 'not_run')\n {\n $xd['executed'] += $elem['exec_qty'];\n }\n if( !isset($mm[$key]['overall'][$codeStatusVerbose[$code]]) )\n {\n $mm[$key]['overall'][$codeStatusVerbose[$code]] = 0;\n }\n $mm[$key]['overall'][$codeStatusVerbose[$code]] += $elem['exec_qty'];\n $metrics['total'][$codeStatusVerbose[$code]] += $elem['exec_qty']; \n }\n $mm[$key]['overall']['executed'] += $xd['executed'];\n $mm[$key]['overall']['active'] += $xd['active'];\n } \n unset($neurus);\n $mm[$key]['overall']['total'] = $mm[$key]['overall']['active']; \n $metrics['total']['executed'] += $mm[$key]['overall']['executed'];\n $metrics['total']['active'] += $mm[$key]['overall']['active'];\n }\n else\n {\n if($key == 764205){$my_begin_time = microtime(true);}\n $mm[$key]['overall']['builds'] = $metricsMgr->getBuildExecCountersByExecStatus($key,null,null);\n if($key == 764205){$my_end_time = microtime(true);echo 'my_diff:'.($my_end_time - $my_begin_time).\"<br/>\";}\n $mm[$key]['overall']['active'] = 0;\n foreach ($mm[$key]['overall']['builds'] as $build_id => $status_column)\n {\n $mm[$key]['overall']['active'] += $status_column['total'];\n foreach ($status_column as $status_code => $qty)\n {\n if(!isset($metrics['total'][$status_code]))\n {\n $metrics['total'][$status_code] = 0;\n }\n $metrics['total'][$status_code] += $qty;\n \n if (!isset($mm[$key]['overall'][$status_code]))\n {\n $mm[$key]['overall'][$status_code] = 0;\n }\n $mm[$key]['overall'][$status_code] += $qty;\n }\n }\n\n //$metrics['total']['executed'] += $mm[$key]['overall']['executed'];\n $metrics['total']['active'] += $mm[$key]['overall']['active'];\n \n $mm[$key]['platforms'][0] = $mm[$key]['overall'];\n $mm[$key]['platforms'][0]['tplan_name'] = $dummy['name'];\n $mm[$key]['platforms'][0]['platform_name'] = $labels['not_aplicable'];\n } \n $item_end_time = microtime(true);\n echo \"key:$key,diff_time:\".($item_end_time - $item_begin_time).\"<br/>\";\n $index ++;\n if($index > 2){\n break;\n }\n }\n}\n \n // remove duplicate platform names\n $platformsUnique = array();\n foreach($platforms as $platform) \n {\n if(!in_array($platform['name'], $platformsUnique)) \n {\n $platformsUnique[] = $platform['name'];\n }\n }\n \n $end_time = microtime(true);\n echo 'diff_time'.($end_time - $begin_time);\n return array($metrics, $show_platforms, $platformsUnique);\n}", "public function getPlanById($id)\n {\n try {\n return $this->plan->find($id);\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return false;\n }\n }", "function TestPlan_get_builds($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_builds', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getPlan( $name ) {\n\t\t\treturn $this->_tablePlans->fetchRow( array (\n\t\t\t\t'name = ?' => $name\n\t\t\t) );\n\t\t}", "function TestPlan_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"author_id\":\n\t\t\tcase \"isactive\":\n\t\t\tcase \"plan_id\":\n\t\t\tcase \"product_id\":\n\t\t\tcase \"type_id\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"default_product_version\":\n\t\t\tcase \"creation_date\":\n\t\t\tcase \"name\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public static function byPlan($plan_id)\n {\n $payload = [\n 'recurringplan' => [\n 'recurringplanid' => $plan_id,\n ],\n ];\n\n return static::all($payload);\n }", "public static function data_for_plan_page($planid) {\n global $PAGE;\n $params = self::validate_parameters(self::data_for_plan_page_parameters(), array(\n 'planid' => $planid\n ));\n $plan = api::read_plan($params['planid']);\n self::validate_context($plan->get_context());\n\n $renderable = new output\\plan_page($plan);\n $renderer = $PAGE->get_renderer('tool_lp');\n\n $data = $renderable->export_for_template($renderer);\n\n return $data;\n }", "public function plan_info( $plan_id ) {\r\n\t\treturn $this->_send_request( 'plans/'.$plan_id );\r\n\t}", "public function getPlanById(int $id){\n $this->open();\n\n $result = $this->query('SELECT * FROM '.$this->TABLE_NAME.' WHERE id=:id', array(\n new QueryParam(':id', $id, PDO::PARAM_INT)\n ));\n\n // Close connection\n $this->close();\n\n // Check if is found\n if($result->rowCount() > 0){\n\n // Check result\n while($row = $result->fetch(PDO::FETCH_OBJ)){\n $foundPlan = new Plan(\n $row->id,\n $row->name,\n $row->price,\n $row->detail,\n $row->docsUrl\n );\n\n return $foundPlan;\n }\n\n }\n else{\n // It isn't found so return false\n return false;\n }\n\n }", "public function get($planIdOrKey)\n {\n $ret = $this->exec($this->uri.\"/$planIdOrKey?expand=plans\", null);\n\n $this->log->addInfo('Result='.$ret);\n\n $prj = $this->json_mapper->map(\n json_decode($ret), new Plan()\n );\n\n return $prj;\n }", "public function iN_GetUserSubscriptionPlanDetails($userID, $planType) {\n\t\t$userID = mysqli_real_escape_string($this->db, $userID);\n\t\tif ($this->iN_CheckUserExist($userID) == 1) {\n\t\t\t$checkWeeklyPlanExist = mysqli_query($this->db, \"SELECT amount, plan_status, plan_type FROM i_user_subscribe_plans WHERE iuid_fk = '$userID' AND plan_type = '$planType'\") or die(mysqli_error($this->db));\n\t\t\tif (mysqli_num_rows($checkWeeklyPlanExist) == 1) {\n\t\t\t\t$result = mysqli_fetch_array($checkWeeklyPlanExist, MYSQLI_ASSOC);\n\t\t\t\treturn $result;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static function data_for_plan_page_returns() {\n $uc = user_competency_exporter::get_read_structure();\n $ucp = user_competency_plan_exporter::get_read_structure();\n\n $uc->required = VALUE_OPTIONAL;\n $ucp->required = VALUE_OPTIONAL;\n\n return new external_single_structure(array (\n 'plan' => plan_exporter::get_read_structure(),\n 'contextid' => new external_value(PARAM_INT, 'Context ID.'),\n 'pluginbaseurl' => new external_value(PARAM_URL, 'Plugin base URL.'),\n 'competencies' => new external_multiple_structure(\n new external_single_structure(array(\n 'competency' => competency_exporter::get_read_structure(),\n 'comppath' => competency_path_exporter::get_read_structure(),\n 'usercompetency' => $uc,\n 'usercompetencyplan' => $ucp\n ))\n ),\n 'competencycount' => new external_value(PARAM_INT, 'Count of competencies'),\n 'proficientcompetencycount' => new external_value(PARAM_INT, 'Count of proficientcompetencies'),\n 'proficientcompetencypercentage' => new external_value(PARAM_FLOAT, 'Percentage of competencies proficient'),\n 'proficientcompetencypercentageformatted' => new external_value(PARAM_RAW, 'Displayable percentage'),\n ));\n }", "public function getQueryPlan()\n {\n return $this->query_plan;\n }", "public function getsAListOfPlans()\n {\n // Arrange\n // Act\n $plans = Ezypay::getPlans();\n\n // Assert\n //$this->assertEquals(3, sizeof($plans->data)); // Causing issues as there are aditional plans\n $this->assertNotNull($plans);\n\n $this->plans = $plans;\n }", "public function create_plan($requestData){\n \n // ### Create Plan\n try {\n // Create a new instance of Plan object\n $plan = new Plan();\n if(isset($requestData['plan'])){\n $this->setArrayToMethods($this->checkEmptyObject($requestData['plan']), $plan);\n } \n // # Payment definitions for this billing plan.\n $paymentDefinition = new PaymentDefinition(); \n $paymentDefinition\n ->setAmount(new Currency($requestData['paymentDefinition']['Amount']));\n array_pop($requestData['paymentDefinition']);\n if(!empty($this->checkEmptyObject((array)$paymentDefinition))){\n $this->setArrayToMethods(array_filter($requestData['paymentDefinition']), $paymentDefinition); \n }\n \n // Charge Models\n $chargeModel = new ChargeModel();\n $chargeModel->setAmount(new Currency($requestData['chargeModel']['Amount']));\n array_pop($requestData['chargeModel']);\n if(!empty($this->checkEmptyObject((array)$chargeModel))){\n $this->setArrayToMethods(array_filter($requestData['chargeModel']), $chargeModel); \n $paymentDefinition->setChargeModels(array($chargeModel));\n }\n \n $merchantPreferences = new MerchantPreferences();\n $baseUrl = $requestData['baseUrl'];\n\n $merchantPreferences->setReturnUrl($baseUrl.$requestData['ReturnUrl'])\n ->setCancelUrl($baseUrl.$requestData['CancelUrl']);\n if(!empty($this->checkEmptyObject($requestData['merchant_preferences']['SetupFee']))){\n $merchantPreferences->setSetupFee(new Currency($requestData['merchant_preferences']['SetupFee']));\n }\n array_pop($requestData['merchant_preferences']);\n \n if(isset($requestData['merchant_preferences'])){\n $this->setArrayToMethods($this->checkEmptyObject($requestData['merchant_preferences']), $merchantPreferences);\n }\n if(!empty($this->checkEmptyObject((array)$paymentDefinition))){\n $plan->setPaymentDefinitions(array($paymentDefinition));\n }\n if(!empty($this->checkEmptyObject((array)$merchantPreferences))){\n $plan->setMerchantPreferences($merchantPreferences);\n } \n $requestArray= clone $plan;\n $output = $plan->create($this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $output->toArray();\n $returnArray['RAWREQUEST']=$requestArray->toJSON();\n $returnArray['RAWRESPONSE']=$output->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }", "public static function data_for_plan_page_parameters() {\n $planid = new external_value(\n PARAM_INT,\n 'The plan id',\n VALUE_REQUIRED\n );\n $params = array('planid' => $planid);\n return new external_function_parameters($params);\n }", "function GetUserplan($userid=false,$IdentityVariable=false)\n\t{\t\t\n\t\t\tif($IdentityVariable=='')\n\t\t\t{\n\t\t\t\t$IdentityVariable='Project';\n\t\t\t}\n\t\t\t$qry = $this->db->query(\"select rp_dbho_campaignplan.planID,planTitle,rp_dbho_campaignmaster.campaignID from rp_dbho_campaignmaster,rp_dbho_campaignplan,rp_user_plan_details,rp_dbho_user_plans_subdetail where\n\t\t\t\t\t\t\t\t\trp_dbho_campaignmaster.userID=$userid and\n\t\t\t\t\t\t\t\t\trp_dbho_campaignmaster.campaignID=rp_dbho_campaignplan.campaignID and\n\t\t\t\t\t\t\t\t\trp_dbho_campaignplan.planID=rp_user_plan_details.planID and\n\t\t\t\t\t\t\t\t\trp_dbho_campaignplan.planID=rp_dbho_user_plans_subdetail.planID and\n\t\t\t\t\t\t\t\t\trp_dbho_user_plans_subdetail.listingType='$IdentityVariable' and\n\t\t\t\t\t\t\t\t\trp_user_plan_details.languageID='1' and rp_dbho_campaignplan.status!='completed'\");\t\n\t\t\treturn $qry->Result();\t\n\t}" ]
[ "0.69550097", "0.67222714", "0.6709729", "0.6598955", "0.6455806", "0.6390643", "0.63711905", "0.63473874", "0.61049956", "0.6069276", "0.6054704", "0.60382026", "0.59320384", "0.59257025", "0.5884979", "0.58683634", "0.5850909", "0.5818289", "0.5796774", "0.5796225", "0.5774757", "0.57601595", "0.5704205", "0.5678106", "0.56657624", "0.5659945", "0.56082284", "0.55989", "0.5592745", "0.55830073" ]
0.7561008
0
/ add_tag Add a tag to the given TestRun Usage TestRun.add_tag Parameters ParameterData TypeComments run_idinteger tag_namestringCreates tag if it does not exist Result 0
function TestRun_add_tag($run_id, $tag_name) { // Create call $call = new xmlrpcmsg('TestRun.add_tag', array(new xmlrpcval($run_id, "int"), new xmlrpcval($tag_name, "string"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCase_add_tag($case_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.add_tag', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "private function addTag()\n {\n $params = array();\n $params['db_link'] = $this->db;\n $params['ticket_id'] = $_REQUEST['ticket_id'];\n \n $data = array();\n $tagTitle = stripslashes(trim($_REQUEST['tag']));\n $tag = Utils::sanitize($tagTitle);\n \n $Tickets = new Tickets($params);\n $Tickets->addTag($tag, $tagTitle);\n \n echo '[{\"isError\":0, \"message\":\"Successfully added tag\"}]';\n exit;\n }", "function TestPlan_add_tag($plan_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.add_tag', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($tag_name, \"string\")), \"array\");\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function addTag( $data = array() ) { \t\n\n $url = $this->_base_url . 'tags';\n $options['data']['tag'] = $data;\n $options['post'] = true;\n $this->_callAPI($url, $options);\n }", "function add_tag($tag) {\n if (!is_object($tag)) {\n return false;\n }\n if (!isset($tag->name) or\n !isset($tag->value) or\n !isset($tag->ticketid) or\n isset($tag->id)){\n\n return false;\n }\n\n if (!insert_record('helpdesk_ticket_tag', $tag)) {\n return false;\n }\n\n // Lets make an update saying we added this tag.\n $dat = new stdClass;\n $dat->ticketid = $this->id;\n $dat->notes = get_string('tagaddedwithnameof', 'block_helpdesk') . $tag->name;\n $dat->status = HELPDESK_NATIVE_UPDATE_TAG;\n $dat->type = HELPDESK_UPDATE_TYPE_DETAILED;\n\n if(!$this->add_update($dat)) {\n notify(get_string('cantaddupdate', 'block_helpdesk'));\n }\n\n // Update modified time and refresh the ticket.\n $this->store();\n $this->fetch();\n return true;\n }", "public function add_tag($tag, $message = null) {\n\t\t\tif ($message === null) {\n\t\t\t\t$message = $tag;\n\t\t\t}\n\t\t\treturn $this->run(\"tag -a $tag -m \" . escapeshellarg($message));\n\t\t}", "public function add() {\n\t\t$this->display ( 'admin/tag/add.html' );\n\t}", "function add_tag($tag) {\n array_push($this->tags, $tag);\n }", "public function addTag($tagData)\n {\n $this->clickButton('add_new_tag');\n $this->fillTagSettings($tagData);\n $this->saveForm('save_tag');\n }", "public function actionAdd()\n\t{\n\t\t$tag = array(\n\t\t\t'tag_id' => 0\n\t\t);\n\n\t\treturn $this->_getTagAddEditResponse($tag);\n\t}", "public function addTag($tag, $entryid, $user){\n\t\t$tag = preg_replace('/[^a-zA-Z0-9äöüßÄÖÜ]/i', \"\", $tag);\n\t\tif(!isset($user)){\n\t\t\t$user = $this->getUser();\n\t\t}\n\t\tif(!isset($entryid[\"id\"])){\n\t\t\t$entry = $this->getEntry($entryid);\n\t\t}else{\n\t\t\t$entry = $entryid;\n\t\t}\n\t\tif(!$user\n\t\t\t||!$entry\n\t\t\t||($entry[\"userid\"]!=$user[\"id\"] && $user[\"status\"]!=DBConfig::$userStatus[\"admin\"])){\n\t\t\treturn false;\n\t\t}\n\n\t\tif(is_array($tag)){\n\t\t\t$success = true;\n\t\t\tforeach($tag as $t){\n\t\t\t\tif(!$this->addTag($t, $entry, $user)){\n\t\t\t\t\t$success = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $success;\n\t\t}else{\n\t\t\t$tagid = $this->createTag($tag);\n\t\t\tif($tagid == false)return false;\n\t\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") adds the tag '$tag' to #\".$entry[\"id\"].\" (\".$entry[\"title\"].\")\");\n\t\t\t$query = Queries::addTag($tagid, $entry[\"id\"]);\n\t\t\treturn $this->query($query);\n\t\t}\n\t}", "public function addNewTag($tagName) {\n $sql = \"INSERT INTO t_tags VALUES(?)\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"s\", $tagName);\n $select->execute();\n $select->close();\n }", "private function _addTags()\n {\n $metadata = $this->getRecordMetadata();\n $this->_record->addTags($metadata[self::TAGS]);\n }", "public function createTag($tag){\n\t\t$user = $this->getUser();\n\t\tif(!isset($user[\"id\"]))return false;\n\t\tif(is_array($tag)){\n\t\t\t$success = true;\n\t\t\tforeach($tag as $t){\n\t\t\t\tif(!$this->createTag($t)){\n\t\t\t\t\t$success = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $success;\n\t\t}else{\n\t\t\t$tags = $this->getTag($tag);\n\t\t\tif(isset($tags[\"tagid\"])){\n\t\t\t\treturn $tags[\"tagid\"];\n\t\t\t}\n\t\t\tif(strlen(trim($tag))<3)return false;\n\t\t\t$tag = strtolower($tag);\n\t\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") creates tag '\".$tag.\"'\");\n\t\t\t$query = Queries::createtag($tag);\n\t\t\treturn $this->query($query);\n\t\t}\n\t}", "public function tagged( $tag );", "public function addTag($key, $data)\n {\n $this->tags[$key] = $data;\n //echo $key.'=>'.$data.'<br />';\n }", "public function addTag($tag) {\n $this->init(); //it would actually work without it\n\n if (!in_array($tag,$this->tags)) {\n $tag = trim($tag);\n\n $this->tags['new'][] = $tag;\n return true;\n }\n\n return false;\n }", "public function addTag(string $name, TagInterface $tag, string $placement = null);", "public function insert(Tag $tag);", "static function addTag($tags){\n\t\t//fetch corresponding tagids\n\t\t$length = count($tags);\n\t\t$db = (new Database)->connectToDatabase();\n\t\tfor($i=0;$i<$length;$i++){\n\t\t\t$db->query(\"SELECT * FROM tag_table WHERE tag_name='$tags[i]'\");\n\t\t\tif($db->returned_rows==0){\n\t\t\t\t//no tag found in tag table... so add it\n\t\t\t\t$db->query(\"INSERT INTO tag_table (tag_name) VALUES ('$tag[i]')\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//check if tag already there with post?\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t\n\t}", "function TestRun_remove_tag($run_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.remove_tag', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function addTag($tag)\n {\n $this->tags[] = $tag;\n $this->processTags();\n }", "public static function add_tag($name) {\n global $wpdb;\n $data = array(\n 'name' => $name\n );\n\n // Si no se inserta nada, retornamos false\n if (!$wpdb->insert('XTB_TAGS', $data, array('%s'))) {\n return null;\n }\n\n return $wpdb->insert_id;\n //return true;\n }", "public function addTag(Tag $tag)\n {\n $tag->addTask($this);\n $this->tags->add($tag);\n }", "public function testAddOrderTag()\n {\n }", "private function runTag()\n {\n $num = (int) $this->ask('How many records do you want to create for the tags table?');\n factory(Tag::class, $num)->create();\n }", "public function addTag($imageId, $tag) {\n $dataToInsert = [\n 'image_id' => $imageId,\n 'tag' => filter_var($tag, FILTER_SANITIZE_STRING)\n ];\n $result = Db::insert('tags', $dataToInsert);\n\n return $result;\n }", "function doTagStuff(){}", "public function testPostTag() : void\n {\n $request = [\n 'name' => static::$tagName\n ];\n\n $response = $this->actingAs(static::$user, 'api')\n ->post('/api/tag', $request);\n\n $response->assertStatus(201);\n\n $response->assertJsonStructure([\n 'id',\n 'name'\n ]);\n }", "public function test_addOrderLineActivityTag() {\n\n }" ]
[ "0.6969201", "0.6676304", "0.66190755", "0.6460874", "0.610306", "0.58920234", "0.58771515", "0.585326", "0.58420634", "0.572708", "0.57108265", "0.5700662", "0.5656746", "0.5651504", "0.5651366", "0.5620343", "0.55968434", "0.5571145", "0.555633", "0.5535619", "0.54798764", "0.5450926", "0.5441691", "0.5439622", "0.53909326", "0.5380886", "0.5380654", "0.5354183", "0.5353581", "0.5342978" ]
0.78020364
0
/ remove_tag Remove a tag from the given TestRun Usage TestRun.remove_tag Parameters ParameterData Type run_idinteger tag_namestring Result 0
function TestRun_remove_tag($run_id, $tag_name) { // Create call $call = new xmlrpcmsg('TestRun.remove_tag', array(new xmlrpcval($run_id, "int"), new xmlrpcval($tag_name, "string"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCase_remove_tag($case_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.remove_tag', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function delete_tag($tag);", "function TestPlan_remove_tag($plan_id, $tag_name) {\n\t// Create call\n//\t$call = new xmlrpcmsg('TestPlan.remove_tag', array(new xmlrpcval(array(\"plan_id\" => new xmlrpcval($plan_id, \"int\"), \"tag_name\" => new xmlrpcval($tag_name, \"string\")), \"struct\")));\n\t$call = new xmlrpcmsg('TestPlan.remove_tag', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function removeTag(string $name);", "public function removeTag()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_tag]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_tag]);\n\t\t}\n\t}", "public function removeTags()\n\t{\n\t\tforeach ($this->argsArray(func_get_args()) as $tag) {\n\t\t\t$this->removed_tags[] = $tag;\n\t\t}\n\t}", "public function remove($tag) { //+\n\t\tunset($this->arShortcodes[$tag]);\n\t}", "function testRemoveTag_UsingCleanTags() {\n foreach ($this->photo->getTags() as $tag) {\n $this->photo->removeTag($tag);\n }\n $this->photo->addTags(array('something', 'another', '2004'));\n sleep(1);\n\n $this->photo->removeTag('another');\n\n $result = $this->photo->getTags();\n $this->assertEquals(array('something', '2004'), $result);\n }", "function testRemoveTag_UsingMessyTags() {\n foreach ($this->photo->getTags() as $tag) {\n $this->photo->removeTag($tag);\n }\n $this->photo->addTags(array('some thing!', 'a-nother.', '2004'));\n sleep(1);\n\n $this->photo->removeTag('another');\n\n $result = $this->photo->getTags();\n $this->assertEquals(array('something', '2004'), $result);\n }", "function photos_removeTag ($tag_id) {\n\t\t$response = $this->execute(array('method' => 'flickr.photos.removeTag', 'tag_id' => $tag_id));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function removeTag($tag_name)\n\t{\n\t\t$tag = PortfolioTag::getTagByName($tag_name);\n\n\t\tif (!empty($tag)) // Это не должно произойти, тэг должен быть всегда найден\n\t\t{\n\t\t\t$command = Yii::app()->db->createCommand('DELETE FROM {{portfolio_portfolio_tag}} WHERE portfolio_id = :model_id AND tag_id = :tag_id');\n\n\t\t\t$command->bindValues(\n\t\t\t\tarray(\n\t\t\t\t\t':model_id' => $this->id,\n\t\t\t\t\t':tag_id' => $tag->id,\n\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn $command->execute();\n\t\t}\n\n\t\treturn false;\n\t}", "public function delTag($id, $tag)\n {\n $this->db->update(array('id'=>$id), array('$pull'=>array('tags'=>$tag)));\n }", "public function removeByTag($tag, $force = false);", "function remove_tag($id) {\n global $CFG;\n if (!is_numeric($id)) {\n return false;\n }\n\n $tag = get_record('helpdesk_ticket_tag', 'id', $id);\n\n $result = delete_records('helpdesk_ticket_tag', 'id', $id);\n if (!$result) {\n return false;\n }\n // Lets make an update!\n\n $dat = new stdClass;\n $dat->ticketid = $this->id;\n $dat->notes = get_string('tagremovewithnameof', 'block_helpdesk') . $tag->name;\n $dat->status = HELPDESK_NATIVE_UPDATE_UNTAG;\n $dat->type = HELPDESK_UPDATE_TYPE_DETAILED;\n\n if(!$this->add_update($dat)) {\n notify(get_string('cantaddupdate', 'block_helpdesk'));\n }\n\n $this->store();\n return true;\n }", "private function removeTag($tagName)\n\t{\n\t\tif (is_null($tagName) || $tagName == '') return;\n\n $tag = Tag::where('tag', '=', $tagName)->first();\n\n\t\tif (is_object($tag))\n\t\t{\n\t\t\tif ($tag->count > 0) TagUtil::decrementCount($tagName, 1, $tag);\n\n\t\t\t// return collection object\n\t\t\t$tagPivot = $this->tags()->wherePivot('tag_id', '=', $tag->id)->get();\n\t\t\t\n\t if ($tagPivot->count()) $this->tags()->detach($tag->id);\n\t\t}\n\t}", "public function deleteTag($tag){\n\t\tif(is_array($tag)){\n\t\t\t$success = true;\n\t\t\tforeach($tag as $t){\n\t\t\t\tif(!$this->deleteTag($t)){\n\t\t\t\t\t$success = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $success;\n\t\t}else{\n\t\t\t$user = $this->getUser();\n\t\t\t$singletag = $this->getTag($tag);\n\t\t\tif(!isset($user[\"id\"])||!isset($singletag[\"tagid\"])){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif($user[\"status\"] == DBConfig::$userStatus[\"admin\"]){\n\t\t\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") deletes tag '\".$tag.\"'\");\n\t\t\t\t$query = Queries::deletetag($singletag[\"tagid\"]);\n\t\t\t\tif(!$this->query($query))return false;\n\t\t\t\t$query = Queries::removetag($singletag[\"tagid\"]);\n\t\t\t\treturn $this->query($query);\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function setRemoveTag($tag) {\n\t\t$this->removeTags[] = $this->trimTags($tag);\n\t}", "public function removeTag($tag) {\n $this->init(); //we actually may do without it\n\n if (in_array($tag, $this->tags)) {\n $key = array_search($tag, $this->tags);\n $this->tags['del'][] = $key;\n unset($this->tags[$key]);\n\n return true;\n } else if (in_array($tag, $this->tags['new'])) {\n $key = array_search($tag, $this->tags['new']);\n unset($this->tags['new'][$key]);\n\n return true;\n }\n\n return false;\n }", "public function removeTag($tag){\n\n if (!$tag){\n return false;\n }\n if (is_string($tag)) {\n $tag = array($tag);\n }\n if (!count($tag)) {\n return false;\n }\n $deleteTags = array();\n\n foreach ($tag as $t) {\n $deleteTags[] = $this->_keyFromTag($t);\n $deleteKeys = $this->getKeysByTag($t);\n $this->remove($deleteKeys);\n }\n if ($deleteTags && count($deleteTags)) {\n $this->getAdapter()->delete($deleteTags);\n }\n return true;\n }", "public function unTag($objid, $tag);", "public function removeTag($tagName)\n\t{\n\t\t$tagName = (string)$tagName;\n\n\t\tif ( $this->hasTag($tagName) ) {\n\t\t\treturn $this->tags[ $tagName ];\n\t\t}\n\t}", "private static function DeleteTag($tag)\n {\n global $SESSDB;\n \n // First delete entries in sdat\n $q = $SESSDB->prepare(\"DELETE FROM `sdat` WHERE sdat.id IN(SELECT smap.id FROM `smap` WHERE tag=:tag)\");\n $q->bindParam(':tag', $tag);\n $q->execute();\n\n // Now smap...\n $q = $SESSDB->prepare(\"DELETE FROM `smap` WHERE tag=:tag\");\n $q->bindParam(':tag', $tag);\n $q->execute();\n }", "public function delete($tag)\n {\n $builder = $this->git->getProcessBuilder()\n ->add('tag')\n ->add('-d');\n\n if (!is_array($tag) && !($tag instanceof \\Traversable)) {\n $tag = [$tag];\n }\n\n foreach ($tag as $value) {\n $builder->add($value);\n }\n\n $this->git->run($builder->getProcess());\n }", "public function deleteTag($imageID, $tagName) {\n $sql = \"DELETE FROM t_tags_included WHERE fk_pk_tags=? AND fk_pk_bild_id=?\";\n $select = $this->con->prepare($sql);\n $select->bind_param(\"ss\", $tagName, $imageID);\n $select->execute();\n $select->close();\n }", "public function removeShortCode($tag)\n {\n remove_shortcode($tag);\n }", "public function deleteRefTag($id_tag){\n $index = -1;\n foreach ($this->_id_tags_arr as $index_temp => $id_tag_temp){\n if($id_tag_temp == $id_tag){\n $index= $index_temp;\n break;\n }\n }\n if ($index!=-1){\n unset ($this->_id_tags_arr[$index]);\n //reindexo para evitar que me queden posiciones vacias en el array\n $this->_id_tags_arr = array_values($this->_id_tags_arr);\n }else{\n throw new Exception('deleteRefTag');\n }\n }", "public function destroy(Tag $tag)\n {\n //\n }", "public function destroy(Tag $tag)\n {\n //\n }", "function deleteTag( $iTag ){\n $oSql = Sql::getInstance( );\n clearCache( 'tags' );\n $oSql->query( 'DELETE FROM tags WHERE iTag = \"'.$iTag.'\" ' );\n $oSql->query( 'DELETE FROM pages_tags WHERE iTag = \"'.$iTag.'\" ' );\n\n generateTagsLinks( );\n}", "public function delete_tag_by_tagname( $activity_id, $tag_name ) {\n\n\t\t$tag_info = $this->get_tag_by_tagname( $tag_name );\n\n\t\t$sql \t= \"DELETE FROM activities_tags\n\t\t\t\t\t\t\tWHERE tag_id = :tag_id\";\n\t\t$sth = $this->conn->prepare( $sql );\n\t\t$sth->execute(\n\t\t\tarray(\n\t\t\t\t':tag_id' => $tag_info[ \"id\" ],\n\t\t\t\t)\n\t\t\t);\n\t\t$row_count = $sth->rowCount();\n\n\t\treturn $row_count > 0 ? true : false;\n\t}" ]
[ "0.7491802", "0.7126419", "0.7113409", "0.6707196", "0.6679919", "0.66228145", "0.65400183", "0.6472691", "0.639579", "0.635502", "0.6342848", "0.6305746", "0.6287674", "0.62789804", "0.6258274", "0.6055902", "0.60417897", "0.5992248", "0.59338874", "0.59190786", "0.5877083", "0.5836616", "0.58068293", "0.580147", "0.5742472", "0.5707419", "0.5693588", "0.5693588", "0.56701124", "0.5665999" ]
0.83461714
0
/ get_tags Get a list of tags for the given TestRun Usage TestRun.get_tags Parameters ParameterData Type run_idinteger Result Array [0] Array [plan_count] [tag_name] [case_count] [run_count] [tag_id] [0] Array ...
function TestRun_get_tags($run_id) { // Create call $call = new xmlrpcmsg('TestRun.get_tags', array(new xmlrpcval($run_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCase_get_tags($case_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.get_tags', array(new xmlrpcval($case_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_get_tags($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_tags', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTags() {\n try {\n $getTagsOperation = new GetTags();\n\n $getTagsResponse = $this->apiCall($getTagsOperation);\n $tagsList = $getTagsResponse->getData();\n\n if ($getTagsResponse->isSuccess()) {\n\n $response = [];\n\n if(is_array($tagsList) && count($tagsList) > 0) {\n foreach ($tagsList as $item) {\n $response[] = [\n 'id' => $item['tagId'],\n 'name' => $item['name']\n ];\n }\n }\n return $response;\n }\n }catch (\\Exception $e){\n throw new \\Exception($e->getMessage());\n }\n }", "public function getTags() {}", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags();", "function getTags($tag) {\n \n \t$tags_request_url = sprintf($this->api_urls['tags'], $tag, $this->access_token);\n \t\n \treturn $this->__apiCall($tags_request_url);\n \n }", "public function getTags() {\n\t\t$tags = array();\n\n\t\ttry {\n\t\t\t/** @var Thrive_Dash_Api_KlickTipp $api */\n\t\t\t$api = $this->get_api();\n\t\t\t$tags = $api->getTags();\n\t\t} catch ( Exception $e ) {\n\n\t\t}\n\n\t\treturn $tags;\n\t}", "public function testTags()\n\t{\n\t\t$this->call('GET', '/api/tags');\n\t}", "private function _getAllTags() {\n\n\t\t$param = [\n\t\t\t'table' => 'tags',\n\t\t\t'select' => '*'\n\t\t];\n\n\t\tif($this->CI->input->get()) {\n\t\t\tif(isset($this->CI->input->get['fields'])) { $param['select'] = $this->CI->input->get['fields']; }\n\t\t\tif(isset($this->CI->input->get['type'])) { $param['where'] = ['type' => $this->CI->input->get['type']]; }\n\t\t}\n\n\t\t$data = $this->CI->model->get($param);\n\t\tif(count($data)) { $this->CI->exitCode = 200; }\n\t\treturn ['data' => $data];\n\t}", "public function testGetTags()\n {\n $helix = new Helix(self::$tokenProvider);\n $tagsApi = $helix->tags;\n $tags = $tagsApi->getTags();\n \n $this->assertNotNull($tags);\n $this->assertIsArray($tags);\n\n // Twitch should have more than 20 available tags, so we check that the cursor is available\n $hasMoreResults = $tagsApi->hasMoreTags();\n $this->assertTrue($hasMoreResults);\n\n // Try to get a specific tag by its ID, using the previous results to get the ID.\n $firstTag = reset($tags);\n $onlyTag = $tagsApi->getTags([$firstTag->tag_id]);\n\n $this->assertCount(1, $onlyTag);\n $this->assertEquals($firstTag, reset($onlyTag));\n\n return $firstTag->tag_id;\n }", "function getTags($talentID)\r\n\t{\r\n\t\t$db = Database::getInstance ();\r\n\t\t$mysqli = $db->getConnection ();\r\n\t\t$tagArray = array();\r\n\t\t$sql_query = \"select * from talent_has_tag where talent_talentid = \".$talentID;\r\n\t\t$result = $mysqli->query ( $sql_query );\r\n\t\twhile ( $row = $result->fetch_object () ) {\r\n\t\t\t$sql_query2 = \"select * from tag where tagid = \" . $row->tag_tagid;\r\n\t\t\t$result2 = $mysqli->query ( $sql_query2 );\r\n\t\t\t\r\n\t\t\twhile ( $row2 = $result2->fetch_object () ) {\r\n\t\t\tarray_push ( $tagArray, $row2->tagnaam);\r\n\t\t\t}\t\t\t\r\n\t\t}\t\r\n\t\t\r\n\t\t// return an array with tags\r\n\t\treturn $tagArray;\r\n\t}", "function getTags() {\n\t\t$db = Database::getInstance();\n\t\t$mysqli = $db->getConnection();\n\t\t\n\t\t$tagsArray = array();\n\t\t\t$sql_query = \"select tagnaam,tagid from tag where status=6\";\n\t\t\t$result = $mysqli->query($sql_query);\n\t\t\t\n\t\t\twhile ( $row = $result->fetch_object () ) {\n\t\t\t\t$Tag = new Tag();\n\t\t\t\t$Tag->tagId = $row->tagid;\n\t\t\t\t$Tag->tagName = $row->tagnaam;\n\t\t\t\tarray_push($tagsArray, $Tag);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$result->close();\n\t\t\treturn $tagsArray;\n\t}", "public function getTags():array;", "public function getTags($param){\n\tif(!isset($param['type']) OR !isset($param['tag_group_id']) OR !isset($param['account_id'])){\n\t return false;\n\t}\n\t$this->load->model('Logic_tag_relation');\n\t$result = $this->Logic_tag_relation->getTags($param);\n\treturn $result;\n }", "private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "public function getTagList();", "public function getTagList() {\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tThe tags table as a multi-dimensional array\n\t\t$sql = <<<EOD\n\t\tSELECT\n\t\t\t{$this->wpdb->prefix}topspin_tags.name\n\t\tFROM {$this->wpdb->prefix}topspin_tags\n\t\tWHERE\n\t\t\t{$this->wpdb->prefix}topspin_tags.artist_id = %d\nEOD;\n\t\t$data = $this->wpdb->get_results($this->wpdb->prepare($sql,array($this->artist_id)),ARRAY_A);\n\t\t##\tSet Default Status\n\t\tforeach($data as $key=>$row) {\n\t\t\t$data[$key]['status'] = 0;\n\t\t}\n\t\treturn $data;\n\t}", "public function testGetTags()\n {\n $objects = $this->loadTestFixtures(['@AppBundle/DataFixtures/ORM/Test/Tag/CrudData.yml']);\n\n // Test scope\n $this->restScopeTestCase('/api/tags', [\n 'list' => $this->getScopeConfig('tag/list.yml')\n ], true);\n\n // Test filters\n $listFilterCaseHandler = new ListFilterCaseHandler([\n 'tag-1' => $objects['tag-1']\n ]);\n \n $listFilterCaseHandler->addCase('name', '=Some name', 'tag-1', true);\n\n $this->restListFilterTestCase('/api/tags', $listFilterCaseHandler->getCases());\n }", "function getTags ( $params=array() )\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/tags.json\",$params);\n return $this->createResponse($result,'get Tags');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function getTags()\n {\n $response = $this->client->post('tags', $this->config);\n\n $tags = new IntegrationTagsCollection;\n if ($response->getStatusCode() == 200 and $result = @json_decode($response->getBody())) {\n\n if (is_array($result) && count($result) > 0) {\n foreach ($result as $key => $tag) {\n $tags->push(new IntegrationTag([\n 'id' => $tag->tag_id,\n 'name' => $tag->tag_name,\n ]));\n }\n }\n }\n\n return $tags;\n }", "private function _getTags($tagID = null, $getParams = []) {\n\n\t\t$param = [\n\t\t\t'table' => 'tags',\n\t\t\t'select' => 'tagID as id, name, type, relatedTo, description'\n\t\t];\n\n\t\t# $param['limit'][0] contains pageSize & $param['limit'][1] contains page starting offset value\n\t\tif (isset($getParams['page'])) {\n\t\t\t$param['limit'] = apiGetOffset(['page' => $getParams['page']]);\n\t\t}\n\t\t/*if(!isset($getParams['all'])) {\n\t\t\t$param['limit'] = '20';\n\t\t}*/\n\n\t\tif ($tagID) {\n\t\t\t$param['where'] = ['tagID' => $tagID];\n\t\t}\n\n\t\t$data = ['data' => $this->CI->model->get($param)];\n\n\t\tif (!$tagID && isset($getParams['meta'])) {\n\t\t\t$getParams['meta'] = json_decode($getParams['meta'], true);\n\t\t\t$data['meta'] = ['pageSize' => $param['limit'][0]];\n\t\t\tif (isset($getParams['meta']['count'])) {\n\t\t\t\t# count of no. of records ['all', gmat', 'gre']\n\t\t\t\t$data['meta']['count'] = $this->_countTags($param);\n\t\t\t}\n\t\t}\n\t\t$this->CI->exitCode = ($data) ? 200 : 404;\n\t\treturn $data;\n\t}", "public function tag_list()\n {\n $this->pushpin_id = $_GET['pushpinId'];\n\n $query = \"SELECT tags\nFROM PushpinTags\nWHERE pushpin_ID= '$this->pushpin_id'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n }", "public function getTags(){\n\t\tif (!is_array($this->_known_tags)){\n\t\t\t$desc = $this->getDescription();\n\t\t}\n\t\treturn $this->_known_tags;\n\t}", "public static function get_tags() {\n global $wpdb;\n $query = \"SELECT * FROM XTB_TAGS\";\n return $wpdb->get_results($query);\n }", "public function tags();" ]
[ "0.70891887", "0.6987806", "0.6734621", "0.6729092", "0.66611713", "0.66611713", "0.66611713", "0.66611713", "0.66611713", "0.6512545", "0.65051067", "0.64806515", "0.6450118", "0.64104825", "0.6373134", "0.6365282", "0.6264207", "0.6216087", "0.62074816", "0.62074816", "0.61745566", "0.6148855", "0.6144589", "0.6129511", "0.6114814", "0.6114778", "0.6097768", "0.60803413", "0.60598373", "0.6045376" ]
0.7788141
0
/ lookup_environment_id_by_name Lookup A TestRun Environment ID By Its Name Usage TestRun.lookup_environment_id_by_name Parameters ParameterData TypeComments namestringCannot be null or empty string Result environment_id
function TestRun_lookup_environment_id_by_name($name) { // Create call $call = new xmlrpcmsg('TestRun.lookup_environment_id_by_name', array(new xmlrpcval($name, "string"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_lookup_environment_name_by_id($environment_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.lookup_environment_name_by_id', array(new xmlrpcval($environment_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Build_lookup_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Environment_get($environment_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Environment.get', array(new xmlrpcval($environment_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getEnvironment($id = 0)\n {\n $this->db->where('Id',$id);\n $sql = $this->db->get('environment');\n return $sql->row();\n }", "function TestCase_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_lookup_type_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "private function getApTestId(string $testName)\n {\n try {\n $dbh = DatabaseConnection::getInstance();\n $statement = $dbh->prepare(\"SELECT `apTestId` FROM `APTest` WHERE apTestName = :apTestName\");\n $statement->bindValue(\":apTestName\", $testName);\n $statement->setFetchMode(\\PDO::FETCH_ASSOC);\n $success = $statement->execute();\n\n if (!$success)\n {\n throw new \\PDOException(\"error: fail to retrieve ap test id with provided test name\");\n }\n else\n {\n $test = $statement->fetch();\n if (!empty($test['apTestId']))\n {\n return $test['apTestId'];\n }\n else\n {\n throw new \\PDOException(\"error: the provided ap test name is not in the current ap test list\");\n }\n }\n }\n catch (\\PDOException $e)\n {\n throw $e;\n }\n }", "function Product_lookup_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('Product.lookup_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getIdMdpe($deviceId,$projectId,$environmentId) { // Check if a mapping exist between device/project/environment\n\t\t$q0=get_link()->prepare('SELECT ID AS ID FROM '.get_ini('BDD_PREFIX').'cmdb_dev_pro_env_map WHERE id_device = :id_device AND id_project = :id_project AND id_environment = :id_environment AND deleted_date=0'); \n\t\t$q0->execute(array( 'id_device' => $deviceId , 'id_project' => $projectId , 'id_environment' => $environmentId ));\n\t\t$r0 = $q0->fetch(PDO::FETCH_OBJ);\n\t\tif(isset($r0->ID))\n\t\t{\n\t\t\treturn $r0->ID;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}", "function TestCaseRun_lookup_status_name_by_id($case_run_status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_name_by_id', array(new xmlrpcval($case_run_status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Build_lookup_name_by_id($build_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_name_by_id', array(new xmlrpcval($build_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_category_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function auto_generate_results_identifier()\n\t{\n\t\t$results_identifier = null;\n\t\t$subsystem_r = array();\n\t\t$subsystems_to_test = $this->subsystems_under_test();\n\n\t\tif(!$this->is_new_result_file)\n\t\t{\n\t\t\t$result_file_intent = pts_result_file_analyzer::analyze_result_file_intent($this->result_file);\n\n\t\t\tif(is_array($result_file_intent) && $result_file_intent[0] != 'Unknown')\n\t\t\t{\n\t\t\t\tarray_unshift($subsystems_to_test, $result_file_intent[0]);\n\t\t\t}\n\t\t}\n\n\t\tforeach($subsystems_to_test as $subsystem)\n\t\t{\n\t\t\t$components = pts_result_file_analyzer::system_component_string_to_array(phodevi::system_hardware(true) . ', ' . phodevi::system_software(true));\n\t\t\tif($subsystem != null && isset($components[$subsystem]))\n\t\t\t{\n\t\t\t\t$subsystem_name = pts_strings::trim_search_query($components[$subsystem]);\n\n\t\t\t\tif(phodevi::is_vendor_string($subsystem_name) && !in_array($subsystem_name, $subsystem_r))\n\t\t\t\t{\n\t\t\t\t\t$subsystem_r[] = $subsystem_name;\n\t\t\t\t}\n\t\t\t\tif(isset($subsystem_r[2]) || isset($subsystem_name[19]))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(isset($subsystem_r[0]))\n\t\t{\n\t\t\t$results_identifier = implode(' - ', $subsystem_r);\n\t\t}\n\n\t\tif(empty($results_identifier) && !$this->batch_mode)\n\t\t{\n\t\t\t$results_identifier = phodevi::read_property('cpu', 'model') . ' - ' . phodevi::read_property('gpu', 'model') . ' - ' . phodevi::read_property('motherboard', 'identifier');\n\t\t}\n\n\t\tif(strlen($results_identifier) > 55)\n\t\t{\n\t\t\t$results_identifier = substr($results_identifier, 0, 54);\n\t\t\t$results_identifier = substr($results_identifier, 0, strrpos($results_identifier, ' '));\n\t\t}\n\n\t\tif(empty($results_identifier))\n\t\t{\n\t\t\t$results_identifier = date('Y-m-d H:i');\n\t\t}\n\n\t\t$this->results_identifier = $results_identifier;\n\n\t\treturn $results_identifier;\n\t}", "static function findIdByName($name) {\n $campaign = self::findByName($name);\n if (count($campaign)>0) return $campaign['id'];\n return 0;\n }", "public function found(Environment $environment, $data)\n {\n }", "public function getEnvironment($name);", "public function lookupVanityName( $name ){ return $this->APICall( array('lookupVanityName' => $name), \"Failed to get the vanity ID for \" . $name ); }", "function findPlaceId($stateName,$countryName){\n global $db;\n\n $placeQuery = \"SELECT id,statename,countryname FROM place\";\n $placeResults = $db->query($placeQuery)->fetchAll(PDO::FETCH_ASSOC);\n\n foreach ($placeResults as $result){\n if ($result[\"statename\"]==$stateName && $result[\"countryname\"]==$countryName){\n return $result[\"id\"];\n }\n }\n return null;\n}", "public function getExecutionId(): ?string;", "function getPerson_ID($name, &$official_name)\r\n\t{\r\n\t\t//build the api request using the key [global variable] and json format, and postcode \r\n\t\tglobal $Open_Australia_Key;\r\n\t\t$person_id = null;\r\n\r\n\t\t\r\n\t\tfor($count = 0; $person_id == null && $count < 2; $count++)\r\n\t\t{\r\n\t\t\tif($count == 0)\r\n\t\t\t\t$url = \"http://www.openaustralia.org/api/getRepresentatives\";\r\n\t\t\telse\r\n\t\t\t\t$url = \"http://www.openaustralia.org/api/getSenators\";\r\n\t\t\t\t\r\n\t\t\t$data = array('search'=>$name,'output'=>'js','key'=> $Open_Australia_Key);\r\n\t\t\t$GETurl = sprintf(\"%s?%s\", $url, http_build_query($data));\r\n\t\t\r\n\t\t\t//translate fullBio into a usable form\r\n\t\t\t$fullBio = json_decode(file_get_contents($GETurl));\r\n\t\t\t\r\n\t\t\t//check if the name yielded any actual data;\r\n\t\t\tif(! ($fullBio == new StdClass()))\r\n\t\t\t{\r\n\t\t\t\t//pull the first record [it's now an object!!!]\r\n\t\t\t\t$pollie = $fullBio[0];\r\n\r\n\t\t\t\t\r\n\t\t\t\t//get the values from the object\r\n\t\t\t\t$person_id = $pollie->person_id;\r\n\t\t\t\t$official_name = $pollie->full_name;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $person_id;\r\n\t}", "public function determineId() {}", "function validateEnvironment($name) {\n\n $this->db->select('Environment');\n $this->db->from('environment');\n $this->db->where('Environment', $name);\n $query = $this->db->get();\n return $query->num_rows();\n }", "function GetID($ConditionString);", "public function testValidLookup() {\n // Load configuration from .env\n $config = new \\Dotenv\\Dotenv(__DIR__);\n $config->load();\n\n // New lookup instance\n $lookup = new \\Enverido\\Lookup(getenv('ORGANISATION'));\n $response = $lookup->lookup(getenv('LICENCE_SHORTCODE'));\n\n // Check that all the expected attributes are returned\n $this->assertObjectHasAttribute('licence_id', $response);\n $this->assertObjectHasAttribute('product_id', $response);\n $this->assertObjectHasAttribute('short_code', $response);\n }", "function TestCase_lookup_priority_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_priority_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function findID($d) {\n\t\t$url = \"https://inpho.cogs.indiana.edu/thinker.json\";\n\t\t$data = @file_get_contents($url,o,null,null);\n\t\t$json = json_decode($data);\n\t\t$results = $json->responseData->results;\n\t\tforeach($results as $value) {\n\t\t\tif (strcasecmp($value->label,$d)==0) { \n\t\t\t\t$id = $value->ID;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//return value of $id when string matches\n\t\treturn $id;\n\t}", "public function getProcessDefinitionId(): ?string;", "public function run ()\n {\n $lookupType = array(\n [\n 'id' => 1,\n 'name' => \"Loan status\",\n 'description' => \"Different status of loan\",\n ],\n [\n 'id' => 2,\n 'name' => \"Payment Status\",\n 'description' => \"Different payment status\",\n ],\n );\n\n $lookupValue = array(\n [\n 'id' => 1,\n 'name' => \"NEW\",\n 'description' => \"NEW\",\n 'value' => 1,\n 'lookup_type_id' => 1,\n ],\n [\n 'id' => 2,\n 'name' => \"APPROVED\",\n 'description' => \"APPROVED\",\n 'value' => 1,\n 'lookup_type_id' => 1,\n ],\n [\n 'id' => 3,\n 'name' => \"CLOSED\",\n 'description' => \"CLOSED\",\n 'value' => 1,\n 'lookup_type_id' => 1,\n ],\n [\n 'id' => 4,\n 'name' => \"REJECTED\",\n 'description' => \"REJECTED\",\n 'value' => 1,\n 'lookup_type_id' => 1,\n ],\n [\n 'id' => 5,\n 'name' => \"PENDING\",\n 'description' => \"PENDING\",\n 'value' => 1,\n 'lookup_type_id' => 2,\n ],\n [\n 'id' => 6,\n 'name' => \"PAID\",\n 'description' => \"PAID\",\n 'value' => 1,\n 'lookup_type_id' => 2,\n ],\n [\n 'id' => 7,\n 'name' => \"MISSED\",\n 'description' => \"MISSED\",\n 'value' => 1,\n 'lookup_type_id' => 2,\n ],\n );\n\n LookupType::insert($lookupType);\n LookupValue::insert($lookupValue);\n }", "function TestPlan_lookup_type_name_by_id($type_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_name_by_id', array(new xmlrpcval($type_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}" ]
[ "0.7341836", "0.5491031", "0.53437054", "0.53384835", "0.5277239", "0.5240223", "0.5085258", "0.50455886", "0.5004854", "0.49922806", "0.49776092", "0.493115", "0.49287912", "0.48000243", "0.47797826", "0.47797504", "0.4757412", "0.47368905", "0.47246414", "0.46949783", "0.4690151", "0.4682831", "0.4682829", "0.46136215", "0.46026862", "0.45950812", "0.45901468", "0.4566535", "0.45591456", "0.4552139" ]
0.7888443
0
/ lookup_environment_name_by_id Lookup A TestRun Environment Name By Its ID Usage TestRun.lookup_environment_name_by_id Parameters ParameterData TypeComments environment_idintegerCannot be 0 Result name
function TestRun_lookup_environment_name_by_id($environment_id) { // Create call $call = new xmlrpcmsg('TestRun.lookup_environment_name_by_id', array(new xmlrpcval($environment_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_lookup_environment_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.lookup_environment_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_lookup_status_name_by_id($case_run_status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_name_by_id', array(new xmlrpcval($case_run_status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Build_lookup_name_by_id($build_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_name_by_id', array(new xmlrpcval($build_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_lookup_type_name_by_id($type_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_name_by_id', array(new xmlrpcval($type_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_status_name_by_id($status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_name_by_id', array(new xmlrpcval($status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Environment_get($environment_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Environment.get', array(new xmlrpcval($environment_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getEnvironment($id = 0)\n {\n $this->db->where('Id',$id);\n $sql = $this->db->get('environment');\n return $sql->row();\n }", "function TestCase_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_category_name_by_id($category_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_name_by_id', array(new xmlrpcval($category_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function auto_generate_results_identifier()\n\t{\n\t\t$results_identifier = null;\n\t\t$subsystem_r = array();\n\t\t$subsystems_to_test = $this->subsystems_under_test();\n\n\t\tif(!$this->is_new_result_file)\n\t\t{\n\t\t\t$result_file_intent = pts_result_file_analyzer::analyze_result_file_intent($this->result_file);\n\n\t\t\tif(is_array($result_file_intent) && $result_file_intent[0] != 'Unknown')\n\t\t\t{\n\t\t\t\tarray_unshift($subsystems_to_test, $result_file_intent[0]);\n\t\t\t}\n\t\t}\n\n\t\tforeach($subsystems_to_test as $subsystem)\n\t\t{\n\t\t\t$components = pts_result_file_analyzer::system_component_string_to_array(phodevi::system_hardware(true) . ', ' . phodevi::system_software(true));\n\t\t\tif($subsystem != null && isset($components[$subsystem]))\n\t\t\t{\n\t\t\t\t$subsystem_name = pts_strings::trim_search_query($components[$subsystem]);\n\n\t\t\t\tif(phodevi::is_vendor_string($subsystem_name) && !in_array($subsystem_name, $subsystem_r))\n\t\t\t\t{\n\t\t\t\t\t$subsystem_r[] = $subsystem_name;\n\t\t\t\t}\n\t\t\t\tif(isset($subsystem_r[2]) || isset($subsystem_name[19]))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(isset($subsystem_r[0]))\n\t\t{\n\t\t\t$results_identifier = implode(' - ', $subsystem_r);\n\t\t}\n\n\t\tif(empty($results_identifier) && !$this->batch_mode)\n\t\t{\n\t\t\t$results_identifier = phodevi::read_property('cpu', 'model') . ' - ' . phodevi::read_property('gpu', 'model') . ' - ' . phodevi::read_property('motherboard', 'identifier');\n\t\t}\n\n\t\tif(strlen($results_identifier) > 55)\n\t\t{\n\t\t\t$results_identifier = substr($results_identifier, 0, 54);\n\t\t\t$results_identifier = substr($results_identifier, 0, strrpos($results_identifier, ' '));\n\t\t}\n\n\t\tif(empty($results_identifier))\n\t\t{\n\t\t\t$results_identifier = date('Y-m-d H:i');\n\t\t}\n\n\t\t$this->results_identifier = $results_identifier;\n\n\t\treturn $results_identifier;\n\t}", "public function getTestKitName1($sample_id) {\n\t\t$columns = array ('sample_id');\n\t\t$records = array ($sample_id);\n\t\t$test_kit_name_1_ = $this->query_from_response_result_dts ( $columns, $records );\n\t\treturn sizeof($test_kit_name_1_)>0 ? $test_kit_name_1_ [0] ['test_kit_name_1'] : null;\n\t}", "function TestPlan_lookup_type_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Build_lookup_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Product_lookup_name_by_id($product_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Product.lookup_name_by_id', array(new xmlrpcval($product_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getTestKitName2($sample_id) {\n\t\t$columns = array ('sample_id');\n\t\t$records = array ($sample_id);\n\t\t$test_kit_name_2_ = $this->query_from_response_result_dts ( $columns, $records );\n\t\treturn sizeof($test_kit_name_2_)>0 ? $test_kit_name_2_ [0] ['test_kit_name_2'] : null;\n\t}", "public function lookupVanityDescription( $ulID ){ return $this->APICall( array('lookupVanityDescription' => $ulID), \"Failed to get the vanity name for \" . $ulID ); }", "public function test_searchName() {\n\t\t$this->testAction('/disease/search/Acute%20tubular%20necrosis', array('method' => 'get'));\n\t\t$returnedDisease = $this->vars['diseases']['Disease'];\n\n\t\t$this->assertEquals(1, count($this->vars['diseases']));\n\t}", "function TestCase_lookup_priority_name_by_id($priority_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_priority_name_by_id', array(new xmlrpcval($priority_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Environment_get_runs($environment_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Environment.get_runs', array(new xmlrpcval($environment_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "private function getApTestId(string $testName)\n {\n try {\n $dbh = DatabaseConnection::getInstance();\n $statement = $dbh->prepare(\"SELECT `apTestId` FROM `APTest` WHERE apTestName = :apTestName\");\n $statement->bindValue(\":apTestName\", $testName);\n $statement->setFetchMode(\\PDO::FETCH_ASSOC);\n $success = $statement->execute();\n\n if (!$success)\n {\n throw new \\PDOException(\"error: fail to retrieve ap test id with provided test name\");\n }\n else\n {\n $test = $statement->fetch();\n if (!empty($test['apTestId']))\n {\n return $test['apTestId'];\n }\n else\n {\n throw new \\PDOException(\"error: the provided ap test name is not in the current ap test list\");\n }\n }\n }\n catch (\\PDOException $e)\n {\n throw $e;\n }\n }", "function lookupJudgeById($judge_id){\n\t$data = M('user');\n\tif((int)$judge_id == -1){\n\t\treturn C('STR_EVENTLIST_NOJUDGE');\n\t}\n\telseif((int)$judge_id>=1){\n\t\t$condition['id'] = (int)$judge_id;\n\t\t$judge = $data->where($condition)->find();\n\t\treturn $judge['fullname'];\n\t}\n\telse\n\t\treturn false;\n}", "function getDepartmentName($id){\n if ($id == 0) {\n return \"None\";\n }\n return sqlSelectOne(\"SELECT * FROM departments WHERE department_id='$id'\", 'department_name');\n}", "public function getExecutionId(): ?string;", "function execute_test($run_id, $case_id, $test_id)\n{\n\t// triggering an external command line tool or API. This function\n\t// is expected to return a valid TestRail status ID. We just\n\t// generate a random status ID as a placeholder.\n\t\n\t\n\t$statuses = array(1, 2, 3, 4, 5);\n\t$status_id = $statuses[rand(0, count($statuses) - 1)];\n\tif ($status_id == 3) // Untested?\n\t{\n\t\treturn null;\t\n\t}\n\telse \n\t{\n\t\treturn $status_id;\n\t}\n}", "function getSafenameFromId($challenge_id) {\n $challenges = challenges();\n return $challenges[$challenge_id]['safename'];\n}", "function ibase_name_result($result, $name)\n{\n}", "public function lookupVanityName( $name ){ return $this->APICall( array('lookupVanityName' => $name), \"Failed to get the vanity ID for \" . $name ); }", "function TestCase_lookup_category_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getParameterName();" ]
[ "0.7265099", "0.6008571", "0.573965", "0.5554055", "0.5449047", "0.54386", "0.5351696", "0.53135264", "0.51485956", "0.50864285", "0.5069792", "0.4970468", "0.49632627", "0.49519473", "0.49369222", "0.4918284", "0.48865286", "0.4803193", "0.48028404", "0.4768613", "0.4766832", "0.4760895", "0.47415417", "0.47219187", "0.47126713", "0.47003326", "0.46927872", "0.46907216", "0.4684913", "0.46588618" ]
0.800287
0
/ list Get A List of TestCaseRuns Based on A Query Usage TestCaseRun.list Parameters ParameterData TypeComments queryhashmapCan not be null. See Query Examples. Result Array [0] Array [build_id] [case_text_version] [running_date] [sortkey] [case_id] [run_id] [testedby] [assignee] [environment_id] [close_date] [notes] [case_run_id] [iscurrent] [case_run_status_id] [1] Array ...
function TestCaseRun_list($query) { // Create array foreach($query as $key => $val) { switch($key) { case "assignee": case "build_id": case "canview": case "case_id": case "case_run_id": case "case_run_status_id": case "case_text_version": case "environment_id": case "iscurrent": case "run_id": case "sortkey": case "testedby": $type = "int"; break; case "close_date": case "notes": default: $type = "string"; } $qarray[$key] = new xmlrpcval($val, $type); } // Create call $call = new xmlrpcmsg('TestCaseRun.list', array(new xmlrpcval($qarray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"plan\":\n\t\t\t\tunset($va);\n\t\t\t\tforeach($key as $k => $v) {\n\t\t\t\t\t$va[$k] = new xmlrpcval($v, \"string\");\n\t\t\t\t}\n\t\t\t\t$val = $va;\n\t\t\t\t$type = \"struct\";\n\t\t\t\tbreak;\n\t\t\tcase \"build_id\":\n\t\t\tcase \"environment_id\":\n\t\t\tcase \"manager_id\":\n\t\t\tcase \"plan_id\":\n\t\t\tcase \"plan_text_version\":\n\t\t\tcase \"product_version\":\n\t\t\tcase \"run_id\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"notes\":\n\t\t\tcase \"start_date\":\n\t\t\tcase \"stop_date\":\n\t\t\tcase \"summary\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"plans\":\n\t\t\t\tunset($va);\n\t\t\t\tforeach($key as $k => $v) {\n\t\t\t\t\t$va[$k] = new xmlrpcval($v, \"string\");\n\t\t\t\t}\n\t\t\t\t$val = $va;\n\t\t\t\t$type = \"struct\";\n\t\t\t\tbreak;\n\t\t\tcase \"author_id\":\n\t\t\tcase \"canview\":\n\t\t\tcase \"case_id\":\n\t\t\tcase \"case_status_id\":\n\t\t\tcase \"category_id\":\n\t\t\tcase \"default_tester_id\":\n\t\t\tcase \"isautomated\":\n\t\t\tcase \"priority_id\":\n\t\t\tcase \"sortkey\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"alias\":\n\t\t\tcase \"arguments\":\n\t\t\tcase \"creation_date\":\n\t\t\tcase \"requirement\":\n\t\t\tcase \"script\":\n\t\t\tcase \"summary\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_get_test_case_runs($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_case_runs', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public static function apiList(Request $r) {\n\t\t\n\t\t// Authenticate request\n\t\tself::authenticateRequest($r);\n\t\t\n\t\tself::validateList($r);\n\t\t\n\t\t$runs_mask = null;\n\n\t\t// Get all runs for problem given \n\t\t$runs_mask = new Runs(array(\t\t\t\t\t\n\t\t\t\t\t\"status\" => $r[\"status\"],\n\t\t\t\t\t\"veredict\" => $r[\"veredict\"],\n\t\t\t\t\t\"problem_id\" => !is_null($r[\"problem\"]) ? $r[\"problem\"]->getProblemId() : null,\n\t\t\t\t\t\"language\" => $r[\"language\"],\n\t\t\t\t\t\"user_id\" => !is_null($r[\"user\"]) ? $r[\"user\"]->getUserId() : null,\n\t\t\t\t));\n\t\t\n\t\t// Filter relevant columns\n\t\t$relevant_columns = array(\"run_id\", \"guid\", \"language\", \"status\", \"veredict\", \"runtime\", \"memory\", \"score\", \"contest_score\", \"time\", \"submit_delay\", \"Users.username\", \"Problems.alias\");\n\n\t\t// Get our runs\n\t\ttry {\n\t\t\t$runs = RunsDAO::search($runs_mask, \"time\", \"DESC\", $relevant_columns, $r[\"offset\"], $r[\"rowcount\"]);\n\t\t} catch (Exception $e) {\n\t\t\t// Operation failed in the data layer\n\t\t\tthrow new InvalidDatabaseOperationException($e);\n\t\t}\n\t\t\n\t\t$relevant_columns[11] = 'username';\n\t\t$relevant_columns[12] = 'alias';\n\n\t\t$result = array();\n\n\t\tforeach ($runs as $run) {\n\t\t\t$filtered = $run->asFilteredArray($relevant_columns);\n\t\t\t$filtered['time'] = strtotime($filtered['time']);\n\t\t\t$filtered['score'] = round((float) $filtered['score'], 4);\n\t\t\t$filtered['contest_score'] = round((float) $filtered['contest_score'], 2);\n\t\t\tarray_push($result, $filtered);\n\t\t}\n\n\t\t$response = array();\n\t\t$response[\"runs\"] = $result;\n\t\t$response[\"status\"] = \"ok\";\n\n\t\treturn $response;\n\t}", "function TestPlan_list($query) {\n\t// Create array\n\tforeach($query as $key => $val) {\n\t\tswitch($key) {\n\t\t\tcase \"author_id\":\n\t\t\tcase \"isactive\":\n\t\t\tcase \"plan_id\":\n\t\t\tcase \"product_id\":\n\t\t\tcase \"type_id\":\n\t\t\t\t$type = \"int\";\n\t\t\t\tbreak;\n\t\t\tcase \"default_product_version\":\n\t\t\tcase \"creation_date\":\n\t\t\tcase \"name\":\n\t\t\tdefault:\n\t\t\t\t$type = \"string\";\n\t\t}\n\t\t$qarray[$key] = new xmlrpcval($val, $type);\n\t}\n\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.list', array(new xmlrpcval($qarray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getRuns() {\n\t\tif(!$data = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/run_list.jsp?_plus=true')) {\n\t\t\tthrow new ErrorException($this->feedErrorMessage);\n\t\t}\n\t\treturn $data->runList;\n\t}", "function TestRun_get_test_cases($run_id) {\n\t// Create call\n\t// FIXME: not working\n\t$call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_get_test_runs($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_test_runs', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function testlistAction() \n {\n $model = new Application_Model_Mapper_Server($vars);\n $result = $model->getTestDetails();\n $data = array();\n $result = json_encode($result);\n $this->view->assign('result', $result);\n $this->_helper->viewRenderer('index');\n }", "public function testGetList()\n {\n $result = $this->getQueryBuilderConnection()\n ->select('field')\n ->from('querybuilder_tests')\n ->where('id', '>', 7)\n ->getList();\n\n $expected = [\n 'iiii',\n 'jjjj',\n ];\n\n $this->assertEquals($expected, $result);\n }", "public function list(array $parameters): ListResponse;", "public function getTests();", "public function getTaskList(Versionnable $versionnable);", "protected function getTestList() \n {\n $invalid = 'invalid';\n $description = 'text';\n $empty_description = '';\n $testlist = [];\n $testlist[] = new ArgumentTestConfig($this->empty_argument, $empty_description,CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n \n $testlist[] = new ArgumentTestConfig($this->argument_name, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid, $this->argument_name, $invalid, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_empty_need_optional, $empty_description, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n $testlist[] = new ArgumentTestConfig($this->argument_empty_need_required, $empty_description, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n $testlist[] = new ArgumentTestConfig($this->argument_empty_need_invalid, $empty_description, $invalid, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class );\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_string, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_string, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_string, $this->argument_name, $invalid, CreateModuleCommandArgument::STRING, $empty_description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_string, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_empty, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_array, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::ARRAY, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_array, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::ARRAY, $empty_description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_array, $this->argument_name, $invalid, CreateModuleCommandArgument::ARRAY, $empty_description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_invalid, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, $invalid, $empty_description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_invalid, $this->argument_name, CreateModuleCommandArgument::REQUIRED, $invalid, $empty_description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_string_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_string_description, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::STRING, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_string_description, $this->argument_name, $invalid, CreateModuleCommandArgument::STRING, $description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_array_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::ARRAY, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_array_description, $this->argument_name, CreateModuleCommandArgument::REQUIRED, CreateModuleCommandArgument::ARRAY, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_array_description, $this->argument_name, $invalid, CreateModuleCommandArgument::ARRAY, $description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_empty_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $description);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_empty_type_empty_description_empty, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, CreateModuleCommandArgument::STRING, $empty_description);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_optional_type_invalid_description, $this->argument_name, CreateModuleCommandArgument::OPTIONAL, $invalid, $description, \\InvalidArgumentException::class);\n $testlist[] = new ArgumentTestConfig($this->argument_name_need_required_type_invalid_description, $this->argument_name, CreateModuleCommandArgument::REQUIRED, $invalid, $description, \\InvalidArgumentException::class);\n \n $testlist[] = new ArgumentTestConfig($this->argument_name_need_invalid_type_invalid_description, $this->argument_name, $invalid, $invalid, $description, \\InvalidArgumentException::class);\n \n return $testlist;\n }", "public function getAllReadinessChecklistSurveys($parameters) {\n error_log(implode(\"--\", $parameters));\n\n $aColumns = array('readiness_checklist_id', 'start_date', 'end_date', 'created_at', 'created_by');\n\n /* Indexed column (used for fast and accurate table cardinality) */\n $sIndexColumn = $this->_primary;\n\n\n /*\n * Paging\n */\n $sLimit = \"\";\n if (isset($parameters['iDisplayStart']) && $parameters['iDisplayLength'] != '-1') {\n $sOffset = $parameters['iDisplayStart'];\n $sLimit = $parameters['iDisplayLength'];\n }\n\n /*\n * Ordering\n */\n $sOrder = \"\";\n if (isset($parameters['iSortCol_0'])) {\n $sOrder = \"\";\n for ($i = 0; $i < intval($parameters['iSortingCols']); $i++) {\n if ($parameters['bSortable_' . intval($parameters['iSortCol_' . $i])] == \"true\") {\n $sOrder .= $aColumns[intval($parameters['iSortCol_' . $i])] . \"\n\t\t\t\t \t\" . ($parameters['sSortDir_' . $i]) . \", \";\n }\n }\n\n $sOrder = substr_replace($sOrder, \"\", -2);\n }\n\n /*\n * Filtering\n * NOTE this does not match the built-in DataTables filtering which does it\n * word by word on any field. It's possible to do here, but concerned about efficiency\n * on very large tables, and MySQL's regex functionality is very limited\n */\n $sWhere = \"\";\n if (isset($parameters['sSearch']) && $parameters['sSearch'] != \"\") {\n $searchArray = explode(\" \", $parameters['sSearch']);\n $sWhereSub = \"\";\n foreach ($searchArray as $search) {\n if ($sWhereSub == \"\") {\n $sWhereSub .= \"(\";\n } else {\n $sWhereSub .= \" AND (\";\n }\n $colSize = count($aColumns);\n\n for ($i = 0; $i < $colSize; $i++) {\n if ($i < $colSize - 1) {\n $sWhereSub .= $aColumns[$i] . \" LIKE '%\" . ($search) . \"%' OR \";\n } else {\n $sWhereSub .= $aColumns[$i] . \" LIKE '%\" . ($search) . \"%' \";\n }\n }\n $sWhereSub .= \")\";\n }\n $sWhere .= $sWhereSub;\n }\n\n /* Individual column filtering */\n for ($i = 0; $i < count($aColumns); $i++) {\n if (isset($parameters['bSearchable_' . $i]) && $parameters['bSearchable_' . $i] == \"true\" && $parameters['sSearch_' . $i] != '') {\n if ($sWhere == \"\") {\n $sWhere .= $aColumns[$i] . \" LIKE '%\" . ($parameters['sSearch_' . $i]) . \"%' \";\n } else {\n $sWhere .= \" AND \" . $aColumns[$i] . \" LIKE '%\" . ($parameters['sSearch_' . $i]) . \"%' \";\n }\n }\n }\n\n\n /*\n * SQL queries\n * Get data to display\n */\n\n $sQuery = $this->getAdapter()->select()->from(array('a' => $this->_name));\n\n if (isset($sWhere) && $sWhere != \"\") {\n $sQuery = $sQuery->where($sWhere);\n }\n\n if (isset($sOrder) && $sOrder != \"\") {\n $sQuery = $sQuery->order($sOrder);\n }\n\n if (isset($sLimit) && isset($sOffset)) {\n $sQuery = $sQuery->limit($sLimit, $sOffset);\n }\n\n //error_log($sQuery);\n\n $rResult = $this->getAdapter()->fetchAll($sQuery);\n\n\n /* Data set length after filtering */\n $sQuery = $sQuery->reset(Zend_Db_Select::LIMIT_COUNT);\n $sQuery = $sQuery->reset(Zend_Db_Select::LIMIT_OFFSET);\n $aResultFilterTotal = $this->getAdapter()->fetchAll($sQuery);\n $iFilteredTotal = count($aResultFilterTotal);\n\n /* Total data set length */\n $sQuery = $this->getAdapter()->select()->from($this->_name, new Zend_Db_Expr(\"COUNT('\" . $sIndexColumn . \"')\"));\n $aResultTotal = $this->getAdapter()->fetchCol($sQuery);\n $iTotal = $aResultTotal[0];\n\n /*\n * Output\n */\n $output = array(\n \"sEcho\" => intval($parameters['sEcho']),\n \"iTotalRecords\" => $iTotal,\n \"iTotalDisplayRecords\" => $iFilteredTotal,\n \"aaData\" => array()\n );\n\n\n foreach ($rResult as $aRow) {\n $row = array();\n $row[] = $aRow['readiness_checklist_id'];\n $row[] = $aRow['start_date'];\n $row[] = $aRow['end_date'];\n $row[] = $aRow['created_at'];\n $creator = new Application_Service_SystemAdmin();\n $creatorDetails = $creator->getSystemAdminDetails($aRow['created_by']);\n $row[] = $creatorDetails['first_name'] . \" \" . $creatorDetails['last_name'];\n $row[] = '<a href=\"/admin/readiness-checklist/viewresponse/id/' . $aRow['id'] \n . '\" class=\"btn btn-warning btn-xs\" style=\"margin-right: 2px;\">'\n .'<i class=\"icon-pencil\"></i> View Response</a> ';\n\n $output['aaData'][] = $row;\n }\n\n echo json_encode($output);\n }", "function runTests() {\n\t\tif(is_array($this->_aTests)){\n\t\t\tforeach($this->_aTests as $test){\n\t\t\t\t$this->_aResults[$test->sName] = array();\n\t\t\t\t$this->_aResults = $test->run($this->_aResults);\n\n\t\t\t}\n\t\t}\n\t}", "public function list_plan($parameters){\n try {\n $planList = Plan::all(array_filter($parameters), $this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLANS'] = $planList->toArray();\n $returnArray['RAWREQUEST']= json_encode($parameters);\n $returnArray['RAWRESPONSE']=$planList->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n } \n }", "public function get_all_tests()\n\t{\n\t\treturn $this->db->get('test')->result();\n\t}", "function getList( &$pListHash ) {\n\t\tLibertyContent::prepGetList( $pListHash );\n\t\t\n\t\t$whereSql = $joinSql = $selectSql = '';\n\t\t$bindVars = array();\n// Update to more flexible date management later\n\t\tarray_push( $bindVars, 'TODAY' );\n\t\tarray_push( $bindVars, 'TOMORROW' );\n//\t\t$this->getServicesSql( 'content_list_sql_function', $selectSql, $joinSql, $whereSql, $bindVars );\n\n\t\tif ( isset($pListHash['queue_id']) ) {\n\t\t\t$whereSql .= \" AND ti.`room` = 80 + ? \";\n\t\t\tarray_push( $bindVars, $pListHash['queue_id'] );\n\t\t}\n\n// init_id and staff_id will map to creator_user_id and modifier_user_id when fully converted to LC\n// , lc.* \t\t\t\tINNER JOIN `\".BIT_DB_PREFIX.\"liberty_content` lc ON ( lc.`content_id` = ci.`content_id` )\n\n\t\t$query = \"SELECT ti.*, ci.*, tr.`title` as reason,\n\t\t\t\tuue.`login` AS modifier_user, uue.`real_name` AS modifier_real_name,\n\t\t\t\tuuc.`login` AS creator_user, uuc.`real_name` AS creator_real_name $selectSql\n\t\t\t\tFROM `\".BIT_DB_PREFIX.\"task_ticket` ti \n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"users_users` uue ON (uue.`user_id` = ti.`staff_id`)\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"users_users` uuc ON (uuc.`user_id` = ti.`init_id`)\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"citizen` ci ON (ci.`usn` = ti.`usn`)\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"task_reason` tr ON (tr.`reason` = ti.`tags`)\n\t\t\t\t$joinSql\n\t\t\t\tWHERE ti.`ticket_ref` BETWEEN ? AND ? $whereSql \n\t\t\t\torder by ti.`ticket_ref`\";\n\t\t$query_cant = \"SELECT COUNT(ti.`ticket_no`) FROM `\".BIT_DB_PREFIX.\"task_ticket` ti\n\t\t\t\t$joinSql\n\t\t\t\tWHERE ti.`ticket_ref` BETWEEN ? AND ? $whereSql\";\n\n\t\t$ret = array();\n\t\t$this->mDb->StartTrans();\n\t\t$result = $this->mDb->query( $query, $bindVars, $pListHash['max_records'], $pListHash['offset'] );\n\t\t$cant = $this->mDb->getOne( $query_cant, $bindVars );\n\t\t$this->mDb->CompleteTrans();\n\n\t\twhile ($res = $result->fetchRow()) {\n\t\t\t$res['ticket_url'] = $this->getDisplayUrlFromHasH( $res );\n\t\t\t$ret[] = $res;\n\t\t}\n\n\t\t$pListHash['cant'] = $cant;\n\t\tLibertyContent::postGetList( $pListHash );\n\t\treturn $ret;\n\t}", "public function index()\n {\n $runTypes = RunType::all();\n\n return $runTypes;\n }", "public function getResults();", "private function getList()\n\t{\n\t\t// Get the correct billboards collection to display from the parameters\n\t\t$collection = (int) $this->params->get('collection', 1);\n\n\t\t// Grab all the buildboards associated with the selected collection\n\t\t// Make sure we only grab published billboards\n\t\t$rows = Billboard::whereEquals('published', 1)\n\t\t ->whereEquals('collection_id', $collection)\n\t\t ->order('ordering', 'asc')\n\t\t ->rows();\n\n\t\treturn $rows;\n\t}", "public function getTestResults()\n\t{\n\t\t/*\n\t\t * Wenn die Tests noch nicht ausgeführt wurden, dies nun tun\n\t\t */\n\t\tif ($this->_needRun === true)\n\t\t{\n\t\t\t$this->run();\n\t\t}\n\t\tforeach ($this->_testCases as $key => $testCase)\n\t\t{\n\t\t\t/*\n\t\t\t * Zusicherung nicht erfüllt\n\t\t\t*/\n\t\t\tif ($testCase['assert'] !== $testCase['result'])\n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": fehlgeschlagen \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" != \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_failedTests++;\n\t\t\t}\n\t\t\t/*\n\t\t\t * Zusicherung erfüllt\n\t\t\t*/\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->_testResults[$key] = $this->_testCases[$key]['functionName'].\": erfolgreich \".\n\t\t\t\t\t$this->boolToString($testCase['assert']).\" == \".$this->boolToString($testCase['result']).\"<br>\";\n\t\t\t\t$this->_passedTests++;\n\t\t\t}\n\t\t} \n\t\treturn $this->_testResults;\t\n\t}", "public function listAction()\n {\n//\n $request = $this->getRequest();\n\n $routeMatch = $this->getEvent()->getRouteMatch();\n $id = $routeMatch->getParam('workout_id', 0);\n\n if ($id <= 0) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n /**\n * Grid FORM\n */\n $form = new WorkoutExerciseGrid(\n array(\n 'view' => $this->_view,\n )\n );\n\n /**\n * BUILDING LIST\n */\n $list = new WorkoutExerciseResultSet(\n array(\n 'model' => $this->_exercise,\n 'view' => $this->_view,\n )\n );\n\n $list->setFieldOptions('type_id', array(\n 'values' => $types = $this->_exerciseType->getBehaviour('nestedSet')->getResultSetForText(),\n ));\n\n $typesTemp = $this->_exerciseType->getResultSet()->toArray();\n $types = array();\n foreach ( $typesTemp as $key => $type) {\n $types[$type['type_id']] = $type;\n }\n\n\n $list->addField(\n 'results',\n 'custom',\n array(\n 'label' => 'results',\n 'sortable' => false,\n 'values' => $types,\n 'viewScript' => 'workout-exercise/_field_result.phtml',\n )\n );\n\n $list->setDbWhere('workout_id = ' . (int)$id);\n\n //\n $list->processRequest($this->getRequest());\n\n //\n $list->build();\n\n //\n $form->addSubForm($list, $list->getName());\n\n// //\n $this->_view->headScript()->appendScript(\n $this->_view->render(\n 'workout-exercise/list.js',\n array(\n 'back' => $this->url()->fromRoute('hi-training/workout/list'),\n 'delete' => $this->url()->fromRoute('hi-training/workout-exercise/delete/wildcard', array('exercise_id' => '')),\n 'edit' => $this->url()->fromRoute('hi-training/workout-exercise/edit/wildcard', array('exercise_id' => '')),\n 'add' => $this->url()->fromRoute('hi-training/workout-exercise/add/wildcard', array('workout_id' => $id)),\n )\n )\n );\n\n /**\n * POST\n */\n if ($this->getRequest()->isPost()) {\n\n $formData = $this->getRequest()->post()->toArray();\n\n\n if ($form->isValid($formData)) {\n \\Zend\\Debug::dump($formData);\n if ( isset($formData['header']['formId'])\n && $formData['header']['formId'] == 'WorkoutExerciseGridForm') {\n\n if (isset($formData['WorkoutExerciseResultSet']['actions']['saveSelected'])) {\n $allBox = $formData['WorkoutExerciseResultSet']['header']['all'];\n $rows = $formData['WorkoutExerciseResultSet']['rows'];\n\n foreach ($rows as $key => $row) {\n if ($row['id'] || $allBox) {\n $exercise = $this->_exercise->getRow(array('exercise_id' => $key));\n $exercise->populate($row['row']);\n $exercise->save();\n\n }\n }\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n }\n\n if (isset($formData['WorkoutExerciseResultSet']['actions']['deleteSelected'])) {\n\n $allBox = $formData['WorkoutExerciseResultSet']['header']['all'];\n $rows = $formData['WorkoutExerciseResultSet']['rows'];\n\n foreach ($rows as $key => $row) {\n if ($row['id'] || $allBox) {\n\n $exercise = $this->_exercise->getRow(array('exercise_id' => $key));\n $exercise->delete();\n\n }\n }\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n//\n }\n }\n }\n }\n\n return array(\n 'form' => $form,\n 'workout' => $this->_workout->getRow(array('workout_id'=>$id)),\n );\n\n }", "public function index()\n {\n return Inertia::render('TestResult', [\n 'testResultList' => TestResult::latest()->paginate(5)\n ]);\n }", "public function getRuns()\n {\n return $this->runs;\n }", "public function getLabTests()\n {\n $labTests = null;\n\n try\n {\n $query = DB::table('labtest as lt')->select('lt.id', 'lt.test_name')->where('lt.test_status', '=', 1);\n $labTests = $query->get();\n }\n catch(QueryException $queryEx)\n {\n throw new HospitalException(null, ErrorEnum::LAB_LIST_ERROR, $queryEx);\n }\n catch(Exception $exc)\n {\n throw new HospitalException(null, ErrorEnum::LAB_LIST_ERROR, $exc);\n }\n\n return $labTests;\n }", "public function testList()\n {\n //Tests list by date\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03-06');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by month\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by date and status\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03-06/payed');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by month and status\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03/payed');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by year and status\n $this->clientAuthenticated->request('GET', '/transaction/list/2019/payed');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by date and person\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03-06/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by month and person\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by year and person\n $this->clientAuthenticated->request('GET', '/transaction/list/2019/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by status and person\n $this->clientAuthenticated->request('GET', '/transaction/list/payed/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n }", "function get_all_scheduled_tests()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('scheduled_tests')->result_array();\n }", "protected function _executeGetList() {\n // Init\n $list = array();\n\n $pid = (int)$this->_postVar['pid'];\n $offset = (int)$this->_postVar['start'];\n $limit = (int)$this->_postVar['limit'];\n $itemsPerPage = (int)$this->_postVar['pagingSize'];\n $depth = (int)$this->_postVar['depth'];\n $sysLanguage = (int)$this->_postVar['sysLanguage'];\n $listType = (string)$this->_postVar['listType'];\n\n // Store last selected language\n $GLOBALS['BE_USER']->setAndSaveSessionData('TQSeo.sysLanguage', $sysLanguage);\n\n if (!empty($pid)) {\n $page = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord('pages', $pid);\n\n $fieldList = array();\n\n switch ($listType) {\n case 'metadata':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'keywords',\n 'description',\n 'abstract',\n 'author',\n 'author_email',\n 'lastupdated',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n\n unset($row);\n foreach ($list as &$row) {\n if (!empty($row['lastupdated'])) {\n $row['lastupdated'] = date('Y-m-d', $row['lastupdated']);\n } else {\n $row['lastupdated'] = '';\n }\n }\n unset($row);\n break;\n\n case 'geo':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_geo_lat',\n 'tx_tqseo_geo_long',\n 'tx_tqseo_geo_place',\n 'tx_tqseo_geo_region'\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'searchengines':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_canonicalurl',\n 'tx_tqseo_is_exclude',\n 'tx_tqseo_priority',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'url':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'title',\n 'url_scheme',\n 'alias',\n 'tx_realurl_pathsegment',\n 'tx_realurl_pathoverride',\n 'tx_realurl_exclude',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitle':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_pagetitle',\n 'tx_tqseo_pagetitle_rel',\n 'tx_tqseo_pagetitle_prefix',\n 'tx_tqseo_pagetitle_suffix',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitlesim':\n $buildTree = FALSE;\n $list = $this->_listPageTitleSim($page, $depth, $sysLanguage);\n break;\n\n default:\n // Not defined\n return;\n break;\n }\n }\n\n $ret = array(\n 'results' => count($list),\n 'rows' => array_values($list),\n );\n\n return $ret;\n }" ]
[ "0.73265195", "0.68062705", "0.6181923", "0.6087728", "0.5976985", "0.5707804", "0.5639907", "0.56284094", "0.5595147", "0.5523965", "0.53909624", "0.5373161", "0.5351092", "0.5342368", "0.53377175", "0.52156097", "0.5123363", "0.51168174", "0.5115156", "0.5083085", "0.50667226", "0.5058651", "0.50520337", "0.503997", "0.5007503", "0.4989601", "0.49849302", "0.4978597", "0.49702895", "0.496743" ]
0.7687766
0
/ create Create A New TestCaseRun Usage TestCaseRun.create Parameters ParameterData TypeComments new_valueshashmapSee required attributes list below. Required attributes: assignee, build_id, case_id, case_text_version, environment_id, and run_id case_run_status_id always set to 1 (IDLE) on create Result case_run_id
function TestCaseRun_create($assignee, $build_id, $case_id, $case_text_version, $environment_id, $run_id, $canview = NULL, $close_date = NULL, $iscurrent = NULL, $notes = NULL, $sortkey = NULL, $testedby = NULL) { $varray = array("assignee" => "int", "build_id" => "int", "case_id" => "int", "case_text_version" => "int", "environment_id" => "int", "run_id" => "int", "canview" => "int", "close_date" => "string", "iscurrent" => "int", "notes" => "string", "sortkey" => "int", "testedby" => "int"); foreach($varray as $key => $val) { if (isset(${$key})) { $carray[$key] = new xmlrpcval(${$key}, $val); } } // Create call $call = new xmlrpcmsg('TestCaseRun.create', array(new xmlrpcval($carray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_create($build_id, $environment_id, $manager_id, $plan_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_create($author_id, $case_status_id, $category_id, $isautomated, $plan_id, $alias = NULL, $arguments = NULL, $canview = NULL, $creation_date = NULL, $default_tester_id = NULL, $priority_id = NULL, $requirement = NULL, $script = NULL, $summary = NULL, $sortkey = NULL) {\n\t$varray = array(\"author_id\" => \"int\", \"case_status_id\" => \"int\", \"category_id\" => \"int\", \"isautomated\" => \"int\", \"plan_id\" => \"int\", \"alias\" => \"string\", \"arguments\" => \"string\", \"canview\" => \"int\", \"creation_date\" => \"string\", \"default_tester_id\" => \"int\", \"priority_id\" => \"int\", \"requirement\" => \"string\", \"script\" => \"string\", \"summary\" => \"string\", \"sortkey\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function create( array $parameters );", "public function create( array $parameters );", "function TestPlan_create($author_id, $product_id, $default_product_version, $type_id, $name, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function createAction() {\n\n $this->validateUser();\n\n $form = new Yourdelivery_Form_Testing_Create();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->getRequest()->getPost())) {\n if ($form->getValue('tag') && $this->getRequest()->getParam('proceed') == 'false') {\n $tags = Yourdelivery_Model_Testing_TestCase::searchForTags($form->getValue('tag'));\n\n if ($tags) {\n foreach ($tags as $tag) {\n $ids .= sprintf('<a href=\"/testing_cms/overview/id/%s\" target=\"blank\">%s</a> ', $tag['id'], $tag['id']);\n }\n $this->warn('Tag already in use for testcase ' . $ids);\n $this->_redirect(vsprintf('testing_cms/create/title/%s/author/%s/description/%s/priority/%s/tag/%s/proceed/true', $form->getValues()));\n }\n }\n\n $testCase = new Yourdelivery_Model_Testing_TestCase();\n $testCase->setData($form->getValues());\n $id = $testCase->save();\n $this->success('Testcase successfully created.');\n $this->_redirect('testing_cms/add/id/' . $id);\n } else {\n $this->error($form->getMessages());\n }\n }\n $this->view->post = $this->getRequest()->getParams();\n }", "public function test_calledCreateMethod_withValidParameters_argumentsHasBeenSetted()\n {\n $dataContainerMock = $this->getDataConteinerMock();\n\n $sut = DataWrapper::create(\n 200,\n \"Ok\",\n \"copyright\",\n \"attribution text\",\n \"attribution HTML\",\n $dataContainerMock,\n \"etag\"\n );\n\n $this->assertEquals(200, $sut->getCode());\n $this->assertEquals(\"Ok\", $sut->getStatus());\n $this->assertEquals(\"copyright\", $sut->getCopyright());\n $this->assertEquals(\"attribution text\", $sut->getAttributionText());\n $this->assertEquals(\"attribution HTML\", $sut->getAttributionHTML());\n $this->assertEquals(\"etag\", $sut->getEtag());\n }", "public function create($params)\n {\n }", "public function create($params);", "function Build_create($product_id, $name, $description = NULL, $milestone = NULL, $isactive = TRUE) {\n\t$varray = array(\"product_id\" => \"int\", \"name\" => \"string\", \"description\" => \"string\", \"milestone\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('Build.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "private static function createSampleObject($id, $title, $projectId, $text = '', $version = '', $authorId = 0,\n\t\t$created = null, $status = 0, $classification = 0)\n\t{\n\t\tself::$data[$id] = new stdClass;\n\t\tself::$data[$id]->id = $id;\n\t\tself::$data[$id]->title = $title;\n\t\tself::$data[$id]->project_id = $projectId;\n\t\tself::$data[$id]->text = $text;\n\t\tself::$data[$id]->version = $version;\n\t\tself::$data[$id]->author_id = $authorId;\n\t\tself::$data[$id]->created = $created;\n\t\tself::$data[$id]->status = $status;\n\t\tself::$data[$id]->classification = $classification;\n\t}", "public static function apiCreate(Request $r) {\n\t\t// Init\n\t\tself::initializeGrader();\n\n\t\t// Authenticate user\n\t\tself::authenticateRequest($r);\n\n\t\t// Validate request\n\t\tself::validateCreateRequest($r);\n\n\t\tLogger::log(\"New run being submitted !!\");\n\t\t$response = array();\n\n\t\tif (self::$practice) {\n\t\t\t$submit_delay = 0;\n\t\t\t$contest_id = null;\n\t\t\t$test = 0;\n\t\t} else {\n\t\t\t//check the kind of penalty_time_start for this contest\n\t\t\t$penalty_time_start = $r[\"contest\"]->getPenaltyTimeStart();\n\n\t\t\tswitch ($penalty_time_start) {\n\t\t\t\tcase \"contest\":\n\t\t\t\t\t// submit_delay is calculated from the start\n\t\t\t\t\t// of the contest\n\t\t\t\t\t$start = $r[\"contest\"]->getStartTime();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"problem\":\n\t\t\t\t\t// submit delay is calculated from the \n\t\t\t\t\t// time the user opened the problem\n\t\t\t\t\t$opened = ContestProblemOpenedDAO::getByPK(\n\t\t\t\t\t\t\t\t\t$r[\"contest\"]->getContestId(), $r[\"problem\"]->getProblemId(), $r[\"current_user_id\"]\n\t\t\t\t\t);\n\n\t\t\t\t\tif (is_null($opened)) {\n\t\t\t\t\t\t//holy moly, he is submitting a run \n\t\t\t\t\t\t//and he hasnt even opened the problem\n\t\t\t\t\t\t//what should be done here?\n\t\t\t\t\t\tLogger::error(\"User is submitting a run and he has not even opened the problem\");\n\t\t\t\t\t\tthrow new Exception(\"User is submitting a run and he has not even opened the problem\");\n\t\t\t\t\t}\n\n\t\t\t\t\t$start = $opened->getOpenTime();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"none\":\n\t\t\t\t\t//we dont care\n\t\t\t\t\t$start = null;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tLogger::error(\"penalty_time_start for this contests is not a valid option, asuming `none`.\");\n\t\t\t\t\t$start = null;\n\t\t\t}\n\n\t\t\tif (!is_null($start)) {\n\t\t\t\t//ok, what time is it now?\n\t\t\t\t$c_time = time();\n\t\t\t\t$start = strtotime($start);\n\n\t\t\t\t//asuming submit_delay is in minutes\n\t\t\t\t$submit_delay = (int) (( $c_time - $start ) / 60);\n\t\t\t} else {\n\t\t\t\t$submit_delay = 0;\n\t\t\t}\n\n\t\t\t$contest_id = $r[\"contest\"]->getContestId();\n\t\t\t$test = Authorization::IsContestAdmin($r[\"current_user_id\"], $r[\"contest\"]) ? 1 : 0;\n\t\t}\n\n\t\t// Populate new run object\n\t\t$run = new Runs(array(\n\t\t\t\t\t\"user_id\" => $r[\"current_user_id\"],\n\t\t\t\t\t\"problem_id\" => $r[\"problem\"]->getProblemId(),\n\t\t\t\t\t\"contest_id\" => $contest_id,\n\t\t\t\t\t\"language\" => $r[\"language\"],\n\t\t\t\t\t\"source\" => $r[\"source\"],\n\t\t\t\t\t\"status\" => \"new\",\n\t\t\t\t\t\"runtime\" => 0,\n\t\t\t\t\t\"memory\" => 0,\n\t\t\t\t\t\"score\" => 0,\n\t\t\t\t\t\"contest_score\" => 0,\n\t\t\t\t\t\"ip\" => $_SERVER['REMOTE_ADDR'],\n\t\t\t\t\t\"submit_delay\" => $submit_delay, /* based on penalty_time_start */\n\t\t\t\t\t\"guid\" => md5(uniqid(rand(), true)),\n\t\t\t\t\t\"veredict\" => \"JE\",\n\t\t\t\t\t\"test\" => $test\n\t\t\t\t));\n\n\t\ttry {\n\t\t\t// Push run into DB\n\t\t\tRunsDAO::save($run);\n\t\t\t\n\t\t\t// Update submissions counter++\n\t\t\t$r[\"problem\"]->setSubmissions($r[\"problem\"]->getSubmissions() + 1);\n\t\t\tProblemsDAO::save($r[\"problem\"]);\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t// Operation failed in the data layer\n\t\t\tthrow new InvalidDatabaseOperationException($e);\n\t\t}\n\n\t\ttry {\n\t\t\t// Create file for the run \n\t\t\t$filepath = RUNS_PATH . DIRECTORY_SEPARATOR . $run->getGuid();\n\t\t\tFileHandler::CreateFile($filepath, $r[\"source\"]);\n\t\t} catch (Exception $e) {\n\t\t\tthrow new InvalidFilesystemOperationException($e);\n\t\t}\n\n\t\t// Call Grader\n\t\ttry {\n\t\t\tself::$grader->Grade($run->getRunId());\n\t\t} catch (Exception $e) {\n\t\t\tLogger::error(\"Call to Grader::grade() failed:\");\n\t\t\tLogger::error($e);\n\t\t}\n\n\t\tif (self::$practice) {\n\t\t\t$response['submission_deadline'] = 0;\n\t\t} else {\n\t\t\t// Add remaining time to the response\n\t\t\ttry {\n\t\t\t\t$contest_user = ContestsUsersDAO::getByPK($r[\"current_user_id\"], $r[\"contest\"]->getContestId());\n\n\t\t\t\tif ($r[\"contest\"]->getWindowLength() === null) {\n\t\t\t\t\t$response['submission_deadline'] = strtotime($r[\"contest\"]->getFinishTime());\n\t\t\t\t} else {\n\t\t\t\t\t$response['submission_deadline'] = min(strtotime($r[\"contest\"]->getFinishTime()), strtotime($contest_user->getAccessTime()) + $r[\"contest\"]->getWindowLength() * 60);\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\t// Operation failed in the data layer\n\t\t\t\tthrow new InvalidDatabaseOperationException($e);\n\t\t\t}\n\t\t}\n\n\t\t// Happy ending\n\t\t$response[\"guid\"] = $run->getGuid();\n\t\t$response[\"status\"] = \"ok\";\n\n\t\tif (!self::$practice) {\n\t\t\t/// @todo Invalidate cache only when this run changes a user's score\n\t\t\t/// (by improving, adding penalties, etc)\n\t\t\tself::InvalidateScoreboardCache($r[\"contest\"]->getContestId());\n\t\t}\n\n\t\treturn $response;\n\t}", "public function createTask ($summary, $description, $project, $assignee, $type, $priority, $status, $component, $version) {\r\n\t\t$db = new DB();\r\n\t\t$db->connect();\r\n\t\t\r\n\t\t$summary = $db->esc($summary);\r\n\t\t$description = $db->esc($description);\r\n\t\t$project = $db->esc($project);\r\n\t\t$assignee = $db->esc($assignee);\r\n\t\t$type = $db->esc($type);\r\n\t\t$priority = $db->esc($priority);\r\n\t\t$status = $db->esc($status);\r\n\t\t$component = $db->esc($component);\r\n\t\t$version = $db->esc($version);\r\n\t\t\r\n\t\tif ($assignee == 0) {\r\n\t\t\t$assignee = \"null\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$assignee = \"'\".$assignee.\"'\";\r\n\t\t}\r\n\t\t\r\n\t\tif ($component == 0) {\r\n\t\t\t$component = \"null\";\r\n\t\t}\r\n\t\t\r\n\t\tif ($version == 0) {\r\n\t\t\t$version = \"null\";\r\n\t\t}\r\n\t\t\r\n\t\t$sql = \"INSERT INTO `task` (`summary`, `description`, `status_id`, `project_id`, `creator_id`, \r\n\t\t\t\t `assignee_id`, `createDate`, `tasktype_id`, `priority`, `active`, `component_id`, `version_id`) \r\n\t\t\t\tVALUES ('$summary', '$description', '$status', '$project', '\".$_SESSION['nobug'.RANDOMKEY.'userId'].\"',\r\n\t\t\t\t$assignee, '\".$db->toDate(time()).\"', '$type', '$priority', '1', $component, $version);\";\r\n\t\t$db->query($sql);\t\r\n\t}", "function _recast_analysis_api_add_run_condition($uuid, $data) {\r\n $required_keys = array(\r\n 'username',\r\n 'name',\r\n 'description',\r\n );\r\n foreach($required_keys as $key) {\r\n if(!array_key_exists($key, $data)) {\r\n return services_error('Missing recast run condition attribute ' . $key, 406);\r\n }\r\n }\r\n $query = new EntityFieldQuery();\r\n $entity = $query\r\n ->entityCondition('entity_type', 'node', '=')\r\n ->entityCondition('bundle', 'analysis')\r\n ->propertyCondition('status', 1) \r\n ->propertyCondition('uuid', $uuid) \r\n ->execute();\r\n \r\n $nid = intval((current($entity['node'])->nid));\r\n if($nid == 0) {\r\n return services_error('Invalid recast analysis uuid', 406);\r\n }\r\n $node = node_load($nid);\r\n $usr = user_load_by_name($data['username']);\r\n if($usr === FALSE) {\r\n return services_error('User authentication rejected for recast analysis', 406);\r\n }\r\n if($node->uid != $usr->uid) {\r\n return services_error('User mismatch', 406);\r\n }\r\n //ok.. if we get THIS far, we have data. let's add a run condition.\r\n $f = entity_create('field_collection_item', array('field_name' => 'field_run_condition'));\r\n $f->setHostEntity('node', $node);\r\n $f->field_run_condition_name[$node->language][]['value'] = $data['name']; \r\n $f->field_run_condition_description[$node->language][]['value'] = $data['description'];\r\n $f->save();\r\n }", "private static function createSampleData()\n\t{\n\t\tself::createSampleObject(1, \"Issue 1\", 1);\n\t\tself::createSampleObject(2, \"Issue 2\", 1);\n\t}", "public function create($params = array()) {\n\n }", "public function create()\n {\n $postInformation = $this->input->post();\n $dataArray = array();\n foreach ($postInformation as $key => $value) {\n if ($key != \"moduleId\" && $key != \"lessonId\" && $key != \"file\") {\n $dataArray[\"dataToCreate\"][$key] = $value;\n }\n }\n $dataArray[\"moduleId\"] = $this->input->post(\"moduleId\");\n $resultCreateLesson = $this->Lesson_Model->create($dataArray);\n echo json_encode($resultCreateLesson);\n }", "protected function Create() {\n // Assignment: Generate unique id for the new task\n $this->TaskId = $this->getUniqueId();\n $this->TaskName = 'New Task';\n $this->TaskDescription = 'New Description';\n }", "function createactivity() {\n $this->auth(WL_ADM_LEVEL);\n $wl_id = $this->session->userdata('wl_id');\n $name = $this->input->post('name');\n $multiplicity = $this->input->post('multiplicity');\n $severity = $this->input->post('severity');\n $unit = $this->input->post('unit');\n $desc = $this->input->post('desc');\n $this->m_activities->create($wl_id, $name, $multiplicity, $severity, $unit, $desc);\n $this->activities();\n }", "public function actionCreate()\n\t{\n\t\t$model=new TestContext;\n\t\t$model->id_user = Yii::app()->user->getId();\n\n\t\t$modelsApps= App::model()->findAll();\n\t\t$appsArray = CHtml::listData($modelsApps, 'id', 'name');\n\n\t\t$modelsPlatforms= Platforms::model()->findAll();\n\t\t$platformsArray = CHtml::listData($modelsPlatforms, 'id', 'name');\n\n\t\t$user_name = Yii::app()->user->getName();\n\n\t\t$users = Users::model()->findAllByAttributes(\n\t\t\tarray('user_name'=>$user_name)\n\t\t);\n\n\t\t$name=\"\";\n\t\tforeach ($users as $user) {\n\t\t\t$name = $user->name;\n\t\t}\n\n\t\t$devicesArray = array();\n\t\t\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t\n\t\tif (isset($_POST['buttonCancel'])) {\n\t\t\t\t\n\t\t\t\t$this->redirect(array('admin'/*,'id'=>$model->ID*/));\n\t }\n\n\t\tif (isset($_POST['TestContext'])) {\n\t\t\t\n\n\t\t\t//$_SESSION['flag-test-context-form']=null;\n\t\t\t$model->attributes=$_POST['TestContext'];\n\t\t\tif ($model->save()) {\n\t\t\t\tYii::app()->user->setState('idTestContext', $model->id);\n\t\t\t\tYii::app()->user->setState('idDevice', $model->id_device);\n\t\t\t\t\n\t\t\t\t$this->redirect(\"/mtcontrool/index.php/elementInst/create1\");\n\t\t\t}\n\n\t\t}\n\t\t\t \n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t\t'appsArray'=>$appsArray,\n\t\t\t'platformsArray'=>$platformsArray,\n\t\t\t'devicesArray'=>$devicesArray,\n\t\t\t'name'=>$name\n\t\t));\n\t}", "abstract public function create (ParameterBag $data);", "public function create($attributes){\n }", "public function run()\n {\n //factory(App\\Models\\CaseType::class)->create([\n // 'creator_id' => 1,\n // 'owner_id' => 1,\n // 'name' => 'Personal Injury',\n // 'description' => '',\n // 'color' => 'primary',\n //]);\n \n //factory(App\\Models\\CaseType::class)->create([\n // 'creator_id' => 1,\n // 'owner_id' => 1,\n // 'name' => 'Divorce',\n // 'description' => '',\n // 'color' => 'success',\n //]);\n \n //factory(App\\Models\\CaseType::class)->create([\n // 'creator_id' => 1,\n // 'owner_id' => 1,\n // 'name' => 'Bankruptcy',\n // 'description' => '',\n // 'color' => 'danger',\n //]);\n \n //factory(App\\Models\\CaseType::class)->create([\n // 'creator_id' => 1,\n // 'owner_id' => 1,\n // 'name' => 'Criminal',\n // 'description' => '',\n // 'color' => 'warning',\n //]);\n \n //factory(App\\Models\\CaseType::class)->create([\n // 'creator_id' => 1,\n // 'owner_id' => 1,\n // 'name' => 'DUI',\n // 'description' => '',\n // 'color' => 'info',\n //]);\n\n factory(App\\Models\\CaseType::class)->create([\n \"id\" => 1,\n \"creator_id\" => 1,\n \"owner_id\" => 1,\n \"name\" => \"Personal Injury\",\n \"description\" => \"\",\n \"color\" => \"primary\",\n \"deleted_at\" => null,\n \"created_at\" => \"2018-04-13 14:26:50\",\n \"updated_at\" => \"2018-04-13 14:26:50\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([\n \"id\" => 2,\n \"creator_id\" => 1,\n \"owner_id\" => 1,\n \"name\" => \"Divorce\",\n \"description\" => \"\",\n \"color\" => \"success\",\n \"deleted_at\" => null,\n \"created_at\" => \"2018-04-13 14:26:50\",\n \"updated_at\" => \"2018-04-13 14:26:50\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([\n \"id\" => 3,\n \"creator_id\" => 1,\n \"owner_id\" => 1,\n \"name\" => \"Bankruptcy\",\n \"description\" => \"\",\n \"color\" => \"danger\",\n \"deleted_at\" => null,\n \"created_at\" => \"2018-04-13 14:26:50\",\n \"updated_at\" => \"2018-04-13 14:26:50\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([ \n \"id\" => 4,\n \"creator_id\" => 1,\n \"owner_id\" => 1,\n \"name\" => \"Criminal\",\n \"description\" => \"\",\n \"color\" => \"warning\",\n \"deleted_at\" => null,\n \"created_at\" => \"2018-04-13 14:26:50\",\n \"updated_at\" => \"2018-04-13 14:26:50\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([ \n \"id\" => 5,\n \"creator_id\" => 1,\n \"owner_id\" => 1,\n \"name\" => \"DUI\",\n \"description\" => \"\",\n \"color\" => \"info\",\n \"deleted_at\" => null,\n \"created_at\" => \"2018-04-13 14:26:50\",\n \"updated_at\" => \"2018-04-13 14:26:50\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([ \n \"id\" => 6,\n \"creator_id\" => 3,\n \"owner_id\" => 3,\n \"name\" => \"MVA\",\n \"description\" => \"\",\n \"color\" => null,\n \"deleted_at\" => null,\n \"created_at\" => \"2018-04-13 15:48:15\",\n \"updated_at\" => \"2018-04-13 15:48:15\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([ \n \"id\" => 7,\n \"creator_id\" => 3,\n \"owner_id\" => 3,\n \"name\" => \"Slip and Fall\",\n \"description\" => \"\",\n \"color\" => null,\n \"deleted_at\" => null,\n \"created_at\" => \"2018-04-18 11:20:36\",\n \"updated_at\" => \"2018-04-18 11:20:36\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([ \n \"id\" => 8,\n \"creator_id\" => 3,\n \"owner_id\" => 3,\n \"name\" => \"SAF\",\n \"description\" => \"\",\n \"color\" => null,\n \"deleted_at\" => null,\n \"created_at\" => \"2018-04-18 11:29:57\",\n \"updated_at\" => \"2018-04-18 11:29:57\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([ \n \"id\" => 9,\n \"creator_id\" => 3,\n \"owner_id\" => 3,\n \"name\" => \"House fire/products liability case\",\n \"description\" => \"\",\n \"color\" => null,\n \"deleted_at\" => null,\n \"created_at\" => \"2018-04-18 12:01:29\",\n \"updated_at\" => \"2018-04-18 12:01:29\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([ \n \"id\" => 10,\n \"creator_id\" => 3,\n \"owner_id\" => 3,\n \"name\" => \"PI\",\n \"description\" => \"\",\n \"color\" => null,\n \"deleted_at\" => null,\n \"created_at\" => \"2018-04-18 12:20:20\",\n \"updated_at\" => \"2018-04-18 12:20:20\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([\n \"id\" => 11,\n \"creator_id\" => 4,\n \"owner_id\" => 4,\n \"name\" => \"WC\",\n \"description\" => \"\",\n \"color\" => null,\n \"deleted_at\" => null,\n \"created_at\" => \"2018-05-02 13:17:22\",\n \"updated_at\" => \"2018-05-02 13:17:22\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([ \n \"id\" => 12,\n \"creator_id\" => 4,\n \"owner_id\" => 4,\n \"name\" => \"WC?wrongful discharge\",\n \"description\" => \"\",\n \"color\" => null,\n \"deleted_at\" => null,\n \"created_at\" => \"2018-05-02 13:38:46\",\n \"updated_at\" => \"2018-05-02 13:38:46\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([ \n \"id\" => 13,\n \"creator_id\" => 4,\n \"owner_id\" => 4,\n \"name\" => \"Felony - Criminal\",\n \"description\" => \"\",\n \"color\" => null,\n \"deleted_at\" => null,\n \"created_at\" => \"2018-05-02 14:11:28\",\n \"updated_at\" => \"2018-05-02 14:11:28\",\n ]);\n\n factory(App\\Models\\CaseType::class)->create([ \n \"id\" => 14,\n \"creator_id\" => 4,\n \"owner_id\" => 4,\n \"name\" => \"Misdemeanor - Criminal\",\n \"description\" => \"\",\n \"color\" => null,\n \"deleted_at\" => null,\n \"created_at\" => \"2018-05-02 14:22:20\",\n \"updated_at\" => \"2018-05-02 14:22:20\",\n ]);\n \n }", "function create_run_log() {\n\n\t\t$this->log = new Log();\n\t\t$this->log->set_workflow_id( $this->get_id() );\n\t\t$this->log->set_date( new DateTime() );\n\n\t\tif ( $this->is_tracking_enabled() ) {\n\t\t\t$this->log->set_tracking_enabled( true );\n\n\t\t\tif ( $this->is_conversion_tracking_enabled() ) {\n\t\t\t\t$this->log->set_conversion_tracking_enabled( true );\n\t\t\t}\n\t\t}\n\n\t\t$this->log->save();\n\t\t$this->log->store_data_layer( $this->data_layer() );\n\n\t\tdo_action( 'automatewoo_create_run_log', $this->log, $this );\n\t}", "public function create($table, $parameters)\n {\n\n }", "public function run()\n {\n $parameters = array(\n array('name' => 'Мужские соц. роли'),\n array('name' => 'Женские соц. роли'),\n array('name' => 'Соц. роли')\n );\n\n // Uncomment the below to run the seeder\n DB::table('parameters')->insert($parameters);\n }", "public function run()\n {\n \\App\\Models\\Category::factory(10)->create();\n \\App\\Models\\Country::factory(10)->create();\n \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Opportunity::factory(10)->create();\n \\App\\Models\\OpportunityDetail::factory(10)->create();\n \n \\App\\Models\\Question::factory(10)->create();\n \\App\\Models\\Comment::factory(10)->create();\n \n }", "public function create( array $params );", "public function createAction()\n {\n $this->createEditParameters = $this->createEditParameters + $this->_createExtraParameters;\n\n parent::createAction();\n }", "public function run()\n {\n $size = Attribute::where(['name' => 'Size'])->first();\n factory(AttributeValue::class)->create([\n 'value' => 'small',\n // 'attribute_id' => $size->id\n ]);\n\n factory(AttributeValue::class)->create([\n 'value' => 'medium',\n // 'attribute_id' => $size->id\n ]);\n\n factory(AttributeValue::class)->create([\n 'value' => 'large',\n // 'attribute_id' => $size->id\n ]);\n\n $color = Attribute::where(['name' => 'Color'])->first();\n factory(AttributeValue::class)->create([\n 'value' => 'red',\n // 'attribute_id' => $color->id\n ]);\n\n factory(AttributeValue::class)->create([\n 'value' => 'blue',\n // 'attribute_id' => $color->id\n ]);\n\n factory(AttributeValue::class)->create([\n 'value' => 'green',\n // 'attribute_id' => $color->id\n ]);\n\n\n }" ]
[ "0.6833543", "0.644762", "0.5480053", "0.5480053", "0.5433984", "0.54091", "0.52801603", "0.5175006", "0.5173832", "0.51413697", "0.5137737", "0.5114321", "0.50976753", "0.5084257", "0.50793225", "0.5077945", "0.50688946", "0.50452644", "0.50251186", "0.50251037", "0.50192827", "0.50134784", "0.49890187", "0.49778134", "0.49693897", "0.49606347", "0.49524313", "0.4941903", "0.49386638", "0.49294928" ]
0.71738714
0
/ update Update An Existing TestCaseRun Usage TestCaseRun.update Parameters ParameterData TypeComments run_idinteger case_idinteger build_idinteger environment_idinteger new_valueshashmapSee attributes list modifiable fields. The notes attribute can be used to append a new note to the respective TestCaseRun. To automatically update an attached bug's status, set the new_values attribute, update_bugs, to 1. Result Array [case_text_version] [status] [assignee] [environment_id] [close_date] [case_run_id] [iscurrent] [case_run_status_id] [build_id] [sortkey] [running_date] [case_id] [run_id] [testedby] [notes]
function TestCaseRun_update($run_id, $case_id, $build_id, $environment_id, $assignee = NULL, $case_run_status_id = NULL, $notes = NULL, $update_bugs = NULL) { $varray = array("assignee" => "int", "case_run_status_id" => "int", "notes" => "string", "update_bugs" => "int"); foreach($varray as $key => $val) { if (isset(${$key})) { $carray[$key] = new xmlrpcval(${$key}, $val); } } // Create call $call = new xmlrpcmsg('TestCaseRun.update', array(new xmlrpcval($run_id, "int"),new xmlrpcval($case_id, "int"),new xmlrpcval($build_id, "int"),new xmlrpcval($environment_id, "int"), new xmlrpcval($carray, "struct"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestRun_update($run_id, $build_id, $environment_id, $manager_id, $plan_text_version, $summary, $notes = NULL, $start_date = NULL, $stop_date = NULL) {\n\t$varray = array(\"build_id\" => \"int\", \"environment_id\" => \"int\", \"manager_id\" => \"int\", \"plan_text_version\" => \"int\", \"summary\" => \"string\", \"notes\" => \"string\", \"start_date\" => \"string\", \"stop_date\" => \"string\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.update', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_update($case_id, $case_status_id, $category_id, $isautomated, $alias = NULL, $arguments = NULL, $default_tester_id = NULL, $priority_id = NULL, $requirement = NULL, $script = NULL, $summary = NULL, $sortkey = NULL) {\n\t$varray = array(\"case_id\" => \"int\", \"case_status_id\" => \"int\", \"category_id\" => \"int\", \"isautomated\" => \"int\", \"alias\" => \"string\", \"arguments\" => \"string\", \"default_tester_id\" => \"int\", \"priority_id\" => \"int\", \"requirement\" => \"string\", \"script\" => \"string\", \"summary\" => \"string\", \"sortkey\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.update', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public static function Update( $params ) {\n clude( 'models/submission.php' );\n global $user;\n $user[ 'rights' ] < 40 && die( 'hard' );\n \n Controller::RequiredParameters( $params, 'userid', 'assignmentid', 'validationid' ) or die( 'hard' );\n if( Submission::Update( $params[ 'userid' ], $params[ 'assignmentid' ], $params[ 'validationid' ] ) == 0 ){\n Submission::Create( $params[ 'assignmentid' ], $params[ 'userid' ], $params[ 'validationid' ] );\n }\n $res = Submission::UserResults( $params[ 'userid' ], $params[ 'assignmentid' ] );\n //TODO: write a view to output the description.\n echo $res[ 0 ][ 'description' ];\n }", "public function update(Request $request, Run $run)\n {\n //\n }", "public function update(Request $request, Run $run)\n {\n //\n }", "public function update( array $params );", "public static function doUpdate($params=NULL) {\n\t\t$conn = parent::_initwgConnector($params, self::PRIMARY_KEY);\n\t\t$conn->update(self::TABLE_NAME);\n\t\tif (!is_a($params, 'wgConnector') && isset($params['where'])) {\n\t\t\tif (!isset($params['wherecol'])) $params['wherecol'] = self::PRIMARY_KEY;\n\t\t\t$conn->where($params['wherecol'], $params['where']);\n\t\t\tunset($params['where']);\n\t\t\tunset($params['wherecol']);\n\t\t}\n\t\tif (!empty($params) && is_array($params)) {\n\t\t\tforeach ($params as $key=>$par) {\n\t\t\t\tif (isset(self::$_tableFields[$key])) $conn->set($key, $par);\n\t\t\t\telse throw new WgException(\"Field \".self::TABLE_NAME.\".$key does not exist.\");\n\t\t\t}\n\t\t}\n\t\t$af = (int) DbModel::doAffected($conn, new ProjectsListingsModel());\n\t\tif (!(bool) $af) $af = 1;\n\t\treturn (int) $af;\n\t}", "public function update($params,$where){\n\t\t$rdata=0;\n\t\t$data=array();\n\t\t$sql=array();\n\t\tif(!empty($params)){\n\t\t\t$sql=array();\n\t\t\tforeach($params as $tname=>$cvalue){\n\t\t\t\t$data=array();\n\t\t\t\tforeach($cvalue as $field=>$value){\n\t\t\t\t\t$marray=array();\n\t\t\t\t\tif(preg_match('/^#(.*)$/',$field,$marray)){\n\t\t\t\t\t\t$field=$marray[1];\n\t\t\t\t\t\t$data[]=\"`\".trim($field,'`').\"`=\".$value;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$data[]=\"`\".trim($field,'`').\"`='\".$value.\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->query(\"UPDATE `\".$tname.\"` SET \".implode(',',$data).\" \".(!empty($where)?\"WHERE \".$where:'').\";\");\n\t\t\t\t$rdata=$this->affected_rows;\n\t\t\t}\n\t\t}\n\t\treturn $rdata;\n\t}", "public function update($id, Request $request)\n\t{\n\t\t$validator = \\Validator::make($request->all(), array(\n\t\t\t'description' => 'required',\n\t\t\t'expected_result' => 'required'\n\t\t\t));\n\t\tif ($validator->fails())\n\t\t{\n\t\t\tforeach ($validator->errors()->toArray() as $key => $value) {\n\t\t\t\t$error[]=$value[0];\n\t\t\t} \n\t\t}\n\t\telse{\n\t\t\tif( session()->has('email')){\n\t\t\t\t//Process when validations pass\n\n\t\t\t\t$level = $request->update_level; \t\n\t\t\t\t$content['description'] = $request->description;\n\t\t $content['expected_result'] = $request->expected_result;\n\t\t $item = \\App\\TestStep::find($id);\n\t\t $item->update($content);\n\t\t \n\t\t $execution_content['scroll']\t\t= $request->scroll;\n\t\t $execution_content['resource_id']\t= $request->resource_id;\n\t\t $execution_content['text']\t\t\t= $request->text;\n\t\t $execution_content['content_desc']\t= $request->content_desc;\n\t\t $execution_content['class']\t\t\t= $request->class;\n\t\t $execution_content['index']\t\t\t= $request->index;\n\t\t $execution_content['sendkey']\t\t= $request->sendkey;\n\t\t $execution_content['screenshot']\t= $request->screenshot;\n\t\t $execution_content['checkpoint']\t= $request->checkpoint;\n\t\t $execution_content['wait']\t\t\t= $request->wait;\t\t \n\t\t\t\t$tc_id\t\t\t\t\t\t\t\t= $request->tc_id;\n\n\t\t $result = \\App\\Execution::where(['ts_id' => $id, 'tl_id' => 0])->update($execution_content);\n\n\t\t\t\t$del_obj = new DeleteQueryHandler();\t\t\t\t\n\t \t$condition = $del_obj->getCondition($item, $level);\n\t \t$condition['soft_delete'] = false;\n\t \t$all_steps = \\App\\TestStep::where($condition)->get();\n\t \tforeach ($all_steps as $step_value) {\n\t \t\tif($step_value->ts_id != $id)\n\t \t\t{\n\t \t\t\t$step_value->update($content);\n\t \t\t\t//exit;\n\t \t\t\t\\App\\Execution::where(['ts_id' => $step_value->ts_id, 'tl_id' => 0])->update($execution_content);\n\t \t\t}\n\t \t}\n\t \t$message = $this->getMessage('messages.success');\n\t \t$message.= \" Total Steps updated = \".count($all_steps);\n\t\t\t\tToast::success($message);\n\n\t\t\t\treturn redirect()->route('testcase.show', ['id' => $tc_id]);\n\n\t\t\t \t//return redirect()->route('teststep.show', ['id' => $id]);\n\t\t \t}else\n\t\t \t{\n\t\t \t\t$error[] = \"Session expired. Please login to continue\";\n\t\t \t}\n\t \t}/*\n\t \t$message = $this->getMessage('messages.update_failed');\n \tToast::message($message, 'danger');*/\n\t \treturn redirect()->route('teststep.edit', ['id' => $id, 'message' => $error])->withInput();\n\t}", "function TestPlan_update($plan_id, $author_id, $product_id = NULL, $default_product_version = NULL, $type_id = NULL, $name = NULL, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.update', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function update() {\n\t\tif (isset($this->params['updated'])) {\n\t\t\t$this->params['updated'] = null;\n\t\t} // 'updated' is an auto timestamp\n\n\t\t$columns = array();\n\t\tforeach (array_keys($this->params) as $key) {\n\t\t\tarray_push($columns, $key . ' = ?');\n\t\t}\n\t\t$bindings = implode(', ', $columns);\n\t\t$sql = 'UPDATE ' . static::$table . ' SET ' . $bindings . ' WHERE id = ' . $this->get('id') . ' ;';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array_values($this->params));\n\t}", "public function updateBy(array $params, array $data)\n {\n return $this ->model ->where($params) ->update($data);\n }", "function update_scheduled_test($id,$params)\n {\n $this->db->where('id',$id);\n return $this->db->update('scheduled_tests',$params);\n }", "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }", "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($params, $data)\n\t{\n\t\treturn $this->entity->update($params, $data);\n\t}", "public function update(array $data, array $where);", "public function update(Request $request, RunType $runType)\n {\n request()->validate([\n 'name' => 'required|string|min:3',\n 'description' => 'required|string|min:5',\n ]);\n\n $runType->update(request(['name', 'description']));\n\n return response()->json($runType, 200);\n }", "public function updateTicketById() {\n if (func_num_args() > 0):\n $ticketId = func_get_arg(0);\n $edit = func_get_arg(1);\n $where = \"ticket_id = \" . $ticketId;\n $check = $this->update($edit, $where);\n\n if ($check):\n return 1;\n endif;\n else:\n throw new Exception('Argument Not Passed');\n endif;\n }", "public static function doUpdate($params=NULL) {\n\t\t$conn = parent::_initwgConnector($params, self::PRIMARY_KEY);\n\t\t$conn->update(self::TABLE_NAME);\n\t\tif (!is_a($params, 'wgConnector') && isset($params['where'])) {\n\t\t\tif (!isset($params['wherecol'])) $params['wherecol'] = self::PRIMARY_KEY;\n\t\t\t$conn->where($params['wherecol'], $params['where']);\n\t\t\tunset($params['where']);\n\t\t\tunset($params['wherecol']);\n\t\t}\n\t\tif (!empty($params) && is_array($params)) {\n\t\t\tforeach ($params as $key=>$par) {\n\t\t\t\tif (isset(self::$_tableFields[$key])) $conn->set($key, $par);\n\t\t\t\telse throw new WgException(\"Field \".self::TABLE_NAME.\".$key does not exist.\");\n\t\t\t}\n\t\t}\n\t\t$af = (int) DbModel::doAffected($conn, new CampaignDefinitionsModel());\n\t\tif (!(bool) $af) $af = 1;\n\t\treturn (int) $af;\n\t}", "protected function update($tableName, $data, $params=null) {\n $condition = \"\";\n if(!is_array($data) || !array_key_exists($tableName, $data))return FALSE;\n $data = $this->ignoreBlankValueFields($data);\n $data = $this->processData($tableName, $data);\n foreach ($data[$tableName] as $field => $value) {\n if ($field == 'id' || 'ID' === $field) continue;\n $temp[] = $field . \" = \" . $value;\n }\n\t\t\t\t\n if(is_array($params) && array_key_exists('condition', $params)){\n $arrFields = $this->formatWhereCondition($tableName, $params['condition']);\n $condition = $this->where($tableName,$arrFields);\n//\t\t\tpr($arrFields);\n $sql = \"update {$tableName} set \" . implode(',', $temp) . \" {$condition} ;\";\n if(isset($data[$tableName]['id'])) $sql .= \" AND id = \".$data[$tableName]['id'];\n if(isset($data[$tableName]['ID']) and !isset($arrFields['ID'])) $sql .= \" AND {$tableName}.ID = \".$data[$tableName]['ID'];\n }\n else{\n $sql = \"update {$tableName} set \" . implode(',', $temp) . \" where \";//id=\" . $data[$tableName]['id'] . \";\";\n\t\t\tif(isset($data[$tableName]['id'])) $sql .= \" id = \".$data[$tableName]['id'];\n if(isset($data[$tableName]['ID'])) $sql .= \" {$tableName}.ID = \".$data[$tableName]['ID'];\n }\n\n\t $result = $this->query($sql);\n if(!$result){\n pr($sql);\n return FALSE;\n }\n return $this->countAffecetedRows($result);\n }", "public function update(array $data, $where)\n {\n // add a timestamp\n $data['applicationanswer_updated'] = date('Y-m-d H:i:s');\n\t\t\n return parent::update($data, $where);\n }", "public function update($data) {}", "public function update($data) {}", "public static function doUpdate($params=NULL) {\n\t\t$conn = parent::_initwgConnector($params, self::PRIMARY_KEY);\n\t\t$conn->update(self::TABLE_NAME);\n\t\tif (!is_a($params, 'wgConnector') && isset($params['where'])) {\n\t\t\tif (!isset($params['wherecol'])) $params['wherecol'] = self::PRIMARY_KEY;\n\t\t\t$conn->where($params['wherecol'], $params['where']);\n\t\t\tunset($params['where']);\n\t\t\tunset($params['wherecol']);\n\t\t}\n\t\tif (!empty($params) && is_array($params)) {\n\t\t\tforeach ($params as $key=>$par) {\n\t\t\t\tif (isset(self::$_tableFields[$key])) $conn->set($key, $par);\n\t\t\t\telse throw new WgException(\"Field \".self::TABLE_NAME.\".$key does not exist.\");\n\t\t\t}\n\t\t}\n\t\t$af = (int) DbModel::doAffected($conn, new PollTemplatesModel());\n\t\tif (!(bool) $af) $af = 1;\n\t\treturn (int) $af;\n\t}", "public function run_update($id='', $data=[]){\n $sql = $this->prepare_update($id, $data);\n $req = $this->run($sql);\n if(is_numeric($req)){\n return \"Updated $req record\" . ($req > 1 ? \"s\" : \"\");\n }\n return $req;\n }", "public static function update($params)\n {\n try {\n if (empty($params) || !is_array($params['values'])) {\n throw new Exception('db update: too few arguments');\n }\n\n $values = '';\n foreach ($params['values'] as $key => $value) {\n $values .= ($values ? ',' : '') . \"{$key}='{$value}'\";\n }\n $condition = static::buildCondition($params);\n\n $sql = \"update {$params['table']} set {$values} {$condition}\";\n\n return static::conn()->exec($sql);\n } catch (Exception $e) {\n Logger::error($e->getMessage());\n return null;\n }\n }", "public function updateTask($taskid, $summary, $project, $assignee, $type, $priority, $status, $description, $component, $versionId) {\r\n\t\t$db = new DB();\r\n\t\t$db->connect();\r\n\t\t\r\n\t\t$taskid = $db->esc($taskid);\r\n\t\t$summary = $db->esc($summary);\r\n\t\t$description = $db->esc($description);\r\n\t\t$project = $db->esc($project);\r\n\t\t$assignee = $db->esc($assignee);\r\n\t\t$type = $db->esc($type);\r\n\t\t$priority = $db->esc($priority);\r\n\t\t$status = $db->esc($status);\r\n\t\t$component = $db->esc($component);\r\n\t\t$versionId = $db->esc($versionId);\r\n\t\t\r\n\t\tif ($assignee == 0) {\r\n\t\t\t$assignee = \"null\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$assignee = \"'\".$assignee.\"'\";\r\n\t\t}\r\n\t\tif ($component == 0) {\r\n\t\t\t$component = \"null\";\r\n\t\t}\r\n\t\tif ($versionId == 0) {\r\n\t\t\t$versionId = \"null\";\r\n\t\t}\r\n\t\t\r\n\t\t$sql = \"UPDATE `task` \r\n\t\t\t\tSET `summary`='$summary', `description`='$description', `status_id`='$status', \r\n\t\t\t\t`project_id`='$project', `assignee_id`=$assignee, `tasktype_id`='$type', \r\n\t\t\t\t`priority`='$priority', `component_id`=$component, `version_id`=$versionId\r\n\t\t\t\tWHERE `id`='$taskid';\r\n\t\t\";\r\n\t\t$db->query($sql);\r\n\t}", "public function update()\n\t{\n\t\t$mytable = WikiRevision::$table;\n\t\t$buf = \"UPDATE $mytable SET \";\n\t\tfor ($i = 0; $i < count(WikiRevision::$fields); $i++) {\n\t\t\t$buf .= WikiRevision::$fields[$i] . \" = '\" . DBConnection::get()->handle()->real_escape_string($this->data[$fields[$i]]) . \"'\" . ($i == count(WikiRevision::$fields) - 1)?(', '):(' ');\n\t\t}\n\t\t$buf .= \"WHERE rev_id = \" . $data['rev_id'];\n\t\tDBConnection::get()->handle()->query($buf);\n\t}", "public function update( $sql, $params=array());" ]
[ "0.72085124", "0.63875085", "0.58997685", "0.58223915", "0.58223915", "0.5813928", "0.5687551", "0.5665595", "0.5658336", "0.5649307", "0.55900604", "0.55828863", "0.5574427", "0.55630726", "0.55532473", "0.5532501", "0.54705703", "0.5466088", "0.54200923", "0.54177296", "0.53770554", "0.5342159", "0.5320016", "0.5320016", "0.5316971", "0.526259", "0.52529377", "0.52493924", "0.52371645", "0.52358645" ]
0.74207836
0
/ get_bugs Get a list of bugs for the given TestCaseRun Usage TestCaseRun.get_bugs Parameters ParameterData Type case_run_idinteger Result Array [0] Array [priority] [cf_nts_priority] [bug_id] [qa_contact_id] [cclist_accessible] [cf_foundby] [infoprovider_id] [short_desc] [everconfirmed] [bug_severity] [isunconfirmed] [cf_nts_support_num] [reporter_id] [estimated_time] [isopened] [remaining_time] [cf_partnerid] [reporter_accessible] [resolution] [alias] [op_sys] [bug_file_loc] [product_id] [rep_platform] [creation_ts] [status_whiteboard] [bug_status] [delta_ts] [version] [deadline] [component_id] [assigned_to_id] [target_milestone] [1] Array ...
function TestCaseRun_get_bugs($case_run_id) { // Create call $call = new xmlrpcmsg('TestCaseRun.get_bugs', array(new xmlrpcval($case_run_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCase_get_bugs($case_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.get_bugs', array(new xmlrpcval($case_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function printBugData($bugData){\r\n\t//echo \"build = \", $bugData->build;\r\n\t//echo \"platform = \", $bugData->platform;\r\n\techo \"os = \", $bugData->os;\r\n\techo \"os_build = \", $bugData->os_build;\r\n\techo \"version = \", $bugData->version;\r\n\t//echo \"profile_id = \", $bugData->profile_id;\r\n\t//echo \"handler_id = \", $bugData->handler_id;\r\n\techo \"view_state = \", $bugData->view_state;\r\n\techo \"category = \", $bugData->category;\r\n\t//echo \"severity = \", $bugData->severity;\r\n\t//echo \"priority = \",$bugData->priority;\r\n\techo \"summary = \", $bugData->summary;\r\n\techo \"description = \", $bugData->description;\r\n\techo \"steps_to_reproduce = \", $bugData->steps_to_reproduce;\r\n\techo \"additional_information = \", $bugData->additional_information;\r\n\t//echo \"f_file = \", \"\";\r\n\t//echo \"f_report_stay = \", ;\r\n\techo \"project_id = \", $bugData->project_id;\r\n\t//echo \"target_version = \", $bugData->target_version;\r\n}", "function getBugByID ($bug_id)\n {\n return DBUtil::selectObjectByID ('mantis_bug_table', $bug_id);\n }", "public function test_getMantisBugs_CalledWithCorrectParameters_returnCorrectAnswer()\n {\n $bug1 = $this->prepareBug(1,\n \"No me funciona el extintor\",\n \"Si pongo boca a bajo el extintor no me funciona\",\n 'Pepito',\n \"new\");\n\n $bug2 = $this->prepareBug(2,\n \"Estoy en brasil\",\n \"O pais mais grande du mundo\",\n 'Caio',\n \"new\");\n $expected = array($bug1, $bug2);\n\n $fc = new FakeConector();\n $bugsController = new bugsController($fc);\n $this->assertEquals($expected, $bugsController->getMantisBugs(NULL));\n }", "function listPatches($bugid)\n\t{\n\t\t$query = '\n\t\t\tSELECT patch, revision, developer\n\t\t\tFROM bugdb_patchtracker\n\t\t\tWHERE bugdb_id = ?\n\t\t\tORDER BY revision DESC\n\t\t';\n\n\t\treturn $this->_dbh->prepare($query)->execute([$bugid])->fetchAll(PDO::FETCH_NUM, true, false, true);\n\t}", "function db_query_roadmap_info($p_project_id, $p_version, $p_version_type, &$p_issues_resolved){\n\t$p_issues_resolved = 0;\n\n\t$t_can_view_private = access_has_project_level(config_get('private_bug_threshold'), $p_project_id);\n\t$t_limit_reporters = config_get('limit_reporters');\n\t$t_user_access_level_is_reporter = (config_get('report_bug_threshold', null, null, $p_project_id) == access_get_project_level($p_project_id));\n\n\t$t_query = 'SELECT id,view_state from {bug} WHERE project_id=' . db_param() . ' AND ' . $p_version_type . '=' . db_param();\n\n\t$t_result = db_query($t_query, array($p_project_id, $p_version));\n\n\t$t_issue_ids = array();\n\n\twhile($t_row = db_fetch_array($t_result)){\n\t\t$t_issue_id = $t_row['id'];\n\n\t\t# hide private bugs if user doesn't have access to view them.\n\t\tif(!$t_can_view_private && ($t_row['view_state'] == VS_PRIVATE))\n\t\t\tcontinue;\n\n\t\t# check limit_Reporter (Issue #4770)\n\t\t# reporters can view just issues they reported\n\t\tif(ON === $t_limit_reporters && $t_user_access_level_is_reporter && !bug_is_user_reporter($t_issue_id, auth_get_current_user_id()))\n\t\t\tcontinue;\n\n\t\tif(!helper_call_custom_function('roadmap_include_issue', array($t_issue_id)))\n\t\t\tcontinue;\n\n\t\t$t_issue_ids[] = $t_issue_id;\n\n\t\tif(bug_is_resolved($t_issue_id))\n\t\t\t$p_issues_resolved++;\n\t}\n\n\treturn $t_issue_ids;\n}", "function display_bug_list($utype, $uid) {\n $mysqli = $this->mysqli;\n if ($utype == \"Developer\") {\n $sql = \"SELECT * from bug_report WHERE tested_by IN (SELECT app_tester from application where app_dev='$uid');\";\n }\n else if ($utype == \"Tester\") {\n $sql = \"SELECT * from bug_report WHERE tested_by ='$uid';\";\n }\n else if ($utype == \"admin\") {\n $sql = \"SELECT * from bug_report\";\n }\n if ($result = $mysqli->query($sql)) {\n return $result;\n }\n else {\n echo $mysqli->error;\n }\n }", "function bug_list_print($p_bug_ids, $p_columns, $p_table_class = ''){\n\t/* cache bugs */\n\tbug_cache_array_rows($p_bug_ids);\n\n\t/* prepare table header */\n\t$t_header = array();\n\n\tfor($i=0; $i<count($p_columns); $i++){\n\t\t$t_title = column_title($p_columns[$i]);\n\n\t\tif($t_title === false){\n\t\t\t$t_title = '[invalid \\'' . $p_columns[$i] . '\\']';\n\t\t\t$p_columns[$i] = 'invalid';\n\t\t}\n\n\t\t$t_header[] = $t_title;\n\t}\n\n\t/* print table */\n\ttable_begin($t_header, $p_table_class);\n\n\tforeach($p_bug_ids as $t_bug_id){\n\t\t$t_bug = bug_get($t_bug_id);\n\t\t$t_row = array();\n\n\t\tforeach($p_columns as $t_col){\n\t\t\t$t_title = column_title($t_col);\n\t\t\t$t_cf_id = custom_field_get_id_from_name($t_title);\n\n\t\t\tif($t_cf_id != null){\n\t\t\t\tif(custom_field_is_linked($t_cf_id, $t_bug->project_id)){\n\t\t\t\t\t$t_def = custom_field_get_definition($t_cf_id);\n\t\t\t\t\t$t_row[] = string_custom_field_value($t_def, $t_cf_id, $t_bug_id);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$t_row[] = format_content_notlinked($t_bug);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$t_func = 'format_content_' . $t_col;\n\t\t\t\t$t_row[] = $t_func($t_bug);\n\t\t\t}\n\t\t}\n\n\t\ttable_row($t_row);\n\t}\n\n\ttable_end();\n}", "public static function var_dump($bugs) {\n echo \"<pre>\";\n if (!count($bugs)>1 && is_array($bugs)) {\n echo \"<br/>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br/>\";\n foreach ($bugs as $bug) {\n var_dump($bug);\n echo \"<br/>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br/>\";\n }\n } else {\n var_dump($bugs);\n }\n echo \"</pre>\";\n \n die;\n }", "function process_ch8bt_bug() {\r\n\t// Check if user has proper security level\r\n\tif ( !current_user_can( 'manage_options' ) ) {\r\n\t\twp_die( 'Not allowed' );\r\n\t}\r\n\r\n\t// Check if nonce field is present for security\r\n\tcheck_admin_referer( 'ch8bt_add_edit' );\r\n\tglobal $wpdb;\r\n\r\n\t// Place all user submitted values in an array\r\n\t$bug_data = array();\r\n\t$bug_data['bug_title'] = ( isset( $_POST['bug_title'] ) ? sanitize_text_field( $_POST['bug_title'] ) : '' );\r\n\t$bug_data['bug_description'] = ( isset( $_POST['bug_description'] ) ? sanitize_text_field( $_POST['bug_description'] ) : '' );\r\n\t$bug_data['bug_version'] = ( isset( $_POST['bug_version'] ) ? sanitize_text_field( $_POST['bug_version'] ) : '' );\r\n\r\n\t// Set bug report date as current date\r\n\t$bug_data['bug_report_date'] = date( 'Y-m-d' );\r\n\r\n\t// Set status of all new bugs to 0 (Open)\r\n\t$bug_data['bug_status'] = ( isset( $_POST['bug_status'] ) ? intval( $_POST['bug_status'] ) : 0 );\r\n\r\n\t// Call the wpdb insert or update method based on value\r\n\t// of hidden bug_id field\r\n\tif ( isset( $_POST['bug_id'] ) && 0 == $_POST['bug_id'] ) {\r\n\t\t$wpdb->insert($wpdb->get_blog_prefix() . 'ch8_bug_data', $bug_data );\r\n\t} elseif ( isset( $_POST['bug_id'] ) && $_POST['bug_id'] > 0 ) {\r\n\t\t$wpdb->update( $wpdb->get_blog_prefix() . 'ch8_bug_data', $bug_data, array( 'bug_id' => $_POST['bug_id'] ) );\r\n\t}\r\n\r\n\t// Redirect the page to the admin form\r\n\twp_redirect( add_query_arg( 'page', 'ch8bt-bug-tracker', admin_url( 'options-general.php' ) ) );\r\n\texit;\r\n}", "function updateBug($bug_id, $bug_data) {\r\n\techo \"update the bug -- bug_id = $bug_id by adding a test note\";\r\n\taddBugNote($bug_id, $bug_data);\r\n}", "function listBugFixes( ){\n global $config, $lang;\n\n if( !isset( $_SESSION['mBugFixes'] ) ){\n $_SESSION['mBugFixes'] = getContentFromUrl( 'http://opensolution.org/bugfixes.html' );\n }\n\n if( !empty( $_SESSION['mBugFixes'] ) ){\n if( $_SESSION['mBugFixes'] == 'no-bugs' )\n return true;\n\n $aBugs = unserialize( $_SESSION['mBugFixes'] );\n $i = 0;\n $content = null;\n foreach( $aBugs as $iBug => $aData ){\n $aData['sStatus'] = $lang['Cant_check'];\n if( isset( $aData['aSteps'] ) || isset( $aData['bDontVerifySteps'] ) ){\n if( isset( $aData['sPluginVerify'] ) && verifyCodeInFile( $aData['sPluginVerify'] ) === false ){\n $aData['sName'] = null;\n }\n if( isset( $aData['sName'] ) && isset( $aData['aSteps'] ) ){\n $iCount = count( $aData['aSteps'] );\n $iOk = 0;\n foreach( $aData['aSteps'] as $aSteps ){\n $mReturn = checkFileToUpgrade( $aSteps );\n if( isset( $mReturn ) && $mReturn === true ){\n $iOk++;\n }\n else\n break;\n } // end foreach\n $aData['sStatus'] = ( $iOk == $iCount ) ? $lang['Fixed'] : ( ( $iOk > 0 ) ? $lang['Uncompleted'] : '<strong>'.$lang['Fix_it'].'</strong>' );\n }\n }\n\n if( isset( $aData['sName'] ) ){\n $content .= '<tr class=\"level-'.$aData['iLevel'].'\"><td class=\"name\">'.$aData['sName'].'</td><td class=\"status\">'.( isset( $aData['sStatus'] ) ? $aData['sStatus'] : null ).'</td><td class=\"options\"><a href=\"'.$config['bugfixes_link'].'?sBug='.base64_encode( $config['version'].'-'.$iBug ).'\" target=\"_blank\" class=\"manual\" title=\"'.$lang['More'].'\">'.$lang['More'].'</a></td></tr>';\n }\n } // end foreach\n\n if( isset( $content ) )\n return $content;\n }\n}", "public static function create($projectID, $description, $bugs)\n {\n $query = \"INSERT INTO changelog (userID, projectID, description, changeDate) VALUES ('\" . unserialize($_SESSION['user'])->getID() . \"', '\" . $projectID . \"', '\" . mysql_real_escape_string($description) . \"', NOW())\";\n $res = mysql_query($query)or die(Helper::SQLErrorFormat(mysql_error(), $query, __METHOD__, __FILE__, __LINE__));\n \n $changeID = mysql_insert_id();\n\n foreach($bugs as $key => $value)\n {\n $query = \"INSERT INTO changelog_bug_relation (changeID, bugID) VALUES ('$changeID', '$value')\";\n $res = mysql_query($query)or die(Helper::SQLErrorFormat(mysql_error(), $query, __METHOD__, __FILE__, __LINE__));\n\n $bug = Bug::getBugByID((int) $value);\n\n Bug::change($bug->getID(), $bug->getPriority()->getID(), $bug->getTitle(), $bug->getDescription(), $bug->getAssignedToUser()->getID(), 100, Status::FIXED, true);\n }\n return $changeID;\n }", "public function bugs()\n {\n return $this->hasMany('App\\Bug');\n }", "function rest_get()\n{\n global $build;\n $response = array();\n\n // Are we looking for what went wrong with this build?\n if (isset($_GET['getproblems'])) {\n $response['hasErrors'] = false;\n $response['hasFailingTests'] = false;\n\n // Lookup some details about this build.\n $buildtype = $build->Type;\n $buildname = $build->Name;\n $siteid = $build->SiteId;\n $starttime = $build->StartTime;\n $projectid = $build->ProjectId;\n\n // Check if this build has errors.\n $buildHasErrors = $build->BuildErrorCount > 0;\n if ($buildHasErrors) {\n $response['hasErrors'] = true;\n // Find the last occurrence of this build that had no errors.\n $no_errors_result = pdo_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime' AND parentid<1 AND builderrors<1\n ORDER BY starttime DESC LIMIT 1\");\n\n if (pdo_num_rows($no_errors_result) > 0) {\n $no_errors_row = pdo_fetch_array($no_errors_result);\n $gmtdate = strtotime($no_errors_row['starttime'] . ' UTC');\n } else {\n // Find the first build\n $firstbuild = pdo_single_row_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime'\n ORDER BY starttime ASC LIMIT 1\");\n $gmtdate = strtotime($firstbuild['starttime'] . ' UTC');\n }\n $response['daysWithErrors'] =\n round((strtotime($starttime) - $gmtdate) / (3600 * 24));\n $response['failingSince'] = date(FMT_DATETIMETZ, $gmtdate);\n $response['failingDate'] = substr($response['failingSince'], 0, 10);\n }\n\n // Check if this build has failed tests.\n $buildHasFailingTests = $build->TestFailedCount > 0;\n if ($buildHasFailingTests) {\n $response['hasFailingTests'] = true;\n // Find the last occurrence of this build that had no test failures.\n $no_fails_result = pdo_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime' AND parentid<1 AND testfailed<1\n ORDER BY starttime DESC LIMIT 1\");\n\n if (pdo_num_rows($no_fails_result) > 0) {\n $no_fails_row = pdo_fetch_array($no_fails_result);\n $gmtdate = strtotime($no_fails_row['starttime'] . ' UTC');\n } else {\n // Find the first build\n $firstbuild = pdo_single_row_query(\n \"SELECT starttime FROM build\n WHERE siteid='$siteid' AND type='$buildtype' AND\n name='$buildname' AND projectid='$projectid' AND\n starttime<='$starttime' AND parentid<1\n ORDER BY starttime ASC LIMIT 1\");\n $gmtdate = strtotime($firstbuild['starttime'] . ' UTC');\n }\n $response['daysWithFailingTests'] =\n round((strtotime($starttime) - $gmtdate) / (3600 * 24));\n $response['testsFailingSince'] = date(FMT_DATETIMETZ, $gmtdate);\n $response['testsFailingDate'] =\n substr($response['testsFailingSince'], 0, 10);\n }\n echo json_encode(cast_data_for_JSON($response));\n }\n}", "protected function file_these(array $bugs_to_file, $form_input) {\n $success = array();\n $filing = array();\n foreach ($bugs_to_file as $bug_to_file) {\n try {\n $filing = Filing::factory($bug_to_file, $form_input, $this->bugzilla_client);\n $filing->file();\n $bug_link = sprintf(\"<a href=\\\"%s/show_bug.cgi?id=%d\\\" target=\\\"_blank\\\">bug %d</a>\",\n $this->bugzilla_client->config('bugzilla_url'),\n $filing->bug_id,\n $filing->bug_id\n );\n Client::messageSend(\n str_replace(\n array('{label}','{bug}'),\n array($filing->label, $bug_link),\n $filing->success_message),\n E_USER_NOTICE\n );\n $success[] = $filing->bug_id;\n } catch (Exception $e) {\n /**\n * Timed out session most likely\n */\n if($e->getCode()==Filing::EXCEPTION_AUTHENTICATION_FAILED) {\n client::messageSend('Authentication Failed, need to re-login', E_USER_ERROR);\n $this->request->redirect('authenticate/login');\n /**\n * either the supplied $submitted_data to the Filing instance\n * was missing or construct_content() method of the Filing\n * instance tried to access a submitted content key that did\n * not exist.\n */\n } else if($e->getCode()==Filing::EXCEPTION_MISSING_INPUT) {\n Kohana_Log::instance()->add('error',__METHOD__.\" {$e->getMessage()}\");\n Client::messageSend('Missing required input to build this Bug', E_USER_ERROR);\n /**\n * bug was constructed successfully but we got an error back\n * when we sent it to Bugzilla\n */\n } else if($e->getCode()==Filing::EXCEPTION_BUGZILLA_INTERACTION) {\n Kohana_Log::instance()->add('error',__METHOD__.\" {$e->getMessage()}\");\n Client::messageSend(\"There was an error communicating \"\n .\"with the Bugzilla server for Bug \\\"{$filing->label}\\\": {$e->getMessage()}\", E_USER_ERROR);\n /**\n * something happend, log it and toss it\n */\n } else {\n Kohana_Log::instance()->add('error',__METHOD__.\" {$e->getMessage()}\\n{$e->getTraceAsString()}\");\n Client::messageSend('Unknown exception when filing this bug', E_USER_ERROR);\n throw $e;\n }\n }\n }\n return $success;\n }", "function delete_ch8bt_bug() {\r\n\t// Check that user has proper security level\r\n\tif ( !current_user_can( 'manage_options' ) ) {\r\n\t\twp_die( 'Not allowed' );\r\n\t}\r\n\r\n\t// Check if nonce field is present\r\n\tcheck_admin_referer( 'ch8bt_deletion' );\r\n\r\n\t// If bugs are present, cycle through array and call SQL\r\n\t// command to delete entries one by one\r\n\tif ( !empty( $_POST['bugs'] ) ) {\r\n\t\t// Retrieve array of bugs IDs to be deleted\r\n\t\t$bugs_to_delete = $_POST['bugs'];\r\n\r\n\t\tglobal $wpdb;\r\n\r\n\t\tforeach ( $bugs_to_delete as $bug_to_delete ) {\r\n\t\t\t$query = 'DELETE from ' . $wpdb->get_blog_prefix() . 'ch8_bug_data ';\r\n\t\t\t$query .= 'WHERE bug_id = %d';\r\n\t\t\t$wpdb->query( $wpdb->prepare( $query, intval( $bug_to_delete ) ) );\r\n\t\t}\r\n\t}\r\n\r\n\t// Redirect the page to the admin form\r\n\twp_redirect( add_query_arg( 'page', 'ch8bt-bug-tracker', admin_url( 'options-general.php' ) ) );\r\n\texit;\r\n}", "private function getIssues()\n {\n\n $issues = [];\n $total_issues = $this->totalIssues();\n if ($this->infos['errorBoolean']) {\n return 0;\n }\n if ($total_issues % 100 !== 0 ) {\n $total_int = intdiv($total_issues, 100) +1;\n }else {\n $total_int = $total_issues/100;\n }\n for ($i=0; $i < $total_int ; $i++) {\n $start = 100*$i;\n $max = 100*($i+1);\n $url = $this->base_uri.'search?jql=project='.$this->project.'&startAt='.$start.'&maxResults='.$max;\n $temp= $this->request($url);\n $issues[] = array(json_decode($temp));\n }\n\n return $issues;\n\n }", "function section_bugs() {\r\n\t\tprint \"<ul id='admin-section-bug-wrap'>\";\r\n\t\tprint \"<li><p>If you have found a bug in this plugin, please open a new <a id='framework-bug' href='https://github.com/OneManOneLaptop/\" . $this->slug . \"/issues/' target='_blank' style=''>Github Issue</a>.</p><p>Describe the problem clearly and where possible include a reduced test case.</p></li>\";\r\n\t\tprint \"</ul>\"; \r\n\t}", "function fetchIssues($project, $statuses){\n\n // default project\n $project = (isset($project)) ? $project : 'DEVOPS' ;\n\n // default statuses to fetch\n $defaultStatuses = array(\n 'Backlog' => 'Backlog',\n 'In Progress' => 'In Progress',\n 'Done' => 'Done'\n );\n\n // default statuses\n $statuses = (isset($statuses)) ? $statuses : $defaultStatuses ;\n\n // initialize list of issues\n $list = [];\n\n // walk through statuses\n foreach ($statuses as $key => $status) {\n\n // define the JIRA JQL\n $jql = 'project = '.$project.' AND status = \"'.$status.'\" ORDER BY updated ASC';\n\n try {\n $issueService = new IssueService();\n\n // fetch issues\n $response = $issueService->search($jql);\n\n\n // issues walker\n foreach ($response->issues as $issue) {\n\n // get epic link\n if (isset($issue->fields->customFields['customfield_10008'])) {\n $jql = 'issue = '.$issue->fields->customFields['customfield_10008'];\n $issueService = new issueService();\n $response = $issueService->search($jql);\n $epicLink = $response->issues[0]->fields->summary;\n }\n\n // define details\n $issueDetails = array(\n \"key\" => $issue->key,\n \"summary\" => $issue->fields->summary,\n \"type\" => $issue->fields->issuetype->name,\n \"epiclink\" => $epicLink,\n // \"date\" => $issue->fields->duedate->format('Y-m-d H:i:s')\n );\n\n // push the issue details to the list\n $list[$status][] = $issueDetails;\n\n }\n\n } catch (JiraException $e) {\n $this->assertTrue(false, 'Query Failed : '.$e->getMessage());\n }\n }\n\n // return the list\n return $list;\n}", "public function getForumTopicCommentList($debug_to_pass = '') {\n\n $this->db->select('ft.topic_id,ft.topic_title,ft.category_id,ft.topic_short_description,ft.topic_content,ft.posted_by,ft.posted_on,ft.status as ft_status,fc.category_id,fc.category_name,fc.page_description,u.user_name,u.user_id');\n $this->db->from('mst_forum_topics as ft');\n $this->db->join('mst_forum_categories as fc', 'ft.category_id = fc.category_id', 'inner');\n $this->db->join('mst_users as u', 'ft.posted_by=u.user_id', 'inner');\n// $this->db->join('trans_forum_comments as tfc', 'tfc.topic_id=ft.topic_id', 'inner');\n $this->db->where('ft.status', '1');\n// $this->db->where('tfc.status','1');\n $this->db->order_by('ft.topic_id desc');\n $query = $this->db->get();\n if ($debug_to_pass)\n echo $this->db->last_query();\n return $query->result_array();\n }", "function listRevisions($bugid, $patch)\n\t{\n\t\t$query = '\n\t\t\tSELECT revision FROM bugdb_patchtracker\n\t\t\tWHERE bugdb_id = ? AND patch = ?\n\t\t\tORDER BY revision DESC\n\t\t';\n\t\treturn $this->_dbh->prepare($query)->execute([$bugid, $patch])->fetchAll(PDO::FETCH_NUM);\n\t}", "public function details() {\n try {\n $details = $this->operationsModel->details($_POST['bugId']);\n if($details) {\n $this->response($details,200,'Success');\n } else {\n $this->response('',204,'Error');\n }\n } catch(Exception $ex) {\n $this->response('',500,'Error');\n } \n }", "public static function change($changeID, $description, $bugs)\n {\n $query = \"UPDATE changelog SET description = '$description' WHERE id = '$changeID'\";\n $res = mysql_query($query)or die(Helper::SQLErrorFormat(mysql_error(), $query, __METHOD__, __FILE__, __LINE__));\n \n foreach($bugs as $key => $value)\n {\n $query = \"INSERT INTO changelog_bug_relation (changeID, bugID) VALUES ('$changeID', '$value')\";\n $res = mysql_query($query)or die(Helper::SQLErrorFormat(mysql_error(), $query, __METHOD__, __FILE__, __LINE__));\n\n $bug = Bug::getBugByID((int) $value);\n\n Bug::change($bug->getID(), $bug->getPriority()->getID(), $bug->getTitle(), $bug->getDescription(), $bug->getAssignedToUser()->getID(), 100, Status::FIXED, true);\n }\n }", "public function countWeightedBugs($bugs, $projectId) {\n $count = [];\n $bugWeight = 0;\n $weight = Config::get('constant.bug_weight');\n for ($i = 1; $i <= 5; $i++) {\n $count[$i] = $this->countTicketsWithWeight($bugs, $projectId, $i, 'countId');\n }\n foreach ($weight as $key => $value) {\n switch ($key) {\n case 1:\n $bugWeight += $count[1] * $value;\n break;\n case 2:\n $bugWeight += $count[2] * $value;\n break;\n case 3:\n $bugWeight += $count[3] * $value;\n break;\n case 4:\n $bugWeight += $count[4] * $value;\n break;\n case 5:\n $bugWeight += $count[5] * $value;\n break;\n default: break;\n }\n }\n return $bugWeight;\n }", "public function run()\n {\n\n Bug::create([\n 'title' => 'Incidencia 1',\n 'description' => 'Descripcion incidencia 1',\n 'severity' => 'M',\n //'category_id' = ,\n 'project_id' => 1,\n 'level_id' => 1,\n 'client_id' => 2\n //'support_id' = 2\n ]);\n\n Bug::create([\n 'title' => 'Incidencia 2',\n 'description' => 'Descripcion incidencia 2',\n 'severity' => 'N',\n 'category_id' => 2,\n 'project_id' => 2,\n 'level_id' => 2,\n 'client_id' => 3\n //'support_id' = ,\n ]);\n\n Bug::create([\n 'title' => 'Incidencia 3',\n 'description' => 'Descripcion incidencia 3',\n 'severity' => 'A',\n 'category_id' => 1,\n 'project_id' => 1,\n 'level_id' => 1,\n 'client_id' => 4,\n 'support_id' => 2,\n ]);\n\n Bug::create([\n 'title' => 'Incidencia 4',\n 'description' => 'Descripcion incidencia 4',\n 'severity' => 'M',\n 'category_id' => 4,\n 'project_id' => 2,\n 'level_id' => 2,\n 'client_id' => 5,\n 'support_id' => 3,\n ]);\n\n Bug::create([\n 'title' => 'Incidencia 5',\n 'description' => 'Descripcion incidencia 5',\n 'severity' => 'A',\n 'category_id' => 3,\n 'project_id' => 1,\n 'level_id' => 1,\n 'client_id' => 2\n //'support_id' = ,\n ]);\n\n Bug::create([\n 'title' => 'Incidencia 6',\n 'description' => 'Descripcion incidencia 6',\n 'severity' => 'M',\n //'category_id' = ,\n 'project_id' => 2,\n 'level_id' => 2,\n 'client_id' => 4,\n 'support_id' => 2\n ]);\n }", "public function all()\n {\n $bugs = Bug::select('level', 'id', 'title', 'created_at')\n ->where('status', 'open')\n ->orderBy('id', 'desc')\n ->get()\n ;\n $template = ['bugs' => $bugs];\n\n return view('bug.list', $template);\n }", "function TestRun_get_test_cases($run_id) {\n\t// Create call\n\t// FIXME: not working\n\t$call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getIssues()\n {\n return $this->data['issues'];\n }", "public function getIssues($params = array())\n {\n if (!is_array($params)) {\n return array();\n }\n\n $headers = $this->getDefaultHeaders();\n $filters = \"\";\n\n foreach ($params as $key => $value) {\n $filters .= \"$key=$value\" . \"&\";\n }\n\n if ($filters !== \"\") {\n $filters = \"?\" . trim($filters, \"&\");\n }\n\n $response = $this->client->request(\n 'GET',\n $this->api . $this->repo . \"/issues\" . $filters,\n array(\n \"headers\" => $headers\n )\n );\n\n if ($response->getStatusCode() == 200) {\n $body = $response->getBody();\n $body = json_decode($body, true);\n\n return $body;\n }\n\n return array();\n }" ]
[ "0.7077948", "0.60726243", "0.5944839", "0.5852173", "0.5734443", "0.56766623", "0.5576862", "0.55423635", "0.5403327", "0.5361169", "0.5290842", "0.5262798", "0.52421105", "0.5121908", "0.51086473", "0.5082014", "0.50685513", "0.5062318", "0.5052352", "0.50369895", "0.5017038", "0.5009986", "0.49774033", "0.4959406", "0.49454758", "0.49045298", "0.48811638", "0.48727664", "0.48690206", "0.4867694" ]
0.77573705
0
/ lookup_status_id_by_name Lookup A TestCaseRun Status ID By Its Name Usage TestCaseRun.lookup_status_id_by_name Parameters ParameterData TypeComments namestringCannot be null or empty string Result case_run_status_id
function TestCaseRun_lookup_status_id_by_name($name) { // Create call $call = new xmlrpcmsg('TestCaseRun.lookup_status_id_by_name', array(new xmlrpcval($name, "string"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCaseRun_lookup_status_name_by_id($case_run_status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_name_by_id', array(new xmlrpcval($case_run_status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_status_name_by_id($status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_name_by_id', array(new xmlrpcval($status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_lookup_environment_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.lookup_environment_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_lookup_environment_name_by_id($environment_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.lookup_environment_name_by_id', array(new xmlrpcval($environment_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function execute_test($run_id, $case_id, $test_id)\n{\n\t// triggering an external command line tool or API. This function\n\t// is expected to return a valid TestRail status ID. We just\n\t// generate a random status ID as a placeholder.\n\t\n\t\n\t$statuses = array(1, 2, 3, 4, 5);\n\t$status_id = $statuses[rand(0, count($statuses) - 1)];\n\tif ($status_id == 3) // Untested?\n\t{\n\t\treturn null;\t\n\t}\n\telse \n\t{\n\t\treturn $status_id;\n\t}\n}", "function lookupStatus($judge_id){\n\t$data = M('user');\n\tif((int)$judge_id>=1){\n\t\t$condition['id'] = (int)$judge_id;\n\t\t$judge = $data->where($condition)->find();\n\t\treturn $judge['reserved_1'];\n\t}\n\telse return false;\n}", "public function get_run($run_id, $type, &$run_desc);", "function TestCaseRun_get($case_run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.get', array(new xmlrpcval($case_run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_lookup_type_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_priority_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_priority_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function getStatusIdByName($ticket_status_beschrijving){\n \n if ($this->checkText($ticket_status_beschrijving, $this->status_name_len) ){\n\n $query = \"SELECT `\".$this->ticket_status_id.\"`\".\n \"FROM `\".$this->ticket_status.\"`\".\n \"WHERE `\".$this->ticket_status_beschrijving .\"` = '\". $this->dbInString($ticket_status_beschrijving) . \"'\";\n\n $this->dbquery($query);\n if ( $this->checkDbErrors($query) ){\n\n return FALSE;\n }\n \n $status_array = $this->dbFetchArray();\n if ( $this->checkDbErrors($query) ){\n\n return FALSE;\n }\n } else {\n return FALSE;\n }\n \n return $status_array[$this->ticket_status_id];\n }", "function TestPlan_lookup_type_name_by_id($type_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_name_by_id', array(new xmlrpcval($type_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Build_lookup_name_by_id($build_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_name_by_id', array(new xmlrpcval($build_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function Build_lookup_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_category_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public function run ()\n {\n $lookupType = array(\n [\n 'id' => 1,\n 'name' => \"Loan status\",\n 'description' => \"Different status of loan\",\n ],\n [\n 'id' => 2,\n 'name' => \"Payment Status\",\n 'description' => \"Different payment status\",\n ],\n );\n\n $lookupValue = array(\n [\n 'id' => 1,\n 'name' => \"NEW\",\n 'description' => \"NEW\",\n 'value' => 1,\n 'lookup_type_id' => 1,\n ],\n [\n 'id' => 2,\n 'name' => \"APPROVED\",\n 'description' => \"APPROVED\",\n 'value' => 1,\n 'lookup_type_id' => 1,\n ],\n [\n 'id' => 3,\n 'name' => \"CLOSED\",\n 'description' => \"CLOSED\",\n 'value' => 1,\n 'lookup_type_id' => 1,\n ],\n [\n 'id' => 4,\n 'name' => \"REJECTED\",\n 'description' => \"REJECTED\",\n 'value' => 1,\n 'lookup_type_id' => 1,\n ],\n [\n 'id' => 5,\n 'name' => \"PENDING\",\n 'description' => \"PENDING\",\n 'value' => 1,\n 'lookup_type_id' => 2,\n ],\n [\n 'id' => 6,\n 'name' => \"PAID\",\n 'description' => \"PAID\",\n 'value' => 1,\n 'lookup_type_id' => 2,\n ],\n [\n 'id' => 7,\n 'name' => \"MISSED\",\n 'description' => \"MISSED\",\n 'value' => 1,\n 'lookup_type_id' => 2,\n ],\n );\n\n LookupType::insert($lookupType);\n LookupValue::insert($lookupValue);\n }", "function findID($d) {\n\t\t$url = \"https://inpho.cogs.indiana.edu/thinker.json\";\n\t\t$data = @file_get_contents($url,o,null,null);\n\t\t$json = json_decode($data);\n\t\t$results = $json->responseData->results;\n\t\tforeach($results as $value) {\n\t\t\tif (strcasecmp($value->label,$d)==0) { \n\t\t\t\t$id = $value->ID;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//return value of $id when string matches\n\t\treturn $id;\n\t}", "function _lookupStatus($a_obj_id, $a_user_id)\r\n\t{\r\n\t\tglobal $ilDB;\r\n\r\n\t\t$set = $ilDB->queryF(\"SELECT status FROM il_wiki_contributor \".\r\n\t\t\t\"WHERE wiki_id = %s and user_id = %s\",\r\n\t\t\tarray(\"integer\", \"integer\"),\r\n\t\t\tarray($a_obj_id, $a_user_id));\r\n\t\tif($row = $ilDB->fetchAssoc($set))\r\n\t\t{\r\n\t\t\treturn $row[\"status\"];\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function getTransactionStatusName($id){\n\t\t$statusArr\t= array(1=>\"Requested\", 2=>\"Recharged\");\n\t\t$statusName\t= $statusArr[$id];\n\n\t\treturn $statusName;\n\n\t}", "public function lead_status_unique_edit($l_t_name, $l_t_id)\n {\n \n $result = $this->db->query(\"call lead_status_unique_edit('\".$l_t_name.\"', '\".$l_t_id.\"')\")->row();\n save_query_in_log();\n \n return $result;\n }", "function TestRun_get_test_cases($run_id) {\n\t// Create call\n\t// FIXME: not working\n\t$call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_priority_name_by_id($priority_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_priority_name_by_id', array(new xmlrpcval($priority_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_get($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function get_statusname($ret_num){\r\n\tglobal $gp_arr_status;\t\r\n\r\n\tif(!empty($gp_arr_status)){\r\n\t\treturn $gp_arr_status[$ret_num];\r\n\t}else{\r\n\t\tglobal $db_shared;\r\n\t\t$status_query\t= \"SELECT * FROM $db_shared.catalogue_status WHERE id=$ret_num LIMIT 1\";\r\n\t\t$status_result\t= mysql_query($status_query);\r\n\t\t$status_array\t= mysql_fetch_array($status_result);\t\r\n\t\treturn $status_array['status'];\r\n\t}\r\n}", "public function getStatusNameById($ticket_status_id){\n\n if ($this->checkId($ticket_status_id, $this->ticket_status_id)){\n\n $query = \"SELECT `\".$this->ticket_status_beschrijving.\"`\".\n \"FROM `\".$this->ticket_status.\"`\".\n \"WHERE `\".$this->ticket_status_id .\"` = '\". $ticket_status_id . \"'\";\n $this->dbquery($query);\n if ( $this->checkDbErrors($query) ){\n\n return FALSE;\n }\n $status_array = $this->dbFetchArray();\n if ( $this->checkDbErrors($query) ){\n\n return FALSE;\n }\n\n } else {\n return FALSE;\n }\n return ($status_array[$this->ticket_status_beschrijving]);\n }", "function TestRun_get_test_case_runs($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_case_runs', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getListID($requestStatus) {\n global $client;\n $boardsArray = json_decode(json_encode($client->getCurrentUserBoards()), true); //Get the board and convert to an array from stdClass\n $boardID = strval($boardsArray[0][\"id\"]);\n $listsArray = json_decode(json_encode($client->getBoardLists($boardID)), true);\n foreach($listsArray as $data) {\n if ($data[\"name\"] == $requestStatus) {\n return $data[\"id\"];\n }\n }\n}", "public function lead_status_by_id($l_t_id)\n {\n \n $result = $this->db->query(\"call lead_status_by_id('\".$l_t_id.\"')\")->row();\n save_query_in_log();\n return $result;\n }", "function lookupJudgeById($judge_id){\n\t$data = M('user');\n\tif((int)$judge_id == -1){\n\t\treturn C('STR_EVENTLIST_NOJUDGE');\n\t}\n\telseif((int)$judge_id>=1){\n\t\t$condition['id'] = (int)$judge_id;\n\t\t$judge = $data->where($condition)->find();\n\t\treturn $judge['fullname'];\n\t}\n\telse\n\t\treturn false;\n}" ]
[ "0.7550667", "0.72613513", "0.6684604", "0.59730536", "0.5820756", "0.55670285", "0.5477339", "0.5448773", "0.5435215", "0.54205036", "0.54103726", "0.53434443", "0.5335045", "0.5330921", "0.5311985", "0.5286628", "0.5278489", "0.5141154", "0.51359195", "0.5087306", "0.5043246", "0.50138456", "0.5003742", "0.49760163", "0.49535057", "0.49138436", "0.48953104", "0.48633656", "0.48586684", "0.48319095" ]
0.7601995
0
/ lookup_status_name_by_id Lookup A TestCaseRun Status Name By Its ID Usage TestCaseRun.lookup_status_name_by_id Parameters ParameterData TypeComments case_run_status_idintegerCannot be 0 Result name
function TestCaseRun_lookup_status_name_by_id($case_run_status_id) { // Create call $call = new xmlrpcmsg('TestCaseRun.lookup_status_name_by_id', array(new xmlrpcval($case_run_status_id, "int"))); // Do call and return value return do_call($call); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestCase_lookup_status_name_by_id($status_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_name_by_id', array(new xmlrpcval($status_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCase_lookup_status_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_status_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestRun_lookup_environment_name_by_id($environment_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.lookup_environment_name_by_id', array(new xmlrpcval($environment_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestPlan_lookup_type_name_by_id($type_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.lookup_type_name_by_id', array(new xmlrpcval($type_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getTransactionStatusName($id){\n\t\t$statusArr\t= array(1=>\"Requested\", 2=>\"Recharged\");\n\t\t$statusName\t= $statusArr[$id];\n\n\t\treturn $statusName;\n\n\t}", "protected static function get_internal_status_name_from_id ($id) \n\t{\n\t\t$query = tep_db_query(\"SELECT orders_status_name FROM \". TABLE_ORDERS_STATUS . \" WHERE orders_status_id = \". intval($id));\n\t\t$status = tep_db_fetch_array($query);\n\t\treturn $status['orders_status_name'];\n\t}", "function lookupStatus($judge_id){\n\t$data = M('user');\n\tif((int)$judge_id>=1){\n\t\t$condition['id'] = (int)$judge_id;\n\t\t$judge = $data->where($condition)->find();\n\t\treturn $judge['reserved_1'];\n\t}\n\telse return false;\n}", "function Build_lookup_name_by_id($build_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('Build.lookup_name_by_id', array(new xmlrpcval($build_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function execute_test($run_id, $case_id, $test_id)\n{\n\t// triggering an external command line tool or API. This function\n\t// is expected to return a valid TestRail status ID. We just\n\t// generate a random status ID as a placeholder.\n\t\n\t\n\t$statuses = array(1, 2, 3, 4, 5);\n\t$status_id = $statuses[rand(0, count($statuses) - 1)];\n\tif ($status_id == 3) // Untested?\n\t{\n\t\treturn null;\t\n\t}\n\telse \n\t{\n\t\treturn $status_id;\n\t}\n}", "function TestCase_lookup_priority_name_by_id($priority_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_priority_name_by_id', array(new xmlrpcval($priority_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function TestCaseRun_get($case_run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCaseRun.get', array(new xmlrpcval($case_run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function ostGetOrderStatusName( $statusID )\r\n{\r\n\tstatic $statuses;\r\n\tif(!$statuses)$statuses = array();\r\n\tif(isset($statuses[$statusID]))return $statuses[$statusID];\r\n\r\n\t$q = db_phquery('SELECT * FROM ?#ORDER_STATUSES_TABLE');\r\n\twhile($row = db_fetch_row( $q )){\r\n\t\tLanguagesManager::ml_fillFields(ORDER_STATUSES_TABLE, $row);\r\n\t\tif ($row['statusID'] == ostGetCanceledStatusId() ){\r\n\t\t\t$row[\"status_name\"] = translate(\"ordr_status_cancelled\");\r\n\t\t}\r\n\t\t$statuses[$row['statusID']] = $row[\"status_name\"];\r\n\t}\r\n\treturn $statuses[$statusID];\r\n}", "function _lookupStatus($a_obj_id, $a_user_id)\r\n\t{\r\n\t\tglobal $ilDB;\r\n\r\n\t\t$set = $ilDB->queryF(\"SELECT status FROM il_wiki_contributor \".\r\n\t\t\t\"WHERE wiki_id = %s and user_id = %s\",\r\n\t\t\tarray(\"integer\", \"integer\"),\r\n\t\t\tarray($a_obj_id, $a_user_id));\r\n\t\tif($row = $ilDB->fetchAssoc($set))\r\n\t\t{\r\n\t\t\treturn $row[\"status\"];\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function getStatusNameById($ticket_status_id){\n\n if ($this->checkId($ticket_status_id, $this->ticket_status_id)){\n\n $query = \"SELECT `\".$this->ticket_status_beschrijving.\"`\".\n \"FROM `\".$this->ticket_status.\"`\".\n \"WHERE `\".$this->ticket_status_id .\"` = '\". $ticket_status_id . \"'\";\n $this->dbquery($query);\n if ( $this->checkDbErrors($query) ){\n\n return FALSE;\n }\n $status_array = $this->dbFetchArray();\n if ( $this->checkDbErrors($query) ){\n\n return FALSE;\n }\n\n } else {\n return FALSE;\n }\n return ($status_array[$this->ticket_status_beschrijving]);\n }", "function get_statusname($ret_num){\r\n\tglobal $gp_arr_status;\t\r\n\r\n\tif(!empty($gp_arr_status)){\r\n\t\treturn $gp_arr_status[$ret_num];\r\n\t}else{\r\n\t\tglobal $db_shared;\r\n\t\t$status_query\t= \"SELECT * FROM $db_shared.catalogue_status WHERE id=$ret_num LIMIT 1\";\r\n\t\t$status_result\t= mysql_query($status_query);\r\n\t\t$status_array\t= mysql_fetch_array($status_result);\t\r\n\t\treturn $status_array['status'];\r\n\t}\r\n}", "public static function getStatusDesc($status_id)\n {\n\t switch ($status_id)\n\t {\n\t\t case RowManager_RegistrationManager::STATUS_REGISTERED:\n\t\t \treturn 'Registered';\n\t\t \tbreak;\n\t\t case RowManager_RegistrationManager::STATUS_CANCELLED:\n\t\t \treturn 'Cancelled';\n\t\t \tbreak;\n\t\t case RowManager_RegistrationManager::STATUS_INCOMPLETE:\n\t\t \treturn 'Incomplete';\n\t\t \tbreak;\n\t\t case RowManager_RegistrationManager::STATUS_UNASSIGNED:\n\t\t \treturn 'Unassigned';\n\t\t \tbreak;\n\t\t default:\n\t\t \tbreak;\n \t}\n \t}", "public function get_run($run_id, $type, &$run_desc);", "function TestCase_lookup_category_name_by_id($category_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.lookup_category_name_by_id', array(new xmlrpcval($category_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getStatusName() {\n\t\treturn $this->data_array['status_name'];\n\t}", "function TestRun_get_test_cases($run_id) {\n\t// Create call\n\t// FIXME: not working\n\t$call = new xmlrpcmsg('TestRun.get_test_cases', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getFMFStatusName($fmfId, $lang_id=1){\n if(!is_numeric($fmfId) or !is_numeric($lang_id)){\n return false;\n }\n $rs = tep_db_query('SELECT fmf_status_name FROM ' . TABLE_FMF_PAYPAL_STATUS . ' WHERE paypal_fmf_status_id = ' . $fmfId . ' AND language_id = ' . $lang_id . ' limit 1');\n if (tep_db_num_rows($rs) > 0){\n $row = tep_db_fetch_array($rs);\n return $row['fmf_status_name'];\n }\n // if where still here try land_id 1 if not tried\n if($lang_id != 1){\n $rs = tep_db_query('SELECT fmf_status_name FROM ' . TABLE_FMF_PAYPAL_STATUS . ' WHERE paypal_fmf_status_id = ' . $fmfId . ' AND language_id = 1 limit 1');\n if (tep_db_num_rows($rs) > 0){\n $row = tep_db_fetch_array($rs);\n return $row['fmf_status_name'];\n }\n }\n // still nada\n return false;\n }", "function TestRun_lookup_environment_id_by_name($name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.lookup_environment_id_by_name', array(new xmlrpcval($name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "public static function get_status_by_id($measurement_id)\r\n {\r\n\t\t$result_get_data_json = TracerouteMeasurement::get_measurement_data_by_id($measurement_id);\r\n return $result_get_data_json[status][name];\r\n }", "function TestRun_get_test_case_runs($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_test_case_runs', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function getCustomStatusName() {\n\t\t$custom_status_id = $this->ArtifactType->getCustomStatusField();\n\t\tif ($custom_status_id) {\n\t\t\t$result = db_query_params ('SELECT element_name FROM artifact_extra_field_elements aefe, artifact_extra_field_data aefd\n\t\t\t\t\t\t\t\t\t\tWHERE artifact_id=$1 AND aefd.extra_field_id=$2 AND CAST(aefd.field_data AS INTEGER)=aefe.element_id',\n\t\t\t\t\t\t\t\tarray ($this->getID(), $custom_status_id)) ;\n\t\t\tif ($result) {\n\t\t\t\treturn db_result($result, 0, 'element_name');\n\t\t\t}\n\t\t}\n\t\treturn $this->data_array['status_name'];\n\t}", "function getOrderStatusName($orders_status_id) {\n\t\t$sel_ord_query = tep_db_query(\"SELECT orders_status_name FROM \" . TABLE_ORDERS_STATUS . \" WHERE orders_status_id = '\".$orders_status_id.\"'\");\n\t\t$rst_arr = tep_db_fetch_array($sel_ord_query);\n\t\treturn $rst_arr['orders_status_name'];\n\t}", "public function getStatusIdByName($ticket_status_beschrijving){\n \n if ($this->checkText($ticket_status_beschrijving, $this->status_name_len) ){\n\n $query = \"SELECT `\".$this->ticket_status_id.\"`\".\n \"FROM `\".$this->ticket_status.\"`\".\n \"WHERE `\".$this->ticket_status_beschrijving .\"` = '\". $this->dbInString($ticket_status_beschrijving) . \"'\";\n\n $this->dbquery($query);\n if ( $this->checkDbErrors($query) ){\n\n return FALSE;\n }\n \n $status_array = $this->dbFetchArray();\n if ( $this->checkDbErrors($query) ){\n\n return FALSE;\n }\n } else {\n return FALSE;\n }\n \n return $status_array[$this->ticket_status_id];\n }", "function lookupJudgeById($judge_id){\n\t$data = M('user');\n\tif((int)$judge_id == -1){\n\t\treturn C('STR_EVENTLIST_NOJUDGE');\n\t}\n\telseif((int)$judge_id>=1){\n\t\t$condition['id'] = (int)$judge_id;\n\t\t$judge = $data->where($condition)->find();\n\t\treturn $judge['fullname'];\n\t}\n\telse\n\t\treturn false;\n}", "function TestRun_get($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}" ]
[ "0.7446978", "0.7315528", "0.7035691", "0.62101525", "0.5962972", "0.58992463", "0.5756113", "0.5662879", "0.5661188", "0.5574996", "0.55725473", "0.55450577", "0.55131763", "0.5489959", "0.548433", "0.543253", "0.54274935", "0.5415003", "0.5399905", "0.5371492", "0.5364881", "0.5279412", "0.52746165", "0.5232732", "0.52114385", "0.5210518", "0.5209464", "0.5192316", "0.51765954", "0.5173157" ]
0.8158918
0
__construct Show companies index page
function index() { if($this->request->isApiCall()) { $this->serveData(Companies::findByIds($this->logged_user->visibleCompanyIds()), 'companies'); } else { $page = (integer) $this->request->get('page'); if($page < 1) { $page = 1; } // if list($companies, $pagination) = Companies::paginateActive($this->logged_user, $page, 30); $this->smarty->assign(array( 'companies' => $companies, 'pagination' => $pagination, )); } // if }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index(Company $company)\n {\n //\n }", "public function index(Company $company)\n {\n //\n }", "public function index()\n {\n $order = $this->get->get('order', 'ASC');\n $by = $this->get->get('by', 'name');\n $companies = $this->company->orderBy($by, $order)->paginate($this->totalPage);\n return view('admin.company.index', compact('companies'));\n }", "public function index()\n {\n\t\t$companies = companies::latest()->paginate(10);\n\t\treturn view('companies.index',compact('companies'))\n\t\t->with('i', (request()->input('page', 1) -1) * 10);\n //\n }", "public function index()\n {\n \n $companies = Company::latest()->paginate(10);\n return view('company.index',compact('companies'))\n ->with('i', (request()->input('page', 1) - 1) * 10);\n }", "public function index()\n {\n $companies = Company::orderBy('created_at', 'desc')->paginate(10);\n return view('Admin.pages.company.index')->with('companies', $companies);\n }", "public function index()\n {\n $companies = $this->repository->orderBy('name')->paginate('8');\n\n return view('company.index', compact('companies'));\n }", "public function index()\n {\n return view('company.index',[\n 'companies' => Company::orderBy('created_at', 'desc')->paginate(10)\n ]);\n }", "public function index()\n {\n //Affiche tout les objects company avec une pagination de 10 objet par page\n //Show all of the company objects with a pagination of 10 objects per page\n $list = DB::table('companies')->paginate(10);\n return view('companies.index')->with('list', $list);\n }", "public function index()\n {\n $companies = Company::paginate(10);\n\n return view('company.index', [\n 'companies' => $companies,\n ]);\n\n }", "public function index()\n {\n $companies = Company::orderBy('name', 'asc')->paginate(10);\n return view('company.index')->with('companies', $companies);\n }", "public function index()\n {\n return view('admin.companies.index', [\n 'companies' => Company::paginate(10)\n ]);\n }", "public function index()\n {\n $companies = Company::paginate(5);\n return view('company.index', compact('companies'));\n }", "public function index()\n {\n return Company::paginate(10);\n }", "public function companylist() {\r\n $companies = $this->model->getCompanies();\r\n return $this->view('company/companylist', $companies);\r\n }", "public function showListCompanyPage()\n {\n $company = new Company();\n if ($this->checkSession()) {\n $data[] = array();\n $data['navbar'] = view('includes.navbar');\n\n $data['listCompany'] = $company->showListCompany(Session::get('univID'), \"\", \"asc\", \"\", \"\");\n $data['listCompanyIndustry'] = $company->showIndustry(Session::get('univID'));\n // $data['totalCompany'] = $company->GetTotalCompany();\n return view('pages.companylist')->with('data', $data);\n }\n return redirect(\"/login\");\n }", "public function index()\n {\n return view('companies.index',[\n 'companies' => Companies::all()\n ]);\n }", "public function index()\n {\n $companies = Company::latest()->paginate(5);\n return view('company.index', compact('companies'));\n }", "public function index()\n {\n $company = Company::latest();\n\n if (request('search')) {\n $company->where('name', 'like', '%' . request('search') . '%')\n ->orwhere('email', 'like', '%' . request('search') . '%')\n ->orwhere('website', 'like', '%' . request('search') . '%');\n }\n\n return view('dashboard.company', [\n \"title\" => \"Company\",\n \"active\" => \"company\",\n \"company\" => $company->paginate(5)\n ]);\n }", "public function index()\n {\n $companies = Company::paginate(10);\n\n return view('companies.index', compact('companies'));\n }", "public function index()\n {\n $companies = Company::latest()->paginate(5);\n\n return view('companies.index', compact('companies'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "public function index()\n {\n //1\n $companies = Company::all();\n return view('admin.companies.index',compact('companies'));\n }", "public function index()\n { \n $companies = Companies::paginate(10);\n return view('companies.index',compact('companies'));\n }", "public function index()\n {\n $company = Company::paginate();\n // dd($company);\n\n return view('company.index', compact('company'));\n }", "public function index()\n { \n $company = Company::paginate(10);\n return view('company.viewcompany',compact('company'));\n }", "public function index()\n {\n $companies = Company::paginate(10);\n return view('companies.home',compact('companies'));\n }", "public function index()\n {\n $companies = Company::latest()->paginate(10);\n return view('companies.index',compact('companies'));\n }", "public function index()\n {\n return view('companies.index', [ 'companies' => Company::all() ]);\n }", "public function index()\n {\n return view('company.index');\n }", "public function index(iCompanyService $companyService)\n {\n \n if (!in_array('Bedrijvengids', config('activeModules'))) {\n return abort(404);\n }\n // Ophalen gegevens\n\n\n $companies = $companyService->getCompanyCity();\n // dd($companies);\n\n foreach ($companies as $key => $company) {\n if (!empty($company->website)) {\n $company->website = explode(\",\", $company->website);\n } else {\n $companies[$key]->website = [];\n }\n }\n\n $cities = City::where(\"group_id\", config(\"siteGroup\"))->get();\n $types = CompanyType::wherenull('deleted_at')->get();\n $categories = Companycategory::wherenull('deleted_at')->get();\n $subcategories = CompanySubCategory::wherenull('deleted_at')->get();\n $sitename = config('siteName');\n $sitedomain = config('domain');\n\n $openGraph = [\n 'title' => 'Bedrijvengids',\n 'description' => 'Op deze pagina vindt u alle bedrijven binnen ' . config('siteName') . '.',\n 'image' => config('siteLogo'),\n 'type' => 'website'\n ];\n\n // View doorsturen met alle data\n return view('company_overview')\n ->with(['companies' => $companies, 'cities' => $cities, 'types' => $types, 'categories' => $categories, 'subcategories' => $subcategories, 'sitename' => $sitename, 'sitedomain' => $sitedomain, 'openGraph' => $openGraph]);\n }" ]
[ "0.7762682", "0.7762682", "0.77060956", "0.7678966", "0.76700133", "0.7649519", "0.75377256", "0.7502622", "0.7497743", "0.7491244", "0.7483215", "0.74753475", "0.7462112", "0.7460038", "0.7414851", "0.7401081", "0.7400681", "0.7393722", "0.73518795", "0.7341648", "0.7325599", "0.73054373", "0.7301299", "0.72994864", "0.7297268", "0.72846985", "0.7279049", "0.7275807", "0.72734076", "0.72706187" ]
0.77739507
0
Restore the original branch, e.g. after a successful land or a failed pull.
private function restoreBranch() { $repository_api = $this->getRepositoryAPI(); $repository_api->execxLocal( 'checkout %s', $this->oldBranch); if ($this->isGit) { $repository_api->execxLocal( 'submodule update --init --recursive'); } echo phutil_console_format( "Switched back to {$this->branchType} **%s**.\n", $this->oldBranch); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restore() {}", "public function restore()\n {\n }", "public function restore()\n {\n //\n }", "public function restore();", "function restore()\n {\n }", "protected static function restore() {}", "public function restore(): void\n\t{\n\t\t$this->processor->restore();\n\t}", "public function restored(Bank $bank)\n {\n //\n }", "public function restored(Exchange $exchange)\n {\n //\n }", "public function restoring($model)\n\t{\n\t}", "public function revert()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->getModel('pull')->revert(JFactory::getApplication()->input->getInt('pull_id'));\n\n\t\t\t$msg = JText::_('COM_PATCHTESTER_REVERT_OK');\n\t\t\t$type = 'message';\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$msg = $e->getMessage();\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_patchtester&view=pulls', false), $msg, $type);\n\t}", "public function restore()\n\t{\n\t\t$this->files = array();\n\t}", "public function restored(Post $post)\n {\n //\n }", "public function restored(Post $post)\n {\n //\n }", "public function restored(Brand $brand)\n {\n //\n }", "public function restore(){\n $this->update(['deleted_by', NULL]);\n return $this->baseRestore();\n }", "public function restored(Stock $stock)\n {\n //\n }", "public function revert();", "public function restored(Leaderboard $leaderboard)\n {\n //\n }", "public function resetOriginalStatus() {\n $this->orig_status = $this->getStatus();\n }", "public function restore(string $state);", "public function testRestoreState()\n {\n $load = new Load(new Memento());\n $load->pickup();\n $load->enroute();\n $load->deliver();\n\n // Check the last state of the load\n $this->assertSame(State::STATE_DELIVER, $load->getCurrentState());\n\n // Undo the previous state of the load\n $load->undo();\n $this->assertSame(State::STATE_ENTOUTE, $load->getCurrentState());\n\n // Restore the first state of the load\n $load->restore(0);\n $this->assertSame(State::STATE_PICKUP, $load->getCurrentState());\n }", "public function restored(assignment $assignment)\n {\n //code...\n }", "public function restored(Project $project)\n {\n //\n }", "public function undoRestore ()\n {\n if (file_exists ( $this->_previewFilename ))\n {\n unlink($this->_previewFilename);\n }\n }", "public function restoring(assignment $assignment)\n {\n //code...\n }", "public function restored(Api $api)\n {\n //\n }", "public function restoreAction() {\n\t\t$request = reqBup::get('post');\n\t\t$response = new responseBup();\n\t\t$filename = $request['filename'];\n\t\t$model = $this->getModel();\n\t\t\n\t\t$result = $model->restore($filename);\n\n\t\tif (false === $result) {\n $errors = array_merge($model->getDatabase()->getErrors(), $model->getFilesystem()->getErrors());\n if (empty($errors)) {\n $errors = langBup::_('Unable to restore from ' . $filename);\n }\n\t\t\t$response->addError($errors);\n\t\t}\n\t\telse {\n\t\t\t$response->addData($result);\n\t\t\t$response->addMessage(langBup::_('Done!'));\n\t\t}\n\n $response->addData(array('result' => $result));\n return $response->ajaxExec();\n\t}", "public function restored(Ticket $ticket)\n {\n //\n }", "public function restored(Order $order)\n\t{\n\t\t//\n\t}" ]
[ "0.6645313", "0.6603883", "0.6588765", "0.64372236", "0.6393038", "0.6312822", "0.6238128", "0.61670756", "0.6081092", "0.6018621", "0.59939134", "0.59879", "0.5964721", "0.5964721", "0.5959783", "0.592793", "0.5911783", "0.59020823", "0.590133", "0.5900006", "0.5880558", "0.5877396", "0.58736295", "0.58512896", "0.58459544", "0.5811264", "0.58066696", "0.5789586", "0.5755771", "0.5749745" ]
0.82019234
0
Traverse all roles and view role permissions get permissions.
public function getPermissionsViaRole() { return $this->roles->map(function (Role $role) { return $role->getAllPermissions(); })->flatten(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getAll()\n {\n return Role::with(['permissions'])->get();\n }", "protected function getPermissions()\n {\n return Permission::with('roles')->get();\n }", "public function getRolePermissions()\n {\n $headers = ['Ability', 'Role'];\n\n $role_name = $this->argument('needle');\n\n $role = $this->permission->findBy('role_name', $role_name);\n if ($role) {\n $permissions = json_to_array($role->permission);\n\n if (!is_array($permissions)) {\n $permissions = [];\n }\n\n foreach ($permissions as $module=>$permission) {\n $this->warn(\"\\n\" . strtoupper($module));\n $data = [];\n\n foreach ($permission as $ability=>$perm) {\n $vals = [$module, $ability];\n if (is_bool($perm)) {\n if ($perm) {\n $vals[] = 'true';\n } else {\n $vals[] = 'false';\n }\n }\n if (is_string($perm)) {\n $vals[] = $perm;\n }\n $data[] = $vals;\n }\n $this->table($headers, $data);\n }\n\n } else {\n $this->error(\"No role found!\");\n }\n }", "public function getRolePermissions()\n {\n return self::select(\"r.*, p.*\")\n ->leftJoin('role_permissions rp', 'r.roleID = rp.roleID')\n ->leftJoin('permissions p', 'p.permissionID = rp.permissionID')\n ->get();\n }", "public function getRoles()\n {\n #obsolete, I don't wnat user roles, I want the permission those roles are linked to\n # so I just need a getPermissions once, store those constants in a small session array\n #$roles = $this->roles;\n\n #d($roles);\n\n #foreach ($roles as $role) {\n # echo $role->name;\n #}\n }", "public function getAllPermissions()\n {\n $roles = $this->getAllRoles();\n $permissions = $roles ? call_user_func_array('array_merge', array_map(function(RoleInterface $role) {\n return $role->getAllPermissions();\n }, $roles)) : [];\n\n return (new Collection($permissions))->combine('slug', function($permission) {\n return $permission;\n })\n ->toArray();\n }", "public function getPermissions()\n {\n\n $roles = Role::where(function($query){\n\n $query->whereIn('id',$this->roles()->pluck('role_id'));\n\n })->with('permissions')->get();\n\n\n $permissions = $roles->map(function($role){\n\n $permissionData = $role->permissions->pluck('permission');\n\n if(sizeOf($permissionData) > 0)\n {\n return $permissionData[0];\n }\n\n })->filter(function($item){\n if($item !== null)\n {\n return $item;\n }\n });\n\n if ($permissions->count() <= 1)\n {\n return $permissions;\n }\n\n return $permissions->unique();\n\n }", "public function rolePermissions(): Collection\n {\n return $this->roles?->loadMissing('permissions')->pluck('permissions')->flatten() ?? collect();\n }", "private function get_all_roles(){\n return Role::all();\n }", "public function getAllPermissions();", "public function getAllPermissions();", "public function allPermissions(): Collection\n {\n return $this->permissions->merge($this->rolePermissions());\n }", "public function getPermissionAndRoleList()\n {\n $user = $this->user;\n\n if (!$user) {\n throw new RoleAndPriviledgeServiceException(\"The user is not defined\");\n }\n $permissions = $user->directPermissions;\n\n $user->loadMissing(\"roles\", \"roles.permissions\");\n\n $roles = $user->roles;\n\n // $roles = $user->roles()->with(\"permissions\")->get();\n\n $roles->each(function ($role) use (&$permissions) {\n $permissions = $permissions->merge($role->permissions);\n });\n\n $rv = [\n array_unique($permissions->pluck(\"name\")->all()),\n array_unique($roles->pluck(\"name\")->all())\n ];\n\n return $rv;\n }", "function getAllRoles(){\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getAllRoles();\r\n }", "public function allPermissions(): Collection\n {\n if ($this->allPermissions) {\n return $this->allPermissions;\n }\n\n return $this->allPermissions =\n $this->roles\n ->pluck('permissions')\n ->flatten()\n ->keyBy($this->getKeyName());\n }", "public function listPermissionByRole()\n {\n $roles = $this->roleRepository->all();\n $permissions = $this->permissionRepository->all();\n return view('admin.permission.permission_role', compact('roles', 'permissions'));\n }", "public function roles()\n {\n return $this->hasManyThrough(Permission::class);\n }", "private function getUserRolePermissions()\n {\n return [];\n }", "public function index()\n {\n $this->authorize('viewAny', Role::class);\n return Role::all();\n }", "public function getAllPermissionsForRole(string $role): array;", "public function index()\n {\n $roles = Role::paginate(15);\n\n $permissions = array();\n $user_roles = Auth::user()->roles;\n foreach ($user_roles as $key => $val) {\n foreach ($val->permissions as $permission) {\n $permissions[$permission->id] = $permission->name;\n }\n }\n\n return view('roles.index')->withRoles($roles)->withPermissions($permissions);\n }", "function getPermissions() {\n // For eficientcy, we will just store the names, not the objects\n if ( is_null($this->allPermissions) ) {\n $tmpRole = FactoryObject::newObject(\"_Permission\");\n $this->allPermissions = $tmpRole ->getAllPermissionByIdRole($this->getId());\n } \n\n return $this->allPermissions;\n }", "public function get_all_roles()\n {\n return App\\Role::all();\n }", "protected function getPermissions()\n {\n if (!$this->tablePermissionsExists()) {\n return [];\n }\n return Permission::with('roles')->get();\n }", "public function findRoles() {\n\t\t\n\t}", "public function getPermissions()\n\t{\n\t\tif(!$this->id)\n\t\t\treturn array();\n $role= UserRole::model()->getUserRole($this);\n if(!$role->role_id){\n return array();\n }\n\t\t$permissions = array();\n\t\t$sql = \"SELECT pa.ACTION_ID AS id, pa.key from \". PermissionMap::model()->tableName().\" pm left join \". PermissionAction::model()->tableName().\" pa on pa.ACTION_ID = pm.permission_id where pm.type = '\".PermissionMap::TYPE_ROLE.\"' and pm.principal_id = {$role->role_id}\";\n\t\t\tforeach (Yii::app()->db->cache(500)->createCommand($sql)->query()->readAll() as $permission)\n\t\t\t\t$permissions[$permission['id']] = $permission['key'];\n\t\t\n\n\n\t\t// Direct user permission assignments\n\t\t$sql = \"select pa.ACTION_ID as id, pa.key from \". PermissionMap::model()->tableName().\" pm left join \". PermissionAction::model()->tableName().\" pa on pa.ACTION_ID = pm.permission_id where pm.type = '\".PermissionMap::TYPE_USER.\"' and pm.principal_id = {$this->id}\";\n\t\tforeach (Yii::app()->db->cache(500)->createCommand($sql)->query()->readAll() as $permission)\n\t\t\t$permissions[$permission['id']] = $permission['key'];\n\n\n\t\treturn $permissions;\n\t}", "public function permissions()\n {\n return $this->embedsMany(\n config('laravel-permission.table_names.role_has_permissions')\n );\n }", "public function actionPermissions()\n\t{\n\t\t$dataProvider = new RPermissionDataProvider('permissions',array(\n\t\t\t\t'pagination'=>array(\n\t\t\t\t\t\t'pageSize'=>5,\n\t\t\t\t),\n\t\t));\n\t\t// Get the roles from the data provider\n\t\t$roles = $dataProvider->getRoles();\n\t\t$roleColumnWidth = $roles!==array() ? 75/count($roles) : 0;\n\n\t\t// Initialize the columns\n\t\t$columns = array(\n\t\t\tarray(\n \t\t\t'name'=>'description',\n\t \t\t'header'=>Rights::t('core', 'Item'),\n\t\t\t\t'type'=>'raw',\n \t\t\t'htmlOptions'=>array(\n \t\t\t\t'class'=>'permission-column',\n \t\t\t\t'style'=>'width:25%',\n\t \t\t),\n \t\t),\n\t\t);\n\n\t\t// Add a column for each role\n \tforeach( $roles as $roleName=>$role )\n \t{\n \t\t$columns[] = array(\n\t\t\t\t'name'=>strtolower($roleName),\n \t\t\t'header'=>$role->getNameText(),\n \t\t\t'type'=>'raw',\n \t\t\t'htmlOptions'=>array(\n \t\t\t\t'class'=>'role-column',\n \t\t\t\t'style'=>'width:'.$roleColumnWidth.'%',\n \t\t\t),\n \t\t);\n\t\t}\n\n\t\t$view = 'permissions';\n\t\t$params = array(\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t'columns'=>$columns,\n\t\t);\n\n\t\t// Render the view\n\t\tisset($_POST['ajax'])===true ? $this->renderPartial($view, $params) : $this->render($view, $params);\n\t}", "public function index()\n {\n $roles = Role::all();\n //dd($role->permissions()->get());\n\t\t\n return view('admin.permissions.index', [\n 'roles' => $roles,\n 'roles_count' => count($roles),\n ]);\n }", "public function getAll()\n {\n try{\n return $this->roles;\n }\n catch (\\Exception $exception)\n {\n return null;\n }\n }" ]
[ "0.74469596", "0.73511004", "0.72663933", "0.7091406", "0.6979009", "0.69606924", "0.682855", "0.68099684", "0.68049467", "0.6751602", "0.6751602", "0.67238224", "0.6661425", "0.6647527", "0.66462815", "0.66439813", "0.66318744", "0.6621978", "0.6610668", "0.6602613", "0.6583338", "0.65644133", "0.65497816", "0.65120184", "0.6492247", "0.6466426", "0.64553845", "0.6450692", "0.6448544", "0.64185995" ]
0.73654485
1
Forget the cached permissions.
protected function forgetCachedPermissions() { app(PermissionRegistrar::class)->forgetCachedPermissions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function forgetCachedPermissions()\n {\n app(PermissionRegistrar::class)->forgetCachedPermissions();\n }", "function clean_permissions_cache() {\n cache_remove_by_pattern('visible_types_filter_for_*');\n \tcache_remove_by_pattern('visible_project_types_filter_for_*');\n \tcache_remove_by_pattern('visible_project_types_for_*');\n }", "function clean_project_permissions_cache($project) {\n \tclean_permissions_cache();\n }", "public function revokeAllPermissions();", "public function revokeAllPermissions();", "public function revokeAllPermissions(){\n\n $this->permissions()->detach();\n return $this;\n }", "public function revokePermissions()\n {\n return $this->permissions()->detach();\n }", "public function clearPermissionsCollection(): void\n {\n $this->permissions = null;\n }", "public function revoke_access() {\r\n // Nothing to do!\r\n }", "public function revokeAllPermissions()\n {\n $this->permissions()->sync([]);\n\n if (config('permissionsHandler.seeder') == true) {\n Seeder::revokeAllRolePermissions($this);\n }\n\n $this->clearRelatedCache();\n }", "public function currentUserFlushCache(): void\n {\n Cache::forget('gatekeeper_roles_for_' . $this->userModelCacheKey() . '_' . $this->user->getKey());\n Cache::forget('gatekeeper_permissions_for_' . $this->userModelCacheKey() . '_' . $this->user->getKey());\n }", "public function revokeExpiredPermissions()\n {\n $expiredPermissions = $this->permissions()->wherePivot('expires', '<', Carbon::now())->get();\n\n if ($expiredPermissions->count() > 0) {\n return $this->permissions()->detach($expiredPermissions->modelKeys());\n }\n }", "public function flushCache()\n {\n Cache::forget('able_roles_for_group_' . $this->getKey());\n }", "public function removeUsageRights() {}", "public function unlink() {\n $this->credential->setAccessToken(null);\n $this->credential->setTokenType(null);\n }", "public function clearRelatedCache()\n {\n Cache::forget($this->getCachePrefix());\n $users = $this->getRelatedUsers();\n foreach ($users as $user) {\n $user->clearCachedRoles();\n $user->clearCachedPermissions();\n }\n }", "public function forgetCache();", "public function removeCache() {\r\n $files = $this->caches;\r\n while (count($files) > 0) {\r\n @unlink(array_shift($files));\r\n }\r\n\r\n }", "public function clearCache() {}", "public function clearCache() {}", "public function delete_cache()\r\n {\r\n $this->clear_file_cache();\r\n }", "private function cachePermissions(): void\n {\n Cache::put($this->cacheKey(), [\n 'isPayor' => $this->isPayor,\n 'isAgencyBankAccountSetup' => $this->isAgencyBankAccountSetup,\n 'canViewDocumentation' => $this->canViewDocumentation,\n ]);\n }", "public function cache_delete()\n {\n }", "public function removeFromCache()\n {\n Cache::tags('file')->forget(strtolower($this->alias));\n }", "public function invalidateCaches()\n {\n ManifestHelper::invalidateCaches();\n }", "public function clear () {\n array_map('unlink', glob(CACHE.\"*.cache\"));\n /*\n $files = scandir(CACHE);\n foreach ($files as $file){\n if (pathinfo($file, PATHINFO_EXTENSION) == 'cache') @unlink(CACHE.$file);\n }\n */\n }", "public function __construct()\n {\n Cache::forget('laralum_permissions');\n }", "public function deleteCheckPermissionCache(array $options)\n {\n $Cache = (new \\Rdb\\Modules\\RdbAdmin\\Libraries\\Cache(\n $this->Container,\n [\n 'cachePath' => $this->cachePath,\n ]\n ))->getCacheObject();\n\n if (isset($options['user_id']) && is_numeric($options['user_id'])) {\n // if user_id in was set\n // delete user roles data cache for this user.\n $options['user_id'] = (int) $options['user_id'];\n $Cache->delete('user' . $options['user_id'] . '.userRoleIDs');\n $Cache->delete('user' . $options['user_id'] . '.userRoleIDsData');\n }\n\n if (\n isset($options['module_system_name']) && \n is_string($options['module_system_name']) &&\n !empty($options['module_system_name']) &&\n isset($options['permission_page']) && \n is_string($options['permission_page']) &&\n !empty($options['permission_page'])\n ) {\n // if module_system_name was set.\n $cacheKeyPermissionsModuleData = 'permissionsModuleData.' . $options['module_system_name'] . '.' . $options['permission_page'];\n $Cache->delete($cacheKeyPermissionsModuleData);\n unset($cacheKeyPermissionsModuleData);\n }\n\n unset($Cache);\n }", "private static function CLEAR_CACHE() {\n\t\tclearstatcache();\n\t}", "public function _cacheClear() {\n\t\t$content = null;\n\t\tif ( ZC_CACHE == 'apc' ) {\n\t\t\t$info = apc_cache_info( 'user' );\n\t\t\tforeach ( $info[ 'cache_list' ] as $item ) {\n\t\t\t\tif ( preg_match( '/^\\Q'. ZC_CACHE_PREFIX. '\\E/', $item[ 'info' ] ) )\n\t\t\t\t\tapc_delete( $item[ 'info' ] );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ( ( $dh = opendir( ZC_CACHE_DIR ) ) !== false ) {\n\t\t\t\twhile( ( $file = readdir( $dh ) ) !== false ) {\n\t\t\t\t\tif ( ! preg_match( '/\\.cache$/', $file ) || is_dir( $file ) ) continue;\n\t\t\t\t\tunlink( ZC_CACHE_DIR. '/'. $file );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.79305166", "0.73567146", "0.70969707", "0.7075493", "0.7075493", "0.6791435", "0.6790494", "0.6771382", "0.6742042", "0.66986614", "0.65345216", "0.649843", "0.64202464", "0.63616586", "0.6360138", "0.62653506", "0.62577385", "0.62295735", "0.6200456", "0.6200456", "0.61796457", "0.61666805", "0.6133009", "0.61296874", "0.6127352", "0.6113122", "0.6100511", "0.60981923", "0.60776705", "0.6075176" ]
0.7856477
1
/private $host = "mysql5160.perso"; private $user="tvshowpltvsp"; private $passwd="tn5Ij2i7"; private $base="tvshowpltvsp"; private $con;
public function __construct() { if($_SERVER['HTTP_HOST']=='127.0.0.1'){ //local db $this->host= "localhost"; $this->user="root"; $this->passwd="root"; $this->base="tvsp"; $this->online=false; }else{ //Hosted db $this->host= "mysql51-60.perso"; $this->user="tvshowpltvsp"; $this->passwd="tn5Ij2i7"; $this->base="tvshowpltvsp"; $this->online=true; } $this->con= mysql_connect($this->host,$this->user,$this->passwd) or die("Connexion"); mysql_select_db($this->base,$this->con) or die("Sélection de MaBase"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct()\r\n {\r\n $this->host = \"10.67.254.101\"; \r\n $this->user = \"root\";\r\n $this->passwd = \"root\";\t\t\r\n $this->schema = \"wjdb\";\r\n $this->result = false; \r\n }", "function __construct() {\n\n $this->dbserver = \"MYSQL5005.Smarterasp.net\";\n $this->username = \"9b0406_fm\";\n $this->password = \"vasusubramaniyam\";\n $this->dbname = \"db_9b0406_fm\";\n }", "function __construct(){ //fungsi yang digunakan untuk menginisialisasikan database yang digunakan\n\t\t$this->host=\"localhost\"; // variabel host diisi localhost\n\t\t$this->user=\"root\"; // variabel user diisi root\n\t\t$this->pass=\"\"; // variabel pass diisi kosong\n\t\t$this->database=\"manajemen_skripsi_prpl\"; // variabel diisi database yang digunakan yang ada dalam sever localhost yaitu manajemen_skripsi_prpl\n\t}", "function setDatabaseConnection($host,$database,$user,$pass);", "function db($host,$user,$pass) //milsoft\r\n\t\t{\r\n\t\t\t$this->$host = $this->set_host($host);\r\n\t\t\t$this->$user = $this->set_user($user);\r\n\t\t\t$this->$pass = $this->set_pass($pass);\r\n\t\t\t$this->connect();\r\n\t\t}", "function __construct(){\n\t\t\n\t\t\t$this-> host = 'localhost';\n\t\t\t$this -> user = 'root';\n\t\t\t$this -> pass = 'root';\n\t\t\t$this -> db = 'cc409_perros';\n\t\t\n\t\t}", "function __construct() {\r\n// \t\t$this->connection = mysql_connect($this->host,$this->username,$this->password,$this->dbname);\r\n// echo $this->host + \"zxdgfzxfg\";\r\n// echo \"mysql:host=\".$this->host.\";dbname=\".$this->dbname.\";charset=utf8\";\r\n// \t\t$this->connection = new PDO(\"mysql:host=\".$this->host.\";dbname=\".$this->dbname.\";charset=utf8\", $this->username, $this->password, $this->options);\r\n\t\t$this->connection = mysqli_connect($this->host,$this->username,$this->password,$this->dbname);\r\n\t}", "function __construct() {\n // We'll just hardcode this in. In a real application situation use\n // an external file\n $this->host = 'localhost';\n $this->username = 'PHPSCRIPT';\n $this->password = '1234';\n $this->dbName = 'cst8257';\n $this->port = 3306; // Default\n //$this->port = 3307; // Custom Port\n }", "function __construct()\n {\n parent::__construct(\"mysql:host=127.0.0.1;dbname=sondcatalog\",\"root\",\"\");\n $this->strmysql=\"?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?\";\n }", "public function sql_connect($host, $user, $passwd) {\n $this->con = mysql_connect($host, $user, $passwd);\n if (!$this->con) {\n echo _SERERR;\n exit(-1);\n }\n\n }", "function DB($host = 'localhost',$user = 'root',$password = '',$database = 'bbman') // PHP4 class constructor\n\t{\n\t\t$this->host = gethostbyname($host); // change hostname to an ip address\n\t\t$this->user = $user;\n\t\t$this->password = $password;\n\t\t$this->database = $database;\n\t}", "function PConnect($server_name, $user_name, $password, $database_name)\n {\n $this->connexion_ressource=mysql_pconnect($server_name, $user_name, $password);//connect\n mysql_select_db($database_name, $this->connexion_ressource);//select the db\n mysql_query ('set name utf8', $this->connexion_ressource) ;\n }", "public function __construct(){\n\n $this->conn = new PDO(\"mysql:host=\".$this->host.\";dbname=\".$this->db,$this->user,$this->pass);\n }", "public function sql_pconnect() {}", "public function sql_pconnect() {}", "function setDBHost($host,$user,$dbpwd)\n {\n $this->dbhost = $host;\n $this->dbuser = $user;\n $this->dbpwd = $dbpwd;\n }", "function dbConnect(){\n\t$host = \"localhost\"; // for uta.cloud server, \"localhost\" is the host name. Do not edit.\n\t$user = \"egsutacl_egs3925\"; // put your own user name here.\n\t$pwd = \"Es*2802*\"; // put your own database password here\n\t$database = \"egsutacl_4350\"; // put your database name here\n\t$port = \"3306\"; // server-specific. For uta.cloud, the port number is 3306 (the default port)\n\n\t/* Initiate a new mysqli object to connect to the Database. Store the mysqli object in a variable $conn. */\n\t$conn = new mysqli($host, $user, $pwd, $database, $port) or die(\"could not connect to server\");\n\n\t// return $conn to the fucntion call\n\treturn $conn;}", "function connect($tns = TNS, $usr = DB_SERVER_USERNAME, $pwd = DB_SERVER_PASSWORD,$dbName = DB_NAME) \n { \n \n\t\t\t$this->setTns($tns);\n\t\t\t$this->setUser($usr);\n\t\t\t$this->setPass($pwd);\n $this->setDb($dbName);\n \n\t\t\tif($this->conn = mysql_connect($this->tnsName ,$this->user, $this->pass)) \n {\n if(!mysql_select_db($this->dbName))\n {\n $this->connectionStatus = false;\n return;\n }\n\t\t\t\t$this->connectionStatus = true;\n\t\t\t}\n\t\t}", "function __construct($host, $name, $login, $psw)\t{\n\t\t// Connection to DB : SERVEUR / LOGIN / PASSWORD / NOM_BDD\n\t\ttry {\n\t\t\t$this->_hDb= new PDO('mysql:host='.$host.';dbname='.$name.';charset=utf8', $login, $psw);\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\terror_log(\"PDOException Connection to DB = \" . $e->getMessage());\n\t\t}\n\t}", "public function conectar()\n{\n// $host = 'localhost:c:\\Embebed21\\SOCIOS.FDB';\n$host='localhost:socioss';\n // $host = '192.168.10.201:base';\n $nombre_usuario='SYSDBA';\n $contrasenya='masterkey';\n $this->conexion = ibase_connect($host, $nombre_usuario, $contrasenya,'UTF-8') or die( ibase_errmsg() );\n}", "function sql(){\r\n\t\t$this->conn = mysql_connect($this->hostname, $this->username , $this->password);\r\n\t\tmysql_select_db($this->dbName, $this->conn);\r\n}", "private function connect() {\n $host = $this->dbConfig[$this->selected]['host'];\n $login = $this->dbConfig[$this->selected]['login'];\n $password = $this->dbConfig[$this->selected]['password'];\n $database = $this->dbConfig[$this->selected]['database'];\n try {\n $this->db = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $login, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n//\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (PDOException $e) {\n die('Could not connect to DB:' . $e);\n }\n }", "function conectarte_externo()\n{\nmysql_connect(\"www.sierrasur.gob.pe\",\"psierras_masters\",\"rumpeltinsky\") or die(\"Error:Servidor sin conexion\");\nmysql_select_db(\"psierras_usuario\") or die(\"Error:Base de datos sin conexion & No disponible\");\n}", "public function __construct($_host='localhost',$_dbname='sakila',$_username='root',$_password='')\n\t{\n\t\t\n\t\t$this->host = $_host;\n\t\t$this->dbname = $_dbname;\n\t\t$this->username = $_username;\n\t\t$this->password = $_password;\n\t\t$this->PDO_connect();\n\t}", "private function __construct()\n {\n $this->conn = new PDO(\"mysql:host={$this->host};\n dbname={$this->name}\", $this->user,$this->pass, $this->opt);\n }", "abstract protected function make_connection($host, $uid, $pwd);", "public function __construct() {\n// $this->db['server'] = $args['server'];\n// $this->db['username'] = $args['username'];\n// $this->db['password'] = $args['password'];\n// $this->db['database'] = $args['database'];\n $this->open_connection();\n }", "function __construct(){\n // se definen los datos del servidor de base de datos\n $conection['server']=\"localhost\"; //host\n $conection['user']=\"root\"; // usuario\n $conection['pass']=\"admin\"; //password\n $conection['base']=\"INNSADB\"; //base de datos\n\n // crea la conexion pasandole el servidor , usuario y clave\n $conect= mysql_connect($conection['server'],$conection['user'],$conection['pass']);\n mysql_set_charset('utf8',$conect);\n\n if ($conect) {// si la conexion fue exitosa , selecciona la base\n mysql_select_db($conection['base']);\n $this->con=$conect;\n }\n\n }", "public function __construct(){\n\t\t\n /**\n *\tFind Database and Establish connection\n */\t\t\n\t\t$this->__CON = new mysqli($this->__HOSTNAME, $this->__USERNAME , $this->__PASSWORD , $this->__DATABASE , $this->__PORT); \n /**\n *\tError Message\n */\t\n\t\tif (mysqli_connect_errno()){die(mysqli_connect_error());}\n\n}", "function Dbase_connect() {\n\tglobal $db, $db_host, $db_user, $db_password;\n\t$db=mysql_connect( $db_host, $db_user, $db_password );\n}" ]
[ "0.71092266", "0.68563044", "0.6840256", "0.68316394", "0.6827537", "0.6797902", "0.67634946", "0.6542493", "0.64751387", "0.64464164", "0.6438975", "0.6427769", "0.64230454", "0.6396987", "0.6396987", "0.6387043", "0.6379361", "0.6363363", "0.6361129", "0.63591594", "0.63556224", "0.634322", "0.63401306", "0.63342977", "0.6311421", "0.63107514", "0.63088983", "0.6308705", "0.6303746", "0.6300093" ]
0.689822
1
retrieve server timestamp for further updates.
public function retrieveServerTime(){ //http://www.thetvdb.com/api/Updates.php?type=none if(!$this->t_mirrors){ $this->retrieveMirrors; } $url = $this->t_mirrors[0].'/api/Updates.php?type=none'; //$xmlStr=$this->curl_get_file_contents($url); $c = curl_init(); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_URL, $url); $xmlStr = curl_exec($c); curl_close($c); $xmlServerTime = new SimpleXMLElement($xmlStr); return $xmlServerTime->Time; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getServerTimestamp();", "public function getTimestamp()\n {\n return $this->server['REQUEST_TIME'];\n }", "public function servertime() {\n\t\tif(is_null($this->sync))\n\t\t\t$this->synchronize();\n\t\treturn (int) (microtime(true) * 1000) + $this->sync;\n\t}", "function getUTCTimestamp() {\n\t\treturn\t$this->mServerTimestamp->getUTCTimestamp();\n\t}", "public function getUpdateTimestamp()\n {\n return $this->updateTimestamp;\n }", "public function getUpdateTs()\n {\n return $this->update_ts;\n }", "public function getUpdate_time()\r\n {\r\n return $this->update_time;\r\n }", "public function getTimestamp()\n {\n return $this->proxyBase->timestamp;\n }", "public function getTimestampUpdated()\n {\n return $this->_getData(self::TIMESTAMP_UPDATED);\n }", "public function getUpdatetime()\n {\n return $this->updateTime;\n }", "function getTimestamp() {\n return $this->time_stamp;\n }", "public function getLastUpdateTime()\n {\n return $this->last_update_time;\n }", "function getTimestamp() {\r\r\n\t\treturn $this->timestamp;\r\r\n\t}", "public function getTimestamp()\n { return $this->get('timestamp'); }", "public function getTimestamp() { \n\t\tif ($this->change) {\n\t\t\t$this->_calc();\n\t\t}\n\t\t\n\t\treturn $this->timestamp; \n\t}", "public function getTimeStamp()\n\t{\n\t\treturn $this->_current_timestamp;\n\t}", "public static function timestamp(){\n $timestamp = time();\n return $timestamp;\n }", "public function getTimeStamp() {\n return $this->timestamp;\n }", "public static function timestamp() {}", "public function getLastUpdateTime()\n\t{\n\t\treturn empty($this->lastUpdateTime) ? time() : $this->lastUpdateTime;\n\t}", "public function getTimestamp()\n\t{\n\t\treturn $this->getValue('timestamp');\n\t}", "public function getLastUpdateTime()\n {\n $time = Mage::getStoreConfig(self::XML_GEOIP_UPDATE_DB);\n if (!$time) {\n return false;\n }\n\n return date('F d, Y / h:i', $time);\n }", "public function timestamp();", "public function getUpdatedTime()\n {\n return $this->getAttribute('updatedTime');\n }", "public function getTimestamp()\r\n {\r\n return $this->_timestamp;\r\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }" ]
[ "0.8083645", "0.7416652", "0.7390121", "0.71988434", "0.71400994", "0.7135814", "0.7113937", "0.7109287", "0.7052115", "0.70433325", "0.70233834", "0.7015609", "0.70124596", "0.6988069", "0.69764644", "0.69247085", "0.68964005", "0.6883119", "0.6879705", "0.6875884", "0.6865389", "0.6861438", "0.68512493", "0.68279845", "0.68213654", "0.6820892", "0.6820892", "0.6820892", "0.6820892", "0.6820892" ]
0.77584285
1
/ Test if mirrors are up. 0 > down 1 > up params : $host : server adress, without http:// $port $timeout : ms
public function ping($host, $port, $timeout) { $tB = microtime(true); $fP = @fSockOpen($host, $port, $errno, $errstr, $timeout); if (!$fP) { return 0; } $tA = microtime(true); return 1;//just return mirror state. /* Use if multiple mirrors, and we want the best perfs. return round((($tA - $tB) * 1000), 0)." ms"; */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function testMirrors(){\n \n while(list($idx,$val)= each($this->t_mirrors)){\n\t\tif(!$this->ping(str_replace(\"http://\", \"\", $this->t_mirrors[$idx]), 80, 10)){\n unset($this->t_mirrors[$idx]);\n }else{\n $mirInUse=array();\n $mirInUse[]=$this->t_mirrors[$idx];\n $this->t_mirrors=$mirInUse;\n //var_dump($this->t_mirrors);\n return;\n }\n }\n }", "public function ping()\r\n {\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, \"http://\".WEMO_IP.\":\".WEMO_PORT);\r\n curl_setopt($ch, CURLOPT_NOBODY, true);\r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_VERBOSE, false);\r\n curl_setopt($ch, CURLOPT_TIMEOUT, 5);\r\n $result = curl_exec($ch);\r\n $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n if($httpcode >= 200 && $httpcode <500){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "private function _checkServerIsOnline($url){\n\t\treturn true;\n\t\tini_set(\"default_socket_timeout\",\"05\");\n set_time_limit(5);\n $f=fopen($url,\"r\");\n $r=fread($f,1000);\n fclose($f);\n return (strlen($r)>1) ? true : false;\n\t}", "public function checkup()\n\t{\n\t\tif(empty($this->mysqli))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$errno = mysqli_errno($this->mysqli);\n\t\t\tif($errno == 2003 || $errno == 2006 || $errno == 2013)\n\t\t\t{\n\t\t\t\t//2003:Can't connect to MySQL server on 'hostname' (4,110) (此情况一般是网络超时、数据库压力过大等导致)\n\t\t\t\t//2006:MySQL server has gone away (dbproxy在重启时可能会出现此问题,sleep 状态的链接)\n\t\t\t\t//2013:Lost connection to MySQL server during query (dbproxy在重启时可能会出现此问题,正在执行query)\n\n\t\t\t\tmysqli_close($this->mysqli);\n\t\t\t\t$this->mysqli = $this->createConnection();\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}", "function update_zmon_machine_details($game_cfg){\n global $server_cfg;\n\n $url = sprintf($server_cfg[\"update_zmon_machines\"],$game_cfg[\"zmon_url\"]);\n\n $options = array (CURLOPT_RETURNTRANSFER => true, // return web page\n CURLOPT_HEADER => false, // don't return headers\n CURLOPT_FOLLOWLOCATION => true, // follow redirects\n CURLOPT_ENCODING => \"\", // handle compressed\n CURLOPT_USERAGENT => \"zperfmon\", // who am i\n CURLOPT_AUTOREFERER => true, // set referer on redirect\n CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect\n CURLOPT_TIMEOUT => 60, // timeout on response\n CURLOPT_MAXREDIRS => 10);\n $ch = curl_init ( $url );\n curl_setopt_array ( $ch, $options );\n $content = curl_exec ( $ch );\n\n $httpCode = curl_getinfo ( $ch, CURLINFO_HTTP_CODE );\n curl_close ( $ch );\n if($httpCode!=200){\n die(\"HTTP Error Code : \".$httpCode.\"\\nCURL Error : $errmsg\\n\");\n }\n\n $content = trim($content);\n\n if($content == \"DONE\")\n return true;\n else\n return false;\n}", "public function hasMirrors() {}", "private function site_status_check() {\n\t\t$this->level = 4;\n\t\tEE::log( 'Checking and verifying site-up status. This may take some time.' );\n\t\t$httpcode = '000';\n\t\t$ch = curl_init( $this->site_name );\n\t\tcurl_setopt( $ch, CURLOPT_HEADER, true );\n\t\tcurl_setopt( $ch, CURLOPT_NOBODY, true );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );\n\t\tcurl_setopt( $ch, CURLOPT_TIMEOUT, 10 );\n\n\t\t$i = 0;\n\t\ttry {\n\t\t\twhile ( 200 !== $httpcode && 302 !== $httpcode ) {\n\t\t\t\tcurl_exec( $ch );\n\t\t\t\t$httpcode = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n\t\t\t\techo '.';\n\t\t\t\tsleep( 2 );\n\t\t\t\tif ( $i ++ > 60 ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( 200 !== $httpcode && 302 !== $httpcode ) {\n\t\t\t\tthrow new Exception( 'Problem connecting to site!' );\n\t\t\t}\n\t\t}\n\t\tcatch ( Exception $e ) {\n\t\t\t$this->catch_clean( $e );\n\t\t}\n\n\t}", "public function checkApiIsUp() {\n\t\t$result = $this->useCfCURLQuery( \"https://socket.bittrex.com/signalr/ping\" );\n\t\tif ( $result ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function ticketbud_server_connectivity_ok() {\n\t// skip the check on WPMU because the status page is hidden\n\tglobal $ticketbud_unused_api_key;\n\tif ( $ticketbud_unused_api_key )\n\t\treturn true;\n\t$servers = ticketbud_get_server_connectivity();\n\treturn !( empty($servers) || !count($servers) || count( array_filter($servers) ) < count($servers) );\n}", "function ping($host, $port, $timeout) {\r\n $tB = microtime(true);\r\n $fP = fSockOpen($host, $port, $errno, $errstr, $timeout);\r\n if (!$fP) { return \"down\"; }\r\n $tA = microtime(true);\r\n return round((($tA - $tB) * 1000), 0).\" ms\";\r\n}", "private function checkConnection()\n {\n $status = false;\n $url = 'http://' . trim($this->ip) . ':80/';\n $curlInit = curl_init($url);\n curl_setopt($curlInit, CURLOPT_CONNECTTIMEOUT, 2); //третий параметр - время ожидания ответа сервера в секундах\n curl_setopt($curlInit, CURLOPT_HEADER, true);\n curl_setopt($curlInit, CURLOPT_NOBODY, true);\n curl_setopt($curlInit, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curlInit);\n curl_close($curlInit);\n if ($response) {\n $status = true;\n }\n return $status;\n }", "function checkServers() {\n\n global $wpdb;\n $table_name = $wpdb->prefix . \"blink_servers\";\n $sql = \"SELECT *, UNIX_TIMESTAMP(now()) now FROM $table_name\";\n $servers = $wpdb->get_results($sql,ARRAY_A);\n\n // delete orphaned links from trashed posts\n $blink_links = $wpdb->prefix . \"blink_links\";\n $delete_sql = \"DELETE bl FROM $blink_links bl, $wpdb->posts p WHERE bl.pid = p.id AND p.post_status != 'publish' AND p.post_parent = 0\";\n $wpdb->query($delete_sql);\n\n // check server's status\n if (count($servers)>0) {\n foreach ($servers as $server) {\n //\t\t\t\tif(!$server['last_update']){\n //\t\t\t\t\t// unregistered\n //\t\t\t\t\t$this->regServer($server);\n //\t\t\t\t} elseif (!$server['last_successful_update']) {\n //\t\t\t\t\t// pending approval (14400 == 4hr)\n //\t\t\t\t\t$time_diff = (int)$server['now'] - (int)$server['last_update'];\n //if($time_diff > 0 ){\t$this->updateServer($server);}\n //\t\t\t\t} elseif ($server['last_update'] > $server['last_successful_update']){\n //echo 'failed';\n //\t\t\t\t\t// failed_update (3600 == 1hr)\n //\t\t\t\t\t$time_diff = (int)$server['now'] - (int)$server['last_update'];\n //if($time_diff > 0 ){\n //echo 'check 3';\n //\t\t\t\t\t\t$this->updateServer($server);\n //\t\t\t\t\t}\n //\t\t\t\t} elseif ($server['last_update'] == $server['last_successful_update']){\n //\t\t\t\t\t// successful update (601200 == 1wk)\n //\t\t\t\t\t$time_diff = (int)$server['now'] - (int)$server['last_update'];\n //if($time_diff > 0 ){\n //echo 'check 4';\n $this->updateServer($server);\n //\t\t\t\t\t}\n //\t\t\t\t}\n }\n }\n }", "public function getIsAlive() {\n $response = RiiakUtils::httpRequest('GET', RiiakUtils::buildUrl($this) . '/ping');\n return ($response != NULL) && ($response['body'] == 'OK');\n }", "public function pingUrl($url){\n\n\t\t$url = str_replace(\"https://\", \"\", str_replace(\"http://\", \"\", str_replace(\"www.\", \"\", $url)));\n\n\t\t$url_host = explode(\"/\", $url);\n\n\t\t/* Ping the host name and set the time before and after pinging to measure load time */\n\n\t\t$startTime = microtime(true) * 1000;\n\n\t\texec(\"ping -c 1 \".$url_host[0], $out);\n\n\t\t$stopTime = microtime(true) * 1000;\n\n\t\t/* If pinging is successful return the time taken for the transaction else return false */\n\n\t\tif ($out && count($out) >= 6){\n\n\t\t\treturn ($stopTime - $startTime);\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\n\t}", "function ping($host)\n{\n exec(sprintf('ping -c 1 -W 5 %s', escapeshellarg($host)), $res, $rval);\n return $rval === 0;\n}", "function isOnline()\n{\n $connected = checkdnsrr(\"google.com\");\n\n if ($connected) {\n return true;\n }\n\n return false;\n}", "function isOffline()\n{\n $connected = checkdnsrr(\"google.com\");\n\n if ($connected) {\n return false;\n }\n\n return true;\n}", "public function getStatus($host);", "public function isOnline() {}", "public function isAlive();", "public function isAlive();", "public function isOnline() \n {\n // pings example.com and google.com\n $is_conn = null;\n $connected1 = @fsockopen(\"www.example.com\", 80); //website, port (try 80 or 443)\n $connected2 = @fsockopen(\"www.google.com\", 80); //website, port (try 80 or 443)\n // if either is successful\n if ($connected1 || $connected2){\n $is_conn = true; //action when connected\n fclose($connected1);\n fclose($connected2);\n }else{\n $is_conn = false; //action in connection failure\n }\n return $is_conn;\n }", "public function LookupPing($host) {\n\t\treturn false;\n\t}", "public function pushHosts(): bool;", "public function testPingTreeUpdateTargets()\n {\n }", "public function testCheckConnections()\n {\n $result = $this->la->checkConnection();\n $this->assertTrue($result);\n }", "public static function checkConnection() {\r\n\t\t$url = MoufReflectionProxy::getLocalUrlToProject().\"src/direct/test_connection.php\";\r\n\t\r\n\t\t$response = self::performRequest($url);\r\n\t\t\r\n\t\tif ($response == 'ok') {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function get_host_status($host_data)\n{\n global $API_version;\n global $CGM_version;\n\n $arr = array ('command'=>'version','parameter'=>'');\n $version_arr = send_request_to_host($arr, $host_data);\n\n if ($version_arr)\n {\n if ($version_arr['STATUS'][0]['STATUS'] == 'S')\n {\n $API_version = $version_arr['VERSION'][0]['API'];\n $CGM_version = $version_arr['VERSION'][0]['CGMiner'];\n \n if ($API_version >= 1.0)\n return true;\n }\n }\n return false;\n}", "function is_reachable()\r\n {\r\n return $this->is_connected();\r\n }", "public function testPingTreeResetCount()\n {\n }" ]
[ "0.6826357", "0.5928999", "0.58649737", "0.5738229", "0.5660184", "0.5646346", "0.5628396", "0.561338", "0.5568853", "0.5527075", "0.5478586", "0.5417322", "0.53919184", "0.53918254", "0.53916067", "0.5382377", "0.5378665", "0.53527486", "0.53460616", "0.53422016", "0.53422016", "0.53057075", "0.52896625", "0.5281209", "0.52752125", "0.52695566", "0.52579683", "0.52121705", "0.52054", "0.52043223" ]
0.62504816
1
Make a new change model.
protected function makeChangeModel() { return new Change([ 'recorded_at' => Carbon::now(), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function makeModel()\n {\n new MakeModel($this, $this->files);\n }", "protected function createModel()\n {\n $this->call('make:model', array_filter([\n 'name' => $this->getNameInput(),\n '--factory' => $this->option('factory'),\n '--migration' => $this->option('migration'),\n ]));\n }", "public static function newModel()\n {\n $model = static::$model;\n\n return new $model;\n }", "protected function newModel(): Model\n {\n return (new $this->model)->fresh();\n }", "private function newModel(){\n\t\t$this->assign('title', 'New Model');\n\t\t$this->assign('types', $this->getModelTypes());\n\t\t$this->display('model/new.tpl');\n\t}", "public function newEntryModel();", "protected function createModel()\n {\n $this->call('wizard:model', [\n 'name' => $this->argument('name'),\n ]);\n }", "protected function getNewModel()\n {\n $modelName = $this->getModelName();\n return new $modelName;\n }", "function setMake_model($new_make_model)\n {\n $this->price = $new_make_model;\n }", "public function createModel()\n {\n }", "protected function createModel()\n {\n $model = $this->info['model'];\n\n $modelName = basename(str_replace('\\\\', '/', $model));\n\n // make it singular\n $modelName = Str::singular($modelName);\n\n $this->info['modelName'] = $modelName;\n\n $modelOptions = [\n 'model' => $this->info['model'],\n '--module' => $this->moduleName,\n ];\n $options = $this->setOptions([\n 'index',\n 'unique',\n 'data',\n 'uploads',\n 'float',\n 'bool',\n 'int',\n 'data',\n 'parent'\n ]);\n\n $this->call('engez:model', array_merge($modelOptions, $options));\n }", "abstract protected function newModel(): Model;", "public function createModel()\n\t{\n\t\treturn $this->getModelConfiguration()->createModel();\n\t}", "protected function makeModel()\n {\n return factory(Employee::class)->create();\n }", "public function change()\n {\n $this->table('change_history')\n ->setComment('数据修改记录')\n ->setEngine('InnoDB')\n ->addColumn('model_type','string', ['comment' => '数据模型类名'])\n ->addColumn('model_id', 'integer', ['comment' => '数据ID'])\n ->addColumn('before', 'text', ['comment' => '修改前内容'])\n ->addColumn('after', 'text', ['comment' => '修改后内容'])\n ->addColumn('method', 'string', ['comment' => '请求方式'])\n ->addColumn('url', 'text', ['comment' => '请求url'])\n ->addColumn('param', 'text', ['comment' => '请求参数'])\n ->addFingerPrint()\n ->create();\n }", "protected function make(): Model\n {\n $model = new $this->model;\n $this->modelPk = $model->getKeyName();\n\n return $model;\n }", "public function newModel($name)\n {\n $class = $this->getClass($name);\n return $this->_newModel($class);\n }", "public function create_model($name, $controller, $action){\n\t\t$models_dir = Kumbia::$active_models_dir;\n\t\tif(file_exists(\"$models_dir/$name.php\")){\n\t\t\tFlash::error(\"Error: El modelo '$name' ya existe\\n\");\n\t\t} else {\n\t\t\t$model_name = str_replace(\" \", \"\", ucwords(strtolower(str_replace(\"_\", \"\", $name))));\n\t\t\t$file = \"<?php\\n\t\t\t\\n\tclass $model_name extends ActiveRecord {\\n\n\t}\\n\t\\n?>\\n\";\n\t\t\tfile_put_contents(\"$models_dir/$name.php\", $file);\n\t\t\tFlash::success(\"Se cre&oacute; correctamente el modelo '$name' en models/$name.php\\n\");\n\t\t\t$model = $name;\n\t\t\trequire_once \"$models_dir/$model.php\";\n\t\t\t$objModel = str_replace(\"_\", \" \", $model);\n\t\t\t$objModel = ucwords($objModel);\n\t\t\t$objModel = str_replace(\" \", \"\", $objModel);\n\t\t\tif(!class_exists($objModel)){\n\t\t\t\tthrow new BuilderControllerException(\"No se encontr&oacute; la Clase \\\"$objModel\\\" Es necesario definir una clase en el modelo\n\t\t\t\t\t\t\t'$model' llamado '$objModel' para que esto funcione correctamente.\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tKumbia::$models[$objModel] = new $objModel($model, false);\n\t\t\t\tKumbia::$models[$objModel]->source = $model;\n\t\t\t}\n\t\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t\t}\n\t}", "public function creating($model)\n\t{\n\t}", "public function make($modelClass);", "public function makeModel()\n {\n return $this->model;\n }", "public function change(): void\n {\n $leads = $this->table('leads');\n $leads->addColumn('id_proyecto', 'integer')\n ->addColumn('status', 'integer')\n ->addColumn('comentarios', 'text')\n ->addColumn('created_at', 'timestamp')\n ->addColumn('updated_at', 'timestamp')\n ->addForeignKey('id_proyecto', 'proyectos', 'id', ['delete' => 'NO_ACTION', 'update' => 'NO_ACTION'])\n ->create();\n\n $datos = $this->table('datos');\n $datos->addColumn('id_lead', 'integer')\n ->addColumn('campo', 'string', ['limit' => 250])\n ->addColumn('valor', 'string', ['limit' => 250])\n ->addColumn('created_at', 'timestamp')\n ->addColumn('updated_at', 'timestamp')\n ->addForeignKey('id_lead', 'leads', 'id', ['delete' => 'CASCADE', 'update' => 'CASCADE'])\n ->create();\n }", "function createModel($name, array $conf);", "public function getNewModel( array $attributes = array() ) {\n\t\treturn $this->model->newInstance( $attributes );\n\t}", "protected function setModel()\n {\n $class = 'Src\\Modules\\\\' . $this->module_name . '\\Models\\\\' . $this->class . 'Model';\n $this->model = new $class;\n $this->model->setModuleName( $this->module_name );\n $this->model->run();\n }", "public function getNewModel()\n {\n return parent::getNewModel();\n }", "function create($model)\n {\n }", "public function createModel()\n\t{\n\t\t$class = '\\\\'.ltrim($this->model, '\\\\');\n\t\treturn new $class;\n\t}", "public function change()\n {\n $table = $this->table('companies');\n $table->addColumn('name', 'string', [\n 'limit' => 255\n ]);\n\n $table->addColumn('fantasy', 'string', [\n 'limit' => 255\n ]);\n\n $table->addColumn('address', 'string', [\n 'limit' => 255\n ]);\n\n $table->addColumn('city', 'string', [\n 'limit' => 45\n ]);\n\n $table->addColumn('state', 'string', [\n 'limit' => 45\n ]);\n\n $table->addColumn('zipcode', 'string', [\n 'limit' => 8\n ]);\n\n $table->addColumn('cnpj', 'string', [\n 'limit' => 14\n ]);\n\n $table->addColumn('cpf', 'string', [\n 'limit' => 11\n ]);\n\n $table->addColumn('state_registration', 'string', [\n 'limit' => 12\n ]);\n\n $table->addColumn('logo', 'string', [\n 'limit' => 255\n ]);\n\n $table->addColumn('status', 'integer', [\n 'default' => 1\n ]);\n\n $table->addColumn('email', 'string', [\n 'limit' => 80\n ]);\n\n $table->addColumn('people_id', 'integer');\n $table->addForeignKey('people_id', 'peoples','id');\n\n $table->addColumn('created', 'datetime');\n $table->addColumn('modified', 'datetime');\n $table->create();\n }", "public function change()\n {\n $table = $this->table('cotation_product_items');\n $table->addColumn('cotation_product_id', 'integer', [\n 'default' => null,\n 'null' => false,\n 'limit' => 11,\n ]);\n $table->addForeignKey('cotation_product_id', 'cotation_products', 'id');\n $table->addColumn('item_name', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n ]);\n $table->addColumn('quantity', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]);\n $table->addColumn('quote', 'float', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('manufacturer', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n ]);\n $table->addColumn('model', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n ]);\n $table->addColumn('sku', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n $table->create();\n }" ]
[ "0.7015311", "0.6959926", "0.66230065", "0.6453481", "0.63983315", "0.6353436", "0.6351739", "0.63483256", "0.63456106", "0.6329074", "0.6309134", "0.6198854", "0.6191518", "0.6168604", "0.61266106", "0.6106725", "0.6032546", "0.6018646", "0.5982048", "0.5936128", "0.59248096", "0.5872585", "0.58716625", "0.5855022", "0.5846818", "0.58389866", "0.5835821", "0.5820794", "0.5799436", "0.57976735" ]
0.7168489
0
Required. The Challenge to be created. Currently this field can be empty as all the Challenge fields are set by the server. Generated from protobuf field .google.cloud.confidentialcomputing.v1.Challenge challenge = 2 [(.google.api.field_behavior) = REQUIRED];
public function getChallenge() { return $this->challenge; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setChallenge($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\ConfidentialComputing\\V1\\Challenge::class);\n $this->challenge = $var;\n\n return $this;\n }", "public function getChallenge()\n\t{\n\t}", "public function testCreateChallenge()\n {\n }", "public function getChallengeType()\n {\n return $this->challengeType;\n }", "public function getChallengeDesc()\n {\n return $this->challengeDesc;\n }", "public function addChallenge(Challenge $challenge)\n {\n $this->challenges[] = $challenge;\n }", "function sendChallenge($data) {\n $ChallengeData = createChallengeDataObj();\n $challengeID = $ChallengeData->createChallenge($data);\n if($challengeID) {\n return array(\"challengeID\" => $challengeID);\n }else {\n return array(\"challengeID\" => \"error\");\n }\n }", "public function getChallenge()\n {\n if (empty($this->_challenge))\n {\n $output = $this->postRequest(\n 'identification/securitytoken/challenge',\n [\n 'useEasyLogin' => false,\n 'generateEasyLoginId' => false,\n 'userId' => $this->_username,\n ]\n );\n\n if (!isset($output->links->next->uri))\n throw new Exception('Cannot fetch control number. Check if the username is correct.', 10);\n\n $this->_challenge = $output->challenge;\n $this->_useOneTimePassword = (bool)$output->useOneTimePassword;\n }\n\n return $this->_challenge;\n }", "public function challenge($challenge_id = null){\n\t\t//TODO: Important! I think that we have security issue here – teacher should not have ability to\n\t //edit challenges which are created by other users.\n\n\t //If parametes are sent as POST data, repack them as GET data\n $uri = Mapper_Helper::create_uri_segments();\n if ($uri !== null) {\n redirect('question/challenge/'.$challenge_id.'/' . $uri);\n }\n\n $this->mapperlib->set_default_base_page('question/challenge/'.$challenge_id);\n $this->mapperlib->set_breaking_segment(4);\n\n $data = new stdClass();\n $this->challenge_question_model->setChallenge_id($challenge_id);\n\n $data->challange_id = $challenge_id;\n\t $data->challenge = $this->challenge_model->getChallengeById($challenge_id);\n\n $challengeQuestions = $this->challenge_question_model->getList();\n $questionIds = array();\n foreach ($challengeQuestions as $cq) {\n /** @var $cq PropChallengeQuestion */\n $questionIds[] = $cq->getQuestionId();\n }\n\n /**\n * Nem's hack - this should be moved to question_model once\n */\n $questions = PropQuestionQuery::create()\n ->filterByQuestionId($questionIds)\n ->filterByIsDeleted(PropQuestionPeer::IS_DELETED_NO)\n ->find();\n\n $data->questions = array();\n\n foreach($questions as $k => $question){\n $data->questions[$k]['question_name'] = $question->getText();\n $question_id = $question->getQuestionId();\n $data->questions[$k]['question_id'] = $question_id;\n $data->questions[$k]['question_type'] = $this->challenge_questionlib->get_question_type($question_id);\n $data->questions[$k]['question_image'] = $this->challenge_questionlib->get_question_image_type($question_id);\n\n $question_data = $this->get_question_details($question_id);\n $data->questions[$k]['data'] = $question_data;\n }\n\n $data->content = $this->prepareView('x_challenge_question', 'home_challenge_question', $data);\n $this->load->view(config_item('teacher_template'), $data);\n }", "function newChallenge(&$challenge) {\n\t\t// reset record list ...\n\t\t$this->server->records->clear();\n\n\t\t// reset player votings ...\n\t\t$this->server->players->resetVotings();\n\n\t\t// create new challenge object ...\n\t\t$challenge_item = new Challenge($challenge);\n\n\t\t// display console message ...\n\t\t$this->console('map changed [{1}] >> [{2}]',\n\t\t\tstripColors($this->server->challenge->name),\n\t\t\tstripColors($challenge_item->name));\n\n\t\t// update the field which contains current challenge ...\n\t\t$this->server->challenge = $challenge_item;\n\n\t\t// release a 'new challenge' event ...\n\t\t$this->releaseEvent('onNewChallenge', $challenge_item);\n\t}", "public function generateChallenge()\n {\n // Easy\n if (Captcha::$config['complexity'] < 4) {\n $numbers[] = mt_rand(1, 5);\n $numbers[] = mt_rand(1, 4);\n }\n // Normal\n elseif (Captcha::$config['complexity'] < 7) {\n $numbers[] = mt_rand(10, 20);\n $numbers[] = mt_rand(1, 10);\n }\n // Difficult, well, not really ;)\n else {\n $numbers[] = mt_rand(100, 200);\n $numbers[] = mt_rand(10, 20);\n $numbers[] = mt_rand(1, 10);\n }\n\n // Store the question for output\n $this->mathExercise = implode(' + ', $numbers) . ' = ';\n\n // Return the answer\n $this->response = array_sum($numbers);\n\n return $this->response;\n }", "public function setChallengeDesc($challengeDesc)\n {\n $this->challengeDesc = $challengeDesc;\n\n return $this;\n }", "private function getChallengeData(): array {\n return [\n 'token' => env( 'VERIFICATION_TOKEN' ),\n 'challenge' => \"3eZbrw1aBm2rZgRNFdxV2595E9CY3gmdALWMmHkvFXO7tYXAYM8P\",\n 'type' => \"url_verification\"\n ];\n }", "public function testCreateChallengeTemplate()\n {\n }", "public function testUpdateChallenge()\n {\n }", "public function getInvalidChallengeResponse()\n {\n $result['responseCode'] = self::RESPONSE_INVALID_CHALLENGE;\n return $result;\n }", "public function setChallengeType($challengeType)\n {\n $this->challengeType = $challengeType;\n\n return $this;\n }", "public function getNamaChallenge();", "public function getChallenges(): array\n {\n return $this->challenges;\n }", "public function setChallengeResponse($challengeResponse)\n {\n $this->_challengeResponse = $challengeResponse;\n }", "protected static function generate_challenge()\r\n {\r\n // Complexity setting is used as character count\r\n static::$response = static::random(\\max(1, static::$config['complexity']));\r\n \\Session::instance()->set(static::$sessionname, array('code' => static::$response, 'time' => \\TIME));\r\n }", "public function create()\n\t{\n\t\t//Breadcrumbs::addCrumb('Add Challenge', route('challenges.create'));\n\t\tView::share('title', 'Add Challenge');\n\t\treturn View::make('challenges.create');\n\t}", "protected function challengePrepare()\r\n {\r\n $this->request('getchallenge');\r\n if (xmlrpc_is_fault($this->response)) {\r\n return false;\r\n } else {\r\n $this->data['auth_challenge'] = $this->response['challenge'];\r\n $this->data['auth_response'] = md5(\r\n $this->data['auth_challenge'] . $this->passwordHash\r\n );\r\n return true;\r\n }\r\n }", "public function create()\n {\n return view('challenge.create');\n }", "public function store(Requests\\NewChallenge $request)\n {\n \n if (Auth::check()) {\n $challenge = Challenge::create([\n 'description'=>$request->description, \n 'name'=>$request->name,\n 'start_date' => $request->start_date,\n 'end_date' => $request->end_date,\n 'owner_id' => \\Auth::user()->id\n ]);\n\n if (Challenge::find($challenge->id)){\n\t\t\t\t$challenge->users()->attach( \\Auth::user()->id );\n\t\t\t\t//to remove:\n\t\t\t\t//$challenge->users()->detach(id);\n\t\t\t\t//all users:\n\t\t\t\t//$challenge->users()->detach();\n\t\t\t\t$challenge->save();\n \tprint \"success\";\n }\n return redirect('/challenges');\n }else{\n return redirect('/');\n }\n }", "public function generate_challenge() {\n\t\t// Load words from the current language and randomize them\n\t\t$words = Eight::lang('captcha.words');\n\t\tshuffle($words);\n\n\t\t// Loop over each word...\n\t\tforeach($words as $word) {\n\t\t\t// ...until we find one of the desired length\n\t\t\tif(abs(Captcha::$config['complexity'] - strlen($word)) < 2)\n\t\t\t\treturn strtoupper($word);\n\t\t}\n\n\t\t// Return any random word as final fallback\n\t\treturn strtoupper($words[array_rand($words)]);\n\t}", "public function getHttpChallenge()\n {\n foreach ($this->getChallenges() as $challenge) {\n if ($challenge->getType() == Client::VALIDATION_HTTP) {\n return $challenge;\n }\n }\n\n return false;\n }", "public function create()\n {\n\t\t$user = User::findOrFail(\\Auth::user()->id);\n return view('challenge.create', compact('user') );\n }", "public function showCreateChallenge()\r\n {\r\n $tags = tags::pluck('id','title')->toArray();\r\n return view('sih_my_account.create_challenge', compact('tags'));\r\n }", "public static function checkuchallenge($user_id, $challenge_id)\n {\n\t\t$user_challenge = UserChallenge::find('one', array('conditions' => array('user_id=? AND challenge_id=?', $user_id, $challenge_id)));\n\n\t\treturn $user_challenge;\n }" ]
[ "0.82951576", "0.637557", "0.61710757", "0.61322165", "0.6096772", "0.5872053", "0.5857091", "0.58466613", "0.5785124", "0.5718113", "0.56838965", "0.5651483", "0.55691576", "0.55488986", "0.5545424", "0.55168587", "0.5505987", "0.543732", "0.5369216", "0.5234818", "0.52199787", "0.5214126", "0.5210748", "0.5187573", "0.5156368", "0.5136343", "0.51121485", "0.5028197", "0.5020473", "0.5005093" ]
0.68474406
1
Required. The Challenge to be created. Currently this field can be empty as all the Challenge fields are set by the server. Generated from protobuf field .google.cloud.confidentialcomputing.v1.Challenge challenge = 2 [(.google.api.field_behavior) = REQUIRED];
public function setChallenge($var) { GPBUtil::checkMessage($var, \Google\Cloud\ConfidentialComputing\V1\Challenge::class); $this->challenge = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChallenge()\n {\n return $this->challenge;\n }", "public function getChallenge()\n\t{\n\t}", "public function testCreateChallenge()\n {\n }", "public function getChallengeType()\n {\n return $this->challengeType;\n }", "public function getChallengeDesc()\n {\n return $this->challengeDesc;\n }", "public function addChallenge(Challenge $challenge)\n {\n $this->challenges[] = $challenge;\n }", "function sendChallenge($data) {\n $ChallengeData = createChallengeDataObj();\n $challengeID = $ChallengeData->createChallenge($data);\n if($challengeID) {\n return array(\"challengeID\" => $challengeID);\n }else {\n return array(\"challengeID\" => \"error\");\n }\n }", "public function getChallenge()\n {\n if (empty($this->_challenge))\n {\n $output = $this->postRequest(\n 'identification/securitytoken/challenge',\n [\n 'useEasyLogin' => false,\n 'generateEasyLoginId' => false,\n 'userId' => $this->_username,\n ]\n );\n\n if (!isset($output->links->next->uri))\n throw new Exception('Cannot fetch control number. Check if the username is correct.', 10);\n\n $this->_challenge = $output->challenge;\n $this->_useOneTimePassword = (bool)$output->useOneTimePassword;\n }\n\n return $this->_challenge;\n }", "public function challenge($challenge_id = null){\n\t\t//TODO: Important! I think that we have security issue here – teacher should not have ability to\n\t //edit challenges which are created by other users.\n\n\t //If parametes are sent as POST data, repack them as GET data\n $uri = Mapper_Helper::create_uri_segments();\n if ($uri !== null) {\n redirect('question/challenge/'.$challenge_id.'/' . $uri);\n }\n\n $this->mapperlib->set_default_base_page('question/challenge/'.$challenge_id);\n $this->mapperlib->set_breaking_segment(4);\n\n $data = new stdClass();\n $this->challenge_question_model->setChallenge_id($challenge_id);\n\n $data->challange_id = $challenge_id;\n\t $data->challenge = $this->challenge_model->getChallengeById($challenge_id);\n\n $challengeQuestions = $this->challenge_question_model->getList();\n $questionIds = array();\n foreach ($challengeQuestions as $cq) {\n /** @var $cq PropChallengeQuestion */\n $questionIds[] = $cq->getQuestionId();\n }\n\n /**\n * Nem's hack - this should be moved to question_model once\n */\n $questions = PropQuestionQuery::create()\n ->filterByQuestionId($questionIds)\n ->filterByIsDeleted(PropQuestionPeer::IS_DELETED_NO)\n ->find();\n\n $data->questions = array();\n\n foreach($questions as $k => $question){\n $data->questions[$k]['question_name'] = $question->getText();\n $question_id = $question->getQuestionId();\n $data->questions[$k]['question_id'] = $question_id;\n $data->questions[$k]['question_type'] = $this->challenge_questionlib->get_question_type($question_id);\n $data->questions[$k]['question_image'] = $this->challenge_questionlib->get_question_image_type($question_id);\n\n $question_data = $this->get_question_details($question_id);\n $data->questions[$k]['data'] = $question_data;\n }\n\n $data->content = $this->prepareView('x_challenge_question', 'home_challenge_question', $data);\n $this->load->view(config_item('teacher_template'), $data);\n }", "function newChallenge(&$challenge) {\n\t\t// reset record list ...\n\t\t$this->server->records->clear();\n\n\t\t// reset player votings ...\n\t\t$this->server->players->resetVotings();\n\n\t\t// create new challenge object ...\n\t\t$challenge_item = new Challenge($challenge);\n\n\t\t// display console message ...\n\t\t$this->console('map changed [{1}] >> [{2}]',\n\t\t\tstripColors($this->server->challenge->name),\n\t\t\tstripColors($challenge_item->name));\n\n\t\t// update the field which contains current challenge ...\n\t\t$this->server->challenge = $challenge_item;\n\n\t\t// release a 'new challenge' event ...\n\t\t$this->releaseEvent('onNewChallenge', $challenge_item);\n\t}", "public function generateChallenge()\n {\n // Easy\n if (Captcha::$config['complexity'] < 4) {\n $numbers[] = mt_rand(1, 5);\n $numbers[] = mt_rand(1, 4);\n }\n // Normal\n elseif (Captcha::$config['complexity'] < 7) {\n $numbers[] = mt_rand(10, 20);\n $numbers[] = mt_rand(1, 10);\n }\n // Difficult, well, not really ;)\n else {\n $numbers[] = mt_rand(100, 200);\n $numbers[] = mt_rand(10, 20);\n $numbers[] = mt_rand(1, 10);\n }\n\n // Store the question for output\n $this->mathExercise = implode(' + ', $numbers) . ' = ';\n\n // Return the answer\n $this->response = array_sum($numbers);\n\n return $this->response;\n }", "public function setChallengeDesc($challengeDesc)\n {\n $this->challengeDesc = $challengeDesc;\n\n return $this;\n }", "private function getChallengeData(): array {\n return [\n 'token' => env( 'VERIFICATION_TOKEN' ),\n 'challenge' => \"3eZbrw1aBm2rZgRNFdxV2595E9CY3gmdALWMmHkvFXO7tYXAYM8P\",\n 'type' => \"url_verification\"\n ];\n }", "public function testCreateChallengeTemplate()\n {\n }", "public function testUpdateChallenge()\n {\n }", "public function getInvalidChallengeResponse()\n {\n $result['responseCode'] = self::RESPONSE_INVALID_CHALLENGE;\n return $result;\n }", "public function setChallengeType($challengeType)\n {\n $this->challengeType = $challengeType;\n\n return $this;\n }", "public function getNamaChallenge();", "public function getChallenges(): array\n {\n return $this->challenges;\n }", "public function setChallengeResponse($challengeResponse)\n {\n $this->_challengeResponse = $challengeResponse;\n }", "protected static function generate_challenge()\r\n {\r\n // Complexity setting is used as character count\r\n static::$response = static::random(\\max(1, static::$config['complexity']));\r\n \\Session::instance()->set(static::$sessionname, array('code' => static::$response, 'time' => \\TIME));\r\n }", "public function create()\n\t{\n\t\t//Breadcrumbs::addCrumb('Add Challenge', route('challenges.create'));\n\t\tView::share('title', 'Add Challenge');\n\t\treturn View::make('challenges.create');\n\t}", "protected function challengePrepare()\r\n {\r\n $this->request('getchallenge');\r\n if (xmlrpc_is_fault($this->response)) {\r\n return false;\r\n } else {\r\n $this->data['auth_challenge'] = $this->response['challenge'];\r\n $this->data['auth_response'] = md5(\r\n $this->data['auth_challenge'] . $this->passwordHash\r\n );\r\n return true;\r\n }\r\n }", "public function create()\n {\n return view('challenge.create');\n }", "public function store(Requests\\NewChallenge $request)\n {\n \n if (Auth::check()) {\n $challenge = Challenge::create([\n 'description'=>$request->description, \n 'name'=>$request->name,\n 'start_date' => $request->start_date,\n 'end_date' => $request->end_date,\n 'owner_id' => \\Auth::user()->id\n ]);\n\n if (Challenge::find($challenge->id)){\n\t\t\t\t$challenge->users()->attach( \\Auth::user()->id );\n\t\t\t\t//to remove:\n\t\t\t\t//$challenge->users()->detach(id);\n\t\t\t\t//all users:\n\t\t\t\t//$challenge->users()->detach();\n\t\t\t\t$challenge->save();\n \tprint \"success\";\n }\n return redirect('/challenges');\n }else{\n return redirect('/');\n }\n }", "public function generate_challenge() {\n\t\t// Load words from the current language and randomize them\n\t\t$words = Eight::lang('captcha.words');\n\t\tshuffle($words);\n\n\t\t// Loop over each word...\n\t\tforeach($words as $word) {\n\t\t\t// ...until we find one of the desired length\n\t\t\tif(abs(Captcha::$config['complexity'] - strlen($word)) < 2)\n\t\t\t\treturn strtoupper($word);\n\t\t}\n\n\t\t// Return any random word as final fallback\n\t\treturn strtoupper($words[array_rand($words)]);\n\t}", "public function getHttpChallenge()\n {\n foreach ($this->getChallenges() as $challenge) {\n if ($challenge->getType() == Client::VALIDATION_HTTP) {\n return $challenge;\n }\n }\n\n return false;\n }", "public function create()\n {\n\t\t$user = User::findOrFail(\\Auth::user()->id);\n return view('challenge.create', compact('user') );\n }", "public function showCreateChallenge()\r\n {\r\n $tags = tags::pluck('id','title')->toArray();\r\n return view('sih_my_account.create_challenge', compact('tags'));\r\n }", "public static function checkuchallenge($user_id, $challenge_id)\n {\n\t\t$user_challenge = UserChallenge::find('one', array('conditions' => array('user_id=? AND challenge_id=?', $user_id, $challenge_id)));\n\n\t\treturn $user_challenge;\n }" ]
[ "0.6847814", "0.63765246", "0.61719203", "0.61321056", "0.60971135", "0.5871734", "0.58568376", "0.58467454", "0.5785025", "0.5718659", "0.5683063", "0.5652916", "0.55694854", "0.5549106", "0.55468005", "0.5517524", "0.55059373", "0.5437075", "0.53689975", "0.5235044", "0.5219532", "0.52138567", "0.5211088", "0.51874804", "0.51552284", "0.513518", "0.51137835", "0.5027977", "0.5020193", "0.5006715" ]
0.8294287
0
Static function. Given a document fields link primary key will create a DocumentFieldLink object and populate it with the corresponding database values
function & get($iDocumentFieldLinkID) { global $default, $lang_err_doc_not_exist; $sql = $default->db; $sql->query(array("SELECT * FROM " . $default->document_fields_link_table . " WHERE id = ?", $iDocumentFieldLinkID));/*ok*/ if ($sql->next_record()) { $oDocumentFieldLink = & new DocumentFieldLink($sql->f("document_id"), $sql->f("document_field_id"), $sql->f("value")); $oDocumentFieldLink->iId = $iDocumentFieldLinkID; return $oDocumentFieldLink; } $_SESSION["errorMessage"] = $lang_err_object_not_exist . "id = " . $iDocumentID . " table = $default->document_fields_link_table"; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function & get($iDocumentTypeFieldLinkID) {\n\t\tglobal $default;\n\t\t$sql = $default->db;\n\t\t$sql->query(array(\"SELECT * FROM \" . $default->document_type_fields_table . \" WHERE id = ?\", $iDocumentTypeFieldLinkID));/*ok*/\n\t\tif ($sql->next_record()) {\t\t\t\n\t\t\t$oDocumentTypeFieldLink = & new DocumentTypeFieldLink($sql->f(\"document_type_id\"), $sql->f(\"field_id\"), $sql->f(\"is_mandatory\"));\t\t\n\t\t\t$oDocumentTypeFieldLink->iId = $iDocumentTypeFieldLinkID;\n\t\t\treturn $oDocumentTypeFieldLink;\n\t\t}\n\t\treturn false;\t\t\n\t}", "function & documenttypefieldlinkCreateFromArray($aParameters) {\n\t$oDocTypeField = & new DocumentTypeFieldLink($aParameters[0], $aParameters[1], $aParameters[2], $aParameters[3], $aParameters[4], $aParameters[5], $aParameters[6], $aParameters[7], $aParameters[8], $aParameters[9], $aParameters[10]);\n\treturn $oDocTypeField;\n}", "protected function document_link($key, $value, $template)\n {\n $documentCategory = $this->getDocumentCategory($key);\n\n foreach ($value as $index => $field) {\n if ($documentCategory) {\n $documentTitle = getVal($field, ['document_title']);\n $documentUrl = getVal($field, ['document_url']);\n $documentId = getVal($field, ['document_link_id']);\n\n if ($documentTitle != \"\" || $documentUrl != \"\" || $documentId != \"\") {\n $this->mappedData['document_link'][$this->index] = $template;\n\n if ($documentId != \"\") {\n $this->mappedData['document_link'][$this->index]['id'] = $documentId;\n }\n\n $this->mappedData['document_link'][$this->index]['url'] = $documentUrl;\n $this->mappedData['document_link'][$this->index]['title'][0]['narrative'][0] = ['narrative' => $documentTitle, 'language' => ''];\n $this->mappedData['document_link'][$this->index]['category'][0]['code'] = $documentCategory;\n $this->mappedData['document_link'][$this->index]['format'] = self::DOCUMENT_FORMAT;\n ($documentId != \"\") ?: $this->mappedData['document_link'][$this->index]['document_date'][0]['date'] = date('Y-m-d');\n $this->index ++;\n }\n }\n }\n }", "public function setByKey($field, $key)\n {\n \n if (isset(static::$links[$field])) {\n \n $this->data[$field] = $this->orm->getIdByKey(\n SFormatStrings::subToCamelCase(static::$links[$field]),\n $key\n );\n \n } else {\n throw new LibDb_Exception('Invalid Route '.$field);\n }\n \n }", "protected function getLinkAttributeFieldDefinitions() {}", "protected function getLinkAttributeFieldDefinitions() {}", "function pre_load_reference($field_key, $field_name, $post_id)\n {\n }", "public function delegateAddField(&$primary_key_processed_by_extension, DbalSchema $dbal_schema, $drupal_table_name, $field_name, array $drupal_field_specs, array $keys_new_specs, array $dbal_column_options);", "public static function addDocumentToBinder($docId)\n {\n $document = Documents::model()->findByPk($docId);\n if ($document) {\n $year = substr($document->Created, 0, 4);\n Storages::createProjectStorages($document->Project_ID, $year);\n $subsectionId = 0;\n if ($document->Document_Type == Documents::PM) {\n $payment = Payments::model()->findByAttributes(array(\n 'Document_ID' => $docId,\n ));\n $year = substr($payment->Payment_Check_Date, 0, 4);\n $subsectionId = Sections::createLogBinder($document->Project_ID, $document->Document_Type, $year);\n } elseif ($document->Document_Type == Documents::PO) {\n $po = Pos::model()->findByAttributes(array(\n 'Document_ID' => $docId,\n ));\n $year = substr($po->PO_Date, 0, 4);\n $subsectionId = Sections::createLogBinder($document->Project_ID, $document->Document_Type, $year);\n if ($po->PO_Backup_Document_ID != 0) {\n $bu = LibraryDocs::model()->findByAttributes(array(\n 'Document_ID' => $po->PO_Backup_Document_ID,\n 'Subsection_ID' => $subsectionId,\n ));\n if (!$bu) {\n $libDoc = new LibraryDocs();\n $libDoc->Document_ID = $po->PO_Backup_Document_ID;\n $libDoc->Subsection_ID = $subsectionId;\n $libDoc->Access_Type = Storages::HAS_ACCESS;\n $libDoc->Sort_Numb = 0;\n if ($libDoc->validate()) {\n $libDoc->save();\n }\n }\n }\n }\n\n $libDoc = LibraryDocs::model()->findByAttributes(array(\n 'Document_ID' => $docId,\n 'Subsection_ID' => $subsectionId,\n ));\n\n if (!$libDoc) {\n $libDoc = new LibraryDocs();\n $libDoc->Document_ID = $docId;\n $libDoc->Subsection_ID = $subsectionId;\n $libDoc->Access_Type = Storages::HAS_ACCESS;\n $libDoc->Sort_Numb = 0;\n if ($libDoc->validate()) {\n $libDoc->save();\n }\n }\n\n LibraryDocs::sortDocumentsInSubsection($subsectionId);\n }\n }", "function getKeyField() \n {\n return \"navbarlink_textKey\";\n }", "protected function _createKey() {\n return new PapayaDatabaseRecordKeyFields(\n $this,\n $this->_tableName,\n array('source_id', 'target_id')\n );\n }", "function __createDocId() {\n\t\treturn $this->model->alias . '_' . $this->model->id;\n\t}", "function getByFieldAndTypeIDs($iDocTypeID, $iDocFieldID) {\n\t \tglobal $default;\n\t\t$sql = $default->db;\n\t\t$sQuery = \"SELECT id FROM $default->document_type_fields_table WHERE field_id = ? AND document_type_id = ?\";/*ok*/\n $aParams = array($iDocFieldID, $iDocTypeID);\n\t\t$result = $sql->query(array($sQuery, $aParams));\n\t\tif ($result) {\n\t\t\tif ($sql->next_record()) {\n\t\t\t\treturn DocumentTypeFieldLink::get($sql->f(\"id\"));\n\t\t\t} else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function addLinkToField($fieldName,$renderClass=\"\"){\r\n\t\t$this->fieldsToLink[$fieldName]=$renderClass;\r\n\t}", "public static function form_linkfield($message_id, $fieldname, $article_id, $clang_id, $readonly = false): void\n {\n if (!in_array($clang_id, rex_clang::getAllIds(), true)) {\n $clang_id = rex_clang::getStartId();\n }\n echo '<dl class=\"rex-form-group form-group\" id=\"LINK_'. $fieldname .'\">';\n echo '<dt><label>' . rex_i18n::msg($message_id) . '</label></dt>';\n echo '<dd><div class=\"input-group\">';\n $article = rex_article::get($article_id, $clang_id);\n $article_name = $article instanceof rex_article ? $article->getValue('name') .'['. $article_id .']' : '';\n echo '<input class=\"form-control\" type=\"text\" name=\"REX_LINK_NAME[' . $fieldname . ']\" value=\"' . $article_name .'\" id=\"REX_LINK_' . $fieldname . '_NAME\" readonly=\"readonly\">';\n echo '<input type=\"hidden\" name=\"REX_INPUT_LINK[' . $fieldname . ']\" id=\"REX_LINK_' . $fieldname . '\" value=\"' . $article_id . '\">';\n echo '<span class=\"input-group-btn\">';\n if (!$readonly) {\n $js_onclick_open = \"openLinkMap('REX_LINK_\" . $fieldname . \"', '&category_id=\" . $article_id . '&clang=' . $clang_id . \"');return false;\";\n echo '<a href=\"#\" class=\"btn btn-popup\" onclick=\"' . $js_onclick_open . '\" title=\"' . rex_i18n::msg('var_link_open') . '\"><i class=\"rex-icon rex-icon-open-linkmap\"></i></a>';\n $js_onclick_delete = \"deleteREXLink('\" . $fieldname . \"');return false;\";\n echo '<a href=\"#\" class=\"btn btn-popup\" onclick=\"' . $js_onclick_delete . '\" title=\"' . rex_i18n::msg('var_link_delete') . '\"><i class=\"rex-icon rex-icon-delete-link\"></i></a>';\n }\n echo '</span>';\n echo '</div><div class=\"rex-js-media-preview\"></div></dd>';\n echo '</dl>';\n }", "function setDocumentFieldID($iNewVale) {\n\t\t$this->iDocumentFieldID = $iNewValue;\n\t}", "static public function createLink($data = [])\n\t{\n\t\t$link = new Link;\n\n\t\t// set the link fields\n\t\t$link->object_id = $data['object_id'];\n\t\t$link->object_type = $data['object_type'];\n\t\t$link->link_type = $data['link_type'];\n\t\t$link->link = $data['link'];\n\n\t\t// save the record to the DB\n\t\t$link->save();\n\n\t\t// return the new DB records id\n\t\treturn $link;\n\t}", "function copyto($key) {\n\t\t$var=&\\Base::instance()->ref($key);\n\t\tforeach ($this->document as $key=>$field)\n\t\t\t$var[$key]=$field;\n\t}", "public function delegateAddPrimaryKey(DbalSchema $dbal_schema, $table_full_name, $drupal_table_name, array $drupal_field_specs);", "function wp_add_fields_to_navigation_fallback_embedded_links($schema)\n {\n }", "public function getIDFieldName() {\n\t\treturn 'linkID';\n\t}", "abstract protected function createFields();", "public function __construct(string $link, string $link_title)\n {\n //\n $this->fields = [\n 'link' => $link,\n 'link_title' => $link_title,\n ];\n }", "public function renderLinkAttributeFields() {}", "public function renderLinkAttributeFields() {}", "function create_field($field)\t{\n\t\t// vars\n $field['value'] = (array) $field['value'];\n\n\t\t$target = isset($field['value']['target']) ? $field['value']['target'] : ( isset($field['default_target']) ? $field['default_target'] : '_self');\n $class = isset($field['value']['class']) ? $field['value']['class'] : '';\n \n\t\t// html\n ?>\n <div class=\"acf-link-field-primary-row\">\n <label class=\"inline\"><?php _e('Text'); ?>:</label>\n <input type=\"text\" name=\"<?php echo $field['name']; ?>[text]\" value=\"<?php echo $field['value']['text']; ?>\" />\n\n <label class=\"inline\"><?php _e('URL'); ?>:</label>\n <input type=\"text\" name=\"<?php echo $field['name']; ?>[url]\" value=\"<?php echo $field['value']['url']; ?>\" />\n </div>\n\n <?php if( $field['show_title'] || $field['show_target'] || count($field['classes']) ): ?>\n <div class=\"acf-link-field-secondary-row\">\n <?php if( $field['show_title']): ?>\n <label class=\"inline\">Title Attribute</label>\n <input type=\"text\" name=\"<?php echo $field['name']; ?>[title]\" value=\"<?php echo $field['value']['title']; ?>\" />\n <?php endif; ?>\n\n <?php if( $field['show_target']): ?>\n <label class=\"inline\"><?php _e('Target'); ?></label>\n <select name=\"<?php echo $field['name']; ?>[target]\">\n <?php foreach( ACF_Link_Field::$targets as $k => $l ): ?>\n <option value=\"<?php echo $k; ?>\" <?php if($k == $target) echo 'selected=\"selected\"'; ?>><?php _e($l); ?></option>\n <?php endforeach; ?>\n </select>\n <?php endif; ?>\n\n <?php if( count($field['classes']) ): ?>\n <label class=\"inline\"><?php _e('Style'); ?></label>\n <select name=\"<?php echo $field['name']; ?>[class]\">\n <option value=\"\" <?php if(empty($class)) echo 'selected=\"selected\"'; ?>><?php _e('Default'); ?></option>\n <?php foreach( $field['classes'] as $c => $l ): ?>\n <option value=\"<?php echo $c; ?>\" <?php if($c == $class) echo 'selected=\"selected\"'; ?>><?php _e($l); ?></option>\n <?php endforeach; ?>\n </select>\n <?php endif; ?>\n </div>\n <?php endif; \n\t}", "public function delegateChangeField(&$primary_key_processed_by_extension, DbalSchema $dbal_schema, $drupal_table_name, $field_name, $field_new_name, array $drupal_field_new_specs, array $keys_new_specs, array $dbal_column_options);", "function resolveLink($fieldname, &$record){\n\t\tif ( !is_a($record, 'Dataface_Record') ){\n\t\t\ttrigger_error(\"Dataface_TableTool::resolveLink() expects an object of type 'Dataface_Record' as the second argument, but received '\".get_class($record).\"'\\n<br>\".Dataface_Error::printStackTrace());\n\t\t}\n\t\t$link = $record->getLink($fieldname);\n\t\n\t\tif ( is_array($link) ){\n\t\t\treturn Dataface_LinkTool::buildLink($link);\n\t\t} else if ( $link ){\n\t\t\treturn $this->_app->filterUrl($link);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\n\t}", "public function save()\r\n {\r\n $changes = array();\r\n\tforeach( $this->saveable_fields as $field )\r\n\t{\r\n\t $changes[ $field ] = $this->$field;\r\n\t}\r\n\t$this->registry->getObject('db')->insertRecords( 'links', $changes );\r\n\t$uid = $this->registry->getObject('db')->lastInsertID();\r\n\treturn $uid; \r\n }", "private function getProductLinkField()\n {\n return $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();\n }" ]
[ "0.65511125", "0.6167349", "0.6072858", "0.5425163", "0.53256375", "0.53256375", "0.5268523", "0.51719666", "0.5161998", "0.5149416", "0.50998884", "0.5093495", "0.5081811", "0.50711226", "0.50654364", "0.5045005", "0.5041782", "0.50358653", "0.4971796", "0.49699497", "0.4967826", "0.49653292", "0.49353388", "0.4909577", "0.4909577", "0.49017182", "0.48970628", "0.48942038", "0.48880643", "0.4880683" ]
0.6696362
0
find all ideas of all students
private function findAllIdeas() { $statement = "SELECT * FROM IDEAS;"; try { $db=new databaseController(); $statement= $db->getConnection()->query($statement); $result = $statement->fetchAll(\PDO::FETCH_ASSOC); return $result; } catch (\PDOException $e) { exit($e->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllThesis() : array {\n $query='SELECT * FROM Publication WHERE categorie_id=4 ORDER BY ID;';\n $this->connection->executeQuery($query);\n \n return $this->connection->getResults();\n }", "public function getAllStudent(){\n\n\t\treturn array(\n\t\t\t\"1\"=> new Entity_Student(1,\"pham van thao\",23,\"tlu\"),\n\t\t\t\"2\"=> new Entity_Student(2,\"pham van phen\",24,\"tlu\"),\n\t\t\t\"3\"=> new Entity_Student(3,\"pham van to\",25\"tlu\"),\n\t\t\t\"4\"=> new Entity_Student(4,\"pham van\",26,\"tlu\"),\n\n\t\t);\n\t}", "public function findStudent()\n {\n //$search = '%'.$search.'%';\n $dql = \"SELECT ae FROM ABCIsystemBundle:AbcMembers ae WHERE ae.idCard like'__02%' and ae.status='active'\";\t\n $repositorio = $this->getEntityManager()->createQuery($dql);\n return $repositorio->getResult();\t\n }", "public function exams()\n {\n return $this->morphedByMany(Exam::class, 'subjectables');\n }", "public function allStudents()\n {\n\n $students = Student::all();\n return $students;\n\n\n\n }", "public function getIdeas(){\n\t\t// get the events\n\t\t$events = $this->getEvents();\n\n\t\t$ideas = [];\n\t\t$eventNumber = sizeof($events);\n\n\t\t// extract the ideas from the event list\n\t\tfor ($i = 0; $i < $eventNumber; $i++){\n\t\t\t$event = array_shift($events);\n\t\t\tif($event['is_approved'] == 0){\n\t\t\t\tarray_push($ideas, $event);\n\t\t\t}\n\t\t}\n\n\t\treturn $ideas;\n\t}", "function getanswers($assid, $studentid, $questionid){\n\t\t\t$strQuery=\"select solution from answers where assid='$assid' and questionid = '$questionid' and stid = '$studentid'\";\n\t\t\t$result = $this->query($strQuery);\n\t}", "public function listOfStudents($skola) {\n\t\t\t$this->db->where('skolaId',$skola);\n\t\t\t $query = $this->db->get(\"predmet\");\n\t\t return $query;\n\t\t}", "function get_all_students() {\n global $db;\n $query = 'SELECT * FROM students\n ORDER BY studentID';\n $statement = $db->prepare($query);\n $statement->execute();\n $students = $statement->fetchAll();\n $statement->closeCursor();\n return $students; \n }", "public static function getStudents() {\n\t\t$idm = PSU::get('idmobject');\n\n\t\t$search = array(\n\t\t\tarray('pa.attribute' => 'els_student'),\n\t\t\tarray('pa.type_id' => '2')\n\t\t);\n\n\t\t$return = 'i.pid,i.psu_id,i.username,i.first_name,i.last_name,l.start_date,l.end_date';\n\n\t\t$students = $idm->getUsersByAttribute( $search, 'AND', $return );\n\n\t\tarray_walk( $students, array('ELS', 'dates2timestamp') );\n\t\tarray_walk( $students, array('ELS', 'load_psuperson') );\n\t\t\n\t\tusort( $students, array('ELS', 'student_sort') );\n\n\t\treturn $students;\n\t}", "function getanswersinfo($assid, $studentid){\n\t\t\t$strQuery=\"select solution,correct_answer,questionid,mark from answers where assid='$assid' and stid = '$studentid'\";\n\t\t\t$result = $this->query($strQuery);\n\t}", "public function findStudentsByCourse(CourseInterface $course);", "private function getStudent(){\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire.sql\";\n\n\t\t$this->result[\"liste_stagiaire\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_techno_carousel.sql\";\n\n\t\t$this->result[\"liste_techno\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_rs.sql\";\n\n\t\t$this->result[\"liste_rs\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_doc.sql\";\n\n\t\t$this->result[\"liste_doc\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t}", "public function getStudentAnswers()\n {\n return $this->hasMany(StudentAnswer::className(), ['question_id' => 'id']);\n }", "public function findEnroledSubjects(StudentInterface $student,AcademicYearInterface $academicYear = null);", "public function getAllStudentsResults() {\n try {\n if(BaseController::isLoggedIn() && BaseController::isTeacher()) {\n $user = new UserModel();\n $user->id = BaseController::getUserId();\n $user_data = $user->getUserDataById();\n \n $student = new StudentModel();\n $results = $student->getAllStudentsResults();\n \n $model = array(\n 'user_data' => $user_data,\n 'results' => $results\n );\n BaseController::display(self::$controller . '/student-results.php', $model);\n } else {\n BaseController::load('user/login.php', array('error_description' => 'Изисква се регистрация.'));\n }\n } catch (Exception $e) {\n BaseController::load('error.php');\n }\n }", "public function getAllStudents() {\n try {\n if(BaseController::isLoggedIn() && BaseController::isTeacher()) { \n $user = new UserModel();\n $user->id = BaseController::getUserId();\n $user_data = $user->getUserDataById();\n \n $student = new StudentModel();\n $students = $student->getAllStudents();\n \n $model = array(\n 'user_data' => $user_data,\n 'students' => $students\n );\n BaseController::display(self::$controller . '/students.php', $model);\n } else {\n BaseController::load('user/login.php', array('error_description' => 'Изисква се регистрация.'));\n }\n } catch (Exception $e) {\n BaseController::load('error.php');\n }\n }", "public function get_seasonteams()\n\t\t{\n\t\t\t// Scaffolding Code For Array:\n\t\t\t$objs = $this->obj->execute();\n\t\t//\tprint_r($objs);\n\t\t\tforeach($objs as $obj)\n\t\t\t{\n\t\t//\t\tprint_r($obj);\n\t\t\t\t$team = ORM::factory('Sportorg_Team',$obj['team_id']);\n\n\t\t\t\t$retArr[] = $team->getBasics();\n\t\t\t}\n\n\t\t\treturn $retArr;\n\t\t}", "public static function get_user_assessments($studentID)\n {\n //first get all of the qualifications they are on\n //then get all of the formal assessments on all of these. \n $projects = array();\n $userQuals = get_users_quals($studentID);\n if($userQuals)\n {\n foreach($userQuals AS $qual)\n {\n $array = Project::get_qual_assessments($qual->id);\n $projects = $projects + $array;\n }\n }\n $retval = new stdClass();\n $retval->quals = $userQuals;\n $retval->projects = $projects;\n return $retval;\n }", "function findMenteesWithStudentId($id) {\r\n\t\treturn $this->studentMapper->findMenteesWithMentorStudentId($id);\r\n\t}", "public function getList()\n\t{\n\t\t$queryBuilder = $this\n\t\t\t->createQueryBuilder('student')\n\t\t\t->select('student, professor, tutor, contract_type')\n\t\t\t->leftJoin('student.professor', 'professor')\n\t\t\t->leftJoin('student.tutor', 'tutor')\n\t\t\t->leftJoin('student.contractType', 'contract_type');\n\t\treturn $queryBuilder->getQuery()->getResult();\n\t}", "public function testManyDisciplineNameReturn()\n {\n $result = false;\n $student = new StudentProfile();\n $course = new Course();\n $course->set(\"department\",\"MUSI\");\n $student->set(\"courses\",$course);\n $course2 = new Course();\n $course2->set(\"department\",\"CPSC\");\n $student->set(\"courses\",$course2);\n $status = check24Discipline($student);\n if(count($status[\"reason\"]) == 1 && $status[\"result\"] == true && $status[\"dept\"] == (\"MUSI,CPSC\"))\n $result = true;\n $this->assertEquals(true, $result);\n }", "function getStudentInterims( $studentID ) {\r\n\t\t//should be userCanGetStudentInterims( $studentID ), but that function's wrong\r\n\t\t//and this one makes more sense anyway\r\n\t\tif( $this->userCanViewInterim( '' ) ) {\r\n\t\t\t$query = \"SELECT ID FROM interims WHERE StudentID = $studentID\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\t$return = array();\r\n\t\t\twhile( $row = mysql_fetch_assoc($result) ) {\r\n\t\t\t\tif( $this->userCanViewInterim('') ) {\r\n\t\t\t\t\tarray_push( $return, $this->viewInterim('',$row['ID']) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $return;\r\n\t\t}\r\n\t}", "public function getEntities()\n {\n return $this->getRepository()->findBy([], ['discipline' => 'ASC']);\n }", "function getStudents() {\n $students = array();\n\n // Add first student into the students array.\n $first = new Student();\n $first->surname = \"Doe\";\n $first->first_name = \"John\";\n $first->add_email('home','[email protected]');\n $first->add_email('work','[email protected]');\n $first->add_grade(65);\n $first->add_grade(75);\n $first->add_grade(55);\n $students['j123'] = $first; \n\n // Add seconde student into the students array.\n $second = new Student();\n $second->surname = \"Einstein\";\n $second->first_name = \"Albert\";\n $second->add_email('home','[email protected]');\n $second->add_email('work1','[email protected]');\n $second->add_email('work2','[email protected]');\n $second->add_grade(95);\n $second->add_grade(80);\n $second->add_grade(50);\n $students['a456'] = $second;\n\n\n // Add my info into the students array.\n $me = new Student();\n $me->surname = \"Tan\";\n $me->first_name = \"Hai Hua\";\n $me->add_email('school', '[email protected]');\n $me->add_grade(90);\n $students['b721'] = $me;\n\n\n // Add random generated students to the array\n $num = mt_rand(1, 10);\n for ($i = 0; $i < $num; ++$i) {\n $student = new Student();\n $student->surname = Helper::rand_name(10);\n $student->first_name = Helper::rand_name(10);\n $student->add_email('school', $student->first_name . '@.my.bcit.ca');\n $student->add_grade(mt_rand(0,100));\n $student->add_grade(mt_rand(0,100));\n $student->add_grade(mt_rand(0,100));\n $students['k' . mt_rand(100,999)] = $student;\n }\n\n return $students;\n }", "public function findAllTeacher()\n {\n \treturn $this->createQueryBuilder('u')\n \t->where('u.role = 1')\n \t->getQuery()\n \t->getResult();\n \t;\n }", "public function retrieveAllStudent(){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM student ORDER BY id DESC\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetchAll();\n\t\t}", "function ipal_get_questions_student($qid){\r\n\r\n global $ipal;\r\n global $DB;\r\n global $CFG;\r\n\t\t$q='';\r\n\t\t$pagearray2=array();\r\n\t\t\r\n $aquestions=$DB->get_record('question',array('id'=>$qid));\r\n\t\t\tif($aquestions->questiontext != \"\"){ \r\n\r\n\t$pagearray2[]=array('id'=>$qid, 'question'=>$aquestions->questiontext, 'answers'=>ipal_get_answers_student($qid));\r\n\t\t\t\t\t\t\t}\r\n return($pagearray2);\r\n}", "function get_list($sy_id,$student_id) {\n\t\treturn $this->query(\n\t\t\t\"SELECT * FROM $this->tblname WHERE sy_id=$sy_id AND student_id=$student_id\"\n\t\t);\n\t}", "function ipal_get_answers_student($question_id){\r\n global $ipal;\r\n global $DB;\r\n global $CFG;\r\n\r\n\t$answerarray=array(); \r\n\t$line=\"\";\r\n\t$answers=$DB->get_records('question_answers',array('question'=>$question_id));\r\n\t\t\tforeach($answers as $answers){\r\n\t\t\t\t$answerarray[$answers->id]=$answers->answer; \r\n\t\t\t}\r\n\t\t\t\r\n\treturn($answerarray);\r\n}" ]
[ "0.58841807", "0.584169", "0.5715169", "0.5679867", "0.55745983", "0.5531895", "0.55120844", "0.5478111", "0.5476585", "0.5440838", "0.5421995", "0.5406428", "0.53928334", "0.5381895", "0.53808427", "0.5342673", "0.5321282", "0.53181356", "0.5300592", "0.5279147", "0.5260989", "0.52230823", "0.52058893", "0.520529", "0.51980656", "0.5176662", "0.51642734", "0.51411736", "0.512075", "0.51191676" ]
0.5989356
0
find all ideas of a user with ID $id
private function findAllIdeasOfAUser($id) { $statement = "SELECT * FROM IDEAS WHERE ownerId='$id';"; try { $db=new databaseController(); $statement= $db->getConnection()->query($statement); $statement->execute(); $result = $statement->fetchAll(\PDO::FETCH_ASSOC); return $result; } catch (\PDOException $e) { exit($e->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listAllbyUser($id){\n try{\n $sql = 'select * from user u inner join person p on u.id_person = p.id_person where id_user = ?';\n $stm = $this->pdo->prepare($sql);\n $stm->execute([$id]);\n $result = $stm->fetch();\n\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), get_class($this).'|'.__FUNCTION__);\n $result = [];\n }\n return $result;\n }", "private function findIdea($id) {\n $statement = \"SELECT * FROM IDEAS WHERE idea_id=?;\";\n try {\n $db=new databaseController();\n $statement= $db->getConnection()->prepare($statement);\n $statement->execute(array($id));\n $result = $statement->fetch(\\PDO::FETCH_ASSOC);\n return $result;\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n }", "public function findByUser($id) {\n\t $this->db->select('*')\n\t ->from($this->getSource())\n\t ->where(\"userId = ?\");\n\t \n\t $this->db->execute([$id]);\n\t return $this->db->fetchAll();\n\t}", "public function getAllUserById($id);", "function GetIdeasByKeyword($keyword)\n\t\t{\n\t\t\t$ideas = array();\n\t\t\n\t\t\t// try and add the user to the database\n\t\t\ttry\n\t\t\t{\n\t\t\t\n\t\t\t\t// create an instance of our DB tool, and connect to the database\n\t\t\t\t$db = new DatabaseTool();\n\t\t\t\t$db->Connect();\n\t\t\t\n\t\t\t\t// get all of the ideaid's that have that keyword associated with them\n\t\t\t\t$query = 'SELECT ideaid FROM ideakeywords WHERE keyword=\"' . $keyword . '\"';\n\t\t\t\t$result = $db->query($query);\n\t\t\t\t\n\t\t\t\t// get all of the ideaid's that have that keyword\n\t\t\t\twhile($r = mysql_fetch_assoc($result))\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t// get the id of the idea that was returned with having that keyword\n\t\t\t\t\t$ideaid = $r['ideaid'];\n\t\t\t\t\n\t\t\t\t\t// get all of the ideaid's that have that keyword associated with them\n\t\t\t\t\t$result = $query = 'SELECT creationdatetime,ownerid,name,description FROM ideas WHERE ideaid=\"' . $ideaid . '\"';\n\t\t\t\t\t$db->query($query);\n\t\t\t\t\n\t\t\t\t\t// get the idea from the row\n\t\t\t\t\t$r = mysql_fetch_assoc($result);\n\t\t\t\t\t\n\t\t\t\t\t// create and populate our idea object\n\t\t\t\t\t$idea = new Idea();\n\t\t\t\t\t$idea->creationdatetime = $r['creationdatetime'];\n\t\t\t\t\t$idea->ownerid = $r['ownerid'];\n\t\t\t\t\t$idea->name = $r['name'];\n\t\t\t\t\t$idea->description = $r['description'];\n\t\t\t\t\t\n\t\t\t\t\t// populate the username and display name of the owner from the database\n\t\t\t\t\t$user = new UserTool();\n\t\t\t\t\t$idea->owneruname = $user->GetDisplayNameByUserID($idea->ownerid);\n\t\t\t\t\t$idea->ownerusername = $user->GetUsernameByUserID($idea->ownerid);\n\t\t\t\t\t\n\t\t\t\t\t// add the idea object to our array of ideas\n\t\t\t\t\t$ideas[] = $idea;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t// reset our array to a count of 0\n\t\t\t\t$ideas = array();\n\t\t\t}\n\t\t\t\n\t\t\t// return our array of ideas\n\t\t\treturn $ideas;\n\t\t}", "function GetIdeasByChops($chopsid)\n\t\t{\n\t\t\t$ideas = array();\n\t\t\n\t\t\t// try and add the user to the database\n\t\t\t//try\n\t\t\t//{\n\t\t\t\n\t\t\t\t//echo \"chopsid: \" . $chopsid . \"<br>\";\n\t\t\t\n\t\t\t\t// create an instance of our DB tool, and connect to the database\n\t\t\t\t$db = new DatabaseTool();\n\t\t\t\t$db->Connect();\n\t\t\t\n\t\t\t\t// get all of the ideaid's that have that chops associated with them\n\t\t\t\t$query = 'SELECT ideaid FROM ideachops WHERE chopsid=\"' . $chopsid . '\"';\n\t\t\t\t$result = $db->query($query);\n\t\t\t\t\n\t\t\t\t// get all of the ideaid's that have that keyword\n\t\t\t\twhile($r = mysql_fetch_assoc($result))\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t// get the id of the idea that was returned with having that keyword\n\t\t\t\t\t$ideaid = $r['ideaid'];\n\t\t\t\t\n\t\t\t\t\t//echo $ideaid;\n\t\t\t\t\n\t\t\t\t\t// get all of the ideaid's that have that keyword associated with them\n\t\t\t\t\t$query = 'SELECT creationdatetime,ownerid,name,description FROM ideas WHERE ideaid=\"' . $ideaid . '\"';\n\t\t\t\t\t$result = $db->query($query);\n\t\t\t\t\n\t\t\t\t\t// get the idea from the row\n\t\t\t\t\t$r = mysql_fetch_assoc($result);\n\t\t\t\t\t\n\t\t\t\t\t// create and populate our idea object\n\t\t\t\t\t$idea = new Idea();\n\t\t\t\t\t$idea->creationdatetime = $r['creationdatetime'];\n\t\t\t\t\t$idea->ownerid = $r['ownerid'];\n\t\t\t\t\t$idea->name = $r['name'];\n\t\t\t\t\t$idea->description = $r['description'];\n\t\t\t\t\t\n\t\t\t\t\t// populate the username and display name of the owner from the database\n\t\t\t\t\t$user = new UserTool();\n\t\t\t\t\t\n\t\t\t\t\t//echo \"ownerid: \" . $idea->ownerid . \"<br>\";\n\t\t\t\t\t\n\t\t\t\t\t$idea->ownerdisplayname = $user->GetDisplayNameByUserID($idea->ownerid);\n\t\t\t\t\t$idea->ownerusername = $user->GetUsernameByUserID($idea->ownerid);\n\t\t\t\t\t\n\t\t\t\t\t// add the idea object to our array of ideas\n\t\t\t\t\t$ideas[] = $idea;\n\t\t\t\t}\n\n\t\t\t//}\n\t\t\t//catch (Exception $e)\n\t\t\t//{\n\t\t\t\t// reset our array to a count of 0\n\t\t\t//\t$ideas = array();\n\t\t\t//}\n\t\t\t\n\t\t\t// return our array of ideas\n\t\t\treturn $ideas;\n\t\t}", "public function myFindaIdAll($id) {\n $parameters = array();\n $values = array('a,partial b.{id,nomprojet},partial c.{id,nomUser},partial d.{id,nom,description},f');\n\n $query = $this->createQueryBuilder('a')\n ->select($values)\n ->leftJoin('a.idProjet', 'b')\n ->leftJoin('a.demandeur', 'c')\n ->leftJoin('a.idStatus', 'd')\n ->leftJoin('a.picture', 'f')\n ->addSelect('g')\n //->addSelect('g')\n ->distinct('GroupConcat(g.nom) AS kak')\n ->leftJoin('a.idEnvironnement', 'g')\n ->leftJoin('a.comments', 'h')\n //->addSelect('e')\n ->addSelect('partial e.{id,nomUser}')\n ->distinct('GroupConcat(e.nomUser)')\n ->leftJoin('a.idusers', 'e');\n $query->add('orderBy', 'a.id DESC')\n ->andwhere('a.id = :myid');\n $query->setParameter('myid', $id);\n\n\n return $query->getQuery()->getSingleResult();\n }", "public function getResultsOfUser($user_id);", "public function getByUserId($id) {\r\n $sql = \"SELECT * FROM bestelling inner join bestelregel on bestelregel.bestellingid=bestelling.id where bestelling.userid=?\";\r\n $args = func_get_args();\r\n $stmt = parent::execPreppedStmt($sql, $args);\r\n $resultSet = $stmt->fetchall();\r\n $arr = array();\r\n foreach ($resultSet as $result) {\r\n $bestelling = Bestelling:: create($result['id'], $result['userid'], $result['tijdstip']);\r\n $bestelregel = Bestelregel:: create($result['bestelregelid'], $result['bestelregelprijs'], $bestelling);\r\n $arr[] = $bestelregel;\r\n }\r\n return $arr;\r\n }", "public function allForUser($userId);", "public function allForUser($userId);", "public function find($id_user){\n //-- return all query and use the object result in update-profile\n return $find = mysql_query(\"SELECT id_user, id_city, id_rol, image, username, lastname_1, lastname_2, gender, birthday, email, password, street, number_home,location, zip FROM users WHERE id_user='\".$id_user.\"' LIMIT 1\"); \n }", "public function findByUserId(int $id) : Collection;", "abstract protected function getAllByMeet($id);", "public function getInvitationsByUserId($id) {\n\t\tglobal $db;\n\n\t\t$invitations = $db->query(\"SELECT * FROM invites WHERE PersonID = $id\");\n\t\treturn $invitations;\n\t}", "function all_users($id){\n try{\n $get_users = $this->db->prepare(\"SELECT id, username, user_image FROM `users` WHERE id != ?\");\n $get_users->execute([$id]);\n if($get_users->rowCount() > 0){\n return $get_users->fetchAll(PDO::FETCH_OBJ);\n }\n else{\n return false;\n }\n }\n catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public function ask_get_user_questions($id)\n\t{\n\t\t$sql = \"SELECT *\n\t\t\t\tFROM \".$this->table_ask.\"\n\t\t\t\tWHERE id_quest = -1\n\t\t\t\tAND author_id = ?\n\t\t\t\tORDER BY date DESC\";\n\t\t$data = array($id);\n\t\t$query = $this->db->query($sql, $data);\n\t\t$res = $query->result();\n\t\tfor( $i=0; $i<count($res); $i++ ) {\n\t\t\t$res[$i]->nb_ans = $this->ask_get_nb_answers($res[$i]->id);\n\t\t\t$res[$i]->nb_views = $this->ask_get_nb_views($res[$i]->id);\n\t\t\t$val = $this->votesManager->votes_get_by_ask($res[$i]->id);\n\t\t\t$res[$i]->nb_votes = ($val) ? $val:0;\n\t\t}\n\t\tif( $query->result() != NULL )\n\t\t\treturn $query->result();\n\t\telse\n\t\t\treturn 0;\n\t}", "public function findAllById($id)\n {\n $resultSet = $this->getDbTable()->fetchAll($this->getDbTable()->select()->where('user_id = ?', $id));\n $entries = array();\n foreach ($resultSet as $row)\n {\n $entry = new Default_Model_UserDetail();\n $entry->setId($row->user_id);\n $entry->setKey($row->key);\n $entry->setValue($row->value);\n $entry->setMapper($this);\n $entries[] = $entry;\n }\n return $entries;\n }", "public function getUser($id) {\n $sql = \"select * from infos_contributeur where id_user = $id\";\n $result = $this->db->fetchAll($sql);\n\n return $result;\n }", "public function list($id){\n try{\n $sql = 'select * from user where id_user = ? limit 1';\n $stm = $this->pdo->prepare($sql);\n $stm->execute([$id]);\n $result = $stm->fetch();\n\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), get_class($this).'|'.__FUNCTION__);\n $result = [];\n }\n return $result;\n }", "function search($id){\n\t\tglobal $con;\n\t\t$query = \"select * from user where id = '$id'\";\n\t\t$res=$con->query($query);\n\t\treturn $res;\n\t}", "public static function findById($id)\n {\n $_id = \"'\".$id.\"'\";\n $qb = new QB;\n $qb->conn = static::getDB();\n $results = $qb->select('users', '*')\n ->where('id', '=', $_id)\n ->all();\n return $results;\n }", "public function getPeople($id=0){\n $stmt = $this->mysqli->prepare(\"SELECT * FROM alumno WHERE no_ctrl = ?;\");\n $stmt->bind_param('i', $id);\n $stmt->execute();\n $result = $stmt->get_result(); \n $people = $result->fetch_all(MYSQLI_ASSOC);\n $stmt->close();\n return $people;\n }", "public function all($id){\n return $this->model->query()->where('persona_id',$id)->get();\n }", "public function readMomentLikes($id) {\n $momentQuery = 'SELECT user_id FROM moment_like WHERE moment_id = :id';\n $momentStmt = $this->db->prepare($momentQuery);\n $momentStmt->bindValue(':id', $id, PDO::PARAM_INT);\n $momentStmt->execute();\n return $momentStmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function find_user_by_id($id)\r\n{\r\n global $db;\r\n\r\n $q = $db->prepare('SELECT name, pseudo, email, city, country, twitter, github, \r\nfacebook, sex, available_for_hiring, bio FROM users WHERE id=?');\r\n $q->execute([$id]);\r\n\r\n $data = $q->fetch(PDO::FETCH_OBJ);\r\n\r\n $q->closeCursor();\r\n return $data;\r\n}", "public function getAll($id_user)\r\n\t{\r\n\r\n\t\t$sql = new Sql($this->dbAdapter);\r\n\t\t$select = $sql->select();\r\n\t\t$select->from('users');\r\n\t\t$select->columns(array('id', 'email'));\r\n\t\r\n\t\t$select->join(array('u_d' => 'users_details'),'users.id = u_d.id_user', array('id_user','name','surname', 'campus', 'phone', 'addres','image','pin','key_inventory'), 'Left');\r\n\r\n\t\t$select->join(array('a_u'=>'addresses_users'),'users.id = a_u.id_users', array('postalcode'), 'Left');\r\n\r\n\t\t$select->where(array('users.id' =>$id_user ));\r\n\r\n\t\t$selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result=$execute->toArray(); \r\n\r\n\t\t//echo \"<pre>\";print_r($result);exit;\r\n\t\treturn $result;\r\n\r\n\t}", "private function findAllIdeas() {\n $statement = \"SELECT * FROM IDEAS;\";\n try {\n $db=new databaseController();\n $statement= $db->getConnection()->query($statement);\n $result = $statement->fetchAll(\\PDO::FETCH_ASSOC);\n return $result;\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n }", "public function getAllUsers($id)\n {\n $queryBuilder = $this->db->createQueryBuilder();\n $queryBuilder\n ->select('u.*')\n ->from('users', 'u')\n ->where('gamerID = ?')\n ->setParameter(0, $id);\n $statement = $queryBuilder->execute();\n $usersData = $statement->fetchAll(); \n foreach ($usersData as $userData) {\n $userEntityList[$userData['id']] = new user($userData['id'], $userData['nom'], $userData['prenom'],$userData['gamerID']);\n }\n return $userEntityList;\n }", "public function findNotesById($id){\n return $this\n ->createQueryBuilder('n')\n ->select('n.rating')\n ->where(\"n.menu= :id\")\n ->setParameter('id',$id)\n ->getQuery()\n ->getResult();\n }" ]
[ "0.65527195", "0.64556557", "0.63239026", "0.630819", "0.62854147", "0.6195247", "0.6113063", "0.6053571", "0.60389334", "0.60319406", "0.60319406", "0.6026635", "0.60074747", "0.59705746", "0.59643584", "0.5931559", "0.59122354", "0.59068537", "0.5884626", "0.58829373", "0.58556014", "0.58548033", "0.58477867", "0.58275354", "0.58257073", "0.58195025", "0.58172697", "0.57728297", "0.5765807", "0.574325" ]
0.78558385
0
update idea's data (EXTRA_RESOURCES)
private function updateExtraResources($id, Array $input) { $statement = "UPDATE IDEAS SET extraResources= :extraResources WHERE idea_id = '$id';"; try { $db=new databaseController(); $statement = $db->getConnection()->prepare($statement); $statement->execute(array( 'extraResources' => $input['extraResources'], )); return $statement->rowCount(); } catch (\PDOException $e) { exit($e->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function updateData();", "public function postEditResources()\n {\n $id = $this->_params['id'];\n\n $errors = validateEditResource($id);\n\n if(!($errors === true)) {\n $database = new Database();\n\n $resource = $database->getResourceById($id);\n /*construct($resourceID = \"0\", $resourceName = \"Resource\", $description = \"Info\",\n $contactName =\"\",$contactEmail = \"\",$contactPhone = \"\",$link = \"\", $active = \"1\" )*/\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 $this->_f3->set('errors', $errors);\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 } else {\n // fixme add routing\n $this->_f3->reroute('/Admin');\n }\n\n }", "protected function renderResource()\n {\n $processedImageInfo = $this->imageService->processImage($this->originalAsset->getResource(), $this->adjustments->toArray());\n $this->resource = $processedImageInfo['resource'];\n $this->width = $processedImageInfo['width'];\n $this->height = $processedImageInfo['height'];\n $this->persistenceManager->whiteListObject($this->resource);\n }", "abstract protected function setResource(): String;", "public function updateOriginal()\n {\n // @todo Bug#1101: shouldn't just serialise this object\n // because some things change for the original\n // loaded_width\n // loaded_height\n $this->write($this->getOriginalSourceFilename());\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 }", "protected function addEmbeddedResources()\n {\n }", "public function update(IdeaFormRequest $request, Idea $idea)\n {\n\n $idea->update([\n 'topic' => $request->topic,\n 'subtitle' => $request->subtitle,\n 'content' => $request->content,\n 'categorie_id' => $request->categorie,\n 'user_id' => auth()->user()->id,\n ]);\n\n if($request->cover)\n {\n $path = $request->file('cover')->store('uploads','public');\n\n \n $image = Image::create([\n 'path' => $path,\n 'user_id' => auth()->user()->id, \n ]);\n \n $image->attributeToIdea($idea);\n\n $idea->update([\n 'image_id' => $image->id\n ]);\n\n }\n \n\n $idea->categorise($request->categorie);\n\n notify()->success(\"Bravo ! Idée soumise à l'approbation de la communauté ...\");\n\n return redirect()->route('index');\n }", "public function addRessources()\n {\n // $this->context->controller->addCss(($this->_path . '/views/css/tab.css'), 'all');\n // $this->context->controller->addJquery();\n // $this->context->controller->addJS(($this->_path . '/views/js/script.js'));\n // $this->context->controller->addJS(($this->_path . '/views/js/configuration.js'));\n }", "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 }", "function updatableResources(){\n\n return $this->resourcesByPermission('update');\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 reassignFeaturedImage()\n {\n\n }", "private function updateVars(){\n // get configuration\n global $configuration;\n // if configuration file exists && class-settings\n if($configuration && array_key_exists('WPimgAttr', $configuration)):\n // class configuration\n $myConfig = $configuration['WPimgAttr'];\n // update vars\n $this->WPimgAttr_Alt_content = array_key_exists('Alt_content', $myConfig) ? $myConfig['Alt_content'] : $this->WPimgAttr_Alt_content;\n $this->WPimgAttr_Alt_attachment = array_key_exists('Alt_attachment', $myConfig) ? $myConfig['Alt_attachment'] : $this->WPimgAttr_Alt_attachment;\n $this->WPimgAttr_Alt_shortcode = array_key_exists('Alt_shortcode', $myConfig) ? $myConfig['Alt_shortcode'] : $this->WPimgAttr_Alt_shortcode;\n SELF::$WPimgAttr_Alt_languages = array_key_exists('Alt_languages', $myConfig) ? $myConfig['Alt_languages'] : SELF::$WPimgAttr_Alt_languages;\n endif;\n }", "public function updateDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n /* @var $contentService Service_Api_Handler_Content_Baseo */\n $filter = new Service_Api_Filter_Content();\n $filter->id = $this->_getParam('id');\n\n $data = array();\n foreach (array('name', 'description', 'tags', 'shareWithNetwork', 'datePublication', 'dateExpiration')\n as $attrName) {\n if (($val = $this->_getParam($attrName)) !== null) {\n $data[$attrName] = $val;\n }\n }\n if (sizeof($data) > 0) {\n try {\n $count = $contentService->contentsUpdate($filter, $data);\n $this->view->assign(\n array_merge(\n get_object_vars($count) ?: array(),\n array('message' => ucfirst($this->view->translate('content updated successfully'))))\n );\n } catch (Mk_ApiException $e) {\n $this->view->error = $this->view->getHelper('errors')->translateFullException($e);\n }\n }\n }", "public function add_resources()\n\t{\n\t\t\n\t}", "private function reload_data()\n\t{\n\t\tforeach ($this->checked as $k=>$v) {\n\t\t\t$this->content->template['leadtracker']['0'][$k]=$v;\n\t\t}\n\t}", "protected function update() {}", "public function update() {\n\t\t$data = Server::get_instance(CONF_ENGINE_SERVER_URL)->\n\t\t\tget_science_project_data($this->uid, $this->sc_id);\n\t\tif (!$data)\n\t\t\treturn false;\n\n\t\t$this->init_from_data($data);\n\t}", "public static function init_update()\n {\n\n $used_infos = EPFLQuota::get_usage_on_disk();\n\n /* If option is not in database, */\n if(!($current_usage = get_option(self::OPTION_USAGE)))\n {\n /* We create data to add it to db */\n $current_usage = [self::OPTION_USAGE_VERSION => self::CURRENT_DATA_VERSION,\n self::OPTION_USAGE_USED => $used_infos[self::OPTION_USAGE_USED],\n self::OPTION_USAGE_NB_FILES => $used_infos[self::OPTION_USAGE_NB_FILES],\n self::OPTION_USAGE_LIMIT => self::DEFAULT_LIMIT];\n }\n else /* Option exists in DB */\n {\n\n /* TODO: if data structure changes in the future, you will have to check for existing version and update it as needed */\n\n /* We update used size */\n $current_usage[self::OPTION_USAGE_USED] = $used_infos[self::OPTION_USAGE_USED];\n $current_usage[self::OPTION_USAGE_NB_FILES] = $used_infos[self::OPTION_USAGE_NB_FILES];\n }\n\n /* Setting information in DB */\n EPFLQuota::set_current_usage($current_usage);\n\n }", "public function update(): void\n {\n // Update quality\n $this->item->quality = self::QUALITY_MAX;\n }", "function updatePlatform($id,$name,$icon)\n {\n global $mysqli;\n $icon=addslashes($icon);\n $icon=file_get_contents($icon);\n $icon=base64_encode($icon);\n $sql=\"UPDATE platforms SET platformName='$name',platformIcon='$icon' WHERE platformID=$id \"; \n $mysqli->query($sql)or die(\"query failed due to \".mysqli_error());\n logSuccess(\"platform updated successfully\");\n }", "public function updateAction()\n {\n $req = $this->get('request');\n $htmlId = $req->get('editorID');\n $newContent = $req->get('editabledata');\n $em = $this->getDoctrine()->getEntityManager();\n $content = $em->getRepository('AppBundle:StaticContent')\n ->findOneByHtmlId($htmlId);\n $content->setHtml($newContent);\n $em->persist($content);\n $em->flush();\n\n return new JsonResponse(array('status' => 'Database updated static element '.$htmlId.' New content: '.$newContent));\n }", "public function setData() {\n\t\t$this->import($this->get());\n\t}", "function modifyResourceByID($id, $resObject)\n{\n\t$sql = \"UPDATE `\".DB_NAME.\"`.`resources` SET `title` = '\".sanitize($resObject->name).\"',\n\t\t`link` = '\".sanitize($resObject->url).\"',\n\t\t`author` = '\".$resObject->owner.\"',\n\t\t`rating` = '\".$resObject->score.\"',\n\t\t`description` = '\".sanitize($resObject->description).\"',\n\t\t`tags` = '\".sanitize(dcSemicolonArrayToString($resObject->tags)).\"',\n\t\t`voteips` = '\".dcSemicolonArrayToString($resObject->voteips).\"' WHERE `resources`.`rid` = \".$id;\n\n\t$result = mysql_query($sql);\n\t\n\treturn $result;\n}", "public function update(){\r\n\t\t$p = $this->input->post();\r\n\t\t$arr = array(\r\n\t\t\t'name' => $p['name'],\r\n\t\t\t'description' => $p['description'],\r\n\t\t\t'order' => $p['order'],\r\n\t\t\t'is_active' => isset($p['is_active']) ? 1 : 0,\r\n\t\t\t'type' => $p['type']\r\n\t\t);\r\n\r\n\t\t/**\r\n\t\t * app file name\r\n\t\t */\r\n\t\t $file_details = explode('~!~', $p['appfilepath']);\r\n\t\t $arr['appfilepath'] = $file_details[0];\r\n\t\t $arr['classname'] = $file_details[1];\r\n\t\t /**\r\n\t\t * icon file path\r\n\t\t */\r\n\t\t$arr['appiconfilepath'] = $p['appiconfilepath'];\r\n\t\t// + get the old icon file\r\n\t\t$this->db->where('id', $p['app_id']);\r\n\t\t$app_details = $this->db->get('apps');\r\n\t\tif($app_details->num_rows()){\r\n\t\t\t$row = $app_details->row_array();\r\n\t\t\tif($row['appiconfilepath'] !== $arr['appiconfilepath']){\r\n\t\t\t\t@unlink('upload/appicon/'.$row['appiconfilepath']);\r\n\t\t\t}\r\n\t\t\tif($row['appfilepath'] !== $arr['appfilepath']){\r\n\t\t\t\t@unlink('application/app/'.$row['appfilepath']);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->db->where('id', $p['app_id']);\r\n\t\t$this->db->update('apps', $arr);\r\n\r\n\t }", "function updateRowInG($data) {\n\t\n\t//include 'products/rescrop.php?filename='.$data[\"params\"][\"img\"].'&secret=12345678';///image resize, crop, watermarking, class\n}", "private function setupResources()\n {\n // $this->loadViewsFrom(__DIR__ . '/../resources/views', 'marqant-pay');\n }", "public function testUpdateChallengeActivity()\n {\n }", "protected function afterUpdating()\n {\n }" ]
[ "0.5262936", "0.52150947", "0.5181118", "0.5178089", "0.511829", "0.51146376", "0.50612885", "0.5060672", "0.5043799", "0.5014426", "0.49926832", "0.49903905", "0.49792904", "0.49729624", "0.49706522", "0.49353924", "0.4904704", "0.48955703", "0.488591", "0.485529", "0.4852312", "0.48432916", "0.48297164", "0.48253086", "0.48222977", "0.48174405", "0.480206", "0.4792747", "0.47841784", "0.47783032" ]
0.55075413
0
update idea's data (IDEA_STATUS)
private function updateStatus($id, Array $input) { $statement = "UPDATE IDEAS SET ideaStatus= :ideaStatus WHERE idea_id = '$id';"; try { $db=new databaseController(); $statement = $db->getConnection()->prepare($statement); $statement->execute(array( 'ideaStatus' => $input['ideaStatus'], )); return $statement->rowCount(); } catch (\PDOException $e) { exit($e->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update_status();", "function update_story_idea_edit_status($status='',$storyId){\n\n\t\tif($status==0){\n\n \t\t\t\t$updatedData=array(\n\n\t\t\t\t\t\"status\"=>0,\n\n\t\t\t\t\t\"is_reporter_edit\"=>1\n\n \t\t\t\t);\n\n \t\t}else{\n\n\t\t\t\t$updatedData=array(\n\n\t\t\t\t\t\"assigned\"=>1,\n\n\t\t\t\t\t\"status\"=>1\n\n \t\t\t\t);\n\n\t\t}\n\n\t\t$whereData = array('id'=>$storyId);\n\n\t\t$this->db->set($updatedData);\n\n\t\t$this->db->where($whereData);\n\n\t\t$this->db->update('buzz_idea');\t\n\n\t\treturn '1';\n\n\t}", "public function update_problem_status(){\n $id = $_GET['id']; // get the problem id\n $status = $_GET['status']; // get the current status(visibility) of the problem\n\n if($status) $status = 0; else $status = 1; // reverse the status for update\n\n // json return format\n $data = array(\n 'success' => 'false',\n 'current' => $status\n );\n\n if(DB::table('problems')->where('id', $id)->update(['status' => $status])){\n // update status successfully\n $data['success'] = 'true';\n }\n return json_encode($data);\n }", "public function updateStatus(): void\n {\n $data = json_encode($this->getStatus(), JSON_PRETTY_PRINT);\n File::put(public_path(self::STATUS_FILE_NAME), $data);\n }", "public function actionUpdateStatus() {\n $model = UserJobEditorFlag::model()->findByPk(Yii::app()->request->getPost('instanceId'));\n if (!$model instanceof UserJobEditorFlag) return false;\n $saved = $model->updateStatus(Yii::app()->request->getPost('status'));\n $this->sendResponse(200, $this->getObjectEncoded(array('message' => $saved ? 'ok' : 'error')));\n }", "function updateInvestigationComepleteStatus($data_status,$fhi_id)\n\t\t{\n\t\t\t$this->db->where(\"id\",$fhi_id);\n\t\t\tif($this->db->update(\"da_farm_hygiene_investigation\",$data_status))\n\t\t\t{\n\t\t\t\treturn true;\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}", "public function updateStatus(int $projectId);", "public function showExperienceReview()\n {\n $review_id = Input::get('review_id');\n\n $check_review = DB::select(\"select status from product_reviews where id = '$review_id'\");\n $status = $check_review[0]->status;\n if($status == \"Pending\")\n {\n $statusUpdate = \"Approved\";\n }\n else if($status == \"Approved\")\n {\n $statusUpdate = \"Pending\";\n }\n\n $update = DB::update(\"update product_reviews set status ='$statusUpdate' where id = $review_id\");\n\n echo '1';\n\n }", "public function updateStatus() {\n $ref = ORM::forTable('referrals')\n ->findOne($this->data['id']);\n if ($this->data['status'] == 'Assigned' && $this->data['route_id']) {\n $route = ORM::forTable('estimate_routes')\n ->findOne($this->data['route_id']);\n $assignedReferralsCount = ORM::forTable('referrals')\n ->select('id')\n ->where('route_id', $route->id)\n ->count();\n $ref->route_id = $this->data['route_id'];\n $ref->status = 'Assigned';\n $ref->route_order = $assignedReferralsCount;\n\n } elseif ($this->data['status'] == 'Pending') {\n $ref->status = 'Pending';\n $ref->route_order = 0;\n $ref->route_id = NULL;\n } else {\n $ref->status = $this->data['status'];\n }\n if ($ref->save()) {\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request status updated successfully'\n ]);\n } else {\n $this->renderJson([\n 'success' => false,\n 'message' => 'An error has occurred while saving job request'\n ]);\n }\n }", "public function status()\t{\n\t\t\t$this->veiculo->update($this->input->post('id'), array('veiculo_status' => $this->input->post('status')));\n\t\t}", "function updatestatus() {\n global $_lib;\n\n $dataH = array();\n $dataH['ID'] = $this->transaction->ID;\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\n $dataH['RemittanceStatus'] = 'sent';\n \n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\n\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\n }", "public function refreshTaskStatus(){\n\n $webCronResult = $this->webCronResults()->orderBy('code', 'desc')->first();\n\n if ($webCronResult) {\n\n if ($webCronResult->code >= 300) {\n // bad status\n $this->status = 0 ;\n }else{\n // good status\n $this->status = 2 ;\n };\n\n $this->save();\n\n };\n\n }", "function saveCompletionStatus() \n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$complete = 0;\n\t\tif ($this->isComplete()) \n\t\t{\n\t\t\t$complete = 1;\n\t\t}\n if ($this->getSurveyId() > 0) \n\t\t{\n\t\t\t$affectedRows = $ilDB->manipulateF(\"UPDATE svy_svy SET complete = %s, tstamp = %s WHERE survey_id = %s\",\n\t\t\t\tarray('text','integer','integer'),\n\t\t\t\tarray($this->isComplete(), time(), $this->getSurveyId())\n\t\t\t);\n\t\t}\n\t}", "public function updateStatuses()\n {\n $affected = DB::update('UPDATE los_orders SET status_code=1 WHERE status_code=0 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NOT NULL)');\n $affected = DB::update('UPDATE los_orders SET status_code=0 WHERE status_code=1 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NULL)');\n }", "function practice_status()\n {\n $query = \"UPDATE\n\t\t\t\t\t\" . $this->table_name . \"\n\t\t\t\tSET\n\t\t\t\t\tStatus = :status\n\t\t\t\tWHERE\n\t\t\t\t\tid = :id AND Viewer_ID = :vid\";\n\n $stmt = $this->conn->prepare($query);\n\t\t\n\t\t$stmt->bindParam(':status', $this->status);\n $stmt->bindParam(':id', $this->id);\n\t\t$stmt->bindParam(':vid', $this->Viewer_ID);\n\n // execute the query\n if ($stmt->execute()) {\n return true;\n } else {\n return false;\n }\n }", "function informaImpressao(){\r\n $sql \t= \"update interpretacao set int_data_impressao = now(), int_status = 'impresso' where int_id = \".$this->get(\"int_id\");\r\n\t\t$rs\t\t= Db::sql($sql, \"Interpretacao::informaImpressao()\");\r\n\t}", "public function status_change_action(){\n\t $table = $this->input->post('table');\n\t $state = $this->input->post('state');\n\t $primary_field = $this->input->post('primary_field');\n\t $primary_key = $this->input->post('primary_key');\n\t if($state=='true'){\n\t $status = \"Y\";\n\t $status_text = \"Approved\";\n\t }else{\n\t $status = \"N\";\n\t $status_text = \"Rejected\";\n\t }\n\t $statusReturn = $this->common_model->update_row(array('fr_status'=>$status), array($primary_field=>$primary_key), $table);\n\t if($statusReturn){\n\t echo \"1\";\n\t }else{\n\t echo \"0\";\n\t }\n\t}", "function updateDB($parsed_labels,$artifacts_data,$aid_column,&$errors, $notify=false) {\n\n $this->aid_column = $aid_column;\n $this->parsed_labels = $parsed_labels;\n $this->getPredefinedValues();\n\n \n for ($i=0; $i < count($artifacts_data); $i++) {\n $data = $artifacts_data[$i];\n if ($this->aid_column == -1) {\n\t$ok = $this->insertArtifact($i+2,$data,$errors,$notify);\n\t\n\t// if tracker_id given, verify if it exists already \n\t//else send error\n } else {\n\t$aid_field = $this->art_field_fact->getFieldFromName('tracker_id');\n\t$aid_label = $aid_field->getLabel();\n\t$aid = $data[$aid_label];\n\tif ($aid != \"\") {\n\t $ok = $this->updateArtifact($i+2,$data,$aid,$errors, $notify);\n\t \n\t} else {\n\t // have to create artifact from scratch\n\t $ok = $this->insertArtifact($i+2,$data,$errors, $notify);\n\t}\t \n }\n if (!$ok) return false;\n }\n return true;\n \n }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif(!empty($data['t']) && !empty($data['list'])) $result = $this->_bid->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t$data['msg'] = !empty($result['boolean']) && $result['boolean']? 'The bid status has been changed.': 'ERROR: The bid status could not be changed.';\n\t\t\n\t\t$data['area'] = 'refresh_list_msg';\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }", "public function showAlacarteReview()\n {\n $review_id = Input::get('review_id');\n\n $check_review = DB::select(\"select status from vendor_location_reviews where id = '$review_id'\");\n $status = $check_review[0]->status;\n if($status == \"Pending\")\n {\n $statusUpdate = \"Approved\";\n }\n else if($status == \"Approved\")\n {\n $statusUpdate = \"Pending\";\n }\n\n $update = DB::update(\"update vendor_location_reviews set status ='$statusUpdate' where id = $review_id\");\n\n echo '1';\n\n }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "function update_faq_status($faq_id,$faq_status)\n {\n if($faq_status==0)\n {\n $new_stat=\"1\";\n }\n elseif($faq_status==1)\n {\n $new_stat=\"0\";\n }\n $query = $this->db->query(\"UPDATE tbl_faq SET faq_status = '$new_stat' WHERE faq_id='$faq_id'\");\n //echo $this->db->last_query();\n }", "function updatereviewstatus($assid, $studentid, $datesubmitted, $tid, $pid){\n\t\t\t$strQuery=\"update review_assignments set pid = '$pid', date_submitted='$datesubmitted', status = 'not' where aid='$assid' and stid = '$studentid' and tid='$tid'\";\n\t\t\t$result = $this->query($strQuery);\n\t}", "function investigationStep1Update($data_arr,$fhi_id)\n\t\t{\n\t\t\t$this->db->where('id',$fhi_id);\n\t\t\t$insert = $this->db->update(\"da_farm_hygiene_investigation\",$data_arr);\n\t\t\t$insert_id = $fhi_id;\n\t\t\tif($insert)\n\t\t\t{\n\t\t\t\t$log_arr=array('user_id'=>$data_arr['updated_by'],'activity_type'=>\"Update Hygeine Investigation Step1\",'table_name'=>'da_farm_hygiene_investigation','table_id'=>$insert_id,'date_time'=>date('Y-m-d h:i:s'));\n\t\t\t\t$this->saveActivityLog($log_arr);\n\t\t\t\t$result = array(\"is_insert\"=>\"1\",'fhi_id'=>$insert_id);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$result = array(\"is_insert\"=>\"0\");\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "function website_status($data)\n\t {\n\t\t$update = $this->db->update(DB_PREFIX.'system_settings',$data);\n\t\treturn true;\n\t }", "public function updateStatusProposal()\n { \n $now = Mage::getSingleton('core/date')->gmtDate(\"Y-m-d\"); \n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_PROPOSAL);\n $collection->getSelect()->where('expiry < \\''.$now.'\\' AND no_expiry = \\'0\\'');\n $collection->load(); \n\n foreach ($collection as $item) { \n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_PROPOSAL_EXPIRED);\n $item->save(); \n }\n }", "function ctools_export_set_status($table, $name, $new_status = TRUE) {\r\n $schema = ctools_export_get_schema($table);\r\n $status = variable_get($schema['export']['status'], array());\r\n\r\n $status[$name] = $new_status;\r\n variable_set($schema['export']['status'], $status);\r\n}", "public function updateLeadStatus() {\n\n /////////////////////////////////////////////////////////////////////\n // CHECK REQUIRED DATA //////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n if (is_null($this->__apiPrivateToken)) {\n throw new \\Exception(\"API Private Token must be setted!\");\n }\n\n if (is_null($this->__leadEmail)) {\n throw new \\Exception(\"Lead email must be setted!\");\n }\n\n if (!isset($this->__leadData['status'])) {\n throw new \\Exception(\"Lead data 'status' must be setted!\");\n }\n\n /////////////////////////////////////////////////////////////////////\n // PREPARE DATA COLLECTION //////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n $this->__translateLeadData();\n\n $this->__leadData['email'] = $this->__leadEmail;\n\n /////////////////////////////////////////////////////////////////////\n // PERFORM REQUEST TO API ///////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n return $this->__request('POST', 'generic');\n }", "function update_appfeature($data,$iAppTabId)\n {\n\t $this->db->where('iAppTabId', $iAppTabId);\n $query = $this->db->update(\"r_appfeature\", $data);\n return $query;\n }" ]
[ "0.6371976", "0.60565424", "0.59490234", "0.59179145", "0.5812151", "0.58115685", "0.57486963", "0.57394946", "0.57150286", "0.5707858", "0.5701192", "0.568317", "0.5678485", "0.567051", "0.5666501", "0.56435513", "0.5629166", "0.562889", "0.56147414", "0.5602446", "0.5583681", "0.5582895", "0.55827963", "0.55819273", "0.55762845", "0.5573854", "0.5565635", "0.5563891", "0.5557135", "0.5544373" ]
0.61690444
1
UPDATE SMS FIEDL VALUES
function update_sms_field_values() { $msg=''; $status=0; if (isset($_POST['edit_sms_gateway'])) { if (DEMO) { $this->prepare_flashmessage(get_languageword('CRUD_operations_disabled_in_DEMO_version'), 2); redirect(URL_SMS_GATEWAYS); } $sms_gateway_id = $this->input->post('sms_gateway_id'); if ($sms_gateway_id > 0) { $sms_gateway_details = $this->base_model->fetch_records_from(TBL_SETTINGS_FIELDS, array('sms_gateway_id'=>$sms_gateway_id)); $sms_gateways = $this->base_model->fetch_records_from( TBL_SMS_GATEWAYS, array('sms_gateway_id'=>$sms_gateway_id) ); if (empty($sms_gateway_details) || empty($sms_gateways)) { $msg .= get_languageword('record_not_found'); $status=1; $this->prepare_flashmessage($msg, $status); redirect(URL_SMS_GATEWAYS, REFRESH); } else { $this->data['sms_gateway_details']= $sms_gateway_details; $this->data['activemenu'] = "master_settings"; $this->data['actv_submenu'] = 'sms_gateways'; $this->data['pagetitle'] = $sms_gateways[0]->sms_gateway_name; $this->data['content'] = PAGE_SMS_UPDATE_FIELD_VALUES; $this->_render_page(TEMPLATE_ADMIN, $this->data); } } else { redirect(URL_SMS_GATEWAYS); } } else if (isset($_POST['update_sms_gateway'])) { if (DEMO) { $this->prepare_flashmessage(get_languageword('CRUD_operations_disabled_in_DEMO_version'), 2); redirect(URL_SMS_GATEWAYS); } $field_values = $this->input->post(); foreach ($field_values as $field_id => $val) { $fld_id = explode('_', $field_id); if (is_array($fld_id) && isset($fld_id[1])) { $data = array(); $data = array( 'field_output_value' => $val, 'updated' => date('Y-m-d H:i:s')); $where = array('field_id' => $fld_id[1]); $this->base_model->update_operation($data, TBL_SETTINGS_FIELDS, $where); unset($data, $where); } } $msg .= get_languageword('details_updated_successfully'); $status=0; $this->prepare_flashmessage($msg, $status); redirect(URL_SMS_GATEWAYS, REFRESH); } else { redirect(URL_SMS_GATEWAYS); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, sms $sms)\n {\n //\n }", "public function update_sender()\n\t{\n\t\t$email = $this->input->post('email');\n\t\t$sms = $this->input->post('sms');\n\n\t\tif($email!=NULL){\n\t\t\t$data = array(\n\t\t\t\t'deposit' =>$this->input->post('deposit'),\n\t\t\t\t'transfer' =>$this->input->post('transfer'),\n\t\t\t\t'withdraw' =>$this->input->post('withdraw'),\n\t\t\t\t'payout' =>$this->input->post('payout'),\n\t\t\t\t'commission' =>$this->input->post('commission'),\n\t\t\t\t'team_bonnus' =>$this->input->post('team_bonnus'),\n\t\t\t);\n\n\t\t\t$this->db->where('method',$email)->update('sms_email_send_setup',$data);\n\t\t}\n\t\tif($sms!=NULL){\n\t\t\t$data = array(\n\t\t\t\t'deposit' =>$this->input->post('deposit'),\n\t\t\t\t'transfer' =>$this->input->post('transfer'),\n\t\t\t\t'withdraw' =>$this->input->post('withdraw'),\n\t\t\t\t'payout' =>$this->input->post('payout'),\n\t\t\t\t'commission' =>$this->input->post('commission'),\n\t\t\t\t'team_bonnus' =>$this->input->post('team_bonnus'),\n\t\t\t);\n\n\t\t\t$this->db->where('method',$sms)->update('sms_email_send_setup',$data);\n\t\t}\n\t\t$this->session->set_flashdata('message',display('update_successfully'));\n\t\tredirect('backend/dashboard/setting/email_sms_setting');\n\t}", "function update_sms_field_values($sms_gateway_id='')\n\t{\t\t\n\t\tif($this->input->post()){\n\t\t\t$this->check_isdemo(URL_SMS_GATEWAYS);\n\t\t\t$field_values = $this->input->post();\n\t\t\t//echo \"<pre>\";\n\t\t\t//print_r($field_values); die();\n\t\t\tforeach($field_values as $field_id => $val) {\n\t\t\t\t$fld_id = explode('_',$field_id);\n\t\t\t\tif(is_array($fld_id) && isset($fld_id[1])){\n\t\t\t\t\t$inputdata = array(\n\t\t\t\t\t\t'field_output_value' => $val,\n\t\t\t\t\t\t'updated' => date('Y-m-d H:i:s'),\n\t\t\t\t\t);\n\t\t\t//\techo $fld_id[1];\t\n\t\t\t\t$where = array('field_id' => $fld_id[1]);\n\t\t\t//\tdie();\n\t\t\t\t$this->base_model->update_operation( $inputdata, TBL_SETTINGS_FIELDS, $where );\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t\t\n\t\t\t$msg = (isset($this->phrases['updated successfully'])) ? $this->phrases['updated successfully'] : \"Updated Successfully\";\n\t\t $this->prepare_flashmessage($msg, 0);\n redirect(URL_SMS_GATEWAYS, REFRESH);\n\t\t}\n\t\tif(empty($sms_gateway_id)){\n\t\t\t $msg = (isset($this->phrases['record not found'])) ? $this->phrases['record not found'] : \"Record not found\";\n\t\t $this->prepare_flashmessage($msg, 2);\n redirect(URL_SMS_GATEWAYS, REFRESH);\n\t\t}\n\t\t$sms_gateway_details = $this->base_model->fetch_records_from(TBL_SETTINGS_FIELDS,array('sms_gateway_id'=>$sms_gateway_id));\n\t\t$sms_gateways \t\t\t\t\t\t= $this->base_model->fetch_records_from(\n\t\tTBL_SMS_GATEWAYS,array('sms_gateway_id'=>$sms_gateway_id));\n\t\tif(empty($sms_gateway_details) || empty($sms_gateways)){\n\t\t\t$msg = (isset($this->phrases['record not found'])) ? $this->phrases['record not found'] : \"Record not found\";\n\t\t $this->prepare_flashmessage($msg, 2);\n redirect(URL_SMS_GATEWAYS, REFRESH);\n\t\t}\n\t\t\t\t\n\t\t$this->data['sms_gateway_details']\t\t= $sms_gateway_details;\n\t\t$this->data['active_class'] \t\t\t= ACTIVE_MASTER_SETTINGS;\n\t\t$this->data['title'] \t\t\t\t\t= $sms_gateways[0]->sms_gateway_name; \n\t\t$this->data['content'] \t\t\t\t\t= 'sms_update_field_values';\n\t\t$this->_render_page(TEMPLATE_ADMIN, $this->data);\n\t}", "public function update_sms_gateway()\n\t{\n\t\t$sms = $this->input->post('es_id');\n\t\t\n\t\t$pass = '';\n\t\t$password = $this->db->select('password')->from('email_sms_gateway')->where('es_id', 2)->get()->row();\n\t\t\n\t\tif($password->password == base64_decode($this->input->post('password'))){\n\t\t $pass = $password->password;\n\t\t \n\t\t}else{\n\t\t $pass = $this->input->post('password');\n\t\t \n\t\t}\n\n\t\t$data = array(\n\t\t\t'gatewayname' \t=>$this->input->post('gatewayname'),\n\t\t\t'title' \t\t=>$this->input->post('title'),\n\t\t\t'host' \t\t\t=>$this->input->post('host'),\n\t\t\t'user' \t\t\t=>$this->input->post('user'),\n\t\t\t'userid' \t\t=>$this->input->post('userid'),\n\t\t\t'password' \t\t=>$pass,\n\t\t\t'api' \t\t\t=>$this->input->post('api')\n\t\t);\n\n\t\t$this->db->where('es_id',$sms)->update('email_sms_gateway',$data);\n\n\t\t\n\t\t$this->session->set_flashdata('message',display('update_successfully'));\n\t\t\n\t\t\n\t\tredirect('backend/dashboard/setting/sms_gateway');\n\t}", "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_sms_cellvoz($id,$pasarela,$user,$password,$token,$apikey){\n $sql=\"UPDATE application_settings set sms_gateway='$pasarela', cell_user_voz='$user', cell_pass_voz='$password', cell_TOK_voz='$token', cell_akey_voz='$apikey' where id=$id\";\n //echo $sql.\"<br>\";\n $resultado=$this->consultar($sql);\n return $resultado;\n }", "function updateSMS($requestID){\n\t$processed = 32;\n\t$subLogs=\"About to update \". count($processed) .\" requests\";\n\tlogSubs($subLogs, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t\n\tfor ($x=0;$x<(count($requestID)); $x++){\n\t\t$sql_update = \"update incomingRequests set processed = $processed where requestID = $requestID[$x] limit 1\";\n\t\t$result = mysql_query($sql_update);\n\t\t//log db errors\n\t\tif(!$result){\n\t\t\t$dbErr = \"SQL Error: \".mysql_error().\"SQL CODE: \".$sql_update;\n\t\t\tflog($dbErr, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t\t}else{\n\t\t\t$subLogs = \"Just finished processing a new request. SQL CODE: \".$sql_update;\n\t\t\tlogSubs($subLogs, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t\t}\n\t\t\n\t}\n\t\n}", "function send_sms_or_email($inputarray1 = array(), $inputarray2 = array(), $insert = 1, $update = 0, $from_modaration = 0) {\n $choice1 = isset($inputarray1['choice']) ? $inputarray1['choice'] : '';\n $message_id = isset($inputarray1['message_id']) ? $inputarray1['message_id'] : '';\n $smsto = isset($inputarray1['smsto']) ? $inputarray1['smsto'] : '';\n $message = isset($inputarray1['message']) ? $inputarray1['message'] : '';\n\n $name = isset($inputarray2->name) ? $inputarray2->name : '';\n $fatheremail = isset($inputarray2->father_email) ? $inputarray2->father_email : '';\n $fatheremobile = isset($inputarray2->father_mobile) ? $inputarray2->father_mobile : '';\n $email = isset($inputarray2->email) ? $inputarray2->email : '';\n $mobile = isset($inputarray2->mobile) ? $inputarray2->mobile : '';\n $db_students_number = isset($inputarray2->students_number) ? $inputarray2->students_number : '';\n $db_user_name = isset($inputarray2->name) ? $inputarray2->name : '';\n\n //chcking string replace starts here\n //first prepare array of the possible place holders\n $vars = array('%sname%' => $name);\n $message = str_replace(array_keys($vars), $vars, $message);\n //log_message('error', 'composed message: '.$message);\t\t\t\n //chcking string replace ends here\n\n $requireddata = array();\n $requireddata['message'] = $message;\n\n\n //insert the data in student_messages table\n $db_messagetype = '';\n $db_student_id = isset($inputarray2->user_id) ? $inputarray2->user_id : '';\n $db_status = '';\n if (IS_MODARATION_REQUIRES == TRUE && $from_modaration == 0) {\n $db_status = 'modaration';\n }\n\n\n $db_sentto = '';\n $db_message_error = 'no_error';\n if ($choice1 == 1) {\n $db_messagetype = 'email';\n //email\n //now check for parent or student\n if ($smsto == 'parent') {\n //now take parent email\n $requireddata['contactpoint'] = $fatheremail;\n $db_sentto = $personval = 'parent';\n } else if ($smsto == 'student') {\n //now take student email\n $requireddata['contactpoint'] = $email;\n $db_sentto = $personval = 'student';\n } else {\n return;\n }\n\n if (!empty($requireddata['contactpoint'])) {\n if ($db_status == '') {\n $db_status = 'sent';\n $this->load->library('my_email_lib');\n $this->my_email_lib->html_email($requireddata['contactpoint'], $message);\n //now send email\n //log_message('error', 'email sending to'.$requireddata['contactpoint']);\n }\n } else {\n\n //if($db_status=='')\n //{\n $db_status = 'failed';\n //}\n\n if ($personval == 'student') {\n $db_message_error = 'stu_email';\n } else {\n $db_message_error = 'parent_email';\n }\n log_message('error', 'no email present for ' . $personval);\n }\n //now send email using email library\n } else if ($choice1 == 2) {\n $db_messagetype = 'sms';\n //now check for parent or student\n if ($smsto == 'parent') {\n //now take parent mobile number\n $requireddata['contactpoint'] = $fatheremobile;\n $db_sentto = $personval = 'parent';\n } else if ($smsto == 'student') {\n //now take student mobile\n $requireddata['contactpoint'] = $mobile;\n $db_sentto = $personval = 'student';\n } else {\n return;\n }\n\n //now send sms using sms library\t\t\t\n if (!empty($requireddata['contactpoint'])) {\n if ($db_status == '') {\n $db_status = 'sent';\n //now send sms\n //log_message('error', 'sms sending to'.$requireddata['contactpoint']);\n $this->load->library('sms_lib');\n $this->sms_lib->send_sms($requireddata['contactpoint'], $message);\n }\n } else {\n //if($db_status=='')\n //{\n $db_status = 'failed';\n //}\n if ($personval == 'student') {\n $db_message_error = 'stu_mobile';\n } else {\n $db_message_error = 'parent_mobile';\n }\n log_message('error', 'no mobile number present for ' . $personval);\n }\n } else {\n return;\n }\n if ($insert == 1) {\n $insertqstr = \"insert into student_messages(user_id,student_number,user_name,message,message_type,status,sent_to,message_error,more_info) \n\t\t\t\tvalues('\" . $db_student_id . \"','\" . $db_students_number . \"','\" . $db_user_name . \"','\" . addslashes($message) . \"','\" . $db_messagetype . \"','\" . $db_status . \"','\" . $db_sentto . \"','\" . $db_message_error . \"','\" . serialize($inputarray2) . \"')\";\n //log_message('error', 'insert str '.$insertqstr);\n $this->db->query($insertqstr);\n }\n\n if ($update == 1 && $message_id != '') {\n $updatestr = \"update student_messages set sent_date='\" . date('Y-m-d H:i:s') . \"',status='\" . $db_status . \"' where id=\" . $message_id;\n $this->db->query($updatestr);\n }\n }", "function updateFADetails(){\n\tglobal $nric,$firstName,$lastName,$dob,$address1,$address2,$poCode,\n$homeNum,$handphoneNum,$email,$description;\n\tglobal $faID;\n\t\n\tinitializeDB();\n\t$command = $_SESSION['connection']->prepare(\"UPDATE FADetails SET nric=?,firstName=?,lastName=?,dob=?,address1=?,address2=?,poCode=?,homeNum=?,handphoneNum=?,email=?,description=? WHERE faID=?;\");\n\t$command->bind_param('ssssssiiissi',$nric,$firstName,$lastName,$dob,$address1,$address2,$poCode,$homeNum,$handphoneNum,$email,$description,$faID);\n\t\n\t$command->execute();\n}", "public function update() {\n $objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso();\n $consulta = $objetoAccesoDato->RetornarConsulta(\n\t\t\t\t\"UPDATE `mensajes` SET \n\t\t\t\t`nombre` = :nombre,\n\t\t\t\t`email` = :email, \n\t\t\t\t`idArticulo` = :idArticulo, \n\t\t\t\t`precio_lista` = :precio_lista,\n\t\t\t\t`cantidad` = :cantidad\n\t\t\t\tWHERE `idMensaje` = :idMensaje\");\n \n\t\t\t$consulta->bindValue(':idMensaje', $this->idMensaje, PDO::PARAM_STR);\n\t\t\t$consulta->bindValue(':nombre', $this->nombre, PDO::PARAM_STR);\n\t\t\t$consulta->bindValue(':email', $this->email, PDO::PARAM_STR);\n\t\t\t$consulta->bindValue(':telefono', $this->telefono, PDO::PARAM_STR);\n\t\t\t$consulta->bindValue(':mensaje', $this->mensaje, PDO::PARAM_STR);\n\t\t\t$consulta->bindValue(':estado', $this->estado, PDO::PARAM_STR);\n\n return $consulta->execute();\n\t}", "public function updateNotyf()\n {\n $id = $_POST['id_not'];\n $subject = $_POST['subject'];\n $notification = $_POST['notification'];\n\n $sql = \"UPDATE `notifications`\";\n $sql.= \" SET subject='$subject', notification='$notification'\";\n $sql.= \" WHERE id='$id'\";\n $con = $this->db();\n $res = $con->query($sql);\n if($res){\n return 'Success';\n }else{\n return \"Db error\";\n }\n\n }", "public function updateSmsSetting(Request $request)\n {\n //\n }", "function updateField() {\n DATABASE::INIT_TABLE($this->database, $this->table);\n $fname = $this->urlParam('fname');\n $fvalue = $this->urlParam('fvalue');\n $id = $this->urlParam('id');\n DATABASE::UPDATE($this->table, [$fname], [$fvalue], $id);\n }", "public function edit(sms $sms)\n {\n //\n }", "public function sendstaffsms(){\n\n if($this->IS_DEMO){\n $this->session->set_flashdata('error', $this->config->item('app_demo_edit_err'));\n redirect($this->LIB_CONT_ROOT.'settings', 'refresh'); \n }\n\n set_time_limit(3600);\n $redir=$this->CONT_ROOT.'?tab=staffsms';\n $form=$this->input->safe_post();\n $required=array('message');\n foreach ($required as $key) {\n if(!isset($form[$key]) || empty($form[$key])){\n $this->session->set_flashdata('error', 'Please enter message');\n redirect($redir);\n }\n }\n $mobile=$this->SETTINGS[$this->system_setting_m->_SMS_API_USERNAME];\n $apikey=$this->SETTINGS[$this->system_setting_m->_SMS_API_KEY];\n $mask=$this->SETTINGS[$this->system_setting_m->_SMS_MASK];\n if(!$this->is_valid_params($mobile,$apikey,$mask)){\n $this->session->set_flashdata('error', 'Invalid api details. Please update api details first!!!');\n redirect($redir);\n }\n //////////////////////////////////////////////////////////////////\n $filter=array();\n if(isset($form['staff_id']) && !empty($form['staff_id'])){$filter['staff_id']=$form['staff_id'];}\n $teachers=$this->staff_m->get_rows($filter,array('select'=>'mid,staff_id,name,mobile,father_name,date'));\n\n if(count($teachers)<1){\n $this->session->set_flashdata('error', 'There are no staff for selected criteria!!!');\n redirect($redir);\n }\n $message=htmlspecialchars_decode($form['message']);\n $i=0;\n $failed=0;\n $new_pass='';\n $ch=$this->open_curl();\n foreach ($teachers as $row) { \n $to=$row['mobile'];\n if(strlen($row['mobile'])>8){\n $i++; \n ///////////////////////////////////////\n if(strpos($message, \"{NEWPASSWORD}\") !== false){\n $new_pass=mt_rand(11111,99999);\n $this->staff_m->save(array('password'=>$this->staff_m->hash($new_pass)),$row['mid']);\n }\n ///////////////////////////////////////\n //conversion keys\n $key_vars=array(\n '{NAME}'=>$row['name'],\n '{ID}'=>$row['staff_id'],\n '{NEWPASSWORD}'=>$new_pass\n );\n ////////////////////////////////////////\n $sms=strtr($message, $key_vars);\n $this->send_message($ch,$mobile,$apikey,$mask,$to,$sms);\n }else{\n $failed++;\n } \n }\n $this->close_curl($ch);\n ////////////////////////////////////////////////////////////////////////////////\n $this->session->set_flashdata('success', 'Message sent to '.$i.' teachers and failed for '.$failed.' teachers.');\n redirect($redir);\n }", "public function SQL_UPDATE() {\r\n\t}", "function update_driver_details_in_sent_manifesto()\r\n\t\t{\r\n\t\t\t$user=$this->erpm->auth();\r\n\t\t\tif(!$_POST)\r\n\t\t\t\tdie;\r\n\t\t\t$send_sms=array();\r\n\t\t\t$manifesto_sentid=$this->input->post('manifesto_sent_id');\r\n\t\t\t$start_km=$this->input->post('start_km');\r\n\t\t\t$amount=$this->input->post('amount');\r\n\t\t\t$send_sms[]=$territory_manager=$this->input->post('tm');\r\n\t\t\t$send_sms[]=$bussiness_executive=$this->input->post('BE');\r\n\t\t\t$send_sms=array_filter($send_sms);\r\n\t\t\t\r\n\t\t\tif($manifesto_sentid)\r\n\t\t\t{\r\n\t\t\t\t\t$this->db->query(\"update pnh_m_manifesto_sent_log set modified_on=?,modified_by=?,start_meter_rate=?,amount=?,status=3 where id=?\",array(cur_datetime(),$user['userid'],$start_km,$amount,$manifesto_sentid));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//update shiped status\r\n\t\t\t\t\t$manifesto_id_det=$this->db->query(\"select manifesto_id from pnh_m_manifesto_sent_log where id=?\",$manifesto_sentid)->result_array();\r\n\t\t\t\t\t$manifesto_id=$manifesto_id_det[0]['manifesto_id'];\r\n\t\t\t\t\t\r\n\t\t\t\t\t$prama3=array();\r\n\t\t\t\t\t$prama3['shipped']=1;\r\n\t\t\t\t\t$prama3['shipped_on']=cur_datetime();\r\n\t\t\t\t\t$prama3['shipped_by']=$user['userid'];\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->db->where('inv_manifesto_id',$manifesto_id);\r\n\t\t\t\t\t$this->db->update(\"shipment_batch_process_invoice_link\",$prama3);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// check if the invoice is return invoice and update shipped status in return module \r\n\t\t\t\t\t$return_inv_list_res = $this->db->query(\"select invoice_no from shipment_batch_process_invoice_link where inv_manifesto_id = ? and is_returned = 1 \",$manifesto_id);\r\n\t\t\t\t\tif($return_inv_list_res->num_rows())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tforeach($return_inv_list_res->result_array() as $return_inv)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$return_id = $this->db->query(\"select return_id from pnh_invoice_returns where invoice_no = ? \",$return_inv['invoice_no'])->row()->return_id;\r\n\t\t\t\t\t\t\t$this->db->query('update pnh_invoice_returns_product_link set is_shipped = 1 where return_id = ? ',$return_id);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//sent a sms\r\n\t\t\t\t\t$sent_invoices=$this->db->query('select a.sent_invoices,b.name,a.hndleby_name,b.contact_no,a.hndleby_contactno,a.hndleby_vehicle_num,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tc.name as bus_name,d.contact_no as des_contact,b.job_title2,a.id \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom pnh_m_manifesto_sent_log a\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft join m_employee_info b on b.employee_id = a.hndleby_empid\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft join pnh_transporter_info c on c.id=a.bus_id\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft join pnh_transporter_dest_address d on d.id=a.bus_destination and d.transpoter_id=a.bus_id\r\n\t\t\t\t\t\t\t\t\t\t\t\t\twhere a.id=?',$manifesto_sentid)->result_array();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$invoices=$sent_invoices[0]['sent_invoices'];\r\n\t\t\t\t\t$hndbyname=$sent_invoices[0]['name'];\r\n\t\t\t\t\t$hndbycontactno=$sent_invoices[0]['contact_no'];\r\n\t\t\t\t\t$vehicle_num=$sent_invoices[0]['hndleby_vehicle_num'];\r\n\t\t\t\t\tif(!$hndbyname)\r\n\t\t\t\t\t\t$hndbyname=$sent_invoices[0]['hndleby_name'];\r\n\t\t\t\t\tif(!$hndbyname)\r\n\t\t\t\t\t\t$hndbyname=$sent_invoices[0]['bus_name'].' Travels';\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!$hndbycontactno)\r\n\t\t\t\t\t\t$hndbycontactno=$sent_invoices[0]['hndleby_contactno'];\r\n\t\t\t\t\tif(!$hndbycontactno)\r\n\t\t\t\t\t\t$hndbycontactno=$sent_invoices[0]['des_contact'];\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->db->query(\"update pnh_invoice_transit_log set status = 1,logged_on=now() where sent_log_id = ? and status = 0 \",$manifesto_sentid);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($this->db->affected_rows())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sms_msg='';\r\n\t\t\t\t\t\tif($sent_invoices[0]['job_title2']=='7')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$sms_msg = 'Dear [To],Shipment for the town [Town_name] sent via Driver '.ucwords($hndbyname).'('.$hndbycontactno.') vehicle no ['.$vehicle_num.'],Manifesto id: '.$sent_invoices[0]['id'];\r\n\t\t\t\t\t\t}else if($sent_invoices[0]['job_title2']=='6'){\r\n\t\t\t\t\t\t\t$sms_msg = 'Dear [To],Shipment for the town [Town_name] sent via Fright-Cordinator '.ucwords($hndbyname).'('.$hndbycontactno.') ,Manifesto id: '.$sent_invoices[0]['id'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// send sms to tm and exec fc for towns\r\n\t\t\t\t\t\t$employees_list=$this->erpm->get_emp_by_territory_and_town($invoices);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($employees_list)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tforeach($employees_list as $emp)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$emp_name=$emp['name'];\r\n\t\t\t\t\t\t\t\t\t$emp_id=$emp['employee_id'];\r\n\t\t\t\t\t\t\t\t\t$town_name=$emp['town_name'];\r\n\t\t\t\t\t\t\t\t\t$territory_id=$emp['territory_id'];\r\n\t\t\t\t\t\t\t\t\t$town_id=$emp['town_id'];\r\n\t\t\t\t\t\t\t\t\t$job_title=$emp['job_title2'];\r\n\t\t\t\t\t\t\t\t\t$send_sms_status=$emp['send_sms'];\r\n\t\t\t\t\t\t\t\t\t$emp_contact_nos = explode(',',$emp['contact_no']);\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif(!in_array($job_title,$send_sms))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$sms_msg=str_ireplace('[To]',$emp_name,$sms_msg);\r\n\t\t\t\t\t\t\t\t\t$sms_msg=str_ireplace('[Town_name]',$town_name,$sms_msg);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$temp_emp=array();\t\r\n\t\t\t\t\t\t\t\t\tforeach($emp_contact_nos as $emp_mob_no)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif(isset($temp_emp[$emp_id]))\r\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t$temp_emp[$emp_id]=1;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif($send_sms_status)\r\n\t\t\t\t\t\t\t\t\t\t\t$this->erpm->pnh_sendsms($emp_mob_no,$sms_msg);\r\n\t\t\t\t\t\t\t\t\t\t//\techo $emp_mob_no,$sms_msg;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm=array();\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['emp_id']=$emp_id;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['contact_no']=$emp_mob_no;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['type']=4;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['territory_id']=$territory_id;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['town_id']=$town_id;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['grp_msg']=$sms_msg;\r\n\t\t\t\t\t\t\t\t\t\t$log_prm['created_on']=cur_datetime();\r\n\t\t\t\t\t\t\t\t\t\t$this->erpm->insert_pnh_employee_grpsms_log($log_prm);\r\n\t\t\t\t\t\t\t\t\t}\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}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t$this->session->set_flashdata(\"erp_pop_info\",\"Your selected invoices are shipped\");\r\n\t\t\t}\r\n\t\t\t\tredirect($_SERVER['HTTP_REFERER']);\r\n\t}", "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 jx_update_emp_sms_status()\r\n\t{\r\n\t\t$this->erpm->auth();\r\n\t\tif(!$_POST)\r\n\t\t\tdie();\r\n\t\t$status=$this->input->post('status');\r\n\t\t$emp_id=$this->input->post('emp_id');\r\n\t\t$output=array();\r\n\t\t\r\n\t\t$this->db->query(\"update m_employee_info set send_sms=? where employee_id=?\",array($status,$emp_id));\r\n\t\t\r\n\t\tif($this->db->affected_rows())\r\n\t\t{\r\n\t\t\t$output['status']='success';\r\n\t\t\t$output['message']='sms status changed';\r\n\t\t}else{\r\n\t\t\t$output['status']='error';\r\n\t\t\t$output['message']='sms status not changed';\r\n\t\t}\r\n\t\t\r\n\t\techo json_encode($output);\r\n\t}", "function update() {\n\t\t$sql = \"UPDATE cost_detail \n\t\t\t\tSET\tcd_start_time=?, cd_end_time=?, cd_hour=?, cd_minute=?, cd_cost=?, cd_update=?, cd_user_update=? \n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\t\n\t\t$this->ffm->query($sql, array($this->cd_start_time, $this->cd_end_time, $this->cd_hour, $this->cd_minute, $this->cd_cost, $this->cd_update, $this->cd_user_update, $this->cd_fr_id, $this->cd_seq));\t\n\t}", "function message_update($data,$id)\n\t{\n\t$this->db->where('message_id', $id);\n\t$this->db->update('message', $data);\n\t}", "function updateListM($data) {\n $this->db->where('sno', $data['sno']);\n $result = $this->db->update('all_list', $data);\n if (!$result) {\n echo \"Unable to Update. Inform Administrator !\";\n } else {\n echo \"Update Successfull\";\n }\n }", "public function update_emp_mobile(){\n\t\t// {\t\t\t\t\n\n\t\t// \t$mmm=$this->input->post('aaa_'.$employee_id);\n\t\t// \t$aaa=$this->input->post('aaa_201613');\n\t\n\n\t\t// \techo \"$employee_id | aaa_$employee_id <br>\";\n\n\t\t// \t// $query=$this->db->query(\"update employee_info set mobile_1='\".$mobile_1.\"',mobile_2='\".$mobile_2.\"',mobile_3='\".$mobile_3.\"',mobile_4='\".$mobile_4.\"', where employee_id='\".$employee_id.\"' \");\n\t\t// }\n\n\t}", "public function updateCuenta($id_empresa, $saldo_carga, $saldo_mail, $saldo_sms ){\n $cuenta_corriente = $this->getCuentaEmpresa($id_empresa);\n\n $sql=\"INSERT INTO compra SET cantidad_sms =\" . $saldo_sms .\", cantidad_mail = \" . $saldo_mail . \", fecha = NOW(), valor = \" . $saldo_carga .\", id_cuenta_corriente =\" . $cuenta_corriente['id_cuenta_corriente'] . \", cantidad_creditos=\". ($saldo_sms + $saldo_mail);\n $this->admDB->query($sql);\n\n $mail_nuevo_total = ( $this->getSaldoEnviosMailHistorico($id_empresa) - $this->creditosConsumidosMail($id_empresa) );\n $sms_nuevo_total = ( $this->getSaldoEnviosSmsHistorico($id_empresa) - $this->creditosConsumidosSms($id_empresa) ) ;\n\n $saldo = $mail_nuevo_total + $sms_nuevo_total; \n $consulta = \"UPDATE cuenta_corriente SET saldo_credito = \" . $saldo . \",saldo_mail=\" . $mail_nuevo_total . \", saldo_sms=\" . $sms_nuevo_total . \" WHERE id_empresa = \" . $id_empresa;\n\n\n $result = $this->admDB->query($consulta);\n $aux = $result->num_rows;\n\n if ($aux > 0) {\n if ($saldo_sms > 0) {\n $this->restablecerSMS($id_empresa);\n }\n\n if ($saldo_mail > 0) {\n $this->restablecerMail($id_empresa);\n }\n\n return true;\n }else{\n return false;\n }\n \n }", "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 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 }", "function updateNotification($msg) {\n\t\t$this->_conn->modify(\"UPDATE notifications SET title = :title, body = :body, sent = :sent WHERE id = :id\",\n array(\n ':title' => array($msg['title'], PDO::PARAM_STR),\n ':body' => array($msg['body'], PDO::PARAM_STR),\n ':sent' => array($msg['sent'], PDO::PARAM_BOOL),\n ':id' => array($msg['id'], PDO::PARAM_INT)\n ));\n\t}", "function update_fe_traman($SCTECIAA,$SCTEPDC,$SCTFECEM,$SCTESERI,$SCTECORR,$ESTADO,$SCTCSTSB){\n\n\t\tinclude(\"application/config/conexdb_db2.php\");\n\t\t$codcia=$this->session->userdata('codcia'); \n\t\t$pgm='BAJADOCWEB';\n\t\t$f= gmdate(\"d-m-Y\", time() - 18000);\n\t\t$dd=substr($f, 0,2);\n\t\t$dm=substr($f, 3,2);\n\t\t$da=substr($f, 6,4);\n\t\t$fecha=$da.$dm.$dd;\n\t\t$hh= gmdate(\"H-i-s\", time() - 18000);\n\t\t$h=substr($hh, 0,2);\n\t\t$m=substr($hh, 3,2);\n\t\t$s=substr($hh, 6,2);\n\t\t$hora=$h.$m.$s;\n\t\t$sql = \"update LIBPRDDAT.SNT_CTRAM SET SCTCSTST='\".$ESTADO.\"',SCTCUSUA='MMUSRSCD', SCTCFECA=\".$fecha.\", SCTCHORA=\".$hora.\", SCTCPGMA='PGMWEBFE', SCTCSTSB='\".$SCTCSTSB.\"', SCTCUSUB='MMUSRSCD', SCTCFECB=$fecha, SCTCHORB=$hora, SCTCPGMB='\".$pgm.\"' WHERE SCTECIAA='\".$SCTECIAA.\"' and SCTEPDCA='\".$SCTEPDC.\"' and SCTESERI='\".$SCTESERI.\"' and SCTECORR='\".$SCTECORR.\"' and SCTFECEM='\".$SCTFECEM.\"' and SCTCSTS ='I' and SCTCSTST ='N'\";\n\n\t\t$res =odbc_exec($dbconect, $sql) or die(\"<p>\" . odbc_errormsg());\t\t\t\t\n\t\tif (!$res):$res = 0;\n\t\t\telse: $res = 1;\n\t\t\tendif;\n\t\t\treturn $res;\n\t\t\t\n\t\t}", "public function manualSmsotpsend(Request $request)\n {\n $this->validate($request, [\n 'orderid' => 'required',\n ]);\n\n $currentdtaetime=date(\"Y-m-d H:i:s\", strtotime(\"+30 minutes\"));\n $mainorderinfo = Ordercollection::where('id',$request->orderid)->where('okupdate','0')->where('totalamount','!=','0')->where('verifiedmobilecode','!=','')->get();\n if(count($mainorderinfo) > 0){\n $mainorderinfo=$mainorderinfo->first();\n $updateorders=Ordercollection::where('id',$request->orderid)->where('okupdate','0')->where('totalamount','!=','0')->where('verifiedmobilecode','!=','')->\n update(['otpferifiedat'=>$currentdtaetime]);\n \n\n\n \n\n $outletidd=$mainorderinfo->outletid;\n $marchantidinfo = Marchantlist::where('id',$outletidd)->get(['currentavailable'])->first();\n $newcurrentavailable=$marchantidinfo->currentavailable;\n $newsms=\"Dear+Merchant,for+your+UBL+order+reff.+invoice+\".$mainorderinfo->invoiceid.\"+your+loan+amount=\".$mainorderinfo->dueamount.\"FairBanc+credit+Available=\".$newcurrentavailable.\"Tk+and+Confirmation+OTP=\".$mainorderinfo->verifiedmobilecode;\n \n $newurls='http://alphasms.biz/index.php?app=ws&u=indexer&h=351794a3122fab8ff8bbc78b8092797b&op=pv&to='.$mainorderinfo->outletmobileno.'&msg='.$newsms;\n\n \n $curl = curl_init();\n // Set some options - we are passing in a useragent too here\n curl_setopt_array($curl, array(\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_URL => $newurls,\n CURLOPT_USERAGENT => 'SMS mobile Request'\n ));\n // Send the request & save response to $resp\n $resp = curl_exec($curl);\n // Close request to clear up some resources\n curl_close($curl);\n\n if($resp){\n $newsavedta= new Manualotpsmssent;\n $newsavedta->sentbyid=$request->user()->id;\n $newsavedta->sentfororderid=$request->orderid;\n $newsavedta->invoiceidfor=$mainorderinfo->invoiceid;\n $newsavedta->updated_by=$request->user()->id;\n $newsavedta->save();\n }\n \n return response()->json([\n 'message' => 'SMS sent complete'\n ], 200);\n\n\n }\n return response()->json([\n 'response' => 'error',\n 'message' => 'Problem in data'\n ], 400); \n \n }", "public function saveEditMobile()\n {\n try {\n $_4g = null;\n if ($_POST['e4g'] === \"Có\") {\n $_4g = 1;\n } else {\n $_4g = 0;\n }\n $query = \"UPDATE {$this->table} SET tenDienThoai = :ten, mauSac = :mausac, soLuongTrongKho = :soluong, giaNhap = :gianhap, giaBan = :giaban, giamGia = :giamgia, CPU = :cpu, gpu = :gpu, RAM = :ram, boNhoTrong = :bonhotrong, heDieuHanh = :hedieuhanh, manHinh = :manhinh, cameraSau = :camerasau, cameraTruoc = :cameratruoc, dungLuongPin = :pin, sacNhanh = :sac, SIM = :sim, 4G = :_4g, NhaSanXuat_idNhaSanXuat = :nsx, theloai_idTheloai = :theloai, moTa = :mota WHERE idMobile = :idMobile\";\n $pre = $this->db->prepare($query);\n $pre->execute([\n ':ten' => $_POST['eten'],\n ':mausac' => $_POST['emausac'],\n ':soluong' => intval($_POST['esoluong']),\n ':gianhap' => intval($_POST['egianhap']),\n ':giaban' => intval($_POST['egiaban']),\n ':giamgia' => intval($_POST['egiamgia']),\n ':cpu' => $_POST['ecpu'],\n ':gpu' => $_POST['egpu'],\n ':ram' => intval($_POST['eram']),\n ':bonhotrong' => $_POST['ebonhotrong'],\n ':hedieuhanh' => $_POST['ehedieuhanh'],\n ':manhinh' => $_POST['emanhinh'],\n ':camerasau' => $_POST['ecamerasau'],\n ':cameratruoc' => $_POST['ecameratruoc'],\n ':pin' => $_POST['epin'],\n ':sac' => $_POST['esacpin'],\n ':sim' => $_POST['esim'],\n ':_4g' => $_4g,\n ':nsx' => $_SESSION['nsxId'],\n ':theloai' => $_SESSION['theloaiId'],\n ':mota' => $_POST['emota'],\n ':idMobile' => intval($_POST['idMobile'])\n ]);\n $count = $pre->rowCount();\n if ($count == 0) {\n // Chua thay doi thong tin\n return false;\n } else {\n // Cap nhat thanh cong\n return true;\n }\n } catch (PDOException $e) {\n echo \"<br />\" . $e->getMessage();\n return $e->getMessage();\n }\n return true;\n }" ]
[ "0.62799895", "0.62445015", "0.62236005", "0.619235", "0.60991555", "0.6058453", "0.605436", "0.6047332", "0.604654", "0.60398275", "0.60027236", "0.5894723", "0.5882414", "0.58315843", "0.5830368", "0.5824509", "0.5823195", "0.5793476", "0.57931787", "0.57539237", "0.5750568", "0.57416886", "0.57152486", "0.5666189", "0.56466675", "0.56426847", "0.56118155", "0.55949575", "0.5587784", "0.55847913" ]
0.6417281
0
// __construct // __construct() Gets payment information Gets the payment information using a StatementSelect and outputs to the page using the bypass method.
function __construct ($actAccount) { //Create the array of columns required for the query $arrColumns = Array(); $arrColumns['Id'] = "Id"; $arrColumns['PaidOn'] = "DATE_FORMAT(PaidOn, '%e/%m/%Y')"; $arrColumns['Type'] = "PaymentType"; $arrColumns['Amount'] = "Amount"; $arrColumns['Applied'] = "Amount-Balance"; $arrColumns['Balance'] = "Balance"; $arrColumns['Status'] = "Status"; //Pull information and store it $selSelect = new StatementSelect("Payment", $arrColumns,"Account = <Id>", 'Payment.PaidOn DESC'); $arrWhere = Array('Id' => $actAccount->Pull ('Id')->getValue()); $intCount = $selSelect->Execute ($arrWhere); $arrResults = $selSelect->FetchAll ($this); foreach ($arrResults as $intKey=>$arrResult) { $arrResults[$intKey]['TypeName'] = GetConstantDescription($arrResults[$intKey]['Type'], 'payment_type'); // fixing reversed payments if($arrResults[$intKey]['Status'] == 250) { $arrResults[$intKey]['Applied'] = 0; $arrResults[$intKey]['StatusName'] = GetConstantDescription($arrResults[$intKey]['Status'], 'payment_status'); } } //Insert into the DOM Document $GLOBALS['Style']->InsertDOM($arrResults, 'Payments'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($payment)\n {\n //\n $this->payment = $payment;\n }", "public function __construct($payment)\n {\n $this->payment = $payment;\n }", "public function __construct($payment)\n {\n $this->payment = $payment;\n }", "function __construct ()\n\t\t{\n\t\t\tparent::__construct ('Payments', 'Payment', 'Payment');\n\t\t\t$this->Order ('PaidOn', FALSE);\n\t\t}", "function PaymentGateway()\n\t\t{\n\t\t\t// exit(\"Cannot instantiate this class directly\");\n\t\t}", "function paypal_class() {\n \n // initialization constructor. Called when class is created.\n \n $this->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';\n //$this->paypal_url = 'https://www.paypal.com/cgi-bin/webscr';\n \n $this->last_error = '';\n \n $this->ipn_log_file = '.ipn_results.log';\n $this->ipn_log = true; \n $this->ipn_response = '';\n \n // populate $fields array with a few default values. See the paypal\n // documentation for a list of fields and their data types. These defaul\n // values can be overwritten by the calling script.\n\n $this->add_field('rm','2'); // Return method = POST\n $this->add_field('cmd','_xclick'); \n \n }", "public function processPayment();", "public function createPayment()\n\t{\n\n\t}", "public function payment_scripts() {\n \n\t\t\n \n\t \t}", "abstract protected function handlePayment();", "function performPaymentInitialization() {\r\n\t\t;\r\n\t\t$request = \"\";\r\n\t\t$response = \"\";\r\n\t\t$requestbuffer;\r\n\t\t$xmlData = \"\";\r\n\t\t$hm;\r\n\t\ttry {\r\n\t\t\tif ($request != null) {\r\n\t\t\t\t$xmlData = $data;\r\n\t\t\t} else {\r\n\t\t\t\t$keyParser = new KeyStore ();\r\n\t\t\t\t$this->key = $keyParser->parseKeyStore ( $this->keystorePath );\r\n\t\t\t\t$xmlData = $this->parseResource ( $this->key, $this->resourcePath, $this->alias );\r\n\t\t\t}\r\n\t\t\tvar_dump ( $xmlData );\r\n\t\t\t\r\n\t\t\tif ($xmlData != null) {\r\n\t\t\t\t$hm = $this->parseXMLRequest ( $xmlData );\r\n\t\t\t} else {\r\n\t\t\t\t$error = \"Alias name does not exits\";\r\n\t\t\t}\r\n\t\t\tvar_dump ( $hm );\r\n\t\t\t$this->key = $hm ['resourceKey'];\r\n\t\t\t// echo $this->key;\r\n\t\t\t$requestbuffer = $this->buildHostRequest ();\r\n\t\t\t$requestbuffer .= \"id=\" . $hm [\"id\"] . \"&\";\r\n\t\t\t\r\n\t\t\t$requestbuffer .= 'password=' . $hm ['password'] . \"&\";\r\n\t\t\t$webaddr = $hm ['webaddress'];\r\n\t\t\t// echo \"<br><br><br><br>\" . $requestbuffer . \"<br><br><br>\";\r\n\t\t\t$request = $requestbuffer;\r\n\t\t\tvar_dump ( $request );\r\n\t\t\t// var_dump($request);\r\n\t\t\t// var_dump($webaddr);\r\n\t\t\t$pipe = new ipayTransactionPipe ();\r\n\t\t\t// echo \"<br/>REQUEST\" . $request;\r\n\t\t\t\r\n\t\t\t$response = $pipe->performHostedTransaction ( $request, $webaddr );\r\n\t\t\tVAR_DUMP ( $response );\r\n\t\t\t// System.out.println(\"response:::::::\" + response);\r\n\t\t\tif ($response == null) {\r\n\t\t\t\t// echo \"null\";\r\n\t\t\t\t$this->error = \"Error while connecting \" . $response;\r\n\t\t\t\treturn - 1;\r\n\t\t\t} else {\r\n\t\t\t\tif ($response != null) {\r\n\t\t\t\t\t// echo \"not null\";\r\n\t\t\t\t\t$this->setpaymentId ( $response [0] );\r\n\t\t\t\t\t$this->setpaymentPage ( $response [1] );\r\n\t\t\t\t\t// $this->paymentPage = $response[1];\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->error = \"Error while connecting \" + $response;\r\n\t\t\t\t\treturn - 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\t\r\n\t\t\t$this->error = \"Error while connecting \" + $response;\r\n\t\t\treturn - 1;\r\n\t\t}\r\n\t}", "public function payment_scripts() {\n\n \t}", "public function main() {\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\tif (($this->id && $access) || (tx_laterpay_helper_user::isAdmin() && !$this->id)) {\n\t\t\t$this->doc->backPath = $GLOBALS['BACK_PATH'];\n\n\t\t\t// load LaterPay-specific CSS\n\t\t\t$this->doc->addStyleSheet('laterpay-backend', t3lib_extMgm::extRelPath('laterpay') . 'res/css/laterpay-backend.css');\n\t\t\t$this->doc->addStyleSheet('fonts.googleapis.com', 'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin,latin-ext');\n\t\t\t// load LaterPay-specific JS\n\t\t\t$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('laterpay') . 'res/js/vendor/jquery-1.11.2.min.js');\n\t\t\t$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('laterpay') . 'res/js/laterpay-backend.js');\n\n\t\t\t$pageContent = $this->getModuleContent();\n\n\t\t\t// Draw the header.\n\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />' .\n\t\t\t\t$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') .\n\t\t\t\t': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\n\n\t\t\t$this->content .= $this->doc->startPage(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->header(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content .= $this->doc->section(\n\t\t\t\t\t'', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]',\n\t\t\t\t\t$this->MOD_SETTINGS['function'], $this->MOD_MENU['function']))\n\t\t\t);\n\t\t\t$this->content .= $this->doc->divider(5);\n\t\t\t\t// Render content:\n\t\t\t$this->content .= $pageContent;\n\t\t\t\t// Shortcut\n\t\t\tif ($GLOBALS['BE_USER']->mayMakeShortcut()) {\n\t\t\t\t$this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));\n\t\t\t}\n\n\t\t\t$this->content .= $this->doc->spacer(10);\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc->backPath = $GLOBALS['BACK_PATH'];\n\n\t\t\t$this->content .= $this->doc->startPage(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->header(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content .= $this->doc->spacer(10);\n\t\t}\n\t}", "public function payment_scripts() {\n \n\t \t}", "public function payAction()\n\t{\n\t\t$paylanedirectdebit = Mage::getSingleton(\"paylanedirectdebit/standard\");\n\t\t$data = $paylanedirectdebit->getPaymentData();\n\t\t\n\t\tif (is_null($data))\n\t\t{\n\t\t\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"/\"));\n\t\t}\n\t\t\n\t\techo \"Your payment is being processed...\";\n\t\t\n\t\t// connect to PayLane Direct System\t\t\n\t\t$paylane_client = new PayLaneClient();\n\t\t\n\t\t// get login and password from store config\n\t\t$direct_login = Mage::getStoreConfig('payment/paylanedirectdebit/direct_login');\n\t\t$direct_password = Mage::getStoreConfig('payment/paylanedirectdebit/direct_password');\n\t\t\n\t\t$status = $paylane_client->connect($direct_login, $direct_password);\n\t\tif ($status == false)\n\t\t{\n\t\t\t// an error message\n\t \t$paylanedirectdebit->addComment(\"Error processing your payment... Please try again later.\", true);\n\n\t \t$this->_redirect('checkout/onepage/failure');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$result = $paylane_client->multiSale($data);\n\t\tif ($result == false)\n\t\t{\n\n\t\t\t// an error message\n\t \t$paylanedirectdebit->addComment(\"Error processing your payment... Please try again later.\", true);\n\t\n\t \t$this->_redirect('checkout/onepage/failure');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (isset($result->ERROR))\n\t\t{\n\t\t\t// an error message\n\t \t$paylanedirectdebit->addComment($result->ERROR->error_description, true);\n\t\n\t \t$this->_redirect('checkout/onepage/failure');\n\t \treturn;\n\t\t}\n\t\t\n\t\tif (isset($result->OK))\n\t\t{\n\t\t\t$paylanedirectdebit->setPendingStatus($result->OK->id_sale);\n\t\n\t \tsession_write_close(); \n\t \t$this->_redirect('checkout/onepage/success');\n\t \treturn;\n\t\t}\n\t}", "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(Payment $payment)\n {\n $this->payment = $payment;\n }", "public function __construct(Payment $payment)\n {\n $this->payment = $payment;\n }", "private function __construct() {\n\t\t$this->_applicationName = 'Billing';\n\t\t$this->_receiptController = Billing_Controller_Receipt::getInstance();\n\t\t$this->_supplyReceiptController = Billing_Controller_SupplyReceipt::getInstance();\n\t\t$this->_currentAccount = Tinebase_Core::getUser();\n\t\t$this->_doContainerACLChecks = FALSE;\n\t\t$this->setOutputType();\n\t}", "public function creditCardPayment()\n {\n }", "public function __construct()\n\t\t{\n\t\t\t// Setup the required variables for the Protx Vps Direct checkout module\n\n\t\t\t$this->_languagePrefix = \"ProtxVspDirect\";\n\t\t\t$this->_id = \"checkout_vspdirect\";\n\t\t\t$this->_image = \"protx_logo.gif\";\n\n\t\t\tparent::__construct();\n\n\t\t\t$this->requiresSSL = true;\n\t\t\t$this->_currenciesSupported = array(\"GBP\");\n\t\t\t$this->_cardsSupported = array ('VISA','AMEX','MC', 'DINERS', 'DISCOVER', 'SOLO','MAESTRO','SWITCH','LASER');\n\t\t\t$this->_liveTransactionURL = 'https://ukvps.protx.com';\n\t\t\t$this->_testTransactionURL = 'https://ukvpstest.protx.com';\n\t\t\t$this->_liveTransactionURI = '/vspgateway/service/vspdirect-register.vsp';\n\t\t\t$this->_testTransactionURI = '/vspgateway/service/vspdirect-register.vsp';\n\t\t\t$this->_curlSupported = true;\n\t\t\t$this->_fsocksSupported = true;\n\t\t}", "public function __construct(Payout $payout)\n {\n $this->payout = $payout;\n }", "public function __construct()\n {\n\n // Load components required by this gateway\n Loader::loadComponents($this, array(\"Input\"));\n\n // Load the language required by this gateway\n Language::loadLang(\"tpay_payments\", null, dirname(__FILE__) . DS . \"language\" . DS);\n\n $this->loadConfig(dirname(__FILE__) . DS . \"config.json\");\n\n include_once 'lib/src/_class_tpay/validate.php';\n include_once 'lib/src/_class_tpay/util.php';\n include_once 'lib/src/_class_tpay/exception.php';\n include_once 'lib/src/_class_tpay/paymentBasic.php';\n include_once 'lib/src/_class_tpay/curl.php';\n include_once 'lib/src/_class_tpay/lang.php';\n }", "public function payment(){\n\n\t}", "public function __construct($sql, $connection,$exportOptions)\r\n{\r\nif (!$this->_result = $connection->query($sql)) {\r\nthrow new RuntimeException($connection->error . '. The actual query submitted was: ' . $sql);\r\n\r\n}\r\n\r\n// To remove echo and include in a function\r\necho \" <script type='application/javascript' src='\".$exportOptions[4][2].\".js'></script> \";\r\n$this->exportValues = $exportOptions;\r\n//$this->IsCacheConsistent(10);\r\n\r\n}", "public function paymentAction()\n {\n\n $this->initUnipagosPaymentStep();\n $this->loadLayout(); \n $this->getLayout()->getBlock(\"head\")->setTitle($this->__(\"Unipagos Payment\"));\n $this->renderLayout(); \n }", "public function payout()\n\t{\n\t}", "public function calculatePayment()\n {\n }", "function take_payment_details()\r\n\t\t{\r\n\t\t\tglobal $ecom_siteid,$db,$ecom_hostname,$Settings_arr,$ecom_themeid,$default_layout,\r\n\t\t\t\t\t$Captions_arr,$inlineSiteComponents,$sitesel_curr,$default_Currency_arr,$ecom_testing,\r\n\t\t\t\t\t$ecom_themename,$components,$ecom_common_settings,$vImage,$alert,$protectedUrl;\r\n\t\t\t$customer_id \t\t\t\t\t\t= get_session_var(\"ecom_login_customer\"); // get the id of current customer from session\r\n\t\t\t\r\n if($_REQUEST['pret']==1) // case if coming back from PAYPAL with token.\r\n {\r\n if($_REQUEST['token'])\r\n {\r\n $address = GetShippingDetails($_REQUEST['token']);\r\n $ack = strtoupper($address[\"ACK\"]);\r\n if($ack == \"SUCCESS\" ) // case if address details obtained correctly\r\n {\r\n $_REQUEST['payer_id'] = $address['PAYERID'];\r\n $_REQUEST['rt'] = 5;\r\n }\r\n else // case if address not obtained from paypay .. so show the error msg in cart\r\n {\r\n $msg = 4;\r\n echo \"<form method='post' action='http://$ecom_hostname/mypayonaccountpayment.html' id='cart_invalid_form' name='cart_invalid_form'><input type='hidden' name='rt' value='\".$msg.\"' size='1'/><div style='position:absolute; left:0;top:0;padding:5px;background-color:#CC0000;color:#FFFFFF;font-size:12px;font-weight:bold'>Loading...</div></form><script type='text/javascript'>document.cart_invalid_form.submit();</script>\";\r\n exit;\r\n }\r\n } \r\n }\r\n // Get the zip code for current customer\r\n\t\t\t$sql_cust = \"SELECT customer_postcode \r\n\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t\tcustomers \r\n\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\tcustomer_id = $customer_id \r\n\t\t\t\t\t\t\t\t\tAND sites_site_id = $ecom_siteid \r\n\t\t\t\t\t\t\t\tLIMIT \r\n\t\t\t\t\t\t\t\t\t1\";\r\n\t\t\t$ret_cust = $db->query($sql_cust);\r\n\t\t\tif ($db->num_rows($ret_cust))\r\n\t\t\t{\r\n\t\t\t\t$row_cust \t\t\t\t\t= $db->fetch_array($ret_cust);\r\n\t\t\t\t$cust_zipcode\t\t\t\t= stripslashes($row_cust['customer_postcode']);\r\n\t\t\t}\t\r\n\t\t\t$Captions_arr['PAYONACC'] \t= getCaptions('PAYONACC'); // Getting the captions to be used in this page\r\n\t\t\t$sess_id\t\t\t\t\t\t\t\t= session_id();\r\n\t\t\t\r\n\t\t\tif($protectedUrl)\r\n\t\t\t\t$http = url_protected('index.php?req=payonaccountdetails&action_purpose=payment',1);\r\n\t\t\telse \t\r\n\t\t\t\t$http = url_link('payonaccountpayment.html',1);\t\r\n\t\t\t\r\n\t\t\t// Get the details from payonaccount_cartvalues for current site in current session \r\n\t\t\t$pay_cart = payonaccount_CartDetails($sess_id);\t\t\t\t\t\t\t\r\n\t\t\tif($_REQUEST['rt']==1) // This is to handle the case of returning to this page by clicking the back button in browser\r\n\t\t\t\t$alert = 'PAYON_ERROR_OCCURED';\t\t\t\r\n\t\t\telseif($_REQUEST['rt']==2) // case of image verification failed\r\n\t\t\t\t$alert = 'PAYON_IMAGE_VERIFICATION_FAILED';\r\n elseif($_REQUEST['rt']==3) // case of image verification failed\r\n $alert = 'PAYON_IMAGE_VERIFICATION_FAILED';\r\n\t\t\telseif($_REQUEST['rt']==4) // case if paypal address verification failed\r\n $alert = 'PAYON_PAYPAL_EXP_NO_ADDRESS_RET';\r\n elseif($_REQUEST['rt']==5) // case if paypal address verification successfull need to click pay to make the payment \r\n $alert = 'PAYON_PAYPAL_EXP_ADDRESS_DON';\r\n\t\t\t$sql_comp \t\t\t= \"SELECT customer_title,customer_fname,customer_mname,customer_surname,customer_email_7503,\r\n\t\t\t\t\t\t\t\t\t\tcustomer_payonaccount_status,customer_payonaccount_maxlimit,customer_payonaccount_usedlimit,\r\n\t\t\t\t\t\t\t\t\t\t(customer_payonaccount_maxlimit - customer_payonaccount_usedlimit) as remaining,\r\n\t\t\t\t\t\t\t\t\t\tcustomer_payonaccount_billcycle_day,customer_payonaccount_rejectreason,customer_payonaccount_laststatementdate,\r\n\t\t\t\t\t\t\t\t\t\tcustomer_payonaccount_billcycle_day \r\n\t\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t\t\tcustomers \r\n\t\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\t\tcustomer_id = $customer_id \r\n\t\t\t\t\t\t\t\t\t\tAND sites_site_id = $ecom_siteid \r\n\t\t\t\t\t\t\t\t\tLIMIT \r\n\t\t\t\t\t\t\t\t\t\t1\";\r\n\t\t\t$ret_cust = $db->query($sql_comp);\r\n\t\t\tif ($db->num_rows($ret_cust)==0)\r\n\t\t\t{\t\r\n\t\t\t\techo \"Sorry!! Invalid input\";\r\n\t\t\t\texit;\r\n\t\t\t}\t\r\n\t\t\t$row_cust \t\t= $db->fetch_array($ret_cust);\r\n\t\t\t// Getting the previous outstanding details from orders_payonaccount_details \r\n\t\t\t$sql_payonaccount = \"SELECT pay_id,pay_date,pay_amount \r\n\t\t\t\t\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t\t\t\t\t\torder_payonaccount_details \r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\t\t\t\t\tcustomers_customer_id = $customer_id \r\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND pay_transaction_type ='O' \r\n\t\t\t\t\t\t\t\t\t\t\t\tORDER BY \r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpay_id DESC \r\n\t\t\t\t\t\t\t\t\t\t\t\tLIMIT \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t1\";\r\n\t\t\t$ret_payonaccount = $db->query($sql_payonaccount);\r\n\t\t\tif ($db->num_rows($ret_payonaccount))\r\n\t\t\t{\r\n\t\t\t\t$row_payonaccount \t= $db->fetch_array($ret_payonaccount);\r\n\t\t\t\t$prev_balance\t\t\t\t= $row_payonaccount['pay_amount'];\r\n\t\t\t\t$prev_id\t\t\t\t\t\t= $row_payonaccount['pay_id'];\r\n\t\t\t\t$prev_date\t\t\t\t\t= $row_payonaccount['pay_date'];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$prev_balance\t\t\t\t= 0;\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t$prev_id\t\t\t\t\t\t= 0;\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t$paying_amt \t\t= ($_REQUEST['pay_amt'])?$_REQUEST['pay_amt']:$pay_cart['pay_amount'];\r\n\t\t\t$additional_det\t= ($_REQUEST['pay_additional_details'])?$_REQUEST['pay_additional_details']:$pay_cart['pay_additional_details'];\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t // Check whether google checkout is required\r\n\t\t\t$sql_google = \"SELECT a.paymethod_id,a.paymethod_name,a.paymethod_key,\r\n\t\t\t\t\t\t\t\t\t\t a.paymethod_takecarddetails,a.payment_minvalue,\r\n\t\t\t\t\t\t\t\t\t\t b.payment_method_sites_caption \r\n\t\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t\t\tpayment_methods a,\r\n\t\t\t\t\t\t\t\t\t\tpayment_methods_forsites b \r\n\t\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\t\ta.paymethod_id=b.payment_methods_paymethod_id \r\n\t\t\t\t\t\t\t\t\t\tAND a.paymethod_showinpayoncredit=1 \r\n\t\t\t\t\t\t\t\t\t\tAND sites_site_id = $ecom_siteid \r\n\t\t\t\t\t\t\t\t\t\tAND b.payment_method_sites_active = 1 \r\n\t\t\t\t\t\t\t\t\t\tAND paymethod_key='GOOGLE_CHECKOUT' \r\n\t\t\t\t\t\t\t\t\tLIMIT \r\n\t\t\t\t\t\t\t\t\t\t1\";\r\n\t\t\t$ret_google = $db->query($sql_google);\r\n\t\t\tif($db->num_rows($ret_google))\r\n\t\t\t{\r\n\t\t\t\t$google_exists = true;\r\n\t\t\t}\r\n\t\t\telse \t\r\n\t\t\t\t$google_exists = false;\r\n\t\t\t// Check whether google checkout is set for current site\r\n\t\t\tif($ecom_common_settings['paymethodKey']['GOOGLE_CHECKOUT']['paymethod_key'] == \"GOOGLE_CHECKOUT\")\r\n\t\t\t{\r\n\t\t\t\t$google_prev_req \t\t= $ecom_common_settings['paymethodKey']['GOOGLE_CHECKOUT']['payment_method_preview_req'];\r\n\t\t\t\t$google_recommended\t\t= $ecom_common_settings['paymethodKey']['GOOGLE_CHECKOUT']['payment_method_google_recommended'];\r\n\t\t\t\tif($google_recommended ==0) // case if google checkout is set to work in the way google recommend\r\n\t\t\t\t\t$more_pay_condition = \" AND paymethod_key<>'GOOGLE_CHECKOUT' \";\r\n\t\t\t\telse\r\n\t\t\t\t\t$more_pay_condition = '';\r\n\t\t\t}\r\n\t\t\t$sql_paymethods = \"SELECT a.paymethod_id,a.paymethod_name,a.paymethod_key,\r\n a.paymethod_takecarddetails,a.payment_minvalue,a.paymethod_ssl_imagelink,\r\n b.payment_method_sites_caption \r\n FROM \r\n payment_methods a,\r\n payment_methods_forsites b \r\n WHERE \r\n a.paymethod_id=b.payment_methods_paymethod_id \r\n AND a.paymethod_showinpayoncredit = 1 \r\n AND b.payment_method_sites_active = 1 \r\n $more_pay_condition \r\n AND b.sites_site_id=$ecom_siteid \r\n AND a.paymethod_key<>'PAYPAL_EXPRESS'\";\r\n\t\t\t$ret_paymethods = $db->query($sql_paymethods);\r\n\t\t\t$totpaycnt = $totpaymethodcnt = $db->num_rows($ret_paymethods);\t\t\t\r\n\t\t\tif ($totpaycnt==0)\r\n\t\t\t{\r\n\t\t\t\t$paytype_moreadd_condition = \" AND a.paytype_code <> 'credit_card'\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t$paytype_moreadd_condition = '';\r\n\t\t\t$cc_exists \t\t\t= 0;\r\n\t\t\t$cc_seq_req \t\t= check_Paymethod_SSL_Req_Status('payonaccount');\r\n\t\t\t$sql_paytypes \t= \"SELECT a.paytype_code,b.paytype_forsites_id,a.paytype_id,a.paytype_name,b.images_image_id,\r\n\t\t\t\t\t\t\t\tb.paytype_caption \r\n\t\t\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t\t\t\tpayment_types a, payment_types_forsites b \r\n\t\t\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\t\t\tb.sites_site_id = $ecom_siteid \r\n\t\t\t\t\t\t\t\t\t\t\tAND paytype_forsites_active=1 \r\n\t\t\t\t\t\t\t\t\t\t\tAND paytype_forsites_userdisabled=0 \r\n\t\t\t\t\t\t\t\t\t\t\tAND a.paytype_id=b.paytype_id \r\n\t\t\t\t\t\t\t\t\t\t\tAND a.paytype_showinpayoncredit=1 \r\n\t\t\t\t\t\t\t\t\t\t\t$paytype_moreadd_condition \r\n\t\t\t\t\t\t\t\t\t\tORDER BY \r\n\t\t\t\t\t\t\t\t\t\t\ta.paytype_order\";\r\n\t\t\t$ret_paytypes = $db->query($sql_paytypes);\r\n\t\t\t$paytypes_cnt = $db->num_rows($ret_paytypes);\t\r\n\t\t\tif($paytypes_cnt==1 && $totpaymethodcnt>=1)\r\n\t\t\t\t$card_req = 1;\r\n\t\t\telse\r\n\t\t\t\t$card_req = '';\t\t\t\r\n\t\t?>\r\n\t\t<script type=\"text/javascript\">\r\n\t\t/* Function to be triggered when selecting the credit card type*/\r\nfunction sel_credit_card_payonaccount(obj)\r\n{\r\n\tif (obj.value!='')\r\n\t{\r\n\t\tobjarr = obj.value.split('_');\r\n\t\tif(objarr.length==4) /* if the value splitted to exactly 4 elements*/\r\n\t\t{\r\n\t\t\tvar key \t\t\t= objarr[0];\r\n\t\t\tvar issuereq \t= objarr[1];\r\n\t\t\tvar seccount \t= objarr[2];\r\n\t\t\tvar cc_count \t= objarr[3];\r\n\t\t\tif (issuereq==1)\r\n\t\t\t{\r\n\t\t\t\tdocument.frm_payonaccount_payment.checkoutpay_issuenumber.className = 'inputissue_normal';\r\n\t\t\t\tdocument.frm_payonaccount_payment.checkoutpay_issuenumber.disabled\t= false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tdocument.frm_payonaccount_payment.checkoutpay_issuenumber.className = 'inputissue_disabled';\t\r\n\t\t\t\tdocument.frm_payonaccount_payment.checkoutpay_issuenumber.disabled\t= true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\nfunction handle_paytypeselect_payonaccount(obj)\r\n{\r\n\tvar curpaytype = paytype_arr[obj.value];\r\n\tvar ptypecnts = <?php echo $totpaycnt?>;\r\n\tif (curpaytype=='credit_card')\r\n\t{\r\n\t\tif(document.getElementById('payonaccount_paymethod_tr'))\r\n\t\t\tdocument.getElementById('payonaccount_paymethod_tr').style.display = '';\t\r\n\t\tif(document.getElementById('payonaccount_cheque_tr'))\r\n\t\t\tdocument.getElementById('payonaccount_cheque_tr').style.display = 'none';\t\r\n\t\tif(document.getElementById('payonaccount_self_tr'))\r\n\t\t\tdocument.getElementById('payonaccount_self_tr').style.display = 'none';\r\n\t\tif(document.getElementById('paymentmethod_req'))\r\n\t\t\tdocument.getElementById('paymentmethod_req').value = 1;\r\n\t\tif (document.getElementById('payonaccount_paymethod'))\r\n\t\t{\r\n\t\t\tvar lens = document.getElementById('payonaccount_paymethod').length;\t\r\n\t\t\tif(lens==undefined && ptypecnts==1)\r\n\t\t\t{\r\n\t\t\t\tvar curval\t = document.getElementById('payonaccount_paymethod').value;\r\n\t\t\t\tcur_arr \t\t= curval.split('_');\r\n\t\t\t\tif ((cur_arr[0]=='SELF' || cur_arr[0]=='PROTX') && cur_arr.length<=2)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(document.getElementById('payonaccount_cheque_tr'))\r\n\t\t\t\t\t\tdocument.getElementById('payonaccount_cheque_tr').style.display = 'none';\r\n\t\t\t\t\tif(document.getElementById('payonaccount_self_tr'))\r\n\t\t\t\t\t\tdocument.getElementById('payonaccount_self_tr').style.display \t= '';\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif(document.getElementById('payonaccount_self_tr'))\r\n\t\t\t\t\t\tdocument.getElementById('payonaccount_self_tr').style.display \t= 'none';\r\n\t\t\t\t}\t\r\n\t\t\t}\t\r\n\t\t}\t\r\n\t}\r\n\telse if(curpaytype=='cheque')\r\n\t{\r\n\t\tif(document.getElementById('payonaccount_paymethod_tr'))\r\n\t\t\tdocument.getElementById('payonaccount_paymethod_tr').style.display = 'none';\t\t\r\n\t\tif(document.getElementById('payonaccount_cheque_tr'))\r\n\t\t\tdocument.getElementById('payonaccount_cheque_tr').style.display = '';\t\r\n\t\tif(document.getElementById('payonaccount_self_tr'))\r\n\t\t\tdocument.getElementById('payonaccount_self_tr').style.display = 'none';\t\r\n\t\tif(document.getElementById('paymentmethod_req'))\r\n\t\t\tdocument.getElementById('paymentmethod_req').value = '';\r\n\t}\r\n\telse if(curpaytype=='invoice')\r\n\t{\r\n\t\tif(document.getElementById('payonaccount_paymethod_tr'))\r\n\t\t\tdocument.getElementById('payonaccount_paymethod_tr').style.display = 'none';\t\t\r\n\t\tif(document.getElementById('payonaccount_cheque_tr'))\r\n\t\t\tdocument.getElementById('payonaccount_cheque_tr').style.display = 'none';\r\n\t\tif(document.getElementById('payonaccount_self_tr'))\r\n\t\t\tdocument.getElementById('payonaccount_self_tr').style.display = 'none';\r\n\t\tif(document.getElementById('paymentmethod_req'))\r\n\t\t\tdocument.getElementById('paymentmethod_req').value = '';\r\n\t}\r\n\telse if(curpaytype=='pay_on_phone')\r\n\t{\r\n\t\tif(document.getElementById('payonaccount_paymethod_tr'))\r\n\t\t\tdocument.getElementById('payonaccount_paymethod_tr').style.display = 'none';\t\t\r\n\t\tif(document.getElementById('payonaccount_cheque_tr'))\r\n\t\t\tdocument.getElementById('payonaccount_cheque_tr').style.display = 'none';\r\n\t\tif(document.getElementById('payonaccount_self_tr'))\r\n\t\t\tdocument.getElementById('payonaccount_self_tr').style.display = 'none';\r\n\t\tif(document.getElementById('paymentmethod_req'))\r\n\t\t\tdocument.getElementById('paymentmethod_req').value = '';\r\n\t}\r\n\telse \r\n\t{\r\n\t\tcur_arr = obj.value.split('_');\r\n\t\tif ((cur_arr[0]=='SELF' || cur_arr[0]=='PROTX') && cur_arr.length<=2)\r\n\t\t{\r\n\t\t\tif(document.getElementById('payonaccount_cheque_tr'))\r\n\t\t\t\tdocument.getElementById('payonaccount_cheque_tr').style.display = 'none';\r\n\t\t\tif(document.getElementById('payonaccount_self_tr'))\r\n\t\t\t\tdocument.getElementById('payonaccount_self_tr').style.display \t= '';\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(document.getElementById('payonaccount_self_tr'))\r\n\t\t\t\tdocument.getElementById('payonaccount_self_tr').style.display \t= 'none';\r\n\t\t}\t\r\n\t}\r\n}\r\n</script>\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t<div class=\"treemenu\"><a href=\"<? url_link('');?>\"><?=$Captions_arr['COMMON']['TREE_MENU_HOME_LINK'];?></a> >> <?=\"Pay on Account Payment\"?></div>\r\n\t\t\r\n\t\t\t<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"3\" class=\"emailfriendtable\">\r\n\t\t\t<form method=\"post\" action=\"<?php echo $http?>\" name='frm_payonaccount_payment' id=\"frm_payonaccount_payment\" class=\"frm_cls\" onsubmit=\"return validate_payonaccount(this)\">\r\n\t\t\t<input type=\"hidden\" name=\"paymentmethod_req\" id=\"paymentmethod_req\" value=\"<?php echo $card_req?>\" />\r\n\t\t\t<input type=\"hidden\" name=\"payonaccount_unique_key\" id=\"payonaccount_unique_key\" value=\"<?php echo uniqid('')?>\" />\r\n\t\t\t<input type=\"hidden\" name=\"save_payondetails\" id=\"save_payondetails\" value=\"\" />\r\n\t\t\t<input type=\"hidden\" name=\"nrm\" id=\"nrm\" value=\"1\" />\r\n\t\t\t<input type=\"hidden\" name=\"action_purpose\" id=\"action_purpose\" value=\"buy\" />\r\n\t\t\t<input type=\"hidden\" name=\"checkout_zipcode\" id=\"checkout_zipcode\" value=\"<?php echo $cust_zipcode?>\" />\r\n\t\t\t<?php \r\n\t\t\tif($alert){ \r\n\t\t\t?>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"4\" class=\"errormsg\" align=\"center\">\r\n\t\t\t\t<?php \r\n\t\t\t\t\t\tif($Captions_arr['PAYONACC'][$alert])\r\n\t\t\t\t\t\t\techo $Captions_arr['PAYONACC'][$alert];\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t \t\techo $alert;\r\n\t\t\t\t?>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t<?php } ?>\r\n <tr>\r\n <td colspan=\"4\" class=\"emailfriendtextheader\"><?=$Captions_arr['EMAIL_A_FRIEND']['EMAIL_FRIEND_HEADER_TEXT']?> </td>\r\n </tr>\r\n <tr>\r\n <td width=\"33%\" align=\"left\" class=\"regiconent\"><?php echo $Captions_arr['PAYONACC']['CURRENTACC_BALANCE']?> </td>\r\n <td width=\"22%\" align=\"left\" class=\"regiconent\">:<?php echo print_price($row_cust['customer_payonaccount_usedlimit'])?> </td>\r\n <td width=\"27%\" align=\"left\" class=\"regiconent\"><?php echo $Captions_arr['PAYONACC']['CREDIT_LIMIT']?></td>\r\n <td width=\"18%\" align=\"left\" class=\"regiconent\">:<?php echo print_price($row_cust['customer_payonaccount_maxlimit'])?> </td>\r\n </tr>\r\n <tr>\r\n <td align=\"left\" class=\"regiconent\"><?php echo $Captions_arr['PAYONACC']['LAST_STATE_BALANCE']?> </td>\r\n <td align=\"left\" class=\"regiconent\">:<?php echo print_price($prev_balance)?> </td>\r\n <td align=\"left\" class=\"regiconent\"><?php echo $Captions_arr['PAYONACC']['CREDIT_REMAINING']?> </td>\r\n <td align=\"left\" class=\"regiconent\">: <?php echo print_price(($row_cust['customer_payonaccount_maxlimit']-$row_cust['customer_payonaccount_usedlimit']))?></td>\r\n </tr>\r\n <tr>\r\n <td align=\"left\" class=\"regiconent\">&nbsp;</td>\r\n <td align=\"left\" class=\"regiconent\">&nbsp;</td>\r\n <td align=\"left\" class=\"regiconent\">&nbsp;</td>\r\n <td align=\"left\" class=\"regiconent\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td align=\"left\" class=\"regiconent\"><?php echo $Captions_arr['PAYONACC']['AMT_BEING_PAID']?> </td>\r\n <td align=\"left\" class=\"regiconent\">: <?php echo get_selected_currency_symbol()?><?php echo $paying_amt?> <input name=\"pay_amt\" id=\"pay_amt\" type=\"hidden\" size=\"10\" value=\"<?php echo $paying_amt?>\" /></td>\r\n <td align=\"left\" class=\"regiconent\">&nbsp;</td>\r\n <td align=\"left\" class=\"regiconent\">&nbsp;</td>\r\n </tr>\r\n <?php\r\n \tif($additional_det!='')\r\n\t{\r\n ?>\r\n\t\t<tr>\r\n\t\t<td align=\"left\" class=\"regiconent\" valign=\"top\"><?php echo $Captions_arr['PAYONACC']['ADDITIONAL_DETAILS']?> </td>\r\n\t\t<td align=\"left\" class=\"regiconent\">: <?php echo nl2br($additional_det)?> <input name=\"pay_additional_details\" id=\"pay_additional_details\" type=\"hidden\" value=\"<?php echo $additional_det?>\" /></td>\r\n\t\t<td align=\"left\" class=\"regiconent\">&nbsp;</td>\r\n\t\t<td align=\"left\" class=\"regiconent\">&nbsp;</td>\r\n\t </tr>\r\n <?php\r\n }\r\n ?>\r\n <tr>\r\n <td colspan=\"4\" align=\"center\" class=\"regiconent\">&nbsp;</td>\r\n </tr>\r\n\t <? if($Settings_arr['imageverification_req_payonaccount'] and $_REQUEST['pret']!=1)\r\n\t \t {\r\n\t ?>\r\n <tr>\r\n <td colspan=\"4\" align=\"center\" class=\"emailfriendtextnormal\"><img src=\"<?php url_verification_image('includes/vimg.php?size=4&pass_vname=payonaccountpayment_Vimg')?>\" border=\"0\" alt=\"Image Verification\"/>&nbsp;\t</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"6\" align=\"center\" class=\"emailfriendtextnormal\"><?=$Captions_arr['PAYONACC']['PAYON_VERIFICATION_CODE']?>&nbsp;<span class=\"redtext\">*</span><span class=\"emailfriendtext\">\r\n\t <?php \r\n\t\t// showing the textbox to enter the image verification code\r\n\t\t$vImage->showCodBox(1,'payonaccountpayment_Vimg','class=\"inputA_imgver\"'); \r\n\t?>\r\n\t</span> </td>\r\n </tr>\r\n <? }?>\r\n <?php\r\n \tif($google_exists && $Captions_arr['PAYONACC'] ['PAYON_PAYMENT_MULTIPLE_MSG'] && google_recommended==0 && $totpaymethodcnt>1 && $_REQUEST['pret']!=1)\r\n\t{\t\r\n ?>\r\n <tr>\r\n \t<td colspan=\"4\" align=\"left\" class=\"google_header_text\"><?php echo $Captions_arr['PAYONACC'] ['PAYON_PAYMENT_MULTIPLE_MSG']?>\r\n \t</td>\r\n </tr>\r\n <?php\r\n }\r\n ?> \r\n <tr>\r\n <td colspan=\"4\">\r\n <table width=\"100%\" cellpadding=\"1\" cellspacing=\"1\" border=\"0\">\r\n <?php\r\nif($_REQUEST['pret']!=1)\r\n{\r\n?>\r\n \r\n <tr>\r\n <td colspan=\"2\">\r\n\t\t\t<?php\r\n\t\t\t\tif ($db->num_rows($ret_paytypes))\r\n\t\t\t\t{\r\n\t\t\t\t\tif($db->num_rows($ret_paytypes)==1 && $totpaymethodcnt<=1)// Check whether there are more than 1 payment type. If no then dont show the payment option to user, just use hidden field\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\techo '<script type=\"text/javascript\">\r\n\t\t\t\t\t\t\tpaytype_arr = new Array();\t\t\r\n\t\t\t\t\t\t\t\t</script>';\r\n\t\t\t\t\t\t$row_paytypes = $db->fetch_array($ret_paytypes);\r\n\t\t\t\t\t\techo '<script type=\"text/javascript\">';\r\n\t\t\t\t\t\techo \"paytype_arr[\".$row_paytypes['paytype_id'].\"] = '\".$row_paytypes['paytype_code'].\"';\";\r\n\t\t\t\t\t\techo '</script>';\r\n\t\t\t\t\t\tif($row_paytypes['paytype_code']=='credit_card')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//if($row_paytypes['paytype_id']==$row_cartdet['paytype_id'])\r\n\t\t\t\t\t\t\t\t$cc_exists = true;\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t$single_curtype = $row_paytypes['paytype_code'];\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"payonaccount_paytype\" id=\"payonaccount_paytype\" value=\"<?php echo $row_paytypes['paytype_id']?>\" />\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$pay_maxcnt = 2;\r\n\t\t\t\t\t\t\t$pay_cnt\t= 0;\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t <div class=\"shoppaymentdiv\">\r\n\t\t\t\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n\t\t\t\t\t\t\t\t <tr>\r\n\t\t\t\t\t\t\t\t\t<td colspan=\"<?php echo $pay_maxcnt?>\" class=\"cart_payment_header\"><?php echo $Captions_arr['PAYONACC']['PAYON_SEL_PAYTYPE']?></td>\r\n\t\t\t\t\t\t\t\t </tr>\r\n\t\t\t\t\t\t\t\t <tr>\r\n\t\t\t\t\t\t\t\t <?php\r\n\t\t\t\t\t\t\t\t\techo '<script type=\"text/javascript\">\r\n\t\t\t\t\t\t\t\t\t\t\tpaytype_arr = new Array();\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t</script>';\r\n\t\t\t\t\t\t\t\t\twhile ($row_paytypes = $db->fetch_array($ret_paytypes))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif($row_paytypes['paytype_code']=='credit_card')\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tif($row_paytypes['paytype_id']==$row_cartdet['paytype_id'])\r\n\t\t\t\t\t\t\t\t\t\t\t\t$cc_exists = true;\r\n\t\t\t\t\t\t\t\t\t\t\tif (($protectedUrl==true and $cc_seq_req==false) or ($protectedUrl==false and $cc_seq_req==true))\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$paytype_onclick = \"handle_form_submit(document.frm_payonaccount_payment,'','')\";\t\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t$paytype_onclick = 'handle_paytypeselect_payonaccount(this)';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\telse // if pay type is not credit card.\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tif ($protectedUrl==true)\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$paytype_onclick = \"handle_form_submit(document.frm_payonaccount_payment,'','')\";\t\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t$paytype_onclick = 'handle_paytypeselect_payonaccount(this)';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\techo '<script type=\"text/javascript\">';\r\n\t\t\t\t\t\t\t\t\t\techo \"paytype_arr[\".$row_paytypes['paytype_id'].\"] = '\".$row_paytypes['paytype_code'].\"';\";\r\n\t\t\t\t\t\t\t\t\t\techo '</script>';\r\n\t\t\t\t\t\t\t\t ?>\r\n\t\t\t\t\t\t\t\t\t\t<td width=\"25%\" align=\"left\" class=\"emailfriendtextnormal\">\r\n\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t\t// image to shown for payment types\r\n\t\t\t\t\t\t\t\t\t\t\t$pass_type = 'image_thumbpath';\r\n\t\t\t\t\t\t\t\t\t\t\t// Calling the function to get the image to be shown\r\n\t\t\t\t\t\t\t\t\t\t\t$img_arr = get_imagelist('paytype',$row_paytypes['paytype_forsites_id'],$pass_type,0,0,1);\r\n\t\t\t\t\t\t\t\t\t\t\tif(count($img_arr))\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\tshow_image(url_root_image($img_arr[0][$pass_type],1),$row_paytypes['paytype_name'],$row_paytypes['paytype_name']);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"<?php url_site_image('cash.gif')?>\" alt=\"Payment Type\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t<?php\t\r\n\t\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<input class=\"shoppingcart_radio\" type=\"radio\" name=\"payonaccount_paytype\" id=\"payonaccount_paytype\" value=\"<?php echo $row_paytypes['paytype_id']?>\" onclick=\"<?php echo $paytype_onclick?>\" <?php echo ($_REQUEST['payonaccount_paytype']==$row_paytypes['paytype_id'])?'checked=\"checked\"':''?> /><?php echo stripslashes($row_paytypes['paytype_caption'])?>\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t\t$pay_cnt++;\r\n\t\t\t\t\t\t\t\t\t\tif ($pay_cnt>=$pay_maxcnt)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\techo \"</tr><tr>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$pay_cnt = 0;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif ($pay_cnt<$pay_maxcnt)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\techo \"<td colspan=\".($pay_maxcnt-$pay_cnt).\">&nbsp;</td>\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t?>\t\r\n\t\t\t\t\t\t\t\t </tr>\r\n\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t?>\t\t</td>\r\n </tr>\r\n \t<?php \r\n\t$self_disp = 'none';\r\n\tif($_REQUEST['payonaccount_paytype'])\r\n\t{\r\n\t\t// get the paytype code for current paytype\r\n\t\t$sql_pcode = \"SELECT paytype_code \r\n\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t\tpayment_types \r\n\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\tpaytype_id = \".$_REQUEST['payonaccount_paytype'].\" \r\n\t\t\t\t\t\t\t\tLIMIT \r\n\t\t\t\t\t\t\t\t\t1\";\r\n\t\t$ret_pcode = $db->query($sql_pcode);\r\n\t\tif ($db->num_rows($ret_pcode))\r\n\t\t{\r\n\t\t\t$row_pcode \t= $db->fetch_array($ret_pcode);\r\n\t\t\t$sel_ptype \t= $row_pcode['paytype_code'];\r\n\t\t}\r\n\t}\r\n\tif($sel_ptype=='credit_card' or $single_curtype=='credit_card')\r\n\t\t$paymethoddisp_none = '';\r\n\telse\r\n\t\t$paymethoddisp_none = 'none';\r\n\tif($sel_ptype=='cheque')\r\n\t\t$chequedisp_none = '';\r\n\telse\r\n\t\t$chequedisp_none = 'none';\t\r\n\t$sql_paymethods = \"SELECT a.paymethod_id,a.paymethod_name,a.paymethod_key,\r\n a.paymethod_takecarddetails,a.payment_minvalue,a.paymethod_secured_req,a.paymethod_ssl_imagelink,\r\n b.payment_method_sites_caption \r\n FROM \r\n payment_methods a,\r\n payment_methods_forsites b \r\n WHERE \r\n b.sites_site_id = $ecom_siteid \r\n AND paymethod_showinpayoncredit =1 \r\n AND b.payment_method_sites_active = 1 \r\n $more_pay_condition \r\n AND a.paymethod_id=b.payment_methods_paymethod_id \r\n AND a.paymethod_key<>'PAYPAL_EXPRESS'\";\r\n\t$ret_paymethods = $db->query($sql_paymethods);\r\n\tif ($db->num_rows($ret_paymethods))\r\n\t{\r\n\t\tif ($db->num_rows($ret_paymethods)==1)\r\n\t\t{\r\n\t\t\t$row_paymethods = $db->fetch_array($ret_paymethods);\r\n\t\t\tif ($row_paymethods['paymethod_key']=='SELF' or $row_paymethods['paymethod_key']=='PROTX')\r\n\t\t\t{\r\n\t\t\t\tif($paytypes_cnt==1 or $sel_ptype =='credit_card')\r\n\t\t\t\t\t$self_disp = '';\r\n\t\t\t}\t\r\n\t\t\t?>\r\n\t\t\t<input type=\"hidden\" name=\"payonaccount_paymethod\" id=\"payonaccount_paymethod\" value=\"<?php echo $row_paymethods['paymethod_key'].'_'.$row_paymethods['paymethod_id']?>\" />\r\n\t\t\t<?php\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/*if($db->num_rows($ret_paytypes)==1 and $cc_exists == true)\r\n\t\t\t\t$disp = '';\r\n\t\t\telse\r\n\t\t\t\t$disp = 'none';\r\n\t\t\t*/\t\t\r\n\t\t\t?>\r\n\t\t\t<tr id=\"payonaccount_paymethod_tr\" style=\"display:<?php echo $paymethoddisp_none?>\">\r\n\t\t\t\t<td colspan=\"2\" align=\"left\" valign=\"middle\">\r\n\t\t\t\t<div class=\"shoppayment_type_div\">\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\t$pay_maxcnt = 2;\r\n\t\t\t\t\t\t$pay_cnt\t= 0;\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n\t\t\t\t\t <tr>\r\n\t\t\t\t\t\t<td colspan=\"<?php echo $pay_maxcnt?>\" class=\"cart_payment_header\"><?php echo $Captions_arr['PAYONACC']['PAYON_SEL_PAYGATEWAY']?></td>\r\n\t\t\t\t\t </tr>\r\n\t\t\t\t\t <tr>\r\n\t\t\t\t\t <?php\r\n\t\t\t\t\t\twhile ($row_paymethods = $db->fetch_array($ret_paymethods))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$caption = ($row_paymethods['payment_method_sites_caption'])?$row_paymethods['payment_method_sites_caption']:$row_paymethods['paymethod_name'];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($row_paymethods['paymethod_secured_req']==1 and $protectedUrl==true) // if secured is required for current pay method and currently in secured. so no reload is required\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$on_paymethod_click = 'handle_paytypeselect_payonaccount(this)';\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\telseif ($row_paymethods['paymethod_secured_req']==1 and $protectedUrl==false) // case if secured is required and current not is secured. so reload is required\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$on_paymethod_click = \"handle_form_submit(document.frm_payonaccount_payment,'','')\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telseif ($row_paymethods['paymethod_secured_req']==0 and $protectedUrl==false) // case if secured is required and current not is secured. so reload is required\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$on_paymethod_click = 'handle_paytypeselect_payonaccount(this)';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telseif ($row_paymethods['paymethod_secured_req']==0 and $protectedUrl==true) // case if secured is not required and current is secured. so reload is required\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$on_paymethod_click = \"handle_form_submit(document.frm_payonaccount_payment,'','')\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$on_paymethod_click = 'handle_paytypeselect_payonaccount(this)';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$curname = $row_paymethods['paymethod_key'].'_'.$row_paymethods['paymethod_id'];\r\n\t\t\t\t\t\t\tif($curname==$_REQUEST['payonaccount_paymethod'])\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif (($row_paymethods['paymethod_key']=='SELF' or $row_paymethods['paymethod_key']=='PROTX') and $sel_ptype=='credit_card')\r\n\t\t\t\t\t\t\t\t\t$self_disp = '';\r\n\t\t\t\t\t\t\t\tif($sel_ptype=='credit_card')\t\r\n\t\t\t\t\t\t\t\t\t$sel = 'checked=\"checked\"';\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t$sel = '';\r\n\t\t\t\t\t\t\t$img_path=\"./images/\".$ecom_hostname.\"/site_images/payment_methods_images/\".$row_paymethods['paymethod_ssl_imagelink'];\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t if(file_exists($img_path))\r\n\t\t\t\t\t\t\t\t$caption = '<img src=\"'.$img_path.'\" border=\"0\" alt=\"'.$caption.'\" />';\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t ?>\r\n\t\t\t\t\t\t\t<td width=\"25%\" align=\"left\" class=\"emailfriendtextnormal\">\r\n\t\t\t\t\t\t\t<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td align=\"left\" valign=\"top\" width=\"2%\">\r\n\t\t\t\t\t\t\t\t<input class=\"shoppingcart_radio\" type=\"radio\" name=\"payonaccount_paymethod\" id=\"payonaccount_paymethod\" value=\"<?php echo $row_paymethods['paymethod_key'].'_'.$row_paymethods['paymethod_id']?>\" <?php echo $sel ?> onclick=\"<?php echo $on_paymethod_click?>\" />\r\n\t\t\t\t\t\t\t\t<td align=\"left\">\r\n\t\t\t\t\t\t\t\t<?php echo stripslashes($caption)?>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t$pay_cnt++;\r\n\t\t\t\t\t\t\tif ($pay_cnt>=$pay_maxcnt)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\techo \"</tr><tr>\";\r\n\t\t\t\t\t\t\t\t$pay_cnt = 0;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($pay_cnt<$pay_maxcnt)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\techo \"<td colspan=\".($pay_maxcnt-$pay_cnt).\">&nbsp;</td>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t?>\t\r\n\t\t\t\t\t </tr>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</div>\t\t\t\t</td>\r\n\t\t\t</tr>\t\r\n\t\t\t<?php\r\n\t\t}\r\n\t}\r\n\tif($paytypes_cnt==1 && $totpaymethodcnt==0 && $single_curtype=='cheque')\r\n\t{\r\n\t\t$chequedisp_none = '';\r\n\t}\t\r\n\t?>\r\n\t<tr id=\"payonaccount_cheque_tr\" style=\"display:<?php echo $chequedisp_none?>\">\r\n\t<td colspan=\"2\" align=\"left\" valign=\"middle\">\t\r\n\t\t<table width=\"100%\" cellpadding=\"1\" cellspacing=\"1\" border=\"0\">\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\" align=\"left\" class=\"shoppingcartheader\"><?php echo $Captions_arr['PAYONACC']['PAY_ON_CHEQUE_DETAILS']?></td>\r\n\t\t</tr>\r\n\t\t<?php\r\n\t\t\t// Get the list of credit card static fields to be shown in the checkout out page in required order\r\n\t\t\t$sql_checkout = \"SELECT field_det_id,field_key,field_name,field_req,field_error_msg \r\n\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t\tgeneral_settings_site_checkoutfields \r\n\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\tsites_site_id = $ecom_siteid \r\n\t\t\t\t\t\t\t\t\tAND field_hidden=0 \r\n\t\t\t\t\t\t\t\t\tAND field_type='CHEQUE' \r\n\t\t\t\t\t\t\t\tORDER BY \r\n\t\t\t\t\t\t\t\t\tfield_order\";\r\n\t\t\t$ret_checkout = $db->query($sql_checkout);\r\n\t\t\tif($db->num_rows($ret_checkout))\r\n\t\t\t{\t\t\t\t\t\t\r\n\t\t\t\twhile($row_checkout = $db->fetch_array($ret_checkout))\r\n\t\t\t\t{\t\t\t\r\n\t\t\t\t\t// Section to handle the case of required fields\r\n\t\t\t\t\tif($row_checkout['field_req']==1)\r\n\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\t$chkoutadd_Req[]\t\t= \"'\".$row_checkout['field_key'].\"'\";\r\n\t\t\t\t\t\t$chkoutadd_Req_Desc[]\t= \"'\".$row_checkout['field_error_msg'].\"'\"; \r\n\t\t\t\t\t}\t\t\t\r\n\t\t?>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td align=\"left\" width=\"50%\" class=\"emailfriendtextnormal\" valign=\"top\">\r\n\t\t\t\t\t<?php echo stripslashes($row_checkout['field_name']); if($row_checkout['field_req']==1) { echo '&nbsp;<span class=\"redtext\">*</span>';}?>\t\t\t\t\t</td>\r\n\t\t\t\t\t<td align=\"left\" width=\"50%\" class=\"emailfriendtextnormal\" valign=\"top\">\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\techo get_Field($row_checkout['field_key'],$saved_checkoutvals,$cartData);\r\n\t\t\t\t\t?>\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t<?php\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t?>\r\n\t\t\t</table>\t\t</td>\r\n\t </tr>\t\r\n\t<tr id=\"payonaccount_self_tr\" style=\"display:<?php echo $self_disp?>\">\r\n\t\t<td colspan=\"2\" align=\"left\" valign=\"middle\">\t\r\n\t\t<table width=\"100%\" cellpadding=\"1\" cellspacing=\"1\" border=\"0\">\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\" align=\"left\" class=\"shoppingcartheader\"><?php echo $Captions_arr['PAYONACC']['PAYON_CREDIT_CARD_DETAILS']?></td>\r\n\t\t</tr>\r\n\t\t<?php\r\n\t\t\t$cur_form = 'frm_payonaccount_payment';\r\n\t\t\t// Get the list of credit card static fields to be shown in the checkout out page in required order\r\n\t\t\t$sql_checkout = \"SELECT field_det_id,field_key,field_name,field_req,field_error_msg \r\n\t\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t\tgeneral_settings_site_checkoutfields \r\n\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\tsites_site_id = $ecom_siteid \r\n\t\t\t\t\t\t\t\t\tAND field_hidden=0 \r\n\t\t\t\t\t\t\t\t\tAND field_type='CARD' \r\n\t\t\t\t\t\t\t\tORDER BY \r\n\t\t\t\t\t\t\t\t\tfield_order\";\r\n\t\t\t$ret_checkout = $db->query($sql_checkout);\r\n\t\t\tif($db->num_rows($ret_checkout))\r\n\t\t\t{\t\t\t\t\t\t\r\n\t\t\t\twhile($row_checkout = $db->fetch_array($ret_checkout))\r\n\t\t\t\t{\t\t\t\r\n\t\t\t\t\t// Section to handle the case of required fields\r\n\t\t\t\t\tif($row_checkout['field_req']==1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($row_checkout['field_key']=='checkoutpay_expirydate' or $row_checkout['field_key']=='checkoutpay_issuedate')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$chkoutcc_Req[]\t\t\t= \"'\".$row_checkout['field_key'].\"_month'\";\r\n\t\t\t\t\t\t\t$chkoutcc_Req_Desc[]\t= \"'\".$row_checkout['field_error_msg'].\"'\";\r\n\t\t\t\t\t\t\t$chkoutcc_Req[]\t\t\t= \"'\".$row_checkout['field_key'].\"_year'\";\r\n\t\t\t\t\t\t\t$chkoutcc_Req_Desc[]\t= \"'\".$row_checkout['field_error_msg'].\"'\"; \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$chkoutcc_Req[]\t\t\t= \"'\".$row_checkout['field_key'].\"'\";\r\n\t\t\t\t\t\t\t$chkoutcc_Req_Desc[]\t= \"'\".$row_checkout['field_error_msg'].\"'\"; \r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\t}\t\t\t\r\n\t\t?>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td align=\"left\" width=\"50%\" class=\"emailfriendtextnormal\">\r\n\t\t\t\t\t<?php echo stripslashes($row_checkout['field_name']); if($row_checkout['field_req']==1) { echo '&nbsp;<span class=\"redtext\">*</span>';}?>\t\t\t\t\t</td>\r\n\t\t\t\t\t<td align=\"left\" width=\"50%\" class=\"emailfriendtextnormal\">\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\techo get_Field($row_checkout['field_key'],$saved_checkoutvals,$cartData,$cur_form);\r\n\t\t\t\t\t?>\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t<?php\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t?> \r\n\t\t</table>\t</td>\r\n\t</tr>\r\n\t<?php\r\n $google_displayed = false;\r\n\tif(!($google_exists && $google_recommended ==0) or $paytypes_cnt>0)\r\n\t{\r\n\t?>\t\r\n\t\t<tr>\r\n\t\t<td colspan=\"4\" align=\"right\" class=\"emailfriendtext\"><input name=\"payonaccount_payment_Submit\" type=\"submit\" class=\"buttongray\" id=\"payonaccount_payment_Submit\" value=\"<?=\"Make Payment\"?>\"/></td>\r\n\t\t</tr>\r\n\t<?php\r\n\t}\r\n }\r\n if($ecom_common_settings['paymethodKey']['PAYPAL_EXPRESS']['paymethod_key'] == \"PAYPAL_EXPRESS\" and $_REQUEST['pret']!=1) // case if paypal express is active in current website\r\n {\r\n ?>\r\n <tr>\r\n <td colspan=\"2\">\r\n <table width='100%' cellpadding='0' cellspacing='0' border='0' class=\"shoppingcarttable\">\r\n <?php\r\n if($totpaycnt>0 or $google_displayed==true)\r\n {\r\n ?>\r\n <tr>\r\n <td align=\"right\" valign=\"middle\" class=\"google_or\" colspan=\"2\">\r\n <img src=\"<?php echo url_site_image('gateway_or.gif')?>\" alt=\"Or\" border=\"0\" />\r\n </td>\r\n </tr> \r\n <?php\r\n }\r\n ?>\r\n <tr>\r\n <td align=\"left\" valign=\"top\" class=\"google_td\" width=\"60%\"><?php echo stripslashes($Captions_arr['CART']['CART_PAYPAL_HELP_MSG']);?></td>\r\n <td align=\"right\" valign=\"middle\" class=\"google_td\">\r\n <input type='hidden' name='for_paypal' id='for_paypal' value='0'/>\r\n <input type='button' name='submit_express' style=\"background:url('https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif'); width:145px;height:42px;cursor:pointer\" border='0' align='top' alt='PayPal' onclick=\"validate_payonaccount_paypal(document.frm_payonaccount_payment)\"/>\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n <?php\r\n }\r\n elseif($_REQUEST['pret']==1) // case if returned from paypal so creating input types to hold the payment type and payment method ids\r\n {\r\n ?>\r\n <tr>\r\n <td colspan=\"2\">\r\n <table width='100%' cellpadding='0' cellspacing='0' border='0'>\r\n <tr>\r\n <td colspan=\"2\" align=\"right\" class=\"gift_mid_table_td\">\r\n <input type='hidden' name='payonaccount_paytype' id = 'payonaccount_paytype' value='<?php echo $ecom_common_settings['paytypeCode']['credit_card']['paytype_id']?>'/>\r\n <input type='hidden' name='payonaccount_paymethod' id = 'payonaccount_paymethod' value='PAYPAL_EXPRESS_<?php echo $ecom_common_settings['paymethodKey']['PAYPAL_EXPRESS']['paymethod_id']?>'/>\r\n <input type='hidden' name='override_paymethod' id = 'override_paymethod' value='1'/>\r\n <input type='hidden' name='token' id = 'token' value='<?php echo $_REQUEST['token']?>'/>\r\n <input type='hidden' name='payer_id' id = 'payer_id' value='<?php echo $_REQUEST['payer_id']?>'/>\r\n <input type='hidden' name='for_paypal' id='for_paypal' value='0'/>\r\n <input name=\"buypayonaccountpayment_Submit\" type=\"button\" class=\"buttongray\" id=\"buypayonaccountpayment_Submit\" value=\"<?=$Captions_arr['PAYONACC']['PAYON_PAY']?>\" onclick=\"validate_payonaccount(document.frm_payonaccount_payment)\" /></td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n \r\n <?php\r\n }\r\n\t?>\r\n\t\t\t</form>\r\n\t<?php\r\n\t\t \t// Check whether the google checkout button is to be displayed\r\n\t\tif($google_exists && $google_recommended ==0 && $_REQUEST['pret']!=1)\r\n\t\t{\r\n\t\t\t$row_google = $db->fetch_array($ret_google);\r\n\t?>\r\n\t<tr>\r\n\t<td colspan=\"2\">\r\n\t\t<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"shoppingcarttable\">\r\n\t\t<?php \r\n\t\tif($paytypes_cnt>0)\r\n\t\t{\r\n $google_displayed = true;\r\n\t\t?>\t\r\n\t\t<tr>\r\n\t\t\t<td align=\"right\" valign=\"middle\" class=\"google_or\">\r\n\t\t\t <img src=\"<?php echo url_site_image('gateway_or.gif')?>\" alt=\"Or\" border=\"0\" />\r\n\t\t\t</td>\r\n\t\t</tr>\t\r\n\t\t<?php\r\n\t\t}\r\n\t\t?>\t\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"6\" align=\"right\" valign=\"middle\" class=\"google_td\">\r\n\t\t\t<?php\r\n\t\t\t\t$display_option = 'ALL';\r\n\t\t\t\t// Get the details of current customer to pass to google checkout\r\n\t\t\t\t$pass_type \t= 'payonaccount';\r\n\t\t\t\t$cust_details \t= stripslashes($row_cust['customer_title']).stripslashes($row_cust['customer_fname']).' '.stripslashes($row_cust['customer_surname']).' - '.stripslashes($row_cust['customer_email_7503']).' - '.$ecom_hostname;\r\n\t\t\t\t$cartData[\"totals\"][\"bonus_price\"] = $paying_amt;\r\n\t\t\t\trequire_once('includes/google_library/googlecart.php');\r\n\t\t\t\trequire_once('includes/google_library/googleitem.php');\r\n\t\t\t\trequire_once('includes/google_library/googleshipping.php');\r\n\t\t\t\trequire_once('includes/google_library/googletax.php');\r\n\t\t\t\tinclude(\"includes/google_checkout.php\");\r\n\t\t\t?>\t\r\n\t\t\t</td>\r\n\t\t</tr>\t\r\n\t\t</table>\r\n\t</td>\r\n\t</tr>\r\n\t<?php\r\n\t\t\t}\r\n\t?>\t\r\n\t</table>\t</td>\r\n\t</tr>\r\n</table>\r\n\r\n\t\t<script type=\"text/javascript\">\r\n\t\tfunction validate_payonaccount(frm)\r\n\t\t{\r\n if(document.getElementById('for_paypal').value!=1)\r\n {\r\n\t\t<?php\r\n\t\t\tif(count($chkoutadd_Req))\r\n\t\t\t{\r\n\t\t\t?>\r\n\t\t\t\treqadd_arr \t\t\t= new Array(<?php echo implode(\",\",$chkoutadd_Req)?>);\r\n\t\t\t\treqadd_arr_str\t\t= new Array(<?php echo implode(\",\",$chkoutadd_Req_Desc)?>);\r\n\t\t\t<?php\r\n\t\t\t}\r\n\t\t\tif(count($chkoutcc_Req))\r\n\t\t\t{\r\n\t\t\t?>\r\n\t\t\t\treqcc_arr \t\t\t= new Array(<?php echo implode(\",\",$chkoutcc_Req)?>);\r\n\t\t\t\treqcc_arr_str\t\t= new Array(<?php echo implode(\",\",$chkoutcc_Req_Desc)?>);\r\n\t\t\t<?php\r\n\t\t\t}\r\n\t\t\t?>\r\n\t\t\tfieldRequired\t\t= new Array();\r\n\t\t\tfieldDescription\t= new Array();\r\n\t\t\tvar i=0;\r\n\t\t\t<?php\r\n\t\t\tif($Settings_arr['imageverification_req_payonaccount'])\r\n\t\t\t{\r\n\t\t\t?>\r\n\t\t\tfieldRequired[i] \t\t= 'payonaccountpayment_Vimg';\r\n\t\t\tfieldDescription[i]\t = 'Image Verification Code';\r\n\t\t\ti++;\r\n\t\t\t<?php\r\n\t\t\t}\r\n\t\t\tif (count($chkoutadd_Req))\r\n\t\t\t{\r\n\t\t\t?>\r\n\t\t\tif(document.getElementById('payonaccount_cheque_tr').style.display=='') /* do the following only if checque is selected */\r\n\t\t\t{\r\n\t\t\t\tfor(j=0;j<reqadd_arr.length;j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfieldRequired[i] \t= reqadd_arr[j];\r\n\t\t\t\t\tfieldDescription[i] = reqadd_arr_str[j];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t<?php\r\n\t\t\t}\r\n\t\t\tif (count($chkoutcc_Req))\r\n\t\t\t{\r\n\t\t\t?>\r\n\t\t\tif(document.getElementById('payonaccount_self_tr').style.display=='') /* do the following only if protx or self is selected */\r\n\t\t\t{\r\n\t\t\t\tfor(j=0;j<reqcc_arr.length;j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfieldRequired[i] \t= reqcc_arr[j];\r\n\t\t\t\t\tfieldDescription[i] = reqcc_arr_str[j];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\t<?php\r\n\t\t\t}\t\r\n\t\t\tif (count($chkout_Email))\r\n\t\t\t{\r\n\t\t\t$chkout_Email_Str \t\t= implode(\",\",$chkout_Email);\r\n\t\t\techo \"fieldEmail \t\t= Array(\".$chkout_Email_Str.\");\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\techo \"fieldEmail \t\t= Array();\";\r\n\t\t\t// Password checking\r\n\t\t\tif (count($chkout_Confirm))\r\n\t\t\t{\r\n\t\t\t$chkout_Confirm_Str \t= implode(\",\",$chkout_Confirm);\r\n\t\t\t$chkout_Confirmdesc_Str\t= implode(\",\",$chkout_Confirmdesc);\r\n\t\t\techo \"fieldConfirm \t\t= Array(\".$chkout_Confirm_Str.\");\";\r\n\t\t\techo \"fieldConfirmDesc \t= Array(\".$chkout_Req_Desc_Str.\");\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\techo \"fieldConfirm \t\t= Array();\";\r\n\t\t\techo \"fieldConfirmDesc \t= Array();\";\r\n\t\t\t}\t\r\n\t\t\tif (count($chkout_Numeric))\r\n\t\t\t{\r\n\t\t\t\t$chkout_Numeric_Str \t\t= implode(\",\",$chkout_Numeric);\r\n\t\t\t\techo \"fieldNumeric \t\t\t= Array(\".$chkout_Numeric_Str.\");\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\techo \"fieldNumeric \t\t\t= Array();\";\r\n\t\t\t?>\r\n\t\t\tif(Validate_Form_Objects(frm,fieldRequired,fieldDescription,fieldEmail,fieldConfirm,fieldConfirmDesc,fieldNumeric))\r\n\t\t\t{\r\n\t\t\t/* Check whether atleast one payment type is selected */\r\n\t\t\tvar atleastpay = false;\r\n\t\t\tfor(k=0;k<frm.elements.length;k++)\r\n\t\t\t{\r\n\t\t\t\tif(frm.elements[k].name=='payonaccount_paytype')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(frm.elements[k].type=='hidden')\r\n\t\t\t\t\t\tatleastpay = true; /* Done to handle the case of only one payment type */\r\n\t\t\t\t\telse if(frm.elements[k].checked==true)\r\n\t\t\t\t\t\tatleastpay = true;\t\r\n\t\t\t\t}\t\r\n\t\t\t}\t\r\n\t\t\tif(atleastpay==false)\r\n\t\t\t{\r\n\t\t\t\talert('Please select payment type');\r\n\t\t\t\treturn false;\t\r\n\t\t\t}\r\n\t\t\tif (document.getElementById('paymentmethod_req').value==1)\r\n\t\t\t{\r\n\t\t\t\tvar atleast = false;\r\n\t\t\t\tfor(k=0;k<frm.elements.length;k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(frm.elements[k].name=='payonaccount_paymethod')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(frm.elements[k].type=='hidden')\r\n\t\t\t\t\t\t\tatleast = true; /* Done to handle the case of only one payment method */\r\n\t\t\t\t\t\telse if(frm.elements[k].checked==true)\r\n\t\t\t\t\t\t\tatleast = true;\t\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\t\r\n\t\t\t\tif(atleast ==false)\r\n\t\t\t\t{\r\n\t\t\t\t\talert('Please select a payment method');\r\n\t\t\t\t\treturn false;\t\r\n\t\t\t\t}\t\r\n\t\t\t}\t\r\n\t\t\telse\r\n\t\t\t{\r\n if(document.getElementById('override_paymethod'))\r\n {\r\n if(document.getElementById('override_paymethod').value!=1)\r\n {\r\n if (document.getElementById('payonaccount_paymethod'))\r\n document.getElementById('payonaccount_paymethod').value = 0; \r\n }\r\n }\r\n else\r\n {\r\n if (document.getElementById('payonaccount_paymethod'))\r\n\t\t\t\t\tdocument.getElementById('payonaccount_paymethod').value = 0;\r\n }\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Handling the case of credit card related sections*/\r\n\t\t\tif(frm.checkoutpay_cardtype)\r\n\t\t\t{\r\n\t\t\t\tif(frm.checkoutpay_cardtype.value)\r\n\t\t\t\t{\r\n\t\t\t\t\tobjarr = frm.checkoutpay_cardtype.value.split('_');\r\n\t\t\t\t\tif(objarr.length==4) /* if the value splitted to exactly 4 elements*/\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvar key \t\t= objarr[0];\r\n\t\t\t\t\t\tvar issuereq \t= objarr[1];\r\n\t\t\t\t\t\tvar seccount \t= objarr[2];\r\n\t\t\t\t\t\tvar cc_count \t= objarr[3];\r\n\t\t\t\t\t\tif (isNaN(frm.checkoutpay_cardnumber.value))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\talert('Credit card number should be numeric');\r\n\t\t\t\t\t\t\tfrm.checkoutpay_cardnumber.focus();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (frm.checkoutpay_cardnumber.value.length>cc_count)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\talert('Credit card number should not contain more than '+cc_count+' digits');\r\n\t\t\t\t\t\t\tfrm.checkoutpay_cardnumber.focus();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (frm.checkoutpay_securitycode.value.length>seccount)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\talert('Security Code should not contain more than '+seccount+' digits');\r\n\t\t\t\t\t\t\tfrm.checkoutpay_securitycode.focus();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t\t/* If reached here then everything is valid \r\n\t\t\t\tchange the action of the form to the desired value\r\n\t\t\t*/\r\n\t\t\t\tif(document.getElementById('save_payondetails'))\r\n\t\t\t\t\tdocument.getElementById('save_payondetails').value \t= 1;\r\n if(document.getElementById('payonaccount_payment_Submit'))\r\n\t\t\t\tshow_wait_button(document.getElementById('payonaccount_payment_Submit'),'Please wait...');\r\n\t\t\t\t/*frm.action = 'payonaccount_payment_submit.php?bsessid=<?php //echo base64_encode($ecom_hostname)?>';*/\r\n\t\t\t\tfrm.action = 'payonaccount_payment_submit.php';\r\n\t\t\t\tfrm.submit();\r\n\t\t\t\treturn true;\r\n\t\t\t}\t\r\n\t\t\telse\r\n\t\t\treturn false;\r\n }\r\n else\r\n {\r\n if(document.getElementById('save_payondetails'))\r\n document.getElementById('save_payondetails').value = 1;\r\n show_wait_button(document.getElementById('payonaccount_payment_Submit'),'Please wait...');\r\n /*frm.action = 'payonaccount_payment_submit.php?bsessid=<?php //echo base64_encode($ecom_hostname)?>';*/\r\n frm.action = 'payonaccount_payment_submit.php';\r\n frm.submit();\r\n return true;\r\n }\r\n\t\t}\r\n function validate_payonaccount_paypal(frm)\r\n {\r\n if(document.getElementById('for_paypal'))\r\n document.getElementById('for_paypal').value = 1;\r\n validate_payonaccount(frm);\r\n }\r\n\t\t</script>\t\r\n\t\t<?php\t\r\n\t\t}", "function __construct()\n\t{\n\t\t//$this->PaypalAdaptivePayments = Paypaladaptive::initialize();\n\t\t$this->paypal_transaction = Paypaladaptive::initializePaypalTransaction();\n\t\t$this->shop_order_obj = Webshoporder::initialize();\n\t\t$this->invoice_obj = Webshoporder::initializeInvoice();\n\t\t$this->product_obj = Products::initialize();\n\t\t$this->common_invoice_obj = Products::initializeCommonInvoice();\n\t\t$this->manage_credits_obj = Products::initializeManageCredits();\n\t}" ]
[ "0.6206494", "0.605665", "0.605665", "0.5996564", "0.589473", "0.5863602", "0.58284533", "0.58222413", "0.5820483", "0.58192134", "0.57723814", "0.57627606", "0.57498014", "0.57372594", "0.5725988", "0.57023543", "0.57003707", "0.57003707", "0.5700028", "0.5676306", "0.5675551", "0.567432", "0.56537074", "0.5628773", "0.5621634", "0.5613577", "0.56095666", "0.5591087", "0.5574707", "0.5574559" ]
0.6754117
0
add a new project
public function addproject() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function add_project()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t$projects = $serviceManager->get('PM/Model/Projects');\n \t$result = $projects->getProjectById($this->pk);\t\n \t\n \tif($result)\n \t{\n \t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t$project_url = $this->view->url('projects/view', array('company_id' => FALSE, 'project_id' => $result['id']));\n \t\t\n \t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t$this->add_breadcrumb($project_url, $result['name'], TRUE);\n \t}\n }", "public function addProject( $data = array() ) { \t\n\n $url = $this->_base_url . 'projects';\n $options['data']['project'] = $data;\n $options['post'] = true;\n $this->_callAPI($url, $options);\n }", "public function newProject()\n {\n\n GeneralUtility::checkReqFields(array(\"name\"), $_POST);\n\n $project = new Project();\n $project->create($_POST[\"name\"], $_SESSION[\"uuid\"]);\n\n }", "function add_project( $user, $project, $type=\"local\")\n {\n //Unimplemented\n }", "public function addProject($project)\r\n {\r\n \t//IF project already exist into our DB then update record\r\n \tif($this->projectModel->isExistProject($project['id']))\r\n \t{\r\n \t\t$this->projectModel->updateExistingProject($project);\r\n \t}\r\n \telse\r\n \t{\r\n \t\t//IF project not exist then add new project\r\n \t\t$this->projectModel->addNewProject($project);\r\n \t}\r\n }", "function add() {\r\n\t\t$this->checkUserRoles(array('admin','manager'));\r\n\t\t\r\n\t\tif (!empty($this->data)) {\r\n\t\t\t$this->OffshoreProjectManager->create();\r\n\t\t\tif ($this->OffshoreProjectManager->save($this->data)) {\r\n\t\t\t\t$this->Session->setFlash(__('The offshore project manager has been saved', true));\r\n\t\t\t\t$this->redirect(array('action' => 'index'));\r\n\t\t\t} else {\r\n\t\t\t\t$this->Session->setFlash(__('The offshore project manager could not be saved. Please, try again.', true));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$all_projects = $this->OffshoreProjectManager->Project->find('all');\r\n\t\t$projects = array();\r\n\t\tforeach($all_projects as $project){\r\n\t\t\t$projects[$project['Project']['id']] = $project['Client']['name'].\" - \".$project['Project']['title'];\r\n\t\t}\r\n\t\t$this->set(compact('projects'));\r\n\t}", "public function newProjectAction()\n\t\t{\n\n\t\t\tif(!empty($_POST))\n\t\t\t{\n\t\t\t\t$project=new Projects($_POST);\n\n\t\t\t\t$user=Auth::getUser();\n\n\t\t\t\tif($project->save($user->id))\n\t\t\t\t{\n\t\t\t\t\t$id=$project->returnLastID()[0];\n\n\t\t\t\t\tforeach($project->tasks as $task)\n\t\t\t\t\t{\n\t\t\t\t\t\tTasks::save($task, $id);\n\t\t\t\t\t}\n\n\t\t\t\t\tImages::save($project->imagepath, $id);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function addProject(ProjectInterface $project);", "function _add_to_project()\n {\n if (!$this->has_arg('pid'))\n $this->_error('No project id specified');\n if (!$this->has_arg('ty'))\n $this->_error('No item type specified');\n if (!$this->has_arg('iid'))\n $this->_error('No item id specified');\n\n\n if (array_key_exists($this->arg('ty'), $this->types))\n {\n $t = $this->types[$this->arg('ty')];\n\n $chk = $this->db->pq(\"SELECT projectid FROM $t[0] WHERE projectid=:1 AND $t[1]=:2\", array($this->arg('pid'), $this->arg('iid')));\n\n if ($this->has_arg('rem') && sizeof($chk))\n {\n $this->db->pq(\"DELETE FROM $t[0] WHERE projectid=:1 AND $t[1]=:2\", array($this->arg('pid'), $this->arg('iid')));\n }\n\n if (!sizeof($chk))\n {\n $this->db->pq(\"INSERT INTO $t[0] (projectid,$t[1]) VALUES (:1, :2)\", array($this->arg('pid'), $this->arg('iid')));\n }\n\n $this->_output(1);\n }\n }", "public function addAction()\n {\n $this->getServiceLocator()->get('permissions')->enforce('projectAddAllowed');\n\n // force the 'id' field to have the value of name\n // the input filtering will reformat it for us.\n $request = $this->getRequest();\n $request->getPost()->set('id', $request->getPost('name'));\n\n return $this->doAddEdit(ProjectFilter::MODE_ADD);\n }", "public function addProject(GProject $project) {\n\t\tarray_push($this->projects, $project);\n\t}", "function addProject($project_id, $project_name, $type, $year, $country, $location, $size, $completion_date, $description){\n $ConnectionManager = new ConnectionManager();\n $conn = $ConnectionManager->getConnection();\n $stmt = $conn->prepare(\"INSERT INTO project (project_id, project_name, type, year, country, location, size, completion_date, description) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\");\n $stmt->bind_param(\"sssssssss\", $project_id, $project_name, $type, $year, $country, $location, $size, $completion_date, $description);\n $stmt->execute();\n $ConnectionManager->closeConnection($stmt, $conn);\n }", "public function add_project() \n\t{\n\t\t//form validation rules\n\t\t$this->form_validation->set_rules('project_instructions', 'project Instructions', 'required|xss_clean');\n\t\t$this->form_validation->set_rules('project_start_date', 'Project Start Date', 'required|xss_clean');\n\t\t$this->form_validation->set_rules('project_end_date', 'Project End Date', 'required|xss_clean');\n\t\t\n\t\t//if form has been submitted\n\t\tif ($this->form_validation->run())\n\t\t{\n\t\t\tif($this->projects_model->add_project())\n\t\t\t{\n\t\t\t\t$this->session->set_userdata('success_message', 'Youhave successfully added a project');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->session->set_userdata('error_message', 'Could not update project. Please try again');\n\t\t\t}\n\t\t\tredirect('tree-planting/projects');\n\t\t}\n\t\t\n\t\t//open the add new project\n\t\t$data['title'] = 'Add project';\n\t\t$v_data['title'] = 'Add project';\n\t\t$v_data['project_status_query'] = $this->projects_model->get_project_status();\n\n\t\t$data['content'] = $this->load->view('projects/projects/add_project', $v_data, true);\n\t\t\n\t\t$this->load->view('admin/templates/general_page', $data);\n\t}", "public function add() {\n // Load add template\n $add = new Views('templates/add.tpl.php');\n // Add header and footer template\n $add->set('header', $add->addHeader());\n $add->set('footer', $add->addFooter());\n $add->set('error', '');\n $add->set('success', '');\n\n //Check if user posted form\n if (isset($_POST['name'])) {\n $name = htmlspecialchars($_POST['name'], ENT_QUOTES);\n $file = new Files($_FILES['file']);\n //Manage uploaded file. If is something wrong with file return error\n if ($destination = $file->manageUploadedFile()) {\n $this->db->addProject($name, $destination);\n $add->set('success', ' <span class=\"button\">Your project has been created, go to project list page and start your scan!</span>');\n }\n else {\n $add->set('error', ' <span class=\"button error_button\">File error: Cannot extract file. Check archive or directory permissions.</span>');\n }\n }\n return $add->render();\n }", "function add_project(){\n\n\tif(isset($_SESSION['username'])){\t\n\tif($_GET['action']==='add' && $_GET['type']==='project'){\n\t\t$project_name = strtolower(trim(mysql_prep($_POST['project_name'])));\n\t\t$content = trim(mysql_prep($_POST['content']));\n\t\t$parent = trim(mysql_prep($_POST['parent']));\n\t\t$parent_id = trim(mysql_prep($_POST['parent_id']));\n\t\t$path = ADDONS_PATH.\"project_manager/?action=show&project_name={$project_name}\";\n\t\t$author = $_SESSION['username'];\n\t\t$editor = '';\n\t\t$created = date('c');\n\t\t$last_update ='';\n\t\t$status = 'pending';\n\n\t\tif($_POST['submit'] ==='Add project') {\n\t\t\t$query = mysqli_query($GLOBALS[\"___mysqli_ston\"], \"INSERT INTO `project_manager_project`\n\t\t\t(`id`, `project_name`, `content`, `author`, `project_manager`, `path`, `editor`, `created`, `last_updated`, `status`, `parent`, `parent_id`) \n\t\t\tVALUES ('0','{$project_name}', '{$content}', '{$author}', '{$author}', '{$path}', '{$editor}','{$created}','{$last_updated}','{$status}','{$parent}','{$parent_id}')\") \n\t\t\tor die (\"Error inserting project \". ((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n\t\t\tif($query){ \n\t\t\t\tactivity_record(\n\t\t\t\t\t$parent_id = $result['id'],\n\t\t\t\t\t$actor=$author,\n\t\t\t\t\t$action=' created the project ',\n\t\t\t\t\t$subject_name = $project_name,\n\t\t\t\t\t$actor_path = BASE_PATH.'user/?user='.$author,\n\t\t\t\t\t$subject_path= ADDONS_PATH.'project_manager/?action=show&project_name='.$project_name,\n\t\t\t\t\t$date = $created,\n\t\t\t\t\t$parent='project_manager'\n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\tsession_message(\"success\", \"project saved successfully!\"); \n\t\t\t\tredirect_to($_SESSION['prev_url']);\n\t\t\t}\n\t\t}\n\n\t\tif(isset($_GET['parent'])){\n\t\t\t$parent = $_GET['parent'];\n\t\t\t}\n\t\tif(isset($_GET['tid'])){\n\t\t\t$parent_id = $_GET['tid'];\n\t\t\t}\n\t\techo '<h2 align=\"center\">Add Project</h2><hr><form method=\"post\" action=\"'.$_SESSION['current_url'].'\">\n\t\tName :<br><input type=\"text\" name=\"project_name\" value=\"\" placeholder=\"Project name\"><br>\n\t\t<input type=\"hidden\" name=\"parent\" value=\"'.$parent.'\"> \n\t\t<input type=\"hidden\" name=\"parent_id\" value=\"'.$parent_id.'\"> \n\t\tDescription: <br><textarea name=\"content\" size=\"5\"> What is this project about ?</textarea>\n\t\t<input type=\"submit\" name=\"submit\" value=\"Add project\" class=\"button-primary\">\n\t\t</form>\t';\n\t\t}\n\t}\n}", "private function createProject() {\n\n require_once('../ProjectController.php');\n $maxMembers = $this->provided['maxMembers'];\n $minMembers = $this->provided['minMembers'];\n $difficulty = $this->provided['difficulty'];\n $name = $this->provided['name'];\n $description = $this->provided['description'];\n //TODO REMOVE ONCE FETCHED\n //$tags = $this->provided['tags'];\n setcookie('userId', \"userId\", 0, \"/\");\n // TODO FIX ISSUE HERE: you have to reload the page to get the result with a cookie set\n $tags = array(new Tag(\"cool\"), new Tag(\"java\"), new Tag(\"#notphp\"));\n $project = new Project($maxMembers, $minMembers, $difficulty, $name, $description, $tags);\n foreach (ProjectController::getAllPools() as $pool) {\n if ($pool->hasID($this->provided['sessionID'])) {\n $pool->addProject($project, $tags);\n ProjectController::redirectToHomeAdmin($pool);\n }\n }\n }", "function add_projects( $params ) {\n\t\t$this->db->insert( 'projects', $params );\n\t\treturn $this->db->insert_id();\n\t}", "public function add()\n {\n return view('add_project');\n }", "public function add_new_project($info)\n {\n $this->db->insert($this->db->CHRISTAN_PROJECT,$info);\n \n $res = $this->db->insert_id();\n return $res;\n }", "static function addProject($project)\n {\n global $db;\n $id = NULL;\n\n if (self::isValidProject($project)) {\n $project = self::castProject($project);\n try {\n $id = $db->insert('project', $project);\n } catch (\\Exception $exception) {\n Log::write($exception, $db->getLastError());\n }\n }\n\n return $id;\n }", "public function add() {\n\n\t\t\t$projetoNome = $_POST['pjt_new_1'];\n\t\t\t$projetoData = $_POST['pjt_new_2'];\n\n\t\t\t$db = new Projetos_Model();\n\t\t\t$db->insert('sis_pjt', array(\n\t\t\t\t\"pjt_nme\" => \"$projetoNome\",\n\t\t\t\t\"pjt_data\" => \"$projetoData\",\n\t\t\t));\n\n\t\t\treturn header( \"Location: ../projetos\" );\n\t\t}", "public function add(){\n\t\t\tif(!empty($data['Project']['project_file'])) {\n\t\t\t$attached_files = json_decode($data['Project']['project_file'], true);\n\t\t\t$this->set('attached_files', $attached_files);\n\n\t\t\t}\n\t\t\t\n\t\t\tif($this->request->is(array('post', 'put'))) {\n\t\t\t\n\t\t\tif(!empty($this->request->data['Project']['project_file'])) {\n\t\t\t\t$this->request->data['Project']['project_file'] = json_encode($this->request->data['Project']['project_file']);\n\t\t\t\t}\n\t\t\t// store project owner name instead of id if selected in form\t\t\t\n\t\t\tif(!empty($this->request->data['Project']['owner'])){\n\t\t\t\t$this->User->id = $this->request->data['Project']['owner'];\n\t\t\t\t\n\t\t\t\t$this->request->data['Project']['owner']=$this->User->field('name');\n\t\t\t}\n\t\t\t\n\t\t\t// set project start date and store in sql format\n\t\t\tif(!empty($this->request->data['Project']['project_start'])){\n\t\t\t\t$this->request->data['Project']['project_start'] = sqlFormatDate($this->request->data['Project']['project_start']);\t\n\t\t\t}else{\n\t\t\t\t$this->request->data['Project']['project_start'] = gmdate('Y-m-d');\n\t\t\t}\n\t\t\t// set project deadline\n\t\t\tif(!empty($this->request->data['Project']['deadline'])){\n\t\t\t\t$this->request->data['Project']['deadline'] = sqlFormatDate($this->request->data['Project']['deadline']);\t\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t\tif(empty($this->request->data['Deliverable']['project_id'])){\n\t\t\t\t\techo 'no project selected';\n\t\t\t\t\t$this->Session->setFlash(__('No project selected!'));\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\tif( $this->Project->saveAll($this->request->data)){\n\t\t\t\t\t\t$this->Session->setFlash('Project Created!');\n\t\t\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t \n\t\t}", "public function actionCreate()\n {\n $model = new Project();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n OperationRecord::record($model->tableName(), $model->pj_id, $model->pj_name, OperationRecord::ACTION_ADD);\n return $this->redirect(['view', 'id' => $model->pj_id]);\n }\n\n if (Yii::$app->request->isPost) {\n Yii::$app->session->setFlash('error', Yii::t('app', 'Create project failed!'));\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function addProject($projectId)\n {\n //$projectModel = new ProjectModel($projectId);\n $this->projects->_addRef($projectId);\n //$projectModel->users->_addRef($this->id);\n }", "public function create()\n {\n if (!isset($_POST['name']) || !isset($_POST['creator'])) {\n call('pages', 'error');\n return;\n }\n $id = Project::insert($_POST['name'], $_POST['creator']);\n\n $project = Project::find($id);\n $tasks = Task::getAllForProject($_GET['id']);\n require_once('views/projects/show.php');\n }", "public function run()\n {\n $items = [\n \n ['title' => 'New Startup Project', 'client_id' => 1, 'description' => 'The best project in the world', 'start_date' => '2016-11-16', 'budget' => '10000', 'project_status_id' => 1],\n\n ];\n\n foreach ($items as $item) {\n \\App\\Project::create($item);\n }\n }", "protected function createProjects()\n {\n $project = new Project($this->p4);\n $project->set(\n array(\n 'id' => 'project1',\n 'name' => 'pro-jo',\n 'description' => 'what what!',\n 'members' => array('jdoe'),\n 'branches' => array(\n array(\n 'id' => 'main',\n 'name' => 'Main',\n 'paths' => '//depot/main/...',\n 'moderators' => array('bob')\n )\n )\n )\n );\n $project->save();\n\n $project = new Project($this->p4);\n $project->set(\n array(\n 'id' => 'project2',\n 'name' => 'pro-tastic',\n 'description' => 'ho! ... hey!',\n 'members' => array('lumineer'),\n 'branches' => array(\n array(\n 'id' => 'dev',\n 'name' => 'Dev',\n 'paths' => '//depot/dev/...'\n )\n )\n )\n );\n $project->save();\n }", "public function add_project($data)\n {\n $datafields = array\n ('start' => array('req' => false, 'def' => 'NULL')\n ,'end' => array('req' => false, 'def' => 'NULL')\n ,'gid' => array('req' => true)\n ,'title' => array('req' => false, 'def' => '')\n ,'location' => array('req' => false, 'def' => '')\n ,'description' => array('req' => false, 'def' => '')\n ,'importance' => array('req' => false, 'def' => '1')\n ,'completion' => array('req' => false, 'def' => '0')\n ,'status' => array('req' => false, 'def' => '0')\n ,'uuid' => array('req' => false, 'def' => basics::uuid())\n );\n foreach ($datafields as $k => $v) {\n if (!isset($data[$k])) {\n if ($v['req'] === true) {\n return false;\n }\n $data[$k] = $v['def'];\n } else {\n $data[$k] = $this->esc($data[$k]);\n }\n }\n $query = 'INSERT '.$this->Tbl['cal_project'].' SET `uid`='.$this->uid.',`gid`='.$data['gid']\n .',`starts`='.($data['start'] == 'NULL' ? 'NULL' : '\"'.$data['start'].'\"')\n .',`ends`='.($data['end'] == 'NULL' ? 'NULL' : '\"'.$data['end'].'\"')\n .',`title`=\"'.$data['title'].'\",`location`=\"'.$data['location'].'\"'\n .',`description`=\"'.$data['description'].'\",`uuid`=\"'.$data['uuid'].'\"'\n .',`importance`='.doubleval($data['importance']).',`completion`='.doubleval($data['completion'])\n .',`status`='.doubleval($data['status']);\n if (!$this->query($query)) {\n return false;\n }\n $newId = $this->insertid();\n // Make sure, the end of an event is NOT before its beginning\n $this->query('UPDATE '.$this->Tbl['cal_task'].' SET `ends`=`starts` WHERE `ends`<`starts` AND id='.$newId);\n return $newId;\n }", "function createExternalTasksProject($projectName = \"CodevTT_ExternalTasks\", $projectDesc = \"CodevTT ExternalTasks Project\") {\n // create project\n $projectid = Project::getIdFormName($projectName);\n if (false === $projectid) {\n throw new Exception(\"CodevTT external tasks project creation failed\");\n }\n if (-1 !== $projectid) {\n echo \"<script type=\\\"text/javascript\\\">console.info(\\\"INFO: CodevTT external tasks project already exists: $projectName\\\");</script>\";\n } else {\n $projectid = Project::createExternalTasksProject($projectName, $projectDesc);\n }\n return $projectid;\n}", "function addItemProject($company, $project, $projectname){\n\t\t\t\t$arTmp = array(\"company_id\" => $company,\n\t\t\t\t\t\t\t\t\"project_id\" => $project,\n\t\t\t\t\t\t\t\t\"project_name\" => $projectname\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\treturn $this->addItem(0, $arTmp);\n\t\t\t}" ]
[ "0.79544044", "0.73665214", "0.7301382", "0.72370356", "0.7012695", "0.6977973", "0.69482344", "0.6944496", "0.6913056", "0.68292886", "0.6819881", "0.6776193", "0.6769321", "0.6765227", "0.6763805", "0.6711746", "0.6675014", "0.66111183", "0.65342015", "0.6446773", "0.63862973", "0.63582814", "0.63484424", "0.63325167", "0.63218755", "0.6293173", "0.62853086", "0.626953", "0.62551236", "0.6249408" ]
0.8548666
0
Retorna uma array com os campos de uma tabela, com o valor null
public function getArrayFieldsEmpty($table = null){ if($table == null) $table = $this->table; return $this->instance->getArrayFieldsEmpty($table, $this->database); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getCampos()\n {\n \t$fields \t= [];\n \tif ( !empty( $this->parametros['campos'] ) )\n \t{\n if ( is_string($this->parametros['campos']) )\n {\n $fields = explode(',', $this->parametros['campos'] );\n }\n \t} else\n \t{\n \t\t$tabela = $this->parametros['tabela'];\n \t\t$fields = [$this->Controller->$tabela->primaryKey(), $this->Controller->$tabela->displayField() ];\n \t}\n\n \treturn $fields;\n }", "private function getFieldsOnTable()\n{\n\n $returnArray=array(); \n foreach ($this->tableStructure as $ind => $fieldArray) { \n $returnArray[$fieldArray['columnName']]=$fieldArray['columnName'];\n }\n \n return $returnArray; \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\"ordinal\"=>$this->ordinal,\n\t\t\t\"visible\"=>$this->visible,\n\t\t\t\"iconoov\"=>$this->iconoov,\n\t\t\t\"name\"=>$this->name,\n\t\t\t\"idov_refered\"=>$this->idov_refered,\n\t\t\t\"idresource_refered\"=>$this->idresource_refered,\n\t\t\t\"type\"=>$this->type\n\t\t);\n\t\treturn $arr;\n\t}", "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 toArray()\n\t{\n\t\tforeach ($this->_fields as $f)\n\t\t{\n\t\t\tif (!array_key_exists($f, $this->_data))\n\t\t\t{\n\t\t\t\t$this->_data[$f] = null;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->_data;\n\t}", "public function getAllData($preTab = null)\n {\n\n $data = array ();\n $colKeys = array_keys(static::$cols);\n\n if ($preTab) {\n\n foreach ($colKeys as $key) {\n $data[$preTab.'_'.$key] = isset($this->data[$key]) ? $this->data[$key] : null;\n }\n\n $data[$preTab.'_rowid'] = $this->id;\n\n } else {\n \n if (false === $preTab) {\n \n foreach ($colKeys as $key) {\n $data[$key] = isset($this->data[$key]) ? $this->data[$key] : null;\n }\n $data['rowid'] = $this->id;\n \n } else {\n \n foreach ($colKeys as $key) {\n $data[static::$table.'_'.$key] = isset($this->data[$key]) ? $this->data[$key] : null;\n }\n $data[static::$table.'_rowid'] = $this->id;\n }\n\n\n }\n\n return $data;\n\n }", "public function getRowsAsArray(){\n $fieldNames=$this->getFieldNames();\n $result=[];\n if (!empty($this->valuesRows)){\n foreach($this->valuesRows as $valuesRow){\n $rowArr=[];\n foreach($fieldNames as $i=>$fieldName){\n if (isset($valuesRow[$i])){\n $rowArr[$fieldName]=$valuesRow[$i];\n }\n }\n $result[]=$rowArr;\n }\n }\n return $result;\n }", "function retornaCampos($tabelaProcura){\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 if($tabelaProcura != (string)$aTabela['NOME']) \n continue;\n # Varre a estrutura dos campos da tabela em questao\n foreach($aTabela as $oCampo){\n # Recupera valores a serem substituidos no modelo\n $aRetorno[] = (string)$oCampo->FKTABELA;\n }\n break;\n }\n return $aRetorno;\n }", "function getCampos($tabla){\r\n\t\t//DB_DataObject::debugLevel(5);\r\n\t\t//Crea una nueva instancia de $tabla a partir de DataObject\r\n\t\t$objDBO = DB_DataObject::Factory($tabla);\r\n\t\t\r\n\t\t$campos = $objDBO->table();\r\n\t\t\r\n\t\tunset($campos[\"id\"]);\r\n\t\tunset($campos[\"fecha\"]);\r\n\t\t\r\n\t\t//Libera el objeto DBO\r\n\t\t$objDBO->free();\r\n\t\t\r\n\t\treturn ($campos);\r\n\t}", "public function toArray()\n {\n $fields = array(); \n foreach ($GLOBALS['InfusionsoftApp']->fields[$this->_table] as $field)\n {\n $fields[$field] = $this->$field;\n } \n return $fields;\n }", "function field_data()\r\n\t{\r\n\t\t$retval = array();\r\n /*\r\n echo \"<pre>\";\r\n var_dump($this->result_id);\r\n var_dump($this->pdo_results);\r\n echo \"</pre>\";\r\n */\r\n $table_info = $this->pdo_results;\r\n assert(is_array($table_info));\r\n foreach ($table_info as $row_info) {\r\n $F = new stdClass();\r\n $F->name = $row_info['name'];\r\n $F->type = $row_info['type'];\r\n $F->default = $row_info['dflt_value'];\r\n $F->max_length = 0;\r\n $F->primary_key = $row_info['pk'];\r\n \r\n $retval[] = $F;\r\n }\r\n\r\n return $retval;\r\n }", "private static function fields()\n {\n $fields = static::$fields;\n $primary_key = static::$primary_key;\n\n $rows = [$primary_key, ...$fields];\n\n if(!count($rows)) {\n return ['*'];\n }\n\n return $rows;\n }", "private function getTableColumns() : ?array {\n\t\t$query = 'SELECT column_name, data_type, column_type FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N\\'' . $this->tableNamePrefixed . '\\'';\n\t\t$columns = $this->database->query($query);\n\n\t\t$columnsArr = array();\n\t\tforeach ($columns as $column) {\n\t\t if (property_exists($column, 'COLUMN_NAME')) {\n $columnsArr[$column->COLUMN_NAME] = $column;\n }\n if (property_exists($column, 'column_name')) {\n $column->COLUMN_NAME = $column->column_name;\n $columnsArr[$column->COLUMN_NAME] = $column;\n }\n\t\t}\n\n\t\treturn !empty($columnsArr) ? $columnsArr : null;\n\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 }", "protected function prepareFields(): array\n {\n $formFields = [];\n foreach ($this->toArray() as $key => $value) {\n if ($value !== null) {\n $formFields[ucfirst($key)] = $value;\n }\n }\n return $formFields;\n }", "function get ()\n\t{\n\t\t$ ret = array ();\n\t\t\n\t\t// Loop por todos os registros no banco de dados\n\t\tfor ( $ x = 0 ; ( $ x < $ this -> num_records () && count ( $ ret ) < $ this -> _limit ); $ x ++)\n\t\t{\t\t\t\n\t\t\t$ row = $ this -> _px -> retrieve_record ( $ x );\n\t\t\t\n\t\t\tif ( $ this -> _test ( $ row ))\n\t\t\t{\n\t\t\t\tforeach ( $ row as $ key => $ val )\n\t\t\t\t{\n\t\t\t\t\t// Encontre todos os campos que não estão na matriz selecionada\n\t\t\t\t\tif (! in_array ( $ key , $ this -> _select ) &&! empty ( $ this -> _select )) unset ( $ row [ $ key ]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ ret [] = $ linha ;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ ret ;\n\t}", "public function fields(): array\n {\n return [];\n }", "public function getFieldData(): array\n {\n return array_map(fn ($fieldIndex) => (object) [\n 'name' => oci_field_name($this->resultID, $fieldIndex),\n 'type' => oci_field_type($this->resultID, $fieldIndex),\n 'max_length' => oci_field_size($this->resultID, $fieldIndex),\n ], range(1, $this->getFieldCount()));\n }", "protected function blankTable()\n {\n return [\n 'meta' => ['created' => time(), 'modified' => time()],\n 'data' => []\n ];\n }", "function field_data()\n\t{\n\t\t$retval = array();\n\t\tforeach(sqlsrv_field_metadata($this->result_id) as $offset => $field)\n\t\t{\n\t\t\t$F \t\t\t\t= new stdClass();\n\t\t\t$F->name \t\t= $field['Name'];\n\t\t\t$F->type \t\t= $field['Type'];\n\t\t\t$F->max_length\t= $field['Size'];\n\t\t\t$F->primary_key = 0;\n\t\t\t$F->default\t\t= '';\n\t\t\t\n\t\t\t$retval[] = $F;\n\t\t}\n\t\t\n\t\treturn $retval;\n\t}", "public function getDataAllColumns() : array{\n\n $columns = [];\n foreach ($this->configs->fields as $k => $value) {\n $columns[$k] = array_column($this->model->getValuesColumn($value),$value);\n }\n return $columns;\n }", "public function getAdditionalTableFields(): array\n\t{\n\t\treturn [];\n\t}", "public function getColumns(){\n $rows = array();\n return $rows; \n }", "public function getToArray()\n {\n $row = [];\n foreach (array_keys($this->columns) as $column) {\n $row[$column] = trim($this->getColumnValue($column));\n }\n return $row;\n }", "public function getArrayCampos()\n {\n $array = $this->get();\n $array = $array[ 0 ];\n\n return array_keys($array);\n }", "private function ObtenerCamposTabla(string $nombteTabla){\n $campos =array(); \n $this->EjecutarSQL(\"DESCRIBE \".$nombteTabla);\n foreach ($this->GetResultados() as $dato) $campos[] = $dato->Field;\n return $campos;\n }", "public function getFieldData()\n {\n $retval = array();\n for ($c = 1, $fieldCount = $this->getFieldsCount(); $c <= $fieldCount; $c++) {\n $item = array();\n $item['name'] = oci_field_name($this->stmt_id, $c);\n $item['type'] = oci_field_type($this->stmt_id, $c);\n $item['max_length'] = oci_field_size($this->stmt_id, $c);\n $retval[] = $item;\n }\n\n return $retval;\n }", "public function getFields(): array;", "public function getFields(): array;", "public function getFields(): array;" ]
[ "0.6816371", "0.66822743", "0.6656398", "0.66509694", "0.66336507", "0.65669185", "0.6532965", "0.6522467", "0.651245", "0.6473818", "0.6444875", "0.64440566", "0.63916045", "0.6383517", "0.6374433", "0.63006365", "0.629167", "0.6270543", "0.62327236", "0.6205658", "0.61935014", "0.6189695", "0.6181747", "0.6161592", "0.6139306", "0.6121649", "0.61092156", "0.61053026", "0.61053026", "0.61053026" ]
0.67301685
1
get a thread vote by an user returning false if not found any vote, else return the vote (1 or 1)
public static function getUserThreadVote($threadId, $userId) { $userThreadVoteRow = (new \yii\db\Query()) ->select('vote') ->from('thread_vote') ->where(['thread_id' => $threadId, 'user_id' => $userId]) ->one(); return ($userThreadVoteRow['vote'] === false) ? false : intval($userThreadVoteRow['vote']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find_vote($event_id, $user_id);", "public static function get_user_vote_status( $user_id, $post_id )\n\t{\n\t\tglobal $wpdb;\n\n\t\t$table_name = $wpdb->prefix . 'helpful';\n\t\t$sql = \"\n\t\tSELECT pro, contra\n\t\tFROM {$table_name}\n\t\tWHERE user = %s AND post_id = %d\n\t\tLIMIT 1\n\t\t\";\n\t\t$query = $wpdb->prepare( $sql, $user_id, $post_id );\n\t\t$results = $wpdb->get_row( $query );\n\n\t\tif ( 1 === intval( $results->pro ) ) {\n\t\t\treturn 'pro';\n\t\t} else if ( 1 === intval( $results->contra ) ) {\n\t\t\treturn 'contra';\n\t\t} else {\n\t\t\treturn 'none';\n\t\t}\n\t}", "function vote($userid,$subjectid,$type,$vote) {\n\t$type = dbEscape($type);\n\t$userid = intval($userid);\n\t$subjectid = intval($subjectid);\n\t$vote = intval($vote);\n\n\tswitch($vote) {\n\tcase 0:\n\t\t// Unset/delete vote\n\t\tdbQuery(\"DELETE FROM votes WHERE userid=$userid AND subjectid=$subjectid AND type='$type'\");\n\t\tbreak;\n\tcase 1:\n\tcase -1:\n\t\t// Check if we've already voted\n\t\t$result = dbFirstResult(\"SELECT * FROM votes WHERE userid=$userid AND subjectid=$subjectid AND type='$type'\");\n\t\t\n\t\tif(empty($result)) { // Make a new vote if we haven't voted before\n\t\t\tdbQuery(\"INSERT INTO votes (userid,type,subjectid,vote) VALUES($userid,'$type',$subjectid,$vote)\");\t\n\t\t}\n\t\n\t\telseif($vote != $row[vote]) { // Update our old vote if we have voted before\n\t\t\tdbQuery(\"UPDATE votes SET vote=$vote WHERE userid=$userid AND subjectid=$subjectid AND type='$type'\");\n\t\t}\n\t\t\n\t\tbreak;\n\tdefault: // Any vote other than +1, -1 or 0\n\t\treturn(false);\n\t\tbreak;\n\t}\n\n\t// Grab and return the new vote count\n\t$result = dbFirstResult(\"SELECT points FROM totalvotes WHERE subjectid=$subjectid AND type='$type'\");\n\tif(empty($result)) { $result = 0; }\t\t\n\t$result .= ($result == 1 || $result == -1) ? ' point' : ' points';\n\treturn(\"$result\");\n}", "public function getVote(User $voter): ?string {\n $stmt = $this->db->prepare('\n SELECT `sentiment` FROM `votes`\n WHERE `message_id` = :message_id\n AND `cast_by` = :cast_by;\n ');\n $stmt->execute([\n 'message_id' => $this->id,\n 'cast_by' => $voter->getId(),\n ]);\n $row = $stmt->fetch();\n if (!$row) {\n return null;\n }\n if ((int) $row['sentiment'] === 1) {\n return 'up';\n }\n return 'down';\n }", "private function vote()\n\t{\n\t\tif(!$this->owner->logged_in())\n\t\t\treturn new View('public_forum/login');\n\t\t\n\t\t$comment_id = valid::id_key($this->filter);\n\t\t$vote = $this->filter2;\n\t\t\n\t\t$has_voted = ORM::factory('forum_comment_vote')\n\t\t\t->where(array(\n\t\t\t\t'owner_id'\t\t \t=> $this->owner->get_user()->id,\n\t\t\t\t'forum_cat_post_comment_id' => $comment_id\n\t\t\t))\n\t\t\t->find();\t\n\t\tif(TRUE == $has_voted->loaded)\n\t\t\treturn 'already voted.';\n\t\t\t\n\t\t$vote = ('down' == $vote) ? -1 : 1 ;\n\t\t\n\t\t$comment = ORM::factory('forum_cat_post_comment', $comment_id);\t\t\n\t\t$comment->vote_count = ($comment->vote_count + $vote);\n\t\t$comment->save();\t\t\n\n\t\t# log the vote.\n\t\t$log_vote = ORM::factory('forum_comment_vote');\n\t\t$log_vote->owner_id = $this->owner->get_user()->id;\n\t\t$log_vote->forum_cat_post_comment_id = $comment_id;\n\t\t$log_vote->save();\n\n\t\treturn 'Vote has been accepted!';\n\t}", "function checkUserStatus($postID, $userID) {\n\t//connecting to the database\n\t$conn = new mysqli('localhost','boubou','boubou','edel') or die('Error connecting to MySQL server.');\n\n\t// querry the\n\t// making the querry\n\t$dbQuery = \"SELECT * From Votes WHERE post_id=\".mysqli_real_escape_string($conn,$postID). \" AND user_id=\". mysqli_real_escape_string($conn,$userID);\n\n\t$result = $conn->query($dbQuery);\n\n\t$row = $result->fetch_array();\n\n //closing the connection\n $conn->close();\n\n if($row) {\n \t//the vote was already registered\n \treturn $row['vote_value'];\n }\n return 0;\n}", "public function checkVote($idea_id,$user_id)\r\n {\r\n $model = new Ynidea_Model_DbTable_Ideavotes;\r\n $select = $model -> select()->where('user_id = ?',$user_id)->where('idea_id=?',$idea_id); \r\n $row = $model->fetchRow($select); \r\n if($row)\r\n return true;\r\n else\r\n return false; \r\n }", "function getvotes($user) {\n\tglobal $wpdb;\n\tif(user_can($user, 'banda')) {\n\t\t$votos = $wpdb->get_var( \"SELECT count(1) FROM \".$wpdb->prefix . \"poptest_votos where usuario = \".$user.\" group by usuario\");\n\t\treturn $votos;\n\t} else {\n\t\t//Error\n\t\treturn false;\n\t}\n}", "function userLiked($post_id)\n{\n global $conn;\n global $user_id;\n $sql = \"SELECT * FROM vote_info WHERE user_id=$user_id \n \t\t AND idea_id=$post_id AND vote_action='like'\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n \treturn true;\n }else{\n \treturn false;\n }\n}", "function checkvote($idvideo, $iduser){\n \t$realid = pg_escape_string($idvideo);\n \t$realusr = pg_escape_string($iduser);\n \t$query = \"SELECT idvotexuser, vote FROM votexuser where idvideo = \".$realid.\" and idusuario = \".$realusr.\";\";\n \t$link = createConection();\n \t$result = pg_exec($link, $query);\n \tcloseConection($link);\n \treturn $result;\n }", "public function voteValue($user_id)\n {\n $vote = Vote::where([\n ['article_id', $this->id],\n ['user_id', $user_id]\n ])->first();\n\n if ($vote) {\n return $vote->value;\n } else {\n return 0;\n }\n }", "public function check_vote($qid, $userid) {\n\t\t$this->db->where('questionID', $qid);\n\t\t$this->db->where('userID', $userid);\n\t\t$this->db->from('QuestionVote');\n\t\t$query = $this->db->get();\n\t\treturn $query -> first_row();\n\t\t\n\t}", "public function getResultByVote()\n {\n if (NODE_ACCESS_IGNORE === $this->result) {\n return NODE_ACCESS_IGNORE;\n }\n if ($this->denied < $this->allowed) {\n return NODE_ACCESS_ALLOW;\n }\n return NODE_ACCESS_DENY;\n }", "public function getTrophyVote($trophy_id,$idea_id,$user_id)\r\n {\r\n $model = new Ynidea_Model_DbTable_Trophyvotes; \r\n $select = $model->select() \r\n ->where('trophy_id = ?',$trophy_id)->where('idea_id = ?',$idea_id)->where('user_id=?',$user_id); \r\n \r\n $row = $model->fetchRow($select);\r\n\t\tif($row)\r\n \treturn $row->value;\r\n\t\treturn 0; \r\n }", "function getVoted()\n {\n JSession::checkToken() or jexit('Invalid Token');\n\n $app = JFactory::getApplication();\n $idea_id = JRequest::getInt('id', 0);\n $option_id = JRequest::getInt('voteid', 0);\n $idea = JTable::getInstance('Idea', 'Table');\n\n if(!$idea->load($idea_id) || $idea->published != 1)\n {\n $app->redirect('index.php', JText::_('ALERTNOTAUTH 1'));\n\n return true;\n }\n\n require_once(JPATH_COMPONENT . '/models/idea.php');\n $model = new JUIdeiModelIdea();\n $params = new JRegistry($idea->params);\n $cookieName = JApplicationHelper::getHash($app->getName() . 'idea' . $idea_id);\n\n\n $voted_cookie = JRequest::getVar($cookieName, '0', 'COOKIE', 'INT');\n $voted_ip = $model->ipVoted($idea, $idea_id);\n\n if($params->get('ip_check') and ($voted_cookie or $voted_ip or !$option_id))\n {\n /*if($voted_cookie || $voted_ip)\n {\n $msg = JText::_('COM_MIR_ALREADY_VOTED');\n $tom = \"error\";\n }\n\n if(!$option_id)\n {\n $msg = JText::_('COM_MIR_NO_SELECTED');\n $tom = \"error\";\n }\n */\n\n $this->_voted = 0;\n }\n else\n {\n if($model->vote($idea_id, $option_id))\n {\n $this->_voted = 1;\n\n setcookie($cookieName, '1', time() + 60 * $idea->lag);\n }\n else\n {\n $this->_voted = 0;\n }\n }\n\n return $this->_voted = 1;\n }", "function hasVote($uid=false) {\n\t\tif (!$uid) {\n\t\t\t$uid = user_getid();\n\t\t}\n\t\tif (!$uid || $uid == 100) {\n\t\t\treturn false;\n\t\t}\n\t\t$res = db_query_params('SELECT * FROM artifact_votes WHERE artifact_id=$1 AND user_id=$2',\n\t\t\t\t\tarray($this->getID(), $uid));\n\t\treturn (db_numrows($res) == 1);\n\t}", "function getvotesavailable($user) {\n\tglobal $wpdb;\n\tif(user_can($user, 'integrante')) {\n\t\t$votos = $wpdb->get_var( \"SELECT cantvotos FROM \".$wpdb->prefix . \"poptest_votosdisponibles where usuario = \".$user);\n\t\treturn $votos;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function getVote($idea_id,$user_id)\r\n {\r\n $model = new Ynidea_Model_DbTable_Ideavotes;\r\n $select = $model -> select()->where('user_id = ?',$user_id)->where('idea_id=?',$idea_id); \r\n $row = $model->fetchRow($select); \r\n \r\n return $row;\r\n }", "function checkvotestatus($fid,$uid)\n {\n $queryString = \"select * from vote where uid='$uid' and fid='$fid'\";\n $resultSet = mysql_query($queryString);\n return $resultSet2 = mysql_num_rows($resultSet);\n }", "function userInter($userid, $postid)\n{\n\tglobal $wpdb;\n\t$valu = $wpdb->get_var( \"SELECT level FROM \".$wpdb->prefix.\"feedback WHERE user_id = '\".$userid.\"' && post_id = '\".$postid.\"'\" );\n\tif ($valu == 2) {\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function findVote(User $user, $id, $type)\n {\n \treturn Vote::where('user_id', '=', $user->id)->where('votable_id', '=', $id)->where('votable_type', $type)->first();\n }", "public function isVoted($id){\n $where = ['topic_id'=>$id,'user_id'=>Auth::user()->id];\n if(DB::table('topic_user')->where($where)->first())\n return true;\n return false;\n }", "public function test_users_vote_can_be_retrieved() {\n\n $user = User::create('[email protected]', 'secret', 'Jane Doe');\n\n $this->assertNull($this->message->getVote($user));\n\n $this->message->upvote($user);\n $this->assertEquals('up', $this->message->getVote($user));\n\n $this->message->downvote($user);\n $this->assertEquals('down', $this->message->getVote($user));\n\n }", "function polls_check_for_previous_vote($poll, $user_guid)\n{\n\t$options = array(\n\t\t'guid'\t=>\t$poll->guid,\n\t\t'type'\t=>\t\"object\",\n\t\t'subtype' => \"poll\",\n\t\t'annotation_name' => \"vote\",\n\t\t'annotation_owner_guid' => $user_guid,\n\t\t'limit' => 1\n\t);\n\t$votes = elgg_get_annotations($options);\n\tif ($votes) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function vote($vote)\n {\n $params = array();\n $user = $GLOBALS['current_user'];\n $contact_id = null;\n\n if (!$this->isValidSugarUser($user) && $contact = $this->getPortalContact()) {\n $contact_id = $contact->id;\n $params['where'] = 'contact_id = ' . DBManagerFactory::getInstance()->quoted($contact_id);\n }\n /**\n * Load only required votes\n */\n $this->load($params);\n\n /**\n * Delete previous votes for a portal contact\n */\n if ($contact_id !== null) {\n if (!empty($this->rows)) {\n $q = $this->relationship->getQuery($this, array('return_as_array' => true));\n if (!empty($params['where'])) {\n $q['where'] .= ' AND ' . $params['where'];\n }\n $q = 'UPDATE ' . $this->relationship->getRelationshipTable() . ' SET deleted = 1 ' . $q['where'];\n DBManagerFactory::getInstance()->query($q);\n }\n $this->relationship->primaryOnly = true;\n }\n $result = $this->add(\n $user,\n array(\n 'vote' => $vote ? 1 : -1,\n 'ssid' => session_id(),\n 'contact_id' => $contact_id,\n 'zeroflag' => 0\n )\n );\n $this->relationship->primaryOnly = false;\n return $result;\n }", "public function voteAction()\n {\n $return = 0;\n\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Checking if user is online and answer_id > 0 */\n if ($user && $_GET['id'] > 0) {\n \n /* Vote answer and return number of votes */\n $return = VotedAnswer::vote($user->id, $_GET['id']);\n }\n \n /* Return response */\n header('Content-Type: application/json');\n echo json_encode($return);\n }", "private function checkIfVoterVoted( $ipaddress, $attachment_id ) {\n global $wpdb;\n $query = \"select count(`id`) from \" . $wpdb->prefix . \"roni_votes where ip_address='\" . $ipaddress . \"' and attachment_id='\" . $attachment_id . \"';\";\n return $wpdb->get_var( $query );\n }", "public function __invoke(VotingUuid $votingUuid): ?Vote;", "public function testvote()\n {\n $this->vote_answer = Vote::vote($this->user->id, $this->answer->id, 1, 'answer_id');\n if (!$this->answer) return false;\n }", "function userLiked($post_id)\n{\n usersOnly();\n global $conn;\n$user_id=$_SESSION['id'];\n $sql = \"SELECT * FROM rating WHERE user_id=$user_id\n \t\t AND post_id=$post_id AND rating=1\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n \treturn true;\n }else{\n \treturn false;\n }\n}" ]
[ "0.6362719", "0.62776726", "0.6258979", "0.6132392", "0.610553", "0.6068166", "0.6052946", "0.60454583", "0.60251033", "0.59802157", "0.5852954", "0.5843388", "0.5833628", "0.5812672", "0.57950073", "0.57832783", "0.5774494", "0.575157", "0.57390714", "0.57352614", "0.57328284", "0.5687439", "0.5675684", "0.56573457", "0.5630491", "0.55822855", "0.55651474", "0.55567485", "0.5536109", "0.5532446" ]
0.7438728
0
Lists all Pembelian models.
public function actionIndex() { $searchModel = new PembelianSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function index()\n {\n return $this->model->all();\n }", "public function index()\n {\n return $this->model->getAll();\n }", "public function index(){\n return $this->model->all();\n }", "public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }", "public function getAllModels()\n {\n try {\n return AppModelList::models();\n }\n catch (Throwable $t) {\n throw new Exception('Parse Error: AppModelList.php has been corrupted.');\n }\n }", "public function actionList()\r\n {\r\n $this->_userAutehntication();\r\n switch($_GET['model'])\r\n {\r\n case 'posts': \r\n $models = Post::model()->findAll();\r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>list</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n if(is_null($models)) {\r\n $this->_sendResponse(200, sprintf('No Post found for model <b>%s</b>', $_GET['model']) );\r\n } else {\r\n $rows = array();\r\n foreach($models as $model)\r\n $rows[] = $model->attributes;\r\n\r\n $this->_sendResponse(200, CJSON::encode($rows));\r\n }\r\n }", "public function index()\n {\n return $this->findModel()->toArray();\n }", "public function index()\n {\n return Model::all();\n }", "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "public function all()\n {\n return $this->model->get();\n }", "public function getAll()\n {\n return $this->model->orderBy('id', 'DESC')->get();\n }", "public function getList()\n {\n \treturn $this->model->where('is_base', '=', 0)->get();\n }", "public function modelFetchAll(){\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc hien truy van, tra ket qua ve mot object\n\t\t\t$query = $conn->query(\"select * from phongban\");\n\t\t\t//tra ve tat ca cac ban ghi\n\t\t\treturn $query->fetchAll();\n\t\t}", "public function getList()\n {\n return $this->model->getList();\n }", "public function index()\n {\n $supplier = SupplierModel::all();\n $pembelian = PembelianModel::leftJoin('supplier', 'supplier.id_supplier', '=', 'pembelian.id_supplier')\n ->orderBy('pembelian.id_pembelian', 'desc')->get();\n }", "public function all()\n {\n return $this->model->get();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function index()\r\n {\r\n $data['pembeli'] = Pembeli::all();\r\n return view('pembeli/index', $data);\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function getList()\n {\n $this->db->order_by(\"id\", 'desc');\n $this->db->where('status', 1);\n return $this->db->get($this->model);\n }", "public function GetAll()\n {\n return $this->model->all();\n }", "public function fetch_all_models() {\n global $pdo;\n\n $query = $pdo->prepare(\"SELECT * FROM talents\");\n $query -> execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function index()\n {\n return Labor::all();\n }", "public function models();", "public function getModelsForIndex()\n {\n $models = [];\n $all_models = $this->getAllModels();\n\n foreach ($all_models as $model) {\n //parse model\n $pieces = explode('.', $model);\n if (count($pieces) != 2) {\n throw new Exception('Parse error in AppModelList');\n }\n //check form match\n $app_model = $pieces[1];\n $link = $this->convertModelToLink($app_model);\n\n // add to actions\n $models[$app_model]['GET'] = [\n [\n 'action' => 'index',\n 'description' => 'List & filter all ' . $app_model . ' resources.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link\n ],\n [\n 'action' => 'show',\n 'description' => 'Show the ' . $app_model . ' that has the matching {id} from the route.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link . '/{id}'\n ]\n ];\n }\n return $models;\n }", "public function index()\n {\n // return view('cinema::index');\n return $this->model->all();\n }" ]
[ "0.6869612", "0.6869612", "0.68342996", "0.6782839", "0.67683893", "0.6610495", "0.6562074", "0.6445544", "0.64185447", "0.641637", "0.641334", "0.64064187", "0.63826144", "0.6380286", "0.6377825", "0.6342017", "0.6336884", "0.63076735", "0.6298295", "0.6298295", "0.6298295", "0.62955666", "0.6277226", "0.6272609", "0.6270031", "0.6231932", "0.6217042", "0.6211323", "0.61969954", "0.6194765" ]
0.7322044
0
Creates a new Pembelian model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreate() { $model = new Pembelian(); if ($model->load(Yii::$app->request->post())) { $transaction = Yii::$app->db->beginTransaction(); try { $model->jenis_ppn = 'NON-PPN'; $model->listPembelian = Yii::$app->request->post('ItemPembelian', []); if (($model->save())) { $transaction->commit(); return $this->redirect(['index']); } } catch (\Exception $ecx) { $transaction->rollBack(); throw $ecx; } return $this->render('create', [ 'model' => $model, ]); return $this->redirect(['index']); } else { $model->tanggal = date("Y-m-d"); return $this->render('create', [ 'model' => $model, ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new Persyaratan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_persyaratan]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new MaklumatPelajarPenjaga();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\r\n {\r\n $model = new Pelanggaran();\r\n $trans = Yii::$app->db->beginTransaction();\r\n\r\n if ($model->loadAll(Yii::$app->request->post()) && $model->save()) {\r\n $check = $this->checkDetailPoint($model, 'create');\r\n \r\n if( isset($check['failed']) ){\r\n $trans->rollBack();\r\n Yii::$app->session->setFlash('error', $check['failed'] );\r\n return $this->redirect(['index']);\r\n }\r\n\r\n $trans->commit();\r\n Yii::$app->session->setFlash('success','Pelanggaran berhasil ditambahkan.');\r\n return $this->redirect(['index']);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function actionCreate()\n\t{\n\t\t//\n\t\t// if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\t\t// try {\n\t\t// $model->save();\n\t\t// Yii::$app->session->setFlash('alert', [\n\t\t// 'body' => Yii::$app->params['create-success'],\n\t\t// 'class' => 'bg-success',\n\t\t// ]);\n\t\t// } catch (\\yii\\db\\Exception $exception) {\n\t\tYii::$app->session->setFlash('alert', [\n\t\t\t'body' => Yii::$app->params['create-danger'],\n\t\t\t'class' => 'bg-danger',\n\t\t]);\n\n\t\t// }\n\t\treturn $this->redirect(['index']);\n\t\t// }\n\n\t\t// return $this->render('create', [\n\t\t// 'model' => $model,\n\t\t// ]);\n\t}", "public function actionCreate()\n {\n $model = new Programador();\n //Yii::$app->request->post() wrapper de Yii para obtener datos seguros enviados por POST\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new JenisPelayanan();\n\n if ($model->load(Yii::$app->request->post()) && $model->simpan()) {\n return $this->redirect(['view', 'id' => $model->id_halaman]);\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new EnglishNanorep();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n\t{\n $this->layout='admin';\n \n\t\t$model=new Bet;\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['Bet']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Bet'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->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 actionCreate()\n {\n \t /** @var ActiveRecord $model */\n \t $modelClass = static::modelClass();\n \t $model = new $modelClass();\n\n\t$viewFolder = '/';\n\t$viewName = 'create';\n\t$viewExtension = '.php';\n\t$viewFile = $this->getViewPath().$viewFolder.$viewName.$viewExtension;\n\t$viewPath = file_exists($viewFile) ? '' : $this->getDefaultViewPath(false);\n\t\n\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t$this->processData($model, 'create');\n\t\treturn $this->redirect(['view', 'id' => $model->getPrimaryKey()]);\n\t} else {\n\t\treturn $this->render($viewPath.$viewName, array_merge($this->commonViewData(), [\n\t\t\t'model' => $model,\n\t]));\n\t}\n }", "public\n function actionCreate()\n {\n $model = new Phforum();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Penulis();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate() {\n $model = new TabellePlattform();\n\n if ($model->loadAll(Yii::$app->request->post())) {\n if ($model->saveAll()) {\n// $this->success = 2; // 2->insert erfolgreich\n \n// $model = $this->findModel($model->id);\n// $model->setIsNewRecord(false);\n \n return $this->redirect(['update','id'=>$model->id,'mySuccess' => 2]);\n// return $this->render('update', [\n// 'model' => $model,\n// ]);\n// $this->redirect(\\Yii::$app->urlManager->createUrl(\"test/show\"));\n } else {\n $this->success = -1; // -1->insert Fehler\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new HasilKonsultasi();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_hasil_konsultasi]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n if(\\Yii::$app->user->can('gerenciamento-cadastros-basicos')){\n $model = new Pessoa();\n $alerta = \"Pessoa já cadastrada\";\n \n \n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\n $validacpf = Pessoa::find()->where(['cpf' => $model->cpf])->one();\n if($validacpf == true){\n return $this->redirect(['create',\n 'model' => $model, 'alerta' => $alerta\n ]);\n }else{\n\n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n \n }else{\n return $this->render('create', [\n 'model' => $model, \n ]);\n }\n }else {\n throw new \\yii\\web\\ForbiddenHttpException('Você não está autorizado a realizar essa ação.');\n }\n \n }", "public function actionCreate()\n {\n $model = new Talabalar();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new DetailKompensasiDanBenefitBulanan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'Id_KomBen' => $model->Id_KomBen, 'Id_Karyawan' => $model->Id_Karyawan]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n //if(!Yii::app()->user->checkAccess(Params::DEFAULT_CREATE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));}\n\t\t$model=new RKInfoPasienLamaV;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t\n\n\t\tif(isset($_POST['RKInfoPasienLamaV']))\n\t\t{\n\t\t\t$model->attributes=$_POST['RKInfoPasienLamaV'];\n\t\t\tif($model->save()){\n Yii::app()->user->setFlash('success', '<strong>Berhasil!</strong> Data berhasil disimpan.');\n\t\t\t\t$this->redirect(array('view','id'=>$model->pendaftaran_id));\n }\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n\t{\n //if(!Yii::app()->user->checkAccess(Params::DEFAULT_CREATE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));}\n\t\t$model=new PPJadwaldokterM;\n $listHari = array( 'Senin'=> 'Senin',\n 'Selasa'=> 'Selasa',\n 'Rabu'=> 'Rabu',\n 'Kamis'=> 'Kamis',\n 'Jumat'=> 'Jumat',\n 'Sabtu'=> 'Sabtu',\n 'Minggu'=> 'Minggu',\n );\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t\n\n\t\tif(isset($_POST['PPJadwaldokterM']))\n\t\t{\n\t\t\t$model->attributes=$_POST['PPJadwaldokterM'];\n\t\t\t$model->jadwaldokter_buka = $model->jadwaldokter_mulai.' S/d '.$model->jadwaldokter_tutup;\n\t\t\tif($model->save()){\n Yii::app()->user->setFlash('success', '<strong>Berhasil!</strong> Data berhasil disimpan.');\n\t\t\t\t$this->redirect(array('admin','id'=>$model->jadwaldokter_id,'sukses'=>1));\n }\n\t\t}\n\n\t\t$this->render($this->path_view.'create',array(\n\t\t\t'model'=>$model,\n 'listHari'=>$listHari\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new SasaranEs4();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()){\n flash('success','Data Sasaran Eselon IV Berhasil Disimpan');\n return $this->redirect(['index']);\n }\n \n flash('error','Data Sasaran Eselon IV Gagal Disimpan');\n \n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Bilancio();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new TaPeriode();\n $pemda = \\common\\models\\TaPemdaUmum::find()->where('ID = (SELECT(MAX(ID)) FROM ta_pemda_umum)')->one();\n $model->ID_Tahun = (\\common\\models\\TaPeriode::find()->select('MAX(ID_Tahun) AS ID_Tahun')->one()['ID_Tahun']) + 1;\n $model->Kd_Prov = $pemda->Kd_Prov;\n $model->Kd_Kab_Kota = $pemda->Kd_Kab_Kota;\n //var_dump($model);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'ID_Tahun' => $model->ID_Tahun, 'Kd_Prov' => $model->Kd_Prov, 'Kd_Kab_Kota' => $model->Kd_Kab_Kota]);\n } else {\n return $this->renderAjax('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $models = $this->loadModelsByPid();\n\n $this->performAjaxValidationTabular($models);\n\n $success = $this->doAction($models);\n $newPid = current($models)->pid;\n\n if($success)\n {\n if(isset($_POST['apply']))\n {\n $this->redirectAction($newPid);\n }\n $this->redirectAction();\n }\n\n if($success !== null && $newPid)\n {\n $this->redirectAction($newPid);\n }\n\n $this->render($this->view['create'], array(\n 'models' => $models,\n 'model' => reset($models),\n 'languages' => Language::getList(),\n ));\n }", "public function actionCreate()\n {\n $model = new Peticiones();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate() {\r\n $model = new Fltr();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function create()\n {\n if(!session()->get('id'))\n {\n session()->setFlashdata('message', 'Silahkan login terlebih dahulu!');\n return redirect()->to(base_url('login'));\n }\n\n helper(['form']);\n\n $penghunis = new PenghunisModel();\n\n $data = array(\n 'title' => 'Tambah Data Paket',\n 'penghuni' => $penghunis->findAll(),\n );\n echo view('backend/paket/create', $data);\n }", "public function actionCreate()\n\t{\n\t\t$model=new Barangmasuk;\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['Barangmasuk']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Barangmasuk'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->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 actionCreate()\n {\n $this->autorizaUsuario();\n $model = new Palestrante();\n\n if ($model->load(Yii::$app->request->post())) {\n if($model->save()){\n $this->mensagens('success', 'Palestrante Cadastrado', 'Palestrante foi Cadastrado com Sucesso');\n }else{\n $this->mensagens('danger', 'Palestrante Não Cadastrado', 'Houve um erro ao adicionar o Palestrante');\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 = $this->loadModel();\n\n\t\tif(isset($_POST[get_class($model)]))\n\t\t{\n $model = $this->_prepareModel($model);\n if (Yii::app()->getRequest()->isAjaxRequest) {\n if($model->save())\n echo json_encode($model);\n else\n echo json_encode(array('modelName' => get_class($model),'errors' => $model->getErrors()));\n\n Yii::app()->end();\n }\n\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->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 actionCreate() {\n $model = new Barang();\n\n if ($model->load(Yii::$app->request->post())) {\n\n $model->stok = 0;\n\n if ($model->save()) {\n if (Url::previous('b-create')) {\n $var = Url::previous('b-create');\n Yii::$app->session->remove('b-create');\n Yii::$app->getSession()->setFlash(\n 'success', 'Berhasil menambahkan barang : <b>' . $model->nama\n );\n return $this->redirect($var);\n } else {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Data();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->no]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }" ]
[ "0.78397715", "0.7741215", "0.74765384", "0.7461382", "0.7427895", "0.7397413", "0.731991", "0.7284997", "0.72713697", "0.7240015", "0.7238803", "0.7231888", "0.72233236", "0.7216643", "0.7209881", "0.7200267", "0.71842486", "0.71814114", "0.71788794", "0.71778655", "0.71592176", "0.7142403", "0.7136024", "0.7131813", "0.7128483", "0.71272975", "0.71166843", "0.7116204", "0.7101617", "0.7095056" ]
0.8056516
0
returns a 5 character CAPTCHA code
public function generate_code() { $code = ""; $count = 0; while ($count < $this->num_characters) { $code .= substr($this->captcha_characters, mt_rand(0, strlen($this->captcha_characters)-1), 1); $count++; } return $code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCaptcha()\n {\n $random = str_random(5);\n\n return $random;\n }", "private function generate_code()\n\t\t{\n\t\t\t$code = \"\";\n\t\t\tfor ($i = 0; $i < 5; ++$i) \n\t\t\t{\n\t\t\t\tif (mt_rand() % 2 == 0) \n\t\t\t\t{\n\t\t\t\t\t$code .= mt_rand(0,9);\n\t\t\t\t} else \n\t\t\t\t{\n\t\t\t\t\t$code .= chr(mt_rand(65, 90));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $code; \n\n\t\t}", "private function getCaptchaString() {\n\t\t// I don't use 0,o, O, 1, I, i because they could be confusing for the user,\n\t\t// but you can customize your allowed characteres here\n\t\t$allowedChars = 'QWERTYUPASDFGHJKLZXCVBNM23456789'; \n\t\t$allowedChars = $allowedChars . strtolower($allowedChars);\n\t\t\n\t\t$captcha = '';\n\t\tfor ($i = 0; $i < $this->setting['length']; $i++) {\n\t\t\t$captcha .= $allowedChars[rand(0, strlen($allowedChars) - 1)];\n\t\t}\n\t\t\n\t\t//**SESSION**\n\t\t$_SESSION['captcha'] = $captcha;\n\t}", "public function make_activation_code(){\n\t\t$alphanum = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\t\t return substr(str_shuffle($alphanum), 0, 7);\n\t}", "function getUniqueCode($length = \"\") // used in confirm-password.php\r\n\r\n{\t\r\n\r\n\t$code = md5(uniqid(rand(), true));\r\n\r\n\tif ($length != \"\") return substr($code, 0, $length);\r\n\r\n\telse return $code;\r\n\r\n}", "public function createSmsCode($num = 6)\r\n {\r\n //Captcha Character Array\r\n $n_array = range(0, 9);\r\n //Random Generation$numBit Captcha Character\r\n $code_array = array_rand($n_array, $num);\r\n //Reorder The Array Of Captcha Characters\r\n shuffle($code_array);\r\n //Generate Verification Code\r\n $code = implode('', $code_array);\r\n return $code;\r\n }", "function randomCode($length = 5){\n\t$characters = '0123456789';\n\t$charactersLength = strlen($characters);\n\t$randomString = '';\n\tfor ($i = 0; $i < $length; $i++) {\n\t\t$randomString .= $characters[rand(0, $charactersLength - 1)];\n\t}\n\treturn $randomString;\n}", "function generateCode($length=6){\r\n $chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789\";\r\n $code = \"\";\r\n $clen = strlen($chars) - 1; \r\n while (strlen($code) < $length) {\r\n $code .= $chars[mt_rand(0,$clen)]; \r\n }\r\n return $code;\r\n}", "function randomcode ($len=\"10\"){\n\t\t\t\tglobal $pass;\n\t\t\t\tglobal $lchar;\n\t\t\t\t$code = NULL;\n\t\t\n\t\t\t\tfor ($i=0;$i<$len;$i++){\n\t\t\t\t\t$char = chr(rand(48,122));\n\t\t\t\t\twhile(!ereg(\"[a-zA-Z0-9]\", $char)){\n\t\t\t\t\t\tif($char == $lchar) { continue; }\n\t\t\t\t\t\t\t$char = chr(rand(48,90));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$pass .= $char;\n\t\t\t\t\t\t$lchar = $char;\n\t\t\t\t\t}\n\t\t\t\treturn $pass;\n\t\t\t}", "public static function showCaptcha(){\n\t\t// Chaine de caractères pour créer le code\n\t\t$chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789\";\n\t\t$code = null;\n\t\tfor($i = 0; $i < 4; $i++) {\n\t\t\t$code .= $chars[mt_rand(0, 35)];\n\t\t}\n\t\t// On stocke le code dans la session\n\t\t$_SESSION['captcha'] = $code;\n\t\tsession_write_close();\n\t\treturn '<img src=\"./includes/captcha/showcaptcha.php\" height=\"40\" width=\"145\" alt=\"Impossible d\\'afficher le code !\" />';\n\t}", "function createNewAccessCode()\n\t{\n\t\t// create a 5 character code\n\t\t$codestring = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\t\tmt_srand();\n\t\t$code = \"\";\n\t\tfor ($i = 1; $i <=5; $i++)\n\t\t{\n\t\t\t$index = mt_rand(0, strlen($codestring)-1);\n\t\t\t$code .= substr($codestring, $index, 1);\n\t\t}\n\t\t// verify it against the database\n\t\twhile (!$this->isSurveyCodeUnique($code))\n\t\t{\n\t\t\t$code = $this->createNewAccessCode();\n\t\t}\n\t\treturn $code;\n\t}", "protected function generateTwoFactorCode(): string\n {\n return implode('', array_map(fn () => random_int(0, 9), range(1, 6)));\n }", "function phpfmg_captcha_name(){\r\n if( !isset($_SESSION['captcha_name']) ){\r\n $_SESSION['captcha_name'] = phpfmg_rand(8); //PHPFMG_ID.'fmgCaptchCode';\r\n };\r\n return $_SESSION['captcha_name'];\r\n}", "public function oauthGenerateVerificationCode()\n {\n return substr(md5(rand()), 0, 6);\n }", "public function generateConfirmationCode()\n {\n return h(str_random(30));\n }", "private function _genCode(){\n\t\t$str = \"1 2 3 4 6 7 8 9 a b c d e f g h k m n P t\";\n\t\t\n\t\t$temp = explode(\" \", $str);\n\t\t$c1 = $temp[rand(1, 20)];\n\t\t$c2 = $temp[rand(1, 11)];\n\t\t$c3 = $temp[rand(1, 13)];\n\t\t$c4 = $temp[rand(1, 20)];\n\t\t$c5 = $temp[rand(1, 18)];\n\t\t$c6 = $temp[rand(1, 20)];\n\t\t\n\t\t$chars = $c1.$c2.$c3.$c4.$c5.$c6;\n\t\t\n\t\treturn strtolower($chars);\n\t}", "function generateCode(){\n $base=\"abcdefghijklmnopkrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-\";\n $i=0;\n $c=\"\";\n while ($i<6){\n $c.=$base[rand(0,strlen($base)-1)];\n $i++;\n }\n if (validate::existCode($c))\n return generateCode();\n return $c;\n}", "function cvf_td_generate_random_code($length=10) {\n\n $string = '';\n $characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters)-1)];\n }\n\n return $string;\n\n}", "function generarPassword() {\n\t\t$str = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$cad = \"\";\n\t\tfor ($i = 0; $i < 8; $i++) {\n\t\t\t$cad .= substr($str, rand(0, 62), 1);\n\t\t}\n\t\treturn $cad;\n\t}", "protected function generate_captcha($length=4)\r\n\t{\r\n\t\treturn substr(str_shuffle(\"2346789ABDHLMNPRTWXYZ\"), 0, $length);\r\n\t}", "private function setCaptchaCode()\n\t{\n\t\t$Pass= Controler_Main::getInstance()->getRandomPass(5);\n\t\t$_SESSION['Captcha']=$Pass;\n\t}", "function capya_string($len){\n $str='';\n for($i=1; $i<=$len; $i++) {\n $ord=rand(50, 90);\n if((($ord >= 50) && ($ord <= 57)) || (($ord >= 65) && ($ord<= 90))) $str.=chr($ord);\n else $str.=capya_string(1);\n }\n return $str;\n}", "public function generateRandomCouponCode()\n {\n $length = 12;\n $code = '';\n $chars = 'abcdefghjkmnpqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ0123456789';\n $maxlength = strlen($chars);\n if ($length > $maxlength) {\n $length = $maxlength;\n }\n\n $i = 0;\n while ($i < $length) {\n $char = substr($chars, mt_rand(0, $maxlength - 1), 1);\n if (!strstr($code, $char)) {\n $code .= $char;\n $i++;\n }\n }\n\n $code = strtoupper($code);\n return $code;\n }", "function cvf_td_generate_random_code($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "public function passwordResetCode();", "function getRandomCode() {\n $code = md5($this->getid_recipient() . $this->getid_offer() . $this->getexpirationdate());\n return $code;\n }", "function auth() {\r\n\t$code = \"\";\r\n\tfor ($i = 0; $i < 8; $i ++) {\r\n\t\t$code .= (rand(0, 1) ? chr(rand(65, 122)) : rand(0, 9));\r\n\t}\r\n\treturn sha1($code);\r\n}", "function genrateReportCode() {\n $chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ023456789\";\n srand((double) microtime() * 1000000);\n $i = 0;\n $pass = '';\n\n while ($i <= 7) {\n $num = rand() % 33;\n $tmp = substr($chars, $num, 1);\n $pass = $pass . $tmp;\n $i++;\n }\n return $pass;\n}", "private function getConfirmCode()\n {\n return md5(bin2hex(time()) . time());\n }", "function getCardCode12($card_no) {\n\n$code = strtoupper(str_replace('0', 'O', base_convert(md5(microtime().$card_no.'random pepper32490238590435657'), 16, 36)));\nreturn substr($code, 0, 3).\"-\".substr($code, 3, 3).\"-\".substr($code, 6, 3).\"-\".substr($code, 9, 3);\n}" ]
[ "0.7179355", "0.68717086", "0.6802135", "0.6753556", "0.64977455", "0.6493676", "0.645707", "0.64249986", "0.641172", "0.64023215", "0.6392648", "0.6365354", "0.63628817", "0.63618964", "0.6351258", "0.6344867", "0.63184226", "0.63137287", "0.6283493", "0.6280058", "0.62769336", "0.62762123", "0.62691367", "0.62655026", "0.6264456", "0.62528384", "0.6252681", "0.6247463", "0.62292415", "0.62149024" ]
0.7436703
0
Show the form for creating a new LlamadoConcursos.
public function create() { $llamados = Llamado::pluck('codigo' , 'id'); $concursos = Concurso::pluck('referenciaGeneral' , 'id'); return view('llamado_concursos.create' , compact ('llamados' , 'concursos')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return view('concurs.create');\n }", "public function create()\n {\n //\n \n return view('colaboradores.create');\n \n }", "public function create()\n {\n return view('cursos.create');\n }", "public function create()\n {\n return view('cursos.create');\n }", "public function create()\n {\n //\n return view('cursos.create');\n }", "public function create()\n {\n return view('gas_consumo.create');\n }", "public function create()\n {\n return view('backend.cargo_recursos.create');\n }", "public function create()\n {\n $cursos = Curso::all();\n return view(\"alunos.create\", compact('cursos'));\n }", "public function create()\n {\n return view('catalogos.create');\n }", "public function newAction()\n {\n $entity = new Capacitador();\n $form = $this->createForm(new CapacitadorType(), $entity);\n\n /*** -Institucion ***/\n $institucion = new Institucioncapacitadora();\n $forminst = $this->createForm(new InstitucioncapacitadoraType(), $institucion);\n /** ---- **/\n \n // Incluimos camino de migas\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Capacitaciones\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>3)));\n $breadcrumbs->addItem(\"Facilitadores\", $this->get(\"router\")->generate(\"pantalla_facilitadores\"));\n $breadcrumbs->addItem(\"Registrar facilitador\", $this->get(\"router\")->generate(\"hello_page\"));\n\n return $this->render('CapacitacionBundle:Capacitador:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'forminst'=>$forminst->createView(),\n ));\n }", "public function actionCreate()\n {\n $model = new Comercios();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view('resources.plata.marcas_de_cilindros.create');\n }", "public function create()\n {\n $colegio = new \\Colegio;\n\n return view('colegios::admin.colegios.create', compact('colegio'));\n }", "public function create()\n {\n $asignaturas = Asignatura::pluck('nombre', 'id');\n $categorias = Categoria::pluck('nombre', 'id');\n $perfiles = Perfiles::pluck('nombre', 'id');\n $usuarios = User::pluck('name' , 'id');\n $estado = Collect(['Abierto' => 'Abierto' , 'Cerrado' => 'Cerrado' , 'Impugnado' => 'Impugnado' , 'Vacante' => 'Vacante']);\n $dedicaciones = Collect(['Simple' => 'Simple' , 'Exclusiva' => 'Exclusiva' , 'Semiexclusiva' => 'Semiexclusiva']);\n return view('concursos.create',compact( 'asignaturas' , 'categorias' , 'perfiles' , 'usuarios' , 'estado' , 'dedicaciones'));\n }", "public function create()\n {\n return view('ciclos.create');\n }", "public function create()\n {\n return view('colaboradores', compact('title','categorys'));\n }", "public function create()\n {\n return view('Sucursales.create');\n }", "public function create()\n {\n $fornecedor = DB::table('tbl_fornececdores AS r')\n ->select('r.*', 'e.nome AS fornecedor')\n ->leftJoin('tbl_compras AS e', 'e.fk_fornecedor', '=', 'r.cd_fornecedor')\n ->where('r.ativo', '=', 'S')->get();\n\n return view('estoque::pages.estoque.compras.new', ['fornecedores' => $$fornecedor]);\n\n }", "public function create()\n {\n $carreras = carrera::all();\n $cursos = curso::all();\n return view('ciclos.create', [\n 'carreras' => $carreras, 'cursos' => $cursos\n ]);\n }", "public function actionCrear() {\n\n $model = new OfertasLaborales();\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n \tif ($model->save()) {\n return $this->redirect(['actualizar', 'id' => $model->idOfertaLaboral]);\n }\n }\n\n return $this->render('crear', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n PermissionController::temPermissao('cursos.update');\n return view('cursos.create');\n }", "public function create()\n {\n return view('contato.form');\n }", "public function create()\n {\n\n $concessoes = Concessoe::all();\n return view('admin.infraestruturas.create', ['concessoes' => $concessoes]);\n\n }", "public function create()\n {\n return view('condos.create');\n }", "public function create()\n {\n return view('cobros.create');\n }", "public function create()\n {\n $cruds = Crud::all();\n $ctablas = Control_tabla::orderBy('table_name')->get();\n return view('consola.i_consola', compact('ctablas', 'cruds'));\n }", "public function create()\n {\n return View('contecos.create');\n }", "public function create()\n {\n return view('cbos.create');\n }", "public function create()\n {\n return view('consortia.create');\n }", "public function create()\n {\n return view ('pig.contratos.create');\n }" ]
[ "0.71485156", "0.7128669", "0.71147907", "0.71147907", "0.7087562", "0.7058187", "0.7051203", "0.70177805", "0.7006103", "0.7003732", "0.70011294", "0.69860744", "0.6970205", "0.6954094", "0.6933205", "0.6928592", "0.6908054", "0.69043434", "0.6903634", "0.68950284", "0.68834955", "0.6878953", "0.68742514", "0.6871057", "0.6867665", "0.68635267", "0.6851081", "0.6850317", "0.6846671", "0.6844843" ]
0.75176454
0
Store a newly created LlamadoConcursos in storage.
public function store(CreateLlamadoConcursosRequest $request) { $input = $request->all(); $llamadoConcursos = $this->llamadoConcursosRepository->create($input); Flash::success('Llamado Concursos saved successfully.'); return redirect(route('llamadoConcursos.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(CreateConcursoRequest $request)\n {\n $input = $request->all();\n\n $concurso = $this->concursoRepository->create($input);\n\n Flash::success('Concurso saved successfully.');\n\n return redirect(route('concursos.index'));\n }", "public function store(Request $request)\n {\n $this->authorize('create', Curso::class);\n\n DB::beginTransaction();\n\n $curso = new Curso();\n $curso->categoria_id = $request->input('categoria_id');\n $curso->titulo = $request->input('tituloCurso');\n $curso->descricao = $request->input('descricaoCurso');\n $curso->icone = $request->input('icone');\n $curso->palavrasChave = $request->input('palavrasChave');\n $curso->usuarioAtualizacao = $request->input('usuarioAtualizacao');\n $curso->save();\n\n $unidades = $request->input('tituloUnidades');\n for ($i = 0; $i < count($unidades); ++$i) {\n $unidade = new Unidade();\n $unidade->titulo = $unidades[$i];\n $unidade->ordem = $request->ordem[$i];\n $unidade->usuarioAtualizacao = $curso->usuarioAtualizacao;\n $unidade->curso_id = $curso->id;\n $unidade->save();\n }\n\n $request->session()->flash('adicionada',\n \"Curso $curso->titulo inserida com sucesso.\");\n DB::commit();\n\n return redirect()->route('cursos');\n }", "public function store(StoreCuponDescuentoRequest $request)\n {\n $success = true;\n\t\t$modelo = null;\n\t\t$excepcion = null;\n\n\t\tDB::beginTransaction();\n\t\ttry\n\t\t{\n\n $fecha_inicio = \\DateTime::createFromFormat('d/m/Y', $request->fecha_inicio);\n $fecha_inicio = $fecha_inicio->format('Y-m-d');\n\n $fecha_fin = \\DateTime::createFromFormat('d/m/Y', $request->fecha_fin);\n $fecha_fin = $fecha_fin->format('Y-m-d');\n\n\t\t\t$modelo = DCampaniaCuponDescuento::create([\n\t\t\t\t\"titulo\" => $request->titulo,\n\t\t\t\t\"descripcion\" => $request->descripcion,\n\t\t\t\t\"moneda\" => $request->moneda,\n\t\t\t\t\"n_modo_aplicacion_descuento_id\" => $request->n_modo_aplicacion_descuento_id,\n\t\t\t\t\"valor\" => $request->valor,\n\t\t\t\t\"fecha_inicio\" => $fecha_inicio,\n\t\t\t\t\"fecha_fin\" => $fecha_fin,\n\t\t\t\t\"noches_minimas\" => $request->noches_minimas,\n \"cantidad\" => $request->cantidad,\n\n \"lat\" => $request->lat,\n \"lng\" => $request->lng,\n\t\t\t\t\"lat_max\" => $request->lat_max,\n\t\t\t\t\"lat_min\" => $request->lat_min,\n\t\t\t\t\"lng_max\" => $request->lng_max,\n\t\t\t\t\"lng_min\" => $request->lng_min,\n\n \"usuario_id\" => Auth::id()\n\t\t\t]);\n\n $cantidad = $request->cantidad;\n while($cantidad > 0)\n {\n CuponDescuentoController::agregarCuponACampania($modelo);\n $cantidad--;\n }\n\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n\t\t\t$success = false;\n\t\t\t$excepcion = [get_class($e),$e->getMessage()];\n\t\t}\n\n\t\tif($success)\n\t\t{\n\t\t\tDB::commit();\n\t\t\treturn response()->json(['modelo' => $modelo ]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDB::rollBack();\n\t\t\treturn response()->json(['errors' =>\n\t\t\t\t[\"submit\"=>[\"Ha ocurrido un algo inusual\"]],\n\t\t\t\t\"excepcion\" => $excepcion\n\t\t\t], 422);\n\t\t}\n }", "public function store(Request $request)\n {\n //Gate::authorize('haveaccess', 'curso.store');\n $request->validate([\n\n 'nombre' => 'required|string|max:60',\n \n 'estado' => 'required|in:on,off',\n ]);\n \n// $curso=Curso::create($request->all());\n $curso = new Curso ;\n \n $curso->nombre = $request->nombre;\n $curso->estado = $request->estado;\n \n \n\n $curso->save();\n \n \n return redirect('sistema/cursos')->with('success','Haz Creado un Paralelo con exito');\n \n }", "public function store(Request $request)\n {\n $cursos = new Curso;\n $cursos->instituicao_id = $request->session()->get('instituicao_id');\n $cursos->nome = $request->input('nome');\n $cursos->save();\n \n $request->session()->flash('success', 'Curso cadastrado com sucesso');\n return redirect()->route('cursos.index');\n }", "public function store(Request $request)\n {\n $proyecto = new Proyecto();\n $proyecto->estado = $request->estado;\n $proyecto->contraparte = $request->contraparte;\n $proyecto->cupos = $request->cupos;\n $proyecto->descripcion = $request->descripcion;\n $proyecto->encargado = $request->encargado;\n $proyecto->fecha_inicio = $request->fecha_inicio;\n $proyecto->fecha_fin = $request->fecha_fin;\n $proyecto->horario = $request->horario;\n $proyecto->nombre = $request->nombre;\n $proyecto->tipo_horas = $request->tipo_horas;\n $proyecto->modificado_por = $request->modificado_por;\n $proyecto->creado_en = $request->createdAt;\n $proyecto->save();\n\n $arraycp = $request->carreraPerfil;\n\n for($i = 0; $i < count($arraycp); $i++){\n $pxc = new ProyectoxCarrera();\n $pxc->idProyecto = $proyecto->idProyecto;\n $pxc->idCarrera = $arraycp[$i][0];\n $pxc->limite_inf = $arraycp[$i][1];\n $pxc->limite_sup = $arraycp[$i][2];\n $pxc->save();\n }\n }", "public function store(Request $request)\n {\n\n $request->validate([\n 'curso' => 'required',\n 'instrutor' => 'required',\n 'idCategoria' => 'required',\n ]);\n\n Cursos::create([\n 'curso' => $request->curso,\n 'idCategoria' => $request->idCategoria,\n 'instrutor' => $request->instrutor,\n 'palavrasChave' => $request->palavrasChave,\n 'idUsuario' => $request->user()->id\n ]);\n\n return redirect()->route('cursos.index')\n ->with('success', 'Curso criado com sucesso!');\n }", "public function store()\n\t{\n\t\t$fbf_historico_atleta_cameponato = new FbfHistoricoAtletaCameponato;\n\t\t$fbf_historico_atleta_cameponato->idcampeonato = Input::get('idcampeonato');\n$fbf_historico_atleta_cameponato->idatleta = Input::get('idatleta');\n$fbf_historico_atleta_cameponato->idtime = Input::get('idtime');\n$fbf_historico_atleta_cameponato->classificacao = Input::get('classificacao');\n$fbf_historico_atleta_cameponato->jogos = Input::get('jogos');\n$fbf_historico_atleta_cameponato->gols = Input::get('gols');\n\n\t\t$fbf_historico_atleta_cameponato->save();\n\n\t\t// redirect\n\t\tSession::flash('message', 'Registro cadastrado com sucesso!');\n\t\treturn Redirect::to('fbf_historico_atleta_cameponato');\n\t}", "public function store(CreateCursoRequest $request)\n {\n PermissionController::temPermissao('cursos.update');\n $input = $request->all();\n\n $curso = $this->cursoRepository->create($input);\n\n $unidade = UnidadeController::getUnidade();\n DB::table('curso')->where('id', $curso->id)->update(['idUnidade' => $unidade]);\n\n Flash::success('Curso criado com sucesso.');\n\n return redirect(route('cursos.index'));\n }", "public function store(Request $request)\n {\n $validateData = $this->validate($request,[\n 'id_area'=>'required',\n 'ciclo'=>'required',\n 'tipo'=>'required',\n 'dia'=>'required',\n 'horario'=>'required',\n 'crn'=>'required',\n 'curso'=>'required',\n 'codigo'=>'required',\n 'profesor'=>'required',\n 'cupo'=>'required',\n 'alumnos'=>'required',\n 'pe'=>'required',\n 'departamento'=>'required',\n 'observaciones'=>'required',\n ]);\n\n $aula = Area::where('id', '=', $request->input('id_area'))->get()->first();\n\n $curso = new Curso();\n $curso->id_area = $request->input('id_area');\n $curso->ciclo = $request->input('ciclo');\n $curso->tipo = $request->input('tipo');\n $curso->dia = $request->input('dia');\n $curso->aula = $aula->area;\n $curso->horario = $request->input('horario');\n $curso->crn = $request->input('crn');\n $curso->curso = $request->input('curso');\n $curso->codigo = $request->input('codigo');\n $curso->profesor = $request->input('profesor');\n $curso->cupo = $request->input('cupo');\n $curso->alumnos = $request->input('alumnos');\n $curso->pe = $request->input('pe');\n $curso->departamento = $request->input('departamento');\n $curso->observaciones = $request->input('observaciones');\n $curso->save();\n return redirect('cursos')->with(array(\n 'message'=>'Curso añadido'\n ));\n\n }", "public function store(Requests\\CreateCicloRequest $request)\n {\n //\n //$userID = Auth::user()->id;\n $data = $request->all();\n $activo = Input::get('activo');\n $publico = Input::get('publico');\n\n\n //dd($data);\n $ciclo = new Ciclo($data);\n if(empty($activo))\n $ciclo->activo = false;\n if(empty($publico))\n $ciclo->publico = false;\n\n\n $ciclo->save();\n //se crean las entregas para el ciclo\n $actividades = $ciclo->actividades()->get();\n foreach($actividades as $actividad)\n {\n $entrega = new Entrega();\n $entrega->actividad_id = $actividad->id;\n $entrega->ciclo_id = $ciclo->id;\n $entrega->save();\n }\n\n return redirect()->route('admin.ciclos.index');\n }", "public function store(StoreCurso $request){\n // valida el formulario, para que antes de que los campos se guarden, verifique\n// Si funciona\n // $curso = new Curso();\n\n // $curso->name = $request->name;\n // $curso->descripcion = $request->descripcion;\n // $curso->categoria = $request->categoria;\n\n // Con este metodo, todos los campos que pueda haber en el formulario seran tomados\n $curso = Curso::create($request->all());\n return redirect()->route('cursos.show', $curso);\n\n\n }", "public function store(CreateContratoRequest $request)\n {\n //return $request->all();\n $listacontratos = \\App\\Contrato::create( $request->all() );\n\n //$listacontratos->tipoDeContrato()->create([$listacontratos]);\n // $listacontratos-> tipoDeContrato()->save($listacontratos);\n \n \n //$listacontratos->tipoDeContrato()->associate($listacontratos);\n //$listacontratos->save();\n \n\n\n // DB::table('contrato') -> insert([\n\n // \"Jornada\" => $request->input('Jornada'),\n //\"PeriodoDePrueva\" => $request->input('PeriodoDePrueva'),\n // \"Salario\" => $request->input('Salario'),\n // \"FechaInicio\" => $request->input('FechaInicio'),\n // \"id_tipoDeContrato\" => $request->input('id_tipoDeContrato'),\n // \"id_cargo\" => $request->input('id_cargo'),\n // \"id_empleado\" => $request->input('id_empleado'),\n // \"id_empresa\" => $request->input('id_empresa'),\n // ]);\n\n\n //return redirect()->route('contratos.index');\n return redirect()->route('contratos.index', compact('listacontratos'))->with('infoContratoCreate','Contrato Creado');\n\n }", "public function store(Request $request)\n {\n $conta = Conta::FindOrFail($request->id_conta);\n $conta->status = 'E';\n $conta->dt_alteracao = Carbon::now();\n $conta->id_usuario = Auth::user()->id;\n $conta->update();\n\n\n $renegociacao = new Renegociacao();\n $renegociacao->id_conta = $conta->id;\n $renegociacao->id_usuario = Auth::user()->id;\n $renegociacao->status = 'A';\n $renegociacao->dt_solicitacao = Carbon::now();\n $renegociacao->tipo_renegociacao = $request->tipo_renegociacao;\n $renegociacao->qtde_parcelas = $request->qtde_parcelas;\n $renegociacao->dt_vencimento = date('Y-m-d', strtotime($request->dt_vencimento));\n $renegociacao->valor_novo = $request->valor_novo;\n $renegociacao->observacao = $request->observacao;\n $renegociacao->save();\n $renegociacao->refresh();\n\n for($i=1; $i <= $renegociacao->qtde_parcelas; $i++){\n $conta_nova = new Conta();\n $conta_nova->status = 'A';\n $conta_nova->tipo_conta = $conta->tipo_conta;\n $conta_nova->dt_criacao = Carbon::now();\n $conta_nova->dt_alteracao = null;\n $conta_nova->dt_emissao = Carbon::now();\n if($renegociacao->tipo_renegociacao == 'P'){\n $conta_nova->dt_vencimento = $i == 1 ? date('Y-m-d', strtotime($renegociacao->dt_vencimento)) : date('Y-m-d', strtotime('+'.$i.' months', $renegociacao->dt_vencimento));\n }\n $conta_nova->dt_pagamento = null;\n $conta_nova->id_renegociacao = $renegociacao->id;\n $conta_nova->valor_documento = ($renegociacao->valor_novo + $conta->multa + $conta->juros) / $renegociacao->qtde_parcelas;\n $conta_nova->multa = $conta->multa;\n $conta_nova->juros = $conta->juros;\n $conta_nova->id_usuario = Auth::user()->id;\n $conta_nova->num_doc = $conta->num_doc;\n $conta_nova->serie = null;\n $conta_nova->save();\n }\n\n return redirect()->route('contas.renegociacao.index')\n ->with('message', 'Renegociação realizada com sucesso.');\n }", "public static function store($valutazione)\n {\n $con = FConnectionDB::getIstanza();\n $con->store($valutazione, static::$nomeClasse);\n }", "public function store()\n\t{\n\t\t$liceo = new Colegios;\n\n\t\t$liceo->nombre = Input::get('nombre');\n\t\t$liceo->desde = Input::get('desde');\n\t\t$liceo->hasta = Input::get('hasta');\n\t\t$liceo->comentario = Input::get('comentario');\n\t\t$liceo->estudiante_fk = input::get('estudiante');\n\t\t$liceo->funcionario_fk = input::get('funcionario');\n\t\t$liceo->docente_fk = input::get('docente');\n\n\t\tif ($liceo->save())\n\t\t{\n\t\t\tSession::flash('message','Establecimiento agregado correctamente!');\n\t\t\tSession::flash('class','succes');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSession::flash('message','Ups! ha ocurrido un error');\n\t\t\tSession::flash('class','danger');\n\t\t}\n\n\t\treturn Redirect::to('liceos/create');\n\t\t\n\t}", "public function create()\n {\n $carrinho = session()->get('carrinho');\n foreach ($carrinho as $p) {\n $array = array(\"user_id\" => Auth::user()->id, \"produto_id\" => intval($p), \"quantidade\" => 1, \"data\" => date(\"Y-m-d H:i:s\"));\n //array_push($array, Auth::user()->id);\n //array_push($array, intval($p));\n //array_push($array, 1);\n $compra = Compra::create($array); \n }\n session()->forget('carrinho');\n session()->flash('info', 'Compra realizada com sucesso!');\n return redirect('/');\n }", "public function store(Request $request)\n {\n $pedidos_concentrado_antiguos = PedidoConcentrado::all();\n $granjas = Granja::all();\n $concentrados = Concentrado::all();\n $consecutivos = ConsecutivoConcentrado::all();\n $ult_consecutivo = $consecutivos->last();\n $cont = 1;\n\n $date = Carbon::now();\n $date->format('d-m-Y');\n\n $pedidos_c = json_decode($request->data, true);\n\n foreach ($pedidos_c as $pedido_c)\n {\n if ($pedido_c[\"concentrado\"] != null)\n {\n $nuevo_pedido_c = new PedidoConcentrado();\n if ($ult_consecutivo != null)\n {\n if ($ult_consecutivo != '1')\n {\n $nuevo_pedido_c->consecutivo_pedido = $ult_consecutivo->consecutivo + 1;\n }\n }\n else\n {\n $nuevo_pedido_c->consecutivo_pedido = 1;\n }\n $nuevo_pedido_c->fecha_creacion = $date;\n $nuevo_pedido_c->fecha_entrega = $pedido_c[\"fecha_entrega\"];\n $nuevo_pedido_c->tipo_documento = 'PCT';\n $nuevo_pedido_c->prefijo = 'WEB';\n\n\n foreach ($granjas as $granja)\n {\n if ($granja->id == $pedido_c[\"granja\"])\n {\n $nuevo_pedido_c->granja_id = $granja->id;\n $granja_s = $granja->nombre_granja;\n }\n }\n\n foreach ($concentrados as $concentrado)\n {\n if ($pedido_c[\"concentrado\"] == $concentrado->nombre_concentrado)\n {\n $nuevo_pedido_c->concentrado_id = $concentrado->id;\n $nuevo_pedido_c->estado_id = 1;\n $nuevo_pedido_c->no_bultos = $pedido_c[\"cantidad\"];\n\n if($pedido_c[\"unidad_medida\"] == \"Granel\")\n {\n $nuevo_pedido_c->no_kilos = (int)$pedido_c[\"kilos_granel\"];\n }\n else\n {\n $nuevo_pedido_c->no_kilos = (int)$pedido_c[\"kilos_bulto\"] * (int)$pedido_c[\"cantidad\"];\n }\n }\n }\n $nuevo_pedido_c->fecha_estimada = $pedido_c[\"fecha_estimada\"];\n $f_estima = $pedido_c[\"fecha_estimada\"];\n $req = $pedidos_c;\n $nuevo_pedido_c->save();\n }\n }\n foreach ($req as $r)\n {\n if ($r[\"concentrado\"] == '')\n {\n $cont++;\n }\n }\n if($cont != 1)\n {\n $nuevo_consecutivo = new ConsecutivoConcentrado();\n if ($ult_consecutivo != null)\n {\n if ($ult_consecutivo != '1')\n {\n $nuevo_consecutivo->consecutivo = $ult_consecutivo->consecutivo + 1;\n $consec = $nuevo_consecutivo->consecutivo;\n }\n }\n else\n {\n $nuevo_consecutivo->consecutivo = 1;\n $consec = $nuevo_consecutivo->consecutivo;\n }\n\n $nuevo_consecutivo->fecha_creacion = $date;\n $nuevo_consecutivo->fecha_entrega = $pedido_c[\"fecha_entrega\"];\n $nuevo_consecutivo->hora_entrega = $pedido_c[\"fecha_entrega\"];\n $nuevo_consecutivo->conductor_asignado = $pedido_c[\"conductor\"];\n $nuevo_consecutivo->vehiculo_asignado = $pedido_c[\"vehiculo\"];\n $nuevo_consecutivo->fecha_estimada = $pedido_c[\"fecha_estimada\"];\n $nuevo_consecutivo->granja_id = $nuevo_pedido_c->granja_id;\n $nuevo_consecutivo->estado_id = 1;\n $nuevo_consecutivo->user_id = Auth::User()->id;\n $nuevo_consecutivo->save();\n\n $tecnicos = User::all();\n $email = \"[email protected]\";\n foreach ($tecnicos as $tecnico)\n {\n if($tecnico->email == Auth::User()->email)\n {\n Mail::send('admin.messages.notification_pedido_concentrado', ['req' => $req, 'dat' => $f_estima, 'cons' => $consec, 'granjas' => $granjas], function($msj) use($consec,$granja_s,$tecnico)\n {\n $emails = [Auth::User()->email, '[email protected]', '[email protected]'];\n $msj->to($emails)->subject('\"Pedido de Concentrados\"' . \" \" .$granja_s . ' - ' . 'Solicitud de Concentrados' . ' | ' . 'Consecutivo: ' . 'PCO'.$consec);\n });\n }\n }\n\n $diferenciaFechas = DB::select('SELECT TIMESTAMPDIFF(DAY, c.fecha_creacion, c.fecha_estimada) AS dif_dias, c.estado_id FROM consecutivos_concentrados c WHERE c.consecutivo = ?', [$consec]);\n\n if($diferenciaFechas[0]->dif_dias < 5){\n Mail::send('admin.messages.notificacion_concentrado_decision',[\n 'consecutivo'=>$consec, 'usuario'=>Auth::User()->nombre_completo\n ], function($msj){\n $msj->subject('\"Nuevo Pedido Adicional.\"');\n //$correos = ['[email protected]', '[email protected]']\n $correos = ['[email protected]', '[email protected]', '[email protected]', '[email protected]'];\n $msj->to($correos);\n });\n }\n /*$fechaFin = strtotime($pedido_c[\"fecha_estimada\"]);\n\t\t\t\t$fechaInicio = strtotime($date);\n\t\t\t\t$resultado =$fechaFin - $fechaInicio;\n\t\t\t\t$diferencia = round($resultado/86400);*/\n\n /* if($diferencia < 6){\n Mail::send('admin.messages.notificacion_concentrado_decision',[\n 'consecutivo'=>$consec, 'usuario'=>Auth::User()->nombre_completo\n ], function($msj){\n $msj->subject('\"Nuevo Pedido Adicional.\"');\n //$correos = ['[email protected]', '[email protected]']\n $correos = ['[email protected]', '[email protected]', '[email protected]'];\n $msj->to($correos);\n });\n }*/\n\n\n\n flash('Pedido <strong>Enviado</strong> exitosamente!!!')->success();\n return redirect()->route('admin.pedidoConcentrados.create');\n }\n }", "public function persist() {\n $bd = BD::getConexion();\n $sqlInsertUsuario = \"insert into usuarios (nomUsuario, clave) values (:nomUsuario, :clave)\";\n $sthSqlInsertUsuario = $bd->prepare($sqlInsertUsuario);\n $result = $sthSqlInsertUsuario->execute([\":nomUsuario\" => $this->nomUsuario, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "public function store(StoreRecursosRequest $request)\n {\n try{\n if($request->hasFile('Evidencias')){\n $file= $request->file('Evidencias');\n //cambiar nombre para no generar conflicto\n $Evidencias = time() . $file->getClientOriginalName();\n //movemos el archivo\n $file->move('archivos/RecursosReposicion', $Evidencias);\n }\n\n $recursos = new Recursos();\n $recursos->SC_Recursos_FechaGenerado = $request->SC_Recursos_FechaGenerado;\n $recursos->SC_Recursos_FechaLimite = $request->SC_Recursos_FechaLimite;\n $recursos->SC_Recursos_Radicado = $request->SC_Recursos_Radicado;\n $recursos->SC_Recursos_Evidencias = $Evidencias;\n $recursos->SC_Recursos_Decision = $request->SC_Recursos_Decision;\n $recursos->SC_ActaComite_FK = $request->SC_ActaComite_FK;\n\n $recursos->save();\n return redirect()->route('recursosReposicion.index')->with('status', 'Recurso de Reposición creado correctamente');\n }\n catch(\\Illuminate\\Database\\QueryException $e){\n return redirect()->route('recursosReposicion.index')->with('status', 'No se ha podido crear el Recurso de Reposición');\n }\n }", "public function store()\n\t{\n\n $colloque = $this->colloque->create(\n Input::all()\n );\n\n return Redirect::to('admin/pubdroit/colloque/'.$colloque->id.'/edit');\n\n\t}", "public function persist() {\n $bd = BD::getConexion();\n $sql = \"insert into usuarios (nombre, clave) values (:nombre, :clave)\";\n $sthSql = $bd->prepare($sqlInsertUsuario);\n $result = $sthSql->execute([\":nombre\" => $this->nombre, \":clave\" => $this->clave]);\n $this->id = (int) $bd->lastInsertId();\n }", "public function store(Request $request)\n {\n if (Centrodecusto::find($request->input('centrodecusto_id'))) {\n Conta::create($request->all());\n Conta::mensagem('success', 'Nova Conta Criada!'); \n return redirect( route('conta.index'));\n } else {\n Conta::mensagem('danger', 'Houve um erro ao salvar a conta o Centro de Custo não foi encontrado!'); \n return redirect()->back();\n }\n }", "public function store(CreateCasoRequest $request)\n {\n /* @var $caso Caso */\n $input = $request->all();\n\n if(Auth::user()->hasRole('CAPTADOR')){\n $input['captador'] = Auth::user()->empleado->id;\n $input['fecha_captacion'] = Carbon::now();;\n }\n\n $cliente = Interviniente::find($request->cliente_id);\n $cliente->isapre;\n $cliente->region;\n $cliente->comuna;\n $cliente->provincia;\n $input['cliente'] = $cliente;\n\n $contraparte = Interviniente::find($request->contraparte_id);\n $contraparte->isapre;\n $contraparte->region;\n $contraparte->comuna;\n $contraparte->provincia;\n $input['contraparte'] = $contraparte;\n\n $caso = $this->casoRepository->create($input);\n\n if(isset($caso->datosResponsable->user)){\n $caso->datosResponsable->user->notify(new ResponsableCasoAsignado($caso));\n }\n\n if(isset($caso->datosCaptador->user)){\n $caso->datosCaptador->user->notify(new CaptadorCasoAsignado($caso));\n }\n\n Flash::success('Caso guardado exitosamente.');\n\n return redirect(route('casos.index'));\n }", "public function save(){\n\t\t$sql = new Sql();\n\n\t\t$results = $sql->select(\"CALL sp_categories_save(:idcategory, :descategory)\", array(\n\t\t\t\":idcategory\"=>$this->getidcategory(),\n\t\t\t\":descategory\"=>$this->getdescategory()\n\t\t));\n\n\t\t$this->setData($results[0]);\n\n\n\t\tCategory::updateFile();\n\n\t}", "public function store(CursoRequest $request)\n {\n try {\n $curso = CursoService::store($request->all(), $request);\n return redirect()->route('cursos.index', $curso->id);\n } catch (Throwable $th) {\n Log::error([\n 'message' => $th->getMessage(),\n 'linha' => $th->getLine(),\n 'arquivo' => $th->getFile()\n ]);\n return redirect()->route('cursos.create');\n }\n }", "public function store(SaveCurriculoRequest $request)\n {\n \n $requestData = $request->all();\n \n curriculo::create($requestData);\n\n return redirect('curriculos')->with('flash_message', 'curriculo added!');\n }", "public function persist (){\n \n $this->query = \"INSERT INTO libros(titulo,autor,editorial) VALUES (:titulo, :autor, :editorial)\";\n\n // $this->parametros['id']=$user_data[\"id\"];\n $this->parametros['titulo']=$this->titulo;\n $this->parametros['autor']=$this->autor;\n $this->parametros['editorial']=$this->editorial;\n \n $this->get_results_from_query();\n\n\n $this->mensaje = \"Libro agregado exitosamente\";\n \n }", "public function create()\n {\n $llamados = Llamado::pluck('codigo' , 'id');\n $concursos = Concurso::pluck('referenciaGeneral' , 'id');\n return view('llamado_concursos.create' , compact ('llamados' , 'concursos'));\n }", "public function persist()\n {\n Channel::from(auth()->user())\n ->contribute($this->all());\n }" ]
[ "0.5839693", "0.58031917", "0.56444174", "0.5521752", "0.55111825", "0.5504116", "0.54959065", "0.54936576", "0.54786056", "0.5459292", "0.5458511", "0.54395914", "0.5397712", "0.53694874", "0.535905", "0.534341", "0.53394115", "0.53063995", "0.53022546", "0.5301051", "0.5276374", "0.52532274", "0.5246988", "0.524397", "0.52438253", "0.52407867", "0.52401984", "0.5192268", "0.5188101", "0.5187663" ]
0.6686261
0
Show the form for editing the specified LlamadoConcursos.
public function edit($id) { $llamados = Llamado::pluck('codigo' , 'id'); $concursos = Concurso::pluck('referenciaGeneral' , 'id'); $llamadoConcursos = $this->llamadoConcursosRepository->findWithoutFail($id); if (empty($llamadoConcursos)) { Flash::error('Llamado Concursos not found'); return redirect(route('llamadoConcursos.index')); } return view('llamado_concursos.edit' , compact ('llamados' , 'concursos'))->with('llamadoConcursos', $llamadoConcursos); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function companyedit() {\r\n $company = $this->model->getCompany($_GET['id']);\r\n $contragentTypes = $this->model->getContragentTypes();\r\n\r\n return $this->view('company/companyedit', array('company' => $company, 'contragentType' => $contragentTypes));\r\n }", "public function editAction() {\n $model = new Application_Model_Compromisso();\n //busco no banco o quem eu quero editar\n $comp = $model->find($this->_getParam('id'));\n // renderiso uma view com os dados\n $this->view->assign(\"compromisso\", $comp);\n }", "public function edit(Cursos $cursos)\n {\n //\n }", "public function edit($ID_condominio)\n {\n //\n $condominio=Condominio::findOrFail($ID_condominio);\n return view('condominio.edit', compact('condominio'));\n }", "public function edit(Carrinho $carrinho)\n {\n //\n }", "public function edit(Contratos $contratos)\n {\n //\n }", "public function edit(Candidatos $candidatos)\n {\n //\n }", "public function edit(Curso $curso)\n {\n\t\t\n\t\t\n\t\tif($curso->relacionado())\n\t\t{\n\t\t\t$users = User::get();\t\t\n\t\t\t//$users = User::get(); ALUMNOS \n\t\t\t$categorias = Categoria::get();\n\t\t\t$profesores = array();\n\t\t\t$alumnos = array();\n\t\t\tforeach ($users as $user) //tinker que tal si directamente pregunro desde CURSO ????????????\n\t\t\t{\t\t\t\t\t\t\n\t\t\t\tif($user->permisos('Profesor'))\n\t\t\t\t{\n\t\t\t\t\t$profesores[] = $user;\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\t\n\t\t\tforeach ($users as $user)\n\t\t\t{\t\t\t\t\t\t\n\t\t\t\tif($user->permisos('Alumno'))\n\t\t\t\t{\n\t\t\t\t\t$alumnos[] = $user;\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$modules = $curso->modules;\n\t\t\t//dd($modules);\n\t\t\t\n\t\t\treturn view ('cursos.edit',compact('curso','categorias','profesores','alumnos','modules'));\n\t\t}\n\t\telse\n\t\t\treturn back()->with('alerta','No tiene acceso al curso : '.$curso->name);\n }", "public function edit(Condo $condo)\n {\n $condo = Condo::find($condo);\n return view('condos.edit', compact('condo'));\n }", "public function editarCortos() {\n\t $this->PermisosUsuarios->validarPermisos($this->Session->get('user_id'),__METHOD__);\n\t $data['breadCrumb'] = $this->BreadCrumb->listarBreadCrumb($_REQUEST);\n $data['ediciones'] = $this->Ediciones->listadoEdiciones();\n $data['categorias'] = $this->Categorias->listadoCategorias();\n\t $data['datos'] = $this->Cortos->buscarPorPk($_REQUEST);\n\t $this->Vistas->show('editarCortos.php',$data);\n\t}", "public function action_editar() {\r\n\t\tif(!Session::instance()->GetUsuario())\r\n \treturn $this->redirect(\"/\");\r\n $links = new Model_Link();\r\n $template = View::factory(\"base/menu\");\r\n $template->set(\"usuario\", Session::instance()->GetUsuario());\r\n $template->set(\"links\", $links->ObtenerLinks(Session::instance()->GetUsuario()));\r\n\t\t/***************************************/\r\n\t\t$template->body = View::factory(\"compromiso/editar\");\r\n\t\t\r\n\t\t$compromisoId = $this->request->param('id');\r\n\t\t$compromiso = new Model_Compromiso($compromisoId);\r\n\t\t$template->body->set(\"compromiso\", $compromiso);\r\n\t\t$template->set(\"scripts\", $this->scripts);\r\n\t \t$template->set(\"styles\", $this->styles);\r\n\t\t\r\n\t\t$this->response->body($template);\r\n\t}", "public function edit(Compras $compras)\n {\n //\n }", "public function edit(Compras $compras)\n {\n //\n }", "public function edit($clave_empleado)\n {\n $empleado = Empleado::find($clave_empleado);\n return view('empleados.edit')->with('empleados',$empleado);\n }", "public function edit(Curso $curso){\n\n return view('cursos.edit', compact('curso'));\n }", "public function editar(){\n\t\t\n\t\t$this->form_validation->set_rules('resposta', 'RESPOSTA', 'trim');\n\t\tif ($this->form_validation->run()==TRUE):\n\t\t$dados = elements(array('resposta'), $this->input->post());\n\t\t$this->Comentarios->do_update($dados, array('id_comentario'=>$this->input->post('idcomentario')));\n\t\tendif;\n\t\tset_tema('titulo', 'Resposta de Coment&aacute;rio');\n\t\tset_tema('conteudo', load_modulo('Comentarios', 'editar'));\n\t\tload_template();\n\t}", "public function edit(Curso $curso)\n {\n //Gate::authorize('haveaccess', 'curso.edit');\n\n\n //llama al nivel que esta relacionado con el modelo curso\n \n return \\view('Cursos.editc',['curso'=>$curso]);\n \n }", "public function edit($id_ejercicio)\n\t{\n\t\t//\n\t\treturn view('admin.ejercicios.createUpdate')->with('ejercicios', \\App\\Ejercicios::find($id_ejercicio));\n\t}", "public function edit(catalogos $catalogos)\n {\n //\n }", "public function editar ()\n {\n try {\n // Define a ação de editar\n $acao = Orcamento_Business_Dados::ACTION_EDITAR;\n \n if ( $this->_requisicao->isGet () ) {\n // Retorna parâmetros informados via get, após validações\n $parametros = $this->trataParametroGet ( 'cod' );\n \n // Busca os dados a exibir, após validações\n $registro = $this->trataRegistro ( $acao, $parametros );\n \n // Cria o formulário populado com os dados\n $formulario = $this->popularFormulario ( $acao, $registro );\n \n // Faz transformações no formulário, se necessário\n $formulario = $this->transformaFormulario ( $formulario, $acao );\n \n // Bloqueia a edição de campos de chave primária (ou composta)\n $this->bloqueiaCamposChave ( $formulario );\n \n // Bloqueia todos os campos\n $this->bloqueiaCamposTodos ( $acao, $formulario, $registro );\n \n // Exibe o formulário\n $this->view->formulario = $formulario;\n } else {\n // Cria o formulário vazio\n $formulario = $this->retornaFormulario ( $acao );\n \n // Grava o novo registro\n $this->gravaDados ( $acao, $formulario );\n }\n } catch ( Exception $e ) {\n // Gera o erro\n throw new Zend_Exception ( $e->getMessage () );\n }\n }", "public function edit(Comunicado $comunicado)\n {\n // Usuário Logado\n $funcionario_logado = Funcionario::find(Auth::user()->funcionario_id);\n\n return view('comunicados.edit', compact('funcionario_logado', 'comunicado'));\n }", "public function edit(Conta $conta)\n {\n //\n }", "public function edit(Comentario $comentario)\n {\n //\n }", "public function edit(Colectivo $colectivo)\n {\n //\n }", "public function edit($con)\n {\n $categories = category::where('consumable','1')->get();\n $consumable = consumable::find($con);\n return view('consumable.edit')->with('consumable',$consumable)->with('categories',$categories);\n }", "public function editcurso() {\n\t\t/* Define as tags onde a mensagem de erro será exibida na página */\n\t\t$this->form_validation->set_error_delimiters('<span>', '</span>');\n\t \n\t\t/* Define as regras para validação */\n\t\t$this->form_validation->set_rules('titulo', 'Titulo', 'required|max_length[128]');\n\t \n\t\t/* Executa a validação e caso houver erro... */\n\t\tif ($this->form_validation->run() === FALSE) {\n\t\t\t/* Chama a função index do controlador */\n\t\t\t$this->index();\n\t\t/* Senão, caso sucesso na validação... */\t\n\t\t} else {\n\t\t\tif(!$this->uri->segment(\"3\"))\n\t\t\t\tredirect('/administracao/painel');\n\t\t\telse \n\t\t\t\t$intID =$this->uri->segment(\"3\");\n\t\t\t/* Recebe os dados do formulário */\n\t\t\t$data['sgl_curso'] = $this->input->post('sigla');\n\t\t\t$data['nm_curso'] = $this->input->post('titulo');\n\t\t\t$data['ds_curso'] = $this->input->post('descricao');\n\t \n\t \t\t/* Carrega o modelo */\n\t\t\t$this->load->model('cursos_model');\n\t \n\t\t\t/* Chama a função inserir do modelo */\n\t\t\tif ($this->cursos_model->update($data, $intID)) {\n\t\t\t\tlog_message('success', 'Curso editado com sucesso!');\n\t\t\t\tredirect('/administracao/listacursos');\n\t\t\t} else {\n\t\t\t\tlog_message('error', 'Erro ao editar o curso!');\n\t\t\t}\n\t\t}\n\t}", "public function editarCarreraController(){\n $datosController = $_GET[\"id\"];\n //Enviamos al modelo el id para hacer la consulta y obtener sus datos\n $respuesta = Datos::editarCarreraModel($datosController, \"carreras\");\n //Recibimos respuesta del modelo e IMPRIMIMOS UNA FORM PARA EDITAR\n echo'<input type=\"hidden\" value=\"'.$respuesta[\"id\"].'\"\n name=\"idEditar\">\n <input type=\"text\" value =\"'.$respuesta[\"nombre\"].'\"\n name=\"carreraEditar\" required>\n <input type=\"submit\" value= \"Actualizar\">';\n }", "public function edit($id)\n {\n $clave = AcClaveOdontologica::findOrFail($id);\n\n return view('clavesOdontologicas.edit', compact('clave'));\n }", "public function edit($id_query)\n {\n $cruds = Crud::all();\n $ctablas = Control_tabla::orderBy('table_name')->get();\n $oconsolas = Vquerytabla::where('id_query', '=', $id_query)->get();\n return view('consola.m_consola', compact('oconsolas', 'ctablas', 'cruds'));\n }", "public function editarAction () {\n // Título da tela (action)\n $this->view->telaTitle = 'Editar Exercício Orçamentário';\n\n // Instancia a regra de negócio\n $negocio = new Orcamento_Business_Negocio_Exercicio();\n\n // Fase\n $fase = new Orcamento_Model_DbTable_FaseAnoExercicio();\n\n $formulario = new $this->_formulario ();\n $this->view->formulario = $formulario;\n\n // Verifica o tipo de requisição Get / Post\n if ($this->getRequest()->isGet()) {\n // Busca dados para o preenchimento do formulário\n $cod = $this->_getParam('cod');\n\n if ($cod) {\n // Busca registro específico\n $registro = $negocio->retornaRegistro($cod);\n\n if ($registro) {\n // TODO Remover a linha a seguir\n // $contrato = $this->_CeoTbAnoExercicio->retornaRegistro($cod);\n\n $camposChave = $negocio->chavePrimaria();\n\n foreach ($camposChave as $chave) {\n $formulario->$chave->setAttrib('readonly', true);\n }\n $formulario->populate($registro);\n } else {\n $this->registroNaoEncontrado();\n }\n\n $this->view->fase = $dadosfase = $fase->fetchRow(\"FANE_NR_ANO = $cod\");\n } else {\n $this->codigoNaoInformado();\n }\n } else {\n // Busca dados do formulário\n $dados = $this->getRequest()->getPost();\n $chavePrimaria = $this->_getParam('cod');\n\n if ($formulario->isValid($dados)) {\n\n $dados = $formulario->getValues();\n\n $resultado = $negocio->editarExercicioFase($dados);\n\n if ($dados['FANE_ID_FASE_EXERCICIO'] == Trf1_Orcamento_Definicoes::FASE_EXERCICIO_EM_EXECUCAO) {\n\n $negocio->copiaValores($dados);\n }\n\n if( !$resultado [ 'sucesso' ] ) {\n // inclui na tabela de log do orçamento\n $this->_logdados->incluirLog( $dados[\"ANOE_AA_ANO\"] );\n // Mensagem sucesso\n $this->_helper->flashMessenger ( array ( message => Orcamento_Business_Dados::MSG_ALTERAR_ERRO . '<br />' . $resultado [ 'msgErro' ] ) );\n }\n\n // Salvo com sucesso\n $this->_helper->flashMessenger(array(message => Orcamento_Business_Dados::MSG_SUCESSO_EXERCICIO, 'status' => 'success'));\n\n // Limpa o cache para listagem na index\n $negocio->excluiCaches();\n\n // Redireciona para o modulo\n $this->voltarIndexAction();\n } else {\n // Reapresenta os dados no formulário para correção do usuário\n $formulario->populate($dados);\n }\n }\n }" ]
[ "0.70479155", "0.688791", "0.68854755", "0.6866474", "0.68568534", "0.68255687", "0.68219274", "0.6788268", "0.67375237", "0.6724083", "0.6722243", "0.66879296", "0.66879296", "0.6665254", "0.66536576", "0.66509974", "0.6645848", "0.66389394", "0.6625641", "0.6623289", "0.65761054", "0.6564951", "0.6556849", "0.6556785", "0.6552941", "0.65456825", "0.652656", "0.652648", "0.6501981", "0.64963305" ]
0.6911128
1
Update the specified LlamadoConcursos in storage.
public function update($id, UpdateLlamadoConcursosRequest $request) { $llamadoConcursos = $this->llamadoConcursosRepository->findWithoutFail($id); if (empty($llamadoConcursos)) { Flash::error('Llamado Concursos not found'); return redirect(route('llamadoConcursos.index')); } $llamadoConcursos = $this->llamadoConcursosRepository->update($request->all(), $id); Flash::success('Llamado Concursos updated successfully.'); return redirect(route('llamadoConcursos.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Cursos $cursos)\n {\n //\n }", "public function update($tarConvenio);", "public function update($compraColetiva){\n\t\t$campos = \"\";\n \n \n\t\t if(!empty($compraColetiva->url)) $campos .=' url = ?,';\n\t\t if(!empty($compraColetiva->nome)) $campos .=' nome = ?,';\n\t\t if(!empty($compraColetiva->descricao)) $campos .=' descricao = ?,';\n\t\t if(!empty($compraColetiva->logo)) $campos .=' logo = ?,';\n\t\t if(!empty($compraColetiva->status)) $campos .=' status = ?,';\n\t\t if(!empty($compraColetiva->created)) $campos .=' created = ?,';\n\t\t if(!empty($compraColetiva->cidadeId)) $campos .=' cidade_id = ?,';\n\t\t if(!empty($compraColetiva->identificacao)) $campos .=' identificacao = ?,';\n\n \n $campos = substr($campos,0,-1);\n \n $sql = 'UPDATE compra_coletiva SET '.$campos.' WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t\n\t\t if(!empty($compraColetiva->url)) \t\t$sqlQuery->set($compraColetiva->url);\n\t\t if(!empty($compraColetiva->nome)) \t\t$sqlQuery->set($compraColetiva->nome);\n\t\t if(!empty($compraColetiva->descricao)) \t\t$sqlQuery->set($compraColetiva->descricao);\n\t\t if(!empty($compraColetiva->logo)) \t\t$sqlQuery->set($compraColetiva->logo);\n\t\t if(!empty($compraColetiva->status)) \t\t$sqlQuery->set($compraColetiva->status);\n\t\t if(!empty($compraColetiva->created)) \t\t$sqlQuery->set($compraColetiva->created);\n\t\t if(!empty($compraColetiva->cidadeId)) \t\t$sqlQuery->setNumber($compraColetiva->cidadeId);\n\t\t if(!empty($compraColetiva->identificacao)) \t\t$sqlQuery->set($compraColetiva->identificacao);\n\n\t\t$sqlQuery->setNumber($compraColetiva->id);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function actualizar()\n {\n $id = $this->input->post('id_curso');\n $curso = array(\n\t\t\t\"nome_curso\" => $this->input->post('nome_curso'),\n\t\t);\n $this->db->where('id_curso', $id);\n return $this->db->update('curso', $curso);\n }", "public function update(Request $request, Cursos $curso)\n {\n\n $request->validate([\n 'curso' => 'required',\n 'instrutor' => 'required',\n 'idCategoria' => 'required',\n ]);\n\n $curso->update([\n 'curso' => $request->curso,\n 'idCategoria' => $request->idCategoria,\n 'instrutor' => $request->instrutor,\n 'palavrasChave' => $request->palavrasChave,\n 'idUsuario' => $request->user()->id\n ]);\n\n return redirect()->route('cursos.index')\n ->with('success', 'Curso atualizado com sucesso!');\n }", "public function update(CursoRequest $request, $id)\n\t{\n try{\n //Verificación de los permisos del usuario para poder realizar esta acción\n $usuario_actual = Auth::user();\n $roles = $usuario_actual->roles()->get();\n $permisos = [];\n foreach($roles as $rol){\n $permisos = $rol->perms()->get();\n }\n\n $si_puede = false;\n foreach($permisos as $permiso){\n if(($permiso->name) == 'editar_cursos'){\n $si_puede = true;\n }\n }\n if($si_puede) { // Si el usuario posee los permisos necesarios continua con la acción\n $data['errores'] = '';\n $cursos = Curso::find($id);\n\n\n $fecha_actual = date('Y-m-d');// Se obtiene la fecha actual para validar las fechas de inicio y fin del curso\n if(($request->fecha_inicio) <= $fecha_actual) {\n Session::set('error', 'La fecha de inicio debe ser mayor a la fecha actual');\n $data['cursos'] = Curso::find($id);\n $data['tipo'] = $data['cursos']->id_tipo;\n $data['modalidad_pago'] = ModalidadPago::all()->lists('nombre', 'id');\n $data['modalidades_curso'] = ModalidadCurso::all()->lists('nombre', 'id');\n $data['modalidad_curso'] = $data['cursos']->id_modalidad_curso;\n $data['tipos'] = TipoCurso::all()->lists('nombre', 'id');\n\n return view('cursos.crear', $data);\n\n }else{\n if (($request->fecha_inicio) > ($request->fecha_fin)) {\n Session::set('error', 'La fecha de inicio debe ser igual o menor a la fecha fin');\n $data['cursos'] = Curso::find($id);\n $data['tipo'] = $data['cursos']->id_tipo;\n $data['modalidad_pago'] = ModalidadPago::all()->lists('nombre', 'id');\n $data['modalidades_curso'] = ModalidadCurso::all()->lists('nombre', 'id');\n $data['modalidad_curso'] = $data['cursos']->id_modalidad_curso;\n $data['tipos'] = TipoCurso::all()->lists('nombre', 'id');\n\n return view('cursos.crear', $data);\n }\n }\n\n // Se verifica que el usuario haya seleccionado por lo menos una modalidad de pago\n if (empty(Input::get('modalidades_pago'))) { // Si no ha seleccionado ningúna modalidad, se redirige al formulario\n $data['cursos'] = Curso::find($id);\n $data['errores'] = \"Debe seleccionar una modalidad de pago.\";\n $data['tipo'] = $data['cursos']->id_tipo;\n $data['modalidad_pago'] = ModalidadPago::all()->lists('nombre', 'id');\n $data['modalidades_curso'] = ModalidadCurso::all()->lists('nombre', 'id');\n $data['modalidad_curso'] = $data['cursos']->id_modalidad_curso;\n $data['tipos'] = TipoCurso::all()->lists('nombre', 'id');\n\n return view('cursos.editar', $data);\n\n }\n\n //Se verifica si el usuario seleccionó que el curso esté activo en el carrusel\n if (($request->activo_carrusel) == true) {\n // Luego se verifica si los campos referente al carrusel estén completos\n if ((empty(Input::get('descripcion_carrusel'))) or !($request->hasFile('imagen_carrusel'))) {// Si los campos no están completos se\n // redirige al usuario indicandole el error\n $data['errores'] = $data['errores'] . \" Debe completar los campos de descripcion y imagen del Carrusel\";\n $data['cursos'] = Curso::find($id);\n $data['tipo'] = $data['cursos']->id_tipo;\n $data['modalidad_pago'] = ModalidadPago::all()->lists('nombre', 'id');\n $data['modalidades_curso'] = ModalidadCurso::all()->lists('nombre', 'id');\n $data['modalidad_curso'] = $data['cursos']->id_modalidad_curso;\n $data['tipos'] = TipoCurso::all()->lists('nombre', 'id');\n\n return view('cursos.crear', $data);\n }\n }\n\n // Se verifica si el usuario colocó una imagen en el formulario\n if ($request->hasFile('imagen_carrusel')) {\n $imagen = $request->file('imagen_carrusel');\n } else {\n $imagen = $cursos->imagen_carrusel;\n }\n $modalidades = Input::get('modalidades_pago'); // Se obtienen las modalidades de pago seleccionadas\n\n // Se actualizan los datos del curso seleccionado\n $cursos->id_tipo = $request->id_tipo;\n $cursos->cupos = $request->cupos;\n $cursos->nombre = $request->nombre;\n $cursos->fecha_inicio = $request->fecha_inicio;\n $cursos->fecha_fin = $request->fecha_fin;\n $cursos->duracion = $request->duracion;\n $cursos->id_modalidad_curso = $request->id_modalidad_curso;\n $cursos->lugar = $request->lugar;\n $cursos->area = '';\n $cursos->descripcion = $request->descripcion;\n $cursos->dirigido_a = $request->dirigido_a;\n $cursos->propositos = $request->proposito;\n $cursos->modalidad_estrategias = $request->modalidad_estrategias;\n $cursos->acreditacion = $request->acreditacion;\n $cursos->perfil = $request->perfil;\n $cursos->requerimientos_tec = $request->requerimientos_tec;\n $cursos->perfil_egresado = $request->perfil_egresado;\n $cursos->instituciones_aval = $request->instituciones_aval;\n $cursos->aliados = $request->aliados;\n $cursos->plan_estudio = $request->plan_estudio;\n $cursos->id_modalidad_pago = '1';\n $cursos->modalidades_pago = '';\n $cursos->costo = $request->costo;\n $cursos->imagen_carrusel = $imagen;\n $cursos->descripcion_carrusel = $request->descripcion_carrusel;\n $cursos->activo_carrusel = 'false';\n\n // Se verifica que se haya creado el curso de forma correcta\n if ($cursos->save()) {\n DB::table('curso_modalidad_pagos')->where('id_curso', '=', $cursos->id)->delete();\n foreach ($modalidades as $modalidad) { // Se asocian las nuevas modalidades de pago al curso\n $pago = ModalidadPago::where('nombre', '=', $modalidad)->get();\n CursoModalidadPago::create([\n 'id_curso' => $cursos->id,\n 'id_modalidad_pago' => $pago[0]->id,\n ]);\n }\n return redirect('/cursos');\n } else { // Si el curso no se ha creado bien se redirige al formulario de creación y se le indica al usuario el error\n Session::set('error', 'Ha ocurrido un error inesperado');\n return view('cursos.editar');\n }\n\n }else{ // Si el usuario no posee los permisos necesarios se le mostrará un mensaje de error\n\n return view('errors.sin_permiso');\n }\n }\n catch (Exception $e) {\n\n return view('errors.error')->with('error',$e->getMessage());\n }\n\t}", "public function update(Request $request, $id)\n {\n $validateData = $this->validate($request,[\n 'id_area'=>'required',\n 'ciclo'=>'required',\n 'tipo'=>'required',\n 'dia'=>'required',\n 'horario'=>'required',\n 'crn'=>'required',\n 'curso'=>'required',\n 'codigo'=>'required',\n 'profesor'=>'required',\n 'cupo'=>'required',\n 'alumnos'=>'required',\n 'pe'=>'required',\n 'departamento'=>'required',\n 'observaciones'=>'required',\n ]);\n\n $aula = Area::where('id', '=', $request->input('id_area'))->get()->first();\n\n $curso = Curso::find($id);\n $curso->id_area = $request->input('id_area');\n $curso->ciclo = $request->input('ciclo');\n $curso->tipo = $request->input('tipo');\n $curso->dia = $request->input('dia');\n $curso->aula = $aula->area;\n $curso->horario = $request->input('horario');\n $curso->crn = $request->input('crn');\n $curso->curso = $request->input('curso');\n $curso->codigo = $request->input('codigo');\n $curso->profesor = $request->input('profesor');\n $curso->cupo = $request->input('cupo');\n $curso->alumnos = $request->input('alumnos');\n $curso->pe = $request->input('pe');\n $curso->departamento = $request->input('departamento');\n $curso->observaciones = $request->input('observaciones');\n $curso->update();\n return redirect('cursos')->with(array(\n 'message'=>'Curso actualizado'\n ));\n\n }", "public function updating(AreaConhecimento $area_conhecimento)\n {\n $area_conhecimento->ativo = $area_conhecimento->ativo ?? 0;\n }", "public function edit(Cursos $cursos)\n {\n //\n }", "public function update(Request $request, $id)\n {\n DB::beginTransaction();\n $curso = Curso::find($id);\n\n $this->authorize('update', $curso);\n\n $curso->categoria_id = $request->input('categoria_id');\n $curso->titulo = $request->input('tituloCurso');\n $curso->descricao = $request->input('descricaoCurso');\n $curso->icone = $request->input('icone');\n $curso->palavrasChave = $request->input('palavrasChave');\n $curso->usuarioAtualizacao = $request->input('usuarioAtualizacao');\n $curso->ativo = 0;\n $curso->save();\n\n $request->session()->flash('alterada',\n \"Curso $curso->titulo alterado com sucesso.\");\n DB::commit();\n\n $perfil = Auth::user()->perfil->where('administrador', 1);\n\n if (count($perfil) > 0 ){\n return redirect()->route('cursos.index-adm');\n }\n return redirect()->route('cursos');\n\n\n\n\n }", "function asociarCarreras($db,$carrerasA,$id,$usuario,$now){\n \t$sql = \"UPDATE SolicitudConvenioCarrera SET CodigoEstado='100' WHERE (SolicitudConvenioId=?)\";\n\n \t$stmt = $db->Prepare($sql);\n \t$db->Execute($stmt,array($id));\n \tforeach($carrerasA as $carrera){\n \t\t$sql = \"SELECT SolicitudConvenioCarreraID FROM SolicitudConvenioCarrera WHERE SolicitudConvenioId = ? AND codigocarrera = ?\";\n \t\t$stmt = $db->Prepare($sql);\n \t\t$fila = $db->GetRow($stmt,array($_POST[\"SolicitudConvenioId\"],$carrera));\n \t\t$carreras = new solicitudConvenioCarrera();\n \t\tif(count($fila)>0){\n \t\t\t$carreras->load(\"SolicitudConvenioCarreraID=?\", array($fila[\"SolicitudConvenioCarreraID\"]));\n \t\t} else {\n \t\t\t$carreras->codigocarrera = $carrera;\n \t\t\t$carreras->solicitudconvenioid = $id;\n \t\t\t$carreras->fechacreacion = $now;\n \t\t\t$carreras->usuariocreacion = $usuario;\n \t\t}\n \t\t$carreras->codigoestado = 100;\n \t\t$carreras->fechamodificacion = $now;\n \t\t$carreras->usuariomodificacion = $usuario;\n \t\t$carreras->save();\n \t//var_dump($carreras->ErrorMsg()); die;\n \t}\n }", "public function update(Request $request, Catalogo $catalogo)\n {\n\n $this->authorize('update', $catalogo);\n\n\n $catalogo = Catalogo::findOrfail($request->id);\n $catalogo->estado_catalogo = '0';\n $catalogo->save();\n\n $productos = Producto::where('id_catalogo', '=', $request->id)\n ->get();\n \n foreach ($productos as $prod) {\n $producto = Producto::findOrfail($prod['id']);\n $producto->estado_producto = '0';\n $producto->save();\n }\n\n\n }", "public function update(Request $request, Curso $curso)\n {\n // Gate::authorize('haveaccess', 'curso.update');\n \n $request->validate([\n\n 'nombre' => 'required|string|max:60',\n 'estado' => 'required|in:on,off',\n ]);\n\n $curso->update($request->all());\n\n \n \n \n return redirect('sistema/cursos')->with('success','Haz Actualizado un Paralelo con exito');\n }", "public function update(Request $request, Compras $compras)\n {\n //\n }", "public function update(Request $request, Carrinho $carrinho)\n {\n //\n }", "public function update(Request $request, FacturacionCurso $facturacionCurso)\n {\n if($request->ajax())\n {\n $this->facturacion = $facturacionCurso;\n $campos = [\n 'cliente' => $request['cliente'], \n 'pagado' => 0\n ];\n $this->facturacion->fill($campos);\n $this->facturacion->save();\n\n for($i = 0; $i < count($request['cursoA']); $i++){\n $busquedaCursos = DatosFacturaCurso::where('facturaCurso', $facturacionCurso->id)->where('curso', $request['cursoA'][$i])->where('monto', $request['montoA'][$i])->get();\n\n if(count($busquedaCursos) == 0){\n $curso = $request['cursoA'][$i];\n $monto = $request['montoA'][$i];\n\n $camposCarga = [\n 'curso' => $request['cursoA'][$i], \n 'monto' => $request['montoA'][$i],\n 'facturaCurso' => $facturacionCurso->id\n ];\n DatosFacturaCurso::create($camposCarga);\n }\n else if(count($busquedaCursos) > 0){\n foreach ($busquedaCursos as $data) {\n $idBC = $data->id;\n $camposCargaCurso = [\n 'curso' => $request['cursoA'][$i], \n 'monto' => $request['montoA'][$i],\n ];\n \\DB::table('datos_factura_cursos')->where('id', $idBC)->update($camposCargaCurso);\n }\n }\n }\n\n $listadoCursosCargados = DatosFacturaCurso::where('facturaCurso', $facturacionCurso->id)->get();\n\n foreach ($listadoCursosCargados as $dato) {\n if (!in_array($dato->curso, $request['cursoA'])) {\n DatosFacturaCurso::where('id', $dato->id)->delete();\n }\n }\n\n return response()->json([\n 'validations' => true,\n 'nuevoContenido' => $campos \n ]);\n }\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 update(CursoRequest $request, Curso $curso)\n {\n try {\n CursoService::update($request->all(), $curso);\n return redirect()->route('cursos.index', $curso->id);\n } catch (Throwable $th) {\n Log::error([\n 'message' => $th->getMessage(),\n 'linha' => $th->getLine(),\n 'arquivo' => $th->getFile()\n ]);\n return redirect()->route('cursos.edit');\n }\n }", "public function modificarConcurso() {\n\n\t\tif(!$_SESSION[\"currentuser\"]){\n\t\t\techo \"<script>window.location.replace('index.php');</script>\";\n\t\t}\n\n\t\t$concu= new Concurso();\n\n\t\tif (isset($_POST[\"nombreC\"])){\n\t\t\t/*Metodo de la clase concurso que devuelve un boolean indicando si\n\t\t\tel concurso existe en la base de datos*/\n\t\t\t$existe=$concu->existConcurso();\n\n\t\t\t/*Si el concurso no existe devuelve un mensaje de error*/\n\t\t\tif(!$existe){\n\t\t\t\t$errors = array();\n\t\t\t\t$errors[\"nombreC\"] = \"Este concurso no existe, por lo que no se puede modificar\";\n\t\t\t\t$this->view->setVariable(\"errors\", $errors);\n\t\t\t\t/*Si el concurso si que existe, se guardan los valores introducidos en la\n\t\t\t\tmodificacion en la clase concurso*/\n\t\t\t}else{\n\t\t\t\t$concu->setIdC('1');\n\t\t\t\t$concu->setNombreC($_POST[\"nombreC\"]);\n\n\t\t\t\t$ruta=\"./resources/bases/\";//ruta carpeta donde queremos copiar las imagenes\n\t\t\t\t$basesCTemp=$_FILES['basesC']['tmp_name'];//guarda el directorio temporal en el que se sube la imagen\n\t\t\t\t$basesC=$ruta.$_FILES['basesC']['name'];//indica el directorio donde se guardaran las imagenes\n\t\t\t\tmove_uploaded_file($basesCTemp, $basesC);\n\n\t\t\t\t$concu->setBasesC($basesC,$basesCTemp);\n\t\t\t\t$concu->setCiudadC($_POST[\"ciudadC\"]);\n\t\t\t\t$concu->setFechaInicioC($_POST[\"fechaInicioC\"]);\n\t\t\t\t$concu->setFechaFinalC($_POST[\"fechaFinalC\"]);\n\t\t\t\t$concu->setFechaFinalistasC($_POST[\"fechaFinalistasC\"]);\n\t\t\t\t$concu->setPremioC($_POST[\"premioC\"]);\n\t\t\t\t$concu->setPatrocinadorC($_POST[\"patrocinadorC\"]);\n\n\t\t\t\ttry{\n\t\t\t\t\t/*Comprueba si los datos introducidos son validos*/\n\t\t\t\t\t$concu->checkIsValidForRegister();\n\n\t\t\t\t\t// Actualiza los datos del concurso\n\t\t\t\t\t$concu->update();\n\n\t\t\t\t\t//mensaje de confirmación y redirige al metodo consultarConcurso del controlador ConcursoCotroller\n\t\t\t\t\techo \"<script> alert('Modificación realizada correctamente'); </script>\";\n\t\t\t\t\techo \"<script>window.location.replace('index.php?controller=concurso&action=consultarConcurso');</script>\";\n\n\t\t\t\t}catch(ValidationException $ex) {\n\n\t\t\t\t\t$errors = $ex->getErrors();\n\t\t\t\t\t$this->view->setVariable(\"errors\", $errors);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*Devuelve los datos del concurso para mostrarlos en la vista*/\n\t\t$concu = $this->concurso->ver_datos();\n\n\t\t/* Guarda el valor de la variable $concu en la variable concu accesible\n\t\tdesde la vista*/\n\t\t$this->view->setVariable(\"concu\", $concu);\n\n\t\t/*Permite visualizar: view/vistas/modificacionConcurso.php */\n\t\t$this->view->render(\"vistas\", \"modificacionConcurso\");\n\t}", "public function actualizarCategorias($datos){\n $con= new conectar();\n $conexion= $con->conexion();\n $sql= \"UPDATE categoria set nombre='$datos[0]' WHERE id='$datos[1]'\";\n return $result= mysqli_query($conexion, $sql);\n }", "public function mudarStatus(){\n //CO_STATUS = 5 se refere ao caso clinico Disponivel na base publica\n\n //busca e atualiza todos os casos clinicos que tenham CO_STATUS = 4 para o CO_STATUS = 5\n CasoClinico::where('CO_STATUS', '=', 4)->update(['CO_STATUS' => '5']);\n }", "public function update(StoreRecursosRequest $request, $id)\n {\n try{\n $recursos = Recursos::find($id);\n $recursos->SC_Recursos_FechaGenerado = $request->SC_Recursos_FechaGenerado;\n $recursos->SC_Recursos_FechaLimite = $request->SC_Recursos_FechaLimite;\n $recursos->SC_Recursos_Radicado = $request->SC_Recursos_Radicado;\n //$recursos->SC_Recursos_Evidencias = SC_Recursos_Evidencias;\n $recursos->SC_Recursos_Decision = $request->SC_Recursos_Decision;\n $recursos->SC_ActaComite_FK = $request->SC_ActaComite_FK;\n if ($request->hasFile('Evidencias')) {\n $file = $request->file('Evidencias');\n $SC_Recursos_Evidencias = $recursos->Evidencias;\n $file->move(\"archivos/RecursosReposicion\", $SC_Recursos_Evidencias);\n }\n\n $recursos->save();\n return redirect()->route('recursosReposicion.index')->with('status', 'Recurso de reposición actualizado correctamente.');\n }\n catch(\\Illuminate\\Database\\QueryException $e){\n return redirect()->route('recursosReposicion.index')->with('status', 'No se ha podido actualizar');\n }\n }", "public static function mdlActualizarCobros($tabla,$datosModelo)\n\t{\n\n\t\ttry {\n\n\t\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET cob_Nombre= :nombre ,cob_Activo= :activo WHERE cob_Id = :id\");\n\t\t\t$stmt -> bindParam(\":nombre\", $datosModelo[\"cob_Nombre\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":activo\", $datosModelo[\"cob_Activo\"], PDO::PARAM_INT);\n\t\t\t$stmt -> bindParam(\":id\", $datosModelo[\"cob_Id\"], PDO::PARAM_INT);\n\n\t\t\t$stmt->execute();\n\n\t\t\t$stmt = null;\n\n\t\t\t$arrayName = array(\n\t\t\t\t'mensaje' => \"ok\"\n\t\t\t);\n\n\t\t\treturn $arrayName;\n\n\t\t} catch (PDOException $e){\n\n\t\t\t$err = $stmt->errorInfo();\n\t\t\t$arrayName = array(\n\t\t\t\t'mensaje' => $e->getMessage(),\n\t\t\t\t'codigo' => $err[1],\n\t\t\t\t'sqlstate' => $e->getCode(),\n\t\t\t\t'script' => $e->getFile(),\n\t\t\t\t'linea' => $e->getLine(),\n\t\t\t\t'excepcionprevia' => $e->getPrevious(),\n\t\t\t\t'cadena' => $e->__toString(),\n\t\t\t\t'errorinfo' => $err[2]\n\t\t\t);\n\n\t\t\treturn $arrayName;\n\t\t}\n\t\t$stmt = null;\n\t}", "public function update(Request $request, consignaciones $consignaciones)\n {\n //\n }", "public function actualizar($datos){\n $this->fill($datos['producto']);\n $this->categoria = $this->srtCategoria($datos['categorias']);\n $this->save();\n $this->categorias()->sync($datos['categorias']);\n \n $arrIdsColoresBorrar = $this->idsColoresBorrar($datos);\n if (count($arrIdsColoresBorrar) > 0) \n $this->colores()->detach($arrIdsColoresBorrar); \n\n $arrIdsDescripciones = $this->idsDescripcionesBorrar($datos);\n if (count($arrIdsDescripciones) > 0) {\n $this->descripciones()->detach($arrIdsDescripciones);\n DescripcionProducto::destroy($arrIdsDescripciones);\n }\n\n $this->actualizarDescripciones($datos);\n \n if (isset($datos['dimensiones_nuevas'])) {\n $idsDimensiones = $this->arrDimensionesNuevas($datos);\n $articulos = $this->arrArticulos($datos['colores'], $idsDimensiones, $this->id);\n DB::table('articulos')->insert($articulos);\n }\n\n if (isset($datos['colores_nuevos'])) {\n $idsDimensiones = collect($datos['dimensiones_actuales'])->pluck('id')->all();\n $articulos = $this->arrArticulos($datos['colores_nuevos'], $idsDimensiones, $this->id);\n DB::table('articulos')->insert($articulos);\n }\n }", "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}", "public function update(Request $request)\n {\n $customMessages = [\n 'nome.required' => 'Preencha o campo Nome corretamente.',\n 'carga_horaria.required' => 'Preencha o campo Carga Horária corretamente',\n 'nome.min' => 'Minímo 3 caracteres para o Nome'\n ];\n\n $rules = array(\n 'nome' => 'required|min:3',\n 'carga_horaria' => 'required'\n );\n\n $this->validate($request, $rules, $customMessages);\n\n try {\n $data = [\n 'cur_nome' => $request->nome,\n 'cur_carga_horaria' => $request->carga_horaria\n ];\n\n $this->Curso->where('cur_id', $request->id)->update($data);\n setSuccess('Curso atualizado com sucesso!');\n return redirect('/cursos');\n } catch (\\Throwable $th) {\n setError('Ocorreu um erro ao tentar atualizar o Curso!');\n return redirect('/cursos/edit/' . $request->id);\n }\n }", "public function update(Request $request, Contratos $contratos)\n {\n //\n }", "public function update($contenido);", "public function update(){\n $db = Database::getInstance() ;\n $db->query(\"UPDATE canciones SET ncancion=:nca, idGen=:idGen, album=:alb WHERE idcancion=:idc ;\",\n [\":nca\"=>$this->ncancion,\n \":idGen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":idc\"=>$this->idcancion]) ;\n \n }" ]
[ "0.61136556", "0.56234765", "0.5590978", "0.5569198", "0.544443", "0.54141587", "0.54100037", "0.5399805", "0.53876233", "0.5368961", "0.53278977", "0.53174573", "0.5283573", "0.5250484", "0.5245784", "0.51915973", "0.51785105", "0.51769775", "0.5176179", "0.5175782", "0.51543176", "0.514625", "0.5121816", "0.5119272", "0.51103044", "0.50980794", "0.50935704", "0.50863326", "0.5083575", "0.50825095" ]
0.60042155
1
Registers shortcodes for the Unique theme.
function unique_register_shortcodes() { /* Adds the [entry-mood] shortcode. */ add_shortcode( 'entry-mood', 'unique_entry_mood_shortcode' ); /* Adds the [entry-views] shortcode. */ add_shortcode( 'entry-views', 'unique_entry_views_shortcode' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_short_code()\n {\n add_shortcode('colorYourLife', array($this, 'generate_short_code_content'));\n }", "function register_shortcodes(){\n\n\t\t$this->shortcodes = new WordpressConnectShortCodes();\n\n\t}", "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}", "function themesflat_shortcode_register_assets() {\t\t\n\t\twp_enqueue_style( 'vc_extend_shortcode', plugins_url('assets/css/shortcodes.css', __FILE__), array() );\t\n\t\twp_enqueue_style( 'vc_extend_style', plugins_url('assets/css/shortcodes-3rd.css', __FILE__),array() );\n\t\twp_register_script( 'themesflat-carousel', plugins_url('assets/3rd/owl.carousel.js', __FILE__), array(), '1.0', true );\n\t\twp_register_script( 'themesflat-flexslider', plugins_url('assets/3rd/jquery.flexslider-min.js', __FILE__), array(), '1.0', true );\t\t\n\t\twp_register_script( 'themesflat-manific-popup', plugins_url('assets/3rd/jquery.magnific-popup.min.js', __FILE__), array(), '1.0', true );\t\t\n\t\twp_register_script( 'themesflat-counter', plugins_url('assets/3rd/jquery-countTo.js', __FILE__), array(), '1.0', true );\n\t\twp_enqueue_script( 'flat-shortcode', plugins_url('assets/js/shortcodes.js', __FILE__), array(), '1.0', true );\n\t\twp_register_script( 'themesflat-google', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyCIm1AxfRgiI_w36PonGqb_uNNMsVGndKo&v=3.7', array(), '1.0', true );\n\t\twp_register_script( 'themesflat-gmap3', plugins_url('assets/3rd/gmap3.min.js', __FILE__), array(), '1.0', true );\t\n\t}", "function TS_VCSC_RegisterAllShortcodes() {\r\n\t\t\tif ($this->TS_VCSC_PluginSupport == \"true\") {\r\n\t\t\t\t// Standard Elements\r\n\t\t\t\tforeach ($this->TS_VCSC_Visual_Composer_Elements as $ElementName => $element) {\r\n\t\t\t\t\tif ($this->TS_VCSC_Visual_Composer_Elements[$ElementName]['active'] == \"true\") {\r\n\t\t\t\t\t\tif ($element['type'] == 'internal') {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (($this->TS_VCSC_VCFrontEditMode == \"true\") || (is_admin() == false) || ($this->TS_VCSC_PluginAJAX == \"true\") || ($this->TS_VCSC_PluginAlways == \"true\")) {\r\n\t\t\t\t\t\t\t\trequire_once($this->shortcode_dir.'ts_vcsc_shortcode_' . $element['file'] . '.php');\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Load Inter-Dependent Shortocdes\r\n\t\t\t\tif ((($this->TS_VCSC_Visual_Composer_Elements['TS Icon Info Box']['active'] == \"true\") || ($this->TS_VCSC_Visual_Composer_Elements['TS Panel Flip']['active'] == \"true\")) && ($this->TS_VCSC_Visual_Composer_Elements['TS Creative Link']['active'] == \"false\")) {\r\n\t\t\t\t\tif (($this->TS_VCSC_VCFrontEditMode == \"true\") || (is_admin() == false) || ($this->TS_VCSC_PluginAJAX == \"true\") || ($this->TS_VCSC_PluginAlways == \"true\")) {\r\n\t\t\t\t\t\trequire_once($this->shortcode_dir.'ts_vcsc_shortcode_' . $this->TS_VCSC_Visual_Composer_Elements['TS Creative Link']['file'] . '.php');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t// Demo Elements\r\n\t\t\t\tforeach ($this->TS_VCSC_Visual_Composer_Demos as $ElementName => $element) {\r\n\t\t\t\t\tif ($this->TS_VCSC_Visual_Composer_Demos[$ElementName]['active'] == \"true\") {\r\n\t\t\t\t\t\tif (($this->TS_VCSC_VCFrontEditMode == \"true\") || (is_admin() == false) || ($this->TS_VCSC_PluginAJAX == \"true\") || ($this->TS_VCSC_PluginAlways == \"true\")) {\r\n\t\t\t\t\t\t\trequire_once($this->shortcode_dir.'ts_vcsc_shortcode_' . $element['file'] . '.php');\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t\t// Extended Row + Columns + Iconicum\r\n\t\t\t\tif (($this->TS_VCSC_VCFrontEditMode == \"true\") || (is_admin() == false) || ($this->TS_VCSC_PluginAJAX == \"true\") || ($this->TS_VCSC_PluginAlways == \"true\")) {\r\n\t\t\t\t\t// Extended Row Settings\r\n\t\t\t\t\tif ($this->TS_VCSC_UseExtendedRows == \"true\") {\r\n\t\t\t\t\t\trequire_once($this->shortcode_dir . 'ts_vcsc_shortcode_row.php');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Extended Column Settings\r\n\t\t\t\t\tif ($this->TS_VCSC_UseExtendedColumns == \"true\") {\r\n\t\t\t\t\t\trequire_once($this->shortcode_dir . 'ts_vcsc_shortcode_column.php');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// bbPress Elements\r\n\t\t\t\tif ($this->TS_VCSC_bbPressActive == \"true\") {\r\n\t\t\t\t\t// Shortcodes Defined by bbPress itself\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "function shortcodes_enqueue() {\n\t\twp_enqueue_script('flavour_shortcodes', get_template_directory_uri().'/Flavour/shortcodes.js');\n\t\twp_enqueue_style('flavour_shortcodes', get_template_directory_uri().'/Flavour/shortcodes.css');\n\t}", "public function addShortcode()\n {\n WPShortcode::addShortCode('acoBolsista', $this->todo->getController('indicacao'), 'acoBolsistaShortcode');\n WPShortcode::addShortCode('acoVoluntario', $this->todo->getController('indicacao'), 'acoVoluntarioShortcode');\n WPShortcode::addShortCode('acoColaborador', $this->todo->getController('indicacao'), 'acoColaboradorShortcode');\n WPShortcode::addShortCode('pibexBolsista', $this->todo->getController('indicacao'), 'pibexBolsistaShortcode');\n WPShortcode::addShortCode('pibexVoluntario', $this->todo->getController('indicacao'), 'pibexVoluntarioShortcode');\n WPShortcode::addShortCode('pibexColaborador', $this->todo->getController('indicacao'), 'pibexColaboradorShortcode');\n }", "function initialize_shortcode() {\n\tif ( ! ( shortcode_exists( shortcode_slug ) ) ) {\n\t\tadd_shortcode( shortcode_slug, __NAMESPACE__ . '\\\\replacement' );\n\t}\n}", "public function register()\n {\n foreach ($this->shortcodes as $shortcode) {\n $this->registerInWordpress($shortcode);\n }\n }", "function register_shortcode ( $shortcode_name, $fn, $aliases = [] ) {\n // Register the shortcode if it doesn't exist\n if ( !shortcode_exists( $shortcode_name ) ) {\n add_shortcode( $shortcode_name, $fn );\n }\n\n // Register aliases\n foreach ( $aliases as $alias ) {\n register_shortcode( $alias, $fn ); // Yup, recursive\n }\n}", "public function register_shortcode_ui() {\n\t\tshortcode_ui_register_for_shortcode( 'hippomundo_results', array(\n\t\t\t'label' => __( 'Hippomundo Results', 'hippomundo' ),\n\t\t\t'listItemImage' => 'dashicons-clipboard',\n\t\t\t'attrs' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'API Key', 'hippomundo' ),\n\t\t\t\t\t'description' => __( 'Your API token, received from Hippomundo personnel.', 'hippomundo' ),\n\t\t\t\t\t'attr' => 'api_key',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'placeholder' => get_option( 'hippomundo_api_key' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Studbook', 'hippomundo' ),\n\t\t\t\t\t'description' => __( 'The abbreviated name of your studbook. Your API token will be checked against for permissions on this studbook.', 'hippomundo' ),\n\t\t\t\t\t'attr' => 'Studbook',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'placeholder' => get_option( 'hippomundo_studbook' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Title', 'hippomundo' ),\n\t\t\t\t\t'description' => __( 'Title displayed above the results. Available tags: <code>{days}</code>, <code>{place}</code>.', 'hippomundo' ),\n\t\t\t\t\t'attr' => 'title',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'placeholder' => get_option( 'hippomundo_title' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Subtitle', 'hippomundo' ),\n\t\t\t\t\t'description' => __( 'Subtitle displayed above the results. Available tags: <code>{days}</code>, <code>{place}</code>.', 'hippomundo' ),\n\t\t\t\t\t'attr' => 'subtitle',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'placeholder' => get_option( 'hippomundo_subtitle' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Days', 'hippomundo' ),\n\t\t\t\t\t'description' => __( 'Amount of days of sport results to fetch.', 'hippomundo' ),\n\t\t\t\t\t'attr' => 'days',\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'placeholder' => 10,\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => __( 'Discipline', 'hippomundo' ),\n\t\t\t\t\t'description' => __( 'The discipline of the results to fetch (all, jumping, eventing, dressage).', 'hippomundo' ),\n\t\t\t\t\t'attr' => 'discipline',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'placeholder' => 'all'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t) );\n\t}", "function twd_register_widgets() {\r\n\r\n\t$widgets = array(\r\n\r\n\t\t'shortcode'\r\n\r\n\t);\r\n\r\n\tforeach ( $widgets as $widget ) {\r\n\r\n\t\trequire_once get_template_directory() . '/includes/widgets/widget-' . $widget . '.php';\r\n\r\n\t}\r\n\r\n\t register_widget( 'paste_shortcode_widget' );\r\n\r\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 }", "public function register_shortcode() {\n add_shortcode( 'reveal', array( &$this, 'do_shortcode' ) );\n }", "function wpestate_shortcodes(){\n wpestate_register_shortcodes();\n wpestate_tiny_short_codes_register();\n add_filter('widget_text', 'do_shortcode');\n}", "public static function shortcodeUI()\n\t{\n\t\t// Shortcake required\n\t\tif ( ! function_exists( 'shortcode_ui_register_for_shortcode' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// id only\n\t\t// avoids an unchecked Shortcake input checkbox requiring a shortcode output\n\t\tshortcode_ui_register_for_shortcode(\n\t\t\tself::SHORTCODE_TAG,\n\t\t\tarray(\n\t\t\t\t'label' => esc_html( static::featureName() ),\n\t\t\t\t'listItemImage' => 'dashicons-twitter',\n\t\t\t\t'attrs' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'attr' => 'id',\n\t\t\t\t\t\t'label' => 'ID',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'pattern' => '[0-9]+',\n\t\t\t\t\t\t\t'placeholder' => '560070183650213889',\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\t}", "function register_my_custom_shortcode( $shortcodes ) {\n\t// Add new shortcode\n\t$shortcodes['heading2'] = array(\n\t\t// Shortcode name\n\t\t'name' => __( 'Heading 2', 'textdomain' ),\n\t\t// Shortcode type. Can be 'wrap' or 'single'\n\t\t// Example: [b]this is wrapped[/b], [this_is_single]\n\t\t'type' => 'wrap',\n\t\t// Shortcode group.\n\t\t// Can be 'content', 'box', 'media' or 'other'.\n\t\t// Groups can be mixed, for example 'content box'\n\t\t'group' => 'content',\n\t\t// List of shortcode params (attributes)\n\t\t'atts' => array(\n\t\t\t// Style attribute\n\t\t\t'style' => array(\n\t\t\t\t// Attribute type.\n\t\t\t\t// Can be 'select', 'color', 'bool' or 'text'\n\t\t\t\t'type' => 'select',\n\t\t\t\t// Available values\n\t\t\t\t'values' => array(\n\t\t\t\t\t'default' => __( 'Default', 'textdomain' ),\n\t\t\t\t\t'small' => __( 'Small', 'textdomain' )\n\t\t\t\t),\n\t\t\t\t// Default value\n\t\t\t\t'default' => 'default',\n\t\t\t\t// Attribute name\n\t\t\t\t'name' => __( 'Style', 'textdomain' ),\n\t\t\t\t// Attribute description\n\t\t\t\t'desc' => __( 'Heading 2 style', 'textdomain' )\n\t\t\t)\n\t\t),\n\t\t// Default content for generator (for wrap-type shortcodes)\n\t\t'content' => __( 'Heading 2 text', 'textdomain' ),\n\t\t// Shortcode description for cheatsheet and generator\n\t\t'desc' => __( 'Styled heading 2', 'textdomain' ),\n\t\t// Custom icon (font-awesome)\n\t\t'icon' => 'plus',\n\t\t// Name of custom shortcode function\n\t\t// IMPORTANT: this is the name of the next function\n\t\t'function' => 'my_custom_shortcode',\n\t);\n\t// Return modified data\n\treturn $shortcodes;\n}", "function shortcodes_ultimate() {\n\treturn true;\n}", "public function create_shortcodes() {\n \n }", "public function register_shortcodes(){\n\t\tadd_shortcode('upcoming_post_preview', array($this,'shortcode_display'));\n\t}", "function admin_shortcodes_page(){\n add_menu_page( \n __( 'Theme Short Codes', 'textdomain' ),\n 'Short Codes',\n 'manage_options',\n 'shortcodes',\n 'shortcodes_page',\n 'dashicons-book-alt',\n 3\n ); \n}", "function pgm_register_shortcodes(){\n add_shortcode('pgm_form','pgm_form_shortcode');\n}", "public function registerInWordpress(Shortcode $shortcode)\n {\n add_shortcode($shortcode->code, [$this, 'render']);\n }", "function uvasomcme_register_shortcodes(){\n add_shortcode( 'uvasomcmecourselist', 'uvasomcmecourses_do_loop' );\n add_shortcode('uvasomcmecourse','uvasomcmecourse_single');\n}", "private function register_hooks()\n {\n // Conditional\n add_shortcode('dr_conditional_devices', array($this, 'diviroids_conditional_devices'));\n add_shortcode('dr_conditional_roles', array($this, 'diviroids_conditional_roles'));\n\n // Add the menu/links shortcodes\n add_shortcode('dr_menu', array($this, 'diviroids_menu'));\n add_shortcode('dr_permalink', array($this, 'diviroids_permalink'));\n\n // Add the module shortcodes\n add_shortcode('dr_module', array($this, 'diviroids_module'));\n\n // Add the user shortcodes\n add_shortcode('dr_user_login', array($this, 'diviroids_user_login'));\n add_shortcode('dr_user_id', array($this, 'diviroids_user_id'));\n add_shortcode('dr_user_email', array($this, 'diviroids_user_email'));\n add_shortcode('dr_user_level', array($this, 'diviroids_user_level'));\n add_shortcode('dr_user_firstname', array($this, 'diviroids_user_firstname'));\n add_shortcode('dr_user_lastname', array($this, 'diviroids_user_lastname'));\n add_shortcode('dr_user_displayname', array($this, 'diviroids_user_displayname'));\n add_shortcode('dr_user_roles', array($this, 'diviroids_user_roles'));\n add_shortcode('dr_user_bio', array($this, 'diviroids_user_bio'));\n add_shortcode('dr_user_avatar', array($this, 'diviroids_user_avatar'));\n }", "public function Load_Shortcodes() {\r\n $contexts = $this->contexts;\r\n // If no contexts were returned\r\n if (!$contexts || !is_array($contexts)) { return; }\r\n // Loop through each of the found contexts\r\n foreach ($contexts as $_type => $_context) { \r\n // Add the render function\r\n add_shortcode($_type, array($this,'Render_Shortcode'));\r\n }\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_shortcode_init',$this);\r\n }", "function utcw_init() {\n\twp_enqueue_script('utcw-js');\n\twp_enqueue_style('utcw-css');\n\t\n\tadd_shortcode('utcw', 'do_utcw_shortcode');\n}", "public static function init()\n\t{\n\t\t$classname = get_called_class();\n\n\t\tadd_shortcode( static::SHORTCODE_TAG, array( $classname, 'shortcodeHandler' ) );\n\n\t\t// convert a URL into the shortcode equivalent\n\t\twp_embed_register_handler(\n\t\t\tstatic::SHORTCODE_TAG,\n\t\t\tstatic::URL_REGEX,\n\t\t\tarray( $classname, 'linkHandler' ),\n\t\t\t1\n\t\t);\n\n\t\t// Shortcode UI, if supported\n\t\tadd_action(\n\t\t\t'register_shortcode_ui',\n\t\t\tarray( $classname, 'shortcodeUI' ),\n\t\t\t5,\n\t\t\t0\n\t\t);\n\t}", "function montheme_register_assets()\n{\n\t//enregistre le style et le script\n\twp_register_style('bootstrap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css');\n\twp_register_style('style-css', get_stylesheet_uri());\n\twp_register_script('bootstrap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js', [], false, true); //[] =pas de dependance, false = pas de numero de version et true = script chargé dans le footer\n\t//permet d'utiliser le style et le script\n\twp_enqueue_style('bootstrap');\n\twp_enqueue_style('style-css');\n\twp_enqueue_script('bootstrap');\n}", "private function add_short_code($short_code)\n\t{\n\t\tarray_push($this->shortcodes, $short_code);\n\t}" ]
[ "0.6750078", "0.6704431", "0.6597113", "0.658506", "0.6479715", "0.64111596", "0.6391342", "0.6358114", "0.6242137", "0.62169844", "0.6155596", "0.60888356", "0.60664046", "0.6013778", "0.5989631", "0.596018", "0.5953796", "0.59449446", "0.5912664", "0.59015334", "0.58883536", "0.58872557", "0.5881829", "0.5868937", "0.58661395", "0.5860723", "0.5850167", "0.5847462", "0.5832372", "0.58230686" ]
0.7469642
0
Returns the mood for the current post. The mood is set by the 'mood' custom field.
function unique_entry_mood_shortcode( $attr ) { $attr = shortcode_atts( array( 'before' => '', 'after' => '' ), $attr ); $mood = get_post_meta( get_the_ID(), 'mood', true ); if ( !empty( $mood ) ) $mood = $attr['before'] . convert_smilies( $mood ) . $attr['after']; return $mood; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMoodAction(){\n $data = $this->getRequestData();\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n $moodArr = $user->getMoodmeter();\n if(isset($moodArr[0])){\n unset($moodArr[0]);\n }\n if(isset($data['date'])){\n foreach($moodArr as $mood){\n if($mood[0] == $data['date']){\n $this->_helper->json($mood);\n } else {\n $this->setErrorResponse('No mood for this day!');\n }\n }\n }\n $this->_helper->json($moodArr);\n }", "public function getModerate()\n {\n return $this->moderate;\n }", "public function reportMoodAction(){\n /** @var Object_User $user */\n $data = $this->getRequestData();\n if(isset($data['mood']) && in_array($data['mood'], range(1,3))){\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n $moodArr = $user->getMoodmeter()?$user->getMoodmeter():array(array('Date', 'Text', 'Mood'));\n $mood = array();\n $mood[] = date('Y-m-d');\n $mood[] = isset($data['text'])?$data['text']:\"\";\n $mood[] = $data['mood'];\n $moodArr[] = $mood;\n $user->setMoodmeter($moodArr);\n if(!$user->save()){\n $this->setErrorResponse('Cannot update User object');\n }\n } else {\n $this->setErrorResponse('Please, report your mood. mood is mandatory field! Mood should be between 1 and 3');\n }\n\n $this->_helper->json(array('added' => true));\n }", "public function status() { return $this->post->post_status; }", "public function getMedida() {\n return $this->iMedida;\n }", "public function getRating(){\n return $this->film['rating'];\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 getMuscle() {\n return $this->_muscle;\n }", "public function moodDetection($data) {\n $parameters=array(\n 'data'=>$data \n );\n $content = json_encode($parameters);\n \n $jsonreply=$this->CallWebService('getMood',$content);\n \n return $this->ParseReply($jsonreply);\n }", "public function get_value($post){\n $post = get_post($post);\n return $post && !is_wp_error($post) && metadata_exists('post', $post->ID, $this->meta_id) ? get_post_meta( $post->ID, $this->meta_id, true ) : null;\n }", "public function get_post() {\n\n return $this->_post;\n }", "public function the_post() {\r\n\t\treturn $this->query->the_post();\r\n\t}", "public function sense()\n {\n if (!$this->sense) {\n $this->sense = monsterToSense::select('sense', 'distance')->where('mid', '=', $this->id)->get();\n }\n return $this->sense;\n }", "public function getStatus(){\n return $this->film['status'];\n }", "public function getPost()\n {\n return $this->post;\n }", "protected function get_current_mediatype(): string {\n $mediatype = $this->optional_param('mediatype', '', PARAM_ALPHA);\n if ($mediatype) {\n // Form has been submitted, but it being re-displayed.\n return $mediatype;\n }\n if (isset($this->question->id)) {\n // Form is being loaded to edit an existing question.\n return $this->question->options->mediatype;\n }\n // Creating new question.\n // The next line needs to match the default below.\n return $this->get_default_value('mediatype', qtype_recordrtc::MEDIA_TYPE_AUDIO);\n }", "public function getRepriseMotifMed() {\n return $this->repriseMotifMed;\n }", "public function type() { return $this->post->post_type; }", "public function get_medico()\n {\n \n // loads the associated object\n if (empty($this->medico))\n $this->medico = new Medicos($this->medico_id);\n \n // returns the associated object\n return $this->medico;\n }", "public function getMotives()\n {\n return $this->motives;\n }", "public function status(): string\n {\n return $this->wpPost->post_status;\n }", "public function getDefense()\n {\n return $this->defense;\n }", "function get_post_status($post = \\null)\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 getPosted()\n {\n return $this->posted;\n }", "public function for_post( $id ) {\n\t\t$indexable = $this->repository->find_by_id_and_type( $id, 'post' );\n\n\t\tif ( ! $indexable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->build_meta( $this->context_memoizer->get( $indexable, 'Post_Type' ) );\n\t}", "public function getQuestWord()\n {\n return $this->quest;\n }", "public static function get_post_type(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_post_type();\n }", "public function reading() {\n\n\t\t\t$reading = get_post_meta($this->post->ID, 'reading_time', true);\n\t\t\t\n\t\t\tif (is_array($reading) && isset($reading['time'])) {\n\n\t\t\t\t// if the post have the reading time saved, let's grab it\n\n\t\t\t\t$output = $reading['time'];\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t// if the post do not have the reading time, let's generate it and save it\n\n\t\t\t\t$post = get_post();\n\n\t\t\t\t$words = str_word_count(strip_tags($post->post_content));\n\t\t\t\t$minutes = floor($words / 120);\n\t\t\t\t$seconds = floor($words % 120 / (120 / 60));\n\n\t\t\t\tif ( 1 <= $minutes ) {\n\t\t\t\t\t\n\t\t\t\t\t$time = $minutes.' '.__('min.', 'theme translation');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\t$time = $seconds.' '.__('sec.', 'theme translation');\n\t\t\t\t}\n\n\t\t\t\tupdate_post_meta($this->post->ID, 'reading_time', array('words' => $words, 'time' => $time));\n\n\t\t\t\t$output = $time;\n\t\t\t}\n\n\t\t\treturn $output;\n\t\t}", "function dokan_get_post_status( $status ) {\n switch ($status) {\n case 'publish':\n return __( 'Online', 'dokan' );\n break;\n\n case 'draft':\n return __( 'Draft', 'dokan' );\n break;\n\n case 'pending':\n return __( 'Pending Review', 'dokan' );\n break;\n\n case 'future':\n return __( 'Scheduled', 'dokan' );\n break;\n\n default:\n return '';\n break;\n }\n}" ]
[ "0.57317114", "0.51946044", "0.4998734", "0.4990823", "0.48515046", "0.47783074", "0.47092134", "0.46953878", "0.46808222", "0.46786553", "0.46720135", "0.4650968", "0.463472", "0.46300516", "0.4624986", "0.4621522", "0.46133846", "0.45868948", "0.4567402", "0.4555781", "0.45324188", "0.45274773", "0.45269603", "0.45204413", "0.45124573", "0.45067", "0.45054772", "0.4495398", "0.44917777", "0.44879752" ]
0.53300464
1
Outputs the result message
function outputResultMessage() { global $application; if (!is_array($this -> _Errors) && $this -> _Errors != 'Success') return ''; $template_contents = array( 'ResultMessage' => (($this -> _Errors == 'Success') ? getMsg('CTL', 'CTL_PGE_MSG_SUCCESS') : getMsg('CTL', 'CTL_PGE_MSG_ERROR')), 'ResultMessageColor' => (($this -> _Errors == 'Success') ? 'green' : 'red') ); $this -> _Template_Contents = $template_contents; $application -> registerAttributes($this -> _Template_Contents); return $this -> mTmplFiller -> fill( 'catalog/product_group_edit/', 'result-message.tpl.html', array() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function printResult() {\n $this->result->path = $this->getType() . 's/' . $this->getName() . '#tmp';\n\n // text/plain is used to support IE\n header('Cache-Control: no-cache');\n header('Content-Type: text/plain; charset=utf-8');\n\n print $this->getResult();\n }", "public function execute() {\n\t\t$data = $this->getResultData();\n\t\t$this->printText($data[0]);\n\t}", "public function printResults() {\n $assertions = $this->getAssertions();\n $failures = $this->getFailures();\n $errors = $this->getErrors();\n return \"Assertions: \" . $assertions . \", Failures: \" . $failures . \" and \" . $errors . \" errors.\";\n }", "public function sendResult()\n\t{\n\t\theader('Content-Type: application/json');\n\t\tif ($this->responseDataType == 'json') {\n\t\t\techo json_encode($this->emojiArray);\n\t\t} else {\n\t\t\techo \"{$this->responseCallback}(\" . json_encode($this->emojiArray) . ')';\n\t\t}\n\t\texit;\n\t}", "protected function outOK()\n\t{\n\t\treturn $this->out('<ok>ok</ok>');\n\t}", "public function getResultMessage() {}", "public static function output() {}", "public function showResults()\n {\n $tracker = Tracker::getInstance();\n\n $tracker->outputStats();\n if (count($tracker->getFailures())) {\n $tracker->output(\"\\nFAILURES\\n\", null, null, true);\n $tracker->outputFailures();\n }\n\n if (count($tracker->getErrors())) {\n $tracker->output(\"\\nERRORS\\n\");\n $tracker->outputErrors();\n }\n\n $tracker->output(\"\\n\");\n\n if (count($tracker->getFailures())) {\n return;\n }\n\n if ($this->coverageDirectory()) {\n $tracker->output('Generating coverage report as html...' . \"\\n\");\n $this->_generateCoverageHtml();\n return $tracker->output('Done' . \"\\n\");\n }\n\n if ($this->showCoverage()) {\n $this->_generateCoverageCommandLine();\n return;\n }\n }", "public function output() {}", "public function output();", "public function output();", "public function output();", "public function output();", "public function output();", "public static function output()\n {\n return self::display(Message_Core::DEFAULT_VIEW); \n }", "protected function addResultMessage() {\n\t\tif ($this->amountOfMigratedRecords > 0) {\n\t\t\t$headline = LocalizationUtility::translate('migrationSuccessful', 'dam_falmigration');\n\t\t\t$message = LocalizationUtility::translate('migratedFiles', 'dam_falmigration', array(0 => $this->amountOfMigratedRecords));\n\t\t} else {\n\t\t\t$headline = LocalizationUtility::translate('migrationNotNecessary', 'dam_falmigration');;\n\t\t\t$message = LocalizationUtility::translate('allFilesMigrated', 'dam_falmigration');\n\t\t}\n\n\t\t$messageObject = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Messaging\\\\FlashMessage', $message, $headline);\n\t\t// addMessage is a magic method realized by __call()\n\t\tFlashMessageQueue::addMessage($messageObject);\n\t}", "public function outputResult(){\n\n\t\t$totalRed = $this->totalSummaryItem[\"red\"];\n\t\t$totalBlue = $this->totalSummaryItem[\"blue\"];\n\t\t$totalCount = $this->totalSummaryItem[\"count\"];\n\n\t\t//echo \"Total Count: \". $totalCount;\n\n\t\t// Run a calculation over the averages. Basically, what's the total averages here.\n\t\t$averageRed = 0;\n\t\t$averageBlue = 0;\n\n\t\tif ($totalRed > 0 && $totalCount > 0){\n\t\t\t# Average and round the number nicely\n\t\t\t$averageRed = round($totalRed / $totalCount );\n\t\t}\n\n\t\tif ($totalBlue > 0 && $totalCount > 0){\n\t\t\t# Average and round the number nicely\n\t\t\t$averageBlue = round($totalBlue / $totalCount );\n\t\t}\n\n\t\t$averageArray = array(\"averageRed\"=>$averageRed,\"averageBlue\"=>$averageBlue);\n\n\t\t// Format the response nicely into an output\n\t\treturn array(\"details\"=>$this->resultSummaryData,\"summary\"=>$this->totalSummaryItem,\"average\"=>$averageArray);\n\t}", "public function printSuccessMessage()\n {\n printf('Successfully checked %d lines in %d files :)'. PHP_EOL, $this->lines, $this->files);\n }", "public function print_result(){\n $parsed_result = (array) $this->get_result()->parse_result();\n foreach($parsed_result['items'] as $repository_detail){\n $out .= $repository_detail->full_name.': '.$repository_detail->description.'<br />';\n }\n echo $out;\n }", "public function outputResults()\r\n {\r\n // loop all products and display results per product\r\n foreach ($this->Products->getAllProducts() as $productId => $productName) {\r\n echo \"Product ID: \" . $productId . \"\\n\";\r\n echo \"Product Name: \" . $productName . \"\\n\";\r\n echo \"Total Units Sold: \" . $this->ProductsSold->getSoldTotal($productId) . \"\\n\";\r\n echo \"Total Units Purchased and Pending: \" . $this->ProductsPurchased->getPurchasedPendingTotal($productId) . \"\\n\";\r\n echo \"Total Units Purchased and Received: \" . $this->ProductsPurchased->getPurchasedReceivedTotal($productId) . \"\\n\";\r\n echo \"Current Stock Level: \" . $this->Inventory->getStockLevel($productId) . \"\\n\\n\";\r\n }\r\n }", "function output() {\n \n }", "public function output() {\n }", "abstract function printOutput()", "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n global $textTpl;\n if (!empty($postStr))\n {\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $type = $postObj->MsgType;\n\n switch ($type)\n {\n case \"event\":\n $resultStr = GetEventMessage($postObj);\n break;\n case \"location\":\n $resultStr = GetLocationMessage($postObj);\n break;\n case \"text\":\n $resultStr = GetTextMessage($postObj);\n break;\n default:\n $resultStr = GetTextMessage($postObj);\n //$resultStr = GetDefaultMessage($postObj);\n break;\n }\n\n RecordInputContent($postObj); //保存用户输入的所有内容\n RefleshUserLoginTime($postObj); // 更新用户登录的最新时间\n\n echo $resultStr;\n }\n else\n {\n echo \"\";\n exit;\n }\n }", "abstract public function output($result,$params=array());", "public function renderResult() {\n\t\t$this->formulaParser->setFormula($this->formula);\n\t\tforeach ($this->parameters as $key => $param) {\n\t\t\t$value = self::formatParameterValue($_POST['parameters'][$param->attributes->name]);\n\t\t\t$this->formulaParser->setParameter($param->attributes->name,$value);\n\t\t}\n\t\t$result = $this->formulaParser->getResult();\n\t\t$numDecimals = strlen(substr(strrchr($result, \".\"), 1));\n\t\t$fResult = number_format($result, $numDecimals, $this->resultDecimalSep, $this->resultThousandsSep);\n\t\techo $fResult;\n\t\twp_die();\n\t}", "public function getResultMessage()\n\t{\n\t\t// TODO: Implement getResultMessage() method.\n\t\t$message = array();\n\n\t\t$message[] = '';\n\t\t$message[] = 'Wordpress has been installed succesfully.';\n\t\t$message[] = '';\n\t\t$message[] = 'Credentials:';\n\t\t$message[] = 'Admin user : ' . $this->config->get('admin_user');\n\t\t$message[] = 'Admin password : ' . $this->config->get('admin_password');\n\t\t$message[] = '';\n\n\t\treturn $message;\n\t}", "public function showTestResults() {\n echo \"Tests: {$this->tests}\\n\";\n echo \"Pass: {$this->pass}\\n\";\n echo \"Fail: {$this->fail}\\n\";\n }", "protected function _showFinalMessages()\n {\n if ($this->_errors) {\n $this->_output->writeln(\n \"<fg=red>There was some errors on setting configuration: \\n{$this->_errors}</fg=red>\"\n );\n }\n\n if ($this->_warnings) {\n $this->_output->writeln(\n \"<comment>There was some warnings on setting configuration: \\n{$this->_warnings}</comment>\"\n );\n }\n\n if ($this->_configurationCounter > 0) {\n $this->_output->writeln(\n \"<info>Configuration has been applied</info>\"\n );\n\n $this->_output->writeln(\n \"<info>Total changed configurations: {$this->_configurationCounter}</info>\"\n );\n } else {\n $this->_output->writeln(\n \"<error>There was no configuration applied.</error>\"\n );\n }\n }", "public function get_output()\n {\n }" ]
[ "0.710279", "0.6851841", "0.6701738", "0.66912717", "0.6670904", "0.66609025", "0.66597205", "0.6645348", "0.661057", "0.6569985", "0.6569985", "0.6569985", "0.6569985", "0.6569985", "0.6563406", "0.64988124", "0.6444088", "0.64242", "0.641651", "0.6391485", "0.6374949", "0.6343853", "0.6259782", "0.62383676", "0.6231828", "0.6223927", "0.62069476", "0.619542", "0.618737", "0.61618555" ]
0.74765766
0
Outputs reload parent js code if needed
function outputReloadParentCode() { global $application; if ($this -> _ReloadParentWindow != 1) return ''; return $this -> mTmplFiller -> fill( 'catalog/product_group_edit/', 'reload-parent-js.tpl.html', array() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function override()\n {\n $js_file_path = $this->getUrl('js/script.js'); //Override js file\n $survey_link = $this->getSurveyLink(); //URI to redirect to\n $finance_data = $this->fetchCostData();\n\n print \"<div id='redirect-uri' class='hidden' redirect-uri=$survey_link ></div>\";\n print \"<script type='text/javascript'>var data1 = $finance_data;</script>\";\n print \"<script type='module' src=$js_file_path></script>\";\n }", "function fresh_text_add_js()\n\t{\n\t\techo '<script>';\n\t\techo require_once 'replacement.php';\n\t\techo '</script>';\n\t}", "function dumpForAjax()\r\n {\r\n $this->updateControl();\r\n $this->commonScript();\r\n }", "protected function generateJavascript() {}", "protected function generateJavascript() {}", "function update($parent) \n {\n echo '<div class=\"alert alert-info\">';\n echo ' <p>' . JText::_('COM_ACTIVATEGRID_UPDATE_TEXT').' to the version: '.$parent->get('manifest')->version. '</p>';\n echo '</div>';\n }", "public function printRefreshScript()\n {\n if (isset($_GET['post']) && is_numeric($_GET['post']) && isset($_GET['action']) && $_GET['action'] == \"edit\") {\n\n //Store post id to var\n $post_id = $_GET['post'];\n\n //Check if is published && url is valid\n if (get_post_status($post_id) == 'publish') {\n $url = get_permalink($post_id);\n\n if (!filter_var($url, FILTER_VALIDATE_URL) === false) {\n if (function_exists('curl_init')) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);\n curl_setopt($ch, CURLOPT_TIMEOUT_MS, 10);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_exec($ch);\n curl_close($ch);\n echo '<!-- Cache redone for ' . $url . ' -->';\n }\n }\n }\n }\n }", "function render_chat_refresh($not_mini=null){\n $location = \"mini_chat.php\";\n $frame = 'mini_chat';\n if($not_mini){\n $location = \"village.php\";\n $frame = 'main';\n }\n ob_start();\n ?>\n\n <script type=\"text/javascript\">\n function refreshpage<?php echo $frame; ?>(){\n parent.<?php echo $frame; ?>.location=\"<?php echo $location; ?>\";\n }\n setInterval(\"refreshpage<?php echo $frame; ?>()\",300*1000);\n </script>\n <?php\n $res = ob_get_contents();\n ob_end_clean();\n return $res;\n}", "protected function generateJavascript()\n\t{\n\t}", "public function script() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t$page = pzk_page();\r\n\t\t\tif ($page) {\r\n\t\t\t\t$page->addJsInst($this->toArray());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function admin_index_print_footer_scripts() {\n\t\tif (time() < UpdraftPlus_Options::get_updraft_option('dismissed_clone_php_notices_until', 0)) return;\n\t\t?>\n\t\t<script>\n\t\t\tjQuery(function($) {\n\t\t\t\tif ($('#dashboard-widgets #dashboard_php_nag').length < 1) return;\n\t\t\t\t$('#dashboard-widgets #dashboard_php_nag .button-container').before('<div class=\"updraft-ad-container\"><a href=\"<?php echo UpdraftPlus_Options::admin_page_url(); ?>?page=updraftplus&amp;tab=migrate#updraft-navtab-migrate-content\"><?php echo esc_js(__('You can test running your site on a different PHP (or WordPress) version using UpdraftClone credits.', 'updraftplus')); ?></a> (<a href=\"#\" onclick=\"jQuery(\\'.updraft-ad-container\\').slideUp(); jQuery.post(ajaxurl, {action: \\'updraft_ajax\\', subaction: \\'dismiss_clone_php_notice\\', nonce: \\'<?php echo wp_create_nonce('updraftplus-credentialtest-nonce'); ?>\\' });return false;\"><?php echo esc_js(__('Dismiss notice', 'updraftplus')); ?></a>)</div>');\n\t\t\t});\n\t\t</script>\n\t\t<?php\n\t}", "private function _inline_js() \n\t{\t\n\t\t// Are there any scripts to include? \n\t\tif (count($this->inline_scripts) == 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Create our shell opening\n\t\techo '<script type=\"text/javascript\">' . \"\\n\";\n\t\techo $this->ci->config->item('inline_js_opener') .\"\\n\\n\";\n\t\t\n\t\t// Loop through all available scripts\n\t\t// inserting them inside the shell.\n\t\tforeach($this->inline_scripts as $script)\n\t\t{\n\t\t\techo $script . \"\\n\";\n\t\t}\n\t\t\n\t\t// Close the shell.\n\t\techo \"\\n\" . $this->ci->config->item('inline_js_closer') . \"\\n\";\n\t\techo '</script>' . \"\\n\";\n\t\t\n\t}", "protected function addReload(&$script)\n {\n parent::addReload($script);\n\n $script = preg_replace(\n '%(?<=// if \\(deep\\))%sim',\n \"\\n\\n\\t\\t\\$this->reloadCalculatedFields();\\n\",\n $script\n );\n }", "public function init()\n{\n//'assets/js/cssrefresh.js'\n// ];\n parent::init();\n}", "protected function script()\n {\n $message = trans('admin.refresh_succeeded');\n\n return <<<EOT\n\n$('.grid-refresh').on('click', function() {\n $.pjax.reload('#pjax-container');\n toastr.success('{$message}');\n});\n\nEOT;\n }", "protected function doConcatenateJavaScript() {}", "function _ext_scripts()\n\t{\n\t\t$str = '';\n\n\t\t/* -------------------------------------------\n\t\t/* 'cp_js_end' hook.\n\t\t/* - Add Javascript into a file call at the end of the control panel\n\t\t/* - Added 2.1.2\n\t\t*/\n\t\t\t$str = $this->extensions->call('cp_js_end');\n\t\t/*\n\t\t/* -------------------------------------------*/\n\n\t\t$this->output->out_type = 'cp_asset';\n\t\t$this->output->set_header(\"Content-Type: text/javascript\");\n\t\t$this->output->set_header(\"Cache-Control: no-cache, must-revalidate\");\n\t\t$this->output->set_header('Content-Length: '.strlen($str));\n\t\t$this->output->set_output($str);\n\t}", "protected function renderAsJavascript() {}", "public function print_scripts() {\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(function ($) {\n\t\t\t\t$('#disable_error_display_frm').submit(function () {\n\t\t\t\t\tvar that = $(this);\n\t\t\t\t\tvar parent = $(this).closest('.wd-hardener-rule');\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\t\tdata: that.serialize(),\n\t\t\t\t\t\tbeforeSend: function () {\n\t\t\t\t\t\t\tthat.find('button').attr('disabled', 'disabled');\n\t\t\t\t\t\t\tthat.find('button').css({\n\t\t\t\t\t\t\t\t'cursor': 'progress'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess: function (data) {\n\t\t\t\t\t\t\tthat.find('button').removeAttr('disabled');\n\t\t\t\t\t\t\tthat.find('button').css({\n\t\t\t\t\t\t\t\t'cursor': 'pointer'\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (data.status == 0) {\n\t\t\t\t\t\t\t\t$('#disable_error_display .wd-error').html(data.error).removeClass('wd-hide');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$('#disable_error_display .wd-error').html('').addClass('wd-hide');\n\t\t\t\t\t\t\t\tthat.closest('div').html(data.message);\n\t\t\t\t\t\t\t\tparent.hide(500, function () {\n\t\t\t\t\t\t\t\t\tvar div = parent.detach();\n\t\t\t\t\t\t\t\t\tdiv.prependTo($('.wd-hardener-success'));\n\t\t\t\t\t\t\t\t\tdiv.find('.rule-title').removeClass('issue').addClass('fixed').find('button').hide();\n\t\t\t\t\t\t\t\t\tdiv.find('i.dashicons-flag').replaceWith($('<i class=\"wdv-icon wdv-icon-fw wdv-icon-ok\"/>'));\n\t\t\t\t\t\t\t\t\tdiv.show(500);\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\treturn false;\n\t\t\t\t})\n\t\t\t})\n\t\t</script>\n\t\t<?php\n\t}", "function _ext_scripts()\r\n\t{\r\n\t\t$str = '';\r\n\r\n\t\t/* -------------------------------------------\r\n\t\t/* 'cp_js_end' hook.\r\n\t\t/* - Add Javascript into a file call at the end of the control panel\r\n\t\t/* - Added 2.1.2\r\n\t\t*/\r\n\t\t\t$str = $this->extensions->call('cp_js_end');\r\n\t\t/*\r\n\t\t/* -------------------------------------------*/\r\n\t\t\r\n\t\t$this->output->out_type = 'cp_asset';\r\n\t\t$this->output->set_header(\"Content-Type: text/javascript\");\r\n\t\t$this->output->set_header(\"Cache-Control: no-cache, must-revalidate\"); \r\n\t\t$this->output->set_header('Content-Length: '.strlen($str));\r\n\t\t$this->output->set_output($str);\r\n\t}", "public function insert_js_code() {\n echo \"\\n<script>\\n\" . $this->getJsCodeToEcho($this->pluginCommon->optGid(), array(\n 'log' => $this->pluginCommon->optUseLogging(),\n 'localserver' => $this->isIgnoredServer(),\n )) . '</script>' . \"\\n\";\n }", "public function sharethis_include_js();", "protected function _content_template_parent() {\n ?>\n <#\n var selector = '<?php echo $this->get_unique_selector(); ?>' + id; \n var css = settings.custom_css;\n #>\n <# if( css.length > 0 ) { #>\n <style scoped>{{ css.replace('[SELECTOR]', selector) }}</style>\n <# } #>\n <?php\n }", "protected function loadJavascript() {}", "public function renderScript()\n {\n }", "function auto_run()\n\t{\n\t\t$this->html = $this->ipsclass->acp_load_template('cp_skin_tools');\n\n\t\tswitch($this->ipsclass->input['code'])\n\t\t{\n\t\t\tcase 'master_xml_export':\n\t\t\t\t$this->master_xml_export();\n\t\t\t\tbreak;\n\n\t\t\tcase 'manage':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );\n\t\t\t\t$this->components_list();\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_add':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );\n\t\t\t\t$this->components_form('add');\n\t\t\t\tbreak;\n\t\t\tcase 'component_add_do':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );\n\t\t\t\t$this->components_save('add');\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_edit':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_form('edit');\n\t\t\t\tbreak;\n\t\t\tcase 'component_edit_do':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_save('edit');\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_delete':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_delete();\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_export':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' );\n\t\t\t\t$this->components_export('single');\n\t\t\t\tbreak;\n\t\t\tcase 'component_import':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' );\n\t\t\t\t$this->components_import();\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_uninstall':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_uninstall();\n\t\t\t\tbreak;\n\n\t\t\tcase 'component_move':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_move();\n\t\t\t\tbreak;\n\t\t\tcase 'component_toggle_enabled':\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );\n\t\t\t\t$this->components_toggle_enabled();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );\n\t\t\t\t$this->components_list();\n\t\t\t\tbreak;\n\t\t}\n\t}", "private function finalizeOutput()\n\t{\n\t\tif ($this->isRedirect === true) {\n\t\t\t// this shouldn't appear, as redirect header would take care of it.\n\t\t\t// in case it's seen, reload link would help user to manually reload/redirect the page.\n\t\t\techo \"<a onclick='location.reload()'>click here to reload the page.</a>\";\n\t\t}\n\t}", "protected function renderMainJavaScriptLibraries() {}", "public function render()\n {\n $this->script = <<<EOT\n\nEOT;\n return parent::render();\n }", "public function includeJS()\r\n\t\t{\r\n\t\t\techo $this->js;\r\n\t\t}" ]
[ "0.67696005", "0.6097358", "0.60453385", "0.5954629", "0.59542966", "0.5831523", "0.58305675", "0.5822325", "0.5815946", "0.5806752", "0.5761933", "0.575633", "0.5750368", "0.5748817", "0.5702869", "0.5696371", "0.56439495", "0.5639237", "0.5634104", "0.5617629", "0.5614638", "0.56011033", "0.55898064", "0.5578098", "0.55765074", "0.5572177", "0.5569001", "0.55683273", "0.5566441", "0.55384254" ]
0.7931202
0
Outputs the update button if the list of products is not empty
function outputUpdateButton() { if (empty($this -> _Prod_IDs)) return ''; return $this -> mTmplFiller -> fill( 'catalog/product_group_edit/', 'update-button.tpl.html', array() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(){\n $this->product->id = $_POST['id'];\n $this->product->name = $_POST['name'];\n $this->product->price = $_POST['price'];\n $this->product->description = $_POST['description'];\n $this->product->category_id = $_POST['category_id'];\n\n\n\n // update the product\n if($this->product->update()){\n header(\"Refresh:2\");\n echo \"<div class=\\\"alert alert-success alert-dismissable\\\">\";\n echo \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\" aria-hidden=\\\"true\\\">&times;</button>\";\n echo \"Product was updated.\";\n echo \"</div>\";\n }\n\n // if unable to update the product, tell the user\n else{\n echo \"<div class=\\\"alert alert-danger alert-dismissable\\\">\";\n echo \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\" aria-hidden=\\\"true\\\">&times;</button>\";\n echo \"Unable to update product.\";\n echo \"</div>\";\n }\n }", "public function updateProducts()\n \t{\n\n \t\t$data = LemonService::updateProducts();\n\n \t\treturn View::make('importstats')->with('data', $data);\n\n \t}", "public function execute()\n {\n $this->getResponse()->setBody($this->_view->getLayout()->createBlock('Unilab\\Afptc\\Block\\Adminhtml\\Afptc\\Edit\\Renderer\\Products')\n ->setCheckedValues((array) $this->getRequest()->getParam('checkedValues', array()))\n ->toHtml()\n );\n }", "private function updateBasket() {\n if (filter_has_var(INPUT_POST, 'update')) {\n if (!$this->_model->isChecked() == true) {\n $this->_model->checkBasket();\n }\n foreach($this->_model->getContents() as $productId => $data) {\n // get the product rows basket ID\n $basketId = $data['basket'];\n if (intval($_POST['qty_' . $basketId]) == 0) {\n $this->_model->removeProduct($basketId);\n } else {\n $this->_model->updateProductQuantity($basketId, intval($_POST['qty_' . $basketId]));\n }\n }\n // redirecting the user to the basket view page, informing that changes have been saved\n $this->_session->flash('message', '<p class=\"stock success\">Your shopping basket has been updated</p>');\n $this->_registry->redirectTo('basket/view');\n }\n }", "function uc_order_edit_products_form($form, &$form_state, $products) {\n if (($product_count = count($products)) > 0) {\n $form['products'] = tapir_get_table('uc_op_products_edit_table');\n for ($i=0, $product = reset($products); $i < $product_count; $i++, $product = next($products)) {\n $form['products'][$i]['remove'] = array(\n '#type' => 'image_button',\n '#title' => t('Remove this product.'),\n '#src' => drupal_get_path('module', 'uc_store') . '/images/error.gif',\n '#button_type' => 'remove',\n '#submit' => array('uc_order_edit_products_remove', 'uc_order_edit_form_submit'),\n '#return_value' => $product->order_product_id,\n );\n $form['products'][$i]['order_product_id'] = array(\n '#type' => 'hidden',\n '#value' => $product->order_product_id,\n );\n $form['products'][$i]['nid'] = array(\n '#type' => 'hidden',\n '#value' => $product->nid,\n );\n\n $form['products'][$i]['model'] = array(\n '#type' => 'textfield',\n '#title' => t('SKU'),\n '#title_display' => 'invisible',\n '#default_value' => $product->model,\n '#size' => 6,\n );\n \n $form['products'][$i]['title'] = array(\n '#type' => 'textfield',\n '#title' => t('Title'),\n '#title_display' => 'invisible',\n '#default_value' => $product->title,\n '#size' => 30,\n '#maxlength' => 255,\n );\n \n $form['products'][$i]['qty'] = array(\n '#type' => 'uc_quantity',\n '#title' => theme('uc_qty_label'),\n '#title_display' => 'invisible',\n '#default_value' => $product->qty,\n );\n\n\n $form['products'][$i]['weight'] = array(\n '#type' => 'textfield',\n '#title' => t('Weight'),\n '#title_display' => 'invisible',\n '#default_value' => $product->weight,\n '#size' => 3,\n );\n $units = array(\n 'lb' => t('Pounds'),\n 'kg' => t('Kilograms'),\n 'oz' => t('Ounces'),\n 'g' => t('Grams'),\n );\n $form['products'][$i]['weight_units'] = array(\n '#type' => 'select',\n '#title' => t('Units'),\n '#title_display' => 'invisible',\n '#default_value' => $product->weight_units,\n '#options' => $units,\n );\n $form['products'][$i]['cost'] = array(\n '#type' => 'uc_price',\n '#title' => t('Cost'),\n '#title_display' => 'invisible',\n '#default_value' => $product->cost,\n '#size' => 5,\n );\n $form['products'][$i]['price'] = array(\n '#type' => 'uc_price',\n '#title' => t('Price'),\n '#title_display' => 'invisible',\n '#default_value' => $product->price,\n '#size' => 5,\n );\n \n $form['products'][$i]['vat_rate'] = array(\n '#type' => 'uc_vat_rate',\n '#title' => t('VAT rate'),\n '#title_display' => 'invisible',\n '#default_value' => $product->vat_rate,\n '#size' => 6,\n ); \n \n $form['products'][$i]['data'] = array(\n '#type' => 'hidden',\n '#value' => serialize($product->data),\n );\n }\n }\n else {\n $form['products'] = array(\n '#markup' => t('This order contains no products.'),\n '#prefix' => '<div id=\"order-edit-products\">',\n '#suffix' => '</div>',\n );\n }\n\n return $form;\n}", "public function showProductButton() {\n\n\t\techo $this->getProductButton();\n\t}", "function showProducts($products){\r\n require_once 'templates/header.php';\r\n echo '\r\n <h1>BIENVENIDOS A ZAPATILLERIA ONLINE</h1>\r\n \r\n <h2>PRODUCTOS</h2>\r\n \r\n <form action=\"\">\r\n \r\n </form>\r\n\r\n ';\r\n \r\n echo \"<ul class='list-group list-group-flush mt-5'>\";\r\n foreach($products as $product){\r\n echo \"<li class='list-group-item'>\r\n <li><a href=verProducto/$product->id>$product->marca</a></li> <p>$product->talle</p> <p>$product->color</p>\r\n <a class='btn btn-warning btn-sm' href='editarProducto/$product->id'>EDITAR</a>\r\n <a class='btn btn-danger btn-sm' href='eliminarProducto/$product->id'>ELIMINAR</a>\r\n </li>\"; \r\n }\r\n echo \"</ul>\";\r\n\r\n require_once 'templates/select_products.php';\r\n\r\n require_once 'templates/form_products.php';\r\n\r\n require_once 'templates/footer.php';\r\n }", "public function product_update_post()\n\t\t\t\t{\n\t\t\t\t}", "public function manageProducts()\r\n {\r\n $multi_submit = $this->getRequest()->getPost('multi_submit');\r\n $entityIds = $this->getRequest()->getParam('id');\r\n $delete = $this->getRequest()->getPost('multi');\r\n /**\r\n * Check if submit buttom submitted.\r\n */\r\n if ($multi_submit) {\r\n if (count($entityIds) > 0 && $delete == 'delete') {\r\n foreach ($entityIds as $entityIdData) {\r\n Mage::register('isSecureArea', true);\r\n Mage::helper('marketplace/marketplace')->deleteProduct($entityIdData);\r\n $this->getRequest()->setPost('id', null);\r\n Mage::unregister('isSecureArea');\r\n }\r\n Mage::getSingleton('core/session')->addSuccess($this->__(\"selected Products are Deleted Successfully\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n\r\n\r\n }\r\n\r\n /*----------------Disable ----------------*/\r\n if (count($entityIds) > 0 && $delete == 'disable') {\r\n $currentStoreId = Mage::app()->getStore()->getStoreId();\r\n Mage::app ()->setCurrentStore ( Mage_Core_Model_App::ADMIN_STORE_ID );\r\n foreach ($entityIds as $entityIdData) {\r\n Mage::register('isSecureArea', true);\r\n Mage::getModel('catalog/product_status')->updateProductStatus($entityIdData, Mage::app()->getStore()->getStoreId() , Mage_Catalog_Model_Product_Status::STATUS_DISABLED);\r\n Mage::unregister('isSecureArea');\r\n $this->getRequest()->setPost('id', null);\r\n }\r\n Mage::app ()->setCurrentStore ( $currentStoreId );\r\n\r\n Mage::getSingleton('core/session')\r\n ->addSuccess($this->__(\"selected Products has been disabled Successfully.\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n }\r\n\r\n if (count($entityIds) == 0 && $delete == 'disable') {\r\n Mage::getSingleton('core/session')->addError($this->__(\"Please select a product to update status\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n }\r\n\r\n /*----------------Disable End----------------*/\r\n\r\n /*----------------Sold Out ----------------*/\r\n if (count($entityIds) > 0 && $delete == 'soldout') {\r\n $currentStoreId = Mage::app()->getStore()->getStoreId();\r\n Mage::app ()->setCurrentStore ( Mage_Core_Model_App::ADMIN_STORE_ID );\r\n foreach ($entityIds as $entityIdData) {\r\n Mage::register('isSecureArea', true);\r\n Mage::helper('marketplace/marketplace')->outOfStock($entityIdData);\r\n Mage::unregister('isSecureArea');\r\n $this->getRequest()->setPost('id', null);\r\n }\r\n Mage::app ()->setCurrentStore ( $currentStoreId );\r\n Mage::getSingleton('core/session')\r\n ->addSuccess($this->__(\"selected Products status has been sold Out Successfully and Un Publish\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n }\r\n\r\n if (count($entityIds) == 0 && $delete == 'soldout') {\r\n Mage::getSingleton('core/session')->addError($this->__(\"Please select a product to update status\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n }\r\n /*--------------------- END -------------------------*/\r\n /*----------------paused ----------------*/\r\n if (count($entityIds) > 0 && $delete == 'paused') {\r\n $currentStoreId = Mage::app()->getStore()->getStoreId();\r\n Mage::app ()->setCurrentStore ( Mage_Core_Model_App::ADMIN_STORE_ID );\r\n foreach ($entityIds as $entityIdData) {\r\n Mage::register('isSecureArea', true);\r\n Mage::helper('marketplace/marketplace')->pausedStock($entityIdData);\r\n Mage::unregister('isSecureArea');\r\n $this->getRequest()->setPost('id', null);\r\n }\r\n Mage::app ()->setCurrentStore ( $currentStoreId );\r\n Mage::getSingleton('core/session')\r\n ->addSuccess($this->__(\"selected Products status has been sold Out Successfully and Un Publish\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n }\r\n\r\n if (count($entityIds) == 0 && $delete == 'paused') {\r\n Mage::getSingleton('core/session')->addError($this->__(\"Please select a product to update status\"));\r\n $url = Mage::getUrl('marketplace/product/manage');\r\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\r\n }\r\n /*--------------------- END -------------------------*/\r\n }\r\n $filterPrice = $this->getRequest()->getParam('filter_price');\r\n $filterStatus = $this->getRequest()->getParam('filter_status');\r\n $ProductStatus = $this->getRequest()->getParam('product_status');\r\n $filterId = $this->getRequest()->getParam('filter_id');\r\n $filterName = $this->getRequest()->getParam('filter_name');\r\n $filterQuantity = $this->getRequest()->getParam('filter_quantity');\r\n $filterProductType = $this->getRequest()->getParam('filter_product_type');\r\n $cusId = Mage::getSingleton('customer/session')->getCustomer()->getId();\r\n $products = Mage::getModel('catalog/product')->getCollection();\r\n $products->addAttributeToSelect('*');\r\n $products->addAttributeToFilter('seller_id', array(\r\n 'eq' => $cusId,\r\n ));\r\n\r\n $products = Mage::helper('marketplace/product')->productFilterByAttribute('name', $filterName, $products);\r\n $products = Mage::helper('marketplace/product')->productFilterByAttribute('entity_id', $filterId, $products);\r\n $products = Mage::helper('marketplace/product')->productFilterByAttribute('price', $filterPrice, $products);\r\n $products = Mage::helper('marketplace/product')->productFilterByAttribute('status', $filterStatus, $products);\r\n $products = Mage::helper('marketplace/product')\r\n ->productFilterByAttribute('seller_product_status', $ProductStatus, $products);\r\n\r\n /**\r\n * confirming filter product type is not empty\r\n */\r\n if (!empty ($filterProductType)) {\r\n $products->addAttributeToFilter('type_id', array(\r\n 'eq' => $filterProductType,\r\n ));\r\n }\r\n /**\r\n * Check filter quantity is not equal to empty\r\n */\r\n if ($filterQuantity != '') {\r\n $products->joinField('qty', 'cataloginventory/stock_item', 'qty', 'product_id=entity_id',\r\n '{{table}}.stock_id=1', 'left')->addAttributeToFilter('qty', array(\r\n 'eq' => $filterQuantity,\r\n ));\r\n }\r\n\r\n $products->addAttributeToFilter('visibility', array(\r\n 'eq' => Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,\r\n ));\r\n $products->addAttributeToSort('entity_id', 'DESC');\r\n\r\n return $products;\r\n }", "public function actionModerate()\n {\n $products = ProductGoods::find()->where([\n 'status' => ProductGoods::STATUS_NEW\n ])->orWhere([\n 'status' => ProductGoods::STATUS_UPDATED\n ])->all();\n\n return $this->render('index', [\n 'products' => $products,\n ]);\n }", "public function adminData(){\r\n // Display the buy now data with a form to bid for the product.\r\n echo \"<div class = 'items_added'>\r\n <hr>\r\n <h3>\". $this->name .\"</h3>\r\n <h3 class = 'pricing'>£\" . $this->price .\"</h3><br>\r\n <form method = 'POST' action = '/php/home/remove_item.php' class = 'BuyNowForm' style='padding-left:3px;'>\r\n <input name = 'product_remove' type = 'hidden' value = \".$this->productid.\">\r\n <input class = 'btn btn-secondary' type = 'submit' value = 'Delete!' style='background-color:red;border:red;'>\r\n </form>\r\n <form method = 'get' action = '../home.php' class = 'BuyNowForm' style = ''>\r\n <input name = 'productidenity' type = 'hidden' value = \".$this->productid.\">\r\n <input class = 'btn btn-secondary' type = 'submit' value = 'Buy Now!'>\r\n </form>\r\n <p> Date Added : \" . $this->dateadded.\"</p><br>\r\n <p>\". $this->description .\"</p><br>\r\n <p class = 'badge badge-primary'> Seller: </p><p><b> Username: </b> \".$this->username. \"</p><p><b> &nbsp Full-Name: </b> \" .$this->first_name . \" \" .$this->last_name. \" </p>\r\n\r\n\r\n </div>\";\r\n }", "public function update_product() {\n\t\t$values=array(\"product_name\"=>$_POST['product_name'],\"description\"=>$_POST['description']);\t\t\t\t\n\t\t$where =array(\"id\"=>$_POST['product_id']);\n\t\tif($this->update(\"products\",$values,$where)) {\t\t\t\n\t\t\techo true;\n\t\t}\n\t\telse\n\t\t\techo 'Error while updating';\n\t}", "function show_delete_product_and_modify_product_buttons_if_user_is_admin($session, $productId) {\n require $_SERVER['DOCUMENT_ROOT'] . '/e_commerce/functions/check_if_user_is_admin.php';\n\n // If the user is connected, and if he is an admin.\n if (isset($session['email']) && is_user_admin($session['email'])) {\n echo '<button class=\"product_details_modify_product_button\">\n Modifier produit\n </button>\n <br />\n <br />\n <button id=\"'.$productId.'\" class=\"product_details_delete_product_button\">\n Supprimer produit\n </button>';\n }\n }", "public function adminProductAction()\n {\n $productManager = new ProductManager();\n $products = $productManager->getAllProducts();\n return $this->twig->render('admin/admin_products.html.twig', array(\n \"products\" => $products));\n }", "public function actionIndex()\r\n {\r\n // Access check\r\n self::checkAdmin();\r\n\r\n // Receive the list of products\r\n $productsList = Product::getProductsList();\r\n\r\n // Connect the view\r\n require_once(ROOT . '/views/admin_product/index.php');\r\n return true;\r\n }", "public function index() {\n\t\t\n\t\t$this->document->setTitle($this->language->get('商品批量修改')); \n $this->data['breadcrumbs'] = array();\n\n\t\t$this->data['breadcrumbs'][] = array(\n\t\t\t'text' => $this->language->get('text_home'),\n\t\t\t'href' => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'),\n\t\t\t'separator' => false\n\t\t);\n\n\t\t$this->data['breadcrumbs'][] = array(\n\t\t\t'text' => \"商品批量修改\",\n\t\t\t'href' => $this->url->link('batch/product_update', 'token=' . $this->session->data['token'], 'SSL'), \t\t\n\t\t\t'separator' => ' :: '\n\t\t);\n\n\t\t$this->data['download'] = $this->url->link('batch/product_update/download', 'token=' . $this->session->data['token'], 'SSL');\n\t\t$this->data['upload'] = $this->url->link('batch/product_update/upload', 'token=' . $this->session->data['token'], 'SSL');\t\n $this->data['token'] = $this->session->data['token'];\n\t\t\n\t\tif (isset($this->error['warning'])) {\n\t\t\t$this->data['error_warning'] = $this->error['warning'];\n\t\t} else {\n\t\t\t$this->data['error_warning'] = '';\n\t\t}\n\n\t\tif (isset($this->session->data['success'])) {\n\t\t\t$this->data['success'] = $this->session->data['success'];\n\n\t\t\tunset($this->session->data['success']);\n\t\t} else {\n\t\t\t$this->data['success'] = '';\n\t\t}\n\t $this->template = 'batch/product_update.tpl';\n\t\t$this->children = array(\n\t\t\t'common/header',\n\t\t\t'common/footer'\n\t\t);\n\n\t\t$this->response->setOutput($this->render());\n\t}", "public function showUpdateproductsAction()\n {\n $categoriesManager = new CategoriesManager();\n $categories = $categoriesManager->getAllCategories();\n $productManager = new productManager();\n $id = $_GET['id'];\n $products = $productManager->getOneProduct($id);\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n if (empty('name')) {\n $errors['name'] = \"Veuillez ajouter un nom.\";\n } elseif (empty('description')) {\n $errors['description'] = \"Veuillez ajouter une description.\";\n } elseif (empty('images_images_id')) {\n $errors['image'] = \"Veuillez ajouter une image.\";\n\n } else {\n $productManager = new ProductManager();\n $id = $_GET['id'];\n $name = $_POST['name'];\n $description = $_POST['description'];\n $category = $_POST['category'];\n\n if (!empty($errors)) {\n return $this->twig->render('admin/updateproducts.html.twig', array(\n 'errors' => $errors,\n 'categories' => $categories,\n 'products' => $products\n ));\n } else {\n if (!empty($_FILES['image']['name'])) {\n // Récuperation\n $image = $_FILES['image'];\n // Objet contenant l'image\n $uploadedfile = new UploadedFile($image['name'], $image['tmp_name'], $image['size']);\n // Objet contenant le service d'upload\n $upload = new Uploads();\n $result = $upload->upload($uploadedfile);\n $url = $uploadedfile->getFileName();\n if (!empty($result)) {\n return $this->twig->render('admin/updateproducts.html.twig', array(\n 'error_image' => $result,\n 'categories' => $categories,\n 'products' => $products\n ));\n }\n } else {\n $url = $products->url;\n }\n // Requête BDD\n $productManager->updateProduct($id, $name, $description, $category, $url);\n // $productManager->addProduct($name, $description, $categories_categories_id, $uploadedfile->getFileName());\n header('Location: index.php?section=admin&page=adminproducts');\n }\n }\n } else {\n // Get all categ from BDD\n return $this->twig->render('admin/updateproducts.html.twig', array(\n 'products' => $products,\n 'categories' => $categories\n ));\n }\n }", "private function productToevoegenAction()\n {\n if (isset($_POST) && !empty($_POST))\n {\n $bestaat = $this->model->bestaatProduct();\n if ($bestaat == false)\n {\n $this->model->maakProduct();\n $this->model->setLog('Product toevoegen', 'Gelukt');\n $this->forward('productenBeheer', 'admin');\n } else\n {\n $this->model->foutGoedMelding('danger', '<strong>Mislukt!</strong> product kan niet worden toegevoegd omdat deze al bestaat.');\n $this->model->setLog('Product toevoegen', 'Mislukt');\n }\n }\n }", "public function clickUpdateWishlist()\n {\n $this->waitFormToLoad();\n $this->_rootElement->hover();\n $this->_rootElement->find($this->updateButton)->click();\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 adminData(){\r\n // Display the buy now data with a form to bid for the product.\r\n echo \"<div class = 'items_added'>\r\n <hr>\r\n <h3>\". $this->name .\"</h3>\r\n <h3 class = 'pricing'>£\" . $this->price .\"</h3><br>\r\n <h3 class = 'pricing' style = 'font-size:15px;'>Current Bid: £\" . $this->currentBid .\"</h3><br>\r\n <form method = 'POST' action = '/php/home/remove_item.php' class = 'BuyNowForm' style='padding-left:5.6vw;'>\r\n <input name = 'product_remove' type = 'hidden' value = \".$this->productid.\">\r\n <input class = 'btn btn-secondary' type = 'submit' value = 'Delete!' style='background-color:red;border:red;'>\r\n </form>\r\n <form method = 'get' action = '../home.php' class = 'BuyNowForm'>\r\n <input name = 'biddable' type = 'hidden' value = 1>\r\n <input name = 'productidenity' type = 'hidden' value = \".$this->productid.\">\r\n <input class = 'btn btn-secondary' style = 'float:right; margin-right:-5rem; ' type = 'submit' value = 'Bid Now!'>\r\n </form>\r\n <p> Date Added : \" . $this->dateadded.\"</p><br>\r\n <p>\". $this->description .\"</p><br>\r\n <p class = 'badge badge-primary'> Seller: </p><p><b> Username: </b> \".$this->username. \"</p><p><b> &nbsp Full-Name: </b> \" .$this->first_name . \" \" .$this->last_name. \" </p>\r\n\r\n\r\n </div>\";\r\n }", "public function display()\n\t{\n\t\t$this->list_table->prepare_items( $this->orderby );\n\n\t\t$this->form_start_get( 'process-all-items', null, 'process-all-items' );\n\t\t\t?><button>Process All Items</button><?php\n\t\t$this->form_end();\n\t\t\n\t\t$this->form_start_get( 'clear', null, 'clear' );\n\t\t\t?><button>Clear Items</button><?php\n\t\t$this->form_end();\n\n\t\t$this->form_start( 'upload-table' );\n\t\t\t$this->list_table->display();\n\t\t$this->form_end();\n\t}", "public function rep_update_page(){\n\n $shops_by_sale = self::make_uploadList(1,0,0);\n $shops_by_standard = self::make_uploadList(0,1,0);\n $shops_by_custom = self::make_uploadList(0,0,1);\n\n return view('stock_out/update_to_branch',compact('shops_by_sale','shops_by_standard','shops_by_custom'));\n }", "function updateButton() {\r\n\t \t\r\n\t \techo \"<a href='update.php' class='btn btn-success'></a><br />\"; \r\n\t }", "public function ajaxShopLoad_C_yes_brand_none(){\n $lastID = $_GET['lastID'];\n $catID = $_GET['catID'];\n \n $updatedlastID = 0;\n $output = '';\n\n $products = DB::table('products')\n ->where('id', '<', $lastID)\n ->where('catID', $catID)\n ->where('active', 1)\n ->orderBy('id', 'desc')\n ->limit(12)\n ->get();\n\n if(!$products->isEmpty()) {\n $noMorePSts = 'yes';\n foreach($products as $product) {\n $output .= '<div class=\"col-xl-3 col-md-4 col-6 col-grid-box\">\n <div class=\"product-box product-box2 p-2\">\n <div id=\"indProduct\">\n <div class=\"product-imgbox\" >\n <div class=\"product-front\">\n <a href=\"/product-details/'.$product->id.'/'.$product->url.'\">\n <img src=\"'.asset($product->small_image).'\" class=\"img-fluid lazyload\"\n alt=\"'.$product->meta_title.'\">\n </a>\n </div>\n <div class=\"product-icon icon-inline\">';\n if($product->stock > 0) {\n if($product->product_type == 'simple'){\n $output .= '<input type=\"hidden\" name=\"\" value=\"1\" id=\"checkV_'.$product->id.'\">\n <button class=\"tooltip-top add-cartnoty\" onclick=\"add_to_cart('.$product->id.', 1)\" data-tippy-content=\"Add to cart\">\n <i class=\"fas fa-shopping-cart\"></i>\n </button>';\n }\n else{\n $output .= '<button class=\"tooltip-top add-cartnoty\" onclick=\"getproductmodal('.$product->id.')\" data-tippy-content=\"Add to cart\">\n <i class=\"fas fa-shopping-cart\"></i>\n </button>';\n }\n }\n $output .= '<a href=\"javascript:void(0)\" onclick=\"getproductmodal('.$product->id.')\"\n class=\"tooltip-top\" data-tippy-content=\"Quick View\">\n <i class=\"fas fa-eye\"></i>\n </a>\n <button class=\"tooltip-top add-cartnoty\" onclick=\"Add_to_wishlist('.$product->id.')\" data-tippy-content=\"Wishlist\">\n <i class=\"far fa-heart\"></i>\n </button>\n\n </div>\n <div class=\"new-label1\">\n <div>new</div>\n </div>';\n if($product->stock > 0){\n $output .= '<div class=\"on-sale1 bg-success text-light\">\n on sale\n </div>';\n }\n else {\n $output .= '<div class=\"on-sale1 bg-danger text-light\">\n Stock Out\n </div>';\n }\n $output .= '</div>\n <div class=\"product-detail product-detail2\">\n <a href=\"/product-details/'.$product->id.'/'.$product->url.'\">\n <h3>'.$product->title.'</h3>\n </a>\n <h5>\n <p class=\"d-none\" id=\"pPrice'.$product->id.'\">'.$product->price.'</p>\n ৳ '.$product->price.'\n <span>';\n if(!empty($product->previous_price)){\n $output .= '৳ '.$product->previous_price.'';\n }\n $output .= '</span>\n </h5>\n <div class=\"row\">\n \n </div>\n </div>\n </div>\n \n </div>';\n $updatedlastID = $product->id; \n $output .= '</div>';\n }\n \n }\n else {\n $noMorePSts = 'no';\n $output .= '\n <div>\n <div class=\"text-center\"><h2><b>Sorry, No Product Found</b></h2></div>\n </div>\n ';\n }\n\n // echo $output;\n\n $res = [\n 'output' => $output,\n 'upLastID' => $updatedlastID,\n 'noMorePSts' => $noMorePSts,\n \n\n ];\n return response()->json($res);\n\n }", "function drawProducts(){\n\t\t//start form and table tags\n\t\techo '<form name=\"products\" action=\"\" method=\"POST\">';\n\t\techo '<h1>Products</h1>';\n\t\techo '<table class=\"productList\"><tr><th>Name</th><th>Price</th><th>Add</th></tr>';\n\t\t\n\t\t//display each product available in a new table row \n\t\tforeach($GLOBALS['products'] as $product){\n\t\t\t\n\t\t\t//prodcut information\n\t\t\techo '<tr>';\n\t\t\techo \t'<td>' . $product['name'] . '</td>';\n\t\t\techo \t'<td>' . number_format($product['price'],2) . '</td>';\n\t\t\techo \t'<td>' . '<button type=\"submit\" name=\"addItem\" value=\"'.$product['name'].'\" >Add Item </button></td>';\n\t\t\techo '</tr>';\n\n\n\t\t}\n\t\t//close the table and form tags\n\t\techo '</table>';\n\t\techo '</form>';\n\t}", "public function toString()\n\t{\n\t\treturn \"Manage Stocks - Update button is shown on product row\";\n\t}", "public function update_products($prod_id){\n\t\t$where = array('prod_id' => $prod_id );\n \t\t$data['prod_details'] =$this->Product_model->view_prod($where);\n\t\t$data['category'] = $this->get_category();\n\t\tview_loader($data,'seller/update_products');\n\t}", "public function indexAction()\r\n {\r\n $this->loadLayout();\r\n $this->_title($this->__(\"Product Updator\"));\r\n $this->renderLayout();\r\n }", "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 }" ]
[ "0.6298469", "0.61847484", "0.6184212", "0.6053899", "0.6024869", "0.59990823", "0.5994417", "0.59657896", "0.5930495", "0.5897815", "0.58926475", "0.5879835", "0.5875972", "0.58609253", "0.5853236", "0.5842559", "0.58393115", "0.577704", "0.5773899", "0.5750344", "0.57425916", "0.57396626", "0.56950724", "0.5680716", "0.56772566", "0.5673145", "0.5669167", "0.56674385", "0.5657238", "0.56570697" ]
0.7309782
0
Outputs the list of products
function outputProductList() { global $application; if (empty($this -> _Prod_IDs)) { $template_contents = array( 'ColumnNumber' => count($this -> _attrs) + (empty($this -> _Errors) ? 0 : 1) ); $this -> _Template_Contents = $template_contents; $application -> registerAttributes($this -> _Template_Contents); return $this -> mTmplFiller -> fill( 'catalog/product_group_edit/', 'empty.tpl.html', array() ); } $output = ''; foreach($this -> _Prod_IDs as $k => $v) { $prod_info = modApiFunc('Catalog_ProdInfo_Base', 'getProductInfo', $v); $prod_attrs = array(); if (is_array($prod_info)) foreach($prod_info as $group) foreach($group['attr'] as $attr) $prod_attrs[$attr['view_tag']] = $attr; unset($prod_info); $template_contents = array( 'ProductData' => $this -> outputProduct($k, $v, $prod_attrs), 'ProductError' => $this -> outputError($k, $v), 'ProductErrorCell' => $this -> outputErrorCell($k, $v) ); $this -> _Template_Contents = $template_contents; $application -> registerAttributes($this -> _Template_Contents); $output .= $this -> mTmplFiller -> fill( 'catalog/product_group_edit/', 'product.tpl.html', array() ); } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function all_products()\n\t{\n\t\t$data['product_list']=$this->tbl_product->get_all_product();\n\t\t$data['page']='All Products';\n\t\t$view = 'Admin/collection/admin_all_product_list';\n\t\techo Modules::run('Template/admin_template', $view, $data);\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 outputResults()\r\n {\r\n // loop all products and display results per product\r\n foreach ($this->Products->getAllProducts() as $productId => $productName) {\r\n echo \"Product ID: \" . $productId . \"\\n\";\r\n echo \"Product Name: \" . $productName . \"\\n\";\r\n echo \"Total Units Sold: \" . $this->ProductsSold->getSoldTotal($productId) . \"\\n\";\r\n echo \"Total Units Purchased and Pending: \" . $this->ProductsPurchased->getPurchasedPendingTotal($productId) . \"\\n\";\r\n echo \"Total Units Purchased and Received: \" . $this->ProductsPurchased->getPurchasedReceivedTotal($productId) . \"\\n\";\r\n echo \"Current Stock Level: \" . $this->Inventory->getStockLevel($productId) . \"\\n\\n\";\r\n }\r\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 displayProducts($products)\n\t {\n\t\t$output = '';\n\t\tforeach ($products as $row) {\n\t\t\t$link = '?page=detail&id=' . $row['product_id'];\n\t\t\t$output .= '<li>' . PHP_EOL;\n\t\t\t$output .= '<div class=\"image\">' . PHP_EOL;\n\t\t\t$output .= '<a href=\"<?php echo $link; ?>\">' . PHP_EOL;\n\t\t\t$output .= '<img src=\"images/' . $row['link'] . '.scale_20.JPG\" alt=\"' . $row['title'] . '\" width=\"190\" height=\"130\"/>' . PHP_EOL;\n\t\t\t$output .= '</a>' . PHP_EOL;\n\t\t\t$output .= '</div>' . PHP_EOL;\n\t\t\t$output .= '<div class=\"detail\">' . PHP_EOL;\n\t\t\t$output .= '<p class=\"name\">' . PHP_EOL;\n\t\t\t$output .= '<a href=\"' . $link . '\">' . $row['title'] . '</a></p>' . PHP_EOL;\n\t\t\t$output .= '<p class=\"view\">' . PHP_EOL;\n\t\t\t$output .= '<a href=\"' . $link. '\">purchase</a> | <a href=\"' . $link . '\">view details >></a></p>' . PHP_EOL;\n\t\t\t$output .= '</div>' . PHP_EOL;\n\t\t\t$output .= '</li>' . PHP_EOL;\n\t\t} // foreach ($products as $row)\n\t\treturn $output;\n\t }", "public function showAllAction () {\n $products = $this->getDoctrine()\n ->getRepository('AppBundle:Product')\n ->findAll();\n\n return $this->render('product/list.html.twig', array(\n 'products' => $products,\n ));\n }", "function __toString() {\r\n\t\t\t$out = '<div id=\"products\">';\r\n\t\t\t\r\n\t\t\tforeach($this->data['products'] as $p) {\r\n\t\t\t\t$out .= \"<div class='product'><a href='BASE_URL'><img src='{$p['photo']}' alt='{$p['shortdesc']}'/><div class='label'>{$p['name']}</div></a></div>\\n\";\r\n\t\t\t}\r\n\t\t\t$out .= \"</div>\";\r\n\t\t\treturn $out;\r\n\t\t}", "public function index()\n {\n return $this->productService->getProducts();\n }", "public function products()\n {\n //$products = $api->getAllProducts();\n //var_dump($products);\n // TODO save products to database\n }", "public function getProductList()\n {\n $output = $this->product->getProuductList();\n return $output;\n }", "function showProducts($products){\r\n require_once 'templates/header.php';\r\n echo '\r\n <h1>BIENVENIDOS A ZAPATILLERIA ONLINE</h1>\r\n \r\n <h2>PRODUCTOS</h2>\r\n \r\n <form action=\"\">\r\n \r\n </form>\r\n\r\n ';\r\n \r\n echo \"<ul class='list-group list-group-flush mt-5'>\";\r\n foreach($products as $product){\r\n echo \"<li class='list-group-item'>\r\n <li><a href=verProducto/$product->id>$product->marca</a></li> <p>$product->talle</p> <p>$product->color</p>\r\n <a class='btn btn-warning btn-sm' href='editarProducto/$product->id'>EDITAR</a>\r\n <a class='btn btn-danger btn-sm' href='eliminarProducto/$product->id'>ELIMINAR</a>\r\n </li>\"; \r\n }\r\n echo \"</ul>\";\r\n\r\n require_once 'templates/select_products.php';\r\n\r\n require_once 'templates/form_products.php';\r\n\r\n require_once 'templates/footer.php';\r\n }", "public function index()\n {\n $products = ['Produto 1', 'Produto 2', 'Produto 3'];\n \n return $products;\n }", "public function index()\n\t{\n\t\t$products = $this->product->getProductList();\n\t\treturn $this->response([\"data\" => $products], 200); \n\t}", "public function products()\n {\n $this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');\n\n $repository = $this->getDoctrine()\n ->getRepository(Produit::class);\n\n $produits = $repository->findBy([],['nom' => 'ASC']);\n\n return $this->render('front/produits.html.twig', [\n 'produits' => $produits]);\n }", "public function getProductsBySearch()\n {\n $collection = new AjaxModel();\n $productList = $collection->getProducts($_POST['name']);\n foreach ($productList as $item) {\n //colon delimiter for each cell, bar delimiter for each row\n echo $item[0].\":\".$item[1].\":\".$item[2].\":\".$item[3].\":\".$item[4].\"|\";\n }\n }", "public function index() {\n\t\treturn $this->product->all();\n\t}", "private function showProductsById()\n { \n $productNum1 = $this->productDao->getById(1);\n $productNum9 = $this->productDao->getById(9);\n \n echo PHP_EOL;\n echo 'Product with id 1: ' . PHP_EOL; print_r($productNum1);\n echo 'Product with id 9: ' . PHP_EOL; print_r($productNum9);\n }", "public function list(): Response\n {\n /* Récupération des produits */\n // Récupération du repository\n $repository = $this->getDoctrine()->getRepository(Product::class);\n // Récupération des enregistrements\n $products = $repository->findAll();\n\n // Envoi des produits à la vue\n return $this->render(\"products/list.html.twig\", compact('products'));\n /*\n * Forme équivalente\n return $this->render(\"products/list.html.twig\", [\n \"products\" => $products\n ]);\n */\n }", "public function mostrarProductos() {\n //String $retorno\n //Array Producto $col\n $retorno = \"\";\n $col = $this->getColProductos();\n for ($i = 0; $i < count($col); $i++) {\n $retorno .= $col[$i] . \"\\n\";\n $retorno .= \"-------------------------\\n\";\n }\n return $retorno;\n }", "public function showAdminproductsAction()\n {\n $productManager = new ProductManager();\n $products = $productManager->getAllProducts();\n return $this->twig->render('admin/adminproducts.html.twig', array(\n 'products' => $products\n ));\n }", "public static function productLists()\n {\n array_push(self::$products, \n [\n CART::ID => self::$id,\n CART::NAME => self::$name,\n CART::PRICE => self::$price,\n CART::QUANTITY => self::$quantity\n ]);\n }", "public function getProductList()\n {\n return $this->_call('catalog_product.list', '');\n }", "public function getProductList(){\n\n $productModel = new ProductModel();\n $products = $productModel->getProductList();\n $this->JsonCall($products);\n }", "public function show( $products)\n { \n // var_dump($products);die;\n \n }", "function drawProducts(){\n\t\t//start form and table tags\n\t\techo '<form name=\"products\" action=\"\" method=\"POST\">';\n\t\techo '<h1>Products</h1>';\n\t\techo '<table class=\"productList\"><tr><th>Name</th><th>Price</th><th>Add</th></tr>';\n\t\t\n\t\t//display each product available in a new table row \n\t\tforeach($GLOBALS['products'] as $product){\n\t\t\t\n\t\t\t//prodcut information\n\t\t\techo '<tr>';\n\t\t\techo \t'<td>' . $product['name'] . '</td>';\n\t\t\techo \t'<td>' . number_format($product['price'],2) . '</td>';\n\t\t\techo \t'<td>' . '<button type=\"submit\" name=\"addItem\" value=\"'.$product['name'].'\" >Add Item </button></td>';\n\t\t\techo '</tr>';\n\n\n\t\t}\n\t\t//close the table and form tags\n\t\techo '</table>';\n\t\techo '</form>';\n\t}", "public function index()\n {\n $items = Product::all();\n\n return view('shop::product.index', get_defined_vars());\n }", "public function index()\n {\n $products =Product::orderBy('id', 'DESC')->get();\n return view('admin.product.allProduct',compact('products'));\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function purchase_items()\n\t{\n\t\t$products = DB::table('products')->select('id as value', 'product_name as label')->where('category_id', 2)->orderBy('id', 'desc')->get();\n\t\t$str = json_encode($products);\n\t\t$str = preg_replace('/\"([^\"]+)\"\\s*:\\s*/', '$1:', $str);\n\t\techo $str;\n\t}", "public function index() {\n $products = Product::all();\n return $this->renderJson(true, $products, 'Listado de Productos');\n }" ]
[ "0.7442964", "0.74038714", "0.728424", "0.7139025", "0.7134931", "0.704659", "0.69980955", "0.6976413", "0.6958485", "0.69405764", "0.69257104", "0.69238544", "0.6906843", "0.6905059", "0.68831456", "0.68801326", "0.6868503", "0.68186694", "0.68041736", "0.6802763", "0.67704254", "0.6758562", "0.67576826", "0.67502487", "0.6712689", "0.6703535", "0.67019546", "0.6690522", "0.66809845", "0.6677329" ]
0.75149626
0
Outputs the product errors
function outputError($index, $prod_id) { global $application; if (!isset($this -> _Errors[$prod_id]) || !is_array($this -> _Errors[$prod_id]) || empty($this -> _Errors[$prod_id])) return ''; $error_msg = join('<br />', $this -> _Errors[$prod_id]); $template_contents = array( 'ColumnNumber' => count($this -> _attrs) + (empty($this -> _Errors) ? 0 : 1), 'ProductErrorMessage' => $error_msg, 'Product_ID' => $prod_id, 'LineBgColor' => (($index % 2) ? '#EEEEEE' : '#FFFFFF') ); $this -> _Template_Contents = $template_contents; $application -> registerAttributes($this -> _Template_Contents); return $this -> mTmplFiller -> fill( 'catalog/product_group_edit/', 'product-error.tpl.html', array() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayError(){\n\t\tprint \"<div class=\\\"validationerror\\\">\";\n\t\tfor ($i=0;$i<count($this->error);$i++){\n\t\t\tprintln($this->error[$i]);\n\t\t}\n\t\tprint \"</div>\";\n\t}", "public static function displayErrors(){\n $ec = new EmailLabsConfig();\n if( $ec->getMode() == true && !empty( self::$errors ) ){\n $message = '';\n foreach( self::$errors as $item )\n $message .= '['.$item['lvl'].']['.$item['date'].']'.$item['msg'].\"\\n\";\n die( $message );\n }\n }", "private function displayErrors () {\n echo '<pre>';\n\n foreach ($this->error as $single_error) {\n print_r($single_error);\n }\n\n echo '</pre>';\n }", "public function getErrorsAsString()\n {\n if (!$this->hasErrors()) {\n return '';\n }\n $errors[] = \"There are errors in the file. Please correct inconsistencies in line/s and re-upload the file to display the products.\";\n foreach ($this->getErrors() as $key => $error) {\n $lineNumber = (is_numeric($key) ? '#' . $key . ': ' : '');\n $errors[] = $lineNumber . implode(' ', $error);\n }\n return implode('<br>', $errors);\n }", "public function errors()\n {\n $_output = '';\n foreach ($this->errors as $error)\n {\n $errorLang = $this->lang->line($error) ? $this->lang->line($error) : '##' . $error . '##';\n $_output .= $this->error_start_delimiter . $errorLang . $this->error_end_delimiter;\n }\n\n return $_output;\n }", "public function displayErrors() {\n\t\tif(count($this->errors)) {\n\t\t\t$output = \"<ul>\";\n\t\t\tforeach($this->errors as $error) {\n\t\t\t\t$output .= \"<li>\".$error.\"</li>\";\n\t\t\t}\n\t\t\t$output .= \"</ul>\";\n\t\t\treturn $output;\n\t\t}\n\t\treturn \"\";\n\t}", "public function libxml_display_errors() { \r\n\t\r\n\t\t$errors = libxml_get_errors(); \r\n\t\t$retorno = \"\";\r\n\t\tforeach ($errors as $error) { \r\n\t\t\t$retorno .= $this->libxml_display_error($error); \r\n\t\t} \r\n\t\t\r\n\t\t// Limpa os erros da memoria\r\n\t\tlibxml_clear_errors();\r\n\t\t\r\n\t\t// Retorna os erros\r\n\t\treturn $retorno;\r\n\t}", "function show__errors ()\n {\n global $_errors;\n global $lang;\n if (0 < count ($_errors))\n {\n $errors = implode ('<br />', $_errors);\n echo '\n\t\t\t<table class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=\"100%\">\n\t\t\t<tr>\n\t\t\t\t<td class=\"thead\">\n\t\t\t\t\t' . $lang->global['error'] . '\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<font color=\"red\">\n\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t' . $errors . '\n\t\t\t\t\t\t</strong>\n\t\t\t\t\t</font>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<br />\n\t\t';\n }\n\n }", "public function get_errors() {\n\n\t\t$output = '';\n\t\t\n\t\t$errors = $this->errors;\n\t\t\n\t\tif ($errors) {\n\t\t\t$items = '';\n\t\t\tforeach ($errors as $e) {\n\t\t\t\t$items .= '<li>'.$e.'</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 errors.', CCTM_TXTDOMAIN);\n\t\t}\n\t\treturn sprintf('<h2>%s</h2><div class=\"summarize-posts-errors\">%s</div>'\n\t\t\t, __('Errors', CCTM_TXTDOMAIN)\n\t\t\t, $output);\n\t}", "public function renderErrors();", "public static function printErrors() {\n\t\tif (PNApplication::hasErrors()) {\n\t\t\tforeach (PNApplication::$errors as $e)\n\t\t\t\techo \"<div style='color:#C00000;font-familiy:Tahoma;font-size:10pt'><img src='\".theme::$icons_16[\"error\"].\"' style='vertical-align:bottom'/> \".$e.\"</div>\";\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"if (typeof window.top.status_manager != 'undefined'){\";\n\t\t\tforeach (PNApplication::$errors as $e)\n\t\t\t\techo \"window.top.status_manager.addStatus(new window.top.StatusMessageError(null,\".json_encode($e).\",5000));\";\n\t\t\techo \"};\";\n\t\t\techo \"window.page_errors=[\";\n\t\t\t$first = true;\n\t\t\tforeach (PNApplication::$errors as $e) {\n\t\t\t\tif ($first) $first = false; else echo \",\";\n\t\t\t\techo json_encode($e);\n\t\t\t}\n\t\t\techo \"];\";\n\t\t\techo \"</script>\";\n\t\t}\n\t\tif (PNApplication::hasWarnings()) {\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"if (typeof window.top.status_manager != 'undefined'){\";\n\t\t\tforeach (PNApplication::$warnings as $e)\n\t\t\t\techo \"window.top.status_manager.addStatus(new window.top.StatusMessage(window.top.Status_TYPE_WARNING,\".json_encode($e).\",[{action:'popup'},{action:'close'}],5000));\";\n\t\t\techo \"};\";\n\t\t\techo \"</script>\";\n\t\t}\n\t}", "function error_reporting() {\n\t\t$r='';\n\t\tif (mb_strlen(self::$error)>0) {\n\t\t\t$r.=self::$error;\n\t\t}\n\t\tif (count(self::$error_arr)>0) {\n\t\t\t$r.='<h2>Произошли следующие ошибки:</h2>'.\"\\n\".'<ul>';\n\t\t\tforeach(self::$error_arr as $key=>$value) {\n\t\t\t\t$r.='<li>'.$value.'</li>';\n\t\t\t}\n\t\t\t$r.='</ul>';\n\t\t}\n\t\treturn $r;\n\t}", "public function render_requirements_notices() {\n $notices = $this->check_requirements();\n if ( count( $notices ) > 0 ) {\n $out = join( \"\\n\", $notices );\n echo laterpay_sanitize_output( '<div class=\"error\">' . $out . '</div>' );\n }\n }", "function getErrors()\n {\n $errMsg = '';\n foreach ($this->errors as $error) {\n $errMsg .= $error;\n $errMsg .= '<br/>';\n }\n return $errMsg;\n }", "public function showErrors() {\n \n \n foreach ($this->_errors as $key => $value)\n $this->_errors = \"$value\";\n\t\t\treturn $this->_errors;\n }", "public function output_error($errors){\n\n\t\treturn '<ul>'.implode('</li><li>', $errors).'</li></ul>';\n\n\t}", "public function requirements_errors() {\n\t\t$errors = $this->errors;\n\t\trequire_once( ET_CORE_DIR . 'templates/admin/errors/requirements-error.php' );\n\t}", "function error(){\n\t\t$paypal_config = array('Sandbox' => $this->sandbox);\n\t\t$paypal = new PayPal($paypal_config);\n\t\techo $paypal->DisplayErrors($this->session->userdata('paypal_errors'));\n\t\t\n\t}", "function getErrors() {\n \techo errorHandler();\n }", "public function errors();", "public function errors();", "public static function customErrorMsg()\n {\n echo \"\\n<p>An error occured, The error has been reported.</p>\";\n exit();\n }", "function outputErrors($errors) {\n echo \"<ul class=\\\"errors\\\">\";\n $reqErrorCount = count($errors[\"required\"]);\n $invalidErrorCount = count($errors[\"invalid\"]);\n \n if ($reqErrorCount > 0) {\n echo \"<li>\".concatArray($errors[\"required\"]).\" \".(($reqErrorCount>1)?\"are\":\"is\").\" required</li>\";\n } \n if ($invalidErrorCount > 0) {\n echo \"<li>\".concatArray($errors[\"invalid\"]).\" \".(($invalidErrorCount>1)?\"are\":\"is\").\" invalid</li>\";\n }\n foreach ($errors[\"other\"] as $error) {\n echo \"<li>\".$error.\"</li>\";\n }\n echo \"</ul>\";\n }", "public function getErrors(){\n echo json_encode($this->errors, JSON_PRETTY_PRINT);\n }", "public function getErrorOutput();", "public function getErrorOutput();", "public function get_errors() { return $this->errortext; }", "function display_error() {\n\tglobal $errors;\n global $errors1;\n\n\tif (count($errors) > 0){\n\t\techo '<div class=\"error\">';\n\t\t\tforeach ($errors as $error){\n\t\t\t\techo $error .'<br>';\n\t\t\t}\n\t\techo '</div>';\n\t}\n}", "function DisplayError()\n\t\t{\n\t\t\techo \"<div>\" . $this->error_message . \"</div>\";\n\t\t}", "public function outputFriendlyError()\n {\n //Erase contents of the output buffer\n ob_end_clean();\n view('errors/generic');\n exit;\n }" ]
[ "0.69864553", "0.6887595", "0.68670964", "0.677114", "0.67257035", "0.67224574", "0.6598896", "0.6594689", "0.6568849", "0.6485919", "0.6482635", "0.64701897", "0.64606285", "0.6451554", "0.64378977", "0.6428408", "0.6392482", "0.63794786", "0.63601696", "0.63540494", "0.63540494", "0.6339097", "0.6326083", "0.6273338", "0.62278575", "0.62278575", "0.62137735", "0.6198213", "0.6195392", "0.6186598" ]
0.70973444
0
Show the form for creating a new P3aulac1m1.
public function create() { return view('p3aulac1m1s.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return view('lab1.create1');\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 return view('ap4aulac2m1s.create');\n }", "public function create()\n {\n return view('admin.pages.forms.pengirim');\n }", "public function create()\n {\n //\n return view('form1');\n }", "public function create()\n {\n //\n return View::make('admin.form_int_mun');\n }", "public function create(){\n \n $razas = Raza::get();\n include 'views/mascota/form_new.php';\n }", "public function create()\n {\n return view('p2exercicioc1m1s.create');\n }", "public function store(CreateP3aulac1m1Request $request)\n {\n $input = $request->all();\n\n $p3aulac1m1 = $this->p3aulac1m1Repository->create($input);\n\n Flash::success('P3Aulac1M1 saved successfully.');\n\n return redirect(route('p3aulac1m1s.index'));\n }", "public function actionCreate()\n {\n $model = new MaklumatPelajarPenjaga();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionNew()\n {\n $model = new Pekerjaan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success','Berhasil Menambahkan Pekerjaan Baru');\n return $this->redirect(['/admin/user/index']);\n }\n\n return $this->render('form', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function create()\n {\n return view('ap1aulac2m1s.create');\n }", "public function create()\n {\n return view('forms.cps.create');\n }", "public function create1()\n {\n\n return view('clientes.create1');\n\n //\n }", "public function xadmin_createform() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$form_title = $args [1];\n\t\t$form_type = @$args [2] ? $args [2] : 'blank';\n\t\t\n\t\t/* Load Model */\n\t\t$form = $this->getModel ( 'form' );\n\t\t$this->session->returnto ( 'forms' );\n\t\t\n\t\t/* create the form */\n\t\t$form->createNewForm ( $form_title, $form_type );\n\t\t\n\t\t$this->loadPluginModel ( 'forms' );\n\t\t$plug = Plugins_Forms::getInstance ();\n\t\t\n\t\t$plug->_pluginList [$form_type]->onAfterCreateForm ( $form );\n\t\t\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( 'xforms' );\n\t\n\t}", "public function actionCreate()\n {\n $model = new ProvCompras();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n $this->layout=\"main\";\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n //\n return view('admin.nom.prefcontrtypes.create');\n }", "public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_presenca/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_presenca.create')\n;\n\t}", "public function addform()\n {\n \n //$this->session_manager->validateFashion(__METHOD__);\n \n $data['cate'] = $this->promo->promoSliderOptionCuisine($by_id=null,$platform=1);\n $data['promo_duration'] = $this->promo->promoDurationOption();\n $data['admin_info'] = $this->promo->adminInfo();\n \n $data['title_type']= 'New Promo Form';\n $data ['content_file']= 'promo_new';\n $data['pageheader'] = \"Add Promo\";\n $data['breadCrumbs'] = '<li class=\"breadcrumb-item\"><a href=\"'.site_url(\"jollofadmin/promos\").'\">Promos</a></li> <li class=\"breadcrumb-item active\">Add Promo</li>';\n $data['mainmenu'] = \"promos\";\n $this->load->view('jollof_admin/layout', $data);\n }", "public function create()\n {\n return view('ap3aulac3m2s.create');\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 actionCreate()\n {\n $model = new Nomina();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.complaint.add');\n }", "public function create()\n {\n //\n $pagename = 'Form Input Akun';\n return view('admin.akun.create', compact('pagename'));\n }", "public function actionCreate()\n {\n $model = new EnglishNanorep();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n //\n return view(\"Admin.Abs.add\");\n }", "public function create()\n {\n $pagename='Form Input Data Kelas 4';\n return view('admin.datakelas4.create', compact('pagename'));\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }" ]
[ "0.68355674", "0.6822541", "0.6812756", "0.6728504", "0.6696109", "0.6676282", "0.66380996", "0.6620125", "0.6604906", "0.6581523", "0.6553126", "0.65424645", "0.6539133", "0.6530648", "0.652768", "0.6518312", "0.6500799", "0.6500242", "0.6498663", "0.6491362", "0.648746", "0.64854884", "0.6476753", "0.64664215", "0.6458394", "0.6457789", "0.64551246", "0.6441926", "0.64377344", "0.6437227" ]
0.72551197
0
Store a newly created P3aulac1m1 in storage.
public function store(CreateP3aulac1m1Request $request) { $input = $request->all(); $p3aulac1m1 = $this->p3aulac1m1Repository->create($input); Flash::success('P3Aulac1M1 saved successfully.'); return redirect(route('p3aulac1m1s.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(CreateAp3aulac3m2Request $request)\n {\n $input = $request->all();\n\n $ap3aulac3m2 = $this->ap3aulac3m2Repository->create($input);\n\n Flash::success('Ap3Aulac3M2 saved successfully.');\n\n return redirect(route('ap3aulac3m2s.index'));\n }", "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();", "public function store();", "public function store();", "public function store(CreateAp1aulac2m1Request $request)\n {\n $input = $request->all();\n\n $ap1aulac2m1 = $this->ap1aulac2m1Repository->create($input);\n\n Flash::success('Ap1Aulac2M1 saved successfully.');\n\n return redirect(route('ap1aulac2m1s.index'));\n }", "public function store()\n\t {\n\t //\n\t }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store(CreateAp4aulac2m1Request $request)\n {\n $input = $request->all();\n\n $ap4aulac2m1 = $this->ap4aulac2m1Repository->create($input);\n\n Flash::success('Ap4Aulac2M1 saved successfully.');\n\n return redirect(route('ap4aulac2m1s.index'));\n }", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public function persist()\n {\n $uid = $this->getIdentifier() == 0 ? 'NEW' . rand(100000, 999999) : $this->getIdentifier();\n $data = [\n trim(static::$storageTableName) => [\n $uid => $this->getPersistableDataArray()\n ]\n ];\n // New records always must have a pid\n if ($this->getIdentifier() == 0) {\n $data[trim(static::$storageTableName)][$uid]['pid'] = 0;\n }\n /** @var \\TYPO3\\CMS\\Core\\DataHandling\\DataHandler $tce */\n $tce = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Core\\DataHandling\\DataHandler::class);\n $tce->start($data, []);\n $tce->process_datamap();\n }", "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.6225431", "0.6027362", "0.6027362", "0.6027362", "0.60272264", "0.60272264", "0.60272264", "0.6017176", "0.60047895", "0.5984905", "0.596173", "0.5958403", "0.5958403", "0.5958403", "0.595702", "0.5950628", "0.5950628", "0.5950628", "0.5950628", "0.5950628", "0.5950628", "0.5950628", "0.5950628", "0.5950628", "0.5950628", "0.5950628", "0.5950628", "0.5950628", "0.5950628", "0.5950628" ]
0.7254907
0
Display the specified P3aulac1m1.
public function show($id) { $p3aulac1m1 = $this->p3aulac1m1Repository->find($id); if (empty($p3aulac1m1)) { Flash::error('P3Aulac1M1 not found'); return redirect(route('p3aulac1m1s.index')); } return view('p3aulac1m1s.show')->with('p3aulac1m1', $p3aulac1m1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Plazomatricula $plazomatricula)\n {\n //\n }", "public function show(PermohonanLab $permohonanLab)\n {\n //\n }", "public function show(Uang $uang)\n {\n //\n }", "public function show(Labarugi $labarugi)\n {\n //\n }", "public function show(MataKuliah $mataKuliah)\n {\n //\n }", "public function percobaan3()\n {\n \t$a = \"Kurniawan\";\n \treturn view ('latihan.saya', compact('a'));\n }", "public function display(){}", "public abstract function display();", "public function show(Umrah $umrah)\n {\n //\n }", "public function show(Manual $manual)\n {\n //\n }", "abstract function display();", "abstract function display();", "public function show(Compra $compra)\n {\n //\n }", "public function show(Compra $compra)\n {\n //\n }", "public function show()\n\t{\n\t\t\n\t}", "public function show(Pelamar $pelamar)\n {\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(MCProject $mcProject)\n {\n //\n }", "public function verCamara1EnPlasma( ) {\n\n $respuesta=self::$plasma->verEntradaPantallaAV2();\n return $this->isError($respuesta,\"ver la camara1 en\");\n }", "public function show($id)\n {\n $ap1aulac2m1 = $this->ap1aulac2m1Repository->find($id);\n\n if (empty($ap1aulac2m1)) {\n Flash::error('Ap1Aulac2M1 not found');\n\n return redirect(route('ap1aulac2m1s.index'));\n }\n\n return view('ap1aulac2m1s.show')->with('ap1aulac2m1', $ap1aulac2m1);\n }", "public function display() {}", "public function display() {}", "function Display($f3,$params) {\n $show_id = $params['show_id'];\n $db_show = new DB\\SQL\\Mapper($f3->get('DB'), 'shows');\n $db_episode = new DB\\SQL\\Mapper($f3->get('DB'), 'episodes');\n\n /* some virtual fields for showing foreign key data with some nice values\n * instead of keys, as well as some additional metadata about the show\n */\n $db_show->license_description = 'SELECT description FROM licenses WHERE licenses.license_id = shows.license_id';\n $db_show->category_name = 'SELECT category_name FROM categories WHERE categories.category_id = shows.category_id';\n $db_show->category_group = 'SELECT category_group FROM categories WHERE categories.category_id = shows.category_id';\n $db_show->episode_count = 'SELECT count(*) FROM episodes WHERE episodes.show_id = shows.show_id';\n $db_episode->download_count = 'SELECT download_count FROM media WHERE media.media_id = episodes.media_id';\n\n // query the database and validate the result\n $db_show->load(array('show_id=?', $show_id));\n if ($db_show->dry())\n $f3->error(404, 'Unable to find that show, sorry!');\n $f3->set('show', $db_show->cast());\n\n // convert the media_id to a url for rendering on the html page output\n $f3->set('cover_art_url', $this->GetMediaURLByID($db_show->cover_art_id));\n\n // load episode data for this show\n $f3->set('episodes', $db_episode->find(\n array('show_id=?', $show_id), // filter\n array('order'=>'publish_ts DESC') // sorting\n ));\n\n $this->RenderPage('show/display.htm', $db_show->title);\n }", "public function show(Matoleo $matoleo)\n {\n //\n }", "public function show(Autobus $autobus)\n {\n //\n }", "public function display() {\n\t}", "public function show($id)\n {\n $ap4aulac2m1 = $this->ap4aulac2m1Repository->find($id);\n\n if (empty($ap4aulac2m1)) {\n Flash::error('Ap4Aulac2M1 not found');\n\n return redirect(route('ap4aulac2m1s.index'));\n }\n\n return view('ap4aulac2m1s.show')->with('ap4aulac2m1', $ap4aulac2m1);\n }", "public function show(Mapel $mapel)\n {\n //\n }" ]
[ "0.6093641", "0.55547494", "0.54337317", "0.54210293", "0.5338043", "0.5322655", "0.5250777", "0.523568", "0.523256", "0.52101606", "0.5197265", "0.5197265", "0.5179505", "0.5179505", "0.515955", "0.5142107", "0.51401794", "0.51401794", "0.51401794", "0.512947", "0.51254874", "0.5124081", "0.51048017", "0.51048017", "0.5101324", "0.50986433", "0.5089407", "0.5088961", "0.507631", "0.5076273" ]
0.60390556
1
Show the form for editing the specified P3aulac1m1.
public function edit($id) { $p3aulac1m1 = $this->p3aulac1m1Repository->find($id); if (empty($p3aulac1m1)) { Flash::error('P3Aulac1M1 not found'); return redirect(route('p3aulac1m1s.index')); } return view('p3aulac1m1s.edit')->with('p3aulac1m1', $p3aulac1m1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Form1 $form1)\n {\n //\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit1()\n\t{\n \t// $table_form5->tanggapan_audit = $request->auditi;\n \t// $table_form5->rencana_perbaikan = $request->perbaikan;\n \t// $table_form5->save();\n\n\t\t// $table_form5 = \\App\\Ptpp::findOrFail($request->idd);\n\t\t$table_form5->update($request->all());\n\n\t\treturn back()->with('sukses', 'Data sukses ditambahkan');;\n\t}", "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 {\n $ap1aulac2m1 = $this->ap1aulac2m1Repository->find($id);\n\n if (empty($ap1aulac2m1)) {\n Flash::error('Ap1Aulac2M1 not found');\n\n return redirect(route('ap1aulac2m1s.index'));\n }\n\n return view('ap1aulac2m1s.edit')->with('ap1aulac2m1', $ap1aulac2m1);\n }", "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 {\n $ap4aulac2m1 = $this->ap4aulac2m1Repository->find($id);\n\n if (empty($ap4aulac2m1)) {\n Flash::error('Ap4Aulac2M1 not found');\n\n return redirect(route('ap4aulac2m1s.index'));\n }\n\n return view('ap4aulac2m1s.edit')->with('ap4aulac2m1', $ap4aulac2m1);\n }", "function pa_edit() {\n\t\t\t\t$edit_pid = (int)UTIL::get_post('edit_pid');\n\t\t\t\t\n\t\t\t\t//-- haben wir keine edit-id, gibts eine seiten-tabelle zur auswahl\n\t\t\t\tif (!$edit_pid) {\n\t\t\t\t\techo 'error: no pid';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$form = MC::create('form');\n\t\t\t\t$form->init('page', 'mod_page');\n\t\t\t\t$form->add_hidden('edit_pid', $edit_pid);\n\t\t\t\t\n\t\t\t\t// hatten wir fehler\n\t\t\t\tif ($this->get_var('error')) {\n\t\t\t\t\t$form->set_values($this->get_var('data'));\n\t\t\t\t\t$form->set_error_fields($this->get_var('error'));\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\t// frisch aus db lesen\n\t\t\t\t\t$sql = 'SELECT * FROM '.$this->mod_tbl.' WHERE id='.$edit_pid;\n\t\t\t\t\t$res = $this->DB->query($sql);\n\t\t\t\t\t$data = $res->r();\n\t\t\t\t\t$form->set_values($data);\n\t\t\t\t}\n\n\t\t\t\t$this->set_var('path', $this->_get_path_print($edit_pid));\n\t\t\t\t$this->set_var('form', $form);\n\t\t\t\t\n\t\t\t\t$this->OPC->generate_view($this->tpl_dir.'pa_edit.php');\n\n\t\t\t}", "public function display_edit_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=update' method='post'>\";\n echo \"<input type='hidden' name='id' value=\".$this->id.\" />\";\n echo \"Name: <input type='text' name='name' value=\".$this->name.\" /><br />\";\n echo \"Description: <textarea name='description'>\".$this->description.\"</textarea><br />\";\n echo \"<input type='submit' value='Update' />\";\n echo \"</form>\";\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 modifyView() {\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n return $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modify', true),\n 'class'=>'formAdmin formAdminModify'),\n array('submit'=>array('save'=>__('save'),\n 'saveCheck'=>__('saveCheck')))));\n }", "public function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'player' );\n\t\tJRequest::setVar( 'layout', 'form' );\n\t\tJRequest::setVar('hidemainmenu', 1);\n\t \t \n\t\tparent::display();\n\t}", "public function edit(MataKuliah $matakuliah)\n {\n return view('matakuliah.edit',compact('matakuliah'));\n }", "public function edit($id)\n {\n $lab1 = lab1_table::find($id);\n return view('lab1.edit1',compact('lab1')); \n }", "public function edit(Plazomatricula $plazomatricula)\n {\n //\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\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 editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "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 edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('admincp::edit');\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_peminjaman)\n {\n //\n\n\n }", "public function getEditForm();", "public function edit(PermohonanLab $permohonanLab)\n {\n //\n }", "public function edit($id)\n {\n $p2exercicioc1m1 = $this->p2exercicioc1m1Repository->find($id);\n\n if (empty($p2exercicioc1m1)) {\n Flash::error('P2Exercicioc1M1 not found');\n\n return redirect(route('p2exercicioc1m1s.index'));\n }\n\n return view('p2exercicioc1m1s.edit')->with('p2exercicioc1m1', $p2exercicioc1m1);\n }", "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(MJasa $mJasa)\n {\n //\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(form $form)\n {\n //\n }" ]
[ "0.7484721", "0.66990536", "0.6521784", "0.6461161", "0.6450398", "0.64309794", "0.6428513", "0.6421189", "0.6417232", "0.6414706", "0.63931143", "0.6373821", "0.6338717", "0.6332682", "0.6316739", "0.6297674", "0.6295381", "0.6256658", "0.6251438", "0.62425023", "0.6229714", "0.62282574", "0.6200565", "0.619845", "0.6197313", "0.6194298", "0.6175303", "0.6164074", "0.6154842", "0.61519873" ]
0.7089358
1
Update the specified P3aulac1m1 in storage.
public function update($id, UpdateP3aulac1m1Request $request) { $p3aulac1m1 = $this->p3aulac1m1Repository->find($id); if (empty($p3aulac1m1)) { Flash::error('P3Aulac1M1 not found'); return redirect(route('p3aulac1m1s.index')); } $p3aulac1m1 = $this->p3aulac1m1Repository->update($request->all(), $id); Flash::success('P3Aulac1M1 updated successfully.'); return redirect(route('p3aulac1m1s.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update_photo_3($image_3,$image_3_md5,$id,$image_3_temp_name){\n\n\t\t$sql = $this->query(\"UPDATE `products` SET `image_3` = '$image_3_md5' WHERE `id` = '$id'\");\n\n\t\t\t $destination = '../'.$image_3_md5;\n\n\t\tmove_uploaded_file($image_3_temp_name,$destination);\n\n\t\t$this->redirect_to('edit_products.php?pro_id='.$id);\n\n\t}", "public function testUpdateMetadata3UsingPUT()\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($kelasMateri);", "public function update($id, UpdateAp3aulac3m2Request $request)\n {\n $ap3aulac3m2 = $this->ap3aulac3m2Repository->find($id);\n\n if (empty($ap3aulac3m2)) {\n Flash::error('Ap3Aulac3M2 not found');\n\n return redirect(route('ap3aulac3m2s.index'));\n }\n\n $ap3aulac3m2 = $this->ap3aulac3m2Repository->update($request->all(), $id);\n\n Flash::success('Ap3Aulac3M2 updated successfully.');\n\n return redirect(route('ap3aulac3m2s.index'));\n }", "public function update(){\n $db = Database::getInstance() ;\n $db->query(\"UPDATE canciones SET ncancion=:nca, idGen=:idGen, album=:alb WHERE idcancion=:idc ;\",\n [\":nca\"=>$this->ncancion,\n \":idGen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":idc\"=>$this->idcancion]) ;\n \n }", "public function update($id, UpdateAp1aulac2m1Request $request)\n {\n $ap1aulac2m1 = $this->ap1aulac2m1Repository->find($id);\n\n if (empty($ap1aulac2m1)) {\n Flash::error('Ap1Aulac2M1 not found');\n\n return redirect(route('ap1aulac2m1s.index'));\n }\n\n $ap1aulac2m1 = $this->ap1aulac2m1Repository->update($request->all(), $id);\n\n Flash::success('Ap1Aulac2M1 updated successfully.');\n\n return redirect(route('ap1aulac2m1s.index'));\n }", "function update() {\r\n\r\n\t\t$this->connection = new Connection();\r\n\t\t$conn = $this->connection->openConnection();\r\n\r\n\t\t$insert = $conn->prepare(\"UPDATE `panier` SET `quantite`=:quantite WHERE id_internaute=:id_internaute AND id_nourriture=:id_nourriture AND datep=:datep\");\r\n\t\ttry {\r\n\t\t\t$result = $insert->execute(array('quantite' => $this->getQuantite(),'id_internaute' => $this->getId_internaute(),'id_nourriture' => $this->getId_nourriture(),'datep' => $this->getDate()));\r\n\t\t\t\r\n\t\t} catch (PDOExecption $e) {\r\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"</br>\";\r\n\t\t}\r\n\t\t$this->connection->closeConnection();\r\n\t}", "public function update($id, UpdateAp4aulac2m1Request $request)\n {\n $ap4aulac2m1 = $this->ap4aulac2m1Repository->find($id);\n\n if (empty($ap4aulac2m1)) {\n Flash::error('Ap4Aulac2M1 not found');\n\n return redirect(route('ap4aulac2m1s.index'));\n }\n\n $ap4aulac2m1 = $this->ap4aulac2m1Repository->update($request->all(), $id);\n\n Flash::success('Ap4Aulac2M1 updated successfully.');\n\n return redirect(route('ap4aulac2m1s.index'));\n }", "protected function update_single_to_1_3_0() {\n\n\t\t$this->update_points_type_settings_to_1_3_0();\n\t}", "public function store(CreateP3aulac1m1Request $request)\n {\n $input = $request->all();\n\n $p3aulac1m1 = $this->p3aulac1m1Repository->create($input);\n\n Flash::success('P3Aulac1M1 saved successfully.');\n\n return redirect(route('p3aulac1m1s.index'));\n }", "abstract public function mass_update();", "public function update($uavmDocument);", "function update_cap1_cm($id,$pr,$ie,$cm,$data,$tb){\n $this->db->where('id_local',$id);\n $this->db->where('Nro_Pred',$pr);\n $this->db->where('P1_A_2_NroIE',$ie);\n $this->db->where('P1_A_2_9_NroCMod',$cm);\n $this->db->update($tb,$data);\n return $this->db->affected_rows() > 0;\n }", "public function update() {\r\n\r\n\t}", "public function update(){\n\t//\tprint_r($this->country);\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",description=\\\"$this->description\\\",tags=\\\"$this->tags\\\",area_id=\".$this->area_id.\",image=\\\"$this->image\\\",created_at=$this->created_at,is_public=$this->is_public,price=$this->price where id=\".$this->id;\n\t\tExecutor::doit($sql);\n\t}", "function alterar($id_n3, $id_tema, $id_n2, $publicado, $n3_perfil, $ordem, $dbhw) {\n\tglobal $esquemaadmin;\n\t$dataCol = array(\n\t\t\t\"publicado\" => $publicado,\n\t\t\t\"id_tema\" => $id_tema,\n\t\t\t\"ordem\" => $ordem,\n\t\t\t\"n3_perfil\" => $n3_perfil\n\t);\n\t$resultado = i3GeoAdminUpdate($dbhw,\"i3geoadmin_n3\",$dataCol,\"WHERE id_n3 = $id_n3\");\n\tif ($resultado === false) {\n\t\treturn false;\n\t}\n\treturn $id_n3;\n}", "abstract public function updateData();", "public function Do_update_Example1(){\n\n\t}", "public function update(){\n\t\t\ttry{\n\t\t\t\t$this->db->trans_start();\n\t\t\t\t$this->db->where(array(\"id_paciente\"=>$this->id_paciente));\n \t\t$this->db->update(\"paciente\", $this->form_data);\n \t\t$this->db->trans_complete();\n\t\t\t\treturn array(\"message\"=>\"ok\");\n\t\t\t} catch (Exception $e){\n\t\t\t\treturn(array(\"message\"=>\"error: $e\"));\n\t\t\t}\n\t\t}", "public function db_update() {}", "public function testUpdateMetadata1UsingPUT()\n {\n }", "public function update($data) {}", "public function update($data) {}", "static public function mdlActualizarEstIngreso($tabla, $item1, $valor1, $item2, $valor2, $item3, $valor3){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET $item1 = :$item1, $item2 = :$item2 WHERE $item3 = :$item3\");\n\n\t\t$stmt -> bindParam(\":\".$item1, $valor1, PDO::PARAM_STR);\n\t\t$stmt -> bindParam(\":\".$item2, $valor2, PDO::PARAM_STR);\n\t\t$stmt -> bindParam(\":\".$item3, $valor3, PDO::PARAM_STR);\n\n\t\tif($stmt -> execute()){\n\n\t\t\treturn \"ok\";\n\t\t\n\t\t}else{\n\n\t\t\treturn \"error\";\t\n\n\t\t}\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\t\t\n\t}", "public function update($attream);", "public function update($mambot);", "public function update()\n\t{\n\n\t}", "public static function update($data){\r\n $sql=\"UPDATE voiture SET immatriculation= :immat, marque = :marque, couleur= :couleur WHERE immatriculation = :immat \";\r\n $req_prep = model1::$pdo->prepare($sql);\r\n $values = array(\"immat\"=>$data['immatriculation'],\"marque\"=>$data['marque'],\"couleur\"=>$data['couleur']);\r\n $immat = $data['immatriculation'];\r\n $req_prep->execute($values);\r\n $msg=\"La voiture , $immat, a été modifiée\";\r\n return $msg;\r\n }", "public function update();" ]
[ "0.56033444", "0.54819816", "0.54792666", "0.5471709", "0.530693", "0.52570504", "0.525203", "0.519498", "0.51890165", "0.51622075", "0.51510334", "0.51295906", "0.51239043", "0.51205236", "0.51174164", "0.51037806", "0.50993997", "0.5080502", "0.5064109", "0.5030209", "0.5029181", "0.50157154", "0.50079876", "0.50079876", "0.49954364", "0.49875268", "0.49553722", "0.49404123", "0.4936251", "0.49329394" ]
0.6330294
0
Operation createMetaformWithHttpInfo create new Metaform
public function createMetaformWithHttpInfo($realmId, $payload) { $returnType = '\Metatavu\Metaform\Api\Model\Metaform'; $request = $this->createMetaformRequest($realmId, $payload); try { try { $response = $this->client->send($request); } catch (RequestException $e) { $umaResponse = $this->umaRetry($request, $e); if ($umaResponse) { $response = $umaResponse; } else { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null ); } } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $request->getUri() ), $statusCode, $response->getHeaders(), $response->getBody() ); } $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = $responseBody->getContents(); if ($returnType !== 'string') { $content = json_decode($content); } } return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Metatavu\Metaform\Api\Model\Metaform', $e->getResponseHeaders() ); $e->setResponseObject($data); break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Metatavu\Metaform\Api\Model\BadRequest', $e->getResponseHeaders() ); $e->setResponseObject($data); break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Metatavu\Metaform\Api\Model\Forbidden', $e->getResponseHeaders() ); $e->setResponseObject($data); break; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Metatavu\Metaform\Api\Model\NotFound', $e->getResponseHeaders() ); $e->setResponseObject($data); break; case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Metatavu\Metaform\Api\Model\InternalServerError', $e->getResponseHeaders() ); $e->setResponseObject($data); break; } throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create($newmeta) {\n\t\tif ($this->req ['auth_type'] == 'oauth') {\n\t\t\tif (is_string ( $newmeta ) && isset ( $_POST ['properties'] ) && is_object ( json_decode ( $_POST ['properties'] ) )) {\n\t\t\t\tif ($this->isCreateable ()) {\n\t\t\t\t\t// @TODO\n\t\t\t\t\t// Need to convert because there is an old structure\n\t\t\t\t\t$aMetavalues = array ();\n\t\t\t\t\tforeach ( json_decode ( $_POST ['properties'] ) as $sName => $sValue ) {\n\t\t\t\t\t\tarray_push ( $aMetavalues, array ('name' => $sName, 'value' => $sValue ) );\n\t\t\t\t\t}\n\t\t\t\t\tif (count ( $aMetavalues ) <= 150) {\n\t\t\t\t\t\t$iPrimaryMeta = ( int ) $this->oMetas->insertMeta ( array ('name' => $newmeta, 'accounts_idaccount' => $this->usr, 'namespaces_idnamespace' => $this->req ['request'] ['ns'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (( int ) $iPrimaryMeta > 0 && count ( $aMetavalues ) > 0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($this->setUsage ( $this->usr, array ('maxmetas' => 1 ) )) {\n\t\t\t\t\t\t\t\tif ($this->oMetavalue->insertValue ( $aMetavalues, $iPrimaryMeta )) {\n\t\t\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('message' => 'Metaitem was created', 'meta' => $iPrimaryMeta ) );\n\t\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$this->addEntry ( 'response', $this->oError->throwError ( 'META_BUDGET_LIMIT_REACHED' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_EXISTS' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'TO_MUCH_PROPERTYS' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'OAUTH_ONLY' ) );\n\t\t}\n\t\treturn $this->getResponse ();\n\t}", "public function findMetaformWithHttpInfo($realmId, $metaformId)\n {\n $returnType = '\\Metatavu\\Metaform\\Api\\Model\\Metaform';\n $request = $this->findMetaformRequest($realmId, $metaformId);\n\n try {\n\n try {\n $response = $this->client->send($request);\n } catch (RequestException $e) {\n $umaResponse = $this->umaRetry($request, $e);\n if ($umaResponse) {\n $response = $umaResponse; \n } else {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null\n );\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Metaform',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\BadRequest',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Forbidden',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\NotFound',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\InternalServerError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function listMetaformsWithHttpInfo($realmId)\n {\n $returnType = '\\Metatavu\\Metaform\\Api\\Model\\Metaform[]';\n $request = $this->listMetaformsRequest($realmId);\n\n try {\n\n try {\n $response = $this->client->send($request);\n } catch (RequestException $e) {\n $umaResponse = $this->umaRetry($request, $e);\n if ($umaResponse) {\n $response = $umaResponse; \n } else {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null\n );\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Metaform[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\BadRequest',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Forbidden',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\InternalServerError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function create($form)\n {\n $endpoint = 'https://api.hubapi.com/forms/v2/forms';\n\n $options['json'] = $form;\n\n return $this->client->request('post', $endpoint, $options);\n }", "function gotravel_mikado_add_meta_box($attributes) {\n\t\t$scope = array();\n\t\t$title = '';\n\t\t$hidden_property = '';\n\t\t$hidden_values = array();\n\t\t$name = '';\n\n\t\textract($attributes);\n\n\t\tif(!empty($scope) && $title !== '' && $name !== '') {\n\t\t\t$meta_box_obj = new GoTravelMikadoMetaBox($scope, $title, $hidden_property, $hidden_values, $name);\n\t\t\tgotravel_mikado_framework()->mkdMetaBoxes->addMetaBox($name, $meta_box_obj);\n\n\t\t\treturn $meta_box_obj;\n\t\t}\n\n\t\treturn false;\n\t}", "protected function createMetaformRequest($realmId, $payload)\n {\n // verify the required parameter 'realmId' is set\n if ($realmId === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $realmId when calling createMetaform'\n );\n }\n // verify the required parameter 'payload' is set\n if ($payload === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling createMetaform'\n );\n }\n\n $resourcePath = '/realms/{realmId}/metaforms';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($realmId !== null) {\n $resourcePath = str_replace(\n '{' . 'realmId' . '}',\n ObjectSerializer::toPathValue($realmId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($payload)) {\n $_tempBody = $payload;\n }\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json;charset=utf-8']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json;charset=utf-8'],\n ['application/json;charset=utf-8']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\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 createMetaformAsyncWithHttpInfo($realmId, $payload)\n {\n $returnType = '\\Metatavu\\Metaform\\Api\\Model\\Metaform';\n $request = $this->createMetaformRequest($realmId, $payload);\n\n return $this->client\n ->sendAsync($request)\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function deleteMetaformWithHttpInfo($realmId, $metaformId)\n {\n $returnType = '';\n $request = $this->deleteMetaformRequest($realmId, $metaformId);\n\n try {\n\n try {\n $response = $this->client->send($request);\n } catch (RequestException $e) {\n $umaResponse = $this->umaRetry($request, $e);\n if ($umaResponse) {\n $response = $umaResponse; \n } else {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null\n );\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\BadRequest',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Forbidden',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\NotFound',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\InternalServerError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\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 wp_create_initial_post_meta()\n {\n }", "public function createMetaform($realmId, $payload)\n {\n list($response) = $this->createMetaformWithHttpInfo($realmId, $payload);\n return $response;\n }", "function gotravel_mikado_add_meta_box_field($attributes) {\n\t\t$type = '';\n\t\t$name = '';\n\t\t$default_value = '';\n\t\t$label = '';\n\t\t$description = '';\n\t\t$options = array();\n\t\t$args = array();\n\t\t$hidden_property = '';\n\t\t$hidden_values = array();\n\t\t$parent = '';\n\n\t\textract($attributes);\n\n\t\tif(!empty($parent) && !empty($type) && !empty($name)) {\n\t\t\t$field = new GoTravelMikadoMetaField($type, $name, $default_value, $label, $description, $options, $args, $hidden_property, $hidden_values);\n\n\t\t\tif(is_object($parent)) {\n\t\t\t\t$parent->addChild($name, $field);\n\n\t\t\t\treturn $field;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "protected function build_meta( Meta_Tags_Context $context ) {\n\t\treturn new Meta( $context, $this->container );\n\t}", "public function updateMetaformWithHttpInfo($realmId, $metaformId, $payload)\n {\n $returnType = '\\Metatavu\\Metaform\\Api\\Model\\Metaform';\n $request = $this->updateMetaformRequest($realmId, $metaformId, $payload);\n\n try {\n\n try {\n $response = $this->client->send($request);\n } catch (RequestException $e) {\n $umaResponse = $this->umaRetry($request, $e);\n if ($umaResponse) {\n $response = $umaResponse; \n } else {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null\n );\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Metaform',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\BadRequest',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Forbidden',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\NotFound',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\InternalServerError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function create() {\n\n //page settings\n $page = $this->pageSettings('create');\n\n //reponse payload\n $payload = [\n 'page' => $page,\n ];\n\n //show the form\n return new CreateResponse($payload);\n }", "public function add($info, $meta)\r\n {\r\n\r\n }", "public function getCreateMeta(array $paramArray = [], bool $expand = true): object\n {\n $paramArray['expand'] = ($expand) ? 'projects.issuetypes.fields' : null;\n $paramArray = array_filter($paramArray);\n\n $queryParam = '?'.http_build_query($paramArray);\n\n $ret = $this->exec($this->uri.'/createmeta'.$queryParam, null);\n\n return json_decode($ret);\n }", "public function v1PropertyTemplatesFormsGetWithHttpInfo($accept_language = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\TemplateMetadataResponse[]';\n $request = $this->v1PropertyTemplatesFormsGetRequest($accept_language);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TemplateMetadataResponse[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\ProblemDetails',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function createFromPost($info)\n\t{\n\t\t//task info\n\t\tif (isset($_SESSION['userid'])) $this->userid = $_SESSION['userid'];\n\t\t\n\t\tif (isset($info['title'])) $this->title = $info['title'];\n\t\t\n\t\tif (isset($info['description'])) $this->description = $info['description'];\n\t\t\n\t\tif (isset($info['content'])) $this->content = $info['content'];\n\t\t\n\t\tif (isset($info['location'])) $this->location = $info['location'];\n\t\t\n\t\tif (isset($info['price'])) $this->price = $info['price'];\n\t\t\n\t\t//metadata\n\t\tif (isset($info['category'])) $this->category = $info['category'];\n\t\t\n\t\tif (isset($info['tags'])) $this->tags = $info['tags'];\n\t\t\n\t\tif (isset($info['numimg'])) $this->numimg = $info['numimg'];\n\t\t\n\t\tif (isset($info['enddatetime'])) $this->enddatetime = $info['enddatetime'];\n\t}", "public function createForm($formId, $request)\n {\n return $this->start()->uri(\"/api/form\")\n ->urlSegment($formId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "protected function createProductsMetaDataRequest($body, $product_id)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createProductsMetaData'\n );\n }\n // verify the required parameter 'product_id' is set\n if ($product_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $product_id when calling createProductsMetaData'\n );\n }\n if ($product_id < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$product_id\" when calling DefaultApi.createProductsMetaData, must be bigger than or equal to 1.');\n }\n $resourcePath = '/products/{productId}/meta-data';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // path params\n if ($product_id !== null) {\n $resourcePath = str_replace(\n '{' . 'productId' . '}',\n ObjectSerializer::toPathValue($product_id),\n $resourcePath\n );\n }\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n \n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n \n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "function create_add_form($fields, $meta, $post, $context = '' ){\r\n\t\t$nonce = wp_create_nonce( 'wck-add-meta' );\r\n\t\tif( !empty( $post->ID ) )\r\n\t\t\t$post_id = $post->ID;\r\n\t\telse\r\n\t\t\t$post_id = '';\r\n\r\n /* for single forms we need the values that are stored in the meta */\r\n if( $this->args['single'] == true ) {\r\n if ($this->args['context'] == 'post_meta')\r\n $results = get_post_meta($post_id, $meta, true);\r\n else if ($this->args['context'] == 'option')\r\n $results = get_option( apply_filters( 'wck_option_meta' , $meta ));\r\n\r\n /* Filter primary used for CFC/OPC fields in order to show/hide fields based on type */\r\n $wck_update_container_css_class = apply_filters(\"wck_add_form_class_{$meta}\", '', $meta, $results );\r\n }\r\n ?>\r\n\t\t<div id=\"<?php echo $meta ?>\" style=\"padding:10px 0;\" class=\"wck-add-form<?php if( $this->args['single'] ) echo ' single' ?> <?php if( !empty( $wck_update_container_css_class ) ) echo $wck_update_container_css_class; ?>\">\r\n\t\t\t<ul class=\"mb-list-entry-fields\">\r\n\t\t\t\t<?php\r\n\t\t\t\t$element_id = 0;\r\n\t\t\t\tif( !empty( $fields ) ){\r\n\t\t\t\t\tforeach( $fields as $details ){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdo_action( \"wck_before_add_form_{$meta}_element_{$element_id}\" );\r\n\r\n /* set values in the case of single forms */\r\n $value = '';\r\n if( $this->args['single'] == true ) {\r\n $value = null;\r\n if (isset($results[0][Wordpress_Creation_Kit_PB::wck_generate_slug($details['title'], $details )]))\r\n $value = $results[0][Wordpress_Creation_Kit_PB::wck_generate_slug($details['title'], $details )];\r\n }\r\n ?>\r\n\t\t\t\t\t\t\t<li class=\"row-<?php echo esc_attr( Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ) ) ?>\">\r\n <?php echo self::wck_output_form_field( $meta, $details, $value, $context, $post_id ); ?>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdo_action( \"wck_after_add_form_{$meta}_element_{$element_id}\" );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$element_id++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t?>\r\n <?php if( ! $this->args['single'] || $this->args['context'] == 'option' ){ ?>\r\n <li style=\"overflow:visible;\" class=\"add-entry-button\">\r\n <a href=\"javascript:void(0)\" class=\"button-primary\" onclick=\"addMeta('<?php echo esc_js($meta); ?>', '<?php echo esc_js( $post_id ); ?>', '<?php echo esc_js($nonce); ?>')\"><span><?php if( $this->args['single'] ) echo apply_filters( 'wck_add_entry_button', __( 'Save', 'profile-builder' ), $meta, $post ); else echo apply_filters( 'wck_add_entry_button', __( 'Add Entry', 'wck' ), $meta, $post ); ?></span></a>\r\n </li>\r\n <?php }elseif($this->args['single'] && $this->args['context'] == 'post_meta' ){ ?>\r\n <input type=\"hidden\" name=\"_wckmetaname_<?php echo $meta ?>#wck\" value=\"true\">\r\n <?php } ?>\r\n </ul>\r\n\t\t</div>\r\n\t\t<script>wck_set_to_widest( '.field-label', '<?php echo $meta ?>' );</script>\r\n\t\t<?php\r\n\t}", "public function Create($extra_meta=array()) {\n $form_instance = $this->form_instance;\n // Retrieve the form instance\n $action_instance = $this->action_instance;\n // Create a new entry SQL helper\n $entries_sql_helper = new VCFF_Reports_Helper_SQL_Entries();\n // Add the entry\n $entries_sql_helper\n ->Add_Entry(array(\n 'form_uuid' => $form_instance->Get_UUID(),\n 'form_type' => $form_instance->Get_Type(),\n 'event_id' => $action_instance->Get_ID(),\n 'event_code' => $action_instance->Get_Code(),\n 'source_url' => 'http://something',\n ));\n // If extra meta information was supplied\n if ($extra_meta && is_array($extra_meta)) {\n // Loop through each submission meta item\n foreach ($extra_meta as $meta_key => $meta_data) {\n // Add the submission meta item\n $entries_sql_helper\n ->Add_Meta_Item(array(\n 'meta_code' => $meta_data['meta_code'],\n 'meta_value' => $meta_data['meta_value'],\n 'meta_label' => $meta_data['meta_label'],\n ));\n }\n }\n // Return the form fields\n $form_fields = $form_instance->fields;\n // Loop through each form field\n foreach ($form_fields as $machine_code => $field_instance) { \n // Add the entry\n $entries_sql_helper\n ->Add_Field_Item(array(\n 'machine_code' => $machine_code,\n 'field_label' => $field_instance->Get_Label(),\n 'field_value' => $field_instance->Get_Value(),\n 'field_value_html' => $field_instance->Get_HTML_Value(false),\n 'field_value_text' => $field_instance->Get_TEXT_Value(false),\n ));\n }\n // Store and retrieve the stored entry\n $entry = $entries_sql_helper->Store();\n \n $flags_sql_helper = new VCFF_Reports_Helper_SQL_Flags();\n \n $flags_sql_helper\n ->Add_Flag(array(\n 'entry_uuid' => $entry['uuid'],\n 'form_uuid' => $form_instance->Get_UUID(),\n 'flag_code' => 'unread',\n 'flag_data' => array('hey'),\n ))\n ->Store();\n \n return $this;\n }", "public function create()\n {\n return view('backend.meta.create');\n }", "function wck_add_form( $meta = '', $id = '' ){\r\n\t\t\r\n\t\t$post = get_post($id);\r\n\r\n\t\tob_start();\t\t\t\r\n\t\t\tself::create_add_form($this->args['meta_array'], $meta, $post );\r\n\t\t\tdo_action( \"wck_ajax_add_form_{$meta}\", $id );\r\n\t\t$add_form = ob_get_clean();\r\n\t\t\r\n\t\treturn $add_form;\r\n\t}", "abstract public function createForm();", "abstract public function createForm();", "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}", "private function createFormDefinition()\n {\n $id = $this->getServiceId('form_type');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('form'));\n $definition\n ->setArguments([$this->options['entity']])\n ->addTag('form.type', [\n 'alias' => sprintf('%s_%s', $this->prefix, $this->resourceName)]\n )\n ;\n $this->container->setDefinition($id, $definition);\n }\n }" ]
[ "0.57311845", "0.53547776", "0.5318454", "0.52928287", "0.51895624", "0.50029993", "0.49975428", "0.4963228", "0.48692334", "0.48590264", "0.48358735", "0.48164493", "0.4804031", "0.47155854", "0.46993595", "0.4649088", "0.46084288", "0.45808423", "0.45436904", "0.4537655", "0.45366776", "0.4521953", "0.4510562", "0.44883698", "0.44818443", "0.44741794", "0.44615185", "0.44615185", "0.44493228", "0.44388106" ]
0.6405983
0
Operation createMetaformAsync create new Metaform
public function createMetaformAsync($realmId, $payload) { return $this->createMetaformAsyncWithHttpInfo($realmId, $payload) ->then( function ($response) { return $response[0]; } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create($form)\n {\n $endpoint = 'https://api.hubapi.com/forms/v2/forms';\n\n $options['json'] = $form;\n\n return $this->client->request('post', $endpoint, $options);\n }", "public function create()\n {\n\t\t$js = [Module::asset(\"metafields:js/post.js\")];\n\t\tView::share('js_script', $js);\n return view('metafields::backend.create',array(\"title\" => \"Create Metafield\"));\n }", "public function create()\n {\n return view('backend.meta.create');\n }", "public function createMetaformAsyncWithHttpInfo($realmId, $payload)\n {\n $returnType = '\\Metatavu\\Metaform\\Api\\Model\\Metaform';\n $request = $this->createMetaformRequest($realmId, $payload);\n\n return $this->client\n ->sendAsync($request)\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function create() {\n\n //page settings\n $page = $this->pageSettings('create');\n\n //reponse payload\n $payload = [\n 'page' => $page,\n ];\n\n //show the form\n return new CreateResponse($payload);\n }", "public function createForm();", "public function createForm();", "public function createForm()\n {\n }", "abstract public function createForm();", "abstract public function createForm();", "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 $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create($newmeta) {\n\t\tif ($this->req ['auth_type'] == 'oauth') {\n\t\t\tif (is_string ( $newmeta ) && isset ( $_POST ['properties'] ) && is_object ( json_decode ( $_POST ['properties'] ) )) {\n\t\t\t\tif ($this->isCreateable ()) {\n\t\t\t\t\t// @TODO\n\t\t\t\t\t// Need to convert because there is an old structure\n\t\t\t\t\t$aMetavalues = array ();\n\t\t\t\t\tforeach ( json_decode ( $_POST ['properties'] ) as $sName => $sValue ) {\n\t\t\t\t\t\tarray_push ( $aMetavalues, array ('name' => $sName, 'value' => $sValue ) );\n\t\t\t\t\t}\n\t\t\t\t\tif (count ( $aMetavalues ) <= 150) {\n\t\t\t\t\t\t$iPrimaryMeta = ( int ) $this->oMetas->insertMeta ( array ('name' => $newmeta, 'accounts_idaccount' => $this->usr, 'namespaces_idnamespace' => $this->req ['request'] ['ns'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (( int ) $iPrimaryMeta > 0 && count ( $aMetavalues ) > 0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($this->setUsage ( $this->usr, array ('maxmetas' => 1 ) )) {\n\t\t\t\t\t\t\t\tif ($this->oMetavalue->insertValue ( $aMetavalues, $iPrimaryMeta )) {\n\t\t\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('message' => 'Metaitem was created', 'meta' => $iPrimaryMeta ) );\n\t\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$this->addEntry ( 'response', $this->oError->throwError ( 'META_BUDGET_LIMIT_REACHED' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_EXISTS' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'TO_MUCH_PROPERTYS' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'OAUTH_ONLY' ) );\n\t\t}\n\t\treturn $this->getResponse ();\n\t}", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create(TaskFormBuilder $form)\n {\n return $form->render();\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create(){\n \n $razas = Raza::get();\n include 'views/mascota/form_new.php';\n }", "public function createMetaformWithHttpInfo($realmId, $payload)\n {\n $returnType = '\\Metatavu\\Metaform\\Api\\Model\\Metaform';\n $request = $this->createMetaformRequest($realmId, $payload);\n\n try {\n\n try {\n $response = $this->client->send($request);\n } catch (RequestException $e) {\n $umaResponse = $this->umaRetry($request, $e);\n if ($umaResponse) {\n $response = $umaResponse; \n } else {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null\n );\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Metaform',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\BadRequest',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Forbidden',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\NotFound',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\InternalServerError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function create()\n {\n // I skip using this create function because I use a modal form for inserting data using modal in index view via index function.\n }", "public function create()\n {\n $form = [\n \"name\" => [\n \"label\" => \"Name\",\n \"type\" => \"text\",\n \"value\" => old(\"name\"),\n \"required\" => true\n\n ],\n \"slug\" => [\n \"label\" => \"Code\",\n \"type\" => \"text\",\n \"value\" => old(\"slug\"),\n \"required\" => true\n ],\n \n \"icon\" => [\n \"label\" => \"Icon\",\n \"type\" => \"file\",\n \"attr\" => [\n \"accept\" => \"image/*\"\n ]\n ],\n \"status\" => [\n \"label\" => \"Status\",\n \"type\" => \"radio\",\n \"value\" => old(\"status\"),\n \"options\" => [[\"id\" => 1 ,\"name\" => \"Active\"],[\"id\" => 0 ,\"name\" => \"Deactive\"]],\n \"options_value\" => \"id\",\n \"options_label\" => \"name\",\n \"required\" => true,\n \"value\" => 1\n ]\n ];\n $this->_DATA[\"_ROUTE\"] = route($this->_ROUTE_FIX.\".\".$this->_ROUTE.\".store\");\n $this->_DATA[\"_PAGETILE\"] = $this->_DATA[\"_PAGETILE\"]; \n return $this->_CreateItem($form);\n }", "public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_presenca/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_presenca.create')\n;\n\t}", "public function create()\n {\n $url = route('dashboard.attributes.store');\n $html = view('partials.form.form-attribute', ['url' => $url, 'idForm' => 'form-create'])->render();\n\n return response()->json(['html' => $html], 200);\n }", "public function CreateForm();", "private function createCreateForm(Task $entity)\n {\n //$form = $this->createForm(new TaskType(), $entity, array( \n //pero para Symfony3.4.15 ahora es:\n $form = $this->createForm(TaskType::class, $entity, array( \n 'action' => $this->generateUrl('infunisa_task_create'),\n 'method' => 'POST'\n ));\n \n return $form;\n }", "public static function create() {\n\t\tFrmAppHelper::permission_check('frm_edit_forms');\n check_ajax_referer( 'frm_ajax', 'nonce' );\n\n\t\t$field_type = FrmAppHelper::get_post_param( 'field_type', '', 'sanitize_text_field' );\n\t\t$form_id = FrmAppHelper::get_post_param( 'form_id', 0, 'absint' );\n\n\t\t$field = self::include_new_field( $field_type, $form_id );\n\n // this hook will allow for multiple fields to be added at once\n do_action('frm_after_field_created', $field, $form_id);\n\n wp_die();\n }", "public function create(ClueEnFormBuilder $form): Response\n {\n return $form->render();\n }", "public function create()\n {\n return view('backend.farmacia.create');\n }", "public function create()\n {\n $categories = $this->categoryDocMetaRepository->getAllForSelectBox(['id', 'name'], null, true);\n return view('backend.document_metas.create', compact('categories'));\n }" ]
[ "0.606697", "0.6017676", "0.5960936", "0.5834059", "0.5632363", "0.5491608", "0.5491608", "0.54349566", "0.5410296", "0.5410296", "0.5387688", "0.5387688", "0.5378113", "0.5378113", "0.5282771", "0.5271477", "0.52691305", "0.5236615", "0.5219709", "0.5214813", "0.51808935", "0.51243126", "0.51240534", "0.51230097", "0.5117889", "0.5116115", "0.5115985", "0.51051676", "0.50733626", "0.5061474" ]
0.6447953
0
Operation createMetaformAsyncWithHttpInfo create new Metaform
public function createMetaformAsyncWithHttpInfo($realmId, $payload) { $returnType = '\Metatavu\Metaform\Api\Model\Metaform'; $request = $this->createMetaformRequest($realmId, $payload); return $this->client ->sendAsync($request) ->then( function ($response) use ($returnType) { $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = $responseBody->getContents(); if ($returnType !== 'string') { $content = json_decode($content); } } return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; }, function ($exception) { $response = $exception->getResponse(); $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri() ), $statusCode, $response->getHeaders(), $response->getBody() ); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createMetaformWithHttpInfo($realmId, $payload)\n {\n $returnType = '\\Metatavu\\Metaform\\Api\\Model\\Metaform';\n $request = $this->createMetaformRequest($realmId, $payload);\n\n try {\n\n try {\n $response = $this->client->send($request);\n } catch (RequestException $e) {\n $umaResponse = $this->umaRetry($request, $e);\n if ($umaResponse) {\n $response = $umaResponse; \n } else {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null\n );\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Metaform',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\BadRequest',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Forbidden',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\NotFound',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\InternalServerError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function createMetaformAsync($realmId, $payload)\n {\n return $this->createMetaformAsyncWithHttpInfo($realmId, $payload)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function create($form)\n {\n $endpoint = 'https://api.hubapi.com/forms/v2/forms';\n\n $options['json'] = $form;\n\n return $this->client->request('post', $endpoint, $options);\n }", "public function create($newmeta) {\n\t\tif ($this->req ['auth_type'] == 'oauth') {\n\t\t\tif (is_string ( $newmeta ) && isset ( $_POST ['properties'] ) && is_object ( json_decode ( $_POST ['properties'] ) )) {\n\t\t\t\tif ($this->isCreateable ()) {\n\t\t\t\t\t// @TODO\n\t\t\t\t\t// Need to convert because there is an old structure\n\t\t\t\t\t$aMetavalues = array ();\n\t\t\t\t\tforeach ( json_decode ( $_POST ['properties'] ) as $sName => $sValue ) {\n\t\t\t\t\t\tarray_push ( $aMetavalues, array ('name' => $sName, 'value' => $sValue ) );\n\t\t\t\t\t}\n\t\t\t\t\tif (count ( $aMetavalues ) <= 150) {\n\t\t\t\t\t\t$iPrimaryMeta = ( int ) $this->oMetas->insertMeta ( array ('name' => $newmeta, 'accounts_idaccount' => $this->usr, 'namespaces_idnamespace' => $this->req ['request'] ['ns'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (( int ) $iPrimaryMeta > 0 && count ( $aMetavalues ) > 0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($this->setUsage ( $this->usr, array ('maxmetas' => 1 ) )) {\n\t\t\t\t\t\t\t\tif ($this->oMetavalue->insertValue ( $aMetavalues, $iPrimaryMeta )) {\n\t\t\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('message' => 'Metaitem was created', 'meta' => $iPrimaryMeta ) );\n\t\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$this->addEntry ( 'response', $this->oError->throwError ( 'META_BUDGET_LIMIT_REACHED' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_EXISTS' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'TO_MUCH_PROPERTYS' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'OAUTH_ONLY' ) );\n\t\t}\n\t\treturn $this->getResponse ();\n\t}", "public function createTokenAsyncWithHttpInfo($options)\n {\n $returnType = '\\Fastly\\Model\\TokenCreatedResponse';\n $request = $this->createTokenRequest($options);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function createApplicationAsyncWithHttpInfo($application_request)\n {\n $returnType = '\\RusticiSoftware\\Cloud\\V2\\Model\\ApplicationSchema';\n $request = $this->createApplicationRequest($application_request);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "function gotravel_mikado_add_meta_box($attributes) {\n\t\t$scope = array();\n\t\t$title = '';\n\t\t$hidden_property = '';\n\t\t$hidden_values = array();\n\t\t$name = '';\n\n\t\textract($attributes);\n\n\t\tif(!empty($scope) && $title !== '' && $name !== '') {\n\t\t\t$meta_box_obj = new GoTravelMikadoMetaBox($scope, $title, $hidden_property, $hidden_values, $name);\n\t\t\tgotravel_mikado_framework()->mkdMetaBoxes->addMetaBox($name, $meta_box_obj);\n\n\t\t\treturn $meta_box_obj;\n\t\t}\n\n\t\treturn false;\n\t}", "public function v1PropertyTemplatesFormsGetAsyncWithHttpInfo($accept_language = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\TemplateMetadataResponse[]';\n $request = $this->v1PropertyTemplatesFormsGetRequest($accept_language);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "protected function createMetaformRequest($realmId, $payload)\n {\n // verify the required parameter 'realmId' is set\n if ($realmId === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $realmId when calling createMetaform'\n );\n }\n // verify the required parameter 'payload' is set\n if ($payload === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $payload when calling createMetaform'\n );\n }\n\n $resourcePath = '/realms/{realmId}/metaforms';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($realmId !== null) {\n $resourcePath = str_replace(\n '{' . 'realmId' . '}',\n ObjectSerializer::toPathValue($realmId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($payload)) {\n $_tempBody = $payload;\n }\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json;charset=utf-8']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json;charset=utf-8'],\n ['application/json;charset=utf-8']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function listMetaformsWithHttpInfo($realmId)\n {\n $returnType = '\\Metatavu\\Metaform\\Api\\Model\\Metaform[]';\n $request = $this->listMetaformsRequest($realmId);\n\n try {\n\n try {\n $response = $this->client->send($request);\n } catch (RequestException $e) {\n $umaResponse = $this->umaRetry($request, $e);\n if ($umaResponse) {\n $response = $umaResponse; \n } else {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null\n );\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Metaform[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\BadRequest',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Forbidden',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\InternalServerError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function listMetaformsAsyncWithHttpInfo($realmId)\n {\n $returnType = '\\Metatavu\\Metaform\\Api\\Model\\Metaform[]';\n $request = $this->listMetaformsRequest($realmId);\n\n return $this->client\n ->sendAsync($request)\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function v1PropertyTemplatesClaimsClaimTemplateIdFormsGetAsyncWithHttpInfo($claim_template_id, $accept_language = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\TemplateMetadataResponse[]';\n $request = $this->v1PropertyTemplatesClaimsClaimTemplateIdFormsGetRequest($claim_template_id, $accept_language);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function create() {\n\n //page settings\n $page = $this->pageSettings('create');\n\n //reponse payload\n $payload = [\n 'page' => $page,\n ];\n\n //show the form\n return new CreateResponse($payload);\n }", "public function restStorageFrontendFileMetadataPostAsyncWithHttpInfo($key, $metadata)\n {\n $returnType = 'object[]';\n $request = $this->restStorageFrontendFileMetadataPostRequest($key, $metadata);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function create()\n {\n return view('backend.meta.create');\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 findMetaformWithHttpInfo($realmId, $metaformId)\n {\n $returnType = '\\Metatavu\\Metaform\\Api\\Model\\Metaform';\n $request = $this->findMetaformRequest($realmId, $metaformId);\n\n try {\n\n try {\n $response = $this->client->send($request);\n } catch (RequestException $e) {\n $umaResponse = $this->umaRetry($request, $e);\n if ($umaResponse) {\n $response = $umaResponse; \n } else {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null\n );\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Metaform',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\BadRequest',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\Forbidden',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\NotFound',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Metatavu\\Metaform\\Api\\Model\\InternalServerError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function createPrivateKeyAsyncWithHttpInfo()\n {\n $returnType = '\\Reepay\\Model\\Key';\n $request = $this->createPrivateKeyRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function brandingCreateObjectV1AsyncWithHttpInfo($brandingCreateObjectV1Request, string $contentType = self::contentTypes['brandingCreateObjectV1'][0])\n {\n $returnType = '\\eZmaxAPI\\Model\\BrandingCreateObjectV1Response';\n $request = $this->brandingCreateObjectV1Request($brandingCreateObjectV1Request, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "public function create()\n {\n\t\t$js = [Module::asset(\"metafields:js/post.js\")];\n\t\tView::share('js_script', $js);\n return view('metafields::backend.create',array(\"title\" => \"Create Metafield\"));\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}", "public function createFromPost($info)\n\t{\n\t\t//task info\n\t\tif (isset($_SESSION['userid'])) $this->userid = $_SESSION['userid'];\n\t\t\n\t\tif (isset($info['title'])) $this->title = $info['title'];\n\t\t\n\t\tif (isset($info['description'])) $this->description = $info['description'];\n\t\t\n\t\tif (isset($info['content'])) $this->content = $info['content'];\n\t\t\n\t\tif (isset($info['location'])) $this->location = $info['location'];\n\t\t\n\t\tif (isset($info['price'])) $this->price = $info['price'];\n\t\t\n\t\t//metadata\n\t\tif (isset($info['category'])) $this->category = $info['category'];\n\t\t\n\t\tif (isset($info['tags'])) $this->tags = $info['tags'];\n\t\t\n\t\tif (isset($info['numimg'])) $this->numimg = $info['numimg'];\n\t\t\n\t\tif (isset($info['enddatetime'])) $this->enddatetime = $info['enddatetime'];\n\t}", "public function createQueryTaskAsyncWithHttpInfo($body, $limit = null, $apply_formatting = null, $apply_vis = null, $cache = null, $image_width = null, $image_height = null, $generate_drill_links = null, $force_production = null, $cache_only = null, $path_prefix = null, $rebuild_pdts = null, $server_table_calcs = null, $fields = null)\n {\n $returnType = '\\Looker\\Model\\QueryTask';\n $request = $this->createQueryTaskRequest($body, $limit, $apply_formatting, $apply_vis, $cache, $image_width, $image_height, $generate_drill_links, $force_production, $cache_only, $path_prefix, $rebuild_pdts, $server_table_calcs, $fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "function wp_create_initial_post_meta()\n {\n }", "public function findMetaformAsyncWithHttpInfo($realmId, $metaformId)\n {\n $returnType = '\\Metatavu\\Metaform\\Api\\Model\\Metaform';\n $request = $this->findMetaformRequest($realmId, $metaformId);\n\n return $this->client\n ->sendAsync($request)\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "function gotravel_mikado_add_meta_box_field($attributes) {\n\t\t$type = '';\n\t\t$name = '';\n\t\t$default_value = '';\n\t\t$label = '';\n\t\t$description = '';\n\t\t$options = array();\n\t\t$args = array();\n\t\t$hidden_property = '';\n\t\t$hidden_values = array();\n\t\t$parent = '';\n\n\t\textract($attributes);\n\n\t\tif(!empty($parent) && !empty($type) && !empty($name)) {\n\t\t\t$field = new GoTravelMikadoMetaField($type, $name, $default_value, $label, $description, $options, $args, $hidden_property, $hidden_values);\n\n\t\t\tif(is_object($parent)) {\n\t\t\t\t$parent->addChild($name, $field);\n\n\t\t\t\treturn $field;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function quoteDraftsV2PostAsyncWithHttpInfo($id, $number, $customer_id, $due_date, $quote_date, $created_utc, $approved_date, $currency_code, $status, $currency_rate, $company_reference, $eu_third_party, $customer_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_method_code, $delivery_term_code, $delivery_term_name, $customer_is_private_person, $includes_vat, $is_domestic, $rot_reduced_invoicing_type, $rot_property_type, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_automatic_distribution, $persons, $terms_of_payment, $sales_document_attachments, $rows, $total_amount, $vat_amount, $roundings_amount, $uses_green_technology)\n {\n $returnType = '\\Swagger\\Client\\Model\\QuoteApi';\n $request = $this->quoteDraftsV2PostRequest($id, $number, $customer_id, $due_date, $quote_date, $created_utc, $approved_date, $currency_code, $status, $currency_rate, $company_reference, $eu_third_party, $customer_reference, $invoice_customer_name, $invoice_address1, $invoice_address2, $invoice_postal_code, $invoice_city, $invoice_country_code, $delivery_customer_name, $delivery_address1, $delivery_address2, $delivery_postal_code, $delivery_city, $delivery_country_code, $delivery_method_name, $delivery_method_code, $delivery_term_code, $delivery_term_name, $customer_is_private_person, $includes_vat, $is_domestic, $rot_reduced_invoicing_type, $rot_property_type, $rot_reduced_invoicing_property_name, $rot_reduced_invoicing_org_number, $rot_reduced_invoicing_amount, $rot_reduced_invoicing_automatic_distribution, $persons, $terms_of_payment, $sales_document_attachments, $rows, $total_amount, $vat_amount, $roundings_amount, $uses_green_technology);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\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 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 }", "function wp_ajax_add_meta()\n {\n }" ]
[ "0.5972114", "0.53685987", "0.53198504", "0.53087324", "0.50893253", "0.5036727", "0.501813", "0.49761602", "0.49102962", "0.48582736", "0.48312017", "0.48297074", "0.48210758", "0.47847822", "0.47778726", "0.47754002", "0.4718036", "0.46815997", "0.46687427", "0.46640104", "0.4611271", "0.4583518", "0.45504203", "0.4524425", "0.44453213", "0.44278678", "0.44216925", "0.4415872", "0.44076326", "0.43821886" ]
0.6083456
0
Operation deleteMetaformWithHttpInfo Deletes Metaform
public function deleteMetaformWithHttpInfo($realmId, $metaformId) { $returnType = ''; $request = $this->deleteMetaformRequest($realmId, $metaformId); try { try { $response = $this->client->send($request); } catch (RequestException $e) { $umaResponse = $this->umaRetry($request, $e); if ($umaResponse) { $response = $umaResponse; } else { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null ); } } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $request->getUri() ), $statusCode, $response->getHeaders(), $response->getBody() ); } return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Metatavu\Metaform\Api\Model\BadRequest', $e->getResponseHeaders() ); $e->setResponseObject($data); break; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Metatavu\Metaform\Api\Model\Forbidden', $e->getResponseHeaders() ); $e->setResponseObject($data); break; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Metatavu\Metaform\Api\Model\NotFound', $e->getResponseHeaders() ); $e->setResponseObject($data); break; case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Metatavu\Metaform\Api\Model\InternalServerError', $e->getResponseHeaders() ); $e->setResponseObject($data); break; } throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_meta()\n {\n # process the request which it must be post and ajax request\n if (request()->isPost() && request()->isAjax()) {\n \n $objectId = request()->getPost('object-id', 'int');\n $object = request()->getPost('object', 'alphanum');\n \n $this->setJsonResponse();\n\n $object = PostMeta::findFirstByMeta_id($objectId);\n\n if(!$object) {\n $this->jsonMessages['messages'][] = [\n 'type' => 'warning',\n 'content' => 'Object not found!'\n ];\n return $this->jsonMessages;\n }\n $object->delete();\n\n \n $this->jsonMessages['messages'][] = [\n 'type' => 'success',\n 'content' => 'Object has been deleted!'\n ];\n return $this->jsonMessages;\n \n\n }\n }", "public function deletemeta($meta) {\n\t\tif ($this->req ['auth_type'] == 'oauth') {\n\t\t\tif (( int ) $meta == 0) {\n\t\t\t\t$oRow = $this->oMetas->getById ( $meta );\n\t\t\t\tif (is_array ( $oRow )) {\n\t\t\t\t\t$meta = ( int ) $oRow ['idmeta'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (( int ) $meta > 0) {\n\t\t\t\t\n\t\t\t\t$oTableCompMetas = new Application_Model_Table ();\n\t\t\t\t$oTableCompMetas->setTable ( 'comp_metas' );\n\t\t\t\t$oTableCompMetas->setPrimary ( 'idcomp_meta' );\n\t\t\t\t$oSelect = $oTableCompMetas->fetchAll ( $oTableCompMetas->select ()->from ( $oTableCompMetas->getTable () )->where ( 'metas_idmeta=' . ( int ) $meta ) );\n\t\t\t\tif (isset ( $_GET ['force'] ) && $_GET ['force'] == 'yes') {\n\t\t\t\t\tif ($this->isExtendable ()) {\n\t\t\t\t\t\tif ($this->oMetas->deleteMeta ( $meta )) {\n\t\t\t\t\t\t\t$iGiveBudgetBack = $this->usr;\n\t\t\t\t\t\t\tif (isset ( $oRowToDelete->accounts_idaccount ) && ( int ) $oRowToDelete->accounts_idaccount > 0) {\n\t\t\t\t\t\t\t\t$iIdCreator = ( int ) $oRowToDelete->accounts_idaccount;\n\t\t\t\t\t\t\t\t$iGiveBudgetBack = ($iIdCreator > 0) ? $iIdCreator : $iGiveBudgetBack;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->setUsage ( $iGiveBudgetBack, array ('maxmetas' => - 1 ) );\n\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('meta' => $meta, 'message' => 'META_WAS_DELETED', 'comps_affected' => ( int ) $oSelect->count () ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'MISSING_EXTEND_RIGHT' ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ($this->isDeleteable ()) {\n\t\t\t\t\t\tif ($oSelect->count () == 0) {\n\t\t\t\t\t\t\t$oRowToDelete = $this->oMetas->fetchRow ( $this->oMetas->select ()->where ( $this->oMetas->getPrimary () . '=' . $meta ) );\n\t\t\t\t\t\t\tif ($this->oMetas->deleteMeta ( $meta )) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$iGiveBudgetBack = $this->usr;\n\t\t\t\t\t\t\t\tif (isset ( $oRowToDelete->accounts_idaccount ) && ( int ) $oRowToDelete->accounts_idaccount > 0) {\n\t\t\t\t\t\t\t\t\t$iIdCreator = ( int ) $oRowToDelete->accounts_idaccount;\n\t\t\t\t\t\t\t\t\t$iGiveBudgetBack = ($iIdCreator > 0) ? $iIdCreator : $iGiveBudgetBack;\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$this->setUsage ( $iGiveBudgetBack, array ('maxmetas' => - 1 ) );\n\t\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('meta' => $meta, 'message' => 'META_WAS_DELETED' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_IN_TOUCH_WITH_COMPOSITE' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'MISSING_DELETE_RIGHT' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_NOT_FOUND' ) );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'OAUTH_ACCESS_ONLY' ) );\n\t\t}\n\t\treturn $this->getResponse ();\n\t}", "private function createDeleteForm(Metas $meta)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_crud_metas_delete', array('id' => $meta->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function acf_delete_metadata($post_id = 0, $name = '', $hidden = \\false)\n{\n}", "public function delete_meta( &$object, $meta ) {\n\t\t}", "protected function deleteMetaformRequest($realmId, $metaformId)\n {\n // verify the required parameter 'realmId' is set\n if ($realmId === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $realmId when calling deleteMetaform'\n );\n }\n // verify the required parameter 'metaformId' is set\n if ($metaformId === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $metaformId when calling deleteMetaform'\n );\n }\n\n $resourcePath = '/realms/{realmId}/metaforms/{metaformId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($realmId !== null) {\n $resourcePath = str_replace(\n '{' . 'realmId' . '}',\n ObjectSerializer::toPathValue($realmId),\n $resourcePath\n );\n }\n // path params\n if ($metaformId !== null) {\n $resourcePath = str_replace(\n '{' . 'metaformId' . '}',\n ObjectSerializer::toPathValue($metaformId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json;charset=utf-8']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json;charset=utf-8'],\n ['application/json;charset=utf-8']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function deleteMetaformAsyncWithHttpInfo($realmId, $metaformId)\n {\n $returnType = '';\n $request = $this->deleteMetaformRequest($realmId, $metaformId);\n\n return $this->client\n ->sendAsync($request)\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = \\false)\n {\n }", "public static function delete(){\n\t\tif(isset($_POST['formId']) && isset($_POST['personnalInformationName'])){\n\t\t\t$data = array(\n\t\t\t\t\"formId\" => $_POST['formId'],\n\t\t\t\t\"personnalInformationName\" => $_POST['personnalInformationName']\n\t\t\t);\n\t\t\techo json_encode(ModelAssocFormPI::delete($data));\n\t\t}else{\n\t\t\techo json_encode(false);\n\t\t}\n\t}", "function wp_ajax_delete_meta()\n {\n }", "function delete_meta($mid)\n {\n }", "protected function deleteMeta()\n {\n $sql = sprintf(\n 'DELETE FROM %sfaqattachment WHERE id = %d',\n PMF_Db::getTablePrefix(),\n $this->id\n );\n\n $this->db->query($sql);\n }", "protected function deleteMeta() {\n Meta::deleteAll([\n 'owner' => $this->tableName(),\n 'owner_id' => $this->{static::meta_id_field()}\n ]);\n }", "function delete_post_meta($term_id, $taxonomy, $meta_key, $meta_value = '') {\n\n return delete_metadata('post', $post_id, $meta_key, $meta_value);\n}", "public function deletePostMeta() {\n delete_post_meta($this->id, $this->_post_meta_name);\n }", "public function delete_meta( $key, $value = '', $delete_all = false );", "public function onDeleteForm($info)\n {\n $form_id = $info[\"form_id\"];\n $L = $this->getLangStrings();\n\n $published_forms = Forms::getPublishedForms($form_id);\n foreach ($published_forms[\"results\"] as $config)\n {\n $published_form_id = $config[\"published_form_id\"];\n list($success, $message) = Forms::deletePublishedForm($form_id, $published_form_id, \"yes\", $L);\n\n // if there was a problem with the last function call, there was probably just a problem deleting\n // one of the files. Ignore this: just re-call the function with override \"on\". This ensures the configuration\n // is at least deleted\n if (!$success) {\n Forms::deletePublishedForm($form_id, $published_form_id, \"yes\", $L, true);\n }\n }\n }", "public function setDeleteMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Clarifai\\Api\\DeleteMetadata::class);\n $this->writeOneof(4, $var);\n\n return $this;\n }", "public function deleteMeta($key, $value = null)\n {\n // dump($this->ID, $key, $value);\n return delete_user_meta($this->ID, $key, $value);\n }", "function delete_post_meta($post_id, $meta_key, $meta_value = '')\n {\n }", "public static function delete_meta( $object_id, $meta_key, $meta_value = '' ) {\n\n\t\tdelete_term_meta( $object_id, $meta_key, $meta_value );\n\t}", "public function delMetadata() {}", "public function delMetadata() {}", "public function delMetadata() {}", "function delete_metadata_by_mid($meta_type, $meta_id)\n {\n }", "function delete_term_meta_by_key($term_meta_key, $taxonomy) {\n\n return delete_metadata( 'post', null, $term_meta_key, '', true );\n}", "function delete_site_meta($site_id, $meta_key, $meta_value = '')\n {\n }", "function delete_term_meta($term_id, $meta_key, $meta_value = '')\n {\n }", "function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {\n\treturn delete_metadata( 'taxonomy', $term_id, $meta_key, $meta_value );\n}", "private function sl_delete_metadata_by_mid($meta_id){\n\n\t\tif (!$result_delete = delete_metadata_by_mid( 'post', $meta_id )){\n\n \t\tsl_debbug('## Error. Deleting item with meta_id '.$meta_id, 'mediameta');\n\t\t\t\n\t\t}\n\n\t}" ]
[ "0.6101094", "0.59550875", "0.5826128", "0.57069635", "0.5661732", "0.5607822", "0.5595504", "0.55251414", "0.5524322", "0.5464172", "0.53917533", "0.53383577", "0.52630144", "0.5227073", "0.5219346", "0.5218273", "0.5185178", "0.51560545", "0.5136401", "0.51048887", "0.50845176", "0.5050385", "0.5050385", "0.5050385", "0.50416976", "0.49362493", "0.49041593", "0.48987544", "0.48699242", "0.48697665" ]
0.6741277
0